summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/build_cmake.yml16
-rw-r--r--.gitignore2
-rw-r--r--CMakeLists.txt1
-rw-r--r--Doxyfile10
-rw-r--r--addon/doxyapp/CMakeLists.txt2
-rw-r--r--addon/doxyapp/doxyapp.cpp37
-rw-r--r--addon/doxyparse/CMakeLists.txt2
-rw-r--r--addon/doxyparse/doxyparse.cpp48
-rw-r--r--addon/doxywizard/CMakeLists.txt1
-rw-r--r--doc/CMakeLists.txt1
-rw-r--r--doc/changelog.doc10
-rw-r--r--doc/commands.doc14
-rw-r--r--doc/faq.doc10
-rw-r--r--doc/install_prefix2
-rw-r--r--filesystem/filesystem.hpp5868
-rw-r--r--libmd5/md5.c20
-rw-r--r--libmd5/md5.h2
-rw-r--r--libxml/xml.l9
-rw-r--r--qtools/CMakeLists.txt44
-rw-r--r--qtools/Doxyfile320
-rw-r--r--qtools/LICENSE.GPL349
-rw-r--r--qtools/LICENSE.QPL103
-rw-r--r--qtools/Makefile.in31
-rw-r--r--qtools/README4
-rw-r--r--qtools/qarray.doc486
-rw-r--r--qtools/qarray.h110
-rw-r--r--qtools/qasciidict.h107
-rw-r--r--qtools/qbuffer.cpp465
-rw-r--r--qtools/qbuffer.h98
-rw-r--r--qtools/qcollection.cpp182
-rw-r--r--qtools/qcollection.h73
-rw-r--r--qtools/qconfig.h1
-rw-r--r--qtools/qcstringlist.cpp195
-rw-r--r--qtools/qcstringlist.h51
-rw-r--r--qtools/qdatastream.cpp944
-rw-r--r--qtools/qdatastream.h173
-rw-r--r--qtools/qdict.h49
-rw-r--r--qtools/qdir.cpp1204
-rw-r--r--qtools/qdir.h237
-rw-r--r--qtools/qdir_unix.cpp290
-rw-r--r--qtools/qdir_win32.cpp485
-rw-r--r--qtools/qfeatures.h978
-rw-r--r--qtools/qfile.cpp550
-rw-r--r--qtools/qfile.h128
-rw-r--r--qtools/qfile_unix.cpp669
-rw-r--r--qtools/qfile_win32.cpp678
-rw-r--r--qtools/qfiledefs_p.h268
-rw-r--r--qtools/qfileinfo.cpp457
-rw-r--r--qtools/qfileinfo.h134
-rw-r--r--qtools/qfileinfo_unix.cpp388
-rw-r--r--qtools/qfileinfo_win32.cpp320
-rw-r--r--qtools/qgarray.cpp747
-rw-r--r--qtools/qgarray.h120
-rw-r--r--qtools/qgdict.cpp1217
-rw-r--r--qtools/qgdict.h222
-rw-r--r--qtools/qgeneric.h43
-rw-r--r--qtools/qglist.cpp1203
-rw-r--r--qtools/qglist.h254
-rw-r--r--qtools/qglobal.cpp687
-rw-r--r--qtools/qglobal.h628
-rw-r--r--qtools/qgstring.cpp258
-rw-r--r--qtools/qgstring.h139
-rw-r--r--qtools/qinternallist.h138
-rw-r--r--qtools/qiodevice.cpp638
-rw-r--r--qtools/qiodevice.h155
-rw-r--r--qtools/qlist.h158
-rw-r--r--qtools/qmodules.h11
-rw-r--r--qtools/qptrdict.doc486
-rw-r--r--qtools/qptrdict.h103
-rw-r--r--qtools/qregexp.cpp1093
-rw-r--r--qtools/qregexp_p.h92
-rw-r--r--qtools/qshared.h57
-rw-r--r--qtools/qstack_p.h71
-rw-r--r--qtools/qstring.cpp15427
-rw-r--r--qtools/qstring.h879
-rw-r--r--qtools/qstringlist.cpp311
-rw-r--r--qtools/qstringlist.h82
-rw-r--r--qtools/qstrlist.doc5
-rw-r--r--qtools/qstrlist.h109
-rw-r--r--qtools/qtextcodec.cpp2071
-rw-r--r--qtools/qtextcodec.h104
-rw-r--r--qtools/qtl.doc249
-rw-r--r--qtools/qtl.h198
-rw-r--r--qtools/qutfcodec.cpp276
-rw-r--r--qtools/qutfcodec.h71
-rw-r--r--qtools/qvaluelist_p.h455
-rw-r--r--qtools/qvaluestack_p.h64
-rw-r--r--src/CMakeLists.txt10
-rw-r--r--src/arguments.h2
-rw-r--r--src/bufstr.h2
-rw-r--r--src/caseconvert.h2906
-rw-r--r--src/caseconvert.py59
-rw-r--r--src/cite.cpp234
-rw-r--r--src/cite.h12
-rw-r--r--src/clangparser.cpp27
-rw-r--r--src/classdef.cpp525
-rw-r--r--src/classdef.h62
-rw-r--r--src/classlist.cpp2
-rw-r--r--src/classlist.h2
-rw-r--r--src/cmdmapper.cpp6
-rw-r--r--src/cmdmapper.h4
-rw-r--r--src/code.h10
-rw-r--r--src/code.l821
-rw-r--r--src/commentcnv.h9
-rw-r--r--src/commentcnv.l37
-rw-r--r--src/commentscan.h12
-rw-r--r--src/commentscan.l518
-rw-r--r--src/conceptdef.cpp733
-rw-r--r--src/conceptdef.h82
-rw-r--r--src/condparser.cpp39
-rw-r--r--src/condparser.h10
-rw-r--r--src/config.h10
-rw-r--r--src/config.xml56
-rwxr-xr-xsrc/configgen.py8
-rw-r--r--src/configimpl.h65
-rw-r--r--src/configimpl.l399
-rw-r--r--src/constexp.l2
-rw-r--r--src/context.cpp439
-rw-r--r--src/context.h80
-rw-r--r--src/cppvalue.cpp4
-rw-r--r--src/debug.cpp9
-rw-r--r--src/debug.h6
-rw-r--r--src/declinfo.h8
-rw-r--r--src/declinfo.l22
-rw-r--r--src/defargs.h2
-rw-r--r--src/defargs.l42
-rw-r--r--src/defgen.cpp292
-rw-r--r--src/define.h2
-rw-r--r--src/definition.cpp191
-rw-r--r--src/definition.h33
-rw-r--r--src/definitionimpl.h72
-rw-r--r--src/dia.cpp28
-rw-r--r--src/dia.h11
-rw-r--r--src/diagram.cpp526
-rw-r--r--src/diagram.h11
-rw-r--r--src/dir.cpp303
-rw-r--r--src/dir.h104
-rw-r--r--src/dirdef.cpp109
-rw-r--r--src/dirdef.h14
-rw-r--r--src/docbookgen.cpp538
-rw-r--r--src/docbookgen.h175
-rw-r--r--src/docbookvisitor.cpp294
-rw-r--r--src/docbookvisitor.h18
-rw-r--r--src/docgroup.cpp32
-rw-r--r--src/docgroup.h12
-rw-r--r--src/docparser.cpp288
-rw-r--r--src/docparser.h28
-rw-r--r--src/docsets.cpp292
-rw-r--r--src/docsets.h26
-rw-r--r--src/doctokenizer.h11
-rw-r--r--src/doctokenizer.l89
-rw-r--r--src/docvisitor.cpp4
-rw-r--r--src/docvisitor.h4
-rw-r--r--src/dot.cpp69
-rw-r--r--src/dot.h14
-rw-r--r--src/dotcallgraph.cpp14
-rw-r--r--src/dotcallgraph.h7
-rw-r--r--src/dotclassgraph.cpp63
-rw-r--r--src/dotclassgraph.h16
-rw-r--r--src/dotdirdeps.cpp28
-rw-r--r--src/dotdirdeps.h8
-rw-r--r--src/dotfilepatcher.cpp210
-rw-r--r--src/dotfilepatcher.h13
-rw-r--r--src/dotgfxhierarchytable.cpp62
-rw-r--r--src/dotgfxhierarchytable.h10
-rw-r--r--src/dotgraph.cpp133
-rw-r--r--src/dotgraph.h29
-rw-r--r--src/dotgroupcollaboration.cpp20
-rw-r--r--src/dotgroupcollaboration.h12
-rw-r--r--src/dotincldepgraph.cpp23
-rw-r--r--src/dotincldepgraph.h10
-rw-r--r--src/dotlegendgraph.cpp11
-rw-r--r--src/dotlegendgraph.h2
-rw-r--r--src/dotnode.cpp144
-rw-r--r--src/dotnode.h21
-rw-r--r--src/dotrunner.cpp112
-rw-r--r--src/dotrunner.h27
-rw-r--r--src/doxygen.cpp1512
-rw-r--r--src/doxygen.h6
-rw-r--r--src/eclipsehelp.cpp100
-rw-r--r--src/eclipsehelp.h27
-rw-r--r--src/emoji.cpp11
-rw-r--r--src/emoji.h8
-rw-r--r--src/entry.cpp15
-rw-r--r--src/entry.h16
-rw-r--r--src/example.h2
-rw-r--r--src/filedef.cpp235
-rw-r--r--src/filedef.h19
-rw-r--r--src/fileinfo.cpp161
-rw-r--r--src/fileinfo.h47
-rw-r--r--src/filename.h8
-rw-r--r--src/fileparser.cpp23
-rw-r--r--src/fileparser.h8
-rw-r--r--src/formula.cpp203
-rw-r--r--src/formula.h7
-rw-r--r--src/fortrancode.h4
-rw-r--r--src/fortrancode.l158
-rw-r--r--src/fortranscanner.h4
-rwxr-xr-xsrc/fortranscanner.l130
-rw-r--r--src/ftextstream.cpp260
-rw-r--r--src/ftextstream.h76
-rw-r--r--src/ftvhelp.cpp126
-rw-r--r--src/ftvhelp.h27
-rw-r--r--src/groupdef.cpp217
-rw-r--r--src/groupdef.h16
-rw-r--r--src/growbuf.h37
-rw-r--r--src/htags.cpp50
-rw-r--r--src/htmlattrib.h3
-rw-r--r--src/htmldocvisitor.cpp179
-rw-r--r--src/htmldocvisitor.h12
-rw-r--r--src/htmlentity.cpp4
-rw-r--r--src/htmlentity.h4
-rw-r--r--src/htmlgen.cpp1442
-rw-r--r--src/htmlgen.h255
-rw-r--r--src/htmlhelp.cpp125
-rw-r--r--src/htmlhelp.h16
-rw-r--r--src/image.cpp65
-rw-r--r--src/image.h11
-rw-r--r--src/index.cpp871
-rw-r--r--src/index.h42
-rw-r--r--src/language.cpp6
-rw-r--r--src/language.h8
-rw-r--r--src/latexdocvisitor.cpp126
-rw-r--r--src/latexdocvisitor.h12
-rw-r--r--src/latexgen.cpp1157
-rw-r--r--src/latexgen.h235
-rw-r--r--src/layout.cpp108
-rw-r--r--src/layout.h18
-rw-r--r--src/lexcode.h4
-rw-r--r--src/lexcode.l97
-rw-r--r--src/lexscanner.h4
-rw-r--r--src/lexscanner.l371
-rw-r--r--src/linkedmap.h144
-rw-r--r--src/mandocvisitor.cpp299
-rw-r--r--src/mandocvisitor.h12
-rw-r--r--src/mangen.cpp304
-rw-r--r--src/mangen.h138
-rw-r--r--src/markdown.cpp181
-rw-r--r--src/markdown.h10
-rw-r--r--src/memberdef.cpp670
-rw-r--r--src/memberdef.h66
-rw-r--r--src/membergroup.cpp36
-rw-r--r--src/membergroup.h14
-rw-r--r--src/memberlist.cpp69
-rw-r--r--src/memberlist.h12
-rw-r--r--src/membername.h8
-rw-r--r--src/message.cpp37
-rw-r--r--src/message.h15
-rw-r--r--src/msc.cpp79
-rw-r--r--src/msc.h16
-rw-r--r--src/namespacedef.cpp186
-rw-r--r--src/namespacedef.h19
-rw-r--r--src/outputgen.cpp27
-rw-r--r--src/outputgen.h148
-rw-r--r--src/outputlist.cpp8
-rw-r--r--src/outputlist.h136
-rw-r--r--src/pagedef.cpp36
-rw-r--r--src/pagedef.h7
-rw-r--r--src/parserintf.h40
-rw-r--r--src/perlmodgen.cpp384
-rw-r--r--src/plantuml.cpp25
-rw-r--r--src/plantuml.h15
-rw-r--r--src/portable.cpp169
-rw-r--r--src/portable.h32
-rw-r--r--src/portable_c.c6
-rw-r--r--src/pre.h11
-rw-r--r--src/pre.l357
-rw-r--r--src/printdocvisitor.h50
-rw-r--r--src/pycode.h4
-rw-r--r--src/pycode.l127
-rw-r--r--src/pyscanner.h4
-rw-r--r--src/pyscanner.l261
-rw-r--r--src/qcstring.cpp (renamed from qtools/qcstring.cpp)174
-rw-r--r--src/qcstring.h (renamed from qtools/qcstring.h)254
-rw-r--r--src/qhp.cpp91
-rw-r--r--src/qhp.h20
-rw-r--r--src/qhpxmlwriter.cpp76
-rw-r--r--src/qhpxmlwriter.h42
-rw-r--r--src/reflist.cpp7
-rw-r--r--src/reflist.h18
-rw-r--r--src/regex.cpp37
-rw-r--r--src/resourcemgr.cpp62
-rw-r--r--src/resourcemgr.h12
-rw-r--r--src/rtfdocvisitor.cpp304
-rw-r--r--src/rtfdocvisitor.h16
-rw-r--r--src/rtfgen.cpp1845
-rw-r--r--src/rtfgen.h162
-rw-r--r--src/rtfstyle.cpp16
-rw-r--r--src/rtfstyle.h7
-rw-r--r--src/scanner.h4
-rw-r--r--src/scanner.l771
-rw-r--r--src/scopedtypevariant.h5
-rw-r--r--src/searchindex.cpp350
-rw-r--r--src/searchindex.h24
-rw-r--r--src/section.h28
-rw-r--r--src/sqlcode.h4
-rw-r--r--src/sqlcode.l18
-rw-r--r--src/sqlite3gen.cpp146
-rw-r--r--src/stlsupport.cpp2
-rw-r--r--src/symbolmap.h16
-rw-r--r--src/symbolresolver.cpp110
-rw-r--r--src/symbolresolver.h5
-rw-r--r--src/tagreader.cpp356
-rwxr-xr-x[-rw-r--r--]src/template.cpp422
-rw-r--r--src/template.h20
-rw-r--r--src/textdocvisitor.cpp15
-rw-r--r--src/textdocvisitor.h11
-rw-r--r--src/textstream.h251
-rw-r--r--src/tooltip.cpp9
-rw-r--r--src/translator.h72
-rw-r--r--src/translator_adapter.h56
-rw-r--r--src/translator_am.h36
-rw-r--r--src/translator_ar.h24
-rw-r--r--src/translator_br.h60
-rw-r--r--src/translator_ca.h36
-rw-r--r--src/translator_cn.h46
-rw-r--r--src/translator_cz.h47
-rw-r--r--src/translator_de.h48
-rw-r--r--src/translator_dk.h36
-rw-r--r--src/translator_en.h95
-rw-r--r--src/translator_eo.h40
-rw-r--r--src/translator_es.h50
-rw-r--r--src/translator_fa.h34
-rw-r--r--src/translator_fi.h26
-rw-r--r--src/translator_fr.h50
-rw-r--r--src/translator_gr.h46
-rw-r--r--src/translator_hr.h40
-rw-r--r--src/translator_hu.h46
-rw-r--r--src/translator_id.h36
-rw-r--r--src/translator_it.h46
-rw-r--r--src/translator_jp.h46
-rw-r--r--src/translator_kr.h46
-rw-r--r--src/translator_lt.h24
-rw-r--r--src/translator_lv.h40
-rw-r--r--src/translator_mk.h28
-rw-r--r--src/translator_nl.h90
-rwxr-xr-xsrc/translator_no.h24
-rw-r--r--src/translator_pl.h40
-rw-r--r--src/translator_pt.h60
-rw-r--r--src/translator_ro.h46
-rw-r--r--src/translator_ru.h46
-rw-r--r--src/translator_sc.h28
-rw-r--r--src/translator_si.h24
-rw-r--r--src/translator_sk.h48
-rw-r--r--src/translator_sr.h28
-rw-r--r--src/translator_sv.h52
-rw-r--r--src/translator_tr.h34
-rw-r--r--src/translator_tw.h46
-rw-r--r--src/translator_ua.h40
-rw-r--r--src/translator_vi.h28
-rw-r--r--src/translator_za.h28
-rw-r--r--src/types.h4
-rw-r--r--src/utf8.cpp233
-rw-r--r--src/utf8.h72
-rw-r--r--src/util.cpp1221
-rw-r--r--src/util.h199
-rw-r--r--src/vhdlcode.h4
-rw-r--r--src/vhdlcode.l204
-rw-r--r--src/vhdldocgen.cpp413
-rw-r--r--src/vhdldocgen.h47
-rw-r--r--src/vhdljjparser.cpp57
-rwxr-xr-xsrc/vhdljjparser.h11
-rw-r--r--src/xmlcode.h4
-rw-r--r--src/xmlcode.l18
-rw-r--r--src/xmldocvisitor.cpp83
-rw-r--r--src/xmldocvisitor.h12
-rw-r--r--src/xmlgen.cpp798
-rw-r--r--src/xmlgen.h42
-rw-r--r--templates/general/layout_default.xml14
-rw-r--r--templates/html/doxygen.css6
-rw-r--r--templates/html/htmllayout.tpl2
-rw-r--r--templates/html/search.js6
-rwxr-xr-xtemplates/latex/tabu_doxygen.sty5114
-rw-r--r--templates/xml/compound.xsd4
-rw-r--r--templates/xml/index.xsd1
-rw-r--r--vhdlparser/CMakeLists.txt7
-rw-r--r--vhdlparser/VhdlParser.cc217
-rw-r--r--vhdlparser/VhdlParser.h2024
-rw-r--r--vhdlparser/VhdlParserTokenManager.cc4
-rw-r--r--vhdlparser/vhdl_adj.py2
-rwxr-xr-xvhdlparser/vhdlparser.jj236
381 files changed, 30654 insertions, 58069 deletions
diff --git a/.github/workflows/build_cmake.yml b/.github/workflows/build_cmake.yml
index 9708ae1..bf207bc 100644
--- a/.github/workflows/build_cmake.yml
+++ b/.github/workflows/build_cmake.yml
@@ -63,7 +63,8 @@ jobs:
build_gen: "NMake Makefiles"
}
steps:
- - uses: actions/checkout@v1
+ - name: Checkout doxygen
+ uses: actions/checkout@v1
- name: Download MikTex (Windows)
run: |
@@ -81,7 +82,8 @@ jobs:
shell: pwsh
if: matrix.config.os == 'windows-latest'
- - uses: suisei-cn/actions-download-file@v1
+ - name: Install libiconv (Windows)
+ uses: suisei-cn/actions-download-file@v1
with:
url: "https://github.com/pffang/libiconv-for-Windows/releases/download/v1.16/libiconv-for-Windows_1.16.7z"
target: .
@@ -101,7 +103,7 @@ jobs:
run: |
sudo apt remove llvm-8 clang-8 libclang-common-8-dev clang-format-8 libllvm8
sudo apt remove llvm-9 llvm-9-dev llvm-9-tools llvm-9-runtime clang-9 libclang-common-9-dev clang-format-9 libllvm9
- #sudo apt remove llvm-10 llvm-10-dev llvm-10-tools llvm-10-runtime clang-10 clang-format-10 libclang-common-10-dev libclang-cpp10 libclang1-10 libllvm10
+ sudo apt remove llvm-11 llvm-11-dev llvm-11-tools llvm-11-runtime clang-11 clang-format-11 libclang-common-11-dev libclang-cpp11 libclang1-11 libllvm11
sudo apt-get autoremove
sudo apt-get clean
#sudo apt install libclang-9-dev libclang-common-9-dev
@@ -163,10 +165,10 @@ jobs:
- name: Setting Ghostscript paths (Windows)
shell: bash
run: |
- echo "C:/Program Files (x86)/gs/gs9.53.3/bin/" >> $GITHUB_PATH
- echo "C:/Program Files/gs/gs9.53.3/bin/" >> $GITHUB_PATH
- export PATH="/c/Program Files (x86)/gs/gs9.53.3/bin/:$PATH"
- export PATH="/c/Program Files/gs/gs9.53.3/bin/:$PATH"
+ export GSpath=`find /c/Prog*/gs -name gswin\*c.exe | sed -e "s/gswin.*c.exe//"`
+ export PATH="$GSpath:$PATH"
+ export GSpath=`echo "$GSpath" | sed -e "s%/c%C:%"`
+ echo "$GSpath" >> $GITHUB_PATH
if: matrix.config.os == 'windows-latest'
- name: Install xmllint (Linux)
diff --git a/.gitignore b/.gitignore
index b599b7a..987aa13 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,6 +14,8 @@
/doxygen_docs
/doxygen.tag
/build*
+/qtools_docs
+/warnings.log
tags
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7f4a904..251e18b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -174,7 +174,6 @@ add_subdirectory(liblodepng)
add_subdirectory(libmscgen)
add_subdirectory(libversion)
add_subdirectory(libxml)
-add_subdirectory(qtools)
add_subdirectory(vhdlparser)
add_subdirectory(src)
diff --git a/Doxyfile b/Doxyfile
index bee971f..09dfe45 100644
--- a/Doxyfile
+++ b/Doxyfile
@@ -1,4 +1,3 @@
-# Doxyfile 1.8.16
#---------------------------------------------------------------------------
# Project related configuration options
@@ -12,7 +11,6 @@ OUTPUT_DIRECTORY = doxygen_docs
CREATE_SUBDIRS = YES
ALLOW_UNICODE_NAMES = NO
OUTPUT_LANGUAGE = English
-OUTPUT_TEXT_DIRECTION = None
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
ABBREVIATE_BRIEF =
@@ -110,6 +108,7 @@ INPUT = src \
libxml
INPUT_ENCODING = UTF-8
FILE_PATTERNS = *.h \
+ *.hpp \
*.cpp \
*.l \
*.md
@@ -131,7 +130,7 @@ USE_MDFILE_AS_MAINPAGE =
# Configuration options related to source browsing
#---------------------------------------------------------------------------
SOURCE_BROWSER = YES
-INLINE_SOURCES = NO
+INLINE_SOURCES = YES
STRIP_CODE_COMMENTS = NO
REFERENCED_BY_RELATION = YES
REFERENCES_RELATION = YES
@@ -275,8 +274,7 @@ ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = YES
EXPAND_ONLY_PREDEF = YES
SEARCH_INCLUDES = YES
-INCLUDE_PATH = qtools \
- libmd5 \
+INCLUDE_PATH = libmd5 \
liblodepng \
libmscgen
INCLUDE_FILE_PATTERNS =
@@ -286,7 +284,7 @@ SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
# Configuration options related to external references
#---------------------------------------------------------------------------
-TAGFILES = qtools_docs/qtools.tag=../../qtools_docs/html
+TAGFILES =
GENERATE_TAGFILE = doxygen.tag
ALLEXTERNALS = NO
EXTERNAL_GROUPS = YES
diff --git a/addon/doxyapp/CMakeLists.txt b/addon/doxyapp/CMakeLists.txt
index 9213e22..a6fde42 100644
--- a/addon/doxyapp/CMakeLists.txt
+++ b/addon/doxyapp/CMakeLists.txt
@@ -4,7 +4,6 @@ include_directories(
${PROJECT_SOURCE_DIR}/src
${PROJECT_SOURCE_DIR}/libversion
${GENERATED_SRC}
- ${PROJECT_SOURCE_DIR}/qtools
${ICONV_INCLUDE_DIR}
${CLANG_INCLUDEDIR}
)
@@ -36,7 +35,6 @@ endif()
target_link_libraries(doxyapp
doxymain
-qtools
md5
xml
lodepng
diff --git a/addon/doxyapp/doxyapp.cpp b/addon/doxyapp/doxyapp.cpp
index 06c7af3..e51966d 100644
--- a/addon/doxyapp/doxyapp.cpp
+++ b/addon/doxyapp/doxyapp.cpp
@@ -26,8 +26,7 @@
*/
#include <stdlib.h>
-#include <qfile.h>
-#include <qdir.h>
+#include "dir.h"
#include "doxygen.h"
#include "outputgen.h"
#include "parserintf.h"
@@ -48,23 +47,21 @@ class XRefDummyCodeGenerator : public CodeOutputInterface
// these are just null functions, they can be used to produce a syntax highlighted
// and cross-linked version of the source code, but who needs that anyway ;-)
- void codify(const char *) {}
- void writeCodeLink(const char *,const char *,const char *,const char *,const char *) {}
- void writeLineNumber(const char *,const char *,const char *,int) {}
- virtual void writeTooltip(const char *,const DocLinkInfo &,
- const char *,const char *,const SourceLinkInfo &,
- const SourceLinkInfo &) {}
- void startCodeLine(bool) {}
- void endCodeLine() {}
- void startCodeAnchor(const char *) {}
- void endCodeAnchor() {}
- void startFontClass(const char *) {}
- void endFontClass() {}
- void writeCodeAnchor(const char *) {}
- void setCurrentDoc(const Definition *,const char *,bool) {}
- void addWord(const char *,bool) {}
- void startCodeFragment(const char *) {}
- void endCodeFragment(const char *) {}
+ void codify(const QCString &) override {}
+ void writeCodeLink(const QCString &,const QCString &,const QCString &,const QCString &,const QCString &) override {}
+ void writeLineNumber(const QCString &,const QCString &,const QCString &,int) override {}
+ virtual void writeTooltip(const QCString &,const DocLinkInfo &,
+ const QCString &,const QCString &,const SourceLinkInfo &,
+ const SourceLinkInfo &) override {}
+ void startCodeLine(bool) override {}
+ void endCodeLine() override {}
+ void startFontClass(const QCString &) override {}
+ void endFontClass() override {}
+ void writeCodeAnchor(const QCString &) override {}
+ void setCurrentDoc(const Definition *,const QCString &,bool) override {}
+ void addWord(const QCString &,bool) override {}
+ void startCodeFragment(const QCString &) override {}
+ void endCodeFragment(const QCString &) override {}
// here we are presented with the symbols found by the code parser
void linkableSymbol(int l, const char *sym,Definition *symDef,Definition *context)
@@ -297,7 +294,7 @@ int main(int argc,char **argv)
}
// clean up after us
- QDir().rmdir("/tmp/doxygen");
+ Dir().rmdir("/tmp/doxygen");
while (1)
{
diff --git a/addon/doxyparse/CMakeLists.txt b/addon/doxyparse/CMakeLists.txt
index 7a422a1..f439c29 100644
--- a/addon/doxyparse/CMakeLists.txt
+++ b/addon/doxyparse/CMakeLists.txt
@@ -4,7 +4,6 @@ include_directories(
${PROJECT_SOURCE_DIR}/src
${PROJECT_SOURCE_DIR}/libversion
${GENERATED_SRC}
- ${PROJECT_SOURCE_DIR}/qtools
${ICONV_INCLUDE_DIR}
${CLANG_INCLUDEDIR}
)
@@ -24,7 +23,6 @@ endif()
target_link_libraries(doxyparse
doxymain
-qtools
md5
xml
lodepng
diff --git a/addon/doxyparse/doxyparse.cpp b/addon/doxyparse/doxyparse.cpp
index 4059861..65e7327 100644
--- a/addon/doxyparse/doxyparse.cpp
+++ b/addon/doxyparse/doxyparse.cpp
@@ -40,8 +40,7 @@
#include <cstdlib>
#include <sstream>
#include <map>
-#include <qdir.h>
-#include <qcstring.h>
+#include "qcstring.h"
#include "namespacedef.h"
#include "portable.h"
@@ -53,24 +52,21 @@ class Doxyparse : public CodeOutputInterface
// these are just null functions, they can be used to produce a syntax highlighted
// and cross-linked version of the source code, but who needs that anyway ;-)
- void codify(const char *) {}
- void writeCodeLink(const char *,const char *,const char *,const char *,const char *) {}
- void startCodeLine() {}
- void endCodeLine() {}
- void startCodeAnchor(const char *) {}
- void endCodeAnchor() {}
- void startFontClass(const char *) {}
- void endFontClass() {}
- void writeCodeAnchor(const char *) {}
- void writeLineNumber(const char *,const char *,const char *,int) {}
- virtual void writeTooltip(const char *,const DocLinkInfo &,
- const char *,const char *,const SourceLinkInfo &,
- const SourceLinkInfo &) {}
- void startCodeLine(bool) {}
- void setCurrentDoc(const Definition *,const char *,bool) {}
- void addWord(const char *,bool) {}
- void startCodeFragment(const char *) {}
- void endCodeFragment(const char *) {}
+ void codify(const QCString &) override {}
+ void writeCodeLink(const QCString &,const QCString &,const QCString &,const QCString &,const QCString &) override {}
+ void startCodeLine(bool) override {}
+ void endCodeLine() override {}
+ void writeCodeAnchor(const QCString &) override {}
+ void startFontClass(const QCString &) override {}
+ void endFontClass() override {}
+ void writeLineNumber(const QCString &,const QCString &,const QCString &,int) override {}
+ virtual void writeTooltip(const QCString &,const DocLinkInfo &,
+ const QCString &,const QCString &,const SourceLinkInfo &,
+ const SourceLinkInfo &) override {}
+ void setCurrentDoc(const Definition *,const QCString &,bool) override {}
+ void addWord(const QCString &,bool) override {}
+ void startCodeFragment(const QCString &) override {}
+ void endCodeFragment(const QCString &) override {}
void linkableSymbol(int l, const char *sym, Definition *symDef, Definition *context)
{
@@ -379,7 +375,7 @@ static bool checkLanguage(std::string& filename, std::string extension) {
* about whether it is a C project or not. */
static void detectProgrammingLanguage(FileNameLinkedMap &fnli) {
for (const auto &fn : fnli) {
- std::string filename = fn->fileName();
+ std::string filename = fn->fileName().str();
if (
checkLanguage(filename, ".cc") ||
checkLanguage(filename, ".cxx") ||
@@ -455,9 +451,9 @@ int main(int argc,char **argv) {
// we need a place to put intermediate files
std::ostringstream tmpdir;
unsigned int pid = Portable::pid();
- if (Portable::getenv("TMP"))
+ if (!Portable::getenv("TMP").isEmpty())
tmpdir << Portable::getenv("TMP") << "/doxyparse-" << pid;
- else if (Portable::getenv("TEMP"))
+ else if (!Portable::getenv("TEMP").isEmpty())
tmpdir << Portable::getenv("TEMP") << "/doxyparse-" << pid;
else
tmpdir << "doxyparse-" << pid;
@@ -521,12 +517,12 @@ int main(int argc,char **argv) {
}
}
- QDir thisDir;
+ Dir thisDir;
// remove temporary files
- if (!Doxygen::filterDBFileName.isEmpty()) thisDir.remove(Doxygen::filterDBFileName);
+ if (!Doxygen::filterDBFileName.isEmpty()) thisDir.remove(Doxygen::filterDBFileName.str());
// clean up after us
- thisDir.rmdir(Config_getString(OUTPUT_DIRECTORY));
+ thisDir.rmdir(Config_getString(OUTPUT_DIRECTORY).str());
startYamlDocument();
listSymbols();
diff --git a/addon/doxywizard/CMakeLists.txt b/addon/doxywizard/CMakeLists.txt
index a6f65f8..6813a6d 100644
--- a/addon/doxywizard/CMakeLists.txt
+++ b/addon/doxywizard/CMakeLists.txt
@@ -31,7 +31,6 @@ endif()
include_directories(
.
${PROJECT_SOURCE_DIR}/libversion
- ${PROJECT_SOURCE_DIR}/qtools
${GENERATED_SRC}
)
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index f2d177e..f7f680f 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -82,7 +82,6 @@ set(DOC_FILES
infoflow.fig
infoflow.png
install.doc
- install_prefix
lists.doc
markdown.doc
output.doc
diff --git a/doc/changelog.doc b/doc/changelog.doc
index 0d3dd2a..b2dc8fc 100644
--- a/doc/changelog.doc
+++ b/doc/changelog.doc
@@ -3774,7 +3774,7 @@ make sure you add the following:
<li> id <a href="https://github.com/doxygen/doxygen/issues/4508">4508</a>: Added support for &lt;inheritdoc/&gt; C# XML command
(thanks to John Werner for the patch).</li>
<li> id <a href="https://github.com/doxygen/doxygen/issues/4588">4588</a>, Added support for resolving environment variables of the
- form $(PROGRAMFILES(X86)) inside the config file</li>
+ form &#36;(PROGRAMFILES(X86)) inside the config file</li>
<li> Doxygen now shows Objective-C properties in collaboration diagrams
(thanks to Sven Weidauer for the patch).</li>
<li> Added ability to search for group or page titles.</li>
@@ -5849,7 +5849,7 @@ make sure you add the following:
<li> id 457857: Leading "struct" keyword is no longer stripped from the documentation of
functions that return a pointer to a struct.</li>
<li> id 458710: Expanding environment variables in the config file to a
- file or path name with spaces (e.g. "$(VCInstallDir)include") was
+ file or path name with spaces (e.g. "&#36;(VCInstallDir)include") was
incorrectly interpreted as a list when used with for instance <code>INPUT</code>.</li>
<li> id 458749: Undocumented constructors/destructors inside an undocumented member group
were not visible in the output.</li>
@@ -7264,7 +7264,7 @@ make sure you add the following:
now be improved significantly.</li>
<li> Made some cosmetic changes to the HTML output (thanks to Ben Harper).</li>
<li> STRIP_FROM_PATH now by default strips the path from which doxygen is
- run (i.e. $(PWD)/ on Unix)</li>
+ run (i.e. &#36;(PWD)/ on Unix)</li>
</ul>
<h3>New features</h3>
<ul>
@@ -7315,7 +7315,7 @@ make sure you add the following:
Eoin MacDonell for the fix).</li>
<li> Grouped pages in the XML output did have the same id as their group.</li>
<li> Fixed problem handling environment variables inside a
- quoted string in the config file (e.g. "$(HOME)/My Path/").</li>
+ quoted string in the config file (e.g. "&#36;(HOME)/My Path/").</li>
<li> Using "\mainpage notitle" caused the "notitle" to appear in the treeview.</li>
<li> Page references where wrong in the latex output when PDF_HYPERLINKS
was disabled.</li>
@@ -9166,7 +9166,7 @@ make sure you add the following:
(thanks to Marvin Wolfthal).</li>
<li> In some situations doxygen wanted to write a files containing a \n.</li>
<li> Environment variables can now also be used for non-string values
- in the config file, like for example QUIET = $(QUIET_ON)</li>
+ in the config file, like for example QUIET = &#36;(QUIET_ON)</li>
<li> Fixed a number of typo's in the docs (thanks to Philippe Lhoste &amp;
Jens Seidel).</li>
<li> Inheritance through typedefs within a namespace did not yield the
diff --git a/doc/commands.doc b/doc/commands.doc
index 1465a1e..eff2f42 100644
--- a/doc/commands.doc
+++ b/doc/commands.doc
@@ -60,6 +60,7 @@ documentation:
\refitem cmdcite \\cite
\refitem cmdclass \\class
\refitem cmdcode \\code
+\refitem cmdconcept \\concept
\refitem cmdcond \\cond
\refitem cmdcopybrief \\copybrief
\refitem cmdcopydetails \\copydetails
@@ -457,6 +458,15 @@ Structural indicators
\endlatexonly
<hr>
+\section cmdconcept \\concept <name>
+
+ \addindex \\concept
+ Indicates that a comment block contains documentation for a
+ C++20 concept with name \<name\>.
+ See also the \ref cmdheaderfile "\\headerfile" command to specify the
+ header a user should be included to use the concept.
+
+<hr>
\section cmddef \\def <name>
\addindex \\def
@@ -2132,7 +2142,7 @@ Make sure you have first read \ref intro "the introduction".
\warning This command only works inside related page documentation and
\e not in other documentation blocks and only has effect in the
- the specified output!
+ specified output!
<hr>
\section cmdsection \\section <section-name> (section title)
@@ -2558,7 +2568,7 @@ Commands for displaying examples
\section cmdxmlinclude \\xmlinclude <file-name>
\addindex \\xmlinclude
- This command includes contents of the the file \<file-name\> as is in the XML documentation.
+ This command includes contents of the file \<file-name\> as is in the XML documentation.
The command is equivalent to pasting the contents of the file in the documentation and
placing \ref cmdxmlonly "\\xmlonly" and \ref cmdendxmlonly "\\endxmlonly"
commands around it.
diff --git a/doc/faq.doc b/doc/faq.doc
index 95de571..23c523b 100644
--- a/doc/faq.doc
+++ b/doc/faq.doc
@@ -184,13 +184,11 @@ in the HEAD section of the HTML page.
\section faq_use_qt Why does doxygen use Qt?
-The most important reason is to have a platform abstraction for most
-Unices and Windows by means of the QFile, QFileInfo, QDir, QDate,
-QTime and QIODevice classes.
-Another reason is for the nice and bug free utility classes, like QList,
-QDict, QString, QArray, QTextStream, QRegExp, QXML etc.
+In the past (prior to version 1.9.2) doxygen used a part of Qt 2.x for various
+utility classes. These have been replaced by STL container classes in the meantime.
-The GUI front-end doxywizard uses Qt for... well... the GUI!
+The GUI front-end called Doxywizard is based on a modern version of Qt.
+Doxygen itself can also be used without the GUI.
\section faq_excl_dir How can I exclude all test directories from my directory tree?
diff --git a/doc/install_prefix b/doc/install_prefix
deleted file mode 100644
index 681eca9..0000000
--- a/doc/install_prefix
+++ /dev/null
@@ -1,2 +0,0 @@
-VERSION = $(VERSION)
-
diff --git a/filesystem/filesystem.hpp b/filesystem/filesystem.hpp
new file mode 100644
index 0000000..e4e0e27
--- /dev/null
+++ b/filesystem/filesystem.hpp
@@ -0,0 +1,5868 @@
+//---------------------------------------------------------------------------------------
+//
+// ghc::filesystem - A C++17-like filesystem implementation for C++11/C++14/C++17/C++20
+//
+//---------------------------------------------------------------------------------------
+//
+// Copyright (c) 2018, Steffen Schümann <s.schuemann@pobox.com>
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+//---------------------------------------------------------------------------------------
+//
+// To dynamically select std::filesystem where available on most platforms,
+// you could use:
+//
+// #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || (defined(__cplusplus) && __cplusplus >= 201703L)) && defined(__has_include)
+// #if __has_include(<filesystem>) && (!defined(__MAC_OS_X_VERSION_MIN_REQUIRED) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500)
+// #define GHC_USE_STD_FS
+// #include <filesystem>
+// namespace fs = std::filesystem;
+// #endif
+// #endif
+// #ifndef GHC_USE_STD_FS
+// #include <ghc/filesystem.hpp>
+// namespace fs = ghc::filesystem;
+// #endif
+//
+//---------------------------------------------------------------------------------------
+#ifndef GHC_FILESYSTEM_H
+#define GHC_FILESYSTEM_H
+
+// #define BSD manifest constant only in
+// sys/param.h
+#ifndef _WIN32
+#include <sys/param.h>
+#endif
+
+#ifndef GHC_OS_DETECTED
+#if defined(__APPLE__) && defined(__MACH__)
+#define GHC_OS_MACOS
+#elif defined(__linux__)
+#define GHC_OS_LINUX
+#if defined(__ANDROID__)
+#define GHC_OS_ANDROID
+#endif
+#elif defined(_WIN64)
+#define GHC_OS_WINDOWS
+#define GHC_OS_WIN64
+#elif defined(_WIN32)
+#define GHC_OS_WINDOWS
+#define GHC_OS_WIN32
+#elif defined(__CYGWIN__)
+#define GHC_OS_CYGWIN
+#elif defined(__svr4__)
+#define GHC_OS_SYS5R4
+#elif defined(BSD)
+#define GHC_OS_BSD
+#elif defined(__EMSCRIPTEN__)
+#define GHC_OS_WEB
+#include <wasi/api.h>
+#else
+#error "Operating system currently not supported!"
+#endif
+#define GHC_OS_DETECTED
+#if (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L)
+#if _MSVC_LANG == 201703L
+#define GHC_FILESYSTEM_RUNNING_CPP17
+#else
+#define GHC_FILESYSTEM_RUNNING_CPP20
+#endif
+#elif (defined(__cplusplus) && __cplusplus >= 201703L)
+#if __cplusplus == 201703L
+#define GHC_FILESYSTEM_RUNNING_CPP17
+#else
+#define GHC_FILESYSTEM_RUNNING_CPP20
+#endif
+#endif
+#endif
+
+#if defined(GHC_FILESYSTEM_IMPLEMENTATION)
+#define GHC_EXPAND_IMPL
+#define GHC_INLINE
+#ifdef GHC_OS_WINDOWS
+#ifndef GHC_FS_API
+#define GHC_FS_API
+#endif
+#ifndef GHC_FS_API_CLASS
+#define GHC_FS_API_CLASS
+#endif
+#else
+#ifndef GHC_FS_API
+#define GHC_FS_API __attribute__((visibility("default")))
+#endif
+#ifndef GHC_FS_API_CLASS
+#define GHC_FS_API_CLASS __attribute__((visibility("default")))
+#endif
+#endif
+#elif defined(GHC_FILESYSTEM_FWD)
+#define GHC_INLINE
+#ifdef GHC_OS_WINDOWS
+#ifndef GHC_FS_API
+#define GHC_FS_API extern
+#endif
+#ifndef GHC_FS_API_CLASS
+#define GHC_FS_API_CLASS
+#endif
+#else
+#ifndef GHC_FS_API
+#define GHC_FS_API extern
+#endif
+#ifndef GHC_FS_API_CLASS
+#define GHC_FS_API_CLASS
+#endif
+#endif
+#else
+#define GHC_EXPAND_IMPL
+#define GHC_INLINE inline
+#ifndef GHC_FS_API
+#define GHC_FS_API
+#endif
+#ifndef GHC_FS_API_CLASS
+#define GHC_FS_API_CLASS
+#endif
+#endif
+
+#ifdef GHC_EXPAND_IMPL
+
+#ifdef GHC_OS_WINDOWS
+#include <windows.h>
+// additional includes
+#include <shellapi.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <wchar.h>
+#include <winioctl.h>
+#else
+#include <dirent.h>
+#include <fcntl.h>
+#include <limits.h>
+#include <sys/param.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <unistd.h>
+#ifdef GHC_OS_ANDROID
+#include <android/api-level.h>
+#if __ANDROID_API__ < 12
+#include <sys/syscall.h>
+#endif
+#include <sys/vfs.h>
+#define statvfs statfs
+#else
+#include <sys/statvfs.h>
+#endif
+#ifdef GHC_OS_CYGWIN
+#include <strings.h>
+#endif
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 26
+#include <langinfo.h>
+#endif
+#endif
+#ifdef GHC_OS_MACOS
+#include <Availability.h>
+#endif
+
+#if defined(__cpp_impl_three_way_comparison) && defined(__has_include)
+#if __has_include(<compare>)
+#define GHC_HAS_THREEWAY_COMP
+#include <compare>
+#endif
+#endif
+
+#include <algorithm>
+#include <cctype>
+#include <chrono>
+#include <clocale>
+#include <cstdlib>
+#include <cstring>
+#include <fstream>
+#include <functional>
+#include <memory>
+#include <stack>
+#include <stdexcept>
+#include <string>
+#include <system_error>
+#include <type_traits>
+#include <utility>
+#include <vector>
+
+#else // GHC_EXPAND_IMPL
+
+#if defined(__cpp_impl_three_way_comparison) && defined(__has_include)
+#if __has_include(<compare>)
+#define GHC_HAS_THREEWAY_COMP
+#include <compare>
+#endif
+#endif
+#include <chrono>
+#include <fstream>
+#include <memory>
+#include <stack>
+#include <stdexcept>
+#include <string>
+#include <system_error>
+#ifdef GHC_OS_WINDOWS
+#include <vector>
+#endif
+#endif // GHC_EXPAND_IMPL
+
+// After standard library includes.
+// Standard library support for std::string_view.
+#if defined(__cpp_lib_string_view)
+#define GHC_HAS_STD_STRING_VIEW
+#elif defined(_LIBCPP_VERSION) && (_LIBCPP_VERSION >= 4000) && (__cplusplus >= 201402)
+#define GHC_HAS_STD_STRING_VIEW
+#elif defined(_GLIBCXX_RELEASE) && (_GLIBCXX_RELEASE >= 7) && (__cplusplus >= 201703)
+#define GHC_HAS_STD_STRING_VIEW
+#elif defined(_MSC_VER) && (_MSC_VER >= 1910 && _MSVC_LANG >= 201703)
+#define GHC_HAS_STD_STRING_VIEW
+#endif
+
+// Standard library support for std::experimental::string_view.
+#if defined(_LIBCPP_VERSION) && (_LIBCPP_VERSION >= 3700 && _LIBCPP_VERSION < 7000) && (__cplusplus >= 201402)
+#define GHC_HAS_STD_EXPERIMENTAL_STRING_VIEW
+#elif defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 9)) || (__GNUC__ > 4)) && (__cplusplus >= 201402)
+#define GHC_HAS_STD_EXPERIMENTAL_STRING_VIEW
+#endif
+
+#if defined(GHC_HAS_STD_STRING_VIEW)
+#include <string_view>
+#elif defined(GHC_HAS_STD_EXPERIMENTAL_STRING_VIEW)
+#include <experimental/string_view>
+#endif
+
+//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+// Behaviour Switches (see README.md, should match the config in test/filesystem_test.cpp):
+//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+// Enforce C++17 API where possible when compiling for C++20, handles the following cases:
+// * fs::path::u8string() returns std::string instead of std::u8string
+// #define GHC_FILESYSTEM_ENFORCE_CPP17_API
+//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+// LWG #2682 disables the since then invalid use of the copy option create_symlinks on directories
+// configure LWG conformance ()
+#define LWG_2682_BEHAVIOUR
+//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+// LWG #2395 makes crate_directory/create_directories not emit an error if there is a regular
+// file with that name, it is superseded by P1164R1, so only activate if really needed
+// #define LWG_2935_BEHAVIOUR
+//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+// LWG #2936 enables new element wise (more expensive) path comparison
+// * if this->root_name().native().compare(p.root_name().native()) != 0 return result
+// * if this->has_root_directory() and !p.has_root_directory() return -1
+// * if !this->has_root_directory() and p.has_root_directory() return -1
+// * else result of element wise comparison of path iteration where first comparison is != 0 or 0
+// if all comparisons are 0 (on Windows this implementation does case insensitive root_name()
+// comparison)
+#define LWG_2936_BEHAVIOUR
+//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+// LWG #2937 enforces that fs::equivalent emits an error, if !fs::exists(p1)||!exists(p2)
+#define LWG_2937_BEHAVIOUR
+//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+// UTF8-Everywhere is the original behaviour of ghc::filesystem. But since v1.5 the windows
+// version defaults to std::wstring storage backend. Still all std::string will be interpreted
+// as UTF-8 encoded. With this define you can enfoce the old behavior on Windows, using
+// std::string as backend and for fs::path::native() and char for fs::path::c_str(). This
+// needs more conversions so it is (an was before v1.5) slower, bot might help keeping source
+// homogeneous in a multi platform project.
+// #define GHC_WIN_DISABLE_WSTRING_STORAGE_TYPE
+//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+// Raise errors/exceptions when invalid unicode codepoints or UTF-8 sequences are found,
+// instead of replacing them with the unicode replacement character (U+FFFD).
+// #define GHC_RAISE_UNICODE_ERRORS
+//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+// Automatic prefix windows path with "\\?\" if they would break the MAX_PATH length.
+// instead of replacing them with the unicode replacement character (U+FFFD).
+#ifndef GHC_WIN_DISABLE_AUTO_PREFIXES
+#define GHC_WIN_AUTO_PREFIX_LONG_PATH
+#endif // GHC_WIN_DISABLE_AUTO_PREFIXES
+//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+// ghc::filesystem version in decimal (major * 10000 + minor * 100 + patch)
+#define GHC_FILESYSTEM_VERSION 10504L
+
+#if !defined(GHC_WITH_EXCEPTIONS) && (defined(__EXCEPTIONS) || defined(__cpp_exceptions) || defined(_CPPUNWIND))
+#define GHC_WITH_EXCEPTIONS
+#endif
+#if !defined(GHC_WITH_EXCEPTIONS) && defined(GHC_RAISE_UNICODE_ERRORS)
+#error "Can't raise unicode errors with exception support disabled"
+#endif
+
+namespace ghc {
+namespace filesystem {
+
+#if defined(GHC_HAS_CUSTOM_STRING_VIEW)
+#define GHC_WITH_STRING_VIEW
+#elif defined(GHC_HAS_STD_STRING_VIEW)
+#define GHC_WITH_STRING_VIEW
+using std::basic_string_view;
+#elif defined(GHC_HAS_STD_EXPERIMENTAL_STRING_VIEW)
+#define GHC_WITH_STRING_VIEW
+using std::experimental::basic_string_view;
+#endif
+
+// temporary existing exception type for yet unimplemented parts
+class GHC_FS_API_CLASS not_implemented_exception : public std::logic_error
+{
+public:
+ not_implemented_exception()
+ : std::logic_error("function not implemented yet.")
+ {
+ }
+};
+
+template <typename char_type>
+class path_helper_base
+{
+public:
+ using value_type = char_type;
+#ifdef GHC_OS_WINDOWS
+ static constexpr value_type preferred_separator = '\\';
+#else
+ static constexpr value_type preferred_separator = '/';
+#endif
+};
+
+#if __cplusplus < 201703L
+template <typename char_type>
+constexpr char_type path_helper_base<char_type>::preferred_separator;
+#endif
+
+#ifdef GHC_OS_WINDOWS
+class path;
+namespace detail {
+bool has_executable_extension(const path& p);
+}
+#endif
+
+// 30.10.8 class path
+class GHC_FS_API_CLASS path
+#if defined(GHC_OS_WINDOWS) && !defined(GHC_WIN_DISABLE_WSTRING_STORAGE_TYPE)
+#define GHC_USE_WCHAR_T
+#define GHC_NATIVEWP(p) p.c_str()
+#define GHC_PLATFORM_LITERAL(str) L##str
+ : private path_helper_base<std::wstring::value_type>
+{
+public:
+ using path_helper_base<std::wstring::value_type>::value_type;
+#else
+#define GHC_NATIVEWP(p) p.wstring().c_str()
+#define GHC_PLATFORM_LITERAL(str) str
+ : private path_helper_base<std::string::value_type>
+{
+public:
+ using path_helper_base<std::string::value_type>::value_type;
+#endif
+ using string_type = std::basic_string<value_type>;
+ using path_helper_base<value_type>::preferred_separator;
+
+ // 30.10.10.1 enumeration format
+ /// The path format in which the constructor argument is given.
+ enum format {
+ generic_format, ///< The generic format, internally used by
+ ///< ghc::filesystem::path with slashes
+ native_format, ///< The format native to the current platform this code
+ ///< is build for
+ auto_format, ///< Try to auto-detect the format, fallback to native
+ };
+
+ template <class T>
+ struct _is_basic_string : std::false_type
+ {
+ };
+ template <class CharT, class Traits, class Alloc>
+ struct _is_basic_string<std::basic_string<CharT, Traits, Alloc>> : std::true_type
+ {
+ };
+ template <class CharT>
+ struct _is_basic_string<std::basic_string<CharT, std::char_traits<CharT>, std::allocator<CharT>>> : std::true_type
+ {
+ };
+#ifdef GHC_WITH_STRING_VIEW
+ template <class CharT, class Traits>
+ struct _is_basic_string<basic_string_view<CharT, Traits>> : std::true_type
+ {
+ };
+ template <class CharT>
+ struct _is_basic_string<basic_string_view<CharT, std::char_traits<CharT>>> : std::true_type
+ {
+ };
+#endif
+
+ template <typename T1, typename T2 = void>
+ using path_type = typename std::enable_if<!std::is_same<path, T1>::value, path>::type;
+ template <typename T>
+ using path_from_string = typename std::enable_if<_is_basic_string<T>::value || std::is_same<char const*, typename std::decay<T>::type>::value || std::is_same<char*, typename std::decay<T>::type>::value ||
+ std::is_same<wchar_t const*, typename std::decay<T>::type>::value || std::is_same<wchar_t*, typename std::decay<T>::type>::value,
+ path>::type;
+ template <typename T>
+ using path_type_EcharT = typename std::enable_if<std::is_same<T, char>::value || std::is_same<T, char16_t>::value || std::is_same<T, char32_t>::value || std::is_same<T, wchar_t>::value, path>::type;
+ // 30.10.8.4.1 constructors and destructor
+ path() noexcept;
+ path(const path& p);
+ path(path&& p) noexcept;
+ path(string_type&& source, format fmt = auto_format);
+ template <class Source, typename = path_from_string<Source>>
+ path(const Source& source, format fmt = auto_format);
+ template <class InputIterator>
+ path(InputIterator first, InputIterator last, format fmt = auto_format);
+#ifdef GHC_WITH_EXCEPTIONS
+ template <class Source, typename = path_from_string<Source>>
+ path(const Source& source, const std::locale& loc, format fmt = auto_format);
+ template <class InputIterator>
+ path(InputIterator first, InputIterator last, const std::locale& loc, format fmt = auto_format);
+#endif
+ ~path();
+
+ // 30.10.8.4.2 assignments
+ path& operator=(const path& p);
+ path& operator=(path&& p) noexcept;
+ path& operator=(string_type&& source);
+ path& assign(string_type&& source);
+ template <class Source>
+ path& operator=(const Source& source);
+ template <class Source>
+ path& assign(const Source& source);
+ template <class InputIterator>
+ path& assign(InputIterator first, InputIterator last);
+
+ // 30.10.8.4.3 appends
+ path& operator/=(const path& p);
+ template <class Source>
+ path& operator/=(const Source& source);
+ template <class Source>
+ path& append(const Source& source);
+ template <class InputIterator>
+ path& append(InputIterator first, InputIterator last);
+
+ // 30.10.8.4.4 concatenation
+ path& operator+=(const path& x);
+ path& operator+=(const string_type& x);
+#ifdef GHC_WITH_STRING_VIEW
+ path& operator+=(basic_string_view<value_type> x);
+#endif
+ path& operator+=(const value_type* x);
+ path& operator+=(value_type x);
+ template <class Source>
+ path_from_string<Source>& operator+=(const Source& x);
+ template <class EcharT>
+ path_type_EcharT<EcharT>& operator+=(EcharT x);
+ template <class Source>
+ path& concat(const Source& x);
+ template <class InputIterator>
+ path& concat(InputIterator first, InputIterator last);
+
+ // 30.10.8.4.5 modifiers
+ void clear() noexcept;
+ path& make_preferred();
+ path& remove_filename();
+ path& replace_filename(const path& replacement);
+ path& replace_extension(const path& replacement = path());
+ void swap(path& rhs) noexcept;
+
+ // 30.10.8.4.6 native format observers
+ const string_type& native() const noexcept;
+ const value_type* c_str() const noexcept;
+ operator string_type() const;
+ template <class EcharT, class traits = std::char_traits<EcharT>, class Allocator = std::allocator<EcharT>>
+ std::basic_string<EcharT, traits, Allocator> string(const Allocator& a = Allocator()) const;
+ std::string string() const;
+ std::wstring wstring() const;
+#if defined(__cpp_lib_char8_t) && !defined(GHC_FILESYSTEM_ENFORCE_CPP17_API)
+ std::u8string u8string() const;
+#else
+ std::string u8string() const;
+#endif
+ std::u16string u16string() const;
+ std::u32string u32string() const;
+
+ // 30.10.8.4.7 generic format observers
+ template <class EcharT, class traits = std::char_traits<EcharT>, class Allocator = std::allocator<EcharT>>
+ std::basic_string<EcharT, traits, Allocator> generic_string(const Allocator& a = Allocator()) const;
+ std::string generic_string() const;
+ std::wstring generic_wstring() const;
+#if defined(__cpp_lib_char8_t) && !defined(GHC_FILESYSTEM_ENFORCE_CPP17_API)
+ std::u8string generic_u8string() const;
+#else
+ std::string generic_u8string() const;
+#endif
+ std::u16string generic_u16string() const;
+ std::u32string generic_u32string() const;
+
+ // 30.10.8.4.8 compare
+ int compare(const path& p) const noexcept;
+ int compare(const string_type& s) const;
+#ifdef GHC_WITH_STRING_VIEW
+ int compare(basic_string_view<value_type> s) const;
+#endif
+ int compare(const value_type* s) const;
+
+ // 30.10.8.4.9 decomposition
+ path root_name() const;
+ path root_directory() const;
+ path root_path() const;
+ path relative_path() const;
+ path parent_path() const;
+ path filename() const;
+ path stem() const;
+ path extension() const;
+
+ // 30.10.8.4.10 query
+ bool empty() const noexcept;
+ bool has_root_name() const;
+ bool has_root_directory() const;
+ bool has_root_path() const;
+ bool has_relative_path() const;
+ bool has_parent_path() const;
+ bool has_filename() const;
+ bool has_stem() const;
+ bool has_extension() const;
+ bool is_absolute() const;
+ bool is_relative() const;
+
+ // 30.10.8.4.11 generation
+ path lexically_normal() const;
+ path lexically_relative(const path& base) const;
+ path lexically_proximate(const path& base) const;
+
+ // 30.10.8.5 iterators
+ class iterator;
+ using const_iterator = iterator;
+ iterator begin() const;
+ iterator end() const;
+
+private:
+ using impl_value_type = value_type;
+ using impl_string_type = std::basic_string<impl_value_type>;
+ friend class directory_iterator;
+ void append_name(const value_type* name);
+ static constexpr impl_value_type generic_separator = '/';
+ template <typename InputIterator>
+ class input_iterator_range
+ {
+ public:
+ typedef InputIterator iterator;
+ typedef InputIterator const_iterator;
+ typedef typename InputIterator::difference_type difference_type;
+
+ input_iterator_range(const InputIterator& first, const InputIterator& last)
+ : _first(first)
+ , _last(last)
+ {
+ }
+
+ InputIterator begin() const { return _first; }
+ InputIterator end() const { return _last; }
+
+ private:
+ InputIterator _first;
+ InputIterator _last;
+ };
+ friend void swap(path& lhs, path& rhs) noexcept;
+ friend size_t hash_value(const path& p) noexcept;
+ friend path canonical(const path& p, std::error_code& ec);
+ string_type::size_type root_name_length() const noexcept;
+ void postprocess_path_with_format(format fmt);
+ void check_long_path();
+ impl_string_type _path;
+#ifdef GHC_OS_WINDOWS
+ void handle_prefixes();
+ friend bool detail::has_executable_extension(const path& p);
+#ifdef GHC_WIN_AUTO_PREFIX_LONG_PATH
+ string_type::size_type _prefixLength{0};
+#else // GHC_WIN_AUTO_PREFIX_LONG_PATH
+ static const string_type::size_type _prefixLength{0};
+#endif // GHC_WIN_AUTO_PREFIX_LONG_PATH
+#else
+ static const string_type::size_type _prefixLength{0};
+#endif
+};
+
+// 30.10.8.6 path non-member functions
+GHC_FS_API void swap(path& lhs, path& rhs) noexcept;
+GHC_FS_API size_t hash_value(const path& p) noexcept;
+#ifdef GHC_HAS_THREEWAY_COMP
+GHC_FS_API std::strong_ordering operator<=>(const path& lhs, const path& rhs) noexcept;
+#endif
+GHC_FS_API bool operator==(const path& lhs, const path& rhs) noexcept;
+GHC_FS_API bool operator!=(const path& lhs, const path& rhs) noexcept;
+GHC_FS_API bool operator<(const path& lhs, const path& rhs) noexcept;
+GHC_FS_API bool operator<=(const path& lhs, const path& rhs) noexcept;
+GHC_FS_API bool operator>(const path& lhs, const path& rhs) noexcept;
+GHC_FS_API bool operator>=(const path& lhs, const path& rhs) noexcept;
+GHC_FS_API path operator/(const path& lhs, const path& rhs);
+
+// 30.10.8.6.1 path inserter and extractor
+template <class charT, class traits>
+std::basic_ostream<charT, traits>& operator<<(std::basic_ostream<charT, traits>& os, const path& p);
+template <class charT, class traits>
+std::basic_istream<charT, traits>& operator>>(std::basic_istream<charT, traits>& is, path& p);
+
+// 30.10.8.6.2 path factory functions
+template <class Source, typename = path::path_from_string<Source>>
+#if defined(__cpp_lib_char8_t) && !defined(GHC_FILESYSTEM_ENFORCE_CPP17_API)
+[[deprecated("use ghc::filesystem::path::path() with std::u8string instead")]]
+#endif
+path u8path(const Source& source);
+template <class InputIterator>
+#if defined(__cpp_lib_char8_t) && !defined(GHC_FILESYSTEM_ENFORCE_CPP17_API)
+[[deprecated("use ghc::filesystem::path::path() with std::u8string instead")]]
+#endif
+path u8path(InputIterator first, InputIterator last);
+
+// 30.10.9 class filesystem_error
+class GHC_FS_API_CLASS filesystem_error : public std::system_error
+{
+public:
+ filesystem_error(const std::string& what_arg, std::error_code ec);
+ filesystem_error(const std::string& what_arg, const path& p1, std::error_code ec);
+ filesystem_error(const std::string& what_arg, const path& p1, const path& p2, std::error_code ec);
+ const path& path1() const noexcept;
+ const path& path2() const noexcept;
+ const char* what() const noexcept override;
+
+private:
+ std::string _what_arg;
+ std::error_code _ec;
+ path _p1, _p2;
+};
+
+class GHC_FS_API_CLASS path::iterator
+{
+public:
+ using value_type = const path;
+ using difference_type = std::ptrdiff_t;
+ using pointer = const path*;
+ using reference = const path&;
+ using iterator_category = std::bidirectional_iterator_tag;
+
+ iterator();
+ iterator(const path& p, const impl_string_type::const_iterator& pos);
+ iterator& operator++();
+ iterator operator++(int);
+ iterator& operator--();
+ iterator operator--(int);
+ bool operator==(const iterator& other) const;
+ bool operator!=(const iterator& other) const;
+ reference operator*() const;
+ pointer operator->() const;
+
+private:
+ friend class path;
+ impl_string_type::const_iterator increment(const impl_string_type::const_iterator& pos) const;
+ impl_string_type::const_iterator decrement(const impl_string_type::const_iterator& pos) const;
+ void updateCurrent();
+ impl_string_type::const_iterator _first;
+ impl_string_type::const_iterator _last;
+ impl_string_type::const_iterator _prefix;
+ impl_string_type::const_iterator _root;
+ impl_string_type::const_iterator _iter;
+ path _current;
+};
+
+struct space_info
+{
+ uintmax_t capacity;
+ uintmax_t free;
+ uintmax_t available;
+};
+
+// 30.10.10, enumerations
+enum class file_type {
+ none,
+ not_found,
+ regular,
+ directory,
+ symlink,
+ block,
+ character,
+ fifo,
+ socket,
+ unknown,
+};
+
+enum class perms : uint16_t {
+ none = 0,
+
+ owner_read = 0400,
+ owner_write = 0200,
+ owner_exec = 0100,
+ owner_all = 0700,
+
+ group_read = 040,
+ group_write = 020,
+ group_exec = 010,
+ group_all = 070,
+
+ others_read = 04,
+ others_write = 02,
+ others_exec = 01,
+ others_all = 07,
+
+ all = 0777,
+ set_uid = 04000,
+ set_gid = 02000,
+ sticky_bit = 01000,
+
+ mask = 07777,
+ unknown = 0xffff
+};
+
+enum class perm_options : uint16_t {
+ replace = 3,
+ add = 1,
+ remove = 2,
+ nofollow = 4,
+};
+
+enum class copy_options : uint16_t {
+ none = 0,
+
+ skip_existing = 1,
+ overwrite_existing = 2,
+ update_existing = 4,
+
+ recursive = 8,
+
+ copy_symlinks = 0x10,
+ skip_symlinks = 0x20,
+
+ directories_only = 0x40,
+ create_symlinks = 0x80,
+#ifndef GHC_OS_WEB
+ create_hard_links = 0x100
+#endif
+};
+
+enum class directory_options : uint16_t {
+ none = 0,
+ follow_directory_symlink = 1,
+ skip_permission_denied = 2,
+};
+
+// 30.10.11 class file_status
+class GHC_FS_API_CLASS file_status
+{
+public:
+ // 30.10.11.1 constructors and destructor
+ file_status() noexcept;
+ explicit file_status(file_type ft, perms prms = perms::unknown) noexcept;
+ file_status(const file_status&) noexcept;
+ file_status(file_status&&) noexcept;
+ ~file_status();
+ // assignments:
+ file_status& operator=(const file_status&) noexcept;
+ file_status& operator=(file_status&&) noexcept;
+ // 30.10.11.3 modifiers
+ void type(file_type ft) noexcept;
+ void permissions(perms prms) noexcept;
+ // 30.10.11.2 observers
+ file_type type() const noexcept;
+ perms permissions() const noexcept;
+ friend bool operator==(const file_status& lhs, const file_status& rhs) noexcept { return lhs.type() == rhs.type() && lhs.permissions() == rhs.permissions(); }
+private:
+ file_type _type;
+ perms _perms;
+};
+
+using file_time_type = std::chrono::time_point<std::chrono::system_clock>;
+
+// 30.10.12 Class directory_entry
+class GHC_FS_API_CLASS directory_entry
+{
+public:
+ // 30.10.12.1 constructors and destructor
+ directory_entry() noexcept = default;
+ directory_entry(const directory_entry&) = default;
+ directory_entry(directory_entry&&) noexcept = default;
+#ifdef GHC_WITH_EXCEPTIONS
+ explicit directory_entry(const path& p);
+#endif
+ directory_entry(const path& p, std::error_code& ec);
+ ~directory_entry();
+
+ // assignments:
+ directory_entry& operator=(const directory_entry&) = default;
+ directory_entry& operator=(directory_entry&&) noexcept = default;
+
+ // 30.10.12.2 modifiers
+#ifdef GHC_WITH_EXCEPTIONS
+ void assign(const path& p);
+ void replace_filename(const path& p);
+ void refresh();
+#endif
+ void assign(const path& p, std::error_code& ec);
+ void replace_filename(const path& p, std::error_code& ec);
+ void refresh(std::error_code& ec) noexcept;
+
+ // 30.10.12.3 observers
+ const filesystem::path& path() const noexcept;
+ operator const filesystem::path&() const noexcept;
+#ifdef GHC_WITH_EXCEPTIONS
+ bool exists() const;
+ bool is_block_file() const;
+ bool is_character_file() const;
+ bool is_directory() const;
+ bool is_fifo() const;
+ bool is_other() const;
+ bool is_regular_file() const;
+ bool is_socket() const;
+ bool is_symlink() const;
+ uintmax_t file_size() const;
+ file_time_type last_write_time() const;
+ file_status status() const;
+ file_status symlink_status() const;
+#endif
+ bool exists(std::error_code& ec) const noexcept;
+ bool is_block_file(std::error_code& ec) const noexcept;
+ bool is_character_file(std::error_code& ec) const noexcept;
+ bool is_directory(std::error_code& ec) const noexcept;
+ bool is_fifo(std::error_code& ec) const noexcept;
+ bool is_other(std::error_code& ec) const noexcept;
+ bool is_regular_file(std::error_code& ec) const noexcept;
+ bool is_socket(std::error_code& ec) const noexcept;
+ bool is_symlink(std::error_code& ec) const noexcept;
+ uintmax_t file_size(std::error_code& ec) const noexcept;
+ file_time_type last_write_time(std::error_code& ec) const noexcept;
+ file_status status(std::error_code& ec) const noexcept;
+ file_status symlink_status(std::error_code& ec) const noexcept;
+
+#ifndef GHC_OS_WEB
+#ifdef GHC_WITH_EXCEPTIONS
+ uintmax_t hard_link_count() const;
+#endif
+ uintmax_t hard_link_count(std::error_code& ec) const noexcept;
+#endif
+
+#ifdef GHC_HAS_THREEWAY_COMP
+ std::strong_ordering operator<=>(const directory_entry& rhs) const noexcept;
+#endif
+ bool operator<(const directory_entry& rhs) const noexcept;
+ bool operator==(const directory_entry& rhs) const noexcept;
+ bool operator!=(const directory_entry& rhs) const noexcept;
+ bool operator<=(const directory_entry& rhs) const noexcept;
+ bool operator>(const directory_entry& rhs) const noexcept;
+ bool operator>=(const directory_entry& rhs) const noexcept;
+
+private:
+ friend class directory_iterator;
+#ifdef GHC_WITH_EXCEPTIONS
+ file_type status_file_type() const;
+#endif
+ file_type status_file_type(std::error_code& ec) const noexcept;
+ filesystem::path _path;
+ file_status _status;
+ file_status _symlink_status;
+ uintmax_t _file_size = static_cast<uintmax_t>(-1);
+#ifndef GHC_OS_WINDOWS
+ uintmax_t _hard_link_count = static_cast<uintmax_t>(-1);
+#endif
+ time_t _last_write_time = 0;
+};
+
+// 30.10.13 Class directory_iterator
+class GHC_FS_API_CLASS directory_iterator
+{
+public:
+ class GHC_FS_API_CLASS proxy
+ {
+ public:
+ const directory_entry& operator*() const& noexcept { return _dir_entry; }
+ directory_entry operator*() && noexcept { return std::move(_dir_entry); }
+
+ private:
+ explicit proxy(const directory_entry& dir_entry)
+ : _dir_entry(dir_entry)
+ {
+ }
+ friend class directory_iterator;
+ friend class recursive_directory_iterator;
+ directory_entry _dir_entry;
+ };
+ using iterator_category = std::input_iterator_tag;
+ using value_type = directory_entry;
+ using difference_type = std::ptrdiff_t;
+ using pointer = const directory_entry*;
+ using reference = const directory_entry&;
+
+ // 30.10.13.1 member functions
+ directory_iterator() noexcept;
+#ifdef GHC_WITH_EXCEPTIONS
+ explicit directory_iterator(const path& p);
+ directory_iterator(const path& p, directory_options options);
+#endif
+ directory_iterator(const path& p, std::error_code& ec) noexcept;
+ directory_iterator(const path& p, directory_options options, std::error_code& ec) noexcept;
+ directory_iterator(const directory_iterator& rhs);
+ directory_iterator(directory_iterator&& rhs) noexcept;
+ ~directory_iterator();
+ directory_iterator& operator=(const directory_iterator& rhs);
+ directory_iterator& operator=(directory_iterator&& rhs) noexcept;
+ const directory_entry& operator*() const;
+ const directory_entry* operator->() const;
+#ifdef GHC_WITH_EXCEPTIONS
+ directory_iterator& operator++();
+#endif
+ directory_iterator& increment(std::error_code& ec) noexcept;
+
+ // other members as required by 27.2.3, input iterators
+#ifdef GHC_WITH_EXCEPTIONS
+ proxy operator++(int)
+ {
+ proxy p{**this};
+ ++*this;
+ return p;
+ }
+#endif
+ bool operator==(const directory_iterator& rhs) const;
+ bool operator!=(const directory_iterator& rhs) const;
+
+private:
+ friend class recursive_directory_iterator;
+ class impl;
+ std::shared_ptr<impl> _impl;
+};
+
+// 30.10.13.2 directory_iterator non-member functions
+GHC_FS_API directory_iterator begin(directory_iterator iter) noexcept;
+GHC_FS_API directory_iterator end(const directory_iterator&) noexcept;
+
+// 30.10.14 class recursive_directory_iterator
+class GHC_FS_API_CLASS recursive_directory_iterator
+{
+public:
+ using iterator_category = std::input_iterator_tag;
+ using value_type = directory_entry;
+ using difference_type = std::ptrdiff_t;
+ using pointer = const directory_entry*;
+ using reference = const directory_entry&;
+
+ // 30.10.14.1 constructors and destructor
+ recursive_directory_iterator() noexcept;
+#ifdef GHC_WITH_EXCEPTIONS
+ explicit recursive_directory_iterator(const path& p);
+ recursive_directory_iterator(const path& p, directory_options options);
+#endif
+ recursive_directory_iterator(const path& p, directory_options options, std::error_code& ec) noexcept;
+ recursive_directory_iterator(const path& p, std::error_code& ec) noexcept;
+ recursive_directory_iterator(const recursive_directory_iterator& rhs);
+ recursive_directory_iterator(recursive_directory_iterator&& rhs) noexcept;
+ ~recursive_directory_iterator();
+
+ // 30.10.14.1 observers
+ directory_options options() const;
+ int depth() const;
+ bool recursion_pending() const;
+
+ const directory_entry& operator*() const;
+ const directory_entry* operator->() const;
+
+ // 30.10.14.1 modifiers recursive_directory_iterator&
+ recursive_directory_iterator& operator=(const recursive_directory_iterator& rhs);
+ recursive_directory_iterator& operator=(recursive_directory_iterator&& rhs) noexcept;
+#ifdef GHC_WITH_EXCEPTIONS
+ recursive_directory_iterator& operator++();
+#endif
+ recursive_directory_iterator& increment(std::error_code& ec) noexcept;
+
+#ifdef GHC_WITH_EXCEPTIONS
+ void pop();
+#endif
+ void pop(std::error_code& ec);
+ void disable_recursion_pending();
+
+ // other members as required by 27.2.3, input iterators
+#ifdef GHC_WITH_EXCEPTIONS
+ directory_iterator::proxy operator++(int)
+ {
+ directory_iterator::proxy proxy{**this};
+ ++*this;
+ return proxy;
+ }
+#endif
+ bool operator==(const recursive_directory_iterator& rhs) const;
+ bool operator!=(const recursive_directory_iterator& rhs) const;
+
+private:
+ struct recursive_directory_iterator_impl
+ {
+ directory_options _options;
+ bool _recursion_pending;
+ std::stack<directory_iterator> _dir_iter_stack;
+ recursive_directory_iterator_impl(directory_options options, bool recursion_pending)
+ : _options(options)
+ , _recursion_pending(recursion_pending)
+ {
+ }
+ };
+ std::shared_ptr<recursive_directory_iterator_impl> _impl;
+};
+
+// 30.10.14.2 directory_iterator non-member functions
+GHC_FS_API recursive_directory_iterator begin(recursive_directory_iterator iter) noexcept;
+GHC_FS_API recursive_directory_iterator end(const recursive_directory_iterator&) noexcept;
+
+// 30.10.15 filesystem operations
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_FS_API path absolute(const path& p);
+GHC_FS_API path canonical(const path& p);
+GHC_FS_API void copy(const path& from, const path& to);
+GHC_FS_API void copy(const path& from, const path& to, copy_options options);
+GHC_FS_API bool copy_file(const path& from, const path& to);
+GHC_FS_API bool copy_file(const path& from, const path& to, copy_options option);
+GHC_FS_API void copy_symlink(const path& existing_symlink, const path& new_symlink);
+GHC_FS_API bool create_directories(const path& p);
+GHC_FS_API bool create_directory(const path& p);
+GHC_FS_API bool create_directory(const path& p, const path& attributes);
+GHC_FS_API void create_directory_symlink(const path& to, const path& new_symlink);
+GHC_FS_API void create_symlink(const path& to, const path& new_symlink);
+GHC_FS_API path current_path();
+GHC_FS_API void current_path(const path& p);
+GHC_FS_API bool exists(const path& p);
+GHC_FS_API bool equivalent(const path& p1, const path& p2);
+GHC_FS_API uintmax_t file_size(const path& p);
+GHC_FS_API bool is_block_file(const path& p);
+GHC_FS_API bool is_character_file(const path& p);
+GHC_FS_API bool is_directory(const path& p);
+GHC_FS_API bool is_empty(const path& p);
+GHC_FS_API bool is_fifo(const path& p);
+GHC_FS_API bool is_other(const path& p);
+GHC_FS_API bool is_regular_file(const path& p);
+GHC_FS_API bool is_socket(const path& p);
+GHC_FS_API bool is_symlink(const path& p);
+GHC_FS_API file_time_type last_write_time(const path& p);
+GHC_FS_API void last_write_time(const path& p, file_time_type new_time);
+GHC_FS_API void permissions(const path& p, perms prms, perm_options opts = perm_options::replace);
+GHC_FS_API path proximate(const path& p, const path& base = current_path());
+GHC_FS_API path read_symlink(const path& p);
+GHC_FS_API path relative(const path& p, const path& base = current_path());
+GHC_FS_API bool remove(const path& p);
+GHC_FS_API uintmax_t remove_all(const path& p);
+GHC_FS_API void rename(const path& from, const path& to);
+GHC_FS_API void resize_file(const path& p, uintmax_t size);
+GHC_FS_API space_info space(const path& p);
+GHC_FS_API file_status status(const path& p);
+GHC_FS_API file_status symlink_status(const path& p);
+GHC_FS_API path temp_directory_path();
+GHC_FS_API path weakly_canonical(const path& p);
+#endif
+GHC_FS_API path absolute(const path& p, std::error_code& ec);
+GHC_FS_API path canonical(const path& p, std::error_code& ec);
+GHC_FS_API void copy(const path& from, const path& to, std::error_code& ec) noexcept;
+GHC_FS_API void copy(const path& from, const path& to, copy_options options, std::error_code& ec) noexcept;
+GHC_FS_API bool copy_file(const path& from, const path& to, std::error_code& ec) noexcept;
+GHC_FS_API bool copy_file(const path& from, const path& to, copy_options option, std::error_code& ec) noexcept;
+GHC_FS_API void copy_symlink(const path& existing_symlink, const path& new_symlink, std::error_code& ec) noexcept;
+GHC_FS_API bool create_directories(const path& p, std::error_code& ec) noexcept;
+GHC_FS_API bool create_directory(const path& p, std::error_code& ec) noexcept;
+GHC_FS_API bool create_directory(const path& p, const path& attributes, std::error_code& ec) noexcept;
+GHC_FS_API void create_directory_symlink(const path& to, const path& new_symlink, std::error_code& ec) noexcept;
+GHC_FS_API void create_symlink(const path& to, const path& new_symlink, std::error_code& ec) noexcept;
+GHC_FS_API path current_path(std::error_code& ec);
+GHC_FS_API void current_path(const path& p, std::error_code& ec) noexcept;
+GHC_FS_API bool exists(file_status s) noexcept;
+GHC_FS_API bool exists(const path& p, std::error_code& ec) noexcept;
+GHC_FS_API bool equivalent(const path& p1, const path& p2, std::error_code& ec) noexcept;
+GHC_FS_API uintmax_t file_size(const path& p, std::error_code& ec) noexcept;
+GHC_FS_API bool is_block_file(file_status s) noexcept;
+GHC_FS_API bool is_block_file(const path& p, std::error_code& ec) noexcept;
+GHC_FS_API bool is_character_file(file_status s) noexcept;
+GHC_FS_API bool is_character_file(const path& p, std::error_code& ec) noexcept;
+GHC_FS_API bool is_directory(file_status s) noexcept;
+GHC_FS_API bool is_directory(const path& p, std::error_code& ec) noexcept;
+GHC_FS_API bool is_empty(const path& p, std::error_code& ec) noexcept;
+GHC_FS_API bool is_fifo(file_status s) noexcept;
+GHC_FS_API bool is_fifo(const path& p, std::error_code& ec) noexcept;
+GHC_FS_API bool is_other(file_status s) noexcept;
+GHC_FS_API bool is_other(const path& p, std::error_code& ec) noexcept;
+GHC_FS_API bool is_regular_file(file_status s) noexcept;
+GHC_FS_API bool is_regular_file(const path& p, std::error_code& ec) noexcept;
+GHC_FS_API bool is_socket(file_status s) noexcept;
+GHC_FS_API bool is_socket(const path& p, std::error_code& ec) noexcept;
+GHC_FS_API bool is_symlink(file_status s) noexcept;
+GHC_FS_API bool is_symlink(const path& p, std::error_code& ec) noexcept;
+GHC_FS_API file_time_type last_write_time(const path& p, std::error_code& ec) noexcept;
+GHC_FS_API void last_write_time(const path& p, file_time_type new_time, std::error_code& ec) noexcept;
+GHC_FS_API void permissions(const path& p, perms prms, std::error_code& ec) noexcept;
+GHC_FS_API void permissions(const path& p, perms prms, perm_options opts, std::error_code& ec) noexcept;
+GHC_FS_API path proximate(const path& p, std::error_code& ec);
+GHC_FS_API path proximate(const path& p, const path& base, std::error_code& ec);
+GHC_FS_API path read_symlink(const path& p, std::error_code& ec);
+GHC_FS_API path relative(const path& p, std::error_code& ec);
+GHC_FS_API path relative(const path& p, const path& base, std::error_code& ec);
+GHC_FS_API bool remove(const path& p, std::error_code& ec) noexcept;
+GHC_FS_API uintmax_t remove_all(const path& p, std::error_code& ec) noexcept;
+GHC_FS_API void rename(const path& from, const path& to, std::error_code& ec) noexcept;
+GHC_FS_API void resize_file(const path& p, uintmax_t size, std::error_code& ec) noexcept;
+GHC_FS_API space_info space(const path& p, std::error_code& ec) noexcept;
+GHC_FS_API file_status status(const path& p, std::error_code& ec) noexcept;
+GHC_FS_API bool status_known(file_status s) noexcept;
+GHC_FS_API file_status symlink_status(const path& p, std::error_code& ec) noexcept;
+GHC_FS_API path temp_directory_path(std::error_code& ec) noexcept;
+GHC_FS_API path weakly_canonical(const path& p, std::error_code& ec) noexcept;
+
+#ifndef GHC_OS_WEB
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_FS_API void create_hard_link(const path& to, const path& new_hard_link);
+GHC_FS_API uintmax_t hard_link_count(const path& p);
+#endif
+GHC_FS_API void create_hard_link(const path& to, const path& new_hard_link, std::error_code& ec) noexcept;
+GHC_FS_API uintmax_t hard_link_count(const path& p, std::error_code& ec) noexcept;
+#endif
+
+// Non-C++17 add-on std::fstream wrappers with path
+template <class charT, class traits = std::char_traits<charT>>
+class basic_filebuf : public std::basic_filebuf<charT, traits>
+{
+public:
+ basic_filebuf() {}
+ ~basic_filebuf() override {}
+ basic_filebuf(const basic_filebuf&) = delete;
+ const basic_filebuf& operator=(const basic_filebuf&) = delete;
+ basic_filebuf<charT, traits>* open(const path& p, std::ios_base::openmode mode)
+ {
+#if defined(GHC_OS_WINDOWS) && !defined(__GLIBCXX__)
+ return std::basic_filebuf<charT, traits>::open(p.wstring().c_str(), mode) ? this : 0;
+#else
+ return std::basic_filebuf<charT, traits>::open(p.string().c_str(), mode) ? this : 0;
+#endif
+ }
+};
+
+template <class charT, class traits = std::char_traits<charT>>
+class basic_ifstream : public std::basic_ifstream<charT, traits>
+{
+public:
+ basic_ifstream() {}
+#if defined(GHC_OS_WINDOWS) && !defined(__GLIBCXX__)
+ explicit basic_ifstream(const path& p, std::ios_base::openmode mode = std::ios_base::in)
+ : std::basic_ifstream<charT, traits>(p.wstring().c_str(), mode)
+ {
+ }
+ void open(const path& p, std::ios_base::openmode mode = std::ios_base::in) { std::basic_ifstream<charT, traits>::open(p.wstring().c_str(), mode); }
+#else
+ explicit basic_ifstream(const path& p, std::ios_base::openmode mode = std::ios_base::in)
+ : std::basic_ifstream<charT, traits>(p.string().c_str(), mode)
+ {
+ }
+ void open(const path& p, std::ios_base::openmode mode = std::ios_base::in) { std::basic_ifstream<charT, traits>::open(p.string().c_str(), mode); }
+#endif
+ basic_ifstream(const basic_ifstream&) = delete;
+ const basic_ifstream& operator=(const basic_ifstream&) = delete;
+ ~basic_ifstream() override {}
+};
+
+template <class charT, class traits = std::char_traits<charT>>
+class basic_ofstream : public std::basic_ofstream<charT, traits>
+{
+public:
+ basic_ofstream() {}
+#if defined(GHC_OS_WINDOWS) && !defined(__GLIBCXX__)
+ explicit basic_ofstream(const path& p, std::ios_base::openmode mode = std::ios_base::out)
+ : std::basic_ofstream<charT, traits>(p.wstring().c_str(), mode)
+ {
+ }
+ void open(const path& p, std::ios_base::openmode mode = std::ios_base::out) { std::basic_ofstream<charT, traits>::open(p.wstring().c_str(), mode); }
+#else
+ explicit basic_ofstream(const path& p, std::ios_base::openmode mode = std::ios_base::out)
+ : std::basic_ofstream<charT, traits>(p.string().c_str(), mode)
+ {
+ }
+ void open(const path& p, std::ios_base::openmode mode = std::ios_base::out) { std::basic_ofstream<charT, traits>::open(p.string().c_str(), mode); }
+#endif
+ basic_ofstream(const basic_ofstream&) = delete;
+ const basic_ofstream& operator=(const basic_ofstream&) = delete;
+ ~basic_ofstream() override {}
+};
+
+template <class charT, class traits = std::char_traits<charT>>
+class basic_fstream : public std::basic_fstream<charT, traits>
+{
+public:
+ basic_fstream() {}
+#if defined(GHC_OS_WINDOWS) && !defined(__GLIBCXX__)
+ explicit basic_fstream(const path& p, std::ios_base::openmode mode = std::ios_base::in | std::ios_base::out)
+ : std::basic_fstream<charT, traits>(p.wstring().c_str(), mode)
+ {
+ }
+ void open(const path& p, std::ios_base::openmode mode = std::ios_base::in | std::ios_base::out) { std::basic_fstream<charT, traits>::open(p.wstring().c_str(), mode); }
+#else
+ explicit basic_fstream(const path& p, std::ios_base::openmode mode = std::ios_base::in | std::ios_base::out)
+ : std::basic_fstream<charT, traits>(p.string().c_str(), mode)
+ {
+ }
+ void open(const path& p, std::ios_base::openmode mode = std::ios_base::in | std::ios_base::out) { std::basic_fstream<charT, traits>::open(p.string().c_str(), mode); }
+#endif
+ basic_fstream(const basic_fstream&) = delete;
+ const basic_fstream& operator=(const basic_fstream&) = delete;
+ ~basic_fstream() override {}
+};
+
+typedef basic_filebuf<char> filebuf;
+typedef basic_filebuf<wchar_t> wfilebuf;
+typedef basic_ifstream<char> ifstream;
+typedef basic_ifstream<wchar_t> wifstream;
+typedef basic_ofstream<char> ofstream;
+typedef basic_ofstream<wchar_t> wofstream;
+typedef basic_fstream<char> fstream;
+typedef basic_fstream<wchar_t> wfstream;
+
+class GHC_FS_API_CLASS u8arguments
+{
+public:
+ u8arguments(int& argc, char**& argv);
+ ~u8arguments()
+ {
+ _refargc = _argc;
+ _refargv = _argv;
+ }
+
+ bool valid() const { return _isvalid; }
+
+private:
+ int _argc;
+ char** _argv;
+ int& _refargc;
+ char**& _refargv;
+ bool _isvalid;
+#ifdef GHC_OS_WINDOWS
+ std::vector<std::string> _args;
+ std::vector<char*> _argp;
+#endif
+};
+
+//-------------------------------------------------------------------------------------------------
+// Implementation
+//-------------------------------------------------------------------------------------------------
+
+namespace detail {
+enum utf8_states_t { S_STRT = 0, S_RJCT = 8 };
+GHC_FS_API void appendUTF8(std::string& str, uint32_t unicode);
+GHC_FS_API bool is_surrogate(uint32_t c);
+GHC_FS_API bool is_high_surrogate(uint32_t c);
+GHC_FS_API bool is_low_surrogate(uint32_t c);
+GHC_FS_API unsigned consumeUtf8Fragment(const unsigned state, const uint8_t fragment, uint32_t& codepoint);
+enum class portable_error {
+ none = 0,
+ exists,
+ not_found,
+ not_supported,
+ not_implemented,
+ invalid_argument,
+ is_a_directory,
+};
+GHC_FS_API std::error_code make_error_code(portable_error err);
+#ifdef GHC_OS_WINDOWS
+GHC_FS_API std::error_code make_system_error(uint32_t err = 0);
+#else
+GHC_FS_API std::error_code make_system_error(int err = 0);
+#endif
+} // namespace detail
+
+namespace detail {
+
+#ifdef GHC_EXPAND_IMPL
+
+GHC_INLINE std::error_code make_error_code(portable_error err)
+{
+#ifdef GHC_OS_WINDOWS
+ switch (err) {
+ case portable_error::none:
+ return std::error_code();
+ case portable_error::exists:
+ return std::error_code(ERROR_ALREADY_EXISTS, std::system_category());
+ case portable_error::not_found:
+ return std::error_code(ERROR_PATH_NOT_FOUND, std::system_category());
+ case portable_error::not_supported:
+ return std::error_code(ERROR_NOT_SUPPORTED, std::system_category());
+ case portable_error::not_implemented:
+ return std::error_code(ERROR_CALL_NOT_IMPLEMENTED, std::system_category());
+ case portable_error::invalid_argument:
+ return std::error_code(ERROR_INVALID_PARAMETER, std::system_category());
+ case portable_error::is_a_directory:
+#ifdef ERROR_DIRECTORY_NOT_SUPPORTED
+ return std::error_code(ERROR_DIRECTORY_NOT_SUPPORTED, std::system_category());
+#else
+ return std::error_code(ERROR_NOT_SUPPORTED, std::system_category());
+#endif
+ }
+#else
+ switch (err) {
+ case portable_error::none:
+ return std::error_code();
+ case portable_error::exists:
+ return std::error_code(EEXIST, std::system_category());
+ case portable_error::not_found:
+ return std::error_code(ENOENT, std::system_category());
+ case portable_error::not_supported:
+ return std::error_code(ENOTSUP, std::system_category());
+ case portable_error::not_implemented:
+ return std::error_code(ENOSYS, std::system_category());
+ case portable_error::invalid_argument:
+ return std::error_code(EINVAL, std::system_category());
+ case portable_error::is_a_directory:
+ return std::error_code(EISDIR, std::system_category());
+ }
+#endif
+ return std::error_code();
+}
+
+#ifdef GHC_OS_WINDOWS
+GHC_INLINE std::error_code make_system_error(uint32_t err)
+{
+ return std::error_code(err ? static_cast<int>(err) : static_cast<int>(::GetLastError()), std::system_category());
+}
+#else
+GHC_INLINE std::error_code make_system_error(int err)
+{
+ return std::error_code(err ? err : errno, std::system_category());
+}
+#endif
+
+#endif // GHC_EXPAND_IMPL
+
+template <typename Enum>
+using EnableBitmask = typename std::enable_if<std::is_same<Enum, perms>::value || std::is_same<Enum, perm_options>::value || std::is_same<Enum, copy_options>::value || std::is_same<Enum, directory_options>::value, Enum>::type;
+} // namespace detail
+
+template <typename Enum>
+constexpr detail::EnableBitmask<Enum> operator&(Enum X, Enum Y)
+{
+ using underlying = typename std::underlying_type<Enum>::type;
+ return static_cast<Enum>(static_cast<underlying>(X) & static_cast<underlying>(Y));
+}
+
+template <typename Enum>
+constexpr detail::EnableBitmask<Enum> operator|(Enum X, Enum Y)
+{
+ using underlying = typename std::underlying_type<Enum>::type;
+ return static_cast<Enum>(static_cast<underlying>(X) | static_cast<underlying>(Y));
+}
+
+template <typename Enum>
+constexpr detail::EnableBitmask<Enum> operator^(Enum X, Enum Y)
+{
+ using underlying = typename std::underlying_type<Enum>::type;
+ return static_cast<Enum>(static_cast<underlying>(X) ^ static_cast<underlying>(Y));
+}
+
+template <typename Enum>
+constexpr detail::EnableBitmask<Enum> operator~(Enum X)
+{
+ using underlying = typename std::underlying_type<Enum>::type;
+ return static_cast<Enum>(~static_cast<underlying>(X));
+}
+
+template <typename Enum>
+detail::EnableBitmask<Enum>& operator&=(Enum& X, Enum Y)
+{
+ X = X & Y;
+ return X;
+}
+
+template <typename Enum>
+detail::EnableBitmask<Enum>& operator|=(Enum& X, Enum Y)
+{
+ X = X | Y;
+ return X;
+}
+
+template <typename Enum>
+detail::EnableBitmask<Enum>& operator^=(Enum& X, Enum Y)
+{
+ X = X ^ Y;
+ return X;
+}
+
+#ifdef GHC_EXPAND_IMPL
+
+namespace detail {
+
+GHC_INLINE bool in_range(uint32_t c, uint32_t lo, uint32_t hi)
+{
+ return (static_cast<uint32_t>(c - lo) < (hi - lo + 1));
+}
+
+GHC_INLINE bool is_surrogate(uint32_t c)
+{
+ return in_range(c, 0xd800, 0xdfff);
+}
+
+GHC_INLINE bool is_high_surrogate(uint32_t c)
+{
+ return (c & 0xfffffc00) == 0xd800;
+}
+
+GHC_INLINE bool is_low_surrogate(uint32_t c)
+{
+ return (c & 0xfffffc00) == 0xdc00;
+}
+
+GHC_INLINE void appendUTF8(std::string& str, uint32_t unicode)
+{
+ if (unicode <= 0x7f) {
+ str.push_back(static_cast<char>(unicode));
+ }
+ else if (unicode >= 0x80 && unicode <= 0x7ff) {
+ str.push_back(static_cast<char>((unicode >> 6) + 192));
+ str.push_back(static_cast<char>((unicode & 0x3f) + 128));
+ }
+ else if ((unicode >= 0x800 && unicode <= 0xd7ff) || (unicode >= 0xe000 && unicode <= 0xffff)) {
+ str.push_back(static_cast<char>((unicode >> 12) + 224));
+ str.push_back(static_cast<char>(((unicode & 0xfff) >> 6) + 128));
+ str.push_back(static_cast<char>((unicode & 0x3f) + 128));
+ }
+ else if (unicode >= 0x10000 && unicode <= 0x10ffff) {
+ str.push_back(static_cast<char>((unicode >> 18) + 240));
+ str.push_back(static_cast<char>(((unicode & 0x3ffff) >> 12) + 128));
+ str.push_back(static_cast<char>(((unicode & 0xfff) >> 6) + 128));
+ str.push_back(static_cast<char>((unicode & 0x3f) + 128));
+ }
+ else {
+#ifdef GHC_RAISE_UNICODE_ERRORS
+ throw filesystem_error("Illegal code point for unicode character.", str, std::make_error_code(std::errc::illegal_byte_sequence));
+#else
+ appendUTF8(str, 0xfffd);
+#endif
+ }
+}
+
+// Thanks to Bjoern Hoehrmann (https://bjoern.hoehrmann.de/utf-8/decoder/dfa/)
+// and Taylor R Campbell for the ideas to this DFA approach of UTF-8 decoding;
+// Generating debugging and shrinking my own DFA from scratch was a day of fun!
+GHC_INLINE unsigned consumeUtf8Fragment(const unsigned state, const uint8_t fragment, uint32_t& codepoint)
+{
+ static const uint32_t utf8_state_info[] = {
+ // encoded states
+ 0x11111111u, 0x11111111u, 0x77777777u, 0x77777777u, 0x88888888u, 0x88888888u, 0x88888888u, 0x88888888u, 0x22222299u, 0x22222222u, 0x22222222u, 0x22222222u, 0x3333333au, 0x33433333u, 0x9995666bu, 0x99999999u,
+ 0x88888880u, 0x22818108u, 0x88888881u, 0x88888882u, 0x88888884u, 0x88888887u, 0x88888886u, 0x82218108u, 0x82281108u, 0x88888888u, 0x88888883u, 0x88888885u, 0u, 0u, 0u, 0u,
+ };
+ uint8_t category = fragment < 128 ? 0 : (utf8_state_info[(fragment >> 3) & 0xf] >> ((fragment & 7) << 2)) & 0xf;
+ codepoint = (state ? (codepoint << 6) | (fragment & 0x3fu) : (0xffu >> category) & fragment);
+ return state == S_RJCT ? static_cast<unsigned>(S_RJCT) : static_cast<unsigned>((utf8_state_info[category + 16] >> (state << 2)) & 0xf);
+}
+
+GHC_INLINE bool validUtf8(const std::string& utf8String)
+{
+ std::string::const_iterator iter = utf8String.begin();
+ unsigned utf8_state = S_STRT;
+ std::uint32_t codepoint = 0;
+ while (iter < utf8String.end()) {
+ if ((utf8_state = consumeUtf8Fragment(utf8_state, static_cast<uint8_t>(*iter++), codepoint)) == S_RJCT) {
+ return false;
+ }
+ }
+ if (utf8_state) {
+ return false;
+ }
+ return true;
+}
+
+} // namespace detail
+
+#endif
+
+namespace detail {
+
+template <class StringType, class Utf8String, typename std::enable_if<path::_is_basic_string<Utf8String>::value && (sizeof(typename Utf8String::value_type) == 1) && (sizeof(typename StringType::value_type) == 1)>::type* = nullptr>
+inline StringType fromUtf8(const Utf8String& utf8String, const typename StringType::allocator_type& alloc = typename StringType::allocator_type())
+{
+ return StringType(utf8String.begin(), utf8String.end(), alloc);
+}
+
+template <class StringType, class Utf8String, typename std::enable_if<path::_is_basic_string<Utf8String>::value && (sizeof(typename Utf8String::value_type) == 1) && (sizeof(typename StringType::value_type) == 2)>::type* = nullptr>
+inline StringType fromUtf8(const Utf8String& utf8String, const typename StringType::allocator_type& alloc = typename StringType::allocator_type())
+{
+ StringType result(alloc);
+ result.reserve(utf8String.length());
+ auto iter = utf8String.cbegin();
+ unsigned utf8_state = S_STRT;
+ std::uint32_t codepoint = 0;
+ while (iter < utf8String.cend()) {
+ if ((utf8_state = consumeUtf8Fragment(utf8_state, static_cast<uint8_t>(*iter++), codepoint)) == S_STRT) {
+ if (codepoint <= 0xffff) {
+ result += static_cast<typename StringType::value_type>(codepoint);
+ }
+ else {
+ codepoint -= 0x10000;
+ result += static_cast<typename StringType::value_type>((codepoint >> 10) + 0xd800);
+ result += static_cast<typename StringType::value_type>((codepoint & 0x3ff) + 0xdc00);
+ }
+ codepoint = 0;
+ }
+ else if (utf8_state == S_RJCT) {
+#ifdef GHC_RAISE_UNICODE_ERRORS
+ throw filesystem_error("Illegal byte sequence for unicode character.", utf8String, std::make_error_code(std::errc::illegal_byte_sequence));
+#else
+ result += static_cast<typename StringType::value_type>(0xfffd);
+ utf8_state = S_STRT;
+ codepoint = 0;
+#endif
+ }
+ }
+ if (utf8_state) {
+#ifdef GHC_RAISE_UNICODE_ERRORS
+ throw filesystem_error("Illegal byte sequence for unicode character.", utf8String, std::make_error_code(std::errc::illegal_byte_sequence));
+#else
+ result += static_cast<typename StringType::value_type>(0xfffd);
+#endif
+ }
+ return result;
+}
+
+template <class StringType, class Utf8String, typename std::enable_if<path::_is_basic_string<Utf8String>::value && (sizeof(typename Utf8String::value_type) == 1) && (sizeof(typename StringType::value_type) == 4)>::type* = nullptr>
+inline StringType fromUtf8(const Utf8String& utf8String, const typename StringType::allocator_type& alloc = typename StringType::allocator_type())
+{
+ StringType result(alloc);
+ result.reserve(utf8String.length());
+ auto iter = utf8String.cbegin();
+ unsigned utf8_state = S_STRT;
+ std::uint32_t codepoint = 0;
+ while (iter < utf8String.cend()) {
+ if ((utf8_state = consumeUtf8Fragment(utf8_state, static_cast<uint8_t>(*iter++), codepoint)) == S_STRT) {
+ result += static_cast<typename StringType::value_type>(codepoint);
+ codepoint = 0;
+ }
+ else if (utf8_state == S_RJCT) {
+#ifdef GHC_RAISE_UNICODE_ERRORS
+ throw filesystem_error("Illegal byte sequence for unicode character.", utf8String, std::make_error_code(std::errc::illegal_byte_sequence));
+#else
+ result += static_cast<typename StringType::value_type>(0xfffd);
+ utf8_state = S_STRT;
+ codepoint = 0;
+#endif
+ }
+ }
+ if (utf8_state) {
+#ifdef GHC_RAISE_UNICODE_ERRORS
+ throw filesystem_error("Illegal byte sequence for unicode character.", utf8String, std::make_error_code(std::errc::illegal_byte_sequence));
+#else
+ result += static_cast<typename StringType::value_type>(0xfffd);
+#endif
+ }
+ return result;
+}
+
+template <class StringType, typename charT, std::size_t N>
+inline StringType fromUtf8(const charT (&utf8String)[N])
+{
+#ifdef GHC_WITH_STRING_VIEW
+ return fromUtf8<StringType>(basic_string_view<charT>(utf8String, N - 1));
+#else
+ return fromUtf8<StringType>(std::basic_string<charT>(utf8String, N - 1));
+#endif
+}
+
+template <typename strT, typename std::enable_if<path::_is_basic_string<strT>::value && (sizeof(typename strT::value_type) == 1), int>::type size = 1>
+inline std::string toUtf8(const strT& unicodeString)
+{
+ return std::string(unicodeString.begin(), unicodeString.end());
+}
+
+template <typename strT, typename std::enable_if<path::_is_basic_string<strT>::value && (sizeof(typename strT::value_type) == 2), int>::type size = 2>
+inline std::string toUtf8(const strT& unicodeString)
+{
+ std::string result;
+ for (auto iter = unicodeString.begin(); iter != unicodeString.end(); ++iter) {
+ char32_t c = *iter;
+ if (is_surrogate(c)) {
+ ++iter;
+ if (iter != unicodeString.end() && is_high_surrogate(c) && is_low_surrogate(*iter)) {
+ appendUTF8(result, (char32_t(c) << 10) + *iter - 0x35fdc00);
+ }
+ else {
+#ifdef GHC_RAISE_UNICODE_ERRORS
+ throw filesystem_error("Illegal code point for unicode character.", result, std::make_error_code(std::errc::illegal_byte_sequence));
+#else
+ appendUTF8(result, 0xfffd);
+ if (iter == unicodeString.end()) {
+ break;
+ }
+#endif
+ }
+ }
+ else {
+ appendUTF8(result, c);
+ }
+ }
+ return result;
+}
+
+template <typename strT, typename std::enable_if<path::_is_basic_string<strT>::value && (sizeof(typename strT::value_type) == 4), int>::type size = 4>
+inline std::string toUtf8(const strT& unicodeString)
+{
+ std::string result;
+ for (auto c : unicodeString) {
+ appendUTF8(result, static_cast<uint32_t>(c));
+ }
+ return result;
+}
+
+template <typename charT>
+inline std::string toUtf8(const charT* unicodeString)
+{
+#ifdef GHC_WITH_STRING_VIEW
+ return toUtf8(basic_string_view<charT, std::char_traits<charT>>(unicodeString));
+#else
+ return toUtf8(std::basic_string<charT, std::char_traits<charT>>(unicodeString));
+#endif
+}
+
+#ifdef GHC_USE_WCHAR_T
+template <class StringType, class WString, typename std::enable_if<path::_is_basic_string<WString>::value && (sizeof(typename WString::value_type) == 2) && (sizeof(typename StringType::value_type) == 1), bool>::type = false>
+inline StringType fromWChar(const WString& wString, const typename StringType::allocator_type& alloc = typename StringType::allocator_type())
+{
+ auto temp = toUtf8(wString);
+ return StringType(temp.begin(), temp.end(), alloc);
+}
+
+template <class StringType, class WString, typename std::enable_if<path::_is_basic_string<WString>::value && (sizeof(typename WString::value_type) == 2) && (sizeof(typename StringType::value_type) == 2), bool>::type = false>
+inline StringType fromWChar(const WString& wString, const typename StringType::allocator_type& alloc = typename StringType::allocator_type())
+{
+ return StringType(wString.begin(), wString.end(), alloc);
+}
+
+template <class StringType, class WString, typename std::enable_if<path::_is_basic_string<WString>::value && (sizeof(typename WString::value_type) == 2) && (sizeof(typename StringType::value_type) == 4), bool>::type = false>
+inline StringType fromWChar(const WString& wString, const typename StringType::allocator_type& alloc = typename StringType::allocator_type())
+{
+ auto temp = toUtf8(wString);
+ return fromUtf8<StringType>(temp, alloc);
+}
+
+template <typename strT, typename std::enable_if<path::_is_basic_string<strT>::value && (sizeof(typename strT::value_type) == 1), bool>::type = false>
+inline std::wstring toWChar(const strT& unicodeString)
+{
+ return fromUtf8<std::wstring>(unicodeString);
+}
+
+template <typename strT, typename std::enable_if<path::_is_basic_string<strT>::value && (sizeof(typename strT::value_type) == 2), bool>::type = false>
+inline std::wstring toWChar(const strT& unicodeString)
+{
+ return std::wstring(unicodeString.begin(), unicodeString.end());
+}
+
+template <typename strT, typename std::enable_if<path::_is_basic_string<strT>::value && (sizeof(typename strT::value_type) == 4), bool>::type = false>
+inline std::wstring toWChar(const strT& unicodeString)
+{
+ auto temp = toUtf8(unicodeString);
+ return fromUtf8<std::wstring>(temp);
+}
+
+template <typename charT>
+inline std::wstring toWChar(const charT* unicodeString)
+{
+#ifdef GHC_WITH_STRING_VIEW
+ return toWChar(basic_string_view<charT, std::char_traits<charT>>(unicodeString));
+#else
+ return toWChar(std::basic_string<charT, std::char_traits<charT>>(unicodeString));
+#endif
+}
+#endif // GHC_USE_WCHAR_T
+
+} // namespace detail
+
+#ifdef GHC_EXPAND_IMPL
+
+namespace detail {
+
+template <typename strT, typename std::enable_if<path::_is_basic_string<strT>::value, bool>::type = true>
+GHC_INLINE bool startsWith(const strT& what, const strT& with)
+{
+ return with.length() <= what.length() && equal(with.begin(), with.end(), what.begin());
+}
+
+template <typename strT, typename std::enable_if<path::_is_basic_string<strT>::value, bool>::type = true>
+GHC_INLINE bool endsWith(const strT& what, const strT& with)
+{
+ return with.length() <= what.length() && what.compare(what.length() - with.length(), with.size(), with) == 0;
+}
+
+} // namespace detail
+
+GHC_INLINE void path::check_long_path()
+{
+#if defined(GHC_OS_WINDOWS) && defined(GHC_WIN_AUTO_PREFIX_LONG_PATH)
+ if (is_absolute() && _path.length() >= MAX_PATH - 12 && !detail::startsWith(_path, impl_string_type(GHC_PLATFORM_LITERAL("\\\\?\\")))) {
+ postprocess_path_with_format(native_format);
+ }
+#endif
+}
+
+GHC_INLINE void path::postprocess_path_with_format(path::format fmt)
+{
+#ifdef GHC_RAISE_UNICODE_ERRORS
+ if (!detail::validUtf8(_path)) {
+ path t;
+ t._path = _path;
+ throw filesystem_error("Illegal byte sequence for unicode character.", t, std::make_error_code(std::errc::illegal_byte_sequence));
+ }
+#endif
+ switch (fmt) {
+#ifdef GHC_OS_WINDOWS
+ case path::native_format:
+ case path::auto_format:
+ case path::generic_format:
+ for (auto& c : _path) {
+ if (c == generic_separator) {
+ c = preferred_separator;
+ }
+ }
+#ifdef GHC_WIN_AUTO_PREFIX_LONG_PATH
+ if (is_absolute() && _path.length() >= MAX_PATH - 12 && !detail::startsWith(_path, impl_string_type(GHC_PLATFORM_LITERAL("\\\\?\\")))) {
+ _path = GHC_PLATFORM_LITERAL("\\\\?\\") + _path;
+ }
+#endif
+ handle_prefixes();
+ break;
+#else
+ case path::auto_format:
+ case path::native_format:
+ case path::generic_format:
+ // nothing to do
+ break;
+#endif
+ }
+ if (_path.length() > _prefixLength + 2 && _path[_prefixLength] == preferred_separator && _path[_prefixLength + 1] == preferred_separator && _path[_prefixLength + 2] != preferred_separator) {
+ impl_string_type::iterator new_end = std::unique(_path.begin() + static_cast<string_type::difference_type>(_prefixLength) + 2, _path.end(), [](path::value_type lhs, path::value_type rhs) { return lhs == rhs && lhs == preferred_separator; });
+ _path.erase(new_end, _path.end());
+ }
+ else {
+ impl_string_type::iterator new_end = std::unique(_path.begin() + static_cast<string_type::difference_type>(_prefixLength), _path.end(), [](path::value_type lhs, path::value_type rhs) { return lhs == rhs && lhs == preferred_separator; });
+ _path.erase(new_end, _path.end());
+ }
+}
+
+#endif // GHC_EXPAND_IMPL
+
+template <class Source, typename>
+inline path::path(const Source& source, format fmt)
+#ifdef GHC_USE_WCHAR_T
+ : _path(detail::toWChar(source))
+#else
+ : _path(detail::toUtf8(source))
+#endif
+{
+ postprocess_path_with_format(fmt);
+}
+
+template <class Source, typename>
+inline path u8path(const Source& source)
+{
+ return path(source);
+}
+template <class InputIterator>
+inline path u8path(InputIterator first, InputIterator last)
+{
+ return path(first, last);
+}
+
+template <class InputIterator>
+inline path::path(InputIterator first, InputIterator last, format fmt)
+ : path(std::basic_string<typename std::iterator_traits<InputIterator>::value_type>(first, last), fmt)
+{
+ // delegated
+}
+
+#ifdef GHC_EXPAND_IMPL
+
+namespace detail {
+
+GHC_INLINE bool equals_simple_insensitive(const path::value_type* str1, const path::value_type* str2)
+{
+#ifdef GHC_OS_WINDOWS
+#ifdef __GNUC__
+ while (::tolower((unsigned char)*str1) == ::tolower((unsigned char)*str2++)) {
+ if (*str1++ == 0)
+ return true;
+ }
+ return false;
+#else // __GNUC__
+#ifdef GHC_USE_WCHAR_T
+ return 0 == ::_wcsicmp(str1, str2);
+#else // GHC_USE_WCHAR_T
+ return 0 == ::_stricmp(str1, str2);
+#endif // GHC_USE_WCHAR_T
+#endif // __GNUC__
+#else // GHC_OS_WINDOWS
+ return 0 == ::strcasecmp(str1, str2);
+#endif // GHC_OS_WINDOWS
+}
+
+GHC_INLINE int compare_simple_insensitive(const path::value_type* str1, size_t len1, const path::value_type* str2, size_t len2)
+{
+ while (len1 > 0 && len2 > 0 && ::tolower(static_cast<unsigned char>(*str1)) == ::tolower(static_cast<unsigned char>(*str2))) {
+ --len1;
+ --len2;
+ ++str1;
+ ++str2;
+ }
+ if (len1 && len2) {
+ return *str1 < *str2 ? -1 : 1;
+ }
+ if (len1 == 0 && len2 == 0) {
+ return 0;
+ }
+ return len1 == 0 ? -1 : 1;
+}
+
+GHC_INLINE const char* strerror_adapter(char* gnu, char*)
+{
+ return gnu;
+}
+
+GHC_INLINE const char* strerror_adapter(int posix, char* buffer)
+{
+ if (posix) {
+ return "Error in strerror_r!";
+ }
+ return buffer;
+}
+
+template <typename ErrorNumber>
+GHC_INLINE std::string systemErrorText(ErrorNumber code = 0)
+{
+#if defined(GHC_OS_WINDOWS)
+ LPVOID msgBuf;
+ DWORD dw = code ? static_cast<DWORD>(code) : ::GetLastError();
+ FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, dw, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPWSTR)&msgBuf, 0, NULL);
+ std::string msg = toUtf8(std::wstring((LPWSTR)msgBuf));
+ LocalFree(msgBuf);
+ return msg;
+#else
+ char buffer[512];
+ return strerror_adapter(strerror_r(code ? code : errno, buffer, sizeof(buffer)), buffer);
+#endif
+}
+
+#ifdef GHC_OS_WINDOWS
+using CreateSymbolicLinkW_fp = BOOLEAN(WINAPI*)(LPCWSTR, LPCWSTR, DWORD);
+using CreateHardLinkW_fp = BOOLEAN(WINAPI*)(LPCWSTR, LPCWSTR, LPSECURITY_ATTRIBUTES);
+
+GHC_INLINE void create_symlink(const path& target_name, const path& new_symlink, bool to_directory, std::error_code& ec)
+{
+ std::error_code tec;
+ auto fs = status(target_name, tec);
+ if ((fs.type() == file_type::directory && !to_directory) || (fs.type() == file_type::regular && to_directory)) {
+ ec = detail::make_error_code(detail::portable_error::not_supported);
+ return;
+ }
+#if defined(__GNUC__) && __GNUC__ >= 8
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wcast-function-type"
+#endif
+ static CreateSymbolicLinkW_fp api_call = reinterpret_cast<CreateSymbolicLinkW_fp>(GetProcAddress(GetModuleHandleW(L"kernel32.dll"), "CreateSymbolicLinkW"));
+#if defined(__GNUC__) && __GNUC__ >= 8
+#pragma GCC diagnostic pop
+#endif
+ if (api_call) {
+ if (api_call(detail::fromUtf8<std::wstring>(new_symlink.u8string()).c_str(), detail::fromUtf8<std::wstring>(target_name.u8string()).c_str(), to_directory ? 1 : 0) == 0) {
+ auto result = ::GetLastError();
+ if (result == ERROR_PRIVILEGE_NOT_HELD && api_call(detail::fromUtf8<std::wstring>(new_symlink.u8string()).c_str(), detail::fromUtf8<std::wstring>(target_name.u8string()).c_str(), to_directory ? 3 : 2) != 0) {
+ return;
+ }
+ ec = detail::make_system_error(result);
+ }
+ }
+ else {
+ ec = detail::make_system_error(ERROR_NOT_SUPPORTED);
+ }
+}
+
+GHC_INLINE void create_hardlink(const path& target_name, const path& new_hardlink, std::error_code& ec)
+{
+#if defined(__GNUC__) && __GNUC__ >= 8
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wcast-function-type"
+#endif
+ static CreateHardLinkW_fp api_call = reinterpret_cast<CreateHardLinkW_fp>(GetProcAddress(GetModuleHandleW(L"kernel32.dll"), "CreateHardLinkW"));
+#if defined(__GNUC__) && __GNUC__ >= 8
+#pragma GCC diagnostic pop
+#endif
+ if (api_call) {
+ if (api_call(GHC_NATIVEWP(new_hardlink), GHC_NATIVEWP(target_name), NULL) == 0) {
+ ec = detail::make_system_error();
+ }
+ }
+ else {
+ ec = detail::make_system_error(ERROR_NOT_SUPPORTED);
+ }
+}
+
+GHC_INLINE path getFullPathName(const wchar_t* p, std::error_code& ec)
+{
+ ULONG size = ::GetFullPathNameW(p, 0, 0, 0);
+ if (size) {
+ std::vector<wchar_t> buf(size, 0);
+ ULONG s2 = GetFullPathNameW(p, size, buf.data(), nullptr);
+ if (s2 && s2 < size) {
+ return path(std::wstring(buf.data(), s2));
+ }
+ }
+ ec = detail::make_system_error();
+ return path();
+}
+
+#else
+GHC_INLINE void create_symlink(const path& target_name, const path& new_symlink, bool, std::error_code& ec)
+{
+ if (::symlink(target_name.c_str(), new_symlink.c_str()) != 0) {
+ ec = detail::make_system_error();
+ }
+}
+
+#ifndef GHC_OS_WEB
+GHC_INLINE void create_hardlink(const path& target_name, const path& new_hardlink, std::error_code& ec)
+{
+ if (::link(target_name.c_str(), new_hardlink.c_str()) != 0) {
+ ec = detail::make_system_error();
+ }
+}
+#endif
+#endif
+
+template <typename T>
+GHC_INLINE file_status file_status_from_st_mode(T mode)
+{
+#ifdef GHC_OS_WINDOWS
+ file_type ft = file_type::unknown;
+ if ((mode & _S_IFDIR) == _S_IFDIR) {
+ ft = file_type::directory;
+ }
+ else if ((mode & _S_IFREG) == _S_IFREG) {
+ ft = file_type::regular;
+ }
+ else if ((mode & _S_IFCHR) == _S_IFCHR) {
+ ft = file_type::character;
+ }
+ perms prms = static_cast<perms>(mode & 0xfff);
+ return file_status(ft, prms);
+#else
+ file_type ft = file_type::unknown;
+ if (S_ISDIR(mode)) {
+ ft = file_type::directory;
+ }
+ else if (S_ISREG(mode)) {
+ ft = file_type::regular;
+ }
+ else if (S_ISCHR(mode)) {
+ ft = file_type::character;
+ }
+ else if (S_ISBLK(mode)) {
+ ft = file_type::block;
+ }
+ else if (S_ISFIFO(mode)) {
+ ft = file_type::fifo;
+ }
+ else if (S_ISLNK(mode)) {
+ ft = file_type::symlink;
+ }
+ else if (S_ISSOCK(mode)) {
+ ft = file_type::socket;
+ }
+ perms prms = static_cast<perms>(mode & 0xfff);
+ return file_status(ft, prms);
+#endif
+}
+
+GHC_INLINE path resolveSymlink(const path& p, std::error_code& ec)
+{
+#ifdef GHC_OS_WINDOWS
+#ifndef REPARSE_DATA_BUFFER_HEADER_SIZE
+ typedef struct _REPARSE_DATA_BUFFER
+ {
+ ULONG ReparseTag;
+ USHORT ReparseDataLength;
+ USHORT Reserved;
+ union
+ {
+ struct
+ {
+ USHORT SubstituteNameOffset;
+ USHORT SubstituteNameLength;
+ USHORT PrintNameOffset;
+ USHORT PrintNameLength;
+ ULONG Flags;
+ WCHAR PathBuffer[1];
+ } SymbolicLinkReparseBuffer;
+ struct
+ {
+ USHORT SubstituteNameOffset;
+ USHORT SubstituteNameLength;
+ USHORT PrintNameOffset;
+ USHORT PrintNameLength;
+ WCHAR PathBuffer[1];
+ } MountPointReparseBuffer;
+ struct
+ {
+ UCHAR DataBuffer[1];
+ } GenericReparseBuffer;
+ } DUMMYUNIONNAME;
+ } REPARSE_DATA_BUFFER;
+#ifndef MAXIMUM_REPARSE_DATA_BUFFER_SIZE
+#define MAXIMUM_REPARSE_DATA_BUFFER_SIZE (16 * 1024)
+#endif
+#endif
+
+ std::shared_ptr<void> file(CreateFileW(GHC_NATIVEWP(p), 0, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, 0, OPEN_EXISTING, FILE_FLAG_OPEN_REPARSE_POINT | FILE_FLAG_BACKUP_SEMANTICS, 0), CloseHandle);
+ if (file.get() == INVALID_HANDLE_VALUE) {
+ ec = detail::make_system_error();
+ return path();
+ }
+
+ std::shared_ptr<REPARSE_DATA_BUFFER> reparseData((REPARSE_DATA_BUFFER*)std::calloc(1, MAXIMUM_REPARSE_DATA_BUFFER_SIZE), std::free);
+ ULONG bufferUsed;
+ path result;
+ if (DeviceIoControl(file.get(), FSCTL_GET_REPARSE_POINT, 0, 0, reparseData.get(), MAXIMUM_REPARSE_DATA_BUFFER_SIZE, &bufferUsed, 0)) {
+ if (IsReparseTagMicrosoft(reparseData->ReparseTag)) {
+ switch (reparseData->ReparseTag) {
+ case IO_REPARSE_TAG_SYMLINK: {
+ auto printName = std::wstring(&reparseData->SymbolicLinkReparseBuffer.PathBuffer[reparseData->SymbolicLinkReparseBuffer.PrintNameOffset / sizeof(WCHAR)], reparseData->SymbolicLinkReparseBuffer.PrintNameLength / sizeof(WCHAR));
+ auto substituteName =
+ std::wstring(&reparseData->SymbolicLinkReparseBuffer.PathBuffer[reparseData->SymbolicLinkReparseBuffer.SubstituteNameOffset / sizeof(WCHAR)], reparseData->SymbolicLinkReparseBuffer.SubstituteNameLength / sizeof(WCHAR));
+ if (detail::endsWith(substituteName, printName) && detail::startsWith(substituteName, std::wstring(L"\\??\\"))) {
+ result = printName;
+ }
+ else {
+ result = substituteName;
+ }
+ if (reparseData->SymbolicLinkReparseBuffer.Flags & 0x1 /*SYMLINK_FLAG_RELATIVE*/) {
+ result = p.parent_path() / result;
+ }
+ break;
+ }
+ case IO_REPARSE_TAG_MOUNT_POINT:
+ result = std::wstring(&reparseData->MountPointReparseBuffer.PathBuffer[reparseData->MountPointReparseBuffer.SubstituteNameOffset / sizeof(WCHAR)], reparseData->MountPointReparseBuffer.SubstituteNameLength / sizeof(WCHAR));
+ break;
+ default:
+ break;
+ }
+ }
+ }
+ else {
+ ec = detail::make_system_error();
+ }
+ return result;
+#else
+ size_t bufferSize = 256;
+ while (true) {
+ std::vector<char> buffer(bufferSize, static_cast<char>(0));
+ auto rc = ::readlink(p.c_str(), buffer.data(), buffer.size());
+ if (rc < 0) {
+ ec = detail::make_system_error();
+ return path();
+ }
+ else if (rc < static_cast<int>(bufferSize)) {
+ return path(std::string(buffer.data(), static_cast<std::string::size_type>(rc)));
+ }
+ bufferSize *= 2;
+ }
+ return path();
+#endif
+}
+
+#ifdef GHC_OS_WINDOWS
+GHC_INLINE time_t timeFromFILETIME(const FILETIME& ft)
+{
+ ULARGE_INTEGER ull;
+ ull.LowPart = ft.dwLowDateTime;
+ ull.HighPart = ft.dwHighDateTime;
+ return static_cast<time_t>(ull.QuadPart / 10000000ULL - 11644473600ULL);
+}
+
+GHC_INLINE void timeToFILETIME(time_t t, FILETIME& ft)
+{
+ LONGLONG ll;
+ ll = Int32x32To64(t, 10000000) + 116444736000000000;
+ ft.dwLowDateTime = static_cast<DWORD>(ll);
+ ft.dwHighDateTime = static_cast<DWORD>(ll >> 32);
+}
+
+template <typename INFO>
+GHC_INLINE uintmax_t hard_links_from_INFO(const INFO* info)
+{
+ return static_cast<uintmax_t>(-1);
+}
+
+template <>
+GHC_INLINE uintmax_t hard_links_from_INFO<BY_HANDLE_FILE_INFORMATION>(const BY_HANDLE_FILE_INFORMATION* info)
+{
+ return info->nNumberOfLinks;
+}
+
+template <typename INFO>
+GHC_INLINE file_status status_from_INFO(const path& p, const INFO* info, std::error_code&, uintmax_t* sz = nullptr, time_t* lwt = nullptr)
+{
+ file_type ft = file_type::unknown;
+ if ((info->dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT)) {
+ ft = file_type::symlink;
+ }
+ else {
+ if ((info->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) {
+ ft = file_type::directory;
+ }
+ else {
+ ft = file_type::regular;
+ }
+ }
+ perms prms = perms::owner_read | perms::group_read | perms::others_read;
+ if (!(info->dwFileAttributes & FILE_ATTRIBUTE_READONLY)) {
+ prms = prms | perms::owner_write | perms::group_write | perms::others_write;
+ }
+ if (has_executable_extension(p)) {
+ prms = prms | perms::owner_exec | perms::group_exec | perms::others_exec;
+ }
+ if (sz) {
+ *sz = static_cast<uintmax_t>(info->nFileSizeHigh) << (sizeof(info->nFileSizeHigh) * 8) | info->nFileSizeLow;
+ }
+ if (lwt) {
+ *lwt = detail::timeFromFILETIME(info->ftLastWriteTime);
+ }
+ return file_status(ft, prms);
+}
+
+#endif
+
+GHC_INLINE bool is_not_found_error(std::error_code& ec)
+{
+#ifdef GHC_OS_WINDOWS
+ return ec.value() == ERROR_FILE_NOT_FOUND || ec.value() == ERROR_PATH_NOT_FOUND || ec.value() == ERROR_INVALID_NAME;
+#else
+ return ec.value() == ENOENT || ec.value() == ENOTDIR;
+#endif
+}
+
+GHC_INLINE file_status symlink_status_ex(const path& p, std::error_code& ec, uintmax_t* sz = nullptr, uintmax_t* nhl = nullptr, time_t* lwt = nullptr) noexcept
+{
+#ifdef GHC_OS_WINDOWS
+ file_status fs;
+ WIN32_FILE_ATTRIBUTE_DATA attr;
+ if (!GetFileAttributesExW(GHC_NATIVEWP(p), GetFileExInfoStandard, &attr)) {
+ ec = detail::make_system_error();
+ }
+ else {
+ ec.clear();
+ fs = detail::status_from_INFO(p, &attr, ec, sz, lwt);
+ if (nhl) {
+ *nhl = 0;
+ }
+ if (attr.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) {
+ fs.type(file_type::symlink);
+ }
+ }
+ if (detail::is_not_found_error(ec)) {
+ return file_status(file_type::not_found);
+ }
+ return ec ? file_status(file_type::none) : fs;
+#else
+ (void)sz;
+ (void)nhl;
+ (void)lwt;
+ struct ::stat fs;
+ auto result = ::lstat(p.c_str(), &fs);
+ if (result == 0) {
+ ec.clear();
+ file_status f_s = detail::file_status_from_st_mode(fs.st_mode);
+ return f_s;
+ }
+ ec = detail::make_system_error();
+ if (detail::is_not_found_error(ec)) {
+ return file_status(file_type::not_found, perms::unknown);
+ }
+ return file_status(file_type::none);
+#endif
+}
+
+GHC_INLINE file_status status_ex(const path& p, std::error_code& ec, file_status* sls = nullptr, uintmax_t* sz = nullptr, uintmax_t* nhl = nullptr, time_t* lwt = nullptr, int recurse_count = 0) noexcept
+{
+ ec.clear();
+#ifdef GHC_OS_WINDOWS
+ if (recurse_count > 16) {
+ ec = detail::make_system_error(0x2A9 /*ERROR_STOPPED_ON_SYMLINK*/);
+ return file_status(file_type::unknown);
+ }
+ WIN32_FILE_ATTRIBUTE_DATA attr;
+ if (!::GetFileAttributesExW(GHC_NATIVEWP(p), GetFileExInfoStandard, &attr)) {
+ ec = detail::make_system_error();
+ }
+ else if (attr.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) {
+ path target = resolveSymlink(p, ec);
+ file_status result;
+ if (!ec && !target.empty()) {
+ if (sls) {
+ *sls = status_from_INFO(p, &attr, ec);
+ }
+ return detail::status_ex(target, ec, nullptr, sz, nhl, lwt, recurse_count + 1);
+ }
+ return file_status(file_type::unknown);
+ }
+ if (ec) {
+ if (detail::is_not_found_error(ec)) {
+ return file_status(file_type::not_found);
+ }
+ return file_status(file_type::none);
+ }
+ if (nhl) {
+ *nhl = 0;
+ }
+ return detail::status_from_INFO(p, &attr, ec, sz, lwt);
+#else
+ (void)recurse_count;
+ struct ::stat st;
+ auto result = ::lstat(p.c_str(), &st);
+ if (result == 0) {
+ ec.clear();
+ file_status fs = detail::file_status_from_st_mode(st.st_mode);
+ if (sls) {
+ *sls = fs;
+ }
+ if (fs.type() == file_type::symlink) {
+ result = ::stat(p.c_str(), &st);
+ if (result == 0) {
+ fs = detail::file_status_from_st_mode(st.st_mode);
+ }
+ else {
+ ec = detail::make_system_error();
+ if (detail::is_not_found_error(ec)) {
+ return file_status(file_type::not_found, perms::unknown);
+ }
+ return file_status(file_type::none);
+ }
+ }
+ if (sz) {
+ *sz = static_cast<uintmax_t>(st.st_size);
+ }
+ if (nhl) {
+ *nhl = st.st_nlink;
+ }
+ if (lwt) {
+ *lwt = st.st_mtime;
+ }
+ return fs;
+ }
+ else {
+ ec = detail::make_system_error();
+ if (detail::is_not_found_error(ec)) {
+ return file_status(file_type::not_found, perms::unknown);
+ }
+ return file_status(file_type::none);
+ }
+#endif
+}
+
+} // namespace detail
+
+GHC_INLINE u8arguments::u8arguments(int& argc, char**& argv)
+ : _argc(argc)
+ , _argv(argv)
+ , _refargc(argc)
+ , _refargv(argv)
+ , _isvalid(false)
+{
+#ifdef GHC_OS_WINDOWS
+ LPWSTR* p;
+ p = ::CommandLineToArgvW(::GetCommandLineW(), &argc);
+ _args.reserve(static_cast<size_t>(argc));
+ _argp.reserve(static_cast<size_t>(argc));
+ for (size_t i = 0; i < static_cast<size_t>(argc); ++i) {
+ _args.push_back(detail::toUtf8(std::wstring(p[i])));
+ _argp.push_back((char*)_args[i].data());
+ }
+ argv = _argp.data();
+ ::LocalFree(p);
+ _isvalid = true;
+#else
+ std::setlocale(LC_ALL, "");
+#if defined(__ANDROID__) && __ANDROID_API__ < 26
+ _isvalid = true;
+#else
+ if (detail::equals_simple_insensitive(::nl_langinfo(CODESET), "UTF-8")) {
+ _isvalid = true;
+ }
+#endif
+#endif
+}
+
+//-----------------------------------------------------------------------------
+// 30.10.8.4.1 constructors and destructor
+
+GHC_INLINE path::path() noexcept {}
+
+GHC_INLINE path::path(const path& p)
+ : _path(p._path)
+#if defined(GHC_OS_WINDOWS) && defined(GHC_WIN_AUTO_PREFIX_LONG_PATH)
+ , _prefixLength(p._prefixLength)
+#endif
+{
+}
+
+GHC_INLINE path::path(path&& p) noexcept
+ : _path(std::move(p._path))
+#if defined(GHC_OS_WINDOWS) && defined(GHC_WIN_AUTO_PREFIX_LONG_PATH)
+ , _prefixLength(p._prefixLength)
+#endif
+{
+}
+
+GHC_INLINE path::path(string_type&& source, format fmt)
+ : _path(std::move(source))
+{
+ postprocess_path_with_format(fmt);
+}
+
+#endif // GHC_EXPAND_IMPL
+
+#ifdef GHC_WITH_EXCEPTIONS
+template <class Source, typename>
+inline path::path(const Source& source, const std::locale& loc, format fmt)
+ : path(source, fmt)
+{
+ std::string locName = loc.name();
+ if (!(locName.length() >= 5 && (locName.substr(locName.length() - 5) == "UTF-8" || locName.substr(locName.length() - 5) == "utf-8"))) {
+ throw filesystem_error("This implementation only supports UTF-8 locales!", path(_path), detail::make_error_code(detail::portable_error::not_supported));
+ }
+}
+
+template <class InputIterator>
+inline path::path(InputIterator first, InputIterator last, const std::locale& loc, format fmt)
+ : path(std::basic_string<typename std::iterator_traits<InputIterator>::value_type>(first, last), fmt)
+{
+ std::string locName = loc.name();
+ if (!(locName.length() >= 5 && (locName.substr(locName.length() - 5) == "UTF-8" || locName.substr(locName.length() - 5) == "utf-8"))) {
+ throw filesystem_error("This implementation only supports UTF-8 locales!", path(_path), detail::make_error_code(detail::portable_error::not_supported));
+ }
+}
+#endif
+
+#ifdef GHC_EXPAND_IMPL
+
+GHC_INLINE path::~path() {}
+
+//-----------------------------------------------------------------------------
+// 30.10.8.4.2 assignments
+
+GHC_INLINE path& path::operator=(const path& p)
+{
+ _path = p._path;
+#if defined(GHC_OS_WINDOWS) && defined(GHC_WIN_AUTO_PREFIX_LONG_PATH)
+ _prefixLength = p._prefixLength;
+#endif
+ return *this;
+}
+
+GHC_INLINE path& path::operator=(path&& p) noexcept
+{
+ _path = std::move(p._path);
+#if defined(GHC_OS_WINDOWS) && defined(GHC_WIN_AUTO_PREFIX_LONG_PATH)
+ _prefixLength = p._prefixLength;
+#endif
+ return *this;
+}
+
+GHC_INLINE path& path::operator=(path::string_type&& source)
+{
+ return assign(source);
+}
+
+GHC_INLINE path& path::assign(path::string_type&& source)
+{
+ _path = std::move(source);
+ postprocess_path_with_format(native_format);
+ return *this;
+}
+
+#endif // GHC_EXPAND_IMPL
+
+template <class Source>
+inline path& path::operator=(const Source& source)
+{
+ return assign(source);
+}
+
+template <class Source>
+inline path& path::assign(const Source& source)
+{
+#ifdef GHC_USE_WCHAR_T
+ _path.assign(detail::toWChar(source));
+#else
+ _path.assign(detail::toUtf8(source));
+#endif
+ postprocess_path_with_format(native_format);
+ return *this;
+}
+
+template <>
+inline path& path::assign<path>(const path& source)
+{
+ _path = source._path;
+#if defined(GHC_OS_WINDOWS) && defined(GHC_WIN_AUTO_PREFIX_LONG_PATH)
+ _prefixLength = source._prefixLength;
+#endif
+ return *this;
+}
+
+template <class InputIterator>
+inline path& path::assign(InputIterator first, InputIterator last)
+{
+ _path.assign(first, last);
+ postprocess_path_with_format(native_format);
+ return *this;
+}
+
+#ifdef GHC_EXPAND_IMPL
+
+//-----------------------------------------------------------------------------
+// 30.10.8.4.3 appends
+
+GHC_INLINE path& path::operator/=(const path& p)
+{
+ if (p.empty()) {
+ // was: if ((!has_root_directory() && is_absolute()) || has_filename())
+ if (!_path.empty() && _path[_path.length() - 1] != preferred_separator && _path[_path.length() - 1] != ':') {
+ _path += preferred_separator;
+ }
+ return *this;
+ }
+ if ((p.is_absolute() && (_path != root_name()._path || p._path != "/")) || (p.has_root_name() && p.root_name() != root_name())) {
+ assign(p);
+ return *this;
+ }
+ if (p.has_root_directory()) {
+ assign(root_name());
+ }
+ else if ((!has_root_directory() && is_absolute()) || has_filename()) {
+ _path += preferred_separator;
+ }
+ auto iter = p.begin();
+ bool first = true;
+ if (p.has_root_name()) {
+ ++iter;
+ }
+ while (iter != p.end()) {
+ if (!first && !(!_path.empty() && _path[_path.length() - 1] == preferred_separator)) {
+ _path += preferred_separator;
+ }
+ first = false;
+ _path += (*iter++).native();
+ }
+ check_long_path();
+ return *this;
+}
+
+GHC_INLINE void path::append_name(const value_type* name)
+{
+ if (_path.empty()) {
+ this->operator/=(path(name));
+ }
+ else {
+ if (_path.back() != path::preferred_separator) {
+ _path.push_back(path::preferred_separator);
+ }
+ _path += name;
+ check_long_path();
+ }
+}
+
+#endif // GHC_EXPAND_IMPL
+
+template <class Source>
+inline path& path::operator/=(const Source& source)
+{
+ return append(source);
+}
+
+template <class Source>
+inline path& path::append(const Source& source)
+{
+ return this->operator/=(path(source));
+}
+
+template <>
+inline path& path::append<path>(const path& p)
+{
+ return this->operator/=(p);
+}
+
+template <class InputIterator>
+inline path& path::append(InputIterator first, InputIterator last)
+{
+ std::basic_string<typename std::iterator_traits<InputIterator>::value_type> part(first, last);
+ return append(part);
+}
+
+#ifdef GHC_EXPAND_IMPL
+
+//-----------------------------------------------------------------------------
+// 30.10.8.4.4 concatenation
+
+GHC_INLINE path& path::operator+=(const path& x)
+{
+ return concat(x._path);
+}
+
+GHC_INLINE path& path::operator+=(const string_type& x)
+{
+ return concat(x);
+}
+
+#ifdef GHC_WITH_STRING_VIEW
+GHC_INLINE path& path::operator+=(basic_string_view<value_type> x)
+{
+ return concat(x);
+}
+#endif
+
+GHC_INLINE path& path::operator+=(const value_type* x)
+{
+#ifdef GHC_WITH_STRING_VIEW
+ basic_string_view<value_type> part(x);
+#else
+ string_type part(x);
+#endif
+ return concat(part);
+}
+
+GHC_INLINE path& path::operator+=(value_type x)
+{
+#ifdef GHC_OS_WINDOWS
+ if (x == generic_separator) {
+ x = preferred_separator;
+ }
+#endif
+ if (_path.empty() || _path.back() != preferred_separator) {
+ _path += x;
+ }
+ check_long_path();
+ return *this;
+}
+
+#endif // GHC_EXPAND_IMPL
+
+template <class Source>
+inline path::path_from_string<Source>& path::operator+=(const Source& x)
+{
+ return concat(x);
+}
+
+template <class EcharT>
+inline path::path_type_EcharT<EcharT>& path::operator+=(EcharT x)
+{
+#ifdef GHC_WITH_STRING_VIEW
+ basic_string_view<EcharT> part(&x, 1);
+#else
+ std::basic_string<EcharT> part(1, x);
+#endif
+ concat(part);
+ return *this;
+}
+
+template <class Source>
+inline path& path::concat(const Source& x)
+{
+ path p(x);
+ _path += p._path;
+ postprocess_path_with_format(native_format);
+ return *this;
+}
+template <class InputIterator>
+inline path& path::concat(InputIterator first, InputIterator last)
+{
+ _path.append(first, last);
+ postprocess_path_with_format(native_format);
+ return *this;
+}
+
+#ifdef GHC_EXPAND_IMPL
+
+//-----------------------------------------------------------------------------
+// 30.10.8.4.5 modifiers
+GHC_INLINE void path::clear() noexcept
+{
+ _path.clear();
+#if defined(GHC_OS_WINDOWS) && defined(GHC_WIN_AUTO_PREFIX_LONG_PATH)
+ _prefixLength = 0;
+#endif
+}
+
+GHC_INLINE path& path::make_preferred()
+{
+ // as this filesystem implementation only uses generic_format
+ // internally, this must be a no-op
+ return *this;
+}
+
+GHC_INLINE path& path::remove_filename()
+{
+ if (has_filename()) {
+ _path.erase(_path.size() - filename()._path.size());
+ }
+ return *this;
+}
+
+GHC_INLINE path& path::replace_filename(const path& replacement)
+{
+ remove_filename();
+ return append(replacement);
+}
+
+GHC_INLINE path& path::replace_extension(const path& replacement)
+{
+ if (has_extension()) {
+ _path.erase(_path.size() - extension()._path.size());
+ }
+ if (!replacement.empty() && replacement._path[0] != '.') {
+ _path += '.';
+ }
+ return concat(replacement);
+}
+
+GHC_INLINE void path::swap(path& rhs) noexcept
+{
+ _path.swap(rhs._path);
+#if defined(GHC_OS_WINDOWS) && defined(GHC_WIN_AUTO_PREFIX_LONG_PATH)
+ std::swap(_prefixLength, rhs._prefixLength);
+#endif
+}
+
+//-----------------------------------------------------------------------------
+// 30.10.8.4.6, native format observers
+GHC_INLINE const path::string_type& path::native() const noexcept
+{
+ return _path;
+}
+
+GHC_INLINE const path::value_type* path::c_str() const noexcept
+{
+ return native().c_str();
+}
+
+GHC_INLINE path::operator path::string_type() const
+{
+ return native();
+}
+
+#endif // GHC_EXPAND_IMPL
+
+template <class EcharT, class traits, class Allocator>
+inline std::basic_string<EcharT, traits, Allocator> path::string(const Allocator& a) const
+{
+#ifdef GHC_USE_WCHAR_T
+ return detail::fromWChar<std::basic_string<EcharT, traits, Allocator>>(_path, a);
+#else
+ return detail::fromUtf8<std::basic_string<EcharT, traits, Allocator>>(_path, a);
+#endif
+}
+
+#ifdef GHC_EXPAND_IMPL
+
+GHC_INLINE std::string path::string() const
+{
+#ifdef GHC_USE_WCHAR_T
+ return detail::toUtf8(native());
+#else
+ return native();
+#endif
+}
+
+GHC_INLINE std::wstring path::wstring() const
+{
+#ifdef GHC_USE_WCHAR_T
+ return native();
+#else
+ return detail::fromUtf8<std::wstring>(native());
+#endif
+}
+
+#if defined(__cpp_lib_char8_t) && !defined(GHC_FILESYSTEM_ENFORCE_CPP17_API)
+GHC_INLINE std::u8string path::u8string() const
+{
+#ifdef GHC_USE_WCHAR_T
+ return std::u8string(reinterpret_cast<const char8_t*>(detail::toUtf8(native()).c_str()));
+#else
+ return std::u8string(reinterpret_cast<const char8_t*>(c_str()));
+#endif
+}
+#else
+GHC_INLINE std::string path::u8string() const
+{
+#ifdef GHC_USE_WCHAR_T
+ return detail::toUtf8(native());
+#else
+ return native();
+#endif
+}
+#endif
+
+GHC_INLINE std::u16string path::u16string() const
+{
+ // TODO: optimize
+ return detail::fromUtf8<std::u16string>(string());
+}
+
+GHC_INLINE std::u32string path::u32string() const
+{
+ // TODO: optimize
+ return detail::fromUtf8<std::u32string>(string());
+}
+
+#endif // GHC_EXPAND_IMPL
+
+//-----------------------------------------------------------------------------
+// 30.10.8.4.7, generic format observers
+template <class EcharT, class traits, class Allocator>
+inline std::basic_string<EcharT, traits, Allocator> path::generic_string(const Allocator& a) const
+{
+#ifdef GHC_OS_WINDOWS
+#ifdef GHC_USE_WCHAR_T
+ auto result = detail::fromWChar<std::basic_string<EcharT, traits, Allocator>, path::string_type>(_path, a);
+#else
+ auto result = detail::fromUtf8<std::basic_string<EcharT, traits, Allocator>>(_path, a);
+#endif
+ for (auto& c : result) {
+ if (c == preferred_separator) {
+ c = generic_separator;
+ }
+ }
+ return result;
+#else
+ return detail::fromUtf8<std::basic_string<EcharT, traits, Allocator>>(_path, a);
+#endif
+}
+
+#ifdef GHC_EXPAND_IMPL
+
+GHC_INLINE std::string path::generic_string() const
+{
+#ifdef GHC_OS_WINDOWS
+ return generic_string<std::string::value_type, std::string::traits_type, std::string::allocator_type>();
+#else
+ return _path;
+#endif
+}
+
+GHC_INLINE std::wstring path::generic_wstring() const
+{
+#ifdef GHC_OS_WINDOWS
+ return generic_string<std::wstring::value_type, std::wstring::traits_type, std::wstring::allocator_type>();
+#else
+ return detail::fromUtf8<std::wstring>(_path);
+#endif
+} // namespace filesystem
+
+#if defined(__cpp_lib_char8_t) && !defined(GHC_FILESYSTEM_ENFORCE_CPP17_API)
+GHC_INLINE std::u8string path::generic_u8string() const
+{
+#ifdef GHC_OS_WINDOWS
+ return generic_string<std::u8string::value_type, std::u8string::traits_type, std::u8string::allocator_type>();
+#else
+ return std::u8string(reinterpret_cast<const char8_t*>(_path.c_str()));
+#endif
+}
+#else
+GHC_INLINE std::string path::generic_u8string() const
+{
+#ifdef GHC_OS_WINDOWS
+ return generic_string<std::string::value_type, std::string::traits_type, std::string::allocator_type>();
+#else
+ return _path;
+#endif
+}
+#endif
+
+GHC_INLINE std::u16string path::generic_u16string() const
+{
+#ifdef GHC_OS_WINDOWS
+ return generic_string<std::u16string::value_type, std::u16string::traits_type, std::u16string::allocator_type>();
+#else
+ return detail::fromUtf8<std::u16string>(_path);
+#endif
+}
+
+GHC_INLINE std::u32string path::generic_u32string() const
+{
+#ifdef GHC_OS_WINDOWS
+ return generic_string<std::u32string::value_type, std::u32string::traits_type, std::u32string::allocator_type>();
+#else
+ return detail::fromUtf8<std::u32string>(_path);
+#endif
+}
+
+//-----------------------------------------------------------------------------
+// 30.10.8.4.8, compare
+GHC_INLINE int path::compare(const path& p) const noexcept
+{
+#ifdef LWG_2936_BEHAVIOUR
+ auto rnl1 = root_name_length();
+ auto rnl2 = p.root_name_length();
+#ifdef GHC_OS_WINDOWS
+ auto rnc = detail::compare_simple_insensitive(_path.c_str(), rnl1, p._path.c_str(), rnl2);
+#else
+ auto rnc = _path.compare(0, rnl1, p._path, 0, (std::min(rnl1, rnl2)));
+#endif
+ if (rnc) {
+ return rnc;
+ }
+ bool hrd1 = has_root_directory(), hrd2 = p.has_root_directory();
+ if (hrd1 != hrd2) {
+ return hrd1 ? 1 : -1;
+ }
+ if (hrd1) {
+ ++rnl1;
+ ++rnl2;
+ }
+ auto iter1 = _path.begin() + static_cast<int>(rnl1);
+ auto iter2 = p._path.begin() + static_cast<int>(rnl2);
+ while (iter1 != _path.end() && iter2 != p._path.end() && *iter1 == *iter2) {
+ ++iter1;
+ ++iter2;
+ }
+ if (iter1 == _path.end()) {
+ return iter2 == p._path.end() ? 0 : -1;
+ }
+ if (iter2 == p._path.end()) {
+ return 1;
+ }
+ if (*iter1 == preferred_separator) {
+ return -1;
+ }
+ if (*iter2 == preferred_separator) {
+ return 1;
+ }
+ return *iter1 < *iter2 ? -1 : 1;
+#else // LWG_2936_BEHAVIOUR
+#ifdef GHC_OS_WINDOWS
+ auto rnl1 = root_name_length();
+ auto rnl2 = p.root_name_length();
+ auto rnc = detail::compare_simple_insensitive(_path.c_str(), rnl1, p._path.c_str(), rnl2);
+ if (rnc) {
+ return rnc;
+ }
+ return _path.compare(rnl1, std::string::npos, p._path, rnl2, std::string::npos);
+#else
+ return _path.compare(p._path);
+#endif
+#endif
+}
+
+GHC_INLINE int path::compare(const string_type& s) const
+{
+ return compare(path(s));
+}
+
+#ifdef GHC_WITH_STRING_VIEW
+GHC_INLINE int path::compare(basic_string_view<value_type> s) const
+{
+ return compare(path(s));
+}
+#endif
+
+GHC_INLINE int path::compare(const value_type* s) const
+{
+ return compare(path(s));
+}
+
+//-----------------------------------------------------------------------------
+// 30.10.8.4.9, decomposition
+#ifdef GHC_OS_WINDOWS
+GHC_INLINE void path::handle_prefixes()
+{
+#if defined(GHC_WIN_AUTO_PREFIX_LONG_PATH)
+ _prefixLength = 0;
+ if (_path.length() >= 6 && _path[2] == '?' && std::toupper(static_cast<unsigned char>(_path[4])) >= 'A' && std::toupper(static_cast<unsigned char>(_path[4])) <= 'Z' && _path[5] == ':') {
+ if (detail::startsWith(_path, impl_string_type(GHC_PLATFORM_LITERAL("\\\\?\\"))) || detail::startsWith(_path, impl_string_type(GHC_PLATFORM_LITERAL("\\??\\")))) {
+ _prefixLength = 4;
+ }
+ }
+#endif // GHC_WIN_AUTO_PREFIX_LONG_PATH
+}
+#endif
+
+GHC_INLINE path::string_type::size_type path::root_name_length() const noexcept
+{
+#ifdef GHC_OS_WINDOWS
+ if (_path.length() >= _prefixLength + 2 && std::toupper(static_cast<unsigned char>(_path[_prefixLength])) >= 'A' && std::toupper(static_cast<unsigned char>(_path[_prefixLength])) <= 'Z' && _path[_prefixLength + 1] == ':') {
+ return 2;
+ }
+#endif
+ if (_path.length() > _prefixLength + 2 && _path[_prefixLength] == preferred_separator && _path[_prefixLength + 1] == preferred_separator && _path[_prefixLength + 2] != preferred_separator && std::isprint(_path[_prefixLength + 2])) {
+ impl_string_type::size_type pos = _path.find(preferred_separator, _prefixLength + 3);
+ if (pos == impl_string_type::npos) {
+ return _path.length();
+ }
+ else {
+ return pos;
+ }
+ }
+ return 0;
+}
+
+GHC_INLINE path path::root_name() const
+{
+ return path(_path.substr(_prefixLength, root_name_length()), native_format);
+}
+
+GHC_INLINE path path::root_directory() const
+{
+ if (has_root_directory()) {
+ static const path _root_dir(std::string(1, preferred_separator), native_format);
+ return _root_dir;
+ }
+ return path();
+}
+
+GHC_INLINE path path::root_path() const
+{
+ return path(root_name().string() + root_directory().string(), native_format);
+}
+
+GHC_INLINE path path::relative_path() const
+{
+ auto rootPathLen = _prefixLength + root_name_length() + (has_root_directory() ? 1 : 0);
+ return path(_path.substr((std::min)(rootPathLen, _path.length())), generic_format);
+}
+
+GHC_INLINE path path::parent_path() const
+{
+ auto rootPathLen = _prefixLength + root_name_length() + (has_root_directory() ? 1 : 0);
+ if (rootPathLen < _path.length()) {
+ if (empty()) {
+ return path();
+ }
+ else {
+ auto piter = end();
+ auto iter = piter.decrement(_path.end());
+ if (iter > _path.begin() + static_cast<long>(rootPathLen) && *iter != preferred_separator) {
+ --iter;
+ }
+ return path(_path.begin(), iter, native_format);
+ }
+ }
+ else {
+ return *this;
+ }
+}
+
+GHC_INLINE path path::filename() const
+{
+ return !has_relative_path() ? path() : path(*--end());
+}
+
+GHC_INLINE path path::stem() const
+{
+ impl_string_type fn = filename().native();
+ if (fn != "." && fn != "..") {
+ impl_string_type::size_type pos = fn.rfind('.');
+ if (pos != impl_string_type::npos && pos > 0) {
+ return path{fn.substr(0, pos), native_format};
+ }
+ }
+ return path{fn, native_format};
+}
+
+GHC_INLINE path path::extension() const
+{
+ if (has_relative_path()) {
+ auto iter = end();
+ const auto& fn = *--iter;
+ impl_string_type::size_type pos = fn._path.rfind('.');
+ if (pos != std::string::npos && pos > 0) {
+ return path(fn._path.substr(pos), native_format);
+ }
+ }
+ return path();
+}
+
+#ifdef GHC_OS_WINDOWS
+namespace detail {
+GHC_INLINE bool has_executable_extension(const path& p)
+{
+ if (p.has_relative_path()) {
+ auto iter = p.end();
+ const auto& fn = *--iter;
+ auto pos = fn._path.find_last_of('.');
+ if (pos == std::string::npos || pos == 0 || fn._path.length() - pos != 3) {
+ return false;
+ }
+ const path::value_type* ext = fn._path.c_str() + pos + 1;
+ if (detail::equals_simple_insensitive(ext, GHC_PLATFORM_LITERAL("exe")) || detail::equals_simple_insensitive(ext, GHC_PLATFORM_LITERAL("cmd")) || detail::equals_simple_insensitive(ext, GHC_PLATFORM_LITERAL("bat")) || detail::equals_simple_insensitive(ext, GHC_PLATFORM_LITERAL("com"))) {
+ return true;
+ }
+ }
+ return false;
+}
+} // namespace detail
+#endif
+
+//-----------------------------------------------------------------------------
+// 30.10.8.4.10, query
+GHC_INLINE bool path::empty() const noexcept
+{
+ return _path.empty();
+}
+
+GHC_INLINE bool path::has_root_name() const
+{
+ return root_name_length() > 0;
+}
+
+GHC_INLINE bool path::has_root_directory() const
+{
+ auto rootLen = _prefixLength + root_name_length();
+ return (_path.length() > rootLen && _path[rootLen] == preferred_separator);
+}
+
+GHC_INLINE bool path::has_root_path() const
+{
+ return has_root_name() || has_root_directory();
+}
+
+GHC_INLINE bool path::has_relative_path() const
+{
+ auto rootPathLen = _prefixLength + root_name_length() + (has_root_directory() ? 1 : 0);
+ return rootPathLen < _path.length();
+}
+
+GHC_INLINE bool path::has_parent_path() const
+{
+ return !parent_path().empty();
+}
+
+GHC_INLINE bool path::has_filename() const
+{
+ return has_relative_path() && !filename().empty();
+}
+
+GHC_INLINE bool path::has_stem() const
+{
+ return !stem().empty();
+}
+
+GHC_INLINE bool path::has_extension() const
+{
+ return !extension().empty();
+}
+
+GHC_INLINE bool path::is_absolute() const
+{
+#ifdef GHC_OS_WINDOWS
+ return has_root_name() && has_root_directory();
+#else
+ return has_root_directory();
+#endif
+}
+
+GHC_INLINE bool path::is_relative() const
+{
+ return !is_absolute();
+}
+
+//-----------------------------------------------------------------------------
+// 30.10.8.4.11, generation
+GHC_INLINE path path::lexically_normal() const
+{
+ path dest;
+ bool lastDotDot = false;
+ for (string_type s : *this) {
+ if (s == ".") {
+ dest /= "";
+ continue;
+ }
+ else if (s == ".." && !dest.empty()) {
+ auto root = root_path();
+ if (dest == root) {
+ continue;
+ }
+ else if (*(--dest.end()) != "..") {
+ if (dest._path.back() == preferred_separator) {
+ dest._path.pop_back();
+ }
+ dest.remove_filename();
+ continue;
+ }
+ }
+ if (!(s.empty() && lastDotDot)) {
+ dest /= s;
+ }
+ lastDotDot = s == "..";
+ }
+ if (dest.empty()) {
+ dest = ".";
+ }
+ return dest;
+}
+
+GHC_INLINE path path::lexically_relative(const path& base) const
+{
+ if (root_name() != base.root_name() || is_absolute() != base.is_absolute() || (!has_root_directory() && base.has_root_directory())) {
+ return path();
+ }
+ const_iterator a = begin(), b = base.begin();
+ while (a != end() && b != base.end() && *a == *b) {
+ ++a;
+ ++b;
+ }
+ if (a == end() && b == base.end()) {
+ return path(".");
+ }
+ int count = 0;
+ for (const auto& element : input_iterator_range<const_iterator>(b, base.end())) {
+ if (element != "." && element != "" && element != "..") {
+ ++count;
+ }
+ else if (element == "..") {
+ --count;
+ }
+ }
+ if (count < 0) {
+ return path();
+ }
+ path result;
+ for (int i = 0; i < count; ++i) {
+ result /= "..";
+ }
+ for (const auto& element : input_iterator_range<const_iterator>(a, end())) {
+ result /= element;
+ }
+ return result;
+}
+
+GHC_INLINE path path::lexically_proximate(const path& base) const
+{
+ path result = lexically_relative(base);
+ return result.empty() ? *this : result;
+}
+
+//-----------------------------------------------------------------------------
+// 30.10.8.5, iterators
+GHC_INLINE path::iterator::iterator() {}
+
+GHC_INLINE path::iterator::iterator(const path& p, const impl_string_type::const_iterator& pos)
+ : _first(p._path.begin())
+ , _last(p._path.end())
+ , _prefix(_first + static_cast<string_type::difference_type>(p._prefixLength))
+ , _root(p.has_root_directory() ? _first + static_cast<string_type::difference_type>(p._prefixLength + p.root_name_length()) : _last)
+ , _iter(pos)
+{
+ if(pos != _last) {
+ updateCurrent();
+ }
+}
+
+GHC_INLINE path::impl_string_type::const_iterator path::iterator::increment(const path::impl_string_type::const_iterator& pos) const
+{
+ path::impl_string_type::const_iterator i = pos;
+ bool fromStart = i == _first || i == _prefix;
+ if (i != _last) {
+ if (fromStart && i == _first && _prefix > _first) {
+ i = _prefix;
+ }
+ else if (*i++ == preferred_separator) {
+ // we can only sit on a slash if it is a network name or a root
+ if (i != _last && *i == preferred_separator) {
+ if (fromStart && !(i + 1 != _last && *(i + 1) == preferred_separator)) {
+ // leadind double slashes detected, treat this and the
+ // following until a slash as one unit
+ i = std::find(++i, _last, preferred_separator);
+ }
+ else {
+ // skip redundant slashes
+ while (i != _last && *i == preferred_separator) {
+ ++i;
+ }
+ }
+ }
+ }
+ else {
+ if (fromStart && i != _last && *i == ':') {
+ ++i;
+ }
+ else {
+ i = std::find(i, _last, preferred_separator);
+ }
+ }
+ }
+ return i;
+}
+
+GHC_INLINE path::impl_string_type::const_iterator path::iterator::decrement(const path::impl_string_type::const_iterator& pos) const
+{
+ path::impl_string_type::const_iterator i = pos;
+ if (i != _first) {
+ --i;
+ // if this is now the root slash or the trailing slash, we are done,
+ // else check for network name
+ if (i != _root && (pos != _last || *i != preferred_separator)) {
+#ifdef GHC_OS_WINDOWS
+ static const impl_string_type seps = GHC_PLATFORM_LITERAL("\\:");
+ i = std::find_first_of(std::reverse_iterator<path::impl_string_type::const_iterator>(i), std::reverse_iterator<path::impl_string_type::const_iterator>(_first), seps.begin(), seps.end()).base();
+ if (i > _first && *i == ':') {
+ i++;
+ }
+#else
+ i = std::find(std::reverse_iterator<path::impl_string_type::const_iterator>(i), std::reverse_iterator<path::impl_string_type::const_iterator>(_first), preferred_separator).base();
+#endif
+ // Now we have to check if this is a network name
+ if (i - _first == 2 && *_first == preferred_separator && *(_first + 1) == preferred_separator) {
+ i -= 2;
+ }
+ }
+ }
+ return i;
+}
+
+GHC_INLINE void path::iterator::updateCurrent()
+{
+ if ((_iter == _last) || (_iter != _first && _iter != _last && (*_iter == preferred_separator && _iter != _root) && (_iter + 1 == _last))) {
+ _current.clear();
+ }
+ else {
+ _current.assign(_iter, increment(_iter));
+ }
+}
+
+GHC_INLINE path::iterator& path::iterator::operator++()
+{
+ _iter = increment(_iter);
+ while (_iter != _last && // we didn't reach the end
+ _iter != _root && // this is not a root position
+ *_iter == preferred_separator && // we are on a separator
+ (_iter + 1) != _last // the slash is not the last char
+ ) {
+ ++_iter;
+ }
+ updateCurrent();
+ return *this;
+}
+
+GHC_INLINE path::iterator path::iterator::operator++(int)
+{
+ path::iterator i{*this};
+ ++(*this);
+ return i;
+}
+
+GHC_INLINE path::iterator& path::iterator::operator--()
+{
+ _iter = decrement(_iter);
+ updateCurrent();
+ return *this;
+}
+
+GHC_INLINE path::iterator path::iterator::operator--(int)
+{
+ auto i = *this;
+ --(*this);
+ return i;
+}
+
+GHC_INLINE bool path::iterator::operator==(const path::iterator& other) const
+{
+ return _iter == other._iter;
+}
+
+GHC_INLINE bool path::iterator::operator!=(const path::iterator& other) const
+{
+ return _iter != other._iter;
+}
+
+GHC_INLINE path::iterator::reference path::iterator::operator*() const
+{
+ return _current;
+}
+
+GHC_INLINE path::iterator::pointer path::iterator::operator->() const
+{
+ return &_current;
+}
+
+GHC_INLINE path::iterator path::begin() const
+{
+ return iterator(*this, _path.begin());
+}
+
+GHC_INLINE path::iterator path::end() const
+{
+ return iterator(*this, _path.end());
+}
+
+//-----------------------------------------------------------------------------
+// 30.10.8.6, path non-member functions
+GHC_INLINE void swap(path& lhs, path& rhs) noexcept
+{
+ swap(lhs._path, rhs._path);
+}
+
+GHC_INLINE size_t hash_value(const path& p) noexcept
+{
+ return std::hash<std::string>()(p.generic_string());
+}
+
+#ifdef GHC_HAS_THREEWAY_COMP
+GHC_INLINE std::strong_ordering operator<=>(const path& lhs, const path& rhs) noexcept
+{
+ return lhs.compare(rhs) <=> 0;
+}
+#endif
+
+GHC_INLINE bool operator==(const path& lhs, const path& rhs) noexcept
+{
+ return lhs.compare(rhs) == 0;
+}
+
+GHC_INLINE bool operator!=(const path& lhs, const path& rhs) noexcept
+{
+ return !(lhs == rhs);
+}
+
+GHC_INLINE bool operator<(const path& lhs, const path& rhs) noexcept
+{
+ return lhs.compare(rhs) < 0;
+}
+
+GHC_INLINE bool operator<=(const path& lhs, const path& rhs) noexcept
+{
+ return lhs.compare(rhs) <= 0;
+}
+
+GHC_INLINE bool operator>(const path& lhs, const path& rhs) noexcept
+{
+ return lhs.compare(rhs) > 0;
+}
+
+GHC_INLINE bool operator>=(const path& lhs, const path& rhs) noexcept
+{
+ return lhs.compare(rhs) >= 0;
+}
+
+GHC_INLINE path operator/(const path& lhs, const path& rhs)
+{
+ path result(lhs);
+ result /= rhs;
+ return result;
+}
+
+#endif // GHC_EXPAND_IMPL
+
+//-----------------------------------------------------------------------------
+// 30.10.8.6.1 path inserter and extractor
+template <class charT, class traits>
+inline std::basic_ostream<charT, traits>& operator<<(std::basic_ostream<charT, traits>& os, const path& p)
+{
+ os << "\"";
+ auto ps = p.string<charT, traits>();
+ for (auto c : ps) {
+ if (c == '"' || c == '\\') {
+ os << '\\';
+ }
+ os << c;
+ }
+ os << "\"";
+ return os;
+}
+
+template <class charT, class traits>
+inline std::basic_istream<charT, traits>& operator>>(std::basic_istream<charT, traits>& is, path& p)
+{
+ std::basic_string<charT, traits> tmp;
+ charT c;
+ is >> c;
+ if (c == '"') {
+ auto sf = is.flags();
+ is >> std::noskipws;
+ while (is) {
+ auto c2 = is.get();
+ if (is) {
+ if (c2 == '\\') {
+ c2 = is.get();
+ if (is) {
+ tmp += static_cast<charT>(c2);
+ }
+ }
+ else if (c2 == '"') {
+ break;
+ }
+ else {
+ tmp += static_cast<charT>(c2);
+ }
+ }
+ }
+ if ((sf & std::ios_base::skipws) == std::ios_base::skipws) {
+ is >> std::skipws;
+ }
+ p = path(tmp);
+ }
+ else {
+ is >> tmp;
+ p = path(static_cast<charT>(c) + tmp);
+ }
+ return is;
+}
+
+#ifdef GHC_EXPAND_IMPL
+
+//-----------------------------------------------------------------------------
+// 30.10.9 Class filesystem_error
+GHC_INLINE filesystem_error::filesystem_error(const std::string& what_arg, std::error_code ec)
+ : std::system_error(ec, what_arg)
+ , _what_arg(what_arg)
+ , _ec(ec)
+{
+}
+
+GHC_INLINE filesystem_error::filesystem_error(const std::string& what_arg, const path& p1, std::error_code ec)
+ : std::system_error(ec, what_arg)
+ , _what_arg(what_arg)
+ , _ec(ec)
+ , _p1(p1)
+{
+ if (!_p1.empty()) {
+ _what_arg += ": '" + _p1.string() + "'";
+ }
+}
+
+GHC_INLINE filesystem_error::filesystem_error(const std::string& what_arg, const path& p1, const path& p2, std::error_code ec)
+ : std::system_error(ec, what_arg)
+ , _what_arg(what_arg)
+ , _ec(ec)
+ , _p1(p1)
+ , _p2(p2)
+{
+ if (!_p1.empty()) {
+ _what_arg += ": '" + _p1.string() + "'";
+ }
+ if (!_p2.empty()) {
+ _what_arg += ", '" + _p2.string() + "'";
+ }
+}
+
+GHC_INLINE const path& filesystem_error::path1() const noexcept
+{
+ return _p1;
+}
+
+GHC_INLINE const path& filesystem_error::path2() const noexcept
+{
+ return _p2;
+}
+
+GHC_INLINE const char* filesystem_error::what() const noexcept
+{
+ return _what_arg.c_str();
+}
+
+//-----------------------------------------------------------------------------
+// 30.10.15, filesystem operations
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE path absolute(const path& p)
+{
+ std::error_code ec;
+ path result = absolute(p, ec);
+ if (ec) {
+ throw filesystem_error(detail::systemErrorText(ec.value()), p, ec);
+ }
+ return result;
+}
+#endif
+
+GHC_INLINE path absolute(const path& p, std::error_code& ec)
+{
+ ec.clear();
+#ifdef GHC_OS_WINDOWS
+ if (p.empty()) {
+ return absolute(current_path(ec), ec) / "";
+ }
+ ULONG size = ::GetFullPathNameW(GHC_NATIVEWP(p), 0, 0, 0);
+ if (size) {
+ std::vector<wchar_t> buf(size, 0);
+ ULONG s2 = GetFullPathNameW(GHC_NATIVEWP(p), size, buf.data(), nullptr);
+ if (s2 && s2 < size) {
+ path result = path(std::wstring(buf.data(), s2));
+ if (p.filename() == ".") {
+ result /= ".";
+ }
+ return result;
+ }
+ }
+ ec = detail::make_system_error();
+ return path();
+#else
+ path base = current_path(ec);
+ if (!ec) {
+ if (p.empty()) {
+ return base / p;
+ }
+ if (p.has_root_name()) {
+ if (p.has_root_directory()) {
+ return p;
+ }
+ else {
+ return p.root_name() / base.root_directory() / base.relative_path() / p.relative_path();
+ }
+ }
+ else {
+ if (p.has_root_directory()) {
+ return base.root_name() / p;
+ }
+ else {
+ return base / p;
+ }
+ }
+ }
+ ec = detail::make_system_error();
+ return path();
+#endif
+}
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE path canonical(const path& p)
+{
+ std::error_code ec;
+ auto result = canonical(p, ec);
+ if (ec) {
+ throw filesystem_error(detail::systemErrorText(ec.value()), p, ec);
+ }
+ return result;
+}
+#endif
+
+GHC_INLINE path canonical(const path& p, std::error_code& ec)
+{
+ if (p.empty()) {
+ ec = detail::make_error_code(detail::portable_error::not_found);
+ return path();
+ }
+ path work = p.is_absolute() ? p : absolute(p, ec);
+ path result;
+
+ auto fs = status(work, ec);
+ if (ec) {
+ return path();
+ }
+ if (fs.type() == file_type::not_found) {
+ ec = detail::make_error_code(detail::portable_error::not_found);
+ return path();
+ }
+ bool redo;
+ do {
+ auto rootPathLen = work._prefixLength + work.root_name_length() + (work.has_root_directory() ? 1 : 0);
+ redo = false;
+ result.clear();
+ for (auto pe : work) {
+ if (pe.empty() || pe == ".") {
+ continue;
+ }
+ else if (pe == "..") {
+ result = result.parent_path();
+ continue;
+ }
+ else if ((result / pe).string().length() <= rootPathLen) {
+ result /= pe;
+ continue;
+ }
+ auto sls = symlink_status(result / pe, ec);
+ if (ec) {
+ return path();
+ }
+ if (is_symlink(sls)) {
+ redo = true;
+ auto target = read_symlink(result / pe, ec);
+ if (ec) {
+ return path();
+ }
+ if (target.is_absolute()) {
+ result = target;
+ continue;
+ }
+ else {
+ result /= target;
+ continue;
+ }
+ }
+ else {
+ result /= pe;
+ }
+ }
+ work = result;
+ } while (redo);
+ ec.clear();
+ return result;
+}
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE void copy(const path& from, const path& to)
+{
+ copy(from, to, copy_options::none);
+}
+
+GHC_INLINE void copy(const path& from, const path& to, copy_options options)
+{
+ std::error_code ec;
+ copy(from, to, options, ec);
+ if (ec) {
+ throw filesystem_error(detail::systemErrorText(ec.value()), from, to, ec);
+ }
+}
+#endif
+
+GHC_INLINE void copy(const path& from, const path& to, std::error_code& ec) noexcept
+{
+ copy(from, to, copy_options::none, ec);
+}
+
+GHC_INLINE void copy(const path& from, const path& to, copy_options options, std::error_code& ec) noexcept
+{
+ std::error_code tec;
+ file_status fs_from, fs_to;
+ ec.clear();
+ if ((options & (copy_options::skip_symlinks | copy_options::copy_symlinks | copy_options::create_symlinks)) != copy_options::none) {
+ fs_from = symlink_status(from, ec);
+ }
+ else {
+ fs_from = status(from, ec);
+ }
+ if (!exists(fs_from)) {
+ if (!ec) {
+ ec = detail::make_error_code(detail::portable_error::not_found);
+ }
+ return;
+ }
+ if ((options & (copy_options::skip_symlinks | copy_options::create_symlinks)) != copy_options::none) {
+ fs_to = symlink_status(to, tec);
+ }
+ else {
+ fs_to = status(to, tec);
+ }
+ if (is_other(fs_from) || is_other(fs_to) || (is_directory(fs_from) && is_regular_file(fs_to)) || (exists(fs_to) && equivalent(from, to, ec))) {
+ ec = detail::make_error_code(detail::portable_error::invalid_argument);
+ }
+ else if (is_symlink(fs_from)) {
+ if ((options & copy_options::skip_symlinks) == copy_options::none) {
+ if (!exists(fs_to) && (options & copy_options::copy_symlinks) != copy_options::none) {
+ copy_symlink(from, to, ec);
+ }
+ else {
+ ec = detail::make_error_code(detail::portable_error::invalid_argument);
+ }
+ }
+ }
+ else if (is_regular_file(fs_from)) {
+ if ((options & copy_options::directories_only) == copy_options::none) {
+ if ((options & copy_options::create_symlinks) != copy_options::none) {
+ create_symlink(from.is_absolute() ? from : canonical(from, ec), to, ec);
+ }
+#ifndef GHC_OS_WEB
+ else if ((options & copy_options::create_hard_links) != copy_options::none) {
+ create_hard_link(from, to, ec);
+ }
+#endif
+ else if (is_directory(fs_to)) {
+ copy_file(from, to / from.filename(), options, ec);
+ }
+ else {
+ copy_file(from, to, options, ec);
+ }
+ }
+ }
+#ifdef LWG_2682_BEHAVIOUR
+ else if (is_directory(fs_from) && (options & copy_options::create_symlinks) != copy_options::none) {
+ ec = detail::make_error_code(detail::portable_error::is_a_directory);
+ }
+#endif
+ else if (is_directory(fs_from) && (options == copy_options::none || (options & copy_options::recursive) != copy_options::none)) {
+ if (!exists(fs_to)) {
+ create_directory(to, from, ec);
+ if (ec) {
+ return;
+ }
+ }
+ for (auto iter = directory_iterator(from, ec); iter != directory_iterator(); iter.increment(ec)) {
+ if (!ec) {
+ copy(iter->path(), to / iter->path().filename(), options | static_cast<copy_options>(0x8000), ec);
+ }
+ if (ec) {
+ return;
+ }
+ }
+ }
+ return;
+}
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE bool copy_file(const path& from, const path& to)
+{
+ return copy_file(from, to, copy_options::none);
+}
+
+GHC_INLINE bool copy_file(const path& from, const path& to, copy_options option)
+{
+ std::error_code ec;
+ auto result = copy_file(from, to, option, ec);
+ if (ec) {
+ throw filesystem_error(detail::systemErrorText(ec.value()), from, to, ec);
+ }
+ return result;
+}
+#endif
+
+GHC_INLINE bool copy_file(const path& from, const path& to, std::error_code& ec) noexcept
+{
+ return copy_file(from, to, copy_options::none, ec);
+}
+
+GHC_INLINE bool copy_file(const path& from, const path& to, copy_options options, std::error_code& ec) noexcept
+{
+ std::error_code tecf, tect;
+ auto sf = status(from, tecf);
+ auto st = status(to, tect);
+ bool overwrite = false;
+ ec.clear();
+ if (!is_regular_file(sf)) {
+ ec = tecf;
+ return false;
+ }
+ if (exists(st) && (!is_regular_file(st) || equivalent(from, to, ec) || (options & (copy_options::skip_existing | copy_options::overwrite_existing | copy_options::update_existing)) == copy_options::none)) {
+ ec = tect ? tect : detail::make_error_code(detail::portable_error::exists);
+ return false;
+ }
+ if (exists(st)) {
+ if ((options & copy_options::update_existing) == copy_options::update_existing) {
+ auto from_time = last_write_time(from, ec);
+ if (ec) {
+ ec = detail::make_system_error();
+ return false;
+ }
+ auto to_time = last_write_time(to, ec);
+ if (ec) {
+ ec = detail::make_system_error();
+ return false;
+ }
+ if (from_time <= to_time) {
+ return false;
+ }
+ }
+ overwrite = true;
+ }
+#ifdef GHC_OS_WINDOWS
+ if (!::CopyFileW(GHC_NATIVEWP(from), GHC_NATIVEWP(to), !overwrite)) {
+ ec = detail::make_system_error();
+ return false;
+ }
+ return true;
+#else
+ std::vector<char> buffer(16384, '\0');
+ int in = -1, out = -1;
+ if ((in = ::open(from.c_str(), O_RDONLY)) < 0) {
+ ec = detail::make_system_error();
+ return false;
+ }
+ int mode = O_CREAT | O_WRONLY | O_TRUNC;
+ if (!overwrite) {
+ mode |= O_EXCL;
+ }
+ if ((out = ::open(to.c_str(), mode, static_cast<int>(sf.permissions() & perms::all))) < 0) {
+ ec = detail::make_system_error();
+ ::close(in);
+ return false;
+ }
+ ssize_t br, bw;
+ while ((br = ::read(in, buffer.data(), buffer.size())) > 0) {
+ ssize_t offset = 0;
+ do {
+ if ((bw = ::write(out, buffer.data() + offset, static_cast<size_t>(br))) > 0) {
+ br -= bw;
+ offset += bw;
+ }
+ else if (bw < 0) {
+ ec = detail::make_system_error();
+ ::close(in);
+ ::close(out);
+ return false;
+ }
+ } while (br);
+ }
+ ::close(in);
+ ::close(out);
+ return true;
+#endif
+}
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE void copy_symlink(const path& existing_symlink, const path& new_symlink)
+{
+ std::error_code ec;
+ copy_symlink(existing_symlink, new_symlink, ec);
+ if (ec) {
+ throw filesystem_error(detail::systemErrorText(ec.value()), existing_symlink, new_symlink, ec);
+ }
+}
+#endif
+
+GHC_INLINE void copy_symlink(const path& existing_symlink, const path& new_symlink, std::error_code& ec) noexcept
+{
+ ec.clear();
+ auto to = read_symlink(existing_symlink, ec);
+ if (!ec) {
+ if (exists(to, ec) && is_directory(to, ec)) {
+ create_directory_symlink(to, new_symlink, ec);
+ }
+ else {
+ create_symlink(to, new_symlink, ec);
+ }
+ }
+}
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE bool create_directories(const path& p)
+{
+ std::error_code ec;
+ auto result = create_directories(p, ec);
+ if (ec) {
+ throw filesystem_error(detail::systemErrorText(ec.value()), p, ec);
+ }
+ return result;
+}
+#endif
+
+GHC_INLINE bool create_directories(const path& p, std::error_code& ec) noexcept
+{
+ path current;
+ ec.clear();
+ bool didCreate = false;
+ for (path::string_type part : p) {
+ current /= part;
+ if (current != p.root_name() && current != p.root_path()) {
+ std::error_code tec;
+ auto fs = status(current, tec);
+ if (tec && fs.type() != file_type::not_found) {
+ ec = tec;
+ return false;
+ }
+ if (!exists(fs)) {
+ create_directory(current, ec);
+ if (ec) {
+ std::error_code tmp_ec;
+ if (is_directory(current, tmp_ec)) {
+ ec.clear();
+ }
+ else {
+ return false;
+ }
+ }
+ didCreate = true;
+ }
+#ifndef LWG_2935_BEHAVIOUR
+ else if (!is_directory(fs)) {
+ ec = detail::make_error_code(detail::portable_error::exists);
+ return false;
+ }
+#endif
+ }
+ }
+ return didCreate;
+}
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE bool create_directory(const path& p)
+{
+ std::error_code ec;
+ auto result = create_directory(p, path(), ec);
+ if (ec) {
+ throw filesystem_error(detail::systemErrorText(ec.value()), p, ec);
+ }
+ return result;
+}
+#endif
+
+GHC_INLINE bool create_directory(const path& p, std::error_code& ec) noexcept
+{
+ return create_directory(p, path(), ec);
+}
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE bool create_directory(const path& p, const path& attributes)
+{
+ std::error_code ec;
+ auto result = create_directory(p, attributes, ec);
+ if (ec) {
+ throw filesystem_error(detail::systemErrorText(ec.value()), p, ec);
+ }
+ return result;
+}
+#endif
+
+GHC_INLINE bool create_directory(const path& p, const path& attributes, std::error_code& ec) noexcept
+{
+ std::error_code tec;
+ ec.clear();
+ auto fs = status(p, tec);
+#ifdef LWG_2935_BEHAVIOUR
+ if (status_known(fs) && exists(fs)) {
+ return false;
+ }
+#else
+ if (status_known(fs) && exists(fs) && is_directory(fs)) {
+ return false;
+ }
+#endif
+#ifdef GHC_OS_WINDOWS
+ if (!attributes.empty()) {
+ if (!::CreateDirectoryExW(GHC_NATIVEWP(attributes), GHC_NATIVEWP(p), NULL)) {
+ ec = detail::make_system_error();
+ return false;
+ }
+ }
+ else if (!::CreateDirectoryW(GHC_NATIVEWP(p), NULL)) {
+ ec = detail::make_system_error();
+ return false;
+ }
+#else
+ ::mode_t attribs = static_cast<mode_t>(perms::all);
+ if (!attributes.empty()) {
+ struct ::stat fileStat;
+ if (::stat(attributes.c_str(), &fileStat) != 0) {
+ ec = detail::make_system_error();
+ return false;
+ }
+ attribs = fileStat.st_mode;
+ }
+ if (::mkdir(p.c_str(), attribs) != 0) {
+ ec = detail::make_system_error();
+ return false;
+ }
+#endif
+ return true;
+}
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE void create_directory_symlink(const path& to, const path& new_symlink)
+{
+ std::error_code ec;
+ create_directory_symlink(to, new_symlink, ec);
+ if (ec) {
+ throw filesystem_error(detail::systemErrorText(ec.value()), to, new_symlink, ec);
+ }
+}
+#endif
+
+GHC_INLINE void create_directory_symlink(const path& to, const path& new_symlink, std::error_code& ec) noexcept
+{
+ detail::create_symlink(to, new_symlink, true, ec);
+}
+
+#ifndef GHC_OS_WEB
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE void create_hard_link(const path& to, const path& new_hard_link)
+{
+ std::error_code ec;
+ create_hard_link(to, new_hard_link, ec);
+ if (ec) {
+ throw filesystem_error(detail::systemErrorText(ec.value()), to, new_hard_link, ec);
+ }
+}
+#endif
+
+GHC_INLINE void create_hard_link(const path& to, const path& new_hard_link, std::error_code& ec) noexcept
+{
+ detail::create_hardlink(to, new_hard_link, ec);
+}
+#endif
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE void create_symlink(const path& to, const path& new_symlink)
+{
+ std::error_code ec;
+ create_symlink(to, new_symlink, ec);
+ if (ec) {
+ throw filesystem_error(detail::systemErrorText(ec.value()), to, new_symlink, ec);
+ }
+}
+#endif
+
+GHC_INLINE void create_symlink(const path& to, const path& new_symlink, std::error_code& ec) noexcept
+{
+ detail::create_symlink(to, new_symlink, false, ec);
+}
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE path current_path()
+{
+ std::error_code ec;
+ auto result = current_path(ec);
+ if (ec) {
+ throw filesystem_error(detail::systemErrorText(ec.value()), ec);
+ }
+ return result;
+}
+#endif
+
+GHC_INLINE path current_path(std::error_code& ec)
+{
+ ec.clear();
+#ifdef GHC_OS_WINDOWS
+ DWORD pathlen = ::GetCurrentDirectoryW(0, 0);
+ std::unique_ptr<wchar_t[]> buffer(new wchar_t[size_t(pathlen) + 1]);
+ if (::GetCurrentDirectoryW(pathlen, buffer.get()) == 0) {
+ ec = detail::make_system_error();
+ return path();
+ }
+ return path(std::wstring(buffer.get()), path::native_format);
+#else
+ size_t pathlen = static_cast<size_t>(std::max(int(::pathconf(".", _PC_PATH_MAX)), int(PATH_MAX)));
+ std::unique_ptr<char[]> buffer(new char[pathlen + 1]);
+ if (::getcwd(buffer.get(), pathlen) == nullptr) {
+ ec = detail::make_system_error();
+ return path();
+ }
+ return path(buffer.get());
+#endif
+}
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE void current_path(const path& p)
+{
+ std::error_code ec;
+ current_path(p, ec);
+ if (ec) {
+ throw filesystem_error(detail::systemErrorText(ec.value()), p, ec);
+ }
+}
+#endif
+
+GHC_INLINE void current_path(const path& p, std::error_code& ec) noexcept
+{
+ ec.clear();
+#ifdef GHC_OS_WINDOWS
+ if (!::SetCurrentDirectoryW(GHC_NATIVEWP(p))) {
+ ec = detail::make_system_error();
+ }
+#else
+ if (::chdir(p.string().c_str()) == -1) {
+ ec = detail::make_system_error();
+ }
+#endif
+}
+
+GHC_INLINE bool exists(file_status s) noexcept
+{
+ return status_known(s) && s.type() != file_type::not_found;
+}
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE bool exists(const path& p)
+{
+ return exists(status(p));
+}
+#endif
+
+GHC_INLINE bool exists(const path& p, std::error_code& ec) noexcept
+{
+ file_status s = status(p, ec);
+ if (status_known(s)) {
+ ec.clear();
+ }
+ return exists(s);
+}
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE bool equivalent(const path& p1, const path& p2)
+{
+ std::error_code ec;
+ bool result = equivalent(p1, p2, ec);
+ if (ec) {
+ throw filesystem_error(detail::systemErrorText(ec.value()), p1, p2, ec);
+ }
+ return result;
+}
+#endif
+
+GHC_INLINE bool equivalent(const path& p1, const path& p2, std::error_code& ec) noexcept
+{
+ ec.clear();
+#ifdef GHC_OS_WINDOWS
+ std::shared_ptr<void> file1(::CreateFileW(GHC_NATIVEWP(p1), 0, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, 0, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0), CloseHandle);
+ auto e1 = ::GetLastError();
+ std::shared_ptr<void> file2(::CreateFileW(GHC_NATIVEWP(p2), 0, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, 0, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0), CloseHandle);
+ if (file1.get() == INVALID_HANDLE_VALUE || file2.get() == INVALID_HANDLE_VALUE) {
+#ifdef LWG_2937_BEHAVIOUR
+ ec = detail::make_system_error(e1 ? e1 : ::GetLastError());
+#else
+ if (file1 == file2) {
+ ec = detail::make_system_error(e1 ? e1 : ::GetLastError());
+ }
+#endif
+ return false;
+ }
+ BY_HANDLE_FILE_INFORMATION inf1, inf2;
+ if (!::GetFileInformationByHandle(file1.get(), &inf1)) {
+ ec = detail::make_system_error();
+ return false;
+ }
+ if (!::GetFileInformationByHandle(file2.get(), &inf2)) {
+ ec = detail::make_system_error();
+ return false;
+ }
+ return inf1.ftLastWriteTime.dwLowDateTime == inf2.ftLastWriteTime.dwLowDateTime && inf1.ftLastWriteTime.dwHighDateTime == inf2.ftLastWriteTime.dwHighDateTime && inf1.nFileIndexHigh == inf2.nFileIndexHigh && inf1.nFileIndexLow == inf2.nFileIndexLow &&
+ inf1.nFileSizeHigh == inf2.nFileSizeHigh && inf1.nFileSizeLow == inf2.nFileSizeLow && inf1.dwVolumeSerialNumber == inf2.dwVolumeSerialNumber;
+#else
+ struct ::stat s1, s2;
+ auto rc1 = ::stat(p1.c_str(), &s1);
+ auto e1 = errno;
+ auto rc2 = ::stat(p2.c_str(), &s2);
+ if (rc1 || rc2) {
+#ifdef LWG_2937_BEHAVIOUR
+ ec = detail::make_system_error(e1 ? e1 : errno);
+#else
+ if (rc1 && rc2) {
+ ec = detail::make_system_error(e1 ? e1 : errno);
+ }
+#endif
+ return false;
+ }
+ return s1.st_dev == s2.st_dev && s1.st_ino == s2.st_ino && s1.st_size == s2.st_size && s1.st_mtime == s2.st_mtime;
+#endif
+}
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE uintmax_t file_size(const path& p)
+{
+ std::error_code ec;
+ auto result = file_size(p, ec);
+ if (ec) {
+ throw filesystem_error(detail::systemErrorText(ec.value()), p, ec);
+ }
+ return result;
+}
+#endif
+
+GHC_INLINE uintmax_t file_size(const path& p, std::error_code& ec) noexcept
+{
+ ec.clear();
+#ifdef GHC_OS_WINDOWS
+ WIN32_FILE_ATTRIBUTE_DATA attr;
+ if (!GetFileAttributesExW(GHC_NATIVEWP(p), GetFileExInfoStandard, &attr)) {
+ ec = detail::make_system_error();
+ return static_cast<uintmax_t>(-1);
+ }
+ return static_cast<uintmax_t>(attr.nFileSizeHigh) << (sizeof(attr.nFileSizeHigh) * 8) | attr.nFileSizeLow;
+#else
+ struct ::stat fileStat;
+ if (::stat(p.c_str(), &fileStat) == -1) {
+ ec = detail::make_system_error();
+ return static_cast<uintmax_t>(-1);
+ }
+ return static_cast<uintmax_t>(fileStat.st_size);
+#endif
+}
+
+#ifndef GHC_OS_WEB
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE uintmax_t hard_link_count(const path& p)
+{
+ std::error_code ec;
+ auto result = hard_link_count(p, ec);
+ if (ec) {
+ throw filesystem_error(detail::systemErrorText(ec.value()), p, ec);
+ }
+ return result;
+}
+#endif
+
+GHC_INLINE uintmax_t hard_link_count(const path& p, std::error_code& ec) noexcept
+{
+ ec.clear();
+#ifdef GHC_OS_WINDOWS
+ uintmax_t result = static_cast<uintmax_t>(-1);
+ std::shared_ptr<void> file(::CreateFileW(GHC_NATIVEWP(p), 0, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, 0, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0), CloseHandle);
+ BY_HANDLE_FILE_INFORMATION inf;
+ if (file.get() == INVALID_HANDLE_VALUE) {
+ ec = detail::make_system_error();
+ }
+ else {
+ if (!::GetFileInformationByHandle(file.get(), &inf)) {
+ ec = detail::make_system_error();
+ }
+ else {
+ result = inf.nNumberOfLinks;
+ }
+ }
+ return result;
+#else
+ uintmax_t result = 0;
+ file_status fs = detail::status_ex(p, ec, nullptr, nullptr, &result, nullptr);
+ if (fs.type() == file_type::not_found) {
+ ec = detail::make_error_code(detail::portable_error::not_found);
+ }
+ return ec ? static_cast<uintmax_t>(-1) : result;
+#endif
+}
+#endif
+
+GHC_INLINE bool is_block_file(file_status s) noexcept
+{
+ return s.type() == file_type::block;
+}
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE bool is_block_file(const path& p)
+{
+ return is_block_file(status(p));
+}
+#endif
+
+GHC_INLINE bool is_block_file(const path& p, std::error_code& ec) noexcept
+{
+ return is_block_file(status(p, ec));
+}
+
+GHC_INLINE bool is_character_file(file_status s) noexcept
+{
+ return s.type() == file_type::character;
+}
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE bool is_character_file(const path& p)
+{
+ return is_character_file(status(p));
+}
+#endif
+
+GHC_INLINE bool is_character_file(const path& p, std::error_code& ec) noexcept
+{
+ return is_character_file(status(p, ec));
+}
+
+GHC_INLINE bool is_directory(file_status s) noexcept
+{
+ return s.type() == file_type::directory;
+}
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE bool is_directory(const path& p)
+{
+ return is_directory(status(p));
+}
+#endif
+
+GHC_INLINE bool is_directory(const path& p, std::error_code& ec) noexcept
+{
+ return is_directory(status(p, ec));
+}
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE bool is_empty(const path& p)
+{
+ if (is_directory(p)) {
+ return directory_iterator(p) == directory_iterator();
+ }
+ else {
+ return file_size(p) == 0;
+ }
+}
+#endif
+
+GHC_INLINE bool is_empty(const path& p, std::error_code& ec) noexcept
+{
+ auto fs = status(p, ec);
+ if (ec) {
+ return false;
+ }
+ if (is_directory(fs)) {
+ directory_iterator iter(p, ec);
+ if (ec) {
+ return false;
+ }
+ return iter == directory_iterator();
+ }
+ else {
+ auto sz = file_size(p, ec);
+ if (ec) {
+ return false;
+ }
+ return sz == 0;
+ }
+}
+
+GHC_INLINE bool is_fifo(file_status s) noexcept
+{
+ return s.type() == file_type::fifo;
+}
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE bool is_fifo(const path& p)
+{
+ return is_fifo(status(p));
+}
+#endif
+
+GHC_INLINE bool is_fifo(const path& p, std::error_code& ec) noexcept
+{
+ return is_fifo(status(p, ec));
+}
+
+GHC_INLINE bool is_other(file_status s) noexcept
+{
+ return exists(s) && !is_regular_file(s) && !is_directory(s) && !is_symlink(s);
+}
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE bool is_other(const path& p)
+{
+ return is_other(status(p));
+}
+#endif
+
+GHC_INLINE bool is_other(const path& p, std::error_code& ec) noexcept
+{
+ return is_other(status(p, ec));
+}
+
+GHC_INLINE bool is_regular_file(file_status s) noexcept
+{
+ return s.type() == file_type::regular;
+}
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE bool is_regular_file(const path& p)
+{
+ return is_regular_file(status(p));
+}
+#endif
+
+GHC_INLINE bool is_regular_file(const path& p, std::error_code& ec) noexcept
+{
+ return is_regular_file(status(p, ec));
+}
+
+GHC_INLINE bool is_socket(file_status s) noexcept
+{
+ return s.type() == file_type::socket;
+}
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE bool is_socket(const path& p)
+{
+ return is_socket(status(p));
+}
+#endif
+
+GHC_INLINE bool is_socket(const path& p, std::error_code& ec) noexcept
+{
+ return is_socket(status(p, ec));
+}
+
+GHC_INLINE bool is_symlink(file_status s) noexcept
+{
+ return s.type() == file_type::symlink;
+}
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE bool is_symlink(const path& p)
+{
+ return is_symlink(symlink_status(p));
+}
+#endif
+
+GHC_INLINE bool is_symlink(const path& p, std::error_code& ec) noexcept
+{
+ return is_symlink(symlink_status(p, ec));
+}
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE file_time_type last_write_time(const path& p)
+{
+ std::error_code ec;
+ auto result = last_write_time(p, ec);
+ if (ec) {
+ throw filesystem_error(detail::systemErrorText(ec.value()), p, ec);
+ }
+ return result;
+}
+#endif
+
+GHC_INLINE file_time_type last_write_time(const path& p, std::error_code& ec) noexcept
+{
+ time_t result = 0;
+ ec.clear();
+ file_status fs = detail::status_ex(p, ec, nullptr, nullptr, nullptr, &result);
+ return ec ? (file_time_type::min)() : std::chrono::system_clock::from_time_t(result);
+}
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE void last_write_time(const path& p, file_time_type new_time)
+{
+ std::error_code ec;
+ last_write_time(p, new_time, ec);
+ if (ec) {
+ throw filesystem_error(detail::systemErrorText(ec.value()), p, ec);
+ }
+}
+#endif
+
+GHC_INLINE void last_write_time(const path& p, file_time_type new_time, std::error_code& ec) noexcept
+{
+ ec.clear();
+ auto d = new_time.time_since_epoch();
+#ifdef GHC_OS_WINDOWS
+ std::shared_ptr<void> file(::CreateFileW(GHC_NATIVEWP(p), FILE_WRITE_ATTRIBUTES, FILE_SHARE_DELETE | FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL), ::CloseHandle);
+ FILETIME ft;
+ auto tt = std::chrono::duration_cast<std::chrono::microseconds>(d).count() * 10 + 116444736000000000;
+ ft.dwLowDateTime = static_cast<DWORD>(tt);
+ ft.dwHighDateTime = static_cast<DWORD>(tt >> 32);
+ if (!::SetFileTime(file.get(), 0, 0, &ft)) {
+ ec = detail::make_system_error();
+ }
+#elif defined(GHC_OS_MACOS)
+#ifdef __MAC_OS_X_VERSION_MIN_REQUIRED
+#if __MAC_OS_X_VERSION_MIN_REQUIRED < 101300
+ struct ::stat fs;
+ if (::stat(p.c_str(), &fs) == 0) {
+ struct ::timeval tv[2];
+ tv[0].tv_sec = fs.st_atimespec.tv_sec;
+ tv[0].tv_usec = static_cast<int>(fs.st_atimespec.tv_nsec / 1000);
+ tv[1].tv_sec = std::chrono::duration_cast<std::chrono::seconds>(d).count();
+ tv[1].tv_usec = static_cast<int>(std::chrono::duration_cast<std::chrono::microseconds>(d).count() % 1000000);
+ if (::utimes(p.c_str(), tv) == 0) {
+ return;
+ }
+ }
+ ec = detail::make_system_error();
+ return;
+#else
+ struct ::timespec times[2];
+ times[0].tv_sec = 0;
+ times[0].tv_nsec = UTIME_OMIT;
+ times[1].tv_sec = std::chrono::duration_cast<std::chrono::seconds>(d).count();
+ times[1].tv_nsec = 0; // std::chrono::duration_cast<std::chrono::nanoseconds>(d).count() % 1000000000;
+ if (::utimensat(AT_FDCWD, p.c_str(), times, AT_SYMLINK_NOFOLLOW) != 0) {
+ ec = detail::make_system_error();
+ }
+ return;
+#endif
+#endif
+#else
+#ifndef UTIME_OMIT
+#define UTIME_OMIT ((1l << 30) - 2l)
+#endif
+ struct ::timespec times[2];
+ times[0].tv_sec = 0;
+ times[0].tv_nsec = UTIME_OMIT;
+ times[1].tv_sec = static_cast<decltype(times[1].tv_sec)>(std::chrono::duration_cast<std::chrono::seconds>(d).count());
+ times[1].tv_nsec = static_cast<decltype(times[1].tv_nsec)>(std::chrono::duration_cast<std::chrono::nanoseconds>(d).count() % 1000000000);
+#if defined(__ANDROID_API__) && __ANDROID_API__ < 12
+ if (syscall(__NR_utimensat, AT_FDCWD, p.c_str(), times, AT_SYMLINK_NOFOLLOW) != 0) {
+#else
+ if (::utimensat(AT_FDCWD, p.c_str(), times, AT_SYMLINK_NOFOLLOW) != 0) {
+#endif
+ ec = detail::make_system_error();
+ }
+ return;
+#endif
+}
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE void permissions(const path& p, perms prms, perm_options opts)
+{
+ std::error_code ec;
+ permissions(p, prms, opts, ec);
+ if (ec) {
+ throw filesystem_error(detail::systemErrorText(ec.value()), p, ec);
+ }
+}
+#endif
+
+GHC_INLINE void permissions(const path& p, perms prms, std::error_code& ec) noexcept
+{
+ permissions(p, prms, perm_options::replace, ec);
+}
+
+GHC_INLINE void permissions(const path& p, perms prms, perm_options opts, std::error_code& ec) noexcept
+{
+ if (static_cast<int>(opts & (perm_options::replace | perm_options::add | perm_options::remove)) == 0) {
+ ec = detail::make_error_code(detail::portable_error::invalid_argument);
+ return;
+ }
+ auto fs = symlink_status(p, ec);
+ if ((opts & perm_options::replace) != perm_options::replace) {
+ if ((opts & perm_options::add) == perm_options::add) {
+ prms = fs.permissions() | prms;
+ }
+ else {
+ prms = fs.permissions() & ~prms;
+ }
+ }
+#ifdef GHC_OS_WINDOWS
+#ifdef __GNUC__
+ auto oldAttr = GetFileAttributesW(GHC_NATIVEWP(p));
+ if (oldAttr != INVALID_FILE_ATTRIBUTES) {
+ DWORD newAttr = ((prms & perms::owner_write) == perms::owner_write) ? oldAttr & ~(static_cast<DWORD>(FILE_ATTRIBUTE_READONLY)) : oldAttr | FILE_ATTRIBUTE_READONLY;
+ if (oldAttr == newAttr || SetFileAttributesW(GHC_NATIVEWP(p), newAttr)) {
+ return;
+ }
+ }
+ ec = detail::make_system_error();
+#else
+ int mode = 0;
+ if ((prms & perms::owner_read) == perms::owner_read) {
+ mode |= _S_IREAD;
+ }
+ if ((prms & perms::owner_write) == perms::owner_write) {
+ mode |= _S_IWRITE;
+ }
+ if (::_wchmod(p.wstring().c_str(), mode) != 0) {
+ ec = detail::make_system_error();
+ }
+#endif
+#else
+ if ((opts & perm_options::nofollow) != perm_options::nofollow) {
+ if (::chmod(p.c_str(), static_cast<mode_t>(prms)) != 0) {
+ ec = detail::make_system_error();
+ }
+ }
+#endif
+}
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE path proximate(const path& p, std::error_code& ec)
+{
+ auto cp = current_path(ec);
+ if (!ec) {
+ return proximate(p, cp, ec);
+ }
+ return path();
+}
+#endif
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE path proximate(const path& p, const path& base)
+{
+ return weakly_canonical(p).lexically_proximate(weakly_canonical(base));
+}
+#endif
+
+GHC_INLINE path proximate(const path& p, const path& base, std::error_code& ec)
+{
+ return weakly_canonical(p, ec).lexically_proximate(weakly_canonical(base, ec));
+}
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE path read_symlink(const path& p)
+{
+ std::error_code ec;
+ auto result = read_symlink(p, ec);
+ if (ec) {
+ throw filesystem_error(detail::systemErrorText(ec.value()), p, ec);
+ }
+ return result;
+}
+#endif
+
+GHC_INLINE path read_symlink(const path& p, std::error_code& ec)
+{
+ file_status fs = symlink_status(p, ec);
+ if (fs.type() != file_type::symlink) {
+ ec = detail::make_error_code(detail::portable_error::invalid_argument);
+ return path();
+ }
+ auto result = detail::resolveSymlink(p, ec);
+ return ec ? path() : result;
+}
+
+GHC_INLINE path relative(const path& p, std::error_code& ec)
+{
+ return relative(p, current_path(ec), ec);
+}
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE path relative(const path& p, const path& base)
+{
+ return weakly_canonical(p).lexically_relative(weakly_canonical(base));
+}
+#endif
+
+GHC_INLINE path relative(const path& p, const path& base, std::error_code& ec)
+{
+ return weakly_canonical(p, ec).lexically_relative(weakly_canonical(base, ec));
+}
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE bool remove(const path& p)
+{
+ std::error_code ec;
+ auto result = remove(p, ec);
+ if (ec) {
+ throw filesystem_error(detail::systemErrorText(ec.value()), p, ec);
+ }
+ return result;
+}
+#endif
+
+GHC_INLINE bool remove(const path& p, std::error_code& ec) noexcept
+{
+ ec.clear();
+#ifdef GHC_OS_WINDOWS
+#ifdef GHC_USE_WCHAR_T
+ auto cstr = p.c_str();
+#else
+ std::wstring np = detail::fromUtf8<std::wstring>(p.u8string());
+ auto cstr = np.c_str();
+#endif
+ DWORD attr = GetFileAttributesW(cstr);
+ if (attr == INVALID_FILE_ATTRIBUTES) {
+ auto error = ::GetLastError();
+ if (error == ERROR_FILE_NOT_FOUND || error == ERROR_PATH_NOT_FOUND) {
+ return false;
+ }
+ ec = detail::make_system_error(error);
+ }
+ if (!ec) {
+ if (attr & FILE_ATTRIBUTE_DIRECTORY) {
+ if (!RemoveDirectoryW(cstr)) {
+ ec = detail::make_system_error();
+ }
+ }
+ else {
+ if (!DeleteFileW(cstr)) {
+ ec = detail::make_system_error();
+ }
+ }
+ }
+#else
+ if (::remove(p.c_str()) == -1) {
+ auto error = errno;
+ if (error == ENOENT) {
+ return false;
+ }
+ ec = detail::make_system_error();
+ }
+#endif
+ return ec ? false : true;
+}
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE uintmax_t remove_all(const path& p)
+{
+ std::error_code ec;
+ auto result = remove_all(p, ec);
+ if (ec) {
+ throw filesystem_error(detail::systemErrorText(ec.value()), p, ec);
+ }
+ return result;
+}
+#endif
+
+GHC_INLINE uintmax_t remove_all(const path& p, std::error_code& ec) noexcept
+{
+ ec.clear();
+ uintmax_t count = 0;
+ if (p == "/") {
+ ec = detail::make_error_code(detail::portable_error::not_supported);
+ return static_cast<uintmax_t>(-1);
+ }
+ std::error_code tec;
+ auto fs = status(p, tec);
+ if (exists(fs) && is_directory(fs)) {
+ for (auto iter = directory_iterator(p, ec); iter != directory_iterator(); iter.increment(ec)) {
+ if (ec && !detail::is_not_found_error(ec)) {
+ break;
+ }
+ bool is_symlink_result = iter->is_symlink(ec);
+ if (ec)
+ return static_cast<uintmax_t>(-1);
+ if (!is_symlink_result && iter->is_directory(ec)) {
+ count += remove_all(iter->path(), ec);
+ if (ec) {
+ return static_cast<uintmax_t>(-1);
+ }
+ }
+ else {
+ if (!ec) {
+ remove(iter->path(), ec);
+ }
+ if (ec) {
+ return static_cast<uintmax_t>(-1);
+ }
+ ++count;
+ }
+ }
+ }
+ if (!ec) {
+ if (remove(p, ec)) {
+ ++count;
+ }
+ }
+ if (ec) {
+ return static_cast<uintmax_t>(-1);
+ }
+ return count;
+}
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE void rename(const path& from, const path& to)
+{
+ std::error_code ec;
+ rename(from, to, ec);
+ if (ec) {
+ throw filesystem_error(detail::systemErrorText(ec.value()), from, to, ec);
+ }
+}
+#endif
+
+GHC_INLINE void rename(const path& from, const path& to, std::error_code& ec) noexcept
+{
+ ec.clear();
+#ifdef GHC_OS_WINDOWS
+ if (from != to) {
+ if (!MoveFileExW(GHC_NATIVEWP(from), GHC_NATIVEWP(to), (DWORD)MOVEFILE_REPLACE_EXISTING)) {
+ ec = detail::make_system_error();
+ }
+ }
+#else
+ if (from != to) {
+ if (::rename(from.c_str(), to.c_str()) != 0) {
+ ec = detail::make_system_error();
+ }
+ }
+#endif
+}
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE void resize_file(const path& p, uintmax_t size)
+{
+ std::error_code ec;
+ resize_file(p, size, ec);
+ if (ec) {
+ throw filesystem_error(detail::systemErrorText(ec.value()), p, ec);
+ }
+}
+#endif
+
+GHC_INLINE void resize_file(const path& p, uintmax_t size, std::error_code& ec) noexcept
+{
+ ec.clear();
+#ifdef GHC_OS_WINDOWS
+ LARGE_INTEGER lisize;
+ lisize.QuadPart = static_cast<LONGLONG>(size);
+ if (lisize.QuadPart < 0) {
+#ifdef ERROR_FILE_TOO_LARGE
+ ec = detail::make_system_error(ERROR_FILE_TOO_LARGE);
+#else
+ ec = detail::make_system_error(223);
+#endif
+ return;
+ }
+ std::shared_ptr<void> file(CreateFileW(GHC_NATIVEWP(p), GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL), CloseHandle);
+ if (file.get() == INVALID_HANDLE_VALUE) {
+ ec = detail::make_system_error();
+ }
+ else if (SetFilePointerEx(file.get(), lisize, NULL, FILE_BEGIN) == 0 || SetEndOfFile(file.get()) == 0) {
+ ec = detail::make_system_error();
+ }
+#else
+ if (::truncate(p.c_str(), static_cast<off_t>(size)) != 0) {
+ ec = detail::make_system_error();
+ }
+#endif
+}
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE space_info space(const path& p)
+{
+ std::error_code ec;
+ auto result = space(p, ec);
+ if (ec) {
+ throw filesystem_error(detail::systemErrorText(ec.value()), p, ec);
+ }
+ return result;
+}
+#endif
+
+GHC_INLINE space_info space(const path& p, std::error_code& ec) noexcept
+{
+ ec.clear();
+#ifdef GHC_OS_WINDOWS
+ ULARGE_INTEGER freeBytesAvailableToCaller = {{ 0, 0 }};
+ ULARGE_INTEGER totalNumberOfBytes = {{ 0, 0 }};
+ ULARGE_INTEGER totalNumberOfFreeBytes = {{ 0, 0 }};
+ if (!GetDiskFreeSpaceExW(GHC_NATIVEWP(p), &freeBytesAvailableToCaller, &totalNumberOfBytes, &totalNumberOfFreeBytes)) {
+ ec = detail::make_system_error();
+ return {static_cast<uintmax_t>(-1), static_cast<uintmax_t>(-1), static_cast<uintmax_t>(-1)};
+ }
+ return {static_cast<uintmax_t>(totalNumberOfBytes.QuadPart), static_cast<uintmax_t>(totalNumberOfFreeBytes.QuadPart), static_cast<uintmax_t>(freeBytesAvailableToCaller.QuadPart)};
+#else
+ struct ::statvfs sfs;
+ if (::statvfs(p.c_str(), &sfs) != 0) {
+ ec = detail::make_system_error();
+ return {static_cast<uintmax_t>(-1), static_cast<uintmax_t>(-1), static_cast<uintmax_t>(-1)};
+ }
+ return {static_cast<uintmax_t>(sfs.f_blocks * sfs.f_frsize), static_cast<uintmax_t>(sfs.f_bfree * sfs.f_frsize), static_cast<uintmax_t>(sfs.f_bavail * sfs.f_frsize)};
+#endif
+}
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE file_status status(const path& p)
+{
+ std::error_code ec;
+ auto result = status(p, ec);
+ if (result.type() == file_type::none) {
+ throw filesystem_error(detail::systemErrorText(ec.value()), p, ec);
+ }
+ return result;
+}
+#endif
+
+GHC_INLINE file_status status(const path& p, std::error_code& ec) noexcept
+{
+ return detail::status_ex(p, ec);
+}
+
+GHC_INLINE bool status_known(file_status s) noexcept
+{
+ return s.type() != file_type::none;
+}
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE file_status symlink_status(const path& p)
+{
+ std::error_code ec;
+ auto result = symlink_status(p, ec);
+ if (result.type() == file_type::none) {
+ throw filesystem_error(detail::systemErrorText(ec.value()), ec);
+ }
+ return result;
+}
+#endif
+
+GHC_INLINE file_status symlink_status(const path& p, std::error_code& ec) noexcept
+{
+ return detail::symlink_status_ex(p, ec);
+}
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE path temp_directory_path()
+{
+ std::error_code ec;
+ path result = temp_directory_path(ec);
+ if (ec) {
+ throw filesystem_error(detail::systemErrorText(ec.value()), ec);
+ }
+ return result;
+}
+#endif
+
+GHC_INLINE path temp_directory_path(std::error_code& ec) noexcept
+{
+ ec.clear();
+#ifdef GHC_OS_WINDOWS
+ wchar_t buffer[512];
+ auto rc = GetTempPathW(511, buffer);
+ if (!rc || rc > 511) {
+ ec = detail::make_system_error();
+ return path();
+ }
+ return path(std::wstring(buffer));
+#else
+ static const char* temp_vars[] = {"TMPDIR", "TMP", "TEMP", "TEMPDIR", nullptr};
+ const char* temp_path = nullptr;
+ for (auto temp_name = temp_vars; *temp_name != nullptr; ++temp_name) {
+ temp_path = std::getenv(*temp_name);
+ if (temp_path) {
+ return path(temp_path);
+ }
+ }
+ return path("/tmp");
+#endif
+}
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE path weakly_canonical(const path& p)
+{
+ std::error_code ec;
+ auto result = weakly_canonical(p, ec);
+ if (ec) {
+ throw filesystem_error(detail::systemErrorText(ec.value()), p, ec);
+ }
+ return result;
+}
+#endif
+
+GHC_INLINE path weakly_canonical(const path& p, std::error_code& ec) noexcept
+{
+ path result;
+ ec.clear();
+ bool scan = true;
+ for (auto pe : p) {
+ if (scan) {
+ std::error_code tec;
+ if (exists(result / pe, tec)) {
+ result /= pe;
+ }
+ else {
+ if (ec) {
+ return path();
+ }
+ scan = false;
+ if (!result.empty()) {
+ result = canonical(result, ec) / pe;
+ if (ec) {
+ break;
+ }
+ }
+ else {
+ result /= pe;
+ }
+ }
+ }
+ else {
+ result /= pe;
+ }
+ }
+ if (scan) {
+ if (!result.empty()) {
+ result = canonical(result, ec);
+ }
+ }
+ return ec ? path() : result.lexically_normal();
+}
+
+//-----------------------------------------------------------------------------
+// 30.10.11 class file_status
+// 30.10.11.1 constructors and destructor
+GHC_INLINE file_status::file_status() noexcept
+ : file_status(file_type::none)
+{
+}
+
+GHC_INLINE file_status::file_status(file_type ft, perms prms) noexcept
+ : _type(ft)
+ , _perms(prms)
+{
+}
+
+GHC_INLINE file_status::file_status(const file_status& other) noexcept
+ : _type(other._type)
+ , _perms(other._perms)
+{
+}
+
+GHC_INLINE file_status::file_status(file_status&& other) noexcept
+ : _type(other._type)
+ , _perms(other._perms)
+{
+}
+
+GHC_INLINE file_status::~file_status() {}
+
+// assignments:
+GHC_INLINE file_status& file_status::operator=(const file_status& rhs) noexcept
+{
+ _type = rhs._type;
+ _perms = rhs._perms;
+ return *this;
+}
+
+GHC_INLINE file_status& file_status::operator=(file_status&& rhs) noexcept
+{
+ _type = rhs._type;
+ _perms = rhs._perms;
+ return *this;
+}
+
+// 30.10.11.3 modifiers
+GHC_INLINE void file_status::type(file_type ft) noexcept
+{
+ _type = ft;
+}
+
+GHC_INLINE void file_status::permissions(perms prms) noexcept
+{
+ _perms = prms;
+}
+
+// 30.10.11.2 observers
+GHC_INLINE file_type file_status::type() const noexcept
+{
+ return _type;
+}
+
+GHC_INLINE perms file_status::permissions() const noexcept
+{
+ return _perms;
+}
+
+//-----------------------------------------------------------------------------
+// 30.10.12 class directory_entry
+// 30.10.12.1 constructors and destructor
+// directory_entry::directory_entry() noexcept = default;
+// directory_entry::directory_entry(const directory_entry&) = default;
+// directory_entry::directory_entry(directory_entry&&) noexcept = default;
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE directory_entry::directory_entry(const filesystem::path& p)
+ : _path(p)
+ , _file_size(static_cast<uintmax_t>(-1))
+#ifndef GHC_OS_WINDOWS
+ , _hard_link_count(static_cast<uintmax_t>(-1))
+#endif
+ , _last_write_time(0)
+{
+ refresh();
+}
+#endif
+
+GHC_INLINE directory_entry::directory_entry(const filesystem::path& p, std::error_code& ec)
+ : _path(p)
+ , _file_size(static_cast<uintmax_t>(-1))
+#ifndef GHC_OS_WINDOWS
+ , _hard_link_count(static_cast<uintmax_t>(-1))
+#endif
+ , _last_write_time(0)
+{
+ refresh(ec);
+}
+
+GHC_INLINE directory_entry::~directory_entry() {}
+
+// assignments:
+// directory_entry& directory_entry::operator=(const directory_entry&) = default;
+// directory_entry& directory_entry::operator=(directory_entry&&) noexcept = default;
+
+// 30.10.12.2 directory_entry modifiers
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE void directory_entry::assign(const filesystem::path& p)
+{
+ _path = p;
+ refresh();
+}
+#endif
+
+GHC_INLINE void directory_entry::assign(const filesystem::path& p, std::error_code& ec)
+{
+ _path = p;
+ refresh(ec);
+}
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE void directory_entry::replace_filename(const filesystem::path& p)
+{
+ _path.replace_filename(p);
+ refresh();
+}
+#endif
+
+GHC_INLINE void directory_entry::replace_filename(const filesystem::path& p, std::error_code& ec)
+{
+ _path.replace_filename(p);
+ refresh(ec);
+}
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE void directory_entry::refresh()
+{
+ std::error_code ec;
+ refresh(ec);
+ if (ec) {
+ throw filesystem_error(detail::systemErrorText(ec.value()), _path, ec);
+ }
+}
+#endif
+
+GHC_INLINE void directory_entry::refresh(std::error_code& ec) noexcept
+{
+#ifdef GHC_OS_WINDOWS
+ _status = detail::status_ex(_path, ec, &_symlink_status, &_file_size, nullptr, &_last_write_time);
+#else
+ _status = detail::status_ex(_path, ec, &_symlink_status, &_file_size, &_hard_link_count, &_last_write_time);
+#endif
+}
+
+// 30.10.12.3 directory_entry observers
+GHC_INLINE const filesystem::path& directory_entry::path() const noexcept
+{
+ return _path;
+}
+
+GHC_INLINE directory_entry::operator const filesystem::path&() const noexcept
+{
+ return _path;
+}
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE file_type directory_entry::status_file_type() const
+{
+ return _status.type() != file_type::none ? _status.type() : filesystem::status(path()).type();
+}
+#endif
+
+GHC_INLINE file_type directory_entry::status_file_type(std::error_code& ec) const noexcept
+{
+ if(_status.type() != file_type::none) {
+ ec.clear();
+ return _status.type();
+ }
+ return filesystem::status(path(), ec).type();
+}
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE bool directory_entry::exists() const
+{
+ return status_file_type() != file_type::not_found;
+}
+#endif
+
+GHC_INLINE bool directory_entry::exists(std::error_code& ec) const noexcept
+{
+ return status_file_type(ec) != file_type::not_found;
+}
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE bool directory_entry::is_block_file() const
+{
+ return status_file_type() == file_type::block;
+}
+#endif
+GHC_INLINE bool directory_entry::is_block_file(std::error_code& ec) const noexcept
+{
+ return status_file_type(ec) == file_type::block;
+}
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE bool directory_entry::is_character_file() const
+{
+ return status_file_type() == file_type::character;
+}
+#endif
+
+GHC_INLINE bool directory_entry::is_character_file(std::error_code& ec) const noexcept
+{
+ return status_file_type(ec) == file_type::character;
+}
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE bool directory_entry::is_directory() const
+{
+ return status_file_type() == file_type::directory;
+}
+#endif
+
+GHC_INLINE bool directory_entry::is_directory(std::error_code& ec) const noexcept
+{
+ return status_file_type(ec) == file_type::directory;
+}
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE bool directory_entry::is_fifo() const
+{
+ return status_file_type() == file_type::fifo;
+}
+#endif
+
+GHC_INLINE bool directory_entry::is_fifo(std::error_code& ec) const noexcept
+{
+ return status_file_type(ec) == file_type::fifo;
+}
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE bool directory_entry::is_other() const
+{
+ auto ft = status_file_type();
+ return ft != file_type::none && ft != file_type::not_found && ft != file_type::regular && ft != file_type::directory && !is_symlink();
+}
+#endif
+
+GHC_INLINE bool directory_entry::is_other(std::error_code& ec) const noexcept
+{
+ auto ft = status_file_type(ec);
+ bool other = ft != file_type::none && ft != file_type::not_found && ft != file_type::regular && ft != file_type::directory && !is_symlink(ec);
+ return !ec && other;
+}
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE bool directory_entry::is_regular_file() const
+{
+ return status_file_type() == file_type::regular;
+}
+#endif
+
+GHC_INLINE bool directory_entry::is_regular_file(std::error_code& ec) const noexcept
+{
+ return status_file_type(ec) == file_type::regular;
+}
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE bool directory_entry::is_socket() const
+{
+ return status_file_type() == file_type::socket;
+}
+#endif
+
+GHC_INLINE bool directory_entry::is_socket(std::error_code& ec) const noexcept
+{
+ return status_file_type(ec) == file_type::socket;
+}
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE bool directory_entry::is_symlink() const
+{
+ return _symlink_status.type() != file_type::none ? _symlink_status.type() == file_type::symlink : filesystem::is_symlink(symlink_status());
+}
+#endif
+
+GHC_INLINE bool directory_entry::is_symlink(std::error_code& ec) const noexcept
+{
+ if(_symlink_status.type() != file_type::none) {
+ ec.clear();
+ return _symlink_status.type() == file_type::symlink;
+ }
+ return filesystem::is_symlink(symlink_status(ec));
+}
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE uintmax_t directory_entry::file_size() const
+{
+ if (_file_size != static_cast<uintmax_t>(-1)) {
+ return _file_size;
+ }
+ return filesystem::file_size(path());
+}
+#endif
+
+GHC_INLINE uintmax_t directory_entry::file_size(std::error_code& ec) const noexcept
+{
+ if (_file_size != static_cast<uintmax_t>(-1)) {
+ ec.clear();
+ return _file_size;
+ }
+ return filesystem::file_size(path(), ec);
+}
+
+#ifndef GHC_OS_WEB
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE uintmax_t directory_entry::hard_link_count() const
+{
+#ifndef GHC_OS_WINDOWS
+ if (_hard_link_count != static_cast<uintmax_t>(-1)) {
+ return _hard_link_count;
+ }
+#endif
+ return filesystem::hard_link_count(path());
+}
+#endif
+
+GHC_INLINE uintmax_t directory_entry::hard_link_count(std::error_code& ec) const noexcept
+{
+#ifndef GHC_OS_WINDOWS
+ if (_hard_link_count != static_cast<uintmax_t>(-1)) {
+ ec.clear();
+ return _hard_link_count;
+ }
+#endif
+ return filesystem::hard_link_count(path(), ec);
+}
+#endif
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE file_time_type directory_entry::last_write_time() const
+{
+ if (_last_write_time != 0) {
+ return std::chrono::system_clock::from_time_t(_last_write_time);
+ }
+ return filesystem::last_write_time(path());
+}
+#endif
+
+GHC_INLINE file_time_type directory_entry::last_write_time(std::error_code& ec) const noexcept
+{
+ if (_last_write_time != 0) {
+ ec.clear();
+ return std::chrono::system_clock::from_time_t(_last_write_time);
+ }
+ return filesystem::last_write_time(path(), ec);
+}
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE file_status directory_entry::status() const
+{
+ if (_status.type() != file_type::none && _status.permissions() != perms::unknown) {
+ return _status;
+ }
+ return filesystem::status(path());
+}
+#endif
+
+GHC_INLINE file_status directory_entry::status(std::error_code& ec) const noexcept
+{
+ if (_status.type() != file_type::none && _status.permissions() != perms::unknown) {
+ ec.clear();
+ return _status;
+ }
+ return filesystem::status(path(), ec);
+}
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE file_status directory_entry::symlink_status() const
+{
+ if (_symlink_status.type() != file_type::none && _symlink_status.permissions() != perms::unknown) {
+ return _symlink_status;
+ }
+ return filesystem::symlink_status(path());
+}
+#endif
+
+GHC_INLINE file_status directory_entry::symlink_status(std::error_code& ec) const noexcept
+{
+ if (_symlink_status.type() != file_type::none && _symlink_status.permissions() != perms::unknown) {
+ ec.clear();
+ return _symlink_status;
+ }
+ return filesystem::symlink_status(path(), ec);
+}
+
+#ifdef GHC_HAS_THREEWAY_COMP
+GHC_INLINE std::strong_ordering directory_entry::operator<=>(const directory_entry& rhs) const noexcept
+{
+ return _path <=> rhs._path;
+}
+#endif
+
+GHC_INLINE bool directory_entry::operator<(const directory_entry& rhs) const noexcept
+{
+ return _path < rhs._path;
+}
+
+GHC_INLINE bool directory_entry::operator==(const directory_entry& rhs) const noexcept
+{
+ return _path == rhs._path;
+}
+
+GHC_INLINE bool directory_entry::operator!=(const directory_entry& rhs) const noexcept
+{
+ return _path != rhs._path;
+}
+
+GHC_INLINE bool directory_entry::operator<=(const directory_entry& rhs) const noexcept
+{
+ return _path <= rhs._path;
+}
+
+GHC_INLINE bool directory_entry::operator>(const directory_entry& rhs) const noexcept
+{
+ return _path > rhs._path;
+}
+
+GHC_INLINE bool directory_entry::operator>=(const directory_entry& rhs) const noexcept
+{
+ return _path >= rhs._path;
+}
+
+//-----------------------------------------------------------------------------
+// 30.10.13 class directory_iterator
+
+#ifdef GHC_OS_WINDOWS
+class directory_iterator::impl
+{
+public:
+ impl(const path& p, directory_options options)
+ : _base(p)
+ , _options(options)
+ , _dirHandle(INVALID_HANDLE_VALUE)
+ {
+ if (!_base.empty()) {
+ ZeroMemory(&_findData, sizeof(WIN32_FIND_DATAW));
+ if ((_dirHandle = FindFirstFileW(GHC_NATIVEWP((_base / "*")), &_findData)) != INVALID_HANDLE_VALUE) {
+ if (std::wstring(_findData.cFileName) == L"." || std::wstring(_findData.cFileName) == L"..") {
+ increment(_ec);
+ }
+ else {
+ _dir_entry._path = _base / std::wstring(_findData.cFileName);
+ copyToDirEntry(_ec);
+ }
+ }
+ else {
+ auto error = ::GetLastError();
+ _base = filesystem::path();
+ if (error != ERROR_ACCESS_DENIED || (options & directory_options::skip_permission_denied) == directory_options::none) {
+ _ec = detail::make_system_error();
+ }
+ }
+ }
+ }
+ impl(const impl& other) = delete;
+ ~impl()
+ {
+ if (_dirHandle != INVALID_HANDLE_VALUE) {
+ FindClose(_dirHandle);
+ _dirHandle = INVALID_HANDLE_VALUE;
+ }
+ }
+ void increment(std::error_code& ec)
+ {
+ if (_dirHandle != INVALID_HANDLE_VALUE) {
+ do {
+ if (FindNextFileW(_dirHandle, &_findData)) {
+ _dir_entry._path = _base;
+#ifdef GHC_USE_WCHAR_T
+ _dir_entry._path.append_name(_findData.cFileName);
+#else
+#ifdef GHC_RAISE_UNICODE_ERRORS
+ try {
+ _dir_entry._path.append_name(detail::toUtf8(_findData.cFileName).c_str());
+ }
+ catch (filesystem_error& fe) {
+ ec = fe.code();
+ return;
+ }
+#else
+ _dir_entry._path.append_name(detail::toUtf8(_findData.cFileName).c_str());
+#endif
+#endif
+ copyToDirEntry(ec);
+ }
+ else {
+ auto err = ::GetLastError();
+ if (err != ERROR_NO_MORE_FILES) {
+ _ec = ec = detail::make_system_error(err);
+ }
+ FindClose(_dirHandle);
+ _dirHandle = INVALID_HANDLE_VALUE;
+ _dir_entry._path.clear();
+ break;
+ }
+ } while (std::wstring(_findData.cFileName) == L"." || std::wstring(_findData.cFileName) == L"..");
+ }
+ else {
+ ec = _ec;
+ }
+ }
+ void copyToDirEntry(std::error_code& ec)
+ {
+ if (_findData.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) {
+ _dir_entry._status = detail::status_ex(_dir_entry._path, ec, &_dir_entry._symlink_status, &_dir_entry._file_size, nullptr, &_dir_entry._last_write_time);
+ }
+ else {
+ _dir_entry._status = detail::status_from_INFO(_dir_entry._path, &_findData, ec, &_dir_entry._file_size, &_dir_entry._last_write_time);
+ _dir_entry._symlink_status = _dir_entry._status;
+ }
+ if (ec) {
+ if (_dir_entry._status.type() != file_type::none && _dir_entry._symlink_status.type() != file_type::none) {
+ ec.clear();
+ }
+ else {
+ _dir_entry._file_size = static_cast<uintmax_t>(-1);
+ _dir_entry._last_write_time = 0;
+ }
+ }
+ }
+ path _base;
+ directory_options _options;
+ WIN32_FIND_DATAW _findData;
+ HANDLE _dirHandle;
+ directory_entry _dir_entry;
+ std::error_code _ec;
+};
+#else
+// POSIX implementation
+class directory_iterator::impl
+{
+public:
+ impl(const path& path, directory_options options)
+ : _base(path)
+ , _options(options)
+ , _dir(nullptr)
+ , _entry(nullptr)
+ {
+ if (!path.empty()) {
+ _dir = ::opendir(path.native().c_str());
+ if (!_dir) {
+ auto error = errno;
+ _base = filesystem::path();
+ if ((error != EACCES && error != EPERM) || (options & directory_options::skip_permission_denied) == directory_options::none) {
+ _ec = detail::make_system_error();
+ }
+ }
+ else {
+ increment(_ec);
+ }
+ }
+ }
+ impl(const impl& other) = delete;
+ ~impl()
+ {
+ if (_dir) {
+ ::closedir(_dir);
+ }
+ }
+ void increment(std::error_code& ec)
+ {
+ if (_dir) {
+ bool skip;
+ do {
+ skip = false;
+ errno = 0;
+ _entry = ::readdir(_dir);
+ if (_entry) {
+ _dir_entry._path = _base;
+ _dir_entry._path.append_name(_entry->d_name);
+ copyToDirEntry();
+ if (ec && (ec.value() == EACCES || ec.value() == EPERM) && (_options & directory_options::skip_permission_denied) == directory_options::skip_permission_denied) {
+ ec.clear();
+ skip = true;
+ }
+ }
+ else {
+ ::closedir(_dir);
+ _dir = nullptr;
+ _dir_entry._path.clear();
+ if (errno) {
+ ec = detail::make_system_error();
+ }
+ break;
+ }
+ } while (skip || std::strcmp(_entry->d_name, ".") == 0 || std::strcmp(_entry->d_name, "..") == 0);
+ }
+ }
+ void copyToDirEntry()
+ {
+ _dir_entry._symlink_status.permissions(perms::unknown);
+ switch(_entry->d_type) {
+ case DT_BLK: _dir_entry._symlink_status.type(file_type::block); break;
+ case DT_CHR: _dir_entry._symlink_status.type(file_type::character); break;
+ case DT_DIR: _dir_entry._symlink_status.type(file_type::directory); break;
+ case DT_FIFO: _dir_entry._symlink_status.type(file_type::fifo); break;
+ case DT_LNK: _dir_entry._symlink_status.type(file_type::symlink); break;
+ case DT_REG: _dir_entry._symlink_status.type(file_type::regular); break;
+ case DT_SOCK: _dir_entry._symlink_status.type(file_type::socket); break;
+ default: _dir_entry._symlink_status.type(file_type::unknown); break;
+ }
+ if (_entry->d_type != DT_LNK) {
+ _dir_entry._status = _dir_entry._symlink_status;
+ }
+ else {
+ _dir_entry._status.type(file_type::none);
+ _dir_entry._status.permissions(perms::unknown);
+ }
+ _dir_entry._file_size = static_cast<uintmax_t>(-1);
+ _dir_entry._hard_link_count = static_cast<uintmax_t>(-1);
+ _dir_entry._last_write_time = 0;
+ }
+ path _base;
+ directory_options _options;
+ DIR* _dir;
+ struct ::dirent* _entry;
+ directory_entry _dir_entry;
+ std::error_code _ec;
+};
+#endif
+
+// 30.10.13.1 member functions
+GHC_INLINE directory_iterator::directory_iterator() noexcept
+ : _impl(new impl(path(), directory_options::none))
+{
+}
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE directory_iterator::directory_iterator(const path& p)
+ : _impl(new impl(p, directory_options::none))
+{
+ if (_impl->_ec) {
+ throw filesystem_error(detail::systemErrorText(_impl->_ec.value()), p, _impl->_ec);
+ }
+ _impl->_ec.clear();
+}
+
+GHC_INLINE directory_iterator::directory_iterator(const path& p, directory_options options)
+ : _impl(new impl(p, options))
+{
+ if (_impl->_ec) {
+ throw filesystem_error(detail::systemErrorText(_impl->_ec.value()), p, _impl->_ec);
+ }
+}
+#endif
+
+GHC_INLINE directory_iterator::directory_iterator(const path& p, std::error_code& ec) noexcept
+ : _impl(new impl(p, directory_options::none))
+{
+ if (_impl->_ec) {
+ ec = _impl->_ec;
+ }
+}
+
+GHC_INLINE directory_iterator::directory_iterator(const path& p, directory_options options, std::error_code& ec) noexcept
+ : _impl(new impl(p, options))
+{
+ if (_impl->_ec) {
+ ec = _impl->_ec;
+ }
+}
+
+GHC_INLINE directory_iterator::directory_iterator(const directory_iterator& rhs)
+ : _impl(rhs._impl)
+{
+}
+
+GHC_INLINE directory_iterator::directory_iterator(directory_iterator&& rhs) noexcept
+ : _impl(std::move(rhs._impl))
+{
+}
+
+GHC_INLINE directory_iterator::~directory_iterator() {}
+
+GHC_INLINE directory_iterator& directory_iterator::operator=(const directory_iterator& rhs)
+{
+ _impl = rhs._impl;
+ return *this;
+}
+
+GHC_INLINE directory_iterator& directory_iterator::operator=(directory_iterator&& rhs) noexcept
+{
+ _impl = std::move(rhs._impl);
+ return *this;
+}
+
+GHC_INLINE const directory_entry& directory_iterator::operator*() const
+{
+ return _impl->_dir_entry;
+}
+
+GHC_INLINE const directory_entry* directory_iterator::operator->() const
+{
+ return &_impl->_dir_entry;
+}
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE directory_iterator& directory_iterator::operator++()
+{
+ std::error_code ec;
+ _impl->increment(ec);
+ if (ec) {
+ throw filesystem_error(detail::systemErrorText(ec.value()), _impl->_dir_entry._path, ec);
+ }
+ return *this;
+}
+#endif
+
+GHC_INLINE directory_iterator& directory_iterator::increment(std::error_code& ec) noexcept
+{
+ _impl->increment(ec);
+ return *this;
+}
+
+GHC_INLINE bool directory_iterator::operator==(const directory_iterator& rhs) const
+{
+ return _impl->_dir_entry._path == rhs._impl->_dir_entry._path;
+}
+
+GHC_INLINE bool directory_iterator::operator!=(const directory_iterator& rhs) const
+{
+ return _impl->_dir_entry._path != rhs._impl->_dir_entry._path;
+}
+
+// 30.10.13.2 directory_iterator non-member functions
+
+GHC_INLINE directory_iterator begin(directory_iterator iter) noexcept
+{
+ return iter;
+}
+
+GHC_INLINE directory_iterator end(const directory_iterator&) noexcept
+{
+ return directory_iterator();
+}
+
+//-----------------------------------------------------------------------------
+// 30.10.14 class recursive_directory_iterator
+
+GHC_INLINE recursive_directory_iterator::recursive_directory_iterator() noexcept
+ : _impl(new recursive_directory_iterator_impl(directory_options::none, true))
+{
+ _impl->_dir_iter_stack.push(directory_iterator());
+}
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE recursive_directory_iterator::recursive_directory_iterator(const path& p)
+ : _impl(new recursive_directory_iterator_impl(directory_options::none, true))
+{
+ _impl->_dir_iter_stack.push(directory_iterator(p));
+}
+
+GHC_INLINE recursive_directory_iterator::recursive_directory_iterator(const path& p, directory_options options)
+ : _impl(new recursive_directory_iterator_impl(options, true))
+{
+ _impl->_dir_iter_stack.push(directory_iterator(p, options));
+}
+#endif
+
+GHC_INLINE recursive_directory_iterator::recursive_directory_iterator(const path& p, directory_options options, std::error_code& ec) noexcept
+ : _impl(new recursive_directory_iterator_impl(options, true))
+{
+ _impl->_dir_iter_stack.push(directory_iterator(p, options, ec));
+}
+
+GHC_INLINE recursive_directory_iterator::recursive_directory_iterator(const path& p, std::error_code& ec) noexcept
+ : _impl(new recursive_directory_iterator_impl(directory_options::none, true))
+{
+ _impl->_dir_iter_stack.push(directory_iterator(p, ec));
+}
+
+GHC_INLINE recursive_directory_iterator::recursive_directory_iterator(const recursive_directory_iterator& rhs)
+ : _impl(rhs._impl)
+{
+}
+
+GHC_INLINE recursive_directory_iterator::recursive_directory_iterator(recursive_directory_iterator&& rhs) noexcept
+ : _impl(std::move(rhs._impl))
+{
+}
+
+GHC_INLINE recursive_directory_iterator::~recursive_directory_iterator() {}
+
+// 30.10.14.1 observers
+GHC_INLINE directory_options recursive_directory_iterator::options() const
+{
+ return _impl->_options;
+}
+
+GHC_INLINE int recursive_directory_iterator::depth() const
+{
+ return static_cast<int>(_impl->_dir_iter_stack.size() - 1);
+}
+
+GHC_INLINE bool recursive_directory_iterator::recursion_pending() const
+{
+ return _impl->_recursion_pending;
+}
+
+GHC_INLINE const directory_entry& recursive_directory_iterator::operator*() const
+{
+ return *(_impl->_dir_iter_stack.top());
+}
+
+GHC_INLINE const directory_entry* recursive_directory_iterator::operator->() const
+{
+ return &(*(_impl->_dir_iter_stack.top()));
+}
+
+// 30.10.14.1 modifiers recursive_directory_iterator&
+GHC_INLINE recursive_directory_iterator& recursive_directory_iterator::operator=(const recursive_directory_iterator& rhs)
+{
+ _impl = rhs._impl;
+ return *this;
+}
+
+GHC_INLINE recursive_directory_iterator& recursive_directory_iterator::operator=(recursive_directory_iterator&& rhs) noexcept
+{
+ _impl = std::move(rhs._impl);
+ return *this;
+}
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE recursive_directory_iterator& recursive_directory_iterator::operator++()
+{
+ std::error_code ec;
+ increment(ec);
+ if (ec) {
+ throw filesystem_error(detail::systemErrorText(ec.value()), _impl->_dir_iter_stack.empty() ? path() : _impl->_dir_iter_stack.top()->path(), ec);
+ }
+ return *this;
+}
+#endif
+
+GHC_INLINE recursive_directory_iterator& recursive_directory_iterator::increment(std::error_code& ec) noexcept
+{
+ bool isDir = (*this)->is_directory(ec);
+ bool isSymLink = !ec && (*this)->is_symlink(ec);
+ if(!ec) {
+ if (recursion_pending() && isDir && (!isSymLink || (options() & directory_options::follow_directory_symlink) != directory_options::none)) {
+ _impl->_dir_iter_stack.push(directory_iterator((*this)->path(), _impl->_options, ec));
+ }
+ else {
+ _impl->_dir_iter_stack.top().increment(ec);
+ }
+ if (!ec) {
+ while (depth() && _impl->_dir_iter_stack.top() == directory_iterator()) {
+ _impl->_dir_iter_stack.pop();
+ _impl->_dir_iter_stack.top().increment(ec);
+ }
+ }
+ else if (!_impl->_dir_iter_stack.empty()) {
+ _impl->_dir_iter_stack.pop();
+ }
+ _impl->_recursion_pending = true;
+ }
+ return *this;
+}
+
+#ifdef GHC_WITH_EXCEPTIONS
+GHC_INLINE void recursive_directory_iterator::pop()
+{
+ std::error_code ec;
+ pop(ec);
+ if (ec) {
+ throw filesystem_error(detail::systemErrorText(ec.value()), _impl->_dir_iter_stack.empty() ? path() : _impl->_dir_iter_stack.top()->path(), ec);
+ }
+}
+#endif
+
+GHC_INLINE void recursive_directory_iterator::pop(std::error_code& ec)
+{
+ if (depth() == 0) {
+ *this = recursive_directory_iterator();
+ }
+ else {
+ do {
+ _impl->_dir_iter_stack.pop();
+ _impl->_dir_iter_stack.top().increment(ec);
+ } while (depth() && _impl->_dir_iter_stack.top() == directory_iterator());
+ }
+}
+
+GHC_INLINE void recursive_directory_iterator::disable_recursion_pending()
+{
+ _impl->_recursion_pending = false;
+}
+
+// other members as required by 27.2.3, input iterators
+GHC_INLINE bool recursive_directory_iterator::operator==(const recursive_directory_iterator& rhs) const
+{
+ return _impl->_dir_iter_stack.top() == rhs._impl->_dir_iter_stack.top();
+}
+
+GHC_INLINE bool recursive_directory_iterator::operator!=(const recursive_directory_iterator& rhs) const
+{
+ return _impl->_dir_iter_stack.top() != rhs._impl->_dir_iter_stack.top();
+}
+
+// 30.10.14.2 directory_iterator non-member functions
+GHC_INLINE recursive_directory_iterator begin(recursive_directory_iterator iter) noexcept
+{
+ return iter;
+}
+
+GHC_INLINE recursive_directory_iterator end(const recursive_directory_iterator&) noexcept
+{
+ return recursive_directory_iterator();
+}
+
+#endif // GHC_EXPAND_IMPL
+
+} // namespace filesystem
+} // namespace ghc
+
+// cleanup some macros
+#undef GHC_INLINE
+#undef GHC_EXPAND_IMPL
+
+#endif // GHC_FILESYSTEM_H
diff --git a/libmd5/md5.c b/libmd5/md5.c
index d0627ff..1fdcb3a 100644
--- a/libmd5/md5.c
+++ b/libmd5/md5.c
@@ -31,13 +31,13 @@ MD5Transform(UWORD32 buf[4], UWORD32 const in[16]);
int g_bigEndian = 0;
int g_endianessDetected = 0;
-static void
+static void
detectEndianess()
{
int nl = 0x12345678;
short ns = 0x1234;
- unsigned char *p = (unsigned char *)(&nl);
+ unsigned char *p = (unsigned char *)(&nl);
unsigned char *sp = (unsigned char *)(&ns);
if (g_endianessDetected) return;
@@ -132,7 +132,7 @@ MD5Update(struct MD5Context *ctx, md5byte const *buf, unsigned len)
}
/*
- * Final wrapup - pad to 64-byte boundary with the bit pattern
+ * Final wrapup - pad to 64-byte boundary with the bit pattern
* 1 0* (64-bit count of bits processed, MSB-first)
*/
void
@@ -282,14 +282,13 @@ void MD5Buffer (const unsigned char *buf,unsigned int len,unsigned char sig[16])
#define HEX_STRING "0123456789abcdef" /* to convert to hex */
-void MD5SigToString(unsigned char signature[16],char *str,int len)
+void MD5SigToString(unsigned char signature[16],char str[33])
{
unsigned char *sig_p;
- char *str_p, *max_p;
+ char *str_p;
unsigned int high, low;
str_p = str;
- max_p = str + len;
for (sig_p = (unsigned char *)signature;
sig_p < (unsigned char *)signature + 16;
@@ -298,16 +297,11 @@ void MD5SigToString(unsigned char signature[16],char *str,int len)
high = *sig_p / 16;
low = *sig_p % 16;
/* account for 2 chars */
- if (str_p + 1 >= max_p) {
- break;
- }
*str_p++ = HEX_STRING[high];
*str_p++ = HEX_STRING[low];
}
- /* account for 2 chars */
- if (str_p < max_p) {
- *str_p++ = '\0';
- }
+ /* account for 1 terminator */
+ *str_p++ = '\0';
}
diff --git a/libmd5/md5.h b/libmd5/md5.h
index 03f8ff6..5d0c0b0 100644
--- a/libmd5/md5.h
+++ b/libmd5/md5.h
@@ -48,7 +48,7 @@ void MD5Init(struct MD5Context *context);
void MD5Update(struct MD5Context *context, md5byte const *buf, unsigned len);
void MD5Final(unsigned char digest[16], struct MD5Context *context);
void MD5Buffer (const unsigned char *buf,unsigned int len,unsigned char sig[16]);
-void MD5SigToString(unsigned char sig[16],char *str,int len);
+void MD5SigToString(unsigned char sig[16],char str[33]);
#ifdef __cplusplus
}
diff --git a/libxml/xml.l b/libxml/xml.l
index ac58882..13ff219 100644
--- a/libxml/xml.l
+++ b/libxml/xml.l
@@ -440,12 +440,13 @@ void XMLParser::parse(const char *fileName,const char *inputStr, bool debugEnabl
FILE *output = 0;
const char *enter_txt = 0;
const char *finished_txt = 0;
- if (yy_flex_debug) { output=stderr; enter_txt="entering"; finished_txt="finished"; }
- else if (debugEnabled) { output=stdout; enter_txt="Entering"; finished_txt="Finished"; }
+ const char *pre_txt = 0;
+ if (yy_flex_debug) { output=stderr; pre_txt="--"; enter_txt="entering"; finished_txt="finished"; }
+ else if (debugEnabled) { output=stdout; pre_txt=""; enter_txt="Entering"; finished_txt="Finished"; }
if (output)
{
- fprintf(output,"--%s lexical analyzer: %s (for: %s)\n",enter_txt, __FILE__, fileName);
+ fprintf(output,"%s%s lexical analyzer: %s (for: %s)\n",pre_txt,enter_txt, __FILE__, fileName);
}
BEGIN(Initial);
@@ -475,7 +476,7 @@ void XMLParser::parse(const char *fileName,const char *inputStr, bool debugEnabl
if (output)
{
- fprintf(output,"--%s lexical analyzer: %s (for: %s)\n",finished_txt, __FILE__, fileName);
+ fprintf(output,"%s%s lexical analyzer: %s (for: %s)\n",pre_txt,finished_txt, __FILE__, fileName);
}
}
diff --git a/qtools/CMakeLists.txt b/qtools/CMakeLists.txt
deleted file mode 100644
index 732449c..0000000
--- a/qtools/CMakeLists.txt
+++ /dev/null
@@ -1,44 +0,0 @@
-include_directories(.)
-
-list(APPEND qtools_src
-qbuffer.cpp
-qcollection.cpp
-qcstring.cpp
-qdatastream.cpp
-qdir.cpp
-qfile.cpp
-qfileinfo.cpp
-qgarray.cpp
-qgdict.cpp
-qglist.cpp
-qglobal.cpp
-qgstring.cpp
-qiodevice.cpp
-qregexp.cpp
-qstring.cpp
-qtextcodec.cpp
-qstringlist.cpp
-qcstringlist.cpp
-qutfcodec.cpp
-)
-
-if (UNIX)
-list(APPEND qtools_src
-qfile_unix.cpp
-qdir_unix.cpp
-qfileinfo_unix.cpp
-)
-endif()
-
-if (WIN32)
-list(APPEND qtools_src
-qfile_win32.cpp
-qdir_win32.cpp
-qfileinfo_win32.cpp
-
-)
-endif()
-
-add_library(qtools STATIC
-${qtools_src}
-)
diff --git a/qtools/Doxyfile b/qtools/Doxyfile
deleted file mode 100644
index d3ab25a..0000000
--- a/qtools/Doxyfile
+++ /dev/null
@@ -1,320 +0,0 @@
-# Doxyfile 1.8.14
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-DOXYFILE_ENCODING = UTF-8
-PROJECT_NAME = Qtools
-PROJECT_NUMBER =
-PROJECT_BRIEF =
-PROJECT_LOGO =
-OUTPUT_DIRECTORY = ../qtools_docs
-CREATE_SUBDIRS = YES
-ALLOW_UNICODE_NAMES = NO
-OUTPUT_LANGUAGE = English
-BRIEF_MEMBER_DESC = YES
-REPEAT_BRIEF = YES
-ABBREVIATE_BRIEF =
-ALWAYS_DETAILED_SEC = NO
-INLINE_INHERITED_MEMB = NO
-FULL_PATH_NAMES = YES
-STRIP_FROM_PATH = $(PWD)/
-STRIP_FROM_INC_PATH =
-SHORT_NAMES = NO
-JAVADOC_AUTOBRIEF = YES
-QT_AUTOBRIEF = NO
-MULTILINE_CPP_IS_BRIEF = NO
-INHERIT_DOCS = YES
-SEPARATE_MEMBER_PAGES = NO
-TAB_SIZE = 8
-ALIASES =
-OPTIMIZE_OUTPUT_FOR_C = NO
-OPTIMIZE_OUTPUT_JAVA = NO
-OPTIMIZE_FOR_FORTRAN = NO
-OPTIMIZE_OUTPUT_VHDL = NO
-EXTENSION_MAPPING =
-MARKDOWN_SUPPORT = YES
-TOC_INCLUDE_HEADINGS = 0
-AUTOLINK_SUPPORT = YES
-BUILTIN_STL_SUPPORT = NO
-CPP_CLI_SUPPORT = NO
-SIP_SUPPORT = NO
-IDL_PROPERTY_SUPPORT = YES
-DISTRIBUTE_GROUP_DOC = NO
-GROUP_NESTED_COMPOUNDS = NO
-SUBGROUPING = YES
-INLINE_GROUPED_CLASSES = NO
-INLINE_SIMPLE_STRUCTS = NO
-TYPEDEF_HIDES_STRUCT = NO
-LOOKUP_CACHE_SIZE = 0
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-EXTRACT_ALL = YES
-EXTRACT_PRIVATE = YES
-EXTRACT_PACKAGE = NO
-EXTRACT_STATIC = YES
-EXTRACT_LOCAL_CLASSES = YES
-EXTRACT_LOCAL_METHODS = NO
-EXTRACT_ANON_NSPACES = NO
-HIDE_UNDOC_MEMBERS = NO
-HIDE_UNDOC_CLASSES = NO
-HIDE_FRIEND_COMPOUNDS = NO
-HIDE_IN_BODY_DOCS = NO
-INTERNAL_DOCS = NO
-CASE_SENSE_NAMES = NO
-HIDE_SCOPE_NAMES = NO
-HIDE_COMPOUND_REFERENCE= NO
-SHOW_INCLUDE_FILES = YES
-SHOW_GROUPED_MEMB_INC = NO
-FORCE_LOCAL_INCLUDES = NO
-INLINE_INFO = YES
-SORT_MEMBER_DOCS = YES
-SORT_BRIEF_DOCS = NO
-SORT_MEMBERS_CTORS_1ST = NO
-SORT_GROUP_NAMES = NO
-SORT_BY_SCOPE_NAME = NO
-STRICT_PROTO_MATCHING = NO
-GENERATE_TODOLIST = YES
-GENERATE_TESTLIST = YES
-GENERATE_BUGLIST = YES
-GENERATE_DEPRECATEDLIST= YES
-ENABLED_SECTIONS =
-MAX_INITIALIZER_LINES = 30
-SHOW_USED_FILES = YES
-SHOW_FILES = YES
-SHOW_NAMESPACES = YES
-FILE_VERSION_FILTER =
-LAYOUT_FILE =
-CITE_BIB_FILES =
-#---------------------------------------------------------------------------
-# Configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-QUIET = NO
-WARNINGS = YES
-WARN_IF_UNDOCUMENTED = YES
-WARN_IF_DOC_ERROR = YES
-WARN_NO_PARAMDOC = NO
-WARN_AS_ERROR = NO
-WARN_FORMAT = "$file:$line: $text "
-WARN_LOGFILE =
-#---------------------------------------------------------------------------
-# Configuration options related to the input files
-#---------------------------------------------------------------------------
-INPUT = .
-INPUT_ENCODING = UTF-8
-FILE_PATTERNS = *.h \
- *.cpp \
- *.doc
-RECURSIVE = NO
-EXCLUDE =
-EXCLUDE_SYMLINKS = NO
-EXCLUDE_PATTERNS =
-EXCLUDE_SYMBOLS =
-EXAMPLE_PATH =
-EXAMPLE_PATTERNS =
-EXAMPLE_RECURSIVE = NO
-IMAGE_PATH =
-INPUT_FILTER =
-FILTER_PATTERNS =
-FILTER_SOURCE_FILES = NO
-FILTER_SOURCE_PATTERNS =
-USE_MDFILE_AS_MAINPAGE =
-#---------------------------------------------------------------------------
-# Configuration options related to source browsing
-#---------------------------------------------------------------------------
-SOURCE_BROWSER = YES
-INLINE_SOURCES = NO
-STRIP_CODE_COMMENTS = YES
-REFERENCED_BY_RELATION = YES
-REFERENCES_RELATION = YES
-REFERENCES_LINK_SOURCE = YES
-SOURCE_TOOLTIPS = YES
-USE_HTAGS = NO
-VERBATIM_HEADERS = YES
-#---------------------------------------------------------------------------
-# Configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-ALPHABETICAL_INDEX = YES
-COLS_IN_ALPHA_INDEX = 4
-IGNORE_PREFIX = Q
-#---------------------------------------------------------------------------
-# Configuration options related to the HTML output
-#---------------------------------------------------------------------------
-GENERATE_HTML = YES
-HTML_OUTPUT =
-HTML_FILE_EXTENSION = .html
-HTML_HEADER =
-HTML_FOOTER =
-HTML_STYLESHEET =
-HTML_EXTRA_STYLESHEET =
-HTML_EXTRA_FILES =
-HTML_COLORSTYLE_HUE = 220
-HTML_COLORSTYLE_SAT = 100
-HTML_COLORSTYLE_GAMMA = 80
-HTML_TIMESTAMP = YES
-HTML_DYNAMIC_MENUS = YES
-HTML_DYNAMIC_SECTIONS = NO
-HTML_INDEX_NUM_ENTRIES = 100
-GENERATE_DOCSET = YES
-DOCSET_FEEDNAME = "Doxygen generated docs"
-DOCSET_BUNDLE_ID = org.doxygen.Project
-DOCSET_PUBLISHER_ID = org.doxygen.Publisher
-DOCSET_PUBLISHER_NAME = Publisher
-GENERATE_HTMLHELP = NO
-CHM_FILE =
-HHC_LOCATION =
-GENERATE_CHI = NO
-CHM_INDEX_ENCODING =
-BINARY_TOC = NO
-TOC_EXPAND = NO
-GENERATE_QHP = YES
-QCH_FILE =
-QHP_NAMESPACE = com.qtools
-QHP_VIRTUAL_FOLDER = doc
-QHP_CUST_FILTER_NAME =
-QHP_CUST_FILTER_ATTRS =
-QHP_SECT_FILTER_ATTRS =
-QHG_LOCATION =
-GENERATE_ECLIPSEHELP = YES
-ECLIPSE_DOC_ID = org.doxygen.qtools
-DISABLE_INDEX = NO
-GENERATE_TREEVIEW = NO
-ENUM_VALUES_PER_LINE = 4
-TREEVIEW_WIDTH = 250
-EXT_LINKS_IN_WINDOW = NO
-FORMULA_FONTSIZE = 10
-FORMULA_TRANSPARENT = YES
-USE_MATHJAX = NO
-MATHJAX_FORMAT = HTML-CSS
-MATHJAX_RELPATH = https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/
-MATHJAX_EXTENSIONS =
-MATHJAX_CODEFILE =
-SEARCHENGINE = YES
-SERVER_BASED_SEARCH = NO
-EXTERNAL_SEARCH = NO
-SEARCHENGINE_URL = http://macbookpro/~dimitri/doxysearch.cgi
-SEARCHDATA_FILE = searchdata.xml
-EXTERNAL_SEARCH_ID =
-EXTRA_SEARCH_MAPPINGS =
-#---------------------------------------------------------------------------
-# Configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-GENERATE_LATEX = YES
-LATEX_OUTPUT =
-LATEX_CMD_NAME = latex
-MAKEINDEX_CMD_NAME = makeindex
-COMPACT_LATEX = NO
-PAPER_TYPE = a4wide
-EXTRA_PACKAGES =
-LATEX_HEADER =
-LATEX_FOOTER =
-LATEX_EXTRA_STYLESHEET =
-LATEX_EXTRA_FILES =
-PDF_HYPERLINKS = YES
-USE_PDFLATEX = YES
-LATEX_BATCHMODE = NO
-LATEX_HIDE_INDICES = NO
-LATEX_SOURCE_CODE = YES
-LATEX_BIB_STYLE = plain
-LATEX_TIMESTAMP = NO
-#---------------------------------------------------------------------------
-# Configuration options related to the RTF output
-#---------------------------------------------------------------------------
-GENERATE_RTF = NO
-RTF_OUTPUT =
-COMPACT_RTF = NO
-RTF_HYPERLINKS = NO
-RTF_STYLESHEET_FILE =
-RTF_EXTENSIONS_FILE =
-RTF_SOURCE_CODE = NO
-#---------------------------------------------------------------------------
-# Configuration options related to the man page output
-#---------------------------------------------------------------------------
-GENERATE_MAN = NO
-MAN_OUTPUT =
-MAN_EXTENSION = .3
-MAN_SUBDIR =
-MAN_LINKS = NO
-#---------------------------------------------------------------------------
-# Configuration options related to the XML output
-#---------------------------------------------------------------------------
-GENERATE_XML = NO
-XML_OUTPUT = xml
-XML_PROGRAMLISTING = YES
-#---------------------------------------------------------------------------
-# Configuration options related to the DOCBOOK output
-#---------------------------------------------------------------------------
-GENERATE_DOCBOOK = NO
-DOCBOOK_OUTPUT = docbook
-DOCBOOK_PROGRAMLISTING = NO
-#---------------------------------------------------------------------------
-# Configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-GENERATE_AUTOGEN_DEF = NO
-#---------------------------------------------------------------------------
-# Configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-GENERATE_PERLMOD = NO
-PERLMOD_LATEX = NO
-PERLMOD_PRETTY = YES
-PERLMOD_MAKEVAR_PREFIX =
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-ENABLE_PREPROCESSING = YES
-MACRO_EXPANSION = YES
-EXPAND_ONLY_PREDEF = YES
-SEARCH_INCLUDES = YES
-INCLUDE_PATH =
-INCLUDE_FILE_PATTERNS =
-PREDEFINED = Q_EXPORT=
-EXPAND_AS_DEFINED =
-SKIP_FUNCTION_MACROS = YES
-#---------------------------------------------------------------------------
-# Configuration options related to external references
-#---------------------------------------------------------------------------
-TAGFILES =
-GENERATE_TAGFILE = ../qtools_docs/qtools.tag
-ALLEXTERNALS = NO
-EXTERNAL_GROUPS = YES
-EXTERNAL_PAGES = YES
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-CLASS_DIAGRAMS = YES
-MSCGEN_PATH =
-DIA_PATH =
-HIDE_UNDOC_RELATIONS = YES
-HAVE_DOT = YES
-DOT_NUM_THREADS = 0
-DOT_FONTNAME =
-DOT_FONTSIZE = 10
-DOT_FONTPATH =
-CLASS_GRAPH = YES
-COLLABORATION_GRAPH = YES
-GROUP_GRAPHS = YES
-UML_LOOK = NO
-UML_LIMIT_NUM_FIELDS = 10
-TEMPLATE_RELATIONS = YES
-INCLUDE_GRAPH = YES
-INCLUDED_BY_GRAPH = YES
-CALL_GRAPH = NO
-CALLER_GRAPH = NO
-GRAPHICAL_HIERARCHY = YES
-DIRECTORY_GRAPH = YES
-DOT_IMAGE_FORMAT = svg
-INTERACTIVE_SVG = YES
-DOT_PATH =
-DOTFILE_DIRS =
-MSCFILE_DIRS =
-DIAFILE_DIRS =
-PLANTUML_JAR_PATH =
-PLANTUML_CFG_FILE =
-PLANTUML_INCLUDE_PATH =
-DOT_GRAPH_MAX_NODES = 50
-MAX_DOT_GRAPH_DEPTH = 0
-DOT_TRANSPARENT = YES
-DOT_MULTI_TARGETS = NO
-GENERATE_LEGEND = YES
-DOT_CLEANUP = YES
diff --git a/qtools/LICENSE.GPL b/qtools/LICENSE.GPL
deleted file mode 100644
index 935a2a0..0000000
--- a/qtools/LICENSE.GPL
+++ /dev/null
@@ -1,349 +0,0 @@
-
- The Qt GUI Toolkit is Copyright (C) 1994-2000 Trolltech AS.
-
- You may use, distribute and copy the Qt GUI Toolkit under the terms of
- GNU General Public License version 2, which is display below.
-
--------------------------------------------------------------------------
-
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 675 Mass Ave, Cambridge, MA 02139, USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- Appendix: How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) 19yy <name of author>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) 19yy name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- <signature of Ty Coon>, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
-Public License instead of this License.
-
--------------------------------------------------------------------------
diff --git a/qtools/LICENSE.QPL b/qtools/LICENSE.QPL
deleted file mode 100644
index ecdad6e..0000000
--- a/qtools/LICENSE.QPL
+++ /dev/null
@@ -1,103 +0,0 @@
- THE Q PUBLIC LICENSE
- version 1.0
-
- Copyright (C) 1999-2000 Trolltech AS, Norway.
- Everyone is permitted to copy and
- distribute this license document.
-
-The intent of this license is to establish freedom to share and change the
-software regulated by this license under the open source model.
-
-This license applies to any software containing a notice placed by the
-copyright holder saying that it may be distributed under the terms of
-the Q Public License version 1.0. Such software is herein referred to as
-the Software. This license covers modification and distribution of the
-Software, use of third-party application programs based on the Software,
-and development of free software which uses the Software.
-
- Granted Rights
-
-1. You are granted the non-exclusive rights set forth in this license
- provided you agree to and comply with any and all conditions in this
- license. Whole or partial distribution of the Software, or software
- items that link with the Software, in any form signifies acceptance of
- this license.
-
-2. You may copy and distribute the Software in unmodified form provided
- that the entire package, including - but not restricted to - copyright,
- trademark notices and disclaimers, as released by the initial developer
- of the Software, is distributed.
-
-3. You may make modifications to the Software and distribute your
- modifications, in a form that is separate from the Software, such as
- patches. The following restrictions apply to modifications:
-
- a. Modifications must not alter or remove any copyright notices in
- the Software.
-
- b. When modifications to the Software are released under this
- license, a non-exclusive royalty-free right is granted to the
- initial developer of the Software to distribute your modification
- in future versions of the Software provided such versions remain
- available under these terms in addition to any other license(s) of
- the initial developer.
-
-4. You may distribute machine-executable forms of the Software or
- machine-executable forms of modified versions of the Software, provided
- that you meet these restrictions:
-
- a. You must include this license document in the distribution.
-
- b. You must ensure that all recipients of the machine-executable forms
- are also able to receive the complete machine-readable source code
- to the distributed Software, including all modifications, without
- any charge beyond the costs of data transfer, and place prominent
- notices in the distribution explaining this.
-
- c. You must ensure that all modifications included in the
- machine-executable forms are available under the terms of this
- license.
-
-5. You may use the original or modified versions of the Software to
- compile, link and run application programs legally developed by you
- or by others.
-
-6. You may develop application programs, reusable components and other
- software items that link with the original or modified versions of the
- Software. These items, when distributed, are subject to the following
- requirements:
-
- a. You must ensure that all recipients of machine-executable forms of
- these items are also able to receive and use the complete
- machine-readable source code to the items without any charge
- beyond the costs of data transfer.
-
- b. You must explicitly license all recipients of your items to use
- and re-distribute original and modified versions of the items in
- both machine-executable and source code forms. The recipients must
- be able to do so without any charges whatsoever, and they must be
- able to re-distribute to anyone they choose.
-
-
- c. If the items are not available to the general public, and the
- initial developer of the Software requests a copy of the items,
- then you must supply one.
-
- Limitations of Liability
-
-In no event shall the initial developers or copyright holders be liable
-for any damages whatsoever, including - but not restricted to - lost
-revenue or profits or other direct, indirect, special, incidental or
-consequential damages, even if they have been advised of the possibility
-of such damages, except to the extent invariable law, if any, provides
-otherwise.
-
- No Warranty
-
-The Software and this license document are provided AS IS with NO WARRANTY
-OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS
-FOR A PARTICULAR PURPOSE.
- Choice of Law
-
-This license is governed by the Laws of Norway. Disputes shall be settled
-by Oslo City Court.
diff --git a/qtools/Makefile.in b/qtools/Makefile.in
deleted file mode 100644
index 411ee5d..0000000
--- a/qtools/Makefile.in
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-#
-#
-# Copyright (C) 1997-2000 by Dimitri van Heesch.
-#
-# Permission to use, copy, modify, and distribute this software and its
-# documentation under the terms of the GNU General Public License is hereby
-# granted. No representations are made about the suitability of this software
-# for any purpose. It is provided "as is" without express or implied warranty.
-# See the GNU General Public License for more details.
-#
-# Documents produced by Doxygen are derivative works derived from the
-# input used in their production; they are not affected by this license.
-#
-
-all: Makefile.qtools Makefile
- $(MAKE) -f Makefile.qtools $@
-
-Makefile.qtools: qtools.pro
- $(ENV) $(PERL) "$(TMAKE)" qtools.pro >Makefile.qtools
-
-tmake:
- $(ENV) $(PERL) "$(TMAKE)" qtools.pro >Makefile.qtools
-
-clean: Makefile.qtools
- $(MAKE) -f Makefile.qtools clean
-
-distclean: clean
- $(RM) Makefile.qtools
-
-FORCE:
diff --git a/qtools/README b/qtools/README
deleted file mode 100644
index 1e7fc8d..0000000
--- a/qtools/README
+++ /dev/null
@@ -1,4 +0,0 @@
-This directory contains a small subset of Troll-Tech's Qt library
-The subset is enough to build the doxygen executable, but lacks many of
-the features found in the Qt library. See http://www.trolltech.com
-for the full package.
diff --git a/qtools/qarray.doc b/qtools/qarray.doc
deleted file mode 100644
index 6914dbc..0000000
--- a/qtools/qarray.doc
+++ /dev/null
@@ -1,486 +0,0 @@
-/****************************************************************************
-**
-**
-** QArray class documentation
-**
-** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
-**
-** This file is part of the Qt GUI Toolkit.
-**
-** This file may be distributed under the terms of the Q Public License
-** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-
-/*****************************************************************************
- QArray documentation
- *****************************************************************************/
-
-/*!
- \class QArray qarray.h
- \brief The QArray class is a template class that provides arrays of simple types.
-
- \ingroup tools
-
- QArray is implemented as a template class. Define a template
- instance QArray\<X\> to create an array that contains X items.
-
- QArray stores the array elements directly in the array. It can only
- deal with simple types, i.e. C++ types, structs and classes that have
- no constructors, destructors or virtual functions. QArray uses
- bitwise operations to copy and compare array elements.
-
- The QVector collection class is also a kind of array. Like most
- \link collection.html collection classes\endlink, it has pointers to the
- contained items.
-
- QArray uses explicit \link shclass.html sharing\endlink with a reference
- count. If more than one array share common data, and one array is
- modified, all arrays will be modified.
-
- The benefit of sharing is that a program does not need to duplicate
- data when it is not required, which results in less memory usage and
- less copying of data.
-
- Example:
- \code
- #include <qarray.h>
- #include <stdio.h>
-
- QArray<int> fib( int num ) // returns fibonacci array
- {
- ASSERT( num > 2 );
- QArray<int> f( num ); // array of ints
-
- f[0] = f[1] = 1; // initialize first two numbers
- for ( int i=2; i<num; i++ )
- f[i] = f[i-1] + f[i-2];
-
- return f;
- }
-
- void main()
- {
- QArray<int> a = fib( 6 ); // get 6 first fibonaccis
- int i;
-
- for ( i=0; i<a.size(); i++ ) // print them
- prinf( "%d: %d\n", i, a[i] );
-
- printf( "1 is found %d time(s)\n", a.contains(1) );
- printf( "5 is found at index %d\n", a.find(5) );
- }
- \endcode
-
- Program output:
- \code
- 0: 1
- 1: 1
- 2: 2
- 3: 3
- 4: 5
- 5: 8
- 1 is found 2 times
- 5 is found at index 4
- \endcode
-
- Note about using QArray for manipulating structs or classes:
- Compilers will often pad the size of structs of odd sizes up to the
- nearest word boundary. This will then be the size QArray will use
- for its bitwise element comparisons. Since the remaining bytes will
- typically be uninitialized, this can cause find() etc. to fail to
- find the element. Example:
-
- \code
- struct MyStruct
- {
- short i; // 2 bytes
- char c; // 1 byte
- }; // sizeof(MyStruct) may be padded to 4 bytes
-
- QArray<MyStruct> a(1);
- a[0].i = 5;
- a[0].c = 't';
-
- MyStruct x;
- x.i = '5';
- x.c = 't';
- int i = a.find( x ); // May return -1 if the pad bytes differ
- \endcode
-
- To workaround this, make sure that you use a struct where sizeof()
- returns the same as the sum of the sizes of the members, either by
- changing the types of the struct members or by adding dummy members.
-
- \sa \link shclass.html Shared Classes\endlink
-*/
-
-
-/*!
- \fn QArray::QArray()
- Constructs a null array.
- \sa isNull()
-*/
-
-/*!
- \fn QArray::QArray( int size )
- Constructs an array with room for \e size elements.
- Makes a null array if \e size == 0.
-
- Note that the elements are not initialized.
-
- \sa resize(), isNull()
-*/
-
-/*!
- \fn QArray::QArray( const QArray<type> &a )
- Constructs a shallow copy of \e a.
- \sa assign()
-*/
-
-/*!
- \fn QArray::QArray( int, int )
- Constructs an array <em>without allocating</em> array space.
- The arguments should be (0, 0). Use at own risk.
-*/
-
-/*!
- \fn QArray::~QArray()
- Dereferences the array data and deletes it if this was the last
- reference.
-*/
-
-/*!
- \fn QArray<type> &QArray::operator=( const QArray<type> &a )
- Assigns a shallow copy of \e a to this array and returns a reference
- to this array.
-
- Equivalent to assign( a ).
-*/
-
-/*!
- \fn type *QArray::data() const
- Returns a pointer to the actual array data.
-
- The array is a null array if data() == 0 (null pointer).
-
- \sa isNull()
-*/
-
-/*!
- \fn uint QArray::nrefs() const
- Returns the reference count for the shared array data. This reference count
- is always greater than zero.
-*/
-
-/*!
- \fn uint QArray::size() const
- Returns the size of the array (max number of elements).
-
- The array is a null array if size() == 0.
-
- \sa isNull(), resize()
-*/
-
-/*!
- \fn uint QArray::count() const
- Returns the same as size().
-
- \sa size()
-*/
-
-/*!
- \fn bool QArray::isEmpty() const
- Returns TRUE if the array is empty, i.e. size() == 0, otherwise FALSE.
-
- isEmpty() is equivalent with isNull() for QArray. Note that this is not
- the case for QCString::isEmpty().
-*/
-
-/*!
- \fn bool QArray::isNull() const
- Returns TRUE if the array is null, otherwise FALSE.
-
- A null array has size() == 0 and data() == 0.
-*/
-
-/*!
- \fn bool QArray::resize( uint size )
- Resizes (expands or shrinks) the array to \e size elements. The array
- becomes a null array if \e size == 0.
-
- Returns TRUE if successful, or FALSE if the memory cannot be allocated.
-
- New elements will not be initialized.
-
- \sa size()
-*/
-
-/*!
- \fn bool QArray::truncate( uint pos )
- Truncates the array at position \e pos.
-
- Returns TRUE if successful, or FALSE if the memory cannot be allocated.
-
- Equivalent to resize(\e pos).
-
- \sa resize()
-*/
-
-/*!
- \fn bool QArray::fill( const type &v, int size )
- Fills the array with the value \e v. If \e size is specified as different
- from -1, then the array will be resized before filled.
-
- Returns TRUE if successful, or FALSE if the memory cannot be allocated
- (only when \e size != -1).
-
- \sa resize()
-*/
-
-/*!
- \fn void QArray::detach()
- Detaches this array from shared array data, i.e. makes a private, deep
- copy of the data.
-
- Copying will only be performed if the
- \link nrefs() reference count\endlink is greater than one.
-
- \sa copy()
-*/
-
-/*!
- \fn QArray<type> QArray::copy() const
- Returns a deep copy of this array.
- \sa detach(), duplicate()
-*/
-
-/*!
- \fn QArray<type> &QArray::assign( const QArray<type> &a )
- Shallow copy. Dereferences the current array and references the data
- contained in \e a instead. Returns a reference to this array.
- \sa operator=()
-*/
-
-/*!
- \fn QArray<type> &QArray::assign( const type *data, uint size )
- Shallow copy. Dereferences the current array and references the
- array data \e data, which contains \e size elements.
- Returns a reference to this array.
-
- Do not delete \e data later, QArray takes care of that.
-*/
-
-/*!
- \fn QArray<type> &QArray::duplicate( const QArray<type> &a )
- Deep copy. Dereferences the current array and obtains a copy of the data
- contained in \e a instead. Returns a reference to this array.
- \sa copy()
-*/
-
-/*!
- \fn QArray<type> &QArray::duplicate( const type *data, uint size )
- Deep copy. Dereferences the current array and obtains a copy of the
- array data \e data instead. Returns a reference to this array.
- \sa copy()
-*/
-
-/*!
- \fn QArray<type> &QArray::setRawData( const type *data, uint size )
-
- Sets raw data and returns a reference to the array.
-
- Dereferences the current array and sets the new array data to \e data and
- the new array size to \e size. Do not attempt to resize or re-assign the
- array data when raw data has been set.
- Call resetRawData(d,len) to reset the array.
-
- Setting raw data is useful because it sets QArray data without allocating
- memory or copying data.
-
- Example I (intended use):
- \code
- static char bindata[] = { 231, 1, 44, ... };
- QByteArray a;
- a.setRawData( bindata, sizeof(bindata) ); // a points to bindata
- QDataStream s( a, IO_ReadOnly ); // open on a's data
- s >> <something>; // read raw bindata
- a.resetRawData( bindata, sizeof(bindata) ); // finished
- \endcode
-
- Example II (you don't want to do this):
- \code
- static char bindata[] = { 231, 1, 44, ... };
- QByteArray a, b;
- a.setRawData( bindata, sizeof(bindata) ); // a points to bindata
- a.resize( 8 ); // will crash
- b = a; // will crash
- a[2] = 123; // might crash
- // forget to resetRawData - will crash
- \endcode
-
- \warning If you do not call resetRawData(), QArray will attempt to
- deallocate or reallocate the raw data, which might not be too good.
- Be careful.
-
- \sa resetRawData()
-*/
-
-/*!
- \fn void QArray::resetRawData( const type *data, uint size )
- Resets raw data that was set using setRawData().
-
- The arguments must be the data and length that were passed to
- setRawData(). This is for consistency checking.
-
- \sa setRawData()
-*/
-
-/*!
- \fn int QArray::find( const type &v, uint index ) const
- Finds the first occurrence of \e v, starting at position \e index.
-
- Returns the position of \e v, or -1 if \e v could not be found.
-
- \sa contains()
-*/
-
-/*!
- \fn int QArray::contains( const type &v ) const
- Returns the number of times \e v occurs in the array.
- \sa find()
-*/
-
-/*!
- \fn void QArray::sort()
- Sorts the array elements in ascending order, using bitwise
- comparison (memcmp()).
-
- \sa bsearch()
-*/
-
-/*!
- \fn int QArray::bsearch( const type &v ) const
- In a sorted array, finds the first occurrence of \e v using binary
- search. For a sorted array, this is generally much faster than
- find(), which does a linear search.
-
- Returns the position of \e v, or -1 if \e v could not be found.
-
- \sa sort(), find()
-*/
-
-/*!
- \fn type &QArray::operator[]( int index ) const
- Returns a reference to the element at position \e index in the array.
-
- This can be used to both read and set an element. Equivalent to at().
-
- \sa at()
-*/
-
-/*!
- \fn type &QArray::at( uint index ) const
- Returns a reference to the element at position \e index in the array.
-
- This can be used to both read and set an element.
-
- \sa operator[]()
-*/
-
-/*!
- \fn QArray::operator const type *() const
- Cast operator. Returns a pointer to the array.
- \sa data()
-*/
-
-/*!
- \fn bool QArray::operator==( const QArray<type> &a ) const
- Returns TRUE if this array is equal to \e a, otherwise FALSE.
-
- The two arrays are bitwise compared.
-
- \sa operator!=()
-*/
-
-/*!
- \fn bool QArray::operator!=( const QArray<type> &a ) const
- Returns TRUE if this array is different from \e a, otherwise FALSE.
-
- The two arrays are bitwise compared.
-
- \sa operator==()
-*/
-
-/*!
- \fn Iterator QArray::begin()
- Returns an iterator pointing at the beginning of this array.
- This iterator can be used as the iterators of QValueList and QMap
- for example. In fact it does not only behave like a usual pointer:
- It is a pointer.
-*/
-
-/*!
- \fn Iterator QArray::end()
- Returns an iterator pointing behind the last element of this array.
- This iterator can be used as the iterators of QValueList and QMap
- for example. In fact it does not only behave like a usual pointer:
- It is a pointer.
-*/
-
-/*!
- \fn ConstIterator QArray::begin() const
- Returns a const iterator pointing at the beginning of this array.
- This iterator can be used as the iterators of QValueList and QMap
- for example. In fact it does not only behave like a usual pointer:
- It is a pointer.
-*/
-
-/*!
- \fn ConstIterator QArray::end() const
- Returns a const iterator pointing behind the last element of this array.
- This iterator can be used as the iterators of QValueList and QMap
- for example. In fact it does not only behave like a usual pointer:
- It is a pointer.
-*/
-
-
-/*****************************************************************************
- QByteArray documentation
- *****************************************************************************/
-
-/*!
- \class QByteArray qcstring.h
- \brief The QByteArray class provides an array of bytes.
-
- \inherit QArray
-
- \ingroup tools
-
- The QByteArray class provides an explicitly shared array of
- bytes. It is useful for manipulating memory areas with custom
- data. QByteArray is implemented as QArray<char>. See the QArray
- documentation for further information.
-*/
diff --git a/qtools/qarray.h b/qtools/qarray.h
deleted file mode 100644
index 3d67fe9..0000000
--- a/qtools/qarray.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/****************************************************************************
-**
-**
-** Definition of QArray template/macro class
-**
-** Created : 930906
-**
-** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
-**
-** This file is part of the tools module of the Qt GUI Toolkit.
-**
-** This file may be distributed under the terms of the Q Public License
-** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#ifndef QARRAY_H
-#define QARRAY_H
-
-#ifndef QT_H
-#include "qgarray.h"
-#endif // QT_H
-
-
-template<class type> class Q_EXPORT QArray : public QGArray
-{
-public:
- typedef type* Iterator;
- typedef const type* ConstIterator;
- typedef type ValueType;
-
-protected:
- QArray( int, int ) : QGArray( 0, 0 ) {}
-
-public:
- QArray() {}
- QArray( int size ) : QGArray(size*(int)sizeof(type)) {}
- QArray( const QArray<type> &a ) : QGArray(a) {}
- ~QArray() {}
- QArray<type> &operator=(const QArray<type> &a)
- { return (QArray<type>&)QGArray::assign(a); }
- type *data() const { return (type *)QGArray::data(); }
- uint nrefs() const { return QGArray::nrefs(); }
- uint size() const { return QGArray::size()/(int)sizeof(type); }
- uint count() const { return size(); }
- bool isEmpty() const { return QGArray::size() == 0; }
- bool isNull() const { return QGArray::data() == 0; }
- bool resize( uint size ) { return QGArray::resize(size*(int)sizeof(type)); }
- bool truncate( uint pos ) { return QGArray::resize(pos*(int)sizeof(type)); }
- bool fill( const type &d, int size = -1 )
- { return QGArray::fill((char*)&d,size,sizeof(type) ); }
- void detach() { QGArray::detach(); }
- QArray<type> copy() const
- { QArray<type> tmp; return tmp.duplicate(*this); }
- QArray<type>& assign( const QArray<type>& a )
- { return (QArray<type>&)QGArray::assign(a); }
- QArray<type>& assign( const type *a, uint n )
- { return (QArray<type>&)QGArray::assign((char*)a,n*sizeof(type)); }
- QArray<type>& duplicate( const QArray<type>& a )
- { return (QArray<type>&)QGArray::duplicate(a); }
- QArray<type>& duplicate( const type *a, uint n )
- { return (QArray<type>&)QGArray::duplicate((char*)a,n*sizeof(type)); }
- QArray<type>& setRawData( const type *a, uint n )
- { return (QArray<type>&)QGArray::setRawData((char*)a,
- n*sizeof(type)); }
- void resetRawData( const type *a, uint n )
- { QGArray::resetRawData((char*)a,n*sizeof(type)); }
- int find( const type &d, uint i=0 ) const
- { return QGArray::find((char*)&d,i,sizeof(type)); }
- int contains( const type &d ) const
- { return QGArray::contains((char*)&d,sizeof(type)); }
- void sort() { QGArray::sort(sizeof(type)); }
- int bsearch( const type &d ) const
- { return QGArray::bsearch((const char*)&d,sizeof(type)); }
- type& operator[]( int i ) const
- { return (type &)(*(type *)QGArray::at(i*(int)sizeof(type))); }
- type& at( uint i ) const
- { return (type &)(*(type *)QGArray::at(i*(int)sizeof(type))); }
- operator const type*() const { return (const type *)QGArray::data(); }
- bool operator==( const QArray<type> &a ) const { return isEqual(a); }
- bool operator!=( const QArray<type> &a ) const { return !isEqual(a); }
- Iterator begin() { return data(); }
- Iterator end() { return data() + size(); }
- ConstIterator begin() const { return data(); }
- ConstIterator end() const { return data() + size(); }
-};
-
-
-#endif // QARRAY_H
diff --git a/qtools/qasciidict.h b/qtools/qasciidict.h
deleted file mode 100644
index 6a93a02..0000000
--- a/qtools/qasciidict.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/****************************************************************************
-**
-**
-** Definition of QAsciiDict template class
-**
-** Created : 920821
-**
-** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
-**
-** This file is part of the tools module of the Qt GUI Toolkit.
-**
-** This file may be distributed under the terms of the Q Public License
-** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#ifndef QASCIIDICT_H
-#define QASCIIDICT_H
-
-#ifndef QT_H
-#include "qgdict.h"
-#endif // QT_H
-
-
-template<class type> class Q_EXPORT QAsciiDict : public QGDict
-{
-public:
- QAsciiDict(uint size=17, bool caseSensitive=TRUE, bool copyKeys=TRUE )
- : QGDict(size,AsciiKey,caseSensitive,copyKeys) {}
- QAsciiDict( const QAsciiDict<type> &d ) : QGDict(d) {}
- ~QAsciiDict() { clear(); }
- QAsciiDict<type> &operator=(const QAsciiDict<type> &d)
- { return (QAsciiDict<type>&)QGDict::operator=(d); }
- uint count() const { return QGDict::count(); }
- uint size() const { return QGDict::size(); }
- bool isEmpty() const { return QGDict::count() == 0; }
-
- void insert( const char *k, const type *d )
- { QGDict::look_ascii(k,(Item)d,1); }
- void replace( const char *k, const type *d )
- { QGDict::look_ascii(k,(Item)d,2); }
- bool remove( const char *k ) { return QGDict::remove_ascii(k); }
- type *take( const char *k ) { return (type *)QGDict::take_ascii(k); }
- type *find( const char *k ) const
- { return (type *)((QGDict*)this)->QGDict::look_ascii(k,0,0); }
- type *operator[]( const char *k ) const
- { return (type *)((QGDict*)this)->QGDict::look_ascii(k,0,0); }
-
- void clear() { QGDict::clear(); }
- void resize( uint n ) { QGDict::resize(n); }
- void statistics() const { QGDict::statistics(); }
-private:
- void deleteItem( Item d );
-};
-
-#if defined(Q_DELETING_VOID_UNDEFINED)
-template<> inline void QAsciiDict<void>::deleteItem( Item )
-{
-}
-#endif
-
-template<class type> inline void QAsciiDict<type>::deleteItem( QCollection::Item d )
-{
- if ( del_item ) delete (type *)d;
-}
-
-
-template<class type> class Q_EXPORT QAsciiDictIterator : public QGDictIterator
-{
-public:
- QAsciiDictIterator(const QAsciiDict<type> &d)
- : QGDictIterator((QGDict &)d) {}
- ~QAsciiDictIterator() {}
- uint count() const { return dict->count(); }
- bool isEmpty() const { return dict->count() == 0; }
- type *toFirst() { return (type *)QGDictIterator::toFirst(); }
- operator type *() const { return (type *)QGDictIterator::get(); }
- type *current() const { return (type *)QGDictIterator::get(); }
- const char *currentKey() const { return QGDictIterator::getKeyAscii(); }
- type *operator()() { return (type *)QGDictIterator::operator()(); }
- type *operator++() { return (type *)QGDictIterator::operator++(); }
- type *operator+=(uint j) { return (type *)QGDictIterator::operator+=(j);}
-};
-
-
-#endif // QASCIIDICT_H
diff --git a/qtools/qbuffer.cpp b/qtools/qbuffer.cpp
deleted file mode 100644
index f68ef54..0000000
--- a/qtools/qbuffer.cpp
+++ /dev/null
@@ -1,465 +0,0 @@
-/****************************************************************************
-**
-**
-** Implementation of QBuffer class
-**
-** Created : 930812
-**
-** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
-**
-** This file is part of the tools module of the Qt GUI Toolkit.
-**
-** This file may be distributed under the terms of the Q Public License
-** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#include "qbuffer.h"
-#include <stdlib.h>
-
-// REVISED: paul
-/*!
- \class QBuffer qbuffer.h
- \brief The QBuffer class is an I/O device that operates on a QByteArray
-
- \ingroup io
-
- QBuffer allows reading and writing a memory buffer. It is normally
- used together with a QTextStream or a QDataStream. QBuffer has an
- associated QByteArray which holds the buffer data. The size() of the
- buffer is automatically adjusted as data is written.
-
- The constructor \c QBuffer(QByteArray) creates a QBuffer with an
- existing byte array. The byte array can also be set with setBuffer().
- Writing to the QBuffer will modify the original byte array, since
- QByteArray is \link shclass.html explicitly shared.\endlink
-
- Use open() to open the buffer before use, and to set the mode
- (read-only,write-only, etc.). close() closes the buffer. The buffer
- must be closed before reopening or calling setBuffer().
-
- The common way to use QBuffer is through \l QDataStream or \l QTextStream
- which have constructors that take a QBuffer parameter. For
- convenience, there are also QDataStream and QTextStream constructors
- that take a QByteArray parameter. These constructors create and open
- an internal QBuffer.
-
- Note that QTextStream can also operate on a QString (a Unicode
- string); a QBuffer cannot.
-
- You can also use QBuffer directly through the standard QIODevice
- functions readBlock(), writeBlock() readLine(), at(), getch(), putch() and
- ungetch().
-
- \sa QFile, QDataStream, QTextStream, QByteArray, \link shclass.html Shared Classes\endlink
-*/
-
-
-/*!
- Constructs an empty buffer.
-*/
-
-QBuffer::QBuffer()
-{
- setFlags( IO_Direct );
- a_inc = 16; // initial increment
- a_len = 0;
- ioIndex = 0;
-}
-
-
-/*!
- Constructs a buffer that operates on \a buf.
- If you open the buffer in write mode (\c IO_WriteOnly or
- \c IO_ReadWrite) and write something into the buffer, \a buf
- will be modified.
-
-
- Example:
- \code
- QCString str = "abc";
- QBuffer b( str );
- b.open( IO_WriteOnly );
- b.at( 3 ); // position at \0
- b.writeBlock( "def", 4 ); // write including \0
- b.close();
- // Now, str == "abcdef"
- \endcode
-
-
- \sa setBuffer()
-*/
-
-QBuffer::QBuffer( QByteArray buf ) : a(buf)
-{
- setFlags( IO_Direct );
- a_len = a.size();
- a_inc = (a_len > 512) ? 512 : a_len; // initial increment
- if ( a_inc < 16 )
- a_inc = 16;
- ioIndex = 0;
-}
-
-/*!
- Destructs the buffer.
-*/
-
-QBuffer::~QBuffer()
-{
-}
-
-
-/*!
- Replaces the buffer's contents with \a buf.
-
- This may not be done when isOpen() is TRUE.
-
- Note that if you open the buffer in write mode (\c IO_WriteOnly or
- IO_ReadWrite) and write something into the buffer, \a buf is also
- modified because QByteArray is an explicitly shared class.
-
- \sa buffer(), open(), close()
-*/
-
-bool QBuffer::setBuffer( QByteArray buf )
-{
- if ( isOpen() ) {
-#if defined(CHECK_STATE)
- qWarning( "QBuffer::setBuffer: Buffer is open");
-#endif
- return FALSE;
- }
- a = buf;
- a_len = a.size();
- a_inc = (a_len > 512) ? 512 : a_len; // initial increment
- if ( a_inc < 16 )
- a_inc = 16;
- ioIndex = 0;
- return TRUE;
-}
-
-/*!
- \fn QByteArray QBuffer::buffer() const
-
- Returns this buffer's byte array.
-
- \sa setBuffer()
-*/
-
-/*!
- \reimp
- Opens the buffer in the mode \a m. Returns TRUE if successful,
- otherwise FALSE. The buffer must be opened before use.
-
- The mode parameter \a m must be a combination of the following flags.
- <ul>
- <li>\c IO_ReadOnly opens a buffer in read-only mode.
- <li>\c IO_WriteOnly opens a buffer in write-only mode.
- <li>\c IO_ReadWrite opens a buffer in read/write mode.
- <li>\c IO_Append sets the buffer index to the end of the buffer.
- <li>\c IO_Truncate truncates the buffer.
- </ul>
-
- \sa close(), isOpen()
-*/
-
-bool QBuffer::open( int m )
-{
- if ( isOpen() ) { // buffer already open
-#if defined(CHECK_STATE)
- qWarning( "QBuffer::open: Buffer already open" );
-#endif
- return FALSE;
- }
- setMode( m );
- if ( m & IO_Truncate ) { // truncate buffer
- a.resize( 0 );
- a_len = 0;
- }
- if ( m & IO_Append ) { // append to end of buffer
- ioIndex = a.size();
- } else {
- ioIndex = 0;
- }
- a_inc = 16;
- setState( IO_Open );
- setStatus( 0 );
- return TRUE;
-}
-
-/*!
- \reimp
- Closes an open buffer.
- \sa open()
-*/
-
-void QBuffer::close()
-{
- if ( isOpen() ) {
- setFlags( IO_Direct );
- ioIndex = 0;
- a_inc = 16;
- }
-}
-
-/*!
- \reimp
- The flush function does nothing for a QBuffer.
-*/
-
-void QBuffer::flush()
-{
- return;
-}
-
-
-/*!
- \fn int QBuffer::at() const
- \reimp
-*/
-
-/*!
- \fn uint QBuffer::size() const
- \reimp
-*/
-
-/*!
- \reimp
-*/
-
-bool QBuffer::at( int pos )
-{
-#if defined(CHECK_STATE)
- if ( !isOpen() ) {
- qWarning( "QBuffer::at: Buffer is not open" );
- return FALSE;
- }
-#endif
- if ( (uint)pos > a_len ) {
-#if defined(CHECK_RANGE)
- qWarning( "QBuffer::at: Index %d out of range", pos );
-#endif
- return FALSE;
- }
- ioIndex = pos;
- return TRUE;
-}
-
-
-/*!
- \reimp
-*/
-
-int QBuffer::readBlock( char *p, uint len )
-{
-#if defined(CHECK_STATE)
- CHECK_PTR( p );
- if ( !isOpen() ) { // buffer not open
- qWarning( "QBuffer::readBlock: Buffer not open" );
- return -1;
- }
- if ( !isReadable() ) { // reading not permitted
- qWarning( "QBuffer::readBlock: Read operation not permitted" );
- return -1;
- }
-#endif
- if ( (uint)ioIndex + len > a.size() ) { // overflow
- if ( (uint)ioIndex >= a.size() ) {
- setStatus( IO_ReadError );
- return -1;
- } else {
- len = a.size() - (uint)ioIndex;
- }
- }
- memcpy( p, a.data()+ioIndex, len );
- ioIndex += len;
- return len;
-}
-
-/*!
- \reimp
-
- Writes \a len bytes from \a p into the buffer at the current index,
- overwriting any characters there and extending the buffer if necessary.
- Returns the number of bytes actually written.
-
- Returns -1 if a serious error occurred.
-
- \sa readBlock()
-*/
-
-int QBuffer::writeBlock( const char *p, uint len )
-{
-#if defined(CHECK_NULL)
- if ( p == 0 && len != 0 )
- qWarning( "QBuffer::writeBlock: Null pointer error" );
-#endif
-#if defined(CHECK_STATE)
- if ( !isOpen() ) { // buffer not open
- qWarning( "QBuffer::writeBlock: Buffer not open" );
- return -1;
- }
- if ( !isWritable() ) { // writing not permitted
- qWarning( "QBuffer::writeBlock: Write operation not permitted" );
- return -1;
- }
-#endif
- if ( (uint)ioIndex + len >= a_len ) { // overflow
- uint new_len = a_len + a_inc*(((uint)ioIndex+len-a_len)/a_inc+1);
- if ( !a.resize( new_len ) ) { // could not resize
-#if defined(CHECK_NULL)
- qWarning( "QBuffer::writeBlock: Memory allocation error" );
-#endif
- setStatus( IO_ResourceError );
- return -1;
- }
- a_inc *= 2; // double increment
- a_len = new_len;
- a.shd->len = (uint)ioIndex + len;
- }
- memcpy( a.data()+ioIndex, p, len );
- ioIndex += len;
- if ( a.shd->len < (uint)ioIndex )
- a.shd->len = (uint)ioIndex; // fake (not alloc'd) length
- return len;
-}
-
-
-/*!
- \reimp
-*/
-
-int QBuffer::readLine( char *p, uint maxlen )
-{
-#if defined(CHECK_STATE)
- CHECK_PTR( p );
- if ( !isOpen() ) { // buffer not open
- qWarning( "QBuffer::readLine: Buffer not open" );
- return -1;
- }
- if ( !isReadable() ) { // reading not permitted
- qWarning( "QBuffer::readLine: Read operation not permitted" );
- return -1;
- }
-#endif
- if ( maxlen == 0 )
- return 0;
- uint start = (uint)ioIndex;
- char *d = a.data() + ioIndex;
- maxlen--; // make room for 0-terminator
- if ( a.size() - (uint)ioIndex < maxlen )
- maxlen = a.size() - (uint)ioIndex;
- while ( maxlen-- ) {
- if ( (*p++ = *d++) == '\n' )
- break;
- }
- *p = '\0';
- ioIndex = (int)(d - a.data());
- return (uint)ioIndex - start;
-}
-
-
-/*!
- \reimp
-*/
-
-int QBuffer::getch()
-{
-#if defined(CHECK_STATE)
- if ( !isOpen() ) { // buffer not open
- qWarning( "QBuffer::getch: Buffer not open" );
- return -1;
- }
- if ( !isReadable() ) { // reading not permitted
- qWarning( "QBuffer::getch: Read operation not permitted" );
- return -1;
- }
-#endif
- if ( (uint)ioIndex+1 > a.size() ) { // overflow
- setStatus( IO_ReadError );
- return -1;
- }
- return uchar(*(a.data()+ioIndex++));
-}
-
-/*!
- \reimp
- Writes the character \a ch into the buffer, overwriting
- the character at the current index, extending the buffer
- if necessary.
-
- Returns \a ch, or -1 if some error occurred.
-
- \sa getch(), ungetch()
-*/
-
-int QBuffer::putch( int ch )
-{
-#if defined(CHECK_STATE)
- if ( !isOpen() ) { // buffer not open
- qWarning( "QBuffer::putch: Buffer not open" );
- return -1;
- }
- if ( !isWritable() ) { // writing not permitted
- qWarning( "QBuffer::putch: Write operation not permitted" );
- return -1;
- }
-#endif
- if ( (uint)ioIndex + 1 >= a_len ) { // overflow
- char buf[1];
- buf[0] = (char)ch;
- if ( writeBlock(buf,1) != 1 )
- return -1; // write error
- } else {
- *(a.data() + ioIndex++) = (char)ch;
- if ( a.shd->len < (uint)ioIndex )
- a.shd->len = (uint)ioIndex;
- }
- return ch;
-}
-
-/*!
- \reimp
-*/
-
-int QBuffer::ungetch( int ch )
-{
-#if defined(CHECK_STATE)
- if ( !isOpen() ) { // buffer not open
- qWarning( "QBuffer::ungetch: Buffer not open" );
- return -1;
- }
- if ( !isReadable() ) { // reading not permitted
- qWarning( "QBuffer::ungetch: Read operation not permitted" );
- return -1;
- }
-#endif
- if ( ch != -1 ) {
- if ( ioIndex )
- ioIndex--;
- else
- ch = -1;
- }
- return ch;
-}
diff --git a/qtools/qbuffer.h b/qtools/qbuffer.h
deleted file mode 100644
index 9dcd286..0000000
--- a/qtools/qbuffer.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/****************************************************************************
-**
-**
-** Definition of QBuffer class
-**
-** Created : 930812
-**
-** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
-**
-** This file is part of the tools module of the Qt GUI Toolkit.
-**
-** This file may be distributed under the terms of the Q Public License
-** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#ifndef QBUFFER_H
-#define QBUFFER_H
-
-#ifndef QT_H
-#include "qiodevice.h"
-#include "qstring.h"
-#endif // QT_H
-
-
-class Q_EXPORT QBuffer : public QIODevice
-{
-public:
- QBuffer();
- QBuffer( QByteArray );
- ~QBuffer();
-
- QByteArray buffer() const;
- bool setBuffer( QByteArray );
-
- bool open( int );
- void close();
- void flush();
-
- uint size() const;
- int at() const;
- bool at( int );
-
- int readBlock( char *p, uint );
- int writeBlock( const char *p, uint );
- int readLine( char *p, uint );
-
- int getch();
- int putch( int );
- int ungetch( int );
-
-protected:
- QByteArray a;
-
-private:
- uint a_len;
- uint a_inc;
-
-private: // Disabled copy constructor and operator=
-#if defined(Q_DISABLE_COPY)
- QBuffer( const QBuffer & );
- QBuffer &operator=( const QBuffer & );
-#endif
-};
-
-
-inline QByteArray QBuffer::buffer() const
-{ return a; }
-
-inline uint QBuffer::size() const
-{ return a.size(); }
-
-inline int QBuffer::at() const
-{ return ioIndex; }
-
-
-#endif // QBUFFER_H
diff --git a/qtools/qcollection.cpp b/qtools/qcollection.cpp
deleted file mode 100644
index 4f86227..0000000
--- a/qtools/qcollection.cpp
+++ /dev/null
@@ -1,182 +0,0 @@
-/****************************************************************************
-**
-**
-** Implementation of base class for all collection classes
-**
-** Created : 920820
-**
-** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
-**
-** This file is part of the tools module of the Qt GUI Toolkit.
-**
-** This file may be distributed under the terms of the Q Public License
-** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#include "qcollection.h"
-
-// NOT REVISED
-/*!
- \class QCollection qcollection.h
- \brief The QCollection class is the base class of all Qt collections.
-
- \ingroup collection
- \ingroup tools
-
- The QCollection class is an abstract base class for the Qt \link
- collection.html collection classes\endlink QDict, QList etc. via QGDict,
- QGList etc.
-
- A QCollection knows only about the number of objects in the
- collection and the deletion strategy (see setAutoDelete()).
-
- A collection is implemented using the \c Item (generic collection
- item) type, which is a \c void*. The template classes that create
- the real collections cast the \c Item to the required type.
-
- \sa \link collection.html Collection Classes\endlink
-*/
-
-
-/*! \typedef QCollection::Item
-
- This type is the generic "item" in a QCollection.
-*/
-
-
-/*!
- \fn QCollection::QCollection()
-
- Constructs a collection. The constructor is protected because
- QCollection is an abstract class.
-*/
-
-/*!
- \fn QCollection::QCollection( const QCollection & source )
-
- Constructs a copy of \a source with autoDelete() set to FALSE. The
- constructor is protected because QCollection is an abstract class.
-
- Note that if \a source has autoDelete turned on, copying it is a
- good way to get memory leaks, reading freed memory, or both.
-*/
-
-/*!
- \fn QCollection::~QCollection()
- Destroys the collection. The destructor is protected because QCollection
- is an abstract class.
-*/
-
-
-/*!
- \fn bool QCollection::autoDelete() const
- Returns the setting of the auto-delete option (default is FALSE).
- \sa setAutoDelete()
-*/
-
-/*!
- \fn void QCollection::setAutoDelete( bool enable )
-
- Sets the auto-delete option of the collection.
-
- Enabling auto-delete (\e enable is TRUE) will delete objects that
- are removed from the collection. This can be useful if the
- collection has the only reference to the objects. (Note that the
- object can still be copied using the copy constructor - copying such
- objects is a good way to get memory leaks, reading freed memory or
- both.)
-
- Disabling auto-delete (\e enable is FALSE) will \e not delete objects
- that are removed from the collection. This is useful if the objects
- are part of many collections.
-
- The default setting is FALSE.
-
- \sa autoDelete()
-*/
-
-
-/*!
- \fn virtual uint QCollection::count() const
- Returns the number of objects in the collection.
-*/
-
-/*!
- \fn virtual void QCollection::clear()
- Removes all objects from the collection. The objects will be deleted
- if auto-delete has been enabled.
- \sa setAutoDelete()
-*/
-
-
-/*!
- Virtual function that creates a copy of an object that is about to
- be inserted into the collection.
-
- The default implementation returns the \e d pointer, i.e. no copy
- is made.
-
- This function is seldom reimplemented in the collection template
- classes. It is not common practice to make a copy of something
- that is being inserted.
-
- \sa deleteItem()
-*/
-
-QCollection::Item QCollection::newItem( Item d )
-{
- return d; // just return reference
-}
-
-/*!
- Virtual function that deletes an item that is about to be removed from
- the collection.
-
- The default implementation deletes \e d pointer if and only if
- auto-delete has been enabled.
-
- This function is always reimplemented in the collection template
- classes.
-
- \warning If you reimplement this function you must also reimplement
- the destructor and call the virtual function clear() from your
- destructor. This is due to the way virtual functions and
- destructors work in C++: virtual functions in derived classes cannot
- be called from a destructor. If you do not do this your
- deleteItem() function will not be called when the container is
- destructed.
-
- \sa newItem(), setAutoDelete()
-*/
-
-void QCollection::deleteItem( Item d )
-{
- if ( del_item )
-#if defined(Q_DELETING_VOID_UNDEFINED)
- delete (char *)d; // default operation
-#else
- delete d; // default operation
-#endif
-}
diff --git a/qtools/qcollection.h b/qtools/qcollection.h
deleted file mode 100644
index c187569..0000000
--- a/qtools/qcollection.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/****************************************************************************
-**
-**
-** Definition of base class for all collection classes
-**
-** Created : 920629
-**
-** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
-**
-** This file is part of the tools module of the Qt GUI Toolkit.
-**
-** This file may be distributed under the terms of the Q Public License
-** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#ifndef QCOLLECTION_H
-#define QCOLLECTION_H
-
-#ifndef QT_H
-#include "qglobal.h"
-#endif // QT_H
-
-
-class QGList;
-class QGDict;
-
-
-class Q_EXPORT QCollection // inherited by all collections
-{
-public:
- bool autoDelete() const { return del_item; }
- void setAutoDelete( bool enable ) { del_item = enable; }
-
- virtual uint count() const = 0;
- virtual void clear() = 0; // delete all objects
-
- typedef void *Item; // generic collection item
-
-protected:
- QCollection() { del_item = FALSE; } // no deletion of objects
- QCollection(const QCollection &) { del_item = FALSE; }
- virtual ~QCollection() {}
-
- bool del_item; // default FALSE
-
- virtual Item newItem( Item ); // create object
- virtual void deleteItem( Item ); // delete object
-};
-
-
-#endif // QCOLLECTION_H
diff --git a/qtools/qconfig.h b/qtools/qconfig.h
deleted file mode 100644
index 7a880f9..0000000
--- a/qtools/qconfig.h
+++ /dev/null
@@ -1 +0,0 @@
-// Everything
diff --git a/qtools/qcstringlist.cpp b/qtools/qcstringlist.cpp
deleted file mode 100644
index b8926ad..0000000
--- a/qtools/qcstringlist.cpp
+++ /dev/null
@@ -1,195 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 1997-2018 by Dimitri van Heesch.
-**
-** Permission to use, copy, modify, and distribute this software and its
-** documentation under the terms of the GNU General Public License is hereby
-** granted. No representations are made about the suitability of this software
-** for any purpose. It is provided "as is" without express or implied warranty.
-** See the GNU General Public License for more details.
-**
-** Implementation of QCStringList
-**
-**********************************************************************/
-
-#include "qcstringlist.h"
-
-#include "qstrlist.h"
-#include "qdatastream.h"
-
-/*!
- Splits the string \a str using \a sep as separator. Returns the
- list of strings. If \a allowEmptyEntries is TRUE, also empty
- entries are inserted into the list, else not. So if you have
- a string 'abc..d.e.', a list which contains 'abc', 'd', and 'e'
- would be returned if \a allowEmptyEntries is FALSE, but
- a list containing 'abc', '', 'd', 'e' and '' would be returned if
- \a allowEmptyEntries is TRUE.
- If \a str doesn't contain \a sep, a stringlist
- with one item, which is the same as \a str, is returned.
-
- \sa join()
-*/
-
-QCStringList QCStringList::split( char sep, const QCString &str, bool allowEmptyEntries )
-{
- char cs[2] = { sep, '\0' };
- return split( cs, str, allowEmptyEntries );
-}
-
-/*!
- Splits the string \a str using \a sep as separator. Returns the
- list of strings. If \a allowEmptyEntries is TRUE, also empty
- entries are inserted into the list, else not. So if you have
- a string 'abc..d.e.', a list which contains 'abc', 'd', and 'e'
- would be returned if \a allowEmptyEntries is FALSE, but
- a list containing 'abc', '', 'd', 'e' and '' would be returned if
- \a allowEmptyEntries is TRUE.
- If \a str doesn't contain \a sep, a stringlist
- with one item, which is the same as \a str, is returned.
-
- \sa join()
-*/
-
-QCStringList QCStringList::split( const QCString &sep, const QCString &str, bool allowEmptyEntries )
-{
- QCStringList lst;
-
- int j = 0;
- int i = str.find( sep, j );
-
- while ( i != -1 ) {
- if ( str.mid( j, i - j ).length() > 0 )
- lst << str.mid( j, i - j );
- else if ( allowEmptyEntries )
- lst << QCString();
- j = i + sep.length();
- i = str.find( sep, j );
- }
-
- int l = str.length() - 1;
- if ( str.mid( j, l - j + 1 ).length() > 0 )
- lst << str.mid( j, l - j + 1 );
- else if ( allowEmptyEntries )
- lst << QCString();
-
- return lst;
-}
-
-#if 0
-/*!
- Splits the string \a str using the regular expression \a sep as separator. Returns the
- list of strings. If \a allowEmptyEntries is TRUE, also empty
- entries are inserted into the list, else not. So if you have
- a string 'abc..d.e.', a list which contains 'abc', 'd', and 'e'
- would be returned if \a allowEmptyEntries is FALSE, but
- a list containing 'abc', '', 'd', 'e' and '' would be returned if
- \a allowEmptyEntries is TRUE.
- If \a str doesn't contain \a sep, a stringlist
- with one item, which is the same as \a str, is returned.
-
- \sa join()
-*/
-
-QCStringList QCStringList::split( const QRegExp &sep, const QCString &str, bool allowEmptyEntries )
-{
- QCStringList lst;
-
- int j = 0;
- int len = 0;
- int i = sep.match( str.data(), j, &len );
-
- while ( i != -1 ) {
- if ( str.mid( j, i - j ).length() > 0 )
- lst << str.mid( j, i - j );
- else if ( allowEmptyEntries )
- lst << QCString();
- j = i + len;
- i = sep.match( str.data(), j, &len );
- }
-
- int l = str.length() - 1;
- if ( str.mid( j, l - j + 1 ).length() > 0 )
- lst << str.mid( j, l - j + 1 );
- else if ( allowEmptyEntries )
- lst << QCString();
-
- return lst;
-}
-#endif
-
-/*!
- Returns a list of all strings containing the substring \a str.
-
- If \a cs is TRUE, the grep is done case sensitively, else not.
-*/
-
-QCStringList QCStringList::grep( const QCString &str, bool cs ) const
-{
- QCStringList res;
- for ( QCStringList::ConstIterator it = begin(); it != end(); ++it )
- if ( (*it).contains( str, cs ) )
- res << *it;
-
- return res;
-}
-
-#if 0
-/*!
- Returns a list of all strings containing a substring that matches
- the regular expression \a expr.
-*/
-
-QCStringList QCStringList::grep( const QRegExp &expr ) const
-{
- QCStringList res;
- for ( QCStringList::ConstIterator it = begin(); it != end(); ++it )
- if ( (*it).contains( expr ) )
- res << *it;
-
- return res;
-}
-#endif
-
-/*!
- Joins the stringlist into a single string with each element
- separated by \a sep.
-
- \sa split()
-*/
-QCString QCStringList::join( const QCString &sep ) const
-{
- QCString res;
- bool already = FALSE;
- for ( QCStringList::ConstIterator it = begin(); it != end(); ++it ) {
- if ( already )
- res += sep;
- already = TRUE;
- res += *it;
- }
-
- return res;
-}
-
-Q_EXPORT QDataStream &operator>>( QDataStream & s, QCStringList& l )
-{
- return s >> (QValueList<QCString>&)l;
-}
-
-Q_EXPORT QDataStream &operator<<( QDataStream & s, const QCStringList& l )
-{
- return s << (const QValueList<QCString>&)l;
-}
-
-/*!
- Converts from a QStrList (ASCII) to a QCStringList (Unicode).
-*/
-QCStringList QCStringList::fromStrList(const QStrList& ascii)
-{
- QCStringList res;
- const char * s;
- for ( QStrListIterator it(ascii); (s=it.current()); ++it )
- res << s;
- return res;
-}
-
diff --git a/qtools/qcstringlist.h b/qtools/qcstringlist.h
deleted file mode 100644
index 6f390b0..0000000
--- a/qtools/qcstringlist.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 1997-2018 by Dimitri van Heesch.
-**
-** Permission to use, copy, modify, and distribute this software and its
-** documentation under the terms of the GNU General Public License is hereby
-** granted. No representations are made about the suitability of this software
-** for any purpose. It is provided "as is" without express or implied warranty.
-** See the GNU General Public License for more details.
-**
-** Note: this is a variant of the qstringlist.h but for QCString's
-**
-**********************************************************************/
-#ifndef QCSTRINGLIST_H
-#define QCSTRINGLIST_H
-
-#include "qvaluelist_p.h"
-#include "qcstring.h"
-//#include "qregexp.h"
-
-class QStrList;
-class QDataStream;
-
-class QCStringList : public QValueList<QCString>
-{
-public:
- QCStringList() { }
- QCStringList( const QCStringList& l ) : QValueList<QCString>(l) { }
- QCStringList( const QValueList<QCString>& l ) : QValueList<QCString>(l) { }
- QCStringList( const QCString& i ) { append(i); }
- QCStringList( const char* i ) { append(i); }
- QCStringList &operator=(const QCStringList &l)
- {
- return static_cast<QCStringList&>(QValueList<QCString>::operator=(l));
- }
-
- static QCStringList fromStrList(const QStrList&);
-
- static QCStringList split( const QCString &sep, const QCString &str, bool allowEmptyEntries = FALSE );
- static QCStringList split( char sep, const QCString &str, bool allowEmptyEntries = FALSE );
- //static QCStringList split( const QRegExp &sep, const QCString &str, bool allowEmptyEntries = FALSE );
- QCString join( const QCString &sep ) const;
-
- QCStringList grep( const QCString &str, bool cs = TRUE ) const;
- //QCStringList grep( const QRegExp &expr ) const;
-};
-
-extern Q_EXPORT QDataStream &operator>>( QDataStream &, QCStringList& );
-extern Q_EXPORT QDataStream &operator<<( QDataStream &, const QCStringList& );
-
-#endif // QCSTRINGLIST_H
diff --git a/qtools/qdatastream.cpp b/qtools/qdatastream.cpp
deleted file mode 100644
index d539daf..0000000
--- a/qtools/qdatastream.cpp
+++ /dev/null
@@ -1,944 +0,0 @@
-/****************************************************************************
-**
-**
-** Implementation of QDataStream class
-**
-** Created : 930831
-**
-** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
-**
-** This file is part of the tools module of the Qt GUI Toolkit.
-**
-** This file may be distributed under the terms of the Q Public License
-** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#include "qdatastream.h"
-
-#ifndef QT_NO_DATASTREAM
-#include "qbuffer.h"
-#include <stdio.h>
-#include <ctype.h>
-#include <stdlib.h>
-
-// REVISED: warwick
-/*!
- \class QDataStream qdatastream.h
-
- \brief The QDataStream class provides serialization of
- binary data to a QIODevice.
-
- \ingroup io
-
- A data stream is a binary stream of encoded information which is 100%
- independent of the host computer operation system, CPU or byte order. A
- stream that is written by a PC under DOS/Windows can be read by a
- Sun SPARC running Solaris.
-
- The QDataStream class implements serialization of primitive types, like
- \c char, \c short, \c int, \c char* etc. Serialization of more complex
- data is accomplished by breaking up the data into primitive units.
-
- The programmer can select which byte order to use when serializing data.
- The default setting is big endian (MSB first). Changing it to little
- endian breaks the portability (unless the reader also changes to little
- endian). We recommend keeping this setting unless you have
- special requirements.
-
- A data stream cooperates closely with a QIODevice. A QIODevice
- represents an input/output medium one can read data from and write data
- to. The QFile class is an example of an IO device.
-
- Example (write data to a stream):
- \code
- QFile f( "file.dta" );
- f.open( IO_WriteOnly ); // open file for writing
- QDataStream s( &f ); // serialize using f
- s << "the answer is"; // serialize string
- s << (Q_INT32)42; // serialize integer
- \endcode
-
- Example (read data from a stream):
- \code
- QFile f( "file.dta" );
- f.open( IO_ReadOnly ); // open file for reading
- QDataStream s( &f ); // serialize using f
- char *str;
- Q_INT32 a;
- s >> str >> a; // "the answer is" and 42
- delete str; // delete string
- \endcode
-
- In the last example, if you read into a QString instead of a \c char*
- you do not have to delete it.
-
- Normally, each item written to the stream is written in a fixed binary
- format.
- For example, a \c char* is written as a 32-bit integer equal to the
- length of the string including the NUL byte, followed by all the
- characters of the string including the NUL byte. Similarly when
- reading a string, 4 bytes are read to create the 32-bit length value,
- then that many characters for the string including the NUL. For a complete
- description of all Qt types supporting data streaming see \link
- datastreamformat.html Format of the QDataStream operators \endlink .
-
- If you want a "parsing" input stream, see QTextStream. If you just want the
- data to be human-readable to aid in debugging, you can set the data
- stream into printable data mode with setPrintableData(). The data is
- then written slower, in a human readable bloated form that is sufficient
- for debugging.
-
- If you are producing a new binary data format, such as a file format
- for documents created by your application, you could use a QDataStream
- to write the data in a portable format. Typically, you would write
- a brief header containing a magic string and a version number to give
- yourself room for future expansion. For example:
-
- \code
- // Open the file.
- QFile f( "file.xxx" );
- f.open( IO_WriteOnly );
- QDataStream s( &f );
-
- // Write a header with a "magic number" and a version
- s << 0xa0b0c0d0;
- s << 123;
-
- // Write the data
- s << [lots of interesting data]
- \endcode
-
- Then read it in with:
-
- \code
- // Open the file.
- QFile f( "file.xxx" );
- f.open( IO_ReadOnly );
- QDataStream s( &f );
-
- // Read and check the header
- Q_UINT32 magic;
- s >> magic;
- if ( magic != 0xa0b0c0d0 )
- return XXX_BAD_FILE_FORMAT;
-
- // Read the version
- Q_INT32 version;
- s >> version;
- if ( version < 100 )
- return XXX_BAD_FILE_TOO_OLD;
- if ( version > 123 )
- return XXX_BAD_FILE_TOO_NEW;
- if ( version <= 110 )
- s.setVersion(1);
-
- // Read the data
- s >> [lots of interesting data];
- if ( version > 120 )
- s >> [data new in XXX version 1.2];
- s >> [other interesting data];
- \endcode
-
- \sa QTextStream QVariant
-*/
-
-
-/*****************************************************************************
- QDataStream member functions
- *****************************************************************************/
-
-#if defined(CHECK_STATE)
-#undef CHECK_STREAM_PRECOND
-#define CHECK_STREAM_PRECOND if ( !dev ) { \
- qWarning( "QDataStream: No device" ); \
- return *this; }
-#else
-#define CHECK_STREAM_PRECOND
-#endif
-
-static int systemWordSize = 0;
-static bool systemBigEndian;
-
-static const int DefaultStreamVersion = 3;
-// 3 is default in Qt 2.1
-// 2 is the Qt 2.0.x format
-// 1 is the Qt 1.x format
-
-/*!
- Constructs a data stream that has no IO device.
-
- \sa setDevice()
-*/
-
-QDataStream::QDataStream()
-{
- if ( systemWordSize == 0 ) // get system features
- qSysInfo( &systemWordSize, &systemBigEndian );
- dev = 0; // no device set
- owndev = FALSE;
- byteorder = BigEndian; // default byte order
- printable = FALSE;
- ver = DefaultStreamVersion;
- noswap = systemBigEndian;
-}
-
-/*!
- Constructs a data stream that uses the IO device \a d.
-
- \sa setDevice(), device()
-*/
-
-QDataStream::QDataStream( QIODevice *d )
-{
- if ( systemWordSize == 0 ) // get system features
- qSysInfo( &systemWordSize, &systemBigEndian );
- dev = d; // set device
- owndev = FALSE;
- byteorder = BigEndian; // default byte order
- printable = FALSE;
- ver = DefaultStreamVersion;
- noswap = systemBigEndian;
-}
-
-/*!
- Constructs a data stream that operates on a byte array through an
- internal QBuffer device.
-
- Example:
- \code
- static char bindata[] = { 231, 1, 44, ... };
- QByteArray a;
- a.setRawData( bindata, sizeof(bindata) ); // a points to bindata
- QDataStream s( a, IO_ReadOnly ); // open on a's data
- s >> [something]; // read raw bindata
- a.resetRawData( bindata, sizeof(bindata) ); // finished
- \endcode
-
- The QArray::setRawData() function is not for the inexperienced.
-*/
-
-QDataStream::QDataStream( QByteArray a, int mode )
-{
- if ( systemWordSize == 0 ) // get system features
- qSysInfo( &systemWordSize, &systemBigEndian );
- dev = new QBuffer( a ); // create device
- ((QBuffer *)dev)->open( mode ); // open device
- owndev = TRUE;
- byteorder = BigEndian; // default byte order
- printable = FALSE;
- ver = DefaultStreamVersion;
- noswap = systemBigEndian;
-}
-
-/*!
- Destructs the data stream.
-
- The destructor will not affect the current IO device, unless it
- is an internal IO device processing a QByteArray passed in the constructor.
-*/
-
-QDataStream::~QDataStream()
-{
- if ( owndev )
- delete dev;
-}
-
-
-/*!
- \fn QIODevice *QDataStream::device() const
- Returns the IO device currently set.
- \sa setDevice(), unsetDevice()
-*/
-
-/*!
- void QDataStream::setDevice(QIODevice *d )
- Sets the IO device to \a d.
- \sa device(), unsetDevice()
-*/
-
-void QDataStream::setDevice(QIODevice *d )
-{
- if ( owndev ) {
- delete dev;
- owndev = FALSE;
- }
- dev = d;
-}
-
-/*!
- Unsets the IO device. This is the same as calling setDevice( 0 ).
- \sa device(), setDevice()
-*/
-
-void QDataStream::unsetDevice()
-{
- setDevice( 0 );
-}
-
-
-/*!
- \fn bool QDataStream::atEnd() const
- Returns TRUE if the IO device has reached the end position (end of
- stream or file) or if there is no IO device set.
-
- Returns FALSE if the current position of the read/write head of the IO
- device is somewhere before the end position.
-
- \sa QIODevice::atEnd()
-*/
-
-/*!\fn bool QDataStream::eof() const
-
- \obsolete
-
- Returns TRUE if the IO device has reached the end position (end of
- stream or file) or if there is no IO device set.
-
- Returns FALSE if the current position of the read/write head of the IO
- device is somewhere before the end position.
-
- \sa QIODevice::atEnd()
-*/
-
-/*!
- \fn int QDataStream::byteOrder() const
- Returns the current byte order setting - either \c BigEndian or
- \c LittleEndian.
-
- \sa setByteOrder()
-*/
-
-/*!
- Sets the serialization byte order to \a bo.
-
- The \a bo parameter can be \c QDataStream::BigEndian or
- \c QDataStream::LittleEndian.
-
- The default setting is big endian. We recommend leaving this setting unless
- you have special requirements.
-
- \sa byteOrder()
-*/
-
-void QDataStream::setByteOrder( int bo )
-{
- byteorder = bo;
- if ( systemBigEndian )
- noswap = byteorder == BigEndian;
- else
- noswap = byteorder == LittleEndian;
-}
-
-
-/*!
- \fn bool QDataStream::isPrintableData() const
- Returns TRUE if the printable data flag has been set.
- \sa setPrintableData()
-*/
-
-/*!
- \fn void QDataStream::setPrintableData( bool enable )
- Sets or clears the printable data flag.
-
- If this flag is set, the write functions will generate output that
- consists of printable characters (7 bit ASCII).
-
- We recommend enabling printable data only for debugging purposes
- (it is slower and creates larger output).
-*/
-
-
-/*!
- \fn int QDataStream::version() const
- Returns the version number of the data serialization format.
- In Qt 2.1, this number is by default 3.
- \sa setVersion()
-*/
-
-/*!
- \fn void QDataStream::setVersion( int v )
- Sets the version number of the data serialization format.
-
- In order to accommodate for new functionality, the datastream
- serialization format of some Qt classes has changed in some versions of
- Qt. If you want to read data that was created by an earlier version of
- Qt, or write data that can be read by a program that was compiled with
- an earlier version of Qt, use this function to modify the serialization
- format of QDataStream.
-
- For Qt 1.x compatibility, use \a v == 1.
-
- For Qt 2.0.x compatibility, use \a v == 2 (Not required for reading in
- Qt 2.1).
-
- \sa version()
-*/
-
-/*****************************************************************************
- QDataStream read functions
- *****************************************************************************/
-
-
-static Q_INT32 read_int_ascii( QDataStream *s )
-{
- int n = 0;
- char buf[40];
- while ( TRUE ) {
- buf[n] = s->device()->getch();
- if ( buf[n] == '\n' || n > 38 ) // $-terminator
- break;
- n++;
- }
- buf[n] = '\0';
- return (Q_INT32)atol( buf );
-}
-
-
-/*!
- \fn QDataStream &QDataStream::operator>>( Q_UINT8 &i )
- Reads an unsigned byte from the stream and returns a reference to
- the stream.
-*/
-
-/*!
- Reads a signed byte from the stream.
-*/
-
-QDataStream &QDataStream::operator>>( Q_INT8 &i )
-{
- CHECK_STREAM_PRECOND
- if ( printable ) { // printable data
- i = (Q_INT8)dev->getch();
- if ( i == '\\' ) { // read octal code
- char buf[4];
- dev->readBlock( buf, 3 );
- i = (buf[2] & 0x07)+((buf[1] & 0x07) << 3)+((buf[0] & 0x07) << 6);
- }
- } else { // data or text
- i = (Q_INT8)dev->getch();
- }
- return *this;
-}
-
-
-/*!
- \fn QDataStream &QDataStream::operator>>( Q_UINT16 &i )
- Reads an unsigned 16-bit integer from the stream and returns a reference to
- the stream.
-*/
-
-/*!
- Reads a signed 16-bit integer from the stream and returns a reference to
- the stream.
-*/
-
-QDataStream &QDataStream::operator>>( Q_INT16 &i )
-{
- CHECK_STREAM_PRECOND
- if ( printable ) { // printable data
- i = (Q_INT16)read_int_ascii( this );
- } else if ( noswap ) { // no conversion needed
- dev->readBlock( (char *)&i, sizeof(Q_INT16) );
- } else { // swap bytes
- uchar *p = (uchar *)(&i);
- char b[2];
- dev->readBlock( b, 2 );
- *p++ = b[1];
- *p = b[0];
- }
- return *this;
-}
-
-
-/*!
- \fn QDataStream &QDataStream::operator>>( Q_UINT32 &i )
- Reads an unsigned 32-bit integer from the stream and returns a reference to
- the stream.
-*/
-
-/*!
- Reads a signed 32-bit integer from the stream and returns a reference to
- the stream.
-*/
-
-QDataStream &QDataStream::operator>>( Q_INT32 &i )
-{
- CHECK_STREAM_PRECOND
- if ( printable ) { // printable data
- i = read_int_ascii( this );
- } else if ( noswap ) { // no conversion needed
- dev->readBlock( (char *)&i, sizeof(Q_INT32) );
- } else { // swap bytes
- uchar *p = (uchar *)(&i);
- char b[4];
- dev->readBlock( b, 4 );
- *p++ = b[3];
- *p++ = b[2];
- *p++ = b[1];
- *p = b[0];
- }
- return *this;
-}
-
-/*!
- \fn QDataStream &QDataStream::operator>>( Q_UINT64 &i )
- Reads an unsigned 64-bit integer from the stream and returns a reference to
- the stream, or uses the Q_UINT32 operator if 64 bit is not available.
-*/
-
-/*!
- Reads a signed 64-bit integer from the stream and returns a reference to
- the stream, or uses the Q_UINT32 operator if 64 bit is not available.
-*/
-
-QDataStream &QDataStream::operator>>( Q_INT64 &i )
-{
- CHECK_STREAM_PRECOND
- if ( printable ) { // printable data
- i = read_int_ascii( this );
- } else if ( noswap ) { // no conversion needed
- dev->readBlock( (char *)&i, sizeof(Q_INT64) );
- } else { // swap bytes
- uchar *p = (uchar *)(&i);
- char b[sizeof(Q_INT64)];
- dev->readBlock( b, sizeof(Q_INT64) );
- if ( sizeof(Q_INT64) == 8 ) {
- *p++ = b[7];
- *p++ = b[6];
- *p++ = b[5];
- *p++ = b[4];
- }
- *p++ = b[3];
- *p++ = b[2];
- *p++ = b[1];
- *p = b[0];
- }
- return *this;
-}
-
-static double read_double_ascii( QDataStream *s )
-{
- int n = 0;
- char buf[80];
- while ( TRUE ) {
- buf[n] = s->device()->getch();
- if ( buf[n] == '\n' || n > 78 ) // $-terminator
- break;
- n++;
- }
- buf[n] = '\0';
- return atof( buf );
-}
-
-
-/*!
- Reads a 32-bit floating point number from the stream using the standard
- IEEE754 format. Returns a reference to the stream.
-*/
-
-QDataStream &QDataStream::operator>>( float &f )
-{
- CHECK_STREAM_PRECOND
- if ( printable ) { // printable data
- f = (float)read_double_ascii( this );
- } else if ( noswap ) { // no conversion needed
- dev->readBlock( (char *)&f, sizeof(float) );
- } else { // swap bytes
- uchar *p = (uchar *)(&f);
- char b[4];
- dev->readBlock( b, 4 );
- *p++ = b[3];
- *p++ = b[2];
- *p++ = b[1];
- *p = b[0];
- }
- return *this;
-}
-
-
-/*!
- Reads a 64-bit floating point number from the stream using the standard
- IEEE754 format. Returns a reference to the stream.
-*/
-
-QDataStream &QDataStream::operator>>( double &f )
-{
- CHECK_STREAM_PRECOND
- if ( printable ) { // printable data
- f = read_double_ascii( this );
- } else if ( noswap ) { // no conversion needed
- dev->readBlock( (char *)&f, sizeof(double) );
- } else { // swap bytes
- uchar *p = (uchar *)(&f);
- char b[8];
- dev->readBlock( b, 8 );
- *p++ = b[7];
- *p++ = b[6];
- *p++ = b[5];
- *p++ = b[4];
- *p++ = b[3];
- *p++ = b[2];
- *p++ = b[1];
- *p = b[0];
- }
- return *this;
-}
-
-
-/*!
- Reads the '\0'-terminated string \a s from the stream and returns
- a reference to the stream.
-
- Space for the string is allocated using \c new - the caller must
- eventually call delete[] on the value.
-*/
-
-QDataStream &QDataStream::operator>>( char *&s )
-{
- uint len = 0;
- return readBytes( s, len );
-}
-
-
-/*!
- Reads the buffer \a s from the stream and returns a reference to the
- stream.
-
- The buffer \a s is allocated using \c new. Destroy it with the \c delete[]
- operator. If the length is zero or \a s cannot be allocated, \a s is
- set to 0.
-
- The \a l parameter will be set to the length of the buffer.
-
- The serialization format is an Q_UINT32 length specifier first, then the
- data (\a l bytes).
-
- \sa readRawBytes(), writeBytes()
-*/
-
-QDataStream &QDataStream::readBytes( char *&s, uint &l )
-{
- CHECK_STREAM_PRECOND
- Q_UINT32 len;
- *this >> len; // first read length spec
- l = (uint)len;
- if ( len == 0 || eof() ) {
- s = 0;
- return *this;
- } else {
- s = new char[len]; // create char array
- CHECK_PTR( s );
- if ( !s ) // no memory
- return *this;
- return readRawBytes( s, (uint)len );
- }
-}
-
-
-/*!
- Reads \a len bytes from the stream into \a s and returns a reference to
- the stream.
-
- The buffer \a s must be preallocated.
-
- \sa readBytes(), QIODevice::readBlock(), writeRawBytes()
-*/
-
-QDataStream &QDataStream::readRawBytes( char *s, uint len )
-{
- CHECK_STREAM_PRECOND
- if ( printable ) { // printable data
- Q_INT8 *p = (Q_INT8*)s;
- while ( len-- )
- *this >> *p++;
- } else { // read data char array
- dev->readBlock( s, len );
- }
- return *this;
-}
-
-
-/*****************************************************************************
- QDataStream write functions
- *****************************************************************************/
-
-
-/*!
- \fn QDataStream &QDataStream::operator<<( Q_UINT8 i )
- Writes an unsigned byte to the stream and returns a reference to
- the stream.
-*/
-
-/*!
- Writes a signed byte to the stream.
-*/
-
-QDataStream &QDataStream::operator<<( Q_INT8 i )
-{
- CHECK_STREAM_PRECOND
- if ( printable && (i == '\\' || !isprint(i)) ) {
- char buf[6]; // write octal code
- buf[0] = '\\';
- buf[1] = '0' + ((i >> 6) & 0x07);
- buf[2] = '0' + ((i >> 3) & 0x07);
- buf[3] = '0' + (i & 0x07);
- buf[4] = '\0';
- dev->writeBlock( buf, 4 );
- } else {
- dev->putch( i );
- }
- return *this;
-}
-
-
-/*!
- \fn QDataStream &QDataStream::operator<<( Q_UINT16 i )
- Writes an unsigned 16-bit integer to the stream and returns a reference
- to the stream.
-*/
-
-/*!
- Writes a signed 16-bit integer to the stream and returns a reference to
- the stream.
-*/
-
-QDataStream &QDataStream::operator<<( Q_INT16 i )
-{
- CHECK_STREAM_PRECOND
- if ( printable ) { // printable data
- char buf[16];
- sprintf( buf, "%d\n", i );
- dev->writeBlock( buf, (int)strlen(buf) );
- } else if ( noswap ) { // no conversion needed
- dev->writeBlock( (char *)&i, sizeof(Q_INT16) );
- } else { // swap bytes
- uchar *p = (uchar *)(&i);
- char b[2];
- b[1] = *p++;
- b[0] = *p;
- dev->writeBlock( b, 2 );
- }
- return *this;
-}
-
-
-/*!
- \fn QDataStream &QDataStream::operator<<( Q_UINT32 i )
- Writes an unsigned 32-bit integer to the stream and returns a reference to
- the stream.
-*/
-
-/*!
- Writes a signed 32-bit integer to the stream and returns a reference to
- the stream.
-*/
-
-QDataStream &QDataStream::operator<<( Q_INT32 i )
-{
- CHECK_STREAM_PRECOND
- if ( printable ) { // printable data
- char buf[16];
- sprintf( buf, "%d\n", i );
- dev->writeBlock( buf, (int)strlen(buf) );
- } else if ( noswap ) { // no conversion needed
- dev->writeBlock( (char *)&i, sizeof(Q_INT32) );
- } else { // swap bytes
- uchar *p = (uchar *)(&i);
- char b[4];
- b[3] = *p++;
- b[2] = *p++;
- b[1] = *p++;
- b[0] = *p;
- dev->writeBlock( b, 4 );
- }
- return *this;
-}
-
-/*!
- \fn QDataStream &QDataStream::operator<<( Q_UINT64 i )
- Writes an unsigned 64-bit integer to the stream and returns a reference to
- the stream, or uses the Q_UINT32-operator if 64 bit is not available.
-*/
-
-/*!
- Writes a signed 64-bit integer to the stream and returns a reference to
- the stream, or calls the Q_INT32-operator if 64 bit is not available.
-*/
-
-QDataStream &QDataStream::operator<<( Q_INT64 i )
-{
- CHECK_STREAM_PRECOND
- if ( printable ) { // printable data
- char buf[20];
- sprintf( buf, "%ld\n", i );
- dev->writeBlock( buf, (int)strlen(buf) );
- } else if ( noswap ) { // no conversion needed
- dev->writeBlock( (char *)&i, sizeof(Q_INT64) );
- } else { // swap bytes
- uchar *p = (uchar *)(&i);
- char b[sizeof(Q_INT64)];
- if ( sizeof(Q_INT64) == 8 ) {
- b[7] = *p++;
- b[6] = *p++;
- b[5] = *p++;
- b[4] = *p++;
- }
- b[3] = *p++;
- b[2] = *p++;
- b[1] = *p++;
- b[0] = *p;
- dev->writeBlock( b, sizeof(Q_INT64) );
- }
- return *this;
-}
-
-/*!
- \fn QDataStream &QDataStream::operator<<( int i )
- Writes a signed integer to the stream as a 32-bit signed integer (Q_INT32).
- Returns a reference to the stream.
-*/
-
-
-/*!
- Writes a 32-bit floating point number to the stream using the standard
- IEEE754 format. Returns a reference to the stream.
-*/
-
-QDataStream &QDataStream::operator<<( float f )
-{
- CHECK_STREAM_PRECOND
- if ( printable ) { // printable data
- char buf[32];
- sprintf( buf, "%g\n", (double)f );
- dev->writeBlock( buf, (int)strlen(buf) );
- } else {
- float g = f; // fixes float-on-stack problem
- if ( noswap ) { // no conversion needed
- dev->writeBlock( (char *)&g, sizeof(float) );
- } else { // swap bytes
- uchar *p = (uchar *)(&g);
- char b[4];
- b[3] = *p++;
- b[2] = *p++;
- b[1] = *p++;
- b[0] = *p;
- dev->writeBlock( b, 4 );
- }
- }
- return *this;
-}
-
-
-/*!
- Writes a 64-bit floating point number to the stream using the standard
- IEEE754 format. Returns a reference to the stream.
-*/
-
-QDataStream &QDataStream::operator<<( double f )
-{
- CHECK_STREAM_PRECOND
- if ( printable ) { // printable data
- char buf[32];
- sprintf( buf, "%g\n", f );
- dev->writeBlock( buf, (int)strlen(buf) );
- } else if ( noswap ) { // no conversion needed
- dev->writeBlock( (char *)&f, sizeof(double) );
- } else { // swap bytes
- uchar *p = (uchar *)(&f);
- char b[8];
- b[7] = *p++;
- b[6] = *p++;
- b[5] = *p++;
- b[4] = *p++;
- b[3] = *p++;
- b[2] = *p++;
- b[1] = *p++;
- b[0] = *p;
- dev->writeBlock( b, 8 );
- }
- return *this;
-}
-
-
-/*!
- Writes the '\0'-terminated string \a s to the stream and returns
- a reference to the stream.
-
- The string is serialized using writeBytes().
-*/
-
-QDataStream &QDataStream::operator<<( const char *s )
-{
- if ( !s ) {
- *this << (Q_UINT32)0;
- return *this;
- }
- uint len = qstrlen( s ) + 1; // also write null terminator
- *this << (Q_UINT32)len; // write length specifier
- return writeRawBytes( s, len );
-}
-
-
-/*!
- Writes the length specifier \a len and the buffer \a s to the stream and
- returns a reference to the stream.
-
- The \a len is serialized as an Q_UINT32, followed by \a len bytes from
- \a s.
-
- \sa writeRawBytes(), readBytes()
-*/
-
-QDataStream &QDataStream::writeBytes(const char *s, uint len)
-{
- CHECK_STREAM_PRECOND
- *this << (Q_UINT32)len; // write length specifier
- if ( len )
- writeRawBytes( s, len );
- return *this;
-}
-
-
-/*!
- Writes \a len bytes from \a s to the stream and returns a reference to the
- stream.
-
- \sa writeBytes(), QIODevice::writeBlock(), readRawBytes()
-*/
-
-QDataStream &QDataStream::writeRawBytes( const char *s, uint len )
-{
- CHECK_STREAM_PRECOND
- if ( printable ) { // write printable
- char *p = (char *)s;
- while ( len-- )
- *this << *p++;
- } else { // write data char array
- dev->writeBlock( s, len );
- }
- return *this;
-}
-
-#endif // QT_NO_DATASTREAM
diff --git a/qtools/qdatastream.h b/qtools/qdatastream.h
deleted file mode 100644
index 3d18062..0000000
--- a/qtools/qdatastream.h
+++ /dev/null
@@ -1,173 +0,0 @@
-/****************************************************************************
-**
-**
-** Definition of QDataStream class
-**
-** Created : 930831
-**
-** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
-**
-** This file is part of the tools module of the Qt GUI Toolkit.
-**
-** This file may be distributed under the terms of the Q Public License
-** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#ifndef QDATASTREAM_H
-#define QDATASTREAM_H
-
-#ifndef QT_H
-#include "qiodevice.h"
-#include "qstring.h"
-#endif // QT_H
-
-#ifndef QT_NO_DATASTREAM
-class Q_EXPORT QDataStream // data stream class
-{
-public:
- QDataStream();
- QDataStream( QIODevice * );
- QDataStream( QByteArray, int mode );
- virtual ~QDataStream();
-
- QIODevice *device() const;
- void setDevice( QIODevice * );
- void unsetDevice();
-
- bool atEnd() const;
- bool eof() const;
-
- enum ByteOrder { BigEndian, LittleEndian };
- int byteOrder() const;
- void setByteOrder( int );
-
- bool isPrintableData() const;
- void setPrintableData( bool );
-
- int version() const;
- void setVersion( int );
-
- QDataStream &operator>>( Q_INT8 &i );
- QDataStream &operator>>( Q_UINT8 &i );
- QDataStream &operator>>( Q_INT16 &i );
- QDataStream &operator>>( Q_UINT16 &i );
- QDataStream &operator>>( Q_INT32 &i );
- QDataStream &operator>>( Q_UINT32 &i );
- QDataStream &operator>>( Q_INT64 &i );
- QDataStream &operator>>( Q_UINT64 &i );
-
- QDataStream &operator>>( float &f );
- QDataStream &operator>>( double &f );
- QDataStream &operator>>( char *&str );
-
- QDataStream &operator<<( Q_INT8 i );
- QDataStream &operator<<( Q_UINT8 i );
- QDataStream &operator<<( Q_INT16 i );
- QDataStream &operator<<( Q_UINT16 i );
- QDataStream &operator<<( Q_INT32 i );
- QDataStream &operator<<( Q_UINT32 i );
- QDataStream &operator<<( Q_INT64 i );
- QDataStream &operator<<( Q_UINT64 i );
- QDataStream &operator<<( float f );
- QDataStream &operator<<( double f );
- QDataStream &operator<<( const char *str );
-
- QDataStream &readBytes( char *&, uint &len );
- QDataStream &readRawBytes( char *, uint len );
-
- QDataStream &writeBytes( const char *, uint len );
- QDataStream &writeRawBytes( const char *, uint len );
-
-private:
- QIODevice *dev;
- bool owndev;
- int byteorder;
- bool printable;
- bool noswap;
- int ver;
-
-private: // Disabled copy constructor and operator=
-#if defined(Q_DISABLE_COPY)
- QDataStream( const QDataStream & );
- QDataStream &operator=( const QDataStream & );
-#endif
-};
-
-
-/*****************************************************************************
- QDataStream inline functions
- *****************************************************************************/
-
-inline QIODevice *QDataStream::device() const
-{ return dev; }
-
-inline bool QDataStream::atEnd() const
-{ return dev ? dev->atEnd() : TRUE; }
-
-inline bool QDataStream::eof() const
-{ return atEnd(); }
-
-inline int QDataStream::byteOrder() const
-{ return byteorder; }
-
-inline bool QDataStream::isPrintableData() const
-{ return printable; }
-
-inline void QDataStream::setPrintableData( bool p )
-{ printable = p; }
-
-inline int QDataStream::version() const
-{ return ver; }
-
-inline void QDataStream::setVersion( int v )
-{ ver = v; }
-
-inline QDataStream &QDataStream::operator>>( Q_UINT8 &i )
-{ return *this >> (Q_INT8&)i; }
-
-inline QDataStream &QDataStream::operator>>( Q_UINT16 &i )
-{ return *this >> (Q_INT16&)i; }
-
-inline QDataStream &QDataStream::operator>>( Q_UINT32 &i )
-{ return *this >> (Q_INT32&)i; }
-
-inline QDataStream &QDataStream::operator>>( Q_UINT64 &i )
-{ return *this >> (Q_INT64&)i; }
-
-inline QDataStream &QDataStream::operator<<( Q_UINT8 i )
-{ return *this << (Q_INT8)i; }
-
-inline QDataStream &QDataStream::operator<<( Q_UINT16 i )
-{ return *this << (Q_INT16)i; }
-
-inline QDataStream &QDataStream::operator<<( Q_UINT32 i )
-{ return *this << (Q_INT32)i; }
-
-inline QDataStream &QDataStream::operator<<( Q_UINT64 i )
-{ return *this << (Q_INT64)i; }
-
-
-#endif // QT_NO_DATASTREAM
-#endif // QDATASTREAM_H
diff --git a/qtools/qdict.h b/qtools/qdict.h
deleted file mode 100644
index 12db365..0000000
--- a/qtools/qdict.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/****************************************************************************
-**
-**
-** Definition of QDict template class
-**
-** Created : 920821
-**
-** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
-**
-** This file is part of the tools module of the Qt GUI Toolkit.
-**
-** This file may be distributed under the terms of the Q Public License
-** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#ifndef QDICT_H
-#define QDICT_H
-
-#ifndef QT_H
-#include "qgdict.h"
-#endif // QT_H
-
-#define QAsciiDict QDict
-#define QAsciiDictIterator QDictIterator
-#include "qasciidict.h"
-
-#endif // QDICT_H
diff --git a/qtools/qdir.cpp b/qtools/qdir.cpp
deleted file mode 100644
index 016313f..0000000
--- a/qtools/qdir.cpp
+++ /dev/null
@@ -1,1204 +0,0 @@
-/****************************************************************************
-**
-**
-** Implementation of QDir class
-**
-** Created : 950427
-**
-** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
-**
-** This file is part of the tools module of the Qt GUI Toolkit.
-**
-** This file may be distributed under the terms of the Q Public License
-** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#include "qglobal.h"
-
-#include "qdir.h"
-
-#ifndef QT_NO_DIR
-#include "qfileinfo.h"
-#include "qfiledefs_p.h"
-#include "qregexp_p.h"
-#include "qstringlist.h"
-#include <stdlib.h>
-#include <ctype.h>
-
-// NOT REVISED
-/*!
- \class QDir qdir.h
- \brief Traverses directory structures and contents in a
- platform-independent way.
-
- \ingroup io
-
- A QDir can point to a file using either a relative or an absolute file
- path. Absolute file paths begin with the directory separator ('/') or a
- drive specification (not applicable to UNIX). Relative file names begin
- with a directory name or a file name and specify a path relative to the
- current directory.
-
- An example of an absolute path is the string "/tmp/quartz", a relative
- path might look like "src/fatlib". You can use the function isRelative()
- to check if a QDir is using a relative or an absolute file path. You can
- call the function convertToAbs() to convert a relative QDir to an
- absolute one.
-
- The directory "example" under the current directory is checked for existence
- in the example below:
-
- \code
- QDir d( "example" ); // "./example"
- if ( !d.exists() )
- qWarning( "Cannot find the example directory" );
- \endcode
-
- If you always use '/' as a directory separator, Qt will translate your
- paths to conform to the underlying operating system.
-
- cd() and cdUp() can be used to navigate the directory tree. Note that the
- logical cd and cdUp operations are not performed if the new directory does
- not exist.
-
- Example:
- \code
- QDir d = QDir::root(); // "/"
- if ( !d.cd("tmp") ) { // "/tmp"
- qWarning( "Cannot find the \"/tmp\" directory" );
- } else {
- QFile f( d.filePath("ex1.txt") ); // "/tmp/ex1.txt"
- if ( !f.open(IO_ReadWrite) )
- qWarning( "Cannot create the file %s", f.name() );
- }
- \endcode
-
- To read the contents of a directory you can use the entryList() and
- entryInfoList() functions.
-
- Example:
- \code
- #include <stdio.h>
- #include <qdir.h>
-
- //
- // This program scans the current directory and lists all files
- // that are not symbolic links, sorted by size with the smallest files
- // first.
- //
-
- int main( int argc, char **argv )
- {
- QDir d;
- d.setFilter( QDir::Files | QDir::Hidden | QDir::NoSymLinks );
- d.setSorting( QDir::Size | QDir::Reversed );
-
- const QFileInfoList *list = d.entryInfoList();
- QFileInfoListIterator it( *list ); // create list iterator
- QFileInfo *fi; // pointer for traversing
-
- printf( " BYTES FILENAME\n" ); // print header
- while ( (fi=it.current()) ) { // for each file...
- printf( "%10li %s\n", fi->size(), fi->fileName().data() );
- ++it; // goto next list element
- }
- }
- \endcode
-*/
-
-
-/*!
- Constructs a QDir pointing to the current directory.
- \sa currentDirPath()
-*/
-
-QDir::QDir()
-{
- dPath = QString::fromLatin1(".");
- init();
-}
-
-/*!
- Constructs a QDir.
-
- \arg \e path is the directory.
- \arg \e nameFilter is the file name filter.
- \arg \e sortSpec is the sort specification, which describes how to
- sort the files in the directory.
- \arg \e filterSpec is the filter specification, which describes how
- to filter the files in the directory.
-
- Most of these arguments (except \e path) have optional values.
-
- Example:
- \code
- // lists all files in /tmp
-
- QDir d( "/tmp" );
- for ( int i=0; i<d.count(); i++ )
- printf( "%s\n", d[i] );
- \endcode
-
- If \e path is "" or null, the directory is set to "." (the current
- directory). If \e nameFilter is "" or null, it is set to "*" (all
- files).
-
- No check is made to ensure that the directory exists.
-
- \sa exists(), setPath(), setNameFilter(), setFilter(), setSorting()
-*/
-
-QDir::QDir( const QString &path, const QString &nameFilter,
- int sortSpec, int filterSpec )
-{
- init();
- dPath = cleanDirPath( path );
- if ( dPath.isEmpty() )
- dPath = QString::fromLatin1(".");
- nameFilt = nameFilter;
- if ( nameFilt.isEmpty() )
- nameFilt = QString::fromLatin1("*");
- filtS = (FilterSpec)filterSpec;
- sortS = (SortSpec)sortSpec;
-}
-
-/*!
- Constructs a QDir that is a copy of the given directory.
- \sa operator=()
-*/
-
-QDir::QDir( const QDir &d )
-{
- dPath = d.dPath;
- fList = 0;
- fiList = 0;
- nameFilt = d.nameFilt;
- dirty = TRUE;
- allDirs = d.allDirs;
- filtS = d.filtS;
- sortS = d.sortS;
-}
-
-
-void QDir::init()
-{
- fList = 0;
- fiList = 0;
- nameFilt = QString::fromLatin1("*");
- dirty = TRUE;
- allDirs = FALSE;
- filtS = All;
- sortS = SortSpec(Name | IgnoreCase);
-}
-
-/*!
- Destructs the QDir and cleans up.
-*/
-
-QDir::~QDir()
-{
- if ( fList )
- delete fList;
- if ( fiList )
- delete fiList;
-}
-
-
-/*!
- Sets the path of the directory. The path is cleaned of redundant ".", ".."
- and multiple separators. No check is made to ensure that a directory
- with this path exists.
-
- The path can be either absolute or relative. Absolute paths begin with the
- directory separator ('/') or a drive specification (not
- applicable to UNIX).
- Relative file names begin with a directory name or a file name and specify
- a path relative to the current directory. An example of
- an absolute path is the string "/tmp/quartz", a relative path might look like
- "src/fatlib". You can use the function isRelative() to check if a QDir
- is using a relative or an absolute file path. You can call the function
- convertToAbs() to convert a relative QDir to an absolute one.
-
- \sa path(), absPath(), exists(), cleanDirPath(), dirName(),
- absFilePath(), isRelative(), convertToAbs()
-*/
-
-void QDir::setPath( const QString &path )
-{
- dPath = cleanDirPath( path );
- if ( dPath.isEmpty() )
- dPath = QString::fromLatin1(".");
- dirty = TRUE;
-}
-
-/*!
- \fn QString QDir::path() const
- Returns the path, this may contain symbolic links, but never contains
- redundant ".", ".." or multiple separators.
-
- The returned path can be either absolute or relative (see setPath()).
-
- \sa setPath(), absPath(), exists(), cleanDirPath(), dirName(),
- absFilePath(), convertSeparators()
-*/
-
-/*!
- Returns the absolute (a path that starts with '/') path, which may
- contain symbolic links, but never contains redundant ".", ".." or
- multiple separators.
-
- \sa setPath(), canonicalPath(), exists(), cleanDirPath(), dirName(),
- absFilePath()
-*/
-
-QString QDir::absPath() const
-{
- if ( QDir::isRelativePath(dPath) ) {
- QString tmp = currentDirPath();
- if ( tmp.right(1) != QString::fromLatin1("/") )
- tmp += '/';
- tmp += dPath;
- return cleanDirPath( tmp );
- } else {
- return cleanDirPath( dPath );
- }
-}
-
-/*!
- Returns the name of the directory, this is NOT the same as the path, e.g.
- a directory with the name "mail", might have the path "/var/spool/mail".
- If the directory has no name (e.g. the root directory) a null string is
- returned.
-
- No check is made to ensure that a directory with this name actually exists.
-
- \sa path(), absPath(), absFilePath(), exists(), QString::isNull()
-*/
-
-QString QDir::dirName() const
-{
- int pos = dPath.findRev( '/' );
- if ( pos == -1 )
- return dPath;
- return dPath.right( dPath.length() - pos - 1 );
-}
-
-/*!
- Returns the path name of a file in the directory. Does NOT check if
- the file actually exists in the directory. If the QDir is relative
- the returned path name will also be relative. Redundant multiple separators
- or "." and ".." directories in \e fileName will not be removed (see
- cleanDirPath()).
-
- If \e acceptAbsPath is TRUE a \e fileName starting with a separator
- ('/') will be returned without change.
- If \e acceptAbsPath is FALSE an absolute path will be appended to
- the directory path.
-
- \sa absFilePath(), isRelative(), canonicalPath()
-*/
-
-QString QDir::filePath( const QString &fileName,
- bool acceptAbsPath ) const
-{
- if ( acceptAbsPath && !isRelativePath(fileName) )
- return QString(fileName);
-
- QString tmp = dPath;
- if ( tmp.isEmpty() || (tmp[(int)tmp.length()-1] != '/' && !!fileName &&
- fileName[0] != '/') )
- tmp += '/';
- tmp += fileName;
- return tmp;
-}
-
-/*!
- Returns the absolute path name of a file in the directory. Does NOT check if
- the file actually exists in the directory. Redundant multiple separators
- or "." and ".." directories in \e fileName will NOT be removed (see
- cleanDirPath()).
-
- If \e acceptAbsPath is TRUE a \e fileName starting with a separator
- ('/') will be returned without change.
- if \e acceptAbsPath is FALSE an absolute path will be appended to
- the directory path.
-
- \sa filePath()
-*/
-
-QString QDir::absFilePath( const QString &fileName,
- bool acceptAbsPath ) const
-{
- if ( acceptAbsPath && !isRelativePath( fileName ) )
- return fileName;
-
- QString tmp = absPath();
- if ( tmp.isEmpty() || (tmp[(int)tmp.length()-1] != '/' && !!fileName &&
- fileName[0] != '/') )
- tmp += '/';
- tmp += fileName;
- return tmp;
-}
-
-
-/*!
- Converts the '/' separators in \a pathName to system native
- separators. Returns the translated string.
-
- On Windows, convertSeparators("c:/winnt/system32") returns
- "c:\winnt\system32".
-
- No conversion is done on UNIX.
-*/
-
-QString QDir::convertSeparators( const QString &pathName )
-{
- QString n( pathName );
-#if defined(_OS_FATFS_) || defined(_OS_OS2EMX_)
- for ( int i=0; i<(int)n.length(); i++ ) {
- if ( n[i] == '/' )
- n[i] = '\\';
- }
-#endif
- return n;
-}
-
-
-/*!
- Changes directory by descending into the given directory. Returns
- TRUE if the new directory exists and is readable. Note that the logical
- cd operation is NOT performed if the new directory does not exist.
-
- If \e acceptAbsPath is TRUE a path starting with a separator ('/')
- will cd to the absolute directory, if \e acceptAbsPath is FALSE
- any number of separators at the beginning of \e dirName will be removed.
-
- Example:
- \code
- QDir d = QDir::home(); // now points to home directory
- if ( !d.cd("c++") ) { // now points to "c++" under home directory if OK
- QFileInfo fi( d, "c++" );
- if ( fi.exists() ) {
- if ( fi.isDir() )
- qWarning( "Cannot cd into \"%s\".", (char*)d.absFilePath("c++") );
- else
- qWarning( "Cannot create directory \"%s\"\n"
- "A file named \"c++\" already exists in \"%s\"",
- (const char *)d.absFilePath("c++"),
- (const char *)d.path() );
- return;
- } else {
- qWarning( "Creating directory \"%s\"",
- (const char *) d.absFilePath("c++") );
- if ( !d.mkdir( "c++" ) ) {
- qWarning("Could not create directory \"%s\"",
- (const char *)d.absFilePath("c++") );
- return;
- }
- }
- }
- \endcode
-
- Calling cd( ".." ) is equivalent to calling cdUp().
-
- \sa cdUp(), isReadable(), exists(), path()
-*/
-
-bool QDir::cd( const QString &dirName, bool acceptAbsPath )
-{
- if ( dirName.isEmpty() || dirName==QString::fromLatin1(".") )
- return TRUE;
- QString old = dPath;
- if ( acceptAbsPath && !isRelativePath(dirName) ) {
- dPath = cleanDirPath( dirName );
- } else {
- if ( !isRoot() )
- dPath += '/';
- dPath += dirName;
- if ( dirName.find('/') >= 0
- || old == QString::fromLatin1(".")
- || dirName == QString::fromLatin1("..") )
- dPath = cleanDirPath( dPath );
- }
- if ( !exists() ) {
- dPath = old; // regret
- return FALSE;
- }
- dirty = TRUE;
- return TRUE;
-}
-
-/*!
- Changes directory by moving one directory up the path followed to arrive
- at the current directory.
-
- Returns TRUE if the new directory exists and is readable. Note that the
- logical cdUp() operation is not performed if the new directory does not
- exist.
-
- \sa cd(), isReadable(), exists(), path()
-*/
-
-bool QDir::cdUp()
-{
- return cd( QString::fromLatin1("..") );
-}
-
-/*!
- \fn QString QDir::nameFilter() const
- Returns the string set by setNameFilter()
-*/
-
-/*!
- Sets the name filter used by entryList() and entryInfoList().
-
- The name filter is a wildcarding filter that understands "*" and "?"
- wildcards, You may specify several filter entries separated by a " " or a ";". If
- you want entryList() and entryInfoList() to list all files ending with
- ".cpp" and all files ending with ".h", you simply call
- dir.setNameFilter("*.cpp *.h") or dir.setNameFilter("*.cpp;*.h")
-
- \sa nameFilter(), setFilter()
-*/
-
-void QDir::setNameFilter( const QString &nameFilter )
-{
- nameFilt = nameFilter;
- if ( nameFilt.isEmpty() )
- nameFilt = QString::fromLatin1("*");
- dirty = TRUE;
-}
-
-/*!
- \fn QDir::FilterSpec QDir::filter() const
- Returns the value set by setFilter()
-*/
-
-/*! \enum QDir::FilterSpec
-
- This enum describes how QDir is to select what entries in a
- directory to return. The filter value is specified by or-ing
- together values from the following list: <ul>
-
- <li> \c Dirs - List directories only
- <li> \c Files - List files only
-
- <li> \c Drives - List disk drives (does nothing under unix)
- <li> \c NoSymLinks - Do not list symbolic links (where they exist)
- <li> \c Readable - List files for which the application has read access.
- <li> \c Writable - List files for which the application has write access.
- <li> \c Executable - List files for which the application has execute access
- <li> \c Modified - Only list files that have been modified (does nothing
- under unix)
- <li> \c Hidden - List hidden files (on unix, files starting with a .)
- <li> \c System - List system files (does nothing under unix)
- </ul>
-
- If you do not set any of \c Readable, \c Writable or \c Executable,
- QDir will set all three of them. This makes the default easy to
- write and at the same time useful.
-
- Examples: \c Readable|Writable means list all files for which the
- application has read access, write access or both. \c Dirs|Drives
- means list drives, directories, all files that the application can
- read, write or execute, and also symlinks to such files/directories.
-*/
-
-
-/*!
- Sets the filter used by entryList() and entryInfoList(). The filter is used
- to specify the kind of files that should be returned by entryList() and
- entryInfoList().
-
- \sa filter(), setNameFilter()
-*/
-
-void QDir::setFilter( int filterSpec )
-{
- if ( filtS == (FilterSpec) filterSpec )
- return;
- filtS = (FilterSpec) filterSpec;
- dirty = TRUE;
-}
-
-/*!
- \fn QDir::SortSpec QDir::sorting() const
-
- Returns the value set by setSorting()
-
- \sa setSorting()
-*/
-
-/*! \enum QDir::SortSpec
-
- This enum describes how QDir is to sort entries in a directory when
- it returns a list of them. The sort value is specified by or-ing
- together values from the following list: <ul>
-
- <li> \c Name - sort by name
- <li> \c Time - sort by time (modification time)
- <li> \c Size - sort by file size
- <li> \c Unsorted - do not sort
-
- <li> \c DirsFirst - put all directories first in the list
- <li> \c Reversed - reverse the sort order
- <li> \c IgnoreCase - sort case-insensitively
-
- </ul>
-
- You can only specify one of the first four. If you specify both \c
- DirsFirst and \c Reversed, directories are still put first but the
- list is otherwise reversed.
-*/
-
-// ### Unsorted+DirsFirst ? Unsorted+Reversed?
-
-#if 0
-/*!
- Sets the sorting order used by entryList() and entryInfoList().
-
- The \e sortSpec is specified by or-ing values from the enum
- SortSpec. The different values are:
-
- One of these:
- <dl compact>
- <dt>Name<dd> Sort by name (alphabetical order).
- <dt>Time<dd> Sort by time (most recent first).
- <dt>Size<dd> Sort by size (largest first).
- <dt>Unsorted<dd> Use the operating system order (UNIX does NOT sort
- alphabetically).
-
- ORed with zero or more of these:
-
- <dt>DirsFirst<dd> Always put directory names first.
- <dt>Reversed<dd> Reverse sort order.
- <dt>IgnoreCase<dd> Ignore case when sorting by name.
- </dl>
-*/
-
-void QDir::setSorting( int sortSpec )
-{
- if ( sortS == (SortSpec) sortSpec )
- return;
- sortS = (SortSpec) sortSpec;
- dirty = TRUE;
-}
-#endif
-
-/*!
- \fn bool QDir::matchAllDirs() const
- Returns the value set by setMatchAllDirs()
-
- \sa setMatchAllDirs()
-*/
-
-/*!
- If \e enable is TRUE, all directories will be listed (even if they do not
- match the filter or the name filter), otherwise only matched directories
- will be listed.
-
- \bug Currently, directories that do not match the filter will not be
- included (the name filter will be ignored as expected).
-
- \sa matchAllDirs()
-*/
-
-void QDir::setMatchAllDirs( bool enable )
-{
- if ( (bool)allDirs == enable )
- return;
- allDirs = enable;
- dirty = TRUE;
-}
-
-
-/*!
- Returns the number of files that was found.
- Equivalent to entryList().count().
- \sa operator[](), entryList()
-*/
-
-uint QDir::count() const
-{
- return entryList().count();
-}
-
-/*!
- Returns the file name at position \e index in the list of found file
- names.
- Equivalent to entryList().at(index).
-
- Returns null if the \e index is out of range or if the entryList()
- function failed.
-
- \sa count(), entryList()
-*/
-
-QString QDir::operator[]( int index ) const
-{
- entryList();
- return fList && index >= 0 && index < (int)fList->count() ?
- (*fList)[index] : QString::null;
-}
-
-
-/*!
- This function is included to easy porting from Qt 1.x to Qt 2.0,
- it is the same as entryList(), but encodes the filenames as 8-bit
- strings using QFile::encodedName().
-
- It is more efficient to use entryList().
-*/
-QStrList QDir::encodedEntryList( int filterSpec, int sortSpec ) const
-{
- QStrList r;
- QStringList l = entryList(filterSpec,sortSpec);
- for ( QStringList::Iterator it = l.begin(); it != l.end(); ++it ) {
- r.append( QFile::encodeName(*it) );
- }
- return r;
-}
-
-/*!
- This function is included to easy porting from Qt 1.x to Qt 2.0,
- it is the same as entryList(), but encodes the filenames as 8-bit
- strings using QFile::encodedName().
-
- It is more efficient to use entryList().
-*/
-QStrList QDir::encodedEntryList( const QString &nameFilter,
- int filterSpec,
- int sortSpec ) const
-{
- QStrList r;
- QStringList l = entryList(nameFilter,filterSpec,sortSpec);
- for ( QStringList::Iterator it = l.begin(); it != l.end(); ++it ) {
- r.append( QFile::encodeName(*it) );
- }
- return r;
-}
-
-
-
-/*!
- Returns a list of the names of all files and directories in the directory
- indicated by the setSorting(), setFilter() and setNameFilter()
- specifications.
-
- The filter and sorting specifications can be overridden using the
- \e filterSpec and \e sortSpec arguments.
-
- Returns an empty list if the directory is unreadable or does not exist.
-
- \sa entryInfoList(), setNameFilter(), setSorting(), setFilter(),
- encodedEntryList()
-*/
-
-QStringList QDir::entryList( int filterSpec, int sortSpec ) const
-{
- if ( !dirty && filterSpec == (int)DefaultFilter &&
- sortSpec == (int)DefaultSort )
- return *fList;
- return entryList( nameFilt, filterSpec, sortSpec );
-}
-
-/*!
- Returns a list of the names of all files and directories in the directory
- indicated by the setSorting(), setFilter() and setNameFilter()
- specifications.
-
- The filter and sorting specifications can be overridden using the
- \e nameFilter, \e filterSpec and \e sortSpec arguments.
-
- Returns and empty list if the directory is unreadable or does not exist.
-
- \sa entryInfoList(), setNameFilter(), setSorting(), setFilter(),
- encodedEntryList()
-*/
-
-QStringList QDir::entryList( const QString &nameFilter,
- int filterSpec, int sortSpec ) const
-{
- if ( filterSpec == (int)DefaultFilter )
- filterSpec = filtS;
- if ( sortSpec == (int)DefaultSort )
- sortSpec = sortS;
- QDir *that = (QDir*)this; // mutable function
- if ( that->readDirEntries(nameFilter, filterSpec, sortSpec) )
- return *that->fList;
- else
- return QStringList();
-}
-
-/*!
- Returns a list of QFileInfo objects for all files and directories in
- the directory pointed to using the setSorting(), setFilter() and
- setNameFilter() specifications.
-
- The filter and sorting specifications can be overridden using the
- \e filterSpec and \e sortSpec arguments.
-
- Returns 0 if the directory is unreadable or does not exist.
-
- The returned pointer is a const pointer to a QFileInfoList. The list is
- owned by the QDir object and will be reused on the next call to
- entryInfoList() for the same QDir instance. If you want to keep the
- entries of the list after a subsequent call to this function you will
- need to copy them.
-
- \sa entryList(), setNameFilter(), setSorting(), setFilter()
-*/
-
-const QFileInfoList *QDir::entryInfoList( int filterSpec, int sortSpec ) const
-{
- if ( !dirty && filterSpec == (int)DefaultFilter &&
- sortSpec == (int)DefaultSort )
- return fiList;
- return entryInfoList( nameFilt, filterSpec, sortSpec );
-}
-
-/*!
- Returns a list of QFileInfo objects for all files and directories in
- the directory pointed to using the setSorting(), setFilter() and
- setNameFilter() specifications.
-
- The filter and sorting specifications can be overridden using the
- \e nameFilter, \e filterSpec and \e sortSpec arguments.
-
- Returns 0 if the directory is unreadable or does not exist.
-
- The returned pointer is a const pointer to a QFileInfoList. The list is
- owned by the QDir object and will be reused on the next call to
- entryInfoList() for the same QDir instance. If you want to keep the
- entries of the list after a subsequent call to this function you will
- need to copy them.
-
- \sa entryList(), setNameFilter(), setSorting(), setFilter()
-*/
-
-const QFileInfoList *QDir::entryInfoList( const QString &nameFilter,
- int filterSpec, int sortSpec ) const
-{
- if ( filterSpec == (int)DefaultFilter )
- filterSpec = filtS;
- if ( sortSpec == (int)DefaultSort )
- sortSpec = sortS;
- QDir *that = (QDir*)this; // mutable function
- if ( that->readDirEntries(nameFilter, filterSpec, sortSpec) )
- return that->fiList;
- else
- return 0;
-}
-
-/*!
- Returns TRUE if the directory exists. (If a file with the same
- name is found this function will of course return FALSE).
-
- \sa QFileInfo::exists(), QFile::exists()
-*/
-
-bool QDir::exists() const
-{
- QFileInfo fi( dPath );
- return fi.exists() && fi.isDir();
-}
-
-/*!
- Returns TRUE if the directory path is relative to the current directory,
- FALSE if the path is absolute (e.g. under UNIX a path is relative if it
- does not start with a '/').
-
- According to Einstein this function should always return TRUE.
-
- \sa convertToAbs()
-*/
-
-bool QDir::isRelative() const
-{
- return isRelativePath( dPath );
-}
-
-/*!
- Converts the directory path to an absolute path. If it is already
- absolute nothing is done.
-
- \sa isRelative()
-*/
-
-void QDir::convertToAbs()
-{
- dPath = absPath();
-}
-
-/*!
- Makes a copy of d and assigns it to this QDir.
-*/
-
-QDir &QDir::operator=( const QDir &d )
-{
- dPath = d.dPath;
- delete fList;
- fList = 0;
- delete fiList;
- fiList = 0;
- nameFilt = d.nameFilt;
- dirty = TRUE;
- allDirs = d.allDirs;
- filtS = d.filtS;
- sortS = d.sortS;
- return *this;
-}
-
-/*!
- Sets the directory path to be the given path.
-*/
-
-QDir &QDir::operator=( const QString &path )
-{
- dPath = cleanDirPath( path );
- dirty = TRUE;
- return *this;
-}
-
-
-/*!
- \fn bool QDir::operator!=( const QDir &d ) const
- Returns TRUE if the \e d and this dir have different path or
- different sort/filter settings, otherwise FALSE.
-*/
-
-/*!
- Returns TRUE if the \e d and this dir have the same path and all sort
- and filter settings are equal, otherwise FALSE.
-*/
-
-bool QDir::operator==( const QDir &d ) const
-{
- return dPath == d.dPath &&
- nameFilt == d.nameFilt &&
- allDirs == d.allDirs &&
- filtS == d.filtS &&
- sortS == d.sortS;
-}
-
-
-/*!
- Removes a file.
-
- If \e acceptAbsPath is TRUE a path starting with a separator ('/')
- will remove the file with the absolute path, if \e acceptAbsPath is FALSE
- any number of separators at the beginning of \e fileName will be removed.
-
- Returns TRUE if successful, otherwise FALSE.
-*/
-
-bool QDir::remove( const QString &fileName, bool acceptAbsPath )
-{
- if ( fileName.isEmpty() ) {
-#if defined(CHECK_NULL)
- qWarning( "QDir::remove: Empty or null file name" );
-#endif
- return FALSE;
- }
- QString p = filePath( fileName, acceptAbsPath );
- return QFile::remove( p );
-}
-
-/*!
- Checks for existence of a file.
-
- If \e acceptAbsPaths is TRUE a path starting with a separator ('/')
- will check the file with the absolute path, if \e acceptAbsPath is FALSE
- any number of separators at the beginning of \e name will be removed.
-
- Returns TRUE if the file exists, otherwise FALSE.
-
- \sa QFileInfo::exists(), QFile::exists()
-*/
-
-bool QDir::exists( const QString &name, bool acceptAbsPath )
-{
- if ( name.isEmpty() ) {
-#if defined(CHECK_NULL)
- qWarning( "QDir::exists: Empty or null file name" );
-#endif
- return FALSE;
- }
- QString tmp = filePath( name, acceptAbsPath );
- return QFile::exists( tmp );
-}
-
-/*!
- Returns the native directory separator; '/' under UNIX and '\' under
- MS-DOS, Windows NT and OS/2.
-
- You do not need to use this function to build file paths. If you always
- use '/', Qt will translate your paths to conform to the underlying
- operating system.
-*/
-
-char QDir::separator()
-{
-#if defined(_OS_UNIX_)
- return '/';
-#elif defined (_OS_FATFS_)
- return '\\';
-#elif defined (_OS_MAC_)
- return ':';
-#else
- return '/';
-#endif
-}
-
-/*!
- Returns the current directory.
- \sa currentDirPath(), QDir::QDir()
-*/
-
-QDir QDir::current()
-{
- return QDir( currentDirPath() );
-}
-
-/*!
- Returns the home directory.
- \sa homeDirPath()
-*/
-
-QDir QDir::home()
-{
- return QDir( homeDirPath() );
-}
-
-/*!
- Returns the root directory.
- \sa rootDirPath() drives()
-*/
-
-QDir QDir::root()
-{
- return QDir( rootDirPath() );
-}
-
-/*!
- \fn QString QDir::homeDirPath()
-
- Returns the absolute path for the user's home directory,
- \sa home()
-*/
-
-QStringList qt_makeFilterList( const QString &filter )
-{
- if ( filter.isEmpty() )
- return QStringList();
-
- QChar sep( ';' );
- int i = filter.find( sep, 0 );
- if ( i == -1 && filter.find( ' ', 0 ) != -1 )
- sep = QChar( ' ' );
-
- QStringList lst = QStringList::split( sep, filter );
- QStringList lst2;
- QStringList::Iterator it = lst.begin();
-
- for ( ; it != lst.end(); ++it ) {
- QString s = *it;
- lst2 << s.stripWhiteSpace();
- }
- return lst2;
-}
-
-/*!
- Returns TRUE if the \e fileName matches one of the wildcards in the list \e filters.
- \sa QRegExp
-*/
-
-bool QDir::match( const QStringList &filters, const QString &fileName )
-{
- QStringList::ConstIterator sit = filters.begin();
- bool matched = FALSE;
- for ( ; sit != filters.end(); ++sit ) {
- QRegExp regexp( (*sit).data(), FALSE, TRUE );
- if ( regexp.match( fileName.data() ) != -1 ) {
- matched = TRUE;
- break;
- }
- }
-
- return matched;
-}
-
-/*!
- Returns TRUE if the \e fileName matches the wildcard \e filter.
- \a Filter may also contain multiple wildcards separated by spaces or
- semicolons.
- \sa QRegExp
-*/
-
-bool QDir::match( const QString &filter, const QString &fileName )
-{
- QStringList lst = qt_makeFilterList( filter );
- return match( lst, fileName );
-}
-
-
-/*!
- Removes all multiple directory separators ('/') and resolves
- any "." or ".." found in the path.
-
- Symbolic links are kept. This function does not return the
- canonical path, but rather the most simplified version of the input.
- "../stuff" becomes "stuff", "stuff/../nonsense" becomes "nonsense"
- and "\\stuff\\more\\..\\nonsense" becomes "\\stuff\\nonsense".
-
- \sa absPath() canonicalPath()
-*/
-
-QString QDir::cleanDirPath( const QString &filePath )
-{
- QString name = filePath;
- QString newPath;
-
- if ( name.isEmpty() )
- return name;
-
- slashify( name );
-
- bool addedSeparator;
- if ( isRelativePath(name) ) {
- addedSeparator = TRUE;
- name.insert( 0, '/' );
- } else {
- addedSeparator = FALSE;
- }
-
- int ePos, pos, upLevel;
-
- pos = ePos = name.length();
- upLevel = 0;
- int len;
-
- while ( pos && (pos = name.findRev('/',--pos)) != -1 ) {
- len = ePos - pos - 1;
- if ( len == 2 && name.at(pos + 1) == '.'
- && name.at(pos + 2) == '.' ) {
- upLevel++;
- } else {
- if ( len != 0 && (len != 1 || name.at(pos + 1) != '.') ) {
- if ( !upLevel )
- newPath = QString::fromLatin1("/")
- + name.mid(pos + 1, len) + newPath;
- else
- upLevel--;
- }
- }
- ePos = pos;
- }
- if ( addedSeparator ) {
- while ( upLevel-- )
- newPath.insert( 0, QString::fromLatin1("/..") );
- if ( !newPath.isEmpty() )
- newPath.remove( 0, 1 );
- else
- newPath = QString::fromLatin1(".");
- } else {
- if ( newPath.isEmpty() )
- newPath = QString::fromLatin1("/");
-#if defined(_OS_FATFS_) || defined(_OS_OS2EMX_)
- if ( name[0] == '/' ) {
- if ( name[1] == '/' ) // "\\machine\x\ ..."
- newPath.insert( 0, '/' );
- } else {
- newPath = name.left(2) + newPath;
- }
-#endif
- }
- return newPath;
-}
-
-int qt_cmp_si_sortSpec;
-
-#if defined(Q_C_CALLBACKS)
-extern "C" {
-#endif
-
-int qt_cmp_si( const void *n1, const void *n2 )
-{
- if ( !n1 || !n2 )
- return 0;
-
- QDirSortItem* f1 = (QDirSortItem*)n1;
- QDirSortItem* f2 = (QDirSortItem*)n2;
-
- if ( qt_cmp_si_sortSpec & QDir::DirsFirst )
- if ( f1->item->isDir() != f2->item->isDir() )
- return f1->item->isDir() ? -1 : 1;
-
- int r = 0;
- int sortBy = qt_cmp_si_sortSpec & QDir::SortByMask;
-
-#if 0
- switch ( sortBy ) {
- case QDir::Time:
- r = f1->item->lastModified().secsTo(f2->item->lastModified());
- break;
- case QDir::Size:
- r = f2->item->size() - f1->item->size();
- break;
- default:
- ;
- }
-#endif
-
- if ( r == 0 && sortBy != QDir::Unsorted ) {
- // Still not sorted - sort by name
- bool ic = qt_cmp_si_sortSpec & QDir::IgnoreCase;
-
- if ( f1->filename_cache.isNull() )
- f1->filename_cache = ic ? f1->item->fileName().lower()
- : f1->item->fileName();
- if ( f2->filename_cache.isNull() )
- f2->filename_cache = ic ? f2->item->fileName().lower()
- : f2->item->fileName();
-
- r = f1->filename_cache.compare(f2->filename_cache);
- }
-
- if ( r == 0 ) {
- // Enforce an order - the order the items appear in the array
- r = (int)((char*)n1 - (char*)n2);
- }
-
- if ( qt_cmp_si_sortSpec & QDir::Reversed )
- return -r;
- else
- return r;
-}
-
-#if defined(Q_C_CALLBACKS)
-}
-#endif
-
-#endif // QT_NO_DIR
diff --git a/qtools/qdir.h b/qtools/qdir.h
deleted file mode 100644
index 74b02b4..0000000
--- a/qtools/qdir.h
+++ /dev/null
@@ -1,237 +0,0 @@
-/****************************************************************************
-**
-**
-** Definition of QDir class
-**
-** Created : 950427
-**
-** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
-**
-** This file is part of the tools module of the Qt GUI Toolkit.
-**
-** This file may be distributed under the terms of the Q Public License
-** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#ifndef QDIR_H
-#define QDIR_H
-
-#ifndef QT_H
-#include "qstrlist.h"
-#include "qfileinfo.h"
-#endif // QT_H
-
-#ifndef QT_NO_DIR
-typedef QInternalList<QFileInfo> QFileInfoList;
-typedef QInternalListIterator<QFileInfo> QFileInfoListIterator;
-class QStringList;
-
-
-class Q_EXPORT QDir
-{
-public:
- enum FilterSpec { Dirs = 0x001,
- Files = 0x002,
- Drives = 0x004,
- NoSymLinks = 0x008,
- All = 0x007,
- TypeMask = 0x00F,
-
- Readable = 0x010,
- Writable = 0x020,
- Executable = 0x040,
- RWEMask = 0x070,
-
- Modified = 0x080,
- Hidden = 0x100,
- System = 0x200,
- AccessMask = 0x3F0,
-
- DefaultFilter = -1 };
-
- enum SortSpec { Name = 0x00,
- // Time = 0x01,
- Size = 0x02,
- Unsorted = 0x03,
- SortByMask = 0x03,
-
- DirsFirst = 0x04,
- Reversed = 0x08,
- IgnoreCase = 0x10,
- DefaultSort = -1 };
-
- QDir();
- QDir( const QString &path, const QString &nameFilter = QString::null,
- int sortSpec = Name | IgnoreCase, int filterSpec = All );
- QDir( const QDir & );
-
- virtual ~QDir();
-
- QDir &operator=( const QDir & );
- QDir &operator=( const QString &path );
-
- virtual void setPath( const QString &path );
- virtual QString path() const;
- virtual QString absPath() const;
- virtual QString canonicalPath() const;
-
- virtual QString dirName() const;
- virtual QString filePath( const QString &fileName,
- bool acceptAbsPath = TRUE ) const;
- virtual QString absFilePath( const QString &fileName,
- bool acceptAbsPath = TRUE ) const;
-
- static QString convertSeparators( const QString &pathName );
-
- virtual bool cd( const QString &dirName, bool acceptAbsPath = TRUE );
- virtual bool cdUp();
-
- QString nameFilter() const;
- virtual void setNameFilter( const QString &nameFilter );
- FilterSpec filter() const;
- virtual void setFilter( int filterSpec );
- //SortSpec sorting() const;
- //virtual void setSorting( int sortSpec );
-
- bool matchAllDirs() const;
- virtual void setMatchAllDirs( bool );
-
- uint count() const;
- QString operator[]( int ) const;
-
- virtual QStrList encodedEntryList( int filterSpec = DefaultFilter,
- int sortSpec = DefaultSort ) const;
- virtual QStrList encodedEntryList( const QString &nameFilter,
- int filterSpec = DefaultFilter,
- int sortSpec = DefaultSort ) const;
- virtual QStringList entryList( int filterSpec = DefaultFilter,
- int sortSpec = DefaultSort ) const;
- virtual QStringList entryList( const QString &nameFilter,
- int filterSpec = DefaultFilter,
- int sortSpec = DefaultSort ) const;
-
- virtual const QFileInfoList *entryInfoList( int filterSpec = DefaultFilter,
- int sortSpec = DefaultSort ) const;
- virtual const QFileInfoList *entryInfoList( const QString &nameFilter,
- int filterSpec = DefaultFilter,
- int sortSpec = DefaultSort ) const;
-
- static const QFileInfoList *drives();
-
- virtual bool mkdir( const QString &dirName,
- bool acceptAbsPath = TRUE ) const;
- virtual bool rmdir( const QString &dirName,
- bool acceptAbsPath = TRUE ) const;
-
- virtual bool isReadable() const;
- virtual bool exists() const;
- virtual bool isRoot() const;
-
- virtual bool isRelative() const;
- virtual void convertToAbs();
-
- virtual bool operator==( const QDir & ) const;
- virtual bool operator!=( const QDir & ) const;
-
- virtual bool remove( const QString &fileName,
- bool acceptAbsPath = TRUE );
- virtual bool rename( const QString &name, const QString &newName,
- bool acceptAbsPaths = TRUE );
- virtual bool exists( const QString &name,
- bool acceptAbsPath = TRUE );
-
- static char separator();
-
- static bool setCurrent( const QString &path );
- static QDir current();
- static QDir home();
- static QDir root();
- static QString currentDirPath();
- static QString homeDirPath();
- static QString rootDirPath();
-
- static bool match( const QStringList &filters, const QString &fileName );
- static bool match( const QString &filter, const QString &fileName );
- static QString cleanDirPath( const QString &dirPath );
- static bool isRelativePath( const QString &path );
-
-private:
- void init();
- virtual bool readDirEntries( const QString &nameFilter,
- int FilterSpec, int SortSpec );
-
- static void slashify ( QString &);
-
- QString dPath;
- QStringList *fList;
- QFileInfoList *fiList;
- QString nameFilt;
- FilterSpec filtS;
- SortSpec sortS;
- uint dirty : 1;
- uint allDirs : 1;
-};
-
-
-inline QString QDir::path() const
-{
- return dPath;
-}
-
-inline QString QDir::nameFilter() const
-{
- return nameFilt;
-}
-
-inline QDir::FilterSpec QDir::filter() const
-{
- return filtS;
-}
-
-#if 0
-inline QDir::SortSpec QDir::sorting() const
-{
- return sortS;
-}
-#endif
-
-inline bool QDir::matchAllDirs() const
-{
- return allDirs;
-}
-
-inline bool QDir::operator!=( const QDir &d ) const
-{
- return !(*this == d);
-}
-
-
-struct QDirSortItem {
- QString filename_cache;
- QFileInfo* item;
-};
-
-#endif // QT_NO_DIR
-#endif // QDIR_H
diff --git a/qtools/qdir_unix.cpp b/qtools/qdir_unix.cpp
deleted file mode 100644
index fa3c42e..0000000
--- a/qtools/qdir_unix.cpp
+++ /dev/null
@@ -1,290 +0,0 @@
-/****************************************************************************
-**
-**
-** Implementation of QDirclass
-**
-** Created : 950628
-**
-** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
-**
-** This file is part of the tools module of the Qt GUI Toolkit.
-**
-** This file may be distributed under the terms of the Q Public License
-** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses for Unix/X11 or for Qt/Embedded may use this file in accordance
-** with the Qt Commercial License Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#include "qglobal.h"
-
-#include "qdir.h"
-#ifndef QT_NO_DIR
-
-#include "qfileinfo.h"
-#include "qfiledefs_p.h"
-//#include "qregexp.h"
-#include "qstringlist.h"
-#include <stdlib.h>
-#include <ctype.h>
-
-extern QStringList qt_makeFilterList( const QString &filter );
-
-extern int qt_cmp_si_sortSpec;
-
-#if defined(Q_C_CALLBACKS)
-extern "C" {
-#endif
-
-extern int qt_cmp_si( const void *, const void * );
-
-#if defined(Q_C_CALLBACKS)
-}
-#endif
-
-
-void QDir::slashify( QString& )
-{
-}
-
-QString QDir::homeDirPath()
-{
- QString d;
- d = QFile::decodeName(getenv("HOME"));
- slashify( d );
- if ( d.isNull() )
- d = rootDirPath();
- return d;
-}
-
-QString QDir::canonicalPath() const
-{
- QString r;
-
- char cur[PATH_MAX];
- char tmp[PATH_MAX];
- if (GETCWD( cur, PATH_MAX )) {
- if ( CHDIR(QFile::encodeName(dPath)) >= 0 ) {
- if (GETCWD( tmp, PATH_MAX )) {
- r = QFile::decodeName(tmp);
- }
- (void)CHDIR( cur );
- }
- }
-
- slashify( r );
- return r;
-}
-
-bool QDir::mkdir( const QString &dirName, bool acceptAbsPath ) const
-{
- return MKDIR( QFile::encodeName(filePath(dirName,acceptAbsPath)), 0777 )
- == 0;
-}
-
-bool QDir::rmdir( const QString &dirName, bool acceptAbsPath ) const
-{
- return RMDIR( QFile::encodeName(filePath(dirName,acceptAbsPath)) ) == 0;
-}
-
-bool QDir::isReadable() const
-{
- return ACCESS( QFile::encodeName(dPath), R_OK | X_OK ) == 0;
-}
-
-bool QDir::isRoot() const
-{
- return dPath == QString::fromLatin1("/");
-}
-
-bool QDir::rename( const QString &name, const QString &newName,
- bool acceptAbsPaths )
-{
- if ( name.isEmpty() || newName.isEmpty() ) {
-#if defined(CHECK_NULL)
- qWarning( "QDir::rename: Empty or null file name(s)" );
-#endif
- return FALSE;
- }
- QString fn1 = filePath( name, acceptAbsPaths );
- QString fn2 = filePath( newName, acceptAbsPaths );
- return ::rename( QFile::encodeName(fn1),
- QFile::encodeName(fn2) ) == 0;
-}
-
-bool QDir::setCurrent( const QString &path )
-{
- int r;
- r = CHDIR( QFile::encodeName(path) );
- return r >= 0;
-}
-
-QString QDir::currentDirPath()
-{
- QString result;
-
- STATBUF st;
- if ( STAT( ".", &st ) == 0 ) {
- char currentName[PATH_MAX];
- if ( GETCWD( currentName, PATH_MAX ) != 0 )
- result = QFile::decodeName(currentName);
-#if defined(DEBUG)
- if ( result.isNull() )
- qWarning( "QDir::currentDirPath: getcwd() failed" );
-#endif
- } else {
-#if defined(DEBUG)
- qWarning( "QDir::currentDirPath: stat(\".\") failed" );
-#endif
- }
- slashify( result );
- return result;
-}
-
-QString QDir::rootDirPath()
-{
- QString d = QString::fromLatin1( "/" );
- return d;
-}
-
-bool QDir::isRelativePath( const QString &path )
-{
- int len = path.length();
- if ( len == 0 )
- return TRUE;
- return path[0] != '/';
-}
-
-bool QDir::readDirEntries( const QString &nameFilter,
- int filterSpec, int sortSpec )
-{
- int i;
- if ( !fList ) {
- fList = new QStringList;
- CHECK_PTR( fList );
- fiList = new QFileInfoList;
- CHECK_PTR( fiList );
- fiList->setAutoDelete( TRUE );
- } else {
- fList->clear();
- fiList->clear();
- }
-
- QStringList filters = qt_makeFilterList( nameFilter );
-
- bool doDirs = (filterSpec & Dirs) != 0;
- bool doFiles = (filterSpec & Files) != 0;
- bool noSymLinks = (filterSpec & NoSymLinks) != 0;
- bool doReadable = (filterSpec & Readable) != 0;
- bool doWritable = (filterSpec & Writable) != 0;
- bool doExecable = (filterSpec & Executable) != 0;
- bool doHidden = (filterSpec & Hidden) != 0;
-
-#if defined(_OS_OS2EMX_)
- //QRegExp wc( nameFilter, FALSE, TRUE ); // wild card, case insensitive
-#else
- //QRegExp wc( nameFilter, TRUE, TRUE ); // wild card, case sensitive
-#endif
- QFileInfo fi;
- DIR *dir;
- dirent *file;
-
- dir = opendir( QFile::encodeName(dPath) );
- if ( !dir ) {
-#if defined(CHECK_NULL)
- qWarning( "QDir::readDirEntries: Cannot read the directory: %s",
- QFile::encodeName(dPath).data() );
-#endif
- return FALSE;
- }
-
- while ( (file = readdir(dir)) ) {
- QString fn = QFile::decodeName(file->d_name);
- fi.setFile( *this, fn );
- if ( !match( filters, fn ) && !(allDirs && fi.isDir()) )
- continue;
- if ( (doDirs && fi.isDir()) || (doFiles && fi.isFile()) ) {
- if ( noSymLinks && fi.isSymLink() )
- continue;
- if ( (filterSpec & RWEMask) != 0 )
- if ( (doReadable && !fi.isReadable()) ||
- (doWritable && !fi.isWritable()) ||
- (doExecable && !fi.isExecutable()) )
- continue;
- if ( !doHidden && fn[0] == '.' &&
- fn != QString::fromLatin1(".")
- && fn != QString::fromLatin1("..") )
- continue;
- fiList->append( new QFileInfo( fi ) );
- }
- }
- if ( closedir(dir) != 0 ) {
-#if defined(CHECK_NULL)
- qWarning( "QDir::readDirEntries: Cannot close the directory: %s",
- dPath.local8Bit().data() );
-#endif
- }
-
- // Sort...
- if(fiList->count()) {
- QDirSortItem* si= new QDirSortItem[fiList->count()];
- QFileInfo* itm;
- i=0;
- for (itm = fiList->first(); itm; itm = fiList->next())
- si[i++].item = itm;
- qt_cmp_si_sortSpec = sortSpec;
- qsort( si, i, sizeof(si[0]), qt_cmp_si );
- // put them back in the list
- fiList->setAutoDelete( FALSE );
- fiList->clear();
- int j;
- for ( j=0; j<i; j++ ) {
- fiList->append( si[j].item );
- fList->append( si[j].item->fileName() );
- }
- delete [] si;
- fiList->setAutoDelete( TRUE );
- }
-
- if ( filterSpec == (FilterSpec)filtS && sortSpec == (SortSpec)sortS &&
- nameFilter == nameFilt )
- dirty = FALSE;
- else
- dirty = TRUE;
- return TRUE;
-}
-
-const QFileInfoList * QDir::drives()
-{
- // at most one instance of QFileInfoList is leaked, and this variable
- // points to that list
- static QFileInfoList * knownMemoryLeak = 0;
-
- if ( !knownMemoryLeak ) {
- knownMemoryLeak = new QFileInfoList;
- // non-win32 versions both use just one root directory
- knownMemoryLeak->append( new QFileInfo( rootDirPath() ) );
- }
-
- return knownMemoryLeak;
-}
-#endif //QT_NO_DIR
diff --git a/qtools/qdir_win32.cpp b/qtools/qdir_win32.cpp
deleted file mode 100644
index f7f2982..0000000
--- a/qtools/qdir_win32.cpp
+++ /dev/null
@@ -1,485 +0,0 @@
-/******************************************************************************
- *
- *
- *
- * Copyright (C) 1997-2001 by Dimitri van Heesch.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation under the terms of the GNU General Public License is hereby
- * granted. No representations are made about the suitability of this software
- * for any purpose. It is provided "as is" without express or implied warranty.
- * See the GNU General Public License for more details.
- *
- * Documents produced by Doxygen are derivative works derived from the
- * input used in their production; they are not affected by this license.
- *
- * Based on qdir_unix.cpp
- *
- * Copyright (C) 1992-2000 Trolltech AS.
- */
-
-
-#include "qglobal.h"
-
-#include "qdir.h"
-#ifndef QT_NO_DIR
-
-
-#include "qfileinfo.h"
-#include "qfiledefs_p.h"
-#include "qregexp_p.h"
-#include "qstringlist.h"
-#include <stdlib.h>
-#include <ctype.h>
-#if defined(_OS_WIN32_)
-#if defined(_CC_BOOL_DEF_)
-#undef bool
-#include <windows.h>
-#define bool int
-#else
-#include <windows.h>
-#endif
-#endif
-#if defined(_OS_OS2EMX_)
-extern Q_UINT32 DosQueryCurrentDisk(Q_UINT32*,Q_UINT32*);
-#define NO_ERROR 0
-#endif
-
-extern QStringList qt_makeFilterList( const QString &filter );
-
-extern int qt_cmp_si_sortSpec;
-
-#if defined(Q_C_CALLBACKS)
-extern "C" {
-#endif
-
-extern int qt_cmp_si( const void *, const void * );
-
-#if defined(Q_C_CALLBACKS)
-}
-#endif
-
-static QString p_getenv( QString name )
-{
- DWORD len = GetEnvironmentVariableW( ( LPCWSTR ) qt_winTchar ( name, TRUE ), NULL, 0 );
- if ( len == 0 )
- return QString::null;
- /* ansi: we allocate too much memory, but this shouldn't be the problem here ... */
- LPWSTR buf = (LPWSTR)new WCHAR[ len ];
- len = GetEnvironmentVariableW ( ( LPCWSTR ) qt_winTchar ( name, TRUE ), buf, len );
- if ( len == 0 )
- {
- delete[] buf;
- return QString::null;
- }
- QString ret = qt_winQString ( buf );
- delete[] buf;
- return ret;
-}
-
-
-void QDir::slashify( QString& n )
-{
- for ( int i=0; i<(int)n.length(); i++ )
- {
- if ( n[i] == '\\' )
- n[i] = '/';
- }
-}
-
-QString QDir::homeDirPath()
-{
- QString d = p_getenv ( "HOME" );
- if ( d.isNull () ) {
- d = p_getenv ( "USERPROFILE" );
- if ( d.isNull () ) {
- QString homeDrive = p_getenv ( "HOMEDRIVE" );
- QString homePath = p_getenv ( "HOMEPATH" );
- if ( !homeDrive.isNull () && !homePath.isNull () ) {
- d = homeDrive + homePath;
- } else {
- d = rootDirPath ();
- }
- }
- }
- slashify( d );
- return d;
-}
-
-QString QDir::canonicalPath() const
-{
- QString r;
-
- char cur[PATH_MAX];
- char tmp[PATH_MAX];
- GETCWD( cur, PATH_MAX );
- if ( CHDIR(QFile::encodeName(dPath)) >= 0 ) {
- GETCWD( tmp, PATH_MAX );
- r = QFile::decodeName(tmp);
- }
- CHDIR( cur );
-
- slashify( r );
- return r;
-}
-
-bool QDir::mkdir( const QString &dirName, bool acceptAbsPath ) const
-{
-#if defined(__CYGWIN32_)
- return MKDIR( QFile::encodeName(filePath(dirName,acceptAbsPath)), 0777 ) == 0;
-#else
- return _wmkdir( ( LPCWSTR ) filePath( dirName, acceptAbsPath ).ucs2() ) == 0;
-#endif
-}
-
-bool QDir::rmdir( const QString &dirName, bool acceptAbsPath ) const
-{
-#if defined(__CYGWIN32_)
- return RMDIR( QFile::encodeName(filePath(dirName,acceptAbsPath)) ) == 0;
-#else
- return _wrmdir( ( LPCWSTR ) filePath( dirName, acceptAbsPath ).ucs2() ) == 0;
-#endif
-}
-
-bool QDir::isReadable() const
-{
- QString path = dPath;
- if ( ( path[ 0 ] == '\\' ) || ( path[ 0 ] == '/' ) )
- path = rootDirPath() + path;
-#if defined(__CYGWIN32_)
- return ACCESS( QFile::encodeName(dPath), R_OK ) == 0;
-#else
- return ( _waccess( (wchar_t*) path.ucs2(), R_OK ) == 0 );
-#endif
-}
-
-bool QDir::isRoot() const
-{
- QString path = dPath;
- slashify( path );
- return path == rootDirPath ();
-}
-
-bool QDir::rename( const QString &name, const QString &newName,
- bool acceptAbsPaths )
-{
- if ( name.isEmpty() || newName.isEmpty() ) {
-#if defined(CHECK_NULL)
- qWarning( "QDir::rename: Empty or null file name(s)" );
-#endif
- return FALSE;
- }
- QString fn1 = filePath( name, acceptAbsPaths );
- QString fn2 = filePath( newName, acceptAbsPaths );
-#if defined(__CYGWIN32_)
- return ::rename( QFile::encodeName(fn1),
- QFile::encodeName(fn2) ) == 0;
-#else
- return MoveFileW( ( LPCWSTR ) fn1.ucs2(), ( LPCWSTR ) fn2.ucs2() ) != 0;
-#endif
-}
-
-bool QDir::setCurrent( const QString &path )
-{
-#if defined(__CYGWIN32_)
- int r;
- r = CHDIR( QFile::encodeName(path) );
- return r >= 0;
-#else
- if ( !QDir( path ).exists() )
- return false;
- return ( SetCurrentDirectoryW( ( LPCWSTR ) path.ucs2() ) >= 0 );
-#endif
-}
-
-QString QDir::currentDirPath()
-{
- QString result;
-
-#if defined(__CYGWIN32_)
-
- STATBUF st;
- if ( STAT( ".", &st ) == 0 ) {
- char currentName[PATH_MAX];
- if ( GETCWD( currentName, PATH_MAX ) != 0 )
- result = QFile::decodeName(currentName);
-#if defined(DEBUG)
- if ( result.isNull() )
- qWarning( "QDir::currentDirPath: getcwd() failed" );
-#endif
- } else {
-#if defined(DEBUG)
- qWarning( "QDir::currentDirPath: stat(\".\") failed" );
-#endif
- }
-
-#else
-
- DWORD size = 0;
- WCHAR currentName[ PATH_MAX ];
- size = ::GetCurrentDirectoryW( PATH_MAX, currentName );
- if ( size != 0 ) {
- if ( size > PATH_MAX ) {
- WCHAR * newCurrentName = new WCHAR[ size ];
- if ( ::GetCurrentDirectoryW( PATH_MAX, newCurrentName ) != 0 )
- result = QString::fromUcs2( ( ushort* ) newCurrentName );
- delete [] newCurrentName;
- } else {
- result = QString::fromUcs2( ( ushort* ) currentName );
- }
- }
-
- if ( result.length() >= 2 && result[ 1 ] == ':' )
- result[ 0 ] = result.at( 0 ).upper(); // Force uppercase drive letters.
-#endif
- slashify( result );
- return result;
-}
-
-QString QDir::rootDirPath()
-{
- QString d = p_getenv ( "SystemDrive" );
- if ( d.isNull () )
- d = QString::fromLatin1( "c:" ); // not "c:\\" !
- slashify ( d );
- return d;
-}
-
-bool QDir::isRelativePath( const QString &path )
-{
- if ( path.isEmpty() )
- return TRUE;
- int p = 0;
- if ( path[ 0 ].isLetter() && path[ 1 ] == ':' )
- p = 2; // we have checked the first 2.
- return ( ( path[ p ] != '/' ) && ( path[ p ] != '\\' ) );
-}
-
-#undef IS_SUBDIR
-#undef IS_RDONLY
-#undef IS_ARCH
-#undef IS_HIDDEN
-#undef IS_SYSTEM
-#undef FF_GETFIRST
-#undef FF_GETNEXT
-#undef FF_ERROR
-
-#if defined(_OS_WIN32_)
-#define IS_SUBDIR FILE_ATTRIBUTE_DIRECTORY
-#define IS_RDONLY FILE_ATTRIBUTE_READONLY
-#define IS_ARCH FILE_ATTRIBUTE_ARCHIVE
-#define IS_HIDDEN FILE_ATTRIBUTE_HIDDEN
-#define IS_SYSTEM FILE_ATTRIBUTE_SYSTEM
-#define FF_GETFIRST FindFirstFile
-#define FF_GETNEXT FindNextFile
-#define FF_ERROR INVALID_HANDLE_VALUE
-#else
-#define IS_SUBDIR _A_SUBDIR
-#define IS_RDONLY _A_RDONLY
-#define IS_ARCH _A_ARCH
-#define IS_HIDDEN _A_HIDDEN
-#define IS_SYSTEM _A_SYSTEM
-#define FF_GETFIRST _findfirst
-#define FF_GETNEXT _findnext
-#define FF_ERROR -1
-#endif
-
-
-bool QDir::readDirEntries( const QString &nameFilter,
- int filterSpec, int sortSpec )
-{
- int i;
- if ( !fList ) {
- fList = new QStringList;
- CHECK_PTR( fList );
- fiList = new QFileInfoList;
- CHECK_PTR( fiList );
- fiList->setAutoDelete( TRUE );
- } else {
- fList->clear();
- fiList->clear();
- }
-
- QStringList filters = qt_makeFilterList( nameFilter );
-
- bool doDirs = (filterSpec & Dirs) != 0;
- bool doFiles = (filterSpec & Files) != 0;
- bool noSymLinks = (filterSpec & NoSymLinks) != 0;
- bool doReadable = (filterSpec & Readable) != 0;
- bool doWritable = (filterSpec & Writable) != 0;
- bool doExecable = (filterSpec & Executable) != 0;
- bool doHidden = (filterSpec & Hidden) != 0;
- // show hidden files if the user asks explicitly for e.g. .*
- if ( !doHidden && !nameFilter.isEmpty() && nameFilter[0] == '.' )
- doHidden = TRUE;
- bool doModified = (filterSpec & Modified) != 0;
- bool doSystem = (filterSpec & System) != 0;
-
- QRegExp wc( nameFilter.data(), FALSE, TRUE ); // wild card, case insensitive
- bool first = TRUE;
- QString p = dPath.copy();
- int plen = p.length();
-#if defined(_OS_WIN32_)
- HANDLE ff;
- WIN32_FIND_DATAW finfo;
-#else
- long ff;
- _finddata_t finfo;
-#endif
- QFileInfo fi;
- if ( plen == 0 )
- {
-#if defined(CHECK_NULL)
- warning( "QDir::readDirEntries: No directory name specified" );
-#endif
- return FALSE;
- }
- if ( p.at(plen-1) != '/' && p.at(plen-1) != '\\' )
- p += '/';
- p += "*.*";
-
-#if defined(__CYGWIN32_)
- ff = FF_GETFIRST( p.data(), &finfo );
-#else
- ff = FindFirstFileW ( ( LPCWSTR ) p.ucs2(), &finfo );
-#endif
- if ( ff == FF_ERROR )
- {
-#if defined(DEBUG)
- warning( "QDir::readDirEntries: Cannot read the directory: %s",
- (const char *)dPath.utf8() );
-#endif
- return FALSE;
- }
-
- while ( TRUE )
- {
- if ( first )
- first = FALSE;
- else
- {
-#if defined(__CYGWIN32_)
- if ( FF_GETNEXT(ff,&finfo) == -1 )
- break;
-#else
- //if ( !FF_GETNEXT(ff,&finfo) )
- // break;
- if (!FindNextFileW(ff, &finfo ))
- break;
-#endif
- }
-#if defined(__CYGWIN32_)
- int attrib = finfo.attrib;
-#else
- int attrib = finfo.dwFileAttributes;
-#endif
- bool isDir = (attrib & IS_SUBDIR) != 0;
- bool isFile = !isDir;
- bool isSymLink = FALSE;
- bool isReadable = TRUE;
- bool isWritable = (attrib & IS_RDONLY) == 0;
- bool isExecable = FALSE;
- bool isModified = (attrib & IS_ARCH) != 0;
- bool isHidden = (attrib & IS_HIDDEN) != 0;
- bool isSystem = (attrib & IS_SYSTEM) != 0;
-
-#if defined(__CYGWIN32_)
- const char *fname = finfo.name;
-#else
- //const char *fname = finfo.cFileName;
- QString fname = QString::fromUcs2( ( const unsigned short* ) finfo.cFileName);
-#endif
- if ( wc.match(fname.utf8()) == -1 && !(allDirs && isDir) )
- continue;
-
- QString name = fname;
- if ( doExecable )
- {
- QString ext = name.right(4).lower();
- if ( ext == ".exe" || ext == ".com" || ext == ".bat" ||
- ext == ".pif" || ext == ".cmd" )
- isExecable = TRUE;
- }
-
- if ( (doDirs && isDir) || (doFiles && isFile) )
- {
- if ( noSymLinks && isSymLink )
- continue;
- if ( (filterSpec & RWEMask) != 0 )
- if ( (doReadable && !isReadable) ||
- (doWritable && !isWritable) ||
- (doExecable && !isExecable) )
- continue;
- if ( doModified && !isModified )
- continue;
- if ( !doHidden && isHidden )
- continue;
- if ( !doSystem && isSystem )
- continue;
- fi.setFile( *this, name );
- fiList->append( new QFileInfo( fi ) );
- }
- }
-#if defined(__CYGWIN32_)
- _findclose( ff );
-#else
- FindClose( ff );
-#endif
-
- // Sort...
- QDirSortItem* si= new QDirSortItem[fiList->count()];
- QFileInfo* itm;
- i=0;
- for (itm = fiList->first(); itm; itm = fiList->next())
- si[i++].item = itm;
- qt_cmp_si_sortSpec = sortSpec;
- qsort( si, i, sizeof(si[0]), qt_cmp_si );
- // put them back in the list
- fiList->setAutoDelete( FALSE );
- fiList->clear();
- int j;
- for ( j=0; j<i; j++ ) {
- fiList->append( si[j].item );
- fList->append( si[j].item->fileName() );
- }
- delete [] si;
- fiList->setAutoDelete( TRUE );
-
- if ( filterSpec == (FilterSpec)filtS && sortSpec == (SortSpec)sortS &&
- nameFilter == nameFilt )
- dirty = FALSE;
- else
- dirty = TRUE;
- return TRUE;
-}
-
-const QFileInfoList * QDir::drives()
-{
- // at most one instance of QFileInfoList is leaked, and this variable
- // points to that list
- static QFileInfoList * knownMemoryLeak = 0;
-
- if ( !knownMemoryLeak ) {
- knownMemoryLeak = new QFileInfoList;
-
-#if defined(_OS_WIN32_)
- Q_UINT32 driveBits = (Q_UINT32) GetLogicalDrives() & 0x3ffffff;
-#elif defined(_OS_OS2EMX_)
- Q_UINT32 driveBits, cur;
- if (DosQueryCurrentDisk(&cur,&driveBits) != NO_ERROR)
- exit(1);
- driveBits &= 0x3ffffff;
-#endif
- char driveName[4];
- qstrcpy( driveName, "a:/" );
- while( driveBits ) {
- if ( driveBits & 1 )
- knownMemoryLeak->append( new QFileInfo( driveName ) );
- driveName[0]++;
- driveBits = driveBits >> 1;
- }
- }
-
- return knownMemoryLeak;
-}
-#endif //QT_NO_DIR
diff --git a/qtools/qfeatures.h b/qtools/qfeatures.h
deleted file mode 100644
index 1042ce6..0000000
--- a/qtools/qfeatures.h
+++ /dev/null
@@ -1,978 +0,0 @@
-/****************************************************************************
-**
-**
-** Global feature selection
-**
-** Created : 000417
-**
-** Copyright (C) 2000 Trolltech AS. All rights reserved.
-**
-** This file is part of the tools module of the Qt GUI Toolkit.
-**
-** This file may be distributed under the terms of the Q Public License
-** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#ifndef QFEATURES_H
-#define QFEATURES_H
-
-/*! \page features....html
- ...
-*/
-
-// Qt ships with a number of pre-defined configurations. If none suit
-// your needs, define QCONFIG_LOCAL and create a "qconfig-local.h" file.
-//
-// Note that disabling some features will produce a libqt that is not
-// compatible with other libqt builds. Such modifications are only
-// supported on Qt/Embedded where reducing the library size is important
-// and where the application-suite is often a fixed set.
-//
-#if defined(QCONFIG_LOCAL)
-#include <qconfig-local.h>
-#elif defined(QCONFIG_MINIMAL)
-#include <qconfig-minimal.h>
-#elif defined(QCONFIG_SMALL)
-#include <qconfig-small.h>
-#elif defined(QCONFIG_MEDIUM)
-#include <qconfig-medium.h>
-#elif defined(QCONFIG_LARGE)
-#include <qconfig-large.h>
-#else // everything...
-#include <qconfig.h>
-#endif
-
-
-// Data structures
-/*!
- QStringList
-*/
-//#define QT_NO_STRINGLIST
-
-#if defined(QT_NO_IMAGE_SMOOTHSCALE)
-/*!
- QIconSet
-*/
-# define QT_NO_ICONSET
-#endif
-
-// File I/O
-#if defined(QT_NO_STRINGLIST)
- /*!
- QDir
- */
-# define QT_NO_DIR
-#endif
-
-/*!
- Palettes
-*/
-//#define QT_NO_PALETTE
-
-/*!
- QTextStream
-*/
-//#define QT_NO_TEXTSTREAM
-/*!
- QDataStream
-*/
-//#define QT_NO_DATASTREAM
-
-/*!
- Dynamic module linking
-*/
-//#define QT_NO_PLUGIN
-
-
-// Images
-/*!
- BMP image I/O
- <p>The Windows Bitmap (BMP) image format is common on MS-Windows.
- <p>This is an uncompressed image format
- offering few advantages over PNG or JPEG.
-*/
-#if defined(QT_NO_DATASTREAM)
-# define QT_NO_IMAGEIO_BMP
-#endif
-/*!
- PPM image I/O
- <p>The Portable PixMap (PPM) image format is common on Unix.
- <p>This is an uncompressed image format
- offering few advantages over PNG or JPEG.
-*/
-//#define QT_NO_IMAGEIO_PPM
-/*!
- XBM image I/O
- <p>The X11 BitMap (XBM) image format is common on X11.
- <p>This is an uncompressed monochrome image format.
- Qt uses this format for some internal images (eg. mouse cursors).
-*/
-//#define QT_NO_IMAGEIO_XBM
-/*!
- XPM image I/O
- <p>The X11 PixMap (XPM) image format is common on X11.
- <p>This is an uncompressed image format.
- XPM images have the small advantage that they can be trivially
- included in source files as they are C code.
- Qt uses this format for some internal images (eg. QMessageBox icons).
-*/
-#if defined(QT_NO_TEXTSTREAM)
-# define QT_NO_IMAGEIO_XPM
-#endif
-/*!
- PNG image I/O
- <p>The Portable Network Graphics (PNG) is a compressed image format.
- <p>See <a href=http://www.libpng.org/pub/png/>The PNG Home Site</a> for
- details of the format.
-*/
-//#define QT_NO_IMAGEIO_PNG
-/*!
- MNG image I/O
- <p>The Multiple-image Network Graphics (MNG) is a compressed animation format.
- <p>See <a href=http://www.libpng.org/pub/mng/>The MNG Home Site</a> for
- details of the format.
-*/
-//#define QT_NO_IMAGEIO_MNG
-/*!
- JPEG image I/O
- <p>The Joint Photographic Experts Group (JPEG) is a compressed lossy image format that gives high compression
- for real-world and photo-realistic images.
-*/
-//#define QT_NO_IMAGEIO_JPEG
-
-/*!
- Asynchronous I/O
- <p>Allows push-driven data processing.
-*/
-//#define QT_NO_ASYNC_IO
-/*!
- Asynchronous image I/O
- <p>Allows push-driven images.
-*/
-//#define QT_NO_ASYNC_IMAGE_IO
-#if defined(QT_NO_ASYNC_IO) || defined(QT_NO_ASYNC_IMAGE_IO)
- /*!
- Animated images
- <p>This includes animated GIFs.
- <p><b>Note: this currently also requires <tt>QT_BUILTIN_GIF_READER</tt> to
- be defined when building Qt.</b>
- */
-# define QT_NO_MOVIE
-#endif
-
-// Fonts
-/*!
- TrueType font files
- <p>Scalable font format common on MS-Windows and becoming common on Unix.
- <p>Only supported on Qt/Embedded.
-*/
-//#define QT_NO_TRUETYPE
-/*!
- BDF font files
- <p>The Bitmap Distribution Format (BDF) font file format, common
- on Unix.
- <p>Only supported on Qt/Embedded.
-*/
-#if defined(QT_NO_TEXTSTREAM) || defined(QT_NO_STRINGLIST)
-# define QT_NO_BDF
-#endif
-/*!
- QFontDatabase
-*/
-#if defined(QT_NO_STRINGLIST)
-# define QT_NO_FONTDATABASE
-#endif
-
-// Internationalization
-
-/*!
- QObject::tr()
-*/
-#if defined(QT_NO_DATASTREAM)
-# define QT_NO_TRANSLATION
-#endif
-
-/*!
- QTextCodec class and subclasses
-*/
-//#define QT_NO_TEXTCODEC
-
-#if defined(QT_NO_TEXTCODEC)
- /*!
- QTextCodec classes
- <p>This includes some large conversion tables.
- */
-# define QT_NO_CODECS
-#endif
-#if defined(QT_LITE_UNICODE)
- /*!
- Unicode property tables
- <p>These include some large tables.
- */
-# define QT_NO_UNICODETABLES
-#endif
-
-/*!
- MIME
-*/
-#if defined(QT_NO_DIR)
-# define QT_NO_MIME
-#endif
-#if defined(QT_NO_MIME) || defined(QT_NO_TEXTSTREAM) || defined(QT_NO_DRAWUTIL) || defined(QT_NO_IMAGE_SMOOTHSCALE)
- /*!
- RichText (HTML) display
- */
-# define QT_NO_RICHTEXT
-#endif
-
-/*!
- XML
-*/
-#if defined(QT_NO_STRINGLIST) || defined(QT_NO_TEXTSTREAM) || defined(QT_NO_TEXTCODEC)
-# define QT_NO_XML
-#endif
-
-/*!
- Document Object Model
-*/
-#if defined(QT_NO_XML) || defined(QT_NO_MIME)
-# define QT_NO_DOM
-#endif
-
-// Sound
-/*!
- Playing sounds
-*/
-//#define QT_NO_SOUND
-
-/*!
- Properties
-*/
-#if defined(QT_NO_STRINGLIST) || defined(QT_NO_ICONSET)
-# define QT_NO_PROPERTIES
-#endif
-
-
-
-// Networking
-
-/*!
- Network support
-*/
-//#define QT_NO_NETWORK
-
-#if defined(QT_NO_NETWORK) || defined(QT_NO_STRINGLIST) || defined(QT_NO_TEXTSTREAM)
- /*!
- DNS
- */
-# define QT_NO_DNS
-#endif
-/*!
- Network file access
-*/
-#if defined(QT_NO_NETWORK) || defined(QT_NO_DIR) || defined(QT_NO_STRINGLIST)
-# define QT_NO_NETWORKPROTOCOL
-#endif
-#if defined(QT_NO_NETWORKPROTOCOL) || defined(QT_NO_DNS)
- /*!
- FTP file access
- */
-# define QT_NO_NETWORKPROTOCOL_FTP
- /*!
- HTTP file access
- */
-# define QT_NO_NETWORKPROTOCOL_HTTP
-#endif
-
-/*!
- External process invocation.
-*/
-//#define QT_NO_PROCESS
-
-
-// Qt/Embedded-specific
-
-#if defined(QT_NO_NETWORK)
- /*!
- Multi-process support.
- */
-# define QT_NO_QWS_MULTIPROCESS
-#endif
-
-#if defined(QT_NO_QWS_MULTIPROCESS) || defined(QT_NO_DATASTREAM)
- /*!
- Palmtop Communication Protocol
- */
-# define QT_NO_COP
-#endif
-
-/*!
- Console keyboard support
-*/
-//#define QT_NO_QWS_KEYBOARD
-
-/*!
- Visible cursor
-*/
-#if defined(QT_NO_CURSOR)
-# define QT_NO_QWS_CURSOR
-#endif
-
-/*!
- Alpha-blended cursor
-*/
-//#define QT_NO_QWS_ALPHA_CURSOR
-/*!
- Mach64 acceleration
-*/
-//#define QT_NO_QWS_MACH64
-/*!
- Voodoo3 acceleration
-*/
-//#define QT_NO_QWS_VOODOO3
-/*!
- Matrox MGA acceleration (Millennium/Millennium II/Mystique/G200/G400)
-*/
-//#define QT_NO_QWS_MATROX
-/*!
- Virtual frame buffer
-*/
-
-//#define QT_NO_QWS_VFB
-/*!
- Transformed frame buffer
-*/
-//#define QT_NO_QWS_TRANSFORMED
-#if defined(QT_NO_NETWORK)
-/*!
- Remote frame buffer (VNC)
-*/
-# ifndef QT_NO_QWS_VNC
-# define QT_NO_QWS_VNC
-# endif
-#endif
-/*!
- 1-bit monochrome
-*/
-//#define QT_NO_QWS_DEPTH_1
-/*!
- 4-bit grayscale
-*/
-//#define QT_NO_QWS_DEPTH_4
-/*!
- 4-bit VGA
-*/
-//#define QT_NO_QWS_VGA_16
-/*!
- SVGALib Support
- Not implemented yet
-*/
-#define QT_NO_QWS_SVGALIB
-/*!
- 8-bit grayscale
-*/
-#define QT_NO_QWS_DEPTH_8GRAYSCALE
-/*!
- 8-bit color
-*/
-//#define QT_NO_QWS_DEPTH_8
-/*!
- 15 or 16-bit color (define QT_QWS_DEPTH16_RGB as 555 for 15-bit)
-*/
-//#define QT_NO_QWS_DEPTH_16
-/*!
- 24-bit color
-*/
-//#define QT_NO_QWS_DEPTH_24
-/*!
- 32-bit color
-*/
-//#define QT_NO_QWS_DEPTH_32
-
-/*!
- Window Manager
-*/
-//#define QT_NO_QWS_MANAGER
-
-/*!
- Window Manager Styles
-*/
-#define QT_NO_QWS_KDE2_WM_STYLE
-#if defined( QT_NO_QWS_MANAGER ) || defined( QT_NO_IMAGEIO_XPM )
-# define QT_NO_QWS_AQUA_WM_STYLE
-# define QT_NO_QWS_BEOS_WM_STYLE
-# define QT_NO_QWS_KDE_WM_STYLE
-# define QT_NO_QWS_QPE_WM_STYLE
-# define QT_NO_QWS_WINDOWS_WM_STYLE
-#endif
-
-/*!
- Saving of fonts
-*/
-//#define QT_NO_QWS_SAVEFONTS
-
-/*!
- Favour code size over graphics speed
- <p>Smaller, slower code will be used for drawing operations.
- <p>Only supported on Qt/Embedded.
-*/
-//#define QT_NO_QWS_GFX_SPEED
-
-/*!
- Qt/Embedded window system properties.
-*/
-//#define QT_NO_QWS_PROPERTIES
-
-#if defined(QT_NO_QWS_PROPERTIES) || defined(QT_NO_MIME)
- /*!
- Cut and paste
- */
-# define QT_NO_CLIPBOARD
-#endif
-
-#if defined(QT_NO_MIME) || defined(QT_NO_QWS_PROPERTIES)
- /*!
- Drag and drop
- */
-# define QT_NO_DRAGANDDROP
-#endif
-
-#if defined(QT_NO_PROPERTIES)
- /*!
- SQL
- */
-# define QT_NO_SQL
-#endif
-
-#if defined(QT_NO_CLIPBOARD) || defined(QT_NO_MIME) || defined(_WS_QWS_)
- /*!
- Cut and paste of complex data types (non-text)
- Not yet implemented for QWS.
- */
-# define QT_NO_MIMECLIPBOARD
-#endif
-
-
-/*!
- Drawing utility functions
-*/
-//#define QT_NO_DRAWUTIL
-/*!
- TrueColor QImage
-*/
-//#define QT_NO_IMAGE_TRUECOLOR
-/*!
- Smooth QImage scaling
-*/
-//#define QT_NO_IMAGE_SMOOTHSCALE
-/*!
- Image file text strings
-*/
-#if defined(QT_NO_STRINGLIST)
-# define QT_NO_IMAGE_TEXT
-#endif
-
-#if defined(QT_NO_IMAGE_TRUECOLOR)
- /*!
- 16-bit QImage
- */
-# define QT_NO_IMAGE_16_BIT
-#endif
-/*!
- Cursors
-*/
-//#define QT_NO_CURSOR
-
-// Painting
-/*!
- Named colors
-*/
-//#define QT_NO_COLORNAMES
-/*!
- Scaling and rotation
-*/
-//#define QT_NO_TRANSFORMATIONS
-
-/*!
- Printing
-*/
-#if defined(QT_NO_TEXTSTREAM)
-# define QT_NO_PRINTER
-#endif
-
-/*!
- QPicture
-*/
-#if defined(QT_NO_DATASTREAM)
-# define QT_NO_PICTURE
-#endif
-
-// Layout
-/*!
- Automatic widget layout
-*/
-//#define QT_NO_LAYOUT
-
-// Widgets
-#if defined(QT_NO_DRAWUTIL) || defined(QT_NO_PALETTE)
-/*!
- QStyle
-*/
-# define QT_NO_STYLE
-#endif
-
-
-/*!
- Dialogs
-*/
-//#define QT_NO_DIALOG
-/*!
- Semi-modal dialogs
-*/
-//#define QT_NO_SEMIMODAL
-/*!
- Framed widgets
-*/
-//#define QT_NO_FRAME
-
-/*!
- Special widget effects (fading, scrolling)
-*/
-//#define QT_NO_EFFECTS
-
-
-/*!
- QLabel
-*/
-#ifdef QT_NO_FRAME
-# define QT_NO_LABEL
-#endif
-
-/*!
- Toolbars
-*/
-#ifdef QT_NO_LAYOUT
-# define QT_NO_TOOLBAR
-#endif
-
-/*!
- Buttons
-*/
-#if defined(QT_NO_BUTTON) || defined(QT_NO_STYLE)
-/*!
- Check-boxes
-*/
-# define QT_NO_CHECKBOX
-/*!
- Radio-buttons
-*/
-# define QT_NO_RADIOBUTTON
-#endif
-#if defined(QT_NO_BUTTON) || defined(QT_NO_TOOLBAR) || defined(QT_NO_ICONSET)
-/*!
- Tool-buttons
-*/
-# define QT_NO_TOOLBUTTON
-#endif
-/*!
- Grid layout widgets
-*/
-#ifdef QT_NO_FRAME
-# define QT_NO_GRID
-#endif
-/*!
- Group boxes
-*/
-#ifdef QT_NO_FRAME
-# define QT_NO_GROUPBOX
-#endif
-#if defined(QT_NO_GROUPBOX)
-/*!
- Button groups
-*/
-# define QT_NO_BUTTONGROUP
-/*!
- Horizontal group boxes
-*/
-# define QT_NO_HGROUPBOX
-#endif
-#if defined(QT_NO_HGROUPBOX)
-/*!
- Vertical group boxes
-*/
-# define QT_NO_VGROUPBOX
-#endif
-#if defined(QT_NO_BUTTONGROUP)
-/*!
- Horizontal button groups
-*/
-# define QT_NO_HBUTTONGROUP
-#endif
-#if defined(QT_NO_HBUTTONGROUP)
-/*!
- Vertical button groups
-*/
-# define QT_NO_VBUTTONGROUP
-#endif
-/*!
- Horizontal box layout widgets
-*/
-#ifdef QT_NO_FRAME
-# define QT_NO_HBOX
-#endif
-#if defined(QT_NO_HBOX)
-/*!
- Vertical box layout widgets
-*/
-# define QT_NO_VBOX
-#endif
-/*!
- Single-line edits
-*/
-#if defined(QT_NO_PALETTE)
-# define QT_NO_LINEEDIT
-#endif
-#if defined(QT_NO_TOOLBAR)
-/*!
- Main-windows
-*/
-# define QT_NO_MAINWINDOW
-#endif
-#if defined(QT_NO_ICONSET)
-/*!
- Menu-like widgets
-*/
-# define QT_NO_MENUDATA
-#endif
-#if defined(QT_NO_MENUDATA)
-/*!
- Popup-menus
-*/
-# define QT_NO_POPUPMENU
-/*!
- Menu bars
-*/
-# define QT_NO_MENUBAR
-#endif
-#if defined(QT_NO_BUTTON) || defined(QT_NO_ICONSET) || defined(QT_NO_POPUPMENU)
-/*!
- Push-buttons
-*/
-# define QT_NO_PUSHBUTTON
-#endif
-/*!
- Progress bars
-*/
-#ifdef QT_NO_FRAME
-# define QT_NO_PROGRESSBAR
-#endif
-/*!
- Range-control widgets
-*/
-//#define QT_NO_RANGECONTROL
-#if defined(QT_NO_RANGECONTROL) || defined(QT_NO_STYLE)
-/*!
- Scroll bars
-*/
-# define QT_NO_SCROLLBAR
-/*!
- Sliders
-*/
-# define QT_NO_SLIDER
-/*!
- Spin boxes
-*/
-# define QT_NO_SPINBOX
-/*!
- Dials
-*/
-# define QT_NO_DIAL
-#endif
-
-
-#if defined(QT_NO_SCROLLBAR) || defined(QT_NO_FRAME)
-/*!
- Scrollable view widgets
-*/
-# define QT_NO_SCROLLVIEW
-#endif
-#if defined(QT_NO_SCROLLVIEW)
-/*!
- QCanvas
-*/
-# define QT_NO_CANVAS
-/*!
- QIconView
-*/
-# define QT_NO_ICONVIEW
-#endif
-
-#if defined(QT_NO_SCROLLBAR)
-/*!
- Table-like widgets
-*/
-# define QT_NO_TABLEVIEW
-#endif
-#if defined(QT_NO_TABLEVIEW)
-/*!
- Multi-line edits
-*/
-# define QT_NO_MULTILINEEDIT
-#endif
-
-/*!
- Splitters
-*/
-#ifdef QT_NO_FRAME
-# define QT_NO_SPLITTER
-#endif
-/*!
- Status bars
-*/
-#ifdef QT_NO_LAYOUT
-# define QT_NO_STATUSBAR
-#endif
-/*!
- Tab-bars
-*/
-#if defined(QT_NO_ICONSET)
-# define QT_NO_TABBAR
-#endif
-#if defined(QT_NO_TABBAR)
-/*!
- Tab widgets
-*/
-# define QT_NO_TABWIDGET
-#endif
-/*!
- Tool tips
-*/
-#if defined( QT_NO_LABEL ) || defined( QT_NO_PALETTE )
-# define QT_NO_TOOLTIP
-#endif
-/*!
- Input validators
-*/
-//#define QT_NO_VALIDATOR
-/*!
- "What's this" help
-*/
-#if defined( QT_NO_TOOLTIP )
-# define QT_NO_WHATSTHIS
-#endif
-/*!
- Widget stacks
-*/
-#ifdef QT_NO_FRAME
-# define QT_NO_WIDGETSTACK
-#endif
-
-#if defined(QT_NO_RICHTEXT) || defined(QT_NO_SCROLLVIEW)
- /*!
- QTextView
- */
-# define QT_NO_TEXTVIEW
-#endif
-
-#if defined(QT_NO_TEXTVIEW)
- /*!
- QTextBrowser
- */
-# define QT_NO_TEXTBROWSER
-#endif
-
-#if defined(QT_NO_STYLE)
- /*!
- Windows style
- */
-# define QT_NO_STYLE_WINDOWS
- /*!
- Motif style
- */
-# define QT_NO_STYLE_MOTIF
-#endif
-
-#if defined(QT_NO_STYLE_MOTIF)
- /*!
- Motif-plus style
- */
-# define QT_NO_STYLE_MOTIFPLUS
-#endif
-
-
-#if defined(QT_NO_SCROLLVIEW) || defined(QT_NO_STRINGLIST)
- /*!
- QListBox
- */
-# define QT_NO_LISTBOX
-#endif
-
-/*!
- QAccel
-*/
-//#define QT_NO_ACCEL
-
-/*!
- QSizeGrip
-*/
-#ifdef QT_NO_PALETTE
-# define QT_NO_SIZEGRIP
-#endif
-/*!
- QHeader
-*/
-#ifdef QT_NO_ICONSET
-# define QT_NO_HEADER
-#endif
-/*!
- QWorkSpace
-*/
-#ifdef QT_NO_FRAME
-# define QT_NO_WORKSPACE
-#endif
-/*!
- QLCDNumber
-*/
-#ifdef QT_NO_FRAME
-# define QT_NO_LCDNUMBER
-#endif
-/*!
- QAction
-*/
-//#define QT_NO_ACTION
-
-#if defined(QT_NO_HEADER)
- /*!
- QTable
- */
-# define QT_NO_TABLE
-#endif
-
-#if defined(QT_NO_LISTBOX)
- /*!
- QComboBox
- */
-# define QT_NO_COMBOBOX
-#endif
-
-#if defined(QT_NO_HEADER) || defined(QT_NO_SCROLLVIEW)
- /*!
- QListView
- */
-# define QT_NO_LISTVIEW
-#endif
-
-#if defined(QT_NO_STYLE_WINDOWS)
- /*!
- Compact Windows style
- */
-# define QT_NO_STYLE_COMPACT
-#endif
-
-#if defined(QT_NO_STYLE_MOTIF) || defined(QT_NO_TRANSFORMATIONS)
- /*!
- CDE style
- */
-# define QT_NO_STYLE_CDE
- /*!
- SGI style
- */
-# define QT_NO_STYLE_SGI
-#endif
-#if defined(QT_NO_STYLE_WINDOWS)
- /*!
- Platinum style
- */
-# define QT_NO_STYLE_PLATINUM
-#endif
-
-/*!
- QColorDialog
-*/
-#if defined(QT_NO_LAYOUT) || defined(QT_NO_LABEL) || defined(QT_NO_PUSHBUTTON) || defined(QT_NO_DIALOG)
-# define QT_NO_COLORDIALOG
-#endif
-#if defined(QT_NO_DIALOG)
-/*!
- QMessageBox
-*/
-# define QT_NO_MESSAGEBOX
-#endif
-#if defined(QT_NO_DIALOG) || defined(QT_NO_TABBAR)
-/*!
- QTabDialog
-*/
-#define QT_NO_TABDIALOG
-#endif
-
-#if defined(QT_NO_DIALOG)
-/*!
- QWizard
-*/
-# define QT_NO_WIZARD
-#endif
-
-#if defined(QT_NO_DIALOG) || defined(QT_NO_LISTVIEW) || defined(QT_NO_NETWORKPROTOCOL) || defined(QT_NO_COMBOBOX) || defined(QT_NO_DIR) || defined(QT_NO_MESSAGEBOX) || defined(QT_NO_SEMIMODAL)
- /*!
- QFileDialog
- */
-# define QT_NO_FILEDIALOG
-#endif
-
-#if defined(QT_NO_DIALOG) || defined(QT_NO_FONTDATABASE) || defined(QT_NO_COMBOBOX)
- /*!
- QFontDialog
- */
-# define QT_NO_FONTDIALOG
-#endif
-
-#if defined(QT_NO_DIALOG) || defined(QT_NO_LISTVIEW) || defined(QT_NO_PRINTER) || defined(QT_NO_COMBOBOX) || defined(QT_NO_DIR) || defined(QT_NO_LAYOUT) || defined(QT_NO_LABEL)
- /*!
- QPrintDialog
- */
-# define QT_NO_PRINTDIALOG
-#endif
-
-#if defined(QT_NO_SEMIMODAL)
- /*!
- QProgressDialog
- */
-# define QT_NO_PROGRESSDIALOG
-#endif
-#if defined(QT_NO_DIALOG) || defined(QT_NO_COMBOBOX)
- /*!
- QInputDialog
- */
-# define QT_NO_INPUTDIALOG
-#endif
-
-#if defined(QT_NO_STRINGLIST)
- /*!
- Session management support
- */
-# define QT_NO_SESSIONMANAGER
-#endif
-
-#endif // QFEATURES_H
diff --git a/qtools/qfile.cpp b/qtools/qfile.cpp
deleted file mode 100644
index 7939160..0000000
--- a/qtools/qfile.cpp
+++ /dev/null
@@ -1,550 +0,0 @@
-/****************************************************************************
-**
-**
-** Implementation of QFile class
-**
-** Created : 930812
-**
-** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
-**
-** This file is part of the tools module of the Qt GUI Toolkit.
-**
-** This file may be distributed under the terms of the Q Public License
-** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#include "qglobal.h"
-#if defined(_OS_WIN32_)
-#ifdef UNICODE
-#ifndef _UNICODE
-#define _UNICODE
-#endif
-#endif
-#endif
-
-#include "qfile.h"
-#include "qfiledefs_p.h"
-
-extern bool qt_file_access( const QString& fn, int t );
-
-// NOT REVISED
-/*!
- \class QFile qfile.h
- \brief The QFile class is an I/O device that operates on files.
-
- \ingroup io
-
- QFile is an I/O device for reading and writing binary and text files. A
- QFile may be used by itself (readBlock and writeBlock) or by more
- conveniently using QDataStream or QTextStream.
-
- Here is a code fragment that uses QTextStream to read a text
- file line by line. It prints each line with a line number.
- \code
- QFile f("file.txt");
- if ( f.open(IO_ReadOnly) ) { // file opened successfully
- QTextStream t( &f ); // use a text stream
- QString s;
- int n = 1;
- while ( !t.eof() ) { // until end of file...
- s = t.readLine(); // line of text excluding '\n'
- printf( "%3d: %s\n", n++, (const char *)s );
- }
- f.close();
- }
- \endcode
-
- The QFileInfo class holds detailed information about a file, such as
- access permissions, file dates and file types.
-
- The QDir class manages directories and lists of file names.
-
- \sa QDataStream, QTextStream
-*/
-
-
-/*!
- Constructs a QFile with no name.
-*/
-
-QFile::QFile()
-{
- init();
-}
-
-/*!
- Constructs a QFile with a file name \e name.
- \sa setName()
-*/
-
-QFile::QFile( const QString &name )
- : fn(name)
-{
- init();
-}
-
-
-/*!
- Destructs a QFile. Calls close().
-*/
-
-QFile::~QFile()
-{
- close();
-}
-
-
-/*!
- \internal
- Initialize internal data.
-*/
-
-void QFile::init()
-{
- setFlags( IO_Direct );
- setStatus( IO_Ok );
- fh = 0;
- fd = 0;
- length = 0;
- ioIndex = 0;
- ext_f = FALSE; // not an external file handle
-}
-
-
-/*!
- \fn QString QFile::name() const
- Returns the name set by setName().
- \sa setName(), QFileInfo::fileName()
-*/
-
-/*!
- Sets the name of the file. The name can include an absolute directory
- path or it can be a name or a path relative to the current directory.
-
- Do not call this function if the file has already been opened.
-
- Note that if the name is relative QFile does not associate it with the
- current directory. If you change directory before calling open(), open
- uses the new current directory.
-
- Example:
- \code
- QFile f;
- QDir::setCurrent( "/tmp" );
- f.setName( "readme.txt" );
- QDir::setCurrent( "/home" );
- f.open( IO_ReadOnly ); // opens "/home/readme.txt" under UNIX
- \endcode
-
- Also note that the directory separator '/' works for all operating
- systems supported by Qt.
-
- \sa name(), QFileInfo, QDir
-*/
-
-void QFile::setName( const QString &name )
-{
- if ( isOpen() ) {
-#if defined(CHECK_STATE)
- qWarning( "QFile::setName: File is open" );
-#endif
- close();
- }
- fn = name;
-}
-
-/*!
- Returns TRUE if this file exists, otherwise FALSE.
- \sa name()
-*/
-
-bool QFile::exists() const
-{
- return qt_file_access( fn, F_OK );
-}
-
-/*!
- Returns TRUE if the file given by \e fileName exists, otherwise FALSE.
-*/
-
-bool QFile::exists( const QString &fileName )
-{
- return qt_file_access( fileName, F_OK );
-}
-
-
-/*!
- Removes the file specified by the file name currently set.
- Returns TRUE if successful, otherwise FALSE.
-
- The file is closed before it is removed.
-*/
-
-bool QFile::remove()
-{
- close();
- return remove( fn );
-}
-
-#if defined(_OS_MAC_) || defined(_OS_MSDOS_) || defined(_OS_WIN32_) || defined(_OS_OS2_) || defined(_OS_CYGWIN_)
-# define HAS_TEXT_FILEMODE // has translate/text filemode
-#endif
-#if defined(O_NONBLOCK)
-# define HAS_ASYNC_FILEMODE
-# define OPEN_ASYNC O_NONBLOCK
-#elif defined(O_NDELAY)
-# define HAS_ASYNC_FILEMODE
-# define OPEN_ASYNC O_NDELAY
-#endif
-
-/*!
- Flushes the file buffer to the disk.
-
- close() also flushes the file buffer.
-*/
-
-void QFile::flush()
-{
- if ( isOpen() && fh ) // can only flush open/buffered
- fflush( fh ); // file
-}
-
-/*!
- Returns TRUE if the end of file has been reached, otherwise FALSE.
- \sa size()
-*/
-
-bool QFile::atEnd() const
-{
- if ( !isOpen() ) {
-#if defined(CHECK_STATE)
- qWarning( "QFile::atEnd: File is not open" );
-#endif
- return FALSE;
- }
- if ( isDirectAccess() && !isTranslated() ) {
- if ( at() < length )
- return FALSE;
- }
- return QIODevice::atEnd();
-}
-
-/*!
- Reads a line of text.
-
- Reads bytes from the file until end-of-line is reached, or up to \a
- maxlen bytes, and returns the number of bytes read, or -1 in case of
- error. The terminating newline is not stripped.
-
- This function is efficient only for buffered files. Avoid
- readLine() for files that have been opened with the \c IO_Raw
- flag.
-
- \sa readBlock(), QTextStream::readLine()
-*/
-
-int QFile::readLine( char *p, uint maxlen )
-{
- if ( maxlen == 0 ) // application bug?
- return 0;
-#if defined(CHECK_STATE)
- CHECK_PTR( p );
- if ( !isOpen() ) { // file not open
- qWarning( "QFile::readLine: File not open" );
- return -1;
- }
- if ( !isReadable() ) { // reading not permitted
- qWarning( "QFile::readLine: Read operation not permitted" );
- return -1;
- }
-#endif
- int nread; // number of bytes read
- if ( isRaw() ) { // raw file
- nread = QIODevice::readLine( p, maxlen );
- } else { // buffered file
- p = fgets( p, maxlen, fh );
- if ( p ) {
- nread = qstrlen( p );
- ioIndex += nread;
- } else {
- nread = -1;
- setStatus(IO_ReadError);
- }
- }
- return nread;
-}
-
-
-/*!
- Reads a line of text.
-
- Reads bytes from the file until end-of-line is reached, or up to \a
- maxlen bytes, and returns the number of bytes read, or -1 in case of
- error. The terminating newline is not stripped.
-
- This function is efficient only for buffered files. Avoid
- readLine() for files that have been opened with the \c IO_Raw
- flag.
-
- Note that the string is read as plain Latin1 bytes, not Unicode.
-
- \sa readBlock(), QTextStream::readLine()
-*/
-
-int QFile::readLine( QString& s, uint maxlen )
-{
- QByteArray ba(maxlen);
- int l = readLine(ba.data(),maxlen);
- if ( l >= 0 ) {
- ba.truncate(l);
- s = QString(ba);
- }
- return l;
-}
-
-
-/*!
- Reads a single byte/character from the file.
-
- Returns the byte/character read, or -1 if the end of the file has been
- reached.
-
- \sa putch(), ungetch()
-*/
-
-int QFile::getch()
-{
-#if defined(CHECK_STATE)
- if ( !isOpen() ) { // file not open
- qWarning( "QFile::getch: File not open" );
- return EOF;
- }
- if ( !isReadable() ) { // reading not permitted
- qWarning( "QFile::getch: Read operation not permitted" );
- return EOF;
- }
-#endif
-
- int ch;
-
- if ( !ungetchBuffer.isEmpty() ) {
- int len = ungetchBuffer.length();
- ch = ungetchBuffer[ len-1 ];
- ungetchBuffer.truncate( len - 1 );
- return ch;
- }
-
- if ( isRaw() ) { // raw file (inefficient)
- char buf[1];
- ch = readBlock( buf, 1 ) == 1 ? buf[0] : EOF;
- } else { // buffered file
- if ( (ch = getc( fh )) != EOF )
- ioIndex++;
- else
- setStatus(IO_ReadError);
- }
- return ch;
-}
-
-/*!
- \fn int QFile::writeBlock( const QByteArray& data )
- \reimp
- \internal
- Should be removed in 3.0
-*/
-
-/*!
- Writes the character \e ch to the file.
-
- Returns \e ch, or -1 if some error occurred.
-
- \sa getch(), ungetch()
-*/
-
-int QFile::putch( int ch )
-{
-#if defined(CHECK_STATE)
- if ( !isOpen() ) { // file not open
- qWarning( "QFile::putch: File not open" );
- return EOF;
- }
- if ( !isWritable() ) { // writing not permitted
- qWarning( "QFile::putch: Write operation not permitted" );
- return EOF;
- }
-#endif
- if ( isRaw() ) { // raw file (inefficient)
- char buf[1];
- buf[0] = ch;
- ch = writeBlock( buf, 1 ) == 1 ? ch : EOF;
- } else { // buffered file
- if ( (ch = putc( ch, fh )) != EOF ) {
- ioIndex++;
- if ( ioIndex > length ) // update file length
- length = ioIndex;
- } else {
- setStatus(IO_WriteError);
- }
- }
- return ch;
-}
-
-/*!
- Puts the character \e ch back into the file and decrements the index if it
- is not zero.
-
- This function is normally called to "undo" a getch() operation.
-
- Returns \e ch, or -1 if some error occurred.
-
- \sa getch(), putch()
-*/
-
-int QFile::ungetch( int ch )
-{
-#if defined(CHECK_STATE)
- if ( !isOpen() ) { // file not open
- qWarning( "QFile::ungetch: File not open" );
- return EOF;
- }
- if ( !isReadable() ) { // reading not permitted
- qWarning( "QFile::ungetch: Read operation not permitted" );
- return EOF;
- }
-#endif
- if ( ch == EOF ) // cannot unget EOF
- return ch;
-
- if ( isSequentialAccess() && !fh) {
- // pipe or similar => we cannot ungetch, so do it manually
- ungetchBuffer +=ch;
- return ch;
- }
-
- if ( isRaw() ) { // raw file (very inefficient)
- char buf[1];
- at( ioIndex-1 );
- buf[0] = ch;
- if ( writeBlock(buf, 1) == 1 )
- at ( ioIndex-1 );
- else
- ch = EOF;
- } else { // buffered file
- if ( (ch = ungetc(ch, fh)) != EOF )
- ioIndex--;
- else
- setStatus( IO_ReadError );
- }
- return ch;
-}
-
-
-static QCString locale_encoder( const QString &fileName )
-{
- return fileName.local8Bit();
-}
-
-
-static QFile::EncoderFn encoder = locale_encoder;
-
-/*!
- When you use QFile, QFileInfo, and QDir to access the filesystem
- with Qt, you can use Unicode filenames. On Unix, these filenames
- are converted to an 8-bit encoding. If you want to do your own
- file I/O on Unix, you should convert the filename using this
- function. On Windows NT, Unicode filenames are supported directly
- in the filesystem and this function should be avoided. On Windows 95,
- non-Latin1 locales are not supported at this time.
-
- By default, this function converts to the local 8-bit encoding
- determined by the user's locale. This is sufficient for
- filenames that the user chooses. Filenames hard-coded into the
- application should only use 7-bit ASCII filename characters.
-
- The conversion scheme can be changed using setEncodingFunction().
- This might be useful if you wish to give the user an option to
- store in filenames in UTF-8, etc., but beware that such filenames
- would probably then be unrecognizable when seen by other programs.
-
- \sa decodeName()
-*/
-
-QCString QFile::encodeName( const QString &fileName )
-{
- return (*encoder)(fileName);
-}
-
-/*!
- \typedef QFile::EncoderFn
-
- This is used by QFile::setEncodingFunction().
-*/
-
-/*!
- Sets the function for encoding Unicode filenames.
- The default encodes in the locale-specific 8-bit encoding.
-
- \sa encodeName()
-*/
-void QFile::setEncodingFunction( EncoderFn f )
-{
- encoder = f;
-}
-
-static
-QString locale_decoder( const QCString &localFileName )
-{
- return QString::fromLocal8Bit(localFileName);
-}
-
-static QFile::DecoderFn decoder = locale_decoder;
-
-/*!
- This does the reverse of QFile::encodeName().
-
- \sa setDecodingFunction()
-*/
-QString QFile::decodeName( const QCString &localFileName )
-{
- return (*decoder)(localFileName);
-}
-
-/*!
- \typedef QFile::DecoderFn
-
- This is used by QFile::setDecodingFunction().
-*/
-
-/*!
- Sets the function for decoding 8-bit filenames.
- The default uses the locale-specific 8-bit encoding.
-
- \sa encodeName(), decodeName()
-*/
-
-void QFile::setDecodingFunction( DecoderFn f )
-{
- decoder = f;
-}
diff --git a/qtools/qfile.h b/qtools/qfile.h
deleted file mode 100644
index a447d2f..0000000
--- a/qtools/qfile.h
+++ /dev/null
@@ -1,128 +0,0 @@
-/****************************************************************************
-**
-**
-** Definition of QFile class
-**
-** Created : 930831
-**
-** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
-**
-** This file is part of the tools module of the Qt GUI Toolkit.
-**
-** This file may be distributed under the terms of the Q Public License
-** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#ifndef QFILE_H
-#define QFILE_H
-
-#ifndef QT_H
-#include "qiodevice.h"
-#include "qstring.h"
-#include <stdio.h>
-#endif // QT_H
-
-class QDir;
-
-
-class Q_EXPORT QFile : public QIODevice // file I/O device class
-{
-public:
- QFile();
- QFile( const QString &name );
- virtual ~QFile();
-
- QString name() const;
- void setName( const QString &name );
-
- typedef QCString (*EncoderFn)( const QString &fileName );
- typedef QString (*DecoderFn)( const QCString &localfileName );
- static QCString encodeName( const QString &fileName );
- static QString decodeName( const QCString &localFileName );
- static void setEncodingFunction( EncoderFn );
- static void setDecodingFunction( DecoderFn );
-
- bool exists() const;
- static bool exists( const QString &fileName );
-
- bool remove();
- static bool remove( const QString &fileName );
-
- bool open( int );
- bool open( int, FILE * );
- bool open( int, int );
- void close();
- void flush();
-
- uint size() const;
- int at() const;
- bool at( int );
- bool atEnd() const;
-
- int readBlock( char *data, uint len );
- int writeBlock( const char *data, uint len );
- int writeBlock( const QByteArray& data )
- { return QIODevice::writeBlock(data); }
- int readLine( char *data, uint maxlen );
- int readLine( QString &, uint maxlen );
-
- int getch();
- int putch( int );
- int ungetch( int );
-
- int handle() const;
-
- int64 pos() const;
- int64 toEnd();
- bool seek(int64 pos);
-
-protected:
- QString fn;
- FILE *fh;
- int fd;
- int length;
- bool ext_f;
- void * d;
-
-private:
- void init();
- QCString ungetchBuffer;
-
-private: // Disabled copy constructor and operator=
-#if defined(Q_DISABLE_COPY)
- QFile( const QFile & );
- QFile &operator=( const QFile & );
-#endif
-};
-
-
-inline QString QFile::name() const
-{ return fn; }
-
-inline int QFile::at() const
-{ return ioIndex; }
-
-
-#endif // QFILE_H
diff --git a/qtools/qfile_unix.cpp b/qtools/qfile_unix.cpp
deleted file mode 100644
index dd41c4e..0000000
--- a/qtools/qfile_unix.cpp
+++ /dev/null
@@ -1,669 +0,0 @@
-/****************************************************************************
-**
-**
-** Implementation of QFileInfo class
-**
-** Created : 950628
-**
-** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
-**
-** This file is part of the tools module of the Qt GUI Toolkit.
-**
-** This file may be distributed under the terms of the Q Public License
-** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses for Unix/X11 or for Qt/Embedded may use this file in accordance
-** with the Qt Commercial License Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#include "qglobal.h"
-
-#include "qfile.h"
-#include "qfiledefs_p.h"
-
-#if (defined(_OS_MAC_) && (!defined(_OS_UNIX_))) || defined(_OS_MSDOS_) || defined(_OS_WIN32_) || defined(_OS_OS2_) || defined(_OS_CYGWIN_)
-# define HAS_TEXT_FILEMODE // has translate/text filemode
-#endif
-#if defined(O_NONBLOCK)
-# define HAS_ASYNC_FILEMODE
-# define OPEN_ASYNC O_NONBLOCK
-#elif defined(O_NDELAY)
-# define HAS_ASYNC_FILEMODE
-# define OPEN_ASYNC O_NDELAY
-#endif
-
-bool qt_file_access( const QString& fn, int t )
-{
- if ( fn.isEmpty() )
- return FALSE;
- return ACCESS( QFile::encodeName(fn), t ) == 0;
-}
-
-/*!
- Removes the file \a fileName.
- Returns TRUE if successful, otherwise FALSE.
-*/
-
-bool QFile::remove( const QString &fileName )
-{
- if ( fileName.isEmpty() ) {
-#if defined(CHECK_NULL)
- qWarning( "QFile::remove: Empty or null file name" );
-#endif
- return FALSE;
- }
- return unlink( QFile::encodeName(fileName) ) == 0;
- // unlink more common in UNIX
-}
-
-#if defined(O_NONBLOCK)
-# define HAS_ASYNC_FILEMODE
-# define OPEN_ASYNC O_NONBLOCK
-#elif defined(O_NDELAY)
-# define HAS_ASYNC_FILEMODE
-# define OPEN_ASYNC O_NDELAY
-#endif
-
-/*!
- Opens the file specified by the file name currently set, using the mode \e m.
- Returns TRUE if successful, otherwise FALSE.
-
- The mode parameter \e m must be a combination of the following flags:
- <ul>
- <li>\c IO_Raw specified raw (non-buffered) file access.
- <li>\c IO_ReadOnly opens the file in read-only mode.
- <li>\c IO_WriteOnly opens the file in write-only mode (and truncates).
- <li>\c IO_ReadWrite opens the file in read/write mode, equivalent to
- \c (IO_ReadOnly|IO_WriteOnly).
- <li>\c IO_Append opens the file in append mode. This mode is very useful
- when you want to write something to a log file. The file index is set to
- the end of the file. Note that the result is undefined if you position the
- file index manually using at() in append mode.
- <li>\c IO_Truncate truncates the file.
- <li>\c IO_Translate enables carriage returns and linefeed translation
- for text files under MS-DOS, Windows and OS/2.
- </ul>
-
- The raw access mode is best when I/O is block-operated using 4kB block size
- or greater. Buffered access works better when reading small portions of
- data at a time.
-
- <strong>Important:</strong> When working with buffered files, data may
- not be written to the file at once. Call \link flush() flush\endlink
- to make sure the data is really written.
-
- \warning We have experienced problems with some C libraries when a buffered
- file is opened for both reading and writing. If a read operation takes place
- immediately after a write operation, the read buffer contains garbage data.
- Worse, the same garbage is written to the file. Calling flush() before
- readBlock() solved this problem.
-
- If the file does not exist and \c IO_WriteOnly or \c IO_ReadWrite is
- specified, it is created.
-
- Example:
- \code
- QFile f1( "/tmp/data.bin" );
- QFile f2( "readme.txt" );
- f1.open( IO_Raw | IO_ReadWrite | IO_Append );
- f2.open( IO_ReadOnly | IO_Translate );
- \endcode
-
- \sa name(), close(), isOpen(), flush()
-*/
-
-bool QFile::open( int m )
-{
- if ( isOpen() ) { // file already open
-#if defined(CHECK_STATE)
- qWarning( "QFile::open: File already open" );
-#endif
- return FALSE;
- }
- if ( fn.isNull() ) { // no file name defined
-#if defined(CHECK_NULL)
- qWarning( "QFile::open: No file name specified" );
-#endif
- return FALSE;
- }
- init(); // reset params
- setMode( m );
- if ( !(isReadable() || isWritable()) ) {
-#if defined(CHECK_RANGE)
- qWarning( "QFile::open: File access not specified" );
-#endif
- return FALSE;
- }
- bool ok = TRUE;
- STATBUF st;
- if ( isRaw() ) { // raw file I/O
- int oflags = OPEN_RDONLY;
- if ( isReadable() && isWritable() )
- oflags = OPEN_RDWR;
- else if ( isWritable() )
- oflags = OPEN_WRONLY;
- if ( flags() & IO_Append ) { // append to end of file?
- if ( flags() & IO_Truncate )
- oflags |= (OPEN_CREAT | OPEN_TRUNC);
- else
- oflags |= (OPEN_APPEND | OPEN_CREAT);
- setFlags( flags() | IO_WriteOnly ); // append implies write
- } else if ( isWritable() ) { // create/trunc if writable
- if ( flags() & IO_Truncate )
- oflags |= (OPEN_CREAT | OPEN_TRUNC);
- else
- oflags |= OPEN_CREAT;
- }
-#if defined(HAS_TEXT_FILEMODE)
- if ( isTranslated() )
-#ifdef __CYGWIN__
- /* Do nothing, allowing the Cygwin mount mode to take effect. */;
-#else
- oflags |= OPEN_TEXT;
-#endif
- else
- oflags |= OPEN_BINARY;
-#endif
-#if defined(HAS_ASYNC_FILEMODE)
- if ( isAsynchronous() )
- oflags |= OPEN_ASYNC;
-#endif
- fd = OPEN( QFile::encodeName(fn), oflags, 0666 );
-
- if ( fd != -1 ) { // open successful
- FSTAT( fd, &st ); // get the stat for later usage
- } else {
- ok = FALSE;
- }
- } else { // buffered file I/O
- QCString perm;
- char perm2[4];
- bool try_create = FALSE;
- if ( flags() & IO_Append ) { // append to end of file?
- setFlags( flags() | IO_WriteOnly ); // append implies write
- perm = isReadable() ? "a+" : "a";
- } else {
- if ( isReadWrite() ) {
- if ( flags() & IO_Truncate ) {
- perm = "w+";
- } else {
- perm = "r+";
- try_create = TRUE; // try to create if not exists
- }
- } else if ( isReadable() ) {
- perm = "r";
- } else if ( isWritable() ) {
- perm = "w";
- }
- }
- qstrcpy( perm2, perm );
-#if defined(HAS_TEXT_FILEMODE)
- if ( isTranslated() )
-#ifdef __CYGWIN__
- /* Do nothing, allowing the Cygwin mount mode to take effect. */;
-#else
- strcat( perm2, "t" );
-#endif
- else
- strcat( perm2, "b" );
-#endif
- while (1) { // At most twice
-
- fh = fopen( QFile::encodeName(fn), perm2 );
-
- if ( !fh && try_create ) {
- perm2[0] = 'w'; // try "w+" instead of "r+"
- try_create = FALSE;
- } else {
- break;
- }
- }
- if ( fh ) {
- FSTAT( FILENO(fh), &st ); // get the stat for later usage
- } else {
- ok = FALSE;
- }
- }
- if ( ok ) {
- setState( IO_Open );
- // on successful open the file stat was got; now test what type
- // of file we have
- if ( (st.st_mode & STAT_MASK) != STAT_REG ) {
- // non-seekable
- setType( IO_Sequential );
- length = INT_MAX;
- ioIndex = (flags() & IO_Append) == 0 ? 0 : length;
- } else {
- length = (int)st.st_size;
- ioIndex = (flags() & IO_Append) == 0 ? 0 : length;
- if ( !(flags()&IO_Truncate) && length == 0 && isReadable() ) {
- // try if you can read from it (if you can, it's a sequential
- // device; e.g. a file in the /proc filesystem)
- int c = getch();
- if ( c != -1 ) {
- ungetch(c);
- setType( IO_Sequential );
- length = INT_MAX;
- }
- }
- }
- } else {
- init();
- if ( errno == EMFILE ) // no more file handles/descrs
- setStatus( IO_ResourceError );
- else
- setStatus( IO_OpenError );
- }
- return ok;
-}
-
-/*!
- Opens a file in the mode \e m using an existing file handle \e f.
- Returns TRUE if successful, otherwise FALSE.
-
- Example:
- \code
- #include <stdio.h>
-
- void printError( const char* msg )
- {
- QFile f;
- f.open( IO_WriteOnly, stderr );
- f.writeBlock( msg, qstrlen(msg) ); // write to stderr
- f.close();
- }
- \endcode
-
- When a QFile is opened using this function, close() does not actually
- close the file, only flushes it.
-
- \warning If \e f is \c stdin, \c stdout, \c stderr, you may not
- be able to seek. See QIODevice::isSequentialAccess() for more
- information.
-
- \sa close()
-*/
-
-bool QFile::open( int m, FILE *f )
-{
- if ( isOpen() ) {
-#if defined(CHECK_RANGE)
- qWarning( "QFile::open: File already open" );
-#endif
- return FALSE;
- }
- init();
- setMode( m &~IO_Raw );
- setState( IO_Open );
- fh = f;
- ext_f = TRUE;
- STATBUF st;
- FSTAT( FILENO(fh), &st );
- ioIndex = (int)ftell( fh );
- if ( (st.st_mode & STAT_MASK) != STAT_REG || f == stdin ) { //stdin is non seekable
- // non-seekable
- setType( IO_Sequential );
- length = INT_MAX;
- } else {
- length = (int)st.st_size;
- if ( !(flags()&IO_Truncate) && length == 0 && isReadable() ) {
- // try if you can read from it (if you can, it's a sequential
- // device; e.g. a file in the /proc filesystem)
- int c = getch();
- if ( c != -1 ) {
- ungetch(c);
- setType( IO_Sequential );
- length = INT_MAX;
- }
- }
- }
- return TRUE;
-}
-
-/*!
- Opens a file in the mode \e m using an existing file descriptor \e f.
- Returns TRUE if successful, otherwise FALSE.
-
- When a QFile is opened using this function, close() does not actually
- close the file.
-
- \warning If \e f is one of 0 (stdin), 1 (stdout) or 2 (stderr), you may not
- be able to seek. size() is set to \c INT_MAX (in limits.h).
-
- \sa close()
-*/
-
-
-bool QFile::open( int m, int f )
-{
- if ( isOpen() ) {
-#if defined(CHECK_RANGE)
- qWarning( "QFile::open: File already open" );
-#endif
- return FALSE;
- }
- init();
- setMode( m |IO_Raw );
- setState( IO_Open );
- fd = f;
- ext_f = TRUE;
- STATBUF st;
- FSTAT( fd, &st );
- ioIndex = (int)LSEEK(fd, 0, SEEK_CUR);
- if ( (st.st_mode & STAT_MASK) != STAT_REG || f == 0 ) { // stdin is not seekable...
- // non-seekable
- setType( IO_Sequential );
- length = INT_MAX;
- } else {
- length = (int)st.st_size;
- if ( length == 0 && isReadable() ) {
- // try if you can read from it (if you can, it's a sequential
- // device; e.g. a file in the /proc filesystem)
- int c = getch();
- if ( c != -1 ) {
- ungetch(c);
- setType( IO_Sequential );
- length = INT_MAX;
- }
- resetStatus();
- }
- }
- return TRUE;
-}
-
-/*!
- Returns the file size.
- \sa at()
-*/
-
-uint QFile::size() const
-{
- STATBUF st;
- if ( isOpen() ) {
- FSTAT( fh ? FILENO(fh) : fd, &st );
- } else {
- STAT( QFile::encodeName(fn), &st );
- }
- return (uint)st.st_size;
-}
-
-/*!
- \fn int QFile::at() const
- Returns the file index.
- \sa size()
-*/
-
-/*!
- Sets the file index to \e pos. Returns TRUE if successful, otherwise FALSE.
-
- Example:
- \code
- QFile f( "data.bin" );
- f.open( IO_ReadOnly ); // index set to 0
- f.at( 100 ); // set index to 100
- f.at( f.at()+50 ); // set index to 150
- f.at( f.size()-80 ); // set index to 80 before EOF
- f.close();
- \endcode
-
- \warning The result is undefined if the file was \link open() opened\endlink
- using the \c IO_Append specifier.
-
- \sa size(), open()
-*/
-
-bool QFile::at( int pos )
-{
- if ( !isOpen() ) {
-#if defined(CHECK_STATE)
- qWarning( "QFile::at: File is not open" );
-#endif
- return FALSE;
- }
- bool ok;
- if ( isRaw() ) { // raw file
- pos = (int)LSEEK(fd, pos, SEEK_SET);
- ok = pos != -1;
- } else { // buffered file
- ok = fseek(fh, pos, SEEK_SET) == 0;
- }
- if ( ok )
- ioIndex = pos;
-#if defined(CHECK_RANGE)
- else
- qWarning( "QFile::at: Cannot set file position %d", pos );
-#endif
- return ok;
-}
-
-/*!
- Reads at most \e len bytes from the file into \e p and returns the
- number of bytes actually read.
-
- Returns -1 if a serious error occurred.
-
- \warning We have experienced problems with some C libraries when a buffered
- file is opened for both reading and writing. If a read operation takes place
- immediately after a write operation, the read buffer contains garbage data.
- Worse, the same garbage is written to the file. Calling flush() before
- readBlock() solved this problem.
-
- \sa writeBlock()
-*/
-
-int QFile::readBlock( char *p, uint len )
-{
-#if defined(CHECK_NULL)
- if ( !p )
- qWarning( "QFile::readBlock: Null pointer error" );
-#endif
-#if defined(CHECK_STATE)
- if ( !isOpen() ) { // file not open
- qWarning( "QFile::readBlock: File not open" );
- return -1;
- }
- if ( !isReadable() ) { // reading not permitted
- qWarning( "QFile::readBlock: Read operation not permitted" );
- return -1;
- }
-#endif
- int nread = 0; // number of bytes read
- if ( !ungetchBuffer.isEmpty() ) {
- // need to add these to the returned string.
- int l = ungetchBuffer.length();
- while( nread < l ) {
- *p = ungetchBuffer[ l - nread - 1 ];
- p++;
- nread++;
- }
- ungetchBuffer.truncate( l - nread );
- }
-
- if ( nread < (int)len ) {
- if ( isRaw() ) { // raw file
- nread += (int)READ( fd, p, len-nread );
- if ( len && nread <= 0 ) {
- nread = 0;
- setStatus(IO_ReadError);
- }
- } else { // buffered file
- nread += (int)fread( p, 1, len-nread, fh );
- if ( (uint)nread != len ) {
- if ( ferror( fh ) || nread==0 )
- setStatus(IO_ReadError);
- }
- }
- }
- ioIndex += nread;
- return nread;
-}
-
-/*! \overload int writeBlock( const QByteArray& data )
-*/
-
-/*! \reimp
-
- Writes \e len bytes from \e p to the file and returns the number of
- bytes actually written.
-
- Returns -1 if a serious error occurred.
-
- \warning When working with buffered files, data may not be written
- to the file at once. Call flush() to make sure the data is really
- written.
-
- \sa readBlock()
-*/
-
-int QFile::writeBlock( const char *p, uint len )
-{
-#if defined(CHECK_NULL)
- if ( p == 0 && len != 0 )
- qWarning( "QFile::writeBlock: Null pointer error" );
-#endif
-#if defined(CHECK_STATE)
- if ( !isOpen() ) { // file not open
- qWarning( "QFile::writeBlock: File not open" );
- return -1;
- }
- if ( !isWritable() ) { // writing not permitted
- qWarning( "QFile::writeBlock: Write operation not permitted" );
- return -1;
- }
-#endif
- if (p==0) return 0;
- int nwritten; // number of bytes written
- if ( isRaw() ) // raw file
- nwritten = (int)WRITE( fd, p, len );
- else // buffered file
- nwritten = (int)fwrite( p, 1, len, fh );
- if ( nwritten != (int)len ) { // write error
- if ( errno == ENOSPC ) // disk is full
- setStatus( IO_ResourceError );
- else
- setStatus( IO_WriteError );
- if ( isRaw() ) // recalc file position
- ioIndex = (int)LSEEK( fd, 0, SEEK_CUR );
- else
- ioIndex = fseek( fh, 0, SEEK_CUR );
- } else {
- ioIndex += nwritten;
- }
- if ( ioIndex > length ) // update file length
- length = ioIndex;
- return nwritten;
-}
-
-/*!
- Returns the file handle of the file.
-
- This is a small positive integer, suitable for use with C library
- functions such as fdopen() and fcntl(), as well as with QSocketNotifier.
-
- If the file is not open or there is an error, handle() returns -1.
-
- \sa QSocketNotifier
-*/
-
-int QFile::handle() const
-{
- if ( !isOpen() )
- return -1;
- else if ( fh )
- return FILENO( fh );
- else
- return fd;
-}
-
-/*!
- Closes an open file.
-
- The file is not closed if it was opened with an existing file handle.
- If the existing file handle is a \c FILE*, the file is flushed.
- If the existing file handle is an \c int file descriptor, nothing
- is done to the file.
-
- Some "write-behind" filesystems may report an unspecified error on
- closing the file. These errors only indicate that something may
- have gone wrong since the previous open(). In such a case status()
- reports IO_UnspecifiedError after close(), otherwise IO_Ok.
-
- \sa open(), flush()
-*/
-
-
-void QFile::close()
-{
- bool ok = FALSE;
- if ( isOpen() ) { // file is not open
- if ( fh ) { // buffered file
- if ( ext_f )
- ok = fflush( fh ) != -1; // flush instead of closing
- else
- ok = fclose( fh ) != -1;
- } else { // raw file
- if ( ext_f )
- ok = TRUE; // cannot close
- else
- ok = CLOSE( fd ) != -1;
- }
- init(); // restore internal state
- }
- if (!ok)
- setStatus (IO_UnspecifiedError);
-
- return;
-}
-
-int64 QFile::pos() const
-{
- if (isOpen())
- {
- // TODO: support 64 bit size
- return ftell( fh );
- }
- return -1;
-}
-
-int64 QFile::toEnd()
-{
- if (isOpen())
- {
- // TODO: support 64 bit size
- if (fseek( fh, 0, SEEK_END )!=-1)
- {
- return ftell( fh );
- }
- }
- return -1;
-}
-
-bool QFile::seek( int64 pos )
-{
- if (isOpen())
- {
- // TODO: support 64 bit size
- return fseek( fh, (long)pos, SEEK_SET )!=-1;
- }
- return FALSE;
-}
-
diff --git a/qtools/qfile_win32.cpp b/qtools/qfile_win32.cpp
deleted file mode 100644
index e0b1d88..0000000
--- a/qtools/qfile_win32.cpp
+++ /dev/null
@@ -1,678 +0,0 @@
-/******************************************************************************
- *
- *
- *
- * Copyright (C) 1997-2001 by Dimitri van Heesch.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation under the terms of the GNU General Public License is hereby
- * granted. No representations are made about the suitability of this software
- * for any purpose. It is provided "as is" without express or implied warranty.
- * See the GNU General Public License for more details.
- *
- * Documents produced by Doxygen are derivative works derived from the
- * input used in their production; they are not affected by this license.
- *
- * Based on qfile_unix.cpp
- *
- * Copyright (C) 1992-2000 Trolltech AS.
- */
-
-#include "qglobal.h"
-
-#include "qfile.h"
-#include "qfiledefs_p.h"
-
-#if defined(_OS_MAC_) || defined(_OS_MSDOS_) || defined(_OS_WIN32_) || defined(_OS_OS2_)
-# define HAS_TEXT_FILEMODE // has translate/text filemode
-#endif
-#if defined(O_NONBLOCK)
-# define HAS_ASYNC_FILEMODE
-# define OPEN_ASYNC O_NONBLOCK
-#elif defined(O_NDELAY)
-# define HAS_ASYNC_FILEMODE
-# define OPEN_ASYNC O_NDELAY
-#endif
-
-static void reslashify( QString& n )
-{
- for ( int i=0; i<(int)n.length(); i++ )
- {
- if ( n[i] == '/' )
- n[i] = '\\';
- }
-}
-
-bool qt_file_access( const QString& fn, int t )
-{
- if ( fn.isEmpty() )
- return FALSE;
-#if defined(__CYGWIN32_)
- return ACCESS( QFile::encodeName(fn), t ) == 0;
-#else
- QString str = fn;
- reslashify(str);
- return ( _waccess( (wchar_t*) str.ucs2(), t ) == 0 );
-#endif
-}
-
-/*!
- Removes the file \a fileName.
- Returns TRUE if successful, otherwise FALSE.
-*/
-
-bool QFile::remove( const QString &fileName )
-{
- if ( fileName.isEmpty() ) {
-#if defined(CHECK_NULL)
- qWarning( "QFile::remove: Empty or null file name" );
-#endif
- return FALSE;
- }
-#if defined(__CYGWIN32_)
- // unlink more common in UNIX
- return ::remove( QFile::encodeName(fileName) ) == 0;
-#else
- QString str = fileName;
- reslashify(str);
- return ( _wunlink( (wchar_t*) str.ucs2() ) == 0 );
-#endif
-}
-
-#if defined(O_NONBLOCK)
-# define HAS_ASYNC_FILEMODE
-# define OPEN_ASYNC O_NONBLOCK
-#elif defined(O_NDELAY)
-# define HAS_ASYNC_FILEMODE
-# define OPEN_ASYNC O_NDELAY
-#endif
-
-/*!
- Opens the file specified by the file name currently set, using the mode \e m.
- Returns TRUE if successful, otherwise FALSE.
-
- The mode parameter \e m must be a combination of the following flags:
- <ul>
- <li>\c IO_Raw specified raw (non-buffered) file access.
- <li>\c IO_ReadOnly opens the file in read-only mode.
- <li>\c IO_WriteOnly opens the file in write-only mode (and truncates).
- <li>\c IO_ReadWrite opens the file in read/write mode, equivalent to
- \c (IO_ReadOnly|IO_WriteOnly).
- <li>\c IO_Append opens the file in append mode. This mode is very useful
- when you want to write something to a log file. The file index is set to
- the end of the file. Note that the result is undefined if you position the
- file index manually using at() in append mode.
- <li>\c IO_Truncate truncates the file.
- <li>\c IO_Translate enables carriage returns and linefeed translation
- for text files under MS-DOS, Windows and OS/2.
- </ul>
-
- The raw access mode is best when I/O is block-operated using 4kB block size
- or greater. Buffered access works better when reading small portions of
- data at a time.
-
- <strong>Important:</strong> When working with buffered files, data may
- not be written to the file at once. Call \link flush() flush\endlink
- to make sure the data is really written.
-
- \warning We have experienced problems with some C libraries when a buffered
- file is opened for both reading and writing. If a read operation takes place
- immediately after a write operation, the read buffer contains garbage data.
- Worse, the same garbage is written to the file. Calling flush() before
- readBlock() solved this problem.
-
- If the file does not exist and \c IO_WriteOnly or \c IO_ReadWrite is
- specified, it is created.
-
- Example:
- \code
- QFile f1( "/tmp/data.bin" );
- QFile f2( "readme.txt" );
- f1.open( IO_Raw | IO_ReadWrite | IO_Append );
- f2.open( IO_ReadOnly | IO_Translate );
- \endcode
-
- \sa name(), close(), isOpen(), flush()
-*/
-
-bool QFile::open( int m )
-{
- if ( isOpen() ) { // file already open
-#if defined(CHECK_STATE)
- qWarning( "QFile::open: File already open" );
-#endif
- return FALSE;
- }
- if ( fn.isNull() ) { // no file name defined
-#if defined(CHECK_NULL)
- qWarning( "QFile::open: No file name specified" );
-#endif
- return FALSE;
- }
- init(); // reset params
- setMode( m );
- if ( !(isReadable() || isWritable()) ) {
-#if defined(CHECK_RANGE)
- qWarning( "QFile::open: File access not specified" );
-#endif
- return FALSE;
- }
- bool ok = TRUE;
- STATBUF st;
- if ( isRaw() ) { // raw file I/O
- int oflags = OPEN_RDONLY;
- if ( isReadable() && isWritable() )
- oflags = OPEN_RDWR;
- else if ( isWritable() )
- oflags = OPEN_WRONLY;
- if ( flags() & IO_Append ) { // append to end of file?
- if ( flags() & IO_Truncate )
- oflags |= (OPEN_CREAT | OPEN_TRUNC);
- else
- oflags |= (OPEN_APPEND | OPEN_CREAT);
- setFlags( flags() | IO_WriteOnly ); // append implies write
- } else if ( isWritable() ) { // create/trunc if writable
- if ( flags() & IO_Truncate )
- oflags |= (OPEN_CREAT | OPEN_TRUNC);
- else
- oflags |= OPEN_CREAT;
- }
-#if defined(HAS_TEXT_FILEMODE)
- if ( isTranslated() )
- oflags |= OPEN_TEXT;
- else
- oflags |= OPEN_BINARY;
-#endif
-#if defined(HAS_ASYNC_FILEMODE)
- if ( isAsynchronous() )
- oflags |= OPEN_ASYNC;
-#endif
-
-
-#if defined(__CYGWIN32_)
- fd = OPEN( QFile::encodeName(fn), oflags, 0666 );
-#else
- QString str = fn;
- reslashify(str);
- fd = _wopen( (wchar_t*) str.ucs2(), oflags, 0666 );
-#endif
-
- if ( fd != -1 ) { // open successful
- FSTAT( fd, &st ); // get the stat for later usage
- } else {
- ok = FALSE;
- }
- } else { // buffered file I/O
- QCString perm;
- char perm2[4];
- bool try_create = FALSE;
- if ( flags() & IO_Append ) { // append to end of file?
- setFlags( flags() | IO_WriteOnly ); // append implies write
- perm = isReadable() ? "a+" : "a";
- } else {
- if ( isReadWrite() ) {
- if ( flags() & IO_Truncate ) {
- perm = "w+";
- } else {
- perm = "r+";
- try_create = TRUE; // try to create if not exists
- }
- } else if ( isReadable() ) {
- perm = "r";
- } else if ( isWritable() ) {
- perm = "w";
- }
- }
- qstrcpy( perm2, perm );
- if ( isTranslated() )
- strcat( perm2, "t" );
- else
- strcat( perm2, "b" );
- while (1) { // At most twice
-
-#if defined(__CYGWIN32_)
- fh = fopen( QFile::encodeName(fn), perm2 );
-#else
- QString str = fn;
- QString prm( perm2 );
- reslashify(str);
- fh = _wfopen( (wchar_t*) str.ucs2(), (wchar_t*) prm.ucs2() );
-#endif
-
- if ( !fh && try_create ) {
- perm2[0] = 'w'; // try "w+" instead of "r+"
- try_create = FALSE;
- } else {
- break;
- }
- }
- if ( fh ) {
- FSTAT( FILENO(fh), &st ); // get the stat for later usage
- } else {
- ok = FALSE;
- }
- }
- if ( ok ) {
- setState( IO_Open );
- // on successful open the file stat was got; now test what type
- // of file we have
- if ( (st.st_mode & STAT_MASK) != STAT_REG ) {
- // non-seekable
- setType( IO_Sequential );
- length = INT_MAX;
- ioIndex = (flags() & IO_Append) == 0 ? 0 : length;
- } else {
- length = (int)st.st_size;
- ioIndex = (flags() & IO_Append) == 0 ? 0 : length;
- if ( !(flags()&IO_Truncate) && length == 0 && isReadable() ) {
- // try if you can read from it (if you can, it's a sequential
- // device; e.g. a file in the /proc filesystem)
- int c = getch();
- if ( c != -1 ) {
- ungetch(c);
- setType( IO_Sequential );
- length = INT_MAX;
- }
- }
- }
- } else {
- init();
- if ( errno == EMFILE ) // no more file handles/descrs
- setStatus( IO_ResourceError );
- else
- setStatus( IO_OpenError );
- }
- return ok;
-}
-
-/*!
- Opens a file in the mode \e m using an existing file handle \e f.
- Returns TRUE if successful, otherwise FALSE.
-
- Example:
- \code
- #include <stdio.h>
-
- void printError( const char* msg )
- {
- QFile f;
- f.open( IO_WriteOnly, stderr );
- f.writeBlock( msg, qstrlen(msg) ); // write to stderr
- f.close();
- }
- \endcode
-
- When a QFile is opened using this function, close() does not actually
- close the file, only flushes it.
-
- \warning If \e f is \c stdin, \c stdout, \c stderr, you may not
- be able to seek. See QIODevice::isSequentialAccess() for more
- information.
-
- \sa close()
-*/
-
-bool QFile::open( int m, FILE *f )
-{
- if ( isOpen() ) {
-#if defined(CHECK_RANGE)
- qWarning( "QFile::open: File already open" );
-#endif
- return FALSE;
- }
- init();
- setMode( m &~IO_Raw );
- setState( IO_Open );
- fh = f;
- ext_f = TRUE;
- STATBUF st;
- FSTAT( FILENO(fh), &st );
- ioIndex = (int)ftell( fh );
- if ( (st.st_mode & STAT_MASK) != STAT_REG ) {
- // non-seekable
- setType( IO_Sequential );
- length = INT_MAX;
- } else {
- length = (int)st.st_size;
- if ( (flags() & !IO_Truncate) && length == 0 && isReadable() ) {
- // try if you can read from it (if you can, it's a sequential
- // device; e.g. a file in the /proc filesystem)
- int c = getch();
- if ( c != -1 ) {
- ungetch(c);
- setType( IO_Sequential );
- length = INT_MAX;
- }
- }
- }
- return TRUE;
-}
-
-/*!
- Opens a file in the mode \e m using an existing file descriptor \e f.
- Returns TRUE if successful, otherwise FALSE.
-
- When a QFile is opened using this function, close() does not actually
- close the file.
-
- \warning If \e f is one of 0 (stdin), 1 (stdout) or 2 (stderr), you may not
- be able to seek. size() is set to \c INT_MAX (in limits.h).
-
- \sa close()
-*/
-
-
-bool QFile::open( int m, int f )
-{
- if ( isOpen() ) {
-#if defined(CHECK_RANGE)
- qWarning( "QFile::open: File already open" );
-#endif
- return FALSE;
- }
- init();
- setMode( m |IO_Raw );
- setState( IO_Open );
- fd = f;
- ext_f = TRUE;
- STATBUF st;
- FSTAT( fd, &st );
- ioIndex = (int)LSEEK(fd, 0, SEEK_CUR);
- if ( (st.st_mode & STAT_MASK) != STAT_REG ) {
- // non-seekable
- setType( IO_Sequential );
- length = INT_MAX;
- } else {
- length = (int)st.st_size;
- if ( length == 0 && isReadable() ) {
- // try if you can read from it (if you can, it's a sequential
- // device; e.g. a file in the /proc filesystem)
- int c = getch();
- if ( c != -1 ) {
- ungetch(c);
- setType( IO_Sequential );
- length = INT_MAX;
- }
- }
- }
- return TRUE;
-}
-
-/*!
- Returns the file size.
- \sa at()
-*/
-
-uint QFile::size() const
-{
- STATBUF st;
- if ( isOpen() ) {
- FSTAT( fh ? FILENO(fh) : fd, &st );
- return st.st_size;
- } else {
-#if defined(__CYGWIN32_)
- STAT( QFile::encodeName(fn), &st );
-#else
- QString str = fn;
- reslashify(str);
-#ifdef QT_LARGEFILE_SUPPORT
- if ( _wstati64( (wchar_t*) str.ucs2(), &st ) != -1 ) {
-#else
- if ( _wstat( (wchar_t*) str.ucs2(), &st ) != -1 ) {
-#endif
-#endif
- return st.st_size;
- }
- }
- return 0;
-}
-
-/*!
- \fn int QFile::at() const
- Returns the file index.
- \sa size()
-*/
-
-/*!
- Sets the file index to \e pos. Returns TRUE if successful, otherwise FALSE.
-
- Example:
- \code
- QFile f( "data.bin" );
- f.open( IO_ReadOnly ); // index set to 0
- f.at( 100 ); // set index to 100
- f.at( f.at()+50 ); // set index to 150
- f.at( f.size()-80 ); // set index to 80 before EOF
- f.close();
- \endcode
-
- \warning The result is undefined if the file was \link open() opened\endlink
- using the \c IO_Append specifier.
-
- \sa size(), open()
-*/
-
-bool QFile::at( int pos )
-{
- if ( !isOpen() ) {
-#if defined(CHECK_STATE)
- qWarning( "QFile::at: File is not open" );
-#endif
- return FALSE;
- }
- bool ok;
- if ( isRaw() ) { // raw file
- pos = (int)LSEEK(fd, pos, SEEK_SET);
- ok = pos != -1;
- } else { // buffered file
- ok = fseek(fh, pos, SEEK_SET) == 0;
- }
- if ( ok )
- ioIndex = pos;
-#if defined(CHECK_RANGE)
- else
- qWarning( "QFile::at: Cannot set file position %d", pos );
-#endif
- return ok;
-}
-
-/*!
- Reads at most \e len bytes from the file into \e p and returns the
- number of bytes actually read.
-
- Returns -1 if a serious error occurred.
-
- \warning We have experienced problems with some C libraries when a buffered
- file is opened for both reading and writing. If a read operation takes place
- immediately after a write operation, the read buffer contains garbage data.
- Worse, the same garbage is written to the file. Calling flush() before
- readBlock() solved this problem.
-
- \sa writeBlock()
-*/
-
-int QFile::readBlock( char *p, uint len )
-{
-#if defined(CHECK_NULL)
- if ( !p )
- qWarning( "QFile::readBlock: Null pointer error" );
-#endif
-#if defined(CHECK_STATE)
- if ( !isOpen() ) { // file not open
- qWarning( "QFile::readBlock: File not open" );
- return -1;
- }
- if ( !isReadable() ) { // reading not permitted
- qWarning( "QFile::readBlock: Read operation not permitted" );
- return -1;
- }
-#endif
- int nread; // number of bytes read
- if ( isRaw() ) { // raw file
- nread = READ( fd, p, len );
- if ( len && nread <= 0 ) {
- nread = 0;
- setStatus(IO_ReadError);
- }
- } else { // buffered file
- nread = (int)fread( p, 1, len, fh );
- if ( (uint)nread != len ) {
- if ( ferror( fh ) || nread==0 )
- setStatus(IO_ReadError);
- }
- }
- ioIndex += nread;
- return nread;
-}
-
-/*! \overload int writeBlock( const QByteArray& data )
-*/
-
-/*! \reimp
-
- Writes \e len bytes from \e p to the file and returns the number of
- bytes actually written.
-
- Returns -1 if a serious error occurred.
-
- \warning When working with buffered files, data may not be written
- to the file at once. Call flush() to make sure the data is really
- written.
-
- \sa readBlock()
-*/
-
-int QFile::writeBlock( const char *p, uint len )
-{
-#if defined(CHECK_NULL)
- if ( p == 0 && len != 0 )
- qWarning( "QFile::writeBlock: Null pointer error" );
-#endif
-#if defined(CHECK_STATE)
- if ( !isOpen() ) { // file not open
- qWarning( "QFile::writeBlock: File not open" );
- return -1;
- }
- if ( !isWritable() ) { // writing not permitted
- qWarning( "QFile::writeBlock: Write operation not permitted" );
- return -1;
- }
-#endif
- int nwritten; // number of bytes written
- if ( isRaw() ) // raw file
- nwritten = WRITE( fd, p, len );
- else // buffered file
- nwritten = (int)fwrite( p, 1, len, fh );
- if ( nwritten != (int)len ) { // write error
- if ( errno == ENOSPC ) // disk is full
- setStatus( IO_ResourceError );
- else
- setStatus( IO_WriteError );
- if ( isRaw() ) // recalc file position
- ioIndex = (int)LSEEK( fd, 0, SEEK_CUR );
- else
- ioIndex = fseek( fh, 0, SEEK_CUR );
- } else {
- ioIndex += nwritten;
- }
- if ( ioIndex > length ) // update file length
- length = ioIndex;
- return nwritten;
-}
-
-/*!
- Returns the file handle of the file.
-
- This is a small positive integer, suitable for use with C library
- functions such as fdopen() and fcntl(), as well as with QSocketNotifier.
-
- If the file is not open or there is an error, handle() returns -1.
-
- \sa QSocketNotifier
-*/
-
-int QFile::handle() const
-{
- if ( !isOpen() )
- return -1;
- else if ( fh )
- return FILENO( fh );
- else
- return fd;
-}
-
-/*!
- Closes an open file.
-
- The file is not closed if it was opened with an existing file handle.
- If the existing file handle is a \c FILE*, the file is flushed.
- If the existing file handle is an \c int file descriptor, nothing
- is done to the file.
-
- Some "write-behind" filesystems may report an unspecified error on
- closing the file. These errors only indicate that something may
- have gone wrong since the previous open(). In such a case status()
- reports IO_UnspecifiedError after close(), otherwise IO_Ok.
-
- \sa open(), flush()
-*/
-
-
-void QFile::close()
-{
- bool ok = FALSE;
- if ( isOpen() ) { // file is not open
- if ( fh ) { // buffered file
- if ( ext_f )
- ok = fflush( fh ) != -1; // flush instead of closing
- else
- ok = fclose( fh ) != -1;
- } else { // raw file
- if ( ext_f )
- ok = TRUE; // cannot close
- else
- ok = CLOSE( fd ) != -1;
- }
- init(); // restore internal state
- }
- if (!ok)
- setStatus (IO_UnspecifiedError);
-
- return;
-}
-
-int64 QFile::pos() const
-{
- if (isOpen())
- {
- // TODO: support 64 bit size
- return ftell( fh );
- }
- return -1;
-}
-
-int64 QFile::toEnd()
-{
- if (isOpen())
- {
- // TODO: support 64 bit size
- if (fseek( fh, 0, SEEK_END )!=-1)
- {
- return ftell( fh );
- }
- }
- return -1;
-}
-
-bool QFile::seek( int64 pos )
-{
- if (isOpen())
- {
- // TODO: support 64 bit size
- return fseek( fh, pos, SEEK_SET )!=-1;
- }
- return FALSE;
-}
-
-
-
diff --git a/qtools/qfiledefs_p.h b/qtools/qfiledefs_p.h
deleted file mode 100644
index 5a7cfe2..0000000
--- a/qtools/qfiledefs_p.h
+++ /dev/null
@@ -1,268 +0,0 @@
-/****************************************************************************
-**
-**
-** Common macros and system include files for QFile, QFileInfo and QDir.
-**
-** Created : 930812
-**
-** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
-**
-** This file is part of the tools module of the Qt GUI Toolkit.
-**
-** This file may be distributed under the terms of the Q Public License
-** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#ifndef QFILEDEFS_P_H
-#define QFILEDEFS_P_H
-
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists for the convenience
-// of qfile.cpp, qfileinfo.cpp and qdir.cpp.
-// This header file may change from version to version without notice,
-// or even be removed.
-//
-//
-#if defined(_CC_MWERKS_)
-# include <stdlib.h>
-# include <stat.h>
-#elif !defined(_OS_MAC_)
-# include <sys/types.h>
-# include <sys/stat.h>
-#elif defined(_OS_MAC_)
-# include <sys/types.h>
-# include <sys/stat.h>
-# define _OS_UNIX_
-#endif
-#include <fcntl.h>
-#include <errno.h>
-#if defined(_OS_UNIX_)
-# include <dirent.h>
-# include <unistd.h>
-#endif
-#if defined(_OS_MSDOS_) || defined(_OS_WIN32_) || defined(_OS_OS2_)
-# define _OS_FATFS_
-# if defined(__CYGWIN32__)
-# include <dirent.h>
-# include <unistd.h>
-# if !defined(_OS_UNIX_)
-# define _OS_UNIX_
-# endif
-# else
-# include <io.h>
-# if !defined(_CC_MWERKS_)
-# include <dos.h>
-# endif
-# include <direct.h>
-# endif
-#endif
-#include <limits.h>
-
-
-#if !defined(PATH_MAX)
-#if defined( MAXPATHLEN )
-#define PATH_MAX MAXPATHLEN
-#else
-#define PATH_MAX 1024
-#endif
-#endif
-
-
-#undef STATBUF
-#undef STAT
-#undef STAT_REG
-#undef STAT_DIR
-#undef STAT_LNK
-#undef STAT_MASK
-#undef FILENO
-#undef OPEN
-#undef CLOSE
-#undef LSEEK
-#undef READ
-#undef WRITE
-#undef ACCESS
-#undef GETCWD
-#undef CHDIR
-#undef MKDIR
-#undef RMDIR
-#undef OPEN_RDONLY
-#undef OPEN_WRONLY
-#undef OPEN_CREAT
-#undef OPEN_TRUNC
-#undef OPEN_APPEND
-#undef OPEN_TEXT
-#undef OPEN_BINARY
-
-
-#if defined(_CC_MSVC_) || defined(_CC_SYM_)
-
-# define STATBUF struct _stat // non-ANSI defs
-# define STATBUF4TSTAT struct _stat // non-ANSI defs
-# define STAT ::_stat
-# define FSTAT ::_fstat
-# define STAT_REG _S_IFREG
-# define STAT_DIR _S_IFDIR
-# define STAT_MASK _S_IFMT
-# if defined(_S_IFLNK)
-# define STAT_LNK _S_IFLNK
-# endif
-# define FILENO _fileno
-# define OPEN ::_open
-# define CLOSE ::_close
-# define LSEEK ::_lseek
-# define READ ::_read
-# define WRITE ::_write
-# define ACCESS ::_access
-# define GETCWD ::_getcwd
-# define CHDIR ::_chdir
-# define MKDIR ::_mkdir
-# define RMDIR ::_rmdir
-# define OPEN_RDONLY _O_RDONLY
-# define OPEN_WRONLY _O_WRONLY
-# define OPEN_RDWR _O_RDWR
-# define OPEN_CREAT _O_CREAT
-# define OPEN_TRUNC _O_TRUNC
-# define OPEN_APPEND _O_APPEND
-# if defined(O_TEXT)
-# define OPEN_TEXT _O_TEXT
-# define OPEN_BINARY _O_BINARY
-# endif
-
-#elif defined(_CC_BOR_) && __BORLANDC__ >= 0x550
-
-# define STATBUF struct stat // non-ANSI defs
-# define STATBUF4TSTAT struct _stat // non-ANSI defs
-# define STAT ::stat
-# define FSTAT ::fstat
-# define STAT_REG _S_IFREG
-# define STAT_DIR _S_IFDIR
-# define STAT_MASK _S_IFMT
-# if defined(_S_IFLNK)
-# define STAT_LNK _S_IFLNK
-# endif
-# define FILENO _fileno
-# define OPEN ::open
-# define CLOSE ::_close
-# define LSEEK ::_lseek
-# define READ ::_read
-# define WRITE ::_write
-# define ACCESS ::_access
-# define GETCWD ::_getcwd
-# define CHDIR ::chdir
-# define MKDIR ::_mkdir
-# define RMDIR ::_rmdir
-# define OPEN_RDONLY _O_RDONLY
-# define OPEN_WRONLY _O_WRONLY
-# define OPEN_RDWR _O_RDWR
-# define OPEN_CREAT _O_CREAT
-# define OPEN_TRUNC _O_TRUNC
-# define OPEN_APPEND _O_APPEND
-# if defined(O_TEXT)
-# define OPEN_TEXT _O_TEXT
-# define OPEN_BINARY _O_BINARY
-# endif
-
-#else // all other systems
-
-#ifdef __MINGW32__
-# define STATBUF struct _stat
-# define STATBUF4TSTAT struct _stat
-# define STAT _stat
-# define FSTAT _fstat
-#else
-# define STATBUF struct stat
-# define STATBUF4TSTAT struct stat
-# define STAT ::stat
-# define FSTAT ::fstat
-#endif
-# define STAT_REG S_IFREG
-# define STAT_DIR S_IFDIR
-# define STAT_MASK S_IFMT
-# if defined(S_IFLNK)
-# define STAT_LNK S_IFLNK
-# endif
-# define FILENO fileno
-# define OPEN ::open
-# define CLOSE ::close
-# define LSEEK ::lseek
-# define READ ::read
-# define WRITE ::write
-# define ACCESS ::access
-# if defined(_OS_OS2EMX_)
-# define GETCWD ::_getcwd2
-# define CHDIR ::_chdir2
-# else
-# define GETCWD ::getcwd
-# define CHDIR ::chdir
-# endif
-# define MKDIR ::mkdir
-# define RMDIR ::rmdir
-# define OPEN_RDONLY O_RDONLY
-# define OPEN_WRONLY O_WRONLY
-# define OPEN_RDWR O_RDWR
-# define OPEN_CREAT O_CREAT
-# define OPEN_TRUNC O_TRUNC
-# define OPEN_APPEND O_APPEND
-# if defined(O_TEXT)
-# define OPEN_TEXT O_TEXT
-# define OPEN_BINARY O_BINARY
-# endif
-#endif
-
-#if defined(_CC_MWERKS_)
-#undef mkdir
-#undef MKDIR
-#define MKDIR _mkdir
-#undef rmdir
-#undef RMDIR
-#define RMDIR _rmdir
-#endif
-
-
-#if defined(_OS_FATFS_)
-# define F_OK 0
-# define X_OK 1
-# define W_OK 2
-# define R_OK 4
-#endif
-
-#if defined(_OS_MAC_) && !defined(_OS_UNIX_)
-# define F_OK 0
-# define X_OK 1
-# define W_OK 2
-# define R_OK 4
-#endif
-
-struct QFileInfoCache
-{
- STATBUF st;
- bool isSymLink;
-};
-
-#endif
diff --git a/qtools/qfileinfo.cpp b/qtools/qfileinfo.cpp
deleted file mode 100644
index f96f441..0000000
--- a/qtools/qfileinfo.cpp
+++ /dev/null
@@ -1,457 +0,0 @@
-/****************************************************************************
-**
-**
-** Implementation of QFileInfo class
-**
-** Created : 950628
-**
-** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
-**
-** This file is part of the tools module of the Qt GUI Toolkit.
-**
-** This file may be distributed under the terms of the Q Public License
-** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#include "qglobal.h"
-
-#include "qfileinfo.h"
-#include "qfiledefs_p.h"
-#include "qdir.h"
-
-extern bool qt_file_access( const QString& fn, int t );
-
-// NOT REVISED
-/*!
- \class QFileInfo qfileinfo.h
- \brief The QFileInfo class provides system-independent file information.
-
- \ingroup io
-
- QFileInfo provides information about a file's name and position (path) in
- the file system, its access rights and whether it is a directory or a
- symbolic link. Its size and last modified/read times are also available.
-
- To speed up performance QFileInfo caches information about the file. Since
- files can be changed by other users or programs, or even by other parts of
- the same program there is a function that refreshes the file information;
- refresh(). If you would rather like a QFileInfo to access the file system
- every time you request information from it, you can call the function
- setCaching( FALSE ).
-
- A QFileInfo can point to a file using either a relative or an absolute
- file path. Absolute file paths begin with the directory separator
- ('/') or a drive specification (not applicable to UNIX).
- Relative file names begin with a directory name or a file name and specify
- a path relative to the current directory. An example of
- an absolute path is the string "/tmp/quartz". A relative path might look like
- "src/fatlib". You can use the function isRelative() to check if a QFileInfo
- is using a relative or an absolute file path. You can call the function
- convertToAbs() to convert a relative QFileInfo to an absolute one.
-
- If you need to read and traverse directories, see the QDir class.
-*/
-
-
-/*!
- Constructs a new empty QFileInfo.
-*/
-
-QFileInfo::QFileInfo()
-{
- fic = 0;
- cache = TRUE;
-}
-
-/*!
- Constructs a new QFileInfo that gives information about the given file.
- The string given can be an absolute or a relative file path.
-
- \sa bool setFile(QString ), isRelative(), QDir::setCurrent(),
- QDir::isRelativePath()
-*/
-
-QFileInfo::QFileInfo( const QString &file )
-{
- fn = file;
- slashify( fn );
- fic = 0;
- cache = TRUE;
-}
-
-/*!
- Constructs a new QFileInfo that gives information about \e file.
-
- If the file has a relative path, the QFileInfo will also have one.
-
- \sa isRelative()
-*/
-
-QFileInfo::QFileInfo( const QFile &file )
-{
- fn = file.name();
- slashify( fn );
- fic = 0;
- cache = TRUE;
-}
-
-/*!
- Constructs a new QFileInfo that gives information about the file
- named \e fileName in the directory \e d.
-
- If the directory has a relative path, the QFileInfo will also have one.
-
- \sa isRelative()
-*/
-#ifndef QT_NO_DIR
-QFileInfo::QFileInfo( const QDir &d, const QString &fileName )
-{
- fn = d.filePath( fileName );
- slashify( fn );
- fic = 0;
- cache = TRUE;
-}
-#endif
-/*!
- Constructs a new QFileInfo that is a copy of \e fi.
-*/
-
-QFileInfo::QFileInfo( const QFileInfo &fi )
-{
- fn = fi.fn;
- if ( fi.fic ) {
- fic = new QFileInfoCache;
- *fic = *fi.fic;
- } else {
- fic = 0;
- }
- cache = fi.cache;
-}
-
-/*!
- Destructs the QFileInfo.
-*/
-
-QFileInfo::~QFileInfo()
-{
- delete fic;
-}
-
-
-/*!
- Makes a copy of \e fi and assigns it to this QFileInfo.
-*/
-
-QFileInfo &QFileInfo::operator=( const QFileInfo &fi )
-{
- fn = fi.fn;
- if ( !fi.fic ) {
- delete fic;
- fic = 0;
- } else {
- if ( !fic ) {
- fic = new QFileInfoCache;
- CHECK_PTR( fic );
- }
- *fic = *fi.fic;
- }
- cache = fi.cache;
- return *this;
-}
-
-
-/*!
- Sets the file to obtain information about.
-
- The string given can be an absolute or a relative file path. Absolute file
- paths begin with the directory separator (e.g. '/' under UNIX) or a drive
- specification (not applicable to UNIX). Relative file names begin with a
- directory name or a file name and specify a path relative to the current
- directory.
-
- Example:
- \code
- #include <qfileinfo.h>
- #include <qdir.h>
-
- void test()
- {
- QString absolute = "/liver/aorta";
- QString relative = "liver/aorta";
- QFileInfo fi1( absolute );
- QFileInfo fi2( relative );
-
- QDir::setCurrent( QDir::rootDirPath() );
- // fi1 and fi2 now point to the same file
-
- QDir::setCurrent( "/tmp" );
- // fi1 now points to "/liver/aorta",
- // while fi2 points to "/tmp/liver/aorta"
- }
- \endcode
-
- \sa isRelative(), QDir::setCurrent(), QDir::isRelativePath()
-*/
-
-void QFileInfo::setFile( const QString &file )
-{
- fn = file;
- slashify( fn );
- delete fic;
- fic = 0;
-}
-
-/*!
- Sets the file to obtain information about.
-
- If the file has a relative path, the QFileInfo will also have one.
-
- \sa isRelative()
-*/
-
-void QFileInfo::setFile( const QFile &file )
-{
- fn = file.name();
- slashify( fn );
- delete fic;
- fic = 0;
-}
-
-/*!
- Sets the file to obtains information about to \e fileName in the
- directory \e d.
-
- If the directory has a relative path, the QFileInfo will also have one.
-
- \sa isRelative()
-*/
-#ifndef QT_NO_DIR
-void QFileInfo::setFile( const QDir &d, const QString &fileName )
-{
- fn = d.filePath( fileName );
- slashify( fn );
- delete fic;
- fic = 0;
-}
-#endif
-
-/*!
- Returns TRUE if the file pointed to exists, otherwise FALSE.
-*/
-
-bool QFileInfo::exists() const
-{
- return qt_file_access( fn, F_OK );
-}
-
-/*!
- Refresh the information about the file, i.e. read in information from the
- file system the next time a cached property is fetched.
-
- \sa setCaching()
-*/
-
-void QFileInfo::refresh() const
-{
- QFileInfo *that = (QFileInfo*)this; // Mutable function
- delete that->fic;
- that->fic = 0;
-}
-
-/*!
- \fn bool QFileInfo::caching() const
- Returns TRUE if caching is enabled.
- \sa setCaching(), refresh()
-*/
-
-/*!
- Enables caching of file information if \e enable is TRUE, or disables it
- if \e enable is FALSE.
-
- When caching is enabled, QFileInfo reads the file information the first
- time
-
- Caching is enabled by default.
-
- \sa refresh(), caching()
-*/
-
-void QFileInfo::setCaching( bool enable )
-{
- if ( cache == enable )
- return;
- cache = enable;
- if ( cache ) {
- delete fic;
- fic = 0;
- }
-}
-
-
-/*!
- Returns the name, i.e. the file name including the path (which can be
- absolute or relative).
-
- \sa isRelative(), absFilePath()
-*/
-
-QString QFileInfo::filePath() const
-{
- return fn;
-}
-
-/*!
- Returns the base name of the file.
-
- The base name consists of all characters in the file name up to (but not
- including) the first '.' character. The path is not included.
-
- Example:
- \code
- QFileInfo fi( "/tmp/abdomen.lower" );
- QString base = fi.baseName(); // base = "abdomen"
- \endcode
-
- \sa fileName(), extension()
-*/
-
-QString QFileInfo::baseName() const
-{
- QString tmp = fileName();
- int pos = tmp.find( '.' );
- if ( pos == -1 )
- return tmp;
- else
- return tmp.left( pos );
-}
-
-/*!
- Returns the extension name of the file.
-
- If \a complete is TRUE (the default), extension() returns the string
- of all characters in the file name after (but not including) the
- first '.' character. For a file named "archive.tar.gz" this
- returns "tar.gz".
-
- If \a complete is FALSE, extension() returns the string of all
- characters in the file name after (but not including) the last '.'
- character. For a file named "archive.tar.gz" this returns "gz".
-
- Example:
- \code
- QFileInfo fi( "lex.yy.c" );
- QString ext = fi.extension(); // ext = "yy.c"
- QString ext = fi.extension( FALSE ); // ext = "c"
- \endcode
-
- \sa fileName(), baseName()
-
-*/
-
-QString QFileInfo::extension( bool complete ) const
-{
- QString s = fileName();
- int pos = complete ? s.find( '.' ) : s.findRev( '.' );
- if ( pos < 0 )
- return QString::fromLatin1( "" );
- else
- return s.right( s.length() - pos - 1 );
-}
-
-/*!
- Returns the directory path of the file.
-
- If the QFileInfo is relative and \e absPath is FALSE, the QDir will be
- relative, otherwise it will be absolute.
-
- \sa dirPath(), filePath(), fileName(), isRelative()
-*/
-#ifndef QT_NO_DIR
-QDir QFileInfo::dir( bool absPath ) const
-{
- return QDir( dirPath(absPath) );
-}
-#endif
-
-
-/*!
- Returns TRUE if the file is readable.
- \sa isWritable(), isExecutable(), permission()
-*/
-
-bool QFileInfo::isReadable() const
-{
- return qt_file_access( fn, R_OK );
-}
-
-/*!
- Returns TRUE if the file is writable.
- \sa isReadable(), isExecutable(), permission()
-*/
-
-bool QFileInfo::isWritable() const
-{
- return qt_file_access( fn, W_OK );
-}
-
-/*!
- Returns TRUE if the file is executable.
- \sa isReadable(), isWritable(), permission()
-*/
-
-bool QFileInfo::isExecutable() const
-{
- return qt_file_access( fn, X_OK );
-}
-
-
-/*!
- Returns TRUE if the file path name is relative to the current directory,
- FALSE if the path is absolute (e.g. under UNIX a path is relative if it
- does not start with a '/').
-
- According to Einstein this function should always return TRUE.
-*/
-#ifndef QT_NO_DIR
-bool QFileInfo::isRelative() const
-{
- return QDir::isRelativePath( fn );
-}
-
-/*!
- Converts the file path name to an absolute path.
-
- If it is already absolute nothing is done.
-
- \sa filePath(), isRelative()
-*/
-
-bool QFileInfo::convertToAbs()
-{
- if ( isRelative() )
- fn = absFilePath();
- return QDir::isRelativePath( fn );
-}
-#endif
diff --git a/qtools/qfileinfo.h b/qtools/qfileinfo.h
deleted file mode 100644
index 74d782c..0000000
--- a/qtools/qfileinfo.h
+++ /dev/null
@@ -1,134 +0,0 @@
-/****************************************************************************
-**
-**
-** Definition of QFileInfo class
-**
-** Created : 950628
-**
-** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
-**
-** This file is part of the tools module of the Qt GUI Toolkit.
-**
-** This file may be distributed under the terms of the Q Public License
-** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#ifndef QFILEINFO_H
-#define QFILEINFO_H
-
-#ifndef QT_H
-#include "qfile.h"
-#endif // QT_H
-
-
-class QDir;
-struct QFileInfoCache;
-
-
-class Q_EXPORT QFileInfo // file information class
-{
-public:
- enum PermissionSpec {
- ReadUser = 0400, WriteUser = 0200, ExeUser = 0100,
- ReadGroup = 0040, WriteGroup = 0020, ExeGroup = 0010,
- ReadOther = 0004, WriteOther = 0002, ExeOther = 0001 };
-
- QFileInfo();
- QFileInfo( const QString &file );
- QFileInfo( const QFile & );
-#ifndef QT_NO_DIR
- QFileInfo( const QDir &, const QString &fileName );
-#endif
- QFileInfo( const QFileInfo & );
- ~QFileInfo();
-
- QFileInfo &operator=( const QFileInfo & );
-
- void setFile( const QString &file );
- void setFile( const QFile & );
-#ifndef QT_NO_DIR
- void setFile( const QDir &, const QString &fileName );
-#endif
- bool exists() const;
- void refresh() const;
- bool caching() const;
- void setCaching( bool );
-
- QString filePath() const;
- QString fileName() const;
-#ifndef QT_NO_DIR //###
- QString absFilePath() const;
-#endif
- QString baseName() const;
- QString extension( bool complete = TRUE ) const;
-
-#ifndef QT_NO_DIR //###
- QString dirPath( bool absPath = FALSE ) const;
-#endif
-#ifndef QT_NO_DIR
- QDir dir( bool absPath = FALSE ) const;
-#endif
- bool isReadable() const;
- bool isWritable() const;
- bool isExecutable() const;
-
-#ifndef QT_NO_DIR //###
- bool isRelative() const;
- bool convertToAbs();
-#endif
-
- bool isFile() const;
- bool isDir() const;
- bool isSymLink() const;
-
- QString readLink() const;
-
- QString owner() const;
- uint ownerId() const;
- QString group() const;
- uint groupId() const;
-
- bool permission( int permissionSpec ) const;
-
- uint size() const;
-
-private:
- void doStat() const;
- static void slashify( QString & );
- static void makeAbs( QString & );
-
- QString fn;
- QFileInfoCache *fic;
- bool cache;
-};
-
-
-inline bool QFileInfo::caching() const
-{
- return cache;
-}
-
-
-#endif // QFILEINFO_H
diff --git a/qtools/qfileinfo_unix.cpp b/qtools/qfileinfo_unix.cpp
deleted file mode 100644
index e900089..0000000
--- a/qtools/qfileinfo_unix.cpp
+++ /dev/null
@@ -1,388 +0,0 @@
-/****************************************************************************
-**
-**
-** Implementation of QFileInfo class
-**
-** Created : 950628
-**
-** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
-**
-** This file is part of the tools module of the Qt GUI Toolkit.
-**
-** This file may be distributed under the terms of the Q Public License
-** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses for Unix/X11 or for Qt/Embedded may use this file in accordance
-** with the Qt Commercial License Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#include "qglobal.h"
-
-#if defined(_OS_SUN_)
-#define readlink _qt_hide_readlink
-#endif
-
-#include <pwd.h>
-#include <grp.h>
-
-#include "qfileinfo.h"
-#include "qfiledefs_p.h"
-#include "qdir.h"
-
-#if defined(_OS_SUN_)
-#undef readlink
-extern "C" int readlink( const char *, void *, uint );
-#endif
-
-
-void QFileInfo::slashify( QString& )
-{
- return;
-}
-
-
-void QFileInfo::makeAbs( QString & )
-{
- return;
-}
-
-extern bool qt_file_access( const QString& fn, int t );
-
-/*!
- Returns TRUE if we are pointing to a real file.
- \sa isDir(), isSymLink()
-*/
-bool QFileInfo::isFile() const
-{
- if ( !fic || !cache )
- doStat();
- return fic ? (fic->st.st_mode & STAT_MASK) == STAT_REG : FALSE;
-}
-
-/*!
- Returns TRUE if we are pointing to a directory or a symbolic link to
- a directory.
- \sa isFile(), isSymLink()
-*/
-
-bool QFileInfo::isDir() const
-{
- if ( !fic || !cache )
- doStat();
- return fic ? (fic->st.st_mode & STAT_MASK) == STAT_DIR : FALSE;
-}
-
-/*!
- Returns TRUE if we are pointing to a symbolic link.
- \sa isFile(), isDir(), readLink()
-*/
-
-bool QFileInfo::isSymLink() const
-{
- if ( !fic || !cache )
- doStat();
- return fic ? fic->isSymLink : FALSE;
-}
-
-
-/*!
- Returns the name a symlink points to, or a null QString if the
- object does not refer to a symbolic link.
-
- This name may not represent an existing file; it is only a string.
- QFileInfo::exists() returns TRUE if the symlink points to an
- existing file.
-
- \sa exists(), isSymLink(), isDir(), isFile()
-*/
-
-QString QFileInfo::readLink() const
-{
- QString r;
-
-#if defined(_OS_UNIX_) && !defined(_OS_OS2EMX_)
- char s[PATH_MAX+1];
- if ( !isSymLink() )
- return QString();
- int len = (int)readlink( QFile::encodeName(fn).data(), s, PATH_MAX );
- if ( len >= 0 ) {
- s[len] = '\0';
- r = QFile::decodeName(s);
- }
-#endif
-
- return r;
-}
-
-static const uint nobodyID = (uint) -2;
-
-/*!
- Returns the owner of the file.
-
- On systems where files do not have owners this function returns 0.
-
- Note that this function can be time-consuming under UNIX. (in the order
- of milliseconds on a 486 DX2/66 running Linux).
-
- \sa ownerId(), group(), groupId()
-*/
-
-QString QFileInfo::owner() const
-{
- passwd *pw = getpwuid( ownerId() );
- if ( pw )
- return QFile::decodeName( pw->pw_name );
- return QString::null;
-}
-
-/*!
- Returns the id of the owner of the file.
-
- On systems where files do not have owners this function returns ((uint) -2).
-
- \sa owner(), group(), groupId()
-*/
-
-uint QFileInfo::ownerId() const
-{
- if ( !fic || !cache )
- doStat();
- if ( fic )
- return fic->st.st_uid;
- return nobodyID;
-}
-
-/*!
- Returns the group the file belongs to.
-
- On systems where files do not have groups this function always
- returns 0.
-
- Note that this function can be time-consuming under UNIX (in the order of
- milliseconds on a 486 DX2/66 running Linux).
-
- \sa groupId(), owner(), ownerId()
-*/
-
-QString QFileInfo::group() const
-{
- struct group *gr = getgrgid( groupId() );
- if ( gr )
- return QFile::decodeName( gr->gr_name );
- return QString::null;
-}
-
-/*!
- Returns the id of the group the file belongs to.
-
- On systems where files do not have groups this function always
- returns ((uind) -2).
-
- \sa group(), owner(), ownerId()
-*/
-
-uint QFileInfo::groupId() const
-{
- if ( !fic || !cache )
- doStat();
- if ( fic )
- return fic->st.st_gid;
- return nobodyID;
-}
-
-
-/*!
- \fn bool QFileInfo::permission( int permissionSpec ) const
-
- Tests for file permissions. The \e permissionSpec argument can be several
- flags of type PermissionSpec or'ed together to check for permission
- combinations.
-
- On systems where files do not have permissions this function always
- returns TRUE.
-
- Example:
- \code
- QFileInfo fi( "/tmp/tonsils" );
- if ( fi.permission( QFileInfo::WriteUser | QFileInfo::ReadGroup ) )
- qWarning( "Tonsils can be changed by me, and the group can read them.");
- if ( fi.permission( QFileInfo::WriteGroup | QFileInfo::WriteOther ) )
- qWarning( "Danger! Tonsils can be changed by the group or others!" );
- \endcode
-
- \sa isReadable(), isWritable(), isExecutable()
-*/
-
-bool QFileInfo::permission( int permissionSpec ) const
-{
- if ( !fic || !cache )
- doStat();
- if ( fic ) {
- uint mask = 0;
- if ( permissionSpec & ReadUser)
- mask |= S_IRUSR;
- if ( permissionSpec & WriteUser)
- mask |= S_IWUSR;
- if ( permissionSpec & ExeUser)
- mask |= S_IXUSR;
- if ( permissionSpec & ReadGroup)
- mask |= S_IRGRP;
- if ( permissionSpec & WriteGroup)
- mask |= S_IWGRP;
- if ( permissionSpec & ExeGroup)
- mask |= S_IXGRP;
- if ( permissionSpec & ReadOther)
- mask |= S_IROTH;
- if ( permissionSpec & WriteOther)
- mask |= S_IWOTH;
- if ( permissionSpec & ExeOther)
- mask |= S_IXOTH;
- if ( mask ) {
- return (fic->st.st_mode & mask) == mask;
- } else {
-#if defined(CHECK_NULL)
- qWarning( "QFileInfo::permission: permissionSpec is 0" );
-#endif
- return TRUE;
- }
- } else {
- return FALSE;
- }
-}
-
-/*!
- Returns the file size in bytes, or 0 if the file does not exist if the size
- cannot be fetched.
-*/
-
-uint QFileInfo::size() const
-{
- if ( !fic || !cache )
- doStat();
- if ( fic )
- return (uint)fic->st.st_size;
- else
- return 0;
-}
-
-void QFileInfo::doStat() const
-{
- QFileInfo *that = ((QFileInfo*)this); // mutable function
- if ( !that->fic )
- that->fic = new QFileInfoCache;
- STATBUF *b = &that->fic->st;
- that->fic->isSymLink = FALSE;
-
-#if defined(_OS_UNIX_) && defined(S_IFLNK)
- if ( ::lstat(QFile::encodeName(fn),b) == 0 ) {
- if ( S_ISLNK( b->st_mode ) )
- that->fic->isSymLink = TRUE;
- else
- return;
- }
-#endif
- int r;
-
- r = STAT( QFile::encodeName(fn), b );
-
- if ( r != 0 ) {
- delete that->fic;
- that->fic = 0;
- }
-}
-
-/*!
- Returns the directory path of the file.
-
- If \e absPath is TRUE an absolute path is always returned.
-
- \sa dir(), filePath(), fileName(), isRelative()
-*/
-#ifndef QT_NO_DIR
-QString QFileInfo::dirPath( bool absPath ) const
-{
- QString s;
- if ( absPath )
- s = absFilePath();
- else
- s = fn;
- int pos = s.findRev( '/' );
- if ( pos == -1 ) {
- return QString::fromLatin1(".");
- } else {
- if ( pos == 0 )
- return QString::fromLatin1( "/" );
- return s.left( pos );
- }
-}
-#endif
-/*!
- Returns the name of the file, the file path is not included.
-
- Example:
- \code
- QFileInfo fi( "/tmp/abdomen.lower" );
- QString name = fi.fileName(); // name = "abdomen.lower"
- \endcode
-
- \sa isRelative(), filePath(), baseName(), extension()
-*/
-
-QString QFileInfo::fileName() const
-{
- int p = fn.findRev( '/' );
- if ( p == -1 ) {
- return fn;
- } else {
- return fn.mid(p+1);
- }
-}
-
-/*!
- Returns the absolute path name.
-
- The absolute path name is the file name including the absolute path. If
- the QFileInfo is absolute (i.e. not relative) this function will return
- the same string as filePath().
-
- Note that this function can be time-consuming under UNIX. (in the order
- of milliseconds on a 486 DX2/66 running Linux).
-
- \sa isRelative(), filePath()
-*/
-#ifndef QT_NO_DIR
-QString QFileInfo::absFilePath() const
-{
- if ( QDir::isRelativePath(fn) ) {
- QString tmp = QDir::currentDirPath();
- tmp += '/';
- tmp += fn;
- makeAbs( tmp );
- return QDir::cleanDirPath( tmp );
- } else {
- QString tmp = fn;
- makeAbs( tmp );
- return QDir::cleanDirPath( tmp );
- }
-
-}
-#endif
diff --git a/qtools/qfileinfo_win32.cpp b/qtools/qfileinfo_win32.cpp
deleted file mode 100644
index bcbe136..0000000
--- a/qtools/qfileinfo_win32.cpp
+++ /dev/null
@@ -1,320 +0,0 @@
-/******************************************************************************
- *
- *
- *
- * Copyright (C) 1997-2001 by Dimitri van Heesch.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation under the terms of the GNU General Public License is hereby
- * granted. No representations are made about the suitability of this software
- * for any purpose. It is provided "as is" without express or implied warranty.
- * See the GNU General Public License for more details.
- *
- * Documents produced by Doxygen are derivative works derived from the
- * input used in their production; they are not affected by this license.
- *
- * Based on qfileinfo_unix.cpp
- *
- * Copyright (C) 1992-2000 Trolltech AS.
- */
-
-#include "qglobal.h"
-
-#include "qfileinfo.h"
-#include "qfiledefs_p.h"
-#include "qdir.h"
-
-static void reslashify( QString& n )
-{
- for ( int i=0; i<(int)n.length(); i++ )
- {
- if ( n[i] == '/' )
- n[i] = '\\';
- }
-}
-
-void QFileInfo::slashify( QString& n )
-{
- for ( int i=0; i<(int)n.length(); i++ )
- {
- if ( n[i] == '\\' )
- n[i] = '/';
- }
-}
-
-void QFileInfo::makeAbs( QString & )
-{
- // TODO: what to do here?
- return;
-}
-
-extern bool qt_file_access( const QString& fn, int t );
-
-/*!
- Returns TRUE if we are pointing to a real file.
- \sa isDir(), isSymLink()
-*/
-bool QFileInfo::isFile() const
-{
- if ( !fic || !cache )
- doStat();
- return fic ? (fic->st.st_mode & STAT_MASK) == STAT_REG : FALSE;
-}
-
-/*!
- Returns TRUE if we are pointing to a directory or a symbolic link to
- a directory.
- \sa isFile(), isSymLink()
-*/
-
-bool QFileInfo::isDir() const
-{
- if ( !fic || !cache )
- doStat();
- return fic ? (fic->st.st_mode & STAT_MASK) == STAT_DIR : FALSE;
-}
-
-/*!
- Returns TRUE if we are pointing to a symbolic link.
- \sa isFile(), isDir(), readLink()
-*/
-
-bool QFileInfo::isSymLink() const
-{
- if ( !fic || !cache )
- doStat();
- return fic ? fic->isSymLink : FALSE;
-}
-
-
-/*!
- Returns the name a symlink points to, or a null QString if the
- object does not refer to a symbolic link.
-
- This name may not represent an existing file; it is only a string.
- QFileInfo::exists() returns TRUE if the symlink points to an
- existing file.
-
- \sa exists(), isSymLink(), isDir(), isFile()
-*/
-
-QString QFileInfo::readLink() const
-{
- QString r;
- return r;
-}
-
-static const uint nobodyID = (uint) -2;
-
-/*!
- Returns the owner of the file.
-
- On systems where files do not have owners this function returns
- a null string.
-
- Note that this function can be time-consuming under UNIX. (in the order
- of milliseconds on a 486 DX2/66 running Linux).
-
- \sa ownerId(), group(), groupId()
-*/
-
-QString QFileInfo::owner() const
-{
- return QString::null;
-}
-
-/*!
- Returns the id of the owner of the file.
-
- On systems where files do not have owners this function returns ((uint) -2).
-
- \sa owner(), group(), groupId()
-*/
-
-uint QFileInfo::ownerId() const
-{
- return (uint)-2;
-}
-
-/*!
- Returns the group the file belongs to.
-
- On systems where files do not have groups this function always
- returns 0.
-
- Note that this function can be time-consuming under UNIX (in the order of
- milliseconds on a 486 DX2/66 running Linux).
-
- \sa groupId(), owner(), ownerId()
-*/
-
-QString QFileInfo::group() const
-{
- return QString::null;
-}
-
-/*!
- Returns the id of the group the file belongs to.
-
- On systems where files do not have groups this function always
- returns ((uind) -2).
-
- \sa group(), owner(), ownerId()
-*/
-
-uint QFileInfo::groupId() const
-{
- return (uint)-2;
-}
-
-
-/*!
- \fn bool QFileInfo::permission( int permissionSpec ) const
-
- Tests for file permissions. The \e permissionSpec argument can be several
- flags of type PermissionSpec or'ed together to check for permission
- combinations.
-
- On systems where files do not have permissions this function always
- returns TRUE.
-
- Example:
- \code
- QFileInfo fi( "/tmp/tonsils" );
- if ( fi.permission( QFileInfo::WriteUser | QFileInfo::ReadGroup ) )
- qWarning( "Tonsils can be changed by me, and the group can read them.");
- if ( fi.permission( QFileInfo::WriteGroup | QFileInfo::WriteOther ) )
- qWarning( "Danger! Tonsils can be changed by the group or others!" );
- \endcode
-
- \sa isReadable(), isWritable(), isExecutable()
-*/
-
-bool QFileInfo::permission( int permissionSpec ) const
-{
- return TRUE;
-}
-
-/*!
- Returns the file size in bytes, or 0 if the file does not exist if the size
- cannot be fetched.
-*/
-
-uint QFileInfo::size() const
-{
- if ( !fic || !cache )
- doStat();
- if ( fic )
- return (uint)fic->st.st_size;
- else
- return 0;
-}
-
-void QFileInfo::doStat() const
-{
- QFileInfo *that = ((QFileInfo*)this); // mutable function
- if ( !that->fic )
- that->fic = new QFileInfoCache;
- STATBUF *b = &that->fic->st;
- that->fic->isSymLink = FALSE;
-
-#if defined(__CYGWIN32_)
- int r;
-
- r = STAT( QFile::encodeName(fn), b );
-
- if ( r != 0 ) {
- delete that->fic;
- that->fic = 0;
- }
-#else
- QString file = fn;
- file = QDir::cleanDirPath(file);
- reslashify(file);
-#ifdef QT_LARGEFILE_SUPPORT
- if ( _wstati64( (wchar_t*) file.ucs2(), b ) == -1 ) {
-#else
- if ( _wstat( (wchar_t*) file.ucs2(), b ) == -1 ) {
-#endif
- delete that->fic;
- that->fic = 0;
- }
-#endif
-}
-
-/*!
- Returns the directory path of the file.
-
- If \e absPath is TRUE an absolute path is always returned.
-
- \sa dir(), filePath(), fileName(), isRelative()
-*/
-#ifndef QT_NO_DIR
-QString QFileInfo::dirPath( bool absPath ) const
-{
- QString s;
- if ( absPath )
- s = absFilePath();
- else
- s = fn;
- int pos = s.findRev( '/' );
- if ( pos == -1 ) {
- return QString::fromLatin1(".");
- } else {
- if ( pos == 0 )
- return QString::fromLatin1( "/" );
- return s.left( pos );
- }
-}
-#endif
-/*!
- Returns the name of the file, the file path is not included.
-
- Example:
- \code
- QFileInfo fi( "/tmp/abdomen.lower" );
- QString name = fi.fileName(); // name = "abdomen.lower"
- \endcode
-
- \sa isRelative(), filePath(), baseName(), extension()
-*/
-
-QString QFileInfo::fileName() const
-{
- int p = fn.findRev( '/' );
- if ( p == -1 ) {
- return fn;
- } else {
- return fn.mid(p+1);
- }
-}
-
-/*!
- Returns the absolute path name.
-
- The absolute path name is the file name including the absolute path. If
- the QFileInfo is absolute (i.e. not relative) this function will return
- the same string as filePath().
-
- Note that this function can be time-consuming under UNIX. (in the order
- of milliseconds on a 486 DX2/66 running Linux).
-
- \sa isRelative(), filePath()
-*/
-#ifndef QT_NO_DIR
-QString QFileInfo::absFilePath() const
-{
- if ( QDir::isRelativePath(fn) ) {
- QString tmp = QDir::currentDirPath();
- tmp += '/';
- tmp += fn;
- makeAbs( tmp );
- return QDir::cleanDirPath( tmp );
- } else {
- QString tmp = fn;
- makeAbs( tmp );
- return QDir::cleanDirPath( tmp );
- }
-
-}
-#endif
diff --git a/qtools/qgarray.cpp b/qtools/qgarray.cpp
deleted file mode 100644
index 2607a26..0000000
--- a/qtools/qgarray.cpp
+++ /dev/null
@@ -1,747 +0,0 @@
-/****************************************************************************
-**
-**
-** Implementation of QGArray class
-**
-** Created : 930906
-**
-** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
-**
-** This file is part of the tools module of the Qt GUI Toolkit.
-**
-** This file may be distributed under the terms of the Q Public License
-** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#define QGARRAY_CPP
-#include "qgarray.h"
-#include "qstring.h"
-#include <stdlib.h>
-
-#define USE_MALLOC // comment to use new/delete
-
-#undef NEW
-#undef DELETE
-
-#if defined(USE_MALLOC)
-#define NEW(type,size) ((type*)malloc(size*sizeof(type)))
-#define DELETE(array) (free((char*)array))
-#else
-#define NEW(type,size) (new type[size])
-#define DELETE(array) (delete[] array)
-#define DONT_USE_REALLOC // comment to use realloc()
-#endif
-
-
-// NOT REVISED
-/*!
- \class QShared qshared.h
- \brief The QShared struct is internally used for implementing shared classes.
-
- It only contains a reference count and member functions to increment and
- decrement it.
-
- Shared classes normally have internal classes that inherit QShared and
- add the shared data.
-
- \sa \link shclass.html Shared Classes\endlink
-*/
-
-
-/*!
- \class QGArray qgarray.h
- \brief The QGArray class is an internal class for implementing the QArray class.
-
- QGArray is a strictly internal class that acts as base class for the
- QArray template array.
-
- It contains an array of bytes and has no notion of an array element.
-*/
-
-
-/*!
- \internal
- Constructs a null array.
-*/
-
-QGArray::QGArray()
-{
- shd = newData();
- CHECK_PTR( shd );
-}
-
-/*!
- \internal
- Dummy constructor; does not allocate any data.
-
- This constructor does not initialize any array data so subclasses
- must do it. The intention is to make the code more efficient.
-*/
-
-QGArray::QGArray( int, int )
-{
-}
-
-/*!
- \internal
- Constructs an array with room for \e size bytes.
-*/
-
-QGArray::QGArray( int size )
-{
- if ( size < 0 ) {
-#if defined(CHECK_RANGE)
- qWarning( "QGArray: Cannot allocate array with negative length" );
-#endif
- size = 0;
- }
- shd = newData();
- CHECK_PTR( shd );
- if ( size == 0 ) // zero length
- return;
- shd->data = NEW(char,size);
- CHECK_PTR( shd->data );
- shd->len = size;
-}
-
-/*!
- \internal
- Constructs a shallow copy of \e a.
-*/
-
-QGArray::QGArray( const QGArray &a )
-{
- shd = a.shd;
- shd->ref();
-}
-
-/*!
- \internal
- Dereferences the array data and deletes it if this was the last
- reference.
-*/
-
-QGArray::~QGArray()
-{
- if ( shd && shd->deref() ) { // delete when last reference
- if ( shd->data ) // is lost
- DELETE(shd->data);
- deleteData( shd );
- }
-}
-
-
-/*!
- \fn QGArray &QGArray::operator=( const QGArray &a )
- \internal
- Assigns a shallow copy of \e a to this array and returns a reference to
- this array. Equivalent to assign().
-*/
-
-/*!
- \fn void QGArray::detach()
- \internal
- Detaches this array from shared array data.
-*/
-
-/*!
- \fn char *QGArray::data() const
- \internal
- Returns a pointer to the actual array data.
-*/
-
-/*!
- \fn uint QGArray::nrefs() const
- \internal
- Returns the reference count.
-*/
-
-/*!
- \fn uint QGArray::size() const
- \internal
- Returns the size of the array, in bytes.
-*/
-
-
-/*!
- \internal
- Returns TRUE if this array is equal to \e a, otherwise FALSE.
- The comparison is bitwise, of course.
-*/
-
-bool QGArray::isEqual( const QGArray &a ) const
-{
- if ( size() != a.size() ) // different size
- return FALSE;
- if ( data() == a.data() ) // has same data
- return TRUE;
- return (size() ? memcmp( data(), a.data(), size() ) : 0) == 0;
-}
-
-
-/*!
- \internal
- Resizes the array to \e newsize bytes.
-*/
-
-bool QGArray::resize( uint newsize )
-{
- if ( newsize == shd->len ) // nothing to do
- return TRUE;
- if ( newsize == 0 ) { // remove array
- duplicate( 0, 0 );
- return TRUE;
- }
- if ( shd->data ) { // existing data
-#if defined(DONT_USE_REALLOC)
- char *newdata = NEW(char,newsize); // manual realloc
- memcpy( newdata, shd->data, QMIN(shd->len,newsize) );
- DELETE(shd->data);
- shd->data = newdata;
-#else
- shd->data = (char *)realloc( shd->data, newsize );
-#endif
- } else {
- shd->data = NEW(char,newsize);
- }
- CHECK_PTR( shd->data );
- if ( !shd->data ) // no memory
- return FALSE;
- shd->len = newsize;
- return TRUE;
-}
-
-/*!
- \internal
- Fills the array with the repeated occurrences of \e d, which is
- \e sz bytes long.
- If \e len is specified as different from -1, then the array will be
- resized to \e len*sz before it is filled.
-
- Returns TRUE if successful, or FALSE if the memory cannot be allocated
- (only when \e len != -1).
-
- \sa resize()
-*/
-
-bool QGArray::fill( const char *d, int len, uint sz )
-{
- if ( len < 0 )
- len = shd->len/sz; // default: use array length
- else if ( !resize( len*sz ) )
- return FALSE;
- if ( sz == 1 ) // 8 bit elements
- memset( data(), *d, len );
- else if ( sz == 4 ) { // 32 bit elements
- Q_INT32 *x = (Q_INT32*)data();
- Q_INT32 v = *((Q_INT32*)d);
- while ( len-- )
- *x++ = v;
- } else if ( sz == 2 ) { // 16 bit elements
- Q_INT16 *x = (Q_INT16*)data();
- Q_INT16 v = *((Q_INT16*)d);
- while ( len-- )
- *x++ = v;
- } else { // any other size elements
- char *x = data();
- while ( len-- ) { // more complicated
- memcpy( x, d, sz );
- x += sz;
- }
- }
- return TRUE;
-}
-
-/*!
- \internal
- Shallow copy. Dereference the current array and references the data
- contained in \e a instead. Returns a reference to this array.
- \sa operator=()
-*/
-
-QGArray &QGArray::assign( const QGArray &a )
-{
- a.shd->ref(); // avoid 'a = a'
- if ( shd->deref() ) { // delete when last reference
- if ( shd->data ) // is lost
- DELETE(shd->data);
- deleteData( shd );
- }
- shd = a.shd;
- return *this;
-}
-
-/*!
- \internal
- Shallow copy. Dereference the current array and references the
- array data \e d, which contains \e len bytes.
- Returns a reference to this array.
-
- Do not delete \e d later, because QGArray takes care of that.
-*/
-
-QGArray &QGArray::assign( const char *d, uint len )
-{
- if ( shd->count > 1 ) { // disconnect this
- shd->count--;
- shd = newData();
- CHECK_PTR( shd );
- } else {
- if ( shd->data )
- DELETE(shd->data);
- }
- shd->data = (char *)d;
- shd->len = len;
- return *this;
-}
-
-/*!
- \internal
- Deep copy. Dereference the current array and obtains a copy of the data
- contained in \e a instead. Returns a reference to this array.
- \sa assign(), operator=()
-*/
-
-QGArray &QGArray::duplicate( const QGArray &a )
-{
- if ( a.shd == shd ) { // a.duplicate(a) !
- if ( shd->count > 1 ) {
- shd->count--;
- array_data *n = newData();
- CHECK_PTR( n );
- if ( (n->len=shd->len) ) {
- n->data = NEW(char,n->len);
- CHECK_PTR( n->data );
- if ( n->data )
- memcpy( n->data, shd->data, n->len );
- } else {
- n->data = 0;
- }
- shd = n;
- }
- return *this;
- }
- char *oldptr = 0;
- if ( shd->count > 1 ) { // disconnect this
- shd->count--;
- shd = newData();
- CHECK_PTR( shd );
- } else { // delete after copy was made
- oldptr = shd->data;
- }
- if ( a.shd->len ) { // duplicate data
- shd->data = NEW(char,a.shd->len);
- CHECK_PTR( shd->data );
- if ( shd->data )
- memcpy( shd->data, a.shd->data, a.shd->len );
- } else {
- shd->data = 0;
- }
- shd->len = a.shd->len;
- if ( oldptr )
- DELETE(oldptr);
- return *this;
-}
-
-/*!
- \internal
- Deep copy. Dereferences the current array and obtains a copy of the
- array data \e d instead. Returns a reference to this array.
- \sa assign(), operator=()
-*/
-
-QGArray &QGArray::duplicate( const char *d, uint len )
-{
- char *data;
- if ( d == 0 || len == 0 ) {
- data = 0;
- len = 0;
- } else {
- if ( shd->count == 1 && shd->len == len ) {
- memcpy( shd->data, d, len ); // use same buffer
- return *this;
- }
- data = NEW(char,len);
- CHECK_PTR( data );
- memcpy( data, d, len );
- }
- if ( shd->count > 1 ) { // detach
- shd->count--;
- shd = newData();
- CHECK_PTR( shd );
- } else { // just a single reference
- if ( shd->data )
- DELETE(shd->data);
- }
- shd->data = data;
- shd->len = len;
- return *this;
-}
-
-/*!
- \internal
- Resizes this array to \e len bytes and copies the \e len bytes at
- address \e into it.
-
- \warning This function disregards the reference count mechanism. If
- other QGArrays reference the same data as this, all will be updated.
-*/
-
-void QGArray::store( const char *d, uint len )
-{ // store, but not deref
- resize( len );
- memcpy( shd->data, d, len );
-}
-
-
-/*!
- \fn array_data *QGArray::sharedBlock() const
- \internal
- Returns a pointer to the shared array block.
-
- \warning
-
- Do not use this function. Using it is begging for trouble. We dare
- not remove it, for fear of breaking code, but we \e strongly
- discourage new use of it.
-*/
-
-/*!
- \fn void QGArray::setSharedBlock( array_data *p )
- \internal
- Sets the shared array block to \e p.
-
- \warning
-
- Do not use this function. Using it is begging for trouble. We dare
- not remove it, for fear of breaking code, but we \e strongly
- discourage new use of it.
-*/
-
-
-/*!
- \internal
- Sets raw data and returns a reference to the array.
-
- Dereferences the current array and sets the new array data to \e d and
- the new array size to \e len. Do not attempt to resize or re-assign the
- array data when raw data has been set.
- Call resetRawData(d,len) to reset the array.
-
- Setting raw data is useful because it set QArray data without allocating
- memory or copying data.
-
- Example of intended use:
- \code
- static uchar bindata[] = { 231, 1, 44, ... };
- QByteArray a;
- a.setRawData( bindata, sizeof(bindata) ); // a points to bindata
- QDataStream s( a, IO_ReadOnly ); // open on a's data
- s >> <something>; // read raw bindata
- s.close();
- a.resetRawData( bindata, sizeof(bindata) ); // finished
- \endcode
-
- Example of misuse (do not do this):
- \code
- static uchar bindata[] = { 231, 1, 44, ... };
- QByteArray a, b;
- a.setRawData( bindata, sizeof(bindata) ); // a points to bindata
- a.resize( 8 ); // will crash
- b = a; // will crash
- a[2] = 123; // might crash
- // forget to resetRawData - will crash
- \endcode
-
- \warning If you do not call resetRawData(), QGArray will attempt to
- deallocate or reallocate the raw data, which might not be too good.
- Be careful.
-*/
-
-QGArray &QGArray::setRawData( const char *d, uint len )
-{
- duplicate( 0, 0 ); // set null data
- shd->data = (char *)d;
- shd->len = len;
- return *this;
-}
-
-/*!
- \internal
- Resets raw data.
-
- The arguments must be the data and length that were passed to
- setRawData(). This is for consistency checking.
-*/
-
-void QGArray::resetRawData( const char *d, uint len )
-{
- if ( d != shd->data || len != shd->len ) {
-#if defined(CHECK_STATE)
- qWarning( "QGArray::resetRawData: Inconsistent arguments" );
-#endif
- return;
- }
- shd->data = 0;
- shd->len = 0;
-}
-
-
-/*!
- \internal
- Finds the first occurrence of \e d in the array from position \e index,
- where \e sz is the size of the \e d element.
-
- Note that \e index is given in units of \e sz, not bytes.
-
- This function only compares whole cells, not bytes.
-*/
-
-int QGArray::find( const char *d, uint index, uint sz ) const
-{
- index *= sz;
- if ( index >= shd->len ) {
-#if defined(CHECK_RANGE)
- qWarning( "QGArray::find: Index %d out of range", index/sz );
-#endif
- return -1;
- }
- uint i;
- uint ii;
- switch ( sz ) {
- case 1: { // 8 bit elements
- char *x = data() + index;
- char v = *d;
- for ( i=index; i<shd->len; i++ ) {
- if ( *x++ == v )
- break;
- }
- ii = i;
- }
- break;
- case 2: { // 16 bit elements
- Q_INT16 *x = (Q_INT16*)(data() + index);
- Q_INT16 v = *((Q_INT16*)d);
- for ( i=index; i<shd->len; i+=2 ) {
- if ( *x++ == v )
- break;
- }
- ii = i/2;
- }
- break;
- case 4: { // 32 bit elements
- Q_INT32 *x = (Q_INT32*)(data() + index);
- Q_INT32 v = *((Q_INT32*)d);
- for ( i=index; i<shd->len; i+=4 ) {
- if ( *x++ == v )
- break;
- }
- ii = i/4;
- }
- break;
- default: { // any size elements
- for ( i=index; i<shd->len; i+=sz ) {
- if ( memcmp( d, &shd->data[i], sz ) == 0 )
- break;
- }
- ii = i/sz;
- }
- break;
- }
- return i<shd->len ? (int)ii : -1;
-}
-
-/*!
- \internal
- Returns the number of occurrences of \e d in the array, where \e sz is
- the size of the \e d element.
-
- This function only compares whole cells, not bytes.
-*/
-
-int QGArray::contains( const char *d, uint sz ) const
-{
- uint i = shd->len;
- int count = 0;
- switch ( sz ) {
- case 1: { // 8 bit elements
- char *x = data();
- char v = *d;
- while ( i-- ) {
- if ( *x++ == v )
- count++;
- }
- }
- break;
- case 2: { // 16 bit elements
- Q_INT16 *x = (Q_INT16*)data();
- Q_INT16 v = *((Q_INT16*)d);
- i /= 2;
- while ( i-- ) {
- if ( *x++ == v )
- count++;
- }
- }
- break;
- case 4: { // 32 bit elements
- Q_INT32 *x = (Q_INT32*)data();
- Q_INT32 v = *((Q_INT32*)d);
- i /= 4;
- while ( i-- ) {
- if ( *x++ == v )
- count++;
- }
- }
- break;
- default: { // any size elements
- for ( i=0; i<shd->len; i+=sz ) {
- if ( memcmp(d, &shd->data[i], sz) == 0 )
- count++;
- }
- }
- break;
- }
- return count;
-}
-
-static int cmp_item_size = 0;
-
-#if defined(Q_C_CALLBACKS)
-extern "C" {
-#endif
-
-static int cmp_arr( const void *n1, const void *n2 )
-{
- return ( n1 && n2 ) ? memcmp( n1, n2, cmp_item_size )
- : (int)((intptr_t)n1 - (intptr_t)n2);
- // Qt 3.0: Add a virtual compareItems() method and call that instead
-}
-
-#if defined(Q_C_CALLBACKS)
-}
-#endif
-
-/*!
- \internal
-
- Sort the array.
-*/
-
-void QGArray::sort( uint sz )
-{
- int numItems = size() / sz;
- if ( numItems < 2 )
- return;
- cmp_item_size = sz;
- qsort( shd->data, numItems, sz, cmp_arr );
-}
-
-/*!
- \internal
-
- Binary search; assumes sorted array
-*/
-
-int QGArray::bsearch( const char *d, uint sz ) const
-{
- int numItems = size() / sz;
- if ( !numItems )
- return -1;
- cmp_item_size = sz;
- char* r = (char*)::bsearch( d, shd->data, numItems, sz, cmp_arr );
- if ( !r )
- return -1;
- while( (r >= shd->data + sz) && (cmp_arr( r - sz, d ) == 0) )
- r -= sz; // search to first of equal elements; bsearch is undef
- return (int)(( r - shd->data ) / sz);
-}
-
-
-/*!
- \fn char *QGArray::at( uint index ) const
- \internal
- Returns a pointer to the byte at offset \e index in the array.
-*/
-
-/*!
- \internal
- Expand the array if necessary, and copies (the first part of) its
- contents from the \e index*zx bytes at \e d.
-
- Returns TRUE if the operation succeeds, FALSE if it runs out of
- memory.
-
- \warning This function disregards the reference count mechanism. If
- other QGArrays reference the same data as this, all will be changed.
-*/
-
-bool QGArray::setExpand( uint index, const char *d, uint sz )
-{
- index *= sz;
- if ( index >= shd->len ) {
- if ( !resize( index+sz ) ) // no memory
- return FALSE;
- }
- memcpy( data() + index, d, sz );
- return TRUE;
-}
-
-
-/*!
- \internal
- Prints a warning message if at() or [] is given a bad index.
-*/
-
-void QGArray::msg_index( uint index )
-{
-#if defined(CHECK_RANGE)
- qWarning( "QGArray::at: Absolute index %d out of range", index );
-#else
- Q_UNUSED( index )
-#endif
-}
-
-
-/*!
- \internal
- Returns a new shared array block.
-*/
-
-QGArray::array_data * QGArray::newData()
-{
- return new array_data;
-}
-
-
-/*!
- \internal
- Deletes the shared array block.
-*/
-
-void QGArray::deleteData( array_data *p )
-{
- delete p;
- p = 0;
-}
diff --git a/qtools/qgarray.h b/qtools/qgarray.h
deleted file mode 100644
index 12c463b..0000000
--- a/qtools/qgarray.h
+++ /dev/null
@@ -1,120 +0,0 @@
-/****************************************************************************
-**
-**
-** Definition of QGArray class
-**
-** Created : 930906
-**
-** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
-**
-** This file is part of the tools module of the Qt GUI Toolkit.
-**
-** This file may be distributed under the terms of the Q Public License
-** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#ifndef QGARRAY_H
-#define QGARRAY_H
-
-#ifndef QT_H
-#include "qshared.h"
-#endif // QT_H
-
-
-class Q_EXPORT QGArray // generic array
-{
-friend class QBuffer;
-public:
- //### DO NOT USE THIS. IT IS PUBLIC BUT DO NOT USE IT IN NEW CODE.
- struct array_data : public QShared { // shared array
- array_data() { data=0; len=0; }
- char *data; // actual array data
- uint len;
- };
- QGArray();
-protected:
- QGArray( int, int ); // dummy; does not alloc
- QGArray( int size ); // allocate 'size' bytes
- QGArray( const QGArray &a ); // shallow copy
- virtual ~QGArray();
-
- QGArray &operator=( const QGArray &a ) { return assign( a ); }
-
- virtual void detach() { duplicate(*this); }
-
- char *data() const { return shd->data; }
- uint nrefs() const { return shd->count; }
- uint size() const { return shd->len; }
- bool isEqual( const QGArray &a ) const;
-
- bool resize( uint newsize );
-
- bool fill( const char *d, int len, uint sz );
-
- QGArray &assign( const QGArray &a );
- QGArray &assign( const char *d, uint len );
- QGArray &duplicate( const QGArray &a );
- QGArray &duplicate( const char *d, uint len );
- void store( const char *d, uint len );
-
- array_data *sharedBlock() const { return shd; }
- void setSharedBlock( array_data *p ) { shd=(array_data*)p; }
-
- QGArray &setRawData( const char *d, uint len );
- void resetRawData( const char *d, uint len );
-
- int find( const char *d, uint index, uint sz ) const;
- int contains( const char *d, uint sz ) const;
-
- void sort( uint sz );
- int bsearch( const char *d, uint sz ) const;
-
- char *at( uint index ) const;
-
- bool setExpand( uint index, const char *d, uint sz );
-
-protected:
- virtual array_data *newData();
- virtual void deleteData( array_data *p );
-
-private:
- static void msg_index( uint );
- array_data *shd;
-};
-
-
-inline char *QGArray::at( uint index ) const
-{
-#if defined(CHECK_RANGE)
- if ( index >= size() ) {
- msg_index( index );
- index = 0;
- }
-#endif
- return &shd->data[index];
-}
-
-
-#endif // QGARRAY_H
diff --git a/qtools/qgdict.cpp b/qtools/qgdict.cpp
deleted file mode 100644
index a3db8de..0000000
--- a/qtools/qgdict.cpp
+++ /dev/null
@@ -1,1217 +0,0 @@
-/****************************************************************************
-**
-**
-** Implementation of QGDict and QGDictIterator classes
-**
-** Created : 920529
-**
-** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
-**
-** This file is part of the tools module of the Qt GUI Toolkit.
-**
-** This file may be distributed under the terms of the Q Public License
-** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#include "qgdict.h"
-#include "qinternallist.h"
-#include "qstring.h"
-#include "qdatastream.h"
-#include <ctype.h>
-
-// NOT REVISED
-/*!
- \class QGDict qgdict.h
- \brief The QGDict class is an internal class for implementing QDict template classes.
-
- QGDict is a strictly internal class that acts as a base class for the
- \link collection.html collection classes\endlink QDict and QIntDict.
-
- QGDict has some virtual functions that can be reimplemented to customize
- the subclasses.
- <ul>
- <li> read() reads a collection/dictionary item from a QDataStream.
- <li> write() writes a collection/dictionary item to a QDataStream.
- </ul>
- Normally, you do not have to reimplement any of these functions.
-*/
-
-static const int op_find = 0;
-static const int op_insert = 1;
-static const int op_replace = 2;
-
-
-class QGDItList : public QInternalList<QGDictIterator>
-{
-public:
- QGDItList() : QInternalList<QGDictIterator>() {}
- QGDItList( const QGDItList &list ) : QInternalList<QGDictIterator>(list) {}
- ~QGDItList() { clear(); }
- QGDItList &operator=(const QGDItList &list)
- { return (QGDItList&)QInternalList<QGDictIterator>::operator=(list); }
-};
-
-
-/*****************************************************************************
- Default implementation of special and virtual functions
- *****************************************************************************/
-
-/*!
- \internal
- Returns the hash key for \e key, when key is a string.
-*/
-
-int QGDict::hashKeyString( const QCString &key )
-{
- return hashKeyAscii(key.data());
-}
-
-/*!
- \internal
- Returns the hash key for \a key, which is a C string.
-*/
-
-int QGDict::hashKeyAscii( const char *key )
-{
-#if defined(CHECK_NULL)
- if ( key == 0 )
- {
- qWarning( "QGDict::hashAsciiKey: Invalid null key" );
- return 0;
- }
-#endif
- const char *k = key;
- uint h=0;
- uint g;
- if ( cases ) { // case sensitive
- while ( *k ) {
- h = (h<<4) + *k++;
- if ( (g = h & 0xf0000000) )
- h ^= g >> 24;
- h &= ~g;
- }
- } else { // case insensitive
- while ( *k ) {
- h = (h<<4) + tolower(*k);
- if ( (g = h & 0xf0000000) )
- h ^= g >> 24;
- h &= ~g;
- k++;
- }
- }
- int index = h;
- if ( index < 0 ) // adjust index to table size
- index = -index;
- return index;
-}
-
-#if 0
-int QGDict::hashKeyAscii( const char *key )
-{
-#if defined(CHECK_NULL)
- if ( key == 0 )
- {
- qWarning( "QGDict::hashAsciiKey: Invalid null key" );
- return 0;
- }
-#endif
- unsigned int hash = 5381;
- int c;
- // use djb2 by Dan Bernstein
- if (cases)
- {
- while ((c=*key++)) hash = ((hash<<5)+hash)+c;
- }
- else
- {
- while ((c=*key++)) hash = ((hash<<5)+hash)+tolower(c);
- }
- int index = hash;
- return index<0 ? -index : index;
-}
-#endif
-
-#ifndef QT_NO_DATASTREAM
-
-/*!
- Reads a collection/dictionary item from the stream \e s and returns a
- reference to the stream.
-
- The default implementation sets \e item to 0.
-
- \sa write()
-*/
-
-QDataStream& QGDict::read( QDataStream &s, QCollection::Item &item )
-{
- item = 0;
- return s;
-}
-
-/*!
- Writes a collection/dictionary item to the stream \e s and returns a
- reference to the stream.
-
- \sa read()
-*/
-
-QDataStream& QGDict::write( QDataStream &s, QCollection::Item ) const
-{
- return s;
-}
-#endif //QT_NO_DATASTREAM
-
-/*****************************************************************************
- QGDict member functions
- *****************************************************************************/
-
-/*!
- \internal
- Constructs a dictionary.
-*/
-
-QGDict::QGDict( uint len, KeyType kt, bool caseSensitive, bool copyKeys )
-{
- init( len, kt, caseSensitive, copyKeys );
-}
-
-
-void QGDict::init( uint len, KeyType kt, bool caseSensitive, bool copyKeys )
-{
- vec = new QBaseBucket *[vlen = len]; // allocate hash table
- CHECK_PTR( vec );
- memset( (char*)vec, 0, vlen*sizeof(QBaseBucket*) );
- numItems = 0;
- iterators = 0;
- // The caseSensitive and copyKey options don't make sense for
- // all dict types.
- switch ( (keytype = (uint)kt) ) {
- case StringKey:
- cases = caseSensitive;
- copyk = FALSE;
- break;
- case AsciiKey:
- cases = caseSensitive;
- copyk = copyKeys;
- break;
- default:
- cases = FALSE;
- copyk = FALSE;
- break;
- }
-}
-
-
-/*!
- \internal
- Constructs a copy of \e dict.
-*/
-
-QGDict::QGDict( const QGDict & dict )
- : QCollection( dict )
-{
- init( dict.vlen, (KeyType)dict.keytype, dict.cases, dict.copyk );
- QGDictIterator it( dict );
- while ( it.get() ) { // copy from other dict
- switch ( keytype ) {
- case StringKey:
- look_string( it.getKeyString(), it.get(), op_insert );
- break;
- case AsciiKey:
- look_ascii( it.getKeyAscii(), it.get(), op_insert );
- break;
- case IntKey:
- look_int( it.getKeyInt(), it.get(), op_insert );
- break;
- case PtrKey:
- look_ptr( it.getKeyPtr(), it.get(), op_insert );
- break;
- }
- ++it;
- }
-}
-
-
-/*!
- \internal
- Removes all items from the dictionary and destroys it.
-*/
-
-QGDict::~QGDict()
-{
- clear(); // delete everything
- delete [] vec;
- if ( !iterators ) // no iterators for this dict
- return;
- QGDictIterator *i = iterators->first();
- while ( i ) { // notify all iterators that
- i->dict = 0; // this dict is deleted
- i = iterators->next();
- }
- delete iterators;
-}
-
-
-/*!
- \internal
- Assigns \e dict to this dictionary.
-*/
-
-QGDict &QGDict::operator=( const QGDict &dict )
-{
- clear();
- QGDictIterator it( dict );
- while ( it.get() ) { // copy from other dict
- switch ( keytype ) {
- case StringKey:
- look_string( it.getKeyString(), it.get(), op_insert );
- break;
- case AsciiKey:
- look_ascii( it.getKeyAscii(), it.get(), op_insert );
- break;
- case IntKey:
- look_int( it.getKeyInt(), it.get(), op_insert );
- break;
- case PtrKey:
- look_ptr( it.getKeyPtr(), it.get(), op_insert );
- break;
- }
- ++it;
- }
- return *this;
-}
-
-
-/*! \fn QCollection::Item QGDictIterator::get() const
-
- \internal
-*/
-
-
-/*! \fn QCString QGDictIterator::getKeyString() const
-
- \internal
-*/
-
-
-/*! \fn const char * QGDictIterator::getKeyAscii() const
-
- \internal
-*/
-
-
-/*! \fn void * QGDictIterator::getKeyPtr() const
-
- \internal
-*/
-
-
-/*! \fn long QGDictIterator::getKeyInt() const
-
- \internal
-*/
-
-
-/*!
- \fn uint QGDict::count() const
- \internal
- Returns the number of items in the dictionary.
-*/
-
-/*!
- \fn uint QGDict::size() const
- \internal
- Returns the size of the hash array.
-*/
-
-
-/*!
- \internal
- The do-it-all function; op is one of op_find, op_insert, op_replace
-*/
-
-QCollection::Item QGDict::look_string( const QCString &key, QCollection::Item d, int op )
-{
- QCStringBucket *n;
- int index = hashKeyString(key) % vlen;
- if ( op == op_find ) { // find
- if ( cases ) {
- for ( n=(QCStringBucket*)vec[index]; n;
- n=(QCStringBucket*)n->getNext() ) {
- if ( key == n->getKey() )
- return n->getData(); // item found
- }
- } else {
- QCString k = key.lower();
- for ( n=(QCStringBucket*)vec[index]; n;
- n=(QCStringBucket*)n->getNext() ) {
- if ( k == n->getKey().lower() )
- return n->getData(); // item found
- }
- }
- return 0; // not found
- }
- if ( op == op_replace ) { // replace
- if ( vec[index] != 0 ) // maybe something there
- remove_string( key );
- }
- // op_insert or op_replace
- n = new QCStringBucket(key,newItem(d),vec[index]);
- CHECK_PTR( n );
-#if defined(CHECK_NULL)
- if ( n->getData() == 0 )
- qWarning( "QDict: Cannot insert null item" );
-#endif
- vec[index] = n;
- numItems++;
- return n->getData();
-}
-
-
-/*! \internal */
-
-QCollection::Item QGDict::look_ascii( const char *key, QCollection::Item d, int op )
-{
- QAsciiBucket *n;
- int index = hashKeyAscii(key) % vlen;
- if ( op == op_find ) { // find
- if ( cases ) {
- for ( n=(QAsciiBucket*)vec[index]; n;
- n=(QAsciiBucket*)n->getNext() ) {
- if ( qstrcmp(n->getKey(),key) == 0 )
- return n->getData(); // item found
- }
- } else {
- for ( n=(QAsciiBucket*)vec[index]; n;
- n=(QAsciiBucket*)n->getNext() ) {
- if ( qstricmp(n->getKey(),key) == 0 )
- return n->getData(); // item found
- }
- }
- return 0; // not found
- }
- if ( op == op_replace ) { // replace
- if ( vec[index] != 0 ) // maybe something there
- remove_ascii( key );
- }
- // op_insert or op_replace
- n = new QAsciiBucket(copyk ? qstrdup(key) : key,newItem(d),vec[index]);
- CHECK_PTR( n );
-#if defined(CHECK_NULL)
- if ( n->getData() == 0 )
- qWarning( "QAsciiDict: Cannot insert null item" );
-#endif
- vec[index] = n;
- numItems++;
- return n->getData();
-}
-
-
-/*! \internal */
-
-QCollection::Item QGDict::look_int( long key, QCollection::Item d, int op )
-{
- QIntBucket *n;
- int index = (int)((ulong)key % vlen); // simple hash
- if ( op == op_find ) { // find
- for ( n=(QIntBucket*)vec[index]; n;
- n=(QIntBucket*)n->getNext() ) {
- if ( n->getKey() == key )
- return n->getData(); // item found
- }
- return 0; // not found
- }
- if ( op == op_replace ) { // replace
- if ( vec[index] != 0 ) // maybe something there
- remove_int( key );
- }
- // op_insert or op_replace
- n = new QIntBucket(key,newItem(d),vec[index]);
- CHECK_PTR( n );
-#if defined(CHECK_NULL)
- if ( n->getData() == 0 )
- qWarning( "QIntDict: Cannot insert null item" );
-#endif
- vec[index] = n;
- numItems++;
- return n->getData();
-}
-
-
-/*! \internal */
-
-QCollection::Item QGDict::look_ptr( void *key, QCollection::Item d, int op )
-{
- QPtrBucket *n;
- int index = (int)((uintptr_t)key % vlen); // simple hash
- if ( op == op_find ) { // find
- for ( n=(QPtrBucket*)vec[index]; n;
- n=(QPtrBucket*)n->getNext() ) {
- if ( n->getKey() == key )
- return n->getData(); // item found
- }
- return 0; // not found
- }
- if ( op == op_replace ) { // replace
- if ( vec[index] != 0 ) // maybe something there
- remove_ptr( key );
- }
- // op_insert or op_replace
- n = new QPtrBucket(key,newItem(d),vec[index]);
- CHECK_PTR( n );
-#if defined(CHECK_NULL)
- if ( n->getData() == 0 )
- qWarning( "QPtrDict: Cannot insert null item" );
-#endif
- vec[index] = n;
- numItems++;
- return n->getData();
-}
-
-
-/*!
- \internal
- Changes the size of the hashtable.
- The contents of the dictionary are preserved,
- but all iterators on the dictionary become invalid.
-*/
-void QGDict::resize( uint newsize )
-{
- // Save old information
- QBaseBucket **old_vec = vec;
- uint old_vlen = vlen;
- bool old_copyk = copyk;
-
- vec = new QBaseBucket *[vlen = newsize];
- CHECK_PTR( vec );
- memset( (char*)vec, 0, vlen*sizeof(QBaseBucket*) );
- numItems = 0;
- copyk = FALSE;
-
- // Reinsert every item from vec, deleting vec as we go
- for ( uint index = 0; index < old_vlen; index++ ) {
- switch ( keytype ) {
- case StringKey:
- {
- QCStringBucket *n=(QCStringBucket *)old_vec[index];
- while ( n ) {
- look_string( n->getKey(), n->getData(), op_insert );
- QCStringBucket *t=(QCStringBucket *)n->getNext();
- delete n;
- n = t;
- }
- }
- break;
- case AsciiKey:
- {
- QAsciiBucket *n=(QAsciiBucket *)old_vec[index];
- while ( n ) {
- look_ascii( n->getKey(), n->getData(), op_insert );
- QAsciiBucket *t=(QAsciiBucket *)n->getNext();
- delete n;
- n = t;
- }
- }
- break;
- case IntKey:
- {
- QIntBucket *n=(QIntBucket *)old_vec[index];
- while ( n ) {
- look_int( n->getKey(), n->getData(), op_insert );
- QIntBucket *t=(QIntBucket *)n->getNext();
- delete n;
- n = t;
- }
- }
- break;
- case PtrKey:
- {
- QPtrBucket *n=(QPtrBucket *)old_vec[index];
- while ( n ) {
- look_ptr( n->getKey(), n->getData(), op_insert );
- QPtrBucket *t=(QPtrBucket *)n->getNext();
- delete n;
- n = t;
- }
- }
- break;
- }
- }
- delete [] old_vec;
-
- // Restore state
- copyk = old_copyk;
-
- // Invalidate all iterators, since order is lost
- if ( iterators && iterators->count() ) {
- QGDictIterator *i = iterators->first();
- while ( i ) {
- i->toFirst();
- i = iterators->next();
- }
- }
-}
-
-/*!
- \internal
- Unlinks the bucket with the specified key (and specified data pointer,
- if it is set).
-*/
-
-void QGDict::unlink_common( int index, QBaseBucket *node, QBaseBucket *prev )
-{
- if ( iterators && iterators->count() ) { // update iterators
- QGDictIterator *i = iterators->first();
- while ( i ) { // invalidate all iterators
- if ( i->curNode == node ) // referring to pending node
- i->operator++();
- i = iterators->next();
- }
- }
- if ( prev ) // unlink node
- prev->setNext( node->getNext() );
- else
- vec[index] = node->getNext();
- numItems--;
-}
-
-QCStringBucket *QGDict::unlink_string( const QCString &key, QCollection::Item d )
-{
- if ( numItems == 0 ) // nothing in dictionary
- return 0;
- QCStringBucket *n;
- QCStringBucket *prev = 0;
- int index = hashKeyString(key) % vlen;
- if ( cases ) {
- for ( n=(QCStringBucket*)vec[index]; n;
- n=(QCStringBucket*)n->getNext() ) {
- bool found = (key == n->getKey());
- if ( found && d )
- found = (n->getData() == d);
- if ( found ) {
- unlink_common(index,n,prev);
- return n;
- }
- prev = n;
- }
- } else {
- QCString k = key.lower();
- for ( n=(QCStringBucket*)vec[index]; n;
- n=(QCStringBucket*)n->getNext() ) {
- bool found = (k == n->getKey().lower());
- if ( found && d )
- found = (n->getData() == d);
- if ( found ) {
- unlink_common(index,n,prev);
- return n;
- }
- prev = n;
- }
- }
- return 0;
-}
-
-QAsciiBucket *QGDict::unlink_ascii( const char *key, QCollection::Item d )
-{
- if ( numItems == 0 ) // nothing in dictionary
- return 0;
- QAsciiBucket *n;
- QAsciiBucket *prev = 0;
- int index = hashKeyAscii(key) % vlen;
- for ( n=(QAsciiBucket *)vec[index]; n; n=(QAsciiBucket *)n->getNext() ) {
- bool found = (cases ? qstrcmp(n->getKey(),key)
- : qstricmp(n->getKey(),key)) == 0;
- if ( found && d )
- found = (n->getData() == d);
- if ( found ) {
- unlink_common(index,n,prev);
- return n;
- }
- prev = n;
- }
- return 0;
-}
-
-QIntBucket *QGDict::unlink_int( long key, QCollection::Item d )
-{
- if ( numItems == 0 ) // nothing in dictionary
- return 0;
- QIntBucket *n;
- QIntBucket *prev = 0;
- int index = (int)((ulong)key % vlen);
- for ( n=(QIntBucket *)vec[index]; n; n=(QIntBucket *)n->getNext() ) {
- bool found = (n->getKey() == key);
- if ( found && d )
- found = (n->getData() == d);
- if ( found ) {
- unlink_common(index,n,prev);
- return n;
- }
- prev = n;
- }
- return 0;
-}
-
-QPtrBucket *QGDict::unlink_ptr( void *key, QCollection::Item d )
-{
- if ( numItems == 0 ) // nothing in dictionary
- return 0;
- QPtrBucket *n;
- QPtrBucket *prev = 0;
- int index = (int)((uintptr_t)key % vlen);
- for ( n=(QPtrBucket *)vec[index]; n; n=(QPtrBucket *)n->getNext() ) {
- bool found = (n->getKey() == key);
- if ( found && d )
- found = (n->getData() == d);
- if ( found ) {
- unlink_common(index,n,prev);
- return n;
- }
- prev = n;
- }
- return 0;
-}
-
-
-/*!
- \internal
- Removes the item with the specified key. If item is non-null,
- the remove will match the \a item as well (used to remove an
- item when several items have the same key).
-*/
-
-bool QGDict::remove_string( const QCString &key, QCollection::Item item )
-{
- QCStringBucket *n = unlink_string( key, item );
- if ( n ) {
- deleteItem( n->getData() );
- delete n;
- return TRUE;
- } else {
- return FALSE;
- }
-}
-
-
-/*! \internal */
-
-bool QGDict::remove_ascii( const char *key, QCollection::Item item )
-{
- QAsciiBucket *n = unlink_ascii( key, item );
- if ( n ) {
- if ( copyk )
- delete [] (char *)n->getKey();
- deleteItem( n->getData() );
- delete n;
- }
- return n != 0;
-}
-
-
-/*! \internal */
-
-bool QGDict::remove_int( long key, QCollection::Item item )
-{
- QIntBucket *n = unlink_int( key, item );
- if ( n ) {
- deleteItem( n->getData() );
- delete n;
- }
- return n != 0;
-}
-
-
-/*! \internal */
-
-bool QGDict::remove_ptr( void *key, QCollection::Item item )
-{
- QPtrBucket *n = unlink_ptr( key, item );
- if ( n ) {
- deleteItem( n->getData() );
- delete n;
- }
- return n != 0;
-}
-
-
-/*! \internal */
-
-QCollection::Item QGDict::take_string( const QCString &key )
-{
- QCStringBucket *n = unlink_string( key );
- Item d;
- if ( n ) {
- d = n->getData();
- delete n;
- } else {
- d = 0;
- }
- return d;
-}
-
-
-/*! \internal */
-
-QCollection::Item QGDict::take_ascii( const char *key )
-{
- QAsciiBucket *n = unlink_ascii( key );
- Item d;
- if ( n ) {
- if ( copyk )
- delete [] (char *)n->getKey();
- d = n->getData();
- delete n;
- } else {
- d = 0;
- }
- return d;
-}
-
-
-/*! \internal */
-
-QCollection::Item QGDict::take_int( long key )
-{
- QIntBucket *n = unlink_int( key );
- Item d;
- if ( n ) {
- d = n->getData();
- delete n;
- } else {
- d = 0;
- }
- return d;
-}
-
-
-/*! \internal */
-
-QCollection::Item QGDict::take_ptr( void *key )
-{
- QPtrBucket *n = unlink_ptr( key );
- Item d;
- if ( n ) {
- d = n->getData();
- delete n;
- } else {
- d = 0;
- }
- return d;
-}
-
-
-/*!
- \internal
- Removes all items from the dictionary.
-*/
-
-void QGDict::clear()
-{
- if ( !numItems )
- return;
- numItems = 0; // disable remove() function
- for ( uint j=0; j<vlen; j++ ) { // destroy hash table
- if ( vec[j] ) {
- switch ( keytype ) {
- case StringKey:
- {
- QCStringBucket *n=(QCStringBucket *)vec[j];
- while ( n ) {
- QCStringBucket *next = (QCStringBucket*)n->getNext();
- deleteItem( n->getData() );
- delete n;
- n = next;
- }
- }
- break;
- case AsciiKey:
- {
- QAsciiBucket *n=(QAsciiBucket *)vec[j];
- while ( n ) {
- QAsciiBucket *next = (QAsciiBucket*)n->getNext();
- if ( copyk )
- delete [] (char *)n->getKey();
- deleteItem( n->getData() );
- delete n;
- n = next;
- }
- }
- break;
- case IntKey:
- {
- QIntBucket *n=(QIntBucket *)vec[j];
- while ( n ) {
- QIntBucket *next = (QIntBucket*)n->getNext();
- deleteItem( n->getData() );
- delete n;
- n = next;
- }
- }
- break;
- case PtrKey:
- {
- QPtrBucket *n=(QPtrBucket *)vec[j];
- while ( n ) {
- QPtrBucket *next = (QPtrBucket*)n->getNext();
- deleteItem( n->getData() );
- delete n;
- n = next;
- }
- }
- break;
- }
- vec[j] = 0; // detach list of buckets
- }
- }
- if ( iterators && iterators->count() ) { // invalidate all iterators
- QGDictIterator *i = iterators->first();
- while ( i ) {
- i->curNode = 0;
- i = iterators->next();
- }
- }
-}
-
-
-/*!
- \internal
- Outputs debug statistics.
-*/
-
-void QGDict::statistics() const
-{
-#if defined(DEBUG)
- QCString line;
- line.fill( '-', 60 );
- double real, ideal;
- qDebug( "%s",line.data() );
- qDebug( "DICTIONARY STATISTICS:" );
- if ( count() == 0 ) {
- qDebug( "Empty!" );
- qDebug( "%s", line.data() );
- return;
- }
- real = 0.0;
- ideal = (float)count()/(2.0*size())*(count()+2.0*size()-1);
- uint i = 0;
- while ( i<size() ) {
- QBaseBucket *n = vec[i];
- int b = 0;
- while ( n ) { // count number of buckets
- b++;
- n = n->getNext();
- }
- real = real + (double)b * ((double)b+1.0)/2.0;
- char buf[80], *pbuf;
- if ( b > 78 )
- b = 78;
- pbuf = buf;
- while ( b-- )
- *pbuf++ = '*';
- *pbuf = '\0';
- qDebug( "%s", buf );
- i++;
- }
- qDebug( "Array size = %d", size() );
- qDebug( "# items = %d", count() );
- qDebug( "Real dist = %g", real );
- qDebug( "Rand dist = %g", ideal );
- qDebug( "Real/Rand = %g", real/ideal );
- qDebug( "%s",line.data() );
-#endif // DEBUG
-}
-
-
-/*****************************************************************************
- QGDict stream functions
- *****************************************************************************/
-#ifndef QT_NO_DATASTREAM
-QDataStream &operator>>( QDataStream &s, QGDict &dict )
-{
- return dict.read( s );
-}
-
-QDataStream &operator<<( QDataStream &s, const QGDict &dict )
-{
- return dict.write( s );
-}
-
-#if defined(_CC_DEC_) && defined(__alpha) && (__DECCXX_VER >= 50190001)
-#pragma message disable narrowptr
-#endif
-
-/*!
- \internal
- Reads a dictionary from the stream \e s.
-*/
-
-QDataStream &QGDict::read( QDataStream &s )
-{
- uint num;
- s >> num; // read number of items
- clear(); // clear dict
- while ( num-- ) { // read all items
- Item d;
- switch ( keytype ) {
- case StringKey:
- {
- QCString k;
- s >> k;
- read( s, d );
- look_string( k, d, op_insert );
- }
- break;
- case AsciiKey:
- {
- char *k;
- s >> k;
- read( s, d );
- look_ascii( k, d, op_insert );
- if ( copyk )
- delete [] k;
- }
- break;
- case IntKey:
- {
- Q_UINT32 k;
- s >> k;
- read( s, d );
- look_int( k, d, op_insert );
- }
- break;
- case PtrKey:
- {
- Q_UINT32 k;
- s >> k;
- read( s, d );
- // ### cannot insert 0 - this renders the thing
- // useless since all pointers are written as 0,
- // but hey, serializing pointers? can it be done
- // at all, ever?
- if ( k )
- look_ptr( (void *)(uintptr_t)k, d, op_insert );
- }
- break;
- }
- }
- return s;
-}
-
-/*!
- \internal
- Writes the dictionary to the stream \e s.
-*/
-
-QDataStream& QGDict::write( QDataStream &s ) const
-{
- s << count(); // write number of items
- uint i = 0;
- while ( i<size() ) {
- QBaseBucket *n = vec[i];
- while ( n ) { // write all buckets
- switch ( keytype ) {
- case StringKey:
- s << ((QCStringBucket*)n)->getKey();
- break;
- case AsciiKey:
- s << ((QAsciiBucket*)n)->getKey();
- break;
- case IntKey:
- s << (Q_UINT32)((QIntBucket*)n)->getKey();
- break;
- case PtrKey:
- s << (Q_UINT32)0; // ### cannot serialize a pointer
- break;
- }
- write( s, n->getData() ); // write data
- n = n->getNext();
- }
- i++;
- }
- return s;
-}
-#endif //QT_NO_DATASTREAM
-
-/*****************************************************************************
- QGDictIterator member functions
- *****************************************************************************/
-
-/*!
- \class QGDictIterator qgdict.h
- \brief An internal class for implementing QDictIterator and QIntDictIterator.
-
- QGDictIterator is a strictly internal class that does the heavy work for
- QDictIterator and QIntDictIterator.
-*/
-
-/*!
- \internal
- Constructs an iterator that operates on the dictionary \e d.
-*/
-
-QGDictIterator::QGDictIterator( const QGDict &d )
-{
- dict = (QGDict *)&d; // get reference to dict
- toFirst(); // set to first node
- if ( !dict->iterators ) {
- dict->iterators = new QGDItList; // create iterator list
- CHECK_PTR( dict->iterators );
- }
- dict->iterators->append( this ); // attach iterator to dict
-}
-
-/*!
- \internal
- Constructs a copy of the iterator \e it.
-*/
-
-QGDictIterator::QGDictIterator( const QGDictIterator &it )
-{
- dict = it.dict;
- curNode = it.curNode;
- curIndex = it.curIndex;
- if ( dict )
- dict->iterators->append( this ); // attach iterator to dict
-}
-
-/*!
- \internal
- Assigns a copy of the iterator \e it and returns a reference to this
- iterator.
-*/
-
-QGDictIterator &QGDictIterator::operator=( const QGDictIterator &it )
-{
- if ( dict ) // detach from old dict
- dict->iterators->removeRef( this );
- dict = it.dict;
- curNode = it.curNode;
- curIndex = it.curIndex;
- if ( dict )
- dict->iterators->append( this ); // attach to new list
- return *this;
-}
-
-/*!
- \internal
- Destroys the iterator.
-*/
-
-QGDictIterator::~QGDictIterator()
-{
- if ( dict ) // detach iterator from dict
- dict->iterators->removeRef( this );
-}
-
-
-/*!
- \internal
- Sets the iterator to point to the first item in the dictionary.
-*/
-
-QCollection::Item QGDictIterator::toFirst()
-{
- if ( !dict ) {
-#if defined(CHECK_NULL)
- qWarning( "QGDictIterator::toFirst: Dictionary has been deleted" );
-#endif
- return 0;
- }
- if ( dict->count() == 0 ) { // empty dictionary
- curNode = 0;
- return 0;
- }
- uint i = 0;
- QBaseBucket **v = dict->vec;
- while ( !(*v++) )
- i++;
- curNode = dict->vec[i];
- curIndex = i;
- return curNode->getData();
-}
-
-
-/*!
- \internal
- Moves to the next item (postfix).
-*/
-
-QCollection::Item QGDictIterator::operator()()
-{
- if ( !dict ) {
-#if defined(CHECK_NULL)
- qWarning( "QGDictIterator::operator(): Dictionary has been deleted" );
-#endif
- return 0;
- }
- if ( !curNode )
- return 0;
- QCollection::Item d = curNode->getData();
- this->operator++();
- return d;
-}
-
-/*!
- \internal
- Moves to the next item (prefix).
-*/
-
-QCollection::Item QGDictIterator::operator++()
-{
- if ( !dict ) {
-#if defined(CHECK_NULL)
- qWarning( "QGDictIterator::operator++: Dictionary has been deleted" );
-#endif
- return 0;
- }
- if ( !curNode )
- return 0;
- curNode = curNode->getNext();
- if ( !curNode ) { // no next bucket
- uint i = curIndex + 1; // look from next vec element
- QBaseBucket **v = &dict->vec[i];
- while ( i < dict->size() && !(*v++) )
- i++;
- if ( i == dict->size() ) { // nothing found
- curNode = 0;
- return 0;
- }
- curNode = dict->vec[i];
- curIndex = i;
- }
- return curNode->getData();
-}
-
-/*!
- \internal
- Moves \e jumps positions forward.
-*/
-
-QCollection::Item QGDictIterator::operator+=( uint jumps )
-{
- while ( curNode && jumps-- )
- operator++();
- return curNode ? curNode->getData() : 0;
-}
diff --git a/qtools/qgdict.h b/qtools/qgdict.h
deleted file mode 100644
index cf023fd..0000000
--- a/qtools/qgdict.h
+++ /dev/null
@@ -1,222 +0,0 @@
-/****************************************************************************
-**
-**
-** Definition of QGDict and QGDictIterator classes
-**
-** Created : 920529
-**
-** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
-**
-** This file is part of the tools module of the Qt GUI Toolkit.
-**
-** This file may be distributed under the terms of the Q Public License
-** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#ifndef QGDICT_H
-#define QGDICT_H
-
-#ifndef QT_H
-#include "qcollection.h"
-#include "qcstring.h"
-#endif // QT_H
-
-class QGDictIterator;
-class QGDItList;
-
-
-class QBaseBucket // internal dict node
-{
-public:
- QCollection::Item getData() { return data; }
- QCollection::Item setData( QCollection::Item d ) { return data = d; }
- QBaseBucket *getNext() { return next; }
- void setNext( QBaseBucket *n) { next = n; }
-protected:
- QBaseBucket( QCollection::Item d, QBaseBucket *n ) : data(d), next(n) {}
- QCollection::Item data;
- QBaseBucket *next;
-};
-
-class QCStringBucket : public QBaseBucket
-{
-public:
- QCStringBucket( const QCString &k, QCollection::Item d, QBaseBucket *n )
- : QBaseBucket(d,n), key(k) {}
- const QCString &getKey() const { return key; }
-private:
- QCString key;
-};
-
-class QAsciiBucket : public QBaseBucket
-{
-public:
- QAsciiBucket( const char *k, QCollection::Item d, QBaseBucket *n )
- : QBaseBucket(d,n), key(k) {}
- const char *getKey() const { return key; }
-private:
- const char *key;
-};
-
-class QIntBucket : public QBaseBucket
-{
-public:
- QIntBucket( intptr_t k, QCollection::Item d, QBaseBucket *n )
- : QBaseBucket(d,n), key(k) {}
- intptr_t getKey() const { return key; }
-private:
- intptr_t key;
-};
-
-class QPtrBucket : public QBaseBucket
-{
-public:
- QPtrBucket( void *k, QCollection::Item d, QBaseBucket *n )
- : QBaseBucket(d,n), key(k) {}
- void *getKey() const { return key; }
-private:
- void *key;
-};
-
-
-class Q_EXPORT QGDict : public QCollection // generic dictionary class
-{
-public:
- uint count() const { return numItems; }
- uint size() const { return vlen; }
- QCollection::Item look_string( const QCString& key, QCollection::Item,
- int );
- QCollection::Item look_ascii( const char *key, QCollection::Item, int );
- QCollection::Item look_int( long key, QCollection::Item, int );
- QCollection::Item look_ptr( void *key, QCollection::Item, int );
-#ifndef QT_NO_DATASTREAM
- QDataStream &read( QDataStream & );
- QDataStream &write( QDataStream & ) const;
-#endif
-protected:
- enum KeyType { StringKey, AsciiKey, IntKey, PtrKey };
-
- QGDict( uint len, KeyType kt, bool cs, bool ck );
- QGDict( const QGDict & );
- ~QGDict();
-
- QGDict &operator=( const QGDict & );
-
- bool remove_string( const QCString &key, QCollection::Item item=0 );
- bool remove_ascii( const char *key, QCollection::Item item=0 );
- bool remove_int( long key, QCollection::Item item=0 );
- bool remove_ptr( void *key, QCollection::Item item=0 );
- QCollection::Item take_string( const QCString &key );
- QCollection::Item take_ascii( const char *key );
- QCollection::Item take_int( long key );
- QCollection::Item take_ptr( void *key );
-
- void clear();
- void resize( uint );
-
- int hashKeyString( const QCString & );
- int hashKeyAscii( const char * );
-
- void statistics() const;
-
-#ifndef QT_NO_DATASTREAM
- virtual QDataStream &read( QDataStream &, QCollection::Item & );
- virtual QDataStream &write( QDataStream &, QCollection::Item ) const;
-#endif
-private:
- QBaseBucket **vec;
- uint vlen;
- uint numItems;
- uint keytype : 2;
- uint cases : 1;
- uint copyk : 1;
- QGDItList *iterators;
- void unlink_common( int, QBaseBucket *, QBaseBucket * );
- QCStringBucket *unlink_string( const QCString &,
- QCollection::Item item = 0 );
- QAsciiBucket *unlink_ascii( const char *, QCollection::Item item = 0 );
- QIntBucket *unlink_int( long, QCollection::Item item = 0 );
- QPtrBucket *unlink_ptr( void *, QCollection::Item item = 0 );
- void init( uint, KeyType, bool, bool );
- friend class QGDictIterator;
-};
-
-
-class Q_EXPORT QGDictIterator // generic dictionary iterator
-{
-friend class QGDict;
-public:
- QGDictIterator( const QGDict & );
- QGDictIterator( const QGDictIterator & );
- QGDictIterator &operator=( const QGDictIterator & );
- ~QGDictIterator();
-
- QCollection::Item toFirst();
-
- QCollection::Item get() const;
- QCString getKeyString() const;
- const char *getKeyAscii() const;
- intptr_t getKeyInt() const;
- void *getKeyPtr() const;
-
- QCollection::Item operator()();
- QCollection::Item operator++();
- QCollection::Item operator+=(uint);
-
-protected:
- QGDict *dict;
-
-private:
- QBaseBucket *curNode;
- uint curIndex;
-};
-
-inline QCollection::Item QGDictIterator::get() const
-{
- return curNode ? curNode->getData() : 0;
-}
-
-inline QCString QGDictIterator::getKeyString() const
-{
- return curNode ? ((QCStringBucket*)curNode)->getKey() : QCString();
-}
-
-inline const char *QGDictIterator::getKeyAscii() const
-{
- return curNode ? ((QAsciiBucket*)curNode)->getKey() : 0;
-}
-
-inline intptr_t QGDictIterator::getKeyInt() const
-{
- return curNode ? ((QIntBucket*)curNode)->getKey() : 0;
-}
-
-inline void *QGDictIterator::getKeyPtr() const
-{
- return curNode ? ((QPtrBucket*)curNode)->getKey() : 0;
-}
-
-
-#endif // QGDICT_H
diff --git a/qtools/qgeneric.h b/qtools/qgeneric.h
deleted file mode 100644
index c2892a0..0000000
--- a/qtools/qgeneric.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/****************************************************************************
-**
-**
-** Macros for pasting tokens; utilized by our generic classes
-**
-** Created : 920529
-**
-** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
-**
-** This file is part of the tools module of the Qt GUI Toolkit.
-**
-** This file may be distributed under the terms of the Q Public License
-** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#ifndef QGENERIC_H
-#define QGENERIC_H
-
-#error "do not include qgeneric.h any more"
-
-#endif // QGENERIC_H
diff --git a/qtools/qglist.cpp b/qtools/qglist.cpp
deleted file mode 100644
index 878aa04..0000000
--- a/qtools/qglist.cpp
+++ /dev/null
@@ -1,1203 +0,0 @@
-/****************************************************************************
-**
-**
-** Implementation of QGList and QGListIterator classes
-**
-** Created : 920624
-**
-** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
-**
-** This file is part of the tools module of the Qt GUI Toolkit.
-**
-** This file may be distributed under the terms of the Q Public License
-** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#include "qglist.h"
-#include "qdatastream.h"
-
-
-// NOT REVISED
-/*!
- \class QLNode qglist.h
- \brief The QLNode class is an internal class for the QList template collection.
-
- QLNode is a doubly linked list node; it has three pointers:
- <ol>
- <li> Pointer to the previous node.
- <li> Pointer to the next node.
- <li> Pointer to the actual data.
- </ol>
-
- Sometimes it might be practical to have direct access to the list nodes
- in a QList, but it is seldom required.
-
- \warning Be very careful if you want to access the list nodes. The heap
- can easily get corrupted if you make a mistake.
-
- \sa QList::currentNode(), QList::removeNode(), QList::takeNode()
-*/
-
-/*!
- \fn QCollection::Item QLNode::getData()
- Returns a pointer (\c void*) to the actual data in the list node.
-*/
-
-
-/*!
- \class QGList qglist.h
- \brief The QGList class is an internal class for implementing Qt collection classes.
-
- QGList is a strictly internal class that acts as a base class for several
- \link collection.html collection classes\endlink; QList, QQueue and
- QStack.
-
- QGList has some virtual functions that can be reimplemented to customize
- the subclasses.
- <ul>
- <li> compareItems() compares two collection/list items.
- <li> read() reads a collection/list item from a QDataStream.
- <li> write() writes a collection/list item to a QDataStream.
- </ul>
- Normally, you do not have to reimplement any of these functions.
- If you still want to reimplement them, see the QStrList class (qstrlist.h),
- which is a good example.
-*/
-
-
-/*****************************************************************************
- Default implementation of virtual functions
- *****************************************************************************/
-
-/*!
- This virtual function compares two list items.
-
- Returns:
- <ul>
- <li> 0 if \e item1 == \e item2
- <li> non-zero if \e item1 != \e item2
- </ul>
-
- This function returns \e int rather than \e bool so that
- reimplementations can return three values and use it to sort by:
-
- <ul>
- <li> 0 if \e item1 == \e item2
- <li> \> 0 (positive integer) if \e item1 \> \e item2
- <li> \< 0 (negative integer) if \e item1 \< \e item2
- </ul>
-
- The QList::inSort() function requires that compareItems() is implemented
- as described here.
-
- This function should not modify the list because some const functions
- call compareItems().
-
- The default implementation compares the pointers:
- \code
-
- \endcode
-*/
-
-int QGList::compareItems( QCollection::Item item1, QCollection::Item item2 )
-{
- return item1 != item2; // compare pointers
-}
-
-#ifndef QT_NO_DATASTREAM
-/*!
- Reads a collection/list item from the stream \a s and returns a reference
- to the stream.
-
- The default implementation sets \a item to 0.
-
- \sa write()
-*/
-
-QDataStream &QGList::read( QDataStream &s, QCollection::Item &item )
-{
- item = 0;
- return s;
-}
-
-/*!
- Writes a collection/list item to the stream \a s and returns a reference
- to the stream.
-
- The default implementation does nothing.
-
- \sa read()
-*/
-
-QDataStream &QGList::write( QDataStream &s, QCollection::Item ) const
-{
- return s;
-}
-#endif // QT_NO_DATASTREAM
-
-/*****************************************************************************
- QGList member functions
- *****************************************************************************/
-
-/*!
- \internal
- Constructs an empty list.
-*/
-
-QGList::QGList()
-{
- firstNode = lastNode = curNode = 0; // initialize list
- numNodes = 0;
- curIndex = -1;
- iterators = 0; // initialize iterator list
-}
-
-/*!
- \internal
- Constructs a copy of \e list.
-*/
-
-QGList::QGList( const QGList & list )
- : QCollection( list )
-{
- firstNode = lastNode = curNode = 0; // initialize list
- numNodes = 0;
- curIndex = -1;
- iterators = 0; // initialize iterator list
- QLNode *n = list.firstNode;
- while ( n ) { // copy all items from list
- append( n->data );
- n = n->next;
- }
-}
-
-/*!
- \internal
- Removes all items from the list and destroys the list.
-*/
-
-QGList::~QGList()
-{
- clear();
- if ( !iterators ) // no iterators for this list
- return;
- QGListIterator *i = (QGListIterator*)iterators->first();
- while ( i ) { // notify all iterators that
- i->list = 0; // this list is deleted
- i->curNode = 0;
- i = (QGListIterator*)iterators->next();
- }
- delete iterators;
-}
-
-
-/*!
- \internal
- Assigns \e list to this list.
-*/
-
-QGList& QGList::operator=( const QGList &list )
-{
- clear();
- if ( list.count() > 0 ) {
- QLNode *n = list.firstNode;
- while ( n ) { // copy all items from list
- append( n->data );
- n = n->next;
- }
- curNode = firstNode;
- curIndex = 0;
- }
- return *this;
-}
-
-/*!
- Compares this list with \a list. Returns TRUE if the lists
- contain the same data, else FALSE.
-*/
-
-bool QGList::operator==( const QGList &list ) const
-{
- if ( count() != list.count() )
- return FALSE;
-
- if ( count() == 0 )
- return TRUE;
-
- QLNode *n1 = firstNode;
- QLNode *n2 = list.firstNode;
- while ( n1 && n2 ) {
- // should be mutable
- if ( ( (QGList*)this )->compareItems( n1->data, n2->data ) != 0 )
- return FALSE;
- n1 = n1->next;
- n2 = n2->next;
- }
-
- return TRUE;
-}
-
-/*!
- \fn uint QGList::count() const
- \internal
- Returns the number of items in the list.
-*/
-
-
-/*!
- \internal
- Returns the node at position \e index. Sets this node to current.
-*/
-
-QLNode *QGList::locate( uint index )
-{
- if ( index == (uint)curIndex ) // current node ?
- return curNode;
- if ( !curNode && firstNode ) { // set current node
- curNode = firstNode;
- curIndex = 0;
- }
- QLNode *node;
- int distance = index - curIndex; // node distance to cur node
- bool forward; // direction to traverse
-
- if ( index >= numNodes ) {
-#if defined(CHECK_RANGE)
- qWarning( "QGList::locate: Index %d out of range", index );
-#endif
- return 0;
- }
-
- if ( distance < 0 )
- distance = -distance;
- if ( (uint)distance < index && (uint)distance < numNodes - index ) {
- node = curNode; // start from current node
- forward = index > (uint)curIndex;
- } else if ( index < numNodes - index ) { // start from first node
- node = firstNode;
- distance = index;
- forward = TRUE;
- } else { // start from last node
- node = lastNode;
- distance = numNodes - index - 1;
- if ( distance < 0 )
- distance = 0;
- forward = FALSE;
- }
- if ( forward ) { // now run through nodes
- while ( distance-- )
- node = node->next;
- } else {
- while ( distance-- )
- node = node->prev;
- }
- curIndex = index; // must update index
- return curNode = node;
-}
-
-
-/*!
- \internal
- Inserts an item at its sorted position in the list.
-*/
-
-void QGList::inSort( QCollection::Item d )
-{
- int index = 0;
- QLNode *n = firstNode;
- while ( n && compareItems(n->data,d) < 0 ){ // find position in list
- n = n->next;
- index++;
- }
- insertAt( index, d );
-}
-
-
-/*!
- \internal
- Inserts an item at the start of the list.
-*/
-
-void QGList::prepend( QCollection::Item d )
-{
- QLNode *n = new QLNode( newItem(d) );
- CHECK_PTR( n );
- n->prev = 0;
- if ( (n->next = firstNode) ) // list is not empty
- firstNode->prev = n;
- else // initialize list
- lastNode = n;
- firstNode = curNode = n; // curNode affected
- numNodes++;
- curIndex = 0;
-}
-
-
-/*!
- \internal
- Inserts an item at the end of the list.
-*/
-
-void QGList::append( QCollection::Item d )
-{
- QLNode *n = new QLNode( newItem(d) );
- CHECK_PTR( n );
- n->next = 0;
- if ( (n->prev = lastNode) ) // list is not empty
- lastNode->next = n;
- else // initialize list
- firstNode = n;
- lastNode = curNode = n; // curNode affected
- curIndex = numNodes;
- numNodes++;
-}
-
-
-/*!
- \internal
- Inserts an item at position \e index in the list.
-*/
-
-bool QGList::insertAt( uint index, QCollection::Item d )
-{
- if ( index == 0 ) { // insert at head of list
- prepend( d );
- return TRUE;
- } else if ( index == numNodes ) { // append at tail of list
- append( d );
- return TRUE;
- }
- QLNode *nextNode = locate( index );
- if ( !nextNode ) // illegal position
- return FALSE;
- QLNode *prevNode = nextNode->prev;
- QLNode *n = new QLNode( newItem(d) );
- CHECK_PTR( n );
- nextNode->prev = n;
- prevNode->next = n;
- n->prev = prevNode; // link new node into list
- n->next = nextNode;
- curNode = n; // curIndex set by locate()
- numNodes++;
- return TRUE;
-}
-
-
-/*!
- \internal
- Relinks node \e n and makes it the first node in the list.
-*/
-
-void QGList::relinkNode( QLNode *n )
-{
- if ( n == firstNode ) // already first
- return;
- curNode = n;
- unlink();
- n->prev = 0;
- if ( (n->next = firstNode) ) // list is not empty
- firstNode->prev = n;
- else // initialize list
- lastNode = n;
- firstNode = curNode = n; // curNode affected
- numNodes++;
- curIndex = 0;
-}
-
-
-/*!
- \internal
- Unlinks the current list node and returns a pointer to this node.
-*/
-
-QLNode *QGList::unlink()
-{
- if ( curNode == 0 ) // null current node
- return 0;
- QLNode *n = curNode; // unlink this node
- if ( n == firstNode ) { // removing first node ?
- if ( (firstNode = n->next) ) {
- firstNode->prev = 0;
- } else {
- lastNode = curNode = 0; // list becomes empty
- curIndex = -1;
- }
- } else {
- if ( n == lastNode ) { // removing last node ?
- lastNode = n->prev;
- lastNode->next = 0;
- } else { // neither last nor first node
- n->prev->next = n->next;
- n->next->prev = n->prev;
- }
- }
- if ( n->next ) { // change current node
- curNode = n->next;
- } else if ( n->prev ) {
- curNode = n->prev;
- curIndex--;
- }
- if ( iterators && iterators->count() ) { // update iterators
- QGListIterator *i = (QGListIterator*)iterators->first();
- while ( i ) { // fix all iterators that
- if ( i->curNode == n ) // refers to pending node
- i->curNode = curNode;
- i = (QGListIterator*)iterators->next();
- }
- }
- numNodes--;
- return n;
-}
-
-
-/*!
- \internal
- Removes the node \e n from the list.
-*/
-
-bool QGList::removeNode( QLNode *n )
-{
-#if defined(CHECK_NULL)
- if ( n == 0 || (n->prev && n->prev->next != n) ||
- (n->next && n->next->prev != n) ) {
- qWarning( "QGList::removeNode: Corrupted node" );
- return FALSE;
- }
-#endif
- curNode = n;
- unlink(); // unlink node
- deleteItem( n->data ); // deallocate this node
- delete n;
- curNode = firstNode;
- curIndex = curNode ? 0 : -1;
- return TRUE;
-}
-
-/*!
- \internal
- Removes the item \e d from the list. Uses compareItems() to find the item.
-*/
-
-bool QGList::remove( QCollection::Item d )
-{
- if ( d ) { // find the item
- if ( find(d) == -1 )
- return FALSE;
- }
- QLNode *n = unlink(); // unlink node
- if ( !n )
- return FALSE;
- deleteItem( n->data ); // deallocate this node
- delete n;
- return TRUE;
-}
-
-/*!
- \internal
- Removes the item \e d from the list.
-*/
-
-bool QGList::removeRef( QCollection::Item d )
-{
- if ( d ) { // find the item
- if ( findRef(d) == -1 )
- return FALSE;
- }
- QLNode *n = unlink(); // unlink node
- if ( !n )
- return FALSE;
- deleteItem( n->data ); // deallocate this node
- delete n;
- return TRUE;
-}
-
-/*!
- \fn bool QGList::removeFirst()
- \internal
- Removes the first item in the list.
-*/
-
-/*!
- \fn bool QGList::removeLast()
- \internal
- Removes the last item in the list.
-*/
-
-/*!
- \internal
- Removes the item at position \e index from the list.
-*/
-
-bool QGList::removeAt( uint index )
-{
- if ( !locate(index) )
- return FALSE;
- QLNode *n = unlink(); // unlink node
- if ( !n )
- return FALSE;
- deleteItem( n->data ); // deallocate this node
- delete n;
- return TRUE;
-}
-
-
-/*!
- \internal
- Takes the node \e n out of the list.
-*/
-
-QCollection::Item QGList::takeNode( QLNode *n )
-{
-#if defined(CHECK_NULL)
- if ( n == 0 || (n->prev && n->prev->next != n) ||
- (n->next && n->next->prev != n) ) {
- qWarning( "QGList::takeNode: Corrupted node" );
- return 0;
- }
-#endif
- curNode = n;
- unlink(); // unlink node
- Item d = n->data;
- delete n; // delete the node, not data
- curNode = firstNode;
- curIndex = curNode ? 0 : -1;
- return d;
-}
-
-/*!
- \internal
- Takes the current item out of the list.
-*/
-
-QCollection::Item QGList::take()
-{
- QLNode *n = unlink(); // unlink node
- Item d = n ? n->data : 0;
- delete n; // delete node, keep contents
- return d;
-}
-
-/*!
- \internal
- Takes the item at position \e index out of the list.
-*/
-
-QCollection::Item QGList::takeAt( uint index )
-{
- if ( !locate(index) )
- return 0;
- QLNode *n = unlink(); // unlink node
- Item d = n ? n->data : 0;
- delete n; // delete node, keep contents
- return d;
-}
-
-/*!
- \internal
- Takes the first item out of the list.
-*/
-
-QCollection::Item QGList::takeFirst()
-{
- first();
- QLNode *n = unlink(); // unlink node
- Item d = n ? n->data : 0;
- delete n;
- return d;
-}
-
-/*!
- \internal
- Takes the last item out of the list.
-*/
-
-QCollection::Item QGList::takeLast()
-{
- last();
- QLNode *n = unlink(); // unlink node
- Item d = n ? n->data : 0;
- delete n;
- return d;
-}
-
-
-/*!
- \internal
- Removes all items from the list.
-*/
-
-void QGList::clear()
-{
- QLNode *n = firstNode;
-
- firstNode = lastNode = curNode = 0; // initialize list
- numNodes = 0;
- curIndex = -1;
-
- if ( iterators && iterators->count() ) {
- QGListIterator *i = (QGListIterator*)iterators->first();
- while ( i ) { // notify all iterators that
- i->curNode = 0; // this list is empty
- i = (QGListIterator*)iterators->next();
- }
- }
-
- QLNode *prevNode;
- while ( n ) { // for all nodes ...
- deleteItem( n->data ); // deallocate data
- prevNode = n;
- n = n->next;
- delete prevNode; // deallocate node
- }
-}
-
-
-/*!
- \internal
- Finds an item in the list.
-*/
-
-int QGList::findRef( QCollection::Item d, bool fromStart )
-{
- QLNode *n;
- int index;
- if ( fromStart ) { // start from first node
- n = firstNode;
- index = 0;
- } else { // start from current node
- n = curNode;
- index = curIndex;
- }
- while ( n && n->data != d ) { // find exact match
- n = n->next;
- index++;
- }
- curNode = n;
- curIndex = n ? index : -1;
- return curIndex; // return position of item
-}
-
-/*!
- \internal
- Finds an item in the list. Uses compareItems().
-*/
-
-int QGList::find( QCollection::Item d, bool fromStart )
-{
- QLNode *n;
- int index;
- if ( fromStart ) { // start from first node
- n = firstNode;
- index = 0;
- } else { // start from current node
- n = curNode;
- index = curIndex;
- }
- while ( n && compareItems(n->data,d) ){ // find equal match
- n = n->next;
- index++;
- }
- curNode = n;
- curIndex = n ? index : -1;
- return curIndex; // return position of item
-}
-
-
-/*!
- \internal
- Counts the number an item occurs in the list.
-*/
-
-uint QGList::containsRef( QCollection::Item d ) const
-{
- QLNode *n = firstNode;
- uint count = 0;
- while ( n ) { // for all nodes...
- if ( n->data == d ) // count # exact matches
- count++;
- n = n->next;
- }
- return count;
-}
-
-/*!
- \internal
- Counts the number an item occurs in the list. Uses compareItems().
-*/
-
-uint QGList::contains( QCollection::Item d ) const
-{
- QLNode *n = firstNode;
- uint count = 0;
- QGList *that = (QGList*)this; // mutable for compareItems()
- while ( n ) { // for all nodes...
- if ( !that->compareItems(n->data,d) ) // count # equal matches
- count++;
- n = n->next;
- }
- return count;
-}
-
-
-/*!
- \fn QCollection::Item QGList::at( uint index )
- \internal
- Sets the item at position \e index to the current item.
-*/
-
-/*!
- \fn int QGList::at() const
- \internal
- Returns the current index.
-*/
-
-/*!
- \fn QLNode *QGList::currentNode() const
- \internal
- Returns the current node.
-*/
-
-/*!
- \fn QCollection::Item QGList::get() const
- \internal
- Returns the current item.
-*/
-
-/*!
- \fn QCollection::Item QGList::cfirst() const
- \internal
- Returns the first item in the list.
-*/
-
-/*!
- \fn QCollection::Item QGList::clast() const
- \internal
- Returns the last item in the list.
-*/
-
-
-/*!
- \internal
- Returns the first list item. Sets this to current.
-*/
-
-QCollection::Item QGList::first()
-{
- if ( firstNode ) {
- curIndex = 0;
- return (curNode=firstNode)->data;
- }
- return 0;
-}
-
-/*!
- \internal
- Returns the last list item. Sets this to current.
-*/
-
-QCollection::Item QGList::last()
-{
- if ( lastNode ) {
- curIndex = numNodes-1;
- return (curNode=lastNode)->data;
- }
- return 0;
-}
-
-/*!
- \internal
- Returns the next list item (after current). Sets this to current.
-*/
-
-QCollection::Item QGList::next()
-{
- if ( curNode ) {
- if ( curNode->next ) {
- curIndex++;
- curNode = curNode->next;
- return curNode->data;
- }
- curIndex = -1;
- curNode = 0;
- }
- return 0;
-}
-
-/*!
- \internal
- Returns the previous list item (before current). Sets this to current.
-*/
-
-QCollection::Item QGList::prev()
-{
- if ( curNode ) {
- if ( curNode->prev ) {
- curIndex--;
- curNode = curNode->prev;
- return curNode->data;
- }
- curIndex = -1;
- curNode = 0;
- }
- return 0;
-}
-
-
-void QGList::heapSortPushDown( QCollection::Item* heap, int first, int last )
-{
- int r = first;
- while( r <= last/2 ) {
- // Node r has only one child ?
- if ( last == 2*r ) {
- // Need for swapping ?
- if ( compareItems( heap[r], heap[ 2*r ] ) > 0 ) {
- QCollection::Item tmp = heap[r];
- heap[ r ] = heap[ 2*r ];
- heap[ 2*r ] = tmp;
- }
- // That's it ...
- r = last;
- } else {
- // Node has two children
- if ( compareItems( heap[r], heap[ 2*r ] ) > 0 &&
- compareItems( heap[ 2*r ], heap[ 2*r+1 ] ) <= 0 ) {
- // Swap with left child
- QCollection::Item tmp = heap[r];
- heap[ r ] = heap[ 2*r ];
- heap[ 2*r ] = tmp;
- r *= 2;
- } else if ( compareItems( heap[r], heap[ 2*r+1 ] ) > 0 &&
- compareItems( heap[ 2*r+1 ], heap[ 2*r ] ) < 0 ) {
- // Swap with right child
- QCollection::Item tmp = heap[r];
- heap[ r ] = heap[ 2*r+1 ];
- heap[ 2*r+1 ] = tmp;
- r = 2*r+1;
- } else {
- // We are done
- r = last;
- }
- }
- }
-}
-
-
-/*! Sorts the list by the result of the virtual compareItems() function.
-
- The Heap-Sort algorithm is used for sorting. It sorts n items with
- O(n*log n) compares. This is the asymptotic optimal solution of the
- sorting problem.
-*/
-
-void QGList::sort()
-{
- uint n = count();
- if ( n < 2 )
- return;
-
- // Create the heap
- QCollection::Item* realheap = new QCollection::Item[ n ];
- // Wow, what a fake. But I want the heap to be indexed as 1...n
- QCollection::Item* heap = realheap - 1;
- int size = 0;
- QLNode* insert = firstNode;
- for( ; insert != 0; insert = insert->next ) {
- heap[++size] = insert->data;
- int i = size;
- while( i > 1 && compareItems( heap[i], heap[ i / 2 ] ) < 0 ) {
- QCollection::Item tmp = heap[ i ];
- heap[ i ] = heap[ i/2 ];
- heap[ i/2 ] = tmp;
- i /= 2;
- }
- }
-
- insert = firstNode;
- // Now do the sorting
- for ( int i = n; i > 0; i-- ) {
- insert->data = heap[1];
- insert = insert->next;
- if ( i > 1 ) {
- heap[1] = heap[i];
- heapSortPushDown( heap, 1, i - 1 );
- }
- }
-
- delete [] realheap;
-}
-
-
-/*****************************************************************************
- QGList stream functions
- *****************************************************************************/
-
-#ifndef QT_NO_DATASTREAM
-QDataStream &operator>>( QDataStream &s, QGList &list )
-{ // read list
- return list.read( s );
-}
-
-QDataStream &operator<<( QDataStream &s, const QGList &list )
-{ // write list
- return list.write( s );
-}
-
-/*!
- \internal
- Reads a list from the stream \e s.
-*/
-
-QDataStream &QGList::read( QDataStream &s )
-{
- uint num;
- s >> num; // read number of items
- clear(); // clear list
- while ( num-- ) { // read all items
- Item d;
- read( s, d );
- CHECK_PTR( d );
- if ( !d ) // no memory
- break;
- QLNode *n = new QLNode( d );
- CHECK_PTR( n );
- if ( !n ) // no memory
- break;
- n->next = 0;
- if ( (n->prev = lastNode) ) // list is not empty
- lastNode->next = n;
- else // initialize list
- firstNode = n;
- lastNode = n;
- numNodes++;
- }
- curNode = firstNode;
- curIndex = curNode ? 0 : -1;
- return s;
-}
-
-/*!
- \internal
- Writes the list to the stream \e s.
-*/
-
-QDataStream &QGList::write( QDataStream &s ) const
-{
- s << count(); // write number of items
- QLNode *n = firstNode;
- while ( n ) { // write all items
- write( s, n->data );
- n = n->next;
- }
- return s;
-}
-
-#endif // QT_NO_DATASTREAM
-
-/*****************************************************************************
- QGListIterator member functions
- *****************************************************************************/
-
-/*!
- \class QGListIterator qglist.h
- \brief The QGListIterator class is an internal class for implementing QListIterator.
-
- QGListIterator is a strictly internal class that does the heavy work for
- QListIterator.
-*/
-
-/*!
- \internal
- Constructs an iterator that operates on the list \e l.
-*/
-
-QGListIterator::QGListIterator( const QGList &l )
-{
- list = (QGList *)&l; // get reference to list
- curNode = list->firstNode; // set to first node
- if ( !list->iterators ) {
- list->iterators = new QGList; // create iterator list
- CHECK_PTR( list->iterators );
- }
- list->iterators->append( this ); // attach iterator to list
-}
-
-/*!
- \internal
- Constructs a copy of the iterator \e it.
-*/
-
-QGListIterator::QGListIterator( const QGListIterator &it )
-{
- list = it.list;
- curNode = it.curNode;
- if ( list )
- list->iterators->append( this ); // attach iterator to list
-}
-
-/*!
- \internal
- Assigns a copy of the iterator \e it and returns a reference to this
- iterator.
-*/
-
-QGListIterator &QGListIterator::operator=( const QGListIterator &it )
-{
- if ( list ) // detach from old list
- list->iterators->removeRef( this );
- list = it.list;
- curNode = it.curNode;
- if ( list )
- list->iterators->append( this ); // attach to new list
- return *this;
-}
-
-/*!
- \internal
- Destroys the iterator.
-*/
-
-QGListIterator::~QGListIterator()
-{
- if ( list ) // detach iterator from list
- list->iterators->removeRef(this);
-}
-
-
-/*!
- \fn bool QGListIterator::atFirst() const
- \internal
- Returns TRUE if the iterator points to the first item, otherwise FALSE.
-*/
-
-/*!
- \fn bool QGListIterator::atLast() const
- \internal
- Returns TRUE if the iterator points to the last item, otherwise FALSE.
-*/
-
-
-/*!
- \internal
- Sets the list iterator to point to the first item in the list.
-*/
-
-QCollection::Item QGListIterator::toFirst()
-{
- if ( !list ) {
-#if defined(CHECK_NULL)
- qWarning( "QGListIterator::toFirst: List has been deleted" );
-#endif
- return 0;
- }
- return list->firstNode ? (curNode = list->firstNode)->getData() : 0;
-}
-
-/*!
- \internal
- Sets the list iterator to point to the last item in the list.
-*/
-
-QCollection::Item QGListIterator::toLast()
-{
- if ( !list ) {
-#if defined(CHECK_NULL)
- qWarning( "QGListIterator::toLast: List has been deleted" );
-#endif
- return 0;
- }
- return list->lastNode ? (curNode = list->lastNode)->getData() : 0;
-}
-
-
-/*!
- \fn QCollection::Item QGListIterator::get() const
- \internal
- Returns the iterator item.
-*/
-
-
-/*!
- \internal
- Moves to the next item (postfix).
-*/
-
-QCollection::Item QGListIterator::operator()()
-{
- if ( !curNode )
- return 0;
- QCollection::Item d = curNode->getData();
- curNode = curNode->next;
- return d;
-}
-
-/*!
- \internal
- Moves to the next item (prefix).
-*/
-
-QCollection::Item QGListIterator::operator++()
-{
- if ( !curNode )
- return 0;
- curNode = curNode->next;
- return curNode ? curNode->getData() : 0;
-}
-
-/*!
- \internal
- Moves \e jumps positions forward.
-*/
-
-QCollection::Item QGListIterator::operator+=( uint jumps )
-{
- while ( curNode && jumps-- )
- curNode = curNode->next;
- return curNode ? curNode->getData() : 0;
-}
-
-/*!
- \internal
- Moves to the previous item (prefix).
-*/
-
-QCollection::Item QGListIterator::operator--()
-{
- if ( !curNode )
- return 0;
- curNode = curNode->prev;
- return curNode ? curNode->getData() : 0;
-}
-
-/*!
- \internal
- Moves \e jumps positions backward.
-*/
-
-QCollection::Item QGListIterator::operator-=( uint jumps )
-{
- while ( curNode && jumps-- )
- curNode = curNode->prev;
- return curNode ? curNode->getData() : 0;
-}
diff --git a/qtools/qglist.h b/qtools/qglist.h
deleted file mode 100644
index 0f30594..0000000
--- a/qtools/qglist.h
+++ /dev/null
@@ -1,254 +0,0 @@
-/****************************************************************************
-**
-**
-** Definition of QGList and QGListIterator classes
-**
-** Created : 920624
-**
-** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
-**
-** This file is part of the tools module of the Qt GUI Toolkit.
-**
-** This file may be distributed under the terms of the Q Public License
-** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#ifndef QGLIST_H
-#define QGLIST_H
-
-#ifndef QT_H
-#include "qcollection.h"
-#endif // QT_H
-
-
-/*****************************************************************************
- QLNode class (internal doubly linked list node)
- *****************************************************************************/
-
-class Q_EXPORT QLNode
-{
-friend class QGList;
-friend class QGListIterator;
-public:
- QCollection::Item getData() { return data; }
-private:
- QCollection::Item data;
- QLNode *prev;
- QLNode *next;
- QLNode( QCollection::Item d ) { data = d; }
-};
-
-
-/*****************************************************************************
- QGList class
- *****************************************************************************/
-
-class Q_EXPORT QGList : public QCollection // doubly linked generic list
-{
-friend class QGListIterator;
-public:
- uint count() const; // return number of nodes
-
-#ifndef QT_NO_DATASTREAM
- QDataStream &read( QDataStream & ); // read list from stream
- QDataStream &write( QDataStream & ) const; // write list to stream
-#endif
-protected:
- QGList(); // create empty list
- QGList( const QGList & ); // make copy of other list
- virtual ~QGList();
-
- QGList &operator=( const QGList & ); // assign from other list
- bool operator==( const QGList& ) const;
-
- void inSort( QCollection::Item ); // add item sorted in list
- void append( QCollection::Item ); // add item at end of list
- bool insertAt( uint index, QCollection::Item ); // add item at i'th position
- void relinkNode( QLNode * ); // relink as first item
- bool removeNode( QLNode * ); // remove node
- bool remove( QCollection::Item = 0 ); // remove item (0=current)
- bool removeRef( QCollection::Item = 0 ); // remove item (0=current)
- bool removeFirst(); // remove first item
- bool removeLast(); // remove last item
- bool removeAt( uint index ); // remove item at i'th position
- QCollection::Item takeNode( QLNode * ); // take out node
- QCollection::Item take(); // take out current item
- QCollection::Item takeAt( uint index ); // take out item at i'th pos
- QCollection::Item takeFirst(); // take out first item
- QCollection::Item takeLast(); // take out last item
-
- void sort(); // sort all items;
- void clear(); // remove all items
-
- int findRef( QCollection::Item, bool = TRUE ); // find exact item in list
- int find( QCollection::Item, bool = TRUE ); // find equal item in list
-
- uint containsRef( QCollection::Item ) const; // get number of exact matches
- uint contains( QCollection::Item ) const; // get number of equal matches
-
- QCollection::Item at( uint index ); // access item at i'th pos
- int at() const; // get current index
- QLNode *currentNode() const; // get current node
-
- QCollection::Item get() const; // get current item
-
- QCollection::Item cfirst() const; // get ptr to first list item
- QCollection::Item clast() const; // get ptr to last list item
- QCollection::Item first(); // set first item in list curr
- QCollection::Item last(); // set last item in list curr
- QCollection::Item next(); // set next item in list curr
- QCollection::Item prev(); // set prev item in list curr
-
- virtual int compareItems( QCollection::Item, QCollection::Item );
-
-#ifndef QT_NO_DATASTREAM
- virtual QDataStream &read( QDataStream &, QCollection::Item & );
- virtual QDataStream &write( QDataStream &, QCollection::Item ) const;
-#endif
-private:
- void prepend( QCollection::Item ); // add item at start of list
-
- void heapSortPushDown( QCollection::Item* heap, int first, int last );
-
- QLNode *firstNode; // first node
- QLNode *lastNode; // last node
- QLNode *curNode; // current node
- int curIndex; // current index
- uint numNodes; // number of nodes
- QGList *iterators; // list of iterators
-
- QLNode *locate( uint ); // get node at i'th pos
- QLNode *unlink(); // unlink node
-};
-
-
-inline uint QGList::count() const
-{
- return numNodes;
-}
-
-inline bool QGList::removeFirst()
-{
- first();
- return remove();
-}
-
-inline bool QGList::removeLast()
-{
- last();
- return remove();
-}
-
-inline int QGList::at() const
-{
- return curIndex;
-}
-
-inline QCollection::Item QGList::at( uint index )
-{
- QLNode *n = locate( index );
- return n ? n->data : 0;
-}
-
-inline QLNode *QGList::currentNode() const
-{
- return curNode;
-}
-
-inline QCollection::Item QGList::get() const
-{
- return curNode ? curNode->data : 0;
-}
-
-inline QCollection::Item QGList::cfirst() const
-{
- return firstNode ? firstNode->data : 0;
-}
-
-inline QCollection::Item QGList::clast() const
-{
- return lastNode ? lastNode->data : 0;
-}
-
-
-/*****************************************************************************
- QGList stream functions
- *****************************************************************************/
-
-#ifndef QT_NO_DATASTREAM
-Q_EXPORT QDataStream &operator>>( QDataStream &, QGList & );
-Q_EXPORT QDataStream &operator<<( QDataStream &, const QGList & );
-#endif
-
-/*****************************************************************************
- QGListIterator class
- *****************************************************************************/
-
-class Q_EXPORT QGListIterator // QGList iterator
-{
-friend class QGList;
-protected:
- QGListIterator( const QGList & );
- QGListIterator( const QGListIterator & );
- QGListIterator &operator=( const QGListIterator & );
- ~QGListIterator();
-
- bool atFirst() const; // test if at first item
- bool atLast() const; // test if at last item
- QCollection::Item toFirst(); // move to first item
- QCollection::Item toLast(); // move to last item
-
- QCollection::Item get() const; // get current item
- QCollection::Item operator()(); // get current and move to next
- QCollection::Item operator++(); // move to next item (prefix)
- QCollection::Item operator+=(uint); // move n positions forward
- QCollection::Item operator--(); // move to prev item (prefix)
- QCollection::Item operator-=(uint); // move n positions backward
-
-protected:
- QGList *list; // reference to list
-
-private:
- QLNode *curNode; // current node in list
-};
-
-
-inline bool QGListIterator::atFirst() const
-{
- return curNode == list->firstNode;
-}
-
-inline bool QGListIterator::atLast() const
-{
- return curNode == list->lastNode;
-}
-
-inline QCollection::Item QGListIterator::get() const
-{
- return curNode ? curNode->data : 0;
-}
-
-
-#endif // QGLIST_H
diff --git a/qtools/qglobal.cpp b/qtools/qglobal.cpp
deleted file mode 100644
index 0e0871e..0000000
--- a/qtools/qglobal.cpp
+++ /dev/null
@@ -1,687 +0,0 @@
-/****************************************************************************
-**
-**
-** Global functions
-**
-** Created : 920604
-**
-** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
-**
-** This file is part of the tools module of the Qt GUI Toolkit.
-**
-** This file may be distributed under the terms of the Q Public License
-** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#include "qglobal.h"
-//#include "qasciidict.h"
-#include "qstring.h"
-#include <stdio.h>
-#include <stdarg.h>
-#include <stdlib.h>
-
-// NOT REVISED
-
-/*!
- \relates QApplication
- Returns the Qt version number for the library, typically "1.30"
- or "2.1.0".
-*/
-
-const char *qVersion()
-{
- return QT_VERSION_STR;
-}
-
-
-/*****************************************************************************
- System detection routines
- *****************************************************************************/
-
-static bool si_alreadyDone = FALSE;
-static int si_wordSize;
-static bool si_bigEndian;
-
-/*!
- \relates QApplication
- Obtains information about the system.
-
- The system's word size in bits (typically 32) is returned in \e *wordSize.
- The \e *bigEndian is set to TRUE if this is a big-endian machine,
- or to FALSE if this is a little-endian machine.
-
- This function calls qFatal() with a message if the computer is truly weird
- (i.e. different endianess for 16 bit and 32 bit integers).
-*/
-
-bool qSysInfo( int *wordSize, bool *bigEndian )
-{
-#if defined(CHECK_NULL)
- ASSERT( wordSize != 0 );
- ASSERT( bigEndian != 0 );
-#endif
-
- if ( si_alreadyDone ) { // run it only once
- *wordSize = si_wordSize;
- *bigEndian = si_bigEndian;
- return TRUE;
- }
- si_alreadyDone = TRUE;
-
- si_wordSize = 0;
- uint n = (uint)(~0);
- while ( n ) { // detect word size
- si_wordSize++;
- n /= 2;
- }
- *wordSize = si_wordSize;
-
- if ( *wordSize != 64 &&
- *wordSize != 32 &&
- *wordSize != 16 ) { // word size: 16, 32 or 64
-#if defined(CHECK_RANGE)
- qFatal( "qSysInfo: Unsupported system word size %d", *wordSize );
-#endif
- return FALSE;
- }
- if ( sizeof(Q_INT8) != 1 || sizeof(Q_INT16) != 2 || sizeof(Q_INT32) != 4 ||
- sizeof(float) != 4 || sizeof(double) != 8 ) {
-#if defined(CHECK_RANGE)
- qFatal( "qSysInfo: Unsupported system data type size" );
-#endif
- return FALSE;
- }
-
- bool be16, be32; // determine byte ordering
- short ns = 0x1234;
- int nl = 0x12345678;
-
- unsigned char *p = (unsigned char *)(&ns); // 16-bit integer
- be16 = *p == 0x12;
-
- p = (unsigned char *)(&nl); // 32-bit integer
- if ( p[0] == 0x12 && p[1] == 0x34 && p[2] == 0x56 && p[3] == 0x78 )
- be32 = TRUE;
- else
- if ( p[0] == 0x78 && p[1] == 0x56 && p[2] == 0x34 && p[3] == 0x12 )
- be32 = FALSE;
- else
- be32 = !be16;
-
- if ( be16 != be32 ) { // strange machine!
-#if defined(CHECK_RANGE)
- qFatal( "qSysInfo: Inconsistent system byte order" );
-#endif
- return FALSE;
- }
-
- *bigEndian = si_bigEndian = be32;
- return TRUE;
-}
-
-
-/*****************************************************************************
- Debug output routines
- *****************************************************************************/
-
-/*!
- \fn void qDebug( const char *msg, ... )
-
- \relates QApplication
- Prints a debug message, or calls the message handler (if it has been
- installed).
-
- This function takes a format string and a list of arguments, similar to
- the C printf() function.
-
- Example:
- \code
- qDebug( "my window handle = %x", myWidget->id() );
- \endcode
-
- Under X11, the text is printed to stderr. Under Windows, the text is
- sent to the debugger.
-
- \warning The internal buffer is limited to 8196 bytes (including the
- 0-terminator).
-
- \sa qWarning(), qFatal(), qInstallMsgHandler(),
- \link debug.html Debugging\endlink
-*/
-
-/*!
- \fn void qWarning( const char *msg, ... )
-
- \relates QApplication
- Prints a warning message, or calls the message handler (if it has been
- installed).
-
- This function takes a format string and a list of arguments, similar to
- the C printf() function.
-
- Example:
- \code
- void f( int c )
- {
- if ( c > 200 )
- qWarning( "f: bad argument, c == %d", c );
- }
- \endcode
-
- Under X11, the text is printed to stderr. Under Windows, the text is
- sent to the debugger.
-
- \warning The internal buffer is limited to 8196 bytes (including the
- 0-terminator).
-
- \sa qDebug(), qFatal(), qInstallMsgHandler(),
- \link debug.html Debugging\endlink
-*/
-
-/*!
- \fn void qFatal( const char *msg, ... )
-
- \relates QApplication
- Prints a fatal error message and exits, or calls the message handler (if it
- has been installed).
-
- This function takes a format string and a list of arguments, similar to
- the C printf() function.
-
- Example:
- \code
- int divide( int a, int b )
- {
- if ( b == 0 ) // program error
- qFatal( "divide: cannot divide by zero" );
- return a/b;
- }
- \endcode
-
- Under X11, the text is printed to stderr. Under Windows, the text is
- sent to the debugger.
-
- \warning The internal buffer is limited to 8196 bytes (including the
- 0-terminator).
-
- \sa qDebug(), qWarning(), qInstallMsgHandler(),
- \link debug.html Debugging\endlink
-*/
-
-
-static msg_handler handler = 0; // pointer to debug handler
-
-
-#ifdef _OS_MAC_
-
-static FILE * mac_debug=0;
-
-void qDebug( const char *msg, ... )
-{
- mac_debug=fopen( "debug.txt", "a+" );
- if(mac_debug) {
- char buf[8196];
- va_list ap;
- va_start( ap, msg ); // use variable arg list
- if ( handler ) {
- vsprintf( buf, msg, ap );
- va_end( ap );
- (*handler)( QtDebugMsg, buf );
- } else {
- vfprintf( mac_debug, msg, ap );
- va_end( ap );
- fprintf( mac_debug, "\n" ); // add newline
- fflush( mac_debug );
- }
- fclose(mac_debug);
- } else {
- exit(0);
- }
-}
-
-// copied... this looks really bad.
-void debug( const char *msg, ... )
-{
- mac_debug=fopen( "debug.txt", "a+" );
- if(mac_debug) {
- char buf[8196];
- va_list ap;
- va_start( ap, msg ); // use variable arg list
- if ( handler ) {
- vsprintf( buf, msg, ap );
- va_end( ap );
- (*handler)( QtDebugMsg, buf );
- } else {
- vfprintf( mac_debug, msg, ap );
- va_end( ap );
- fprintf( mac_debug, "\n" ); // add newline
- fflush( mac_debug );
- }
- fclose(mac_debug);
- }
-}
-
-void qWarning( const char *msg, ... )
-{
- mac_debug=fopen( "debug.txt", "a+" );
- if(mac_debug) {
- char buf[8196];
- va_list ap;
- va_start( ap, msg ); // use variable arg list
- if ( handler ) {
- vsprintf( buf, msg, ap );
- va_end( ap );
- (*handler)( QtDebugMsg, buf );
- } else {
- vfprintf( mac_debug, msg, ap );
- va_end( ap );
- fprintf( mac_debug, "\n" ); // add newline
- fflush( mac_debug );
- }
- fclose(mac_debug);
- }
-}
-
-// copied... this looks really bad.
-void warning( const char *msg, ... )
-{
- mac_debug=fopen( "debug.txt", "a+" );
- if(mac_debug) {
- char buf[8196];
- va_list ap;
- va_start( ap, msg ); // use variable arg list
- if ( handler ) {
- vsprintf( buf, msg, ap );
- va_end( ap );
- (*handler)( QtDebugMsg, buf );
- } else {
- vfprintf( mac_debug, msg, ap );
- va_end( ap );
- fprintf( mac_debug, "\n" ); // add newline
- fflush( mac_debug );
- }
- fclose(mac_debug);
- }
-}
-
-void qFatal( const char *msg, ... )
-{
- mac_debug=fopen( "debug.txt", "a+");
- if(mac_debug) {
- char buf[8196];
- va_list ap;
- va_start( ap, msg ); // use variable arg list
- if ( handler ) {
- vsprintf( buf, msg, ap );
- va_end( ap );
- (*handler)( QtDebugMsg, buf );
- } else {
- vfprintf( mac_debug, msg, ap );
- va_end( ap );
- fprintf( mac_debug, "\n" ); // add newline
- fflush( mac_debug );
- }
- fclose(mac_debug);
- }
- exit(0);
-}
-
-// copied... this looks really bad.
-void fatal( const char *msg, ... )
-{
- mac_debug=fopen( "debug.txt", "a+" );
- if(mac_debug) {
- char buf[8196];
- va_list ap;
- va_start( ap, msg ); // use variable arg list
- if ( handler ) {
- vsprintf( buf, msg, ap );
- va_end( ap );
- (*handler)( QtDebugMsg, buf );
- } else {
- vfprintf( mac_debug, msg, ap );
- va_end( ap );
- fprintf( mac_debug, "\n" ); // add newline
- fflush( mac_debug );
- }
- fclose(mac_debug);
- }
- exit(0);
-}
-
-#else
-
-void qDebug( const char *msg, ... )
-{
- char buf[8196];
- va_list ap;
- va_start( ap, msg ); // use variable arg list
- if ( handler ) {
- vsprintf( buf, msg, ap ); // ### vsnprintf would be great here
- va_end( ap );
- (*handler)( QtDebugMsg, buf );
- } else {
- vfprintf( stderr, msg, ap );
- va_end( ap );
- fprintf( stderr, "\n" ); // add newline
- }
-}
-
-// copied... this looks really bad.
-void debug( const char *msg, ... )
-{
- char buf[8196];
- va_list ap;
- va_start( ap, msg ); // use variable arg list
- if ( handler ) {
- vsprintf( buf, msg, ap );
- va_end( ap );
- (*handler)( QtDebugMsg, buf );
- } else {
- vfprintf( stderr, msg, ap );
- va_end( ap );
- fprintf( stderr, "\n" ); // add newline
- }
-}
-
-void qWarning( const char *msg, ... )
-{
- char buf[8196];
- va_list ap;
- va_start( ap, msg ); // use variable arg list
- if ( handler ) {
- vsprintf( buf, msg, ap );
- va_end( ap );
- (*handler)( QtWarningMsg, buf );
- } else {
- vfprintf( stderr, msg, ap );
- va_end( ap );
- fprintf( stderr, "\n" ); // add newline
- }
-}
-
-
-// again, copied
-void warning( const char *msg, ... )
-{
- char buf[8196];
- va_list ap;
- va_start( ap, msg ); // use variable arg list
- if ( handler ) {
- vsprintf( buf, msg, ap );
- va_end( ap );
- (*handler)( QtWarningMsg, buf );
- } else {
- vfprintf( stderr, msg, ap );
- va_end( ap );
- fprintf( stderr, "\n" ); // add newline
- }
-}
-
-void qFatal( const char *msg, ... )
-{
- char buf[8196];
- va_list ap;
- va_start( ap, msg ); // use variable arg list
- if ( handler ) {
- vsprintf( buf, msg, ap );
- va_end( ap );
- (*handler)( QtFatalMsg, buf );
- } else {
- vfprintf( stderr, msg, ap );
- va_end( ap );
- fprintf( stderr, "\n" ); // add newline
-#if defined(_OS_UNIX_) && defined(DEBUG)
- abort(); // trap; generates core dump
-#else
- exit( 1 ); // goodbye cruel world
-#endif
- }
-}
-
-// yet again, copied
-void fatal( const char *msg, ... )
-{
- char buf[8196];
- va_list ap;
- va_start( ap, msg ); // use variable arg list
- if ( handler ) {
- vsprintf( buf, msg, ap );
- va_end( ap );
- (*handler)( QtFatalMsg, buf );
- } else {
- vfprintf( stderr, msg, ap );
- va_end( ap );
- fprintf( stderr, "\n" ); // add newline
-#if defined(_OS_UNIX_) && defined(DEBUG)
- abort(); // trap; generates core dump
-#else
- exit( 1 ); // goodbye cruel world
-#endif
- }
-}
-
-#endif
-
-
-/*!
- \fn void ASSERT( bool test )
- \relates QApplication
- Prints a warning message containing the source code file name and line number
- if \e test is FALSE.
-
- This is really a macro defined in qglobal.h.
-
- ASSERT is useful for testing required conditions in your program.
-
- Example:
- \code
- //
- // File: div.cpp
- //
-
- #include <qglobal.h>
-
- int divide( int a, int b )
- {
- ASSERT( b != 0 ); // this is line 9
- return a/b;
- }
- \endcode
-
- If \c b is zero, the ASSERT statement will output the following message
- using the qWarning() function:
- \code
- ASSERT: "b == 0" in div.cpp (9)
- \endcode
-
- \sa qWarning(), \link debug.html Debugging\endlink
-*/
-
-
-/*!
- \fn void CHECK_PTR( void *p )
- \relates QApplication
- If \e p is null, a fatal messages says that the program ran out of memory
- and exits. If \e p is not null, nothing happens.
-
- This is really a macro defined in qglobal.h.
-
- Example:
- \code
- int *a;
- CHECK_PTR( a = new int[80] ); // never do this!
- // do this instead:
- a = new int[80];
- CHECK_PTR( a ); // this is fine
- \endcode
-
- \sa qFatal(), \link debug.html Debugging\endlink
-*/
-
-
-//
-// The CHECK_PTR macro calls this function to check if an allocation went ok.
-//
-
-bool qt_check_pointer( bool c, const char *n, int l )
-{
- if ( c )
- qFatal( "In file %s, line %d: Out of memory", n, l );
- return TRUE;
-}
-
-
-#if 0
-static bool firstObsoleteWarning(const char *obj, const char *oldfunc )
-{
- static QAsciiDict<int> *obsoleteDict = 0;
- if ( !obsoleteDict ) { // first time func is called
- obsoleteDict = new QAsciiDict<int>;
-#if defined(DEBUG)
- qDebug(
- "You are using obsolete functions in the Qt library. Call the function\n"
- "qSuppressObsoleteWarnings() to suppress obsolete warnings.\n"
- );
-#endif
- }
- QCString s( obj );
- s += "::";
- s += oldfunc;
- if ( obsoleteDict->find(s.data()) == 0 ) {
- obsoleteDict->insert( s.data(), (int*)1 ); // anything different from 0
- return TRUE;
- }
- return FALSE;
-}
-
-static bool suppressObsolete = FALSE;
-
-void qSuppressObsoleteWarnings( bool suppress )
-{
- suppressObsolete = suppress;
-}
-
-void qObsolete( const char *obj, const char *oldfunc, const char *newfunc )
-{
- if ( suppressObsolete )
- return;
- if ( !firstObsoleteWarning(obj, oldfunc) )
- return;
- if ( obj )
- qDebug( "%s::%s: This function is obsolete, use %s instead.",
- obj, oldfunc, newfunc );
- else
- qDebug( "%s: This function is obsolete, use %s instead.",
- oldfunc, newfunc );
-}
-
-void qObsolete( const char *obj, const char *oldfunc )
-{
- if ( suppressObsolete )
- return;
- if ( !firstObsoleteWarning(obj, oldfunc) )
- return;
- if ( obj )
- qDebug( "%s::%s: This function is obsolete.", obj, oldfunc );
- else
- qDebug( "%s: This function is obsolete.", oldfunc );
-}
-
-void qObsolete( const char *message )
-{
- if ( suppressObsolete )
- return;
- if ( !firstObsoleteWarning( "Qt", message) )
- return;
- qDebug( "%s", message );
-}
-#endif
-
-
-/*!
- \relates QApplication
- Installs a Qt message handler. Returns a pointer to the message handler
- previously defined.
-
- The message handler is a function that prints out debug messages,
- warnings and fatal error messages. The Qt library (debug version)
- contains hundreds of warning messages that are printed when internal
- errors (usually invalid function arguments) occur. If you implement
- your own message handler, you get total control of these messages.
-
- The default message handler prints the message to the standard output
- under X11 or to the debugger under Windows. If it is a fatal message,
- the application aborts immediately.
-
- Only one message handler can be defined, since this is usually done on
- an application-wide basis to control debug output.
-
- To restore the message handler, call \c qInstallMsgHandler(0).
-
- Example:
- \code
- #include <qapplication.h>
- #include <stdio.h>
- #include <stdlib.h>
-
- void myMessageOutput( QtMsgType type, const char *msg )
- {
- switch ( type ) {
- case QtDebugMsg:
- fprintf( stderr, "Debug: %s\n", msg );
- break;
- case QtWarningMsg:
- fprintf( stderr, "Warning: %s\n", msg );
- break;
- case QtFatalMsg:
- fprintf( stderr, "Fatal: %s\n", msg );
- abort(); // dump core on purpose
- }
- }
-
- int main( int argc, char **argv )
- {
- qInstallMsgHandler( myMessageOutput );
- QApplication a( argc, argv );
- ...
- return a.exec();
- }
- \endcode
-
- \sa qDebug(), qWarning(), qFatal(), \link debug.html Debugging\endlink
-*/
-
-msg_handler qInstallMsgHandler( msg_handler h )
-{
- msg_handler old = handler;
- handler = h;
- return old;
-}
-
-
-#ifdef _WS_WIN_
-bool qt_winunicode=FALSE;
-#endif
diff --git a/qtools/qglobal.h b/qtools/qglobal.h
deleted file mode 100644
index 1fbe2f7..0000000
--- a/qtools/qglobal.h
+++ /dev/null
@@ -1,628 +0,0 @@
-/****************************************************************************
-**
-**
-** Global type declarations and definitions
-**
-** Created : 920529
-**
-** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
-**
-** This file is part of the tools module of the Qt GUI Toolkit.
-**
-** This file may be distributed under the terms of the Q Public License
-** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#ifndef QGLOBAL_H
-#define QGLOBAL_H
-
-
-#define QT_VERSION 223
-#define QT_VERSION_STR "2.2.3"
-
-
-//
-// The operating system, must be one of: (_OS_x_)
-//
-// MAC - Macintosh
-// MSDOS - MS-DOS and Windows
-// OS2 - OS/2
-// OS2EMX - XFree86 on OS/2 (not PM)
-// WIN32 - Win32 (Windows 95/98 and Windows NT)
-// SUN - SunOS
-// SOLARIS - Sun Solaris
-// HPUX - HP-UX
-// ULTRIX - DEC Ultrix
-// LINUX - Linux
-// FREEBSD - FreeBSD
-// NETBSD - NetBSD
-// OPENBSD - OpenBSD
-// IRIX - SGI Irix
-// OSF - OSF Unix
-// BSDI - BSDI Unix
-// SCO - SCO of some sort
-// AIX - AIX Unix
-// UNIXWARE - SCO UnixWare
-// GNU - GNU Hurd
-// DGUX - DG Unix
-// UNIX - Any UNIX bsd/sysv system
-//
-
-#if defined(__APPLE__) || defined(macintosh)
-#define _OS_MAC_
-# ifdef MAC_OS_X_VERSION_MIN_REQUIRED
-# undef MAC_OS_X_VERSION_MIN_REQUIRED
-# endif
-# define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_3
-#elif defined(MSDOS) || defined(_MSDOS) || defined(__MSDOS__)
-#define _OS_MSDOS_
-#elif defined(OS2) || defined(_OS2) || defined(__OS2__)
-#if defined(__EMX__)
-#define _OS_OS2EMX_
-#else
-#define _OS_OS2_
-#endif
-#elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)
-#define _OS_WIN32_
-#elif defined(__MWERKS__) && defined(__INTEL__)
-#define _OS_WIN32_
-#elif defined(sun) || defined(__sun) || defined(__sun__)
-#if defined(__SVR4)
-#define _OS_SOLARIS_
-#else
-#define _OS_SUN_
-#endif
-#elif defined(hpux) || defined(__hpux) || defined(__hpux__)
-#define _OS_HPUX_
-#elif defined(ultrix) || defined(__ultrix) || defined(__ultrix__)
-#define _OS_ULTRIX_
-#elif defined(reliantunix)
-#define _OS_RELIANTUNIX_
-#elif defined(linux) || defined(__linux) || defined(__linux__) || defined(__GNU__) || defined(__GLIBC__)
-#define _OS_LINUX_
-#elif defined(__FreeBSD__)
-#define _OS_FREEBSD_
-#elif defined(__NetBSD__)
-#define _OS_NETBSD_
-#elif defined(__OpenBSD__)
-#define _OS_OPENBSD_
-#elif defined(sgi) || defined(__sgi)
-#define _OS_IRIX_
-#elif defined(__osf__)
-#define _OS_OSF_
-#elif defined(bsdi) || defined(__bsdi__)
-#define _OS_BSDI_
-#elif defined(_AIX)
-#define _OS_AIX_
-#elif defined(__Lynx__)
-#define _OS_LYNXOS_
-#elif defined(_UNIXWARE)
-#define _OS_UNIXWARE_
-#elif defined(DGUX)
-#define _OS_DGUX_
-#elif defined(__QNX__)
-#define _OS_QNX_
-#elif defined(_SCO_DS) || defined(M_UNIX) || defined(M_XENIX)
-#define _OS_SCO_
-#elif defined(sco) || defined(_UNIXWARE7)
-#define _OS_UNIXWARE7_
-#elif !defined(_SCO_DS) && defined(__USLC__) && defined(__SCO_VERSION__)
-#define _OS_UNIXWARE7_
-#elif defined(__CYGWIN__)
-#define _OS_CYGWIN_
-#elif defined(__BEOS__)
-#define _OS_BEOS_
-#elif defined(__MINT__)
-#define _OS_MINT_
-#else
-#error "Qt has not been ported to this OS - talk to qt-bugs@trolltech.com"
-#endif
-
-#if defined(_OS_MAC_) || defined(_OS_MSDOS_) || defined(_OS_OS2_) || defined(_OS_WIN32_)
-#undef _OS_UNIX_
-#elif !defined(_OS_UNIX_)
-#define _OS_UNIX_
-// QT_CLEAN_NAMESPACE is not defined by default; it would break too
-// much code.
-#if !defined(QT_CLEAN_NAMESPACE) && !defined(UNIX)
-// ### remove 3.0
-#define UNIX
-#endif
-#endif
-
-
-//
-// The compiler, must be one of: (_CC_x_)
-//
-// SYM - Symantec C++ for both PC and Macintosh
-// MPW - MPW C++
-// MWERKS - Metrowerks CodeWarrior
-// MSVC - Microsoft Visual C/C++
-// BOR - Borland/Turbo C++
-// WAT - Watcom C++
-// GNU - GNU C++
-// COMEAU - Comeau C++
-// EDG - Edison Design Group C++
-// OC - CenterLine C++
-// SUN - Sun C++
-// DEC - DEC C++
-// HP - HPUX C++
-// USLC - SCO UnixWare7 C++
-// CDS - Reliant C++
-// KAI - KAI C++
-//
-
-
-// Should be sorted most-authoritative to least-authoritative
-
-#if defined(__SC__)
-#define _CC_SYM_
-#elif defined( __KCC )
-#define _CC_KAI_
-#define _CC_EDG_
-#define Q_HAS_BOOL_TYPE
-#elif defined(applec)
-#define _CC_MPW_
-#elif defined(__MWERKS__)
-#define _CC_MWERKS_
-#define Q_HAS_BOOL_TYPE
-#elif defined(_MSC_VER)
-#define _CC_MSVC_
-#elif defined(__BORLANDC__) || defined(__TURBOC__)
-#define _CC_BOR_
-#elif defined(__WATCOMC__)
-#define _CC_WAT_
-#define Q_HAS_BOOL_TYPE
-#elif defined(__GNUC__)
-#define _CC_GNU_
-#if __GNUC__ == 2 && __GNUC_MINOR__ <= 7
-#define Q_FULL_TEMPLATE_INSTANTIATION
-#define Q_TEMPLATE_NEEDS_CLASS_DECLARATION
-#define Q_TEMPLATE_NEEDS_EXPLICIT_CONVERSION
-#define Q_SPURIOUS_NON_VOID_WARNING
-#endif
-#if __GNUC__ == 2 && __GNUC_MINOR__ >= 95
-#define Q_DELETING_VOID_UNDEFINED
-#endif
-#if (defined(__arm__) || defined(__ARMEL__)) && !defined(QT_MOC_CPP)
-#define Q_PACKED __attribute__ ((packed))
-#endif
-#elif defined(__xlC__)
-#define _CC_XLC_
-#define Q_FULL_TEMPLATE_INSTANTIATION
-#if __xlC__ >= 0x400
-#define Q_HAS_BOOL_TYPE
-#endif
-#if __xlC__ <= 0x0306
-#define Q_TEMPLATE_NEEDS_EXPLICIT_CONVERSION
-#endif
-#elif defined(como40)
-#define _CC_EDG_
-#define _CC_COMEAU_
-#define Q_HAS_BOOL_TYPE
-#define Q_C_CALLBACKS
-#elif defined(__USLC__)
-#define _CC_USLC_
-#ifdef __EDG__ // UnixWare7
-#define Q_HAS_BOOL_TYPE
-#endif
-#elif defined(__DECCXX)
-#define _CC_DEC_
-#if __DECCXX_VER >= 60060005
-#define Q_HAS_BOOL_TYPE
-#endif
-#elif defined(__EDG) || defined(__EDG__)
-// one observed on SGI DCC, the other documented
-#define _CC_EDG_
-#elif defined(OBJECTCENTER) || defined(CENTERLINE_CLPP)
-#define _CC_OC_
-#if defined(_BOOL)
-#define Q_HAS_BOOL_TYPE
-#endif
-#elif defined(__SUNPRO_CC)
-#define _CC_SUN_
-#if __SUNPRO_CC >= 0x500
-#define Q_HAS_BOOL_TYPE
-#define Q_C_CALLBACKS
-#endif
-#elif defined(__CDS__)
-#define _CC_CDS_
-#define Q_HAS_BOOL_TYPE
-#elif defined(_OS_HPUX_)
-// this test is from aCC online help
-#if defined(__HP_aCC) || __cplusplus >= 199707L
-// this is the aCC
-#define _CC_HP_ACC_
-#define Q_HAS_BOOL_TYPE
-#else
-// this is the CC
-#define _CC_HP_
-#define Q_FULL_TEMPLATE_INSTANTIATION
-#define Q_TEMPLATE_NEEDS_EXPLICIT_CONVERSION
-#endif // __HP_aCC
-#else
-#error "Qt has not been tested with this compiler - talk to qt-bugs@trolltech.com"
-#endif
-
-// detect Microsoft compiler version
-#ifdef _CC_MSVC_
-#if _MSC_VER >= 1400
-#define _CC_V2005
-#elif _MSC_VER >= 1310
-#define _CC_V2003
-#elif _MSC_VER > 1300
-#define _CC_V2002
-#else
-#define _CC_V1998
-#endif
-#endif
-
-#ifndef Q_PACKED
-#define Q_PACKED
-#endif
-
-// Window system setting
-
-#if defined(_OS_MAC_)
-#define _WS_MAC_
-#elif defined(_OS_MSDOS_)
-#define _WS_WIN16_
-#error "Qt requires Win32 and does not work with Windows 3.x"
-#elif defined(_WIN32_X11_)
-#define _WS_X11_
-#elif defined(_OS_WIN32_)
-#define _WS_WIN32_
-#elif defined(_OS_OS2_)
-#error "Qt does not work with OS/2 Presentation Manager or Workplace Shell"
-#elif defined(_OS_UNIX_)
-#ifdef QWS
-#define _WS_QWS_
-#else
-#define _WS_X11_
-#endif
-#endif
-
-#if defined(_WS_WIN16_) || defined(_WS_WIN32_)
-#define _WS_WIN_
-#endif
-
-
-//
-// Some classes do not permit copies to be made of an object.
-// These classes contains a private copy constructor and operator=
-// to disable copying (the compiler gives an error message).
-// Undefine Q_DISABLE_COPY to turn off this checking.
-//
-
-#define Q_DISABLE_COPY
-
-
-//
-// Useful type definitions for Qt
-//
-
-#if defined(bool)
-#define Q_HAS_BOOL_TYPE
-#elif __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 6)
-#define Q_HAS_BOOL_TYPE
-#elif _MSC_VER >= 1100 || __BORLANDC__ >= 0x500
-#define Q_HAS_BOOL_TYPE
-#elif defined(sgi) && defined(_BOOL)
-#define Q_HAS_BOOL_TYPE
-#endif
-
-#if (QT_VERSION >= 300)
-#error "Use an enum for bool"
-#endif
-
-#if !defined(Q_HAS_BOOL_TYPE)
-#if defined(_CC_MSVC_)
-#define _CC_BOOL_DEF_
-#define bool int
-#else
-typedef int bool;
-#endif
-#endif
-
-typedef unsigned char uchar;
-typedef unsigned short ushort;
-typedef unsigned uint;
-typedef unsigned long ulong;
-typedef char *pchar;
-typedef uchar *puchar;
-typedef const char *pcchar;
-#if defined(_OS_WIN32_) && !defined(_CC_GNU_)
-typedef __int64 int64;
-typedef unsigned __int64 uint64;
-#else
-#if !defined(_OS_AIX_) || !defined(_H_INTTYPES)
-typedef long long int64;
-#endif
-typedef unsigned long long uint64;
-#endif
-
-
-//
-// Constant bool values
-//
-
-#ifndef TRUE
-const bool FALSE = 0;
-const bool TRUE = !0;
-#endif
-
-
-#if defined(_CC_MSVC_)
-// Workaround for static const members.
-#define QT_STATIC_CONST static
-#define QT_STATIC_CONST_IMPL
-#else
-#define QT_STATIC_CONST static const
-#define QT_STATIC_CONST_IMPL const
-#endif
-
-
-
-//
-// Utility macros and inline functions
-//
-
-#define QMAX(a,b) ((a) > (b) ? (a) : (b))
-#define QMIN(a,b) ((a) < (b) ? (a) : (b))
-#define QABS(a) ((a) >= 0 ? (a) : -(a))
-
-inline int qRound( double d )
-{
- return d > 0.0 ? int(d+0.5) : int(d-0.5);
-}
-
-
-//
-// Size-dependent types (architecture-dependent byte order)
-//
-
-// QT_CLEAN_NAMESPACE is not defined by default; it would break too
-// much code.
-#if !defined(QT_CLEAN_NAMESPACE)
-typedef signed char INT8; // 8 bit signed
-typedef unsigned char UINT8; // 8 bit unsigned
-typedef short INT16; // 16 bit signed
-typedef unsigned short UINT16; // 16 bit unsigned
-typedef int INT32; // 32 bit signed
-typedef unsigned int UINT32; // 32 bit unsigned
-#endif
-
-typedef signed char Q_INT8; // 8 bit signed
-typedef unsigned char Q_UINT8; // 8 bit unsigned
-typedef short Q_INT16; // 16 bit signed
-typedef unsigned short Q_UINT16; // 16 bit unsigned
-typedef int Q_INT32; // 32 bit signed
-typedef unsigned int Q_UINT32; // 32 bit unsigned
-typedef long Q_INT64; // up to 64 bit signed
-typedef unsigned long Q_UINT64; // up to 64 bit unsigned
-
-//
-// Data stream functions is provided by many classes (defined in qdatastream.h)
-//
-
-class QDataStream;
-
-
-
-#ifdef _WS_WIN_
-extern bool qt_winunicode;
-#endif
-
-#ifndef QT_H
-#include <qfeatures.h>
-#endif // QT_H
-
-//
-// Create Qt DLL if QT_DLL is defined (Windows only)
-//
-
-#if defined(_OS_WIN32_)
-#if defined(QT_NODLL)
-#undef QT_MAKEDLL
-#undef QT_DLL
-#endif
-#ifdef QT_DLL
-#if defined(QT_MAKEDLL) /* create a Qt DLL library */
-#undef QT_DLL
-#define Q_EXPORT __declspec(dllexport)
-#define Q_TEMPLATEDLL
-#undef Q_DISABLE_COPY /* avoid unresolved externals */
-#endif
-#endif
-#if defined(QT_DLL) /* use a Qt DLL library */
-#define Q_EXPORT __declspec(dllimport)
-#define Q_TEMPLATEDLL
-#undef Q_DISABLE_COPY /* avoid unresolved externals */
-#endif
-#else // ! _OS_WIN32_
-#undef QT_MAKEDLL /* ignore these for other platforms */
-#undef QT_DLL
-#endif
-
-#ifndef Q_EXPORT
-#define Q_EXPORT
-#endif
-
-//
-// System information
-//
-
-Q_EXPORT const char *qVersion();
-Q_EXPORT bool qSysInfo( int *wordSize, bool *bigEndian );
-
-
-//
-// Debugging and error handling
-//
-
-#if !defined(NO_CHECK)
-#define CHECK_STATE // check state of objects etc.
-#define CHECK_RANGE // check range of indexes etc.
-#define CHECK_NULL // check null pointers
-#define CHECK_MATH // check math functions
-#endif
-
-#if !defined(NO_DEBUG) && !defined(DEBUG)
-#define DEBUG // display debug messages
-#endif
-
-//
-// Avoid some particularly useless warnings from some stupid compilers.
-// To get ALL C++ compiler warnings, define CC_WARNINGS or comment out
-// the line "#define Q_NO_WARNINGS"
-//
-
-#if !defined(CC_WARNINGS)
-#define Q_NO_WARNINGS
-#endif
-#if defined(Q_NO_WARNINGS)
-#if defined(_CC_MSVC_)
-#pragma warning(disable: 4244)
-#pragma warning(disable: 4275)
-#pragma warning(disable: 4514)
-#pragma warning(disable: 4097)
-#pragma warning(disable: 4706)
-#elif defined(_CC_BOR_)
-#pragma option -w-inl
-#pragma option -w-aus
-#pragma warn -inl
-#pragma warn -pia
-#pragma warn -ccc
-#pragma warn -rch
-#pragma warn -sig
-#elif defined(_CC_MWERKS_)
-#pragma warn_possunwant off
-#endif
-#endif // Q_NO_WARNINGS
-
-//
-// Avoid dead code
-//
-
-#if defined(_CC_EDG_) || defined(_CC_WAT_)
-#define Q_NO_DEAD_CODE
-#endif
-
-//
-// Use to avoid "unused parameter" warnings
-//
-
-#define Q_UNUSED(x) x=x;
-#define Q_CONST_UNUSED(x) (void)x;
-
-Q_EXPORT void qDebug( const char *, ... ) // print debug message
-#if defined(_CC_GNU_) && !defined(__INSURE__)
- __attribute__ ((format (printf, 1, 2)))
-#endif
-;
-
-Q_EXPORT void qWarning( const char *, ... ) // print warning message
-#if defined(_CC_GNU_) && !defined(__INSURE__)
- __attribute__ ((format (printf, 1, 2)))
-#endif
-;
-
-Q_EXPORT void qFatal( const char *, ... ) // print fatal message and exit
-#if defined(_CC_GNU_)
- __attribute__ ((format (printf, 1, 2)))
-#endif
-;
-
-
-// QT_CLEAN_NAMESPACE is not defined by default; it would break too
-// much code.
-#if !defined(QT_CLEAN_NAMESPACE)
-// in that case, also define the old ones...
-
-Q_EXPORT void debug( const char *, ... ) // print debug message
-#if defined(_CC_GNU_) && !defined(__INSURE__)
- __attribute__ ((format (printf, 1, 2)))
-#endif
-;
-
-Q_EXPORT void warning( const char *, ... ) // print warning message
-#if defined(_CC_GNU_) && !defined(__INSURE__)
- __attribute__ ((format (printf, 1, 2)))
-#endif
-;
-
-Q_EXPORT void fatal( const char *, ... ) // print fatal message and exit
-#if defined(_CC_GNU_) && !defined(__INSURE__)
- __attribute__ ((format (printf, 1, 2)))
-#endif
-;
-
-// okay, that was debug()/warning()/fatal()
-#endif
-
-#if !defined(ASSERT)
-#if defined(CHECK_STATE)
-#if defined(QT_FATAL_ASSERT)
-#define ASSERT(x) if ( !(x) )\
- qFatal("ASSERT: \"%s\" in %s (%d)",#x,__FILE__,__LINE__)
-#else
-#define ASSERT(x) if ( !(x) )\
- qWarning("ASSERT: \"%s\" in %s (%d)",#x,__FILE__,__LINE__)
-#endif
-#else
-#define ASSERT(x)
-#endif
-#endif
-
-Q_EXPORT bool qt_check_pointer( bool c, const char *, int );
-
-#if defined(CHECK_NULL)
-#define CHECK_PTR(p) (qt_check_pointer((p)==0,__FILE__,__LINE__))
-#else
-#define CHECK_PTR(p)
-#endif
-
-enum QtMsgType { QtDebugMsg, QtWarningMsg, QtFatalMsg };
-
-typedef void (*msg_handler)(QtMsgType, const char *);
-Q_EXPORT msg_handler qInstallMsgHandler( msg_handler );
-
-
-Q_EXPORT void qSuppressObsoleteWarnings( bool = TRUE );
-
-#if 0
-#if !defined(QT_REJECT_OBSOLETE)
-#define QT_OBSOLETE
-Q_EXPORT void qObsolete( const char *obj, const char *oldfunc,
- const char *newfunc );
-Q_EXPORT void qObsolete( const char *obj, const char *oldfunc );
-Q_EXPORT void qObsolete( const char *message );
-#endif
-#endif
-
-// DvH: added to avoid warnings on recent gcc versions
-#define Q_DELETING_VOID_UNDEFINED
-
-#endif // QGLOBAL_H
diff --git a/qtools/qgstring.cpp b/qtools/qgstring.cpp
deleted file mode 100644
index 8b15675..0000000
--- a/qtools/qgstring.cpp
+++ /dev/null
@@ -1,258 +0,0 @@
-/******************************************************************************
- *
- * Copyright (C) 1997-2004 by Dimitri van Heesch.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation under the terms of the GNU General Public License is hereby
- * granted. No representations are made about the suitability of this software
- * for any purpose. It is provided "as is" without express or implied warranty.
- * See the GNU General Public License for more details.
- *
- * Documents produced by Doxygen are derivative works derived from the
- * input used in their production; they are not affected by this license.
- *
- */
-
-#include <stdio.h>
-#include "qgstring.h"
-
-#include <assert.h>
-
-#define BLOCK_SIZE 64
-#define ROUND_SIZE(x) ((x)+BLOCK_SIZE-1)&~(BLOCK_SIZE-1)
-
-#define DBG_STR(x) do { } while(0)
-//#define DBG_STR(x) printf x
-
-QGString::QGString() // make null string
- : m_data(0), m_len(0), m_memSize(0)
-{
- DBG_STR(("%p: QGString::QGString() %d:%s\n",this,m_len,m_data?m_data:"<none>"));
-}
-
-QGString::QGString(uint size)
-{
- if (size==0)
- {
- m_data=0;
- m_len=0;
- }
- else
- {
- m_memSize = ROUND_SIZE(size+1);
- m_data = (char*)malloc(m_memSize);
- memset(m_data,' ',size);
- m_data[size]='\0';
- m_len=size;
- }
- DBG_STR(("%p: QGString::QGString(uint size=%d) %d:%s\n",
- this,size,m_len,m_data?m_data:"<none>"));
-}
-
-QGString::QGString( const QGString &s )
-{
- if (s.m_memSize==0)
- {
- m_data = 0;
- m_len = 0;
- m_memSize = 0;
- }
- else
- {
- m_data = (char *)malloc(s.m_memSize);
- m_len = s.m_len;
- m_memSize = s.m_memSize;
- qstrcpy(m_data,s.m_data);
- }
- DBG_STR(("%p: QGString::QGString(const QGString &) %d:%s\n",this,m_len,m_data?m_data:"<none>"));
-}
-
-QGString::QGString( const char *str )
-{
- if (str==0)
- {
- m_data=0;
- m_len=0;
- m_memSize=0;
- }
- else
- {
- m_len = qstrlen(str);
- m_memSize = ROUND_SIZE(m_len+1);
- assert(m_memSize>=m_len+1);
- m_data = (char *)malloc(m_memSize);
- qstrcpy(m_data,str);
- }
- DBG_STR(("%p: QGString::QGString(const char *) %d:%s\n",this,m_len,m_data?m_data:"<none>"));
-}
-
-QGString::~QGString()
-{
- free(m_data);
- m_data=0;
- DBG_STR(("%p: QGString::~QGString() %d:%s\n",this,m_len,m_data?m_data:"<none>"));
-}
-
-bool QGString::resize( uint newlen )
-{
- m_len = 0;
- if (newlen==0)
- {
- if (m_data) { free(m_data); m_data=0; }
- m_memSize=0;
- DBG_STR(("%p: 1.QGString::resize() %d:%s\n",this,m_len,m_data?m_data:"<none>"));
- return TRUE;
- }
- m_memSize = ROUND_SIZE(newlen+1);
- assert(m_memSize>=newlen+1);
- if (m_data==0)
- {
- m_data = (char *)malloc(m_memSize);
- }
- else
- {
- m_data = (char *)realloc(m_data,m_memSize);
- }
- if (m_data==0)
- {
- DBG_STR(("%p: 2.QGString::resize() %d:%s\n",this,m_len,m_data?m_data:"<none>"));
- return FALSE;
- }
- m_data[newlen]='\0';
- m_len = qstrlen(m_data);
- DBG_STR(("%p: 3.QGString::resize() %d:%s\n",this,m_len,m_data?m_data:"<none>"));
- return TRUE;
-}
-
-bool QGString::enlarge( uint newlen )
-{
- if (newlen==0)
- {
- if (m_data) { free(m_data); m_data=0; }
- m_memSize=0;
- m_len=0;
- return TRUE;
- }
- uint newMemSize = ROUND_SIZE(newlen+1);
- if (newMemSize==m_memSize) return TRUE;
- m_memSize = newMemSize;
- if (m_data==0)
- {
- m_data = (char *)malloc(m_memSize);
- }
- else
- {
- m_data = (char *)realloc(m_data,m_memSize);
- }
- if (m_data==0)
- {
- return FALSE;
- }
- m_data[newlen-1]='\0';
- if (m_len>newlen) m_len=newlen;
- return TRUE;
-}
-
-void QGString::setLen( uint newlen )
-{
- m_len = newlen<=m_memSize ? newlen : m_memSize;
-}
-
-QGString &QGString::operator=( const QGString &s )
-{
- if (m_data) free(m_data);
- if (s.m_memSize==0) // null string
- {
- m_data = 0;
- m_len = 0;
- m_memSize = 0;
- }
- else
- {
- m_len = s.m_len;
- m_memSize = s.m_memSize;
- m_data = (char*)malloc(m_memSize);
- qstrcpy(m_data,s.m_data);
- }
- DBG_STR(("%p: QGString::operator=(const QGString &%p) %d:%s\n",
- this,&s,m_len,m_data?m_data:"<none>"));
- return *this;
-}
-
-QGString &QGString::operator=( const char *str )
-{
- if (m_data) free(m_data);
- if (str==0) // null string
- {
- m_data = 0;
- m_len = 0;
- m_memSize = 0;
- }
- else
- {
- m_len = qstrlen(str);
- m_memSize = ROUND_SIZE(m_len+1);
- assert(m_memSize>=m_len+1);
- m_data = (char*)malloc(m_memSize);
- qstrcpy(m_data,str);
- }
- DBG_STR(("%p: QGString::operator=(const char *) %d:%s\n",this,m_len,m_data?m_data:"<none>"));
- return *this;
-}
-
-QGString &QGString::operator+=( const QGString &s )
-{
- if (s.m_memSize==0) return *this;
- uint len1 = length();
- uint len2 = s.length();
- uint memSize = ROUND_SIZE(len1 + len2 + 1);
- assert(memSize>=len1+len2+1);
- char *newData = memSize!=m_memSize ? (char*)realloc( m_data, memSize ) : m_data;
- m_memSize = memSize;
- if (newData)
- {
- m_data = newData;
- memcpy( m_data + len1, s, len2 + 1 );
- }
- m_len = len1+len2;
- DBG_STR(("%p: QGString::operator+=(const QGString &) %d:%s\n",this,m_len,m_data?m_data:"<none>"));
- return *this;
-}
-
-QGString &QGString::operator+=( const char *str )
-{
- if (!str) return *this;
- uint len1 = length();
- uint len2 = qstrlen(str);
- uint memSize = ROUND_SIZE(len1 + len2 + 1);
- assert(memSize>=len1+len2+1);
- char *newData = memSize!=m_memSize ? (char *)realloc( m_data, memSize ) : m_data;
- m_memSize = memSize;
- if (newData)
- {
- m_data = newData;
- memcpy( m_data + len1, str, len2 + 1 );
- }
- m_len+=len2;
- DBG_STR(("%p: QGString::operator+=(const char *) %d:%s\n",this,m_len,m_data?m_data:"<none>"));
- return *this;
-}
-
-QGString &QGString::operator+=( char c )
-{
- uint len = m_len;
- uint memSize = ROUND_SIZE(len+2);
- assert(memSize>=len+2);
- char *newData = memSize!=m_memSize ? (char *)realloc( m_data, memSize ) : m_data;
- m_memSize = memSize;
- if (newData)
- {
- m_data = newData;
- m_data[len] = c;
- m_data[len+1] = '\0';
- }
- m_len++;
- DBG_STR(("%p: QGString::operator+=(char s) %d:%s\n",this,m_len,m_data?m_data:"<none>"));
- return *this;
-}
-
diff --git a/qtools/qgstring.h b/qtools/qgstring.h
deleted file mode 100644
index 0af1045..0000000
--- a/qtools/qgstring.h
+++ /dev/null
@@ -1,139 +0,0 @@
-#ifndef QGSTRING_H
-#define QGSTRING_H
-
-#include <stdlib.h>
-#include <string.h>
-
-#if defined(_OS_SUN_) && defined(_CC_GNU_)
-#include <strings.h>
-#endif
-
-#include "qcstring.h"
-
-/*****************************************************************************
- Fixes and workarounds for some platforms
- *****************************************************************************/
-
-/** This is an alternative implementation of QCString.
- */
-class QGString
-{
- public:
- QGString(); // make null string
- QGString(uint size);
- QGString( const QGString &s );
- QGString( const char *str );
- ~QGString() ;
-
- bool resize( uint newlen );
- bool enlarge( uint newlen );
- void setLen( uint newlen );
-
- QGString &operator=( const QGString &s );
- QGString &operator=( const char *str );
- QGString &operator+=( const QGString &s );
- QGString &operator+=( const char *str );
- QGString &operator+=( char c );
-
- bool isNull() const { return m_data==0; }
- bool isEmpty() const { return m_len==0; }
- uint length() const { return m_len; }
- uint size() const { return m_memSize; }
- char * data() const { return m_data; }
- bool truncate( uint pos ) { return resize(pos+1); }
- operator const char *() const { return (const char *)data(); }
- char &at( uint index ) const { return m_data[index]; }
- char &operator[]( uint i ) const { return at(i); }
-
- private:
- char * m_data;
- uint m_len;
- uint m_memSize;
-};
-
-/*****************************************************************************
- QGString non-member operators
- *****************************************************************************/
-
-Q_EXPORT inline bool operator==( const QGString &s1, const QGString &s2 )
-{ return qstrcmp(s1.data(),s2.data()) == 0; }
-
-Q_EXPORT inline bool operator==( const QGString &s1, const char *s2 )
-{ return qstrcmp(s1.data(),s2) == 0; }
-
-Q_EXPORT inline bool operator==( const char *s1, const QGString &s2 )
-{ return qstrcmp(s1,s2.data()) == 0; }
-
-Q_EXPORT inline bool operator!=( const QGString &s1, const QGString &s2 )
-{ return qstrcmp(s1.data(),s2.data()) != 0; }
-
-Q_EXPORT inline bool operator!=( const QGString &s1, const char *s2 )
-{ return qstrcmp(s1.data(),s2) != 0; }
-
-Q_EXPORT inline bool operator!=( const char *s1, const QGString &s2 )
-{ return qstrcmp(s1,s2.data()) != 0; }
-
-Q_EXPORT inline bool operator<( const QGString &s1, const QGString& s2 )
-{ return qstrcmp(s1.data(),s2.data()) < 0; }
-
-Q_EXPORT inline bool operator<( const QGString &s1, const char *s2 )
-{ return qstrcmp(s1.data(),s2) < 0; }
-
-Q_EXPORT inline bool operator<( const char *s1, const QGString &s2 )
-{ return qstrcmp(s1,s2.data()) < 0; }
-
-Q_EXPORT inline bool operator<=( const QGString &s1, const char *s2 )
-{ return qstrcmp(s1.data(),s2) <= 0; }
-
-Q_EXPORT inline bool operator<=( const char *s1, const QGString &s2 )
-{ return qstrcmp(s1,s2.data()) <= 0; }
-
-Q_EXPORT inline bool operator>( const QGString &s1, const char *s2 )
-{ return qstrcmp(s1.data(),s2) > 0; }
-
-Q_EXPORT inline bool operator>( const char *s1, const QGString &s2 )
-{ return qstrcmp(s1,s2.data()) > 0; }
-
-Q_EXPORT inline bool operator>=( const QGString &s1, const char *s2 )
-{ return qstrcmp(s1.data(),s2) >= 0; }
-
-Q_EXPORT inline bool operator>=( const char *s1, const QGString &s2 )
-{ return qstrcmp(s1,s2.data()) >= 0; }
-
-Q_EXPORT inline QGString operator+( const QGString &s1, const QGString &s2 )
-{
- QGString tmp( s1.data() );
- tmp += s2;
- return tmp;
-}
-
-Q_EXPORT inline QGString operator+( const QGString &s1, const char *s2 )
-{
- QGString tmp( s1.data() );
- tmp += s2;
- return tmp;
-}
-
-Q_EXPORT inline QGString operator+( const char *s1, const QGString &s2 )
-{
- QGString tmp( s1 );
- tmp += s2;
- return tmp;
-}
-
-Q_EXPORT inline QGString operator+( const QGString &s1, char c2 )
-{
- QGString tmp( s1.data() );
- tmp += c2;
- return tmp;
-}
-
-Q_EXPORT inline QGString operator+( char c1, const QGString &s2 )
-{
- QGString tmp;
- tmp += c1;
- tmp += s2;
- return tmp;
-}
-
-#endif // QGSTRING_H
diff --git a/qtools/qinternallist.h b/qtools/qinternallist.h
deleted file mode 100644
index b1cc64e..0000000
--- a/qtools/qinternallist.h
+++ /dev/null
@@ -1,138 +0,0 @@
-/****************************************************************************
-**
-**
-** Definition of QList template/macro class
-**
-** Created : 920701
-**
-** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
-**
-** This file is part of the tools module of the Qt GUI Toolkit.
-**
-** This file may be distributed under the terms of the Q Public License
-** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#ifndef QINTERNALLIST_H
-#define QINTERNALLIST_H
-
-#ifndef QT_H
-#include "qglist.h"
-#endif // QT_H
-
-
-template<class type> class Q_EXPORT QInternalList : public QGList
-{
-public:
- QInternalList() {}
- QInternalList( const QInternalList<type> &l ) : QGList(l) {}
- ~QInternalList() { clear(); }
- QInternalList<type> &operator=(const QInternalList<type> &l)
- { return (QInternalList<type>&)QGList::operator=(l); }
- bool operator==( const QInternalList<type> &list ) const
- { return QGList::operator==( list ); }
- uint count() const { return QGList::count(); }
- bool isEmpty() const { return QGList::count() == 0; }
- bool insert( uint i, const type *d){ return QGList::insertAt(i,(QCollection::Item)d); }
- void inSort( const type *d ) { QGList::inSort((QCollection::Item)d); }
- void prepend( const type *d ) { QGList::insertAt(0,(QCollection::Item)d); }
- void append( const type *d ) { QGList::append((QCollection::Item)d); }
- bool remove( uint i ) { return QGList::removeAt(i); }
- bool remove() { return QGList::remove((QCollection::Item)0); }
- bool remove( const type *d ) { return QGList::remove((QCollection::Item)d); }
- bool removeRef( const type *d ) { return QGList::removeRef((QCollection::Item)d); }
- void removeNode( QLNode *n ) { QGList::removeNode(n); }
- bool removeFirst() { return QGList::removeFirst(); }
- bool removeLast() { return QGList::removeLast(); }
- type *take( uint i ) { return (type *)QGList::takeAt(i); }
- type *take() { return (type *)QGList::take(); }
- type *takeNode( QLNode *n ) { return (type *)QGList::takeNode(n); }
- void clear() { QGList::clear(); }
- void sort() { QGList::sort(); }
- int find( const type *d ) { return QGList::find((QCollection::Item)d); }
- int findNext( const type *d ) { return QGList::find((QCollection::Item)d,FALSE); }
- int findRef( const type *d ) { return QGList::findRef((QCollection::Item)d); }
- int findNextRef( const type *d ){ return QGList::findRef((QCollection::Item)d,FALSE);}
- uint contains( const type *d ) const { return QGList::contains((QCollection::Item)d); }
- uint containsRef( const type *d ) const
- { return QGList::containsRef((QCollection::Item)d); }
- type *at( uint i ) { return (type *)QGList::at(i); }
- int at() const { return QGList::at(); }
- type *current() const { return (type *)QGList::get(); }
- QLNode *currentNode() const { return QGList::currentNode(); }
- type *getFirst() const { return (type *)QGList::cfirst(); }
- type *getLast() const { return (type *)QGList::clast(); }
- type *first() { return (type *)QGList::first(); }
- type *last() { return (type *)QGList::last(); }
- type *next() { return (type *)QGList::next(); }
- type *prev() { return (type *)QGList::prev(); }
-private:
- void deleteItem( QCollection::Item d );
-};
-
-#if defined(Q_DELETING_VOID_UNDEFINED)
-template<> inline void QInternalList<void>::deleteItem( QCollection::Item )
-{
-}
-#endif
-
-template<class type> inline void QInternalList<type>::deleteItem( QCollection::Item d )
-{
- if ( del_item ) delete (type *)d;
-}
-
-
-template<class type> class Q_EXPORT QInternalListIterator : public QGListIterator
-{
-public:
- QInternalListIterator(const QInternalList<type> &l) :QGListIterator((QGList &)l) {}
- ~QInternalListIterator() {}
- uint count() const { return list->count(); }
- bool isEmpty() const { return list->count() == 0; }
- bool atFirst() const { return QGListIterator::atFirst(); }
- bool atLast() const { return QGListIterator::atLast(); }
- type *toFirst() { return (type *)QGListIterator::toFirst(); }
- type *toLast() { return (type *)QGListIterator::toLast(); }
- operator type *() const { return (type *)QGListIterator::get(); }
- type *operator*() { return (type *)QGListIterator::get(); }
-
- // No good, since QList<char> (ie. QStrList fails...
- //
- // MSVC++ gives warning
- // Sunpro C++ 4.1 gives error
- // type *operator->() { return (type *)QGListIterator::get(); }
-
- type *current() const { return (type *)QGListIterator::get(); }
- type *operator()() { return (type *)QGListIterator::operator()();}
- type *operator++() { return (type *)QGListIterator::operator++(); }
- type *operator+=(uint j) { return (type *)QGListIterator::operator+=(j);}
- type *operator--() { return (type *)QGListIterator::operator--(); }
- type *operator-=(uint j) { return (type *)QGListIterator::operator-=(j);}
- QInternalListIterator<type>& operator=(const QInternalListIterator<type>&it)
- { QGListIterator::operator=(it); return *this; }
-};
-
-
-#endif // QINTERNALLIST_H
diff --git a/qtools/qiodevice.cpp b/qtools/qiodevice.cpp
deleted file mode 100644
index b52475c..0000000
--- a/qtools/qiodevice.cpp
+++ /dev/null
@@ -1,638 +0,0 @@
-/****************************************************************************
-**
-**
-** Implementation of QIODevice class
-**
-** Created : 940913
-**
-** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
-**
-** This file is part of the tools module of the Qt GUI Toolkit.
-**
-** This file may be distributed under the terms of the Q Public License
-** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#include "qiodevice.h"
-
-// NOT REVISED
-/*!
- \class QIODevice qiodevice.h
-
- \brief The QIODevice class is the base class of I/O devices.
-
- \ingroup io
-
- An I/O device represents a medium that one can read bytes from
- and/or write bytes to. The QIODevice class is the abstract
- superclass of all such devices; classes like QFile, QBuffer and
- QSocket inherit QIODevice and implement virtual functions like
- write() appropriately.
-
- While applications sometimes use QIODevice directly, mostly it is
- better to go through QTextStream and QDataStream, which provide
- stream operations on any QIODevice subclass. QTextStream provides
- text-oriented stream functionality (for human-readable ASCII files,
- for example), while QDataStream deals with binary data in a totally
- platform-independent manner.
-
- The public member functions in QIODevice roughly fall into two
- groups: The action functions and the state access functions. The
- most important action functions are: <ul>
-
- <li> open() opens a device for reading and/or writing, depending on
- the argument to open().
-
- <li> close() closes the device and tidies up.
-
- <li> readBlock() reads a block of data from the device.
-
- <li> writeBlock() writes a block of data to the device.
-
- <li> readLine() reads a line (of text, usually) from the device.
-
- <li> flush() ensures that all buffered data are written to the real device.
-
- </ul>There are also some other, less used, action functions: <ul>
-
- <li> getch() reads a single character.
-
- <li> ungetch() forgets the last call to getch(), if possible.
-
- <li> putch() writes a single character.
-
- <li> size() returns the size of the device, if there is one.
-
- <li> at() returns the current read/write pointer, if there is one
- for this device, or it moves the pointer.
-
- <li> atEnd() says whether there is more to read, if that is a
- meaningful question for this device.
-
- <li> reset() moves the read/write pointer to the start of the
- device, if that is possible for this device.
-
- </ul>The state access are all "get" functions. The QIODevice subclass
- calls setState() to update the state, and simple access functions
- tell the user of the device what the device's state is. Here are
- the settings, and their associated access functions: <ul>
-
- <li> Access type. Some devices are direct access (it is possible to
- read/write anywhere) while others are sequential. QIODevice
- provides the access functions isDirectAccess(), isSequentialAccess()
- and isCombinedAccess() to tell users what a given I/O device
- supports.
-
- <li> Buffering. Some devices are accessed in raw mode while others
- are buffered. Buffering usually provides greater efficiency,
- particularly for small read/write operations. isBuffered() tells
- the user whether a given device is buffered. (This can often be set
- by the application in the call to open().)
-
- <li> Synchronicity. Synchronous devices work there and then, for
- example files. When you read from a file, the file delivers its
- data right away. Others, such as a socket connected to a HTTP
- server, may not deliver the data until seconds after you ask to read
- it. isSynchronous() and isAsynchronous() tells the user how this
- device operates.
-
- <li> CR/LF translation. For simplicity, applications often like to
- see just a single CR/LF style, and QIODevice subclasses can provide
- that. isTranslated() returns TRUE if this object translates CR/LF
- to just LF. (This can often be set by the application in the call
- to open().)
-
- <li> Accessibility. Some files cannot be written, for example.
- isReadable(), isWritable and isReadWrite() tells the application
- whether it can read from and write to a given device. (This can
- often be set by the application in the call to open().)
-
- <li> Finally, isOpen() returns TRUE if the device is open. This can
- quite obviously be set using open() :)
-
- </ul>
-
- QIODevice provides numerous pure virtual functions you need to
- implement when subclassing it. Here is a skeleton subclass with all
- the members you are certain to need, and some it's likely that you
- will need:
-
- \code
- class YourDevice : public QIODevice
- {
- public:
- YourDevice();
- ~YourDevice();
-
- bool open( int mode );
- void close();
- void flush();
-
- uint size() const;
- int at() const; // not a pure virtual function
- bool at( int ); // not a pure virtual function
- bool atEnd() const; // not a pure virtual function
-
- int readBlock( char *data, uint maxlen );
- int writeBlock( const char *data, uint len );
- int readLine( char *data, uint maxlen );
-
- int getch();
- int putch( int );
- int ungetch( int );
- };
- \endcode
-
- The three non-pure virtual functions can be ignored if your device
- is sequential (e.g. an RS-232 port).
-
- \sa QDataStream, QTextStream
-*/
-
-
-/*!
- Constructs an I/O device.
-*/
-
-QIODevice::QIODevice()
-{
- ioMode = 0; // initial mode
- ioSt = IO_Ok;
- ioIndex = 0;
-}
-
-/*!
- Destructs the I/O device.
-*/
-
-QIODevice::~QIODevice()
-{
-}
-
-
-/*!
- \fn int QIODevice::flags() const
- Returns the current I/O device flags setting.
-
- Flags consists of mode flags and state flags.
-
- \sa mode(), state()
-*/
-
-/*!
- \fn int QIODevice::mode() const
- Returns bits OR'ed together that specify the current operation mode.
-
- These are the flags that were given to the open() function.
-
- The flags are: \c IO_ReadOnly, \c IO_WriteOnly, \c IO_ReadWrite,
- \c IO_Append, \c IO_Truncate and \c IO_Translate.
-*/
-
-/*!
- \fn int QIODevice::state() const
- Returns bits OR'ed together that specify the current state.
-
- The flags are: \c IO_Open.
-
- Subclasses may define more flags.
-*/
-
-/*!
- \fn bool QIODevice::isDirectAccess() const
- Returns TRUE if the I/O device is a direct access (not sequential) device,
- otherwise FALSE.
- \sa isSequentialAccess()
-*/
-
-/*!
- \fn bool QIODevice::isSequentialAccess() const
- Returns TRUE if the I/O device is a sequential access (not direct) device,
- otherwise FALSE. Operations involving size() and at(int) are not valid
- on sequential devices.
- \sa isDirectAccess()
-*/
-
-/*!
- \fn bool QIODevice::isCombinedAccess() const
- Returns TRUE if the I/O device is a combined access (both direct and
- sequential) device, otherwise FALSE.
-
- This access method is currently not in use.
-*/
-
-/*!
- \fn bool QIODevice::isBuffered() const
- Returns TRUE if the I/O device is a buffered (not raw) device, otherwise
- FALSE.
- \sa isRaw()
-*/
-
-/*!
- \fn bool QIODevice::isRaw() const
- Returns TRUE if the I/O device is a raw (not buffered) device, otherwise
- FALSE.
- \sa isBuffered()
-*/
-
-/*!
- \fn bool QIODevice::isSynchronous() const
- Returns TRUE if the I/O device is a synchronous device, otherwise
- FALSE.
- \sa isAsynchronous()
-*/
-
-/*!
- \fn bool QIODevice::isAsynchronous() const
- Returns TRUE if the I/O device is a asynchronous device, otherwise
- FALSE.
-
- This mode is currently not in use.
-
- \sa isSynchronous()
-*/
-
-/*!
- \fn bool QIODevice::isTranslated() const
- Returns TRUE if the I/O device translates carriage-return and linefeed
- characters.
-
- A QFile is translated if it is opened with the \c IO_Translate mode
- flag.
-*/
-
-/*!
- \fn bool QIODevice::isReadable() const
- Returns TRUE if the I/O device was opened using \c IO_ReadOnly or
- \c IO_ReadWrite mode.
- \sa isWritable(), isReadWrite()
-*/
-
-/*!
- \fn bool QIODevice::isWritable() const
- Returns TRUE if the I/O device was opened using \c IO_WriteOnly or
- \c IO_ReadWrite mode.
- \sa isReadable(), isReadWrite()
-*/
-
-/*!
- \fn bool QIODevice::isReadWrite() const
- Returns TRUE if the I/O device was opened using \c IO_ReadWrite mode.
- \sa isReadable(), isWritable()
-*/
-
-/*!
- \fn bool QIODevice::isInactive() const
- Returns TRUE if the I/O device state is 0, i.e. the device is not open.
- \sa isOpen()
-*/
-
-/*!
- \fn bool QIODevice::isOpen() const
- Returns TRUE if the I/O device state has been opened, otherwise FALSE.
- \sa isInactive()
-*/
-
-
-/*!
- \fn int QIODevice::status() const
- Returns the I/O device status.
-
- The I/O device status returns an error code. If open() returns FALSE
- or readBlock() or writeBlock() return -1, this function can be called to
- get the reason why the operation did not succeed.
-
- The status codes are:
- <ul>
- <li>\c IO_Ok The operation was successful.
- <li>\c IO_ReadError Could not read from the device.
- <li>\c IO_WriteError Could not write to the device.
- <li>\c IO_FatalError A fatal unrecoverable error occurred.
- <li>\c IO_OpenError Could not open the device.
- <li>\c IO_ConnectError Could not connect to the device.
- <li>\c IO_AbortError The operation was unexpectedly aborted.
- <li>\c IO_TimeOutError The operation timed out.
- <li>\c IO_OnCloseError An unspecified error happened on close.
- </ul>
-
- \sa resetStatus()
-*/
-
-/*!
- \fn void QIODevice::resetStatus()
-
- Sets the I/O device status to \c IO_Ok.
-
- \sa status()
-*/
-
-
-/*!
- \fn void QIODevice::setFlags( int f )
- \internal
- Used by subclasses to set the device flags.
-*/
-
-/*!
- \internal
- Used by subclasses to set the device type.
-*/
-
-void QIODevice::setType( int t )
-{
-#if defined(CHECK_RANGE)
- if ( (t & IO_TypeMask) != t )
- qWarning( "QIODevice::setType: Specified type out of range" );
-#endif
- ioMode &= ~IO_TypeMask; // reset type bits
- ioMode |= t;
-}
-
-/*!
- \internal
- Used by subclasses to set the device mode.
-*/
-
-void QIODevice::setMode( int m )
-{
-#if defined(CHECK_RANGE)
- if ( (m & IO_ModeMask) != m )
- qWarning( "QIODevice::setMode: Specified mode out of range" );
-#endif
- ioMode &= ~IO_ModeMask; // reset mode bits
- ioMode |= m;
-}
-
-/*!
- \internal
- Used by subclasses to set the device state.
-*/
-
-void QIODevice::setState( int s )
-{
-#if defined(CHECK_RANGE)
- if ( ((uint)s & IO_StateMask) != (uint)s )
- qWarning( "QIODevice::setState: Specified state out of range" );
-#endif
- ioMode &= ~IO_StateMask; // reset state bits
- ioMode |= (uint)s;
-}
-
-/*!
- \internal
- Used by subclasses to set the device status (not state).
-*/
-
-void QIODevice::setStatus( int s )
-{
- ioSt = s;
-}
-
-
-/*!
- \fn bool QIODevice::open( int mode )
- Opens the I/O device using the specified \e mode.
- Returns TRUE if successful, or FALSE if the device could not be opened.
-
- The mode parameter \e m must be a combination of the following flags.
- <ul>
- <li>\c IO_Raw specified raw (unbuffered) file access.
- <li>\c IO_ReadOnly opens a file in read-only mode.
- <li>\c IO_WriteOnly opens a file in write-only mode.
- <li>\c IO_ReadWrite opens a file in read/write mode.
- <li>\c IO_Append sets the file index to the end of the file.
- <li>\c IO_Truncate truncates the file.
- <li>\c IO_Translate enables carriage returns and linefeed translation
- for text files under MS-DOS, Window, OS/2 and Macintosh. On Unix systems
- this flag has no effect. Use with caution as it will also transform every linefeed
- written to the file into a CRLF pair. This is likely to corrupt your file when
- writing binary data to it. Cannot be combined with \c IO_Raw.
- </ul>
-
- This virtual function must be reimplemented by all subclasses.
-
- \sa close()
-*/
-
-/*!
- \fn void QIODevice::close()
- Closes the I/O device.
-
- This virtual function must be reimplemented by all subclasses.
-
- \sa open()
-*/
-
-/*!
- \fn void QIODevice::flush()
-
- Flushes an open I/O device.
-
- This virtual function must be reimplemented by all subclasses.
-*/
-
-
-/*!
- \fn uint QIODevice::size() const
- Virtual function that returns the size of the I/O device.
- \sa at()
-*/
-
-/*!
- Virtual function that returns the current I/O device index.
-
- This index is the data read/write head of the I/O device.
-
- \sa size()
-*/
-
-int QIODevice::at() const
-{
- return ioIndex;
-}
-
-/*!
- Virtual function that sets the I/O device index to \e pos.
- \sa size()
-*/
-
-bool QIODevice::at( int pos )
-{
-#if defined(CHECK_RANGE)
- if ( (uint)pos > size() ) {
- qWarning( "QIODevice::at: Index %d out of range", pos );
- return FALSE;
- }
-#endif
- ioIndex = pos;
- return TRUE;
-}
-
-/*!
- Virtual function that returns TRUE if the I/O device index is at the
- end of the input.
-*/
-
-bool QIODevice::atEnd() const
-{
- if ( isSequentialAccess() || isTranslated() ) {
- QIODevice* that = (QIODevice*)this;
- int c = that->getch();
- bool result = c < 0;
- that->ungetch(c);
- return result;
- } else {
- return at() == (int)size();
- }
-}
-
-/*!
- \fn bool QIODevice::reset()
- Sets the device index to 0.
- \sa at()
-*/
-
-
-/*!
- \fn int QIODevice::readBlock( char *data, uint maxlen )
- Reads at most \e maxlen bytes from the I/O device into \e data and
- returns the number of bytes actually read.
-
- This virtual function must be reimplemented by all subclasses.
-
- \sa writeBlock()
-*/
-
-/*!
- This convenience function returns all of the remaining data in the
- device. Note that this only works for direct access devices, such
- as QFile.
-
- \sa isDirectAccess()
-*/
-QByteArray QIODevice::readAll()
-{
- int n = size()-at();
- QByteArray ba(size()-at());
- char* c = ba.data();
- while ( n ) {
- int r = readBlock( c, n );
- if ( r < 0 )
- return QByteArray();
- n -= r;
- c += r;
- }
- return ba;
-}
-
-/*!
- \fn int QIODevice::writeBlock( const char *data, uint len )
- Writes \e len bytes from \e p to the I/O device and returns the number of
- bytes actually written.
-
- This virtual function must be reimplemented by all subclasses.
-
- \sa readBlock()
-*/
-
-/*!
- This convenience function is the same as calling
- writeBlock( data.data(), data.size() ).
-*/
-int QIODevice::writeBlock( const QByteArray& data )
-{
- return writeBlock( data.data(), data.size() );
-}
-
-/*!
- Reads a line of text, up to \e maxlen bytes including a terminating
- \0. If there is a newline at the end if the line, it is not stripped.
-
- Returns the number of bytes read, or -1 in case of error.
-
- This virtual function can be reimplemented much more efficiently by
- the most subclasses.
-
- \sa readBlock(), QTextStream::readLine()
-*/
-
-int QIODevice::readLine( char *data, uint maxlen )
-{
- if ( maxlen == 0 ) // application bug?
- return 0;
- int pos = at(); // get current position
- int s = (int)size(); // size of I/O device
- char *p = data;
- if ( pos >= s )
- return 0;
- while ( pos++ < s && --maxlen ) { // read one byte at a time
- readBlock( p, 1 );
- if ( *p++ == '\n' ) // end of line
- break;
- }
- *p++ = '\0';
- return (int)((intptr_t)p - (intptr_t)data);
-}
-
-
-/*!
- \fn int QIODevice::getch()
-
- Reads a single byte/character from the I/O device.
-
- Returns the byte/character read, or -1 if the end of the I/O device has been
- reached.
-
- This virtual function must be reimplemented by all subclasses.
-
- \sa putch(), ungetch()
-*/
-
-/*!
- \fn int QIODevice::putch( int ch )
-
- Writes the character \e ch to the I/O device.
-
- Returns \e ch, or -1 if some error occurred.
-
- This virtual function must be reimplemented by all subclasses.
-
- \sa getch(), ungetch()
-*/
-
-/*!
- \fn int QIODevice::ungetch( int ch )
-
- Puts the character \e ch back into the I/O device and decrements the
- index if it is not zero.
-
- This function is normally called to "undo" a getch() operation.
-
- Returns \e ch, or -1 if some error occurred.
-
- This virtual function must be reimplemented by all subclasses.
-
- \sa getch(), putch()
-*/
diff --git a/qtools/qiodevice.h b/qtools/qiodevice.h
deleted file mode 100644
index 1c54217..0000000
--- a/qtools/qiodevice.h
+++ /dev/null
@@ -1,155 +0,0 @@
-/****************************************************************************
-**
-**
-** Definition of QIODevice class
-**
-** Created : 940913
-**
-** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
-**
-** This file is part of the tools module of the Qt GUI Toolkit.
-**
-** This file may be distributed under the terms of the Q Public License
-** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#ifndef QIODEVICE_H
-#define QIODEVICE_H
-
-#ifndef QT_H
-#include "qglobal.h"
-#include "qcstring.h"
-#endif // QT_H
-
-
-// IO device access types
-
-#define IO_Direct 0x0100 // direct access device
-#define IO_Sequential 0x0200 // sequential access device
-#define IO_Combined 0x0300 // combined direct/sequential
-#define IO_TypeMask 0x0f00
-
-// IO handling modes
-
-#define IO_Raw 0x0040 // raw access (not buffered)
-#define IO_Async 0x0080 // asynchronous mode
-
-// IO device open modes
-
-#define IO_ReadOnly 0x0001 // readable device
-#define IO_WriteOnly 0x0002 // writable device
-#define IO_ReadWrite 0x0003 // read+write device
-#define IO_Append 0x0004 // append
-#define IO_Truncate 0x0008 // truncate device
-#define IO_Translate 0x0010 // translate CR+LF
-#define IO_ModeMask 0x00ff
-
-// IO device state
-
-#define IO_Open 0x1000 // device is open
-#define IO_StateMask 0xf000
-
-
-// IO device status
-
-#define IO_Ok 0
-#define IO_ReadError 1 // read error
-#define IO_WriteError 2 // write error
-#define IO_FatalError 3 // fatal unrecoverable error
-#define IO_ResourceError 4 // resource limitation
-#define IO_OpenError 5 // cannot open device
-#define IO_ConnectError 5 // cannot connect to device
-#define IO_AbortError 6 // abort error
-#define IO_TimeOutError 7 // time out
-#define IO_UnspecifiedError 8 // unspecified error
-
-class Q_EXPORT QIODevice // IO device class
-{
-public:
- QIODevice();
- virtual ~QIODevice();
-
- int flags() const { return ioMode; }
- int mode() const { return ioMode & IO_ModeMask; }
- int state() const { return ioMode & IO_StateMask; }
-
- bool isDirectAccess() const { return ((ioMode & IO_Direct) == IO_Direct); }
- bool isSequentialAccess() const { return ((ioMode & IO_Sequential) == IO_Sequential); }
- bool isCombinedAccess() const { return ((ioMode & IO_Combined) == IO_Combined); }
- bool isBuffered() const { return ((ioMode & IO_Raw) != IO_Raw); }
- bool isRaw() const { return ((ioMode & IO_Raw) == IO_Raw); }
- bool isSynchronous() const { return ((ioMode & IO_Async) != IO_Async); }
- bool isAsynchronous() const { return ((ioMode & IO_Async) == IO_Async); }
- bool isTranslated() const { return ((ioMode & IO_Translate) == IO_Translate); }
- bool isReadable() const { return ((ioMode & IO_ReadOnly) == IO_ReadOnly); }
- bool isWritable() const { return ((ioMode & IO_WriteOnly) == IO_WriteOnly); }
- bool isReadWrite() const { return ((ioMode & IO_ReadWrite) == IO_ReadWrite); }
- bool isInactive() const { return state() == 0; }
- bool isOpen() const { return state() == IO_Open; }
-
- int status() const { return ioSt; }
- void resetStatus() { ioSt = IO_Ok; }
-
- virtual bool open( int mode ) = 0;
- virtual void close() = 0;
- virtual void flush() = 0;
-
- virtual uint size() const = 0;
- virtual int at() const;
- virtual bool at( int );
- virtual bool atEnd() const;
- bool reset() { return at(0); }
-
- virtual int readBlock( char *data, uint maxlen ) = 0;
- virtual int writeBlock( const char *data, uint len ) = 0;
- virtual int readLine( char *data, uint maxlen );
- int writeBlock( const QByteArray& data );
- QByteArray readAll();
-
- virtual int getch() = 0;
- virtual int putch( int ) = 0;
- virtual int ungetch( int ) = 0;
-
-protected:
- void setFlags( int f ) { ioMode = f; }
- void setType( int );
- void setMode( int );
- void setState( int );
- void setStatus( int );
- int ioIndex;
-
-private:
- int ioMode;
- int ioSt;
-
-private: // Disabled copy constructor and operator=
-#if defined(Q_DISABLE_COPY)
- QIODevice( const QIODevice & );
- QIODevice &operator=( const QIODevice & );
-#endif
-};
-
-
-#endif // QIODEVICE_H
diff --git a/qtools/qlist.h b/qtools/qlist.h
deleted file mode 100644
index eaaa674..0000000
--- a/qtools/qlist.h
+++ /dev/null
@@ -1,158 +0,0 @@
-/****************************************************************************
-**
-**
-** Definition of QList template/macro class
-**
-** Created : 920701
-**
-** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
-**
-** This file is part of the tools module of the Qt GUI Toolkit.
-**
-** This file may be distributed under the terms of the Q Public License
-** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-/* This is a stripped version of the original QList, which has been renamed to
- QInternalList. This implementation doesn't expose the current node and index,
- nor direct access to the list nodes.
- This makes it possible to have more constant methods. It also provides
- a typesafe method to compare elements called compareValues() and a typesafe
- methods to create and delete elements called newValue() and deleteValue().
- */
-
-#ifndef QLIST_H
-#define QLIST_H
-
-#ifndef QT_H
-#include "qglist.h"
-#endif // QT_H
-
-
-template<class type> class Q_EXPORT QList : private QGList
-{
-public:
- QList() {}
- QList( const QList<type> &l ) : QGList(l) {}
- ~QList() { clear(); }
- QList<type> &operator=(const QList<type> &l)
- { return (QList<type>&)QGList::operator=(l); }
- bool operator==( const QList<type> &list ) const
- { return QGList::operator==( list ); }
-
- // capacity
- uint count() const { return QGList::count(); }
- bool isEmpty() const { return QGList::count() == 0; }
-
- // modifiers add
- bool insert( uint i, const type *d){ return QGList::insertAt(i,(QCollection::Item)d); }
- void inSort( const type *d ) { QGList::inSort((QCollection::Item)d); }
- void prepend( const type *d ) { QGList::insertAt(0,(QCollection::Item)d); }
- void append( const type *d ) { QGList::append((QCollection::Item)d); }
-
- // modifiers remove
- bool remove( uint i ) { return QGList::removeAt(i); }
- bool remove( const type *d ) { return QGList::remove((QCollection::Item)d); }
- bool removeRef( const type *d ) { return QGList::removeRef((QCollection::Item)d); }
- bool removeFirst() { return QGList::removeFirst(); }
- bool removeLast() { return QGList::removeLast(); }
- type *take( uint i ) { return (type *)QGList::takeAt(i); }
- void clear() { QGList::clear(); }
-
- // operations
- void sort() { QGList::sort(); }
-
- // search
- int find( const type *d ) const { return const_cast<QList<type>*>(this)->QGList::find((QCollection::Item)d); }
- int findRef( const type *d ) const { return const_cast<QList<type>*>(this)->QGList::findRef((QCollection::Item)d); }
- uint contains( const type *d ) const { return QGList::contains((QCollection::Item)d); }
- uint containsRef( const type *d ) const { return QGList::containsRef((QCollection::Item)d); }
-
- // element access
- type *at( uint i ) const { return (type *)const_cast<QList<type>*>(this)->QGList::at(i); }
- type *getFirst() const { return (type *)QGList::cfirst(); }
- type *getLast() const { return (type *)QGList::clast(); }
-
- // ownership
- void setAutoDelete( bool enable ) { QGList::setAutoDelete(enable); }
- bool autoDelete() const { return QGList::autoDelete(); }
-
-private:
- // new to be reimplemented methods
- virtual int compareValues(const type *t1,const type *t2) const
- { return const_cast<QList<type>*>(this)->QGList::compareItems((QCollection::Item)t1,(QCollection::Item)t2); }
- virtual type *newValue(type *item) const
- { return item; }
- virtual void deleteValue(type *item) const
- { if (del_item) delete item; }
-
- // reimplemented methods
- virtual Item newItem( Item item)
- { return (Item)newValue((type*)item); }
- virtual void deleteItem( QCollection::Item item )
- { deleteValue((type *)item); }
- virtual int compareItems(QCollection::Item i1,QCollection::Item i2)
- { return compareValues((const type*)i1,(const type*)i2); }
-};
-
-#if defined(Q_DELETING_VOID_UNDEFINED)
-template<> inline void QList<void>::deleteValue(void *) const
-{
-}
-#endif
-
-
-template<class type> class Q_EXPORT QListIterator : public QGListIterator
-{
-public:
- QListIterator(const QList<type> &l) :QGListIterator((QGList &)l) {}
- ~QListIterator() {}
- uint count() const { return list->count(); }
- bool isEmpty() const { return list->count() == 0; }
- bool atFirst() const { return QGListIterator::atFirst(); }
- bool atLast() const { return QGListIterator::atLast(); }
- type *toFirst() { return (type *)QGListIterator::toFirst(); }
- type *toLast() { return (type *)QGListIterator::toLast(); }
- operator type *() const { return (type *)QGListIterator::get(); }
- type *operator*() { return (type *)QGListIterator::get(); }
-
- // No good, since QList<char> (ie. QStrList fails...
- //
- // MSVC++ gives warning
- // Sunpro C++ 4.1 gives error
- // type *operator->() { return (type *)QGListIterator::get(); }
-
- type *current() const { return (type *)QGListIterator::get(); }
- type *operator()() { return (type *)QGListIterator::operator()();}
- type *operator++() { return (type *)QGListIterator::operator++(); }
- type *operator+=(uint j) { return (type *)QGListIterator::operator+=(j);}
- type *operator--() { return (type *)QGListIterator::operator--(); }
- type *operator-=(uint j) { return (type *)QGListIterator::operator-=(j);}
- QListIterator<type>& operator=(const QListIterator<type>&it)
- { QGListIterator::operator=(it); return *this; }
-};
-
-
-#endif // QLIST_H
diff --git a/qtools/qmodules.h b/qtools/qmodules.h
deleted file mode 100644
index 08f0baf..0000000
--- a/qtools/qmodules.h
+++ /dev/null
@@ -1,11 +0,0 @@
-// These modules are licensed to you
-#define QT_MODULE_TOOLS
-#define QT_MODULE_KERNEL
-#define QT_MODULE_WIDGETS
-#define QT_MODULE_DIALOGS
-#define QT_MODULE_ICONVIEW
-#define QT_MODULE_WORKSPACE
-#define QT_MODULE_NETWORK
-#define QT_MODULE_CANVAS
-#define QT_MODULE_TABLE
-#define QT_MODULE_XML
diff --git a/qtools/qptrdict.doc b/qtools/qptrdict.doc
deleted file mode 100644
index 633536c..0000000
--- a/qtools/qptrdict.doc
+++ /dev/null
@@ -1,486 +0,0 @@
-/****************************************************************************
-**
-**
-** QPtrDict and QPtrDictIterator class documentation
-**
-** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
-**
-** This file is part of the Qt GUI Toolkit.
-**
-** This file may be distributed under the terms of the Q Public License
-** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-
-/*****************************************************************************
- QPtrDict documentation
- *****************************************************************************/
-
-/*!
- \class QPtrDict qptrdict.h
- \brief The QPtrDict class is a template class that provides a dictionary based on \c void* keys.
-
- \ingroup collection
- \ingroup tools
-
- QPtrDict is implemented as a template class. Define a
- template instance QPtrDict\<X\> to create a dictionary that operates on
- pointers to X, or X*.
-
- A dictionary is a collection that associates an item with a key.
- The key is used for inserting and looking up an item. QPtrDict has
- \c void* keys.
-
- The dictionary has very fast insertion and lookup.
-
- Example:
- \code
- #include <qptrdict.h>
- #include <stdio.h>
-
- void main()
- {
- int *a = new int[12];
- int *b = new int[10];
- int *c = new int[18];
- int *d = new int[13];
-
- QPtrDict<char> dict; // maps void* -> char*
-
- dict.insert( a, "a is int[12]" ); // describe pointers
- dict.insert( b, "b is int[10]" );
- dict.insert( c, "c is int[18]" );
-
- printf( "%s\n", dict[a] ); // print descriptions
- printf( "%s\n", dict[b] );
- printf( "%s\n", dict[c] );
-
- if ( !dict[d] )
- printf( "d not in dictionary\n" );
- }
- \endcode
-
- Program output:
- \code
- a is int[12]
- b is int[10]
- c is int[18]
- d not in dictionary
- \endcode
-
- The dictionary in our example maps \c int* keys to \c char* items.
- QPtrDict implements the \link operator[] [] operator\endlink to lookup
- an item.
-
- QPtrDict is implemented by QGDict as a hash array with a fixed number of
- entries. Each array entry points to a singly linked list of buckets, in
- which the dictionary items are stored.
-
- When an item is inserted with a key, the key is converted (hashed) to
- an integer index into the hash array using the \c mod operation. The
- item is inserted before the first bucket in the list of buckets.
-
- Looking up an item is normally very fast. The key is again hashed to an
- array index. Then QPtrDict scans the list of buckets and returns the item
- found or null if the item was not found. You cannot insert null pointers
- into a dictionary.
-
- The size of the hash array is very important. In order to get good
- performance, you should use a suitably large \link primes.html prime
- number\endlink. Suitable means equal to or larger than the maximum
- expected number of dictionary items.
-
- Items with equal keys are allowed. When inserting two items with the
- same key, only the last inserted item will be visible (last in, first out)
- until it is removed.
-
- Example:
- \code
- #include <qptrdict.h>
- #include <stdio.h>
-
- void main()
- {
- QPtrDict<char> dict; // maps char* ==> char*
-
- double *ptr = new double[28];
- dict.insert( ptr, "first" );
- dict.insert( ptr, "second" );
-
- printf( "%s\n", dict[ptr] );
- dict.remove( ptr );
- printf( "%s\n", dict[ptr] );
- }
- \endcode
-
- Program output:
- \code
- second
- first
- \endcode
-
- The QPtrDictIterator class can traverse the dictionary contents, but only
- in an arbitrary order. Multiple iterators may independently traverse the
- same dictionary.
-
- Calling setAutoDelete(TRUE) for a dictionary tells it to delete items
- that are removed . The default is to not delete items when they are
- removed.
-
- When inserting an item into a dictionary, only the pointer is copied, not
- the item itself. This is called a shallow copy. It is possible to make the
- dictionary copy all of the item's data (known as a deep copy) when an
- item is inserted. insert() calls the virtual function
- QCollection::newItem() for the item to be inserted.
- Inherit a dictionary and reimplement it if you want deep copies.
-
- When removing a dictionary item, the virtual function
- QCollection::deleteItem() is called. QPtrDict's default implementation
- is to delete the item if auto-deletion is enabled.
-
- \sa QPtrDictIterator, QDict, QAsciiDict, QIntDict,
- \link collection.html Collection Classes\endlink
-*/
-
-
-/*!
- \fn QPtrDict::QPtrDict( int size )
- Constructs a dictionary using an internal hash array with the size
- \e size.
-
- Setting \e size to a suitably large \link primes.html prime number\endlink
- (equal to or greater than the expected number of entries) makes the hash
- distribution better and hence the lookup faster.
-*/
-
-/*!
- \fn QPtrDict::QPtrDict( const QPtrDict<type> &dict )
- Constructs a copy of \e dict.
-
- Each item in \e dict are inserted into this dictionary.
- Only the pointers are copied (shallow copy).
-*/
-
-/*!
- \fn QPtrDict::~QPtrDict()
- Removes all items from the dictionary and destroys it.
-
- All iterators that access this dictionary will be reset.
-
- \sa setAutoDelete()
-*/
-
-/*!
- \fn QPtrDict<type> &QPtrDict::operator=(const QPtrDict<type> &dict)
- Assigns \e dict to this dictionary and returns a reference to this
- dictionary.
-
- This dictionary is first cleared, then each item in \e dict is inserted
- into this dictionary.
- Only the pointers are copied (shallow copy), unless newItem() has been
- reimplemented().
-*/
-
-/*!
- \fn uint QPtrDict::count() const
- Returns the number of items in the dictionary.
- \sa isEmpty()
-*/
-
-/*!
- \fn uint QPtrDict::size() const
- Returns the size of the internal hash array (as specified in the
- constructor).
- \sa count()
-*/
-
-/*!
- \fn void QPtrDict::resize( uint newsize )
- Changes the size of the hashtable the \a newsize.
- The contents of the dictionary are preserved,
- but all iterators on the dictionary become invalid.
-*/
-
-/*!
- \fn bool QPtrDict::isEmpty() const
- Returns TRUE if the dictionary is empty, i.e. count() == 0. Returns FALSE
- otherwise.
- \sa count()
-*/
-
-/*!
- \fn void QPtrDict::insert( void *key, const type *item )
- Inserts the \e key with the \e item into the dictionary.
-
- The key does not have to be a unique dictionary key. If multiple items
- are inserted with the same key, only the last item will be visible.
-
- Null items are not allowed.
-
- \sa replace()
-*/
-
-/*!
- \fn void QPtrDict::replace( void *key, const type *item )
- Replaces an item which has a key equal to \e key with \e item.
-
- If the item does not already exist, it will be inserted.
-
- Null items are not allowed.
-
- Equivalent to:
- \code
- QPtrDict<char> dict;
- ...
- if ( dict.find(key) )
- dict.remove( key );
- dict.insert( key, item );
- \endcode
-
- If there are two or more items with equal keys, then the last inserted
- of these will be replaced.
-
- \sa insert()
-*/
-
-/*!
- \fn bool QPtrDict::remove( void *key )
- Removes the item associated with \e key from the dictionary.
- Returns TRUE if successful, or FALSE if the key does not exist in the
- dictionary.
-
- If there are two or more items with equal keys, then the last inserted
- of these will be removed.
-
- The removed item is deleted if \link QCollection::setAutoDelete()
- auto-deletion\endlink is enabled.
-
- All dictionary iterators that refer to the removed item will be set to
- point to the next item in the dictionary traversing order.
-
- \sa take(), clear(), setAutoDelete()
-*/
-
-/*!
- \fn type *QPtrDict::take( void *key )
- Takes the item associated with \e key out of the dictionary without
- deleting it (even if \link QCollection::setAutoDelete()
- auto-deletion\endlink is enabled).
-
- If there are two or more items with equal keys, then the last inserted
- of these will be taken.
-
- Returns a pointer to the item taken out, or null if the key does not
- exist in the dictionary.
-
- All dictionary iterators that refer to the taken item will be set to
- point to the next item in the dictionary traversing order.
-
- \sa remove(), clear(), setAutoDelete()
-*/
-
-/*!
- \fn void QPtrDict::clear()
- Removes all items from the dictionary.
-
- The removed items are deleted if \link QCollection::setAutoDelete()
- auto-deletion\endlink is enabled.
-
- All dictionary iterators that access this dictionary will be reset.
-
- \sa remove(), take(), setAutoDelete()
-*/
-
-/*!
- \fn type *QPtrDict::find( void *key ) const
- Returns the item associated with \e key, or null if the key does not
- exist in the dictionary.
-
- This function uses an internal hashing algorithm to optimize lookup.
-
- If there are two or more items with equal keys, then the last inserted
- of these will be found.
-
- Equivalent to the [] operator.
-
- \sa operator[]()
-*/
-
-/*!
- \fn type *QPtrDict::operator[]( void *key ) const
- Returns the item associated with \e key, or null if the key does not
- exist in the dictionary.
-
- This function uses an internal hashing algorithm to optimize lookup.
-
- If there are two or more items with equal keys, then the last inserted
- of these will be found.
-
- Equivalent to the find() function.
-
- \sa find()
-*/
-
-/*!
- \fn void QPtrDict::statistics() const
- Debugging-only function that prints out the dictionary distribution
- using qDebug().
-*/
-
-
-/*****************************************************************************
- QPtrDictIterator documentation
- *****************************************************************************/
-
-/*!
- \class QPtrDictIterator qptrdict.h
- \brief The QPtrDictIterator class provides an iterator for QPtrDict collections.
-
- \ingroup collection
- \ingroup tools
-
- QPtrDictIterator is implemented as a template class.
- Define a template instance QPtrDictIterator\<X\> to create a
- dictionary iterator that operates on QPtrDict\<X\> (dictionary of X*).
-
- Example:
- \code
- #include <qptrdict.h>
- #include <stdio.h>
-
- void main()
- {
- int *a = new int[12];
- int *b = new int[10];
- int *c = new int[18];
- int *d = new int[13];
-
- QPtrDict<char> dict; // maps void* -> char*
-
- dict.insert( a, "a is int[12]" ); // describe pointers
- dict.insert( b, "b is int[10]" );
- dict.insert( c, "c is int[18]" );
-
- QPtrDictIterator<char> it( dict ); // iterator for dict
-
- while ( it.current() ) {
- printf( "%x -> %s\n", it.currentKey(), it.current() );
- ++it;
- }
- }
- \endcode
-
- Program output:
- \code
- 804a788 -> a is int[12]
- 804a7f0 -> c is int[18]
- 804a7c0 -> b is int[10]
- \endcode
-
- Note that the traversal order is arbitrary, you are not guaranteed the
- order above.
-
- Multiple iterators may independently traverse the same dictionary.
- A QPtrDict knows about all iterators that are operating on the dictionary.
- When an item is removed from the dictionary, QPtrDict update all
- iterators that are referring the removed item to point to the next item
- in the traversing order.
-
- \sa QPtrDict, \link collection.html Collection Classes\endlink
-*/
-
-/*!
- \fn QPtrDictIterator::QPtrDictIterator( const QPtrDict<type> &dict )
- Constructs an iterator for \e dict. The current iterator item is
- set to point on the first item in the \e dict.
-*/
-
-/*!
- \fn QPtrDictIterator::~QPtrDictIterator()
- Destroys the iterator.
-*/
-
-/*!
- \fn uint QPtrDictIterator::count() const
- Returns the number of items in the dictionary this iterator operates on.
- \sa isEmpty()
-*/
-
-/*!
- \fn bool QPtrDictIterator::isEmpty() const
- Returns TRUE if the dictionary is empty, i.e. count() == 0. Returns FALSE
- otherwise.
- \sa count()
-*/
-
-/*!
- \fn type *QPtrDictIterator::toFirst()
- Sets the current iterator item to point to the first item in the
- dictionary and returns a pointer to the item.
- If the dictionary is empty it sets the current item to null and
- returns null.
-*/
-
-/*!
- \fn QPtrDictIterator::operator type *() const
- Cast operator. Returns a pointer to the current iterator item.
- Same as current().
-*/
-
-/*!
- \fn type *QPtrDictIterator::current() const
- Returns a pointer to the current iterator item.
-*/
-
-/*!
- \fn void *QPtrDictIterator::currentKey() const
- Returns the key for the current iterator item.
-*/
-
-/*!
- \fn type *QPtrDictIterator::operator()()
- Makes the succeeding item current and returns the original current item.
-
- If the current iterator item was the last item in the dictionary or if it
- was null, null is returned.
-*/
-
-/*!
- \fn type *QPtrDictIterator::operator++()
- Prefix ++ makes the succeeding item current and returns the new current
- item.
-
- If the current iterator item was the last item in the dictionary or if it
- was null, null is returned.
-*/
-
-/*!
- \fn type *QPtrDictIterator::operator+=( uint jump )
- Sets the current item to the item \e jump positions after the current item,
- and returns a pointer to that item.
-
- If that item is beyond the last item or if the dictionary is empty,
- it sets the current item to null and returns null.
-*/
diff --git a/qtools/qptrdict.h b/qtools/qptrdict.h
deleted file mode 100644
index df8bcb4..0000000
--- a/qtools/qptrdict.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/****************************************************************************
-**
-**
-** Definition of QPtrDict template class
-**
-** Created : 970415
-**
-** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
-**
-** This file is part of the tools module of the Qt GUI Toolkit.
-**
-** This file may be distributed under the terms of the Q Public License
-** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#ifndef QPTRDICT_H
-#define QPTRDICT_H
-
-#ifndef QT_H
-#include "qgdict.h"
-#endif // QT_H
-
-
-template<class type> class Q_EXPORT QPtrDict : public QGDict
-{
-public:
- QPtrDict(uint size=17) : QGDict(size,PtrKey,0,0) {}
- QPtrDict( const QPtrDict<type> &d ) : QGDict(d) {}
- ~QPtrDict() { clear(); }
- QPtrDict<type> &operator=(const QPtrDict<type> &d)
- { return (QPtrDict<type>&)QGDict::operator=(d); }
- uint count() const { return QGDict::count(); }
- uint size() const { return QGDict::size(); }
- bool isEmpty() const { return QGDict::count() == 0; }
- void insert( void *k, const type *d )
- { QGDict::look_ptr(k,(Item)d,1); }
- void replace( void *k, const type *d )
- { QGDict::look_ptr(k,(Item)d,2); }
- bool remove( void *k ) { return QGDict::remove_ptr(k); }
- type *take( void *k ) { return (type*)QGDict::take_ptr(k); }
- type *find( void *k ) const
- { return (type *)((QGDict*)this)->QGDict::look_ptr(k,0,0); }
- type *operator[]( void *k ) const
- { return (type *)((QGDict*)this)->QGDict::look_ptr(k,0,0); }
- void clear() { QGDict::clear(); }
- void resize( uint n ) { QGDict::resize(n); }
- void statistics() const { QGDict::statistics(); }
-private:
- void deleteItem( Item d );
-};
-
-#if defined(Q_DELETING_VOID_UNDEFINED)
-template<> inline void QPtrDict<void>::deleteItem( QCollection::Item )
-{
-}
-#endif
-
-template<class type> inline void QPtrDict<type>::deleteItem( QCollection::Item d )
-{
- if ( del_item ) delete (type *)d;
-}
-
-
-template<class type> class Q_EXPORT QPtrDictIterator : public QGDictIterator
-{
-public:
- QPtrDictIterator(const QPtrDict<type> &d) :QGDictIterator((QGDict &)d) {}
- ~QPtrDictIterator() {}
- uint count() const { return dict->count(); }
- bool isEmpty() const { return dict->count() == 0; }
- type *toFirst() { return (type *)QGDictIterator::toFirst(); }
- operator type *() const { return (type *)QGDictIterator::get(); }
- type *current() const { return (type *)QGDictIterator::get(); }
- void *currentKey() const { return QGDictIterator::getKeyPtr(); }
- type *operator()() { return (type *)QGDictIterator::operator()(); }
- type *operator++() { return (type *)QGDictIterator::operator++(); }
- type *operator+=(uint j) { return (type *)QGDictIterator::operator+=(j);}
-};
-
-
-#endif // QPTRDICT_H
diff --git a/qtools/qregexp.cpp b/qtools/qregexp.cpp
deleted file mode 100644
index 08138f5..0000000
--- a/qtools/qregexp.cpp
+++ /dev/null
@@ -1,1093 +0,0 @@
-/****************************************************************************
-**
-**
-** Implementation of QRegExp class
-**
-** Created : 950126
-**
-** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
-**
-** This file is part of the tools module of the Qt GUI Toolkit.
-**
-** This file may be distributed under the terms of the Q Public License
-** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#include "qregexp_p.h"
-#include <ctype.h>
-#include <stdlib.h>
-
-// NOT REVISED
-/*!
- \class QRegExp qregexp.h
- \ingroup tools
- \ingroup misc
- \brief The QRegExp class provides pattern matching using regular
- expressions or wildcards.
-
- QRegExp knows these regexp primitives:
- <ul plain>
- <li><dfn>c</dfn> matches the character 'c'
- <li><dfn>.</dfn> matches any character
- <li><dfn>^</dfn> matches start of input
- <li><dfn>$</dfn> matches end of input
- <li><dfn>[]</dfn> matches a defined set of characters - see below.
- <li><dfn>a*</dfn> matches a sequence of zero or more a's
- <li><dfn>a+</dfn> matches a sequence of one or more a's
- <li><dfn>a?</dfn> matches an optional a
- <li><dfn>\c</dfn> escape code for matching special characters such
- as \, [, *, +, . etc.
- <li><dfn>\t</dfn> matches the TAB character (9)
- <li><dfn>\n</dfn> matches newline (10)
- <li><dfn>\r</dfn> matches return (13)
- <li><dfn>\s</dfn> matches a white space (defined as any character
- for which QChar::isSpace() returns TRUE. This includes at least
- ASCII characters 9 (TAB), 10 (LF), 11 (VT), 12(FF), 13 (CR) and 32
- (Space)).
- <li><dfn>\d</dfn> matches a digit (defined as any character for
- which QChar::isDigit() returns TRUE. This includes at least ASCII
- characters '0'-'9').
- <li><dfn>\x1f6b</dfn> matches the character with unicode point U1f6b
- (hexadecimal 1f6b). \x0012 will match the ASCII/Latin1 character
- 0x12 (18 decimal, 12 hexadecimal).
- <li><dfn>\022</dfn> matches the ASCII/Latin1 character 022 (18
- decimal, 22 octal).
- </ul>
-
- In wildcard mode, it only knows four primitives:
- <ul plain>
- <li><dfn>c</dfn> matches the character 'c'
- <li><dfn>?</dfn> matches any character
- <li><dfn>*</dfn> matches any sequence of characters
- <li><dfn>[]</dfn> matches a defined set of characters - see below.
- </ul>
-
- QRegExp supports Unicode both in the pattern strings and in the
- strings to be matched.
-
- When writing regular expressions in C++ code, remember that C++
- processes \ characters. So in order to match e.g. a "." character,
- you must write "\\." in C++ source, not "\.".
-
- A character set matches a defined set of characters. For example,
- [BSD] matches any of 'B', 'D' and 'S'. Within a character set, the
- special characters '.', '*', '?', '^', '$', '+' and '[' lose their
- special meanings. The following special characters apply:
- <ul plain>
- <li><dfn>^</dfn> When placed first in the list, changes the
- character set to match any character \e not in the list. To include
- the character '^' itself in the set, escape it or place it anywhere
- but first.
- <li><dfn>-</dfn> Defines a range of characters. To include the
- character '-' itself in the set, escape it or place it last.
- <li><dfn>]</dfn> Ends the character set definition. To include the
- character ']' itself in the set, escape it or place it first (but
- after the negation operator '^', if present)
- </ul>
- Thus, [a-zA-Z0-9.] matches upper and lower case ASCII letters,
- digits and dot; and [^\s] matches everything except white space.
-
- \bug Case insensitive matching is not supported for non-ASCII/Latin1
- (non-8bit) characters. Any character with a non-zero QChar.row() is
- matched case sensitively even if the QRegExp is in case insensitive
- mode.
-
- \note In Qt 3.0, the language of regular expressions will contain
- five more special characters, namely '(', ')', '{', '|' and '}'. To
- ease porting, it's a good idea to escape these characters with a
- backslash in all the regular expressions you'll write from now on.
-*/
-
-
-//
-// The regexp pattern is internally represented as an array of uints,
-// each element containing an 16-bit character or a 32-bit code
-// (listed below). User-defined character classes (e.g. [a-zA-Z])
-// are encoded as this:
-// uint no: 1 2 3 ...
-// value: CCL | n from | to from | to
-//
-// where n is the (16-bit) number of following range definitions and
-// from and to define the ranges inclusive. from <= to is always true,
-// otherwise it is a built-in charclass (Pxx, eg \s - PWS). Single
-// characters in the class are coded as from==to. Negated classes
-// (e.g. [^a-z]) use CCN instead of CCL.
-
-const uint END = 0x00000000;
-const uint PWS = 0x10010000; // predef charclass: whitespace (\s)
-const uint PDG = 0x10020000; // predef charclass: digit (\d)
-const uint CCL = 0x20010000; // character class []
-const uint CCN = 0x20020000; // neg character class [^]
-const uint CHR = 0x40000000; // character
-const uint BOL = 0x80010000; // beginning of line ^
-const uint EOL = 0x80020000; // end of line $
-const uint BOW = 0x80030000; // beginning of word \<
-const uint EOW = 0x80040000; // end of word \>
-const uint ANY = 0x80050000; // any character .
-const uint CLO = 0x80070000; // Kleene closure *
-const uint OPT = 0x80080000; // Optional closure ?
-
-const uint MCC = 0x20000000; // character class bitmask
-const uint MCD = 0xffff0000; // code mask
-const uint MVL = 0x0000ffff; // value mask
-
-//
-// QRegExp::error codes (internal)
-//
-
-const int PatOk = 0; // pattern ok
-const int PatNull = 1; // no pattern defined
-const int PatSyntax = 2; // pattern syntax error
-const int PatOverflow = 4; // pattern too long
-
-
-/*****************************************************************************
- QRegExp member functions
- *****************************************************************************/
-
-/*!
- Constructs an empty regular expression.
-*/
-
-QRegExp::QRegExp()
-{
- rxdata = 0;
- cs = TRUE;
- wc = FALSE;
- error = PatOk;
-}
-
-/*!
- Constructs a regular expression.
-
- \arg \e pattern is the regular expression pattern string.
- \arg \e caseSensitive specifies whether or not to use case sensitive
- matching.
- \arg \e wildcard specifies whether the pattern string should be used for
- wildcard matching (also called globbing expression), normally used for
- matching file names.
-
- \sa setWildcard()
-*/
-
-QRegExp::QRegExp( const QCString &pattern, bool caseSensitive, bool wildcard )
-{
- rxstring = pattern;
- rxdata = 0;
- cs = caseSensitive;
- wc = wildcard;
- compile();
-}
-
-/*!
- Constructs a regular expression which is a copy of \e r.
- \sa operator=(const QRegExp&)
-*/
-
-QRegExp::QRegExp( const QRegExp &r )
-{
- rxstring = r.pattern();
- rxdata = 0;
- cs = r.caseSensitive();
- wc = r.wildcard();
- compile();
-}
-
-/*!
- Destructs the regular expression and cleans up its internal data.
-*/
-
-QRegExp::~QRegExp()
-{
- if ( rxdata ) // Avoid purify complaints
- delete [] rxdata;
-}
-
-/*!
- Copies the regexp \e r and returns a reference to this regexp.
- The case sensitivity and wildcard options are copied, as well.
-*/
-
-QRegExp &QRegExp::operator=( const QRegExp &r )
-{
- rxstring = r.rxstring;
- cs = r.cs;
- wc = r.wc;
- compile();
- return *this;
-}
-
-/*!
- \obsolete
- Consider using setPattern() instead of this method.
-
- Sets the pattern string to \e pattern and returns a reference to this regexp.
- The case sensitivity or wildcard options do not change.
-*/
-
-QRegExp &QRegExp::operator=( const QCString &pattern )
-{
- rxstring = pattern;
- compile();
- return *this;
-}
-
-
-/*!
- Returns TRUE if this regexp is equal to \e r.
-
- Two regexp objects are equal if they have equal pattern strings,
- case sensitivity options and wildcard options.
-*/
-
-bool QRegExp::operator==( const QRegExp &r ) const
-{
- return rxstring == r.rxstring && cs == r.cs && wc == r.wc;
-}
-
-/*!
- \fn bool QRegExp::operator!=( const QRegExp &r ) const
-
- Returns TRUE if this regexp is \e not equal to \e r.
-
- \sa operator==()
-*/
-
-/*!
- \fn bool QRegExp::isEmpty() const
- Returns TRUE if the regexp is empty.
-*/
-
-/*!
- \fn bool QRegExp::isValid() const
- Returns TRUE if the regexp is valid, or FALSE if it is invalid.
-
- The pattern "[a-z" is an example of an invalid pattern, since it lacks a
- closing bracket.
-*/
-
-
-/*!
- \fn bool QRegExp::wildcard() const
- Returns TRUE if wildcard mode is on, otherwise FALSE. \sa setWildcard().
-*/
-
-/*!
- Sets the wildcard option for the regular expression. The default
- is FALSE.
-
- Setting \e wildcard to TRUE makes it convenient to match filenames
- instead of plain text.
-
- For example, "qr*.cpp" matches the string "qregexp.cpp" in wildcard mode,
- but not "qicpp" (which would be matched in normal mode).
-
- \sa wildcard()
-*/
-
-void QRegExp::setWildcard( bool wildcard )
-{
- if ( wildcard != wc ) {
- wc = wildcard;
- compile();
- }
-}
-
-/*!
- \fn bool QRegExp::caseSensitive() const
-
- Returns TRUE if case sensitivity is enabled, otherwise FALSE. The
- default is TRUE.
-
- \sa setCaseSensitive()
-*/
-
-/*!
- Enables or disables case sensitive matching.
-
- In case sensitive mode, "a.e" matches "axe" but not "Axe".
-
- See also: caseSensitive()
-*/
-
-void QRegExp::setCaseSensitive( bool enable )
-{
- if ( cs != enable ) {
- cs = enable;
- compile();
- }
-}
-
-
-/*!
- \fn QCString QRegExp::pattern() const
- Returns the pattern string of the regexp.
-*/
-
-
-/*!
- \fn void QRegExp::setPattern(const QCString & pattern)
- Sets the pattern string to \a pattern and returns a reference to this regexp.
- The case sensitivity or wildcard options do not change.
-*/
-
-static inline bool iswordchar( int x )
-{
- return isalnum(x) || x == '_'; //# Only 8-bit support
-}
-
-
-/*!
- \internal
- Match character class
-*/
-
-static bool matchcharclass( uint *rxd, char c )
-{
- uint *d = rxd;
- uint clcode = *d & MCD;
- bool neg = clcode == CCN;
- if ( clcode != CCL && clcode != CCN)
- qWarning("QRegExp: Internal error, please report to qt-bugs@trolltech.com");
- uint numFields = *d & MVL;
- uint cval = (unsigned char)c; //(((uint)(c.row())) << 8) | ((uint)c.cell());
- bool found = FALSE;
- for ( int i = 0; i < (int)numFields; i++ ) {
- d++;
- if ( *d == PWS && isspace(c) ) {
- found = TRUE;
- break;
- }
- if ( *d == PDG && isdigit(c) ) {
- found = TRUE;
- break;
- }
- else {
- uint from = ( *d & MCD ) >> 16;
- uint to = *d & MVL;
- if ( (cval >= from) && (cval <= to) ) {
- found = TRUE;
- break;
- }
- }
- }
- return neg ? !found : found;
-}
-
-
-
-/*
- Internal: Recursively match string.
-*/
-
-static int matchstring( uint *rxd, const char *str, uint strlength,
- const char *bol, bool cs )
-{
- const char *p = str;
- const char *start = p;
- uint pl = strlength;
- uint *d = rxd;
-
- //### in all cases here: handle pl == 0! (don't read past strlen)
- while ( *d ) {
- if ( *d & CHR ) { // match char
- if ( !pl )
- return -1;
- char c = *d;
- if ( !cs /*&& !c.row()*/ ) { // case insensitive, #Only 8bit
- if ( tolower(*p) != c )
- return -1;
- p++;
- pl--;
- } else { // case insensitive
- if ( *p != c )
- return -1;
- p++;
- pl--;
- }
- d++;
- }
- else if ( *d & MCC ) { // match char class
- if ( !pl )
- return -1;
- if ( !matchcharclass( d, *p ) )
- return -1;
- p++;
- pl--;
- d += (*d & MVL) + 1;
- }
- else switch ( *d++ ) {
- case PWS: // match whitespace
- if ( !pl || !isspace(*p) )
- return -1;
- p++;
- pl--;
- break;
- case PDG: // match digits
- if ( !pl || !isdigit(*p) )
- return -1;
- p++;
- pl--;
- break;
- case ANY: // match anything
- if ( !pl )
- return -1;
- p++;
- pl--;
- break;
- case BOL: // match beginning of line
- if ( p != bol )
- return -1;
- break;
- case EOL: // match end of line
- if ( pl )
- return -1;
- break;
- case BOW: // match beginning of word
- if ( !iswordchar(*p) || (p > bol && iswordchar(*(p-1)) ) )
- return -1;
- break;
- case EOW: // match end of word
- if ( iswordchar(*p) || p == bol || !iswordchar(*(p-1)) )
- return -1;
- break;
- case CLO: // Kleene closure
- {
- const char *first_p = p;
- if ( *d & CHR ) { // match char
- char c = *d;
- if ( !cs /*&& !c.row()*/ ) { // case insensitive, #only 8bit
- while ( pl /*&& !p->row()*/ && tolower(*p)==c ) {
- p++;
- pl--;
- }
- }
- else { // case sensitive
- while ( pl && *p == c ) {
- p++;
- pl--;
- }
- }
- d++;
- }
- else if ( *d & MCC ) { // match char class
- while( pl && matchcharclass( d, *p ) ) {
- p++;
- pl--;
- }
- d += (*d & MVL) + 1;
- }
- else if ( *d == PWS ) {
- while ( pl && isspace(*p) ) {
- p++;
- pl--;
- }
- d++;
- }
- else if ( *d == PDG ) {
- while ( pl && isdigit(*p) ) {
- p++;
- pl--;
- }
- d++;
- }
- else if ( *d == ANY ) {
- p += pl;
- pl = 0;
- d++;
- }
- else {
- return -1; // error
- }
- d++; // skip CLO's END
- while ( p >= first_p ) { // go backwards
- int end = matchstring( d, p, pl, bol, cs );
- if ( end >= 0 )
- return ( (int)(p - start) ) + end;
- if ( !p )
- return -1;
- --p;
- ++pl;
- }
- }
- return -1;
- case OPT: // optional closure
- {
- const char *first_p = p;
- if ( *d & CHR ) { // match char
- char c = *d;
- if ( !cs /*&& !c.row()*/ ) { // case insensitive, #only 8bit
- if ( pl && /*!p->row() &&*/ tolower(*p) == c ) {
- p++;
- pl--;
- }
- }
- else { // case sensitive
- if ( pl && *p == c ) {
- p++;
- pl--;
- }
- }
- d++;
- }
- else if ( *d & MCC ) { // match char class
- if ( pl && matchcharclass( d, *p ) ) {
- p++;
- pl--;
- }
- d += (*d & MVL) + 1;
- }
- else if ( *d == PWS ) {
- if ( pl && isspace(*p) ) {
- p++;
- pl--;
- }
- d++;
- }
- else if ( *d == PDG ) {
- if ( pl && isdigit(*p) ) {
- p++;
- pl--;
- }
- d++;
- }
- else if ( *d == ANY ) {
- if ( pl ) {
- p++;
- pl--;
- }
- d++;
- }
- else {
- return -1; // error
- }
- d++; // skip OPT's END
- while ( p >= first_p ) { // go backwards
- int end = matchstring( d, p, pl, bol, cs );
- if ( end >= 0 )
- return ( (int)(p - start) ) + end;
- if ( !p )
- return -1;
- --p;
- ++pl;
- }
- }
- return -1;
-
- default: // error
- return -1;
- }
- }
- return (int)(p - start);
-}
-
-
-/*!
- \internal
- Recursively match string.
-*/
-
-// This is obsolete now, but since it is protected (not private), it
-// is still implemented on the off-chance that somebody has made a
-// class derived from QRegExp and calls this directly.
-// Qt 3.0: Remove this?
-
-#if 0
-const char *QRegExp::matchstr( uint *rxd, const QChar *str, uint strlength,
- const QChar *bol ) const
-{
- int len = matchstring( rxd, str, strlength, bol, cs );
- if ( len < 0 )
- return 0;
- return str + len;
-}
-#endif
-
-/*!
- Attempts to match in \e str, starting from position \e index.
- Returns the position of the match, or -1 if there was no match.
-
- If \e len is not a null pointer, the length of the match is stored in
- \e *len.
-
- If \e indexIsStart is TRUE (the default), the position \e index in
- the string will match the start-of-input primitive (^) in the
- regexp, if present. Otherwise, position 0 in \e str will match.
-
- Example:
- \code
- QRegExp r("[0-9]*\\.[0-9]+"); // matches floating point
- int len;
- r.match("pi = 3.1416", 0, &len); // returns 5, len == 6
- \endcode
-
- \note In Qt 3.0, this function will be replaced by find().
-*/
-
-int QRegExp::match( const QCString &str, int index, int *len,
- bool indexIsStart ) const
-{
- if ( !isValid() || isEmpty() )
- return -1;
- if ( str.length() < (uint)index )
- return -1;
- const char *start = str.data();
- const char *p = start + index;
- uint pl = str.length() - index;
- uint *d = rxdata;
- int ep = -1;
-
- if ( *d == BOL ) { // match from beginning of line
- ep = matchstring( d, p, pl, indexIsStart ? p : start, cs );
- } else {
- if ( *d & CHR ) {
- char c = *d;
- if ( !cs /*&& !c.row()*/ ) { // case sensitive, # only 8bit
- while ( pl && ( /*p->row() ||*/ tolower(*p) != c ) ) {
- p++;
- pl--;
- }
- } else { // case insensitive
- while ( pl && *p != c ) {
- p++;
- pl--;
- }
- }
- }
- while( 1 ) { // regular match
- ep = matchstring( d, p, pl, indexIsStart ? start+index : start, cs );
- if ( ep >= 0 )
- break;
- if ( !pl )
- break;
- p++;
- pl--;
- }
- }
- if ( len )
- *len = ep >= 0 ? ep : 0; // No match -> 0, for historical reasons
- return ep >= 0 ? (int)(p - start) : -1; // return index;
-}
-
-/*! \fn int QRegExp::find( const QCString& str, int index )
-
- Attempts to match in \e str, starting from position \e index.
- Returns the position of the match, or -1 if there was no match.
-
- \sa match()
-*/
-
-//
-// Translate wildcard pattern to standard regexp pattern.
-// Ex: *.cpp ==> ^.*\.cpp$
-//
-
-static QCString wc2rx( const QCString &pattern )
-{
- int patlen = (int)pattern.length();
- QCString wcpattern("^");
-
- char c;
- for( int i = 0; i < patlen; i++ ) {
- c = pattern[i];
- switch ( (char)c ) {
- case '*': // '*' ==> '.*'
- wcpattern += '.';
- break;
- case '?': // '?' ==> '.'
- c = '.';
- break;
- case '.': // quote special regexp chars
- case '+':
- case '\\':
- case '$':
- case '^':
- wcpattern += '\\';
- break;
- case '[':
- if ( (char)pattern[i+1] == '^' ) { // don't quote '^' after '['
- wcpattern += '[';
- c = pattern[i+1];
- i++;
- }
- break;
- }
- wcpattern += c;
-
- }
- wcpattern += '$';
- return wcpattern; // return new regexp pattern
-}
-
-
-//
-// Internal: Get char value and increment pointer.
-//
-
-static uint char_val( const char **str, uint *strlength ) // get char value
-{
- const char *p = *str;
- uint pl = *strlength;
- uint len = 1;
- uint v = 0;
- if ( (char)*p == '\\' ) { // escaped code
- p++;
- pl--;
- if ( !pl ) { // it is just a '\'
- (*str)++;
- (*strlength)--;
- return '\\';
- }
- len++; // length at least 2
- int i;
- char c;
- char ch = tolower((char)*p);
- switch ( ch ) {
- case 'b': v = '\b'; break; // bell
- case 'f': v = '\f'; break; // form feed
- case 'n': v = '\n'; break; // newline
- case 'r': v = '\r'; break; // return
- case 't': v = '\t'; break; // tab
- case 's': v = PWS; break; // whitespace charclass
- case 'd': v = PDG; break; // digit charclass
- case '<': v = BOW; break; // word beginning matcher
- case '>': v = EOW; break; // word ending matcher
-
- case 'x': { // hex code
- p++;
- pl--;
- for ( i = 0; (i < 4) && pl; i++ ) { //up to 4 hex digits
- c = tolower((char)*p);
- bool a = ( c >= 'a' && c <= 'f' );
- if ( (c >= '0' && c <= '9') || a ) {
- v <<= 4;
- v += a ? 10 + c - 'a' : c - '0';
- len++;
- }
- else {
- break;
- }
- p++;
- pl--;
- }
- }
- break;
-
- default: {
- if ( ch >= '0' && ch <= '7' ) { //octal code
- len--;
- for ( i = 0; (i < 3) && pl; i++ ) { // up to 3 oct digits
- c = (char)*p;
- if ( c >= '0' && c <= '7' ) {
- v <<= 3;
- v += c - '0';
- len++;
- }
- else {
- break;
- }
- p++;
- pl--;
- }
- }
- else { // not an octal number
- v = (uint)*p; //(((uint)(p->row())) << 8) | ((uint)p->cell());
- }
- }
- }
- } else {
- v = (uint)*p; //(((uint)(p->row())) << 8) | ((uint)p->cell());
- }
- *str += len;
- *strlength -= len;
- return v;
-}
-
-
-#if 0 //defined(DEBUG)
-static uint *dump( uint *p )
-{
- while ( *p != END ) {
- if ( *p & CHR ) {
- uchar uc = (uchar)*p;
- char c = (char)uc;
- uint u = (uint)uc; //(((uint)(uc.row())) << 8) | ((uint)uc.cell());
- qDebug( "\tCHR\tU%04x (%c)", u, (c ? c : ' '));
- p++;
- }
- else if ( *p & MCC ) {
- uint clcode = *p & MCD;
- uint numFields = *p & MVL;
- if ( clcode == CCL )
- qDebug( "\tCCL\t%i", numFields );
- else if ( clcode == CCN )
- qDebug( "\tCCN\t%i", numFields );
- else
- qDebug("coding error!");
- for ( int i = 0; i < (int)numFields; i++ ) {
- p++;
- if ( *p == PWS )
- qDebug( "\t\tPWS" );
- else if ( *p == PDG )
- qDebug( "\t\tPDG" );
- else {
- uint from = ( *p & MCD ) >> 16;
- uint to = *p & MVL;
- char fc = (char)from;
- char tc = (char)to;
- qDebug( "\t\tU%04x (%c) - U%04x (%c)", from,
- (fc ? fc : ' '), to, (tc ? tc : ' ') );
- }
- }
- p++;
- }
- else switch ( *p++ ) {
- case PWS:
- qDebug( "\tPWS" );
- break;
- case PDG:
- qDebug( "\tPDG" );
- break;
- case BOL:
- qDebug( "\tBOL" );
- break;
- case EOL:
- qDebug( "\tEOL" );
- break;
- case BOW:
- qDebug( "\tBOW" );
- break;
- case EOW:
- qDebug( "\tEOW" );
- break;
- case ANY:
- qDebug( "\tANY" );
- break;
- case CLO:
- qDebug( "\tCLO" );
- p = dump( p );
- break;
- case OPT:
- qDebug( "\tOPT" );
- p = dump( p );
- break;
- }
- }
- qDebug( "\tEND" );
- return p+1;
-}
-#endif // DEBUG
-
-
-
-/*!
- \internal
- Compiles the regular expression and stores the result in rxdata.
- The 'error' flag is set to non-zero if an error is detected.
- NOTE! This function is not reentrant!
-*/
-
-void QRegExp::compile()
-{
- const int maxlen = 1024; // max length of regexp array
- uint rxarray[ maxlen ]; // tmp regexp array
-
- if ( rxdata ) { // delete old data
- delete [] rxdata;
- rxdata = 0;
- }
- if ( rxstring.isEmpty() ) { // no regexp pattern set
- error = PatNull;
- return;
- }
-
- error = PatOk; // assume pattern is ok
-
- QCString pattern;
- if ( wc )
- pattern = wc2rx(rxstring);
- else
- pattern = rxstring;
- const char *start = pattern.data(); // pattern pointer
- const char *p = start; // pattern pointer
- uint pl = pattern.length();
- uint *d = rxarray; // data pointer
- uint *prev_d = 0;
-
-#define GEN(x) *d++ = (x)
-
- while ( pl ) {
- char ch = (char)*p;
- switch ( ch ) {
-
- case '^': // beginning of line
- prev_d = d;
- GEN( p == start ? BOL : (CHR | ch) );
- p++;
- pl--;
- break;
-
- case '$': // end of line
- prev_d = d;
- GEN( pl == 1 ? EOL : (CHR | ch) );
- p++;
- pl--;
- break;
-
- case '.': // any char
- prev_d = d;
- GEN( ANY );
- p++;
- pl--;
- break;
-
- case '[': // character class
- {
- prev_d = d;
- p++;
- pl--;
- if ( !pl ) {
- error = PatSyntax;
- return;
- }
- bool firstIsEscaped = ( (char)*p == '\\' );
- uint cch = char_val( &p, &pl );
- if ( cch == '^' && !firstIsEscaped ) { // negate!
- GEN( CCN );
- if ( !pl ) {
- error = PatSyntax;
- return;
- }
- cch = char_val( &p, &pl );
- } else {
- GEN( CCL );
- }
- uint numFields = 0;
- while ( pl ) {
- if ((pl>2) && ((char)*p == '-') && ((char)*(p+1) != ']')) {
- // Found a range
- char_val( &p, &pl ); // Read the '-'
- uint cch2 = char_val( &p, &pl ); // Read the range end
- if ( cch > cch2 ) { // swap start and stop
- int tmp = cch;
- cch = cch2;
- cch2 = tmp;
- }
- GEN( (cch << 16) | cch2 ); // from < to
- numFields++;
- }
- else {
- // Found a single character
- if ( cch & MCD ) // It's a code; will not be mistaken
- GEN( cch ); // for a range, since from > to
- else
- GEN( (cch << 16) | cch ); // from == to range
- numFields++;
- }
- if ( d >= rxarray + maxlen ) { // pattern too long
- error = PatOverflow;
- return;
- }
- if ( !pl ) { // At least ']' should be left
- error = PatSyntax;
- return;
- }
- bool nextIsEscaped = ( (char)*p == '\\' );
- cch = char_val( &p, &pl );
- if ( cch == (uint)']' && !nextIsEscaped )
- break;
- if ( !pl ) { // End, should have seen ']'
- error = PatSyntax;
- return;
- }
- }
- *prev_d |= numFields; // Store number of fields
- }
- break;
-
- case '*': // Kleene closure, or
- case '+': // positive closure, or
- case '?': // optional closure
- {
- if ( prev_d == 0 ) { // no previous expression
- error = PatSyntax; // empty closure
- return;
- }
- switch ( *prev_d ) { // test if invalid closure
- case BOL:
- case BOW:
- case EOW:
- case CLO:
- case OPT:
- error = PatSyntax;
- return;
- }
- int ddiff = (int)(d - prev_d);
- if ( *p == '+' ) { // convert to Kleene closure
- if ( d + ddiff >= rxarray + maxlen ) {
- error = PatOverflow; // pattern too long
- return;
- }
- memcpy( d, prev_d, ddiff*sizeof(uint) );
- d += ddiff;
- prev_d += ddiff;
- }
- memmove( prev_d+1, prev_d, ddiff*sizeof(uint) );
- *prev_d = ch == '?' ? OPT : CLO;
- d++;
- GEN( END );
- p++;
- pl--;
- }
- break;
-
- default:
- {
- prev_d = d;
- uint cv = char_val( &p, &pl );
- if ( cv & MCD ) { // It's a code
- GEN( cv );
- }
- else {
- if ( !cs && cv <= 0xff ) // #only 8bit support
- cv = tolower( cv );
- GEN( CHR | cv );
- }
- }
- }
- if ( d >= rxarray + maxlen ) { // oops!
- error = PatOverflow; // pattern too long
- return;
- }
- }
- GEN( END );
- int len = (int)(d - rxarray);
- rxdata = new uint[ len ]; // copy from rxarray to rxdata
- CHECK_PTR( rxdata );
- memcpy( rxdata, rxarray, len*sizeof(uint) );
-#if defined(DEBUG)
- //dump( rxdata ); // uncomment this line for debugging
-#endif
-}
diff --git a/qtools/qregexp_p.h b/qtools/qregexp_p.h
deleted file mode 100644
index 4bb0230..0000000
--- a/qtools/qregexp_p.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/****************************************************************************
-**
-**
-** Definition of QRegExp class
-**
-** Created : 950126
-**
-** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
-**
-** This file is part of the tools module of the Qt GUI Toolkit.
-**
-** This file may be distributed under the terms of the Q Public License
-** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#ifndef QREGEXP_H
-#define QREGEXP_H
-
-#ifndef QT_H
-#include "qcstring.h"
-#endif // QT_H
-
-
-class Q_EXPORT QRegExp
-{
-public:
- QRegExp();
- QRegExp( const QCString &, bool caseSensitive=TRUE, bool wildcard=FALSE );
- QRegExp( const QRegExp & );
- ~QRegExp();
- QRegExp &operator=( const QRegExp & );
- QRegExp &operator=( const QCString &pattern );
-
- bool operator==( const QRegExp & ) const;
- bool operator!=( const QRegExp &r ) const
- { return !(this->operator==(r)); }
-
- bool isEmpty() const { return rxdata == 0; }
- bool isValid() const { return error == 0; }
-
- bool caseSensitive() const { return cs; }
- void setCaseSensitive( bool );
-
- bool wildcard() const { return wc; }
- void setWildcard( bool );
-
- QCString pattern() const { return rxstring; }
- // ### in Qt 3.0, provide a real implementation
- void setPattern( const QCString& pattern )
- { operator=( pattern ); }
-
- int match( const QCString &str, int index=0, int *len=0,
- bool indexIsStart = TRUE ) const;
- int find( const QCString& str, int index )
- { return match( str, index ); }
-
-protected:
- void compile();
- const char *matchstr( uint *, const char *, uint, const char * ) const;
-
-private:
- QCString rxstring; // regular expression pattern
- uint *rxdata; // compiled regexp pattern
- int error; // error status
- bool cs; // case sensitive
- bool wc; // wildcard
-};
-
-
-#endif // QREGEXP_H
diff --git a/qtools/qshared.h b/qtools/qshared.h
deleted file mode 100644
index 58ad6fc..0000000
--- a/qtools/qshared.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/****************************************************************************
-**
-**
-** Definition of QShared struct
-**
-** Created : 940112
-**
-** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
-**
-** This file is part of the tools module of the Qt GUI Toolkit.
-**
-** This file may be distributed under the terms of the Q Public License
-** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#ifndef QSHARED_H
-#define QSHARED_H
-
-#ifndef QT_H
-#include "qglobal.h"
-#endif // QT_H
-
-#include <atomic>
-
-
-struct QShared
-{
- QShared() : count(1) { }
- void ref() { count++; }
- bool deref() { return !--count; }
- std::atomic_uint count;
-};
-
-
-#endif // QSHARED_H
diff --git a/qtools/qstack_p.h b/qtools/qstack_p.h
deleted file mode 100644
index c84d8d2..0000000
--- a/qtools/qstack_p.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/****************************************************************************
-**
-**
-** Definition of QStack template/macro class
-**
-** Created : 920917
-**
-** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
-**
-** This file is part of the tools module of the Qt GUI Toolkit.
-**
-** This file may be distributed under the terms of the Q Public License
-** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#ifndef QSTACK_H
-#define QSTACK_H
-
-#ifndef QT_H
-#include "qglist.h"
-#endif // QT_H
-
-
-template<class type> class QStack : private QGList
-{
-public:
- QStack() {}
- QStack( const QStack<type> &s ) : QGList(s) {}
- ~QStack() { clear(); }
- QStack<type> &operator=(const QStack<type> &s)
- { return (QStack<type>&)QGList::operator=(s); }
- bool autoDelete() const { return QCollection::autoDelete(); }
- void setAutoDelete( bool del ) { QCollection::setAutoDelete(del); }
- uint count() const { return QGList::count(); }
- bool isEmpty() const { return QGList::count() == 0; }
- void push( const type *d ) { QGList::insertAt(0,Item(d)); }
- type *pop() { return (type *)QGList::takeFirst(); }
- bool remove() { return QGList::removeFirst(); }
- void clear() { QGList::clear(); }
- type *bottom() const { return (type *)QGList::clast(); }
- type *top() const { return (type *)QGList::cfirst(); }
- operator type *() const { return (type *)QGList::cfirst(); }
- type *current() const { return (type *)QGList::cfirst(); }
-private:
- void deleteItem( Item d ) { if ( del_item ) delete (type *)d; }
-};
-
-
-#endif // QSTACK_H
diff --git a/qtools/qstring.cpp b/qtools/qstring.cpp
deleted file mode 100644
index c03ca3a..0000000
--- a/qtools/qstring.cpp
+++ /dev/null
@@ -1,15427 +0,0 @@
-/****************************************************************************
-**
-**
-** Implementation of the QString class and related Unicode functions
-**
-** Created : 920722
-**
-** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
-**
-** This file is part of the tools module of the Qt GUI Toolkit.
-**
-** This file may be distributed under the terms of the Q Public License
-** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-// Don't define it while compiling this module, or USERS of Qt will
-// not be able to link.
-#ifdef QT_NO_CAST_ASCII
-#undef QT_NO_CAST_ASCII
-#endif
-
-#include "qstring.h"
-#include "qregexp_p.h"
-#include "qdatastream.h"
-#include "qtextcodec.h"
-#include "qstack_p.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <ctype.h>
-#include <limits.h>
-
-
-/* -------------------------------------------------------------------------
- * unicode information
- * these tables are generated from the unicode reference file
- * ftp://ftp.unicode.org/Public/3.0-Update/UnicodeData-3.0.0.html
- *
- * Lars Knoll <knoll@mpi-hd.mpg.de>
- * -------------------------------------------------------------------------
- */
-
-/* Perl script to generate (run perl -x tools/qstring.cpp)
-
-#!perl
-
-sub numberize
-{
- my(%r, $n, $id);
- for $id ( @_ ) {
- $id="" if $id eq "EMPTY";
- $r{$id}=$n++;
- }
- return %r;
-}
-
-
-# Code to integer mappings...
-#
-%category_code = numberize(qw{
- EMPTY
- Mn Mc Me
- Nd Nl No
- Zs Zl Zp
- Cc Cf Cs Co Cn
-
- Lu Ll Lt Lm Lo
- Pc Pd Ps Pe Pi Pf Po
- Sm Sc Sk So
-});
-%bidi_category_code = numberize(qw{
- L R EN ES ET AN CS B S WS ON LRE LRO AL RLE RLO PDF NSM BN});
-%character_decomposition_tag = numberize(qw{
- <single> <canonical> <font> <noBreak> <initial> <medial>
- <final> <isolated> <circle> <super> <sub> <vertical>
- <wide> <narrow> <small> <square> <compat> <fraction>
-});
-%mirrored_code = numberize(qw{N Y});
-
-%joining_code = numberize(qw{U D R C});
-
-# Read data into hashes...
-#
-open IN, "UnicodeData.txt";
-$position = 1;
-while (<IN>) {
- @fields = split /;/;
- $code = shift @fields;
- for $n (qw{
- name category combining_class bidi_category
- character_decomposition decimal_digit_value digit_value
- numeric_value mirrored oldname comment
- uppercase lowercase titlecase})
- {
- $id = shift @fields;
- $codes = "${n}_code";
- if ( defined %$codes && defined $$codes{$id} ) {
- $id = $$codes{$id};
- }
- ${$n}{$code}=$id;
- }
- $decomp = $character_decomposition{$code};
- if ( length $decomp == 0 ) {
- $decomp = "<single>";
- }
- if (substr($decomp, 0, 1) ne '<') {
- $decomp = "<canonical> " . $decomp;
- }
- @fields = split(" ", $decomp);
- $tag = shift @fields;
- $tag = $character_decomposition_tag{$tag};
- $decomp = join( ", 0x", @fields );
- $decomp = "0x".$decomp;
- $decomposition{$code} = $decomp;
- $decomposition_tag{$code} = $tag;
- $decomposition_pos{$code} = $position;
- $len = scalar(@fields);
- $decomposition_len{$code} = $len;
-
-# we use canonical decompositions longer than 1 char
-# and all arabic ligatures for the ligature table
- if(($len > 1 and $tag == 1) or ($tag > 3 and $tag < 8)) {
-# ligature to add...
- $start = shift @fields;
- $ligature{$start} = $ligature{$start}." ".$code;
- }
-
-# adjust position
- if($len != 0) {
- $position += $len + 3;
- }
-
-
-}
-
-open IN2, "ArabicShaping.txt";
-$position = 1;
-while (<IN2>) {
- @fields = split /;/;
- $code = shift @fields;
- $dummy = shift @fields;
- $join = shift @fields;
- $join =~ s/ //g;
- $join = $joining_code{$join};
- $joining{$code}=$join;
-}
-
-# Build pages...
-#
-$rowtable_txt =
- "static const Q_UINT8 * const unicode_info[256] = {";
-for $row ( 0..255 ) {
- $nonzero=0;
- $txt = "";
- for $cell ( 0..255 ) {
- $code = sprintf("%02X%02X",$row,$cell);
- $info = $category{$code};
- $info = 0 if !defined $info;
- $txt .= "\n " if $cell%8 == 0;
- $txt .= "$info, ";
- }
- $therow = $row{$txt};
- if ( !defined $therow ) {
- $size+=256;
- $therow = "ui_".sprintf("%02X",$row);
- $rowtext{$therow} =
- "static const Q_UINT8 ${therow}[] = {$txt\n};\n\n";
- $row{$txt}=$therow;
- }
- $rowtable_txt .= "\n " if $row%8 == 0;
- $rowtable_txt .= "$therow, ";
-}
-
-print "// START OF GENERATED DATA\n\n";
-print "#ifndef QT_NO_UNICODETABLES\n\n";
-
-# Print pages...
-#
-for $r ( sort keys %rowtext ) {
- print $rowtext{$r};
-}
-print "$rowtable_txt\n};\n";
-$size += 256*4;
-print "// $size bytes\n\n";
-
-# Build decomposition tables
-#
-$rowtable_txt =
- "static const Q_UINT16 * const decomposition_info[256] = {";
-$table_txt =
- "static const Q_UINT16 decomposition_map[] = {\n 0,\n";
-for $row ( 0..255 ) {
- $nonzero=0;
- $txt = "";
- for $cell ( 0..255 ) {
- $code = sprintf("%02X%02X",$row,$cell);
- $txt .= "\n " if $cell%8 == 0;
- if( $decomposition_tag{$code} != 0 ) {
- $txt .= " $decomposition_pos{$code},";
- $table_txt .= " $decomposition_tag{$code},";
- $table_txt .= " 0x$code,";
- $table_txt .= " $decomposition{$code}, 0,\n";
- $size += 2 * $decomposition_len{$code} + 6;
- } else {
- $txt .= " 0,";
- }
- }
- $therow = $row{$txt};
- if ( !defined $therow ) {
- $size+=512;
- $therow = "di_".sprintf("%02X",$row);
- $dec_rowtext{$therow} =
- "static const Q_UINT16 ${therow}[] = {$txt\n};\n\n";
- $row{$txt}=$therow;
- }
- $rowtable_txt .= "\n " if $row%8 == 0;
- $rowtable_txt .= "$therow, ";
-}
-
-# Print decomposition tables
-#
-print "$table_txt\n};\n\n";
-for $r ( sort keys %dec_rowtext ) {
- print $dec_rowtext{$r};
-}
-print "$rowtable_txt\n};\n";
-$size += 256*4;
-print "// $size bytes\n\n";
-
-
-# build ligature tables
-#
-$size = 0;
-$position = 1;
-$rowtable_txt =
- "static const Q_UINT16 * const ligature_info[256] = {";
-$table_txt =
- "static const Q_UINT16 ligature_map[] = {\n 0,\n";
-for $lig_row ( 0..255 ) {
- $nonzero=0;
- $txt = "";
- for $cell ( 0..255 ) {
- $code = sprintf("%02X%02X",$lig_row,$cell);
- $txt .= "\n " if $cell%8 == 0;
- if( defined $ligature{$code} ) {
- $txt .= " $position,";
- @ligature = split(" ", $ligature{$code});
-# we need to sort ligatures according to their length.
-# long ones have to come first!
- @ligature_sort = sort { $decomposition_len{$b} <=> $decomposition_len{$a} } @ligature;
-# now replace each code by it's position in
-# the decomposition map.
- undef(@lig_pos);
- for $n (@ligature_sort) {
- push(@lig_pos, $decomposition_pos{$n});
- }
-# debug info
- if( 0 ) {
- print "ligatures: $ligature{$code}\n";
- $sort = join(" ", @ligature_sort);
- print "sorted : $sort\n";
- }
- $lig = join(", ", @lig_pos);
- $table_txt .= " $lig, 0,\n";
- $size += 2 * scalar(@ligature) + 2;
- $position += scalar(@ligature) + 1;
- } else {
- $txt .= " 0,";
- }
- }
- $therow = $lig_row{$txt};
- if ( !defined $therow ) {
- $size+=512;
- $therow = "li_".sprintf("%02X",$lig_row);
- $lig_rowtext{$therow} =
- "static const Q_UINT16 ${therow}[] = {$txt\n};\n\n";
- $lig_row{$txt}=$therow;
- }
- $rowtable_txt .= "\n " if $lig_row%8 == 0;
- $rowtable_txt .= "$therow, ";
-}
-
-# Print ligature tables
-#
-print "$table_txt\n};\n\n";
-for $r ( sort keys %lig_rowtext ) {
- print $lig_rowtext{$r};
-}
-print "$rowtable_txt\n};\n";
-$size += 256*4;
-print "// $size bytes\n\n";
-
-
-
-# Build direction/joining/mirrored pages...
-#
-$rowtable_txt =
- "static const Q_UINT8 * const direction_info[256] = {";
-for $dir_row ( 0..255 ) {
- $nonzero=0;
- $txt = "";
- for $cell ( 0..255 ) {
- $code = sprintf("%02X%02X",$dir_row,$cell);
- $dir = $bidi_category{$code};
- $dir = 0 if !defined $dir;
- $join = $joining{$code};
- $join = 0 if !defined $join;
- $mirr = $mirrored{$code};
- $mirr = 0 if !defined $mirr;
- $info = $dir + 32*$join + 128*$mirr;
- $txt .= "\n " if $cell%8 == 0;
- $txt .= "$info, ";
- }
- $therow = $dir_row{$txt};
- if ( !defined $therow ) {
- $size+=256;
- $therow = "dir_".sprintf("%02X",$dir_row);
- $dir_rowtext{$therow} =
- "static const Q_UINT8 ${therow}[] = {$txt\n};\n\n";
- $dir_row{$txt}=$therow;
- }
- $rowtable_txt .= "\n " if $dir_row%8 == 0;
- $rowtable_txt .= "$therow, ";
-}
-
-# Print pages...
-#
-for $r ( sort keys %dir_rowtext ) {
- print $dir_rowtext{$r};
-}
-print "$rowtable_txt\n};\n";
-$size += 256*4;
-print "// $size bytes\n\n";
-
-
-
-print "#endif\n\n";
-print "// END OF GENERATED DATA\n\n";
-
-
-__END__
-
-*/
-
-
-// START OF GENERATED DATA
-
-static const Q_UINT8 ui_00[] = {
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 7, 26, 26, 26, 28, 26, 26, 26,
- 22, 23, 26, 27, 26, 21, 26, 26,
- 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 26, 26, 27, 27, 27, 26,
- 26, 15, 15, 15, 15, 15, 15, 15,
- 15, 15, 15, 15, 15, 15, 15, 15,
- 15, 15, 15, 15, 15, 15, 15, 15,
- 15, 15, 15, 22, 26, 23, 29, 20,
- 29, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 22, 27, 23, 27, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 7, 26, 28, 28, 28, 28, 30, 30,
- 29, 30, 16, 24, 27, 21, 30, 29,
- 30, 27, 6, 6, 29, 16, 30, 26,
- 29, 6, 16, 25, 6, 6, 6, 26,
- 15, 15, 15, 15, 15, 15, 15, 15,
- 15, 15, 15, 15, 15, 15, 15, 15,
- 15, 15, 15, 15, 15, 15, 15, 27,
- 15, 15, 15, 15, 15, 15, 15, 16,
- 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 27,
- 16, 16, 16, 16, 16, 16, 16, 16,
-};
-
-#ifndef QT_NO_UNICODETABLES
-
-static const Q_UINT8 ui_01[] = {
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 16, 15, 16, 15, 16, 15, 16, 15,
- 16, 15, 16, 15, 16, 15, 16, 15,
- 16, 16, 15, 16, 15, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 15, 16, 15, 16, 15, 16, 16,
- 16, 15, 15, 16, 15, 16, 15, 15,
- 16, 15, 15, 15, 16, 16, 15, 15,
- 15, 15, 16, 15, 15, 16, 15, 15,
- 15, 16, 16, 16, 15, 15, 16, 15,
- 15, 16, 15, 16, 15, 16, 15, 15,
- 16, 15, 16, 16, 15, 16, 15, 15,
- 16, 15, 15, 15, 16, 15, 16, 15,
- 15, 16, 16, 19, 15, 16, 16, 16,
- 19, 19, 19, 19, 15, 17, 16, 15,
- 17, 16, 15, 17, 16, 15, 16, 15,
- 16, 15, 16, 15, 16, 15, 16, 15,
- 16, 15, 16, 15, 16, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 16, 15, 17, 16, 15, 16, 15, 15,
- 15, 16, 15, 16, 15, 16, 15, 16,
-};
-
-static const Q_UINT8 ui_02[] = {
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 0, 0, 15, 16, 15, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 16, 15, 16, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 0, 0,
- 18, 18, 18, 18, 18, 18, 18, 18,
- 18, 29, 29, 18, 18, 18, 18, 18,
- 18, 18, 29, 29, 29, 29, 29, 29,
- 29, 29, 29, 29, 29, 29, 29, 29,
- 18, 18, 29, 29, 29, 29, 29, 29,
- 29, 29, 29, 29, 29, 29, 29, 29,
- 18, 18, 18, 18, 18, 29, 29, 29,
- 29, 29, 29, 29, 29, 29, 18, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 ui_03[] = {
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 1, 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 29, 29, 0, 0,
- 0, 0, 18, 0, 0, 0, 26, 0,
- 0, 0, 0, 0, 29, 29, 15, 26,
- 15, 15, 15, 0, 15, 0, 15, 15,
- 16, 15, 15, 15, 15, 15, 15, 15,
- 15, 15, 15, 15, 15, 15, 15, 15,
- 15, 15, 0, 15, 15, 15, 15, 15,
- 15, 15, 15, 15, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 0,
- 16, 16, 15, 15, 15, 16, 16, 16,
- 0, 0, 15, 16, 15, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 16, 16, 16, 16, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 ui_04[] = {
- 15, 15, 15, 15, 15, 15, 15, 15,
- 15, 15, 15, 15, 15, 15, 15, 15,
- 15, 15, 15, 15, 15, 15, 15, 15,
- 15, 15, 15, 15, 15, 15, 15, 15,
- 15, 15, 15, 15, 15, 15, 15, 15,
- 15, 15, 15, 15, 15, 15, 15, 15,
- 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 16, 30, 1, 1, 1, 1, 0,
- 3, 3, 0, 0, 15, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 15, 16, 15, 16, 0, 0, 15,
- 16, 0, 0, 15, 16, 0, 0, 0,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 0, 0,
- 15, 16, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 ui_05[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 15, 15, 15, 15, 15, 15, 15,
- 15, 15, 15, 15, 15, 15, 15, 15,
- 15, 15, 15, 15, 15, 15, 15, 15,
- 15, 15, 15, 15, 15, 15, 15, 15,
- 15, 15, 15, 15, 15, 15, 15, 0,
- 0, 18, 26, 26, 26, 26, 26, 26,
- 0, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16,
- 0, 26, 21, 0, 0, 0, 0, 0,
- 0, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 0, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 0, 1, 1, 1, 26, 1,
- 26, 1, 1, 26, 1, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 0, 0, 0, 0, 0,
- 19, 19, 19, 26, 26, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 ui_06[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 26, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 26, 0, 0, 0, 26,
- 0, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 0, 0, 0, 0, 0,
- 18, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 26, 26, 26, 26, 0, 0,
- 1, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 26, 19, 1, 1,
- 1, 1, 1, 1, 1, 3, 3, 1,
- 1, 1, 1, 1, 1, 18, 18, 1,
- 1, 30, 1, 1, 1, 1, 0, 0,
- 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 19, 19, 19, 30, 30, 0,
-};
-
-static const Q_UINT8 ui_07[] = {
- 26, 26, 26, 26, 26, 26, 26, 26,
- 26, 26, 26, 26, 26, 26, 0, 11,
- 19, 1, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 0, 0, 0,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 ui_08[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 ui_09[] = {
- 0, 1, 1, 2, 0, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 0, 0, 1, 19, 2, 2,
- 2, 1, 1, 1, 1, 1, 1, 1,
- 1, 2, 2, 2, 2, 1, 0, 0,
- 19, 1, 1, 1, 1, 0, 0, 0,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 1, 1, 26, 26, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4,
- 26, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 1, 2, 2, 0, 19, 19, 19,
- 19, 19, 19, 19, 19, 0, 0, 19,
- 19, 0, 0, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 0, 19, 19, 19, 19, 19, 19,
- 19, 0, 19, 0, 0, 0, 19, 19,
- 19, 19, 0, 0, 1, 0, 2, 2,
- 2, 1, 1, 1, 1, 0, 0, 2,
- 2, 0, 0, 2, 2, 1, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 2,
- 0, 0, 0, 0, 19, 19, 0, 19,
- 19, 19, 1, 1, 0, 0, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4,
- 19, 19, 28, 28, 6, 6, 6, 6,
- 6, 6, 30, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 ui_0A[] = {
- 0, 0, 1, 0, 0, 19, 19, 19,
- 19, 19, 19, 0, 0, 0, 0, 19,
- 19, 0, 0, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 0, 19, 19, 19, 19, 19, 19,
- 19, 0, 19, 19, 0, 19, 19, 0,
- 19, 19, 0, 0, 1, 0, 2, 2,
- 2, 1, 1, 0, 0, 0, 0, 1,
- 1, 0, 0, 1, 1, 1, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 19, 19, 19, 19, 0, 19, 0,
- 0, 0, 0, 0, 0, 0, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4,
- 1, 1, 19, 19, 19, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 1, 1, 2, 0, 19, 19, 19,
- 19, 19, 19, 19, 0, 19, 0, 19,
- 19, 19, 0, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 0, 19, 19, 19, 19, 19, 19,
- 19, 0, 19, 19, 0, 19, 19, 19,
- 19, 19, 0, 0, 1, 19, 2, 2,
- 2, 1, 1, 1, 1, 1, 0, 1,
- 1, 2, 0, 2, 2, 1, 0, 0,
- 19, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 19, 0, 0, 0, 0, 0, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 ui_0B[] = {
- 0, 1, 2, 2, 0, 19, 19, 19,
- 19, 19, 19, 19, 19, 0, 0, 19,
- 19, 0, 0, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 0, 19, 19, 19, 19, 19, 19,
- 19, 0, 19, 19, 0, 0, 19, 19,
- 19, 19, 0, 0, 1, 19, 2, 1,
- 2, 1, 1, 1, 0, 0, 0, 2,
- 2, 0, 0, 2, 2, 1, 0, 0,
- 0, 0, 0, 0, 0, 0, 1, 2,
- 0, 0, 0, 0, 19, 19, 0, 19,
- 19, 19, 0, 0, 0, 0, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4,
- 30, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 1, 2, 0, 19, 19, 19,
- 19, 19, 19, 0, 0, 0, 19, 19,
- 19, 0, 19, 19, 19, 19, 0, 0,
- 0, 19, 19, 0, 19, 0, 19, 19,
- 0, 0, 0, 19, 19, 0, 0, 0,
- 19, 19, 19, 0, 0, 0, 19, 19,
- 19, 19, 19, 19, 19, 19, 0, 19,
- 19, 19, 0, 0, 0, 0, 2, 2,
- 1, 2, 2, 0, 0, 0, 2, 2,
- 2, 0, 2, 2, 2, 1, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 2,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 4,
- 4, 4, 4, 4, 4, 4, 4, 4,
- 6, 6, 6, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 ui_0C[] = {
- 0, 2, 2, 2, 0, 19, 19, 19,
- 19, 19, 19, 19, 19, 0, 19, 19,
- 19, 0, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 0, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 0, 19, 19, 19,
- 19, 19, 0, 0, 0, 0, 1, 1,
- 1, 2, 2, 2, 2, 0, 1, 1,
- 1, 0, 1, 1, 1, 1, 0, 0,
- 0, 0, 0, 0, 0, 1, 1, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 19, 19, 0, 0, 0, 0, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 2, 2, 0, 19, 19, 19,
- 19, 19, 19, 19, 19, 0, 19, 19,
- 19, 0, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 0, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 0, 19, 19, 19,
- 19, 19, 0, 0, 0, 0, 2, 1,
- 2, 2, 2, 2, 2, 0, 1, 2,
- 2, 0, 2, 2, 1, 1, 0, 0,
- 0, 0, 0, 0, 0, 2, 2, 0,
- 0, 0, 0, 0, 0, 0, 19, 0,
- 19, 19, 0, 0, 0, 0, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 ui_0D[] = {
- 0, 0, 2, 2, 0, 19, 19, 19,
- 19, 19, 19, 19, 19, 0, 19, 19,
- 19, 0, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 0, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 0, 0, 0, 0, 2, 2,
- 2, 1, 1, 1, 0, 0, 2, 2,
- 2, 0, 2, 2, 2, 1, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 2,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 19, 19, 0, 0, 0, 0, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 2, 2, 0, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 0,
- 0, 0, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 0, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 0, 19, 0, 0,
- 19, 19, 19, 19, 19, 19, 19, 0,
- 0, 0, 1, 0, 0, 0, 0, 2,
- 2, 2, 1, 1, 1, 0, 1, 0,
- 2, 2, 2, 2, 2, 2, 2, 2,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 2, 2, 26, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 ui_0E[] = {
- 0, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 1, 19, 19, 1, 1, 1, 1,
- 1, 1, 1, 0, 0, 0, 0, 28,
- 19, 19, 19, 19, 19, 19, 18, 1,
- 1, 1, 1, 1, 1, 1, 1, 26,
- 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 26, 26, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 19, 19, 0, 19, 0, 0, 19,
- 19, 0, 19, 0, 0, 19, 0, 0,
- 0, 0, 0, 0, 19, 19, 19, 19,
- 0, 19, 19, 19, 19, 19, 19, 19,
- 0, 19, 19, 19, 0, 19, 0, 19,
- 0, 0, 19, 19, 0, 19, 19, 19,
- 19, 1, 19, 19, 1, 1, 1, 1,
- 1, 1, 0, 1, 1, 19, 0, 0,
- 19, 19, 19, 19, 19, 0, 18, 0,
- 1, 1, 1, 1, 1, 1, 0, 0,
- 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 0, 0, 19, 19, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 ui_0F[] = {
- 19, 30, 30, 30, 26, 26, 26, 26,
- 26, 26, 26, 26, 26, 26, 26, 26,
- 26, 26, 26, 30, 30, 30, 30, 30,
- 1, 1, 30, 30, 30, 30, 30, 30,
- 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 6, 6, 6, 6, 6, 6,
- 6, 6, 6, 6, 30, 1, 30, 1,
- 30, 1, 22, 23, 22, 23, 2, 2,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 0, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 0, 0, 0, 0, 0,
- 0, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 2,
- 1, 1, 1, 1, 1, 26, 1, 1,
- 19, 19, 19, 19, 0, 0, 0, 0,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 0, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 0, 30, 30,
- 30, 30, 30, 30, 30, 30, 1, 30,
- 30, 30, 30, 30, 30, 0, 0, 30,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 ui_10[] = {
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 0, 19, 19, 19, 19, 19,
- 0, 19, 19, 0, 2, 1, 1, 1,
- 1, 2, 1, 0, 0, 0, 1, 1,
- 2, 1, 0, 0, 0, 0, 0, 0,
- 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 26, 26, 26, 26, 26, 26,
- 19, 19, 19, 19, 19, 19, 2, 2,
- 1, 1, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 15, 15, 15, 15, 15, 15, 15, 15,
- 15, 15, 15, 15, 15, 15, 15, 15,
- 15, 15, 15, 15, 15, 15, 15, 15,
- 15, 15, 15, 15, 15, 15, 15, 15,
- 15, 15, 15, 15, 15, 15, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 0,
- 0, 0, 0, 26, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 ui_11[] = {
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 0, 0, 0, 0, 0, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 0, 0, 0, 0, 0,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 ui_12[] = {
- 19, 19, 19, 19, 19, 19, 19, 0,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 0,
- 19, 0, 19, 19, 19, 19, 0, 0,
- 19, 19, 19, 19, 19, 19, 19, 0,
- 19, 0, 19, 19, 19, 19, 0, 0,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 0,
- 19, 0, 19, 19, 19, 19, 0, 0,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 0,
- 19, 0, 19, 19, 19, 19, 0, 0,
- 19, 19, 19, 19, 19, 19, 19, 0,
- 19, 0, 19, 19, 19, 19, 0, 0,
- 19, 19, 19, 19, 19, 19, 19, 0,
- 19, 19, 19, 19, 19, 19, 19, 0,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 0,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
-};
-
-static const Q_UINT8 ui_13[] = {
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 0,
- 19, 0, 19, 19, 19, 19, 0, 0,
- 19, 19, 19, 19, 19, 19, 19, 0,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 0,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 0, 0, 0, 0, 0,
- 0, 26, 26, 26, 26, 26, 26, 26,
- 26, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 6, 6, 6, 6, 6, 6,
- 6, 6, 6, 6, 6, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 ui_14[] = {
- 0, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
-};
-
-static const Q_UINT8 ui_15[] = {
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
-};
-
-static const Q_UINT8 ui_16[] = {
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 26, 26, 19,
- 19, 19, 19, 19, 19, 19, 19, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 7, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 22, 23, 0, 0, 0,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 26, 26, 26, 6, 6,
- 6, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 ui_17[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 2, 2, 2, 1,
- 1, 1, 1, 1, 1, 1, 2, 2,
- 2, 2, 2, 2, 2, 2, 1, 2,
- 2, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 26, 26, 26, 26,
- 26, 26, 26, 28, 26, 0, 0, 0,
- 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 ui_18[] = {
- 26, 26, 26, 26, 26, 26, 21, 26,
- 26, 26, 26, 11, 11, 11, 11, 0,
- 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 0, 0, 0, 0, 0, 0,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 18, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 1, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 ui_1E[] = {
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 16, 16,
- 16, 16, 16, 16, 0, 0, 0, 0,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 16, 15, 16, 15, 16, 15, 16,
- 15, 16, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 ui_1F[] = {
- 16, 16, 16, 16, 16, 16, 16, 16,
- 15, 15, 15, 15, 15, 15, 15, 15,
- 16, 16, 16, 16, 16, 16, 0, 0,
- 15, 15, 15, 15, 15, 15, 0, 0,
- 16, 16, 16, 16, 16, 16, 16, 16,
- 15, 15, 15, 15, 15, 15, 15, 15,
- 16, 16, 16, 16, 16, 16, 16, 16,
- 15, 15, 15, 15, 15, 15, 15, 15,
- 16, 16, 16, 16, 16, 16, 0, 0,
- 15, 15, 15, 15, 15, 15, 0, 0,
- 16, 16, 16, 16, 16, 16, 16, 16,
- 0, 15, 0, 15, 0, 15, 0, 15,
- 16, 16, 16, 16, 16, 16, 16, 16,
- 15, 15, 15, 15, 15, 15, 15, 15,
- 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 0, 0,
- 16, 16, 16, 16, 16, 16, 16, 16,
- 17, 17, 17, 17, 17, 17, 17, 17,
- 16, 16, 16, 16, 16, 16, 16, 16,
- 17, 17, 17, 17, 17, 17, 17, 17,
- 16, 16, 16, 16, 16, 16, 16, 16,
- 17, 17, 17, 17, 17, 17, 17, 17,
- 16, 16, 16, 16, 16, 0, 16, 16,
- 15, 15, 15, 15, 17, 29, 16, 29,
- 29, 29, 16, 16, 16, 0, 16, 16,
- 15, 15, 15, 15, 17, 29, 29, 29,
- 16, 16, 16, 16, 0, 0, 16, 16,
- 15, 15, 15, 15, 0, 29, 29, 29,
- 16, 16, 16, 16, 16, 16, 16, 16,
- 15, 15, 15, 15, 15, 29, 29, 29,
- 0, 0, 16, 16, 16, 0, 16, 16,
- 15, 15, 15, 15, 17, 29, 29, 0,
-};
-
-static const Q_UINT8 ui_20[] = {
- 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 11, 11, 11, 11,
- 21, 21, 21, 21, 21, 21, 26, 26,
- 24, 25, 22, 24, 24, 25, 22, 24,
- 26, 26, 26, 26, 26, 26, 26, 26,
- 8, 9, 11, 11, 11, 11, 11, 7,
- 26, 26, 26, 26, 26, 26, 26, 26,
- 26, 24, 25, 26, 26, 26, 26, 20,
- 20, 26, 26, 26, 27, 22, 23, 0,
- 26, 26, 26, 26, 26, 26, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 11, 11, 11, 11, 11, 11,
- 6, 0, 0, 0, 6, 6, 6, 6,
- 6, 6, 27, 27, 27, 22, 23, 16,
- 6, 6, 6, 6, 6, 6, 6, 6,
- 6, 6, 27, 27, 27, 22, 23, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 28, 28, 28, 28, 28, 28, 28, 28,
- 28, 28, 28, 28, 28, 28, 28, 28,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 3, 3, 3,
- 3, 1, 3, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 ui_21[] = {
- 30, 30, 15, 30, 30, 30, 30, 15,
- 30, 30, 16, 15, 15, 15, 16, 16,
- 15, 15, 15, 16, 30, 15, 30, 30,
- 30, 15, 15, 15, 15, 15, 30, 30,
- 30, 30, 30, 30, 15, 30, 15, 30,
- 15, 30, 15, 15, 15, 15, 30, 16,
- 15, 15, 30, 15, 16, 19, 19, 19,
- 19, 16, 30, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 6, 6, 6, 6, 6,
- 6, 6, 6, 6, 6, 6, 6, 6,
- 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 27, 27, 27, 27, 27, 30, 30, 30,
- 30, 30, 27, 27, 30, 30, 30, 30,
- 27, 30, 30, 27, 30, 30, 27, 30,
- 30, 30, 30, 30, 30, 30, 27, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 27, 27,
- 30, 30, 27, 30, 27, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 ui_22[] = {
- 27, 27, 27, 27, 27, 27, 27, 27,
- 27, 27, 27, 27, 27, 27, 27, 27,
- 27, 27, 27, 27, 27, 27, 27, 27,
- 27, 27, 27, 27, 27, 27, 27, 27,
- 27, 27, 27, 27, 27, 27, 27, 27,
- 27, 27, 27, 27, 27, 27, 27, 27,
- 27, 27, 27, 27, 27, 27, 27, 27,
- 27, 27, 27, 27, 27, 27, 27, 27,
- 27, 27, 27, 27, 27, 27, 27, 27,
- 27, 27, 27, 27, 27, 27, 27, 27,
- 27, 27, 27, 27, 27, 27, 27, 27,
- 27, 27, 27, 27, 27, 27, 27, 27,
- 27, 27, 27, 27, 27, 27, 27, 27,
- 27, 27, 27, 27, 27, 27, 27, 27,
- 27, 27, 27, 27, 27, 27, 27, 27,
- 27, 27, 27, 27, 27, 27, 27, 27,
- 27, 27, 27, 27, 27, 27, 27, 27,
- 27, 27, 27, 27, 27, 27, 27, 27,
- 27, 27, 27, 27, 27, 27, 27, 27,
- 27, 27, 27, 27, 27, 27, 27, 27,
- 27, 27, 27, 27, 27, 27, 27, 27,
- 27, 27, 27, 27, 27, 27, 27, 27,
- 27, 27, 27, 27, 27, 27, 27, 27,
- 27, 27, 27, 27, 27, 27, 27, 27,
- 27, 27, 27, 27, 27, 27, 27, 27,
- 27, 27, 27, 27, 27, 27, 27, 27,
- 27, 27, 27, 27, 27, 27, 27, 27,
- 27, 27, 27, 27, 27, 27, 27, 27,
- 27, 27, 27, 27, 27, 27, 27, 27,
- 27, 27, 27, 27, 27, 27, 27, 27,
- 27, 27, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 ui_23[] = {
- 30, 30, 30, 30, 30, 30, 30, 30,
- 27, 27, 27, 27, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 27, 27, 30, 30, 30, 30, 30, 30,
- 30, 22, 23, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 0, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 ui_24[] = {
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 6, 6, 6, 6, 6, 6, 6, 6,
- 6, 6, 6, 6, 6, 6, 6, 6,
- 6, 6, 6, 6, 6, 6, 6, 6,
- 6, 6, 6, 6, 6, 6, 6, 6,
- 6, 6, 6, 6, 6, 6, 6, 6,
- 6, 6, 6, 6, 6, 6, 6, 6,
- 6, 6, 6, 6, 6, 6, 6, 6,
- 6, 6, 6, 6, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 6, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 ui_25[] = {
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 27,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 27, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 ui_26[] = {
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 0, 0, 0, 0,
- 0, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 27,
- 30, 30, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 ui_27[] = {
- 0, 30, 30, 30, 30, 0, 30, 30,
- 30, 30, 0, 0, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 0, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 0, 30, 0, 30,
- 30, 30, 30, 0, 0, 0, 30, 0,
- 30, 30, 30, 30, 30, 30, 30, 0,
- 0, 30, 30, 30, 30, 30, 30, 30,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 6, 6,
- 6, 6, 6, 6, 6, 6, 6, 6,
- 6, 6, 6, 6, 6, 6, 6, 6,
- 6, 6, 6, 6, 6, 6, 6, 6,
- 6, 6, 6, 6, 30, 0, 0, 0,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 0, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 ui_28[] = {
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
-};
-
-static const Q_UINT8 ui_2E[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 0, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 ui_2F[] = {
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 ui_30[] = {
- 7, 26, 26, 26, 30, 18, 19, 5,
- 22, 23, 22, 23, 22, 23, 22, 23,
- 22, 23, 30, 30, 22, 23, 22, 23,
- 22, 23, 22, 23, 21, 22, 23, 23,
- 30, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 1, 1, 1, 1, 1, 1,
- 21, 18, 18, 18, 18, 18, 30, 30,
- 5, 5, 5, 0, 0, 0, 30, 30,
- 0, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 0, 0, 0,
- 0, 1, 1, 29, 29, 18, 18, 0,
- 0, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 20, 18, 18, 18, 0,
-};
-
-static const Q_UINT8 ui_31[] = {
- 0, 0, 0, 0, 0, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 0, 0, 0,
- 0, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 0,
- 30, 30, 6, 6, 6, 6, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 ui_32[] = {
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 0, 0, 0,
- 6, 6, 6, 6, 6, 6, 6, 6,
- 6, 6, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 0, 0, 0, 30,
- 6, 6, 6, 6, 6, 6, 6, 6,
- 6, 6, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 0, 0, 0, 0,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 0,
-};
-
-static const Q_UINT8 ui_33[] = {
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 0,
- 0, 0, 0, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 0, 0,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 0,
-};
-
-static const Q_UINT8 ui_34[] = {
- 19, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 ui_4D[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 19, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 ui_9F[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 19, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 ui_A4[] = {
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 0, 0, 0,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 0, 0, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 0, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 0, 30, 30, 30, 0, 30, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 ui_D7[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 19, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 ui_D8[] = {
- 12, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 ui_DB[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 12,
- 12, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 12,
-};
-
-static const Q_UINT8 ui_DF[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 12,
-};
-
-static const Q_UINT8 ui_E0[] = {
- 13, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 ui_F8[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 13,
-};
-
-static const Q_UINT8 ui_FA[] = {
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 ui_FB[] = {
- 16, 16, 16, 16, 16, 16, 16, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 16, 16, 16, 16, 16,
- 0, 0, 0, 0, 0, 19, 1, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 27, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 0,
- 19, 19, 19, 19, 19, 0, 19, 0,
- 19, 19, 0, 19, 19, 0, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
-};
-
-static const Q_UINT8 ui_FD[] = {
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 22, 23,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 0, 0, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 ui_FE[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 1, 1, 1, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 26, 21, 21, 20, 20, 22, 23, 22,
- 23, 22, 23, 22, 23, 22, 23, 22,
- 23, 22, 23, 22, 23, 0, 0, 0,
- 0, 26, 26, 26, 26, 20, 20, 20,
- 26, 26, 26, 0, 26, 26, 26, 26,
- 21, 22, 23, 22, 23, 22, 23, 26,
- 26, 26, 27, 21, 27, 27, 27, 0,
- 26, 28, 26, 26, 0, 0, 0, 0,
- 19, 19, 19, 0, 19, 0, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 0, 0, 11,
-};
-
-static const Q_UINT8 ui_FF[] = {
- 0, 26, 26, 26, 28, 26, 26, 26,
- 22, 23, 26, 27, 26, 21, 26, 26,
- 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 26, 26, 27, 27, 27, 26,
- 26, 15, 15, 15, 15, 15, 15, 15,
- 15, 15, 15, 15, 15, 15, 15, 15,
- 15, 15, 15, 15, 15, 15, 15, 15,
- 15, 15, 15, 22, 26, 23, 29, 20,
- 29, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 22, 27, 23, 27, 0,
- 0, 26, 22, 23, 26, 20, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 18, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 18, 18,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 0,
- 0, 0, 19, 19, 19, 19, 19, 19,
- 0, 0, 19, 19, 19, 19, 19, 19,
- 0, 0, 19, 19, 19, 19, 19, 19,
- 0, 0, 19, 19, 19, 0, 0, 0,
- 28, 28, 27, 29, 30, 28, 28, 0,
- 30, 27, 27, 27, 27, 30, 30, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 11, 11, 11, 30, 30, 0, 0,
-};
-
-static const Q_UINT8 * const unicode_info[256] = {
- ui_00, ui_01, ui_02, ui_03, ui_04, ui_05, ui_06, ui_07,
- ui_08, ui_09, ui_0A, ui_0B, ui_0C, ui_0D, ui_0E, ui_0F,
- ui_10, ui_11, ui_12, ui_13, ui_14, ui_15, ui_16, ui_17,
- ui_18, ui_08, ui_08, ui_08, ui_08, ui_08, ui_1E, ui_1F,
- ui_20, ui_21, ui_22, ui_23, ui_24, ui_25, ui_26, ui_27,
- ui_28, ui_08, ui_08, ui_08, ui_08, ui_08, ui_2E, ui_2F,
- ui_30, ui_31, ui_32, ui_33, ui_34, ui_08, ui_08, ui_08,
- ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08,
- ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08,
- ui_08, ui_08, ui_08, ui_08, ui_08, ui_4D, ui_34, ui_08,
- ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08,
- ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08,
- ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08,
- ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08,
- ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08,
- ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08,
- ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08,
- ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08,
- ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08,
- ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_9F,
- ui_15, ui_15, ui_15, ui_15, ui_A4, ui_08, ui_08, ui_08,
- ui_08, ui_08, ui_08, ui_08, ui_34, ui_08, ui_08, ui_08,
- ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08,
- ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08,
- ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08,
- ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08,
- ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_D7,
- ui_D8, ui_08, ui_08, ui_DB, ui_D8, ui_08, ui_08, ui_DF,
- ui_E0, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08,
- ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08,
- ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08, ui_08,
- ui_F8, ui_15, ui_FA, ui_FB, ui_15, ui_FD, ui_FE, ui_FF,
-};
-// 15616 bytes
-
-static const Q_UINT16 decomposition_map [] = {
- 0,
- 3, 0x00A0, 0x0020, 0,
- 16, 0x00A8, 0x0020, 0x0308, 0,
- 9, 0x00AA, 0x0061, 0,
- 16, 0x00AF, 0x0020, 0x0304, 0,
- 9, 0x00B2, 0x0032, 0,
- 9, 0x00B3, 0x0033, 0,
- 16, 0x00B4, 0x0020, 0x0301, 0,
- 16, 0x00B5, 0x03BC, 0,
- 16, 0x00B8, 0x0020, 0x0327, 0,
- 9, 0x00B9, 0x0031, 0,
- 9, 0x00BA, 0x006F, 0,
- 17, 0x00BC, 0x0031, 0x2044, 0x0034, 0,
- 17, 0x00BD, 0x0031, 0x2044, 0x0032, 0,
- 17, 0x00BE, 0x0033, 0x2044, 0x0034, 0,
- 1, 0x00C0, 0x0041, 0x0300, 0,
- 1, 0x00C1, 0x0041, 0x0301, 0,
- 1, 0x00C2, 0x0041, 0x0302, 0,
- 1, 0x00C3, 0x0041, 0x0303, 0,
- 1, 0x00C4, 0x0041, 0x0308, 0,
- 1, 0x00C5, 0x0041, 0x030A, 0,
- 1, 0x00C7, 0x0043, 0x0327, 0,
- 1, 0x00C8, 0x0045, 0x0300, 0,
- 1, 0x00C9, 0x0045, 0x0301, 0,
- 1, 0x00CA, 0x0045, 0x0302, 0,
- 1, 0x00CB, 0x0045, 0x0308, 0,
- 1, 0x00CC, 0x0049, 0x0300, 0,
- 1, 0x00CD, 0x0049, 0x0301, 0,
- 1, 0x00CE, 0x0049, 0x0302, 0,
- 1, 0x00CF, 0x0049, 0x0308, 0,
- 1, 0x00D1, 0x004E, 0x0303, 0,
- 1, 0x00D2, 0x004F, 0x0300, 0,
- 1, 0x00D3, 0x004F, 0x0301, 0,
- 1, 0x00D4, 0x004F, 0x0302, 0,
- 1, 0x00D5, 0x004F, 0x0303, 0,
- 1, 0x00D6, 0x004F, 0x0308, 0,
- 1, 0x00D9, 0x0055, 0x0300, 0,
- 1, 0x00DA, 0x0055, 0x0301, 0,
- 1, 0x00DB, 0x0055, 0x0302, 0,
- 1, 0x00DC, 0x0055, 0x0308, 0,
- 1, 0x00DD, 0x0059, 0x0301, 0,
- 1, 0x00E0, 0x0061, 0x0300, 0,
- 1, 0x00E1, 0x0061, 0x0301, 0,
- 1, 0x00E2, 0x0061, 0x0302, 0,
- 1, 0x00E3, 0x0061, 0x0303, 0,
- 1, 0x00E4, 0x0061, 0x0308, 0,
- 1, 0x00E5, 0x0061, 0x030A, 0,
- 1, 0x00E7, 0x0063, 0x0327, 0,
- 1, 0x00E8, 0x0065, 0x0300, 0,
- 1, 0x00E9, 0x0065, 0x0301, 0,
- 1, 0x00EA, 0x0065, 0x0302, 0,
- 1, 0x00EB, 0x0065, 0x0308, 0,
- 1, 0x00EC, 0x0069, 0x0300, 0,
- 1, 0x00ED, 0x0069, 0x0301, 0,
- 1, 0x00EE, 0x0069, 0x0302, 0,
- 1, 0x00EF, 0x0069, 0x0308, 0,
- 1, 0x00F1, 0x006E, 0x0303, 0,
- 1, 0x00F2, 0x006F, 0x0300, 0,
- 1, 0x00F3, 0x006F, 0x0301, 0,
- 1, 0x00F4, 0x006F, 0x0302, 0,
- 1, 0x00F5, 0x006F, 0x0303, 0,
- 1, 0x00F6, 0x006F, 0x0308, 0,
- 1, 0x00F9, 0x0075, 0x0300, 0,
- 1, 0x00FA, 0x0075, 0x0301, 0,
- 1, 0x00FB, 0x0075, 0x0302, 0,
- 1, 0x00FC, 0x0075, 0x0308, 0,
- 1, 0x00FD, 0x0079, 0x0301, 0,
- 1, 0x00FF, 0x0079, 0x0308, 0,
- 1, 0x0100, 0x0041, 0x0304, 0,
- 1, 0x0101, 0x0061, 0x0304, 0,
- 1, 0x0102, 0x0041, 0x0306, 0,
- 1, 0x0103, 0x0061, 0x0306, 0,
- 1, 0x0104, 0x0041, 0x0328, 0,
- 1, 0x0105, 0x0061, 0x0328, 0,
- 1, 0x0106, 0x0043, 0x0301, 0,
- 1, 0x0107, 0x0063, 0x0301, 0,
- 1, 0x0108, 0x0043, 0x0302, 0,
- 1, 0x0109, 0x0063, 0x0302, 0,
- 1, 0x010A, 0x0043, 0x0307, 0,
- 1, 0x010B, 0x0063, 0x0307, 0,
- 1, 0x010C, 0x0043, 0x030C, 0,
- 1, 0x010D, 0x0063, 0x030C, 0,
- 1, 0x010E, 0x0044, 0x030C, 0,
- 1, 0x010F, 0x0064, 0x030C, 0,
- 1, 0x0112, 0x0045, 0x0304, 0,
- 1, 0x0113, 0x0065, 0x0304, 0,
- 1, 0x0114, 0x0045, 0x0306, 0,
- 1, 0x0115, 0x0065, 0x0306, 0,
- 1, 0x0116, 0x0045, 0x0307, 0,
- 1, 0x0117, 0x0065, 0x0307, 0,
- 1, 0x0118, 0x0045, 0x0328, 0,
- 1, 0x0119, 0x0065, 0x0328, 0,
- 1, 0x011A, 0x0045, 0x030C, 0,
- 1, 0x011B, 0x0065, 0x030C, 0,
- 1, 0x011C, 0x0047, 0x0302, 0,
- 1, 0x011D, 0x0067, 0x0302, 0,
- 1, 0x011E, 0x0047, 0x0306, 0,
- 1, 0x011F, 0x0067, 0x0306, 0,
- 1, 0x0120, 0x0047, 0x0307, 0,
- 1, 0x0121, 0x0067, 0x0307, 0,
- 1, 0x0122, 0x0047, 0x0327, 0,
- 1, 0x0123, 0x0067, 0x0327, 0,
- 1, 0x0124, 0x0048, 0x0302, 0,
- 1, 0x0125, 0x0068, 0x0302, 0,
- 1, 0x0128, 0x0049, 0x0303, 0,
- 1, 0x0129, 0x0069, 0x0303, 0,
- 1, 0x012A, 0x0049, 0x0304, 0,
- 1, 0x012B, 0x0069, 0x0304, 0,
- 1, 0x012C, 0x0049, 0x0306, 0,
- 1, 0x012D, 0x0069, 0x0306, 0,
- 1, 0x012E, 0x0049, 0x0328, 0,
- 1, 0x012F, 0x0069, 0x0328, 0,
- 1, 0x0130, 0x0049, 0x0307, 0,
- 16, 0x0132, 0x0049, 0x004A, 0,
- 16, 0x0133, 0x0069, 0x006A, 0,
- 1, 0x0134, 0x004A, 0x0302, 0,
- 1, 0x0135, 0x006A, 0x0302, 0,
- 1, 0x0136, 0x004B, 0x0327, 0,
- 1, 0x0137, 0x006B, 0x0327, 0,
- 1, 0x0139, 0x004C, 0x0301, 0,
- 1, 0x013A, 0x006C, 0x0301, 0,
- 1, 0x013B, 0x004C, 0x0327, 0,
- 1, 0x013C, 0x006C, 0x0327, 0,
- 1, 0x013D, 0x004C, 0x030C, 0,
- 1, 0x013E, 0x006C, 0x030C, 0,
- 16, 0x013F, 0x004C, 0x00B7, 0,
- 16, 0x0140, 0x006C, 0x00B7, 0,
- 1, 0x0143, 0x004E, 0x0301, 0,
- 1, 0x0144, 0x006E, 0x0301, 0,
- 1, 0x0145, 0x004E, 0x0327, 0,
- 1, 0x0146, 0x006E, 0x0327, 0,
- 1, 0x0147, 0x004E, 0x030C, 0,
- 1, 0x0148, 0x006E, 0x030C, 0,
- 16, 0x0149, 0x02BC, 0x006E, 0,
- 1, 0x014C, 0x004F, 0x0304, 0,
- 1, 0x014D, 0x006F, 0x0304, 0,
- 1, 0x014E, 0x004F, 0x0306, 0,
- 1, 0x014F, 0x006F, 0x0306, 0,
- 1, 0x0150, 0x004F, 0x030B, 0,
- 1, 0x0151, 0x006F, 0x030B, 0,
- 1, 0x0154, 0x0052, 0x0301, 0,
- 1, 0x0155, 0x0072, 0x0301, 0,
- 1, 0x0156, 0x0052, 0x0327, 0,
- 1, 0x0157, 0x0072, 0x0327, 0,
- 1, 0x0158, 0x0052, 0x030C, 0,
- 1, 0x0159, 0x0072, 0x030C, 0,
- 1, 0x015A, 0x0053, 0x0301, 0,
- 1, 0x015B, 0x0073, 0x0301, 0,
- 1, 0x015C, 0x0053, 0x0302, 0,
- 1, 0x015D, 0x0073, 0x0302, 0,
- 1, 0x015E, 0x0053, 0x0327, 0,
- 1, 0x015F, 0x0073, 0x0327, 0,
- 1, 0x0160, 0x0053, 0x030C, 0,
- 1, 0x0161, 0x0073, 0x030C, 0,
- 1, 0x0162, 0x0054, 0x0327, 0,
- 1, 0x0163, 0x0074, 0x0327, 0,
- 1, 0x0164, 0x0054, 0x030C, 0,
- 1, 0x0165, 0x0074, 0x030C, 0,
- 1, 0x0168, 0x0055, 0x0303, 0,
- 1, 0x0169, 0x0075, 0x0303, 0,
- 1, 0x016A, 0x0055, 0x0304, 0,
- 1, 0x016B, 0x0075, 0x0304, 0,
- 1, 0x016C, 0x0055, 0x0306, 0,
- 1, 0x016D, 0x0075, 0x0306, 0,
- 1, 0x016E, 0x0055, 0x030A, 0,
- 1, 0x016F, 0x0075, 0x030A, 0,
- 1, 0x0170, 0x0055, 0x030B, 0,
- 1, 0x0171, 0x0075, 0x030B, 0,
- 1, 0x0172, 0x0055, 0x0328, 0,
- 1, 0x0173, 0x0075, 0x0328, 0,
- 1, 0x0174, 0x0057, 0x0302, 0,
- 1, 0x0175, 0x0077, 0x0302, 0,
- 1, 0x0176, 0x0059, 0x0302, 0,
- 1, 0x0177, 0x0079, 0x0302, 0,
- 1, 0x0178, 0x0059, 0x0308, 0,
- 1, 0x0179, 0x005A, 0x0301, 0,
- 1, 0x017A, 0x007A, 0x0301, 0,
- 1, 0x017B, 0x005A, 0x0307, 0,
- 1, 0x017C, 0x007A, 0x0307, 0,
- 1, 0x017D, 0x005A, 0x030C, 0,
- 1, 0x017E, 0x007A, 0x030C, 0,
- 16, 0x017F, 0x0073, 0,
- 1, 0x01A0, 0x004F, 0x031B, 0,
- 1, 0x01A1, 0x006F, 0x031B, 0,
- 1, 0x01AF, 0x0055, 0x031B, 0,
- 1, 0x01B0, 0x0075, 0x031B, 0,
- 16, 0x01C4, 0x0044, 0x017D, 0,
- 16, 0x01C5, 0x0044, 0x017E, 0,
- 16, 0x01C6, 0x0064, 0x017E, 0,
- 16, 0x01C7, 0x004C, 0x004A, 0,
- 16, 0x01C8, 0x004C, 0x006A, 0,
- 16, 0x01C9, 0x006C, 0x006A, 0,
- 16, 0x01CA, 0x004E, 0x004A, 0,
- 16, 0x01CB, 0x004E, 0x006A, 0,
- 16, 0x01CC, 0x006E, 0x006A, 0,
- 1, 0x01CD, 0x0041, 0x030C, 0,
- 1, 0x01CE, 0x0061, 0x030C, 0,
- 1, 0x01CF, 0x0049, 0x030C, 0,
- 1, 0x01D0, 0x0069, 0x030C, 0,
- 1, 0x01D1, 0x004F, 0x030C, 0,
- 1, 0x01D2, 0x006F, 0x030C, 0,
- 1, 0x01D3, 0x0055, 0x030C, 0,
- 1, 0x01D4, 0x0075, 0x030C, 0,
- 1, 0x01D5, 0x00DC, 0x0304, 0,
- 1, 0x01D6, 0x00FC, 0x0304, 0,
- 1, 0x01D7, 0x00DC, 0x0301, 0,
- 1, 0x01D8, 0x00FC, 0x0301, 0,
- 1, 0x01D9, 0x00DC, 0x030C, 0,
- 1, 0x01DA, 0x00FC, 0x030C, 0,
- 1, 0x01DB, 0x00DC, 0x0300, 0,
- 1, 0x01DC, 0x00FC, 0x0300, 0,
- 1, 0x01DE, 0x00C4, 0x0304, 0,
- 1, 0x01DF, 0x00E4, 0x0304, 0,
- 1, 0x01E0, 0x0226, 0x0304, 0,
- 1, 0x01E1, 0x0227, 0x0304, 0,
- 1, 0x01E2, 0x00C6, 0x0304, 0,
- 1, 0x01E3, 0x00E6, 0x0304, 0,
- 1, 0x01E6, 0x0047, 0x030C, 0,
- 1, 0x01E7, 0x0067, 0x030C, 0,
- 1, 0x01E8, 0x004B, 0x030C, 0,
- 1, 0x01E9, 0x006B, 0x030C, 0,
- 1, 0x01EA, 0x004F, 0x0328, 0,
- 1, 0x01EB, 0x006F, 0x0328, 0,
- 1, 0x01EC, 0x01EA, 0x0304, 0,
- 1, 0x01ED, 0x01EB, 0x0304, 0,
- 1, 0x01EE, 0x01B7, 0x030C, 0,
- 1, 0x01EF, 0x0292, 0x030C, 0,
- 1, 0x01F0, 0x006A, 0x030C, 0,
- 16, 0x01F1, 0x0044, 0x005A, 0,
- 16, 0x01F2, 0x0044, 0x007A, 0,
- 16, 0x01F3, 0x0064, 0x007A, 0,
- 1, 0x01F4, 0x0047, 0x0301, 0,
- 1, 0x01F5, 0x0067, 0x0301, 0,
- 1, 0x01F8, 0x004E, 0x0300, 0,
- 1, 0x01F9, 0x006E, 0x0300, 0,
- 1, 0x01FA, 0x00C5, 0x0301, 0,
- 1, 0x01FB, 0x00E5, 0x0301, 0,
- 1, 0x01FC, 0x00C6, 0x0301, 0,
- 1, 0x01FD, 0x00E6, 0x0301, 0,
- 1, 0x01FE, 0x00D8, 0x0301, 0,
- 1, 0x01FF, 0x00F8, 0x0301, 0,
- 1, 0x0200, 0x0041, 0x030F, 0,
- 1, 0x0201, 0x0061, 0x030F, 0,
- 1, 0x0202, 0x0041, 0x0311, 0,
- 1, 0x0203, 0x0061, 0x0311, 0,
- 1, 0x0204, 0x0045, 0x030F, 0,
- 1, 0x0205, 0x0065, 0x030F, 0,
- 1, 0x0206, 0x0045, 0x0311, 0,
- 1, 0x0207, 0x0065, 0x0311, 0,
- 1, 0x0208, 0x0049, 0x030F, 0,
- 1, 0x0209, 0x0069, 0x030F, 0,
- 1, 0x020A, 0x0049, 0x0311, 0,
- 1, 0x020B, 0x0069, 0x0311, 0,
- 1, 0x020C, 0x004F, 0x030F, 0,
- 1, 0x020D, 0x006F, 0x030F, 0,
- 1, 0x020E, 0x004F, 0x0311, 0,
- 1, 0x020F, 0x006F, 0x0311, 0,
- 1, 0x0210, 0x0052, 0x030F, 0,
- 1, 0x0211, 0x0072, 0x030F, 0,
- 1, 0x0212, 0x0052, 0x0311, 0,
- 1, 0x0213, 0x0072, 0x0311, 0,
- 1, 0x0214, 0x0055, 0x030F, 0,
- 1, 0x0215, 0x0075, 0x030F, 0,
- 1, 0x0216, 0x0055, 0x0311, 0,
- 1, 0x0217, 0x0075, 0x0311, 0,
- 1, 0x0218, 0x0053, 0x0326, 0,
- 1, 0x0219, 0x0073, 0x0326, 0,
- 1, 0x021A, 0x0054, 0x0326, 0,
- 1, 0x021B, 0x0074, 0x0326, 0,
- 1, 0x021E, 0x0048, 0x030C, 0,
- 1, 0x021F, 0x0068, 0x030C, 0,
- 1, 0x0226, 0x0041, 0x0307, 0,
- 1, 0x0227, 0x0061, 0x0307, 0,
- 1, 0x0228, 0x0045, 0x0327, 0,
- 1, 0x0229, 0x0065, 0x0327, 0,
- 1, 0x022A, 0x00D6, 0x0304, 0,
- 1, 0x022B, 0x00F6, 0x0304, 0,
- 1, 0x022C, 0x00D5, 0x0304, 0,
- 1, 0x022D, 0x00F5, 0x0304, 0,
- 1, 0x022E, 0x004F, 0x0307, 0,
- 1, 0x022F, 0x006F, 0x0307, 0,
- 1, 0x0230, 0x022E, 0x0304, 0,
- 1, 0x0231, 0x022F, 0x0304, 0,
- 1, 0x0232, 0x0059, 0x0304, 0,
- 1, 0x0233, 0x0079, 0x0304, 0,
- 9, 0x02B0, 0x0068, 0,
- 9, 0x02B1, 0x0266, 0,
- 9, 0x02B2, 0x006A, 0,
- 9, 0x02B3, 0x0072, 0,
- 9, 0x02B4, 0x0279, 0,
- 9, 0x02B5, 0x027B, 0,
- 9, 0x02B6, 0x0281, 0,
- 9, 0x02B7, 0x0077, 0,
- 9, 0x02B8, 0x0079, 0,
- 16, 0x02D8, 0x0020, 0x0306, 0,
- 16, 0x02D9, 0x0020, 0x0307, 0,
- 16, 0x02DA, 0x0020, 0x030A, 0,
- 16, 0x02DB, 0x0020, 0x0328, 0,
- 16, 0x02DC, 0x0020, 0x0303, 0,
- 16, 0x02DD, 0x0020, 0x030B, 0,
- 9, 0x02E0, 0x0263, 0,
- 9, 0x02E1, 0x006C, 0,
- 9, 0x02E2, 0x0073, 0,
- 9, 0x02E3, 0x0078, 0,
- 9, 0x02E4, 0x0295, 0,
- 1, 0x0340, 0x0300, 0,
- 1, 0x0341, 0x0301, 0,
- 1, 0x0343, 0x0313, 0,
- 1, 0x0344, 0x0308, 0x0301, 0,
- 1, 0x0374, 0x02B9, 0,
- 16, 0x037A, 0x0020, 0x0345, 0,
- 1, 0x037E, 0x003B, 0,
- 16, 0x0384, 0x0020, 0x0301, 0,
- 1, 0x0385, 0x00A8, 0x0301, 0,
- 1, 0x0386, 0x0391, 0x0301, 0,
- 1, 0x0387, 0x00B7, 0,
- 1, 0x0388, 0x0395, 0x0301, 0,
- 1, 0x0389, 0x0397, 0x0301, 0,
- 1, 0x038A, 0x0399, 0x0301, 0,
- 1, 0x038C, 0x039F, 0x0301, 0,
- 1, 0x038E, 0x03A5, 0x0301, 0,
- 1, 0x038F, 0x03A9, 0x0301, 0,
- 1, 0x0390, 0x03CA, 0x0301, 0,
- 1, 0x03AA, 0x0399, 0x0308, 0,
- 1, 0x03AB, 0x03A5, 0x0308, 0,
- 1, 0x03AC, 0x03B1, 0x0301, 0,
- 1, 0x03AD, 0x03B5, 0x0301, 0,
- 1, 0x03AE, 0x03B7, 0x0301, 0,
- 1, 0x03AF, 0x03B9, 0x0301, 0,
- 1, 0x03B0, 0x03CB, 0x0301, 0,
- 1, 0x03CA, 0x03B9, 0x0308, 0,
- 1, 0x03CB, 0x03C5, 0x0308, 0,
- 1, 0x03CC, 0x03BF, 0x0301, 0,
- 1, 0x03CD, 0x03C5, 0x0301, 0,
- 1, 0x03CE, 0x03C9, 0x0301, 0,
- 16, 0x03D0, 0x03B2, 0,
- 16, 0x03D1, 0x03B8, 0,
- 16, 0x03D2, 0x03A5, 0,
- 1, 0x03D3, 0x03D2, 0x0301, 0,
- 1, 0x03D4, 0x03D2, 0x0308, 0,
- 16, 0x03D5, 0x03C6, 0,
- 16, 0x03D6, 0x03C0, 0,
- 16, 0x03F0, 0x03BA, 0,
- 16, 0x03F1, 0x03C1, 0,
- 16, 0x03F2, 0x03C2, 0,
- 1, 0x0400, 0x0415, 0x0300, 0,
- 1, 0x0401, 0x0415, 0x0308, 0,
- 1, 0x0403, 0x0413, 0x0301, 0,
- 1, 0x0407, 0x0406, 0x0308, 0,
- 1, 0x040C, 0x041A, 0x0301, 0,
- 1, 0x040D, 0x0418, 0x0300, 0,
- 1, 0x040E, 0x0423, 0x0306, 0,
- 1, 0x0419, 0x0418, 0x0306, 0,
- 1, 0x0439, 0x0438, 0x0306, 0,
- 1, 0x0450, 0x0435, 0x0300, 0,
- 1, 0x0451, 0x0435, 0x0308, 0,
- 1, 0x0453, 0x0433, 0x0301, 0,
- 1, 0x0457, 0x0456, 0x0308, 0,
- 1, 0x045C, 0x043A, 0x0301, 0,
- 1, 0x045D, 0x0438, 0x0300, 0,
- 1, 0x045E, 0x0443, 0x0306, 0,
- 1, 0x0476, 0x0474, 0x030F, 0,
- 1, 0x0477, 0x0475, 0x030F, 0,
- 1, 0x04C1, 0x0416, 0x0306, 0,
- 1, 0x04C2, 0x0436, 0x0306, 0,
- 1, 0x04D0, 0x0410, 0x0306, 0,
- 1, 0x04D1, 0x0430, 0x0306, 0,
- 1, 0x04D2, 0x0410, 0x0308, 0,
- 1, 0x04D3, 0x0430, 0x0308, 0,
- 1, 0x04D6, 0x0415, 0x0306, 0,
- 1, 0x04D7, 0x0435, 0x0306, 0,
- 1, 0x04DA, 0x04D8, 0x0308, 0,
- 1, 0x04DB, 0x04D9, 0x0308, 0,
- 1, 0x04DC, 0x0416, 0x0308, 0,
- 1, 0x04DD, 0x0436, 0x0308, 0,
- 1, 0x04DE, 0x0417, 0x0308, 0,
- 1, 0x04DF, 0x0437, 0x0308, 0,
- 1, 0x04E2, 0x0418, 0x0304, 0,
- 1, 0x04E3, 0x0438, 0x0304, 0,
- 1, 0x04E4, 0x0418, 0x0308, 0,
- 1, 0x04E5, 0x0438, 0x0308, 0,
- 1, 0x04E6, 0x041E, 0x0308, 0,
- 1, 0x04E7, 0x043E, 0x0308, 0,
- 1, 0x04EA, 0x04E8, 0x0308, 0,
- 1, 0x04EB, 0x04E9, 0x0308, 0,
- 1, 0x04EC, 0x042D, 0x0308, 0,
- 1, 0x04ED, 0x044D, 0x0308, 0,
- 1, 0x04EE, 0x0423, 0x0304, 0,
- 1, 0x04EF, 0x0443, 0x0304, 0,
- 1, 0x04F0, 0x0423, 0x0308, 0,
- 1, 0x04F1, 0x0443, 0x0308, 0,
- 1, 0x04F2, 0x0423, 0x030B, 0,
- 1, 0x04F3, 0x0443, 0x030B, 0,
- 1, 0x04F4, 0x0427, 0x0308, 0,
- 1, 0x04F5, 0x0447, 0x0308, 0,
- 1, 0x04F8, 0x042B, 0x0308, 0,
- 1, 0x04F9, 0x044B, 0x0308, 0,
- 16, 0x0587, 0x0565, 0x0582, 0,
- 1, 0x0622, 0x0627, 0x0653, 0,
- 1, 0x0623, 0x0627, 0x0654, 0,
- 1, 0x0624, 0x0648, 0x0654, 0,
- 1, 0x0625, 0x0627, 0x0655, 0,
- 1, 0x0626, 0x064A, 0x0654, 0,
- 16, 0x0675, 0x0627, 0x0674, 0,
- 16, 0x0676, 0x0648, 0x0674, 0,
- 16, 0x0677, 0x06C7, 0x0674, 0,
- 16, 0x0678, 0x064A, 0x0674, 0,
- 1, 0x06C0, 0x06D5, 0x0654, 0,
- 1, 0x06C2, 0x06C1, 0x0654, 0,
- 1, 0x06D3, 0x06D2, 0x0654, 0,
- 1, 0x0929, 0x0928, 0x093C, 0,
- 1, 0x0931, 0x0930, 0x093C, 0,
- 1, 0x0934, 0x0933, 0x093C, 0,
- 1, 0x0958, 0x0915, 0x093C, 0,
- 1, 0x0959, 0x0916, 0x093C, 0,
- 1, 0x095A, 0x0917, 0x093C, 0,
- 1, 0x095B, 0x091C, 0x093C, 0,
- 1, 0x095C, 0x0921, 0x093C, 0,
- 1, 0x095D, 0x0922, 0x093C, 0,
- 1, 0x095E, 0x092B, 0x093C, 0,
- 1, 0x095F, 0x092F, 0x093C, 0,
- 1, 0x09CB, 0x09C7, 0x09BE, 0,
- 1, 0x09CC, 0x09C7, 0x09D7, 0,
- 1, 0x09DC, 0x09A1, 0x09BC, 0,
- 1, 0x09DD, 0x09A2, 0x09BC, 0,
- 1, 0x09DF, 0x09AF, 0x09BC, 0,
- 1, 0x0A33, 0x0A32, 0x0A3C, 0,
- 1, 0x0A36, 0x0A38, 0x0A3C, 0,
- 1, 0x0A59, 0x0A16, 0x0A3C, 0,
- 1, 0x0A5A, 0x0A17, 0x0A3C, 0,
- 1, 0x0A5B, 0x0A1C, 0x0A3C, 0,
- 1, 0x0A5E, 0x0A2B, 0x0A3C, 0,
- 1, 0x0B48, 0x0B47, 0x0B56, 0,
- 1, 0x0B4B, 0x0B47, 0x0B3E, 0,
- 1, 0x0B4C, 0x0B47, 0x0B57, 0,
- 1, 0x0B5C, 0x0B21, 0x0B3C, 0,
- 1, 0x0B5D, 0x0B22, 0x0B3C, 0,
- 1, 0x0B94, 0x0B92, 0x0BD7, 0,
- 1, 0x0BCA, 0x0BC6, 0x0BBE, 0,
- 1, 0x0BCB, 0x0BC7, 0x0BBE, 0,
- 1, 0x0BCC, 0x0BC6, 0x0BD7, 0,
- 1, 0x0C48, 0x0C46, 0x0C56, 0,
- 1, 0x0CC0, 0x0CBF, 0x0CD5, 0,
- 1, 0x0CC7, 0x0CC6, 0x0CD5, 0,
- 1, 0x0CC8, 0x0CC6, 0x0CD6, 0,
- 1, 0x0CCA, 0x0CC6, 0x0CC2, 0,
- 1, 0x0CCB, 0x0CCA, 0x0CD5, 0,
- 1, 0x0D4A, 0x0D46, 0x0D3E, 0,
- 1, 0x0D4B, 0x0D47, 0x0D3E, 0,
- 1, 0x0D4C, 0x0D46, 0x0D57, 0,
- 1, 0x0DDA, 0x0DD9, 0x0DCA, 0,
- 1, 0x0DDC, 0x0DD9, 0x0DCF, 0,
- 1, 0x0DDD, 0x0DDC, 0x0DCA, 0,
- 1, 0x0DDE, 0x0DD9, 0x0DDF, 0,
- 16, 0x0E33, 0x0E4D, 0x0E32, 0,
- 16, 0x0EB3, 0x0ECD, 0x0EB2, 0,
- 16, 0x0EDC, 0x0EAB, 0x0E99, 0,
- 16, 0x0EDD, 0x0EAB, 0x0EA1, 0,
- 3, 0x0F0C, 0x0F0B, 0,
- 1, 0x0F43, 0x0F42, 0x0FB7, 0,
- 1, 0x0F4D, 0x0F4C, 0x0FB7, 0,
- 1, 0x0F52, 0x0F51, 0x0FB7, 0,
- 1, 0x0F57, 0x0F56, 0x0FB7, 0,
- 1, 0x0F5C, 0x0F5B, 0x0FB7, 0,
- 1, 0x0F69, 0x0F40, 0x0FB5, 0,
- 1, 0x0F73, 0x0F71, 0x0F72, 0,
- 1, 0x0F75, 0x0F71, 0x0F74, 0,
- 1, 0x0F76, 0x0FB2, 0x0F80, 0,
- 16, 0x0F77, 0x0FB2, 0x0F81, 0,
- 1, 0x0F78, 0x0FB3, 0x0F80, 0,
- 16, 0x0F79, 0x0FB3, 0x0F81, 0,
- 1, 0x0F81, 0x0F71, 0x0F80, 0,
- 1, 0x0F93, 0x0F92, 0x0FB7, 0,
- 1, 0x0F9D, 0x0F9C, 0x0FB7, 0,
- 1, 0x0FA2, 0x0FA1, 0x0FB7, 0,
- 1, 0x0FA7, 0x0FA6, 0x0FB7, 0,
- 1, 0x0FAC, 0x0FAB, 0x0FB7, 0,
- 1, 0x0FB9, 0x0F90, 0x0FB5, 0,
- 1, 0x1026, 0x1025, 0x102E, 0,
- 1, 0x1E00, 0x0041, 0x0325, 0,
- 1, 0x1E01, 0x0061, 0x0325, 0,
- 1, 0x1E02, 0x0042, 0x0307, 0,
- 1, 0x1E03, 0x0062, 0x0307, 0,
- 1, 0x1E04, 0x0042, 0x0323, 0,
- 1, 0x1E05, 0x0062, 0x0323, 0,
- 1, 0x1E06, 0x0042, 0x0331, 0,
- 1, 0x1E07, 0x0062, 0x0331, 0,
- 1, 0x1E08, 0x00C7, 0x0301, 0,
- 1, 0x1E09, 0x00E7, 0x0301, 0,
- 1, 0x1E0A, 0x0044, 0x0307, 0,
- 1, 0x1E0B, 0x0064, 0x0307, 0,
- 1, 0x1E0C, 0x0044, 0x0323, 0,
- 1, 0x1E0D, 0x0064, 0x0323, 0,
- 1, 0x1E0E, 0x0044, 0x0331, 0,
- 1, 0x1E0F, 0x0064, 0x0331, 0,
- 1, 0x1E10, 0x0044, 0x0327, 0,
- 1, 0x1E11, 0x0064, 0x0327, 0,
- 1, 0x1E12, 0x0044, 0x032D, 0,
- 1, 0x1E13, 0x0064, 0x032D, 0,
- 1, 0x1E14, 0x0112, 0x0300, 0,
- 1, 0x1E15, 0x0113, 0x0300, 0,
- 1, 0x1E16, 0x0112, 0x0301, 0,
- 1, 0x1E17, 0x0113, 0x0301, 0,
- 1, 0x1E18, 0x0045, 0x032D, 0,
- 1, 0x1E19, 0x0065, 0x032D, 0,
- 1, 0x1E1A, 0x0045, 0x0330, 0,
- 1, 0x1E1B, 0x0065, 0x0330, 0,
- 1, 0x1E1C, 0x0228, 0x0306, 0,
- 1, 0x1E1D, 0x0229, 0x0306, 0,
- 1, 0x1E1E, 0x0046, 0x0307, 0,
- 1, 0x1E1F, 0x0066, 0x0307, 0,
- 1, 0x1E20, 0x0047, 0x0304, 0,
- 1, 0x1E21, 0x0067, 0x0304, 0,
- 1, 0x1E22, 0x0048, 0x0307, 0,
- 1, 0x1E23, 0x0068, 0x0307, 0,
- 1, 0x1E24, 0x0048, 0x0323, 0,
- 1, 0x1E25, 0x0068, 0x0323, 0,
- 1, 0x1E26, 0x0048, 0x0308, 0,
- 1, 0x1E27, 0x0068, 0x0308, 0,
- 1, 0x1E28, 0x0048, 0x0327, 0,
- 1, 0x1E29, 0x0068, 0x0327, 0,
- 1, 0x1E2A, 0x0048, 0x032E, 0,
- 1, 0x1E2B, 0x0068, 0x032E, 0,
- 1, 0x1E2C, 0x0049, 0x0330, 0,
- 1, 0x1E2D, 0x0069, 0x0330, 0,
- 1, 0x1E2E, 0x00CF, 0x0301, 0,
- 1, 0x1E2F, 0x00EF, 0x0301, 0,
- 1, 0x1E30, 0x004B, 0x0301, 0,
- 1, 0x1E31, 0x006B, 0x0301, 0,
- 1, 0x1E32, 0x004B, 0x0323, 0,
- 1, 0x1E33, 0x006B, 0x0323, 0,
- 1, 0x1E34, 0x004B, 0x0331, 0,
- 1, 0x1E35, 0x006B, 0x0331, 0,
- 1, 0x1E36, 0x004C, 0x0323, 0,
- 1, 0x1E37, 0x006C, 0x0323, 0,
- 1, 0x1E38, 0x1E36, 0x0304, 0,
- 1, 0x1E39, 0x1E37, 0x0304, 0,
- 1, 0x1E3A, 0x004C, 0x0331, 0,
- 1, 0x1E3B, 0x006C, 0x0331, 0,
- 1, 0x1E3C, 0x004C, 0x032D, 0,
- 1, 0x1E3D, 0x006C, 0x032D, 0,
- 1, 0x1E3E, 0x004D, 0x0301, 0,
- 1, 0x1E3F, 0x006D, 0x0301, 0,
- 1, 0x1E40, 0x004D, 0x0307, 0,
- 1, 0x1E41, 0x006D, 0x0307, 0,
- 1, 0x1E42, 0x004D, 0x0323, 0,
- 1, 0x1E43, 0x006D, 0x0323, 0,
- 1, 0x1E44, 0x004E, 0x0307, 0,
- 1, 0x1E45, 0x006E, 0x0307, 0,
- 1, 0x1E46, 0x004E, 0x0323, 0,
- 1, 0x1E47, 0x006E, 0x0323, 0,
- 1, 0x1E48, 0x004E, 0x0331, 0,
- 1, 0x1E49, 0x006E, 0x0331, 0,
- 1, 0x1E4A, 0x004E, 0x032D, 0,
- 1, 0x1E4B, 0x006E, 0x032D, 0,
- 1, 0x1E4C, 0x00D5, 0x0301, 0,
- 1, 0x1E4D, 0x00F5, 0x0301, 0,
- 1, 0x1E4E, 0x00D5, 0x0308, 0,
- 1, 0x1E4F, 0x00F5, 0x0308, 0,
- 1, 0x1E50, 0x014C, 0x0300, 0,
- 1, 0x1E51, 0x014D, 0x0300, 0,
- 1, 0x1E52, 0x014C, 0x0301, 0,
- 1, 0x1E53, 0x014D, 0x0301, 0,
- 1, 0x1E54, 0x0050, 0x0301, 0,
- 1, 0x1E55, 0x0070, 0x0301, 0,
- 1, 0x1E56, 0x0050, 0x0307, 0,
- 1, 0x1E57, 0x0070, 0x0307, 0,
- 1, 0x1E58, 0x0052, 0x0307, 0,
- 1, 0x1E59, 0x0072, 0x0307, 0,
- 1, 0x1E5A, 0x0052, 0x0323, 0,
- 1, 0x1E5B, 0x0072, 0x0323, 0,
- 1, 0x1E5C, 0x1E5A, 0x0304, 0,
- 1, 0x1E5D, 0x1E5B, 0x0304, 0,
- 1, 0x1E5E, 0x0052, 0x0331, 0,
- 1, 0x1E5F, 0x0072, 0x0331, 0,
- 1, 0x1E60, 0x0053, 0x0307, 0,
- 1, 0x1E61, 0x0073, 0x0307, 0,
- 1, 0x1E62, 0x0053, 0x0323, 0,
- 1, 0x1E63, 0x0073, 0x0323, 0,
- 1, 0x1E64, 0x015A, 0x0307, 0,
- 1, 0x1E65, 0x015B, 0x0307, 0,
- 1, 0x1E66, 0x0160, 0x0307, 0,
- 1, 0x1E67, 0x0161, 0x0307, 0,
- 1, 0x1E68, 0x1E62, 0x0307, 0,
- 1, 0x1E69, 0x1E63, 0x0307, 0,
- 1, 0x1E6A, 0x0054, 0x0307, 0,
- 1, 0x1E6B, 0x0074, 0x0307, 0,
- 1, 0x1E6C, 0x0054, 0x0323, 0,
- 1, 0x1E6D, 0x0074, 0x0323, 0,
- 1, 0x1E6E, 0x0054, 0x0331, 0,
- 1, 0x1E6F, 0x0074, 0x0331, 0,
- 1, 0x1E70, 0x0054, 0x032D, 0,
- 1, 0x1E71, 0x0074, 0x032D, 0,
- 1, 0x1E72, 0x0055, 0x0324, 0,
- 1, 0x1E73, 0x0075, 0x0324, 0,
- 1, 0x1E74, 0x0055, 0x0330, 0,
- 1, 0x1E75, 0x0075, 0x0330, 0,
- 1, 0x1E76, 0x0055, 0x032D, 0,
- 1, 0x1E77, 0x0075, 0x032D, 0,
- 1, 0x1E78, 0x0168, 0x0301, 0,
- 1, 0x1E79, 0x0169, 0x0301, 0,
- 1, 0x1E7A, 0x016A, 0x0308, 0,
- 1, 0x1E7B, 0x016B, 0x0308, 0,
- 1, 0x1E7C, 0x0056, 0x0303, 0,
- 1, 0x1E7D, 0x0076, 0x0303, 0,
- 1, 0x1E7E, 0x0056, 0x0323, 0,
- 1, 0x1E7F, 0x0076, 0x0323, 0,
- 1, 0x1E80, 0x0057, 0x0300, 0,
- 1, 0x1E81, 0x0077, 0x0300, 0,
- 1, 0x1E82, 0x0057, 0x0301, 0,
- 1, 0x1E83, 0x0077, 0x0301, 0,
- 1, 0x1E84, 0x0057, 0x0308, 0,
- 1, 0x1E85, 0x0077, 0x0308, 0,
- 1, 0x1E86, 0x0057, 0x0307, 0,
- 1, 0x1E87, 0x0077, 0x0307, 0,
- 1, 0x1E88, 0x0057, 0x0323, 0,
- 1, 0x1E89, 0x0077, 0x0323, 0,
- 1, 0x1E8A, 0x0058, 0x0307, 0,
- 1, 0x1E8B, 0x0078, 0x0307, 0,
- 1, 0x1E8C, 0x0058, 0x0308, 0,
- 1, 0x1E8D, 0x0078, 0x0308, 0,
- 1, 0x1E8E, 0x0059, 0x0307, 0,
- 1, 0x1E8F, 0x0079, 0x0307, 0,
- 1, 0x1E90, 0x005A, 0x0302, 0,
- 1, 0x1E91, 0x007A, 0x0302, 0,
- 1, 0x1E92, 0x005A, 0x0323, 0,
- 1, 0x1E93, 0x007A, 0x0323, 0,
- 1, 0x1E94, 0x005A, 0x0331, 0,
- 1, 0x1E95, 0x007A, 0x0331, 0,
- 1, 0x1E96, 0x0068, 0x0331, 0,
- 1, 0x1E97, 0x0074, 0x0308, 0,
- 1, 0x1E98, 0x0077, 0x030A, 0,
- 1, 0x1E99, 0x0079, 0x030A, 0,
- 16, 0x1E9A, 0x0061, 0x02BE, 0,
- 1, 0x1E9B, 0x017F, 0x0307, 0,
- 1, 0x1EA0, 0x0041, 0x0323, 0,
- 1, 0x1EA1, 0x0061, 0x0323, 0,
- 1, 0x1EA2, 0x0041, 0x0309, 0,
- 1, 0x1EA3, 0x0061, 0x0309, 0,
- 1, 0x1EA4, 0x00C2, 0x0301, 0,
- 1, 0x1EA5, 0x00E2, 0x0301, 0,
- 1, 0x1EA6, 0x00C2, 0x0300, 0,
- 1, 0x1EA7, 0x00E2, 0x0300, 0,
- 1, 0x1EA8, 0x00C2, 0x0309, 0,
- 1, 0x1EA9, 0x00E2, 0x0309, 0,
- 1, 0x1EAA, 0x00C2, 0x0303, 0,
- 1, 0x1EAB, 0x00E2, 0x0303, 0,
- 1, 0x1EAC, 0x1EA0, 0x0302, 0,
- 1, 0x1EAD, 0x1EA1, 0x0302, 0,
- 1, 0x1EAE, 0x0102, 0x0301, 0,
- 1, 0x1EAF, 0x0103, 0x0301, 0,
- 1, 0x1EB0, 0x0102, 0x0300, 0,
- 1, 0x1EB1, 0x0103, 0x0300, 0,
- 1, 0x1EB2, 0x0102, 0x0309, 0,
- 1, 0x1EB3, 0x0103, 0x0309, 0,
- 1, 0x1EB4, 0x0102, 0x0303, 0,
- 1, 0x1EB5, 0x0103, 0x0303, 0,
- 1, 0x1EB6, 0x1EA0, 0x0306, 0,
- 1, 0x1EB7, 0x1EA1, 0x0306, 0,
- 1, 0x1EB8, 0x0045, 0x0323, 0,
- 1, 0x1EB9, 0x0065, 0x0323, 0,
- 1, 0x1EBA, 0x0045, 0x0309, 0,
- 1, 0x1EBB, 0x0065, 0x0309, 0,
- 1, 0x1EBC, 0x0045, 0x0303, 0,
- 1, 0x1EBD, 0x0065, 0x0303, 0,
- 1, 0x1EBE, 0x00CA, 0x0301, 0,
- 1, 0x1EBF, 0x00EA, 0x0301, 0,
- 1, 0x1EC0, 0x00CA, 0x0300, 0,
- 1, 0x1EC1, 0x00EA, 0x0300, 0,
- 1, 0x1EC2, 0x00CA, 0x0309, 0,
- 1, 0x1EC3, 0x00EA, 0x0309, 0,
- 1, 0x1EC4, 0x00CA, 0x0303, 0,
- 1, 0x1EC5, 0x00EA, 0x0303, 0,
- 1, 0x1EC6, 0x1EB8, 0x0302, 0,
- 1, 0x1EC7, 0x1EB9, 0x0302, 0,
- 1, 0x1EC8, 0x0049, 0x0309, 0,
- 1, 0x1EC9, 0x0069, 0x0309, 0,
- 1, 0x1ECA, 0x0049, 0x0323, 0,
- 1, 0x1ECB, 0x0069, 0x0323, 0,
- 1, 0x1ECC, 0x004F, 0x0323, 0,
- 1, 0x1ECD, 0x006F, 0x0323, 0,
- 1, 0x1ECE, 0x004F, 0x0309, 0,
- 1, 0x1ECF, 0x006F, 0x0309, 0,
- 1, 0x1ED0, 0x00D4, 0x0301, 0,
- 1, 0x1ED1, 0x00F4, 0x0301, 0,
- 1, 0x1ED2, 0x00D4, 0x0300, 0,
- 1, 0x1ED3, 0x00F4, 0x0300, 0,
- 1, 0x1ED4, 0x00D4, 0x0309, 0,
- 1, 0x1ED5, 0x00F4, 0x0309, 0,
- 1, 0x1ED6, 0x00D4, 0x0303, 0,
- 1, 0x1ED7, 0x00F4, 0x0303, 0,
- 1, 0x1ED8, 0x1ECC, 0x0302, 0,
- 1, 0x1ED9, 0x1ECD, 0x0302, 0,
- 1, 0x1EDA, 0x01A0, 0x0301, 0,
- 1, 0x1EDB, 0x01A1, 0x0301, 0,
- 1, 0x1EDC, 0x01A0, 0x0300, 0,
- 1, 0x1EDD, 0x01A1, 0x0300, 0,
- 1, 0x1EDE, 0x01A0, 0x0309, 0,
- 1, 0x1EDF, 0x01A1, 0x0309, 0,
- 1, 0x1EE0, 0x01A0, 0x0303, 0,
- 1, 0x1EE1, 0x01A1, 0x0303, 0,
- 1, 0x1EE2, 0x01A0, 0x0323, 0,
- 1, 0x1EE3, 0x01A1, 0x0323, 0,
- 1, 0x1EE4, 0x0055, 0x0323, 0,
- 1, 0x1EE5, 0x0075, 0x0323, 0,
- 1, 0x1EE6, 0x0055, 0x0309, 0,
- 1, 0x1EE7, 0x0075, 0x0309, 0,
- 1, 0x1EE8, 0x01AF, 0x0301, 0,
- 1, 0x1EE9, 0x01B0, 0x0301, 0,
- 1, 0x1EEA, 0x01AF, 0x0300, 0,
- 1, 0x1EEB, 0x01B0, 0x0300, 0,
- 1, 0x1EEC, 0x01AF, 0x0309, 0,
- 1, 0x1EED, 0x01B0, 0x0309, 0,
- 1, 0x1EEE, 0x01AF, 0x0303, 0,
- 1, 0x1EEF, 0x01B0, 0x0303, 0,
- 1, 0x1EF0, 0x01AF, 0x0323, 0,
- 1, 0x1EF1, 0x01B0, 0x0323, 0,
- 1, 0x1EF2, 0x0059, 0x0300, 0,
- 1, 0x1EF3, 0x0079, 0x0300, 0,
- 1, 0x1EF4, 0x0059, 0x0323, 0,
- 1, 0x1EF5, 0x0079, 0x0323, 0,
- 1, 0x1EF6, 0x0059, 0x0309, 0,
- 1, 0x1EF7, 0x0079, 0x0309, 0,
- 1, 0x1EF8, 0x0059, 0x0303, 0,
- 1, 0x1EF9, 0x0079, 0x0303, 0,
- 1, 0x1F00, 0x03B1, 0x0313, 0,
- 1, 0x1F01, 0x03B1, 0x0314, 0,
- 1, 0x1F02, 0x1F00, 0x0300, 0,
- 1, 0x1F03, 0x1F01, 0x0300, 0,
- 1, 0x1F04, 0x1F00, 0x0301, 0,
- 1, 0x1F05, 0x1F01, 0x0301, 0,
- 1, 0x1F06, 0x1F00, 0x0342, 0,
- 1, 0x1F07, 0x1F01, 0x0342, 0,
- 1, 0x1F08, 0x0391, 0x0313, 0,
- 1, 0x1F09, 0x0391, 0x0314, 0,
- 1, 0x1F0A, 0x1F08, 0x0300, 0,
- 1, 0x1F0B, 0x1F09, 0x0300, 0,
- 1, 0x1F0C, 0x1F08, 0x0301, 0,
- 1, 0x1F0D, 0x1F09, 0x0301, 0,
- 1, 0x1F0E, 0x1F08, 0x0342, 0,
- 1, 0x1F0F, 0x1F09, 0x0342, 0,
- 1, 0x1F10, 0x03B5, 0x0313, 0,
- 1, 0x1F11, 0x03B5, 0x0314, 0,
- 1, 0x1F12, 0x1F10, 0x0300, 0,
- 1, 0x1F13, 0x1F11, 0x0300, 0,
- 1, 0x1F14, 0x1F10, 0x0301, 0,
- 1, 0x1F15, 0x1F11, 0x0301, 0,
- 1, 0x1F18, 0x0395, 0x0313, 0,
- 1, 0x1F19, 0x0395, 0x0314, 0,
- 1, 0x1F1A, 0x1F18, 0x0300, 0,
- 1, 0x1F1B, 0x1F19, 0x0300, 0,
- 1, 0x1F1C, 0x1F18, 0x0301, 0,
- 1, 0x1F1D, 0x1F19, 0x0301, 0,
- 1, 0x1F20, 0x03B7, 0x0313, 0,
- 1, 0x1F21, 0x03B7, 0x0314, 0,
- 1, 0x1F22, 0x1F20, 0x0300, 0,
- 1, 0x1F23, 0x1F21, 0x0300, 0,
- 1, 0x1F24, 0x1F20, 0x0301, 0,
- 1, 0x1F25, 0x1F21, 0x0301, 0,
- 1, 0x1F26, 0x1F20, 0x0342, 0,
- 1, 0x1F27, 0x1F21, 0x0342, 0,
- 1, 0x1F28, 0x0397, 0x0313, 0,
- 1, 0x1F29, 0x0397, 0x0314, 0,
- 1, 0x1F2A, 0x1F28, 0x0300, 0,
- 1, 0x1F2B, 0x1F29, 0x0300, 0,
- 1, 0x1F2C, 0x1F28, 0x0301, 0,
- 1, 0x1F2D, 0x1F29, 0x0301, 0,
- 1, 0x1F2E, 0x1F28, 0x0342, 0,
- 1, 0x1F2F, 0x1F29, 0x0342, 0,
- 1, 0x1F30, 0x03B9, 0x0313, 0,
- 1, 0x1F31, 0x03B9, 0x0314, 0,
- 1, 0x1F32, 0x1F30, 0x0300, 0,
- 1, 0x1F33, 0x1F31, 0x0300, 0,
- 1, 0x1F34, 0x1F30, 0x0301, 0,
- 1, 0x1F35, 0x1F31, 0x0301, 0,
- 1, 0x1F36, 0x1F30, 0x0342, 0,
- 1, 0x1F37, 0x1F31, 0x0342, 0,
- 1, 0x1F38, 0x0399, 0x0313, 0,
- 1, 0x1F39, 0x0399, 0x0314, 0,
- 1, 0x1F3A, 0x1F38, 0x0300, 0,
- 1, 0x1F3B, 0x1F39, 0x0300, 0,
- 1, 0x1F3C, 0x1F38, 0x0301, 0,
- 1, 0x1F3D, 0x1F39, 0x0301, 0,
- 1, 0x1F3E, 0x1F38, 0x0342, 0,
- 1, 0x1F3F, 0x1F39, 0x0342, 0,
- 1, 0x1F40, 0x03BF, 0x0313, 0,
- 1, 0x1F41, 0x03BF, 0x0314, 0,
- 1, 0x1F42, 0x1F40, 0x0300, 0,
- 1, 0x1F43, 0x1F41, 0x0300, 0,
- 1, 0x1F44, 0x1F40, 0x0301, 0,
- 1, 0x1F45, 0x1F41, 0x0301, 0,
- 1, 0x1F48, 0x039F, 0x0313, 0,
- 1, 0x1F49, 0x039F, 0x0314, 0,
- 1, 0x1F4A, 0x1F48, 0x0300, 0,
- 1, 0x1F4B, 0x1F49, 0x0300, 0,
- 1, 0x1F4C, 0x1F48, 0x0301, 0,
- 1, 0x1F4D, 0x1F49, 0x0301, 0,
- 1, 0x1F50, 0x03C5, 0x0313, 0,
- 1, 0x1F51, 0x03C5, 0x0314, 0,
- 1, 0x1F52, 0x1F50, 0x0300, 0,
- 1, 0x1F53, 0x1F51, 0x0300, 0,
- 1, 0x1F54, 0x1F50, 0x0301, 0,
- 1, 0x1F55, 0x1F51, 0x0301, 0,
- 1, 0x1F56, 0x1F50, 0x0342, 0,
- 1, 0x1F57, 0x1F51, 0x0342, 0,
- 1, 0x1F59, 0x03A5, 0x0314, 0,
- 1, 0x1F5B, 0x1F59, 0x0300, 0,
- 1, 0x1F5D, 0x1F59, 0x0301, 0,
- 1, 0x1F5F, 0x1F59, 0x0342, 0,
- 1, 0x1F60, 0x03C9, 0x0313, 0,
- 1, 0x1F61, 0x03C9, 0x0314, 0,
- 1, 0x1F62, 0x1F60, 0x0300, 0,
- 1, 0x1F63, 0x1F61, 0x0300, 0,
- 1, 0x1F64, 0x1F60, 0x0301, 0,
- 1, 0x1F65, 0x1F61, 0x0301, 0,
- 1, 0x1F66, 0x1F60, 0x0342, 0,
- 1, 0x1F67, 0x1F61, 0x0342, 0,
- 1, 0x1F68, 0x03A9, 0x0313, 0,
- 1, 0x1F69, 0x03A9, 0x0314, 0,
- 1, 0x1F6A, 0x1F68, 0x0300, 0,
- 1, 0x1F6B, 0x1F69, 0x0300, 0,
- 1, 0x1F6C, 0x1F68, 0x0301, 0,
- 1, 0x1F6D, 0x1F69, 0x0301, 0,
- 1, 0x1F6E, 0x1F68, 0x0342, 0,
- 1, 0x1F6F, 0x1F69, 0x0342, 0,
- 1, 0x1F70, 0x03B1, 0x0300, 0,
- 1, 0x1F71, 0x03AC, 0,
- 1, 0x1F72, 0x03B5, 0x0300, 0,
- 1, 0x1F73, 0x03AD, 0,
- 1, 0x1F74, 0x03B7, 0x0300, 0,
- 1, 0x1F75, 0x03AE, 0,
- 1, 0x1F76, 0x03B9, 0x0300, 0,
- 1, 0x1F77, 0x03AF, 0,
- 1, 0x1F78, 0x03BF, 0x0300, 0,
- 1, 0x1F79, 0x03CC, 0,
- 1, 0x1F7A, 0x03C5, 0x0300, 0,
- 1, 0x1F7B, 0x03CD, 0,
- 1, 0x1F7C, 0x03C9, 0x0300, 0,
- 1, 0x1F7D, 0x03CE, 0,
- 1, 0x1F80, 0x1F00, 0x0345, 0,
- 1, 0x1F81, 0x1F01, 0x0345, 0,
- 1, 0x1F82, 0x1F02, 0x0345, 0,
- 1, 0x1F83, 0x1F03, 0x0345, 0,
- 1, 0x1F84, 0x1F04, 0x0345, 0,
- 1, 0x1F85, 0x1F05, 0x0345, 0,
- 1, 0x1F86, 0x1F06, 0x0345, 0,
- 1, 0x1F87, 0x1F07, 0x0345, 0,
- 1, 0x1F88, 0x1F08, 0x0345, 0,
- 1, 0x1F89, 0x1F09, 0x0345, 0,
- 1, 0x1F8A, 0x1F0A, 0x0345, 0,
- 1, 0x1F8B, 0x1F0B, 0x0345, 0,
- 1, 0x1F8C, 0x1F0C, 0x0345, 0,
- 1, 0x1F8D, 0x1F0D, 0x0345, 0,
- 1, 0x1F8E, 0x1F0E, 0x0345, 0,
- 1, 0x1F8F, 0x1F0F, 0x0345, 0,
- 1, 0x1F90, 0x1F20, 0x0345, 0,
- 1, 0x1F91, 0x1F21, 0x0345, 0,
- 1, 0x1F92, 0x1F22, 0x0345, 0,
- 1, 0x1F93, 0x1F23, 0x0345, 0,
- 1, 0x1F94, 0x1F24, 0x0345, 0,
- 1, 0x1F95, 0x1F25, 0x0345, 0,
- 1, 0x1F96, 0x1F26, 0x0345, 0,
- 1, 0x1F97, 0x1F27, 0x0345, 0,
- 1, 0x1F98, 0x1F28, 0x0345, 0,
- 1, 0x1F99, 0x1F29, 0x0345, 0,
- 1, 0x1F9A, 0x1F2A, 0x0345, 0,
- 1, 0x1F9B, 0x1F2B, 0x0345, 0,
- 1, 0x1F9C, 0x1F2C, 0x0345, 0,
- 1, 0x1F9D, 0x1F2D, 0x0345, 0,
- 1, 0x1F9E, 0x1F2E, 0x0345, 0,
- 1, 0x1F9F, 0x1F2F, 0x0345, 0,
- 1, 0x1FA0, 0x1F60, 0x0345, 0,
- 1, 0x1FA1, 0x1F61, 0x0345, 0,
- 1, 0x1FA2, 0x1F62, 0x0345, 0,
- 1, 0x1FA3, 0x1F63, 0x0345, 0,
- 1, 0x1FA4, 0x1F64, 0x0345, 0,
- 1, 0x1FA5, 0x1F65, 0x0345, 0,
- 1, 0x1FA6, 0x1F66, 0x0345, 0,
- 1, 0x1FA7, 0x1F67, 0x0345, 0,
- 1, 0x1FA8, 0x1F68, 0x0345, 0,
- 1, 0x1FA9, 0x1F69, 0x0345, 0,
- 1, 0x1FAA, 0x1F6A, 0x0345, 0,
- 1, 0x1FAB, 0x1F6B, 0x0345, 0,
- 1, 0x1FAC, 0x1F6C, 0x0345, 0,
- 1, 0x1FAD, 0x1F6D, 0x0345, 0,
- 1, 0x1FAE, 0x1F6E, 0x0345, 0,
- 1, 0x1FAF, 0x1F6F, 0x0345, 0,
- 1, 0x1FB0, 0x03B1, 0x0306, 0,
- 1, 0x1FB1, 0x03B1, 0x0304, 0,
- 1, 0x1FB2, 0x1F70, 0x0345, 0,
- 1, 0x1FB3, 0x03B1, 0x0345, 0,
- 1, 0x1FB4, 0x03AC, 0x0345, 0,
- 1, 0x1FB6, 0x03B1, 0x0342, 0,
- 1, 0x1FB7, 0x1FB6, 0x0345, 0,
- 1, 0x1FB8, 0x0391, 0x0306, 0,
- 1, 0x1FB9, 0x0391, 0x0304, 0,
- 1, 0x1FBA, 0x0391, 0x0300, 0,
- 1, 0x1FBB, 0x0386, 0,
- 1, 0x1FBC, 0x0391, 0x0345, 0,
- 16, 0x1FBD, 0x0020, 0x0313, 0,
- 1, 0x1FBE, 0x03B9, 0,
- 16, 0x1FBF, 0x0020, 0x0313, 0,
- 16, 0x1FC0, 0x0020, 0x0342, 0,
- 1, 0x1FC1, 0x00A8, 0x0342, 0,
- 1, 0x1FC2, 0x1F74, 0x0345, 0,
- 1, 0x1FC3, 0x03B7, 0x0345, 0,
- 1, 0x1FC4, 0x03AE, 0x0345, 0,
- 1, 0x1FC6, 0x03B7, 0x0342, 0,
- 1, 0x1FC7, 0x1FC6, 0x0345, 0,
- 1, 0x1FC8, 0x0395, 0x0300, 0,
- 1, 0x1FC9, 0x0388, 0,
- 1, 0x1FCA, 0x0397, 0x0300, 0,
- 1, 0x1FCB, 0x0389, 0,
- 1, 0x1FCC, 0x0397, 0x0345, 0,
- 1, 0x1FCD, 0x1FBF, 0x0300, 0,
- 1, 0x1FCE, 0x1FBF, 0x0301, 0,
- 1, 0x1FCF, 0x1FBF, 0x0342, 0,
- 1, 0x1FD0, 0x03B9, 0x0306, 0,
- 1, 0x1FD1, 0x03B9, 0x0304, 0,
- 1, 0x1FD2, 0x03CA, 0x0300, 0,
- 1, 0x1FD3, 0x0390, 0,
- 1, 0x1FD6, 0x03B9, 0x0342, 0,
- 1, 0x1FD7, 0x03CA, 0x0342, 0,
- 1, 0x1FD8, 0x0399, 0x0306, 0,
- 1, 0x1FD9, 0x0399, 0x0304, 0,
- 1, 0x1FDA, 0x0399, 0x0300, 0,
- 1, 0x1FDB, 0x038A, 0,
- 1, 0x1FDD, 0x1FFE, 0x0300, 0,
- 1, 0x1FDE, 0x1FFE, 0x0301, 0,
- 1, 0x1FDF, 0x1FFE, 0x0342, 0,
- 1, 0x1FE0, 0x03C5, 0x0306, 0,
- 1, 0x1FE1, 0x03C5, 0x0304, 0,
- 1, 0x1FE2, 0x03CB, 0x0300, 0,
- 1, 0x1FE3, 0x03B0, 0,
- 1, 0x1FE4, 0x03C1, 0x0313, 0,
- 1, 0x1FE5, 0x03C1, 0x0314, 0,
- 1, 0x1FE6, 0x03C5, 0x0342, 0,
- 1, 0x1FE7, 0x03CB, 0x0342, 0,
- 1, 0x1FE8, 0x03A5, 0x0306, 0,
- 1, 0x1FE9, 0x03A5, 0x0304, 0,
- 1, 0x1FEA, 0x03A5, 0x0300, 0,
- 1, 0x1FEB, 0x038E, 0,
- 1, 0x1FEC, 0x03A1, 0x0314, 0,
- 1, 0x1FED, 0x00A8, 0x0300, 0,
- 1, 0x1FEE, 0x0385, 0,
- 1, 0x1FEF, 0x0060, 0,
- 1, 0x1FF2, 0x1F7C, 0x0345, 0,
- 1, 0x1FF3, 0x03C9, 0x0345, 0,
- 1, 0x1FF4, 0x03CE, 0x0345, 0,
- 1, 0x1FF6, 0x03C9, 0x0342, 0,
- 1, 0x1FF7, 0x1FF6, 0x0345, 0,
- 1, 0x1FF8, 0x039F, 0x0300, 0,
- 1, 0x1FF9, 0x038C, 0,
- 1, 0x1FFA, 0x03A9, 0x0300, 0,
- 1, 0x1FFB, 0x038F, 0,
- 1, 0x1FFC, 0x03A9, 0x0345, 0,
- 1, 0x1FFD, 0x00B4, 0,
- 16, 0x1FFE, 0x0020, 0x0314, 0,
- 1, 0x2000, 0x2002, 0,
- 1, 0x2001, 0x2003, 0,
- 16, 0x2002, 0x0020, 0,
- 16, 0x2003, 0x0020, 0,
- 16, 0x2004, 0x0020, 0,
- 16, 0x2005, 0x0020, 0,
- 16, 0x2006, 0x0020, 0,
- 3, 0x2007, 0x0020, 0,
- 16, 0x2008, 0x0020, 0,
- 16, 0x2009, 0x0020, 0,
- 16, 0x200A, 0x0020, 0,
- 3, 0x2011, 0x2010, 0,
- 16, 0x2017, 0x0020, 0x0333, 0,
- 16, 0x2024, 0x002E, 0,
- 16, 0x2025, 0x002E, 0x002E, 0,
- 16, 0x2026, 0x002E, 0x002E, 0x002E, 0,
- 3, 0x202F, 0x0020, 0,
- 16, 0x2033, 0x2032, 0x2032, 0,
- 16, 0x2034, 0x2032, 0x2032, 0x2032, 0,
- 16, 0x2036, 0x2035, 0x2035, 0,
- 16, 0x2037, 0x2035, 0x2035, 0x2035, 0,
- 16, 0x203C, 0x0021, 0x0021, 0,
- 16, 0x203E, 0x0020, 0x0305, 0,
- 16, 0x2048, 0x003F, 0x0021, 0,
- 16, 0x2049, 0x0021, 0x003F, 0,
- 9, 0x2070, 0x0030, 0,
- 9, 0x2074, 0x0034, 0,
- 9, 0x2075, 0x0035, 0,
- 9, 0x2076, 0x0036, 0,
- 9, 0x2077, 0x0037, 0,
- 9, 0x2078, 0x0038, 0,
- 9, 0x2079, 0x0039, 0,
- 9, 0x207A, 0x002B, 0,
- 9, 0x207B, 0x2212, 0,
- 9, 0x207C, 0x003D, 0,
- 9, 0x207D, 0x0028, 0,
- 9, 0x207E, 0x0029, 0,
- 9, 0x207F, 0x006E, 0,
- 10, 0x2080, 0x0030, 0,
- 10, 0x2081, 0x0031, 0,
- 10, 0x2082, 0x0032, 0,
- 10, 0x2083, 0x0033, 0,
- 10, 0x2084, 0x0034, 0,
- 10, 0x2085, 0x0035, 0,
- 10, 0x2086, 0x0036, 0,
- 10, 0x2087, 0x0037, 0,
- 10, 0x2088, 0x0038, 0,
- 10, 0x2089, 0x0039, 0,
- 10, 0x208A, 0x002B, 0,
- 10, 0x208B, 0x2212, 0,
- 10, 0x208C, 0x003D, 0,
- 10, 0x208D, 0x0028, 0,
- 10, 0x208E, 0x0029, 0,
- 16, 0x20A8, 0x0052, 0x0073, 0,
- 16, 0x2100, 0x0061, 0x002F, 0x0063, 0,
- 16, 0x2101, 0x0061, 0x002F, 0x0073, 0,
- 2, 0x2102, 0x0043, 0,
- 16, 0x2103, 0x00B0, 0x0043, 0,
- 16, 0x2105, 0x0063, 0x002F, 0x006F, 0,
- 16, 0x2106, 0x0063, 0x002F, 0x0075, 0,
- 16, 0x2107, 0x0190, 0,
- 16, 0x2109, 0x00B0, 0x0046, 0,
- 2, 0x210A, 0x0067, 0,
- 2, 0x210B, 0x0048, 0,
- 2, 0x210C, 0x0048, 0,
- 2, 0x210D, 0x0048, 0,
- 2, 0x210E, 0x0068, 0,
- 2, 0x210F, 0x0127, 0,
- 2, 0x2110, 0x0049, 0,
- 2, 0x2111, 0x0049, 0,
- 2, 0x2112, 0x004C, 0,
- 2, 0x2113, 0x006C, 0,
- 2, 0x2115, 0x004E, 0,
- 16, 0x2116, 0x004E, 0x006F, 0,
- 2, 0x2119, 0x0050, 0,
- 2, 0x211A, 0x0051, 0,
- 2, 0x211B, 0x0052, 0,
- 2, 0x211C, 0x0052, 0,
- 2, 0x211D, 0x0052, 0,
- 9, 0x2120, 0x0053, 0x004D, 0,
- 16, 0x2121, 0x0054, 0x0045, 0x004C, 0,
- 9, 0x2122, 0x0054, 0x004D, 0,
- 2, 0x2124, 0x005A, 0,
- 1, 0x2126, 0x03A9, 0,
- 2, 0x2128, 0x005A, 0,
- 1, 0x212A, 0x004B, 0,
- 1, 0x212B, 0x00C5, 0,
- 2, 0x212C, 0x0042, 0,
- 2, 0x212D, 0x0043, 0,
- 2, 0x212F, 0x0065, 0,
- 2, 0x2130, 0x0045, 0,
- 2, 0x2131, 0x0046, 0,
- 2, 0x2133, 0x004D, 0,
- 2, 0x2134, 0x006F, 0,
- 16, 0x2135, 0x05D0, 0,
- 16, 0x2136, 0x05D1, 0,
- 16, 0x2137, 0x05D2, 0,
- 16, 0x2138, 0x05D3, 0,
- 2, 0x2139, 0x0069, 0,
- 17, 0x2153, 0x0031, 0x2044, 0x0033, 0,
- 17, 0x2154, 0x0032, 0x2044, 0x0033, 0,
- 17, 0x2155, 0x0031, 0x2044, 0x0035, 0,
- 17, 0x2156, 0x0032, 0x2044, 0x0035, 0,
- 17, 0x2157, 0x0033, 0x2044, 0x0035, 0,
- 17, 0x2158, 0x0034, 0x2044, 0x0035, 0,
- 17, 0x2159, 0x0031, 0x2044, 0x0036, 0,
- 17, 0x215A, 0x0035, 0x2044, 0x0036, 0,
- 17, 0x215B, 0x0031, 0x2044, 0x0038, 0,
- 17, 0x215C, 0x0033, 0x2044, 0x0038, 0,
- 17, 0x215D, 0x0035, 0x2044, 0x0038, 0,
- 17, 0x215E, 0x0037, 0x2044, 0x0038, 0,
- 17, 0x215F, 0x0031, 0x2044, 0,
- 16, 0x2160, 0x0049, 0,
- 16, 0x2161, 0x0049, 0x0049, 0,
- 16, 0x2162, 0x0049, 0x0049, 0x0049, 0,
- 16, 0x2163, 0x0049, 0x0056, 0,
- 16, 0x2164, 0x0056, 0,
- 16, 0x2165, 0x0056, 0x0049, 0,
- 16, 0x2166, 0x0056, 0x0049, 0x0049, 0,
- 16, 0x2167, 0x0056, 0x0049, 0x0049, 0x0049, 0,
- 16, 0x2168, 0x0049, 0x0058, 0,
- 16, 0x2169, 0x0058, 0,
- 16, 0x216A, 0x0058, 0x0049, 0,
- 16, 0x216B, 0x0058, 0x0049, 0x0049, 0,
- 16, 0x216C, 0x004C, 0,
- 16, 0x216D, 0x0043, 0,
- 16, 0x216E, 0x0044, 0,
- 16, 0x216F, 0x004D, 0,
- 16, 0x2170, 0x0069, 0,
- 16, 0x2171, 0x0069, 0x0069, 0,
- 16, 0x2172, 0x0069, 0x0069, 0x0069, 0,
- 16, 0x2173, 0x0069, 0x0076, 0,
- 16, 0x2174, 0x0076, 0,
- 16, 0x2175, 0x0076, 0x0069, 0,
- 16, 0x2176, 0x0076, 0x0069, 0x0069, 0,
- 16, 0x2177, 0x0076, 0x0069, 0x0069, 0x0069, 0,
- 16, 0x2178, 0x0069, 0x0078, 0,
- 16, 0x2179, 0x0078, 0,
- 16, 0x217A, 0x0078, 0x0069, 0,
- 16, 0x217B, 0x0078, 0x0069, 0x0069, 0,
- 16, 0x217C, 0x006C, 0,
- 16, 0x217D, 0x0063, 0,
- 16, 0x217E, 0x0064, 0,
- 16, 0x217F, 0x006D, 0,
- 1, 0x219A, 0x2190, 0x0338, 0,
- 1, 0x219B, 0x2192, 0x0338, 0,
- 1, 0x21AE, 0x2194, 0x0338, 0,
- 1, 0x21CD, 0x21D0, 0x0338, 0,
- 1, 0x21CE, 0x21D4, 0x0338, 0,
- 1, 0x21CF, 0x21D2, 0x0338, 0,
- 1, 0x2204, 0x2203, 0x0338, 0,
- 1, 0x2209, 0x2208, 0x0338, 0,
- 1, 0x220C, 0x220B, 0x0338, 0,
- 1, 0x2224, 0x2223, 0x0338, 0,
- 1, 0x2226, 0x2225, 0x0338, 0,
- 16, 0x222C, 0x222B, 0x222B, 0,
- 16, 0x222D, 0x222B, 0x222B, 0x222B, 0,
- 16, 0x222F, 0x222E, 0x222E, 0,
- 16, 0x2230, 0x222E, 0x222E, 0x222E, 0,
- 1, 0x2241, 0x223C, 0x0338, 0,
- 1, 0x2244, 0x2243, 0x0338, 0,
- 1, 0x2247, 0x2245, 0x0338, 0,
- 1, 0x2249, 0x2248, 0x0338, 0,
- 1, 0x2260, 0x003D, 0x0338, 0,
- 1, 0x2262, 0x2261, 0x0338, 0,
- 1, 0x226D, 0x224D, 0x0338, 0,
- 1, 0x226E, 0x003C, 0x0338, 0,
- 1, 0x226F, 0x003E, 0x0338, 0,
- 1, 0x2270, 0x2264, 0x0338, 0,
- 1, 0x2271, 0x2265, 0x0338, 0,
- 1, 0x2274, 0x2272, 0x0338, 0,
- 1, 0x2275, 0x2273, 0x0338, 0,
- 1, 0x2278, 0x2276, 0x0338, 0,
- 1, 0x2279, 0x2277, 0x0338, 0,
- 1, 0x2280, 0x227A, 0x0338, 0,
- 1, 0x2281, 0x227B, 0x0338, 0,
- 1, 0x2284, 0x2282, 0x0338, 0,
- 1, 0x2285, 0x2283, 0x0338, 0,
- 1, 0x2288, 0x2286, 0x0338, 0,
- 1, 0x2289, 0x2287, 0x0338, 0,
- 1, 0x22AC, 0x22A2, 0x0338, 0,
- 1, 0x22AD, 0x22A8, 0x0338, 0,
- 1, 0x22AE, 0x22A9, 0x0338, 0,
- 1, 0x22AF, 0x22AB, 0x0338, 0,
- 1, 0x22E0, 0x227C, 0x0338, 0,
- 1, 0x22E1, 0x227D, 0x0338, 0,
- 1, 0x22E2, 0x2291, 0x0338, 0,
- 1, 0x22E3, 0x2292, 0x0338, 0,
- 1, 0x22EA, 0x22B2, 0x0338, 0,
- 1, 0x22EB, 0x22B3, 0x0338, 0,
- 1, 0x22EC, 0x22B4, 0x0338, 0,
- 1, 0x22ED, 0x22B5, 0x0338, 0,
- 1, 0x2329, 0x3008, 0,
- 1, 0x232A, 0x3009, 0,
- 8, 0x2460, 0x0031, 0,
- 8, 0x2461, 0x0032, 0,
- 8, 0x2462, 0x0033, 0,
- 8, 0x2463, 0x0034, 0,
- 8, 0x2464, 0x0035, 0,
- 8, 0x2465, 0x0036, 0,
- 8, 0x2466, 0x0037, 0,
- 8, 0x2467, 0x0038, 0,
- 8, 0x2468, 0x0039, 0,
- 8, 0x2469, 0x0031, 0x0030, 0,
- 8, 0x246A, 0x0031, 0x0031, 0,
- 8, 0x246B, 0x0031, 0x0032, 0,
- 8, 0x246C, 0x0031, 0x0033, 0,
- 8, 0x246D, 0x0031, 0x0034, 0,
- 8, 0x246E, 0x0031, 0x0035, 0,
- 8, 0x246F, 0x0031, 0x0036, 0,
- 8, 0x2470, 0x0031, 0x0037, 0,
- 8, 0x2471, 0x0031, 0x0038, 0,
- 8, 0x2472, 0x0031, 0x0039, 0,
- 8, 0x2473, 0x0032, 0x0030, 0,
- 16, 0x2474, 0x0028, 0x0031, 0x0029, 0,
- 16, 0x2475, 0x0028, 0x0032, 0x0029, 0,
- 16, 0x2476, 0x0028, 0x0033, 0x0029, 0,
- 16, 0x2477, 0x0028, 0x0034, 0x0029, 0,
- 16, 0x2478, 0x0028, 0x0035, 0x0029, 0,
- 16, 0x2479, 0x0028, 0x0036, 0x0029, 0,
- 16, 0x247A, 0x0028, 0x0037, 0x0029, 0,
- 16, 0x247B, 0x0028, 0x0038, 0x0029, 0,
- 16, 0x247C, 0x0028, 0x0039, 0x0029, 0,
- 16, 0x247D, 0x0028, 0x0031, 0x0030, 0x0029, 0,
- 16, 0x247E, 0x0028, 0x0031, 0x0031, 0x0029, 0,
- 16, 0x247F, 0x0028, 0x0031, 0x0032, 0x0029, 0,
- 16, 0x2480, 0x0028, 0x0031, 0x0033, 0x0029, 0,
- 16, 0x2481, 0x0028, 0x0031, 0x0034, 0x0029, 0,
- 16, 0x2482, 0x0028, 0x0031, 0x0035, 0x0029, 0,
- 16, 0x2483, 0x0028, 0x0031, 0x0036, 0x0029, 0,
- 16, 0x2484, 0x0028, 0x0031, 0x0037, 0x0029, 0,
- 16, 0x2485, 0x0028, 0x0031, 0x0038, 0x0029, 0,
- 16, 0x2486, 0x0028, 0x0031, 0x0039, 0x0029, 0,
- 16, 0x2487, 0x0028, 0x0032, 0x0030, 0x0029, 0,
- 16, 0x2488, 0x0031, 0x002E, 0,
- 16, 0x2489, 0x0032, 0x002E, 0,
- 16, 0x248A, 0x0033, 0x002E, 0,
- 16, 0x248B, 0x0034, 0x002E, 0,
- 16, 0x248C, 0x0035, 0x002E, 0,
- 16, 0x248D, 0x0036, 0x002E, 0,
- 16, 0x248E, 0x0037, 0x002E, 0,
- 16, 0x248F, 0x0038, 0x002E, 0,
- 16, 0x2490, 0x0039, 0x002E, 0,
- 16, 0x2491, 0x0031, 0x0030, 0x002E, 0,
- 16, 0x2492, 0x0031, 0x0031, 0x002E, 0,
- 16, 0x2493, 0x0031, 0x0032, 0x002E, 0,
- 16, 0x2494, 0x0031, 0x0033, 0x002E, 0,
- 16, 0x2495, 0x0031, 0x0034, 0x002E, 0,
- 16, 0x2496, 0x0031, 0x0035, 0x002E, 0,
- 16, 0x2497, 0x0031, 0x0036, 0x002E, 0,
- 16, 0x2498, 0x0031, 0x0037, 0x002E, 0,
- 16, 0x2499, 0x0031, 0x0038, 0x002E, 0,
- 16, 0x249A, 0x0031, 0x0039, 0x002E, 0,
- 16, 0x249B, 0x0032, 0x0030, 0x002E, 0,
- 16, 0x249C, 0x0028, 0x0061, 0x0029, 0,
- 16, 0x249D, 0x0028, 0x0062, 0x0029, 0,
- 16, 0x249E, 0x0028, 0x0063, 0x0029, 0,
- 16, 0x249F, 0x0028, 0x0064, 0x0029, 0,
- 16, 0x24A0, 0x0028, 0x0065, 0x0029, 0,
- 16, 0x24A1, 0x0028, 0x0066, 0x0029, 0,
- 16, 0x24A2, 0x0028, 0x0067, 0x0029, 0,
- 16, 0x24A3, 0x0028, 0x0068, 0x0029, 0,
- 16, 0x24A4, 0x0028, 0x0069, 0x0029, 0,
- 16, 0x24A5, 0x0028, 0x006A, 0x0029, 0,
- 16, 0x24A6, 0x0028, 0x006B, 0x0029, 0,
- 16, 0x24A7, 0x0028, 0x006C, 0x0029, 0,
- 16, 0x24A8, 0x0028, 0x006D, 0x0029, 0,
- 16, 0x24A9, 0x0028, 0x006E, 0x0029, 0,
- 16, 0x24AA, 0x0028, 0x006F, 0x0029, 0,
- 16, 0x24AB, 0x0028, 0x0070, 0x0029, 0,
- 16, 0x24AC, 0x0028, 0x0071, 0x0029, 0,
- 16, 0x24AD, 0x0028, 0x0072, 0x0029, 0,
- 16, 0x24AE, 0x0028, 0x0073, 0x0029, 0,
- 16, 0x24AF, 0x0028, 0x0074, 0x0029, 0,
- 16, 0x24B0, 0x0028, 0x0075, 0x0029, 0,
- 16, 0x24B1, 0x0028, 0x0076, 0x0029, 0,
- 16, 0x24B2, 0x0028, 0x0077, 0x0029, 0,
- 16, 0x24B3, 0x0028, 0x0078, 0x0029, 0,
- 16, 0x24B4, 0x0028, 0x0079, 0x0029, 0,
- 16, 0x24B5, 0x0028, 0x007A, 0x0029, 0,
- 8, 0x24B6, 0x0041, 0,
- 8, 0x24B7, 0x0042, 0,
- 8, 0x24B8, 0x0043, 0,
- 8, 0x24B9, 0x0044, 0,
- 8, 0x24BA, 0x0045, 0,
- 8, 0x24BB, 0x0046, 0,
- 8, 0x24BC, 0x0047, 0,
- 8, 0x24BD, 0x0048, 0,
- 8, 0x24BE, 0x0049, 0,
- 8, 0x24BF, 0x004A, 0,
- 8, 0x24C0, 0x004B, 0,
- 8, 0x24C1, 0x004C, 0,
- 8, 0x24C2, 0x004D, 0,
- 8, 0x24C3, 0x004E, 0,
- 8, 0x24C4, 0x004F, 0,
- 8, 0x24C5, 0x0050, 0,
- 8, 0x24C6, 0x0051, 0,
- 8, 0x24C7, 0x0052, 0,
- 8, 0x24C8, 0x0053, 0,
- 8, 0x24C9, 0x0054, 0,
- 8, 0x24CA, 0x0055, 0,
- 8, 0x24CB, 0x0056, 0,
- 8, 0x24CC, 0x0057, 0,
- 8, 0x24CD, 0x0058, 0,
- 8, 0x24CE, 0x0059, 0,
- 8, 0x24CF, 0x005A, 0,
- 8, 0x24D0, 0x0061, 0,
- 8, 0x24D1, 0x0062, 0,
- 8, 0x24D2, 0x0063, 0,
- 8, 0x24D3, 0x0064, 0,
- 8, 0x24D4, 0x0065, 0,
- 8, 0x24D5, 0x0066, 0,
- 8, 0x24D6, 0x0067, 0,
- 8, 0x24D7, 0x0068, 0,
- 8, 0x24D8, 0x0069, 0,
- 8, 0x24D9, 0x006A, 0,
- 8, 0x24DA, 0x006B, 0,
- 8, 0x24DB, 0x006C, 0,
- 8, 0x24DC, 0x006D, 0,
- 8, 0x24DD, 0x006E, 0,
- 8, 0x24DE, 0x006F, 0,
- 8, 0x24DF, 0x0070, 0,
- 8, 0x24E0, 0x0071, 0,
- 8, 0x24E1, 0x0072, 0,
- 8, 0x24E2, 0x0073, 0,
- 8, 0x24E3, 0x0074, 0,
- 8, 0x24E4, 0x0075, 0,
- 8, 0x24E5, 0x0076, 0,
- 8, 0x24E6, 0x0077, 0,
- 8, 0x24E7, 0x0078, 0,
- 8, 0x24E8, 0x0079, 0,
- 8, 0x24E9, 0x007A, 0,
- 8, 0x24EA, 0x0030, 0,
- 16, 0x2E9F, 0x6BCD, 0,
- 16, 0x2EF3, 0x9F9F, 0,
- 16, 0x2F00, 0x4E00, 0,
- 16, 0x2F01, 0x4E28, 0,
- 16, 0x2F02, 0x4E36, 0,
- 16, 0x2F03, 0x4E3F, 0,
- 16, 0x2F04, 0x4E59, 0,
- 16, 0x2F05, 0x4E85, 0,
- 16, 0x2F06, 0x4E8C, 0,
- 16, 0x2F07, 0x4EA0, 0,
- 16, 0x2F08, 0x4EBA, 0,
- 16, 0x2F09, 0x513F, 0,
- 16, 0x2F0A, 0x5165, 0,
- 16, 0x2F0B, 0x516B, 0,
- 16, 0x2F0C, 0x5182, 0,
- 16, 0x2F0D, 0x5196, 0,
- 16, 0x2F0E, 0x51AB, 0,
- 16, 0x2F0F, 0x51E0, 0,
- 16, 0x2F10, 0x51F5, 0,
- 16, 0x2F11, 0x5200, 0,
- 16, 0x2F12, 0x529B, 0,
- 16, 0x2F13, 0x52F9, 0,
- 16, 0x2F14, 0x5315, 0,
- 16, 0x2F15, 0x531A, 0,
- 16, 0x2F16, 0x5338, 0,
- 16, 0x2F17, 0x5341, 0,
- 16, 0x2F18, 0x535C, 0,
- 16, 0x2F19, 0x5369, 0,
- 16, 0x2F1A, 0x5382, 0,
- 16, 0x2F1B, 0x53B6, 0,
- 16, 0x2F1C, 0x53C8, 0,
- 16, 0x2F1D, 0x53E3, 0,
- 16, 0x2F1E, 0x56D7, 0,
- 16, 0x2F1F, 0x571F, 0,
- 16, 0x2F20, 0x58EB, 0,
- 16, 0x2F21, 0x5902, 0,
- 16, 0x2F22, 0x590A, 0,
- 16, 0x2F23, 0x5915, 0,
- 16, 0x2F24, 0x5927, 0,
- 16, 0x2F25, 0x5973, 0,
- 16, 0x2F26, 0x5B50, 0,
- 16, 0x2F27, 0x5B80, 0,
- 16, 0x2F28, 0x5BF8, 0,
- 16, 0x2F29, 0x5C0F, 0,
- 16, 0x2F2A, 0x5C22, 0,
- 16, 0x2F2B, 0x5C38, 0,
- 16, 0x2F2C, 0x5C6E, 0,
- 16, 0x2F2D, 0x5C71, 0,
- 16, 0x2F2E, 0x5DDB, 0,
- 16, 0x2F2F, 0x5DE5, 0,
- 16, 0x2F30, 0x5DF1, 0,
- 16, 0x2F31, 0x5DFE, 0,
- 16, 0x2F32, 0x5E72, 0,
- 16, 0x2F33, 0x5E7A, 0,
- 16, 0x2F34, 0x5E7F, 0,
- 16, 0x2F35, 0x5EF4, 0,
- 16, 0x2F36, 0x5EFE, 0,
- 16, 0x2F37, 0x5F0B, 0,
- 16, 0x2F38, 0x5F13, 0,
- 16, 0x2F39, 0x5F50, 0,
- 16, 0x2F3A, 0x5F61, 0,
- 16, 0x2F3B, 0x5F73, 0,
- 16, 0x2F3C, 0x5FC3, 0,
- 16, 0x2F3D, 0x6208, 0,
- 16, 0x2F3E, 0x6236, 0,
- 16, 0x2F3F, 0x624B, 0,
- 16, 0x2F40, 0x652F, 0,
- 16, 0x2F41, 0x6534, 0,
- 16, 0x2F42, 0x6587, 0,
- 16, 0x2F43, 0x6597, 0,
- 16, 0x2F44, 0x65A4, 0,
- 16, 0x2F45, 0x65B9, 0,
- 16, 0x2F46, 0x65E0, 0,
- 16, 0x2F47, 0x65E5, 0,
- 16, 0x2F48, 0x66F0, 0,
- 16, 0x2F49, 0x6708, 0,
- 16, 0x2F4A, 0x6728, 0,
- 16, 0x2F4B, 0x6B20, 0,
- 16, 0x2F4C, 0x6B62, 0,
- 16, 0x2F4D, 0x6B79, 0,
- 16, 0x2F4E, 0x6BB3, 0,
- 16, 0x2F4F, 0x6BCB, 0,
- 16, 0x2F50, 0x6BD4, 0,
- 16, 0x2F51, 0x6BDB, 0,
- 16, 0x2F52, 0x6C0F, 0,
- 16, 0x2F53, 0x6C14, 0,
- 16, 0x2F54, 0x6C34, 0,
- 16, 0x2F55, 0x706B, 0,
- 16, 0x2F56, 0x722A, 0,
- 16, 0x2F57, 0x7236, 0,
- 16, 0x2F58, 0x723B, 0,
- 16, 0x2F59, 0x723F, 0,
- 16, 0x2F5A, 0x7247, 0,
- 16, 0x2F5B, 0x7259, 0,
- 16, 0x2F5C, 0x725B, 0,
- 16, 0x2F5D, 0x72AC, 0,
- 16, 0x2F5E, 0x7384, 0,
- 16, 0x2F5F, 0x7389, 0,
- 16, 0x2F60, 0x74DC, 0,
- 16, 0x2F61, 0x74E6, 0,
- 16, 0x2F62, 0x7518, 0,
- 16, 0x2F63, 0x751F, 0,
- 16, 0x2F64, 0x7528, 0,
- 16, 0x2F65, 0x7530, 0,
- 16, 0x2F66, 0x758B, 0,
- 16, 0x2F67, 0x7592, 0,
- 16, 0x2F68, 0x7676, 0,
- 16, 0x2F69, 0x767D, 0,
- 16, 0x2F6A, 0x76AE, 0,
- 16, 0x2F6B, 0x76BF, 0,
- 16, 0x2F6C, 0x76EE, 0,
- 16, 0x2F6D, 0x77DB, 0,
- 16, 0x2F6E, 0x77E2, 0,
- 16, 0x2F6F, 0x77F3, 0,
- 16, 0x2F70, 0x793A, 0,
- 16, 0x2F71, 0x79B8, 0,
- 16, 0x2F72, 0x79BE, 0,
- 16, 0x2F73, 0x7A74, 0,
- 16, 0x2F74, 0x7ACB, 0,
- 16, 0x2F75, 0x7AF9, 0,
- 16, 0x2F76, 0x7C73, 0,
- 16, 0x2F77, 0x7CF8, 0,
- 16, 0x2F78, 0x7F36, 0,
- 16, 0x2F79, 0x7F51, 0,
- 16, 0x2F7A, 0x7F8A, 0,
- 16, 0x2F7B, 0x7FBD, 0,
- 16, 0x2F7C, 0x8001, 0,
- 16, 0x2F7D, 0x800C, 0,
- 16, 0x2F7E, 0x8012, 0,
- 16, 0x2F7F, 0x8033, 0,
- 16, 0x2F80, 0x807F, 0,
- 16, 0x2F81, 0x8089, 0,
- 16, 0x2F82, 0x81E3, 0,
- 16, 0x2F83, 0x81EA, 0,
- 16, 0x2F84, 0x81F3, 0,
- 16, 0x2F85, 0x81FC, 0,
- 16, 0x2F86, 0x820C, 0,
- 16, 0x2F87, 0x821B, 0,
- 16, 0x2F88, 0x821F, 0,
- 16, 0x2F89, 0x826E, 0,
- 16, 0x2F8A, 0x8272, 0,
- 16, 0x2F8B, 0x8278, 0,
- 16, 0x2F8C, 0x864D, 0,
- 16, 0x2F8D, 0x866B, 0,
- 16, 0x2F8E, 0x8840, 0,
- 16, 0x2F8F, 0x884C, 0,
- 16, 0x2F90, 0x8863, 0,
- 16, 0x2F91, 0x897E, 0,
- 16, 0x2F92, 0x898B, 0,
- 16, 0x2F93, 0x89D2, 0,
- 16, 0x2F94, 0x8A00, 0,
- 16, 0x2F95, 0x8C37, 0,
- 16, 0x2F96, 0x8C46, 0,
- 16, 0x2F97, 0x8C55, 0,
- 16, 0x2F98, 0x8C78, 0,
- 16, 0x2F99, 0x8C9D, 0,
- 16, 0x2F9A, 0x8D64, 0,
- 16, 0x2F9B, 0x8D70, 0,
- 16, 0x2F9C, 0x8DB3, 0,
- 16, 0x2F9D, 0x8EAB, 0,
- 16, 0x2F9E, 0x8ECA, 0,
- 16, 0x2F9F, 0x8F9B, 0,
- 16, 0x2FA0, 0x8FB0, 0,
- 16, 0x2FA1, 0x8FB5, 0,
- 16, 0x2FA2, 0x9091, 0,
- 16, 0x2FA3, 0x9149, 0,
- 16, 0x2FA4, 0x91C6, 0,
- 16, 0x2FA5, 0x91CC, 0,
- 16, 0x2FA6, 0x91D1, 0,
- 16, 0x2FA7, 0x9577, 0,
- 16, 0x2FA8, 0x9580, 0,
- 16, 0x2FA9, 0x961C, 0,
- 16, 0x2FAA, 0x96B6, 0,
- 16, 0x2FAB, 0x96B9, 0,
- 16, 0x2FAC, 0x96E8, 0,
- 16, 0x2FAD, 0x9751, 0,
- 16, 0x2FAE, 0x975E, 0,
- 16, 0x2FAF, 0x9762, 0,
- 16, 0x2FB0, 0x9769, 0,
- 16, 0x2FB1, 0x97CB, 0,
- 16, 0x2FB2, 0x97ED, 0,
- 16, 0x2FB3, 0x97F3, 0,
- 16, 0x2FB4, 0x9801, 0,
- 16, 0x2FB5, 0x98A8, 0,
- 16, 0x2FB6, 0x98DB, 0,
- 16, 0x2FB7, 0x98DF, 0,
- 16, 0x2FB8, 0x9996, 0,
- 16, 0x2FB9, 0x9999, 0,
- 16, 0x2FBA, 0x99AC, 0,
- 16, 0x2FBB, 0x9AA8, 0,
- 16, 0x2FBC, 0x9AD8, 0,
- 16, 0x2FBD, 0x9ADF, 0,
- 16, 0x2FBE, 0x9B25, 0,
- 16, 0x2FBF, 0x9B2F, 0,
- 16, 0x2FC0, 0x9B32, 0,
- 16, 0x2FC1, 0x9B3C, 0,
- 16, 0x2FC2, 0x9B5A, 0,
- 16, 0x2FC3, 0x9CE5, 0,
- 16, 0x2FC4, 0x9E75, 0,
- 16, 0x2FC5, 0x9E7F, 0,
- 16, 0x2FC6, 0x9EA5, 0,
- 16, 0x2FC7, 0x9EBB, 0,
- 16, 0x2FC8, 0x9EC3, 0,
- 16, 0x2FC9, 0x9ECD, 0,
- 16, 0x2FCA, 0x9ED1, 0,
- 16, 0x2FCB, 0x9EF9, 0,
- 16, 0x2FCC, 0x9EFD, 0,
- 16, 0x2FCD, 0x9F0E, 0,
- 16, 0x2FCE, 0x9F13, 0,
- 16, 0x2FCF, 0x9F20, 0,
- 16, 0x2FD0, 0x9F3B, 0,
- 16, 0x2FD1, 0x9F4A, 0,
- 16, 0x2FD2, 0x9F52, 0,
- 16, 0x2FD3, 0x9F8D, 0,
- 16, 0x2FD4, 0x9F9C, 0,
- 16, 0x2FD5, 0x9FA0, 0,
- 12, 0x3000, 0x0020, 0,
- 16, 0x3036, 0x3012, 0,
- 16, 0x3038, 0x5341, 0,
- 16, 0x3039, 0x5344, 0,
- 16, 0x303A, 0x5345, 0,
- 1, 0x304C, 0x304B, 0x3099, 0,
- 1, 0x304E, 0x304D, 0x3099, 0,
- 1, 0x3050, 0x304F, 0x3099, 0,
- 1, 0x3052, 0x3051, 0x3099, 0,
- 1, 0x3054, 0x3053, 0x3099, 0,
- 1, 0x3056, 0x3055, 0x3099, 0,
- 1, 0x3058, 0x3057, 0x3099, 0,
- 1, 0x305A, 0x3059, 0x3099, 0,
- 1, 0x305C, 0x305B, 0x3099, 0,
- 1, 0x305E, 0x305D, 0x3099, 0,
- 1, 0x3060, 0x305F, 0x3099, 0,
- 1, 0x3062, 0x3061, 0x3099, 0,
- 1, 0x3065, 0x3064, 0x3099, 0,
- 1, 0x3067, 0x3066, 0x3099, 0,
- 1, 0x3069, 0x3068, 0x3099, 0,
- 1, 0x3070, 0x306F, 0x3099, 0,
- 1, 0x3071, 0x306F, 0x309A, 0,
- 1, 0x3073, 0x3072, 0x3099, 0,
- 1, 0x3074, 0x3072, 0x309A, 0,
- 1, 0x3076, 0x3075, 0x3099, 0,
- 1, 0x3077, 0x3075, 0x309A, 0,
- 1, 0x3079, 0x3078, 0x3099, 0,
- 1, 0x307A, 0x3078, 0x309A, 0,
- 1, 0x307C, 0x307B, 0x3099, 0,
- 1, 0x307D, 0x307B, 0x309A, 0,
- 1, 0x3094, 0x3046, 0x3099, 0,
- 16, 0x309B, 0x0020, 0x3099, 0,
- 16, 0x309C, 0x0020, 0x309A, 0,
- 1, 0x309E, 0x309D, 0x3099, 0,
- 1, 0x30AC, 0x30AB, 0x3099, 0,
- 1, 0x30AE, 0x30AD, 0x3099, 0,
- 1, 0x30B0, 0x30AF, 0x3099, 0,
- 1, 0x30B2, 0x30B1, 0x3099, 0,
- 1, 0x30B4, 0x30B3, 0x3099, 0,
- 1, 0x30B6, 0x30B5, 0x3099, 0,
- 1, 0x30B8, 0x30B7, 0x3099, 0,
- 1, 0x30BA, 0x30B9, 0x3099, 0,
- 1, 0x30BC, 0x30BB, 0x3099, 0,
- 1, 0x30BE, 0x30BD, 0x3099, 0,
- 1, 0x30C0, 0x30BF, 0x3099, 0,
- 1, 0x30C2, 0x30C1, 0x3099, 0,
- 1, 0x30C5, 0x30C4, 0x3099, 0,
- 1, 0x30C7, 0x30C6, 0x3099, 0,
- 1, 0x30C9, 0x30C8, 0x3099, 0,
- 1, 0x30D0, 0x30CF, 0x3099, 0,
- 1, 0x30D1, 0x30CF, 0x309A, 0,
- 1, 0x30D3, 0x30D2, 0x3099, 0,
- 1, 0x30D4, 0x30D2, 0x309A, 0,
- 1, 0x30D6, 0x30D5, 0x3099, 0,
- 1, 0x30D7, 0x30D5, 0x309A, 0,
- 1, 0x30D9, 0x30D8, 0x3099, 0,
- 1, 0x30DA, 0x30D8, 0x309A, 0,
- 1, 0x30DC, 0x30DB, 0x3099, 0,
- 1, 0x30DD, 0x30DB, 0x309A, 0,
- 1, 0x30F4, 0x30A6, 0x3099, 0,
- 1, 0x30F7, 0x30EF, 0x3099, 0,
- 1, 0x30F8, 0x30F0, 0x3099, 0,
- 1, 0x30F9, 0x30F1, 0x3099, 0,
- 1, 0x30FA, 0x30F2, 0x3099, 0,
- 1, 0x30FE, 0x30FD, 0x3099, 0,
- 16, 0x3131, 0x1100, 0,
- 16, 0x3132, 0x1101, 0,
- 16, 0x3133, 0x11AA, 0,
- 16, 0x3134, 0x1102, 0,
- 16, 0x3135, 0x11AC, 0,
- 16, 0x3136, 0x11AD, 0,
- 16, 0x3137, 0x1103, 0,
- 16, 0x3138, 0x1104, 0,
- 16, 0x3139, 0x1105, 0,
- 16, 0x313A, 0x11B0, 0,
- 16, 0x313B, 0x11B1, 0,
- 16, 0x313C, 0x11B2, 0,
- 16, 0x313D, 0x11B3, 0,
- 16, 0x313E, 0x11B4, 0,
- 16, 0x313F, 0x11B5, 0,
- 16, 0x3140, 0x111A, 0,
- 16, 0x3141, 0x1106, 0,
- 16, 0x3142, 0x1107, 0,
- 16, 0x3143, 0x1108, 0,
- 16, 0x3144, 0x1121, 0,
- 16, 0x3145, 0x1109, 0,
- 16, 0x3146, 0x110A, 0,
- 16, 0x3147, 0x110B, 0,
- 16, 0x3148, 0x110C, 0,
- 16, 0x3149, 0x110D, 0,
- 16, 0x314A, 0x110E, 0,
- 16, 0x314B, 0x110F, 0,
- 16, 0x314C, 0x1110, 0,
- 16, 0x314D, 0x1111, 0,
- 16, 0x314E, 0x1112, 0,
- 16, 0x314F, 0x1161, 0,
- 16, 0x3150, 0x1162, 0,
- 16, 0x3151, 0x1163, 0,
- 16, 0x3152, 0x1164, 0,
- 16, 0x3153, 0x1165, 0,
- 16, 0x3154, 0x1166, 0,
- 16, 0x3155, 0x1167, 0,
- 16, 0x3156, 0x1168, 0,
- 16, 0x3157, 0x1169, 0,
- 16, 0x3158, 0x116A, 0,
- 16, 0x3159, 0x116B, 0,
- 16, 0x315A, 0x116C, 0,
- 16, 0x315B, 0x116D, 0,
- 16, 0x315C, 0x116E, 0,
- 16, 0x315D, 0x116F, 0,
- 16, 0x315E, 0x1170, 0,
- 16, 0x315F, 0x1171, 0,
- 16, 0x3160, 0x1172, 0,
- 16, 0x3161, 0x1173, 0,
- 16, 0x3162, 0x1174, 0,
- 16, 0x3163, 0x1175, 0,
- 16, 0x3164, 0x1160, 0,
- 16, 0x3165, 0x1114, 0,
- 16, 0x3166, 0x1115, 0,
- 16, 0x3167, 0x11C7, 0,
- 16, 0x3168, 0x11C8, 0,
- 16, 0x3169, 0x11CC, 0,
- 16, 0x316A, 0x11CE, 0,
- 16, 0x316B, 0x11D3, 0,
- 16, 0x316C, 0x11D7, 0,
- 16, 0x316D, 0x11D9, 0,
- 16, 0x316E, 0x111C, 0,
- 16, 0x316F, 0x11DD, 0,
- 16, 0x3170, 0x11DF, 0,
- 16, 0x3171, 0x111D, 0,
- 16, 0x3172, 0x111E, 0,
- 16, 0x3173, 0x1120, 0,
- 16, 0x3174, 0x1122, 0,
- 16, 0x3175, 0x1123, 0,
- 16, 0x3176, 0x1127, 0,
- 16, 0x3177, 0x1129, 0,
- 16, 0x3178, 0x112B, 0,
- 16, 0x3179, 0x112C, 0,
- 16, 0x317A, 0x112D, 0,
- 16, 0x317B, 0x112E, 0,
- 16, 0x317C, 0x112F, 0,
- 16, 0x317D, 0x1132, 0,
- 16, 0x317E, 0x1136, 0,
- 16, 0x317F, 0x1140, 0,
- 16, 0x3180, 0x1147, 0,
- 16, 0x3181, 0x114C, 0,
- 16, 0x3182, 0x11F1, 0,
- 16, 0x3183, 0x11F2, 0,
- 16, 0x3184, 0x1157, 0,
- 16, 0x3185, 0x1158, 0,
- 16, 0x3186, 0x1159, 0,
- 16, 0x3187, 0x1184, 0,
- 16, 0x3188, 0x1185, 0,
- 16, 0x3189, 0x1188, 0,
- 16, 0x318A, 0x1191, 0,
- 16, 0x318B, 0x1192, 0,
- 16, 0x318C, 0x1194, 0,
- 16, 0x318D, 0x119E, 0,
- 16, 0x318E, 0x11A1, 0,
- 9, 0x3192, 0x4E00, 0,
- 9, 0x3193, 0x4E8C, 0,
- 9, 0x3194, 0x4E09, 0,
- 9, 0x3195, 0x56DB, 0,
- 9, 0x3196, 0x4E0A, 0,
- 9, 0x3197, 0x4E2D, 0,
- 9, 0x3198, 0x4E0B, 0,
- 9, 0x3199, 0x7532, 0,
- 9, 0x319A, 0x4E59, 0,
- 9, 0x319B, 0x4E19, 0,
- 9, 0x319C, 0x4E01, 0,
- 9, 0x319D, 0x5929, 0,
- 9, 0x319E, 0x5730, 0,
- 9, 0x319F, 0x4EBA, 0,
- 16, 0x3200, 0x0028, 0x1100, 0x0029, 0,
- 16, 0x3201, 0x0028, 0x1102, 0x0029, 0,
- 16, 0x3202, 0x0028, 0x1103, 0x0029, 0,
- 16, 0x3203, 0x0028, 0x1105, 0x0029, 0,
- 16, 0x3204, 0x0028, 0x1106, 0x0029, 0,
- 16, 0x3205, 0x0028, 0x1107, 0x0029, 0,
- 16, 0x3206, 0x0028, 0x1109, 0x0029, 0,
- 16, 0x3207, 0x0028, 0x110B, 0x0029, 0,
- 16, 0x3208, 0x0028, 0x110C, 0x0029, 0,
- 16, 0x3209, 0x0028, 0x110E, 0x0029, 0,
- 16, 0x320A, 0x0028, 0x110F, 0x0029, 0,
- 16, 0x320B, 0x0028, 0x1110, 0x0029, 0,
- 16, 0x320C, 0x0028, 0x1111, 0x0029, 0,
- 16, 0x320D, 0x0028, 0x1112, 0x0029, 0,
- 16, 0x320E, 0x0028, 0x1100, 0x1161, 0x0029, 0,
- 16, 0x320F, 0x0028, 0x1102, 0x1161, 0x0029, 0,
- 16, 0x3210, 0x0028, 0x1103, 0x1161, 0x0029, 0,
- 16, 0x3211, 0x0028, 0x1105, 0x1161, 0x0029, 0,
- 16, 0x3212, 0x0028, 0x1106, 0x1161, 0x0029, 0,
- 16, 0x3213, 0x0028, 0x1107, 0x1161, 0x0029, 0,
- 16, 0x3214, 0x0028, 0x1109, 0x1161, 0x0029, 0,
- 16, 0x3215, 0x0028, 0x110B, 0x1161, 0x0029, 0,
- 16, 0x3216, 0x0028, 0x110C, 0x1161, 0x0029, 0,
- 16, 0x3217, 0x0028, 0x110E, 0x1161, 0x0029, 0,
- 16, 0x3218, 0x0028, 0x110F, 0x1161, 0x0029, 0,
- 16, 0x3219, 0x0028, 0x1110, 0x1161, 0x0029, 0,
- 16, 0x321A, 0x0028, 0x1111, 0x1161, 0x0029, 0,
- 16, 0x321B, 0x0028, 0x1112, 0x1161, 0x0029, 0,
- 16, 0x321C, 0x0028, 0x110C, 0x116E, 0x0029, 0,
- 16, 0x3220, 0x0028, 0x4E00, 0x0029, 0,
- 16, 0x3221, 0x0028, 0x4E8C, 0x0029, 0,
- 16, 0x3222, 0x0028, 0x4E09, 0x0029, 0,
- 16, 0x3223, 0x0028, 0x56DB, 0x0029, 0,
- 16, 0x3224, 0x0028, 0x4E94, 0x0029, 0,
- 16, 0x3225, 0x0028, 0x516D, 0x0029, 0,
- 16, 0x3226, 0x0028, 0x4E03, 0x0029, 0,
- 16, 0x3227, 0x0028, 0x516B, 0x0029, 0,
- 16, 0x3228, 0x0028, 0x4E5D, 0x0029, 0,
- 16, 0x3229, 0x0028, 0x5341, 0x0029, 0,
- 16, 0x322A, 0x0028, 0x6708, 0x0029, 0,
- 16, 0x322B, 0x0028, 0x706B, 0x0029, 0,
- 16, 0x322C, 0x0028, 0x6C34, 0x0029, 0,
- 16, 0x322D, 0x0028, 0x6728, 0x0029, 0,
- 16, 0x322E, 0x0028, 0x91D1, 0x0029, 0,
- 16, 0x322F, 0x0028, 0x571F, 0x0029, 0,
- 16, 0x3230, 0x0028, 0x65E5, 0x0029, 0,
- 16, 0x3231, 0x0028, 0x682A, 0x0029, 0,
- 16, 0x3232, 0x0028, 0x6709, 0x0029, 0,
- 16, 0x3233, 0x0028, 0x793E, 0x0029, 0,
- 16, 0x3234, 0x0028, 0x540D, 0x0029, 0,
- 16, 0x3235, 0x0028, 0x7279, 0x0029, 0,
- 16, 0x3236, 0x0028, 0x8CA1, 0x0029, 0,
- 16, 0x3237, 0x0028, 0x795D, 0x0029, 0,
- 16, 0x3238, 0x0028, 0x52B4, 0x0029, 0,
- 16, 0x3239, 0x0028, 0x4EE3, 0x0029, 0,
- 16, 0x323A, 0x0028, 0x547C, 0x0029, 0,
- 16, 0x323B, 0x0028, 0x5B66, 0x0029, 0,
- 16, 0x323C, 0x0028, 0x76E3, 0x0029, 0,
- 16, 0x323D, 0x0028, 0x4F01, 0x0029, 0,
- 16, 0x323E, 0x0028, 0x8CC7, 0x0029, 0,
- 16, 0x323F, 0x0028, 0x5354, 0x0029, 0,
- 16, 0x3240, 0x0028, 0x796D, 0x0029, 0,
- 16, 0x3241, 0x0028, 0x4F11, 0x0029, 0,
- 16, 0x3242, 0x0028, 0x81EA, 0x0029, 0,
- 16, 0x3243, 0x0028, 0x81F3, 0x0029, 0,
- 8, 0x3260, 0x1100, 0,
- 8, 0x3261, 0x1102, 0,
- 8, 0x3262, 0x1103, 0,
- 8, 0x3263, 0x1105, 0,
- 8, 0x3264, 0x1106, 0,
- 8, 0x3265, 0x1107, 0,
- 8, 0x3266, 0x1109, 0,
- 8, 0x3267, 0x110B, 0,
- 8, 0x3268, 0x110C, 0,
- 8, 0x3269, 0x110E, 0,
- 8, 0x326A, 0x110F, 0,
- 8, 0x326B, 0x1110, 0,
- 8, 0x326C, 0x1111, 0,
- 8, 0x326D, 0x1112, 0,
- 8, 0x326E, 0x1100, 0x1161, 0,
- 8, 0x326F, 0x1102, 0x1161, 0,
- 8, 0x3270, 0x1103, 0x1161, 0,
- 8, 0x3271, 0x1105, 0x1161, 0,
- 8, 0x3272, 0x1106, 0x1161, 0,
- 8, 0x3273, 0x1107, 0x1161, 0,
- 8, 0x3274, 0x1109, 0x1161, 0,
- 8, 0x3275, 0x110B, 0x1161, 0,
- 8, 0x3276, 0x110C, 0x1161, 0,
- 8, 0x3277, 0x110E, 0x1161, 0,
- 8, 0x3278, 0x110F, 0x1161, 0,
- 8, 0x3279, 0x1110, 0x1161, 0,
- 8, 0x327A, 0x1111, 0x1161, 0,
- 8, 0x327B, 0x1112, 0x1161, 0,
- 8, 0x3280, 0x4E00, 0,
- 8, 0x3281, 0x4E8C, 0,
- 8, 0x3282, 0x4E09, 0,
- 8, 0x3283, 0x56DB, 0,
- 8, 0x3284, 0x4E94, 0,
- 8, 0x3285, 0x516D, 0,
- 8, 0x3286, 0x4E03, 0,
- 8, 0x3287, 0x516B, 0,
- 8, 0x3288, 0x4E5D, 0,
- 8, 0x3289, 0x5341, 0,
- 8, 0x328A, 0x6708, 0,
- 8, 0x328B, 0x706B, 0,
- 8, 0x328C, 0x6C34, 0,
- 8, 0x328D, 0x6728, 0,
- 8, 0x328E, 0x91D1, 0,
- 8, 0x328F, 0x571F, 0,
- 8, 0x3290, 0x65E5, 0,
- 8, 0x3291, 0x682A, 0,
- 8, 0x3292, 0x6709, 0,
- 8, 0x3293, 0x793E, 0,
- 8, 0x3294, 0x540D, 0,
- 8, 0x3295, 0x7279, 0,
- 8, 0x3296, 0x8CA1, 0,
- 8, 0x3297, 0x795D, 0,
- 8, 0x3298, 0x52B4, 0,
- 8, 0x3299, 0x79D8, 0,
- 8, 0x329A, 0x7537, 0,
- 8, 0x329B, 0x5973, 0,
- 8, 0x329C, 0x9069, 0,
- 8, 0x329D, 0x512A, 0,
- 8, 0x329E, 0x5370, 0,
- 8, 0x329F, 0x6CE8, 0,
- 8, 0x32A0, 0x9805, 0,
- 8, 0x32A1, 0x4F11, 0,
- 8, 0x32A2, 0x5199, 0,
- 8, 0x32A3, 0x6B63, 0,
- 8, 0x32A4, 0x4E0A, 0,
- 8, 0x32A5, 0x4E2D, 0,
- 8, 0x32A6, 0x4E0B, 0,
- 8, 0x32A7, 0x5DE6, 0,
- 8, 0x32A8, 0x53F3, 0,
- 8, 0x32A9, 0x533B, 0,
- 8, 0x32AA, 0x5B97, 0,
- 8, 0x32AB, 0x5B66, 0,
- 8, 0x32AC, 0x76E3, 0,
- 8, 0x32AD, 0x4F01, 0,
- 8, 0x32AE, 0x8CC7, 0,
- 8, 0x32AF, 0x5354, 0,
- 8, 0x32B0, 0x591C, 0,
- 16, 0x32C0, 0x0031, 0x6708, 0,
- 16, 0x32C1, 0x0032, 0x6708, 0,
- 16, 0x32C2, 0x0033, 0x6708, 0,
- 16, 0x32C3, 0x0034, 0x6708, 0,
- 16, 0x32C4, 0x0035, 0x6708, 0,
- 16, 0x32C5, 0x0036, 0x6708, 0,
- 16, 0x32C6, 0x0037, 0x6708, 0,
- 16, 0x32C7, 0x0038, 0x6708, 0,
- 16, 0x32C8, 0x0039, 0x6708, 0,
- 16, 0x32C9, 0x0031, 0x0030, 0x6708, 0,
- 16, 0x32CA, 0x0031, 0x0031, 0x6708, 0,
- 16, 0x32CB, 0x0031, 0x0032, 0x6708, 0,
- 8, 0x32D0, 0x30A2, 0,
- 8, 0x32D1, 0x30A4, 0,
- 8, 0x32D2, 0x30A6, 0,
- 8, 0x32D3, 0x30A8, 0,
- 8, 0x32D4, 0x30AA, 0,
- 8, 0x32D5, 0x30AB, 0,
- 8, 0x32D6, 0x30AD, 0,
- 8, 0x32D7, 0x30AF, 0,
- 8, 0x32D8, 0x30B1, 0,
- 8, 0x32D9, 0x30B3, 0,
- 8, 0x32DA, 0x30B5, 0,
- 8, 0x32DB, 0x30B7, 0,
- 8, 0x32DC, 0x30B9, 0,
- 8, 0x32DD, 0x30BB, 0,
- 8, 0x32DE, 0x30BD, 0,
- 8, 0x32DF, 0x30BF, 0,
- 8, 0x32E0, 0x30C1, 0,
- 8, 0x32E1, 0x30C4, 0,
- 8, 0x32E2, 0x30C6, 0,
- 8, 0x32E3, 0x30C8, 0,
- 8, 0x32E4, 0x30CA, 0,
- 8, 0x32E5, 0x30CB, 0,
- 8, 0x32E6, 0x30CC, 0,
- 8, 0x32E7, 0x30CD, 0,
- 8, 0x32E8, 0x30CE, 0,
- 8, 0x32E9, 0x30CF, 0,
- 8, 0x32EA, 0x30D2, 0,
- 8, 0x32EB, 0x30D5, 0,
- 8, 0x32EC, 0x30D8, 0,
- 8, 0x32ED, 0x30DB, 0,
- 8, 0x32EE, 0x30DE, 0,
- 8, 0x32EF, 0x30DF, 0,
- 8, 0x32F0, 0x30E0, 0,
- 8, 0x32F1, 0x30E1, 0,
- 8, 0x32F2, 0x30E2, 0,
- 8, 0x32F3, 0x30E4, 0,
- 8, 0x32F4, 0x30E6, 0,
- 8, 0x32F5, 0x30E8, 0,
- 8, 0x32F6, 0x30E9, 0,
- 8, 0x32F7, 0x30EA, 0,
- 8, 0x32F8, 0x30EB, 0,
- 8, 0x32F9, 0x30EC, 0,
- 8, 0x32FA, 0x30ED, 0,
- 8, 0x32FB, 0x30EF, 0,
- 8, 0x32FC, 0x30F0, 0,
- 8, 0x32FD, 0x30F1, 0,
- 8, 0x32FE, 0x30F2, 0,
- 15, 0x3300, 0x30A2, 0x30D1, 0x30FC, 0x30C8, 0,
- 15, 0x3301, 0x30A2, 0x30EB, 0x30D5, 0x30A1, 0,
- 15, 0x3302, 0x30A2, 0x30F3, 0x30DA, 0x30A2, 0,
- 15, 0x3303, 0x30A2, 0x30FC, 0x30EB, 0,
- 15, 0x3304, 0x30A4, 0x30CB, 0x30F3, 0x30B0, 0,
- 15, 0x3305, 0x30A4, 0x30F3, 0x30C1, 0,
- 15, 0x3306, 0x30A6, 0x30A9, 0x30F3, 0,
- 15, 0x3307, 0x30A8, 0x30B9, 0x30AF, 0x30FC, 0x30C9, 0,
- 15, 0x3308, 0x30A8, 0x30FC, 0x30AB, 0x30FC, 0,
- 15, 0x3309, 0x30AA, 0x30F3, 0x30B9, 0,
- 15, 0x330A, 0x30AA, 0x30FC, 0x30E0, 0,
- 15, 0x330B, 0x30AB, 0x30A4, 0x30EA, 0,
- 15, 0x330C, 0x30AB, 0x30E9, 0x30C3, 0x30C8, 0,
- 15, 0x330D, 0x30AB, 0x30ED, 0x30EA, 0x30FC, 0,
- 15, 0x330E, 0x30AC, 0x30ED, 0x30F3, 0,
- 15, 0x330F, 0x30AC, 0x30F3, 0x30DE, 0,
- 15, 0x3310, 0x30AE, 0x30AC, 0,
- 15, 0x3311, 0x30AE, 0x30CB, 0x30FC, 0,
- 15, 0x3312, 0x30AD, 0x30E5, 0x30EA, 0x30FC, 0,
- 15, 0x3313, 0x30AE, 0x30EB, 0x30C0, 0x30FC, 0,
- 15, 0x3314, 0x30AD, 0x30ED, 0,
- 15, 0x3315, 0x30AD, 0x30ED, 0x30B0, 0x30E9, 0x30E0, 0,
- 15, 0x3316, 0x30AD, 0x30ED, 0x30E1, 0x30FC, 0x30C8, 0x30EB, 0,
- 15, 0x3317, 0x30AD, 0x30ED, 0x30EF, 0x30C3, 0x30C8, 0,
- 15, 0x3318, 0x30B0, 0x30E9, 0x30E0, 0,
- 15, 0x3319, 0x30B0, 0x30E9, 0x30E0, 0x30C8, 0x30F3, 0,
- 15, 0x331A, 0x30AF, 0x30EB, 0x30BC, 0x30A4, 0x30ED, 0,
- 15, 0x331B, 0x30AF, 0x30ED, 0x30FC, 0x30CD, 0,
- 15, 0x331C, 0x30B1, 0x30FC, 0x30B9, 0,
- 15, 0x331D, 0x30B3, 0x30EB, 0x30CA, 0,
- 15, 0x331E, 0x30B3, 0x30FC, 0x30DD, 0,
- 15, 0x331F, 0x30B5, 0x30A4, 0x30AF, 0x30EB, 0,
- 15, 0x3320, 0x30B5, 0x30F3, 0x30C1, 0x30FC, 0x30E0, 0,
- 15, 0x3321, 0x30B7, 0x30EA, 0x30F3, 0x30B0, 0,
- 15, 0x3322, 0x30BB, 0x30F3, 0x30C1, 0,
- 15, 0x3323, 0x30BB, 0x30F3, 0x30C8, 0,
- 15, 0x3324, 0x30C0, 0x30FC, 0x30B9, 0,
- 15, 0x3325, 0x30C7, 0x30B7, 0,
- 15, 0x3326, 0x30C9, 0x30EB, 0,
- 15, 0x3327, 0x30C8, 0x30F3, 0,
- 15, 0x3328, 0x30CA, 0x30CE, 0,
- 15, 0x3329, 0x30CE, 0x30C3, 0x30C8, 0,
- 15, 0x332A, 0x30CF, 0x30A4, 0x30C4, 0,
- 15, 0x332B, 0x30D1, 0x30FC, 0x30BB, 0x30F3, 0x30C8, 0,
- 15, 0x332C, 0x30D1, 0x30FC, 0x30C4, 0,
- 15, 0x332D, 0x30D0, 0x30FC, 0x30EC, 0x30EB, 0,
- 15, 0x332E, 0x30D4, 0x30A2, 0x30B9, 0x30C8, 0x30EB, 0,
- 15, 0x332F, 0x30D4, 0x30AF, 0x30EB, 0,
- 15, 0x3330, 0x30D4, 0x30B3, 0,
- 15, 0x3331, 0x30D3, 0x30EB, 0,
- 15, 0x3332, 0x30D5, 0x30A1, 0x30E9, 0x30C3, 0x30C9, 0,
- 15, 0x3333, 0x30D5, 0x30A3, 0x30FC, 0x30C8, 0,
- 15, 0x3334, 0x30D6, 0x30C3, 0x30B7, 0x30A7, 0x30EB, 0,
- 15, 0x3335, 0x30D5, 0x30E9, 0x30F3, 0,
- 15, 0x3336, 0x30D8, 0x30AF, 0x30BF, 0x30FC, 0x30EB, 0,
- 15, 0x3337, 0x30DA, 0x30BD, 0,
- 15, 0x3338, 0x30DA, 0x30CB, 0x30D2, 0,
- 15, 0x3339, 0x30D8, 0x30EB, 0x30C4, 0,
- 15, 0x333A, 0x30DA, 0x30F3, 0x30B9, 0,
- 15, 0x333B, 0x30DA, 0x30FC, 0x30B8, 0,
- 15, 0x333C, 0x30D9, 0x30FC, 0x30BF, 0,
- 15, 0x333D, 0x30DD, 0x30A4, 0x30F3, 0x30C8, 0,
- 15, 0x333E, 0x30DC, 0x30EB, 0x30C8, 0,
- 15, 0x333F, 0x30DB, 0x30F3, 0,
- 15, 0x3340, 0x30DD, 0x30F3, 0x30C9, 0,
- 15, 0x3341, 0x30DB, 0x30FC, 0x30EB, 0,
- 15, 0x3342, 0x30DB, 0x30FC, 0x30F3, 0,
- 15, 0x3343, 0x30DE, 0x30A4, 0x30AF, 0x30ED, 0,
- 15, 0x3344, 0x30DE, 0x30A4, 0x30EB, 0,
- 15, 0x3345, 0x30DE, 0x30C3, 0x30CF, 0,
- 15, 0x3346, 0x30DE, 0x30EB, 0x30AF, 0,
- 15, 0x3347, 0x30DE, 0x30F3, 0x30B7, 0x30E7, 0x30F3, 0,
- 15, 0x3348, 0x30DF, 0x30AF, 0x30ED, 0x30F3, 0,
- 15, 0x3349, 0x30DF, 0x30EA, 0,
- 15, 0x334A, 0x30DF, 0x30EA, 0x30D0, 0x30FC, 0x30EB, 0,
- 15, 0x334B, 0x30E1, 0x30AC, 0,
- 15, 0x334C, 0x30E1, 0x30AC, 0x30C8, 0x30F3, 0,
- 15, 0x334D, 0x30E1, 0x30FC, 0x30C8, 0x30EB, 0,
- 15, 0x334E, 0x30E4, 0x30FC, 0x30C9, 0,
- 15, 0x334F, 0x30E4, 0x30FC, 0x30EB, 0,
- 15, 0x3350, 0x30E6, 0x30A2, 0x30F3, 0,
- 15, 0x3351, 0x30EA, 0x30C3, 0x30C8, 0x30EB, 0,
- 15, 0x3352, 0x30EA, 0x30E9, 0,
- 15, 0x3353, 0x30EB, 0x30D4, 0x30FC, 0,
- 15, 0x3354, 0x30EB, 0x30FC, 0x30D6, 0x30EB, 0,
- 15, 0x3355, 0x30EC, 0x30E0, 0,
- 15, 0x3356, 0x30EC, 0x30F3, 0x30C8, 0x30B2, 0x30F3, 0,
- 15, 0x3357, 0x30EF, 0x30C3, 0x30C8, 0,
- 16, 0x3358, 0x0030, 0x70B9, 0,
- 16, 0x3359, 0x0031, 0x70B9, 0,
- 16, 0x335A, 0x0032, 0x70B9, 0,
- 16, 0x335B, 0x0033, 0x70B9, 0,
- 16, 0x335C, 0x0034, 0x70B9, 0,
- 16, 0x335D, 0x0035, 0x70B9, 0,
- 16, 0x335E, 0x0036, 0x70B9, 0,
- 16, 0x335F, 0x0037, 0x70B9, 0,
- 16, 0x3360, 0x0038, 0x70B9, 0,
- 16, 0x3361, 0x0039, 0x70B9, 0,
- 16, 0x3362, 0x0031, 0x0030, 0x70B9, 0,
- 16, 0x3363, 0x0031, 0x0031, 0x70B9, 0,
- 16, 0x3364, 0x0031, 0x0032, 0x70B9, 0,
- 16, 0x3365, 0x0031, 0x0033, 0x70B9, 0,
- 16, 0x3366, 0x0031, 0x0034, 0x70B9, 0,
- 16, 0x3367, 0x0031, 0x0035, 0x70B9, 0,
- 16, 0x3368, 0x0031, 0x0036, 0x70B9, 0,
- 16, 0x3369, 0x0031, 0x0037, 0x70B9, 0,
- 16, 0x336A, 0x0031, 0x0038, 0x70B9, 0,
- 16, 0x336B, 0x0031, 0x0039, 0x70B9, 0,
- 16, 0x336C, 0x0032, 0x0030, 0x70B9, 0,
- 16, 0x336D, 0x0032, 0x0031, 0x70B9, 0,
- 16, 0x336E, 0x0032, 0x0032, 0x70B9, 0,
- 16, 0x336F, 0x0032, 0x0033, 0x70B9, 0,
- 16, 0x3370, 0x0032, 0x0034, 0x70B9, 0,
- 15, 0x3371, 0x0068, 0x0050, 0x0061, 0,
- 15, 0x3372, 0x0064, 0x0061, 0,
- 15, 0x3373, 0x0041, 0x0055, 0,
- 15, 0x3374, 0x0062, 0x0061, 0x0072, 0,
- 15, 0x3375, 0x006F, 0x0056, 0,
- 15, 0x3376, 0x0070, 0x0063, 0,
- 15, 0x337B, 0x5E73, 0x6210, 0,
- 15, 0x337C, 0x662D, 0x548C, 0,
- 15, 0x337D, 0x5927, 0x6B63, 0,
- 15, 0x337E, 0x660E, 0x6CBB, 0,
- 15, 0x337F, 0x682A, 0x5F0F, 0x4F1A, 0x793E, 0,
- 15, 0x3380, 0x0070, 0x0041, 0,
- 15, 0x3381, 0x006E, 0x0041, 0,
- 15, 0x3382, 0x03BC, 0x0041, 0,
- 15, 0x3383, 0x006D, 0x0041, 0,
- 15, 0x3384, 0x006B, 0x0041, 0,
- 15, 0x3385, 0x004B, 0x0042, 0,
- 15, 0x3386, 0x004D, 0x0042, 0,
- 15, 0x3387, 0x0047, 0x0042, 0,
- 15, 0x3388, 0x0063, 0x0061, 0x006C, 0,
- 15, 0x3389, 0x006B, 0x0063, 0x0061, 0x006C, 0,
- 15, 0x338A, 0x0070, 0x0046, 0,
- 15, 0x338B, 0x006E, 0x0046, 0,
- 15, 0x338C, 0x03BC, 0x0046, 0,
- 15, 0x338D, 0x03BC, 0x0067, 0,
- 15, 0x338E, 0x006D, 0x0067, 0,
- 15, 0x338F, 0x006B, 0x0067, 0,
- 15, 0x3390, 0x0048, 0x007A, 0,
- 15, 0x3391, 0x006B, 0x0048, 0x007A, 0,
- 15, 0x3392, 0x004D, 0x0048, 0x007A, 0,
- 15, 0x3393, 0x0047, 0x0048, 0x007A, 0,
- 15, 0x3394, 0x0054, 0x0048, 0x007A, 0,
- 15, 0x3395, 0x03BC, 0x2113, 0,
- 15, 0x3396, 0x006D, 0x2113, 0,
- 15, 0x3397, 0x0064, 0x2113, 0,
- 15, 0x3398, 0x006B, 0x2113, 0,
- 15, 0x3399, 0x0066, 0x006D, 0,
- 15, 0x339A, 0x006E, 0x006D, 0,
- 15, 0x339B, 0x03BC, 0x006D, 0,
- 15, 0x339C, 0x006D, 0x006D, 0,
- 15, 0x339D, 0x0063, 0x006D, 0,
- 15, 0x339E, 0x006B, 0x006D, 0,
- 15, 0x339F, 0x006D, 0x006D, 0x00B2, 0,
- 15, 0x33A0, 0x0063, 0x006D, 0x00B2, 0,
- 15, 0x33A1, 0x006D, 0x00B2, 0,
- 15, 0x33A2, 0x006B, 0x006D, 0x00B2, 0,
- 15, 0x33A3, 0x006D, 0x006D, 0x00B3, 0,
- 15, 0x33A4, 0x0063, 0x006D, 0x00B3, 0,
- 15, 0x33A5, 0x006D, 0x00B3, 0,
- 15, 0x33A6, 0x006B, 0x006D, 0x00B3, 0,
- 15, 0x33A7, 0x006D, 0x2215, 0x0073, 0,
- 15, 0x33A8, 0x006D, 0x2215, 0x0073, 0x00B2, 0,
- 15, 0x33A9, 0x0050, 0x0061, 0,
- 15, 0x33AA, 0x006B, 0x0050, 0x0061, 0,
- 15, 0x33AB, 0x004D, 0x0050, 0x0061, 0,
- 15, 0x33AC, 0x0047, 0x0050, 0x0061, 0,
- 15, 0x33AD, 0x0072, 0x0061, 0x0064, 0,
- 15, 0x33AE, 0x0072, 0x0061, 0x0064, 0x2215, 0x0073, 0,
- 15, 0x33AF, 0x0072, 0x0061, 0x0064, 0x2215, 0x0073, 0x00B2, 0,
- 15, 0x33B0, 0x0070, 0x0073, 0,
- 15, 0x33B1, 0x006E, 0x0073, 0,
- 15, 0x33B2, 0x03BC, 0x0073, 0,
- 15, 0x33B3, 0x006D, 0x0073, 0,
- 15, 0x33B4, 0x0070, 0x0056, 0,
- 15, 0x33B5, 0x006E, 0x0056, 0,
- 15, 0x33B6, 0x03BC, 0x0056, 0,
- 15, 0x33B7, 0x006D, 0x0056, 0,
- 15, 0x33B8, 0x006B, 0x0056, 0,
- 15, 0x33B9, 0x004D, 0x0056, 0,
- 15, 0x33BA, 0x0070, 0x0057, 0,
- 15, 0x33BB, 0x006E, 0x0057, 0,
- 15, 0x33BC, 0x03BC, 0x0057, 0,
- 15, 0x33BD, 0x006D, 0x0057, 0,
- 15, 0x33BE, 0x006B, 0x0057, 0,
- 15, 0x33BF, 0x004D, 0x0057, 0,
- 15, 0x33C0, 0x006B, 0x03A9, 0,
- 15, 0x33C1, 0x004D, 0x03A9, 0,
- 15, 0x33C2, 0x0061, 0x002E, 0x006D, 0x002E, 0,
- 15, 0x33C3, 0x0042, 0x0071, 0,
- 15, 0x33C4, 0x0063, 0x0063, 0,
- 15, 0x33C5, 0x0063, 0x0064, 0,
- 15, 0x33C6, 0x0043, 0x2215, 0x006B, 0x0067, 0,
- 15, 0x33C7, 0x0043, 0x006F, 0x002E, 0,
- 15, 0x33C8, 0x0064, 0x0042, 0,
- 15, 0x33C9, 0x0047, 0x0079, 0,
- 15, 0x33CA, 0x0068, 0x0061, 0,
- 15, 0x33CB, 0x0048, 0x0050, 0,
- 15, 0x33CC, 0x0069, 0x006E, 0,
- 15, 0x33CD, 0x004B, 0x004B, 0,
- 15, 0x33CE, 0x004B, 0x004D, 0,
- 15, 0x33CF, 0x006B, 0x0074, 0,
- 15, 0x33D0, 0x006C, 0x006D, 0,
- 15, 0x33D1, 0x006C, 0x006E, 0,
- 15, 0x33D2, 0x006C, 0x006F, 0x0067, 0,
- 15, 0x33D3, 0x006C, 0x0078, 0,
- 15, 0x33D4, 0x006D, 0x0062, 0,
- 15, 0x33D5, 0x006D, 0x0069, 0x006C, 0,
- 15, 0x33D6, 0x006D, 0x006F, 0x006C, 0,
- 15, 0x33D7, 0x0050, 0x0048, 0,
- 15, 0x33D8, 0x0070, 0x002E, 0x006D, 0x002E, 0,
- 15, 0x33D9, 0x0050, 0x0050, 0x004D, 0,
- 15, 0x33DA, 0x0050, 0x0052, 0,
- 15, 0x33DB, 0x0073, 0x0072, 0,
- 15, 0x33DC, 0x0053, 0x0076, 0,
- 15, 0x33DD, 0x0057, 0x0062, 0,
- 16, 0x33E0, 0x0031, 0x65E5, 0,
- 16, 0x33E1, 0x0032, 0x65E5, 0,
- 16, 0x33E2, 0x0033, 0x65E5, 0,
- 16, 0x33E3, 0x0034, 0x65E5, 0,
- 16, 0x33E4, 0x0035, 0x65E5, 0,
- 16, 0x33E5, 0x0036, 0x65E5, 0,
- 16, 0x33E6, 0x0037, 0x65E5, 0,
- 16, 0x33E7, 0x0038, 0x65E5, 0,
- 16, 0x33E8, 0x0039, 0x65E5, 0,
- 16, 0x33E9, 0x0031, 0x0030, 0x65E5, 0,
- 16, 0x33EA, 0x0031, 0x0031, 0x65E5, 0,
- 16, 0x33EB, 0x0031, 0x0032, 0x65E5, 0,
- 16, 0x33EC, 0x0031, 0x0033, 0x65E5, 0,
- 16, 0x33ED, 0x0031, 0x0034, 0x65E5, 0,
- 16, 0x33EE, 0x0031, 0x0035, 0x65E5, 0,
- 16, 0x33EF, 0x0031, 0x0036, 0x65E5, 0,
- 16, 0x33F0, 0x0031, 0x0037, 0x65E5, 0,
- 16, 0x33F1, 0x0031, 0x0038, 0x65E5, 0,
- 16, 0x33F2, 0x0031, 0x0039, 0x65E5, 0,
- 16, 0x33F3, 0x0032, 0x0030, 0x65E5, 0,
- 16, 0x33F4, 0x0032, 0x0031, 0x65E5, 0,
- 16, 0x33F5, 0x0032, 0x0032, 0x65E5, 0,
- 16, 0x33F6, 0x0032, 0x0033, 0x65E5, 0,
- 16, 0x33F7, 0x0032, 0x0034, 0x65E5, 0,
- 16, 0x33F8, 0x0032, 0x0035, 0x65E5, 0,
- 16, 0x33F9, 0x0032, 0x0036, 0x65E5, 0,
- 16, 0x33FA, 0x0032, 0x0037, 0x65E5, 0,
- 16, 0x33FB, 0x0032, 0x0038, 0x65E5, 0,
- 16, 0x33FC, 0x0032, 0x0039, 0x65E5, 0,
- 16, 0x33FD, 0x0033, 0x0030, 0x65E5, 0,
- 16, 0x33FE, 0x0033, 0x0031, 0x65E5, 0,
- 1, 0xF900, 0x8C48, 0,
- 1, 0xF901, 0x66F4, 0,
- 1, 0xF902, 0x8ECA, 0,
- 1, 0xF903, 0x8CC8, 0,
- 1, 0xF904, 0x6ED1, 0,
- 1, 0xF905, 0x4E32, 0,
- 1, 0xF906, 0x53E5, 0,
- 1, 0xF907, 0x9F9C, 0,
- 1, 0xF908, 0x9F9C, 0,
- 1, 0xF909, 0x5951, 0,
- 1, 0xF90A, 0x91D1, 0,
- 1, 0xF90B, 0x5587, 0,
- 1, 0xF90C, 0x5948, 0,
- 1, 0xF90D, 0x61F6, 0,
- 1, 0xF90E, 0x7669, 0,
- 1, 0xF90F, 0x7F85, 0,
- 1, 0xF910, 0x863F, 0,
- 1, 0xF911, 0x87BA, 0,
- 1, 0xF912, 0x88F8, 0,
- 1, 0xF913, 0x908F, 0,
- 1, 0xF914, 0x6A02, 0,
- 1, 0xF915, 0x6D1B, 0,
- 1, 0xF916, 0x70D9, 0,
- 1, 0xF917, 0x73DE, 0,
- 1, 0xF918, 0x843D, 0,
- 1, 0xF919, 0x916A, 0,
- 1, 0xF91A, 0x99F1, 0,
- 1, 0xF91B, 0x4E82, 0,
- 1, 0xF91C, 0x5375, 0,
- 1, 0xF91D, 0x6B04, 0,
- 1, 0xF91E, 0x721B, 0,
- 1, 0xF91F, 0x862D, 0,
- 1, 0xF920, 0x9E1E, 0,
- 1, 0xF921, 0x5D50, 0,
- 1, 0xF922, 0x6FEB, 0,
- 1, 0xF923, 0x85CD, 0,
- 1, 0xF924, 0x8964, 0,
- 1, 0xF925, 0x62C9, 0,
- 1, 0xF926, 0x81D8, 0,
- 1, 0xF927, 0x881F, 0,
- 1, 0xF928, 0x5ECA, 0,
- 1, 0xF929, 0x6717, 0,
- 1, 0xF92A, 0x6D6A, 0,
- 1, 0xF92B, 0x72FC, 0,
- 1, 0xF92C, 0x90CE, 0,
- 1, 0xF92D, 0x4F86, 0,
- 1, 0xF92E, 0x51B7, 0,
- 1, 0xF92F, 0x52DE, 0,
- 1, 0xF930, 0x64C4, 0,
- 1, 0xF931, 0x6AD3, 0,
- 1, 0xF932, 0x7210, 0,
- 1, 0xF933, 0x76E7, 0,
- 1, 0xF934, 0x8001, 0,
- 1, 0xF935, 0x8606, 0,
- 1, 0xF936, 0x865C, 0,
- 1, 0xF937, 0x8DEF, 0,
- 1, 0xF938, 0x9732, 0,
- 1, 0xF939, 0x9B6F, 0,
- 1, 0xF93A, 0x9DFA, 0,
- 1, 0xF93B, 0x788C, 0,
- 1, 0xF93C, 0x797F, 0,
- 1, 0xF93D, 0x7DA0, 0,
- 1, 0xF93E, 0x83C9, 0,
- 1, 0xF93F, 0x9304, 0,
- 1, 0xF940, 0x9E7F, 0,
- 1, 0xF941, 0x8AD6, 0,
- 1, 0xF942, 0x58DF, 0,
- 1, 0xF943, 0x5F04, 0,
- 1, 0xF944, 0x7C60, 0,
- 1, 0xF945, 0x807E, 0,
- 1, 0xF946, 0x7262, 0,
- 1, 0xF947, 0x78CA, 0,
- 1, 0xF948, 0x8CC2, 0,
- 1, 0xF949, 0x96F7, 0,
- 1, 0xF94A, 0x58D8, 0,
- 1, 0xF94B, 0x5C62, 0,
- 1, 0xF94C, 0x6A13, 0,
- 1, 0xF94D, 0x6DDA, 0,
- 1, 0xF94E, 0x6F0F, 0,
- 1, 0xF94F, 0x7D2F, 0,
- 1, 0xF950, 0x7E37, 0,
- 1, 0xF951, 0x96FB, 0,
- 1, 0xF952, 0x52D2, 0,
- 1, 0xF953, 0x808B, 0,
- 1, 0xF954, 0x51DC, 0,
- 1, 0xF955, 0x51CC, 0,
- 1, 0xF956, 0x7A1C, 0,
- 1, 0xF957, 0x7DBE, 0,
- 1, 0xF958, 0x83F1, 0,
- 1, 0xF959, 0x9675, 0,
- 1, 0xF95A, 0x8B80, 0,
- 1, 0xF95B, 0x62CF, 0,
- 1, 0xF95C, 0x6A02, 0,
- 1, 0xF95D, 0x8AFE, 0,
- 1, 0xF95E, 0x4E39, 0,
- 1, 0xF95F, 0x5BE7, 0,
- 1, 0xF960, 0x6012, 0,
- 1, 0xF961, 0x7387, 0,
- 1, 0xF962, 0x7570, 0,
- 1, 0xF963, 0x5317, 0,
- 1, 0xF964, 0x78FB, 0,
- 1, 0xF965, 0x4FBF, 0,
- 1, 0xF966, 0x5FA9, 0,
- 1, 0xF967, 0x4E0D, 0,
- 1, 0xF968, 0x6CCC, 0,
- 1, 0xF969, 0x6578, 0,
- 1, 0xF96A, 0x7D22, 0,
- 1, 0xF96B, 0x53C3, 0,
- 1, 0xF96C, 0x585E, 0,
- 1, 0xF96D, 0x7701, 0,
- 1, 0xF96E, 0x8449, 0,
- 1, 0xF96F, 0x8AAA, 0,
- 1, 0xF970, 0x6BBA, 0,
- 1, 0xF971, 0x8FB0, 0,
- 1, 0xF972, 0x6C88, 0,
- 1, 0xF973, 0x62FE, 0,
- 1, 0xF974, 0x82E5, 0,
- 1, 0xF975, 0x63A0, 0,
- 1, 0xF976, 0x7565, 0,
- 1, 0xF977, 0x4EAE, 0,
- 1, 0xF978, 0x5169, 0,
- 1, 0xF979, 0x51C9, 0,
- 1, 0xF97A, 0x6881, 0,
- 1, 0xF97B, 0x7CE7, 0,
- 1, 0xF97C, 0x826F, 0,
- 1, 0xF97D, 0x8AD2, 0,
- 1, 0xF97E, 0x91CF, 0,
- 1, 0xF97F, 0x52F5, 0,
- 1, 0xF980, 0x5442, 0,
- 1, 0xF981, 0x5973, 0,
- 1, 0xF982, 0x5EEC, 0,
- 1, 0xF983, 0x65C5, 0,
- 1, 0xF984, 0x6FFE, 0,
- 1, 0xF985, 0x792A, 0,
- 1, 0xF986, 0x95AD, 0,
- 1, 0xF987, 0x9A6A, 0,
- 1, 0xF988, 0x9E97, 0,
- 1, 0xF989, 0x9ECE, 0,
- 1, 0xF98A, 0x529B, 0,
- 1, 0xF98B, 0x66C6, 0,
- 1, 0xF98C, 0x6B77, 0,
- 1, 0xF98D, 0x8F62, 0,
- 1, 0xF98E, 0x5E74, 0,
- 1, 0xF98F, 0x6190, 0,
- 1, 0xF990, 0x6200, 0,
- 1, 0xF991, 0x649A, 0,
- 1, 0xF992, 0x6F23, 0,
- 1, 0xF993, 0x7149, 0,
- 1, 0xF994, 0x7489, 0,
- 1, 0xF995, 0x79CA, 0,
- 1, 0xF996, 0x7DF4, 0,
- 1, 0xF997, 0x806F, 0,
- 1, 0xF998, 0x8F26, 0,
- 1, 0xF999, 0x84EE, 0,
- 1, 0xF99A, 0x9023, 0,
- 1, 0xF99B, 0x934A, 0,
- 1, 0xF99C, 0x5217, 0,
- 1, 0xF99D, 0x52A3, 0,
- 1, 0xF99E, 0x54BD, 0,
- 1, 0xF99F, 0x70C8, 0,
- 1, 0xF9A0, 0x88C2, 0,
- 1, 0xF9A1, 0x8AAA, 0,
- 1, 0xF9A2, 0x5EC9, 0,
- 1, 0xF9A3, 0x5FF5, 0,
- 1, 0xF9A4, 0x637B, 0,
- 1, 0xF9A5, 0x6BAE, 0,
- 1, 0xF9A6, 0x7C3E, 0,
- 1, 0xF9A7, 0x7375, 0,
- 1, 0xF9A8, 0x4EE4, 0,
- 1, 0xF9A9, 0x56F9, 0,
- 1, 0xF9AA, 0x5BE7, 0,
- 1, 0xF9AB, 0x5DBA, 0,
- 1, 0xF9AC, 0x601C, 0,
- 1, 0xF9AD, 0x73B2, 0,
- 1, 0xF9AE, 0x7469, 0,
- 1, 0xF9AF, 0x7F9A, 0,
- 1, 0xF9B0, 0x8046, 0,
- 1, 0xF9B1, 0x9234, 0,
- 1, 0xF9B2, 0x96F6, 0,
- 1, 0xF9B3, 0x9748, 0,
- 1, 0xF9B4, 0x9818, 0,
- 1, 0xF9B5, 0x4F8B, 0,
- 1, 0xF9B6, 0x79AE, 0,
- 1, 0xF9B7, 0x91B4, 0,
- 1, 0xF9B8, 0x96B8, 0,
- 1, 0xF9B9, 0x60E1, 0,
- 1, 0xF9BA, 0x4E86, 0,
- 1, 0xF9BB, 0x50DA, 0,
- 1, 0xF9BC, 0x5BEE, 0,
- 1, 0xF9BD, 0x5C3F, 0,
- 1, 0xF9BE, 0x6599, 0,
- 1, 0xF9BF, 0x6A02, 0,
- 1, 0xF9C0, 0x71CE, 0,
- 1, 0xF9C1, 0x7642, 0,
- 1, 0xF9C2, 0x84FC, 0,
- 1, 0xF9C3, 0x907C, 0,
- 1, 0xF9C4, 0x9F8D, 0,
- 1, 0xF9C5, 0x6688, 0,
- 1, 0xF9C6, 0x962E, 0,
- 1, 0xF9C7, 0x5289, 0,
- 1, 0xF9C8, 0x677B, 0,
- 1, 0xF9C9, 0x67F3, 0,
- 1, 0xF9CA, 0x6D41, 0,
- 1, 0xF9CB, 0x6E9C, 0,
- 1, 0xF9CC, 0x7409, 0,
- 1, 0xF9CD, 0x7559, 0,
- 1, 0xF9CE, 0x786B, 0,
- 1, 0xF9CF, 0x7D10, 0,
- 1, 0xF9D0, 0x985E, 0,
- 1, 0xF9D1, 0x516D, 0,
- 1, 0xF9D2, 0x622E, 0,
- 1, 0xF9D3, 0x9678, 0,
- 1, 0xF9D4, 0x502B, 0,
- 1, 0xF9D5, 0x5D19, 0,
- 1, 0xF9D6, 0x6DEA, 0,
- 1, 0xF9D7, 0x8F2A, 0,
- 1, 0xF9D8, 0x5F8B, 0,
- 1, 0xF9D9, 0x6144, 0,
- 1, 0xF9DA, 0x6817, 0,
- 1, 0xF9DB, 0x7387, 0,
- 1, 0xF9DC, 0x9686, 0,
- 1, 0xF9DD, 0x5229, 0,
- 1, 0xF9DE, 0x540F, 0,
- 1, 0xF9DF, 0x5C65, 0,
- 1, 0xF9E0, 0x6613, 0,
- 1, 0xF9E1, 0x674E, 0,
- 1, 0xF9E2, 0x68A8, 0,
- 1, 0xF9E3, 0x6CE5, 0,
- 1, 0xF9E4, 0x7406, 0,
- 1, 0xF9E5, 0x75E2, 0,
- 1, 0xF9E6, 0x7F79, 0,
- 1, 0xF9E7, 0x88CF, 0,
- 1, 0xF9E8, 0x88E1, 0,
- 1, 0xF9E9, 0x91CC, 0,
- 1, 0xF9EA, 0x96E2, 0,
- 1, 0xF9EB, 0x533F, 0,
- 1, 0xF9EC, 0x6EBA, 0,
- 1, 0xF9ED, 0x541D, 0,
- 1, 0xF9EE, 0x71D0, 0,
- 1, 0xF9EF, 0x7498, 0,
- 1, 0xF9F0, 0x85FA, 0,
- 1, 0xF9F1, 0x96A3, 0,
- 1, 0xF9F2, 0x9C57, 0,
- 1, 0xF9F3, 0x9E9F, 0,
- 1, 0xF9F4, 0x6797, 0,
- 1, 0xF9F5, 0x6DCB, 0,
- 1, 0xF9F6, 0x81E8, 0,
- 1, 0xF9F7, 0x7ACB, 0,
- 1, 0xF9F8, 0x7B20, 0,
- 1, 0xF9F9, 0x7C92, 0,
- 1, 0xF9FA, 0x72C0, 0,
- 1, 0xF9FB, 0x7099, 0,
- 1, 0xF9FC, 0x8B58, 0,
- 1, 0xF9FD, 0x4EC0, 0,
- 1, 0xF9FE, 0x8336, 0,
- 1, 0xF9FF, 0x523A, 0,
- 1, 0xFA00, 0x5207, 0,
- 1, 0xFA01, 0x5EA6, 0,
- 1, 0xFA02, 0x62D3, 0,
- 1, 0xFA03, 0x7CD6, 0,
- 1, 0xFA04, 0x5B85, 0,
- 1, 0xFA05, 0x6D1E, 0,
- 1, 0xFA06, 0x66B4, 0,
- 1, 0xFA07, 0x8F3B, 0,
- 1, 0xFA08, 0x884C, 0,
- 1, 0xFA09, 0x964D, 0,
- 1, 0xFA0A, 0x898B, 0,
- 1, 0xFA0B, 0x5ED3, 0,
- 1, 0xFA0C, 0x5140, 0,
- 1, 0xFA0D, 0x55C0, 0,
- 1, 0xFA10, 0x585A, 0,
- 1, 0xFA12, 0x6674, 0,
- 1, 0xFA15, 0x51DE, 0,
- 1, 0xFA16, 0x732A, 0,
- 1, 0xFA17, 0x76CA, 0,
- 1, 0xFA18, 0x793C, 0,
- 1, 0xFA19, 0x795E, 0,
- 1, 0xFA1A, 0x7965, 0,
- 1, 0xFA1B, 0x798F, 0,
- 1, 0xFA1C, 0x9756, 0,
- 1, 0xFA1D, 0x7CBE, 0,
- 1, 0xFA1E, 0x7FBD, 0,
- 1, 0xFA20, 0x8612, 0,
- 1, 0xFA22, 0x8AF8, 0,
- 1, 0xFA25, 0x9038, 0,
- 1, 0xFA26, 0x90FD, 0,
- 1, 0xFA2A, 0x98EF, 0,
- 1, 0xFA2B, 0x98FC, 0,
- 1, 0xFA2C, 0x9928, 0,
- 1, 0xFA2D, 0x9DB4, 0,
- 16, 0xFB00, 0x0066, 0x0066, 0,
- 16, 0xFB01, 0x0066, 0x0069, 0,
- 16, 0xFB02, 0x0066, 0x006C, 0,
- 16, 0xFB03, 0x0066, 0x0066, 0x0069, 0,
- 16, 0xFB04, 0x0066, 0x0066, 0x006C, 0,
- 16, 0xFB05, 0x017F, 0x0074, 0,
- 16, 0xFB06, 0x0073, 0x0074, 0,
- 16, 0xFB13, 0x0574, 0x0576, 0,
- 16, 0xFB14, 0x0574, 0x0565, 0,
- 16, 0xFB15, 0x0574, 0x056B, 0,
- 16, 0xFB16, 0x057E, 0x0576, 0,
- 16, 0xFB17, 0x0574, 0x056D, 0,
- 1, 0xFB1D, 0x05D9, 0x05B4, 0,
- 1, 0xFB1F, 0x05F2, 0x05B7, 0,
- 2, 0xFB20, 0x05E2, 0,
- 2, 0xFB21, 0x05D0, 0,
- 2, 0xFB22, 0x05D3, 0,
- 2, 0xFB23, 0x05D4, 0,
- 2, 0xFB24, 0x05DB, 0,
- 2, 0xFB25, 0x05DC, 0,
- 2, 0xFB26, 0x05DD, 0,
- 2, 0xFB27, 0x05E8, 0,
- 2, 0xFB28, 0x05EA, 0,
- 2, 0xFB29, 0x002B, 0,
- 1, 0xFB2A, 0x05E9, 0x05C1, 0,
- 1, 0xFB2B, 0x05E9, 0x05C2, 0,
- 1, 0xFB2C, 0xFB49, 0x05C1, 0,
- 1, 0xFB2D, 0xFB49, 0x05C2, 0,
- 1, 0xFB2E, 0x05D0, 0x05B7, 0,
- 1, 0xFB2F, 0x05D0, 0x05B8, 0,
- 1, 0xFB30, 0x05D0, 0x05BC, 0,
- 1, 0xFB31, 0x05D1, 0x05BC, 0,
- 1, 0xFB32, 0x05D2, 0x05BC, 0,
- 1, 0xFB33, 0x05D3, 0x05BC, 0,
- 1, 0xFB34, 0x05D4, 0x05BC, 0,
- 1, 0xFB35, 0x05D5, 0x05BC, 0,
- 1, 0xFB36, 0x05D6, 0x05BC, 0,
- 1, 0xFB38, 0x05D8, 0x05BC, 0,
- 1, 0xFB39, 0x05D9, 0x05BC, 0,
- 1, 0xFB3A, 0x05DA, 0x05BC, 0,
- 1, 0xFB3B, 0x05DB, 0x05BC, 0,
- 1, 0xFB3C, 0x05DC, 0x05BC, 0,
- 1, 0xFB3E, 0x05DE, 0x05BC, 0,
- 1, 0xFB40, 0x05E0, 0x05BC, 0,
- 1, 0xFB41, 0x05E1, 0x05BC, 0,
- 1, 0xFB43, 0x05E3, 0x05BC, 0,
- 1, 0xFB44, 0x05E4, 0x05BC, 0,
- 1, 0xFB46, 0x05E6, 0x05BC, 0,
- 1, 0xFB47, 0x05E7, 0x05BC, 0,
- 1, 0xFB48, 0x05E8, 0x05BC, 0,
- 1, 0xFB49, 0x05E9, 0x05BC, 0,
- 1, 0xFB4A, 0x05EA, 0x05BC, 0,
- 1, 0xFB4B, 0x05D5, 0x05B9, 0,
- 1, 0xFB4C, 0x05D1, 0x05BF, 0,
- 1, 0xFB4D, 0x05DB, 0x05BF, 0,
- 1, 0xFB4E, 0x05E4, 0x05BF, 0,
- 16, 0xFB4F, 0x05D0, 0x05DC, 0,
- 7, 0xFB50, 0x0671, 0,
- 6, 0xFB51, 0x0671, 0,
- 7, 0xFB52, 0x067B, 0,
- 6, 0xFB53, 0x067B, 0,
- 4, 0xFB54, 0x067B, 0,
- 5, 0xFB55, 0x067B, 0,
- 7, 0xFB56, 0x067E, 0,
- 6, 0xFB57, 0x067E, 0,
- 4, 0xFB58, 0x067E, 0,
- 5, 0xFB59, 0x067E, 0,
- 7, 0xFB5A, 0x0680, 0,
- 6, 0xFB5B, 0x0680, 0,
- 4, 0xFB5C, 0x0680, 0,
- 5, 0xFB5D, 0x0680, 0,
- 7, 0xFB5E, 0x067A, 0,
- 6, 0xFB5F, 0x067A, 0,
- 4, 0xFB60, 0x067A, 0,
- 5, 0xFB61, 0x067A, 0,
- 7, 0xFB62, 0x067F, 0,
- 6, 0xFB63, 0x067F, 0,
- 4, 0xFB64, 0x067F, 0,
- 5, 0xFB65, 0x067F, 0,
- 7, 0xFB66, 0x0679, 0,
- 6, 0xFB67, 0x0679, 0,
- 4, 0xFB68, 0x0679, 0,
- 5, 0xFB69, 0x0679, 0,
- 7, 0xFB6A, 0x06A4, 0,
- 6, 0xFB6B, 0x06A4, 0,
- 4, 0xFB6C, 0x06A4, 0,
- 5, 0xFB6D, 0x06A4, 0,
- 7, 0xFB6E, 0x06A6, 0,
- 6, 0xFB6F, 0x06A6, 0,
- 4, 0xFB70, 0x06A6, 0,
- 5, 0xFB71, 0x06A6, 0,
- 7, 0xFB72, 0x0684, 0,
- 6, 0xFB73, 0x0684, 0,
- 4, 0xFB74, 0x0684, 0,
- 5, 0xFB75, 0x0684, 0,
- 7, 0xFB76, 0x0683, 0,
- 6, 0xFB77, 0x0683, 0,
- 4, 0xFB78, 0x0683, 0,
- 5, 0xFB79, 0x0683, 0,
- 7, 0xFB7A, 0x0686, 0,
- 6, 0xFB7B, 0x0686, 0,
- 4, 0xFB7C, 0x0686, 0,
- 5, 0xFB7D, 0x0686, 0,
- 7, 0xFB7E, 0x0687, 0,
- 6, 0xFB7F, 0x0687, 0,
- 4, 0xFB80, 0x0687, 0,
- 5, 0xFB81, 0x0687, 0,
- 7, 0xFB82, 0x068D, 0,
- 6, 0xFB83, 0x068D, 0,
- 7, 0xFB84, 0x068C, 0,
- 6, 0xFB85, 0x068C, 0,
- 7, 0xFB86, 0x068E, 0,
- 6, 0xFB87, 0x068E, 0,
- 7, 0xFB88, 0x0688, 0,
- 6, 0xFB89, 0x0688, 0,
- 7, 0xFB8A, 0x0698, 0,
- 6, 0xFB8B, 0x0698, 0,
- 7, 0xFB8C, 0x0691, 0,
- 6, 0xFB8D, 0x0691, 0,
- 7, 0xFB8E, 0x06A9, 0,
- 6, 0xFB8F, 0x06A9, 0,
- 4, 0xFB90, 0x06A9, 0,
- 5, 0xFB91, 0x06A9, 0,
- 7, 0xFB92, 0x06AF, 0,
- 6, 0xFB93, 0x06AF, 0,
- 4, 0xFB94, 0x06AF, 0,
- 5, 0xFB95, 0x06AF, 0,
- 7, 0xFB96, 0x06B3, 0,
- 6, 0xFB97, 0x06B3, 0,
- 4, 0xFB98, 0x06B3, 0,
- 5, 0xFB99, 0x06B3, 0,
- 7, 0xFB9A, 0x06B1, 0,
- 6, 0xFB9B, 0x06B1, 0,
- 4, 0xFB9C, 0x06B1, 0,
- 5, 0xFB9D, 0x06B1, 0,
- 7, 0xFB9E, 0x06BA, 0,
- 6, 0xFB9F, 0x06BA, 0,
- 7, 0xFBA0, 0x06BB, 0,
- 6, 0xFBA1, 0x06BB, 0,
- 4, 0xFBA2, 0x06BB, 0,
- 5, 0xFBA3, 0x06BB, 0,
- 7, 0xFBA4, 0x06C0, 0,
- 6, 0xFBA5, 0x06C0, 0,
- 7, 0xFBA6, 0x06C1, 0,
- 6, 0xFBA7, 0x06C1, 0,
- 4, 0xFBA8, 0x06C1, 0,
- 5, 0xFBA9, 0x06C1, 0,
- 7, 0xFBAA, 0x06BE, 0,
- 6, 0xFBAB, 0x06BE, 0,
- 4, 0xFBAC, 0x06BE, 0,
- 5, 0xFBAD, 0x06BE, 0,
- 7, 0xFBAE, 0x06D2, 0,
- 6, 0xFBAF, 0x06D2, 0,
- 7, 0xFBB0, 0x06D3, 0,
- 6, 0xFBB1, 0x06D3, 0,
- 7, 0xFBD3, 0x06AD, 0,
- 6, 0xFBD4, 0x06AD, 0,
- 4, 0xFBD5, 0x06AD, 0,
- 5, 0xFBD6, 0x06AD, 0,
- 7, 0xFBD7, 0x06C7, 0,
- 6, 0xFBD8, 0x06C7, 0,
- 7, 0xFBD9, 0x06C6, 0,
- 6, 0xFBDA, 0x06C6, 0,
- 7, 0xFBDB, 0x06C8, 0,
- 6, 0xFBDC, 0x06C8, 0,
- 7, 0xFBDD, 0x0677, 0,
- 7, 0xFBDE, 0x06CB, 0,
- 6, 0xFBDF, 0x06CB, 0,
- 7, 0xFBE0, 0x06C5, 0,
- 6, 0xFBE1, 0x06C5, 0,
- 7, 0xFBE2, 0x06C9, 0,
- 6, 0xFBE3, 0x06C9, 0,
- 7, 0xFBE4, 0x06D0, 0,
- 6, 0xFBE5, 0x06D0, 0,
- 4, 0xFBE6, 0x06D0, 0,
- 5, 0xFBE7, 0x06D0, 0,
- 4, 0xFBE8, 0x0649, 0,
- 5, 0xFBE9, 0x0649, 0,
- 7, 0xFBEA, 0x0626, 0x0627, 0,
- 6, 0xFBEB, 0x0626, 0x0627, 0,
- 7, 0xFBEC, 0x0626, 0x06D5, 0,
- 6, 0xFBED, 0x0626, 0x06D5, 0,
- 7, 0xFBEE, 0x0626, 0x0648, 0,
- 6, 0xFBEF, 0x0626, 0x0648, 0,
- 7, 0xFBF0, 0x0626, 0x06C7, 0,
- 6, 0xFBF1, 0x0626, 0x06C7, 0,
- 7, 0xFBF2, 0x0626, 0x06C6, 0,
- 6, 0xFBF3, 0x0626, 0x06C6, 0,
- 7, 0xFBF4, 0x0626, 0x06C8, 0,
- 6, 0xFBF5, 0x0626, 0x06C8, 0,
- 7, 0xFBF6, 0x0626, 0x06D0, 0,
- 6, 0xFBF7, 0x0626, 0x06D0, 0,
- 4, 0xFBF8, 0x0626, 0x06D0, 0,
- 7, 0xFBF9, 0x0626, 0x0649, 0,
- 6, 0xFBFA, 0x0626, 0x0649, 0,
- 4, 0xFBFB, 0x0626, 0x0649, 0,
- 7, 0xFBFC, 0x06CC, 0,
- 6, 0xFBFD, 0x06CC, 0,
- 4, 0xFBFE, 0x06CC, 0,
- 5, 0xFBFF, 0x06CC, 0,
- 7, 0xFC00, 0x0626, 0x062C, 0,
- 7, 0xFC01, 0x0626, 0x062D, 0,
- 7, 0xFC02, 0x0626, 0x0645, 0,
- 7, 0xFC03, 0x0626, 0x0649, 0,
- 7, 0xFC04, 0x0626, 0x064A, 0,
- 7, 0xFC05, 0x0628, 0x062C, 0,
- 7, 0xFC06, 0x0628, 0x062D, 0,
- 7, 0xFC07, 0x0628, 0x062E, 0,
- 7, 0xFC08, 0x0628, 0x0645, 0,
- 7, 0xFC09, 0x0628, 0x0649, 0,
- 7, 0xFC0A, 0x0628, 0x064A, 0,
- 7, 0xFC0B, 0x062A, 0x062C, 0,
- 7, 0xFC0C, 0x062A, 0x062D, 0,
- 7, 0xFC0D, 0x062A, 0x062E, 0,
- 7, 0xFC0E, 0x062A, 0x0645, 0,
- 7, 0xFC0F, 0x062A, 0x0649, 0,
- 7, 0xFC10, 0x062A, 0x064A, 0,
- 7, 0xFC11, 0x062B, 0x062C, 0,
- 7, 0xFC12, 0x062B, 0x0645, 0,
- 7, 0xFC13, 0x062B, 0x0649, 0,
- 7, 0xFC14, 0x062B, 0x064A, 0,
- 7, 0xFC15, 0x062C, 0x062D, 0,
- 7, 0xFC16, 0x062C, 0x0645, 0,
- 7, 0xFC17, 0x062D, 0x062C, 0,
- 7, 0xFC18, 0x062D, 0x0645, 0,
- 7, 0xFC19, 0x062E, 0x062C, 0,
- 7, 0xFC1A, 0x062E, 0x062D, 0,
- 7, 0xFC1B, 0x062E, 0x0645, 0,
- 7, 0xFC1C, 0x0633, 0x062C, 0,
- 7, 0xFC1D, 0x0633, 0x062D, 0,
- 7, 0xFC1E, 0x0633, 0x062E, 0,
- 7, 0xFC1F, 0x0633, 0x0645, 0,
- 7, 0xFC20, 0x0635, 0x062D, 0,
- 7, 0xFC21, 0x0635, 0x0645, 0,
- 7, 0xFC22, 0x0636, 0x062C, 0,
- 7, 0xFC23, 0x0636, 0x062D, 0,
- 7, 0xFC24, 0x0636, 0x062E, 0,
- 7, 0xFC25, 0x0636, 0x0645, 0,
- 7, 0xFC26, 0x0637, 0x062D, 0,
- 7, 0xFC27, 0x0637, 0x0645, 0,
- 7, 0xFC28, 0x0638, 0x0645, 0,
- 7, 0xFC29, 0x0639, 0x062C, 0,
- 7, 0xFC2A, 0x0639, 0x0645, 0,
- 7, 0xFC2B, 0x063A, 0x062C, 0,
- 7, 0xFC2C, 0x063A, 0x0645, 0,
- 7, 0xFC2D, 0x0641, 0x062C, 0,
- 7, 0xFC2E, 0x0641, 0x062D, 0,
- 7, 0xFC2F, 0x0641, 0x062E, 0,
- 7, 0xFC30, 0x0641, 0x0645, 0,
- 7, 0xFC31, 0x0641, 0x0649, 0,
- 7, 0xFC32, 0x0641, 0x064A, 0,
- 7, 0xFC33, 0x0642, 0x062D, 0,
- 7, 0xFC34, 0x0642, 0x0645, 0,
- 7, 0xFC35, 0x0642, 0x0649, 0,
- 7, 0xFC36, 0x0642, 0x064A, 0,
- 7, 0xFC37, 0x0643, 0x0627, 0,
- 7, 0xFC38, 0x0643, 0x062C, 0,
- 7, 0xFC39, 0x0643, 0x062D, 0,
- 7, 0xFC3A, 0x0643, 0x062E, 0,
- 7, 0xFC3B, 0x0643, 0x0644, 0,
- 7, 0xFC3C, 0x0643, 0x0645, 0,
- 7, 0xFC3D, 0x0643, 0x0649, 0,
- 7, 0xFC3E, 0x0643, 0x064A, 0,
- 7, 0xFC3F, 0x0644, 0x062C, 0,
- 7, 0xFC40, 0x0644, 0x062D, 0,
- 7, 0xFC41, 0x0644, 0x062E, 0,
- 7, 0xFC42, 0x0644, 0x0645, 0,
- 7, 0xFC43, 0x0644, 0x0649, 0,
- 7, 0xFC44, 0x0644, 0x064A, 0,
- 7, 0xFC45, 0x0645, 0x062C, 0,
- 7, 0xFC46, 0x0645, 0x062D, 0,
- 7, 0xFC47, 0x0645, 0x062E, 0,
- 7, 0xFC48, 0x0645, 0x0645, 0,
- 7, 0xFC49, 0x0645, 0x0649, 0,
- 7, 0xFC4A, 0x0645, 0x064A, 0,
- 7, 0xFC4B, 0x0646, 0x062C, 0,
- 7, 0xFC4C, 0x0646, 0x062D, 0,
- 7, 0xFC4D, 0x0646, 0x062E, 0,
- 7, 0xFC4E, 0x0646, 0x0645, 0,
- 7, 0xFC4F, 0x0646, 0x0649, 0,
- 7, 0xFC50, 0x0646, 0x064A, 0,
- 7, 0xFC51, 0x0647, 0x062C, 0,
- 7, 0xFC52, 0x0647, 0x0645, 0,
- 7, 0xFC53, 0x0647, 0x0649, 0,
- 7, 0xFC54, 0x0647, 0x064A, 0,
- 7, 0xFC55, 0x064A, 0x062C, 0,
- 7, 0xFC56, 0x064A, 0x062D, 0,
- 7, 0xFC57, 0x064A, 0x062E, 0,
- 7, 0xFC58, 0x064A, 0x0645, 0,
- 7, 0xFC59, 0x064A, 0x0649, 0,
- 7, 0xFC5A, 0x064A, 0x064A, 0,
- 7, 0xFC5B, 0x0630, 0x0670, 0,
- 7, 0xFC5C, 0x0631, 0x0670, 0,
- 7, 0xFC5D, 0x0649, 0x0670, 0,
- 7, 0xFC5E, 0x0020, 0x064C, 0x0651, 0,
- 7, 0xFC5F, 0x0020, 0x064D, 0x0651, 0,
- 7, 0xFC60, 0x0020, 0x064E, 0x0651, 0,
- 7, 0xFC61, 0x0020, 0x064F, 0x0651, 0,
- 7, 0xFC62, 0x0020, 0x0650, 0x0651, 0,
- 7, 0xFC63, 0x0020, 0x0651, 0x0670, 0,
- 6, 0xFC64, 0x0626, 0x0631, 0,
- 6, 0xFC65, 0x0626, 0x0632, 0,
- 6, 0xFC66, 0x0626, 0x0645, 0,
- 6, 0xFC67, 0x0626, 0x0646, 0,
- 6, 0xFC68, 0x0626, 0x0649, 0,
- 6, 0xFC69, 0x0626, 0x064A, 0,
- 6, 0xFC6A, 0x0628, 0x0631, 0,
- 6, 0xFC6B, 0x0628, 0x0632, 0,
- 6, 0xFC6C, 0x0628, 0x0645, 0,
- 6, 0xFC6D, 0x0628, 0x0646, 0,
- 6, 0xFC6E, 0x0628, 0x0649, 0,
- 6, 0xFC6F, 0x0628, 0x064A, 0,
- 6, 0xFC70, 0x062A, 0x0631, 0,
- 6, 0xFC71, 0x062A, 0x0632, 0,
- 6, 0xFC72, 0x062A, 0x0645, 0,
- 6, 0xFC73, 0x062A, 0x0646, 0,
- 6, 0xFC74, 0x062A, 0x0649, 0,
- 6, 0xFC75, 0x062A, 0x064A, 0,
- 6, 0xFC76, 0x062B, 0x0631, 0,
- 6, 0xFC77, 0x062B, 0x0632, 0,
- 6, 0xFC78, 0x062B, 0x0645, 0,
- 6, 0xFC79, 0x062B, 0x0646, 0,
- 6, 0xFC7A, 0x062B, 0x0649, 0,
- 6, 0xFC7B, 0x062B, 0x064A, 0,
- 6, 0xFC7C, 0x0641, 0x0649, 0,
- 6, 0xFC7D, 0x0641, 0x064A, 0,
- 6, 0xFC7E, 0x0642, 0x0649, 0,
- 6, 0xFC7F, 0x0642, 0x064A, 0,
- 6, 0xFC80, 0x0643, 0x0627, 0,
- 6, 0xFC81, 0x0643, 0x0644, 0,
- 6, 0xFC82, 0x0643, 0x0645, 0,
- 6, 0xFC83, 0x0643, 0x0649, 0,
- 6, 0xFC84, 0x0643, 0x064A, 0,
- 6, 0xFC85, 0x0644, 0x0645, 0,
- 6, 0xFC86, 0x0644, 0x0649, 0,
- 6, 0xFC87, 0x0644, 0x064A, 0,
- 6, 0xFC88, 0x0645, 0x0627, 0,
- 6, 0xFC89, 0x0645, 0x0645, 0,
- 6, 0xFC8A, 0x0646, 0x0631, 0,
- 6, 0xFC8B, 0x0646, 0x0632, 0,
- 6, 0xFC8C, 0x0646, 0x0645, 0,
- 6, 0xFC8D, 0x0646, 0x0646, 0,
- 6, 0xFC8E, 0x0646, 0x0649, 0,
- 6, 0xFC8F, 0x0646, 0x064A, 0,
- 6, 0xFC90, 0x0649, 0x0670, 0,
- 6, 0xFC91, 0x064A, 0x0631, 0,
- 6, 0xFC92, 0x064A, 0x0632, 0,
- 6, 0xFC93, 0x064A, 0x0645, 0,
- 6, 0xFC94, 0x064A, 0x0646, 0,
- 6, 0xFC95, 0x064A, 0x0649, 0,
- 6, 0xFC96, 0x064A, 0x064A, 0,
- 4, 0xFC97, 0x0626, 0x062C, 0,
- 4, 0xFC98, 0x0626, 0x062D, 0,
- 4, 0xFC99, 0x0626, 0x062E, 0,
- 4, 0xFC9A, 0x0626, 0x0645, 0,
- 4, 0xFC9B, 0x0626, 0x0647, 0,
- 4, 0xFC9C, 0x0628, 0x062C, 0,
- 4, 0xFC9D, 0x0628, 0x062D, 0,
- 4, 0xFC9E, 0x0628, 0x062E, 0,
- 4, 0xFC9F, 0x0628, 0x0645, 0,
- 4, 0xFCA0, 0x0628, 0x0647, 0,
- 4, 0xFCA1, 0x062A, 0x062C, 0,
- 4, 0xFCA2, 0x062A, 0x062D, 0,
- 4, 0xFCA3, 0x062A, 0x062E, 0,
- 4, 0xFCA4, 0x062A, 0x0645, 0,
- 4, 0xFCA5, 0x062A, 0x0647, 0,
- 4, 0xFCA6, 0x062B, 0x0645, 0,
- 4, 0xFCA7, 0x062C, 0x062D, 0,
- 4, 0xFCA8, 0x062C, 0x0645, 0,
- 4, 0xFCA9, 0x062D, 0x062C, 0,
- 4, 0xFCAA, 0x062D, 0x0645, 0,
- 4, 0xFCAB, 0x062E, 0x062C, 0,
- 4, 0xFCAC, 0x062E, 0x0645, 0,
- 4, 0xFCAD, 0x0633, 0x062C, 0,
- 4, 0xFCAE, 0x0633, 0x062D, 0,
- 4, 0xFCAF, 0x0633, 0x062E, 0,
- 4, 0xFCB0, 0x0633, 0x0645, 0,
- 4, 0xFCB1, 0x0635, 0x062D, 0,
- 4, 0xFCB2, 0x0635, 0x062E, 0,
- 4, 0xFCB3, 0x0635, 0x0645, 0,
- 4, 0xFCB4, 0x0636, 0x062C, 0,
- 4, 0xFCB5, 0x0636, 0x062D, 0,
- 4, 0xFCB6, 0x0636, 0x062E, 0,
- 4, 0xFCB7, 0x0636, 0x0645, 0,
- 4, 0xFCB8, 0x0637, 0x062D, 0,
- 4, 0xFCB9, 0x0638, 0x0645, 0,
- 4, 0xFCBA, 0x0639, 0x062C, 0,
- 4, 0xFCBB, 0x0639, 0x0645, 0,
- 4, 0xFCBC, 0x063A, 0x062C, 0,
- 4, 0xFCBD, 0x063A, 0x0645, 0,
- 4, 0xFCBE, 0x0641, 0x062C, 0,
- 4, 0xFCBF, 0x0641, 0x062D, 0,
- 4, 0xFCC0, 0x0641, 0x062E, 0,
- 4, 0xFCC1, 0x0641, 0x0645, 0,
- 4, 0xFCC2, 0x0642, 0x062D, 0,
- 4, 0xFCC3, 0x0642, 0x0645, 0,
- 4, 0xFCC4, 0x0643, 0x062C, 0,
- 4, 0xFCC5, 0x0643, 0x062D, 0,
- 4, 0xFCC6, 0x0643, 0x062E, 0,
- 4, 0xFCC7, 0x0643, 0x0644, 0,
- 4, 0xFCC8, 0x0643, 0x0645, 0,
- 4, 0xFCC9, 0x0644, 0x062C, 0,
- 4, 0xFCCA, 0x0644, 0x062D, 0,
- 4, 0xFCCB, 0x0644, 0x062E, 0,
- 4, 0xFCCC, 0x0644, 0x0645, 0,
- 4, 0xFCCD, 0x0644, 0x0647, 0,
- 4, 0xFCCE, 0x0645, 0x062C, 0,
- 4, 0xFCCF, 0x0645, 0x062D, 0,
- 4, 0xFCD0, 0x0645, 0x062E, 0,
- 4, 0xFCD1, 0x0645, 0x0645, 0,
- 4, 0xFCD2, 0x0646, 0x062C, 0,
- 4, 0xFCD3, 0x0646, 0x062D, 0,
- 4, 0xFCD4, 0x0646, 0x062E, 0,
- 4, 0xFCD5, 0x0646, 0x0645, 0,
- 4, 0xFCD6, 0x0646, 0x0647, 0,
- 4, 0xFCD7, 0x0647, 0x062C, 0,
- 4, 0xFCD8, 0x0647, 0x0645, 0,
- 4, 0xFCD9, 0x0647, 0x0670, 0,
- 4, 0xFCDA, 0x064A, 0x062C, 0,
- 4, 0xFCDB, 0x064A, 0x062D, 0,
- 4, 0xFCDC, 0x064A, 0x062E, 0,
- 4, 0xFCDD, 0x064A, 0x0645, 0,
- 4, 0xFCDE, 0x064A, 0x0647, 0,
- 5, 0xFCDF, 0x0626, 0x0645, 0,
- 5, 0xFCE0, 0x0626, 0x0647, 0,
- 5, 0xFCE1, 0x0628, 0x0645, 0,
- 5, 0xFCE2, 0x0628, 0x0647, 0,
- 5, 0xFCE3, 0x062A, 0x0645, 0,
- 5, 0xFCE4, 0x062A, 0x0647, 0,
- 5, 0xFCE5, 0x062B, 0x0645, 0,
- 5, 0xFCE6, 0x062B, 0x0647, 0,
- 5, 0xFCE7, 0x0633, 0x0645, 0,
- 5, 0xFCE8, 0x0633, 0x0647, 0,
- 5, 0xFCE9, 0x0634, 0x0645, 0,
- 5, 0xFCEA, 0x0634, 0x0647, 0,
- 5, 0xFCEB, 0x0643, 0x0644, 0,
- 5, 0xFCEC, 0x0643, 0x0645, 0,
- 5, 0xFCED, 0x0644, 0x0645, 0,
- 5, 0xFCEE, 0x0646, 0x0645, 0,
- 5, 0xFCEF, 0x0646, 0x0647, 0,
- 5, 0xFCF0, 0x064A, 0x0645, 0,
- 5, 0xFCF1, 0x064A, 0x0647, 0,
- 5, 0xFCF2, 0x0640, 0x064E, 0x0651, 0,
- 5, 0xFCF3, 0x0640, 0x064F, 0x0651, 0,
- 5, 0xFCF4, 0x0640, 0x0650, 0x0651, 0,
- 7, 0xFCF5, 0x0637, 0x0649, 0,
- 7, 0xFCF6, 0x0637, 0x064A, 0,
- 7, 0xFCF7, 0x0639, 0x0649, 0,
- 7, 0xFCF8, 0x0639, 0x064A, 0,
- 7, 0xFCF9, 0x063A, 0x0649, 0,
- 7, 0xFCFA, 0x063A, 0x064A, 0,
- 7, 0xFCFB, 0x0633, 0x0649, 0,
- 7, 0xFCFC, 0x0633, 0x064A, 0,
- 7, 0xFCFD, 0x0634, 0x0649, 0,
- 7, 0xFCFE, 0x0634, 0x064A, 0,
- 7, 0xFCFF, 0x062D, 0x0649, 0,
- 7, 0xFD00, 0x062D, 0x064A, 0,
- 7, 0xFD01, 0x062C, 0x0649, 0,
- 7, 0xFD02, 0x062C, 0x064A, 0,
- 7, 0xFD03, 0x062E, 0x0649, 0,
- 7, 0xFD04, 0x062E, 0x064A, 0,
- 7, 0xFD05, 0x0635, 0x0649, 0,
- 7, 0xFD06, 0x0635, 0x064A, 0,
- 7, 0xFD07, 0x0636, 0x0649, 0,
- 7, 0xFD08, 0x0636, 0x064A, 0,
- 7, 0xFD09, 0x0634, 0x062C, 0,
- 7, 0xFD0A, 0x0634, 0x062D, 0,
- 7, 0xFD0B, 0x0634, 0x062E, 0,
- 7, 0xFD0C, 0x0634, 0x0645, 0,
- 7, 0xFD0D, 0x0634, 0x0631, 0,
- 7, 0xFD0E, 0x0633, 0x0631, 0,
- 7, 0xFD0F, 0x0635, 0x0631, 0,
- 7, 0xFD10, 0x0636, 0x0631, 0,
- 6, 0xFD11, 0x0637, 0x0649, 0,
- 6, 0xFD12, 0x0637, 0x064A, 0,
- 6, 0xFD13, 0x0639, 0x0649, 0,
- 6, 0xFD14, 0x0639, 0x064A, 0,
- 6, 0xFD15, 0x063A, 0x0649, 0,
- 6, 0xFD16, 0x063A, 0x064A, 0,
- 6, 0xFD17, 0x0633, 0x0649, 0,
- 6, 0xFD18, 0x0633, 0x064A, 0,
- 6, 0xFD19, 0x0634, 0x0649, 0,
- 6, 0xFD1A, 0x0634, 0x064A, 0,
- 6, 0xFD1B, 0x062D, 0x0649, 0,
- 6, 0xFD1C, 0x062D, 0x064A, 0,
- 6, 0xFD1D, 0x062C, 0x0649, 0,
- 6, 0xFD1E, 0x062C, 0x064A, 0,
- 6, 0xFD1F, 0x062E, 0x0649, 0,
- 6, 0xFD20, 0x062E, 0x064A, 0,
- 6, 0xFD21, 0x0635, 0x0649, 0,
- 6, 0xFD22, 0x0635, 0x064A, 0,
- 6, 0xFD23, 0x0636, 0x0649, 0,
- 6, 0xFD24, 0x0636, 0x064A, 0,
- 6, 0xFD25, 0x0634, 0x062C, 0,
- 6, 0xFD26, 0x0634, 0x062D, 0,
- 6, 0xFD27, 0x0634, 0x062E, 0,
- 6, 0xFD28, 0x0634, 0x0645, 0,
- 6, 0xFD29, 0x0634, 0x0631, 0,
- 6, 0xFD2A, 0x0633, 0x0631, 0,
- 6, 0xFD2B, 0x0635, 0x0631, 0,
- 6, 0xFD2C, 0x0636, 0x0631, 0,
- 4, 0xFD2D, 0x0634, 0x062C, 0,
- 4, 0xFD2E, 0x0634, 0x062D, 0,
- 4, 0xFD2F, 0x0634, 0x062E, 0,
- 4, 0xFD30, 0x0634, 0x0645, 0,
- 4, 0xFD31, 0x0633, 0x0647, 0,
- 4, 0xFD32, 0x0634, 0x0647, 0,
- 4, 0xFD33, 0x0637, 0x0645, 0,
- 5, 0xFD34, 0x0633, 0x062C, 0,
- 5, 0xFD35, 0x0633, 0x062D, 0,
- 5, 0xFD36, 0x0633, 0x062E, 0,
- 5, 0xFD37, 0x0634, 0x062C, 0,
- 5, 0xFD38, 0x0634, 0x062D, 0,
- 5, 0xFD39, 0x0634, 0x062E, 0,
- 5, 0xFD3A, 0x0637, 0x0645, 0,
- 5, 0xFD3B, 0x0638, 0x0645, 0,
- 6, 0xFD3C, 0x0627, 0x064B, 0,
- 7, 0xFD3D, 0x0627, 0x064B, 0,
- 4, 0xFD50, 0x062A, 0x062C, 0x0645, 0,
- 6, 0xFD51, 0x062A, 0x062D, 0x062C, 0,
- 4, 0xFD52, 0x062A, 0x062D, 0x062C, 0,
- 4, 0xFD53, 0x062A, 0x062D, 0x0645, 0,
- 4, 0xFD54, 0x062A, 0x062E, 0x0645, 0,
- 4, 0xFD55, 0x062A, 0x0645, 0x062C, 0,
- 4, 0xFD56, 0x062A, 0x0645, 0x062D, 0,
- 4, 0xFD57, 0x062A, 0x0645, 0x062E, 0,
- 6, 0xFD58, 0x062C, 0x0645, 0x062D, 0,
- 4, 0xFD59, 0x062C, 0x0645, 0x062D, 0,
- 6, 0xFD5A, 0x062D, 0x0645, 0x064A, 0,
- 6, 0xFD5B, 0x062D, 0x0645, 0x0649, 0,
- 4, 0xFD5C, 0x0633, 0x062D, 0x062C, 0,
- 4, 0xFD5D, 0x0633, 0x062C, 0x062D, 0,
- 6, 0xFD5E, 0x0633, 0x062C, 0x0649, 0,
- 6, 0xFD5F, 0x0633, 0x0645, 0x062D, 0,
- 4, 0xFD60, 0x0633, 0x0645, 0x062D, 0,
- 4, 0xFD61, 0x0633, 0x0645, 0x062C, 0,
- 6, 0xFD62, 0x0633, 0x0645, 0x0645, 0,
- 4, 0xFD63, 0x0633, 0x0645, 0x0645, 0,
- 6, 0xFD64, 0x0635, 0x062D, 0x062D, 0,
- 4, 0xFD65, 0x0635, 0x062D, 0x062D, 0,
- 6, 0xFD66, 0x0635, 0x0645, 0x0645, 0,
- 6, 0xFD67, 0x0634, 0x062D, 0x0645, 0,
- 4, 0xFD68, 0x0634, 0x062D, 0x0645, 0,
- 6, 0xFD69, 0x0634, 0x062C, 0x064A, 0,
- 6, 0xFD6A, 0x0634, 0x0645, 0x062E, 0,
- 4, 0xFD6B, 0x0634, 0x0645, 0x062E, 0,
- 6, 0xFD6C, 0x0634, 0x0645, 0x0645, 0,
- 4, 0xFD6D, 0x0634, 0x0645, 0x0645, 0,
- 6, 0xFD6E, 0x0636, 0x062D, 0x0649, 0,
- 6, 0xFD6F, 0x0636, 0x062E, 0x0645, 0,
- 4, 0xFD70, 0x0636, 0x062E, 0x0645, 0,
- 6, 0xFD71, 0x0637, 0x0645, 0x062D, 0,
- 4, 0xFD72, 0x0637, 0x0645, 0x062D, 0,
- 4, 0xFD73, 0x0637, 0x0645, 0x0645, 0,
- 6, 0xFD74, 0x0637, 0x0645, 0x064A, 0,
- 6, 0xFD75, 0x0639, 0x062C, 0x0645, 0,
- 6, 0xFD76, 0x0639, 0x0645, 0x0645, 0,
- 4, 0xFD77, 0x0639, 0x0645, 0x0645, 0,
- 6, 0xFD78, 0x0639, 0x0645, 0x0649, 0,
- 6, 0xFD79, 0x063A, 0x0645, 0x0645, 0,
- 6, 0xFD7A, 0x063A, 0x0645, 0x064A, 0,
- 6, 0xFD7B, 0x063A, 0x0645, 0x0649, 0,
- 6, 0xFD7C, 0x0641, 0x062E, 0x0645, 0,
- 4, 0xFD7D, 0x0641, 0x062E, 0x0645, 0,
- 6, 0xFD7E, 0x0642, 0x0645, 0x062D, 0,
- 6, 0xFD7F, 0x0642, 0x0645, 0x0645, 0,
- 6, 0xFD80, 0x0644, 0x062D, 0x0645, 0,
- 6, 0xFD81, 0x0644, 0x062D, 0x064A, 0,
- 6, 0xFD82, 0x0644, 0x062D, 0x0649, 0,
- 4, 0xFD83, 0x0644, 0x062C, 0x062C, 0,
- 6, 0xFD84, 0x0644, 0x062C, 0x062C, 0,
- 6, 0xFD85, 0x0644, 0x062E, 0x0645, 0,
- 4, 0xFD86, 0x0644, 0x062E, 0x0645, 0,
- 6, 0xFD87, 0x0644, 0x0645, 0x062D, 0,
- 4, 0xFD88, 0x0644, 0x0645, 0x062D, 0,
- 4, 0xFD89, 0x0645, 0x062D, 0x062C, 0,
- 4, 0xFD8A, 0x0645, 0x062D, 0x0645, 0,
- 6, 0xFD8B, 0x0645, 0x062D, 0x064A, 0,
- 4, 0xFD8C, 0x0645, 0x062C, 0x062D, 0,
- 4, 0xFD8D, 0x0645, 0x062C, 0x0645, 0,
- 4, 0xFD8E, 0x0645, 0x062E, 0x062C, 0,
- 4, 0xFD8F, 0x0645, 0x062E, 0x0645, 0,
- 4, 0xFD92, 0x0645, 0x062C, 0x062E, 0,
- 4, 0xFD93, 0x0647, 0x0645, 0x062C, 0,
- 4, 0xFD94, 0x0647, 0x0645, 0x0645, 0,
- 4, 0xFD95, 0x0646, 0x062D, 0x0645, 0,
- 6, 0xFD96, 0x0646, 0x062D, 0x0649, 0,
- 6, 0xFD97, 0x0646, 0x062C, 0x0645, 0,
- 4, 0xFD98, 0x0646, 0x062C, 0x0645, 0,
- 6, 0xFD99, 0x0646, 0x062C, 0x0649, 0,
- 6, 0xFD9A, 0x0646, 0x0645, 0x064A, 0,
- 6, 0xFD9B, 0x0646, 0x0645, 0x0649, 0,
- 6, 0xFD9C, 0x064A, 0x0645, 0x0645, 0,
- 4, 0xFD9D, 0x064A, 0x0645, 0x0645, 0,
- 6, 0xFD9E, 0x0628, 0x062E, 0x064A, 0,
- 6, 0xFD9F, 0x062A, 0x062C, 0x064A, 0,
- 6, 0xFDA0, 0x062A, 0x062C, 0x0649, 0,
- 6, 0xFDA1, 0x062A, 0x062E, 0x064A, 0,
- 6, 0xFDA2, 0x062A, 0x062E, 0x0649, 0,
- 6, 0xFDA3, 0x062A, 0x0645, 0x064A, 0,
- 6, 0xFDA4, 0x062A, 0x0645, 0x0649, 0,
- 6, 0xFDA5, 0x062C, 0x0645, 0x064A, 0,
- 6, 0xFDA6, 0x062C, 0x062D, 0x0649, 0,
- 6, 0xFDA7, 0x062C, 0x0645, 0x0649, 0,
- 6, 0xFDA8, 0x0633, 0x062E, 0x0649, 0,
- 6, 0xFDA9, 0x0635, 0x062D, 0x064A, 0,
- 6, 0xFDAA, 0x0634, 0x062D, 0x064A, 0,
- 6, 0xFDAB, 0x0636, 0x062D, 0x064A, 0,
- 6, 0xFDAC, 0x0644, 0x062C, 0x064A, 0,
- 6, 0xFDAD, 0x0644, 0x0645, 0x064A, 0,
- 6, 0xFDAE, 0x064A, 0x062D, 0x064A, 0,
- 6, 0xFDAF, 0x064A, 0x062C, 0x064A, 0,
- 6, 0xFDB0, 0x064A, 0x0645, 0x064A, 0,
- 6, 0xFDB1, 0x0645, 0x0645, 0x064A, 0,
- 6, 0xFDB2, 0x0642, 0x0645, 0x064A, 0,
- 6, 0xFDB3, 0x0646, 0x062D, 0x064A, 0,
- 4, 0xFDB4, 0x0642, 0x0645, 0x062D, 0,
- 4, 0xFDB5, 0x0644, 0x062D, 0x0645, 0,
- 6, 0xFDB6, 0x0639, 0x0645, 0x064A, 0,
- 6, 0xFDB7, 0x0643, 0x0645, 0x064A, 0,
- 4, 0xFDB8, 0x0646, 0x062C, 0x062D, 0,
- 6, 0xFDB9, 0x0645, 0x062E, 0x064A, 0,
- 4, 0xFDBA, 0x0644, 0x062C, 0x0645, 0,
- 6, 0xFDBB, 0x0643, 0x0645, 0x0645, 0,
- 6, 0xFDBC, 0x0644, 0x062C, 0x0645, 0,
- 6, 0xFDBD, 0x0646, 0x062C, 0x062D, 0,
- 6, 0xFDBE, 0x062C, 0x062D, 0x064A, 0,
- 6, 0xFDBF, 0x062D, 0x062C, 0x064A, 0,
- 6, 0xFDC0, 0x0645, 0x062C, 0x064A, 0,
- 6, 0xFDC1, 0x0641, 0x0645, 0x064A, 0,
- 6, 0xFDC2, 0x0628, 0x062D, 0x064A, 0,
- 4, 0xFDC3, 0x0643, 0x0645, 0x0645, 0,
- 4, 0xFDC4, 0x0639, 0x062C, 0x0645, 0,
- 4, 0xFDC5, 0x0635, 0x0645, 0x0645, 0,
- 6, 0xFDC6, 0x0633, 0x062E, 0x064A, 0,
- 6, 0xFDC7, 0x0646, 0x062C, 0x064A, 0,
- 7, 0xFDF0, 0x0635, 0x0644, 0x06D2, 0,
- 7, 0xFDF1, 0x0642, 0x0644, 0x06D2, 0,
- 7, 0xFDF2, 0x0627, 0x0644, 0x0644, 0x0647, 0,
- 7, 0xFDF3, 0x0627, 0x0643, 0x0628, 0x0631, 0,
- 7, 0xFDF4, 0x0645, 0x062D, 0x0645, 0x062F, 0,
- 7, 0xFDF5, 0x0635, 0x0644, 0x0639, 0x0645, 0,
- 7, 0xFDF6, 0x0631, 0x0633, 0x0648, 0x0644, 0,
- 7, 0xFDF7, 0x0639, 0x0644, 0x064A, 0x0647, 0,
- 7, 0xFDF8, 0x0648, 0x0633, 0x0644, 0x0645, 0,
- 7, 0xFDF9, 0x0635, 0x0644, 0x0649, 0,
- 7, 0xFDFA, 0x0635, 0x0644, 0x0649, 0x0020, 0x0627, 0x0644, 0x0644, 0x0647, 0x0020, 0x0639, 0x0644, 0x064A, 0x0647, 0x0020, 0x0648, 0x0633, 0x0644, 0x0645, 0,
- 7, 0xFDFB, 0x062C, 0x0644, 0x0020, 0x062C, 0x0644, 0x0627, 0x0644, 0x0647, 0,
- 11, 0xFE30, 0x2025, 0,
- 11, 0xFE31, 0x2014, 0,
- 11, 0xFE32, 0x2013, 0,
- 11, 0xFE33, 0x005F, 0,
- 11, 0xFE34, 0x005F, 0,
- 11, 0xFE35, 0x0028, 0,
- 11, 0xFE36, 0x0029, 0,
- 11, 0xFE37, 0x007B, 0,
- 11, 0xFE38, 0x007D, 0,
- 11, 0xFE39, 0x3014, 0,
- 11, 0xFE3A, 0x3015, 0,
- 11, 0xFE3B, 0x3010, 0,
- 11, 0xFE3C, 0x3011, 0,
- 11, 0xFE3D, 0x300A, 0,
- 11, 0xFE3E, 0x300B, 0,
- 11, 0xFE3F, 0x3008, 0,
- 11, 0xFE40, 0x3009, 0,
- 11, 0xFE41, 0x300C, 0,
- 11, 0xFE42, 0x300D, 0,
- 11, 0xFE43, 0x300E, 0,
- 11, 0xFE44, 0x300F, 0,
- 16, 0xFE49, 0x203E, 0,
- 16, 0xFE4A, 0x203E, 0,
- 16, 0xFE4B, 0x203E, 0,
- 16, 0xFE4C, 0x203E, 0,
- 16, 0xFE4D, 0x005F, 0,
- 16, 0xFE4E, 0x005F, 0,
- 16, 0xFE4F, 0x005F, 0,
- 14, 0xFE50, 0x002C, 0,
- 14, 0xFE51, 0x3001, 0,
- 14, 0xFE52, 0x002E, 0,
- 14, 0xFE54, 0x003B, 0,
- 14, 0xFE55, 0x003A, 0,
- 14, 0xFE56, 0x003F, 0,
- 14, 0xFE57, 0x0021, 0,
- 14, 0xFE58, 0x2014, 0,
- 14, 0xFE59, 0x0028, 0,
- 14, 0xFE5A, 0x0029, 0,
- 14, 0xFE5B, 0x007B, 0,
- 14, 0xFE5C, 0x007D, 0,
- 14, 0xFE5D, 0x3014, 0,
- 14, 0xFE5E, 0x3015, 0,
- 14, 0xFE5F, 0x0023, 0,
- 14, 0xFE60, 0x0026, 0,
- 14, 0xFE61, 0x002A, 0,
- 14, 0xFE62, 0x002B, 0,
- 14, 0xFE63, 0x002D, 0,
- 14, 0xFE64, 0x003C, 0,
- 14, 0xFE65, 0x003E, 0,
- 14, 0xFE66, 0x003D, 0,
- 14, 0xFE68, 0x005C, 0,
- 14, 0xFE69, 0x0024, 0,
- 14, 0xFE6A, 0x0025, 0,
- 14, 0xFE6B, 0x0040, 0,
- 7, 0xFE70, 0x0020, 0x064B, 0,
- 5, 0xFE71, 0x0640, 0x064B, 0,
- 7, 0xFE72, 0x0020, 0x064C, 0,
- 7, 0xFE74, 0x0020, 0x064D, 0,
- 7, 0xFE76, 0x0020, 0x064E, 0,
- 5, 0xFE77, 0x0640, 0x064E, 0,
- 7, 0xFE78, 0x0020, 0x064F, 0,
- 5, 0xFE79, 0x0640, 0x064F, 0,
- 7, 0xFE7A, 0x0020, 0x0650, 0,
- 5, 0xFE7B, 0x0640, 0x0650, 0,
- 7, 0xFE7C, 0x0020, 0x0651, 0,
- 5, 0xFE7D, 0x0640, 0x0651, 0,
- 7, 0xFE7E, 0x0020, 0x0652, 0,
- 5, 0xFE7F, 0x0640, 0x0652, 0,
- 7, 0xFE80, 0x0621, 0,
- 7, 0xFE81, 0x0622, 0,
- 6, 0xFE82, 0x0622, 0,
- 7, 0xFE83, 0x0623, 0,
- 6, 0xFE84, 0x0623, 0,
- 7, 0xFE85, 0x0624, 0,
- 6, 0xFE86, 0x0624, 0,
- 7, 0xFE87, 0x0625, 0,
- 6, 0xFE88, 0x0625, 0,
- 7, 0xFE89, 0x0626, 0,
- 6, 0xFE8A, 0x0626, 0,
- 4, 0xFE8B, 0x0626, 0,
- 5, 0xFE8C, 0x0626, 0,
- 7, 0xFE8D, 0x0627, 0,
- 6, 0xFE8E, 0x0627, 0,
- 7, 0xFE8F, 0x0628, 0,
- 6, 0xFE90, 0x0628, 0,
- 4, 0xFE91, 0x0628, 0,
- 5, 0xFE92, 0x0628, 0,
- 7, 0xFE93, 0x0629, 0,
- 6, 0xFE94, 0x0629, 0,
- 7, 0xFE95, 0x062A, 0,
- 6, 0xFE96, 0x062A, 0,
- 4, 0xFE97, 0x062A, 0,
- 5, 0xFE98, 0x062A, 0,
- 7, 0xFE99, 0x062B, 0,
- 6, 0xFE9A, 0x062B, 0,
- 4, 0xFE9B, 0x062B, 0,
- 5, 0xFE9C, 0x062B, 0,
- 7, 0xFE9D, 0x062C, 0,
- 6, 0xFE9E, 0x062C, 0,
- 4, 0xFE9F, 0x062C, 0,
- 5, 0xFEA0, 0x062C, 0,
- 7, 0xFEA1, 0x062D, 0,
- 6, 0xFEA2, 0x062D, 0,
- 4, 0xFEA3, 0x062D, 0,
- 5, 0xFEA4, 0x062D, 0,
- 7, 0xFEA5, 0x062E, 0,
- 6, 0xFEA6, 0x062E, 0,
- 4, 0xFEA7, 0x062E, 0,
- 5, 0xFEA8, 0x062E, 0,
- 7, 0xFEA9, 0x062F, 0,
- 6, 0xFEAA, 0x062F, 0,
- 7, 0xFEAB, 0x0630, 0,
- 6, 0xFEAC, 0x0630, 0,
- 7, 0xFEAD, 0x0631, 0,
- 6, 0xFEAE, 0x0631, 0,
- 7, 0xFEAF, 0x0632, 0,
- 6, 0xFEB0, 0x0632, 0,
- 7, 0xFEB1, 0x0633, 0,
- 6, 0xFEB2, 0x0633, 0,
- 4, 0xFEB3, 0x0633, 0,
- 5, 0xFEB4, 0x0633, 0,
- 7, 0xFEB5, 0x0634, 0,
- 6, 0xFEB6, 0x0634, 0,
- 4, 0xFEB7, 0x0634, 0,
- 5, 0xFEB8, 0x0634, 0,
- 7, 0xFEB9, 0x0635, 0,
- 6, 0xFEBA, 0x0635, 0,
- 4, 0xFEBB, 0x0635, 0,
- 5, 0xFEBC, 0x0635, 0,
- 7, 0xFEBD, 0x0636, 0,
- 6, 0xFEBE, 0x0636, 0,
- 4, 0xFEBF, 0x0636, 0,
- 5, 0xFEC0, 0x0636, 0,
- 7, 0xFEC1, 0x0637, 0,
- 6, 0xFEC2, 0x0637, 0,
- 4, 0xFEC3, 0x0637, 0,
- 5, 0xFEC4, 0x0637, 0,
- 7, 0xFEC5, 0x0638, 0,
- 6, 0xFEC6, 0x0638, 0,
- 4, 0xFEC7, 0x0638, 0,
- 5, 0xFEC8, 0x0638, 0,
- 7, 0xFEC9, 0x0639, 0,
- 6, 0xFECA, 0x0639, 0,
- 4, 0xFECB, 0x0639, 0,
- 5, 0xFECC, 0x0639, 0,
- 7, 0xFECD, 0x063A, 0,
- 6, 0xFECE, 0x063A, 0,
- 4, 0xFECF, 0x063A, 0,
- 5, 0xFED0, 0x063A, 0,
- 7, 0xFED1, 0x0641, 0,
- 6, 0xFED2, 0x0641, 0,
- 4, 0xFED3, 0x0641, 0,
- 5, 0xFED4, 0x0641, 0,
- 7, 0xFED5, 0x0642, 0,
- 6, 0xFED6, 0x0642, 0,
- 4, 0xFED7, 0x0642, 0,
- 5, 0xFED8, 0x0642, 0,
- 7, 0xFED9, 0x0643, 0,
- 6, 0xFEDA, 0x0643, 0,
- 4, 0xFEDB, 0x0643, 0,
- 5, 0xFEDC, 0x0643, 0,
- 7, 0xFEDD, 0x0644, 0,
- 6, 0xFEDE, 0x0644, 0,
- 4, 0xFEDF, 0x0644, 0,
- 5, 0xFEE0, 0x0644, 0,
- 7, 0xFEE1, 0x0645, 0,
- 6, 0xFEE2, 0x0645, 0,
- 4, 0xFEE3, 0x0645, 0,
- 5, 0xFEE4, 0x0645, 0,
- 7, 0xFEE5, 0x0646, 0,
- 6, 0xFEE6, 0x0646, 0,
- 4, 0xFEE7, 0x0646, 0,
- 5, 0xFEE8, 0x0646, 0,
- 7, 0xFEE9, 0x0647, 0,
- 6, 0xFEEA, 0x0647, 0,
- 4, 0xFEEB, 0x0647, 0,
- 5, 0xFEEC, 0x0647, 0,
- 7, 0xFEED, 0x0648, 0,
- 6, 0xFEEE, 0x0648, 0,
- 7, 0xFEEF, 0x0649, 0,
- 6, 0xFEF0, 0x0649, 0,
- 7, 0xFEF1, 0x064A, 0,
- 6, 0xFEF2, 0x064A, 0,
- 4, 0xFEF3, 0x064A, 0,
- 5, 0xFEF4, 0x064A, 0,
- 7, 0xFEF5, 0x0644, 0x0622, 0,
- 6, 0xFEF6, 0x0644, 0x0622, 0,
- 7, 0xFEF7, 0x0644, 0x0623, 0,
- 6, 0xFEF8, 0x0644, 0x0623, 0,
- 7, 0xFEF9, 0x0644, 0x0625, 0,
- 6, 0xFEFA, 0x0644, 0x0625, 0,
- 7, 0xFEFB, 0x0644, 0x0627, 0,
- 6, 0xFEFC, 0x0644, 0x0627, 0,
- 12, 0xFF01, 0x0021, 0,
- 12, 0xFF02, 0x0022, 0,
- 12, 0xFF03, 0x0023, 0,
- 12, 0xFF04, 0x0024, 0,
- 12, 0xFF05, 0x0025, 0,
- 12, 0xFF06, 0x0026, 0,
- 12, 0xFF07, 0x0027, 0,
- 12, 0xFF08, 0x0028, 0,
- 12, 0xFF09, 0x0029, 0,
- 12, 0xFF0A, 0x002A, 0,
- 12, 0xFF0B, 0x002B, 0,
- 12, 0xFF0C, 0x002C, 0,
- 12, 0xFF0D, 0x002D, 0,
- 12, 0xFF0E, 0x002E, 0,
- 12, 0xFF0F, 0x002F, 0,
- 12, 0xFF10, 0x0030, 0,
- 12, 0xFF11, 0x0031, 0,
- 12, 0xFF12, 0x0032, 0,
- 12, 0xFF13, 0x0033, 0,
- 12, 0xFF14, 0x0034, 0,
- 12, 0xFF15, 0x0035, 0,
- 12, 0xFF16, 0x0036, 0,
- 12, 0xFF17, 0x0037, 0,
- 12, 0xFF18, 0x0038, 0,
- 12, 0xFF19, 0x0039, 0,
- 12, 0xFF1A, 0x003A, 0,
- 12, 0xFF1B, 0x003B, 0,
- 12, 0xFF1C, 0x003C, 0,
- 12, 0xFF1D, 0x003D, 0,
- 12, 0xFF1E, 0x003E, 0,
- 12, 0xFF1F, 0x003F, 0,
- 12, 0xFF20, 0x0040, 0,
- 12, 0xFF21, 0x0041, 0,
- 12, 0xFF22, 0x0042, 0,
- 12, 0xFF23, 0x0043, 0,
- 12, 0xFF24, 0x0044, 0,
- 12, 0xFF25, 0x0045, 0,
- 12, 0xFF26, 0x0046, 0,
- 12, 0xFF27, 0x0047, 0,
- 12, 0xFF28, 0x0048, 0,
- 12, 0xFF29, 0x0049, 0,
- 12, 0xFF2A, 0x004A, 0,
- 12, 0xFF2B, 0x004B, 0,
- 12, 0xFF2C, 0x004C, 0,
- 12, 0xFF2D, 0x004D, 0,
- 12, 0xFF2E, 0x004E, 0,
- 12, 0xFF2F, 0x004F, 0,
- 12, 0xFF30, 0x0050, 0,
- 12, 0xFF31, 0x0051, 0,
- 12, 0xFF32, 0x0052, 0,
- 12, 0xFF33, 0x0053, 0,
- 12, 0xFF34, 0x0054, 0,
- 12, 0xFF35, 0x0055, 0,
- 12, 0xFF36, 0x0056, 0,
- 12, 0xFF37, 0x0057, 0,
- 12, 0xFF38, 0x0058, 0,
- 12, 0xFF39, 0x0059, 0,
- 12, 0xFF3A, 0x005A, 0,
- 12, 0xFF3B, 0x005B, 0,
- 12, 0xFF3C, 0x005C, 0,
- 12, 0xFF3D, 0x005D, 0,
- 12, 0xFF3E, 0x005E, 0,
- 12, 0xFF3F, 0x005F, 0,
- 12, 0xFF40, 0x0060, 0,
- 12, 0xFF41, 0x0061, 0,
- 12, 0xFF42, 0x0062, 0,
- 12, 0xFF43, 0x0063, 0,
- 12, 0xFF44, 0x0064, 0,
- 12, 0xFF45, 0x0065, 0,
- 12, 0xFF46, 0x0066, 0,
- 12, 0xFF47, 0x0067, 0,
- 12, 0xFF48, 0x0068, 0,
- 12, 0xFF49, 0x0069, 0,
- 12, 0xFF4A, 0x006A, 0,
- 12, 0xFF4B, 0x006B, 0,
- 12, 0xFF4C, 0x006C, 0,
- 12, 0xFF4D, 0x006D, 0,
- 12, 0xFF4E, 0x006E, 0,
- 12, 0xFF4F, 0x006F, 0,
- 12, 0xFF50, 0x0070, 0,
- 12, 0xFF51, 0x0071, 0,
- 12, 0xFF52, 0x0072, 0,
- 12, 0xFF53, 0x0073, 0,
- 12, 0xFF54, 0x0074, 0,
- 12, 0xFF55, 0x0075, 0,
- 12, 0xFF56, 0x0076, 0,
- 12, 0xFF57, 0x0077, 0,
- 12, 0xFF58, 0x0078, 0,
- 12, 0xFF59, 0x0079, 0,
- 12, 0xFF5A, 0x007A, 0,
- 12, 0xFF5B, 0x007B, 0,
- 12, 0xFF5C, 0x007C, 0,
- 12, 0xFF5D, 0x007D, 0,
- 12, 0xFF5E, 0x007E, 0,
- 13, 0xFF61, 0x3002, 0,
- 13, 0xFF62, 0x300C, 0,
- 13, 0xFF63, 0x300D, 0,
- 13, 0xFF64, 0x3001, 0,
- 13, 0xFF65, 0x30FB, 0,
- 13, 0xFF66, 0x30F2, 0,
- 13, 0xFF67, 0x30A1, 0,
- 13, 0xFF68, 0x30A3, 0,
- 13, 0xFF69, 0x30A5, 0,
- 13, 0xFF6A, 0x30A7, 0,
- 13, 0xFF6B, 0x30A9, 0,
- 13, 0xFF6C, 0x30E3, 0,
- 13, 0xFF6D, 0x30E5, 0,
- 13, 0xFF6E, 0x30E7, 0,
- 13, 0xFF6F, 0x30C3, 0,
- 13, 0xFF70, 0x30FC, 0,
- 13, 0xFF71, 0x30A2, 0,
- 13, 0xFF72, 0x30A4, 0,
- 13, 0xFF73, 0x30A6, 0,
- 13, 0xFF74, 0x30A8, 0,
- 13, 0xFF75, 0x30AA, 0,
- 13, 0xFF76, 0x30AB, 0,
- 13, 0xFF77, 0x30AD, 0,
- 13, 0xFF78, 0x30AF, 0,
- 13, 0xFF79, 0x30B1, 0,
- 13, 0xFF7A, 0x30B3, 0,
- 13, 0xFF7B, 0x30B5, 0,
- 13, 0xFF7C, 0x30B7, 0,
- 13, 0xFF7D, 0x30B9, 0,
- 13, 0xFF7E, 0x30BB, 0,
- 13, 0xFF7F, 0x30BD, 0,
- 13, 0xFF80, 0x30BF, 0,
- 13, 0xFF81, 0x30C1, 0,
- 13, 0xFF82, 0x30C4, 0,
- 13, 0xFF83, 0x30C6, 0,
- 13, 0xFF84, 0x30C8, 0,
- 13, 0xFF85, 0x30CA, 0,
- 13, 0xFF86, 0x30CB, 0,
- 13, 0xFF87, 0x30CC, 0,
- 13, 0xFF88, 0x30CD, 0,
- 13, 0xFF89, 0x30CE, 0,
- 13, 0xFF8A, 0x30CF, 0,
- 13, 0xFF8B, 0x30D2, 0,
- 13, 0xFF8C, 0x30D5, 0,
- 13, 0xFF8D, 0x30D8, 0,
- 13, 0xFF8E, 0x30DB, 0,
- 13, 0xFF8F, 0x30DE, 0,
- 13, 0xFF90, 0x30DF, 0,
- 13, 0xFF91, 0x30E0, 0,
- 13, 0xFF92, 0x30E1, 0,
- 13, 0xFF93, 0x30E2, 0,
- 13, 0xFF94, 0x30E4, 0,
- 13, 0xFF95, 0x30E6, 0,
- 13, 0xFF96, 0x30E8, 0,
- 13, 0xFF97, 0x30E9, 0,
- 13, 0xFF98, 0x30EA, 0,
- 13, 0xFF99, 0x30EB, 0,
- 13, 0xFF9A, 0x30EC, 0,
- 13, 0xFF9B, 0x30ED, 0,
- 13, 0xFF9C, 0x30EF, 0,
- 13, 0xFF9D, 0x30F3, 0,
- 13, 0xFF9E, 0x3099, 0,
- 13, 0xFF9F, 0x309A, 0,
- 13, 0xFFA0, 0x3164, 0,
- 13, 0xFFA1, 0x3131, 0,
- 13, 0xFFA2, 0x3132, 0,
- 13, 0xFFA3, 0x3133, 0,
- 13, 0xFFA4, 0x3134, 0,
- 13, 0xFFA5, 0x3135, 0,
- 13, 0xFFA6, 0x3136, 0,
- 13, 0xFFA7, 0x3137, 0,
- 13, 0xFFA8, 0x3138, 0,
- 13, 0xFFA9, 0x3139, 0,
- 13, 0xFFAA, 0x313A, 0,
- 13, 0xFFAB, 0x313B, 0,
- 13, 0xFFAC, 0x313C, 0,
- 13, 0xFFAD, 0x313D, 0,
- 13, 0xFFAE, 0x313E, 0,
- 13, 0xFFAF, 0x313F, 0,
- 13, 0xFFB0, 0x3140, 0,
- 13, 0xFFB1, 0x3141, 0,
- 13, 0xFFB2, 0x3142, 0,
- 13, 0xFFB3, 0x3143, 0,
- 13, 0xFFB4, 0x3144, 0,
- 13, 0xFFB5, 0x3145, 0,
- 13, 0xFFB6, 0x3146, 0,
- 13, 0xFFB7, 0x3147, 0,
- 13, 0xFFB8, 0x3148, 0,
- 13, 0xFFB9, 0x3149, 0,
- 13, 0xFFBA, 0x314A, 0,
- 13, 0xFFBB, 0x314B, 0,
- 13, 0xFFBC, 0x314C, 0,
- 13, 0xFFBD, 0x314D, 0,
- 13, 0xFFBE, 0x314E, 0,
- 13, 0xFFC2, 0x314F, 0,
- 13, 0xFFC3, 0x3150, 0,
- 13, 0xFFC4, 0x3151, 0,
- 13, 0xFFC5, 0x3152, 0,
- 13, 0xFFC6, 0x3153, 0,
- 13, 0xFFC7, 0x3154, 0,
- 13, 0xFFCA, 0x3155, 0,
- 13, 0xFFCB, 0x3156, 0,
- 13, 0xFFCC, 0x3157, 0,
- 13, 0xFFCD, 0x3158, 0,
- 13, 0xFFCE, 0x3159, 0,
- 13, 0xFFCF, 0x315A, 0,
- 13, 0xFFD2, 0x315B, 0,
- 13, 0xFFD3, 0x315C, 0,
- 13, 0xFFD4, 0x315D, 0,
- 13, 0xFFD5, 0x315E, 0,
- 13, 0xFFD6, 0x315F, 0,
- 13, 0xFFD7, 0x3160, 0,
- 13, 0xFFDA, 0x3161, 0,
- 13, 0xFFDB, 0x3162, 0,
- 13, 0xFFDC, 0x3163, 0,
- 12, 0xFFE0, 0x00A2, 0,
- 12, 0xFFE1, 0x00A3, 0,
- 12, 0xFFE2, 0x00AC, 0,
- 12, 0xFFE3, 0x00AF, 0,
- 12, 0xFFE4, 0x00A6, 0,
- 12, 0xFFE5, 0x00A5, 0,
- 12, 0xFFE6, 0x20A9, 0,
- 13, 0xFFE8, 0x2502, 0,
- 13, 0xFFE9, 0x2190, 0,
- 13, 0xFFEA, 0x2191, 0,
- 13, 0xFFEB, 0x2192, 0,
- 13, 0xFFEC, 0x2193, 0,
- 13, 0xFFED, 0x25A0, 0,
- 13, 0xFFEE, 0x25CB, 0,
-
-};
-
-static const Q_UINT16 di_00[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 0, 0, 0, 0, 0, 0, 0,
- 5, 0, 10, 0, 0, 0, 0, 14,
- 0, 0, 19, 23, 27, 32, 0, 0,
- 36, 41, 45, 0, 49, 55, 61, 0,
- 67, 72, 77, 82, 87, 92, 0, 97,
- 102, 107, 112, 117, 122, 127, 132, 137,
- 0, 142, 147, 152, 157, 162, 167, 0,
- 0, 172, 177, 182, 187, 192, 0, 0,
- 197, 202, 207, 212, 217, 222, 0, 227,
- 232, 237, 242, 247, 252, 257, 262, 267,
- 0, 272, 277, 282, 287, 292, 297, 0,
- 0, 302, 307, 312, 317, 322, 0, 327,
-};
-
-static const Q_UINT16 di_01[] = {
- 332, 337, 342, 347, 352, 357, 362, 367,
- 372, 377, 382, 387, 392, 397, 402, 407,
- 0, 0, 412, 417, 422, 427, 432, 437,
- 442, 447, 452, 457, 462, 467, 472, 477,
- 482, 487, 492, 497, 502, 507, 0, 0,
- 512, 517, 522, 527, 532, 537, 542, 547,
- 552, 0, 557, 562, 567, 572, 577, 582,
- 0, 587, 592, 597, 602, 607, 612, 617,
- 622, 0, 0, 627, 632, 637, 642, 647,
- 652, 657, 0, 0, 662, 667, 672, 677,
- 682, 687, 0, 0, 692, 697, 702, 707,
- 712, 717, 722, 727, 732, 737, 742, 747,
- 752, 757, 762, 767, 772, 777, 0, 0,
- 782, 787, 792, 797, 802, 807, 812, 817,
- 822, 827, 832, 837, 842, 847, 852, 857,
- 862, 867, 872, 877, 882, 887, 892, 897,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 901, 906, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 911,
- 916, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 921, 926, 931, 936,
- 941, 946, 951, 956, 961, 966, 971, 976,
- 981, 986, 991, 996, 1001, 1006, 1011, 1016,
- 1021, 1026, 1031, 1036, 1041, 0, 1046, 1051,
- 1056, 1061, 1066, 1071, 0, 0, 1076, 1081,
- 1086, 1091, 1096, 1101, 1106, 1111, 1116, 1121,
- 1126, 1131, 1136, 1141, 1146, 1151, 0, 0,
- 1156, 1161, 1166, 1171, 1176, 1181, 1186, 1191,
-};
-
-static const Q_UINT16 di_02[] = {
- 1196, 1201, 1206, 1211, 1216, 1221, 1226, 1231,
- 1236, 1241, 1246, 1251, 1256, 1261, 1266, 1271,
- 1276, 1281, 1286, 1291, 1296, 1301, 1306, 1311,
- 1316, 1321, 1326, 1331, 0, 0, 1336, 1341,
- 0, 0, 0, 0, 0, 0, 1346, 1351,
- 1356, 1361, 1366, 1371, 1376, 1381, 1386, 1391,
- 1396, 1401, 1406, 1411, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 1416, 1420, 1424, 1428, 1432, 1436, 1440, 1444,
- 1448, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 1452, 1457, 1462, 1467, 1472, 1477, 0, 0,
- 1482, 1486, 1490, 1494, 1498, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT16 di_03[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 1502, 1506, 0, 1510, 1514, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 1519, 0, 0, 0,
- 0, 0, 1523, 0, 0, 0, 1528, 0,
- 0, 0, 0, 0, 1532, 1537, 1542, 1547,
- 1551, 1556, 1561, 0, 1566, 0, 1571, 1576,
- 1581, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 1586, 1591, 1596, 1601, 1606, 1611,
- 1616, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 1621, 1626, 1631, 1636, 1641, 0,
- 1646, 1650, 1654, 1658, 1663, 1668, 1672, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 1676, 1680, 1684, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT16 di_04[] = {
- 1688, 1693, 0, 1698, 0, 0, 0, 1703,
- 0, 0, 0, 0, 1708, 1713, 1718, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 1723, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 1728, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 1733, 1738, 0, 1743, 0, 0, 0, 1748,
- 0, 0, 0, 0, 1753, 1758, 1763, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 1768, 1773,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 1778, 1783, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 1788, 1793, 1798, 1803, 0, 0, 1808, 1813,
- 0, 0, 1818, 1823, 1828, 1833, 1838, 1843,
- 0, 0, 1848, 1853, 1858, 1863, 1868, 1873,
- 0, 0, 1878, 1883, 1888, 1893, 1898, 1903,
- 1908, 1913, 1918, 1923, 1928, 1933, 0, 0,
- 1938, 1943, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT16 di_05[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 1948,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT16 di_06[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 1953, 1958, 1963, 1968, 1973, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 1978, 1983, 1988,
- 1993, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 1998, 0, 2003, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 2008, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT16 di_07[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT16 di_09[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 2013, 0, 0, 0, 0, 0, 0,
- 0, 2018, 0, 0, 2023, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 2028, 2033, 2038, 2043, 2048, 2053, 2058, 2063,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 2068, 2073, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 2078, 2083, 0, 2088,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT16 di_0A[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 2093, 0, 0, 2098, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 2103, 2108, 2113, 0, 0, 2118, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT16 di_0B[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 2123, 0, 0, 2128, 2133, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 2138, 2143, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 2148, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 2153, 2158, 2163, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT16 di_0C[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 2168, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 2173, 0, 0, 0, 0, 0, 0, 2178,
- 2183, 0, 2188, 2193, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT16 di_0D[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 2198, 2203, 2208, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 2213, 0, 2218, 2223, 2228, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT16 di_0E[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 2233, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 2238, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 2243, 2248, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT16 di_0F[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 2253, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 2257, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 2262, 0, 0,
- 0, 0, 2267, 0, 0, 0, 0, 2272,
- 0, 0, 0, 0, 2277, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 2282, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 2287, 0, 2292, 2297, 2302,
- 2307, 2312, 0, 0, 0, 0, 0, 0,
- 0, 2317, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 2322, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 2327, 0, 0,
- 0, 0, 2332, 0, 0, 0, 0, 2337,
- 0, 0, 0, 0, 2342, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 2347, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT16 di_10[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 2352, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT16 di_1E[] = {
- 2357, 2362, 2367, 2372, 2377, 2382, 2387, 2392,
- 2397, 2402, 2407, 2412, 2417, 2422, 2427, 2432,
- 2437, 2442, 2447, 2452, 2457, 2462, 2467, 2472,
- 2477, 2482, 2487, 2492, 2497, 2502, 2507, 2512,
- 2517, 2522, 2527, 2532, 2537, 2542, 2547, 2552,
- 2557, 2562, 2567, 2572, 2577, 2582, 2587, 2592,
- 2597, 2602, 2607, 2612, 2617, 2622, 2627, 2632,
- 2637, 2642, 2647, 2652, 2657, 2662, 2667, 2672,
- 2677, 2682, 2687, 2692, 2697, 2702, 2707, 2712,
- 2717, 2722, 2727, 2732, 2737, 2742, 2747, 2752,
- 2757, 2762, 2767, 2772, 2777, 2782, 2787, 2792,
- 2797, 2802, 2807, 2812, 2817, 2822, 2827, 2832,
- 2837, 2842, 2847, 2852, 2857, 2862, 2867, 2872,
- 2877, 2882, 2887, 2892, 2897, 2902, 2907, 2912,
- 2917, 2922, 2927, 2932, 2937, 2942, 2947, 2952,
- 2957, 2962, 2967, 2972, 2977, 2982, 2987, 2992,
- 2997, 3002, 3007, 3012, 3017, 3022, 3027, 3032,
- 3037, 3042, 3047, 3052, 3057, 3062, 3067, 3072,
- 3077, 3082, 3087, 3092, 3097, 3102, 3107, 3112,
- 3117, 3122, 3127, 3132, 0, 0, 0, 0,
- 3137, 3142, 3147, 3152, 3157, 3162, 3167, 3172,
- 3177, 3182, 3187, 3192, 3197, 3202, 3207, 3212,
- 3217, 3222, 3227, 3232, 3237, 3242, 3247, 3252,
- 3257, 3262, 3267, 3272, 3277, 3282, 3287, 3292,
- 3297, 3302, 3307, 3312, 3317, 3322, 3327, 3332,
- 3337, 3342, 3347, 3352, 3357, 3362, 3367, 3372,
- 3377, 3382, 3387, 3392, 3397, 3402, 3407, 3412,
- 3417, 3422, 3427, 3432, 3437, 3442, 3447, 3452,
- 3457, 3462, 3467, 3472, 3477, 3482, 3487, 3492,
- 3497, 3502, 3507, 3512, 3517, 3522, 3527, 3532,
- 3537, 3542, 3547, 3552, 3557, 3562, 3567, 3572,
- 3577, 3582, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT16 di_1F[] = {
- 3587, 3592, 3597, 3602, 3607, 3612, 3617, 3622,
- 3627, 3632, 3637, 3642, 3647, 3652, 3657, 3662,
- 3667, 3672, 3677, 3682, 3687, 3692, 0, 0,
- 3697, 3702, 3707, 3712, 3717, 3722, 0, 0,
- 3727, 3732, 3737, 3742, 3747, 3752, 3757, 3762,
- 3767, 3772, 3777, 3782, 3787, 3792, 3797, 3802,
- 3807, 3812, 3817, 3822, 3827, 3832, 3837, 3842,
- 3847, 3852, 3857, 3862, 3867, 3872, 3877, 3882,
- 3887, 3892, 3897, 3902, 3907, 3912, 0, 0,
- 3917, 3922, 3927, 3932, 3937, 3942, 0, 0,
- 3947, 3952, 3957, 3962, 3967, 3972, 3977, 3982,
- 0, 3987, 0, 3992, 0, 3997, 0, 4002,
- 4007, 4012, 4017, 4022, 4027, 4032, 4037, 4042,
- 4047, 4052, 4057, 4062, 4067, 4072, 4077, 4082,
- 4087, 4092, 4096, 4101, 4105, 4110, 4114, 4119,
- 4123, 4128, 4132, 4137, 4141, 4146, 0, 0,
- 4150, 4155, 4160, 4165, 4170, 4175, 4180, 4185,
- 4190, 4195, 4200, 4205, 4210, 4215, 4220, 4225,
- 4230, 4235, 4240, 4245, 4250, 4255, 4260, 4265,
- 4270, 4275, 4280, 4285, 4290, 4295, 4300, 4305,
- 4310, 4315, 4320, 4325, 4330, 4335, 4340, 4345,
- 4350, 4355, 4360, 4365, 4370, 4375, 4380, 4385,
- 4390, 4395, 4400, 4405, 4410, 0, 4415, 4420,
- 4425, 4430, 4435, 4440, 4444, 4449, 4454, 4458,
- 4463, 4468, 4473, 4478, 4483, 0, 4488, 4493,
- 4498, 4503, 4507, 4512, 4516, 4521, 4526, 4531,
- 4536, 4541, 4546, 4551, 0, 0, 4555, 4560,
- 4565, 4570, 4575, 4580, 0, 4584, 4589, 4594,
- 4599, 4604, 4609, 4614, 4618, 4623, 4628, 4633,
- 4638, 4643, 4648, 4653, 4657, 4662, 4667, 4671,
- 0, 0, 4675, 4680, 4685, 0, 4690, 4695,
- 4700, 4705, 4709, 4714, 4718, 4723, 4727, 0,
-};
-
-static const Q_UINT16 di_20[] = {
- 4732, 4736, 4740, 4744, 4748, 4752, 4756, 4760,
- 4764, 4768, 4772, 0, 0, 0, 0, 0,
- 0, 4776, 0, 0, 0, 0, 0, 4780,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 4785, 4789, 4794, 0,
- 0, 0, 0, 0, 0, 0, 0, 4800,
- 0, 0, 0, 4804, 4809, 0, 4815, 4820,
- 0, 0, 0, 0, 4826, 0, 4831, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 4836, 4841, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 4846, 0, 0, 0, 4850, 4854, 4858, 4862,
- 4866, 4870, 4874, 4878, 4882, 4886, 4890, 4894,
- 4898, 4902, 4906, 4910, 4914, 4918, 4922, 4926,
- 4930, 4934, 4938, 4942, 4946, 4950, 4954, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 4958, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT16 di_21[] = {
- 4963, 4969, 4975, 4979, 0, 4984, 4990, 4996,
- 0, 5000, 5005, 5009, 5013, 5017, 5021, 5025,
- 5029, 5033, 5037, 5041, 0, 5045, 5049, 0,
- 0, 5054, 5058, 5062, 5066, 5070, 0, 0,
- 5074, 5079, 5085, 0, 5090, 0, 5094, 0,
- 5098, 0, 5102, 5106, 5110, 5114, 0, 5118,
- 5122, 5126, 0, 5130, 5134, 5138, 5142, 5146,
- 5150, 5154, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 5158, 5164, 5170, 5176, 5182,
- 5188, 5194, 5200, 5206, 5212, 5218, 5224, 5230,
- 5235, 5239, 5244, 5250, 5255, 5259, 5264, 5270,
- 5277, 5282, 5286, 5291, 5297, 5301, 5305, 5309,
- 5313, 5317, 5322, 5328, 5333, 5337, 5342, 5348,
- 5355, 5360, 5364, 5369, 5375, 5379, 5383, 5387,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 5391, 5396, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 5401, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 5406, 5411, 5416,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT16 di_22[] = {
- 0, 0, 0, 0, 5421, 0, 0, 0,
- 0, 5426, 0, 0, 5431, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 5436, 0, 5441, 0,
- 0, 0, 0, 0, 5446, 5451, 0, 5457,
- 5462, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 5468, 0, 0, 5473, 0, 0, 5478,
- 0, 5483, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 5488, 0, 5493, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 5498, 5503, 5508,
- 5513, 5518, 0, 0, 5523, 5528, 0, 0,
- 5533, 5538, 0, 0, 0, 0, 0, 0,
- 5543, 5548, 0, 0, 5553, 5558, 0, 0,
- 5563, 5568, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 5573, 5578, 5583, 5588,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 5593, 5598, 5603, 5608, 0, 0, 0, 0,
- 0, 0, 5613, 5618, 5623, 5628, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT16 di_23[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 5633, 5637, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT16 di_24[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 5641, 5645, 5649, 5653, 5657, 5661, 5665, 5669,
- 5673, 5677, 5682, 5687, 5692, 5697, 5702, 5707,
- 5712, 5717, 5722, 5727, 5732, 5738, 5744, 5750,
- 5756, 5762, 5768, 5774, 5780, 5786, 5793, 5800,
- 5807, 5814, 5821, 5828, 5835, 5842, 5849, 5856,
- 5863, 5868, 5873, 5878, 5883, 5888, 5893, 5898,
- 5903, 5908, 5914, 5920, 5926, 5932, 5938, 5944,
- 5950, 5956, 5962, 5968, 5974, 5980, 5986, 5992,
- 5998, 6004, 6010, 6016, 6022, 6028, 6034, 6040,
- 6046, 6052, 6058, 6064, 6070, 6076, 6082, 6088,
- 6094, 6100, 6106, 6112, 6118, 6124, 6130, 6134,
- 6138, 6142, 6146, 6150, 6154, 6158, 6162, 6166,
- 6170, 6174, 6178, 6182, 6186, 6190, 6194, 6198,
- 6202, 6206, 6210, 6214, 6218, 6222, 6226, 6230,
- 6234, 6238, 6242, 6246, 6250, 6254, 6258, 6262,
- 6266, 6270, 6274, 6278, 6282, 6286, 6290, 6294,
- 6298, 6302, 6306, 6310, 6314, 6318, 6322, 6326,
- 6330, 6334, 6338, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT16 di_2E[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 6342,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 6346, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT16 di_2F[] = {
- 6350, 6354, 6358, 6362, 6366, 6370, 6374, 6378,
- 6382, 6386, 6390, 6394, 6398, 6402, 6406, 6410,
- 6414, 6418, 6422, 6426, 6430, 6434, 6438, 6442,
- 6446, 6450, 6454, 6458, 6462, 6466, 6470, 6474,
- 6478, 6482, 6486, 6490, 6494, 6498, 6502, 6506,
- 6510, 6514, 6518, 6522, 6526, 6530, 6534, 6538,
- 6542, 6546, 6550, 6554, 6558, 6562, 6566, 6570,
- 6574, 6578, 6582, 6586, 6590, 6594, 6598, 6602,
- 6606, 6610, 6614, 6618, 6622, 6626, 6630, 6634,
- 6638, 6642, 6646, 6650, 6654, 6658, 6662, 6666,
- 6670, 6674, 6678, 6682, 6686, 6690, 6694, 6698,
- 6702, 6706, 6710, 6714, 6718, 6722, 6726, 6730,
- 6734, 6738, 6742, 6746, 6750, 6754, 6758, 6762,
- 6766, 6770, 6774, 6778, 6782, 6786, 6790, 6794,
- 6798, 6802, 6806, 6810, 6814, 6818, 6822, 6826,
- 6830, 6834, 6838, 6842, 6846, 6850, 6854, 6858,
- 6862, 6866, 6870, 6874, 6878, 6882, 6886, 6890,
- 6894, 6898, 6902, 6906, 6910, 6914, 6918, 6922,
- 6926, 6930, 6934, 6938, 6942, 6946, 6950, 6954,
- 6958, 6962, 6966, 6970, 6974, 6978, 6982, 6986,
- 6990, 6994, 6998, 7002, 7006, 7010, 7014, 7018,
- 7022, 7026, 7030, 7034, 7038, 7042, 7046, 7050,
- 7054, 7058, 7062, 7066, 7070, 7074, 7078, 7082,
- 7086, 7090, 7094, 7098, 7102, 7106, 7110, 7114,
- 7118, 7122, 7126, 7130, 7134, 7138, 7142, 7146,
- 7150, 7154, 7158, 7162, 7166, 7170, 7174, 7178,
- 7182, 7186, 7190, 7194, 7198, 7202, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT16 di_30[] = {
- 7206, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 7210, 0,
- 7214, 7218, 7222, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 7226, 0, 7231, 0,
- 7236, 0, 7241, 0, 7246, 0, 7251, 0,
- 7256, 0, 7261, 0, 7266, 0, 7271, 0,
- 7276, 0, 7281, 0, 0, 7286, 0, 7291,
- 0, 7296, 0, 0, 0, 0, 0, 0,
- 7301, 7306, 0, 7311, 7316, 0, 7321, 7326,
- 0, 7331, 7336, 0, 7341, 7346, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 7351, 0, 0, 0,
- 0, 0, 0, 7356, 7361, 0, 7366, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 7371, 0, 7376, 0,
- 7381, 0, 7386, 0, 7391, 0, 7396, 0,
- 7401, 0, 7406, 0, 7411, 0, 7416, 0,
- 7421, 0, 7426, 0, 0, 7431, 0, 7436,
- 0, 7441, 0, 0, 0, 0, 0, 0,
- 7446, 7451, 0, 7456, 7461, 0, 7466, 7471,
- 0, 7476, 7481, 0, 7486, 7491, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 7496, 0, 0, 7501,
- 7506, 7511, 7516, 0, 0, 0, 7521, 0,
-};
-
-static const Q_UINT16 di_31[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 7526, 7530, 7534, 7538, 7542, 7546, 7550,
- 7554, 7558, 7562, 7566, 7570, 7574, 7578, 7582,
- 7586, 7590, 7594, 7598, 7602, 7606, 7610, 7614,
- 7618, 7622, 7626, 7630, 7634, 7638, 7642, 7646,
- 7650, 7654, 7658, 7662, 7666, 7670, 7674, 7678,
- 7682, 7686, 7690, 7694, 7698, 7702, 7706, 7710,
- 7714, 7718, 7722, 7726, 7730, 7734, 7738, 7742,
- 7746, 7750, 7754, 7758, 7762, 7766, 7770, 7774,
- 7778, 7782, 7786, 7790, 7794, 7798, 7802, 7806,
- 7810, 7814, 7818, 7822, 7826, 7830, 7834, 7838,
- 7842, 7846, 7850, 7854, 7858, 7862, 7866, 7870,
- 7874, 7878, 7882, 7886, 7890, 7894, 7898, 0,
- 0, 0, 7902, 7906, 7910, 7914, 7918, 7922,
- 7926, 7930, 7934, 7938, 7942, 7946, 7950, 7954,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT16 di_32[] = {
- 7958, 7964, 7970, 7976, 7982, 7988, 7994, 8000,
- 8006, 8012, 8018, 8024, 8030, 8036, 8042, 8049,
- 8056, 8063, 8070, 8077, 8084, 8091, 8098, 8105,
- 8112, 8119, 8126, 8133, 8140, 0, 0, 0,
- 8147, 8153, 8159, 8165, 8171, 8177, 8183, 8189,
- 8195, 8201, 8207, 8213, 8219, 8225, 8231, 8237,
- 8243, 8249, 8255, 8261, 8267, 8273, 8279, 8285,
- 8291, 8297, 8303, 8309, 8315, 8321, 8327, 8333,
- 8339, 8345, 8351, 8357, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 8363, 8367, 8371, 8375, 8379, 8383, 8387, 8391,
- 8395, 8399, 8403, 8407, 8411, 8415, 8419, 8424,
- 8429, 8434, 8439, 8444, 8449, 8454, 8459, 8464,
- 8469, 8474, 8479, 8484, 0, 0, 0, 0,
- 8489, 8493, 8497, 8501, 8505, 8509, 8513, 8517,
- 8521, 8525, 8529, 8533, 8537, 8541, 8545, 8549,
- 8553, 8557, 8561, 8565, 8569, 8573, 8577, 8581,
- 8585, 8589, 8593, 8597, 8601, 8605, 8609, 8613,
- 8617, 8621, 8625, 8629, 8633, 8637, 8641, 8645,
- 8649, 8653, 8657, 8661, 8665, 8669, 8673, 8677,
- 8681, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 8685, 8690, 8695, 8700, 8705, 8710, 8715, 8720,
- 8725, 8730, 8736, 8742, 0, 0, 0, 0,
- 8748, 8752, 8756, 8760, 8764, 8768, 8772, 8776,
- 8780, 8784, 8788, 8792, 8796, 8800, 8804, 8808,
- 8812, 8816, 8820, 8824, 8828, 8832, 8836, 8840,
- 8844, 8848, 8852, 8856, 8860, 8864, 8868, 8872,
- 8876, 8880, 8884, 8888, 8892, 8896, 8900, 8904,
- 8908, 8912, 8916, 8920, 8924, 8928, 8932, 0,
-};
-
-static const Q_UINT16 di_33[] = {
- 8936, 8943, 8950, 8957, 8963, 8970, 8976, 8982,
- 8990, 8997, 9003, 9009, 9015, 9022, 9029, 9035,
- 9041, 9046, 9052, 9059, 9066, 9071, 9079, 9088,
- 9096, 9102, 9110, 9118, 9125, 9131, 9137, 9143,
- 9150, 9158, 9165, 9171, 9177, 9183, 9188, 9193,
- 9198, 9203, 9209, 9215, 9223, 9229, 9236, 9244,
- 9250, 9255, 9260, 9268, 9275, 9283, 9289, 9297,
- 9302, 9308, 9314, 9320, 9326, 9332, 9339, 9345,
- 9350, 9356, 9362, 9368, 9375, 9381, 9387, 9393,
- 9401, 9408, 9413, 9421, 9426, 9433, 9440, 9446,
- 9452, 9458, 9465, 9470, 9476, 9483, 9488, 9496,
- 9502, 9507, 9512, 9517, 9522, 9527, 9532, 9537,
- 9542, 9547, 9552, 9558, 9564, 9570, 9576, 9582,
- 9588, 9594, 9600, 9606, 9612, 9618, 9624, 9630,
- 9636, 9642, 9648, 9653, 9658, 9664, 9669, 0,
- 0, 0, 0, 9674, 9679, 9684, 9689, 9694,
- 9701, 9706, 9711, 9716, 9721, 9726, 9731, 9736,
- 9741, 9747, 9754, 9759, 9764, 9769, 9774, 9779,
- 9784, 9789, 9795, 9801, 9807, 9813, 9818, 9823,
- 9828, 9833, 9838, 9843, 9848, 9853, 9858, 9863,
- 9869, 9875, 9880, 9886, 9892, 9898, 9903, 9909,
- 9915, 9922, 9927, 9933, 9939, 9945, 9951, 9959,
- 9968, 9973, 9978, 9983, 9988, 9993, 9998, 10003,
- 10008, 10013, 10018, 10023, 10028, 10033, 10038, 10043,
- 10048, 10053, 10058, 10065, 10070, 10075, 10080, 10087,
- 10093, 10098, 10103, 10108, 10113, 10118, 10123, 10128,
- 10133, 10138, 10143, 10149, 10154, 10159, 10165, 10171,
- 10176, 10183, 10189, 10194, 10199, 10204, 0, 0,
- 10209, 10214, 10219, 10224, 10229, 10234, 10239, 10244,
- 10249, 10254, 10260, 10266, 10272, 10278, 10284, 10290,
- 10296, 10302, 10308, 10314, 10320, 10326, 10332, 10338,
- 10344, 10350, 10356, 10362, 10368, 10374, 10380, 0,
-};
-
-static const Q_UINT16 di_F9[] = {
- 10386, 10390, 10394, 10398, 10402, 10406, 10410, 10414,
- 10418, 10422, 10426, 10430, 10434, 10438, 10442, 10446,
- 10450, 10454, 10458, 10462, 10466, 10470, 10474, 10478,
- 10482, 10486, 10490, 10494, 10498, 10502, 10506, 10510,
- 10514, 10518, 10522, 10526, 10530, 10534, 10538, 10542,
- 10546, 10550, 10554, 10558, 10562, 10566, 10570, 10574,
- 10578, 10582, 10586, 10590, 10594, 10598, 10602, 10606,
- 10610, 10614, 10618, 10622, 10626, 10630, 10634, 10638,
- 10642, 10646, 10650, 10654, 10658, 10662, 10666, 10670,
- 10674, 10678, 10682, 10686, 10690, 10694, 10698, 10702,
- 10706, 10710, 10714, 10718, 10722, 10726, 10730, 10734,
- 10738, 10742, 10746, 10750, 10754, 10758, 10762, 10766,
- 10770, 10774, 10778, 10782, 10786, 10790, 10794, 10798,
- 10802, 10806, 10810, 10814, 10818, 10822, 10826, 10830,
- 10834, 10838, 10842, 10846, 10850, 10854, 10858, 10862,
- 10866, 10870, 10874, 10878, 10882, 10886, 10890, 10894,
- 10898, 10902, 10906, 10910, 10914, 10918, 10922, 10926,
- 10930, 10934, 10938, 10942, 10946, 10950, 10954, 10958,
- 10962, 10966, 10970, 10974, 10978, 10982, 10986, 10990,
- 10994, 10998, 11002, 11006, 11010, 11014, 11018, 11022,
- 11026, 11030, 11034, 11038, 11042, 11046, 11050, 11054,
- 11058, 11062, 11066, 11070, 11074, 11078, 11082, 11086,
- 11090, 11094, 11098, 11102, 11106, 11110, 11114, 11118,
- 11122, 11126, 11130, 11134, 11138, 11142, 11146, 11150,
- 11154, 11158, 11162, 11166, 11170, 11174, 11178, 11182,
- 11186, 11190, 11194, 11198, 11202, 11206, 11210, 11214,
- 11218, 11222, 11226, 11230, 11234, 11238, 11242, 11246,
- 11250, 11254, 11258, 11262, 11266, 11270, 11274, 11278,
- 11282, 11286, 11290, 11294, 11298, 11302, 11306, 11310,
- 11314, 11318, 11322, 11326, 11330, 11334, 11338, 11342,
- 11346, 11350, 11354, 11358, 11362, 11366, 11370, 11374,
- 11378, 11382, 11386, 11390, 11394, 11398, 11402, 11406,
-};
-
-static const Q_UINT16 di_FA[] = {
- 11410, 11414, 11418, 11422, 11426, 11430, 11434, 11438,
- 11442, 11446, 11450, 11454, 11458, 11462, 0, 0,
- 11466, 0, 11470, 0, 0, 11474, 11478, 11482,
- 11486, 11490, 11494, 11498, 11502, 11506, 11510, 0,
- 11514, 0, 11518, 0, 0, 11522, 11526, 0,
- 0, 0, 11530, 11534, 11538, 11542, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT16 di_FB[] = {
- 11546, 11551, 11556, 11561, 11567, 11573, 11578, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 11583, 11588, 11593, 11598, 11603,
- 0, 0, 0, 0, 0, 11608, 0, 11613,
- 11618, 11622, 11626, 11630, 11634, 11638, 11642, 11646,
- 11650, 11654, 11658, 11663, 11668, 11673, 11678, 11683,
- 11688, 11693, 11698, 11703, 11708, 11713, 11718, 0,
- 11723, 11728, 11733, 11738, 11743, 0, 11748, 0,
- 11753, 11758, 0, 11763, 11768, 0, 11773, 11778,
- 11783, 11788, 11793, 11798, 11803, 11808, 11813, 11818,
- 11823, 11827, 11831, 11835, 11839, 11843, 11847, 11851,
- 11855, 11859, 11863, 11867, 11871, 11875, 11879, 11883,
- 11887, 11891, 11895, 11899, 11903, 11907, 11911, 11915,
- 11919, 11923, 11927, 11931, 11935, 11939, 11943, 11947,
- 11951, 11955, 11959, 11963, 11967, 11971, 11975, 11979,
- 11983, 11987, 11991, 11995, 11999, 12003, 12007, 12011,
- 12015, 12019, 12023, 12027, 12031, 12035, 12039, 12043,
- 12047, 12051, 12055, 12059, 12063, 12067, 12071, 12075,
- 12079, 12083, 12087, 12091, 12095, 12099, 12103, 12107,
- 12111, 12115, 12119, 12123, 12127, 12131, 12135, 12139,
- 12143, 12147, 12151, 12155, 12159, 12163, 12167, 12171,
- 12175, 12179, 12183, 12187, 12191, 12195, 12199, 12203,
- 12207, 12211, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 12215, 12219, 12223, 12227, 12231,
- 12235, 12239, 12243, 12247, 12251, 12255, 12259, 12263,
- 12267, 12271, 12275, 12279, 12283, 12287, 12291, 12295,
- 12299, 12303, 12307, 12312, 12317, 12322, 12327, 12332,
- 12337, 12342, 12347, 12352, 12357, 12362, 12367, 12372,
- 12377, 12382, 12387, 12392, 12397, 12401, 12405, 12409,
-};
-
-static const Q_UINT16 di_FC[] = {
- 12413, 12418, 12423, 12428, 12433, 12438, 12443, 12448,
- 12453, 12458, 12463, 12468, 12473, 12478, 12483, 12488,
- 12493, 12498, 12503, 12508, 12513, 12518, 12523, 12528,
- 12533, 12538, 12543, 12548, 12553, 12558, 12563, 12568,
- 12573, 12578, 12583, 12588, 12593, 12598, 12603, 12608,
- 12613, 12618, 12623, 12628, 12633, 12638, 12643, 12648,
- 12653, 12658, 12663, 12668, 12673, 12678, 12683, 12688,
- 12693, 12698, 12703, 12708, 12713, 12718, 12723, 12728,
- 12733, 12738, 12743, 12748, 12753, 12758, 12763, 12768,
- 12773, 12778, 12783, 12788, 12793, 12798, 12803, 12808,
- 12813, 12818, 12823, 12828, 12833, 12838, 12843, 12848,
- 12853, 12858, 12863, 12868, 12873, 12878, 12883, 12889,
- 12895, 12901, 12907, 12913, 12919, 12924, 12929, 12934,
- 12939, 12944, 12949, 12954, 12959, 12964, 12969, 12974,
- 12979, 12984, 12989, 12994, 12999, 13004, 13009, 13014,
- 13019, 13024, 13029, 13034, 13039, 13044, 13049, 13054,
- 13059, 13064, 13069, 13074, 13079, 13084, 13089, 13094,
- 13099, 13104, 13109, 13114, 13119, 13124, 13129, 13134,
- 13139, 13144, 13149, 13154, 13159, 13164, 13169, 13174,
- 13179, 13184, 13189, 13194, 13199, 13204, 13209, 13214,
- 13219, 13224, 13229, 13234, 13239, 13244, 13249, 13254,
- 13259, 13264, 13269, 13274, 13279, 13284, 13289, 13294,
- 13299, 13304, 13309, 13314, 13319, 13324, 13329, 13334,
- 13339, 13344, 13349, 13354, 13359, 13364, 13369, 13374,
- 13379, 13384, 13389, 13394, 13399, 13404, 13409, 13414,
- 13419, 13424, 13429, 13434, 13439, 13444, 13449, 13454,
- 13459, 13464, 13469, 13474, 13479, 13484, 13489, 13494,
- 13499, 13504, 13509, 13514, 13519, 13524, 13529, 13534,
- 13539, 13544, 13549, 13554, 13559, 13564, 13569, 13574,
- 13579, 13584, 13589, 13594, 13599, 13604, 13609, 13614,
- 13619, 13624, 13629, 13635, 13641, 13647, 13652, 13657,
- 13662, 13667, 13672, 13677, 13682, 13687, 13692, 13697,
-};
-
-static const Q_UINT16 di_FD[] = {
- 13702, 13707, 13712, 13717, 13722, 13727, 13732, 13737,
- 13742, 13747, 13752, 13757, 13762, 13767, 13772, 13777,
- 13782, 13787, 13792, 13797, 13802, 13807, 13812, 13817,
- 13822, 13827, 13832, 13837, 13842, 13847, 13852, 13857,
- 13862, 13867, 13872, 13877, 13882, 13887, 13892, 13897,
- 13902, 13907, 13912, 13917, 13922, 13927, 13932, 13937,
- 13942, 13947, 13952, 13957, 13962, 13967, 13972, 13977,
- 13982, 13987, 13992, 13997, 14002, 14007, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 14012, 14018, 14024, 14030, 14036, 14042, 14048, 14054,
- 14060, 14066, 14072, 14078, 14084, 14090, 14096, 14102,
- 14108, 14114, 14120, 14126, 14132, 14138, 14144, 14150,
- 14156, 14162, 14168, 14174, 14180, 14186, 14192, 14198,
- 14204, 14210, 14216, 14222, 14228, 14234, 14240, 14246,
- 14252, 14258, 14264, 14270, 14276, 14282, 14288, 14294,
- 14300, 14306, 14312, 14318, 14324, 14330, 14336, 14342,
- 14348, 14354, 14360, 14366, 14372, 14378, 14384, 14390,
- 0, 0, 14396, 14402, 14408, 14414, 14420, 14426,
- 14432, 14438, 14444, 14450, 14456, 14462, 14468, 14474,
- 14480, 14486, 14492, 14498, 14504, 14510, 14516, 14522,
- 14528, 14534, 14540, 14546, 14552, 14558, 14564, 14570,
- 14576, 14582, 14588, 14594, 14600, 14606, 14612, 14618,
- 14624, 14630, 14636, 14642, 14648, 14654, 14660, 14666,
- 14672, 14678, 14684, 14690, 14696, 14702, 14708, 14714,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 14720, 14726, 14732, 14739, 14746, 14753, 14760, 14767,
- 14774, 14781, 14787, 14808, 0, 0, 0, 0,
-};
-
-static const Q_UINT16 di_FE[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 14819, 14823, 14827, 14831, 14835, 14839, 14843, 14847,
- 14851, 14855, 14859, 14863, 14867, 14871, 14875, 14879,
- 14883, 14887, 14891, 14895, 14899, 0, 0, 0,
- 0, 14903, 14907, 14911, 14915, 14919, 14923, 14927,
- 14931, 14935, 14939, 0, 14943, 14947, 14951, 14955,
- 14959, 14963, 14967, 14971, 14975, 14979, 14983, 14987,
- 14991, 14995, 14999, 15003, 15007, 15011, 15015, 0,
- 15019, 15023, 15027, 15031, 0, 0, 0, 0,
- 15035, 15040, 15045, 0, 15050, 0, 15055, 15060,
- 15065, 15070, 15075, 15080, 15085, 15090, 15095, 15100,
- 15105, 15109, 15113, 15117, 15121, 15125, 15129, 15133,
- 15137, 15141, 15145, 15149, 15153, 15157, 15161, 15165,
- 15169, 15173, 15177, 15181, 15185, 15189, 15193, 15197,
- 15201, 15205, 15209, 15213, 15217, 15221, 15225, 15229,
- 15233, 15237, 15241, 15245, 15249, 15253, 15257, 15261,
- 15265, 15269, 15273, 15277, 15281, 15285, 15289, 15293,
- 15297, 15301, 15305, 15309, 15313, 15317, 15321, 15325,
- 15329, 15333, 15337, 15341, 15345, 15349, 15353, 15357,
- 15361, 15365, 15369, 15373, 15377, 15381, 15385, 15389,
- 15393, 15397, 15401, 15405, 15409, 15413, 15417, 15421,
- 15425, 15429, 15433, 15437, 15441, 15445, 15449, 15453,
- 15457, 15461, 15465, 15469, 15473, 15477, 15481, 15485,
- 15489, 15493, 15497, 15501, 15505, 15509, 15513, 15517,
- 15521, 15525, 15529, 15533, 15537, 15541, 15545, 15549,
- 15553, 15557, 15561, 15565, 15569, 15573, 15578, 15583,
- 15588, 15593, 15598, 15603, 15608, 0, 0, 0,
-};
-
-static const Q_UINT16 di_FF[] = {
- 0, 15613, 15617, 15621, 15625, 15629, 15633, 15637,
- 15641, 15645, 15649, 15653, 15657, 15661, 15665, 15669,
- 15673, 15677, 15681, 15685, 15689, 15693, 15697, 15701,
- 15705, 15709, 15713, 15717, 15721, 15725, 15729, 15733,
- 15737, 15741, 15745, 15749, 15753, 15757, 15761, 15765,
- 15769, 15773, 15777, 15781, 15785, 15789, 15793, 15797,
- 15801, 15805, 15809, 15813, 15817, 15821, 15825, 15829,
- 15833, 15837, 15841, 15845, 15849, 15853, 15857, 15861,
- 15865, 15869, 15873, 15877, 15881, 15885, 15889, 15893,
- 15897, 15901, 15905, 15909, 15913, 15917, 15921, 15925,
- 15929, 15933, 15937, 15941, 15945, 15949, 15953, 15957,
- 15961, 15965, 15969, 15973, 15977, 15981, 15985, 0,
- 0, 15989, 15993, 15997, 16001, 16005, 16009, 16013,
- 16017, 16021, 16025, 16029, 16033, 16037, 16041, 16045,
- 16049, 16053, 16057, 16061, 16065, 16069, 16073, 16077,
- 16081, 16085, 16089, 16093, 16097, 16101, 16105, 16109,
- 16113, 16117, 16121, 16125, 16129, 16133, 16137, 16141,
- 16145, 16149, 16153, 16157, 16161, 16165, 16169, 16173,
- 16177, 16181, 16185, 16189, 16193, 16197, 16201, 16205,
- 16209, 16213, 16217, 16221, 16225, 16229, 16233, 16237,
- 16241, 16245, 16249, 16253, 16257, 16261, 16265, 16269,
- 16273, 16277, 16281, 16285, 16289, 16293, 16297, 16301,
- 16305, 16309, 16313, 16317, 16321, 16325, 16329, 16333,
- 16337, 16341, 16345, 16349, 16353, 16357, 16361, 0,
- 0, 0, 16365, 16369, 16373, 16377, 16381, 16385,
- 0, 0, 16389, 16393, 16397, 16401, 16405, 16409,
- 0, 0, 16413, 16417, 16421, 16425, 16429, 16433,
- 0, 0, 16437, 16441, 16445, 0, 0, 0,
- 16449, 16453, 16457, 16461, 16465, 16469, 16473, 0,
- 16477, 16481, 16485, 16489, 16493, 16497, 16501, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT16 * const decomposition_info[256] = {
- di_00, di_01, di_02, di_03, di_04, di_05, di_06, di_07,
- di_07, di_09, di_0A, di_0B, di_0C, di_0D, di_0E, di_0F,
- di_10, di_07, di_07, di_07, di_07, di_07, di_07, di_07,
- di_07, di_07, di_07, di_07, di_07, di_07, di_1E, di_1F,
- di_20, di_21, di_22, di_23, di_24, di_07, di_07, di_07,
- di_07, di_07, di_07, di_07, di_07, di_07, di_2E, di_2F,
- di_30, di_31, di_32, di_33, di_07, di_07, di_07, di_07,
- di_07, di_07, di_07, di_07, di_07, di_07, di_07, di_07,
- di_07, di_07, di_07, di_07, di_07, di_07, di_07, di_07,
- di_07, di_07, di_07, di_07, di_07, di_07, di_07, di_07,
- di_07, di_07, di_07, di_07, di_07, di_07, di_07, di_07,
- di_07, di_07, di_07, di_07, di_07, di_07, di_07, di_07,
- di_07, di_07, di_07, di_07, di_07, di_07, di_07, di_07,
- di_07, di_07, di_07, di_07, di_07, di_07, di_07, di_07,
- di_07, di_07, di_07, di_07, di_07, di_07, di_07, di_07,
- di_07, di_07, di_07, di_07, di_07, di_07, di_07, di_07,
- di_07, di_07, di_07, di_07, di_07, di_07, di_07, di_07,
- di_07, di_07, di_07, di_07, di_07, di_07, di_07, di_07,
- di_07, di_07, di_07, di_07, di_07, di_07, di_07, di_07,
- di_07, di_07, di_07, di_07, di_07, di_07, di_07, di_07,
- di_07, di_07, di_07, di_07, di_07, di_07, di_07, di_07,
- di_07, di_07, di_07, di_07, di_07, di_07, di_07, di_07,
- di_07, di_07, di_07, di_07, di_07, di_07, di_07, di_07,
- di_07, di_07, di_07, di_07, di_07, di_07, di_07, di_07,
- di_07, di_07, di_07, di_07, di_07, di_07, di_07, di_07,
- di_07, di_07, di_07, di_07, di_07, di_07, di_07, di_07,
- di_07, di_07, di_07, di_07, di_07, di_07, di_07, di_07,
- di_07, di_07, di_07, di_07, di_07, di_07, di_07, di_07,
- di_07, di_07, di_07, di_07, di_07, di_07, di_07, di_07,
- di_07, di_07, di_07, di_07, di_07, di_07, di_07, di_07,
- di_07, di_07, di_07, di_07, di_07, di_07, di_07, di_07,
- di_07, di_F9, di_FA, di_FB, di_FC, di_FD, di_FE, di_FF,
-};
-// 68080 bytes
-
-static const Q_UINT16 ligature_map [] = {
- 0,
- 12883, 12889, 12895, 12901, 12907, 12913, 15035, 15045, 15050, 15055, 15065, 15075, 15085, 15095, 0,
- 5503, 0,
- 5488, 0,
- 5508, 0,
- 67, 72, 77, 82, 87, 92, 332, 342, 352, 966, 1196, 1206, 1346, 2357, 3137, 3147, 0,
- 2367, 2377, 2387, 0,
- 97, 362, 372, 382, 392, 0,
- 402, 2407, 2417, 2427, 2437, 2447, 0,
- 102, 107, 112, 117, 412, 422, 432, 442, 452, 1216, 1226, 1356, 2477, 2487, 3257, 3267, 3277, 0,
- 2507, 0,
- 462, 472, 482, 492, 1076, 1146, 2517, 0,
- 502, 1336, 2527, 2537, 2547, 2557, 2567, 0,
- 122, 127, 132, 137, 512, 522, 532, 542, 552, 976, 1236, 1246, 2577, 3337, 3347, 0,
- 567, 0,
- 577, 1086, 2597, 2607, 2617, 0,
- 587, 597, 607, 2627, 2647, 2657, 0,
- 2667, 2677, 2687, 0,
- 142, 627, 637, 647, 1156, 2697, 2707, 2717, 2727, 0,
- 147, 152, 157, 162, 167, 662, 672, 682, 901, 986, 1096, 1256, 1266, 1386, 3357, 3367, 0,
- 2777, 2787, 0,
- 692, 702, 712, 1276, 1286, 2797, 2807, 2827, 0,
- 722, 732, 742, 752, 1316, 2837, 2847, 0,
- 762, 772, 1326, 2887, 2897, 2907, 2917, 0,
- 172, 177, 182, 187, 782, 792, 802, 812, 822, 832, 911, 996, 1296, 1306, 2927, 2937, 2947, 3477, 3487, 0,
- 2977, 2987, 0,
- 842, 2997, 3007, 3017, 3027, 3037, 0,
- 3047, 3057, 0,
- 192, 852, 862, 1406, 3067, 3547, 3557, 3567, 3577, 0,
- 867, 877, 887, 3077, 3087, 3097, 0,
- 197, 202, 207, 212, 217, 222, 337, 347, 357, 971, 1201, 1211, 1351, 2362, 3142, 3152, 0,
- 2372, 2382, 2392, 0,
- 227, 367, 377, 387, 397, 0,
- 407, 2412, 2422, 2432, 2442, 2452, 0,
- 232, 237, 242, 247, 417, 427, 437, 447, 457, 1221, 1231, 1361, 2482, 2492, 3262, 3272, 3282, 0,
- 2512, 0,
- 467, 477, 487, 497, 1081, 1151, 2522, 0,
- 507, 1341, 2532, 2542, 2552, 2562, 2572, 3107, 0,
- 252, 257, 262, 267, 517, 527, 537, 547, 981, 1241, 1251, 2582, 3342, 3352, 0,
- 572, 1126, 0,
- 582, 1091, 2602, 2612, 2622, 0,
- 592, 602, 612, 2632, 2652, 2662, 0,
- 2672, 2682, 2692, 0,
- 272, 632, 642, 652, 1161, 2702, 2712, 2722, 2732, 0,
- 277, 282, 287, 292, 297, 667, 677, 687, 906, 991, 1101, 1261, 1271, 1391, 3362, 3372, 0,
- 2782, 2792, 0,
- 697, 707, 717, 1281, 1291, 2802, 2812, 2832, 0,
- 727, 737, 747, 757, 1321, 2842, 2852, 0,
- 767, 777, 1331, 2892, 2902, 2912, 2922, 3112, 0,
- 302, 307, 312, 317, 787, 797, 807, 817, 827, 837, 916, 1001, 1301, 1311, 2932, 2942, 2952, 3482, 3492, 0,
- 2982, 2992, 0,
- 847, 3002, 3012, 3022, 3032, 3042, 3117, 0,
- 3052, 3062, 0,
- 322, 327, 857, 1411, 3072, 3122, 3552, 3562, 3572, 3582, 0,
- 872, 882, 892, 3082, 3092, 3102, 0,
- 1537, 4468, 4662, 0,
- 3157, 3167, 3177, 3187, 0,
- 1046, 0,
- 1166, 0,
- 1066, 1176, 0,
- 2397, 0,
- 3287, 3297, 3307, 3317, 0,
- 2587, 0,
- 3377, 3387, 3397, 3407, 0,
- 1376, 2737, 2747, 0,
- 1366, 0,
- 1186, 0,
- 1006, 1016, 1026, 1036, 0,
- 3162, 3172, 3182, 3192, 0,
- 1051, 0,
- 1171, 0,
- 1071, 1181, 0,
- 2402, 0,
- 3292, 3302, 3312, 3322, 0,
- 2592, 0,
- 3382, 3392, 3402, 3412, 0,
- 1381, 2742, 2752, 0,
- 1371, 0,
- 1191, 0,
- 1011, 1021, 1031, 1041, 0,
- 3207, 3217, 3227, 3237, 0,
- 3212, 3222, 3232, 3242, 0,
- 2457, 2467, 0,
- 2462, 2472, 0,
- 2757, 2767, 0,
- 2762, 2772, 0,
- 2857, 0,
- 2862, 0,
- 2867, 0,
- 2872, 0,
- 2957, 0,
- 2962, 0,
- 2967, 0,
- 2972, 0,
- 3132, 0,
- 3427, 3437, 3447, 3457, 3467, 0,
- 3432, 3442, 3452, 3462, 3472, 0,
- 3497, 3507, 3517, 3527, 3537, 0,
- 3502, 3512, 3522, 3532, 3542, 0,
- 1116, 0,
- 1106, 0,
- 1111, 0,
- 1056, 0,
- 1061, 0,
- 2497, 0,
- 2502, 0,
- 1396, 0,
- 1401, 0,
- 1121, 0,
- 1514, 0,
- 1542, 3627, 3632, 4425, 4430, 4435, 4444, 0,
- 1551, 3697, 3702, 4498, 0,
- 1556, 3767, 3772, 4507, 4516, 0,
- 1561, 1586, 3847, 3852, 4565, 4570, 4575, 0,
- 1566, 3917, 3922, 4700, 0,
- 4657, 0,
- 1571, 1591, 3987, 4638, 4643, 4648, 0,
- 1576, 4047, 4052, 4709, 4718, 0,
- 4410, 0,
- 4483, 0,
- 1596, 3587, 3592, 4087, 4390, 4395, 4405, 4415, 0,
- 1601, 3667, 3672, 4096, 0,
- 1606, 3727, 3732, 4105, 4478, 4488, 0,
- 1611, 1621, 3807, 3812, 4114, 4536, 4541, 4555, 0,
- 1631, 3887, 3892, 4123, 0,
- 4618, 4623, 0,
- 1626, 1636, 3947, 3952, 4132, 4599, 4604, 4628, 0,
- 1641, 4007, 4012, 4141, 4680, 4690, 0,
- 1581, 4546, 4560, 0,
- 1616, 4609, 4633, 0,
- 4685, 0,
- 1658, 1663, 0,
- 1703, 0,
- 1788, 1798, 0,
- 1698, 0,
- 1688, 1693, 1808, 0,
- 1778, 1828, 0,
- 1838, 0,
- 1713, 1723, 1848, 1858, 0,
- 1708, 0,
- 1868, 0,
- 1718, 1898, 1908, 1918, 0,
- 1928, 0,
- 1938, 0,
- 1888, 0,
- 1793, 1803, 0,
- 1743, 0,
- 1733, 1738, 1813, 0,
- 1783, 1833, 0,
- 1843, 0,
- 1728, 1758, 1853, 1863, 0,
- 1753, 0,
- 1873, 0,
- 1763, 1903, 1913, 1923, 0,
- 1933, 0,
- 1943, 0,
- 1893, 0,
- 1748, 0,
- 1768, 0,
- 1773, 0,
- 1818, 0,
- 1823, 0,
- 1878, 0,
- 1883, 0,
- 11678, 11683, 11688, 0,
- 11693, 11803, 0,
- 11698, 0,
- 11703, 0,
- 11708, 0,
- 11713, 11798, 0,
- 11718, 0,
- 11723, 0,
- 11608, 11728, 0,
- 11733, 0,
- 11738, 11808, 0,
- 11743, 0,
- 11748, 0,
- 11753, 0,
- 11758, 0,
- 11763, 0,
- 11768, 11813, 0,
- 11773, 0,
- 11778, 0,
- 11783, 0,
- 11658, 11663, 11788, 0,
- 11793, 0,
- 11613, 0,
- 15105, 0,
- 15109, 15113, 0,
- 15117, 15121, 0,
- 15125, 15129, 0,
- 15133, 15137, 0,
- 12307, 12312, 12317, 12322, 12327, 12332, 12337, 12342, 12347, 12352, 12357, 12362, 12367, 12372, 12377, 12382, 12387, 12392, 12413, 12418, 12423, 12428, 12433, 12919, 12924, 12929, 12934, 12939, 12944, 13174, 13179, 13184, 13189, 13194, 13534, 13539, 15141, 15145, 15149, 15153, 0,
- 14732, 14739, 1958, 1968, 14007, 14002, 1953, 15157, 15161, 0,
- 14468, 14684, 12448, 12453, 12458, 12463, 12949, 12954, 12959, 12964, 12969, 12974, 13199, 13204, 13209, 13214, 13219, 13544, 13549, 12438, 12443, 15165, 15169, 15173, 15177, 0,
- 15181, 15185, 0,
- 14012, 14018, 14024, 14030, 14036, 14042, 14048, 14054, 14474, 14480, 14486, 14492, 14498, 14504, 13229, 13234, 13239, 13244, 13559, 13554, 12468, 12473, 12478, 12483, 12488, 12493, 12979, 12984, 12989, 12994, 12999, 13004, 13224, 15189, 15193, 15197, 15201, 0,
- 12498, 12503, 12508, 12513, 13009, 13014, 13019, 13024, 13029, 13034, 13249, 13564, 13569, 15205, 15209, 15213, 15217, 0,
- 14808, 14660, 14060, 14066, 14510, 14516, 14522, 12518, 12523, 13254, 13259, 13707, 13712, 13847, 13852, 15221, 15225, 15229, 15233, 0,
- 14072, 14078, 14666, 13264, 13269, 13697, 13702, 13842, 13837, 12528, 12533, 15237, 15241, 15245, 15249, 0,
- 12538, 12543, 12548, 13274, 13279, 13717, 13722, 13857, 13862, 15253, 15257, 15261, 15265, 0,
- 15269, 15273, 0,
- 12868, 15277, 15281, 0,
- 14760, 12873, 15285, 15289, 0,
- 15293, 15297, 0,
- 14084, 14090, 14096, 14102, 14108, 14114, 14120, 14126, 14528, 14708, 13677, 13682, 13772, 13817, 13822, 13912, 13947, 13962, 13967, 13972, 12553, 12558, 12563, 12568, 13284, 13289, 13294, 13299, 13574, 13579, 15301, 15305, 15309, 15313, 0,
- 14150, 14156, 14162, 14168, 14174, 14180, 14186, 14540, 13767, 13827, 13832, 13887, 13892, 13897, 13902, 13907, 13927, 13932, 13937, 13942, 13952, 13977, 13982, 13987, 13584, 13589, 13687, 13692, 13747, 13752, 13757, 13762, 15317, 15321, 15325, 15329, 0,
- 14787, 14753, 14781, 14138, 14132, 14144, 14534, 14702, 14720, 12573, 12578, 13304, 13309, 13314, 13727, 13732, 13777, 13872, 13917, 13867, 15333, 15337, 15341, 15345, 0,
- 14192, 14198, 14204, 14546, 13319, 13324, 13329, 13334, 13737, 13742, 13782, 13877, 13882, 13922, 12583, 12588, 12593, 12598, 15349, 15353, 15357, 15361, 0,
- 14210, 14216, 14222, 14228, 13647, 13652, 13787, 13792, 13992, 13957, 12603, 12608, 13339, 15365, 15369, 15373, 15377, 0,
- 12613, 13344, 13997, 15381, 15385, 15389, 15393, 0,
- 14767, 14696, 14234, 14240, 14246, 14252, 14612, 12618, 12623, 13349, 13354, 13657, 13662, 13797, 13802, 15397, 15401, 15405, 15409, 0,
- 14258, 14264, 14270, 13359, 13364, 13667, 13672, 13812, 13807, 12628, 12633, 15413, 15417, 15421, 15425, 0,
- 13629, 13635, 13641, 15040, 15060, 15070, 15080, 15090, 15100, 0,
- 14276, 14282, 14678, 12653, 12658, 12663, 13039, 13044, 13369, 13374, 13379, 13384, 12638, 12643, 12648, 15429, 15433, 15437, 15441, 0,
- 14600, 14726, 14294, 14288, 14588, 12668, 12673, 12678, 12683, 13049, 13054, 13389, 13394, 15445, 15449, 15453, 15457, 0,
- 14618, 14642, 14690, 12703, 12708, 12713, 12718, 12723, 13059, 13064, 13069, 13074, 13079, 13399, 13404, 13409, 13414, 13419, 13594, 13599, 12688, 12693, 12698, 15461, 15465, 15469, 15473, 0,
- 14648, 14300, 14306, 14312, 14318, 14324, 14330, 14336, 14342, 14348, 14552, 14558, 14606, 14636, 12728, 12733, 12738, 12743, 12748, 12753, 13084, 13089, 13094, 13424, 13429, 13434, 13439, 13444, 13604, 15573, 15578, 15583, 15588, 15593, 15598, 15603, 15608, 15477, 15481, 15485, 15489, 0,
- 14746, 14354, 14360, 14366, 14372, 14378, 14384, 14390, 14396, 14582, 14630, 14672, 12758, 12763, 12768, 12773, 12778, 12783, 13099, 13104, 13449, 13454, 13459, 13464, 15493, 15497, 15501, 15505, 0,
- 14414, 14420, 14426, 14432, 14438, 14444, 14450, 14594, 14624, 14654, 14714, 13134, 13469, 13474, 13479, 13484, 13489, 13609, 13614, 12788, 12793, 12798, 12803, 12808, 12813, 13109, 13114, 13119, 13124, 13129, 15509, 15513, 15517, 15521, 0,
- 14402, 14408, 12823, 12828, 12833, 13494, 13504, 13499, 12818, 15525, 15529, 15533, 15537, 0,
- 14774, 1963, 15541, 15545, 0,
- 12878, 13139, 12299, 12303, 15549, 15553, 0,
- 14456, 14462, 14564, 14570, 14576, 12858, 12863, 13144, 13149, 13154, 13159, 13164, 13169, 13509, 13514, 13519, 13524, 13529, 13619, 13624, 1973, 12838, 12843, 12848, 12853, 15557, 15561, 15565, 15569, 0,
- 11823, 11827, 0,
- 12255, 0,
- 11911, 11915, 11919, 11923, 0,
- 11879, 11883, 11887, 11891, 0,
- 11831, 11835, 11839, 11843, 0,
- 11847, 11851, 11855, 11859, 0,
- 11895, 11899, 11903, 11907, 0,
- 11863, 11867, 11871, 11875, 0,
- 11975, 11979, 11983, 11987, 0,
- 11959, 11963, 11967, 11971, 0,
- 11991, 11995, 11999, 12003, 0,
- 12007, 12011, 12015, 12019, 0,
- 12047, 12051, 0,
- 12031, 12035, 0,
- 12023, 12027, 0,
- 12039, 12043, 0,
- 12063, 12067, 0,
- 12055, 12059, 0,
- 11927, 11931, 11935, 11939, 0,
- 11943, 11947, 11951, 11955, 0,
- 12071, 12075, 12079, 12083, 0,
- 12215, 12219, 12223, 12227, 0,
- 12087, 12091, 12095, 12099, 0,
- 12119, 12123, 12127, 12131, 0,
- 12103, 12107, 12111, 12115, 0,
- 12135, 12139, 0,
- 12143, 12147, 12151, 12155, 0,
- 12183, 12187, 12191, 12195, 0,
- 12159, 12163, 0,
- 2003, 12167, 12171, 12175, 12179, 0,
- 12267, 12271, 0,
- 12239, 12243, 0,
- 12231, 12235, 0,
- 12247, 12251, 0,
- 12275, 12279, 0,
- 12259, 12263, 0,
- 12397, 12401, 12405, 12409, 0,
- 12283, 12287, 12291, 12295, 0,
- 2008, 12199, 12203, 0,
- 12207, 12211, 0,
- 1998, 0,
- 2028, 0,
- 2033, 0,
- 2038, 0,
- 2043, 0,
- 2048, 0,
- 2053, 0,
- 2013, 0,
- 2058, 0,
- 2063, 0,
- 2018, 0,
- 2023, 0,
- 2078, 0,
- 2083, 0,
- 2088, 0,
- 2068, 2073, 0,
- 2103, 0,
- 2108, 0,
- 2113, 0,
- 2118, 0,
- 2093, 0,
- 2098, 0,
- 2138, 0,
- 2143, 0,
- 2123, 2128, 2133, 0,
- 2148, 0,
- 2153, 2163, 0,
- 2158, 0,
- 2168, 0,
- 2173, 0,
- 2178, 2183, 2188, 0,
- 2193, 0,
- 2198, 2208, 0,
- 2203, 0,
- 2213, 2218, 2228, 0,
- 2223, 0,
- 2282, 0,
- 2257, 0,
- 2262, 0,
- 2267, 0,
- 2272, 0,
- 2277, 0,
- 2287, 2292, 2317, 0,
- 2347, 0,
- 2322, 0,
- 2327, 0,
- 2332, 0,
- 2337, 0,
- 2342, 0,
- 2297, 0,
- 2307, 0,
- 2352, 0,
- 2637, 0,
- 2642, 0,
- 2817, 0,
- 2822, 0,
- 2877, 0,
- 2882, 0,
- 3197, 3247, 0,
- 3202, 3252, 0,
- 3327, 0,
- 3332, 0,
- 3417, 0,
- 3422, 0,
- 3597, 3607, 3617, 4150, 0,
- 3602, 3612, 3622, 4155, 0,
- 4160, 0,
- 4165, 0,
- 4170, 0,
- 4175, 0,
- 4180, 0,
- 4185, 0,
- 3637, 3647, 3657, 4190, 0,
- 3642, 3652, 3662, 4195, 0,
- 4200, 0,
- 4205, 0,
- 4210, 0,
- 4215, 0,
- 4220, 0,
- 4225, 0,
- 3677, 3687, 0,
- 3682, 3692, 0,
- 3707, 3717, 0,
- 3712, 3722, 0,
- 3737, 3747, 3757, 4230, 0,
- 3742, 3752, 3762, 4235, 0,
- 4240, 0,
- 4245, 0,
- 4250, 0,
- 4255, 0,
- 4260, 0,
- 4265, 0,
- 3777, 3787, 3797, 4270, 0,
- 3782, 3792, 3802, 4275, 0,
- 4280, 0,
- 4285, 0,
- 4290, 0,
- 4295, 0,
- 4300, 0,
- 4305, 0,
- 3817, 3827, 3837, 0,
- 3822, 3832, 3842, 0,
- 3857, 3867, 3877, 0,
- 3862, 3872, 3882, 0,
- 3897, 3907, 0,
- 3902, 3912, 0,
- 3927, 3937, 0,
- 3932, 3942, 0,
- 3957, 3967, 3977, 0,
- 3962, 3972, 3982, 0,
- 3992, 3997, 4002, 0,
- 4017, 4027, 4037, 4310, 0,
- 4022, 4032, 4042, 4315, 0,
- 4320, 0,
- 4325, 0,
- 4330, 0,
- 4335, 0,
- 4340, 0,
- 4345, 0,
- 4057, 4067, 4077, 4350, 0,
- 4062, 4072, 4082, 4355, 0,
- 4360, 0,
- 4365, 0,
- 4370, 0,
- 4375, 0,
- 4380, 0,
- 4385, 0,
- 4400, 0,
- 4473, 0,
- 4675, 0,
- 4420, 0,
- 4521, 4526, 4531, 0,
- 4493, 0,
- 4695, 0,
- 4584, 4589, 4594, 0,
- 5391, 0,
- 5396, 0,
- 5401, 0,
- 5406, 0,
- 5416, 0,
- 5411, 0,
- 5421, 0,
- 5426, 0,
- 5431, 0,
- 5436, 0,
- 5441, 0,
- 5468, 0,
- 5473, 0,
- 5478, 0,
- 5483, 0,
- 5498, 0,
- 5493, 0,
- 5513, 0,
- 5518, 0,
- 5523, 0,
- 5528, 0,
- 5533, 0,
- 5538, 0,
- 5543, 0,
- 5548, 0,
- 5593, 0,
- 5598, 0,
- 5553, 0,
- 5558, 0,
- 5563, 0,
- 5568, 0,
- 5603, 0,
- 5608, 0,
- 5573, 0,
- 5578, 0,
- 5583, 0,
- 5588, 0,
- 5613, 0,
- 5618, 0,
- 5623, 0,
- 5628, 0,
- 7351, 0,
- 7226, 0,
- 7231, 0,
- 7236, 0,
- 7241, 0,
- 7246, 0,
- 7251, 0,
- 7256, 0,
- 7261, 0,
- 7266, 0,
- 7271, 0,
- 7276, 0,
- 7281, 0,
- 7286, 0,
- 7291, 0,
- 7296, 0,
- 7301, 7306, 0,
- 7311, 7316, 0,
- 7321, 7326, 0,
- 7331, 7336, 0,
- 7341, 7346, 0,
- 7366, 0,
- 7496, 0,
- 7371, 0,
- 7376, 0,
- 7381, 0,
- 7386, 0,
- 7391, 0,
- 7396, 0,
- 7401, 0,
- 7406, 0,
- 7411, 0,
- 7416, 0,
- 7421, 0,
- 7426, 0,
- 7431, 0,
- 7436, 0,
- 7441, 0,
- 7446, 7451, 0,
- 7456, 7461, 0,
- 7466, 7471, 0,
- 7476, 7481, 0,
- 7486, 7491, 0,
- 7501, 0,
- 7506, 0,
- 7511, 0,
- 7516, 0,
- 7521, 0,
- 11668, 11673, 0,
-
-};
-
-static const Q_UINT16 li_00[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 16, 18, 20, 0,
- 0, 22, 39, 43, 49, 56, 74, 76,
- 84, 92, 108, 110, 116, 123, 127, 137,
- 154, 0, 157, 166, 174, 182, 202, 205,
- 212, 215, 225, 0, 0, 0, 0, 0,
- 0, 232, 249, 253, 259, 266, 284, 286,
- 294, 303, 318, 321, 327, 334, 338, 348,
- 365, 0, 368, 377, 385, 394, 414, 417,
- 425, 428, 439, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 446, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 450, 0, 455, 457, 459, 462,
- 0, 0, 464, 0, 0, 0, 0, 469,
- 0, 0, 0, 0, 471, 476, 480, 0,
- 482, 0, 0, 0, 484, 0, 0, 0,
- 0, 0, 489, 0, 494, 496, 498, 501,
- 0, 0, 503, 0, 0, 0, 0, 508,
- 0, 0, 0, 0, 510, 515, 519, 0,
- 521, 0, 0, 0, 523, 0, 0, 0,
-};
-
-static const Q_UINT16 li_01[] = {
- 0, 0, 528, 533, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 538, 541, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 544, 547, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 550, 552, 0, 0, 0, 0,
- 554, 556, 0, 0, 0, 0, 0, 0,
- 558, 560, 562, 564, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 566,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 568, 574, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 580,
- 586, 0, 0, 0, 0, 0, 0, 592,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 594, 596, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT16 li_02[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 598, 600,
- 602, 604, 0, 0, 0, 0, 606, 608,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 610, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT16 li_03[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 612, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 614, 0, 0, 0, 622, 0, 627,
- 0, 633, 0, 0, 0, 0, 0, 641,
- 0, 646, 0, 0, 0, 648, 0, 0,
- 0, 655, 0, 0, 661, 0, 663, 0,
- 0, 665, 0, 0, 0, 674, 0, 679,
- 0, 686, 0, 0, 0, 0, 0, 695,
- 0, 700, 0, 0, 0, 703, 0, 0,
- 0, 712, 719, 723, 0, 0, 727, 0,
- 0, 0, 729, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT16 li_04[] = {
- 0, 0, 0, 0, 0, 0, 732, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 734, 0, 0, 737, 0, 739, 743, 746,
- 748, 0, 753, 0, 0, 0, 755, 0,
- 0, 0, 0, 757, 0, 0, 0, 762,
- 0, 0, 0, 764, 0, 766, 0, 0,
- 768, 0, 0, 771, 0, 773, 777, 780,
- 782, 0, 787, 0, 0, 0, 789, 0,
- 0, 0, 0, 791, 0, 0, 0, 796,
- 0, 0, 0, 798, 0, 800, 0, 0,
- 0, 0, 0, 0, 0, 0, 802, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 804, 806, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 808, 810, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 812, 814, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT16 li_05[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 816, 820, 823, 825, 827, 829, 832, 0,
- 834, 836, 839, 841, 844, 0, 846, 0,
- 848, 850, 0, 852, 854, 0, 857, 859,
- 861, 863, 867, 0, 0, 0, 0, 0,
- 0, 0, 869, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT16 li_06[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 871, 873, 876, 879, 882, 885, 926,
- 936, 962, 965, 1003, 1021, 1041, 1057, 1071,
- 1074, 1078, 1083, 1086, 1121, 1158, 1183, 1206,
- 1224, 1232, 1252, 0, 0, 0, 0, 0,
- 1268, 1278, 1298, 1316, 1344, 1386, 1415, 1450,
- 1464, 1469, 1476, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 1506, 0, 0, 0, 0, 0, 1509,
- 0, 1511, 1516, 1521, 0, 0, 1526, 1531,
- 1536, 0, 0, 1541, 1546, 0, 1551, 1556,
- 1561, 0, 0, 0, 1564, 1567, 1570, 0,
- 0, 1573, 0, 0, 0, 0, 0, 0,
- 1576, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 1579, 0, 1584, 0,
- 0, 1589, 0, 0, 0, 1594, 0, 1599,
- 0, 1604, 0, 1609, 0, 0, 0, 0,
- 0, 0, 1614, 1617, 0, 0, 1622, 0,
- 1627, 1630, 0, 0, 0, 1636, 1639, 1642,
- 1645, 1648, 0, 1651, 1654, 0, 0, 0,
- 1659, 0, 1664, 1668, 0, 1671, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT16 li_07[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT16 li_09[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 1673, 1675, 1677,
- 0, 0, 0, 0, 1679, 0, 0, 0,
- 0, 1681, 1683, 0, 0, 0, 0, 0,
- 1685, 0, 0, 1687, 0, 0, 0, 1689,
- 1691, 0, 0, 1693, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 1695, 1697, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 1699,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 1701,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT16 li_0A[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 1704, 1706,
- 0, 0, 0, 0, 1708, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1710, 0, 0, 0, 0,
- 0, 0, 1712, 0, 0, 0, 0, 0,
- 1714, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT16 li_0B[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 1716, 1718, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 1720,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 1724, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 1726, 1729,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT16 li_0C[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 1731, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 1733,
- 0, 0, 0, 0, 0, 0, 1735, 0,
- 0, 0, 1739, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT16 li_0D[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 1741, 1744,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 1746, 0, 0, 1750, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT16 li_0F[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 1752, 0, 1754, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 1756, 0, 0, 0,
- 0, 1758, 0, 0, 0, 0, 1760, 0,
- 0, 0, 0, 1762, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 1764, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 1768, 0, 1770, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 1772, 0, 0, 0,
- 0, 1774, 0, 0, 0, 0, 1776, 0,
- 0, 0, 0, 1778, 0, 0, 0, 0,
- 0, 0, 1780, 1782, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT16 li_10[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 1784, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT16 li_1E[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 1786, 1788,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 1790, 1792, 0, 0, 0, 0,
- 0, 0, 1794, 1796, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 1798, 1801, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 1804, 1806, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 1808, 1810, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT16 li_1F[] = {
- 1812, 1817, 1822, 1824, 1826, 1828, 1830, 1832,
- 1834, 1839, 1844, 1846, 1848, 1850, 1852, 1854,
- 1856, 1859, 0, 0, 0, 0, 0, 0,
- 1862, 1865, 0, 0, 0, 0, 0, 0,
- 1868, 1873, 1878, 1880, 1882, 1884, 1886, 1888,
- 1890, 1895, 1900, 1902, 1904, 1906, 1908, 1910,
- 1912, 1916, 0, 0, 0, 0, 0, 0,
- 1920, 1924, 0, 0, 0, 0, 0, 0,
- 1928, 1931, 0, 0, 0, 0, 0, 0,
- 1934, 1937, 0, 0, 0, 0, 0, 0,
- 1940, 1944, 0, 0, 0, 0, 0, 0,
- 0, 1948, 0, 0, 0, 0, 0, 0,
- 1952, 1957, 1962, 1964, 1966, 1968, 1970, 1972,
- 1974, 1979, 1984, 1986, 1988, 1990, 1992, 1994,
- 1996, 0, 0, 0, 1998, 0, 0, 0,
- 0, 0, 0, 0, 2000, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 2002, 0,
- 0, 0, 0, 0, 0, 0, 0, 2004,
- 0, 0, 0, 0, 0, 0, 2008, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 2010, 0,
- 0, 0, 0, 0, 0, 0, 2012, 0,
-};
-
-static const Q_UINT16 li_21[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 2016, 0, 2018, 0, 2020, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 2022, 0, 2024, 0, 2026, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT16 li_22[] = {
- 0, 0, 0, 2028, 0, 0, 0, 0,
- 2030, 0, 0, 2032, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 2034, 0, 2036, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 2038, 0, 0, 0,
- 0, 0, 0, 2040, 0, 2042, 0, 0,
- 2044, 0, 0, 0, 0, 2046, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 2048, 0, 0, 2050, 2052, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 2054, 2056, 0, 0, 2058, 2060,
- 0, 0, 2062, 2064, 2066, 2068, 0, 0,
- 0, 0, 2070, 2072, 0, 0, 2074, 2076,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 2078, 2080, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 2082, 0, 0, 0, 0, 0,
- 2084, 2086, 0, 2088, 0, 0, 0, 0,
- 0, 0, 2090, 2092, 2094, 2096, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT16 li_30[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 2098, 0,
- 0, 0, 0, 2100, 0, 2102, 0, 2104,
- 0, 2106, 0, 2108, 0, 2110, 0, 2112,
- 0, 2114, 0, 2116, 0, 2118, 0, 2120,
- 0, 2122, 0, 0, 2124, 0, 2126, 0,
- 2128, 0, 0, 0, 0, 0, 0, 2130,
- 0, 0, 2133, 0, 0, 2136, 0, 0,
- 2139, 0, 0, 2142, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 2145, 0, 0,
- 0, 0, 0, 0, 0, 0, 2147, 0,
- 0, 0, 0, 2149, 0, 2151, 0, 2153,
- 0, 2155, 0, 2157, 0, 2159, 0, 2161,
- 0, 2163, 0, 2165, 0, 2167, 0, 2169,
- 0, 2171, 0, 0, 2173, 0, 2175, 0,
- 2177, 0, 0, 0, 0, 0, 0, 2179,
- 0, 0, 2182, 0, 0, 2185, 0, 0,
- 2188, 0, 0, 2191, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 2194,
- 2196, 2198, 2200, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 2202, 0, 0,
-};
-
-static const Q_UINT16 li_FB[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 2204, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT16 * const ligature_info[256] = {
- li_00, li_01, li_02, li_03, li_04, li_05, li_06, li_07,
- li_07, li_09, li_0A, li_0B, li_0C, li_0D, li_07, li_0F,
- li_10, li_07, li_07, li_07, li_07, li_07, li_07, li_07,
- li_07, li_07, li_07, li_07, li_07, li_07, li_1E, li_1F,
- li_07, li_21, li_22, li_07, li_07, li_07, li_07, li_07,
- li_07, li_07, li_07, li_07, li_07, li_07, li_07, li_07,
- li_30, li_07, li_07, li_07, li_07, li_07, li_07, li_07,
- li_07, li_07, li_07, li_07, li_07, li_07, li_07, li_07,
- li_07, li_07, li_07, li_07, li_07, li_07, li_07, li_07,
- li_07, li_07, li_07, li_07, li_07, li_07, li_07, li_07,
- li_07, li_07, li_07, li_07, li_07, li_07, li_07, li_07,
- li_07, li_07, li_07, li_07, li_07, li_07, li_07, li_07,
- li_07, li_07, li_07, li_07, li_07, li_07, li_07, li_07,
- li_07, li_07, li_07, li_07, li_07, li_07, li_07, li_07,
- li_07, li_07, li_07, li_07, li_07, li_07, li_07, li_07,
- li_07, li_07, li_07, li_07, li_07, li_07, li_07, li_07,
- li_07, li_07, li_07, li_07, li_07, li_07, li_07, li_07,
- li_07, li_07, li_07, li_07, li_07, li_07, li_07, li_07,
- li_07, li_07, li_07, li_07, li_07, li_07, li_07, li_07,
- li_07, li_07, li_07, li_07, li_07, li_07, li_07, li_07,
- li_07, li_07, li_07, li_07, li_07, li_07, li_07, li_07,
- li_07, li_07, li_07, li_07, li_07, li_07, li_07, li_07,
- li_07, li_07, li_07, li_07, li_07, li_07, li_07, li_07,
- li_07, li_07, li_07, li_07, li_07, li_07, li_07, li_07,
- li_07, li_07, li_07, li_07, li_07, li_07, li_07, li_07,
- li_07, li_07, li_07, li_07, li_07, li_07, li_07, li_07,
- li_07, li_07, li_07, li_07, li_07, li_07, li_07, li_07,
- li_07, li_07, li_07, li_07, li_07, li_07, li_07, li_07,
- li_07, li_07, li_07, li_07, li_07, li_07, li_07, li_07,
- li_07, li_07, li_07, li_07, li_07, li_07, li_07, li_07,
- li_07, li_07, li_07, li_07, li_07, li_07, li_07, li_07,
- li_07, li_07, li_07, li_FB, li_07, li_07, li_07, li_07,
-};
-// 16188 bytes
-
-static const Q_UINT8 dir_00[] = {
- 18, 18, 18, 18, 18, 18, 18, 18,
- 18, 8, 7, 8, 9, 7, 18, 18,
- 18, 18, 18, 18, 18, 18, 18, 18,
- 18, 18, 18, 18, 7, 7, 7, 8,
- 9, 10, 10, 4, 4, 4, 10, 10,
- 138, 138, 10, 4, 6, 4, 6, 3,
- 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 6, 10, 138, 10, 138, 10,
- 10, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 138, 10, 138, 10, 10,
- 10, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 138, 10, 138, 10, 18,
- 18, 18, 18, 18, 18, 7, 18, 18,
- 18, 18, 18, 18, 18, 18, 18, 18,
- 18, 18, 18, 18, 18, 18, 18, 18,
- 18, 18, 18, 18, 18, 18, 18, 18,
- 6, 10, 4, 4, 4, 4, 10, 10,
- 10, 10, 0, 138, 10, 10, 10, 10,
- 4, 4, 2, 2, 10, 0, 10, 10,
- 10, 2, 0, 138, 10, 10, 10, 10,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 10,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 10,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 dir_01[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 dir_02[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 10, 10, 0, 0, 0, 0, 0,
- 0, 0, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 0, 0, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 0, 0, 0, 0, 0, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 dir_03[] = {
- 17, 17, 17, 17, 17, 17, 17, 17,
- 17, 17, 17, 17, 17, 17, 17, 17,
- 17, 17, 17, 17, 17, 17, 17, 17,
- 17, 17, 17, 17, 17, 17, 17, 17,
- 17, 17, 17, 17, 17, 17, 17, 17,
- 17, 17, 17, 17, 17, 17, 17, 17,
- 17, 17, 17, 17, 17, 17, 17, 17,
- 17, 17, 17, 17, 17, 17, 17, 17,
- 17, 17, 17, 17, 17, 17, 17, 17,
- 17, 17, 17, 17, 17, 17, 17, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 17, 17, 17, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 10, 10, 0, 0,
- 0, 0, 0, 0, 0, 0, 10, 0,
- 0, 0, 0, 0, 10, 10, 0, 10,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 dir_04[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 17, 17, 17, 17, 0,
- 17, 17, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 dir_05[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 10, 0, 0, 0, 0, 0,
- 0, 17, 17, 17, 17, 17, 17, 17,
- 17, 17, 17, 17, 17, 17, 17, 17,
- 17, 17, 0, 17, 17, 17, 17, 17,
- 17, 17, 17, 17, 17, 17, 17, 17,
- 17, 17, 17, 17, 17, 17, 17, 17,
- 17, 17, 0, 17, 17, 17, 1, 17,
- 1, 17, 17, 1, 17, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 0, 0, 0, 0, 0,
- 1, 1, 1, 1, 1, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 dir_06[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 6, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 13, 0, 0, 0, 13,
- 0, 13, 77, 77, 77, 77, 45, 77,
- 45, 77, 45, 45, 45, 45, 45, 77,
- 77, 77, 77, 45, 45, 45, 45, 45,
- 45, 45, 45, 0, 0, 0, 0, 0,
- 109, 45, 45, 45, 45, 45, 45, 45,
- 77, 77, 45, 17, 17, 17, 17, 17,
- 17, 17, 17, 17, 17, 17, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 4, 5, 5, 13, 0, 0,
- 17, 13, 77, 77, 13, 77, 77, 77,
- 45, 45, 45, 45, 45, 45, 45, 45,
- 45, 45, 45, 45, 45, 45, 45, 45,
- 77, 77, 77, 77, 77, 77, 77, 77,
- 77, 77, 77, 77, 77, 77, 77, 77,
- 77, 77, 45, 45, 45, 45, 45, 45,
- 45, 45, 45, 45, 45, 45, 45, 45,
- 45, 45, 45, 45, 45, 45, 45, 45,
- 45, 45, 45, 45, 45, 45, 45, 45,
- 45, 45, 45, 45, 45, 45, 45, 45,
- 77, 45, 77, 77, 77, 77, 77, 77,
- 77, 77, 77, 77, 45, 77, 45, 77,
- 45, 45, 77, 77, 13, 13, 17, 17,
- 17, 17, 17, 17, 17, 17, 17, 17,
- 17, 17, 17, 17, 17, 13, 13, 17,
- 17, 10, 17, 17, 17, 17, 0, 0,
- 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 45, 45, 45, 13, 13, 0,
-};
-
-static const Q_UINT8 dir_07[] = {
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 0, 18,
- 77, 17, 45, 45, 45, 77, 77, 77,
- 77, 77, 45, 45, 45, 45, 77, 45,
- 45, 45, 45, 45, 45, 45, 45, 45,
- 77, 45, 77, 45, 77, 0, 0, 0,
- 17, 17, 17, 17, 17, 17, 17, 17,
- 17, 17, 17, 17, 17, 17, 17, 17,
- 17, 17, 17, 17, 17, 17, 17, 17,
- 17, 17, 17, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 17, 17,
- 17, 17, 17, 17, 17, 17, 17, 17,
- 17, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 dir_09[] = {
- 0, 17, 17, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 17, 0, 0, 0,
- 0, 17, 17, 17, 17, 17, 17, 17,
- 17, 0, 0, 0, 0, 17, 0, 0,
- 0, 17, 17, 17, 17, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 17, 17, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 17, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 17, 0, 0, 0,
- 0, 17, 17, 17, 17, 0, 0, 0,
- 0, 0, 0, 0, 0, 17, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 17, 17, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 4, 4, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 dir_0A[] = {
- 0, 0, 17, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 17, 0, 0, 0,
- 0, 17, 17, 0, 0, 0, 0, 17,
- 17, 0, 0, 17, 17, 17, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 17, 17, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 17, 17, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 17, 0, 0, 0,
- 0, 17, 17, 17, 17, 17, 0, 17,
- 17, 0, 0, 0, 0, 17, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 dir_0B[] = {
- 0, 17, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 17, 0, 0, 17,
- 0, 17, 17, 17, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 17, 0, 0,
- 0, 0, 0, 0, 0, 0, 17, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 17, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 17, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 17, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 dir_0C[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 17, 17,
- 17, 0, 0, 0, 0, 0, 17, 17,
- 17, 0, 17, 17, 17, 17, 0, 0,
- 0, 0, 0, 0, 0, 17, 17, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 17,
- 0, 0, 0, 0, 0, 0, 17, 0,
- 0, 0, 0, 0, 17, 17, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 dir_0D[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 17, 17, 17, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 17, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 17, 0, 0, 0, 0, 0,
- 0, 0, 17, 17, 17, 0, 17, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 dir_0E[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 17, 0, 0, 17, 17, 17, 17,
- 17, 17, 17, 0, 0, 0, 0, 4,
- 0, 0, 0, 0, 0, 0, 0, 17,
- 17, 17, 17, 17, 17, 17, 17, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 17, 0, 0, 17, 17, 17, 17,
- 17, 17, 0, 17, 17, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 17, 17, 17, 17, 17, 17, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 dir_0F[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 17, 17, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 17, 0, 17,
- 0, 17, 10, 10, 10, 10, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 17, 17, 17, 17, 17, 17, 17,
- 17, 17, 17, 17, 17, 17, 17, 0,
- 17, 17, 17, 17, 17, 0, 17, 17,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 17, 17, 17, 17, 17, 17, 17, 17,
- 0, 17, 17, 17, 17, 17, 17, 17,
- 17, 17, 17, 17, 17, 17, 17, 17,
- 17, 17, 17, 17, 17, 17, 17, 17,
- 17, 17, 17, 17, 17, 17, 17, 17,
- 17, 17, 17, 17, 17, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 17, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 dir_10[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 17, 17, 17,
- 17, 0, 17, 0, 0, 0, 17, 17,
- 0, 17, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 17, 17, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 dir_16[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 9, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 10, 10, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 dir_17[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 17,
- 17, 17, 17, 17, 17, 17, 0, 0,
- 0, 0, 0, 0, 0, 0, 17, 0,
- 0, 17, 17, 17, 17, 17, 17, 17,
- 17, 17, 17, 17, 0, 0, 0, 0,
- 0, 0, 0, 4, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 dir_18[] = {
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 18, 18, 18, 18, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 17, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 dir_1F[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 10, 0, 10,
- 10, 10, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 10, 10, 10,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 10, 10, 10,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 10, 10, 10,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 10, 10, 0,
-};
-
-static const Q_UINT8 dir_20[] = {
- 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 18, 18, 18, 0, 1,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 9, 7, 11, 14, 16, 12, 15, 9,
- 4, 4, 4, 4, 4, 10, 10, 10,
- 10, 138, 138, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 138, 138, 0,
- 10, 10, 10, 10, 10, 10, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 18, 18, 18, 18, 18, 18,
- 2, 0, 0, 0, 2, 2, 2, 2,
- 2, 2, 4, 4, 10, 138, 138, 0,
- 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 4, 4, 10, 138, 138, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 17, 17, 17, 17, 17, 17, 17, 17,
- 17, 17, 17, 17, 17, 17, 17, 17,
- 17, 17, 17, 17, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 dir_21[] = {
- 10, 10, 0, 10, 10, 10, 10, 0,
- 10, 10, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 10, 0, 10, 10,
- 10, 0, 0, 0, 0, 0, 10, 10,
- 10, 10, 10, 10, 0, 10, 0, 10,
- 0, 10, 0, 0, 0, 0, 4, 0,
- 0, 0, 10, 0, 0, 0, 0, 0,
- 0, 0, 10, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 dir_22[] = {
- 10, 138, 138, 138, 138, 10, 10, 10,
- 138, 138, 138, 138, 138, 138, 10, 10,
- 10, 138, 4, 4, 10, 138, 138, 10,
- 10, 10, 138, 138, 138, 138, 10, 138,
- 138, 138, 138, 10, 138, 10, 138, 10,
- 10, 10, 10, 138, 138, 138, 138, 138,
- 138, 138, 138, 138, 10, 10, 10, 10,
- 10, 138, 10, 138, 138, 138, 138, 138,
- 138, 138, 138, 138, 138, 138, 138, 138,
- 138, 138, 138, 138, 138, 10, 10, 10,
- 10, 10, 138, 138, 138, 138, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 138,
- 138, 10, 138, 10, 138, 138, 138, 138,
- 138, 138, 138, 138, 10, 10, 138, 138,
- 138, 138, 138, 138, 138, 138, 138, 138,
- 138, 138, 138, 138, 138, 138, 138, 138,
- 138, 138, 138, 138, 138, 138, 138, 138,
- 138, 138, 138, 138, 138, 10, 10, 138,
- 138, 138, 138, 10, 10, 10, 10, 10,
- 138, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 138, 138, 10, 10, 138, 138,
- 138, 138, 138, 138, 138, 138, 138, 138,
- 138, 138, 138, 138, 138, 138, 138, 138,
- 138, 10, 10, 10, 10, 10, 138, 138,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 138, 138, 138, 138, 138, 10, 10,
- 138, 138, 10, 10, 10, 10, 138, 138,
- 138, 138, 138, 138, 138, 138, 138, 138,
- 138, 138, 138, 138, 138, 138, 138, 138,
- 138, 138, 138, 138, 138, 138, 10, 10,
- 138, 138, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 dir_23[] = {
- 10, 10, 10, 10, 10, 10, 10, 10,
- 138, 138, 138, 138, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 138, 138, 10, 10, 10, 10, 10, 10,
- 10, 138, 138, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 10, 0, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 0, 10, 10,
- 10, 10, 10, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 dir_24[] = {
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 2, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 dir_25[] = {
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 dir_26[] = {
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 0, 0, 0, 0,
- 0, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 dir_27[] = {
- 0, 10, 10, 10, 10, 0, 10, 10,
- 10, 10, 0, 0, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 0, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 0, 10, 0, 10,
- 10, 10, 10, 0, 0, 0, 10, 0,
- 10, 10, 10, 10, 10, 10, 10, 0,
- 0, 10, 10, 10, 10, 10, 10, 10,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 0, 0, 0,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 0, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 dir_28[] = {
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
-};
-
-static const Q_UINT8 dir_2E[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 0, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 dir_2F[] = {
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 dir_30[] = {
- 9, 10, 10, 10, 10, 0, 0, 0,
- 138, 138, 138, 138, 138, 138, 138, 138,
- 138, 138, 10, 10, 138, 138, 138, 138,
- 138, 138, 138, 138, 10, 10, 10, 10,
- 10, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 17, 17, 17, 17, 17, 17,
- 10, 0, 0, 0, 0, 0, 10, 10,
- 0, 0, 0, 0, 0, 0, 10, 10,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 17, 17, 10, 10, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 10, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 dir_A4[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 0, 0, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 0, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 0, 10, 10, 10, 0, 10, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 dir_FB[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 1, 17, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 4, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 0,
- 1, 1, 1, 1, 1, 0, 1, 0,
- 1, 1, 0, 1, 1, 0, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
-};
-
-static const Q_UINT8 dir_FC[] = {
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
-};
-
-static const Q_UINT8 dir_FD[] = {
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 10, 10,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 0, 0, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 0, 0, 0, 0,
-};
-
-static const Q_UINT8 dir_FE[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 17, 17, 17, 17, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 0, 0, 0,
- 0, 10, 10, 10, 10, 10, 10, 10,
- 6, 10, 6, 0, 10, 6, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 4,
- 10, 10, 4, 4, 10, 10, 10, 0,
- 10, 4, 4, 10, 0, 0, 0, 0,
- 13, 13, 13, 0, 13, 0, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 0, 0, 18,
-};
-
-static const Q_UINT8 dir_FF[] = {
- 0, 10, 10, 4, 4, 4, 10, 10,
- 10, 10, 10, 4, 6, 4, 6, 3,
- 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 6, 10, 10, 10, 10, 10,
- 10, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 10, 10, 10, 10, 10,
- 10, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 10, 10, 10, 10, 0,
- 0, 10, 10, 10, 10, 10, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 4, 4, 10, 10, 10, 4, 4, 0,
- 10, 10, 10, 10, 10, 10, 10, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 18, 18, 18, 10, 10, 0, 0,
-};
-
-static const Q_UINT8 * const direction_info[256] = {
- dir_00, dir_01, dir_02, dir_03, dir_04, dir_05, dir_06, dir_07,
- dir_01, dir_09, dir_0A, dir_0B, dir_0C, dir_0D, dir_0E, dir_0F,
- dir_10, dir_01, dir_01, dir_01, dir_01, dir_01, dir_16, dir_17,
- dir_18, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_1F,
- dir_20, dir_21, dir_22, dir_23, dir_24, dir_25, dir_26, dir_27,
- dir_28, dir_01, dir_01, dir_01, dir_01, dir_01, dir_2E, dir_2F,
- dir_30, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01,
- dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01,
- dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01,
- dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01,
- dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01,
- dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01,
- dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01,
- dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01,
- dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01,
- dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01,
- dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01,
- dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01,
- dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01,
- dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01,
- dir_01, dir_01, dir_01, dir_01, dir_A4, dir_01, dir_01, dir_01,
- dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01,
- dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01,
- dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01,
- dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01,
- dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01,
- dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01,
- dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01,
- dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01,
- dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01,
- dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01, dir_01,
- dir_01, dir_01, dir_01, dir_FB, dir_FC, dir_FD, dir_FE, dir_FF,
-};
-// 26940 bytes
-
-#endif
-
-// END OF GENERATED DATA
-
-// This is generated too. Script?
-
-#ifndef QT_NO_UNICODETABLES
-
-static const Q_UINT16 case_0 [] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
- 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
- 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
- 0x78, 0x79, 0x7a, 0, 0, 0, 0, 0,
- 0, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
- 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
- 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57,
- 0x58, 0x59, 0x5a, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0x0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0x0, 0, 0,
- 0, 0, 0x0, 0, 0, 0, 0, 0,
- 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7,
- 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
- 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0,
- 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0x0,
- 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
- 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
- 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0,
- 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0x178,
-};
-
-static const Q_UINT16 case_1 [] = {
- 0x101, 0x100, 0x103, 0x102, 0x105, 0x104, 0x107, 0x106,
- 0x109, 0x108, 0x10b, 0x10a, 0x10d, 0x10c, 0x10f, 0x10e,
- 0x111, 0x110, 0x113, 0x112, 0x115, 0x114, 0x117, 0x116,
- 0x119, 0x118, 0x11b, 0x11a, 0x11d, 0x11c, 0x11f, 0x11e,
- 0x121, 0x120, 0x123, 0x122, 0x125, 0x124, 0x127, 0x126,
- 0x129, 0x128, 0x12b, 0x12a, 0x12d, 0x12c, 0x12f, 0x12e,
- 0x69, 0x49, 0x133, 0x132, 0x135, 0x134, 0x137, 0x136,
- 0x0, 0x13a, 0x139, 0x13c, 0x13b, 0x13e, 0x13d, 0x140,
- 0x13f, 0x142, 0x141, 0x144, 0x143, 0x146, 0x145, 0x148,
- 0x147, 0x0, 0x14b, 0x14a, 0x14d, 0x14c, 0x14f, 0x14e,
- 0x151, 0x150, 0x153, 0x152, 0x155, 0x154, 0x157, 0x156,
- 0x159, 0x158, 0x15b, 0x15a, 0x15d, 0x15c, 0x15f, 0x15e,
- 0x161, 0x160, 0x163, 0x162, 0x165, 0x164, 0x167, 0x166,
- 0x169, 0x168, 0x16b, 0x16a, 0x16d, 0x16c, 0x16f, 0x16e,
- 0x171, 0x170, 0x173, 0x172, 0x175, 0x174, 0x177, 0x176,
- 0xff, 0x17a, 0x179, 0x17c, 0x17b, 0x17e, 0x17d, 0x53,
- 0x0, 0x253, 0x183, 0x182, 0x185, 0x184, 0x254, 0x188,
- 0x187, 0x256, 0x257, 0x18c, 0x18b, 0x0, 0x1dd, 0x259,
- 0x25b, 0x192, 0x191, 0x260, 0x263, 0x3d9, 0x269, 0x268,
- 0x199, 0x198, 0x51, 0x0, 0x26f, 0x272, 0x0, 0x275,
- 0x1a1, 0x1a0, 0x1a3, 0x1a2, 0x1a5, 0x1a4, 0x280, 0x1a8,
- 0x1a7, 0x283, 0, 0x0, 0x1ad, 0x1ac, 0x288, 0x1b0,
- 0x1af, 0x28a, 0x28b, 0x1b4, 0x1b3, 0x1b6, 0x1b5, 0x292,
- 0x1b9, 0x1b8, 0x0, 0, 0x1bd, 0x1bc, 0, 0,
- 0, 0, 0, 0, 0x1c6, 0, 0x1c4, 0x1c9,
- 0, 0x1c7, 0x1cc, 0, 0x1ca, 0x1ce, 0x1cd, 0x1d0,
- 0x1cf, 0x1d2, 0x1d1, 0x1d4, 0x1d3, 0x1d6, 0x1d5, 0x1d8,
- 0x1d7, 0x1da, 0x1d9, 0x1dc, 0x1db, 0x18e, 0x1df, 0x1de,
- 0x1e1, 0x1e0, 0x1e3, 0x1e2, 0x1e5, 0x1e4, 0x1e7, 0x1e6,
- 0x1e9, 0x1e8, 0x1eb, 0x1ea, 0x1ed, 0x1ec, 0x1ef, 0x1ee,
- 0x0, 0x1f3, 0, 0x1f1, 0x1f5, 0x1f4, 0, 0,
- 0, 0, 0x1fb, 0x1fa, 0x1fd, 0x1fc, 0x1ff, 0x1fe,
-};
-
-static const Q_UINT16 case_2 [] = {
- 0x201, 0x200, 0x203, 0x202, 0x205, 0x204, 0x207, 0x206,
- 0x209, 0x208, 0x20b, 0x20a, 0x20d, 0x20c, 0x20f, 0x20e,
- 0x211, 0x210, 0x213, 0x212, 0x215, 0x214, 0x217, 0x216,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0x0, 0x0, 0x0, 0x181, 0x186, 0x0, 0x189, 0x18a,
- 0x0, 0x18f, 0x0, 0x190, 0x0, 0x0, 0x0, 0x0,
- 0x193, 0x0, 0x0, 0x194, 0x0, 0x0, 0x631, 0x579,
- 0x197, 0x196, 0x0, 0x0, 0x0, 0x0, 0x0, 0x19c,
- 0x0, 0x0, 0x19d, 0x0, 0x0, 0x19f, 0x0, 0x0,
- 0x0, 0x0, 0x7e1, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x1a6, 0x0, 0x0, 0x1a9, 0x0, 0x0, 0x0, 0x0,
- 0x1ae, 0x0, 0x1b1, 0x1b2, 0x0, 0xa21, 0x971, 0x0,
- 0x0, 0x0, 0x1b7, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT16 case_3 [] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0x3ac, 0,
- 0x3ad, 0x3ae, 0x3af, 0, 0x3cc, 0, 0x3cd, 0x3ce,
- 0x0, 0x3b1, 0x3b2, 0x3b3, 0x3b4, 0x3b5, 0x3b6, 0x3b7,
- 0x3b8, 0x3b9, 0x3ba, 0x3bb, 0x3bc, 0x3bd, 0x3be, 0x3bf,
- 0x3c0, 0x3c1, 0, 0x3c3, 0x3c4, 0x3c5, 0x3c6, 0x3c7,
- 0x3c8, 0x3c9, 0x3ca, 0x3cb, 0x386, 0x388, 0x389, 0x38a,
- 0x0, 0x391, 0x392, 0x393, 0x394, 0x395, 0x396, 0x397,
- 0x398, 0x399, 0x39a, 0x39b, 0x39c, 0x39d, 0x39e, 0x39f,
- 0x3a0, 0x3a1, 0x3a3, 0x3a3, 0x3a4, 0x3a5, 0x3a6, 0x3a7,
- 0x3a8, 0x3a9, 0x3aa, 0x3ab, 0x38c, 0x38e, 0x38f, 0,
- 0x392, 0x398, 0x0, 0x0, 0x0, 0x3a6, 0x3a0, 0,
- 0, 0, 0x0, 0, 0x0, 0, 0x0, 0,
- 0x0, 0, 0x3e3, 0x3e2, 0x3e5, 0x3e4, 0x3e7, 0x3e6,
- 0x3e9, 0x3e8, 0x3eb, 0x3ea, 0x3ed, 0x3ec, 0x3ef, 0x3ee,
- 0x39a, 0x3a1, 0x3a3, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT16 case_4 [] = {
- 0, 0x451, 0x452, 0x453, 0x454, 0x455, 0x456, 0x457,
- 0x458, 0x459, 0x45a, 0x45b, 0x45c, 0, 0x45e, 0x45f,
- 0x430, 0x431, 0x432, 0x433, 0x434, 0x435, 0x436, 0x437,
- 0x438, 0x439, 0x43a, 0x43b, 0x43c, 0x43d, 0x43e, 0x43f,
- 0x440, 0x441, 0x442, 0x443, 0x444, 0x445, 0x446, 0x447,
- 0x448, 0x449, 0x44a, 0x44b, 0x44c, 0x44d, 0x44e, 0x44f,
- 0x410, 0x411, 0x412, 0x413, 0x414, 0x415, 0x416, 0x417,
- 0x418, 0x419, 0x41a, 0x41b, 0x41c, 0x41d, 0x41e, 0x41f,
- 0x420, 0x421, 0x422, 0x423, 0x424, 0x425, 0x426, 0x427,
- 0x428, 0x429, 0x42a, 0x42b, 0x42c, 0x42d, 0x42e, 0x42f,
- 0, 0x401, 0x402, 0x403, 0x404, 0x405, 0x406, 0x407,
- 0x408, 0x409, 0x40a, 0x40b, 0x40c, 0, 0x40e, 0x40f,
- 0x461, 0x460, 0x463, 0x462, 0x465, 0x464, 0x467, 0x466,
- 0x469, 0x468, 0x46b, 0x46a, 0x46d, 0x46c, 0x46f, 0x46e,
- 0x471, 0x470, 0x473, 0x472, 0x475, 0x474, 0x477, 0x476,
- 0x479, 0x478, 0x47b, 0x47a, 0x47d, 0x47c, 0x47f, 0x47e,
- 0x481, 0x480, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0x491, 0x490, 0x493, 0x492, 0x495, 0x494, 0x497, 0x496,
- 0x499, 0x498, 0x49b, 0x49a, 0x49d, 0x49c, 0x49f, 0x49e,
- 0x4a1, 0x4a0, 0x4a3, 0x4a2, 0x4a5, 0x4a4, 0x4a7, 0x4a6,
- 0x4a9, 0x4a8, 0x4ab, 0x4aa, 0x4ad, 0x4ac, 0x4af, 0x4ae,
- 0x4b1, 0x4b0, 0x4b3, 0x4b2, 0x4b5, 0x4b4, 0x4b7, 0x4b6,
- 0x4b9, 0x4b8, 0x4bb, 0x4ba, 0x4bd, 0x4bc, 0x4bf, 0x4be,
- 0, 0x4c2, 0x4c1, 0x4c4, 0x4c3, 0, 0, 0x4c8,
- 0x4c7, 0, 0, 0x4cc, 0x4cb, 0, 0, 0,
- 0x4d1, 0x4d0, 0x4d3, 0x4d2, 0x4d5, 0x4d4, 0x4d7, 0x4d6,
- 0x4d9, 0x4d8, 0x4db, 0x4da, 0x4dd, 0x4dc, 0x4df, 0x4de,
- 0x4e1, 0x4e0, 0x4e3, 0x4e2, 0x4e5, 0x4e4, 0x4e7, 0x4e6,
- 0x4e9, 0x4e8, 0x4eb, 0x4ea, 0, 0, 0x4ef, 0x4ee,
- 0x4f1, 0x4f0, 0x4f3, 0x4f2, 0x4f5, 0x4f4, 0, 0,
- 0x4f9, 0x4f8, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT16 case_5 [] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0x561, 0x562, 0x563, 0x564, 0x565, 0x566, 0x567,
- 0x568, 0x569, 0x56a, 0x56b, 0x56c, 0x56d, 0x56e, 0x56f,
- 0x570, 0x571, 0x572, 0x573, 0x574, 0x575, 0x576, 0x577,
- 0x578, 0x579, 0x57a, 0x57b, 0x57c, 0x57d, 0x57e, 0x57f,
- 0x580, 0x581, 0x582, 0x583, 0x584, 0x585, 0x586, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0x531, 0x532, 0x533, 0x534, 0x535, 0x536, 0x537,
- 0x538, 0x539, 0x53a, 0x53b, 0x53c, 0x53d, 0x53e, 0x53f,
- 0x540, 0x541, 0x542, 0x543, 0x544, 0x545, 0x546, 0x547,
- 0x548, 0x549, 0x54a, 0x54b, 0x54c, 0x54d, 0x54e, 0x54f,
- 0x550, 0x551, 0x552, 0x553, 0x554, 0x555, 0x556, 0x0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT16 case_10 [] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0x10d0, 0x10d1, 0x10d2, 0x10d3, 0x10d4, 0x10d5, 0x10d6, 0x10d7,
- 0x10d8, 0x10d9, 0x10da, 0x10db, 0x10dc, 0x10dd, 0x10de, 0x10df,
- 0x10e0, 0x10e1, 0x10e2, 0x10e3, 0x10e4, 0x10e5, 0x10e6, 0x10e7,
- 0x10e8, 0x10e9, 0x10ea, 0x10eb, 0x10ec, 0x10ed, 0x10ee, 0x10ef,
- 0x10f0, 0x10f1, 0x10f2, 0x10f3, 0x10f4, 0x10f5, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT16 case_1e [] = {
- 0x1e01, 0x1e00, 0x1e03, 0x1e02, 0x1e05, 0x1e04, 0x1e07, 0x1e06,
- 0x1e09, 0x1e08, 0x1e0b, 0x1e0a, 0x1e0d, 0x1e0c, 0x1e0f, 0x1e0e,
- 0x1e11, 0x1e10, 0x1e13, 0x1e12, 0x1e15, 0x1e14, 0x1e17, 0x1e16,
- 0x1e19, 0x1e18, 0x1e1b, 0x1e1a, 0x1e1d, 0x1e1c, 0x1e1f, 0x1e1e,
- 0x1e21, 0x1e20, 0x1e23, 0x1e22, 0x1e25, 0x1e24, 0x1e27, 0x1e26,
- 0x1e29, 0x1e28, 0x1e2b, 0x1e2a, 0x1e2d, 0x1e2c, 0x1e2f, 0x1e2e,
- 0x1e31, 0x1e30, 0x1e33, 0x1e32, 0x1e35, 0x1e34, 0x1e37, 0x1e36,
- 0x1e39, 0x1e38, 0x1e3b, 0x1e3a, 0x1e3d, 0x1e3c, 0x1e3f, 0x1e3e,
- 0x1e41, 0x1e40, 0x1e43, 0x1e42, 0x1e45, 0x1e44, 0x1e47, 0x1e46,
- 0x1e49, 0x1e48, 0x1e4b, 0x1e4a, 0x1e4d, 0x1e4c, 0x1e4f, 0x1e4e,
- 0x1e51, 0x1e50, 0x1e53, 0x1e52, 0x1e55, 0x1e54, 0x1e57, 0x1e56,
- 0x1e59, 0x1e58, 0x1e5b, 0x1e5a, 0x1e5d, 0x1e5c, 0x1e5f, 0x1e5e,
- 0x1e61, 0x1e60, 0x1e63, 0x1e62, 0x1e65, 0x1e64, 0x1e67, 0x1e66,
- 0x1e69, 0x1e68, 0x1e6b, 0x1e6a, 0x1e6d, 0x1e6c, 0x1e6f, 0x1e6e,
- 0x1e71, 0x1e70, 0x1e73, 0x1e72, 0x1e75, 0x1e74, 0x1e77, 0x1e76,
- 0x1e79, 0x1e78, 0x1e7b, 0x1e7a, 0x1e7d, 0x1e7c, 0x1e7f, 0x1e7e,
- 0x1e81, 0x1e80, 0x1e83, 0x1e82, 0x1e85, 0x1e84, 0x1e87, 0x1e86,
- 0x1e89, 0x1e88, 0x1e8b, 0x1e8a, 0x1e8d, 0x1e8c, 0x1e8f, 0x1e8e,
- 0x1e91, 0x1e90, 0x1e93, 0x1e92, 0x1e95, 0x1e94, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x1e60, 0, 0, 0, 0,
- 0x1ea1, 0x1ea0, 0x1ea3, 0x1ea2, 0x1ea5, 0x1ea4, 0x1ea7, 0x1ea6,
- 0x1ea9, 0x1ea8, 0x1eab, 0x1eaa, 0x1ead, 0x1eac, 0x1eaf, 0x1eae,
- 0x1eb1, 0x1eb0, 0x1eb3, 0x1eb2, 0x1eb5, 0x1eb4, 0x1eb7, 0x1eb6,
- 0x1eb9, 0x1eb8, 0x1ebb, 0x1eba, 0x1ebd, 0x1ebc, 0x1ebf, 0x1ebe,
- 0x1ec1, 0x1ec0, 0x1ec3, 0x1ec2, 0x1ec5, 0x1ec4, 0x1ec7, 0x1ec6,
- 0x1ec9, 0x1ec8, 0x1ecb, 0x1eca, 0x1ecd, 0x1ecc, 0x1ecf, 0x1ece,
- 0x1ed1, 0x1ed0, 0x1ed3, 0x1ed2, 0x1ed5, 0x1ed4, 0x1ed7, 0x1ed6,
- 0x1ed9, 0x1ed8, 0x1edb, 0x1eda, 0x1edd, 0x1edc, 0x1edf, 0x1ede,
- 0x1ee1, 0x1ee0, 0x1ee3, 0x1ee2, 0x1ee5, 0x1ee4, 0x1ee7, 0x1ee6,
- 0x1ee9, 0x1ee8, 0x1eeb, 0x1eea, 0x1eed, 0x1eec, 0x1eef, 0x1eee,
- 0x1ef1, 0x1ef0, 0x1ef3, 0x1ef2, 0x1ef5, 0x1ef4, 0x1ef7, 0x1ef6,
- 0x1ef9, 0x1ef8, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT16 case_1f [] = {
- 0x1f08, 0x1f09, 0x1f0a, 0x1f0b, 0x1f0c, 0x1f0d, 0x1f0e, 0x1f0f,
- 0x1f00, 0x1f01, 0x1f02, 0x1f03, 0x1f04, 0x1f05, 0x1f06, 0x1f07,
- 0x1f18, 0x1f19, 0x1f1a, 0x1f1b, 0x1f1c, 0x1f1d, 0, 0,
- 0x1f10, 0x1f11, 0x1f12, 0x1f13, 0x1f14, 0x1f15, 0, 0,
- 0x1f28, 0x1f29, 0x1f2a, 0x1f2b, 0x1f2c, 0x1f2d, 0x1f2e, 0x1f2f,
- 0x1f20, 0x1f21, 0x1f22, 0x1f23, 0x1f24, 0x1f25, 0x1f26, 0x1f27,
- 0x1f38, 0x1f39, 0x1f3a, 0x1f3b, 0x1f3c, 0x1f3d, 0x1f3e, 0x1f3f,
- 0x1f30, 0x1f31, 0x1f32, 0x1f33, 0x1f34, 0x1f35, 0x1f36, 0x1f37,
- 0x1f48, 0x1f49, 0x1f4a, 0x1f4b, 0x1f4c, 0x1f4d, 0, 0,
- 0x1f40, 0x1f41, 0x1f42, 0x1f43, 0x1f44, 0x1f45, 0, 0,
- 0x0, 0x1f59, 0x0, 0x1f5b, 0x0, 0x1f5d, 0x0, 0x1f5f,
- 0, 0x1f51, 0, 0x1f53, 0, 0x1f55, 0, 0x1f57,
- 0x1f68, 0x1f69, 0x1f6a, 0x1f6b, 0x1f6c, 0x1f6d, 0x1f6e, 0x1f6f,
- 0x1f60, 0x1f61, 0x1f62, 0x1f63, 0x1f64, 0x1f65, 0x1f66, 0x1f67,
- 0x1fba, 0x1fbb, 0x1fc8, 0x1fc9, 0x1fca, 0x1fcb, 0x1fda, 0x1fdb,
- 0x1ff8, 0x1ff9, 0x1fea, 0x1feb, 0x1ffa, 0x1ffb, 0, 0,
- 0x1f88, 0x1f89, 0x1f8a, 0x1f8b, 0x1f8c, 0x1f8d, 0x1f8e, 0x1f8f,
- 0x1f80, 0x1f81, 0x1f82, 0x1f83, 0x1f84, 0x1f85, 0x1f86, 0x1f87,
- 0x1f98, 0x1f99, 0x1f9a, 0x1f9b, 0x1f9c, 0x1f9d, 0x1f9e, 0x1f9f,
- 0x1f90, 0x1f91, 0x1f92, 0x1f93, 0x1f94, 0x1f95, 0x1f96, 0x1f97,
- 0x1fa8, 0x1fa9, 0x1faa, 0x1fab, 0x1fac, 0x1fad, 0x1fae, 0x1faf,
- 0x1fa0, 0x1fa1, 0x1fa2, 0x1fa3, 0x1fa4, 0x1fa5, 0x1fa6, 0x1fa7,
- 0x1fb8, 0x1fb9, 0x0, 0x1fbc, 0x0, 0, 0x0, 0x0,
- 0x1fb0, 0x1fb1, 0x1f70, 0x1f71, 0x1fb3, 0, 0x399, 0,
- 0, 0, 0x0, 0x1fcc, 0x0, 0, 0x0, 0x0,
- 0x1f72, 0x1f73, 0x1f74, 0x1f75, 0x1fc3, 0, 0, 0,
- 0x1fd8, 0x1fd9, 0x0, 0x0, 0, 0, 0x0, 0x0,
- 0x1fd0, 0x1fd1, 0x1f76, 0x1f77, 0, 0, 0, 0,
- 0x1fe8, 0x1fe9, 0x0, 0x0, 0x0, 0x1fec, 0x0, 0x0,
- 0x1fe0, 0x1fe1, 0x1f7a, 0x1f7b, 0x1fe5, 0, 0, 0,
- 0, 0, 0x0, 0x1ffc, 0x0, 0, 0x0, 0x0,
- 0x1f78, 0x1f79, 0x1f7c, 0x1f7d, 0x1ff3, 0, 0, 0,
-};
-
-static const Q_UINT16 case_20 [] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0x0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT16 case_21 [] = {
- 0, 0, 0x0, 0, 0, 0, 0, 0x0,
- 0, 0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0, 0x0, 0, 0,
- 0x761, 0x0, 0x0, 0x0, 0x0, 0x0, 0, 0,
- 0, 0, 0, 0, 0x0, 0, 0x0, 0,
- 0x0, 0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0, 0x0, 0x0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT16 case_fb [] = {
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT16 case_ff [] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0xff41, 0xff42, 0xff43, 0xff44, 0xff45, 0xff46, 0xff47,
- 0xff48, 0xff49, 0xff4a, 0xff4b, 0xff4c, 0xff4d, 0xff4e, 0xff4f,
- 0xff50, 0xff51, 0xff52, 0xff53, 0xff54, 0xff55, 0xff56, 0xff57,
- 0xff58, 0xff59, 0xff5a, 0, 0, 0, 0, 0,
- 0, 0xff21, 0xff22, 0xff23, 0xff24, 0xff25, 0xff26, 0xff27,
- 0xff28, 0xff29, 0xff2a, 0xff2b, 0xff2c, 0xff2d, 0xff2e, 0xff2f,
- 0xff30, 0xff31, 0xff32, 0xff33, 0xff34, 0xff35, 0xff36, 0xff37,
- 0xff38, 0xff39, 0xff3a, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static const Q_UINT16 * const case_info[256] = {
-
- case_0, case_1, case_2, case_3, case_4, case_5, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- case_10, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, case_1e, case_1f,
- case_20, case_21, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, case_fb, 0, 0, 0, case_ff,
-};
-
-static const Q_INT8 num_0 [] = {
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- 0, 1, 2, 3, 4, 5, 6, 7,
- 8, 9, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 2, 3, -1, -1, -1, -1,
- -1, 1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
-};
-
-static const Q_INT8 num_6 [] = {
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- 0, 1, 2, 3, 4, 5, 6, 7,
- 8, 9, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- 0, 1, 2, 3, 4, 5, 6, 7,
- 8, 9, -1, -1, -1, -1, -1, -1,
-};
-
-static const Q_INT8 num_9 [] = {
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 0, 1,
- 2, 3, 4, 5, 6, 7, 8, 9,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 0, 1,
- 2, 3, 4, 5, 6, 7, 8, 9,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
-};
-
-static const Q_INT8 num_b [] = {
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 0, 1,
- 2, 3, 4, 5, 6, 7, 8, 9,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 1,
- 2, 3, 4, 5, 6, 7, 8, 9,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
-};
-
-static const Q_INT8 num_d [] = {
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 0, 1,
- 2, 3, 4, 5, 6, 7, 8, 9,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
-};
-
-static const Q_INT8 num_e [] = {
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- 0, 1, 2, 3, 4, 5, 6, 7,
- 8, 9, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- 0, 1, 2, 3, 4, 5, 6, 7,
- 8, 9, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
-};
-
-static const Q_INT8 num_f [] = {
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- 0, 1, 2, 3, 4, 5, 6, 7,
- 8, 9, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
-};
-
-static const Q_INT8 num_20 [] = {
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- 0, -1, -1, -1, 4, 5, 6, 7,
- 8, 9, -1, -1, -1, -1, -1, -1,
- 0, 1, 2, 3, 4, 5, 6, 7,
- 8, 9, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
-};
-
-static const Q_INT8 num_ff [] = {
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- 0, 1, 2, 3, 4, 5, 6, 7,
- 8, 9, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
-};
-
-static const Q_INT8 * const decimal_info[256] = {
- num_0, 0, 0, 0, 0, 0, num_6, 0,
- 0, num_9, num_9, num_b, num_9, num_d, num_e, num_f,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- num_20, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, num_ff,
-};
-
-static const Q_UINT16 symmetricPairs[] = {
- 0x0028, 0x0029, 0x0029, 0x0028, 0x003C, 0x003E, 0x003E, 0x003C,
- 0x005B, 0x005D, 0x005D, 0x005B, 0x007B, 0x007D, 0x007D, 0x007B,
- 0x2045, 0x2046, 0x2046, 0x2045, 0x207D, 0x207E, 0x207E, 0x207D,
- 0x208D, 0x208E, 0x208E, 0x208D, 0x3008, 0x3009, 0x3009, 0x3008,
- 0x300A, 0x300B, 0x300B, 0x300A, 0x300C, 0x300D, 0x300D, 0x300C,
- 0x300E, 0x300F, 0x300F, 0x300E, 0x3010, 0x3011, 0x3011, 0x3010,
- 0x3014, 0x3015, 0x3015, 0x3014, 0x3016, 0x3017, 0x3017, 0x3016,
- 0x3018, 0x3019, 0x3019, 0x3018, 0x301A, 0x301B, 0x301B, 0x301A,
- 0xFD3E, 0xFD3F, 0xFD3F, 0xFD3E, 0xFE59, 0xFE5A, 0xFE5A, 0xFE59,
- 0xFE5B, 0xFE5C, 0xFE5C, 0xFE5B, 0xFE5D, 0xFE5E, 0xFE5E, 0xFE5D,
- 0xFF08, 0xFF09, 0xFF09, 0xFF08, 0xFF3B, 0xFF3D, 0xFF3D, 0xFF3B,
- 0xFF5B, 0xFF5D, 0xFF5D, 0xFF5B, 0xFF62, 0xFF63, 0xFF63, 0xFF62,
-};
-
-static int symmetricPairsSize =
- sizeof(symmetricPairs)/sizeof(symmetricPairs[0]);
-
-/*
- * ----------------------------------------------------------------------
- * End of unicode tables
- * ----------------------------------------------------------------------
- */
-
-#endif
-
-
-static int ucstrcmp( const QString &as, const QString &bs )
-{
- const QChar *a = as.unicode();
- const QChar *b = bs.unicode();
- if ( a == b )
- return 0;
- if ( a == 0 )
- return 1;
- if ( b == 0 )
- return -1;
- int l=QMIN(as.length(),bs.length());
- while ( l-- && *a == *b )
- a++,b++;
- if ( l==-1 )
- return ( as.length()-bs.length() );
- return a->unicode() - b->unicode();
-}
-
-static int ucstrncmp( const QChar *a, const QChar *b, int l )
-{
- while ( l-- && *a == *b )
- a++,b++;
- if ( l==-1 )
- return 0;
- return a->unicode() - b->unicode();
-}
-
-static int ucstrnicmp( const QChar *a, const QChar *b, int l )
-{
- while ( l-- && a->lower() == b->lower() )
- a++,b++;
- if ( l==-1 )
- return 0;
- QChar al = a->lower();
- QChar bl = b->lower();
- return al.unicode() - bl.unicode();
-}
-
-// NOT REVISED
-/*! \class QCharRef qstring.h
- \brief The QCharRef class is a helper class for QString.
-
- It provides the ability to work on characters in a QString in a natural
- fashion.
-
- When you get an object of type QCharRef, you can assign to it, which
- will operate on the string from which you got it. That is its whole
- purpose in life. It becomes invalid once further modifications are
- made to the string: If you want to keep it, copy it into a QChar.
-
- Most of the QChar member functions also exist in QCharRef. However,
- they are not explicitly documented here.
-
- \sa QString::operator[]() QString::at() QChar
-*/
-
-/*! \class QChar qstring.h
-
-\brief The QChar class provides a light-weight Unicode character.
-
-Unicode characters are (so far) 16-bit entities without any markup or
-structure. This class represents such an entity. It is rather
-light-weight, so it can be used everywhere. Most compilers treat it
-approximately like "short int". (In a few years, it may be necessary
-to make QChar 32-bit, once more than 65536 Unicode code points have
-been defined and come into use.)
-
-QChar provides a full complement of testing/classification functions,
-conversion to and from other formats, from composed to decomposed
-unicode, and will try to compare and case-convert if you ask it to.
-
-The classification functions include functions like those in ctype.h,
-but operating on the full range of unicode characters. They all
-return TRUE if the character is a certain type of character, and FALSE
-otherwise.
-
-These functions are: isNull() (returns TRUE if the character is
-U+0000), isPrint() (TRUE if the character is any sort of printable
-character, including whitespace), isPunct() (any sort of punctuation),
-isMark() (Unicode Marks), isLetter (letters), isNumber() (any sort of
-numeric characters), isLetterOrNumber(), and isDigit() (decimal digits).
-All of these are wrappers around category(), which returns the
-unicode-defined category of each character.
-
-QChar further provides direction(), which indicates the "natural"
-writing direction of this character, joining(), which indicates how
-this character joins with its neighbors (needed mostly for Arabic)
-and finally mirrored(), which indicates whether this character needs
-to be mirrored when it is printed in its unnatural writing
-direction.
-
-Composed Unicode characters (like &aring;) can be converted to
-decomposed Unicode ("a" followed by "ring above") using
-decomposition().
-
-In Unicode, comparison is not necessarily possible, and case
-conversion is at best very hard. Unicode, covering the "entire"
-globe, also includes a globe-sized collection of case and sorting
-problems. Qt tries, but not very hard: operator== and friends will do
-comparison based purely on the numeric Unicode value (code point) of
-the characters, and upper() and lower() will do case changes when the
-character has a well-defined upper/lower-case equivalent. There is no
-provision for locale-dependent case folding rules or comparison: These
-functions are meant to be fast, so they can be used unambiguously in
-data structures.
-
-The conversion functions include unicode() (to a scalar), latin1() (to
-scalar, but converts all non-Latin1 characters to 0), row() (gives the
-Unicode row), cell() (gives the unicode cell), digitValue() (gives the
-integer value of any of the numerous digit characters), and a host of
-constructors.
-
-\sa QString QCharRef \link unicode.html About Unicode \endlink
-*/
-
-/*! \enum QChar::Category
-
-This enum maps the Unicode character categories. The currently known
-categories are: <ul>
-
-<li> \c NoCategory - used when Qt is dazed and confused and cannot
-make sense of anything.
-
-<li> \c Mark_NonSpacing - (Mn) -
-
-<li> \c Mark_SpacingCombining - (Mc) -
-
-<li> \c Mark_Enclosing - (Me) -
-
-<li> \c Number_DecimalDigit - (Nd) -
-
-<li> \c Number_Letter - (Nl) -
-
-<li> \c Number_Other - (No) -
-
-<li> \c Separator_Space - (Zs) -
-
-<li> \c Separator_Line - (Zl) -
-
-<li> \c Separator_Paragraph - (Zp) -
-
-<li> \c Other_Control - (Cc) -
-
-<li> \c Other_Format - (Cf) -
-
-<li> \c Other_Surrogate - (Cs) -
-
-<li> \c Other_PrivateUse - (Co) -
-
-<li> \c Other_NotAssigned - (Cn) -
-
-<li> \c Letter_Uppercase - (Lu) -
-
-<li> \c Letter_Lowercase - (Ll) -
-
-<li> \c Letter_Titlecase - (Lt) -
-
-<li> \c Letter_Modifier - (Lm) -
-
-<li> \c Letter_Other - (Lo) -
-
-<li> \c Punctuation_Connector - (Pc) -
-
-<li> \c Punctuation_Dask - (Pd) -
-
-<li> \c Punctuation_Open - (Ps) -
-
-<li> \c Punctuation_Close - (Pe) -
-
-<li> \c Punctuation_InitialQuote - (Pi) -
-
-<li> \c Punctuation_FinalQuote - (Pf) -
-
-<li> \c Punctuation_Other - (Po) -
-
-<li> \c Symbol_Math - (Sm) -
-
-<li> \c Symbol_Currency - (Sc) -
-
-<li> \c Symbol_Modifier - (Sk) -
-
-<li> \c Symbol_Other - (So) -
-
-</ul>
-*/
-
-/*! \enum QChar::Direction
-
- This enum type defines the Unicode direction attributes.
- See <a href="http://www.unicode.org">the Unicode Standard</a>
- for a description of the values.
-
- In order to conform to C/C++ naming conventions "Dir" is
- prepended to the codes used in The Unicode Standard.
-*/
-
-/*! \enum QChar::Decomposition
-
- This enum type defines the Unicode decomposition attributes.
- See <a href="http://www.unicode.org">the Unicode Standard</a>
- for a description of the values.
-*/
-
-/*! \enum QChar::Joining
-
- This enum type defines the Unicode decomposition attributes.
- See <a href="http://www.unicode.org">the Unicode Standard</a>
- for a description of the values.
-*/
-
-
-
-/*! \fn QChar::QChar()
-
-Constructs a null QChar (one that isNull()).
-*/
-
-
-/*! \fn QChar::QChar( char c )
-
-Constructs a QChar corresponding to ASCII/Latin1 character \a c.
-*/
-
-
-/*! \fn QChar::QChar( uchar c )
-
-Constructs a QChar corresponding to ASCII/Latin1 character \a c.
-*/
-
-
-/*! \fn QChar::QChar( uchar c, uchar r )
-
-Constructs a QChar for Unicode cell \a c in row \a r.
-*/
-
-
-/*! \fn QChar::QChar( const QChar& c )
-
-Constructs a copy of \a c. This is a deep copy, if such a
-light-weight object can be said to have deep copies.
-*/
-
-
-/*! \fn QChar::QChar( ushort rc )
-
-Constructs a QChar for the character with Unicode code point \a rc.
-*/
-
-
-/*! \fn QChar::QChar( short rc )
-
-Constructs a QChar for the character with Unicode code point \a rc.
-*/
-
-
-/*! \fn QChar::QChar( uint rc )
-
-Constructs a QChar for the character with Unicode code point \a rc.
-*/
-
-
-/*! \fn QChar::QChar( int rc )
-
-Constructs a QChar for the character with Unicode code point \a rc.
-*/
-
-
-/*! \fn bool QChar::networkOrdered ()
-
- Returns TRUE if this character is in network byte order (MSB first),
- and FALSE if it is not. This is a platform-dependent property, so
- we strongly advise against using this function in portable code.
-*/
-
-
-/*!
- \fn bool QChar::isNull() const
- Returns TRUE if the characters is the unicode character 0x0000,
- ie. ASCII NUL.
-*/
-
-/*!
- \fn uchar QChar::cell () const
- Returns the cell (least significant byte) of the Unicode character.
-*/
-/*!
- \fn uchar QChar::row () const
- Returns the row (most significant byte) of the Unicode character.
-*/
-/*!
- \fn uchar& QChar::cell ()
- Returns a reference to the cell (least significant byte) of the Unicode character.
-*/
-/*!
- \fn uchar& QChar::row ()
- Returns a reference to the row (most significant byte) of the Unicode character.
-*/
-
-/*!
- Returns whether the character is a printable character. This is
- any character not of category Cc or Cn. Note that this gives no indication
- of whether the character is available in some font.
-*/
-bool QChar::isPrint() const
-{
- Category c = category();
- return !(c == Other_Control || c == Other_NotAssigned);
-}
-
-/*!
- Returns whether the character is a separator
- character (Separator_* categories).
-*/
-bool QChar::isSpace() const
-{
- if( !row() )
- if( cell() >= 9 && cell() <=13 ) return TRUE;
- Category c = category();
- return c >= Separator_Space && c <= Separator_Paragraph;
-}
-
-/*!
- Returns whether the character is a mark (Mark_* categories).
-*/
-bool QChar::isMark() const
-{
- Category c = category();
- return c >= Mark_NonSpacing && c <= Mark_Enclosing;
-}
-
-/*!
- Returns whether the character is punctuation (Punctuation_* categories).
-*/
-bool QChar::isPunct() const
-{
- Category c = category();
- return (c >= Punctuation_Connector && c <= Punctuation_Other);
-}
-
-/*!
- Returns whether the character is a letter (Letter_* categories).
-*/
-bool QChar::isLetter() const
-{
- Category c = category();
- return (c >= Letter_Uppercase && c <= Letter_Other);
-}
-
-/*!
- Returns whether the character is a number (of any sort - Number_* categories).
-
- \sa isDigit()
-*/
-bool QChar::isNumber() const
-{
- Category c = category();
- return c >= Number_DecimalDigit && c <= Number_Other;
-}
-
-/*!
- Returns whether the character is a letter or number (Letter_* or Number_* categories).
-*/
-bool QChar::isLetterOrNumber() const
-{
- Category c = category();
- return (c >= Letter_Uppercase && c <= Letter_Other)
- || (c >= Number_DecimalDigit && c <= Number_Other);
-}
-
-
-/*!
- Returns whether the character is a decimal digit (Number_DecimalDigit).
- */
-bool QChar::isDigit() const
-{
- return (category() == Number_DecimalDigit);
-}
-
-/*!
- Returns the numeric value of the digit, or -1 if the character is not
- a digit.
-*/
-int QChar::digitValue() const
-{
-#ifndef QT_NO_UNICODETABLES
- const Q_INT8 *dec_row = decimal_info[row()];
- if( !dec_row )
- return -1;
- return decimal_info[row()][cell()];
-#else
- // ##### just latin1
- if ( rw != 0 || cl < '0' || cl > '9' )
- return -1;
- else
- return cl - '0';
-#endif
-}
-
-/*!
- Returns the character category.
-
- \sa Category
-*/
-QChar::Category QChar::category() const
-{
-#ifndef QT_NO_UNICODETABLES
- return (Category)(unicode_info[row()][cell()]);
-#else
-// ### just ASCII
- if ( rw == 0 ) {
- return (Category)(ui_00[cell()]);
- }
- return Letter_Uppercase; //#######
-#endif
-}
-
-/*!
- Returns the characters directionality.
-
- \sa Direction
-*/
-QChar::Direction QChar::direction() const
-{
-#ifndef QT_NO_UNICODETABLES
- const Q_UINT8 *rowp = direction_info[row()];
- if(!rowp) return QChar::DirL;
- return (Direction) ( *(rowp+cell()) &0x1f );
-#else
- return DirL;
-#endif
-}
-
-/*!
- This function is not supported (it may change to use Unicode
- character classes).
-
- Returns information about the joining properties of the
- character (needed for arabic).
-*/
-QChar::Joining QChar::joining() const
-{
-#ifndef QT_NO_UNICODETABLES
- const Q_UINT8 *rowp = direction_info[row()];
- if ( !rowp )
- return QChar::OtherJoining;
- return (Joining) ((*(rowp+cell()) >> 5) &0x3);
-#else
- return OtherJoining;
-#endif
-}
-
-
-/*!
- Returns whether the character is a mirrored character (one that
- should be reversed if the text direction is reversed).
-*/
-bool QChar::mirrored() const
-{
-#ifndef QT_NO_UNICODETABLES
- const Q_UINT8 *rowp = direction_info[row()];
- if ( !rowp )
- return FALSE;
- return *(rowp+cell())>128;
-#else
- return FALSE;
-#endif
-}
-
-/*!
- Returns the mirrored char if this character is a mirrored char, the char
- itself otherwise
-*/
-QChar QChar::mirroredChar() const
-{
-#ifndef QT_NO_UNICODETABLES
- if(!mirrored()) return *this;
-
- int i;
- int c = unicode();
- for (i = 0; i < symmetricPairsSize; i += 2) {
- if (symmetricPairs[i] == c)
- return symmetricPairs[i+1];
- }
- return 0;
-#else
- return *this;
-#endif
-}
-
-/*!
- Decomposes a character into its parts. Returns QString::null if
- no decomposition exists.
-*/
-QString QChar::decomposition() const
-{
-#ifndef QT_NO_UNICODETABLES
- const Q_UINT16 *r = decomposition_info[row()];
- if(!r) return QString::null;
-
- Q_UINT16 pos = r[cell()];
- if(!pos) return QString::null;
- pos+=2;
-
- QString s;
- Q_UINT16 c;
- while((c = decomposition_map[pos++]) != 0) s += QChar(c);
-
- return s;
-#else
- return null;
-#endif
-}
-
-/*!
- Returns the tag defining the composition of the character.
- Returns QChar::Single if no decomposition exists.
-*/
-QChar::Decomposition QChar::decompositionTag() const
-{
-#ifndef QT_NO_UNICODETABLES
- const Q_UINT16 *r = decomposition_info[row()];
- if(!r) return QChar::Single;
-
- Q_UINT16 pos = r[cell()];
- if(!pos) return QChar::Single;
-
- return (QChar::Decomposition) decomposition_map[pos];
-#else
- return Single; // ########### FIX eg. just latin1
-#endif
-}
-
-/*!
- Returns the lowercase equivalent if the character is uppercase,
- or the character itself otherwise.
-*/
-QChar QChar::lower() const
-{
-#ifndef QT_NO_UNICODETABLES
- if(category() != Letter_Uppercase) return *this;
- Q_UINT16 lower = *(case_info[row()]+cell());
- if(lower == 0) return *this;
- return lower;
-#else
- if (row())
- return *this;
- else
- return QChar(tolower(latin1()));
-#endif
-}
-
-/*!
- Returns the uppercase equivalent if the character is lowercase,
- or the character itself otherwise.
-*/
-QChar QChar::upper() const
-{
-#ifndef QT_NO_UNICODETABLES
- if(category() != Letter_Lowercase) return *this;
- Q_UINT16 upper = *(case_info[row()]+cell());
- if(upper == 0) return *this;
- return upper;
-#else
- if (row())
- return *this;
- else
- return QChar(toupper(latin1()));
-#endif
-}
-
-/*!
- \fn QChar::operator char() const
-
- Returns the Latin1 character equivalent to the QChar,
- or 0. This is mainly useful for non-internationalized software.
-
- \sa unicode()
-*/
-
-/*!
- \fn ushort QChar::unicode() const
-
- Returns the numeric Unicode value equal to the QChar. Normally, you
- should use QChar objects as they are equivalent, but for some low-level
- tasks (eg. indexing into an array of Unicode information), this function
- is useful.
-*/
-
-/*****************************************************************************
- Documentation of QChar related functions
- *****************************************************************************/
-
-/*!
- \fn int operator==( QChar c1, QChar c2 )
- \relates QChar
-
- Returns TRUE if \a c1 and \a c2 are the same Unicode character.
-*/
-
-/*!
- \fn int operator==( char ch, QChar c )
- \relates QChar
-
- Returns TRUE if \a c is the ASCII/Latin1 character \a ch.
-*/
-
-/*!
- \fn int operator==( QChar c, char ch )
- \relates QChar
-
- Returns TRUE if \a c is the ASCII/Latin1 character \a ch.
-*/
-
-/*!
- \fn int operator!=( QChar c1, QChar c2 )
- \relates QChar
-
- Returns TRUE if \a c1 and \a c2 are not the same Unicode character.
-*/
-
-/*!
- \fn int operator!=( char ch, QChar c )
- \relates QChar
-
- Returns TRUE if \a c is not the ASCII/Latin1 character \a ch.
-*/
-
-/*!
- \fn int operator!=( QChar c, char ch )
- \relates QChar
-
- Returns TRUE if \a c is not the ASCII/Latin1 character \a ch.
-*/
-
-/*!
- \fn int operator<=( QChar c1, QChar c2 )
- \relates QChar
-
- Returns TRUE if the numeric Unicode value of \a c1 is less than that
- of \a c2, or they are the same Unicode character.
-*/
-
-/*!
- \fn int operator<=( QChar c, char ch )
- \relates QChar
-
- Returns TRUE if the numeric Unicode value of \a c is less than or
- equal to that of the ASCII/Latin1 character \a ch.
-*/
-
-/*!
- \fn int operator<=( char ch, QChar c )
- \relates QChar
-
- Returns TRUE if the numeric Unicode value of the ASCII/Latin1
- character \a ch is less than or equal to that of \a c.
-*/
-
-/*!
- \fn int operator>=( QChar c1, QChar c2 )
- \relates QChar
-
- Returns TRUE if the numeric Unicode value of \a c1 is greater than that
- of \a c2, or they are the same Unicode character.
-*/
-
-/*!
- \fn int operator>=( QChar c, char ch )
- \relates QChar
-
- Returns TRUE if the numeric Unicode value of \a c is greater than or
- equal to that of the ASCII/Latin1 character \a ch.
-*/
-
-/*!
- \fn int operator>=( char ch, QChar c )
- \relates QChar
-
- Returns TRUE if the numeric Unicode value of the ASCII/Latin1
- character \a ch is greater than or equal to that of \a c.
-*/
-
-/*!
- \fn int operator<( QChar c1, QChar c2 )
- \relates QChar
-
- Returns TRUE if the numeric Unicode value of \a c1 is less than that
- of \a c2.
-*/
-
-/*!
- \fn int operator<( QChar c, char ch )
- \relates QChar
-
- Returns TRUE if the numeric Unicode value of \a c is less than that
- of the ASCII/Latin1 character \a ch.
-*/
-
-/*!
- \fn int operator<( char ch, QChar c )
- \relates QChar
-
- Returns TRUE if the numeric Unicode value of the ASCII/Latin1
- character \a ch is less than that of \a c.
-*/
-
-/*!
- \fn int operator>( QChar c1, QChar c2 )
- \relates QChar
-
- Returns TRUE if the numeric Unicode value of \a c1 is greater than
- that of \a c2.
-*/
-
-/*!
- \fn int operator>( QChar c, char ch )
- \relates QChar
-
- Returns TRUE if the numeric Unicode value of \a c is greater than
- that of the ASCII/Latin1 character \a ch.
-*/
-
-/*!
- \fn int operator>( char ch, QChar c )
- \relates QChar
-
- Returns TRUE if the numeric Unicode value of the ASCII/Latin1
- character \a ch is greater than that of \a c.
-*/
-
-#ifndef QT_NO_UNICODETABLES
-
-// small class used internally in QString::Compose()
-class QLigature
-{
-public:
- QLigature( QChar c );
-
- Q_UINT16 first() { cur = ligatures; return cur ? *cur : 0; }
- Q_UINT16 next() { return cur && *cur ? *(cur++) : 0; }
- Q_UINT16 current() { return cur ? *cur : 0; }
-
- int match(QString & str, unsigned int index);
- QChar head();
- QChar::Decomposition tag();
-
-private:
- Q_UINT16 *ligatures;
- Q_UINT16 *cur;
-};
-
-QLigature::QLigature( QChar c )
-{
- const Q_UINT16 *r = ligature_info[c.row()];
- if( !r )
- ligatures = 0;
- else
- {
- const Q_UINT16 pos = r[c.cell()];
- ligatures = (Q_UINT16 *)&(ligature_map[pos]);
- }
- cur = ligatures;
-}
-
-QChar QLigature::head()
-{
- if(current())
- return QChar(decomposition_map[current()+1]);
-
- return QChar::null;
-}
-
-QChar::Decomposition QLigature::tag()
-{
- if(current())
- return (QChar::Decomposition) decomposition_map[current()];
-
- return QChar::Canonical;
-}
-
-int QLigature::match(QString & str, unsigned int index)
-{
- unsigned int i=index;
-
- if(!current()) return 0;
-
- Q_UINT16 lig = current() + 2;
- Q_UINT16 ch;
-
- while ((i < str.length()) && (ch = decomposition_map[lig])) {
- if (str[(int)i] != QChar(ch))
- return 0;
- i++; lig++;
- }
-
- if (!decomposition_map[lig])
- {
- return i-index;
- }
- return 0;
-}
-
-// this function is just used in QString::compose()
-static inline bool format(QChar::Decomposition tag, QString & str,
- int index, int len)
-{
- unsigned int l = index + len;
- unsigned int r = index;
-
- bool right = FALSE;
-
- bool left = ((l < str.length()) &&
- ((str[(int)l].joining() == QChar::Dual) ||
- (str[(int)l].joining() == QChar::Right)));
- if (r > 0) {
- r--;
- //printf("joining(right) = %d\n", str[(int)r].joining());
- right = (str[(int)r].joining() == QChar::Dual);
- }
-
-
- switch (tag) {
- case QChar::Medial:
- return (left && right);
- case QChar::Initial:
- return (left && !right);
- case QChar::Final:
- return (right);// && !left);
- case QChar::Isolated:
- default:
- return (!right && !left);
- }
-} // format()
-#endif
-
-/*
- QString::compose() and visual() were developed by Gordon Tisher
- <tisher@uniserve.ca>, with input from Lars Knoll <knoll@mpi-hd.mpg.de>,
- who developed the unicode data tables.
-*/
-/*!
- Note that this function is not supported in Qt 2.0, and is merely
- for experimental and illustrative purposes. It is mainly of interest
- to those experimenting with Arabic and other composition-rich texts.
-
- Applies possible ligatures to a QString, useful when composition-rich
- text requires rendering with glyph-poor fonts, but also
- makes compositions such as QChar(0x0041) ('A') and QChar(0x0308)
- (Unicode accent diaeresis) giving QChar(0x00c4) (German A Umlaut).
-*/
-void QString::compose()
-{
-#ifndef QT_NO_UNICODETABLES
- unsigned int index=0, len;
- unsigned int cindex = 0;
-
- QChar code, head;
-
- QArray<QChar> dia;
-
- QString composed = *this;
-
- while (index < length()) {
- code = at(index);
- //printf("\n\nligature for 0x%x:\n", code.unicode());
- QLigature ligature(code);
- ligature.first();
- while(ligature.current()) {
- if ((len = ligature.match(*this, index)) != 0) {
- head = ligature.head();
- unsigned short code = head.unicode();
- // we exclude Arabic presentation forms A and a few
- // other ligatures, which are undefined in most fonts
- if(!(code > 0xfb50 && code < 0xfe80) &&
- !(code > 0xfb00 && code < 0xfb2a)) {
- // joining info is only needed for arabic
- if (format(ligature.tag(), *this, index, len)) {
- //printf("using ligature 0x%x, len=%d\n",code,len);
- // replace letter
- composed.replace(cindex, len, QChar(head));
- index += len-1;
- // we continue searching in case we have a final
- // form because medial ones are preferred.
- if ( len != 1 || ligature.tag() !=QChar::Final )
- break;
- }
- }
- }
- ligature.next();
- }
- cindex++;
- index++;
- }
- *this = composed;
-#endif
-}
-
-static QChar LRM ((ushort)0x200e);
-static QChar RLM ((ushort)0x200f);
-static QChar LRE ((ushort)0x202a);
-static QChar RLE ((ushort)0x202b);
-static QChar RLO ((ushort)0x202e);
-static QChar LRO ((ushort)0x202d);
-static QChar PDF ((ushort)0x202c);
-
-#if 0
-static inline bool is_arabic(unsigned short x) {
- return (((x >= 0x0600) && (x <= 0x07bf)) ||
- ((x >= 0xfb50) && (x <= 0xfdff)) ||
- ((x >= 0xfe70) && (x <= 0xfeff)));
-}
-#endif
-
-#ifndef QT_NO_UNICODETABLES
-static inline bool is_neutral(unsigned short dir) {
- return ((dir == QChar::DirB) ||
- (dir == QChar::DirS) ||
- (dir == QChar::DirWS) ||
- (dir == QChar::DirON) ||
- (dir == QChar::DirNSM));
-}
-#endif
-
-/*!
-This function returns the directionality of the string.
-
-\returns a value of DirLTR, DirRTL, DirMixed or DirNeutral that indicates
-if the entire text represented by this text is unidirectional,
-and which direction, or if it is mixed-directional or all characters are neutral.
-*/
-QString::Direction QString::direction() const
-{
-#ifndef QT_NO_UNICODETABLES
- // find direction
- unsigned char resultDir = DirNeutral;
- for (unsigned int pos = 0; pos < length(); pos++)
- {
- if ((at(pos) != RLE) &&
- (at(pos) != LRE) &&
- (at(pos) != RLO) &&
- (at(pos) != LRO) &&
- (at(pos).direction() > 1) &&
- (at(pos).direction() != QChar::DirAL)) // not R and not L
- continue;
-
- if ((at(pos).direction() == QChar::DirR) ||
- (at(pos).direction() == QChar::DirAL) ||
- (at(pos) == RLE) ||
- (at(pos) == RLO))
- resultDir |= DirRTL;
- else
- resultDir |= DirLTR;
- if (resultDir == DirMixed)
- return DirMixed;
- }
- return static_cast<Direction>(resultDir);
-#else
- return DirLTR;
-#endif
-}
-
-/*!
-This function returns the basic directionality of the string. Useful to find the right
-alignment.
-
-The base direction is derived from the first character in the string
-with bidirectional character type L, R, or AL.
-If the first such character has type L, DirLTR is returned.
-If the first such character has type R or AL, DirRTL is returned.
-If the string does not contain any character of these types, then DirNeutral is returned.
-This is a lightweight function for use when only the base direction is needed and
-no further bidi processing of the text is needed.
-
-\returns DirRTL, DirLTR or DirNeutral
-*/
-QString::Direction QString::basicDirection() const
-{
-#ifndef QT_NO_UNICODETABLES
- // find base direction
- unsigned int pos = 0;
- while ((pos < length()) &&
- (at(pos) != RLE) &&
- (at(pos) != LRE) &&
- (at(pos) != RLO) &&
- (at(pos) != LRO) &&
- (at(pos).direction() > 1) &&
- (at(pos).direction() != QChar::DirAL)) // not R and not L
- pos++;
-
- if (pos == length())
- return DirNeutral;
-
- if ((at(pos).direction() == QChar::DirR) ||
- (at(pos).direction() == QChar::DirAL) ||
- (at(pos) == RLE) ||
- (at(pos) == RLO))
- return DirRTL;
- return DirLTR;
-#else
- return DirLTR;
-#endif
-}
-
-#ifndef QT_NO_UNICODETABLES
-// reverses part of the QChar array to get visual ordering
-// called from QString::visual()
-//
-static unsigned int reverse( QString &chars, unsigned char *level,
- unsigned int a, unsigned int b)
-{
- unsigned int c = a;
- unsigned char lev = level[c];
-
- while ((c < b) && (level[c] >= lev)) {
- if (level[c] > lev)
- c = reverse(chars, level, c, b);
- c++;
- }
-
- if (lev > 0) {
- QChar temp;
- unsigned int d = a, e = c-1;
- while (d < e) {
- temp = chars[(int)d];
- chars[(int)d] = chars[(int)e];
- chars[(int)e] = temp;
-
- d++; e--;
- }
- }
-
- return c;
-}
-
-// small class used for the ordering algorithm in QString::visual()
-class QBidiState {
-public:
- unsigned char level;
- signed char override;
-
- QBidiState(unsigned char l, signed char o) : level(l), override(o) {};
-};
-
-// matrix for resolving neutral types
-
-#define NEG1 (QChar::Direction)(-1)
-
-static QChar::Direction resolv[5][5] =
-{
- { NEG1, QChar::DirR, QChar::DirL, QChar::DirEN, QChar::DirAN },
- { QChar::DirR, QChar::DirR, NEG1, QChar::DirR, QChar::DirR },
- { QChar::DirL, NEG1, QChar::DirL, QChar::DirL, NEG1 },
- { QChar::DirEN, QChar::DirR, QChar::DirL, QChar::DirEN, QChar::DirR },
- { QChar::DirAN, QChar::DirR, NEG1, NEG1, QChar::DirAN }
-};
-
-#endif
-
-/*!
- This function returns the QString ordered visually. Useful for
- painting the string or when transforming to a visually ordered
- encoding.
-*/
-QString QString::visual(int index, int len)
-{
-#ifndef QT_NO_UNICODETABLES
- // #### This needs much more optimizing - it is called for
- // #### every text operation.
-
- unsigned char *level;
- QChar::Direction *dir;
- unsigned char base = 0;
-
- unsigned int l = length();
-
- // check bounds
- if (len == -1)
- len = length()-index;
- if ((uint)index > l)
- return QString::null;
-
- // find base direction
- unsigned int pos = 0;
- while ((pos < length()) &&
- (at(pos) != RLE) &&
- (at(pos) != LRE) &&
- (at(pos) != RLO) &&
- (at(pos) != LRO) &&
- (at(pos).direction() > 1) &&
- (at(pos).direction() != QChar::DirAL)
- ) // not R and not L
- pos++;
-
- if ((pos < length()) &&
- ((at(pos).direction() == QChar::DirR) ||
- (at(pos).direction() == QChar::DirAL) ||
- (at(pos) == RLE) ||
- (at(pos) == RLO)))
- base = 1;
-
- // is there any BiDi char at all?
- if ( base == 0 && pos == l ) {
- return mid(index, len);
- }
-
-
- level = new uchar[l];
- dir = new QChar::Direction[l];
-
- // explicit override pass
- //unsigned int code_count = 0;
-
- QStack<QBidiState> stack;
- stack.setAutoDelete(TRUE);
-
- unsigned char clevel = base;
- signed char override = -1;
-
- for (pos = 0; pos < l; pos++) {
-
- if (at(pos) == RLE) {
- //code_count++;
- stack.push(new QBidiState(clevel, override));
- if (clevel < 254)
- clevel += 1 + clevel % 2;
- override = -1;
- }
- else if (at(pos) == LRE) {
- //code_count++;
- stack.push(new QBidiState(clevel, override));
- if (clevel < 254)
- clevel += 2 - clevel % 2;
- override = -1;
- }
- else if (at(pos) == RLO) {
- //code_count++;
- stack.push(new QBidiState(clevel, override));
- if (clevel < 254)
- clevel += 1 + clevel % 2;
- override = QChar::DirR;
- }
- else if (at(pos) == LRO) {
- //code_count++;
- stack.push(new QBidiState(clevel, override));
- if (clevel < 254)
- clevel += 2 - clevel % 2;
- override = QChar::DirL;
- }
- else if (at(pos) == PDF) {
- //code_count++;
- if (!stack.isEmpty()) {
- override = stack.top()->override;
- clevel = stack.top()->level;
- stack.remove();
- }
- }
-
- // TODO: catch block separators (newlines, paras, etc.)
-
- level[pos] = clevel;
- if (override != -1)
- dir[pos] = (QChar::Direction) override;
- else
- dir[pos] = at(pos).direction();
- }
-
- // weak type pass
- for (pos = 0; pos < l; pos++) {
-
- int i;
-
- switch (at(pos).direction()) {
- case QChar::DirEN:
- i = pos-1;
- while ((i >= 0) &&
- !(at(i).direction() == QChar::DirAN) &&
- !(at(i).direction() == QChar::DirAL) &&
- !(at(i).direction() == QChar::DirB))
- i--;
-
- if ((i >= 0) &&
- ((at(i).direction() == QChar::DirAN) ||
- (at(i).direction() == QChar::DirAL)))
- dir[pos] = QChar::DirAN;
-
- break;
- case QChar::DirES:
- case QChar::DirCS:
- if ((pos > 0) && (pos < l-1) &&
- (dir[pos-1] == dir[pos+1]))
- dir[pos] = dir[pos-1];
- else
- dir[pos] = QChar::DirON;
-
- break;
- case QChar::DirET:
- if (((pos > 0) && (dir[pos-1] == QChar::DirEN)) ||
- ((pos < l-1) && (dir[pos+1] == QChar::DirEN)))
- dir[pos] = QChar::DirEN;
- else
- dir[pos] = QChar::DirON;
-
- break;
- case QChar::DirAL:
- dir[pos] = QChar::DirR;
- break;
- default:
- break;
- }
- }
-
- // neutral type pass
- for (pos = 0; pos < l; pos++) {
- QChar::Direction left,right; // declaring l here shadowed previous l
-
- if (is_neutral(dir[pos])) {
- if (pos > 0)
- left = dir[pos-1];
- else
- left = (base == 0 ? QChar::DirL : QChar::DirR);
-
- int i = pos;
-
- while ((i < (int)l-1) && is_neutral(dir[i+1]))
- i++;
-
- if (i < (int)l-1)
- right = dir[i+1];
- else
- right = (base == 0 ? QChar::DirL : QChar::DirR);
-
- for (int j=pos; j <= i; j++) {
- int a = 1, b = 1;
- while ((a < 5) && (left != resolv[0][a]))
- a++;
- while ((b < 5) && (right != resolv[0][b]))
- b++;
- if ((a == 5) || (b == 5))
- dir[j] = (base == 0 ? QChar::DirL : QChar::DirR);
- else
- dir[j] = resolv[a][b];
-
- if (dir[j] == (QChar::Direction)(-1))
- dir[j] = (base == 0 ? QChar::DirL : QChar::DirR);
- }
- }
- }
-
- // implicit level pass
- QChar::Direction prec = (base == 0 ? QChar::DirL : QChar::DirR);
-
- for (pos = 0; pos < l; pos++) {
- if (level[pos] % 2) {
- switch (dir[pos]) {
- case QChar::DirL:
- case QChar::DirAN:
- case QChar::DirEN:
- level[pos] += 1;
- break;
- default:
- break;
- }
- } else {
- switch (dir[pos]) {
- case QChar::DirL:
- // do nothing
- break;
- case QChar::DirR:
- level[pos] += 1;
- break;
- case QChar::DirEN:
- if (prec == QChar::DirL)
- continue;
- // fall through
- case QChar::DirAN:
- level[pos] += 2;
- break;
- default:
- break;
- }
- }
-
- prec = dir[pos];
- }
-
- // now do the work!
- QString ret(*this);
- reverse(ret, level, index, index+len);
-
- delete [] level;
- delete [] dir;
-
- return ret;
-#else
- return mid(index,len);
-#endif
-}
-
-
-
-// These macros are used for efficient allocation of QChar strings.
-// IMPORTANT! If you change these, make sure you also change the
-// "delete unicode" statement in ~QStringData() in qstring.h correspondingly!
-
-#define QT_ALLOC_QCHAR_VEC( N ) (QChar*) new char[ sizeof(QChar)*( N ) ]
-#define QT_DELETE_QCHAR_VEC( P ) delete[] ((char*)( P ))
-
-
-/*!
- This utility function converts the 8-bit string
- \a ba to Unicode, returning the result.
-
- The caller is responsible for deleting the return value with delete[].
-*/
-
-QChar* QString::asciiToUnicode( const QByteArray& ba, uint* len )
-{
- if ( ba.isNull() ) {
- if ( len )
- *len = 0;
- return 0;
- }
- int l = 0;
- while ( l < (int)ba.size() && ba[l] )
- l++;
- const char* str = ba.data();
- QChar *uc = new QChar[ l ]; // Can't use macro, since function is public
- QChar *result = uc;
- if ( len )
- *len = l;
- while (l--)
- *uc++ = *str++;
- return result;
-}
-
-static QChar* internalAsciiToUnicode( const QByteArray& ba, uint* len )
-{
- if ( ba.isNull() ) {
- if ( len )
- *len = 0;
- return 0;
- }
- int l = 0;
- while ( l < (int)ba.size() && ba[l] )
- l++;
- const char* str = ba.data();
- QChar *uc = QT_ALLOC_QCHAR_VEC( l );
- QChar *result = uc;
- if ( len )
- *len = l;
- while (l--)
- *uc++ = *str++;
- return result;
-}
-
-/*!
- This utility function converts the NUL-terminated 8-bit string
- \a str to Unicode, returning the result and setting \a len to
- the length of the Unicode string.
-
- The caller is responsible for deleting the return value with delete[].
-*/
-
-QChar* QString::asciiToUnicode( const char *str, uint* len, uint maxlen )
-{
- QChar* result = 0;
- uint l = 0;
- if ( str ) {
- if ( maxlen != (uint)-1 ) {
- while ( l < maxlen && str[l] )
- l++;
- } else {
- // Faster?
- l = qstrlen(str);
- }
- QChar *uc = new QChar[ l ]; // Can't use macro since function is public
- result = uc;
- uint i = l;
- while ( i-- )
- *uc++ = *str++;
- }
- if ( len )
- *len = l;
- return result;
-}
-
-static QChar* internalAsciiToUnicode( const char *str, uint* len,
- uint maxlen = (uint)-1 )
-{
- QChar* result = 0;
- uint l = 0;
- if ( str ) {
- if ( maxlen != (uint)-1 ) {
- while ( l < maxlen && str[l] )
- l++;
- } else {
- // Faster?
- l = qstrlen(str);
- }
- QChar *uc = QT_ALLOC_QCHAR_VEC( l );
- result = uc;
- uint i = l;
- while ( i-- )
- *uc++ = *str++;
- }
- if ( len )
- *len = l;
- return result;
-}
-
-/*!
- This utility function converts \a l 16-bit characters from
- \a uc to ASCII, returning a NUL-terminated string.
-
- The caller is responsible for deleting the string with delete[].
-*/
-char* QString::unicodeToAscii(const QChar *uc, uint l)
-{
- if (!uc) {
- return 0;
- }
- char *a = new char[l+1];
- char *result = a;
- while (l--)
- *a++ = *uc++;
- *a = '\0';
- return result;
-}
-
-static uint computeNewMax( uint len )
-{
- if (len >= 0x80000000)
- return len;
-
- uint newMax = 4;
- while ( newMax < len )
- newMax *= 2;
- // try to save some memory
- if ( newMax >= 1024 * 1024 && len <= newMax - (newMax >> 2) )
- newMax -= newMax >> 2;
- return newMax;
-}
-
-/*!
- Returns the QString as a zero terminated array of unsigned shorts
- if the string is not null; otherwise returns zero.
-
- The result remains valid so long as one unmodified
- copy of the source string exists.
- */
-const unsigned short *QString::ucs2() const
-{
- if ( ! d->unicode )
- return 0;
- unsigned int len = d->len;
- if ( d->maxl < len + 1 ) {
- // detach, grow or shrink
- uint newMax = computeNewMax( len + 1 );
- QChar* nd = QT_ALLOC_QCHAR_VEC( newMax );
- if ( nd ) {
- if ( d->unicode )
- memcpy( nd, d->unicode, sizeof(QChar)*len );
- ((QString *)this)->deref();
- ((QString *)this)->d = new QStringData( nd, len, newMax );
- }
- }
- d->unicode[len] = 0;
- return (unsigned short *) d->unicode;
-}
-
-/*!
- Constructs a string that is a deep copy of \a str, interpreted as a
- UCS2 encoded, zero terminated, Unicode string.
-
- If \a str is 0, then a null string is created.
- \sa isNull()
- */
-QString QString::fromUcs2( const unsigned short *str )
-{
- if ( !str ) {
- return QString::null;
- } else {
- int length = 0;
- while ( str[length] != 0 )
- length++;
- QChar* uc = QT_ALLOC_QCHAR_VEC( length );
- memcpy( uc, str, length*sizeof(QChar) );
- return QString( new QStringData( uc, length, length ), TRUE );
- }
-}
-
-
-/*****************************************************************************
- QString member functions
- *****************************************************************************/
-
-/*!
- \class QString qstring.h
-
- \brief The QString class provides an abstraction of Unicode text and
- the classic C null-terminated char array (<var>char*</var>).
-
- \ingroup tools
- \ingroup shared
-
- QString uses \link shclass.html implicit sharing\endlink, and so it
- is very efficient and easy to use.
-
- In all QString methods that take <var>const char*</var> parameters,
- the <var>const char*</var> is interpreted as a classic C-style
- 0-terminated ASCII string. It is legal for the <var>const
- char*</var> parameter to be 0. The results are undefined if the
- <var>const char*</var> string is not 0-terminated. Functions that
- copy classic C strings into a QString will not copy the terminating
- 0-character. The QChar array of the QString (as returned by
- unicode()) is not terminated by a null.
-
- A QString that has not been assigned to anything is \a null, i.e. both
- the length and data pointer is 0. A QString that references the empty
- string ("", a single '\0' char) is \a empty. Both null and empty
- QStrings are legal parameters to the methods. Assigning <var>const char
- * 0</var> to QString gives a null QString.
-
- Note that if you find that you are mixing usage of QCString, QString,
- and QByteArray, this causes lots of unnecessary copying and might
- indicate that the true nature of the data you are dealing with is
- uncertain. If the data is NUL-terminated 8-bit data, use QCString;
- if it is unterminated (ie. contains NULs) 8-bit data, use QByteArray;
- if it is text, use QString.
-
- \sa QChar \link shclass.html Shared classes\endlink
-*/
-
-Q_EXPORT QStringData *QString::shared_null = 0;
-//QT_STATIC_CONST_IMPL QString QString::null;
-QT_STATIC_CONST_IMPL QChar QChar::null;
-QT_STATIC_CONST_IMPL QChar QChar::replacement((ushort)0xfffd);
-QT_STATIC_CONST_IMPL QChar QChar::byteOrderMark((ushort)0xfeff);
-QT_STATIC_CONST_IMPL QChar QChar::byteOrderSwapped((ushort)0xfffe);
-QT_STATIC_CONST_IMPL QChar QChar::nbsp((ushort)0x00a0);
-
-#if defined(_CC_MSVC_) && _MSC_VER <= 1300
-const QString::Null QString::null;
-#else
-const QString::Null QString::null = { };
-#endif
-
-
-QStringData* QString::makeSharedNull()
-{
- return shared_null=new QStringData;
-}
-
-// Uncomment this to get some useful statistics.
-// #define Q2HELPER(x) x
-
-#ifdef Q2HELPER
-static int stat_construct_charstar=0;
-static int stat_construct_charstar_size=0;
-static int stat_construct_null=0;
-static int stat_construct_int=0;
-static int stat_construct_int_size=0;
-static int stat_construct_ba=0;
-static int stat_get_ascii=0;
-static int stat_get_ascii_size=0;
-static int stat_copy_on_write=0;
-static int stat_copy_on_write_size=0;
-static int stat_fast_copy=0;
-Q_EXPORT void qt_qstring_stats()
-{
- qDebug("construct_charstar = %d (%d chars)", stat_construct_charstar, stat_construct_charstar_size);
- qDebug("construct_null = %d", stat_construct_null);
- qDebug("construct_int = %d (%d chars)", stat_construct_int, stat_construct_int_size);
- qDebug("construct_ba = %d", stat_construct_ba);
- qDebug("get_ascii = %d (%d chars)", stat_get_ascii, stat_get_ascii_size);
- qDebug("copy_on_write = %d (%d chars)", stat_copy_on_write, stat_copy_on_write_size);
- qDebug("fast_copy = %d", stat_fast_copy);
-}
-#else
-#define Q2HELPER(x)
-#endif
-
-/*!
- \fn QString::QString()
-
- Constructs a null string.
- \sa isNull()
-*/
-
-/*!
- Constructs a string containing the one character \a ch.
-*/
-QString::QString( QChar ch )
-{
- d = new QStringData( QT_ALLOC_QCHAR_VEC( 1 ), 1, 1 );
- d->unicode[0] = ch;
-}
-
-/*!
- Constructs an implicitly-shared copy of \a s.
-*/
-QString::QString( const QString &s ) :
- d(s.d)
-{
- Q2HELPER(stat_fast_copy++)
- d->ref();
-}
-
-/*!
- Private function.
-
- Constructs a string with preallocated space for \a size characters.
-
- The string is empty.
-
- \sa isNull()
-*/
-
-QString::QString( int size, bool /*dummy*/ )
-{
- if ( size ) {
- Q2HELPER(stat_construct_int++)
- int l = size;
- Q2HELPER(stat_construct_int_size+=l)
- QChar* uc = QT_ALLOC_QCHAR_VEC( l );
- d = new QStringData( uc, 0, l );
- } else {
- Q2HELPER(stat_construct_null++)
- d = shared_null ? shared_null : (shared_null=new QStringData);
- d->ref();
- }
-}
-
-/*!
- Constructs a string that is a deep copy of \a ba interpreted as
- a classic C string.
-*/
-
-QString::QString( const QByteArray& ba )
-{
- Q2HELPER(stat_construct_ba++)
- uint l;
- QChar *uc = internalAsciiToUnicode(ba,&l);
- d = new QStringData(uc,l,l);
-}
-
-QString::QString( const QCString& ba )
-{
- //Q2HELPER(stat_construct_ba++)
- //uint l;
- //QChar *uc = internalAsciiToUnicode(ba,&l);
- //d = new QStringData(uc,l,l);
- Q2HELPER(stat_fast_copy++)
- QString s = QString::fromUtf8(ba.data(),ba.length());
- d = s.d;
- d->ref();
-}
-
-/*!
- Constructs a string that is a deep copy of the
- first \a length QChar in the array \a unicode.
-
- If \a unicode and \a length are 0, a null string is created.
-
- If only \a unicode is 0, the string is empty, but has
- \a length characters of space preallocated - QString expands
- automatically anyway, but this may speed some cases up a little.
-
- \sa isNull()
-*/
-
-QString::QString( const QChar* unicode, uint length )
-{
- if ( !unicode && !length ) {
- d = shared_null ? shared_null : makeSharedNull();
- d->ref();
- } else {
- QChar* uc = QT_ALLOC_QCHAR_VEC( length );
- if ( unicode )
- memcpy(uc, unicode, length*sizeof(QChar));
- d = new QStringData(uc,unicode ? length : 0,length);
- }
-}
-
-/*!
- Constructs a string that is a deep copy of \a str, interpreted as a
- classic C string.
-
- If \a str is 0 a null string is created.
-
- This is a cast constructor, but it is perfectly safe: converting a Latin1
- const char* to QString preserves all the information.
- You can disable this constructor by
- defining QT_NO_CAST_ASCII when you compile your applications.
- You can also make QString objects by using setLatin1()/fromLatin1(), or
- fromLocal8Bit(), fromUtf8(), or whatever encoding is appropriate for
- the 8-bit data you have.
-
- \sa isNull()
-*/
-
-QString::QString( const char *str )
-{
- //Q2HELPER(stat_construct_charstar++)
- //uint l;
- //QChar *uc = internalAsciiToUnicode(str,&l);
- //Q2HELPER(stat_construct_charstar_size+=l)
- //d = new QStringData(uc,l,l);
- Q2HELPER(stat_fast_copy++)
- QString s = QString::fromUtf8(str);
- d = s.d;
- d->ref();
-}
-
-
-/*! \fn QString::~QString()
-
-Destroys the string and frees the "real" string, if this was the last
-copy of that string.
-*/
-
-
-/*!
- Deallocates any space reserved solely by this QString.
-*/
-
-void QString::real_detach()
-{
- setLength( length() );
-}
-
-void QString::deref()
-{
- if ( d->deref() ) {
- if ( d == shared_null )
- shared_null = 0;
- delete d;
- d = 0; // helps debugging
- }
-}
-
-void QStringData::deleteSelf()
-{
- delete this;
-}
-
-/*!
- \fn QString& QString::operator=( QChar c )
- Sets the string to contain just the single character \a c.
-*/
-
-/*!
- \fn QString& QString::operator=( char c )
- Sets the string to contain just the single character \a c.
-*/
-
-/*!
- Assigns a shallow copy of \a s to this string and returns a
- reference to this string.
-*/
-QString &QString::operator=( const QString &s )
-{
- Q2HELPER(stat_fast_copy++)
- s.d->ref();
- deref();
- d = s.d;
- return *this;
-}
-
-/*!
- Assigns a deep copy of \a cs, interpreted as a classic C string, to
- this string and returns a reference to this string.
-*/
-QString &QString::operator=( const QCString& cs )
-{
- return setLatin1(cs);
-}
-
-
-/*!
- Assigns a deep copy of \a str, interpreted as a classic C string,
- to this string and returns a reference to this string.
-
- If \a str is 0 a null string is created.
-
- \sa isNull()
-*/
-QString &QString::operator=( const char *str )
-{
- return setLatin1(str);
-}
-
-
-/*!
- \fn bool QString::isNull() const
-
- Returns TRUE if the string is null.
- A null string is also an empty string.
-
- Example:
- \code
- QString a; // a.unicode() == 0, a.length() == 0
- QString b = ""; // b.unicode() == "", b.length() == 0
- a.isNull(); // TRUE, because a.unicode() == 0
- a.isEmpty(); // TRUE, because a.length() == 0
- b.isNull(); // FALSE, because b.unicode() != 0
- b.isEmpty(); // TRUE, because b.length() == 0
- \endcode
-
- \sa isEmpty(), length()
-*/
-
-/*!
- \fn bool QString::isEmpty() const
-
- Returns TRUE if the string is empty, i.e. if length() == 0.
- An empty string is not always a null string.
-
- See example in isNull().
-
- \sa isNull(), length()
-*/
-
-/*!
- \fn uint QString::length() const
-
- Returns the length of the string.
-
- Null strings and empty strings have zero length.
-
- \sa isNull(), isEmpty()
-*/
-
-/*!
- Truncates the string at position \a newLen if newLen is less than the
- current length . Otherwise, nothing happens.
-
- Example:
- \code
- QString s = "truncate this string";
- s.truncate( 5 ); // s == "trunc"
- \endcode
-
- In Qt 1.x, it was possible to "truncate" a string to a longer
- length. This is no longer possible.
-
-*/
-
-void QString::truncate( uint newLen )
-{
- if ( newLen < d->len )
- setLength( newLen );
-}
-
-/*### Make this public in 3.0
- Ensures that at least \a newLen characters are allocated, and
- sets the length to \a newLen. This function always detaches the
- string from other references to the same data. Any new space
- allocated is \e not defined.
-
- If \a newLen is 0, this string becomes empty, unless this string is
- null, in which case it remains null.
-
- \sa truncate(), isNull(), isEmpty()
-*/
-
-void QString::setLength( uint newLen )
-{
- if ( d->count != 1 || newLen > d->maxl || // detach, grow, or
- ( newLen*4 < d->maxl && d->maxl > 4 ) ) { // shrink
- Q2HELPER(stat_copy_on_write++)
- Q2HELPER(stat_copy_on_write_size+=d->len)
- uint newMax = 4;
- while ( newMax < newLen )
- newMax *= 2;
- QChar* nd = QT_ALLOC_QCHAR_VEC( newMax );
- uint len = QMIN( d->len, newLen );
- if ( d->unicode )
- memcpy( nd, d->unicode, sizeof(QChar)*len );
- deref();
- d = new QStringData( nd, newLen, newMax );
- } else {
- d->len = newLen;
- d->dirtyascii = 1;
- }
-}
-
-/*! Returns a string equal to this one, but with the lowest-numbered
- occurrence of \c %i (for a positive integer i) replaced by \a a.
-
- \code
- label.setText( tr("Rename %1 to %2?").arg(oldName).arg(newName) );
- \endcode
-
- \a fieldwidth is the minimum amount of space \a a is padded to. A
- positive value produces right-aligned text, while a negative value
- produces left aligned text.
-
- \warning Using arg() for constructing "real" sentences
- programmatically is likely to lead to translation problems.
- Inserting objects like numbers or file names is fairly safe.
-
- \warning Relying on spaces to create alignment is prone to lead to
- translation problems.
-
- If there is no \c %i pattern, a warning message (qWarning()) is
- printed and the text as appended at the end of the string. This is
- error recovery and should not occur in correct code.
-
- \sa QObject::tr()
-*/
-QString QString::arg(const QString& a, int fieldwidth) const
-{
- int pos, len;
- QString r = *this;
-
- if ( !findArg( pos, len ) ) {
- qWarning( "QString::arg(): Argument missing: %s, %s",
- (const char *)ascii(), (const char *)ascii() );
- // Make sure the text at least appears SOMEWHERE
- r += ' ';
- pos = r.length();
- len = 0;
- }
-
- r.replace( pos, len, a );
- if ( fieldwidth < 0 ) {
- QString s;
- while ( (uint)-fieldwidth > a.length() ) {
- s += ' ';
- fieldwidth++;
- }
- r.insert( pos + a.length(), s );
- } else if ( fieldwidth ) {
- QString s;
- while ( (uint)fieldwidth > a.length() ) {
- s += ' ';
- fieldwidth--;
- }
- r.insert( pos, s );
- }
-
- return r;
-}
-
-
-/*! \overload
-
- \a a is expressed in to \a base notation, which is decimal by
- default and must be in the range 2-36 inclusive.
-*/
-QString QString::arg(long a, int fieldwidth, int base) const
-{
- return arg( QString::number( a, base ), fieldwidth );
-}
-
-/*! \overload
-
- \a a is expressed in to \a base notation, which is decimal by
- default and must be in the range 2-36 inclusive.
-*/
-QString QString::arg(ulong a, int fieldwidth, int base) const
-{
- return arg( QString::number( a, base ), fieldwidth );
-}
-
-/*!
- \overload QString QString::arg(int a, int fieldwidth, int base) const
-
- \a a is expressed in to \a base notation, which is decimal by
- default and must be in the range 2-36 inclusive.
-
-*/
-
-/*!
- \overload QString QString::arg(uint a, int fieldwidth, int base) const
-
- \a a is expressed in to \a base notation, which is decimal by
- default and must be in the range 2-36 inclusive.
-*/
-
-/*!
- \overload QString QString::arg(short a, int fieldwidth, int base) const
-
- \a a is expressed in to \a base notation, which is decimal by
- default and must be in the range 2-36 inclusive.
-*/
-
-/*!
- \overload QString QString::arg(ushort a, int fieldwidth, int base) const
-
- \a a is expressed in to \a base notation, which is decimal by
- default and must be in the range 2-36 inclusive.
-*/
-
-
-/*! \overload
-
- \a a is assumed to be in the Latin1 character set.
-*/
-QString QString::arg(char a, int fieldwidth) const
-{
- QString c;
- c += a;
- return arg( c, fieldwidth );
-}
-
-/*! \overload
-*/
-QString QString::arg(QChar a, int fieldwidth) const
-{
- QString c;
- c += a;
- return arg( c, fieldwidth );
-}
-
-/*! \overload
-
- \a is formatted according to the \a fmt format specified, which is
- 'g' by default and can be any of 'f', 'F', 'e', 'E', 'g' or 'G', all
- of which have the same meaning as for sprintf(). \a prec determines
- the precision, just as for number() and sprintf().
-*/
-QString QString::arg(double a, int fieldwidth, char fmt, int prec) const
-{
- return arg( QString::number( a, fmt, prec ), fieldwidth );
-}
-
-
-/*!
- Just 1-digit arguments.
-*/
-bool QString::findArg(int& pos, int& len) const
-{
- char lowest=0;
- for (uint i=0; i<length(); i++) {
- if ( at(i) == '%' && i+1<length() ) {
- char dig = at(i+1);
- if ( dig >= '0' && dig <= '9' ) {
- if ( !lowest || dig < lowest ) {
- lowest = dig;
- pos = i;
- len = 2;
- }
- }
- }
- }
- return lowest != 0;
-}
-
-/*!
- Safely builds a formatted string from a format string and an
- arbitrary list of arguments. The format string supports all
- the escape sequences of printf() in the standard C library.
-
- The %s escape sequence expects a utf8() encoded string.
- The format string \e cformat is expected to be in latin1. If you need a unicode
- format string, use QString::arg() instead. For typesafe
- string building, with full Unicode support, you can use QTextOStream
- like this:
-
- \code
- QString str;
- QString s = ...;
- int x = ...;
- QTextOStream(&str) << s << " : " << x;
- \endcode
-
- For \link QObject::tr() translations,\endlink especially if the
- strings contains more than one escape sequence, you should consider
- using the arg() function instead. This allows the order of the
- replacements to be controlled by the translator, and has Unicode
- support.
-
- \sa arg()
-*/
-
-QString &QString::sprintf( const char* cformat, ... )
-{
- va_list ap;
- va_start( ap, cformat );
-
- if ( !cformat || !*cformat ) {
- // Qt 1.x compat
- *this = QString::fromLatin1( "" );
- return *this;
- }
- QString format = QString::fromLatin1( cformat );
-
- static QRegExp *escape = 0;
- if (!escape)
- escape = new QRegExp( "%#?0?-? ?\\+?'?[0-9*]*\\.?[0-9*]*h?l?L?q?Z?" );
-
- QString result;
- uint last = 0;
-
- int len = 0;
- int pos;
- while ( 1 ) {
- pos = escape->match( cformat, last, &len );
- // Non-escaped text
- if ( pos > (int)last )
- result += format.mid(last,pos-last);
- if ( pos < 0 ) {
- // The rest
- if ( last < format.length() )
- result += format.mid(last);
- break;
- }
- last = pos + len + 1;
-
- // Escape
- QString f = format.mid( pos, len );
- uint width, decimals;
- int params = 0;
- int wpos = f.find('*');
- if ( wpos >= 0 ) {
- params++;
- width = va_arg( ap, int );
- if ( f.find('*', wpos + 1) >= 0 ) {
- decimals = va_arg( ap, int );
- params++;
- } else {
- decimals = 0;
- }
- } else {
- decimals = width = 0;
- }
- QString replacement;
- if ( format[pos+len] == 's' ||
- format[pos+len] == 'S' ||
- format[pos+len] == 'c' )
- {
- bool rightjust = ( f.find('-') < 0 );
- // Yes, %-5s really means left adjust in sprintf
-
- if ( wpos < 0 ) {
- QRegExp num( "[0-9]+" );
- QRegExp dot( "\\." );
- int nlen;
- int p = num.match( f.data(), 0, &nlen );
- int q = dot.match( f.data(), 0 );
- if ( q < 0 || (p < q && p >= 0) )
- width = f.mid( p, nlen ).toInt();
- if ( q >= 0 ) {
- p = num.match( f.data(), q );
- // "decimals" is used to specify string truncation
- if ( p >= 0 )
- decimals = f.mid( p, nlen ).toInt();
- }
- }
-
- if ( format[pos+len] == 's' ) {
-#ifndef QT_NO_TEXTCODEC
- QString s = QString::fromUtf8(va_arg(ap, char*));
-#else
- QString s = QString::fromLatin1(va_arg(ap, char*));
-#endif
- if ( decimals <= 0 )
- replacement = s;
- else
- replacement = s.left(decimals);
- } else {
- int ch = va_arg(ap, int);
- replacement = QChar((ushort)ch);
- }
- if ( replacement.length() < width ) {
- replacement = rightjust
- ? replacement.rightJustify(width)
- : replacement.leftJustify(width);
- }
- } else if ( format[pos+len] == '%' ) {
- replacement = '%';
- } else if ( format[pos+len] == 'n' ) {
- int* n = va_arg(ap, int*);
- *n = result.length();
- } else {
- char in[64], out[330] = "";
- strncpy(in,f.latin1(),63);
- char fch = format[pos+len].latin1();
- in[f.length()] = fch;
- switch ( fch ) {
- case 'd': case 'i': case 'o': case 'u': case 'x': case 'X': {
- int value = va_arg(ap, int);
- switch (params) {
- case 0: ::sprintf( out, in, value ); break;
- case 1: ::sprintf( out, in, width, value ); break;
- case 2: ::sprintf( out, in, width, decimals, value ); break;
- }
- } break;
- case 'e': case 'E': case 'f': case 'g': case 'G': {
- double value = va_arg(ap, double);
- switch (params) {
- case 0: ::sprintf( out, in, value ); break;
- case 1: ::sprintf( out, in, width, value ); break;
- case 2: ::sprintf( out, in, width, decimals, value ); break;
- }
- } break;
- case 'p': {
- void* value = va_arg(ap, void*);
- switch (params) {
- case 0: ::sprintf( out, in, value ); break;
- case 1: ::sprintf( out, in, width, value ); break;
- case 2: ::sprintf( out, in, width, decimals, value ); break;
- }
- } break;
- }
- replacement = QString::fromLatin1(out);
- }
- result += replacement;
- }
- *this = result;
-
- va_end( ap );
- return *this;
-}
-
-/*!
- Fills the string with \a len characters of value \a c.
-
- If \a len is negative, the current string length is used.
-*/
-
-void QString::fill( QChar c, int len )
-{
- if ( len < 0 )
- len = length();
- if ( len == 0 ) {
- *this = "";
- } else {
- deref();
- QChar * nd = QT_ALLOC_QCHAR_VEC( len );
- d = new QStringData(nd,len,len);
- while (len--) *nd++ = c;
- }
-}
-
-
-/*!
- \fn QString QString::copy() const
-
- \obsolete
-
- Returns a deep copy of this string.
-
- Doing this is redundant in Qt 2.x, since QString is implicitly
- shared, and so will automatically be deeply copied as necessary.
-*/
-
-/*!
- Finds the first occurrence of the character \a c, starting at
- position \a index. If \a index is -1, the search starts at the
- last character; if -2, at the next to last character; etc.
-
- The search is case sensitive if \a cs is TRUE, or case insensitive
- if \a cs is FALSE.
-
- Returns the position of \a c, or -1 if \a c could not be found.
-*/
-
-int QString::find( QChar c, int index, bool cs ) const
-{
- if ( index < 0 )
- index += length();
- if ( (uint)index >= length() ) // index outside string
- return -1;
- const QChar *uc;
- uc = unicode()+index;
- int n = length()-index;
- if ( cs ) {
- while ( n-- && *uc != c )
- uc++;
- } else {
- c = c.lower();
- while ( n-- && uc->lower() != c )
- uc++;
- }
- if ( uint(uc - unicode()) >= length() )
- return -1;
- return (int)(uc - unicode());
-}
-
-/*!
- Finds the first occurrence of the string \a str, starting at position
- \a index. If \a index is -1, the search starts at the last character;
- if -2, at the next to last character; etc.
-
- The search is case sensitive if \a cs is TRUE, or case insensitive if
- \a cs is FALSE.
-
- Returns the position of \a str, or -1 if \a str could not be found.
-*/
-
-int QString::find( const QString& str, int index, bool cs ) const
-{
- /*
- We use some weird hashing for efficiency's sake. Instead of
- comparing strings, we compare the hash value of str with that of
- a part of this QString. Only if that matches, we call ucstrncmp
- or ucstrnicmp.
-
- The hash value of a string is the sum of the cells of its
- QChars.
- */
- if ( index < 0 )
- index += length();
- int lstr = str.length();
- int lthis = length() - index;
- if ( (uint)lthis > length() )
- return -1;
- int delta = lthis - lstr;
- if ( delta < 0 )
- return -1;
-
- const QChar *uthis = unicode() + index;
- const QChar *ustr = str.unicode();
- uint hthis = 0;
- uint hstr = 0;
- int i;
- if ( cs ) {
- for ( i = 0; i < lstr; i++ ) {
- hthis += uthis[i].cell();
- hstr += ustr[i].cell();
- }
- i = 0;
- while ( TRUE ) {
- if ( hthis == hstr && ucstrncmp(uthis + i, ustr, lstr) == 0 )
- return index + i;
- if ( i == delta )
- return -1;
- hthis += uthis[i + lstr].cell();
- hthis -= uthis[i].cell();
- i++;
- }
- } else {
- for ( i = 0; i < lstr; i++ ) {
- hthis += uthis[i].lower().cell();
- hstr += ustr[i].lower().cell();
- }
- i = 0;
- while ( TRUE ) {
- if ( hthis == hstr && ucstrnicmp(uthis + i, ustr, lstr) == 0 )
- return index + i;
- if ( i == delta )
- return -1;
- hthis += uthis[i + lstr].lower().cell();
- hthis -= uthis[i].lower().cell();
- i++;
- }
- }
-#if defined(Q_SPURIOUS_NON_VOID_WARNING)
- return -1;
-#endif
-}
-
-/*!
- \fn int QString::findRev( const char* str, int index ) const
-
- Equivalent to findRev(QString(str), index).
-*/
-
-/*!
- \fn int QString::find( const char* str, int index ) const
-
- Equivalent to find(QString(str), index).
-*/
-
-/*!
- Finds the first occurrence of the character \a c, starting at
- position \a index and searching backwards. If \a index is -1,
- the search starts at the last character; if -2, at the next to
- last character; etc.
-
- The search is case sensitive if \a cs is TRUE, or case insensitive if \a
- cs is FALSE.
-
- Returns the position of \a c, or -1 if \a c could not be found.
-*/
-
-int QString::findRev( QChar c, int index, bool cs ) const
-{
- QString t( c );
- return findRev( t, index, cs );
-}
-
-/*!
- Finds the first occurrence of the string \a str, starting at
- position \a index and searching backwards. If \a index is -1,
- the search starts at the last character; -2, at the next to last
- character; etc.
-
- The search is case sensitive if \a cs is TRUE, or case insensitive if \e
- cs is FALSE.
-
- Returns the position of \a str, or -1 if \a str could not be found.
-*/
-
-int QString::findRev( const QString& str, int index, bool cs ) const
-{
- /*
- See QString::find() for explanations.
- */
- int lthis = length();
- if ( index < 0 )
- index += lthis;
-
- int lstr = str.length();
- int delta = lthis - lstr;
- if ( index < 0 || index > lthis || delta < 0 )
- return -1;
- if ( index > delta )
- index = delta;
-
- const QChar *uthis = unicode();
- const QChar *ustr = str.unicode();
- uint hthis = 0;
- uint hstr = 0;
- int i;
- if ( cs ) {
- for ( i = 0; i < lstr; i++ ) {
- hthis += uthis[index + i].cell();
- hstr += ustr[i].cell();
- }
- i = index;
- while ( TRUE ) {
- if ( hthis == hstr && ucstrncmp(uthis + i, ustr, lstr) == 0 )
- return i;
- if ( i == 0 )
- return -1;
- i--;
- hthis -= uthis[i + lstr].cell();
- hthis += uthis[i].cell();
- }
- } else {
- for ( i = 0; i < lstr; i++ ) {
- hthis += uthis[index + i].lower().cell();
- hstr += ustr[i].lower().cell();
- }
- i = index;
- while ( TRUE ) {
- if ( hthis == hstr && ucstrnicmp(uthis + i, ustr, lstr) == 0 )
- return i;
- if ( i == 0 )
- return -1;
- i--;
- hthis -= uthis[i + lstr].lower().cell();
- hthis += uthis[i].lower().cell();
- }
- }
-#if defined(Q_SPURIOUS_NON_VOID_WARNING)
- return -1;
-#endif
-}
-
-
-/*!
- Returns the number of times the character \a c occurs in the string.
-
- The match is case sensitive if \a cs is TRUE, or case insensitive if \a cs
- is FALSE.
-*/
-
-int QString::contains( QChar c, bool cs ) const
-{
- int count = 0;
- const QChar *uc = unicode();
- if ( !uc )
- return 0;
- int n = length();
- if ( cs ) { // case sensitive
- while ( n-- )
- if ( *uc++ == c )
- count++;
- } else { // case insensitive
- c = c.lower();
- while ( n-- ) {
- if ( uc->lower() == c )
- count++;
- uc++;
- }
- }
- return count;
-}
-
-/*!
- \overload
-*/
-int QString::contains( const char* str, bool cs ) const
-{
- return contains(QString(str),cs);
-}
-
-/*!
- \overload int QString::contains (char c, bool cs) const
-*/
-
-/*!
- \overload int QString::find (char c, int index, bool cs) const
-
-*/
-
-/*!
- \overload int QString::findRev (char c, int index, bool cs) const
-
-*/
-
-/*!
- Returns the number of times \a str occurs in the string.
-
- The match is case sensitive if \a cs is TRUE, or case insensitive if \e
- cs is FALSE.
-
- This function counts overlapping substrings, for example, "banana"
- contains two occurrences of "ana".
-
- \sa findRev()
-*/
-
-int QString::contains( const QString &str, bool cs ) const
-{
- int count = 0;
- const QChar *uc = unicode();
- if ( !uc )
- return 0;
- int len = str.length();
- int n = length();
- while ( n-- ) { // counts overlapping strings
- // ### Doesn't account for length of this - searches over "end"
- if ( cs ) {
- if ( ucstrncmp( uc, str.unicode(), len ) == 0 )
- count++;
- } else {
- if ( ucstrnicmp(uc, str.unicode(), len) == 0 )
- count++;
- }
- uc++;
- }
- return count;
-}
-
-/*!
- Returns a substring that contains the \a len leftmost characters
- of the string.
-
- The whole string is returned if \a len exceeds the length of the
- string.
-
-
- Example:
- \code
- QString s = "Pineapple";
- QString t = s.left( 4 ); // t == "Pine"
- \endcode
-
- \sa right(), mid(), isEmpty()
-*/
-
-QString QString::left( uint len ) const
-{
- if ( isEmpty() ) {
- return QString();
- } else if ( len == 0 ) { // ## just for 1.x compat:
- return QString::fromLatin1("");
- } else if ( len > length() ) {
- return *this;
- } else {
- QString s( len, TRUE );
- memcpy( s.d->unicode, d->unicode, len*sizeof(QChar) );
- s.d->len = len;
- return s;
- }
-}
-
-/*!
- Returns a substring that contains the \a len rightmost characters
- of the string.
-
- The whole string is returned if \a len exceeds the length of the
- string.
-
- Example:
- \code
- QString s = "Pineapple";
- QString t = s.right( 5 ); // t == "apple"
- \endcode
-
- \sa left(), mid(), isEmpty()
-*/
-
-QString QString::right( uint len ) const
-{
- if ( isEmpty() ) {
- return QString();
- } else if ( len == 0 ) { // ## just for 1.x compat:
- return QString::fromLatin1("");
- } else {
- uint l = length();
- if ( len > l )
- len = l;
- QString s( len, TRUE );
- memcpy( s.d->unicode, d->unicode+(l-len), len*sizeof(QChar) );
- s.d->len = len;
- return s;
- }
-}
-
-/*!
- Returns a substring that contains the \a len characters of this
- string, starting at position \a index.
-
- Returns a null string if the string is empty or \a index is out
- of range. Returns the whole string from \a index if \a index+len exceeds
- the length of the string.
-
- Example:
- \code
- QString s = "Five pineapples";
- QString t = s.mid( 5, 4 ); // t == "pine"
- \endcode
-
- \sa left(), right()
-*/
-
-QString QString::mid( uint index, uint len ) const
-{
- uint slen = length();
- if ( isEmpty() || index >= slen ) {
- return QString();
- } else if ( len == 0 ) { // ## just for 1.x compat:
- return QString::fromLatin1("");
- } else {
- if ( len > slen-index )
- len = slen - index;
- if ( index == 0 && len == length() )
- return *this;
- const QChar *p = unicode()+index;
- QString s( len, TRUE );
- memcpy( s.d->unicode, p, len*sizeof(QChar) );
- s.d->len = len;
- return s;
- }
-}
-
-/*!
- Returns a string of length \a width that contains this
- string and padded by the \a fill character.
-
- If the length of the string exceeds \a width and \a truncate is FALSE,
- then the returned string is a copy of the string.
- If the length of the string exceeds \a width and \a truncate is TRUE,
- then the returned string is a left(\a width).
-
- Example:
- \code
- QString s("apple");
- QString t = s.leftJustify(8, '.'); // t == "apple..."
- \endcode
-
- \sa rightJustify()
-*/
-
-QString QString::leftJustify( uint width, QChar fill, bool truncate ) const
-{
- QString result;
- int len = length();
- int padlen = width - len;
- if ( padlen > 0 ) {
- result.setLength(len+padlen);
- if ( len )
- memcpy( result.d->unicode, unicode(), sizeof(QChar)*len );
- QChar* uc = result.d->unicode + len;
- while (padlen--)
- *uc++ = fill;
- } else {
- if ( truncate )
- result = left( width );
- else
- result = *this;
- }
- return result;
-}
-
-/*!
- Returns a string of length \a width that contains pad
- characters followed by the string.
-
- If the length of the string exceeds \a width and \a truncate is FALSE,
- then the returned string is a copy of the string.
- If the length of the string exceeds \a width and \a truncate is TRUE,
- then the returned string is a left(\a width).
-
- Example:
- \code
- QString s("pie");
- QString t = s.rightJustify(8, '.'); // t == ".....pie"
- \endcode
-
- \sa leftJustify()
-*/
-
-QString QString::rightJustify( uint width, QChar fill, bool truncate ) const
-{
- QString result;
- int len = length();
- int padlen = width - len;
- if ( padlen > 0 ) {
- result.setLength( len+padlen );
- QChar* uc = result.d->unicode;
- while (padlen--)
- *uc++ = fill;
- if ( len )
- memcpy( uc, unicode(), sizeof(QChar)*len );
- } else {
- if ( truncate )
- result = left( width );
- else
- result = *this;
- }
- return result;
-}
-
-/*!
- Returns a new string that is the string converted to lower case.
-
- Example:
- \code
- QString s("TeX");
- QString t = s.lower(); // t == "tex"
- \endcode
-
- \sa upper()
-*/
-
-QString QString::lower() const
-{
- QString s(*this);
- int l=length();
- if ( l ) {
- s.real_detach(); // could do this only when we find a change
- QChar *p=s.d->unicode;
- if ( p ) {
- while ( l-- ) {
- *p = p->lower();
- p++;
- }
- }
- }
- return s;
-}
-
-/*!
- Returns a new string that is the string converted to upper case.
-
- Example:
- \code
- QString s("TeX");
- QString t = s.upper(); // t == "TEX"
- \endcode
-
- \sa lower()
-*/
-
-QString QString::upper() const
-{
- QString s(*this);
- int l=length();
- if ( l ) {
- s.real_detach(); // could do this only when we find a change
- QChar *p=s.d->unicode;
- if ( p ) {
- while ( l-- ) {
- *p = p->upper();
- p++;
- }
- }
- }
- return s;
-}
-
-
-/*!
- Returns a new string that has white space removed from the start and the end.
-
- White space means any character for which QChar::isSpace() returns
- TRUE. This includes ASCII characters 9 (TAB), 10 (LF), 11 (VT), 12
- (FF), 13 (CR), and 32 (Space).
-
- Example:
- \code
- QString s = " space ";
- QString t = s.stripWhiteSpace(); // t == "space"
- \endcode
-
- \sa simplifyWhiteSpace()
-*/
-
-QString QString::stripWhiteSpace() const
-{
- if ( isEmpty() ) // nothing to do
- return *this;
- if ( !at(0).isSpace() && !at(length()-1).isSpace() )
- return *this;
-
- const QChar *s = unicode();
- QString result = fromLatin1("");
-
- int start = 0;
- int end = length() - 1;
- while ( start<=end && s[start].isSpace() ) // skip white space from start
- start++;
- if ( start > end ) { // only white space
- return result;
- }
- while ( end && s[end].isSpace() ) // skip white space from end
- end--;
- int l = end - start + 1;
- result.setLength( l );
- if ( l )
- memcpy( result.d->unicode, &s[start], sizeof(QChar)*l );
- return result;
-}
-
-
-/*!
- Returns a new string that has white space removed from the start and the end,
- plus any sequence of internal white space replaced with a single space
- (ASCII 32).
-
- White space means any character for which QChar::isSpace() returns
- TRUE. This includes ASCII characters 9 (TAB), 10 (LF), 11 (VT), 12
- (FF), 13 (CR), and 32 (Space).
-
- \code
- QString s = " lots\t of\nwhite space ";
- QString t = s.simplifyWhiteSpace(); // t == "lots of white space"
- \endcode
-
- \sa stripWhiteSpace()
-*/
-
-QString QString::simplifyWhiteSpace() const
-{
- if ( isEmpty() ) // nothing to do
- return *this;
- QString result;
- result.setLength( length() );
- const QChar *from = unicode();
- const QChar *fromend = from+length();
- int outc=0;
- QChar *to = result.d->unicode;
- while ( TRUE ) {
- while ( from!=fromend && from->isSpace() )
- from++;
- while ( from!=fromend && !from->isSpace() )
- to[outc++] = *from++;
- if ( from!=fromend )
- to[outc++] = ' ';
- else
- break;
- }
- if ( outc > 0 && to[outc-1] == ' ' )
- outc--;
- result.truncate( outc );
- return result;
-}
-
-
-/*!
- Insert \a s into the string before position \a index.
-
- If \a index is beyond the end of the string, the string is extended with
- spaces (ASCII 32) to length \a index and \a s is then appended.
-
- \code
- QString s = "I like fish";
- s.insert( 2, "don't "); // s == "I don't like fish"
- s = "x";
- s.insert( 3, "yz" ); // s == "x yz"
- \endcode
-*/
-
-QString &QString::insert( uint index, const QString &s )
-{
- // the sub function takes care of &s == this case.
- return insert( index, s.unicode(), s.length() );
-}
-
-/*!
- Insert \a len units of QChar data from \a s into the string before
- position \a index.
-*/
-
-QString &QString::insert( uint index, const QChar* s, uint len )
-{
- if ( len == 0 )
- return *this;
- uint olen = length();
- int nlen = olen + len;
-
- int df = (int)(s - d->unicode); // ### pointer subtraction, cast down to int
- if ( df >= 0 && (uint)df < d->maxl ) {
- // Part of me - take a copy.
- QChar *tmp = QT_ALLOC_QCHAR_VEC( len );
- memcpy(tmp,s,len*sizeof(QChar));
- insert(index,tmp,len);
- QT_DELETE_QCHAR_VEC( tmp );
- return *this;
- }
-
- if ( index >= olen ) { // insert after end of string
- setLength( len+index );
- int n = index-olen;
- QChar* uc = d->unicode+olen;
- while (n--)
- *uc++ = ' ';
- memcpy( d->unicode+index, s, sizeof(QChar)*len );
- } else { // normal insert
- setLength( nlen );
- memmove( d->unicode+index+len, unicode()+index,
- sizeof(QChar)*(olen-index) );
- memcpy( d->unicode+index, s, sizeof(QChar)*len );
- }
- return *this;
-}
-
-/*!
- Insert \a c into the string at (before) position \a index and returns
- a reference to the string.
-
- If \a index is beyond the end of the string, the string is extended with
- spaces (ASCII 32) to length \a index and \a c is then appended.
-
- Example:
- \code
- QString s = "Ys";
- s.insert( 1, 'e' ); // s == "Yes"
- s.insert( 3, '!'); // s == "Yes!"
- \endcode
-
- \sa remove(), replace()
-*/
-
-QString &QString::insert( uint index, QChar c ) // insert char
-{
- QString s( c );
- return insert( index, s );
-}
-
-/*!
- \overload QString& QString::insert( uint index, char c )
-*/
-
-/*!
- \fn QString &QString::prepend( const QString &s )
-
- Prepend \a s to the string. Equivalent to insert(0,s).
-
- \sa insert()
-*/
-
-/*!
- \fn QString& QString::prepend( char ch )
- Prepends \a ch to the string and returns a reference to the result.
-
- \sa insert()
- */
-
-/*!
- \fn QString& QString::prepend( QChar ch )
- Prepends \a ch to the string and returns a reference to the result.
-
- \sa insert()
- */
-
-
-/*!
- Removes \a len characters starting at position \a index from the
- string and returns a reference to the string.
-
- If \a index is too big, nothing happens. If \a index is valid, but
- \a len is too large, the rest of the string is removed.
-
- \code
- QString s = "Montreal";
- s.remove( 1, 4 );
- // s == "Meal"
- \endcode
-
- \sa insert(), replace()
-*/
-
-QString &QString::remove( uint index, uint len )
-{
- uint olen = length();
- if ( index + len >= olen ) { // range problems
- if ( index < olen ) { // index ok
- setLength( index );
- }
- } else if ( len != 0 ) {
- real_detach();
- memmove( d->unicode+index, d->unicode+index+len,
- sizeof(QChar)*(olen-index-len) );
- setLength( olen-len );
- }
- return *this;
-}
-
-/*!
- Replaces \a len characters starting at position \a index from the
- string with \a s, and returns a reference to the string.
-
- If \a index is too big, nothing is deleted and \a s is inserted at the
- end of the string. If \a index is valid, but \a len is too large, \e
- str replaces the rest of the string.
-
- \code
- QString s = "Say yes!";
- s.replace( 4, 3, "NO" ); // s == "Say NO!"
- \endcode
-
- \sa insert(), remove()
-*/
-
-QString &QString::replace( uint index, uint len, const QString &s )
-{
- return replace( index, len, s.unicode(), s.length() );
-}
-
-
-/*!
- Replaces \a len characters starting at position \a index by
- \a slen units to QChar data from \a s, and returns a reference to the string.
-
- \sa insert(), remove()
-*/
-
-QString &QString::replace( uint index, uint len, const QChar* s, uint slen )
-{
- if ( len == slen && index + len <= length() ) {
- // Optimized common case: replace without size change
- real_detach();
- memcpy( d->unicode+index, s, len*sizeof(QChar) );
- } else {
- int df = (int)(s - d->unicode); // ### pointer subtraction, cast down to int
- if ( df >= 0 && (uint)df < d->maxl ) {
- // Part of me - take a copy.
- QChar *tmp = QT_ALLOC_QCHAR_VEC( slen );
- memcpy(tmp,s,slen*sizeof(QChar));
- replace(index,len,tmp,slen);
- QT_DELETE_QCHAR_VEC( tmp );
- return *this;
- }
-
- remove( index, len );
- insert( index, s, slen );
- }
- return *this;
-}
-
-
-#if 0
-/*!
- Finds the first occurrence of the regular expression \a rx, starting at
- position \a index. If \a index is -1, the search starts at the last
- character; if -2, at the next to last character; etc.
-
- Returns the position of the next match, or -1 if \a rx was not found.
-
- \sa findRev() replace() contains()
-*/
-
-int QString::find( const QRegExp &rx, int index ) const
-{
- if ( index < 0 )
- index += length();
- return rx.match( data(), index );
-}
-
-/*!
- Finds the first occurrence of the regular expression \a rx, starting at
- position \a index and searching backwards. If \a index is -1, the
- search starts at the last character; if -2, at the next to last
- character; etc.
-
- Returns the position of the next match (backwards), or -1 if \a rx was not
- found.
-
- \sa find()
-*/
-
-int QString::findRev( const QRegExp &rx, int index ) const
-{
- if ( index < 0 ) // neg index ==> start from end
- index += length();
- if ( (uint)index > length() ) // bad index
- return -1;
- while( index >= 0 ) {
- if ( rx.match( data(), index ) == index )
- return index;
- index--;
- }
- return -1;
-}
-
-/*!
- Counts the number of overlapping occurrences of \a rx in the string.
-
- Example:
- \code
- QString s = "banana and panama";
- QRegExp r = QRegExp("a[nm]a", TRUE, FALSE);
- s.contains( r ); // 4 matches
- \endcode
-
- \sa find() findRev()
-*/
-
-int QString::contains( const QRegExp &rx ) const
-{
- if ( isEmpty() )
- return rx.match( data() ) < 0 ? 0 : 1;
- int count = 0;
- int index = -1;
- int len = length();
- while ( index < len-1 ) { // count overlapping matches
- index = rx.match( data(), index+1 );
- if ( index < 0 )
- break;
- count++;
- }
- return count;
-}
-
-
-/*!
- Replaces every occurrence of \a rx in the string with \a str.
- Returns a reference to the string.
-
- Examples:
- \code
- QString s = "banana";
- s.replace( QRegExp("a.*a"), "" ); // becomes "b"
-
- QString s = "banana";
- s.replace( QRegExp("^[bn]a"), " " ); // becomes " nana"
-
- QString s = "banana";
- s.replace( QRegExp("^[bn]a"), "" ); // NOTE! becomes ""
- \endcode
-
- \sa find() findRev()
-*/
-
-QString &QString::replace( const QRegExp &rx, const QString &str )
-{
- if ( isEmpty() )
- return *this;
- int index = 0;
- int slen = str.length();
- int len;
- while ( index < (int)length() ) {
- index = rx.match( data(), index, &len, FALSE );
- if ( index >= 0 ) {
- replace( index, len, str );
- index += slen;
- if ( !len )
- break; // Avoid infinite loop on 0-length matches, e.g. [a-z]*
- }
- else
- break;
- }
- return *this;
-}
-#endif
-
-static bool
-ok_in_base( QChar c, int base )
-{
- if ( base <= 10 )
- return c.isDigit() && c.digitValue() < base;
- else
- return c.isDigit() || (c >= 'a' && c < char('a'+base-10))
- || (c >= 'A' && c < char('A'+base-10));
-}
-
-/*!
- Returns the string converted to a <code>long</code> value.
-
- If \a ok is non-null, \a *ok is set to TRUE if there are no
- conceivable errors, and FALSE if the string is not a number at all, or if
- it has trailing garbage.
-*/
-
-long QString::toLong( bool *ok, int base ) const
-{
- const QChar *p = unicode();
- long val=0;
- int l = length();
- const long max_mult = INT_MAX / base;
- bool is_ok = FALSE;
- int neg = 0;
- if ( !p )
- goto bye;
- while ( l && p->isSpace() ) // skip leading space
- l--,p++;
- if ( l && *p == '-' ) {
- l--;
- p++;
- neg = 1;
- } else if ( *p == '+' ) {
- l--;
- p++;
- }
-
- // NOTE: toULong() code is similar
- if ( !l || !ok_in_base(*p,base) )
- goto bye;
- while ( l && ok_in_base(*p,base) ) {
- l--;
- int dv;
- if ( p->isDigit() ) {
- dv = p->digitValue();
- } else {
- if ( *p >= 'a' && *p <= 'z' )
- dv = *p - 'a' + 10;
- else
- dv = *p - 'A' + 10;
- }
- if ( val > max_mult || (val == max_mult && dv > (INT_MAX%base)+neg) )
- goto bye;
- val = base*val + dv;
- p++;
- }
- if ( neg )
- val = -val;
- while ( l && p->isSpace() ) // skip trailing space
- l--,p++;
- if ( !l )
- is_ok = TRUE;
-bye:
- if ( ok )
- *ok = is_ok;
- return is_ok ? val : 0;
-}
-
-/*!
- Returns the string converted to an <code>unsigned long</code>
- value.
-
- If \a ok is non-null, \a *ok is set to TRUE if there are no
- conceivable errors, and FALSE if the string is not a number at all,
- or if it has trailing garbage.
-*/
-
-ulong QString::toULong( bool *ok, int base ) const
-{
- const QChar *p = unicode();
- ulong val=0;
- int l = length();
- const ulong max_mult = 429496729; // UINT_MAX/10, rounded down
- bool is_ok = FALSE;
- if ( !p )
- goto bye;
- while ( l && p->isSpace() ) // skip leading space
- l--,p++;
- if ( *p == '+' )
- l--,p++;
-
- // NOTE: toLong() code is similar
- if ( !l || !ok_in_base(*p,base) )
- goto bye;
- while ( l && ok_in_base(*p,base) ) {
- l--;
- uint dv;
- if ( p->isDigit() ) {
- dv = p->digitValue();
- } else {
- if ( *p >= 'a' && *p <= 'z' )
- dv = *p - 'a' + 10;
- else
- dv = *p - 'A' + 10;
- }
- if ( val > max_mult || (val == max_mult && dv > (UINT_MAX%base)) )
- goto bye;
- val = base*val + dv;
- p++;
- }
-
- while ( l && p->isSpace() ) // skip trailing space
- l--,p++;
- if ( !l )
- is_ok = TRUE;
-bye:
- if ( ok )
- *ok = is_ok;
- return is_ok ? val : 0;
-}
-
-/*!
- Returns the string converted to an <code>unsigned long</code>
- value.
-
- If \a ok is non-null, \a *ok is set to TRUE if there are no
- conceivable errors, and FALSE if the string is not a number at all,
- or if it has trailing garbage.
-*/
-
-uint64 QString::toUInt64( bool *ok, int base ) const
-{
- const QChar *p = unicode();
- uint64 val=0;
- int l = length();
- const uint64 max_mult = 1844674407370955161ULL; // ULLONG_MAX/10, rounded down
- bool is_ok = FALSE;
- if ( !p )
- goto bye;
- while ( l && p->isSpace() ) // skip leading space
- l--,p++;
- if ( *p == '+' )
- l--,p++;
-
- // NOTE: toULong() code is similar
- if ( !l || !ok_in_base(*p,base) )
- goto bye;
- while ( l && ok_in_base(*p,base) ) {
- l--;
- uint dv;
- if ( p->isDigit() ) {
- dv = p->digitValue();
- } else {
- if ( *p >= 'a' && *p <= 'z' )
- dv = *p - 'a' + 10;
- else
- dv = *p - 'A' + 10;
- }
- if ( val > max_mult || (val == max_mult && dv > (ULLONG_MAX%base)) )
- goto bye;
- val = base*val + dv;
- p++;
- }
-
- while ( l && p->isSpace() ) // skip trailing space
- l--,p++;
- if ( !l )
- is_ok = TRUE;
-bye:
- if ( ok )
- *ok = is_ok;
- return is_ok ? val : 0;
-}
-
-
-/*!
- Returns the string converted to a <code>short</code> value.
-
- If \a ok is non-null, \a *ok is set to TRUE if there are no
- conceivable errors, and FALSE if the string is not a number at all, or if
- it has trailing garbage.
-*/
-
-short QString::toShort( bool *ok, int base ) const
-{
- long v = toLong( ok, base );
- if ( ok && *ok && (v < -32768 || v > 32767) ) {
- *ok = FALSE;
- v = 0;
- }
- return (short)v;
-}
-
-/*!
- Returns the string converted to an <code>unsigned short</code> value.
-
- If \a ok is non-null, \a *ok is set to TRUE if there are no
- conceivable errors, and FALSE if the string is not a number at all, or if
- it has trailing garbage.
-*/
-
-ushort QString::toUShort( bool *ok, int base ) const
-{
- ulong v = toULong( ok, base );
- if ( ok && *ok && (v > 65535) ) {
- *ok = FALSE;
- v = 0;
- }
- return (ushort)v;
-}
-
-
-/*!
- Returns the string converted to a <code>int</code> value.
-
- \code
- QString str("FF");
- bool ok;
- int hex = str.toInt( &ok, 16 ); // will return 255, and ok set to TRUE
- int dec = str.toInt( &ok, 10 ); // will return 0, and ok set to FALSE
- \endcode
-
- If \a ok is non-null, \a *ok is set to TRUE if there are no
- conceivable errors, and FALSE if the string is not a number at all,
- or if it has trailing garbage.
-*/
-
-int QString::toInt( bool *ok, int base ) const
-{
- return (int)toLong( ok, base );
-}
-
-/*!
- Returns the string converted to an <code>unsigned int</code> value.
-
- If \a ok is non-null, \a *ok is set to TRUE if there are no
- conceivable errors, and FALSE if the string is not a number at all,
- or if it has trailing garbage.
-*/
-
-uint QString::toUInt( bool *ok, int base ) const
-{
- return (uint)toULong( ok, base );
-}
-
-/*!
- Returns the string converted to a <code>double</code> value.
-
- If \a ok is non-null, \a *ok is set to TRUE if there are no conceivable
- errors, and FALSE if the string is not a number at all, or if it has
- trailing garbage.
-*/
-
-double QString::toDouble( bool *ok ) const
-{
- char *end;
-
- QCString a = latin1();
- // Just latin1() is not sufficient, since U0131 would look like '1'.
- for (uint i=0; i<d->len; i++)
- if ( d->unicode[i].row() )
- a[(int)i]='z';
-
- double val = strtod( a.data() ? a.data() : "", &end );
- if ( ok )
- *ok = ( a && *a && ( end == 0 || *end == '\0' ) );
- return val;
-}
-
-/*!
- Returns the string converted to a <code>float</code> value.
-
- If \a ok is non-null, \a *ok is set to TRUE if there are no
- conceivable errors, and FALSE if the string is not a number at all,
- or if it has trailing garbage.
-*/
-
-float QString::toFloat( bool *ok ) const
-{
- return (float)toDouble( ok );
-}
-
-
-/*!
- Sets the string to the printed value of \a n and returns a
- reference to the string.
-
- The value is converted to \a base notation (default is decimal).
- The base must be a value from 2 to 36.
-*/
-
-QString &QString::setNum( long n, int base )
-{
-#if defined(CHECK_RANGE)
- if ( base < 2 || base > 36 ) {
- qWarning( "QString::setNum: Invalid base %d", base );
- base = 10;
- }
-#endif
- char charbuf[65*sizeof(QChar)];
- QChar *buf = (QChar*)charbuf;
- QChar *p = &buf[64];
- int len = 0;
- bool neg;
- if ( n < 0 ) {
- neg = TRUE;
- if ( n == INT_MIN ) {
- // Cannot always negate this special case
- QString s1, s2;
- s1.setNum(n/base);
- s2.setNum((-(n+base))%base);
- *this = s1 + s2;
- return *this;
- }
- n = -n;
- } else {
- neg = FALSE;
- }
- do {
- *--p = "0123456789abcdefghijklmnopqrstuvwxyz"[((int)(n%base))];
- n /= base;
- len++;
- } while ( n );
- if ( neg ) {
- *--p = '-';
- len++;
- }
- return setUnicode( p, len );
-}
-
-/*!
- Sets the string to the printed unsigned value of \a n and
- returns a reference to the string.
-
- The value is converted to \a base notation (default is decimal).
- The base must be a value from 2 to 36.
-*/
-
-QString &QString::setNum( ulong n, int base )
-{
-#if defined(CHECK_RANGE)
- if ( base < 2 || base > 36 ) {
- qWarning( "QString::setNum: Invalid base %d", base );
- base = 10;
- }
-#endif
- char charbuf[65*sizeof(QChar)];
- QChar *buf = (QChar*)charbuf;
- QChar *p = &buf[64];
- int len = 0;
- do {
- *--p = "0123456789abcdefghijklmnopqrstuvwxyz"[((int)(n%base))];
- n /= base;
- len++;
- } while ( n );
- return setUnicode(p,len);
-}
-
-/*!
- \fn QString &QString::setNum( int n, int base )
- Sets the string to the printed value of \a n and returns a reference
- to the string.
-*/
-
-/*!
- \fn QString &QString::setNum( uint n, int base )
- Sets the string to the printed unsigned value of \a n and returns a
- reference to the string.
-*/
-
-/*!
- \fn QString &QString::setNum( short n, int base )
- Sets the string to the printed value of \a n and returns a reference
- to the string.
-*/
-
-/*!
- \fn QString &QString::setNum( ushort n, int base )
- Sets the string to the printed unsigned value of \a n and returns a
- reference to the string.
-*/
-
-/*! Sets the string to the printed value of \a n, formatted in the \a f
- format with \a prec precision, and returns a reference to the
- string.
-
- \a f can be 'f', 'F', 'e', 'E', 'g' or 'G', all of which have the
- same meaning as for sprintf().
-*/
-
-QString &QString::setNum( double n, char f, int prec )
-{
-#if defined(CHECK_RANGE)
- if ( !(f=='f' || f=='F' || f=='e' || f=='E' || f=='g' || f=='G') ) {
- qWarning( "QString::setNum: Invalid format char '%c'", f );
- f = 'f';
- }
-#endif
- char format[20];
- char buf[120]; // enough for 99 precision?
- char *fs = format; // generate format string
- *fs++ = '%'; // "%.<prec>l<f>"
- if ( prec >= 0 ) {
- if ( prec > 99 ) // buf big enough for precision?
- prec = 99;
- *fs++ = '.';
- if ( prec >= 10 ) {
- *fs++ = prec / 10 + '0';
- *fs++ = prec % 10 + '0';
- } else {
- *fs++ = prec + '0';
- }
- }
- *fs++ = 'l';
- *fs++ = f;
- *fs = '\0';
- ::sprintf( buf, format, n );
- return setLatin1(buf);
-}
-
-/*!
- \overload QString &QString::setNum( float n, char f, int prec )
-*/
-
-
-/*!
- A convenience factory function that returns a string representation
- of the number \a n.
-
- \sa setNum()
- */
-QString QString::number( long n, int base )
-{
- QString s;
- s.setNum( n, base );
- return s;
-}
-
-/*!
- A convenience factory function that returns a string representation
- of the number \a n.
-
- \sa setNum()
- */
-QString QString::number( ulong n, int base )
-{
- QString s;
- s.setNum( n, base );
- return s;
-}
-
-/*!
- A convenience factory function that returns a string representation
- of the number \a n.
-
- \sa setNum()
- */
-QString QString::number( int n, int base )
-{
- QString s;
- s.setNum( n, base );
- return s;
-}
-
-/*!
- A convenience factory function that returns a string representation
- of the number \a n.
-
- \sa setNum()
- */
-QString QString::number( uint n, int base )
-{
- QString s;
- s.setNum( n, base );
- return s;
-}
-
-/*!
- This static function returns the printed value of \a n, formatted in the
- \a f format with \a prec precision.
-
- \a f can be 'f', 'F', 'e', 'E', 'g' or 'G', all of which have the
- same meaning as for sprintf().
-
- \sa setNum()
- */
-QString QString::number( double n, char f, int prec )
-{
- QString s;
- s.setNum( n, f, prec );
- return s;
-}
-
-
-/*! \obsolete
-
- Sets the character at position \a index to \a c and expands the
- string if necessary, filling with spaces.
-
- This method is redundant in Qt 2.x, because operator[] will expand
- the string as necessary.
-*/
-
-void QString::setExpand( uint index, QChar c )
-{
- int spaces = index - d->len;
- at(index) = c;
- while (spaces-->0)
- d->unicode[--index]=' ';
-}
-
-
-/*!
- \fn const char* QString::data() const
-
- \obsolete
-
- Returns a pointer to a 0-terminated classic C string.
-
- In Qt 1.x, this returned a char* allowing direct manipulation of the
- string as a sequence of bytes. In Qt 2.x where QString is a Unicode
- string, char* conversion constructs a temporary string, and hence
- direct character operations are meaningless.
-*/
-
-/*!
- \fn bool QString::operator!() const
- Returns TRUE if it is a null string, otherwise FALSE. Thus
- you can write:
-
-\code
- QString name = getName();
- if ( !name )
- name = "Rodney";
-\endcode
-
- Note that if you say:
-
-\code
- QString name = getName();
- if ( name )
- doSomethingWith(name);
-\endcode
-
- Then this will call <tt>operator const char*()</tt>, which will do what
- you want, but rather inefficiently - you may wish to define the macro
- QT_NO_ASCII_CAST when writing code which you wish to strictly remain
- Unicode-clean.
-
- When you want the above semantics, use <tt>!isNull()</tt>
- or even <tt>!!</tt>:
-
-\code
- QString name = getName();
- if ( !!name )
- doSomethingWith(name);
-\endcode
-*/
-
-
-/*!
- \fn QString& QString::append( const QString& str )
- Appends \a str to the string and returns a reference to the result.
- Equivalent to operator+=().
- */
-
-/*!
- \fn QString& QString::append( char ch )
- Appends \a ch to the string and returns a reference to the result.
- Equivalent to operator+=().
- */
-
-/*!
- \fn QString& QString::append( QChar ch )
- Appends \a ch to the string and returns a reference to the result.
- Equivalent to operator+=().
- */
-
-/*!
- Appends \a str to the string and returns a reference to the string.
-*/
-QString& QString::operator+=( const QString &str )
-{
- uint len1 = length();
- uint len2 = str.length();
- if ( len2 ) {
- setLength(len1+len2);
- memcpy( d->unicode+len1, str.unicode(), sizeof(QChar)*len2 );
- } else if ( isNull() && !str.isNull() ) { // ## just for 1.x compat:
- *this = fromLatin1("");
- }
- return *this;
-}
-
-/*!
- Appends \a c to the string and returns a reference to the string.
-*/
-
-QString &QString::operator+=( QChar c )
-{
- setLength(length()+1);
- d->unicode[length()-1] = c;
- return *this;
-}
-
-/*!
- Appends \a c to the string and returns a reference to the string.
-*/
-
-QString &QString::operator+=( char c )
-{
- setLength(length()+1);
- d->unicode[length()-1] = c;
- return *this;
-}
-
-
-
-/*! \fn char QChar::latin1() const
-
- Returns a latin-1 copy of this character, if this character is in
- the latin-1 character set. If not, this function returns 0.
-*/
-
-
-/*!
- Returns a Latin-1 representation of the string. Note that the returned
- value is undefined if the string contains non-Latin-1 characters. If you
- want to convert strings into formats other than Unicode, see the
- QTextCodec classes.
-
- This function is mainly useful for boot-strapping legacy code to
- use Unicode.
-
- The result remains valid so long as one unmodified
- copy of the source string exists.
-
- \sa utf8(), local8Bit()
-*/
-const char* QString::latin1() const
-{
- if ( d->ascii ) {
- if ( d->dirtyascii )
- delete [] d->ascii;
- else
- return d->ascii;
- }
- Q2HELPER(stat_get_ascii++)
- Q2HELPER(stat_get_ascii_size+=d->len)
- static QTextCodec* codec = QTextCodec::codecForMib(106);
- if (codec) // we use utf8 coding also for latin1 if possible
- {
- QCString utf8str(codec->fromUnicode(*this));
- d->ascii = new char[utf8str.length()+1];
- if (utf8str.isEmpty())
- {
- d->ascii[0]='\0'; // make empty string
- }
- else // copy string
- {
- qstrcpy(d->ascii,utf8str.data());
- }
- }
- else // fall back to latin1
- {
- d->ascii = unicodeToAscii( d->unicode, d->len );
- }
- QCString utf8str(utf8());
- d->dirtyascii = 0;
- return d->ascii;
-}
-
-/*! \obsolete
-
- This functions simply calls latin1() and returns the result.
-*/
-const char* QString::ascii() const
-{
- return latin1();
-}
-
-#ifndef QT_NO_TEXTCODEC
-/*!
- Returns the string encoded in UTF8 format.
-
- See QTextCodec for more diverse coding/decoding of Unicode strings.
-
- \sa QString::fromUtf8(), local8Bit(), latin1()
-*/
-QCString QString::utf8() const
-{
- static QTextCodec* codec = QTextCodec::codecForMib(106);
- return codec
- ? codec->fromUnicode(*this)
- : QCString(latin1());
-}
-
-/*!
- Returns the unicode string decoded from the
- first \a len bytes of \a utf8. If \a len is -1 (the default), the
- length of \a utf8 is used. If trailing partial characters are in
- \a utf8, they are ignored.
-
- See QTextCodec for more diverse coding/decoding of Unicode strings.
-*/
-QString QString::fromUtf8(const char* utf8, int len)
-{
- static QTextCodec* codec = QTextCodec::codecForMib(106);
- if ( len < 0 ) len = qstrlen(utf8);
- return codec
- ? codec->toUnicode(utf8, len)
- : QString::fromLatin1(utf8, len);
-}
-#endif // QT_NO_TEXTCODEC
-/*!
- Creates a QString from Latin1 text. This is the same as the
- QString(const char*) constructor, but you can make that constructor
- invisible if you compile with the define QT_NO_CAST_ASCII, in which
- case you can explicitly create a QString from Latin-1 text using
- this function.
-*/
-QString QString::fromLatin1(const char* chars, int len)
-{
- uint l;
- QChar *uc;
- if ( len < 0 ) {
- uc = internalAsciiToUnicode(chars,&l);
- } else {
- uc = internalAsciiToUnicode(chars,&l,len);
- }
- return QString(new QStringData(uc,l,l), TRUE);
-}
-
-/*!
- \fn const QChar* QString::unicode() const
-
- Returns the Unicode representation of the string. The result
- remains valid until the string is modified.
-*/
-
-/*!
- Returns the string encoded in a locale-specific format. On X11, this
- is the QTextCodec::codecForLocale(). On Windows, it is a system-defined
- encoding.
-
- See QTextCodec for more diverse coding/decoding of Unicode strings.
-
- \sa QString::fromLocal8Bit(), latin1(), utf8()
-*/
-
-
-QCString QString::local8Bit() const
-{
-#ifdef QT_NO_TEXTCODEC
- return latin1();
-#else
-#ifdef _WS_X11_
- static QTextCodec* codec = QTextCodec::codecForLocale();
- return codec
- ? codec->fromUnicode(*this)
- : QCString(latin1());
-#endif
-#ifdef _WS_MAC_
- static QTextCodec* codec = QTextCodec::codecForLocale();
- return codec
- ? codec->fromUnicode(*this)
- : QCString(latin1());
-#endif
-#ifdef _WS_WIN_
- return qt_winQString2MB( *this );
-#endif
-#ifdef _WS_QWS_
- return utf8(); // ##### if there is ANY 8 bit format supported?
-#endif
-#endif
-}
-
-/*!
- Returns the unicode string decoded from the
- first \a len bytes of \a local8Bit. If \a len is -1 (the default), the
- length of \a local8Bit is used. If trailing partial characters are in
- \a local8Bit, they are ignored.
-
- \a local8Bit is assumed to be encoded in a locale-specific format.
-
- See QTextCodec for more diverse coding/decoding of Unicode strings.
-*/
-QString QString::fromLocal8Bit(const char* local8Bit, int len)
-{
-#ifdef QT_NO_TEXTCODEC
- return fromLatin1( local8Bit, len );
-#else
-
- if ( !local8Bit )
- return QString::null;
-#ifdef _WS_X11_
- static QTextCodec* codec = QTextCodec::codecForLocale();
- if ( len < 0 ) len = qstrlen(local8Bit);
- return codec
- ? codec->toUnicode(local8Bit, len)
- : QString::fromLatin1(local8Bit,len);
-#endif
-#ifdef _WS_MAC_
- static QTextCodec* codec = QTextCodec::codecForLocale();
- if ( len < 0 ) len = qstrlen(local8Bit);
- return codec
- ? codec->toUnicode(local8Bit, len)
- : QString::fromLatin1(local8Bit,len);
-#endif
-// Should this be OS_WIN32?
-#ifdef _WS_WIN_
- if ( len >= 0 ) {
- QCString s(local8Bit,len+1);
- return qt_winMB2QString(s);
- }
- return qt_winMB2QString( local8Bit );
-#endif
-#ifdef _WS_QWS_
- return fromUtf8(local8Bit,len);
-#endif
-#endif // QT_NO_TEXTCODEC
-}
-
-/*!
- \fn QString::operator const char *() const
-
- Returns latin1(). Be sure to see the warnings documented there.
- Note that for new code which you wish to be strictly Unicode-clean,
- you can define the macro QT_NO_ASCII_CAST when compiling your code
- to hide this function so that automatic casts are not done. This
- has the added advantage that you catch the programming error
- described under operator!().
-*/
-
-/*!
- \fn QChar QString::at( uint ) const
-
- Returns the character at \a i, or 0 if \a i is beyond the length
- of the string.
-
- Note: If this QString is not const or const&, the non-const at()
- will be used instead, which will expand the string if \a i is beyond
- the length of the string.
-*/
-
-/*!
- \fn QChar QString::constref(uint i) const
- Equivalent to at(i), this returns the QChar at \a i by value.
-
- \sa ref()
-*/
-
-/*!
- \fn QChar& QString::ref(uint i)
- Returns the QChar at \a i by reference.
-
- \sa constref()
-*/
-
-/*!
- \fn QChar QString::operator[](int) const
-
- Returns the character at \a i, or QChar::null if \a i is beyond the
- length of the string.
-
- Note: If this QString is not const or const&, the non-const operator[]
- will be used instead, which will expand the string if \a i is beyond
- the length of the string.
-*/
-
-/*!
- \fn QCharRef QString::operator[](int)
-
- Returns an object that references the character at \a i.
- This reference
- can then be assigned to, or otherwise used immediately, but
- becomes invalid once further modifications are made to the string.
- The QCharRef internal class can be used much like a constant QChar, but
- if you assign to it, you change the original string (which enlarges
- and detaches itself). You will get compilation errors if you try to
- use the result as anything but a QChar.
-*/
-
-/*!
- \fn QCharRef QString::at( uint i )
- Returns a reference to the character at \a i, expanding
- the string with QChar::null if necessary. The resulting reference
- can then be assigned to, or otherwise used immediately, but
- becomes invalid once further modifications are made to the string.
-*/
-
-/*!
- Internal chunk of code to handle the
- uncommon cases of at() above.
-*/
-void QString::subat( uint i )
-{
- uint olen = d->len;
- if ( i >= olen ) {
- setLength( i+1 ); // i is index; i+1 is needed length
- for ( uint j=olen; j<=i; j++ )
- d->unicode[j] = QChar::null;
- } else {
- // Just be sure to detach
- real_detach();
- }
-}
-
-
-/*!
- Resizes the string to \a len unicode characters and copies \a unicode
- into the string. If \a unicode is null, nothing is copied, but the
- string is resized to \a len anyway. If \a len is zero, the string
- becomes a \link isNull() null\endlink string.
-
- \sa setLatin1(), isNull()
-*/
-
-QString& QString::setUnicode( const QChar *unicode, uint len )
-{
- if ( len == 0 ) { // set to null string
- if ( d != shared_null ) { // beware of nullstring being set to nullstring
- deref();
- d = shared_null ? shared_null : makeSharedNull();
- d->ref();
- }
- } else if ( d->count != 1 || len > d->maxl ||
- ( len*4 < d->maxl && d->maxl > 4 ) ) { // detach, grown or shrink
- Q2HELPER(stat_copy_on_write++)
- Q2HELPER(stat_copy_on_write_size+=d->len)
- uint newMax = 4;
- while ( newMax < len )
- newMax *= 2;
- QChar* nd = QT_ALLOC_QCHAR_VEC( newMax );
- if ( unicode )
- memcpy( nd, unicode, sizeof(QChar)*len );
- deref();
- d = new QStringData( nd, len, newMax );
- } else {
- d->len = len;
- d->dirtyascii = 1;
- if ( unicode )
- memcpy( d->unicode, unicode, sizeof(QChar)*len );
- }
- return *this;
-}
-
-/*!
- Resizes the string to \a len unicode characters and copies
- \a unicode_as_ushorts into the string (on some X11 client
- platforms this will involve a byte-swapping pass).
-
- If \a unicode is null, nothing is copied, but the
- string is resized to \a len anyway. If \a len is zero, the string
- becomes a \link isNull() null\endlink string.
-
- \sa setLatin1(), isNull()
-*/
-QString& QString::setUnicodeCodes( const ushort* unicode_as_ushorts, uint len )
-{
- setUnicode((const QChar*)unicode_as_ushorts, len);
- QChar t(0x1234);
- if ( unicode_as_ushorts && *((ushort*)&t) == 0x3412 ) {
- // Need to byteswap
- char* b = (char*)d->unicode;
- while ( len-- ) {
- char c = b[0];
- b[0] = b[1];
- b[1] = c;
- b += sizeof(QChar);
- }
- }
- return *this;
-}
-
-
-/*!
- Sets this string to \a str, interpreted as a classic Latin 1 C string.
- If the \a len argument is negative (default), it is set to strlen(str).
-
- If \a str is 0 a null string is created. If \a str is "" an empty
- string is created.
-
- \sa isNull(), isEmpty()
-*/
-
-QString &QString::setLatin1( const char *str, int len )
-{
- if ( str == 0 )
- return setUnicode(0,0);
- if ( len < 0 )
- len = qstrlen(str);
- if ( len == 0 ) { // won't make a null string
- deref();
- uint l;
- QChar *uc = internalAsciiToUnicode(str,&l);
- d = new QStringData(uc,l,l);
- } else {
- setUnicode( 0, len ); // resize but not copy
- QChar *p = d->unicode;
- while ( len-- )
- *p++ = *str++;
- }
- return *this;
-}
-
-
-/*!
- \fn int QString::compare (const QString & s1, const QString & s2)
-
- Compare \a s1 to \a s2 returning an integer less than, equal to, or
- greater than zero if s1 is, respectively, lexically less than, equal to,
- or greater than s2.
-*/
-
-/*!
- Compares this string to \a s, returning an integer less than, equal to, or
- greater than zero if it is, respectively, lexically less than, equal to,
- or greater than \a s.
-*/
-int QString::compare( const QString& s ) const
-{
- return ucstrcmp(*this,s);
-}
-
-bool operator==( const QString &s1, const QString &s2 )
-{
- return (s1.length() == s2.length()) && s1.isNull() == s2.isNull() &&
- (memcmp((char*)s1.unicode(),(char*)s2.unicode(),
- s1.length()*sizeof(QChar)) ==0);
-}
-
-bool operator!=( const QString &s1, const QString &s2 )
-{ return !(s1==s2); }
-
-bool operator<( const QString &s1, const QString &s2 )
-{ return ucstrcmp(s1,s2) < 0; }
-
-bool operator<=( const QString &s1, const QString &s2 )
-{ return ucstrcmp(s1,s2) <= 0; }
-
-bool operator>( const QString &s1, const QString &s2 )
-{ return ucstrcmp(s1,s2) > 0; }
-
-bool operator>=( const QString &s1, const QString &s2 )
-{ return ucstrcmp(s1,s2) >= 0; }
-
-
-bool operator==( const QString &s1, const char *s2 )
-{ return s1==QString(s2); }
-
-bool operator==( const char *s1, const QString &s2 )
-{ return QString(s1)==s2; }
-
-bool operator!=( const QString &s1, const char *s2 )
-{ return !(s1==s2); }
-
-bool operator!=( const char *s1, const QString &s2 )
-{ return !(s1==s2); }
-
-bool operator<( const QString &s1, const char *s2 )
-{ return ucstrcmp(s1,s2) < 0; }
-
-bool operator<( const char *s1, const QString &s2 )
-{ return ucstrcmp(s1,s2) < 0; }
-
-bool operator<=( const QString &s1, const char *s2 )
-{ return ucstrcmp(s1,s2) <= 0; }
-
-bool operator<=( const char *s1, const QString &s2 )
-{ return ucstrcmp(s1,s2) <= 0; }
-
-bool operator>( const QString &s1, const char *s2 )
-{ return ucstrcmp(s1,s2) > 0; }
-
-bool operator>( const char *s1, const QString &s2 )
-{ return ucstrcmp(s1,s2) > 0; }
-
-bool operator>=( const QString &s1, const char *s2 )
-{ return ucstrcmp(s1,s2) >= 0; }
-
-bool operator>=( const char *s1, const QString &s2 )
-{ return ucstrcmp(s1,s2) >= 0; }
-
-
-/*****************************************************************************
- Documentation for QString related functions
- *****************************************************************************/
-
-/*!
- \fn bool operator==( const QString &s1, const QString &s2 )
- \relates QString
- Returns TRUE if the two strings are equal, or FALSE if they are different.
- A null string is different from an empty, non-null string.
-
- Equivalent to <code>qstrcmp(s1,s2) == 0</code>.
-*/
-
-/*!
- \fn bool operator==( const QString &s1, const char *s2 )
- \relates QString
- Returns TRUE if the two strings are equal, or FALSE if they are different.
-
- Equivalent to <code>qstrcmp(s1,s2) == 0</code>.
-*/
-
-/*!
- \fn bool operator==( const char *s1, const QString &s2 )
- \relates QString
- Returns TRUE if the two strings are equal, or FALSE if they are different.
-
- Equivalent to <code>qstrcmp(s1,s2) == 0</code>.
-*/
-
-/*!
- \fn bool operator!=( const QString &s1, const QString &s2 )
- \relates QString
- Returns TRUE if the two strings are different, or FALSE if they are equal.
-
- Equivalent to <code>qstrcmp(s1,s2) != 0</code>.
-*/
-
-/*!
- \fn bool operator!=( const QString &s1, const char *s2 )
- \relates QString
- Returns TRUE if the two strings are different, or FALSE if they are equal.
-
- Equivalent to <code>qstrcmp(s1,s2) != 0</code>.
-*/
-
-/*!
- \fn bool operator!=( const char *s1, const QString &s2 )
- \relates QString
- Returns TRUE if the two strings are different, or FALSE if they are equal.
-
- Equivalent to <code>qstrcmp(s1,s2) != 0</code>.
-*/
-
-/*!
- \fn bool operator<( const QString &s1, const char *s2 )
- \relates QString
- Returns TRUE if \a s1 is alphabetically less than \a s2, otherwise FALSE.
-
- Equivalent to <code>qstrcmp(s1,s2) \< 0</code>.
-*/
-
-/*!
- \fn bool operator<( const char *s1, const QString &s2 )
- \relates QString
- Returns TRUE if \a s1 is alphabetically less than \a s2, otherwise FALSE.
-
- Equivalent to <code>qstrcmp(s1,s2) \< 0</code>.
-*/
-
-/*!
- \fn bool operator<=( const QString &s1, const char *s2 )
- \relates QString
- Returns TRUE if \a s1 is alphabetically less than or equal to \a s2,
- otherwise FALSE.
-
- Equivalent to <code>qstrcmp(s1,s2) \<= 0</code>.
-*/
-
-/*!
- \fn bool operator<=( const char *s1, const QString &s2 )
- \relates QString
- Returns TRUE if \a s1 is alphabetically less than or equal to \a s2,
- otherwise FALSE.
-
- Equivalent to <code>qstrcmp(s1,s2) \<= 0</code>.
-*/
-
-/*!
- \fn bool operator>( const QString &s1, const char *s2 )
- \relates QString
- Returns TRUE if \a s1 is alphabetically greater than \a s2, otherwise FALSE.
-
- Equivalent to <code>qstrcmp(s1,s2) \> 0</code>.
-*/
-
-/*!
- \fn bool operator>( const char *s1, const QString &s2 )
- \relates QString
- Returns TRUE if \a s1 is alphabetically greater than \a s2, otherwise FALSE.
-
- Equivalent to <code>qstrcmp(s1,s2) \> 0</code>.
-*/
-
-/*!
- \fn bool operator>=( const QString &s1, const char *s2 )
- \relates QString
- Returns TRUE if \a s1 is alphabetically greater than or equal to \a s2,
- otherwise FALSE.
-
- Equivalent to <code>qstrcmp(s1,s2) \>= 0</code>.
-*/
-
-/*!
- \fn bool operator>=( const char *s1, const QString &s2 )
- \relates QString
- Returns TRUE if \a s1 is alphabetically greater than or equal to \a s2,
- otherwise FALSE.
-
- Equivalent to <code>qstrcmp(s1,s2) \>= 0</code>.
-*/
-
-/*!
- \fn QString operator+( const QString &s1, const QString &s2 )
- \relates QString
- Returns the concatenated string of s1 and s2.
-*/
-
-/*!
- \fn QString operator+( const QString &s1, const char *s2 )
- \relates QString
- Returns the concatenated string of s1 and s2.
-*/
-
-/*!
- \fn QString operator+( const char *s1, const QString &s2 )
- \relates QString
- Returns the concatenated string of s1 and s2.
-*/
-
-/*!
- \fn QString operator+( const QString &s, char c )
- \relates QString
- Returns the concatenated string of s and c.
-*/
-
-/*!
- \fn QString operator+( char c, const QString &s )
- \relates QString
- Returns the concatenated string of c and s.
-*/
-
-
-/*****************************************************************************
- QString stream functions
- *****************************************************************************/
-#ifndef QT_NO_DATASTREAM
-/*!
- \relates QString
- Writes a string to the stream.
-
- \sa \link datastreamformat.html Format of the QDataStream operators \endlink
-*/
-
-QDataStream &operator<<( QDataStream &s, const QString &str )
-{
- if ( s.version() == 1 ) {
- QCString l( str.latin1() );
- s << l;
- }
- else {
- const char* ub = (const char*)str.unicode();
- if ( ub || s.version() < 3 ) {
- if ( QChar::networkOrdered() ==
- (s.byteOrder()==QDataStream::BigEndian) ) {
- s.writeBytes( ub, (int)sizeof(QChar)*str.length() );
- } else {
- static const uint auto_size = 1024;
- char t[auto_size];
- char *b;
- if ( str.length()*sizeof(QChar) > auto_size ) {
- b = new char[str.length()*sizeof(QChar)];
- } else {
- b = t;
- }
- int l = str.length();
- char *c=b;
- while ( l-- ) {
- *c++ = ub[1];
- *c++ = ub[0];
- ub+=sizeof(QChar);
- }
- s.writeBytes( b, (int)sizeof(QChar)*str.length() );
- if ( str.length()*sizeof(QChar) > auto_size )
- delete [] b;
- }
- } else {
- // write null marker
- s << (Q_UINT32)0xffffffff;
- }
- }
- return s;
-}
-
-/*!
- \relates QString
- Reads a string from the stream.
-
- \sa \link datastreamformat.html Format of the QDataStream operators \endlink
-*/
-
-QDataStream &operator>>( QDataStream &s, QString &str )
-{
-#ifdef QT_QSTRING_UCS_4
-#if defined(_CC_GNU_)
-#warning "operator>> not working properly"
-#endif
-#endif
- if ( s.version() == 1 ) {
- QCString l;
- s >> l;
- str = QString( l );
- }
- else {
- Q_UINT32 bytes;
- s >> bytes; // read size of string
- if ( bytes == 0xffffffff ) { // null string
- str = QString::null;
- } else if ( bytes > 0 ) { // not empty
- str.setLength( bytes/2 );
- char* b = (char*)str.d->unicode;
- s.readRawBytes( b, bytes );
- if ( QChar::networkOrdered() !=
- (s.byteOrder()==QDataStream::BigEndian) ) {
- bytes /= 2;
- while ( bytes-- ) {
- char c = b[0];
- b[0] = b[1];
- b[1] = c;
- b += 2;
- }
- }
- } else {
- str = "";
- }
- }
- return s;
-}
-#endif // QT_NO_DATASTREAM
-
-/*****************************************************************************
- QConstString member functions
- *****************************************************************************/
-
-/*!
- \class QConstString qstring.h
- \brief A QString which uses constant Unicode data.
-
- In order to minimize copying, highly optimized applications can use
- QConstString to provide a QString-compatible object from existing
- Unicode data. It is then the user's responsibility to make sure
- that the Unicode data must exist for the entire lifetime of the
- QConstString object.
-*/
-
-/*!
- Constructs a QConstString that uses the first \a length Unicode
- characters in the array \a unicode. Any attempt to modify
- copies of the string will cause it to create a copy of the
- data, thus it remains forever unmodified.
-
- Note that \a unicode is \e not \e copied. The caller \e must be
- able to guarantee that \a unicode will not be deleted or
- modified. Since that is generally not the case with \c const strings
- (they are references), this constructor demands a non-const pointer
- even though it never modifies \a unicode.
-*/
-QConstString::QConstString( QChar* unicode, uint length ) :
- QString(new QStringData(unicode, length, length),TRUE)
-{
-}
-
-/*!
- Destroys the QConstString, creating a copy of the data if
- other strings are still using it.
-*/
-QConstString::~QConstString()
-{
- if ( d->count > 1 ) {
- QChar* cp = QT_ALLOC_QCHAR_VEC( d->len );
- memcpy( cp, d->unicode, d->len*sizeof(QChar) );
- d->unicode = cp;
- } else {
- d->unicode = 0;
- }
-
- // The original d->unicode is now unlinked.
-}
-
-/*!
- \fn const QString& QConstString::string() const
-
- Returns a constant string referencing the data passed during
- construction.
-*/
-
-/*!
- Returns whether the strings starts with \a s, or not.
- */
-bool QString::startsWith( const QString& s ) const
-{
- for ( int i =0; i < (int) s.length(); i++ ) {
- if ( i >= (int) length() || d->unicode[i] != s[i] )
- return FALSE;
- }
- return TRUE;
-}
-
-
-
-#if defined(_OS_WIN32_)
-
-#include <windows.h>
-
-/*!
- Returns a static Windows TCHAR* from a QString, possibly adding NUL.
-
- The lifetime of the return value is until the next call to this function.
-*/
-const void* qt_winTchar(const QString& str_in, bool addnul)
-{
- // So that the return value lives long enough.
- static QString str;
- str = str_in;
-
-#ifdef UNICODE
- static uint buflen = 256;
- static TCHAR *buf = new TCHAR[buflen];
-
- const QChar* uc = str.unicode();
-
-#define EXTEND if (str.length() > buflen) { delete buf; buf = new TCHAR[buflen=str.length()+1]; }
-
-#if defined(_WS_X11_) || defined(_OS_WIN32_BYTESWAP_)
- EXTEND
- for ( int i=str.length(); i--; )
- buf[i] = uc[i].row() << 8 | uc[i].cell();
- if ( addnul )
- buf[str.length()] = 0;
-#else
- // Same endianess of TCHAR
- if ( addnul ) {
- EXTEND
- memcpy(buf,uc,sizeof(TCHAR)*str.length());
- buf[str.length()] = 0;
- } else {
- return uc;
- }
-#endif
- return buf;
-#undef EXTEND
-
-#else
- return str.latin1();
-#endif
-}
-
-/*!
- Makes a new null terminated Windows TCHAR* from a QString.
-*/
-void* qt_winTchar_new(const QString& str)
-{
- TCHAR* result = new TCHAR[str.length()+1];
- memcpy(result, qt_winTchar(str,FALSE), sizeof(TCHAR)*str.length());
- result[str.length()] = 0;
- return result;
-}
-
-/*!
- Makes a QString from a Windows TCHAR*.
-*/
-QString qt_winQString(void* tc)
-{
-#ifdef UNICODE
-
- int len=0;
- while ( ((TCHAR*)tc)[len] )
- len++;
-#if defined(_WS_X11_) || defined(_OS_WIN32_BYTESWAP_)
- QString r;
- for ( int i=0; i<len; i++ )
- r += QChar(((TCHAR*)tc)[i]&0xff,((TCHAR*)tc)[i]>>8);
- return r;
-#else
- // Same endianess of TCHAR
- return QString((QChar*)tc,len);
-#endif
-#undef EXTEND
-#else
- return (TCHAR*)tc;
-#endif
-}
-
-QCString qt_winQString2MB( const QString& s, int uclen )
-{
- if ( uclen < 0 )
- uclen = s.length();
- if ( uclen == 0 )
- return QCString();
- BOOL used_def;
- int bufSize=4096;
- QCString mb(bufSize);
- int len;
- while ( !(len=WideCharToMultiByte(CP_ACP, 0, (const WCHAR*)s.unicode(), uclen,
- mb.rawData(), bufSize-1, 0, &used_def)) )
- {
- int r = GetLastError();
- if ( r == ERROR_INSUFFICIENT_BUFFER ) {
- bufSize=1+WideCharToMultiByte( CP_ACP, 0,
- (const WCHAR*)s.unicode(), uclen,
- 0, 0, 0, &used_def);
- mb.resize(bufSize);
- // and try again...
- } else {
- // Fail.
- qWarning("WideCharToMultiByte cannot convert multibyte text (error %d): %s (UTF8)",
- r, s.utf8().data());
- break;
- }
- }
- mb[len]='\0';
- return mb;
-}
-
-// WATCH OUT: mblen must include the NUL (or just use -1)
-QString qt_winMB2QString( const char* mb, int mblen )
-{
- if ( !mb || !mblen )
- return QString::null;
- const int wclen_auto = 4096;
- WCHAR wc_auto[wclen_auto];
- int wclen = wclen_auto;
- WCHAR *wc = wc_auto;
- int len;
- while ( !(len=MultiByteToWideChar( CP_ACP, MB_PRECOMPOSED,
- mb, mblen, wc, wclen )) )
- {
- int r = GetLastError();
- if ( r == ERROR_INSUFFICIENT_BUFFER ) {
- if ( wc != wc_auto ) {
- qWarning("Size changed in MultiByteToWideChar");
- break;
- } else {
- wclen = MultiByteToWideChar( CP_ACP, MB_PRECOMPOSED,
- mb, mblen, 0, 0 );
- wc = new WCHAR[wclen];
- // and try again...
- }
- } else {
- // Fail.
- qWarning("MultiByteToWideChar cannot convert multibyte text");
- break;
- }
- }
- if ( len <= 0 )
- return QString::null;
- QString s( (QChar*)wc, len-1 ); // len-1: we don't want terminator
- if ( wc != wc_auto )
- delete [] wc;
- return s;
-}
-
-
-#endif // _OS_WIN32_
diff --git a/qtools/qstring.h b/qtools/qstring.h
deleted file mode 100644
index c35faf3..0000000
--- a/qtools/qstring.h
+++ /dev/null
@@ -1,879 +0,0 @@
-/****************************************************************************
-**
-**
-** Definition of the QString class, and related Unicode
-** functions.
-**
-** Created : 920609
-**
-** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
-**
-** This file is part of the tools module of the Qt GUI Toolkit.
-**
-** This file may be distributed under the terms of the Q Public License
-** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#ifndef QSTRING_H
-#define QSTRING_H
-
-#ifndef QT_H
-#include "qcstring.h"
-#endif // QT_H
-
-#define QT_NO_ASCII_CAST
-
-/*****************************************************************************
- QString class
- *****************************************************************************/
-
-//class QRegExp;
-class QString;
-class QCharRef;
-
-class Q_EXPORT Q_PACKED QChar {
-public:
- QChar();
- QChar( char c );
- QChar( uchar c );
- QChar( uchar c, uchar r );
- QChar( const QChar& c );
- QChar( ushort rc );
- QChar( short rc );
- QChar( uint rc );
- QChar( int rc );
- QChar &operator=(const QChar &c);
-
- QT_STATIC_CONST QChar null; // 0000
- QT_STATIC_CONST QChar replacement; // FFFD
- QT_STATIC_CONST QChar byteOrderMark; // FEFF
- QT_STATIC_CONST QChar byteOrderSwapped; // FFFE
- QT_STATIC_CONST QChar nbsp; // 00A0
-
- // Unicode information
-
- enum Category
- {
- NoCategory,
-
- Mark_NonSpacing, // Mn
- Mark_SpacingCombining, // Mc
- Mark_Enclosing, // Me
-
- Number_DecimalDigit, // Nd
- Number_Letter, // Nl
- Number_Other, // No
-
- Separator_Space, // Zs
- Separator_Line, // Zl
- Separator_Paragraph, // Zp
-
- Other_Control, // Cc
- Other_Format, // Cf
- Other_Surrogate, // Cs
- Other_PrivateUse, // Co
- Other_NotAssigned, // Cn
-
- Letter_Uppercase, // Lu
- Letter_Lowercase, // Ll
- Letter_Titlecase, // Lt
- Letter_Modifier, // Lm
- Letter_Other, // Lo
-
- Punctuation_Connector, // Pc
- Punctuation_Dask, // Pd
- Punctuation_Open, // Ps
- Punctuation_Close, // Pe
- Punctuation_InitialQuote, // Pi
- Punctuation_FinalQuote, // Pf
- Punctuation_Other, // Po
-
- Symbol_Math, // Sm
- Symbol_Currency, // Sc
- Symbol_Modifier, // Sk
- Symbol_Other // So
- };
-
- enum Direction
- {
- DirL, DirR, DirEN, DirES, DirET, DirAN, DirCS, DirB, DirS, DirWS, DirON,
- DirLRE, DirLRO, DirAL, DirRLE, DirRLO, DirPDF, DirNSM, DirBN
- };
-
- enum Decomposition
- {
- Single, Canonical, Font, NoBreak, Initial, Medial,
- Final, Isolated, Circle, Super, Sub, Vertical,
- Wide, Narrow, Small, Square, Compat, Fraction
- };
-
- enum Joining
- {
- OtherJoining, Dual, Right, Center
- };
-
- // ****** WHEN ADDING FUNCTIONS, CONSIDER ADDING TO QCharRef TOO
-
- int digitValue() const;
- QChar lower() const;
- QChar upper() const;
-
- Category category() const;
- Direction direction() const;
- Joining joining() const;
- bool mirrored() const;
- QChar mirroredChar() const;
- QString decomposition() const;
- Decomposition decompositionTag() const;
-
- char latin1() const { return rw ? 0 : (char)cl; }
- ushort unicode() const { return (ushort)((rw << 8) | cl); }
-#ifndef QT_NO_CAST_ASCII
- // like all ifdef'd code this is undocumented
- operator char() const { return latin1(); }
-#endif
-
- bool isNull() const { return unicode()==0; }
- bool isPrint() const;
- bool isPunct() const;
- bool isSpace() const;
- bool isMark() const;
- bool isLetter() const;
- bool isNumber() const;
- bool isLetterOrNumber() const;
- bool isDigit() const;
-
- uchar& cell() { return cl; }
- uchar& row() { return rw; }
- uchar cell() const { return cl; }
- uchar row() const { return rw; }
-
- static bool networkOrdered() { return (int)net_ordered == 1; }
-
- friend inline int operator==( char ch, QChar c );
- friend inline int operator==( QChar c, char ch );
- friend inline int operator==( QChar c1, QChar c2 );
- friend inline int operator!=( QChar c1, QChar c2 );
- friend inline int operator!=( char ch, QChar c );
- friend inline int operator!=( QChar c, char ch );
- friend inline int operator<=( QChar c, char ch );
- friend inline int operator<=( char ch, QChar c );
- friend inline int operator<=( QChar c1, QChar c2 );
-
-private:
-#if defined(_WS_X11_) || defined(_OS_WIN32_BYTESWAP_) || defined( _WS_QWS_ )
- // XChar2b on X11, ushort on _OS_WIN32_BYTESWAP_
- //### QWS must be defined on a platform by platform basis
- uchar rw;
- uchar cl;
-#if defined(QT_QSTRING_UCS_4)
- ushort grp;
-#endif
- enum { net_ordered = 1 };
-#else
- // ushort on _OS_WIN32_
- uchar cl;
- uchar rw;
-#if defined(QT_QSTRING_UCS_4)
- ushort grp;
-#endif
- enum { net_ordered = 0 };
-#endif
-};
-
-inline QChar::QChar()
-{
- rw = 0; cl = 0;
-#ifdef QT_QSTRING_UCS_4
- grp = 0;
-#endif
-}
-inline QChar::QChar( char c )
-{
- rw = 0; cl = (uchar)c;
-#ifdef QT_QSTRING_UCS_4
- grp = 0;
-#endif
-}
-inline QChar::QChar( uchar c )
-{
- rw = 0; cl = c;
-#ifdef QT_QSTRING_UCS_4
- grp = 0;
-#endif
-}
-inline QChar::QChar( uchar c, uchar r )
-{
- rw = r; cl = c;
-#ifdef QT_QSTRING_UCS_4
- grp = 0;
-#endif
-}
-inline QChar::QChar( const QChar& c )
-{
- rw = c.rw; cl = c.cl;
-#ifdef QT_QSTRING_UCS_4
- grp = 0;
-#endif
-}
-inline QChar::QChar( ushort rc )
-{
- rw = (uchar)((rc>>8)&0xff); cl = (uchar)(rc&0xff);
-#ifdef QT_QSTRING_UCS_4
- grp = 0;
-#endif
-}
-inline QChar::QChar( short rc )
-{
- rw = (uchar)((rc>>8)&0xff); cl = (uchar)(rc&0xff);
-#ifdef QT_QSTRING_UCS_4
- grp = 0;
-#endif
-}
-inline QChar::QChar( uint rc )
-{
- rw = (uchar)((rc>>8)&0xff); cl = (uchar)(rc&0xff);
-#ifdef QT_QSTRING_UCS_4
- grp = 0;
-#endif
-}
-inline QChar::QChar( int rc )
-{
- rw = (uchar)((rc>>8)&0xff); cl = (uchar)(rc&0xff);
-#ifdef QT_QSTRING_UCS_4
- grp = 0;
-#endif
-}
-
-inline QChar &QChar::operator=(const QChar &c)
-{
- rw = c.rw;
- cl = c.cl;
-#ifdef QT_QSTRING_UCS_4
- grp = 0;
-#endif
- return *this;
-}
-
-inline int operator==( char ch, QChar c )
-{
- return ch == c.cl && !c.rw;
-}
-
-inline int operator==( QChar c, char ch )
-{
- return ch == c.cl && !c.rw;
-}
-
-inline int operator==( QChar c1, QChar c2 )
-{
- return c1.cl == c2.cl
- && c1.rw == c2.rw;
-}
-
-inline int operator!=( QChar c1, QChar c2 )
-{
- return c1.cl != c2.cl
- || c1.rw != c2.rw;
-}
-
-inline int operator!=( char ch, QChar c )
-{
- return ch != c.cl || c.rw;
-}
-
-inline int operator!=( QChar c, char ch )
-{
- return ch != c.cl || c.rw;
-}
-
-inline int operator<=( QChar c, char ch )
-{
- return !(ch < c.cl || c.rw);
-}
-
-inline int operator<=( char ch, QChar c )
-{
- return ch <= c.cl || c.rw;
-}
-
-inline int operator<=( QChar c1, QChar c2 )
-{
- return c1.rw > c2.rw
- ? FALSE
- : c1.rw < c2.rw
- ? TRUE
- : c1.cl <= c2.cl;
-}
-
-inline int operator>=( QChar c, char ch ) { return ch <= c; }
-inline int operator>=( char ch, QChar c ) { return c <= ch; }
-inline int operator>=( QChar c1, QChar c2 ) { return c2 <= c1; }
-inline int operator<( QChar c, char ch ) { return !(ch<=c); }
-inline int operator<( char ch, QChar c ) { return !(c<=ch); }
-inline int operator<( QChar c1, QChar c2 ) { return !(c2<=c1); }
-inline int operator>( QChar c, char ch ) { return !(ch>=c); }
-inline int operator>( char ch, QChar c ) { return !(c>=ch); }
-inline int operator>( QChar c1, QChar c2 ) { return !(c2>=c1); }
-
-// internal
-struct Q_EXPORT QStringData : public QShared {
- QStringData() :
- unicode(0), ascii(0), len(0), maxl(0), dirtyascii(0) { ref(); }
- QStringData(QChar *u, uint l, uint m) :
- unicode(u), ascii(0), len(l), maxl(m&0x3FFFFFFF), dirtyascii(0) { }
-
- ~QStringData() { if ( unicode ) delete[] ((char*)unicode);
- if ( ascii ) delete[] ascii; }
-
- void deleteSelf();
- QChar *unicode;
- char *ascii;
- uint len;
- uint maxl:30;
- uint dirtyascii:1;
-};
-
-
-class Q_EXPORT QString
-{
-public:
- QString(); // make null string
- QString( QChar ); // one-char string
- QString( const QString & ); // impl-shared copy
- QString( const QByteArray& ); // deep copy
- QString( const QCString& ); // deep copy
- QString( const QChar* unicode, uint length ); // deep copy
-#ifndef QT_NO_CAST_ASCII
- QString( const char *str ); // deep copy
-#endif
- ~QString();
-
- QString &operator=( const QString & ); // impl-shared copy
-#ifndef QT_NO_CAST_ASCII
- QString &operator=( const char * ); // deep copy
-#endif
- QString &operator=( const QCString& ); // deep copy
- QString &operator=( QChar c );
- QString &operator=( char c );
-
- enum Direction
- {
- /// No strongly directional text.
- /*!
- * As return value for direction() or baseDirection(), it means that the source string
- * is missing or empty, or contains neither left-to-right nor right-to-left characters.
- */
- DirNeutral = 0x0,
- /// Left-to-right text.
- /*!
- * - As return value for direction(), it means that the source string
- * contains no right-to-left characters.
- * - As return value for basicDirection(), it means that the first strong character
- * of the source string has a left-to-right direction.
- */
- DirLTR = 0x1,
- /// Right-to-left text.
- /*!
- * - As return value for direction(), it means that the source string
- * contains no left-to-right characters.
- * - As return value for basicDirection(), it means that the first strong character
- * of the source string has a right-to-left direction.
- */
- DirRTL = 0x2,
- /// Mixed-directional text
- /*!
- * As return value for direction(), it means that the source string
- * contains both left-to-right and right-to-left characters.
- */
- DirMixed = 0x3
- };
-
- //QT_STATIC_CONST QString null;
- //bool isNull() const;
-
- struct Null { };
- static const Null null;
- inline QString(const Null &): d(shared_null) { d->ref(); }
- inline QString &operator=(const Null &) { *this = QString(); return *this; }
- inline bool isNull() const { return d == shared_null; }
-
- bool isEmpty() const;
- uint length() const;
- void truncate( uint pos );
-
-#if QT_VERSION >= 300
-#error "fill() Should return *this, or QChar constructor should take count=1"
-#endif
- void fill( QChar c, int len = -1 );
-
- QString copy() const;
-
- QString arg(long a, int fieldwidth=0, int base=10) const;
- QString arg(ulong a, int fieldwidth=0, int base=10) const;
- QString arg(int a, int fieldwidth=0, int base=10) const;
- QString arg(uint a, int fieldwidth=0, int base=10) const;
- QString arg(short a, int fieldwidth=0, int base=10) const;
- QString arg(ushort a, int fieldwidth=0, int base=10) const;
- QString arg(char a, int fieldwidth=0) const;
- QString arg(QChar a, int fieldwidth=0) const;
- QString arg(const QString& a, int fieldwidth=0) const;
- QString arg(double a, int fieldwidth=0, char fmt='g', int prec=-1) const;
-
- QString &sprintf( const char* format, ... )
-#if defined(_CC_GNU_) && !defined(__INSURE__)
- __attribute__ ((format (printf, 2, 3)))
-#endif
- ;
-
- int find( QChar c, int index=0, bool cs=TRUE ) const;
- int find( char c, int index=0, bool cs=TRUE ) const;
- int find( const QString &str, int index=0, bool cs=TRUE ) const;
- //int find( const QRegExp &, int index=0 ) const;
-#ifndef QT_NO_CAST_ASCII
- int find( const char* str, int index=0 ) const;
-#endif
- int findRev( QChar c, int index=-1, bool cs=TRUE) const;
- int findRev( char c, int index=-1, bool cs=TRUE) const;
- int findRev( const QString &str, int index=-1, bool cs=TRUE) const;
- //int findRev( const QRegExp &, int index=-1 ) const;
-#ifndef QT_NO_CAST_ASCII
- int findRev( const char* str, int index=-1 ) const;
-#endif
- int contains( QChar c, bool cs=TRUE ) const;
- int contains( char c, bool cs=TRUE ) const
- { return contains(QChar(c), cs); }
-#ifndef QT_NO_CAST_ASCII
- int contains( const char* str, bool cs=TRUE ) const;
-#endif
- int contains( const QString &str, bool cs=TRUE ) const;
- //int contains( const QRegExp & ) const;
-
- QString left( uint len ) const;
- QString right( uint len ) const;
- QString mid( uint index, uint len=0xffffffff) const;
-
- QString leftJustify( uint width, QChar fill=' ', bool trunc=FALSE)const;
- QString rightJustify( uint width, QChar fill=' ',bool trunc=FALSE)const;
-
- QString lower() const;
- QString upper() const;
-
- QString stripWhiteSpace() const;
- QString simplifyWhiteSpace() const;
-
- QString &insert( uint index, const QString & );
- QString &insert( uint index, const QChar*, uint len );
- QString &insert( uint index, QChar );
- QString &insert( uint index, char c ) { return insert(index,QChar(c)); }
- QString &append( char );
- QString &append( QChar );
- QString &append( const QString & );
- QString &prepend( char );
- QString &prepend( QChar );
- QString &prepend( const QString & );
- QString &remove( uint index, uint len );
- QString &replace( uint index, uint len, const QString & );
- QString &replace( uint index, uint len, const QChar*, uint clen );
- //QString &replace( const QRegExp &, const QString & );
-
- short toShort( bool *ok=0, int base=10 ) const;
- ushort toUShort( bool *ok=0, int base=10 ) const;
- int toInt( bool *ok=0, int base=10 ) const;
- uint toUInt( bool *ok=0, int base=10 ) const;
- long toLong( bool *ok=0, int base=10 ) const;
- ulong toULong( bool *ok=0, int base=10 ) const;
- uint64 toUInt64( bool *ok=0, int base=10 ) const;
- float toFloat( bool *ok=0 ) const;
- double toDouble( bool *ok=0 ) const;
-
- QString &setNum( short, int base=10 );
- QString &setNum( ushort, int base=10 );
- QString &setNum( int, int base=10 );
- QString &setNum( uint, int base=10 );
- QString &setNum( long, int base=10 );
- QString &setNum( ulong, int base=10 );
- QString &setNum( float, char f='g', int prec=6 );
- QString &setNum( double, char f='g', int prec=6 );
-
- static QString number( long, int base=10 );
- static QString number( ulong, int base=10);
- static QString number( int, int base=10 );
- static QString number( uint, int base=10);
- static QString number( double, char f='g', int prec=6 );
-
- void setExpand( uint index, QChar c );
-
- QString &operator+=( const QString &str );
- QString &operator+=( QChar c );
- QString &operator+=( char c );
-
- // Your compiler is smart enough to use the const one if it can.
- QChar at( uint i ) const
- { return i<d->len ? d->unicode[i] : QChar::null; }
- QChar operator[]( int i ) const { return at((uint)i); }
- QCharRef at( uint i );
- QCharRef operator[]( int i );
-
- QChar constref(uint i) const
- { return at(i); }
- QChar& ref(uint i)
- { // Optimized for easy-inlining by simple compilers.
- if (d->count!=1 || i>=d->len)
- subat(i);
- d->dirtyascii=1;
- return d->unicode[i];
- }
-
- const QChar* unicode() const { return d->unicode; }
- const char* ascii() const;
- const char* latin1() const;
- static QString fromLatin1(const char*, int len=-1);
- const unsigned short *ucs2() const;
- static QString fromUcs2( const unsigned short *ucs2 );
-#ifndef QT_NO_TEXTCODEC
- QCString utf8() const;
- static QString fromUtf8(const char*, int len=-1);
-#endif
- QCString local8Bit() const;
- static QString fromLocal8Bit(const char*, int len=-1);
- bool operator!() const;
-#ifndef QT_NO_ASCII_CAST
- operator const char *() const { return latin1(); }
-#endif
-
- QString &setUnicode( const QChar* unicode, uint len );
- QString &setUnicodeCodes( const ushort* unicode_as_ushorts, uint len );
- QString &setLatin1( const char*, int len=-1 );
-
- int compare( const QString& s ) const;
- static int compare( const QString& s1, const QString& s2 )
- { return s1.compare(s2); }
-
-#ifndef QT_NO_DATASTREAM
- friend Q_EXPORT QDataStream &operator>>( QDataStream &, QString & );
-#endif
- // new functions for BiDi
- void compose();
- QString::Direction direction() const;
- QString::Direction basicDirection() const;
- QString visual(int index = 0, int len = -1);
-
-#ifndef QT_NO_COMPAT
- const char* data() const { return latin1(); }
-#endif
-
- bool startsWith( const QString& ) const;
-
-private:
- QString( int size, bool dummy ); // allocate size incl. \0
-
- void deref();
- void real_detach();
- void setLength( uint pos );
- void subat( uint );
- bool findArg(int& pos, int& len) const;
-
- static QChar* asciiToUnicode( const char*, uint * len, uint maxlen=(uint)-1 );
- static QChar* asciiToUnicode( const QByteArray&, uint * len );
- static char* unicodeToAscii( const QChar*, uint len );
-
- QStringData *d;
- static QStringData* shared_null;
- static QStringData* makeSharedNull();
-
- friend class QConstString;
- QString(QStringData* dd, bool /*dummy*/) : d(dd) { }
-};
-
-class Q_EXPORT QCharRef {
- friend class QString;
- QString& s;
- uint p;
- QCharRef(QString* str, uint pos) : s(*str), p(pos) { }
- QCharRef(const QCharRef &ref) : s(ref.s), p(ref.p) { }
-
-public:
- // Most QChar operations repeated here...
-
- // all this is not documented: We just say "like QChar" and let it be.
-#if 1
- ushort unicode() const { return s.constref(p).unicode(); }
- char latin1() const { return s.constref(p).latin1(); }
-
- // An operator= for each QChar cast constructor...
- QCharRef operator=(char c ) { s.ref(p)=c; return *this; }
- QCharRef operator=(uchar c ) { s.ref(p)=c; return *this; }
- QCharRef operator=(QChar c ) { s.ref(p)=c; return *this; }
- QCharRef operator=(const QCharRef& c ) { s.ref(p)=c.unicode(); return *this; }
- QCharRef operator=(ushort rc ) { s.ref(p)=rc; return *this; }
- QCharRef operator=(short rc ) { s.ref(p)=rc; return *this; }
- QCharRef operator=(uint rc ) { s.ref(p)=rc; return *this; }
- QCharRef operator=(int rc ) { s.ref(p)=rc; return *this; }
-
- operator QChar () const { return s.constref(p); }
-
- // each function...
- bool isNull() const { return unicode()==0; }
- bool isPrint() const { return s.constref(p).isPrint(); }
- bool isPunct() const { return s.constref(p).isPunct(); }
- bool isSpace() const { return s.constref(p).isSpace(); }
- bool isMark() const { return s.constref(p).isMark(); }
- bool isLetter() const { return s.constref(p).isLetter(); }
- bool isNumber() const { return s.constref(p).isNumber(); }
- bool isLetterOrNumber() { return s.constref(p).isLetterOrNumber(); }
- bool isDigit() const { return s.constref(p).isDigit(); }
-
- int digitValue() const { return s.constref(p).digitValue(); }
- QChar lower() { return s.constref(p).lower(); }
- QChar upper() { return s.constref(p).upper(); }
-
- QChar::Category category() const { return s.constref(p).category(); }
- QChar::Direction direction() const { return s.constref(p).direction(); }
- QChar::Joining joining() const { return s.constref(p).joining(); }
- bool mirrored() const { return s.constref(p).mirrored(); }
- QChar mirroredChar() const { return s.constref(p).mirroredChar(); }
- QString decomposition() const { return s.constref(p).decomposition(); }
- QChar::Decomposition decompositionTag() const { return s.constref(p).decompositionTag(); }
-
- // Not the non-const ones of these.
- uchar cell() const { return s.constref(p).cell(); }
- uchar row() const { return s.constref(p).row(); }
-#endif
-};
-
-inline QCharRef QString::at( uint i ) { return QCharRef(this,i); }
-inline QCharRef QString::operator[]( int i ) { return at((uint)i); }
-
-
-class Q_EXPORT QConstString : private QString {
-public:
- QConstString( QChar* unicode, uint length );
- ~QConstString();
- const QString& string() const { return *this; }
-};
-
-
-/*****************************************************************************
- QString stream functions
- *****************************************************************************/
-#ifndef QT_NO_DATASTREAM
-Q_EXPORT QDataStream &operator<<( QDataStream &, const QString & );
-Q_EXPORT QDataStream &operator>>( QDataStream &, QString & );
-#endif
-
-/*****************************************************************************
- QString inline functions
- *****************************************************************************/
-
-// These two move code into makeSharedNull() and deletesData()
-// to improve cache-coherence (and reduce code bloat), while
-// keeping the common cases fast.
-//
-// No safe way to pre-init shared_null on ALL compilers/linkers.
-inline QString::QString() :
- d(shared_null ? shared_null : makeSharedNull())
-{
- d->ref();
-}
-//
-inline QString::~QString()
-{
- if ( d->deref() ) {
- if ( d == shared_null )
- shared_null = 0;
- d->deleteSelf();
- }
-}
-
-inline QString &QString::operator=( QChar c )
-{ return *this = QString(c); }
-
-inline QString &QString::operator=( char c )
-{ return *this = QString(QChar(c)); }
-
-//inline bool QString::isNull() const
-//{ return unicode() == 0; }
-
-inline bool QString::operator!() const
-{ return isNull(); }
-
-inline uint QString::length() const
-{ return d->len; }
-
-inline bool QString::isEmpty() const
-{ return length() == 0; }
-
-inline QString QString::copy() const
-{ return QString( *this ); }
-
-inline QString &QString::prepend( const QString & s )
-{ return insert(0,s); }
-
-inline QString &QString::prepend( QChar c )
-{ return insert(0,c); }
-
-inline QString &QString::prepend( char c )
-{ return insert(0,c); }
-
-inline QString &QString::append( const QString & s )
-{ return operator+=(s); }
-
-inline QString &QString::append( QChar c )
-{ return operator+=(c); }
-
-inline QString &QString::append( char c )
-{ return operator+=(c); }
-
-inline QString &QString::setNum( short n, int base )
-{ return setNum((long)n, base); }
-
-inline QString &QString::setNum( ushort n, int base )
-{ return setNum((ulong)n, base); }
-
-inline QString &QString::setNum( int n, int base )
-{ return setNum((long)n, base); }
-
-inline QString &QString::setNum( uint n, int base )
-{ return setNum((ulong)n, base); }
-
-inline QString &QString::setNum( float n, char f, int prec )
-{ return setNum((double)n,f,prec); }
-
-inline QString QString::arg(int a, int fieldwidth, int base) const
-{ return arg((long)a, fieldwidth, base); }
-
-inline QString QString::arg(uint a, int fieldwidth, int base) const
-{ return arg((ulong)a, fieldwidth, base); }
-
-inline QString QString::arg(short a, int fieldwidth, int base) const
-{ return arg((long)a, fieldwidth, base); }
-
-inline QString QString::arg(ushort a, int fieldwidth, int base) const
-{ return arg((ulong)a, fieldwidth, base); }
-
-inline int QString::find( char c, int index, bool cs ) const
-{ return find(QChar(c), index, cs); }
-
-inline int QString::findRev( char c, int index, bool cs) const
-{ return findRev( QChar(c), index, cs ); }
-
-
-#ifndef QT_NO_CAST_ASCII
-inline int QString::find( const char* str, int index ) const
-{ return find(QString::fromLatin1(str), index); }
-
-inline int QString::findRev( const char* str, int index ) const
-{ return findRev(QString::fromLatin1(str), index); }
-#endif
-
-
-/*****************************************************************************
- QString non-member operators
- *****************************************************************************/
-
-Q_EXPORT bool operator!=( const QString &s1, const QString &s2 );
-Q_EXPORT bool operator<( const QString &s1, const QString &s2 );
-Q_EXPORT bool operator<=( const QString &s1, const QString &s2 );
-Q_EXPORT bool operator==( const QString &s1, const QString &s2 );
-Q_EXPORT bool operator>( const QString &s1, const QString &s2 );
-Q_EXPORT bool operator>=( const QString &s1, const QString &s2 );
-#ifndef QT_NO_CAST_ASCII
-Q_EXPORT bool operator!=( const QString &s1, const char *s2 );
-Q_EXPORT bool operator<( const QString &s1, const char *s2 );
-Q_EXPORT bool operator<=( const QString &s1, const char *s2 );
-Q_EXPORT bool operator==( const QString &s1, const char *s2 );
-Q_EXPORT bool operator>( const QString &s1, const char *s2 );
-Q_EXPORT bool operator>=( const QString &s1, const char *s2 );
-Q_EXPORT bool operator!=( const char *s1, const QString &s2 );
-Q_EXPORT bool operator<( const char *s1, const QString &s2 );
-Q_EXPORT bool operator<=( const char *s1, const QString &s2 );
-Q_EXPORT bool operator==( const char *s1, const QString &s2 );
-//Q_EXPORT bool operator>( const char *s1, const QString &s2 ); // MSVC++
-Q_EXPORT bool operator>=( const char *s1, const QString &s2 );
-#endif
-
-Q_EXPORT inline QString operator+( const QString &s1, const QString &s2 )
-{
- QString tmp( s1 );
- tmp += s2;
- return tmp;
-}
-
-#ifndef QT_NO_CAST_ASCII
-Q_EXPORT inline QString operator+( const QString &s1, const char *s2 )
-{
- QString tmp( s1 );
- tmp += QString::fromLatin1(s2);
- return tmp;
-}
-
-Q_EXPORT inline QString operator+( const char *s1, const QString &s2 )
-{
- QString tmp = QString::fromLatin1( s1 );
- tmp += s2;
- return tmp;
-}
-#endif
-
-Q_EXPORT inline QString operator+( const QString &s1, QChar c2 )
-{
- QString tmp( s1 );
- tmp += c2;
- return tmp;
-}
-
-Q_EXPORT inline QString operator+( const QString &s1, char c2 )
-{
- QString tmp( s1 );
- tmp += c2;
- return tmp;
-}
-
-Q_EXPORT inline QString operator+( QChar c1, const QString &s2 )
-{
- QString tmp;
- tmp += c1;
- tmp += s2;
- return tmp;
-}
-
-Q_EXPORT inline QString operator+( char c1, const QString &s2 )
-{
- QString tmp;
- tmp += c1;
- tmp += s2;
- return tmp;
-}
-
-#if defined(_OS_WIN32_)
-extern Q_EXPORT QString qt_winQString(void*);
-extern Q_EXPORT const void* qt_winTchar(const QString& str, bool addnul);
-extern Q_EXPORT void* qt_winTchar_new(const QString& str);
-extern Q_EXPORT QCString qt_winQString2MB( const QString& s, int len=-1 );
-extern Q_EXPORT QString qt_winMB2QString( const char* mb, int len=-1 );
-#endif
-
-#endif // QSTRING_H
diff --git a/qtools/qstringlist.cpp b/qtools/qstringlist.cpp
deleted file mode 100644
index ef1a43e..0000000
--- a/qtools/qstringlist.cpp
+++ /dev/null
@@ -1,311 +0,0 @@
-/****************************************************************************
-**
-**
-** Implementation of QStringList
-**
-** Created : 990406
-**
-** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
-**
-** This file is part of the tools module of the Qt GUI Toolkit.
-**
-** This file may be distributed under the terms of the Q Public License
-** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#include "qstringlist.h"
-
-#ifndef QT_NO_STRINGLIST
-#include "qstrlist.h"
-#include "qdatastream.h"
-#include "qtl.h"
-
-// NOT REVISED
-/*!
- \class QStringList qstringlist.h
- \brief A list of strings.
-
- \ingroup qtl
- \ingroup tools
- \ingroup shared
-
- QStringList is basically a QValueList of QString objects. As opposed
- to QStrList, that stores pointers to characters, QStringList deals
- with real QString objects. It is the class of choice whenever you
- work with unicode strings.
-
- Like QString itself, QStringList objects are implicit shared.
- Passing them around as value-parameters is both fast and safe.
-
- Example:
- \code
- QStringList list;
-
- // three different ways of appending values:
- list.append( "Torben");
- list += "Warwick";
- list << "Matthias" << "Arnt" << "Paul";
-
- // sort the list, Arnt's now first
- list.sort();
-
- // print it out
- for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) {
- printf( "%s \n", (*it).latin1() );
- }
- \endcode
-
- Convenience methods such as sort(), split(), join() and grep() make
- working with QStringList easy.
-*/
-
-/*!
- \fn QStringList::QStringList()
- Creates an empty list.
-*/
-
-/*! \fn QStringList::QStringList( const QStringList& l )
- Creates a copy of the list. This function is very fast since
- QStringList is implicit shared. However, for the programmer this
- is the same as a deep copy. If this list or the original one or some
- other list referencing the same shared data is modified, then the
- modifying list makes a copy first.
-*/
-
-/*!
- \fn QStringList::QStringList (const QString & i)
- Constructs a string list consisting of the single string \a i.
- To make longer lists easily, use:
- \code
- QString s1,s2,s3;
- ...
- QStringList mylist = QStringList() << s1 << s2 << s3;
- \endcode
-*/
-
-/*!
- \fn QStringList::QStringList (const char* i)
- Constructs a string list consisting of the single latin-1 string \a i.
-*/
-
-/*! \fn QStringList::QStringList( const QValueList<QString>& l )
-
- Constructs a new string list that is a copy of \a l.
-*/
-
-/*!
- Sorts the list of strings in ascending order.
-
- Sorting is very fast. It uses the Qt Template Library's
- efficient HeapSort implementation that operates in O(n*log n).
-*/
-void QStringList::sort()
-{
- qHeapSort(*this);
-}
-
-/*!
- Splits the string \a str using \a sep as separator. Returns the
- list of strings. If \a allowEmptyEntries is TRUE, also empty
- entries are inserted into the list, else not. So if you have
- a string 'abc..d.e.', a list which contains 'abc', 'd', and 'e'
- would be returned if \a allowEmptyEntries is FALSE, but
- a list containing 'abc', '', 'd', 'e' and '' would be returned if
- \a allowEmptyEntries is TRUE.
- If \a str doesn't contain \a sep, a stringlist
- with one item, which is the same as \a str, is returned.
-
- \sa join()
-*/
-
-QStringList QStringList::split( const QChar &sep, const QString &str, bool allowEmptyEntries )
-{
- return split( QString( sep ), str, allowEmptyEntries );
-}
-
-/*!
- Splits the string \a str using \a sep as separator. Returns the
- list of strings. If \a allowEmptyEntries is TRUE, also empty
- entries are inserted into the list, else not. So if you have
- a string 'abc..d.e.', a list which contains 'abc', 'd', and 'e'
- would be returned if \a allowEmptyEntries is FALSE, but
- a list containing 'abc', '', 'd', 'e' and '' would be returned if
- \a allowEmptyEntries is TRUE.
- If \a str doesn't contain \a sep, a stringlist
- with one item, which is the same as \a str, is returned.
-
- \sa join()
-*/
-
-QStringList QStringList::split( const QString &sep, const QString &str, bool allowEmptyEntries )
-{
- QStringList lst;
-
- int j = 0;
- int i = str.find( sep, j );
-
- while ( i != -1 ) {
- if ( str.mid( j, i - j ).length() > 0 )
- lst << str.mid( j, i - j );
- else if ( allowEmptyEntries )
- lst << QString::null;
- j = i + sep.length();
- i = str.find( sep, j );
- }
-
- int l = str.length() - 1;
- if ( str.mid( j, l - j + 1 ).length() > 0 )
- lst << str.mid( j, l - j + 1 );
- else if ( allowEmptyEntries )
- lst << QString::null;
-
- return lst;
-}
-
-QStringList QStringList::split( const QCString &sep, const QCString &str, bool allowEmptyEntries )
-{
- return split(QString(sep.data()),QString(str.data()),allowEmptyEntries);
-}
-
-#if 0
-/*!
- Splits the string \a str using the regular expression \a sep as separator. Returns the
- list of strings. If \a allowEmptyEntries is TRUE, also empty
- entries are inserted into the list, else not. So if you have
- a string 'abc..d.e.', a list which contains 'abc', 'd', and 'e'
- would be returned if \a allowEmptyEntries is FALSE, but
- a list containing 'abc', '', 'd', 'e' and '' would be returned if
- \a allowEmptyEntries is TRUE.
- If \a str doesn't contain \a sep, a stringlist
- with one item, which is the same as \a str, is returned.
-
- \sa join()
-*/
-
-QStringList QStringList::split( const QRegExp &sep, const QString &str, bool allowEmptyEntries )
-{
- QStringList lst;
-
- int j = 0;
- int len = 0;
- int i = sep.match( str.data(), j, &len );
-
- while ( i != -1 ) {
- if ( str.mid( j, i - j ).length() > 0 )
- lst << str.mid( j, i - j );
- else if ( allowEmptyEntries )
- lst << QString::null;
- j = i + len;
- i = sep.match( str.data(), j, &len );
- }
-
- int l = str.length() - 1;
- if ( str.mid( j, l - j + 1 ).length() > 0 )
- lst << str.mid( j, l - j + 1 );
- else if ( allowEmptyEntries )
- lst << QString::null;
-
- return lst;
-}
-#endif
-
-/*!
- Returns a list of all strings containing the substring \a str.
-
- If \a cs is TRUE, the grep is done case sensitively, else not.
-*/
-
-QStringList QStringList::grep( const QString &str, bool cs ) const
-{
- QStringList res;
- for ( QStringList::ConstIterator it = begin(); it != end(); ++it )
- if ( (*it).contains( str, cs ) )
- res << *it;
-
- return res;
-}
-
-#if 0
-/*!
- Returns a list of all strings containing a substring that matches
- the regular expression \a expr.
-*/
-
-QStringList QStringList::grep( const QRegExp &expr ) const
-{
- QStringList res;
- for ( QStringList::ConstIterator it = begin(); it != end(); ++it )
- if ( (*it).contains( expr ) )
- res << *it;
-
- return res;
-}
-#endif
-
-/*!
- Joins the stringlist into a single string with each element
- separated by \a sep.
-
- \sa split()
-*/
-QString QStringList::join( const QString &sep ) const
-{
- QString res;
- bool already = FALSE;
- for ( QStringList::ConstIterator it = begin(); it != end(); ++it ) {
- if ( already )
- res += sep;
- already = TRUE;
- res += *it;
- }
-
- return res;
-}
-
-#ifndef QT_NO_DATASTREAM
-Q_EXPORT QDataStream &operator>>( QDataStream & s, QStringList& l )
-{
- return s >> (QValueList<QString>&)l;
-}
-
-Q_EXPORT QDataStream &operator<<( QDataStream & s, const QStringList& l )
-{
- return s << (const QValueList<QString>&)l;
-}
-#endif
-
-/*!
- Converts from a QStrList (ASCII) to a QStringList (Unicode).
-*/
-QStringList QStringList::fromStrList(const QStrList& ascii)
-{
- QStringList res;
- const char * s;
- for ( QStrListIterator it(ascii); (s=it.current()); ++it )
- res << s;
- return res;
-}
-
-#endif //QT_NO_STRINGLIST
diff --git a/qtools/qstringlist.h b/qtools/qstringlist.h
deleted file mode 100644
index 13703a1..0000000
--- a/qtools/qstringlist.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/****************************************************************************
-**
-**
-** Definition of QStringList class
-**
-** Created : 990406
-**
-** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
-**
-** This file is part of the tools module of the Qt GUI Toolkit.
-**
-** This file may be distributed under the terms of the Q Public License
-** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#ifndef QSTRINGLIST_H
-#define QSTRINGLIST_H
-
-#ifndef QT_H
-#include "qvaluelist_p.h"
-#include "qstring.h"
-//#include "qregexp.h"
-#endif // QT_H
-
-#ifndef QT_NO_STRINGLIST
-
-class QStrList;
-
-class Q_EXPORT QStringList : public QValueList<QString>
-{
-public:
- QStringList() { }
- QStringList( const QStringList& l ) : QValueList<QString>(l) { }
- QStringList( const QValueList<QString>& l ) : QValueList<QString>(l) { }
- QStringList( const QString& i ) { append(i); }
-#ifndef QT_NO_CAST_ASCII
- QStringList( const char* i ) { append(i); }
-#endif
-
- static QStringList fromStrList(const QStrList&);
-
- void sort();
-
- static QStringList split( const QString &sep, const QString &str, bool allowEmptyEntries = FALSE );
- static QStringList split( const QCString &sep, const QCString &str, bool allowEmptyEntries = FALSE );
- static QStringList split( const QChar &sep, const QString &str, bool allowEmptyEntries = FALSE );
- //static QStringList split( const QRegExp &sep, const QString &str, bool allowEmptyEntries = FALSE );
- QString join( const QString &sep ) const;
-
- QStringList grep( const QString &str, bool cs = TRUE ) const;
- //QStringList grep( const QRegExp &expr ) const;
-};
-
-#ifndef QT_NO_DATASTREAM
-class QDataStream;
-extern Q_EXPORT QDataStream &operator>>( QDataStream &, QStringList& );
-extern Q_EXPORT QDataStream &operator<<( QDataStream &, const QStringList& );
-#endif
-#endif // QT_NO_STRINGLIST
-#endif // QSTRINGLIST_H
diff --git a/qtools/qstrlist.doc b/qtools/qstrlist.doc
deleted file mode 100644
index 751c6c2..0000000
--- a/qtools/qstrlist.doc
+++ /dev/null
@@ -1,5 +0,0 @@
-/****************************************************************************
-**
-*****************************************************************************/
-
-//typedef QListIterator<char> QStrListIterator;
diff --git a/qtools/qstrlist.h b/qtools/qstrlist.h
deleted file mode 100644
index ebf97c5..0000000
--- a/qtools/qstrlist.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/****************************************************************************
-**
-**
-** Definition of QStrList, QStrIList and QStrListIterator classes
-**
-** Created : 920730
-**
-** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
-**
-** This file is part of the tools module of the Qt GUI Toolkit.
-**
-** This file may be distributed under the terms of the Q Public License
-** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#ifndef QSTRLIST_H
-#define QSTRLIST_H
-
-#ifndef QT_H
-#include "qstring.h"
-#include "qinternallist.h"
-#include "qdatastream.h"
-#endif // QT_H
-
-
-#if defined(Q_TEMPLATEDLL)
-template class Q_EXPORT QInternalList<char>;
-template class Q_EXPORT QInternalListIterator<char>;
-#endif
-
-typedef QInternalList<char> QStrListBase;
-typedef QInternalListIterator<char> QStrListIterator;
-
-
-class Q_EXPORT QStrList : public QStrListBase
-{
-public:
- QStrList( bool deepCopies=TRUE ) { dc = deepCopies; del_item = deepCopies; }
- QStrList( const QStrList & );
- ~QStrList() { clear(); }
- QStrList& operator=( const QStrList & );
-
-private:
- QCollection::Item newItem( QCollection::Item d ) { return dc ? qstrdup( (const char*)d ) : d; }
- void deleteItem( QCollection::Item d ) { if ( del_item ) delete[] (char*)d; }
- int compareItems( QCollection::Item s1, QCollection::Item s2 ) { return qstrcmp((const char*)s1,
- (const char*)s2); }
-#ifndef QT_NO_DATASTREAM
- QDataStream &read( QDataStream &s, QCollection::Item &d )
- { s >> (char *&)d; return s; }
- QDataStream &write( QDataStream &s, QCollection::Item d ) const
- { return s << (const char *)d; }
-#endif
- bool dc;
-};
-
-
-class Q_EXPORT QStrIList : public QStrList // case insensitive string list
-{
-public:
- QStrIList( bool deepCopies=TRUE ) : QStrList( deepCopies ) {}
- ~QStrIList() { clear(); }
-private:
- int compareItems( QCollection::Item s1, QCollection::Item s2 )
- { return qstricmp((const char*)s1,
- (const char*)s2); }
-};
-
-
-inline QStrList & QStrList::operator=( const QStrList &strList )
-{
- clear();
- dc = strList.dc;
- del_item = dc;
- QStrListBase::operator=(strList);
- return *this;
-}
-
-inline QStrList::QStrList( const QStrList &strList )
- : QStrListBase( strList )
-{
- dc = FALSE;
- operator=(strList);
-}
-
-
-#endif // QSTRLIST_H
diff --git a/qtools/qtextcodec.cpp b/qtools/qtextcodec.cpp
deleted file mode 100644
index 13c3d51..0000000
--- a/qtools/qtextcodec.cpp
+++ /dev/null
@@ -1,2071 +0,0 @@
-/****************************************************************************
-**
-**
-** Implementation of QTextCodec class
-**
-** Created : 981015
-**
-** Copyright (C)1998-2000 Trolltech AS. All rights reserved.
-**
-** This file is part of the tools module of the Qt GUI Toolkit.
-**
-** This file may be distributed under the terms of the Q Public License
-** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#include "qtextcodec.h"
-#ifndef QT_NO_TEXTCODEC
-
-#include "qinternallist.h"
-#ifndef QT_NO_CODECS
-#include "qutfcodec.h"
-//#include "qgbkcodec.h"
-//#include "qeucjpcodec.h"
-//#include "qjiscodec.h"
-//#include "qsjiscodec.h"
-//#include "qeuckrcodec.h"
-//#include "qbig5codec.h"
-//#include "qrtlcodec.h"
-//#include "qtsciicodec.h"
-#endif
-
-#include "qfile.h"
-#include "qstrlist.h"
-#include "qstring.h"
-
-#include <stdlib.h>
-#include <ctype.h>
-#include <locale.h>
-
-
-static QInternalList<QTextCodec> * all = 0;
-static bool destroying_is_ok; // starts out as 0
-
-/*! Deletes all the created codecs.
-
- \warning Do not call this function.
-
- QApplication calls this just before exiting, to delete any
- QTextCodec objects that may be lying around. Since various other
- classes hold pointers to QTextCodec objects, it is not safe to call
- this function earlier.
-
- If you are using the utility classes (like QString) but not using
- QApplication, calling this function at the very end of your
- application can be helpful to chasing down memory leaks, as
- QTextCodec objects will not show up.
-*/
-
-void QTextCodec::deleteAllCodecs()
-{
- if ( !all )
- return;
-
- destroying_is_ok = TRUE;
- QInternalList<QTextCodec> * ball = all;
- all = 0;
- ball->clear();
- delete ball;
- destroying_is_ok = FALSE;
-}
-
-
-static void setupBuiltinCodecs();
-
-
-static void realSetup()
-{
-#if defined(CHECK_STATE)
- if ( destroying_is_ok )
- qWarning( "creating new codec during codec cleanup" );
-#endif
- all = new QInternalList<QTextCodec>;
- all->setAutoDelete( TRUE );
- setupBuiltinCodecs();
-}
-
-
-static inline void setup()
-{
- if ( !all )
- realSetup();
-}
-
-
-class QTextStatelessEncoder: public QTextEncoder {
- const QTextCodec* codec;
-public:
- QTextStatelessEncoder(const QTextCodec*);
- QCString fromUnicode(const QString& uc, int& lenInOut);
-};
-
-
-class QTextStatelessDecoder : public QTextDecoder {
- const QTextCodec* codec;
-public:
- QTextStatelessDecoder(const QTextCodec*);
- QString toUnicode(const char* chars, int len);
-};
-
-QTextStatelessEncoder::QTextStatelessEncoder(const QTextCodec* c) :
- codec(c)
-{
-}
-
-
-QCString QTextStatelessEncoder::fromUnicode(const QString& uc, int& lenInOut)
-{
- return codec->fromUnicode(uc,lenInOut);
-}
-
-
-QTextStatelessDecoder::QTextStatelessDecoder(const QTextCodec* c) :
- codec(c)
-{
-}
-
-
-QString QTextStatelessDecoder::toUnicode(const char* chars, int len)
-{
- return codec->toUnicode(chars,len);
-}
-
-
-
-// NOT REVISED
-/*!
- \class QTextCodec qtextcodec.h
- \brief Provides conversion between text encodings.
-
- By making objects of subclasses of QTextCodec, support for
- new text encodings can be added to Qt.
-
- The abstract virtual functions describe the encoder to the
- system and the coder is used as required in the different
- text file formats supported QTextStream and, under X11 for the
- locale-specific character input and output (under Windows NT
- codecs are not needed for GUI I/O since the system works
- with Unicode already, and Windows 95/98 has built-in convertors
- for the 8-bit local encoding).
-
- More recently created QTextCodec objects take precedence
- over earlier ones.
-
- To add support for another 8-bit encoding to Qt, make a subclass
- or QTextCodec and implement at least the following methods:
- <dl>
- <dt>\c const char* name() const
- <dd>Return the official name for the encoding.
- <dt>\c int mibEnum() const
- <dd>Return the MIB enum for the encoding if it is listed in the
- <a href=ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets>
- IANA character-sets encoding file</a>.
- </dl>
- If the encoding is multi-byte then it will have "state"; that is,
- the interpretation of some bytes will be dependent on some preceding
- bytes. For such an encoding, you will need to implement
- <dl>
- <dt> \c QTextDecoder* makeDecoder() const
- <dd>Return a QTextDecoder that remembers incomplete multibyte
- sequence prefixes or other required state.
- </dl>
- If the encoding does \e not require state, you should implement:
- <dl>
- <dt> \c QString toUnicode(const char* chars, int len) const
- <dd>Converts \e len characters from \e chars to Unicode.
- </dl>
- The base QTextCodec class has default implementations of the above
- two functions, <i>but they are mutually recursive</i>, so you must
- re-implement at least one of them, or both for improved efficiency.
-
- For conversion from Unicode to 8-bit encodings, it is rarely necessary
- to maintain state. However, two functions similar to the two above
- are used for encoding:
- <dl>
- <dt> \c QTextEncoder* makeEncoder() const
- <dd>Return a QTextDecoder.
- <dt> \c QCString fromUnicode(const QString& uc, int& lenInOut ) const;
- <dd>Converts \e lenInOut characters (of type QChar) from the start
- of the string \a uc, returning a QCString result, and also returning
- the \link QCString::length() length\endlink
- of the result in lenInOut.
- </dl>
- Again, these are mutually recursive so only one needs to be implemented,
- or both if better efficiency is possible.
-
- Finally, you must implement:
- <dl>
- <dt> \c int heuristicContentMatch(const char* chars, int len) const
- <dd>Gives a value indicating how likely it is that \e len characters
- from \e chars are in the encoding.
- </dl>
- A good model for this function is the
- QWindowsLocalCodec::heuristicContentMatch function found in the Qt sources.
-
- A QTextCodec subclass might have improved performance if you also
- re-implement:
- <dl>
- <dt> \c bool canEncode( QChar ) const
- <dd>Test if a Unicode character can be encoded.
- <dt> \c bool canEncode( const QString& ) const
- <dd>Test if a string of Unicode characters can be encoded.
- <dt> \c int heuristicNameMatch(const char* hint) const
- <dd>Test if a possibly non-standard name is referring to the codec.
- </dl>
-*/
-
-
-/*!
- Constructs a QTextCodec, making it of highest precedence.
- The QTextCodec should always be constructed on the heap
- (with new), and once constructed it becomes the responsibility
- of Qt to delete it (which is done at QApplication destruction).
-*/
-QTextCodec::QTextCodec()
-{
- setup();
- all->insert(0,this);
-}
-
-
-/*!
- Destructs the QTextCodec. Note that you should not delete
- codecs yourself - once created they become the responsibility
- of Qt to delete.
-*/
-QTextCodec::~QTextCodec()
-{
- if ( !destroying_is_ok )
- qWarning("QTextCodec::~QTextCodec() called by application");
- if ( all )
- all->remove( this );
-}
-
-
-/*!
- Returns a value indicating how likely this decoder is
- for decoding some format that has the given name.
-
- A good match returns a positive number around
- the length of the string. A bad match is negative.
-
- The default implementation calls simpleHeuristicNameMatch()
- with the name of the codec.
-*/
-int QTextCodec::heuristicNameMatch(const char* hint) const
-{
- return simpleHeuristicNameMatch(name(),hint);
-}
-
-
-// returns a string containing the letters and numbers from input,
-// with a space separating run of a character class. e.g. "iso8859-1"
-// becomes "iso 8859 1"
-static QString lettersAndNumbers( const char * input )
-{
- QString result;
- QChar c;
-
- while( input && *input ) {
- c = *input;
- if ( c.isLetter() || c.isNumber() )
- result += c.lower();
- if ( input[1] ) {
- // add space at character class transition, except
- // transition from upper-case to lower-case letter
- QChar n( input[1] );
- if ( c.isLetter() && n.isLetter() ) {
- if ( c == c.lower() && n == n.upper() )
- result += ' ';
- } else if ( c.category() != n.category() ) {
- result += ' ';
- }
- }
- input++;
- }
- return result.simplifyWhiteSpace();
-}
-
-/*!
- A simple utility function for heuristicNameMatch() - it
- does some very minor character-skipping
- so that almost-exact matches score high.
-*/
-int QTextCodec::simpleHeuristicNameMatch(const char* name, const char* hint)
-{
- // if they're the same, return a perfect score.
- if ( name && hint && qstrcmp( name, hint ) == 0 )
- return qstrlen( hint );
-
- // if the letters and numbers are the same, we have an "almost"
- // perfect match.
- QString h( lettersAndNumbers( hint ) );
- QString n( lettersAndNumbers( name ) );
- if ( h == n )
- return qstrlen( hint )-1;
-
- if ( h.stripWhiteSpace() == n.stripWhiteSpace() )
- return qstrlen( hint )-2;
-
- // could do some more here, but I don't think it's worth it
-
- return 0;
-}
-
-
-/*!
- Returns the QTextCodec \a i places from the more recently
- inserted, or NULL if there is no such QTextCodec. Thus,
- codecForIndex(0) returns the most recently created QTextCodec.
-*/
-QTextCodec* QTextCodec::codecForIndex(int i)
-{
- setup();
- return (uint)i >= all->count() ? 0 : all->at(i);
-}
-
-
-/*!
- Returns the QTextCodec which matches the
- \link QTextCodec::mibEnum() MIBenum\endlink \a mib.
-*/
-QTextCodec* QTextCodec::codecForMib(int mib)
-{
- setup();
- QInternalListIterator<QTextCodec> i(*all);
- QTextCodec* result;
- for ( ; (result=i); ++i ) {
- if ( result->mibEnum()==mib )
- break;
- }
- return result;
-}
-
-
-
-
-
-#ifdef _OS_WIN32_
-class QWindowsLocalCodec: public QTextCodec
-{
-public:
- QWindowsLocalCodec();
- ~QWindowsLocalCodec();
-
- QString toUnicode(const char* chars, int len) const;
- QCString fromUnicode(const QString& uc, int& lenInOut ) const;
-
- const char* name() const;
- int mibEnum() const;
-
- int heuristicContentMatch(const char* chars, int len) const;
-};
-
-QWindowsLocalCodec::QWindowsLocalCodec()
-{
-}
-
-QWindowsLocalCodec::~QWindowsLocalCodec()
-{
-}
-
-
-QString QWindowsLocalCodec::toUnicode(const char* chars, int len) const
-{
- if ( len == 1 && chars ) { // Optimization; avoids allocation
- char c[2];
- c[0] = *chars;
- c[1] = 0;
- return qt_winMB2QString( c, 2 );
- }
- if ( len < 0 )
- return qt_winMB2QString( chars );
- QCString s(chars,len+1);
- return qt_winMB2QString(s);
-}
-
-QCString QWindowsLocalCodec::fromUnicode(const QString& uc, int& lenInOut ) const
-{
- QCString r = qt_winQString2MB( uc, lenInOut );
- lenInOut = r.length();
- return r;
-}
-
-
-const char* QWindowsLocalCodec::name() const
-{
- return "System";
-}
-
-int QWindowsLocalCodec::mibEnum() const
-{
- return 0;
-}
-
-
-int QWindowsLocalCodec::heuristicContentMatch(const char* chars, int len) const
-{
- // ### Not a bad default implementation?
- QString t = toUnicode(chars,len);
- int l = t.length();
- QCString mb = fromUnicode(t,l);
- int i=0;
- while ( i < len )
- if ( chars[i] == mb[i] )
- i++;
- return i;
-}
-
-#else
-
-/* locale names mostly copied from XFree86 */
-static const char * const iso8859_2locales[] = {
- "croatian", "cs", "cs_CS", "cs_CZ","cz", "cz_CZ", "czech", "hr",
- "hr_HR", "hu", "hu_HU", "hungarian", "pl", "pl_PL", "polish", "ro",
- "ro_RO", "rumanian", "serbocroatian", "sh", "sh_SP", "sh_YU", "sk",
- "sk_SK", "sl", "sl_CS", "sl_SI", "slovak", "slovene", "sr_SP", 0 };
-
-static const char * const iso8859_3locales[] = {
- "eo", 0 };
-
-static const char * const iso8859_4locales[] = {
- "ee", "ee_EE", "lt", "lt_LT", "lv", "lv_LV", 0 };
-
-static const char * const iso8859_5locales[] = {
- "bg", "bg_BG", "bulgarian", "mk", "mk_MK",
- "sp", "sp_YU", 0 };
-
-static const char * const iso8859_6locales[] = {
- "ar_AA", "ar_SA", "arabic", 0 };
-
-static const char * const iso8859_7locales[] = {
- "el", "el_GR", "greek", 0 };
-
-static const char * const iso8859_8locales[] = {
- "hebrew", "he", "he_IL", "iw", "iw_IL", 0 };
-
-static const char * const iso8859_9locales[] = {
- "tr", "tr_TR", "turkish", 0 };
-
-static const char * const iso8859_15locales[] = {
- "fr", "fi", "french", "finnish", "et", "et_EE", 0 };
-
-static const char * const koi8_ulocales[] = {
- "uk", "uk_UA", "ru_UA", "ukrainian", 0 };
-
-static const char * const tis_620locales[] = {
- "th", "th_TH", "thai", 0 };
-
-
-static bool try_locale_list( const char * const locale[], const char * lang )
-{
- int i;
- for( i=0; locale[i] && qstrcmp(locale[i], lang); i++ )
- { }
- return locale[i] != 0;
-}
-
-// For the probably_koi8_locales we have to look. the standard says
-// these are 8859-5, but almost all Russian users uses KOI8-R and
-// incorrectly set $LANG to ru_RU. We'll check tolower() to see what
-// tolower() thinks ru_RU means.
-
-// If you read the history, it seems that many Russians blame ISO and
-// Peristroika for the confusion.
-//
-// The real bug is that some programs break if the user specifies
-// ru_RU.KOI8-R.
-
-static const char * const probably_koi8_rlocales[] = {
- "ru", "ru_SU", "ru_RU", "russian", 0 };
-
-// this means ANY of these locale aliases. if they're aliases for
-// different locales, the code breaks.
-static QTextCodec * ru_RU_codec = 0;
-
-static QTextCodec * ru_RU_hack( const char * i ) {
- if ( ! ru_RU_codec ) {
- QCString origlocale = setlocale( LC_CTYPE, i );
- // unicode koi8r latin5 name
- // 0x044E 0xC0 0xEE CYRILLIC SMALL LETTER YU
- // 0x042E 0xE0 0xCE CYRILLIC CAPITAL LETTER YU
- int latin5 = tolower( 0xCE );
- int koi8r = tolower( 0xE0 );
- if ( koi8r == 0xC0 && latin5 != 0xEE ) {
- ru_RU_codec = QTextCodec::codecForName( "KOI8-R" );
- } else if ( koi8r != 0xC0 && latin5 == 0xEE ) {
- ru_RU_codec = QTextCodec::codecForName( "ISO 8859-5" );
- } else {
- // something else again... let's assume... *throws dice*
- ru_RU_codec = QTextCodec::codecForName( "KOI8-R" );
- qWarning( "QTextCodec: using KOI8-R, probe failed (%02x %02x %s)",
- koi8r, latin5, i );
- }
- setlocale( LC_CTYPE, origlocale.data() );
- }
- return ru_RU_codec;
-}
-
-#endif
-
-static QTextCodec * localeMapper = 0;
-
-void qt_set_locale_codec( QTextCodec *codec )
-{
- localeMapper = codec;
-}
-
-/*! Returns a pointer to the codec most suitable for this locale. */
-
-QTextCodec* QTextCodec::codecForLocale()
-{
- if ( localeMapper )
- return localeMapper;
-
- setup();
-
-#ifdef _OS_WIN32_
- localeMapper = new QWindowsLocalCodec;
-#else
- // Very poorly defined and followed standards causes lots of code
- // to try to get all the cases...
-
- char * lang = qstrdup( getenv("LANG") );
-
- char * p = lang ? strchr( lang, '.' ) : 0;
- if ( !p || *p != '.' ) {
- // Some versions of setlocale return encoding, others not.
- char *ctype = qstrdup( setlocale( LC_CTYPE, 0 ) );
- // Some Linux distributions have broken locales which will return
- // "C" for LC_CTYPE
- if ( qstrcmp( ctype, "C" ) == 0 ) {
- delete [] ctype;
- } else {
- if ( lang )
- delete [] lang;
- lang = ctype;
- p = lang ? strchr( lang, '.' ) : 0;
- }
- }
-
- if( p && *p == '.' ) {
- // if there is an encoding and we don't know it, we return 0
- // User knows what they are doing. Codecs will believe them.
- localeMapper = codecForName( lang );
- if ( !localeMapper ) {
- // Use or codec disagree.
- localeMapper = codecForName( p+1 );
- }
- }
- if ( !localeMapper || !(p && *p == '.') ) {
- // if there is none, we default to 8859-1
- // We could perhaps default to 8859-15.
- if ( try_locale_list( iso8859_2locales, lang ) )
- localeMapper = codecForName( "ISO 8859-2" );
- else if ( try_locale_list( iso8859_3locales, lang ) )
- localeMapper = codecForName( "ISO 8859-3" );
- else if ( try_locale_list( iso8859_4locales, lang ) )
- localeMapper = codecForName( "ISO 8859-4" );
- else if ( try_locale_list( iso8859_5locales, lang ) )
- localeMapper = codecForName( "ISO 8859-5" );
- else if ( try_locale_list( iso8859_6locales, lang ) )
- localeMapper = codecForName( "ISO 8859-6-I" );
- else if ( try_locale_list( iso8859_7locales, lang ) )
- localeMapper = codecForName( "ISO 8859-7" );
- else if ( try_locale_list( iso8859_8locales, lang ) )
- localeMapper = codecForName( "ISO 8859-8-I" );
- else if ( try_locale_list( iso8859_9locales, lang ) )
- localeMapper = codecForName( "ISO 8859-9" );
- else if ( try_locale_list( iso8859_15locales, lang ) )
- localeMapper = codecForName( "ISO 8859-15" );
- else if ( try_locale_list( tis_620locales, lang ) )
- localeMapper = codecForName( "ISO 8859-11" );
- else if ( try_locale_list( koi8_ulocales, lang ) )
- localeMapper = codecForName( "KOI8-U" );
- else if ( try_locale_list( probably_koi8_rlocales, lang ) )
- localeMapper = ru_RU_hack( lang );
- else if (!lang || !(localeMapper = codecForName(lang) ))
- localeMapper = codecForName( "ISO 8859-1" );
- }
- delete[] lang;
-#endif
-
- return localeMapper;
-}
-
-
-/*!
- Searches all installed QTextCodec objects, returning the one
- which best matches given name. Returns NULL if no codec has
- a match closeness above \a accuracy.
-
- \sa heuristicNameMatch()
-*/
-QTextCodec* QTextCodec::codecForName(const char* hint, int accuracy)
-{
- setup();
- QInternalListIterator<QTextCodec> i(*all);
- QTextCodec* result = 0;
- int best=accuracy;
- for ( QTextCodec* cursor; (cursor=i); ++i ) {
- int s = cursor->heuristicNameMatch(hint);
- if ( s > best ) {
- best = s;
- result = cursor;
- }
- }
- return result;
-}
-
-
-/*!
- Searches all installed QTextCodec objects, returning the one
- which most recognizes the given content. May return 0.
-
- Note that this is often a poor choice, since character
- encodings often use most of the available character sequences,
- and so only by linguistic analysis could a true match be made.
-
- \sa heuristicContentMatch()
-*/
-QTextCodec* QTextCodec::codecForContent(const char* chars, int len)
-{
- setup();
- QInternalListIterator<QTextCodec> i(*all);
- QTextCodec* result = 0;
- int best=0;
- for ( QTextCodec* cursor; (cursor=i); ++i ) {
- int s = cursor->heuristicContentMatch(chars,len);
- if ( s > best ) {
- best = s;
- result = cursor;
- }
- }
- return result;
-}
-
-
-/*!
- \fn const char* QTextCodec::name() const
- Subclasses of QTextCodec must reimplement this function. It returns
- the name of the encoding supported by the subclass. When choosing
- a name for an encoding, consider these points:
- <ul>
- <li>On X11, heuristicNameMatch( const char * hint )
- is used to test if a the QTextCodec
- can convert between Unicode and the encoding of a font
- with encoding \e hint, such as "iso8859-1" for Latin-1 fonts,
- "koi8-r" for Russian KOI8 fonts.
- The default algorithm of heuristicNameMatch() uses name().
- <li>Some applications may use this function to present
- encodings to the end user.
- </ul>
-*/
-
-/*!
- \fn int QTextCodec::mibEnum() const
-
- Subclasses of QTextCodec must reimplement this function. It returns the
- MIBenum (see
- <a href="ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets">
- the IANA character-sets encoding file</a> for more information).
- It is important that each QTextCodec subclass return the correct unique
- value for this function.
-*/
-
-
-/*!
- \fn int QTextCodec::heuristicContentMatch(const char* chars, int len) const
-
- Subclasses of QTextCodec must reimplement this function. It examines
- the first \a len bytes of \a chars and returns a value indicating how
- likely it is that the string is a prefix of text encoded in the
- encoding of the subclass. Any negative return value indicates that the text
- is detectably not in the encoding (eg. it contains undefined characters).
- A return value of 0 indicates that the text should be decoded with this
- codec rather than as ASCII, but there
- is no particular evidence. The value should range up to \a len. Thus,
- most decoders will return -1, 0, or -\a len.
-
- The characters are not null terminated.
-
- \sa codecForContent().
-*/
-
-
-/*!
- Creates a QTextDecoder which stores enough state to decode chunks
- of char* data to create chunks of Unicode data. The default implementation
- creates a stateless decoder, which is sufficient for only the simplest
- encodings where each byte corresponds to exactly one Unicode character.
-
- The caller is responsible for deleting the returned object.
-*/
-QTextDecoder* QTextCodec::makeDecoder() const
-{
- return new QTextStatelessDecoder(this);
-}
-
-
-/*!
- Creates a QTextEncoder which stores enough state to encode chunks
- of Unicode data as char* data. The default implementation
- creates a stateless encoder, which is sufficient for only the simplest
- encodings where each Unicode character corresponds to exactly one char.
-
- The caller is responsible for deleting the returned object.
-*/
-QTextEncoder* QTextCodec::makeEncoder() const
-{
- return new QTextStatelessEncoder(this);
-}
-
-
-/*!
- Subclasses of QTextCodec must reimplement this function or
- makeDecoder(). It converts the first \a len characters of \a chars
- to Unicode.
-
- The default implementation makes a decoder with makeDecoder() and
- converts the input with that. Note that the default makeDecoder()
- implementation makes a decoder that simply calls
- this function, hence subclasses \e must reimplement one function or
- the other to avoid infinite recursion.
-*/
-QString QTextCodec::toUnicode(const char* chars, int len) const
-{
- QTextDecoder* i = makeDecoder();
- QString result = i->toUnicode(chars,len);
- delete i;
- return result;
-}
-
-
-/*!
- Subclasses of QTextCodec must reimplement either this function or
- makeEncoder(). It converts the first \a lenInOut characters of \a
- uc from Unicode to the encoding of the subclass. If \a lenInOut
- is negative or too large, the length of \a uc is used instead.
-
- The value returned is the property of the caller, which is
- responsible for deleting it with "delete []". The length of the
- resulting Unicode character sequence is returned in \a lenInOut.
-
- The default implementation makes an encoder with makeEncoder() and
- converts the input with that. Note that the default makeEncoder()
- implementation makes an encoder that simply calls
- this function, hence subclasses \e must reimplement one function or
- the other to avoid infinite recursion.
-*/
-
-QCString QTextCodec::fromUnicode(const QString& uc, int& lenInOut) const
-{
- QTextEncoder* i = makeEncoder();
- QCString result = i->fromUnicode(uc, lenInOut);
- delete i;
- return result;
-}
-
-/*!
- \overload QCString QTextCodec::fromUnicode(const QString& uc) const
-*/
-QCString QTextCodec::fromUnicode(const QString& uc) const
-{
- int l = uc.length();
- return fromUnicode(uc,l);
-}
-
-/*!
- \overload QString QTextCodec::toUnicode(const QByteArray& a, int len) const
-*/
-QString QTextCodec::toUnicode(const QByteArray& a, int len) const
-{
- int l = a.size();
- if( l > 0 && a.data()[l - 1] == '\0' ) l--;
- l = QMIN( l, len );
- return toUnicode( a.data(), l );
-}
-
-/*!
- \overload QString QTextCodec::toUnicode(const QByteArray& a) const
-*/
-QString QTextCodec::toUnicode(const QByteArray& a) const
-{
- int l = a.size();
- if( l > 0 && a.data()[l - 1] == '\0' ) l--;
- return toUnicode( a.data(), l );
-}
-
-/*!
- \overload QString QTextCodec::toUnicode(const char* chars) const
-*/
-QString QTextCodec::toUnicode(const char* chars) const
-{
- return toUnicode(chars,qstrlen(chars));
-}
-
-/*!
- Returns TRUE if the unicode character \a ch can be fully encoded
- with this codec. The default implementation tests if the result of
- toUnicode(fromUnicode(ch)) is the original \a ch. Subclasses may be
- able to improve the efficiency.
-*/
-bool QTextCodec::canEncode( QChar ch ) const
-{
- return toUnicode(fromUnicode(ch)) == ch;
-}
-
-/*!
- Returns TRUE if the unicode string \a s can be fully encoded
- with this codec. The default implementation tests if the result of
- toUnicode(fromUnicode(s)) is the original \a s. Subclasses may be
- able to improve the efficiency.
-*/
-bool QTextCodec::canEncode( const QString& s ) const
-{
- return toUnicode(fromUnicode(s)) == s;
-}
-
-
-
-/*!
- \class QTextEncoder qtextcodec.h
- \brief State-based encoder
-
- A QTextEncoder converts Unicode into another format, remembering
- any state that is required between calls.
-
- \sa QTextCodec::makeEncoder()
-*/
-
-/*!
- Destructs the encoder.
-*/
-QTextEncoder::~QTextEncoder()
-{
-}
-/*!
- \fn QCString QTextEncoder::fromUnicode(const QString& uc, int& lenInOut)
-
- Converts \a lenInOut characters (not bytes) from \a uc, producing
- a QCString. \a lenInOut will also be set to the
- \link QCString::length() length\endlink of the result (in bytes).
-
- The encoder is free to record state to use when subsequent calls are
- made to this function (for example, it might change modes with escape
- sequences if needed during the encoding of one string, then assume that
- mode applies when a subsequent call begins).
-*/
-
-/*!
- \class QTextDecoder qtextcodec.h
- \brief State-based decoder
-
- A QTextEncoder converts a text format into Unicode, remembering
- any state that is required between calls.
-
- \sa QTextCodec::makeEncoder()
-*/
-
-
-/*!
- Destructs the decoder.
-*/
-QTextDecoder::~QTextDecoder()
-{
-}
-
-/*!
- \fn QString QTextDecoder::toUnicode(const char* chars, int len)
-
- Converts the first \a len bytes at \a chars to Unicode, returning the
- result.
-
- If not all characters are used (eg. only part of a multi-byte
- encoding is at the end of the characters), the decoder remembers
- enough state to continue with the next call to this function.
-*/
-
-#define CHAINED 0xffff
-
-struct QMultiByteUnicodeTable {
- // If multibyte, ignore unicode and index into multibyte
- // with the next character.
- QMultiByteUnicodeTable() : unicode(0xfffd), multibyte(0) { }
-
- ~QMultiByteUnicodeTable()
- {
- if ( multibyte )
- delete [] multibyte;
- }
-
- ushort unicode;
- QMultiByteUnicodeTable* multibyte;
-};
-
-#ifndef QT_NO_CODECS
-static int getByte(char* &cursor)
-{
- int byte = 0;
- if ( *cursor ) {
- if ( cursor[1] == 'x' )
- byte = (int)strtol(cursor+2,&cursor,16);
- else if ( cursor[1] == 'd' )
- byte = (int)strtol(cursor+2,&cursor,10);
- else
- byte = (int)strtol(cursor+2,&cursor,8);
- }
- return byte&0xff;
-}
-
-class QTextCodecFromIOD;
-
-class QTextCodecFromIODDecoder : public QTextDecoder {
- const QTextCodecFromIOD* codec;
- QMultiByteUnicodeTable* mb;
-public:
- QTextCodecFromIODDecoder(const QTextCodecFromIOD* c);
- QString toUnicode(const char* chars, int len);
-};
-
-class QTextCodecFromIOD : public QTextCodec {
- friend class QTextCodecFromIODDecoder;
-
- QCString n;
-
- // If from_unicode_page[row()][cell()] is 0 and from_unicode_page_multibyte,
- // use from_unicode_page_multibyte[row()][cell()] as string.
- char** from_unicode_page;
- char*** from_unicode_page_multibyte;
- char unkn;
-
- // Only one of these is used
- ushort* to_unicode;
- QMultiByteUnicodeTable* to_unicode_multibyte;
- int max_bytes_per_char;
- QStrList aliases;
-
- bool stateless() const { return !to_unicode_multibyte; }
-
-public:
- QTextCodecFromIOD(QIODevice* iod)
- {
- from_unicode_page = 0;
- to_unicode_multibyte = 0;
- to_unicode = 0;
- from_unicode_page_multibyte = 0;
- max_bytes_per_char = 1;
-
- const int maxlen=100;
- char line[maxlen];
- char esc='\\';
- char comm='%';
- bool incmap = FALSE;
- while (iod->readLine(line,maxlen) > 0) {
- if (0==qstrnicmp(line,"<code_set_name>",15))
- n = line+15;
- else if (0==qstrnicmp(line,"<escape_char> ",14))
- esc = line[14];
- else if (0==qstrnicmp(line,"<comment_char> ",15))
- comm = line[15];
- else if (line[0]==comm && 0==qstrnicmp(line+1," alias ",7)) {
- aliases.append(line+8);
- } else if (0==qstrnicmp(line,"CHARMAP",7)) {
- if (!from_unicode_page) {
- from_unicode_page = new char*[256];
- for (int i=0; i<256; i++)
- from_unicode_page[i]=0;
- }
- if (!to_unicode) {
- to_unicode = new ushort[256];
- }
- incmap = TRUE;
- } else if (0==qstrnicmp(line,"END CHARMAP",11))
- break;
- else if (incmap) {
- char* cursor = line;
- int byte=0,unicode=-1;
- ushort* mb_unicode=0;
- const int maxmb=8; // more -> we'll need to improve datastructures
- char mb[maxmb+1];
- int nmb=0;
-
- while (*cursor) {
- if (cursor[0]=='<' && cursor[1]=='U' &&
- cursor[2]>='0' && cursor[2]<='9' &&
- cursor[3]>='0' && cursor[3]<='9') {
-
- unicode = (int)strtol(cursor+2,&cursor,16);
-
- } else if (*cursor==esc) {
-
- byte = getByte(cursor);
-
- if ( *cursor == esc ) {
- if ( !to_unicode_multibyte ) {
- to_unicode_multibyte =
- new QMultiByteUnicodeTable[256];
- for (int i=0; i<256; i++) {
- to_unicode_multibyte[i].unicode =
- to_unicode[i];
- to_unicode_multibyte[i].multibyte = 0;
- }
- delete [] to_unicode;
- to_unicode = 0;
- }
- QMultiByteUnicodeTable* mbut =
- to_unicode_multibyte+byte;
- mb[nmb++] = byte;
- while ( nmb < maxmb && *cursor == esc ) {
- // Always at least once
-
- mbut->unicode = CHAINED;
- byte = getByte(cursor);
- mb[nmb++] = byte;
- if (!mbut->multibyte) {
- mbut->multibyte =
- new QMultiByteUnicodeTable[256];
- }
- mbut = mbut->multibyte+byte;
- mb_unicode = & mbut->unicode;
- }
-
- if ( nmb > max_bytes_per_char )
- max_bytes_per_char = nmb;
- }
- } else {
- cursor++;
- }
- }
-
- if (unicode >= 0 && unicode <= 0xffff)
- {
- QChar ch((ushort)unicode);
- if (!from_unicode_page[ch.row()]) {
- from_unicode_page[ch.row()] = new char[256];
- for (int i=0; i<256; i++)
- from_unicode_page[ch.row()][i]=0;
- }
- if ( mb_unicode ) {
- from_unicode_page[ch.row()][ch.cell()] = 0;
- if (!from_unicode_page_multibyte) {
- from_unicode_page_multibyte = new char**[256];
- for (int i=0; i<256; i++)
- from_unicode_page_multibyte[i]=0;
- }
- if (!from_unicode_page_multibyte[ch.row()]) {
- from_unicode_page_multibyte[ch.row()] = new char*[256];
- for (int i=0; i<256; i++)
- from_unicode_page_multibyte[ch.row()][i] = 0;
- }
- mb[nmb++] = 0;
- from_unicode_page_multibyte[ch.row()][ch.cell()]
- = qstrdup(mb);
- *mb_unicode = unicode;
- } else {
- from_unicode_page[ch.row()][ch.cell()] = (char)byte;
- if ( to_unicode )
- to_unicode[byte] = unicode;
- else
- to_unicode_multibyte[byte].unicode = unicode;
- }
- } else {
- }
- }
- }
- n = n.stripWhiteSpace();
-
- unkn = '?'; // ##### Might be a bad choice.
- }
-
- ~QTextCodecFromIOD()
- {
- if ( from_unicode_page ) {
- for (int i=0; i<256; i++)
- if (from_unicode_page[i])
- delete [] from_unicode_page[i];
- }
- if ( from_unicode_page_multibyte ) {
- for (int i=0; i<256; i++)
- if (from_unicode_page_multibyte[i])
- for (int j=0; j<256; j++)
- if (from_unicode_page_multibyte[i][j])
- delete [] from_unicode_page_multibyte[i][j];
- }
- if ( to_unicode )
- delete [] to_unicode;
- if ( to_unicode_multibyte )
- delete [] to_unicode_multibyte;
- }
-
- bool ok() const
- {
- return !!from_unicode_page;
- }
-
- QTextDecoder* makeDecoder() const
- {
- if ( stateless() )
- return QTextCodec::makeDecoder();
- else
- return new QTextCodecFromIODDecoder(this);
- }
-
- const char* name() const
- {
- return n;
- }
-
- int mibEnum() const
- {
- return 0; // #### Unknown.
- }
-
- int heuristicContentMatch(const char*, int) const
- {
- return 0;
- }
-
- int heuristicNameMatch(const char* hint) const
- {
- int bestr = QTextCodec::heuristicNameMatch(hint);
- QStrListIterator it(aliases);
- char* a;
- while ((a=it.current())) {
- ++it;
- int r = simpleHeuristicNameMatch(a,hint);
- if (r > bestr)
- bestr = r;
- }
- return bestr;
- }
-
- QString toUnicode(const char* chars, int len) const
- {
- const uchar* uchars = (const uchar*)chars;
- QString result;
- QMultiByteUnicodeTable* multibyte=to_unicode_multibyte;
- if ( multibyte ) {
- while (len--) {
- QMultiByteUnicodeTable& mb = multibyte[*uchars];
- if ( mb.multibyte ) {
- // Chained multi-byte
- multibyte = mb.multibyte;
- } else {
- result += QChar(mb.unicode);
- multibyte=to_unicode_multibyte;
- }
- uchars++;
- }
- } else {
- while (len--)
- result += QChar(to_unicode[*uchars++]);
- }
- return result;
- }
-
- QCString fromUnicode(const QString& uc, int& lenInOut) const
- {
- if (lenInOut > (int)uc.length())
- lenInOut = uc.length();
- int rlen = lenInOut*max_bytes_per_char;
- QCString rstr(rlen);
- char* cursor = rstr.rawData();
- char* s=0;
- int l = lenInOut;
- int lout = 0;
- for (int i=0; i<l; i++) {
- QChar ch = uc[i];
- if ( ch == QChar::null ) {
- // special
- *cursor++ = 0;
- } else if ( from_unicode_page[ch.row()] &&
- from_unicode_page[ch.row()][ch.cell()] )
- {
- *cursor++ = from_unicode_page[ch.row()][ch.cell()];
- lout++;
- } else if ( from_unicode_page_multibyte &&
- from_unicode_page_multibyte[ch.row()] &&
- (s=from_unicode_page_multibyte[ch.row()][ch.cell()]) )
- {
- while (*s) {
- *cursor++ = *s++;
- lout++;
- }
- } else {
- *cursor++ = unkn;
- lout++;
- }
- }
- *cursor = 0;
- lenInOut = lout;
- return rstr;
- }
-};
-
-QTextCodecFromIODDecoder::QTextCodecFromIODDecoder(const QTextCodecFromIOD* c) :
- codec(c)
-{
- mb = codec->to_unicode_multibyte;
-}
-
-QString QTextCodecFromIODDecoder::toUnicode(const char* chars, int len)
-{
- const uchar* uchars = (const uchar*)chars;
- QString result;
- while (len--) {
- QMultiByteUnicodeTable& t = mb[*uchars];
- if ( t.multibyte ) {
- // Chained multi-byte
- mb = t.multibyte;
- } else {
- if ( t.unicode )
- result += QChar(t.unicode);
- mb=codec->to_unicode_multibyte;
- }
- uchars++;
- }
- return result;
-}
-
-/*!
- Reads a POSIX2 charmap definition from \a iod.
- The parser recognizes the following lines:
-<pre>
- &lt;code_set_name&gt; <i>name</i>
- &lt;escape_char&gt; <i>character</i>
- % alias <i>alias</i>
- CHARMAP
- &lt;<i>token</i>&gt; /x<i>hexbyte</i> &lt;U<i>unicode</i>&gt; ...
- &lt;<i>token</i>&gt; /d<i>decbyte</i> &lt;U<i>unicode</i>&gt; ...
- &lt;<i>token</i>&gt; /<i>octbyte</i> &lt;U<i>unicode</i>&gt; ...
- &lt;<i>token</i>&gt; /<i>any</i>/<i>any</i>... &lt;U<i>unicode</i>&gt; ...
- END CHARMAP
-</pre>
-
- The resulting QTextCodec is returned (and also added to the
- global list of codecs). The name() of the result is taken
- from the code_set_name.
-
- Note that a codec constructed in this way uses much more memory
- and is slower than a hand-written QTextCodec subclass, since
- tables in code are in memory shared by all applications simultaneously
- using Qt.
-
- \sa loadCharmapFile()
-*/
-QTextCodec* QTextCodec::loadCharmap(QIODevice* iod)
-{
- QTextCodecFromIOD* r = new QTextCodecFromIOD(iod);
- if ( !r->ok() ) {
- delete r;
- r = 0;
- }
- return r;
-}
-
-/*!
- A convenience function for loadCharmap().
-*/
-QTextCodec* QTextCodec::loadCharmapFile(QString filename)
-{
- QFile f(filename);
- if (f.open(IO_ReadOnly)) {
- QTextCodecFromIOD* r = new QTextCodecFromIOD(&f);
- if ( !r->ok() )
- delete r;
- else
- return r;
- }
- return 0;
-}
-#endif //QT_NO_CODECS
-
-
-/*!
- Returns a string representing the current language.
-*/
-
-const char* QTextCodec::locale()
-{
- static QCString lang;
- if ( lang.isEmpty() ) {
- lang = getenv( "LANG" ); //########Windows??
- if ( lang.isEmpty() )
- lang = "C";
- }
- return lang;
-}
-
-
-
-#ifndef QT_NO_CODECS
-
-class QSimpleTextCodec: public QTextCodec
-{
-public:
- QSimpleTextCodec( int );
- ~QSimpleTextCodec();
-
- QString toUnicode(const char* chars, int len) const;
- QCString fromUnicode(const QString& uc, int& lenInOut ) const;
-
- const char* name() const;
- int mibEnum() const;
-
- int heuristicContentMatch(const char* chars, int len) const;
-
- int heuristicNameMatch(const char* hint) const;
-
-private:
- int forwardIndex;
-};
-
-
-#define LAST_MIB 2259
-
-static struct {
- const char * cs;
- int mib;
- Q_UINT16 values[128];
-} unicodevalues[] = {
- // from RFC 1489, ftp://ftp.isi.edu/in-notes/rfc1489.txt
- { "KOI8-R", 2084,
- { 0x2500, 0x2502, 0x250C, 0x2510, 0x2514, 0x2518, 0x251C, 0x2524,
- 0x252C, 0x2534, 0x253C, 0x2580, 0x2584, 0x2588, 0x258C, 0x2590,
- 0x2591, 0x2592, 0x2593, 0x2320, 0x25A0, 0x2219/**/, 0x221A, 0x2248,
- 0x2264, 0x2265, 0x00A0, 0x2321, 0x00B0, 0x00B2, 0x00B7, 0x00F7,
- 0x2550, 0x2551, 0x2552, 0x0451, 0x2553, 0x2554, 0x2555, 0x2556,
- 0x2557, 0x2558, 0x2559, 0x255A, 0x255B, 0x255C, 0x255D, 0x255E,
- 0x255F, 0x2560, 0x2561, 0x0401, 0x2562, 0x2563, 0x2564, 0x2565,
- 0x2566, 0x2567, 0x2568, 0x2569, 0x256A, 0x256B, 0x256C, 0x00A9,
- 0x044E, 0x0430, 0x0431, 0x0446, 0x0434, 0x0435, 0x0444, 0x0433,
- 0x0445, 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E,
- 0x043F, 0x044F, 0x0440, 0x0441, 0x0442, 0x0443, 0x0436, 0x0432,
- 0x044C, 0x044B, 0x0437, 0x0448, 0x044D, 0x0449, 0x0447, 0x044A,
- 0x042E, 0x0410, 0x0411, 0x0426, 0x0414, 0x0415, 0x0424, 0x0413,
- 0x0425, 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E,
- 0x041F, 0x042F, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412,
- 0x042C, 0x042B, 0x0417, 0x0428, 0x042D, 0x0429, 0x0427, 0x042A } },
- // /**/ - The BULLET OPERATOR is confused. Some people think
- // it should be 0x2022 (BULLET).
-
- // from RFC 2319, ftp://ftp.isi.edu/in-notes/rfc2319.txt
- { "KOI8-U", 2088,
- { 0x2500, 0x2502, 0x250C, 0x2510, 0x2514, 0x2518, 0x251C, 0x2524,
- 0x252C, 0x2534, 0x253C, 0x2580, 0x2584, 0x2588, 0x258C, 0x2590,
- 0x2591, 0x2592, 0x2593, 0x2320, 0x25A0, 0x2219, 0x221A, 0x2248,
- 0x2264, 0x2265, 0x00A0, 0x2321, 0x00B0, 0x00B2, 0x00B7, 0x00F7,
- 0x2550, 0x2551, 0x2552, 0x0451, 0x0454, 0x2554, 0x0456, 0x0457,
- 0x2557, 0x2558, 0x2559, 0x255A, 0x255B, 0x0491, 0x255D, 0x255E,
- 0x255F, 0x2560, 0x2561, 0x0401, 0x0404, 0x2563, 0x0406, 0x0407,
- 0x2566, 0x2567, 0x2568, 0x2569, 0x256A, 0x0490, 0x256C, 0x00A9,
- 0x044E, 0x0430, 0x0431, 0x0446, 0x0434, 0x0435, 0x0444, 0x0433,
- 0x0445, 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E,
- 0x043F, 0x044F, 0x0440, 0x0441, 0x0442, 0x0443, 0x0436, 0x0432,
- 0x044C, 0x044B, 0x0437, 0x0448, 0x044D, 0x0449, 0x0447, 0x044A,
- 0x042E, 0x0410, 0x0411, 0x0426, 0x0414, 0x0415, 0x0424, 0x0413,
- 0x0425, 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E,
- 0x041F, 0x042F, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412,
- 0x042C, 0x042B, 0x0417, 0x0428, 0x042D, 0x0429, 0x0427, 0x042A } },
-
- // next bits generated from tables on the Unicode 2.0 CD. we can
- // use these tables since this is part of the transition to using
- // unicode everywhere in qt.
-
- // $ for A in 8 9 A B C D E F ; do for B in 0 1 2 3 4 5 6 7 8 9 A B C D E F ; do echo 0x${A}${B} 0xFFFD ; done ; done > /tmp/digits ; for a in 8859-* ; do ( awk '/^0x[89ABCDEF]/{ print $1, $2 }' < $a ; cat /tmp/digits ) | sort | uniq -w4 | cut -c6- | paste '-d ' - - - - - - - - | sed -e 's/ /, /g' -e 's/$/,/' -e '$ s/,$/} },/' -e '1 s/^/{ /' > ~/tmp/$a ; done
-
- // then I inserted the files manually.
- { "ISO 8859-2", 5,
- { 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
- 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
- 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
- 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
- 0x00A0, 0x0104, 0x02D8, 0x0141, 0x00A4, 0x013D, 0x015A, 0x00A7,
- 0x00A8, 0x0160, 0x015E, 0x0164, 0x0179, 0x00AD, 0x017D, 0x017B,
- 0x00B0, 0x0105, 0x02DB, 0x0142, 0x00B4, 0x013E, 0x015B, 0x02C7,
- 0x00B8, 0x0161, 0x015F, 0x0165, 0x017A, 0x02DD, 0x017E, 0x017C,
- 0x0154, 0x00C1, 0x00C2, 0x0102, 0x00C4, 0x0139, 0x0106, 0x00C7,
- 0x010C, 0x00C9, 0x0118, 0x00CB, 0x011A, 0x00CD, 0x00CE, 0x010E,
- 0x0110, 0x0143, 0x0147, 0x00D3, 0x00D4, 0x0150, 0x00D6, 0x00D7,
- 0x0158, 0x016E, 0x00DA, 0x0170, 0x00DC, 0x00DD, 0x0162, 0x00DF,
- 0x0155, 0x00E1, 0x00E2, 0x0103, 0x00E4, 0x013A, 0x0107, 0x00E7,
- 0x010D, 0x00E9, 0x0119, 0x00EB, 0x011B, 0x00ED, 0x00EE, 0x010F,
- 0x0111, 0x0144, 0x0148, 0x00F3, 0x00F4, 0x0151, 0x00F6, 0x00F7,
- 0x0159, 0x016F, 0x00FA, 0x0171, 0x00FC, 0x00FD, 0x0163, 0x02D9} },
- { "ISO 8859-3", 6,
- { 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
- 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
- 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
- 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
- 0x00A0, 0x0126, 0x02D8, 0x00A3, 0x00A4, 0xFFFD, 0x0124, 0x00A7,
- 0x00A8, 0x0130, 0x015E, 0x011E, 0x0134, 0x00AD, 0xFFFD, 0x017B,
- 0x00B0, 0x0127, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x0125, 0x00B7,
- 0x00B8, 0x0131, 0x015F, 0x011F, 0x0135, 0x00BD, 0xFFFD, 0x017C,
- 0x00C0, 0x00C1, 0x00C2, 0xFFFD, 0x00C4, 0x010A, 0x0108, 0x00C7,
- 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
- 0xFFFD, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x0120, 0x00D6, 0x00D7,
- 0x011C, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x016C, 0x015C, 0x00DF,
- 0x00E0, 0x00E1, 0x00E2, 0xFFFD, 0x00E4, 0x010B, 0x0109, 0x00E7,
- 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
- 0xFFFD, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x0121, 0x00F6, 0x00F7,
- 0x011D, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x016D, 0x015D, 0x02D9} },
- { "ISO 8859-4", 7,
- { 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
- 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
- 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
- 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
- 0x00A0, 0x0104, 0x0138, 0x0156, 0x00A4, 0x0128, 0x013B, 0x00A7,
- 0x00A8, 0x0160, 0x0112, 0x0122, 0x0166, 0x00AD, 0x017D, 0x00AF,
- 0x00B0, 0x0105, 0x02DB, 0x0157, 0x00B4, 0x0129, 0x013C, 0x02C7,
- 0x00B8, 0x0161, 0x0113, 0x0123, 0x0167, 0x014A, 0x017E, 0x014B,
- 0x0100, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x012E,
- 0x010C, 0x00C9, 0x0118, 0x00CB, 0x0116, 0x00CD, 0x00CE, 0x012A,
- 0x0110, 0x0145, 0x014C, 0x0136, 0x00D4, 0x00D5, 0x00D6, 0x00D7,
- 0x00D8, 0x0172, 0x00DA, 0x00DB, 0x00DC, 0x0168, 0x016A, 0x00DF,
- 0x0101, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x012F,
- 0x010D, 0x00E9, 0x0119, 0x00EB, 0x0117, 0x00ED, 0x00EE, 0x012B,
- 0x0111, 0x0146, 0x014D, 0x0137, 0x00F4, 0x00F5, 0x00F6, 0x00F7,
- 0x00F8, 0x0173, 0x00FA, 0x00FB, 0x00FC, 0x0169, 0x016B, 0x02D9} },
- { "ISO 8859-5", 8,
- { 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
- 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
- 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
- 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
- 0x00A0, 0x0401, 0x0402, 0x0403, 0x0404, 0x0405, 0x0406, 0x0407,
- 0x0408, 0x0409, 0x040A, 0x040B, 0x040C, 0x00AD, 0x040E, 0x040F,
- 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417,
- 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F,
- 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427,
- 0x0428, 0x0429, 0x042A, 0x042B, 0x042C, 0x042D, 0x042E, 0x042F,
- 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437,
- 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F,
- 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447,
- 0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F,
- 0x2116, 0x0451, 0x0452, 0x0453, 0x0454, 0x0455, 0x0456, 0x0457,
- 0x0458, 0x0459, 0x045A, 0x045B, 0x045C, 0x00A7, 0x045E, 0x045F} },
- { "ISO 8859-6-I", 82,
- { 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
- 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
- 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
- 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
- 0x00A0, 0xFFFD, 0xFFFD, 0xFFFD, 0x00A4, 0xFFFD, 0xFFFD, 0xFFFD,
- 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x060C, 0x00AD, 0xFFFD, 0xFFFD,
- 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
- 0xFFFD, 0xFFFD, 0xFFFD, 0x061B, 0xFFFD, 0xFFFD, 0xFFFD, 0x061F,
- 0xFFFD, 0x0621, 0x0622, 0x0623, 0x0624, 0x0625, 0x0626, 0x0627,
- 0x0628, 0x0629, 0x062A, 0x062B, 0x062C, 0x062D, 0x062E, 0x062F,
- 0x0630, 0x0631, 0x0632, 0x0633, 0x0634, 0x0635, 0x0636, 0x0637,
- 0x0638, 0x0639, 0x063A, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
- 0x0640, 0x0641, 0x0642, 0x0643, 0x0644, 0x0645, 0x0646, 0x0647,
- 0x0648, 0x0649, 0x064A, 0x064B, 0x064C, 0x064D, 0x064E, 0x064F,
- 0x0650, 0x0651, 0x0652, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
- 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD} },
- { "ISO 8859-7", 10,
- { 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
- 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
- 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
- 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
- 0x00A0, 0x2018, 0x2019, 0x00A3, 0xFFFD, 0xFFFD, 0x00A6, 0x00A7,
- 0x00A8, 0x00A9, 0xFFFD, 0x00AB, 0x00AC, 0x00AD, 0xFFFD, 0x2015,
- 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x0384, 0x0385, 0x0386, 0x00B7,
- 0x0388, 0x0389, 0x038A, 0x00BB, 0x038C, 0x00BD, 0x038E, 0x038F,
- 0x0390, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397,
- 0x0398, 0x0399, 0x039A, 0x039B, 0x039C, 0x039D, 0x039E, 0x039F,
- 0x03A0, 0x03A1, 0xFFFD, 0x03A3, 0x03A4, 0x03A5, 0x03A6, 0x03A7,
- 0x03A8, 0x03A9, 0x03AA, 0x03AB, 0x03AC, 0x03AD, 0x03AE, 0x03AF,
- 0x03B0, 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7,
- 0x03B8, 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF,
- 0x03C0, 0x03C1, 0x03C2, 0x03C3, 0x03C4, 0x03C5, 0x03C6, 0x03C7,
- 0x03C8, 0x03C9, 0x03CA, 0x03CB, 0x03CC, 0x03CD, 0x03CE, 0xFFFD} },
- { "ISO 8859-8-I", 85,
- { 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
- 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
- 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
- 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
- 0x00A0, 0xFFFD, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
- 0x00A8, 0x00A9, 0x00D7, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x203E,
- 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
- 0x00B8, 0x00B9, 0x00F7, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0xFFFD,
- 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
- 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
- 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
- 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x2017,
- 0x05D0, 0x05D1, 0x05D2, 0x05D3, 0x05D4, 0x05D5, 0x05D6, 0x05D7,
- 0x05D8, 0x05D9, 0x05DA, 0x05DB, 0x05DC, 0x05DD, 0x05DE, 0x05DF,
- 0x05E0, 0x05E1, 0x05E2, 0x05E3, 0x05E4, 0x05E5, 0x05E6, 0x05E7,
- 0x05E8, 0x05E9, 0x05EA, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD} },
- { "ISO 8859-9", 12,
- { 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
- 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
- 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
- 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
- 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
- 0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
- 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
- 0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
- 0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7,
- 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
- 0x011E, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7,
- 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x0130, 0x015E, 0x00DF,
- 0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7,
- 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
- 0x011F, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7,
- 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x0131, 0x015F, 0x00FF} },
- { "ISO 8859-10", 13,
- { 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
- 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
- 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
- 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
- 0x00A0, 0x0104, 0x0112, 0x0122, 0x012A, 0x0128, 0x0136, 0x00A7,
- 0x013B, 0x0110, 0x0160, 0x0166, 0x017D, 0x00AD, 0x016A, 0x014A,
- 0x00B0, 0x0105, 0x0113, 0x0123, 0x012B, 0x0129, 0x0137, 0x00B7,
- 0x013C, 0x0111, 0x0161, 0x0167, 0x017E, 0x2015, 0x016B, 0x014B,
- 0x0100, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x012E,
- 0x010C, 0x00C9, 0x0118, 0x00CB, 0x0116, 0x00CD, 0x00CE, 0x00CF,
- 0x00D0, 0x0145, 0x014C, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x0168,
- 0x00D8, 0x0172, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x00DE, 0x00DF,
- 0x0101, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x012F,
- 0x010D, 0x00E9, 0x0119, 0x00EB, 0x0117, 0x00ED, 0x00EE, 0x00EF,
- 0x00F0, 0x0146, 0x014D, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x0169,
- 0x00F8, 0x0173, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x0138} },
- { "ISO 8859-13", 109,
- { 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
- 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
- 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
- 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
- 0x00A0, 0x201D, 0x00A2, 0x00A3, 0x00A4, 0x201E, 0x00A6, 0x00A7,
- 0x00D8, 0x00A9, 0x0156, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00C6,
- 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x201C, 0x00B5, 0x00B6, 0x00B7,
- 0x00F8, 0x00B9, 0x0157, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00E6,
- 0x0104, 0x012E, 0x0100, 0x0106, 0x00C4, 0x00C5, 0x0118, 0x0112,
- 0x010C, 0x00C9, 0x0179, 0x0116, 0x0122, 0x0136, 0x012A, 0x013B,
- 0x0160, 0x0143, 0x0145, 0x00D3, 0x014C, 0x00D5, 0x00D6, 0x00D7,
- 0x0172, 0x0141, 0x015A, 0x016A, 0x00DC, 0x017B, 0x017D, 0x00DF,
- 0x0105, 0x012F, 0x0101, 0x0107, 0x00E4, 0x00E5, 0x0119, 0x0113,
- 0x010D, 0x00E9, 0x017A, 0x0117, 0x0123, 0x0137, 0x012B, 0x013C,
- 0x0161, 0x0144, 0x0146, 0x00F3, 0x014D, 0x00F5, 0x00F6, 0x00F7,
- 0x0173, 0x0142, 0x015B, 0x016B, 0x00FC, 0x017C, 0x017E, 0x2019} },
- { "ISO 8859-14", 110,
- { 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
- 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
- 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
- 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
- 0x00A0, 0x1E02, 0x1E03, 0x00A3, 0x010A, 0x010B, 0x1E0A, 0x00A7,
- 0x1E80, 0x00A9, 0x1E82, 0x1E0B, 0x1EF2, 0x00AD, 0x00AE, 0x0178,
- 0x1E1E, 0x1E1F, 0x0120, 0x0121, 0x1E40, 0x1E41, 0x00B6, 0x1E56,
- 0x1E81, 0x1E57, 0x1E83, 0x1E60, 0x1EF3, 0x1E84, 0x1E85, 0x1E61,
- 0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7,
- 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
- 0x0174, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x1E6A,
- 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x0176, 0x00DF,
- 0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7,
- 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
- 0x0175, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x1E6B,
- 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x0177, 0x00FF} },
- { "ISO 8859-15", 111,
- { 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
- 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
- 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
- 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
- 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x20AC, 0x00A5, 0x0160, 0x00A7,
- 0x0161, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
- 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x017D, 0x00B5, 0x00B6, 0x00B7,
- 0x017E, 0x00B9, 0x00BA, 0x00BB, 0x0152, 0x0153, 0x0178, 0x00BF,
- 0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7,
- 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
- 0x00D0, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7,
- 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x00DE, 0x00DF,
- 0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7,
- 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
- 0x00F0, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7,
- 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x00FF} },
-
- // next bits generated again from tables on the Unicode 3.0 CD.
-
- // $ for a in CP* ; do ( awk '/^0x[89ABCDEF]/{ print $1, $2 }' < $a ) | sort | sed -e 's/#UNDEF.*$/0xFFFD/' | cut -c6- | paste '-d ' - - - - - - - - | sed -e 's/ /, /g' -e 's/$/,/' -e '$ s/,$/} },/' -e '1 s/^/{ /' > ~/tmp/$a ; done
-
- { "CP 874", 0, //### what is the mib?
- { 0x20AC, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x2026, 0xFFFD, 0xFFFD,
- 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
- 0xFFFD, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
- 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
- 0x00A0, 0x0E01, 0x0E02, 0x0E03, 0x0E04, 0x0E05, 0x0E06, 0x0E07,
- 0x0E08, 0x0E09, 0x0E0A, 0x0E0B, 0x0E0C, 0x0E0D, 0x0E0E, 0x0E0F,
- 0x0E10, 0x0E11, 0x0E12, 0x0E13, 0x0E14, 0x0E15, 0x0E16, 0x0E17,
- 0x0E18, 0x0E19, 0x0E1A, 0x0E1B, 0x0E1C, 0x0E1D, 0x0E1E, 0x0E1F,
- 0x0E20, 0x0E21, 0x0E22, 0x0E23, 0x0E24, 0x0E25, 0x0E26, 0x0E27,
- 0x0E28, 0x0E29, 0x0E2A, 0x0E2B, 0x0E2C, 0x0E2D, 0x0E2E, 0x0E2F,
- 0x0E30, 0x0E31, 0x0E32, 0x0E33, 0x0E34, 0x0E35, 0x0E36, 0x0E37,
- 0x0E38, 0x0E39, 0x0E3A, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x0E3F,
- 0x0E40, 0x0E41, 0x0E42, 0x0E43, 0x0E44, 0x0E45, 0x0E46, 0x0E47,
- 0x0E48, 0x0E49, 0x0E4A, 0x0E4B, 0x0E4C, 0x0E4D, 0x0E4E, 0x0E4F,
- 0x0E50, 0x0E51, 0x0E52, 0x0E53, 0x0E54, 0x0E55, 0x0E56, 0x0E57,
- 0x0E58, 0x0E59, 0x0E5A, 0x0E5B, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD} },
- { "CP 1250", 2250,
- { 0x20AC, 0xFFFD, 0x201A, 0xFFFD, 0x201E, 0x2026, 0x2020, 0x2021,
- 0xFFFD, 0x2030, 0x0160, 0x2039, 0x015A, 0x0164, 0x017D, 0x0179,
- 0xFFFD, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
- 0xFFFD, 0x2122, 0x0161, 0x203A, 0x015B, 0x0165, 0x017E, 0x017A,
- 0x00A0, 0x02C7, 0x02D8, 0x0141, 0x00A4, 0x0104, 0x00A6, 0x00A7,
- 0x00A8, 0x00A9, 0x015E, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x017B,
- 0x00B0, 0x00B1, 0x02DB, 0x0142, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
- 0x00B8, 0x0105, 0x015F, 0x00BB, 0x013D, 0x02DD, 0x013E, 0x017C,
- 0x0154, 0x00C1, 0x00C2, 0x0102, 0x00C4, 0x0139, 0x0106, 0x00C7,
- 0x010C, 0x00C9, 0x0118, 0x00CB, 0x011A, 0x00CD, 0x00CE, 0x010E,
- 0x0110, 0x0143, 0x0147, 0x00D3, 0x00D4, 0x0150, 0x00D6, 0x00D7,
- 0x0158, 0x016E, 0x00DA, 0x0170, 0x00DC, 0x00DD, 0x0162, 0x00DF,
- 0x0155, 0x00E1, 0x00E2, 0x0103, 0x00E4, 0x013A, 0x0107, 0x00E7,
- 0x010D, 0x00E9, 0x0119, 0x00EB, 0x011B, 0x00ED, 0x00EE, 0x010F,
- 0x0111, 0x0144, 0x0148, 0x00F3, 0x00F4, 0x0151, 0x00F6, 0x00F7,
- 0x0159, 0x016F, 0x00FA, 0x0171, 0x00FC, 0x00FD, 0x0163, 0x02D9} },
- { "CP 1251", 2251,
- { 0x0402, 0x0403, 0x201A, 0x0453, 0x201E, 0x2026, 0x2020, 0x2021,
- 0x20AC, 0x2030, 0x0409, 0x2039, 0x040A, 0x040C, 0x040B, 0x040F,
- 0x0452, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
- 0xFFFD, 0x2122, 0x0459, 0x203A, 0x045A, 0x045C, 0x045B, 0x045F,
- 0x00A0, 0x040E, 0x045E, 0x0408, 0x00A4, 0x0490, 0x00A6, 0x00A7,
- 0x0401, 0x00A9, 0x0404, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x0407,
- 0x00B0, 0x00B1, 0x0406, 0x0456, 0x0491, 0x00B5, 0x00B6, 0x00B7,
- 0x0451, 0x2116, 0x0454, 0x00BB, 0x0458, 0x0405, 0x0455, 0x0457,
- 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417,
- 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F,
- 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427,
- 0x0428, 0x0429, 0x042A, 0x042B, 0x042C, 0x042D, 0x042E, 0x042F,
- 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437,
- 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F,
- 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447,
- 0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F} },
- { "CP 1252", 2252,
- { 0x20AC, 0xFFFD, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
- 0x02C6, 0x2030, 0x0160, 0x2039, 0x0152, 0xFFFD, 0x017D, 0xFFFD,
- 0xFFFD, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
- 0x02DC, 0x2122, 0x0161, 0x203A, 0x0153, 0xFFFD, 0x017E, 0x0178,
- 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
- 0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
- 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
- 0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
- 0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7,
- 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
- 0x00D0, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7,
- 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x00DE, 0x00DF,
- 0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7,
- 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
- 0x00F0, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7,
- 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x00FF} },
- { "CP 1253", 2253,
- { 0x20AC, 0xFFFD, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
- 0xFFFD, 0x2030, 0xFFFD, 0x2039, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
- 0xFFFD, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
- 0xFFFD, 0x2122, 0xFFFD, 0x203A, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
- 0x00A0, 0x0385, 0x0386, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
- 0x00A8, 0x00A9, 0xFFFD, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x2015,
- 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x0384, 0x00B5, 0x00B6, 0x00B7,
- 0x0388, 0x0389, 0x038A, 0x00BB, 0x038C, 0x00BD, 0x038E, 0x038F,
- 0x0390, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397,
- 0x0398, 0x0399, 0x039A, 0x039B, 0x039C, 0x039D, 0x039E, 0x039F,
- 0x03A0, 0x03A1, 0xFFFD, 0x03A3, 0x03A4, 0x03A5, 0x03A6, 0x03A7,
- 0x03A8, 0x03A9, 0x03AA, 0x03AB, 0x03AC, 0x03AD, 0x03AE, 0x03AF,
- 0x03B0, 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7,
- 0x03B8, 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF,
- 0x03C0, 0x03C1, 0x03C2, 0x03C3, 0x03C4, 0x03C5, 0x03C6, 0x03C7,
- 0x03C8, 0x03C9, 0x03CA, 0x03CB, 0x03CC, 0x03CD, 0x03CE, 0xFFFD} },
- { "CP 1254", 2254,
- { 0x20AC, 0xFFFD, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
- 0x02C6, 0x2030, 0x0160, 0x2039, 0x0152, 0xFFFD, 0xFFFD, 0xFFFD,
- 0xFFFD, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
- 0x02DC, 0x2122, 0x0161, 0x203A, 0x0153, 0xFFFD, 0xFFFD, 0x0178,
- 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
- 0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
- 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
- 0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
- 0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7,
- 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
- 0x011E, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7,
- 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x0130, 0x015E, 0x00DF,
- 0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7,
- 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
- 0x011F, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7,
- 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x0131, 0x015F, 0x00FF} },
- { "CP 1255", 2255,
- { 0x20AC, 0xFFFD, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
- 0x02C6, 0x2030, 0xFFFD, 0x2039, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
- 0xFFFD, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
- 0x02DC, 0x2122, 0xFFFD, 0x203A, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
- 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x20AA, 0x00A5, 0x00A6, 0x00A7,
- 0x00A8, 0x00A9, 0x00D7, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
- 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
- 0x00B8, 0x00B9, 0x00F7, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
- 0x05B0, 0x05B1, 0x05B2, 0x05B3, 0x05B4, 0x05B5, 0x05B6, 0x05B7,
- 0x05B8, 0x05B9, 0xFFFD, 0x05BB, 0x05BC, 0x05BD, 0x05BE, 0x05BF,
- 0x05C0, 0x05C1, 0x05C2, 0x05C3, 0x05F0, 0x05F1, 0x05F2, 0x05F3,
- 0x05F4, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
- 0x05D0, 0x05D1, 0x05D2, 0x05D3, 0x05D4, 0x05D5, 0x05D6, 0x05D7,
- 0x05D8, 0x05D9, 0x05DA, 0x05DB, 0x05DC, 0x05DD, 0x05DE, 0x05DF,
- 0x05E0, 0x05E1, 0x05E2, 0x05E3, 0x05E4, 0x05E5, 0x05E6, 0x05E7,
- 0x05E8, 0x05E9, 0x05EA, 0xFFFD, 0xFFFD, 0x200E, 0x200F, 0xFFFD} },
- { "CP 1256", 2256,
- { 0x20AC, 0x067E, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
- 0x02C6, 0x2030, 0x0679, 0x2039, 0x0152, 0x0686, 0x0698, 0x0688,
- 0x06AF, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
- 0x06A9, 0x2122, 0x0691, 0x203A, 0x0153, 0x200C, 0x200D, 0x06BA,
- 0x00A0, 0x060C, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
- 0x00A8, 0x00A9, 0x06BE, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
- 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
- 0x00B8, 0x00B9, 0x061B, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x061F,
- 0x06C1, 0x0621, 0x0622, 0x0623, 0x0624, 0x0625, 0x0626, 0x0627,
- 0x0628, 0x0629, 0x062A, 0x062B, 0x062C, 0x062D, 0x062E, 0x062F,
- 0x0630, 0x0631, 0x0632, 0x0633, 0x0634, 0x0635, 0x0636, 0x00D7,
- 0x0637, 0x0638, 0x0639, 0x063A, 0x0640, 0x0641, 0x0642, 0x0643,
- 0x00E0, 0x0644, 0x00E2, 0x0645, 0x0646, 0x0647, 0x0648, 0x00E7,
- 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x0649, 0x064A, 0x00EE, 0x00EF,
- 0x064B, 0x064C, 0x064D, 0x064E, 0x00F4, 0x064F, 0x0650, 0x00F7,
- 0x0651, 0x00F9, 0x0652, 0x00FB, 0x00FC, 0x200E, 0x200F, 0x06D2} },
- { "CP 1257", 2257,
- { 0x20AC, 0xFFFD, 0x201A, 0xFFFD, 0x201E, 0x2026, 0x2020, 0x2021,
- 0xFFFD, 0x2030, 0xFFFD, 0x2039, 0xFFFD, 0x00A8, 0x02C7, 0x00B8,
- 0xFFFD, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
- 0xFFFD, 0x2122, 0xFFFD, 0x203A, 0xFFFD, 0x00AF, 0x02DB, 0xFFFD,
- 0x00A0, 0xFFFD, 0x00A2, 0x00A3, 0x00A4, 0xFFFD, 0x00A6, 0x00A7,
- 0x00D8, 0x00A9, 0x0156, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00C6,
- 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
- 0x00F8, 0x00B9, 0x0157, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00E6,
- 0x0104, 0x012E, 0x0100, 0x0106, 0x00C4, 0x00C5, 0x0118, 0x0112,
- 0x010C, 0x00C9, 0x0179, 0x0116, 0x0122, 0x0136, 0x012A, 0x013B,
- 0x0160, 0x0143, 0x0145, 0x00D3, 0x014C, 0x00D5, 0x00D6, 0x00D7,
- 0x0172, 0x0141, 0x015A, 0x016A, 0x00DC, 0x017B, 0x017D, 0x00DF,
- 0x0105, 0x012F, 0x0101, 0x0107, 0x00E4, 0x00E5, 0x0119, 0x0113,
- 0x010D, 0x00E9, 0x017A, 0x0117, 0x0123, 0x0137, 0x012B, 0x013C,
- 0x0161, 0x0144, 0x0146, 0x00F3, 0x014D, 0x00F5, 0x00F6, 0x00F7,
- 0x0173, 0x0142, 0x015B, 0x016B, 0x00FC, 0x017C, 0x017E, 0x02D9} },
- { "CP 1258", 2258,
- { 0x20AC, 0xFFFD, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
- 0x02C6, 0x2030, 0xFFFD, 0x2039, 0x0152, 0xFFFD, 0xFFFD, 0xFFFD,
- 0xFFFD, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
- 0x02DC, 0x2122, 0xFFFD, 0x203A, 0x0153, 0xFFFD, 0xFFFD, 0x0178,
- 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
- 0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
- 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
- 0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
- 0x00C0, 0x00C1, 0x00C2, 0x0102, 0x00C4, 0x00C5, 0x00C6, 0x00C7,
- 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x0300, 0x00CD, 0x00CE, 0x00CF,
- 0x0110, 0x00D1, 0x0309, 0x00D3, 0x00D4, 0x01A0, 0x00D6, 0x00D7,
- 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x01AF, 0x0303, 0x00DF,
- 0x00E0, 0x00E1, 0x00E2, 0x0103, 0x00E4, 0x00E5, 0x00E6, 0x00E7,
- 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x0301, 0x00ED, 0x00EE, 0x00EF,
- 0x0111, 0x00F1, 0x0323, 0x00F3, 0x00F4, 0x01A1, 0x00F6, 0x00F7,
- 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x01B0, 0x20AB, 0x00FF} },
-
- // this one is generated from the charmap file located in /usr/share/i18n/charmaps
- // on most Linux distributions. The thai character set tis620 is byte by byte equivalent
- // to iso8859-11, so we name it 8859-11 here, but recognise the name tis620 too.
-
- // $ for A in 8 9 A B C D E F ; do for B in 0 1 2 3 4 5 6 7 8 9 A B C D E F ; do echo x${A}${B} 0xFFFD ; done ; done > /tmp/digits ; ( cut -c25- < TIS-620 ; cat /tmp/digits ) | awk '/^x[89ABCDEF]/{ print $1, $2 }' | sed -e 's/<U/0x/' -e 's/>//' | sort | uniq -w4 | cut -c5- | paste '-d ' - - - - - - - - | sed -e 's/ /, /g' -e 's/$/,/' -e '$ s/,$/} },/' -e '1 s/^/{ /' > ~/tmp/tis-620
- { "ISO 8859-11", 2259, // Thai character set mib enum taken from tis620 (which is byte by byte equivalent)
- { 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
- 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
- 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
- 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
- 0xFFFD, 0x0E01, 0x0E02, 0x0E03, 0x0E04, 0x0E05, 0x0E06, 0x0E07,
- 0x0E08, 0x0E09, 0x0E0A, 0x0E0B, 0x0E0C, 0x0E0D, 0x0E0E, 0x0E0F,
- 0x0E10, 0x0E11, 0x0E12, 0x0E13, 0x0E14, 0x0E15, 0x0E16, 0x0E17,
- 0x0E18, 0x0E19, 0x0E1A, 0x0E1B, 0x0E1C, 0x0E1D, 0x0E1E, 0x0E1F,
- 0x0E20, 0x0E21, 0x0E22, 0x0E23, 0x0E24, 0x0E25, 0x0E26, 0x0E27,
- 0x0E28, 0x0E29, 0x0E2A, 0x0E2B, 0x0E2C, 0x0E2D, 0x0E2E, 0x0E2F,
- 0x0E30, 0x0E31, 0x0E32, 0x0E33, 0x0E34, 0x0E35, 0x0E36, 0x0E37,
- 0x0E38, 0x0E39, 0x0E3A, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x0E3F,
- 0x0E40, 0x0E41, 0x0E42, 0x0E43, 0x0E44, 0x0E45, 0x0E46, 0x0E47,
- 0x0E48, 0x0E49, 0x0E4A, 0x0E4B, 0x0E4C, 0x0E4D, 0x0E4E, 0x0E4F,
- 0x0E50, 0x0E51, 0x0E52, 0x0E53, 0x0E54, 0x0E55, 0x0E56, 0x0E57,
- 0x0E58, 0x0E59, 0x0E5A, 0x0E5B, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD} },
-
- // change LAST_MIB if you add more, and edit unicodevalues in
- // kernel/qpsprinter.cpp too.
-};
-
-
-static const QSimpleTextCodec * reverseOwner = 0;
-static QArray<char> * reverseMap = 0;
-
-
-QSimpleTextCodec::QSimpleTextCodec( int i )
- : QTextCodec(), forwardIndex( i )
-{
-}
-
-
-QSimpleTextCodec::~QSimpleTextCodec()
-{
- if ( reverseOwner == this ) {
- delete reverseMap;
- reverseMap = 0;
- reverseOwner = 0;
- }
-}
-
-// what happens if strlen(chars)<len? what happens if !chars? if len<1?
-QString QSimpleTextCodec::toUnicode(const char* chars, int len) const
-{
- if(len <= 0)
- return QString::null;
-
- int clen = qstrlen(chars);
- len = QMIN(len, clen); // Note: NUL ends string
-
- QString r;
- r.setUnicode(0, len);
- QChar* uc = (QChar*)r.unicode(); // const_cast
- const unsigned char * c = (const unsigned char *)chars;
- for( int i=0; i<len; i++ ) {
- if ( c[i] > 127 )
- uc[i] = unicodevalues[forwardIndex].values[c[i]-128];
- else
- uc[i] = c[i];
- }
- return r;
-}
-
-
-QCString QSimpleTextCodec::fromUnicode(const QString& uc, int& len ) const
-{
- if ( reverseOwner != this ) {
- int m = 0;
- int i = 0;
- while( i < 128 ) {
- if ( unicodevalues[forwardIndex].values[i] > m &&
- unicodevalues[forwardIndex].values[i] < 0xfffd )
- m = unicodevalues[forwardIndex].values[i];
- i++;
- }
- m++;
- if ( !reverseMap )
- reverseMap = new QArray<char>( m );
- if ( m > (int)(reverseMap->size()) )
- reverseMap->resize( m );
- for( i = 0; i < 128 && i < m; i++ )
- (*reverseMap)[i] = (char)i;
- for( ;i < m; i++ )
- (*reverseMap)[i] = '?';
- for( i=128; i<256; i++ ) {
- int u = unicodevalues[forwardIndex].values[i-128];
- if ( u < m )
- (*reverseMap)[u] = (char)(unsigned char)(i);
- }
- reverseOwner = this;
- }
- if ( len <0 || len > (int)uc.length() )
- len = uc.length();
- QCString r( len+1 );
- int i = len;
- int u;
- const QChar* ucp = uc.unicode();
- char* rp = r.rawData();
- char* rmp = reverseMap->data();
- int rmsize = (int) reverseMap->size();
- while( i-- )
- {
- u = ucp->unicode();
- *rp++ = u < 128 ? u : (( u < rmsize ) ? (*(rmp+u)) : '?' );
- ucp++;
- }
- r[len] = 0;
- return r;
-}
-
-
-const char* QSimpleTextCodec::name() const
-{
- return unicodevalues[forwardIndex].cs;
-}
-
-
-int QSimpleTextCodec::mibEnum() const
-{
- return unicodevalues[forwardIndex].mib;
-}
-
-int QSimpleTextCodec::heuristicNameMatch(const char* hint) const
-{
- if ( hint[0]=='k' ) {
- // Help people with messy fonts
- if ( QCString(hint) == "koi8-1" )
- return QTextCodec::heuristicNameMatch("koi8-r")-1;
- if ( QCString(hint) == "koi8-ru" )
- return QTextCodec::heuristicNameMatch("koi8-r")-1;
- } else if ( hint[0] == 't' && QCString(name()) == "ISO 8859-11" ) {
- // 8859-11 and tis620 are byte by bute equivalent
- int i = simpleHeuristicNameMatch("tis620-0", hint);
- if( !i )
- i = simpleHeuristicNameMatch("tis-620", hint);
- if( i ) return i;
- }
- return QTextCodec::heuristicNameMatch(hint);
-}
-
-int QSimpleTextCodec::heuristicContentMatch(const char* chars, int len) const
-{
- if ( len<1 || !chars )
- return -1;
- int i = 0;
- const uchar * c = (const unsigned char *)chars;
- int r = 0;
- while( i<len && c && *c ) {
- if ( *c >= 128 ) {
- if ( unicodevalues[forwardIndex].values[(*c)-128] == 0xfffd )
- return -1;
- }
- if ( (*c >= ' ' && *c < 127) ||
- *c == '\n' || *c == '\t' || *c == '\r' )
- r++;
- i++;
- c++;
- }
- if ( mibEnum()==4 )
- r+=1;
- return r;
-}
-
-
-#endif // QT_NO_CODECS
-
-class QLatin1Codec: public QTextCodec
-{
-public:
- QLatin1Codec();
- ~QLatin1Codec();
-
- QString toUnicode(const char* chars, int len) const;
- QCString fromUnicode(const QString& uc, int& lenInOut ) const;
-
- const char* name() const;
- int mibEnum() const;
-
- int heuristicContentMatch(const char* chars, int len) const;
-
- int heuristicNameMatch(const char* hint) const;
-
-private:
- //int forwardIndex;
-};
-
-
-QLatin1Codec::QLatin1Codec()
- : QTextCodec()
-{
-}
-
-
-QLatin1Codec::~QLatin1Codec()
-{
-}
-
-// what happens if strlen(chars)<len? what happens if !chars? if len<1?
-QString QLatin1Codec::toUnicode(const char* chars, int len) const
-{
- if(len <= 0)
- return QString::null;
-
- return QString::fromLatin1(chars, len);
-}
-
-
-QCString QLatin1Codec::fromUnicode(const QString& uc, int& len ) const
-{
- if ( len <0 || len > (int)uc.length() )
- len = uc.length();
- QCString r( len+1 );
- int i = 0;
- const QChar *ch = uc.unicode();
- while ( i < len ) {
- r[i] = ch->row() ? '?' : ch->cell();
- i++;
- ch++;
- }
- r[len] = 0;
- return r;
-}
-
-
-const char* QLatin1Codec::name() const
-{
- return "ISO 8859-1";
-}
-
-
-int QLatin1Codec::mibEnum() const
-{
- return 4;
-}
-
-int QLatin1Codec::heuristicNameMatch(const char* hint) const
-{
- return QTextCodec::heuristicNameMatch(hint);
-}
-
-int QLatin1Codec::heuristicContentMatch(const char* chars, int len) const
-{
- if ( len<1 || !chars )
- return -1;
- int i = 0;
- const uchar * c = (const unsigned char *)chars;
- int r = 0;
- while( i<len && c && *c ) {
- if ( *c >= 0x80 && *c < 0xa0 )
- return -1;
- if ( (*c >= ' ' && *c < 127) ||
- *c == '\n' || *c == '\t' || *c == '\r' )
- r++;
- i++;
- c++;
- }
- return r;
-}
-
-
-static void setupBuiltinCodecs()
-{
- (void)new QLatin1Codec;
-
-#ifndef QT_NO_CODECS
- int i = 0;
- do {
- (void)new QSimpleTextCodec( i );
- } while( unicodevalues[i++].mib != LAST_MIB );
-
- //(void)new QEucJpCodec;
- //(void)new QSjisCodec;
- //(void)new QJisCodec;
- //(void)new QEucKrCodec;
- //(void)new QGbkCodec;
- //(void)new QBig5Codec;
- (void)new QUtf8Codec;
- (void)new QUtf16Codec;
- //(void)new QHebrewCodec;
- //(void)new QArabicCodec;
- //(void)new QTsciiCodec;
-#endif // QT_NO_CODECS
-}
-
-#endif // QT_NO_TEXTCODEC
diff --git a/qtools/qtextcodec.h b/qtools/qtextcodec.h
deleted file mode 100644
index 18ece20..0000000
--- a/qtools/qtextcodec.h
+++ /dev/null
@@ -1,104 +0,0 @@
-/****************************************************************************
-**
-**
-** Definition of QTextCodec class
-**
-** Created : 981015
-**
-** Copyright (C) 1998-2000 Trolltech AS. All rights reserved.
-**
-** This file is part of the tools module of the Qt GUI Toolkit.
-**
-** This file may be distributed under the terms of the Q Public License
-** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#ifndef QTEXTCODEC_H
-#define QTEXTCODEC_H
-
-#ifndef QT_H
-#include "qstring.h"
-#endif // QT_H
-
-#ifndef QT_NO_TEXTCODEC
-
-class QTextCodec;
-class QIODevice;
-
-class Q_EXPORT QTextEncoder {
-public:
- virtual ~QTextEncoder();
- virtual QCString fromUnicode(const QString& uc, int& lenInOut) = 0;
-};
-
-class Q_EXPORT QTextDecoder {
-public:
- virtual ~QTextDecoder();
- virtual QString toUnicode(const char* chars, int len) = 0;
-};
-
-class Q_EXPORT QTextCodec {
-public:
- virtual ~QTextCodec();
-
-#ifndef QT_NO_CODECS
- static QTextCodec* loadCharmap(QIODevice*);
- static QTextCodec* loadCharmapFile(QString filename);
-#endif
- static QTextCodec* codecForMib(int mib);
- static QTextCodec* codecForName(const char* hint, int accuracy=0);
- static QTextCodec* codecForContent(const char* chars, int len);
- static QTextCodec* codecForIndex(int i);
- static QTextCodec* codecForLocale();
-
- static void deleteAllCodecs();
-
- static const char* locale();
-
- virtual const char* name() const = 0;
- virtual int mibEnum() const = 0;
-
- virtual QTextDecoder* makeDecoder() const;
- virtual QTextEncoder* makeEncoder() const;
-
- virtual QString toUnicode(const char* chars, int len) const;
- virtual QCString fromUnicode(const QString& uc, int& lenInOut) const;
-
- QCString fromUnicode(const QString& uc) const;
- QString toUnicode(const QByteArray&, int len) const;
- QString toUnicode(const QByteArray&) const;
- QString toUnicode(const char* chars) const;
- virtual bool canEncode( QChar ) const;
- virtual bool canEncode( const QString& ) const;
-
- virtual int heuristicContentMatch(const char* chars, int len) const = 0;
- virtual int heuristicNameMatch(const char* hint) const;
-
-protected:
- QTextCodec();
- static int simpleHeuristicNameMatch(const char* name, const char* hint);
-};
-#endif // QT_NO_TEXTCODEC
-#endif // QTEXTCODEC_H
diff --git a/qtools/qtl.doc b/qtools/qtl.doc
deleted file mode 100644
index 8ce89bd..0000000
--- a/qtools/qtl.doc
+++ /dev/null
@@ -1,249 +0,0 @@
-/****************************************************************************
-**
-**
-** Qt template library classes documentation
-**
-** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
-**
-** This file is part of the Qt GUI Toolkit.
-**
-** This file may be distributed under the terms of the Q Public License
-** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-/*!
-\page qtl.html
-
-\title Qt Template library
-
-The Qt Template Library is a set of templates within Qt dealing with
-containers of objects. It provides a list of objects, a stack of
-objects, a map (or dictionary) from one type to another, and
-associated iterators and algorithms.
-
-Qt also contains similar classes that deal with pointers to objects;
-\l QValueList vs. \l QList, etc. Compared to the pointer-based
-templates, the QTL offers easy copying of the container, real support
-for classes that e.g. require constructors, expand to much more object
-code, can often be a bit faster, require that the objects stored can
-be copied, and finally, have a worse record of compiler problems.
-
-Compared to the STL, the QTL contains only the most important features
-of the STL, has more regular function naming, has no platform
-differences, is often a little slower and often expands to less object
-code.
-
-
-If you can not make copies of the objects you want to store you are
-better off with QCollection and friends. They were designed to handle
-exactly that kind of pointer semantics. This applies for example to
-all classes derived from \l QObject. A QObject does not have a copy
-constructor, so using it as value is impossible. You may choose be
-store pointers to QObjects in a QValueList, but using QList directly
-seems to be the better choice for this kind of application
-domain. QList, like all other QCollection based containers, provides
-far more sanity checking than a speed-optimized value
-based container.
-
-If you have objects that implement value semantics, use the Qt
-template library. Value semantics require at least
-<ul>
-<li>a copy constructor,
-<li>an assignment operator and
-<li> a default constructor, i.e. a constructor that does not take
-any arguments.
-</ul>
-Note that a fast copy constructor is absolutely crucial for a good
-overall performance of the container, since many copy operations are
-going to happen.
-
-Examples for value based classes are QRect, QPoint, QSize and all
-simple C++ types like int, bool or double.
-
-The Qt template library is designed for speed. Especially iterators
-are extremely fast. On the drawback side, less error checking is done
-than in the QCollection based containers. A template library container
-for example does not track associated iterators. This makes certain
-validity checks, like on removing items, impossible to perform
-automatically.
-
-<h2> Iterators </h2>
-
-The Qt template library deals with value objects, not with pointers.
-For that reason, there is no other way of iterating over containers
-than using iterators. This is no disadvantage as the size of an
-iterator matches the size of a normal pointer - 32 or 64 bits
-depending on your CPU architecture.
-
-To iterate over a container, use a loop like this:
-
-\code
- typedef QValueList<int> List;
- List l;
- for( List::Iterator it = l.begin(); it != l.end(); ++it )
- printf("Number is %i\n",*it);
-\endcode
-
-begin() returns the iterator pointing at the first element, while
-end() returns an iterator that points \e after the last
-element. end() marks an invalid position, it can never be
-dereferenced. It's the break condition in any iteration, may it be
-from begin() or fromLast(). For maximum speed, use increment or
-decrement iterators with the prefix operator (++it, --it) instead of the
-postfix one (it++, it--), since the former is slightly faster.
-
-The same concept applies to the other container classes:
-
-\code
- typedef QMap<QString,QString> Map;
- Map map;
- for( Map::Iterator it = map.begin(); it != map.end(); ++it )
- printf("Key=%s Data=%s\n", it.key().ascii(), it.data().ascii() );
-
- typedef QArray<int> Array;
- Array array;
- for( Array::Iterator it = array.begin(); it != array.end(); ++it )
- printf("Data=%i\n", *it );
-\endcode
-
-There are two kind of iterators, the volatile iterator shown in the
-examples above and a version that returns a const reference to its
-current object, the ConstIterator. Const iterators are required
-whenever the container itself is const, such as a member variable
-inside a const function. Assigning a ConstIterator to a normal
-Iterator is not allowed as it would violate const semantics.
-
-<h2> Algorithms </h2>
-
-The template library defines a number of algorithms that operate on
-its containers: qHeapSort(), qBubbleSort(), qSwap() and
-qCopy(). These algorithms are implemented as template functions.
-
-qHeapSort() and qBubbleSort() provide the well known sorting
-algorithms. You can use them like this:
-
-\code
- typedef QValueList<int> List;
- List l;
- l << 42 << 100 << 1234 << 12 << 8;
- qHeapSort( l );
-
- List l2;
- l2 << 42 << 100 << 1234 << 12 << 8;
- List::Iterator b = l2.find( 100 );
- List::Iterator e = l2.find( 8 );
- qHeapSort( b, e );
-
- double arr[] = { 3.2, 5.6, 8.9 };
- qHeapSort( arr, arr + 3 );
-\endcode
-
-The first example sorts the entire list. The second one sorts all
-elements enclosed in the two iterators, namely 100, 1234 and 12. The
-third example shows that iterators act like pointers and can be
-treated as such.
-
-Naturally, the sorting templates won't work with const iterators.
-
-Another utility is qSwap(). It exchanges the values of two variables:
-
-\code
- QString second( "Einstein" );
- QString name( "Albert" );
- qSwap( second, name );
-\endcode
-
-Another template function is qCopy(). It copies a container or a slice
-of it to an OutputIterator, in this case a QTextOStreamIterator:
-
-\code
- typedef QValueList<int> List;
- List l;
- l << 100 << 200 << 300;
- QTextOStream str( stdout );
- qCopy( l, QTextOStreamIterator( str ) );
-\endcode
-
-In addition, you can use any Qt template library iterator as the
-OutputIterator. Just make sure that the right hand of the iterator has
-as many elements present as you want to insert. The following example
-illustrates this:
-
-\code
- QStringList l1, l2;
- l1 << "Weis" << "Ettrich" << "Arnt" << "Sue";
- l2 << "Torben" << "Matthias";
- qCopy( l2, l1.begin();
-\endcode
-
-At the end of this code fragment, the List l1 contains "Torben",
-"Matthias", "Arnt" and "Sue", with the prior contents being
-overwritten. Another flavor of qCopy() takes three arguments to make
-it possible to copy a slice of a container:
-
-\code
- typedef QValueList<int> List;
- List l;
- l << 42 << 100 << 1234 << 12 << 8;
- List::Iterator b = l.find( 100 );
- List::Iterator e = l.find( 8 );
- QTextOStream str( stdout );
- qCopy( b, e, QTextOStreamIterator( str ) );
-\endcode
-
-If you write new algorithms, consider writing them as template
-functions in order to make them usable with as many containers
-possible. In the above example, you could just as easily print out a
-standard C++ array with qCopy():
-
-\code
- int arr[] = { 100, 200, 300 };
- QTextOStream str( stdout );
- qCopy( arr, arr + 3, QTextOStreamIterator( str ) );
-\endcode
-
-
-<h2> Streaming </h2>
-
-All mentioned containers can be serialized with the respective
-streaming operators. Here is an example.
-
-\code
- QDataStream str(...);
- QValueList<QRect> l;
- // ... fill the list here
- str << l;
-\endcode
-
-The container can be read in again with:
-
-\code
- QValueList<QRect> l;
- str >> l;
-\endcode
-
-The same applies to QStringList, QValueStack and QMap.
-
-*/
diff --git a/qtools/qtl.h b/qtools/qtl.h
deleted file mode 100644
index 64825e9..0000000
--- a/qtools/qtl.h
+++ /dev/null
@@ -1,198 +0,0 @@
-/****************************************************************************
-**
-**
-** Definition of Qt template library classes
-**
-** Created : 990128
-**
-** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
-**
-** This file is part of the tools module of the Qt GUI Toolkit.
-**
-** This file may be distributed under the terms of the Q Public License
-** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-#ifndef QTL_H
-#define QTL_H
-
-#ifndef QT_H
-#include "qstring.h"
-#endif // QT_H
-
-template <class InputIterator, class OutputIterator>
-inline OutputIterator qCopy( InputIterator _begin, InputIterator _end,
- OutputIterator _dest )
-{
- while( _begin != _end )
- *_dest++ = *_begin++;
- return _dest;
-}
-
-
-template <class T>
-inline void qSwap( T& _value1, T& _value2 )
-{
- T tmp = _value1;
- _value1 = _value2;
- _value2 = tmp;
-}
-
-
-template <class InputIterator>
-inline void qBubbleSort( InputIterator b, InputIterator e )
-{
- // Goto last element;
- InputIterator last = e;
- --last;
- // only one element or no elements ?
- if ( last == b )
- return;
-
- // So we have at least two elements in here
- while( b != last ) {
- bool swapped = FALSE;
- InputIterator swap_pos = b;
- InputIterator x = e;
- InputIterator y = x;
- y--;
- do {
- --x;
- --y;
- if ( *x < *y ) {
- swapped = TRUE;
- qSwap( *x, *y );
- swap_pos = y;
- }
- } while( y != b );
- if ( !swapped )
- return;
- b = swap_pos;
- b++;
- }
-}
-
-
-template <class Container>
-inline void qBubbleSort( Container &c )
-{
- qBubbleSort( c.begin(), c.end() );
-}
-
-
-template <class Value>
-inline void qHeapSortPushDown( Value* heap, int first, int last )
-{
- int r = first;
- while( r <= last/2 ) {
- // Node r has only one child ?
- if ( last == 2*r ) {
- // Need for swapping ?
- if ( heap[r] > heap[ 2*r ] )
- qSwap( heap[r], heap[ 2*r ] );
- // That's it ...
- r = last;
- } else { // Node has two children
- if ( heap[r] > heap[ 2*r ] && heap[ 2*r ] <= heap[ 2*r+1 ] ) {
- // Swap with left child
- qSwap( heap[r], heap[ 2*r ] );
- r *= 2;
- } else if ( heap[r] > heap[ 2*r+1 ] &&
- heap[ 2*r+1 ] < heap[ 2*r ] ) {
- // Swap with right child
- qSwap( heap[r], heap[ 2*r+1 ] );
- r = 2*r+1;
- } else {
- // We are done
- r = last;
- }
- }
- }
-}
-
-
-template <class InputIterator, class Value>
-inline void qHeapSortHelper( InputIterator b, InputIterator e, Value, uint n )
-{
- // Create the heap
- InputIterator insert = b;
- Value* realheap = new Value[ n ];
- // Wow, what a fake. But I want the heap to be indexed as 1...n
- Value* heap = realheap - 1;
- int size = 0;
- for( ; insert != e; ++insert ) {
- heap[++size] = *insert;
- int i = size;
- while( i > 1 && heap[i] < heap[ i / 2 ] ) {
- qSwap( heap[i], heap[ i / 2 ] );
- i /= 2;
- }
- }
-
- // Now do the sorting
- for( uint i = n; i > 0; i-- ) {
- *b++ = heap[1];
- if ( i > 1 ) {
- heap[1] = heap[i];
- qHeapSortPushDown( heap, 1, (int)i - 1 );
- }
- }
-
- delete[] realheap;
-}
-
-
-template <class InputIterator>
-inline void qHeapSort( InputIterator b, InputIterator e )
-{
- // Empty ?
- if ( b == e )
- return;
-
- // How many entries have to be sorted ?
- InputIterator it = b;
- uint n = 0;
- while ( it != e ) {
- ++n;
- ++it;
- }
-
- // The second last parameter is a hack to retrieve the value type
- // Do the real sorting here
- qHeapSortHelper( b, e, *b, n );
-}
-
-
-template <class Container>
-inline void qHeapSort( Container &c )
-{
- if ( c.isEmpty() )
- return;
-
- // The second last parameter is a hack to retrieve the value type
- // Do the real sorting here
- qHeapSortHelper( c.begin(), c.end(), *(c.begin()), c.count() );
-}
-
-#endif
diff --git a/qtools/qutfcodec.cpp b/qtools/qutfcodec.cpp
deleted file mode 100644
index a37e37f..0000000
--- a/qtools/qutfcodec.cpp
+++ /dev/null
@@ -1,276 +0,0 @@
-/****************************************************************************
-**
-**
-** Implementation of QEucCodec class
-**
-** Created : 981015
-**
-** Copyright (C)1998-2000 Trolltech AS. All rights reserved.
-**
-** This file is part of the tools module of the Qt GUI Toolkit.
-**
-** This file may be distributed under the terms of the Q Public License
-** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#include "qutfcodec.h"
-
-#ifndef QT_NO_TEXTCODEC
-
-int QUtf8Codec::mibEnum() const
-{
- return 106;
-}
-
-QCString QUtf8Codec::fromUnicode(const QString& uc, int& len_in_out) const
-{
- int l = QMIN((int)uc.length(),len_in_out);
- int rlen = l*3+1;
- QCString rstr(rlen);
- uchar* cursor = (uchar*)rstr.data();
- for (int i=0; i<l; i++) {
- QChar ch = uc[i];
- if ( !ch.row() && ch.cell() < 0x80 ) {
- *cursor++ = ch.cell();
- } else {
- uchar b = (ch.row() << 2) | (ch.cell() >> 6);
- if ( ch.row() < 0x08 ) {
- *cursor++ = 0xc0 | b;
- } else {
- *cursor++ = 0xe0 | (ch.row() >> 4);
- *cursor++ = 0x80 | (b&0x3f);
- }
- *cursor++ = 0x80 | (ch.cell()&0x3f);
- }
- }
- len_in_out = (int)(cursor - (uchar*)rstr.data());
- rstr.truncate(len_in_out);
- return rstr;
-}
-
-const char* QUtf8Codec::name() const
-{
- return "UTF-8";
-}
-
-int QUtf8Codec::heuristicContentMatch(const char* chars, int len) const
-{
- int score = 0;
- for (int i=0; i<len; i++) {
- uchar ch = chars[i];
- // No nulls allowed.
- if ( !ch )
- return -1;
- if ( ch < 128 ) {
- // Inconclusive
- score++;
- } else if ( (ch&0xe0) == 0xc0 ) {
- if ( i < len-1 ) {
- uchar c2 = chars[++i];
- if ( (c2&0xc0) != 0x80 )
- return -1;
- score+=3;
- }
- } else if ( (ch&0xf0) == 0xe0 ) {
- if ( i < len-1 ) {
- uchar c2 = chars[++i];
- if ( (c2&0xc0) != 0x80 ) {
- return -1;
-#if 0
- if ( i < len-1 ) {
- uchar c3 = chars[++i];
- if ( (c3&0xc0) != 0x80 )
- return -1;
- score+=3;
- }
-#endif
- }
- score+=2;
- }
- }
- }
- return score;
-}
-
-
-
-
-class QUtf8Decoder : public QTextDecoder {
- ushort uc;
- int need;
-public:
- QUtf8Decoder() : need(0)
- {
- }
-
- QString toUnicode(const char* chars, int len)
- {
- QString result;
- for (int i=0; i<len; i++) {
- uchar ch = chars[i];
- if (need) {
- if ( (ch&0xc0) == 0x80 ) {
- uc = (uc << 6) | (ch & 0x3f);
- need--;
- if ( !need ) {
- result += QChar(uc);
- }
- } else {
- // error
- result += QChar::replacement;
- need = 0;
- }
- } else {
- if ( ch < 128 ) {
- result += QChar(ch);
- } else if ( (ch&0xe0) == 0xc0 ) {
- uc = ch &0x1f;
- need = 1;
- } else if ( (ch&0xf0) == 0xe0 ) {
- uc = ch &0x0f;
- need = 2;
- }
- }
- }
- return result;
- }
-};
-
-QTextDecoder* QUtf8Codec::makeDecoder() const
-{
- return new QUtf8Decoder;
-}
-
-
-
-
-
-
-int QUtf16Codec::mibEnum() const
-{
- return 1000;
-}
-
-const char* QUtf16Codec::name() const
-{
- return "ISO-10646-UCS-2";
-}
-
-int QUtf16Codec::heuristicContentMatch(const char* chars, int len) const
-{
- uchar* uchars = (uchar*)chars;
- if ( len >= 2 && ((uchars[0] == 0xff && uchars[1] == 0xfe) ||
- (uchars[1] == 0xff && uchars[0] == 0xfe)) )
- return len;
- else
- return 0;
-}
-
-
-
-
-class QUtf16Encoder : public QTextEncoder {
- bool headerdone;
-public:
- QUtf16Encoder() : headerdone(FALSE)
- {
- }
-
- QCString fromUnicode(const QString& uc, int& len_in_out)
- {
- if ( headerdone ) {
- len_in_out = uc.length()*(int)sizeof(QChar);
- QCString d(len_in_out);
- memcpy(d.rawData(),uc.unicode(),len_in_out);
- return d;
- } else {
- headerdone = TRUE;
- len_in_out = (1+uc.length())*(int)sizeof(QChar);
- QCString d(len_in_out);
- memcpy(d.rawData(),&QChar::byteOrderMark,sizeof(QChar));
- memcpy(d.rawData()+sizeof(QChar),uc.unicode(),uc.length()*sizeof(QChar));
- return d;
- }
- }
-};
-
-class QUtf16Decoder : public QTextDecoder {
- uchar buf;
- bool half;
- bool swap;
- bool headerdone;
-
-public:
- QUtf16Decoder() : half(FALSE), swap(FALSE), headerdone(FALSE)
- {
- }
-
- QString toUnicode(const char* chars, int len)
- {
- QString r;
-
- while ( len-- ) {
- if ( half ) {
- QChar ch;
- if ( swap ) {
- ch.row() = *chars++;
- ch.cell() = buf;
- } else {
- ch.row() = buf;
- ch.cell() = *chars++;
- }
- if ( !headerdone ) {
- if ( ch == QChar::byteOrderSwapped ) {
- swap = !swap;
- } else if ( ch == QChar::byteOrderMark ) {
- // Ignore ZWNBSP
- } else {
- r += ch;
- }
- headerdone = TRUE;
- } else
- r += ch;
- half = FALSE;
- } else {
- buf = *chars++;
- half = TRUE;
- }
- }
-
- return r;
- }
-};
-
-QTextDecoder* QUtf16Codec::makeDecoder() const
-{
- return new QUtf16Decoder;
-}
-
-QTextEncoder* QUtf16Codec::makeEncoder() const
-{
- return new QUtf16Encoder;
-}
-
-#endif // QT_NO_TEXTCODEC
diff --git a/qtools/qutfcodec.h b/qtools/qutfcodec.h
deleted file mode 100644
index af864be..0000000
--- a/qtools/qutfcodec.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/****************************************************************************
-**
-**
-** Definition of QEucCodec class
-**
-** Created : 981015
-**
-** Copyright (C) 1998-2000 Trolltech AS. All rights reserved.
-**
-** This file is part of the tools module of the Qt GUI Toolkit.
-**
-** This file may be distributed under the terms of the Q Public License
-** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#ifndef QUTFCODEC_H
-#define QUTFCODEC_H
-
-#ifndef QT_H
-#include "qtextcodec.h"
-#endif // QT_H
-
-#ifndef QT_NO_TEXTCODEC
-
-class Q_EXPORT QUtf8Codec : public QTextCodec {
-public:
- virtual int mibEnum() const;
- const char* name() const;
-
- QTextDecoder* makeDecoder() const;
-
- QCString fromUnicode(const QString& uc, int& len_in_out) const;
-
- int heuristicContentMatch(const char* chars, int len) const;
-};
-
-class Q_EXPORT QUtf16Codec : public QTextCodec {
-public:
- virtual int mibEnum() const;
- const char* name() const;
-
- QTextDecoder* makeDecoder() const;
- QTextEncoder* makeEncoder() const;
-
- int heuristicContentMatch(const char* chars, int len) const;
-};
-
-#endif //QT_NO_TEXTCODEC
-#endif // QUTFCODEC_H
diff --git a/qtools/qvaluelist_p.h b/qtools/qvaluelist_p.h
deleted file mode 100644
index 8885bea..0000000
--- a/qtools/qvaluelist_p.h
+++ /dev/null
@@ -1,455 +0,0 @@
-/****************************************************************************
-**
-**
-** Definition of QValueList class
-**
-** Created : 990406
-**
-** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
-**
-** This file is part of the tools module of the Qt GUI Toolkit.
-**
-** This file may be distributed under the terms of the Q Public License
-** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#ifndef QVALUELIST_H
-#define QVALUELIST_H
-
-#ifndef QT_H
-#include "qshared.h"
-#include "qdatastream.h"
-#endif // QT_H
-
-template <class T>
-class Q_EXPORT QValueListNode
-{
-public:
- QValueListNode( const T& t ) : data( t ) { }
- QValueListNode() { }
-#if defined(Q_TEMPLATEDLL)
- // Workaround MS bug in memory de/allocation in DLL vs. EXE
- virtual ~QValueListNode() { }
-#endif
-
- QValueListNode<T>* next;
- QValueListNode<T>* prev;
- T data;
-};
-
-template<class T>
-class Q_EXPORT QValueListIterator
-{
- public:
- /**
- * Typedefs
- */
- typedef QValueListNode<T>* NodePtr;
-
- /**
- * Variables
- */
- NodePtr node;
-
- /**
- * Functions
- */
- QValueListIterator() : node( 0 ) {}
- QValueListIterator( NodePtr p ) : node( p ) {}
- QValueListIterator( const QValueListIterator<T>& it ) : node( it.node ) {}
- QValueListIterator &operator=(const QValueListIterator &it)
- {
- node = it.node;
- return *this;
- }
-
- bool operator==( const QValueListIterator<T>& it ) const { return node == it.node; }
- bool operator!=( const QValueListIterator<T>& it ) const { return node != it.node; }
- const T& operator*() const { return node->data; }
- T& operator*() { return node->data; }
-
- // Compilers are too dumb to understand this for QValueList<int>
- //T* operator->() const { return &(node->data); }
-
- QValueListIterator<T>& operator++() {
- node = node->next;
- return *this;
- }
-
- QValueListIterator<T> operator++(int) {
- QValueListIterator<T> tmp = *this;
- node = node->next;
- return tmp;
- }
-
- QValueListIterator<T>& operator--() {
- node = node->prev;
- return *this;
- }
-
- QValueListIterator<T> operator--(int) {
- QValueListIterator<T> tmp = *this;
- node = node->prev;
- return tmp;
- }
-};
-
-template<class T>
-class Q_EXPORT QValueListConstIterator
-{
- public:
- /**
- * Typedefs
- */
- typedef QValueListNode<T>* NodePtr;
-
- /**
- * Variables
- */
- NodePtr node;
-
- /**
- * Functions
- */
- QValueListConstIterator() : node( 0 ) {}
- QValueListConstIterator( NodePtr p ) : node( p ) {}
- QValueListConstIterator( const QValueListConstIterator<T>& it ) : node( it.node ) {}
- QValueListConstIterator( const QValueListIterator<T>& it ) : node( it.node ) {}
- QValueListConstIterator &operator=(const QValueListConstIterator &it)
- {
- node = it.node;
- return *this;
- }
-
- bool operator==( const QValueListConstIterator<T>& it ) const { return node == it.node; }
- bool operator!=( const QValueListConstIterator<T>& it ) const { return node != it.node; }
- const T& operator*() const { return node->data; }
-
- // Compilers are too dumb to understand this for QValueList<int>
- //const T* operator->() const { return &(node->data); }
-
- QValueListConstIterator<T>& operator++() {
- node = node->next;
- return *this;
- }
-
- QValueListConstIterator<T> operator++(int) {
- QValueListConstIterator<T> tmp = *this;
- node = node->next;
- return tmp;
- }
-
- QValueListConstIterator<T>& operator--() {
- node = node->prev;
- return *this;
- }
-
- QValueListConstIterator<T> operator--(int) {
- QValueListConstIterator<T> tmp = *this;
- node = node->prev;
- return tmp;
- }
-};
-
-template <class T>
-class Q_EXPORT QValueListPrivate : public QShared
-{
-public:
- /**
- * Typedefs
- */
- typedef QValueListIterator<T> Iterator;
- typedef QValueListConstIterator<T> ConstIterator;
- typedef QValueListNode<T> Node;
- typedef QValueListNode<T>* NodePtr;
-
- /**
- * Functions
- */
- QValueListPrivate() { node = new Node; node->next = node->prev = node; nodes = 0; }
- QValueListPrivate( const QValueListPrivate<T>& _p ) : QShared() {
- node = new Node; node->next = node->prev = node; nodes = 0;
- Iterator b( _p.node->next );
- Iterator e( _p.node );
- Iterator i( node );
- while( b != e )
- insert( i, *b++ );
- }
-
- void derefAndDelete() // ### hack to get around hp-cc brain damage
- {
- if ( deref() )
- delete this;
- }
-
-#if defined(Q_TEMPLATEDLL)
- // Workaround MS bug in memory de/allocation in DLL vs. EXE
- virtual
-#endif
- ~QValueListPrivate() {
- NodePtr p = node->next;
- while( p != node ) {
- NodePtr x = p->next;
- delete p;
- p = x;
- }
- delete node;
- }
-
- Iterator insert( Iterator it, const T& x ) {
- NodePtr p = new Node( x );
- p->next = it.node;
- p->prev = it.node->prev;
- it.node->prev->next = p;
- it.node->prev = p;
- nodes++;
- return p;
- }
-
- Iterator remove( Iterator it ) {
- ASSERT ( it.node != node );
- NodePtr next = it.node->next;
- NodePtr prev = it.node->prev;
- prev->next = next;
- next->prev = prev;
- delete it.node;
- nodes--;
- return Iterator( next );
- }
-
- NodePtr find( NodePtr start, const T& x ) const {
- ConstIterator first( start );
- ConstIterator last( node );
- while( first != last) {
- if ( *first == x )
- return first.node;
- ++first;
- }
- return last.node;
- }
-
- int findIndex( NodePtr start, const T& x ) const {
- ConstIterator first( start );
- ConstIterator last( node );
- int pos = 0;
- while( first != last) {
- if ( *first == x )
- return pos;
- ++first;
- ++pos;
- }
- return -1;
- }
-
- uint contains( const T& x ) const {
- uint result = 0;
- Iterator first = Iterator( node->next );
- Iterator last = Iterator( node );
- while( first != last) {
- if ( *first == x )
- ++result;
- ++first;
- }
- return result;
- }
-
- void remove( const T& x ) {
- Iterator first = Iterator( node->next );
- Iterator last = Iterator( node );
- while( first != last) {
- if ( *first == x )
- first = remove( first );
- else
- ++first;
- }
- }
-
- NodePtr at( uint i ) const {
- ASSERT( i <= nodes );
- NodePtr p = node->next;
- for( uint x = 0; x < i; ++x )
- p = p->next;
- return p;
- }
-
- void clear() {
- nodes = 0;
- NodePtr p = node->next;
- while( p != node ) {
- NodePtr next = p->next;
- delete p;
- p = next;
- }
- node->next = node->prev = node;
- }
-
- NodePtr node;
- uint nodes;
-};
-
-template <class T>
-class Q_EXPORT QValueList
-{
-public:
- /**
- * Typedefs
- */
- typedef QValueListIterator<T> Iterator;
- typedef QValueListConstIterator<T> ConstIterator;
- typedef T ValueType;
-
- /**
- * API
- */
- QValueList() { sh = new QValueListPrivate<T>; }
- QValueList( const QValueList<T>& l ) { sh = l.sh; sh->ref(); }
- ~QValueList() { sh->derefAndDelete(); }
-
- QValueList<T>& operator= ( const QValueList<T>& l )
- {
- l.sh->ref();
- sh->derefAndDelete();
- sh = l.sh;
- return *this;
- }
-
- QValueList<T> operator+ ( const QValueList<T>& l ) const
- {
- QValueList<T> l2( *this );
- for( ConstIterator it = l.begin(); it != l.end(); ++it )
- l2.append( *it );
- return l2;
- }
-
- QValueList<T>& operator+= ( const QValueList<T>& l )
- {
- for( ConstIterator it = l.begin(); it != l.end(); ++it )
- append( *it );
- return *this;
- }
-
- bool operator== ( const QValueList<T>& l ) const
- {
- if ( count() != l.count() )
- return FALSE;
- ConstIterator it2 = begin();
- ConstIterator it = l.begin();
- for( ; it != l.end(); ++it, ++it2 )
- if ( !( *it == *it2 ) )
- return FALSE;
- return TRUE;
- }
-
- bool operator!= ( const QValueList<T>& l ) const { return !( *this == l ); }
-
- Iterator begin() { detach(); return Iterator( sh->node->next ); }
- ConstIterator begin() const { return ConstIterator( sh->node->next ); }
- Iterator end() { detach(); return Iterator( sh->node ); }
- ConstIterator end() const { return ConstIterator( sh->node ); }
- Iterator fromLast() { detach(); return Iterator( sh->node->prev ); }
- ConstIterator fromLast() const { return ConstIterator( sh->node->prev ); }
-
- bool isEmpty() const { return ( sh->nodes == 0 ); }
-
- Iterator insert( Iterator it, const T& x ) { detach(); return sh->insert( it, x ); }
-
- Iterator append( const T& x ) { detach(); return sh->insert( end(), x ); }
- Iterator prepend( const T& x ) { detach(); return sh->insert( begin(), x ); }
-
- Iterator remove( Iterator it ) { detach(); return sh->remove( it ); }
- void remove( const T& x ) { detach(); sh->remove( x ); }
-
- T& first() { detach(); return sh->node->next->data; }
- const T& first() const { return sh->node->next->data; }
- T& last() { detach(); return sh->node->prev->data; }
- const T& last() const { return sh->node->prev->data; }
-
- T& operator[] ( uint i ) { detach(); return sh->at(i)->data; }
- const T& operator[] ( uint i ) const { return sh->at(i)->data; }
- Iterator at( uint i ) { detach(); return Iterator( sh->at(i) ); }
- ConstIterator at( uint i ) const { return ConstIterator( sh->at(i) ); }
- Iterator find ( const T& x ) { detach(); return Iterator( sh->find( sh->node->next, x) ); }
- ConstIterator find ( const T& x ) const { return ConstIterator( sh->find( sh->node->next, x) ); }
- Iterator find ( Iterator it, const T& x ) { detach(); return Iterator( sh->find( it.node, x ) ); }
- ConstIterator find ( ConstIterator it, const T& x ) const { return ConstIterator( sh->find( it.node, x ) ); }
- int findIndex( const T& x ) const { return sh->findIndex( sh->node->next, x) ; }
- uint contains( const T& x ) const { return sh->contains( x ); }
-
- uint count() const { return sh->nodes; }
-
- void clear() { if ( sh->count == 1 ) sh->clear(); else { sh->deref(); sh = new QValueListPrivate<T>; } }
-
-
- QValueList<T>& operator+= ( const T& x )
- {
- append( x );
- return *this;
- }
- QValueList<T>& operator<< ( const T& x )
- {
- append( x );
- return *this;
- }
-
-
-protected:
- /**
- * Helpers
- */
- void detach() { if ( sh->count > 1 ) { sh->deref(); sh = new QValueListPrivate<T>( *sh ); } }
-
- /**
- * Variables
- */
- QValueListPrivate<T>* sh;
-};
-
-#ifndef QT_NO_DATASTREAM
-template<class T>
-inline QDataStream& operator>>( QDataStream& s, QValueList<T>& l )
-{
- l.clear();
- Q_UINT32 c;
- s >> c;
- for( Q_UINT32 i = 0; i < c; ++i )
- {
- T t;
- s >> t;
- l.append( t );
- }
- return s;
-}
-
-template<class T>
-inline QDataStream& operator<<( QDataStream& s, const QValueList<T>& l )
-{
- s << (Q_UINT32)l.count();
- QValueListConstIterator<T> it = l.begin();
- for( ; it != l.end(); ++it )
- s << *it;
- return s;
-}
-#endif // QT_NO_DATASTREAM
-#endif // QVALUELIST_H
diff --git a/qtools/qvaluestack_p.h b/qtools/qvaluestack_p.h
deleted file mode 100644
index 5e10acb..0000000
--- a/qtools/qvaluestack_p.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/****************************************************************************
-**
-**
-** Definition of QValueStack class
-**
-** Created : 990925
-**
-** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
-**
-** This file is part of the tools module of the Qt GUI Toolkit.
-**
-** This file may be distributed under the terms of the Q Public License
-** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#ifndef QVALUESTACK_H
-#define QVALUESTACK_H
-
-#ifndef QT_H
-#include "qvaluelist_p.h"
-#endif // QT_H
-
-
-template<class T>
-class Q_EXPORT QValueStack : public QValueList<T>
-{
-public:
- QValueStack() {}
- ~QValueStack() {}
- void push( const T& d ) { QValueList<T>::append(d); }
- T pop()
- {
- T elem( this->last() );
- if ( !this->isEmpty() )
- this->remove( this->fromLast() );
- return elem;
- }
- T& top() { return this->last(); }
- const T& top() const { return this->last(); }
-};
-
-#endif
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 7b421f6..1840648 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,7 +1,7 @@
# vim:ts=4:sw=4:expandtab:autoindent:
include_directories(
- ${PROJECT_SOURCE_DIR}/qtools
+ ${PROJECT_SOURCE_DIR}/filesystem
${PROJECT_SOURCE_DIR}/libmd5
${PROJECT_SOURCE_DIR}/liblodepng
${PROJECT_SOURCE_DIR}/libmscgen
@@ -166,7 +166,6 @@ add_library(doxycfg STATIC
${GENERATED_SRC}/settings.h
portable.cpp
portable_c.c
- ftextstream.cpp
message.cpp
debug.cpp
)
@@ -225,6 +224,7 @@ add_library(doxymain STATIC
classdef.cpp
classlist.cpp
cmdmapper.cpp
+ conceptdef.cpp
condparser.cpp
context.cpp
cppvalue.cpp
@@ -232,6 +232,7 @@ add_library(doxymain STATIC
definition.cpp
dia.cpp
diagram.cpp
+ dir.cpp
dirdef.cpp
docbookgen.cpp
docbookvisitor.cpp
@@ -256,6 +257,7 @@ add_library(doxymain STATIC
emoji.cpp
entry.cpp
filedef.cpp
+ fileinfo.cpp
fileparser.cpp
formula.cpp
ftvhelp.cpp
@@ -284,6 +286,7 @@ add_library(doxymain STATIC
pagedef.cpp
perlmodgen.cpp
plantuml.cpp
+ qcstring.cpp
qhp.cpp
qhpxmlwriter.cpp
reflist.cpp
@@ -300,6 +303,7 @@ add_library(doxymain STATIC
template.cpp
textdocvisitor.cpp
tooltip.cpp
+ utf8.cpp
util.cpp
vhdldocgen.cpp
vhdljjparser.cpp
@@ -349,7 +353,6 @@ endif()
target_link_libraries(doxygen PRIVATE
doxymain
doxycfg
- qtools
md5
lodepng
mscgen
@@ -369,7 +372,6 @@ set_project_warnings(doxycfg)
set_project_warnings(doxymain)
set_project_warnings(doxygen)
-set_project_coverage(qtools)
set_project_coverage(doxycfg)
set_project_coverage(doxymain)
set_project_coverage(doxygen)
diff --git a/src/arguments.h b/src/arguments.h
index 181a8d3..56dd7af 100644
--- a/src/arguments.h
+++ b/src/arguments.h
@@ -17,7 +17,7 @@
#define ARGUMENTS_H
#include <vector>
-#include <qcstring.h>
+#include "qcstring.h"
/*! \brief This class contains the information about the argument of a
* function or template
diff --git a/src/bufstr.h b/src/bufstr.h
index fcdce6b..323f4bc 100644
--- a/src/bufstr.h
+++ b/src/bufstr.h
@@ -19,7 +19,7 @@
#define _BUFSTR_H
#include <cstdlib>
-#include <qcstring.h>
+#include "qcstring.h"
/*! @brief Buffer used to store strings
*
diff --git a/src/caseconvert.h b/src/caseconvert.h
new file mode 100644
index 0000000..be0cafc
--- /dev/null
+++ b/src/caseconvert.h
@@ -0,0 +1,2906 @@
+/** This file is generated by python3 caseconvert.py. DO NOT EDIT! */
+
+#ifndef CASECONVERT_H
+#define CASECONVERT_H
+
+#include <cstdint>
+#include <string>
+
+#define BSEQ(...) { static unsigned char s[] = { __VA_ARGS__, 0x00 }; \
+ return reinterpret_cast<const char *>(s); }
+
+inline const char *convertUnicodeToUpper(uint32_t code)
+{
+ switch(code)
+ {
+ case 0x61 /* a */: BSEQ(0x41) /* A */;
+ case 0x62 /* b */: BSEQ(0x42) /* B */;
+ case 0x63 /* c */: BSEQ(0x43) /* C */;
+ case 0x64 /* d */: BSEQ(0x44) /* D */;
+ case 0x65 /* e */: BSEQ(0x45) /* E */;
+ case 0x66 /* f */: BSEQ(0x46) /* F */;
+ case 0x67 /* g */: BSEQ(0x47) /* G */;
+ case 0x68 /* h */: BSEQ(0x48) /* H */;
+ case 0x69 /* i */: BSEQ(0x49) /* I */;
+ case 0x6a /* j */: BSEQ(0x4a) /* J */;
+ case 0x6b /* k */: BSEQ(0x4b) /* K */;
+ case 0x6c /* l */: BSEQ(0x4c) /* L */;
+ case 0x6d /* m */: BSEQ(0x4d) /* M */;
+ case 0x6e /* n */: BSEQ(0x4e) /* N */;
+ case 0x6f /* o */: BSEQ(0x4f) /* O */;
+ case 0x70 /* p */: BSEQ(0x50) /* P */;
+ case 0x71 /* q */: BSEQ(0x51) /* Q */;
+ case 0x72 /* r */: BSEQ(0x52) /* R */;
+ case 0x73 /* s */: BSEQ(0x53) /* S */;
+ case 0x74 /* t */: BSEQ(0x54) /* T */;
+ case 0x75 /* u */: BSEQ(0x55) /* U */;
+ case 0x76 /* v */: BSEQ(0x56) /* V */;
+ case 0x77 /* w */: BSEQ(0x57) /* W */;
+ case 0x78 /* x */: BSEQ(0x58) /* X */;
+ case 0x79 /* y */: BSEQ(0x59) /* Y */;
+ case 0x7a /* z */: BSEQ(0x5a) /* Z */;
+ case 0xb5 /* µ */: BSEQ(0xce,0x9c) /* Μ */;
+ case 0xdf /* ß */: BSEQ(0x53,0x53) /* SS */;
+ case 0xe0 /* à */: BSEQ(0xc3,0x80) /* À */;
+ case 0xe1 /* á */: BSEQ(0xc3,0x81) /* Á */;
+ case 0xe2 /* â */: BSEQ(0xc3,0x82) /* Â */;
+ case 0xe3 /* ã */: BSEQ(0xc3,0x83) /* Ã */;
+ case 0xe4 /* ä */: BSEQ(0xc3,0x84) /* Ä */;
+ case 0xe5 /* å */: BSEQ(0xc3,0x85) /* Å */;
+ case 0xe6 /* æ */: BSEQ(0xc3,0x86) /* Æ */;
+ case 0xe7 /* ç */: BSEQ(0xc3,0x87) /* Ç */;
+ case 0xe8 /* è */: BSEQ(0xc3,0x88) /* È */;
+ case 0xe9 /* é */: BSEQ(0xc3,0x89) /* É */;
+ case 0xea /* ê */: BSEQ(0xc3,0x8a) /* Ê */;
+ case 0xeb /* ë */: BSEQ(0xc3,0x8b) /* Ë */;
+ case 0xec /* ì */: BSEQ(0xc3,0x8c) /* Ì */;
+ case 0xed /* í */: BSEQ(0xc3,0x8d) /* Í */;
+ case 0xee /* î */: BSEQ(0xc3,0x8e) /* Î */;
+ case 0xef /* ï */: BSEQ(0xc3,0x8f) /* Ï */;
+ case 0xf0 /* ð */: BSEQ(0xc3,0x90) /* Ð */;
+ case 0xf1 /* ñ */: BSEQ(0xc3,0x91) /* Ñ */;
+ case 0xf2 /* ò */: BSEQ(0xc3,0x92) /* Ò */;
+ case 0xf3 /* ó */: BSEQ(0xc3,0x93) /* Ó */;
+ case 0xf4 /* ô */: BSEQ(0xc3,0x94) /* Ô */;
+ case 0xf5 /* õ */: BSEQ(0xc3,0x95) /* Õ */;
+ case 0xf6 /* ö */: BSEQ(0xc3,0x96) /* Ö */;
+ case 0xf8 /* ø */: BSEQ(0xc3,0x98) /* Ø */;
+ case 0xf9 /* ù */: BSEQ(0xc3,0x99) /* Ù */;
+ case 0xfa /* ú */: BSEQ(0xc3,0x9a) /* Ú */;
+ case 0xfb /* û */: BSEQ(0xc3,0x9b) /* Û */;
+ case 0xfc /* ü */: BSEQ(0xc3,0x9c) /* Ü */;
+ case 0xfd /* ý */: BSEQ(0xc3,0x9d) /* Ý */;
+ case 0xfe /* þ */: BSEQ(0xc3,0x9e) /* Þ */;
+ case 0xff /* ÿ */: BSEQ(0xc5,0xb8) /* Ÿ */;
+ case 0x101 /* ā */: BSEQ(0xc4,0x80) /* Ā */;
+ case 0x103 /* ă */: BSEQ(0xc4,0x82) /* Ă */;
+ case 0x105 /* ą */: BSEQ(0xc4,0x84) /* Ą */;
+ case 0x107 /* ć */: BSEQ(0xc4,0x86) /* Ć */;
+ case 0x109 /* ĉ */: BSEQ(0xc4,0x88) /* Ĉ */;
+ case 0x10b /* ċ */: BSEQ(0xc4,0x8a) /* Ċ */;
+ case 0x10d /* č */: BSEQ(0xc4,0x8c) /* Č */;
+ case 0x10f /* ď */: BSEQ(0xc4,0x8e) /* Ď */;
+ case 0x111 /* đ */: BSEQ(0xc4,0x90) /* Đ */;
+ case 0x113 /* ē */: BSEQ(0xc4,0x92) /* Ē */;
+ case 0x115 /* ĕ */: BSEQ(0xc4,0x94) /* Ĕ */;
+ case 0x117 /* ė */: BSEQ(0xc4,0x96) /* Ė */;
+ case 0x119 /* ę */: BSEQ(0xc4,0x98) /* Ę */;
+ case 0x11b /* ě */: BSEQ(0xc4,0x9a) /* Ě */;
+ case 0x11d /* ĝ */: BSEQ(0xc4,0x9c) /* Ĝ */;
+ case 0x11f /* ğ */: BSEQ(0xc4,0x9e) /* Ğ */;
+ case 0x121 /* ġ */: BSEQ(0xc4,0xa0) /* Ġ */;
+ case 0x123 /* ģ */: BSEQ(0xc4,0xa2) /* Ģ */;
+ case 0x125 /* ĥ */: BSEQ(0xc4,0xa4) /* Ĥ */;
+ case 0x127 /* ħ */: BSEQ(0xc4,0xa6) /* Ħ */;
+ case 0x129 /* ĩ */: BSEQ(0xc4,0xa8) /* Ĩ */;
+ case 0x12b /* ī */: BSEQ(0xc4,0xaa) /* Ī */;
+ case 0x12d /* ĭ */: BSEQ(0xc4,0xac) /* Ĭ */;
+ case 0x12f /* į */: BSEQ(0xc4,0xae) /* Į */;
+ case 0x131 /* ı */: BSEQ(0x49) /* I */;
+ case 0x133 /* ij */: BSEQ(0xc4,0xb2) /* IJ */;
+ case 0x135 /* ĵ */: BSEQ(0xc4,0xb4) /* Ĵ */;
+ case 0x137 /* ķ */: BSEQ(0xc4,0xb6) /* Ķ */;
+ case 0x13a /* ĺ */: BSEQ(0xc4,0xb9) /* Ĺ */;
+ case 0x13c /* ļ */: BSEQ(0xc4,0xbb) /* Ļ */;
+ case 0x13e /* ľ */: BSEQ(0xc4,0xbd) /* Ľ */;
+ case 0x140 /* ŀ */: BSEQ(0xc4,0xbf) /* Ŀ */;
+ case 0x142 /* ł */: BSEQ(0xc5,0x81) /* Ł */;
+ case 0x144 /* ń */: BSEQ(0xc5,0x83) /* Ń */;
+ case 0x146 /* ņ */: BSEQ(0xc5,0x85) /* Ņ */;
+ case 0x148 /* ň */: BSEQ(0xc5,0x87) /* Ň */;
+ case 0x149 /* ʼn */: BSEQ(0xca,0xbc,0x4e) /* ʼN */;
+ case 0x14b /* ŋ */: BSEQ(0xc5,0x8a) /* Ŋ */;
+ case 0x14d /* ō */: BSEQ(0xc5,0x8c) /* Ō */;
+ case 0x14f /* ŏ */: BSEQ(0xc5,0x8e) /* Ŏ */;
+ case 0x151 /* ő */: BSEQ(0xc5,0x90) /* Ő */;
+ case 0x153 /* œ */: BSEQ(0xc5,0x92) /* Œ */;
+ case 0x155 /* ŕ */: BSEQ(0xc5,0x94) /* Ŕ */;
+ case 0x157 /* ŗ */: BSEQ(0xc5,0x96) /* Ŗ */;
+ case 0x159 /* ř */: BSEQ(0xc5,0x98) /* Ř */;
+ case 0x15b /* ś */: BSEQ(0xc5,0x9a) /* Ś */;
+ case 0x15d /* ŝ */: BSEQ(0xc5,0x9c) /* Ŝ */;
+ case 0x15f /* ş */: BSEQ(0xc5,0x9e) /* Ş */;
+ case 0x161 /* š */: BSEQ(0xc5,0xa0) /* Š */;
+ case 0x163 /* ţ */: BSEQ(0xc5,0xa2) /* Ţ */;
+ case 0x165 /* ť */: BSEQ(0xc5,0xa4) /* Ť */;
+ case 0x167 /* ŧ */: BSEQ(0xc5,0xa6) /* Ŧ */;
+ case 0x169 /* ũ */: BSEQ(0xc5,0xa8) /* Ũ */;
+ case 0x16b /* ū */: BSEQ(0xc5,0xaa) /* Ū */;
+ case 0x16d /* ŭ */: BSEQ(0xc5,0xac) /* Ŭ */;
+ case 0x16f /* ů */: BSEQ(0xc5,0xae) /* Ů */;
+ case 0x171 /* ű */: BSEQ(0xc5,0xb0) /* Ű */;
+ case 0x173 /* ų */: BSEQ(0xc5,0xb2) /* Ų */;
+ case 0x175 /* ŵ */: BSEQ(0xc5,0xb4) /* Ŵ */;
+ case 0x177 /* ŷ */: BSEQ(0xc5,0xb6) /* Ŷ */;
+ case 0x17a /* ź */: BSEQ(0xc5,0xb9) /* Ź */;
+ case 0x17c /* ż */: BSEQ(0xc5,0xbb) /* Ż */;
+ case 0x17e /* ž */: BSEQ(0xc5,0xbd) /* Ž */;
+ case 0x17f /* ſ */: BSEQ(0x53) /* S */;
+ case 0x180 /* ƀ */: BSEQ(0xc9,0x83) /* Ƀ */;
+ case 0x183 /* ƃ */: BSEQ(0xc6,0x82) /* Ƃ */;
+ case 0x185 /* ƅ */: BSEQ(0xc6,0x84) /* Ƅ */;
+ case 0x188 /* ƈ */: BSEQ(0xc6,0x87) /* Ƈ */;
+ case 0x18c /* ƌ */: BSEQ(0xc6,0x8b) /* Ƌ */;
+ case 0x192 /* ƒ */: BSEQ(0xc6,0x91) /* Ƒ */;
+ case 0x195 /* ƕ */: BSEQ(0xc7,0xb6) /* Ƕ */;
+ case 0x199 /* ƙ */: BSEQ(0xc6,0x98) /* Ƙ */;
+ case 0x19a /* ƚ */: BSEQ(0xc8,0xbd) /* Ƚ */;
+ case 0x19e /* ƞ */: BSEQ(0xc8,0xa0) /* Ƞ */;
+ case 0x1a1 /* ơ */: BSEQ(0xc6,0xa0) /* Ơ */;
+ case 0x1a3 /* ƣ */: BSEQ(0xc6,0xa2) /* Ƣ */;
+ case 0x1a5 /* ƥ */: BSEQ(0xc6,0xa4) /* Ƥ */;
+ case 0x1a8 /* ƨ */: BSEQ(0xc6,0xa7) /* Ƨ */;
+ case 0x1ad /* ƭ */: BSEQ(0xc6,0xac) /* Ƭ */;
+ case 0x1b0 /* ư */: BSEQ(0xc6,0xaf) /* Ư */;
+ case 0x1b4 /* ƴ */: BSEQ(0xc6,0xb3) /* Ƴ */;
+ case 0x1b6 /* ƶ */: BSEQ(0xc6,0xb5) /* Ƶ */;
+ case 0x1b9 /* ƹ */: BSEQ(0xc6,0xb8) /* Ƹ */;
+ case 0x1bd /* ƽ */: BSEQ(0xc6,0xbc) /* Ƽ */;
+ case 0x1bf /* ƿ */: BSEQ(0xc7,0xb7) /* Ƿ */;
+ case 0x1c5 /* Dž */: BSEQ(0xc7,0x84) /* DŽ */;
+ case 0x1c6 /* dž */: BSEQ(0xc7,0x84) /* DŽ */;
+ case 0x1c8 /* Lj */: BSEQ(0xc7,0x87) /* LJ */;
+ case 0x1c9 /* lj */: BSEQ(0xc7,0x87) /* LJ */;
+ case 0x1cb /* Nj */: BSEQ(0xc7,0x8a) /* NJ */;
+ case 0x1cc /* nj */: BSEQ(0xc7,0x8a) /* NJ */;
+ case 0x1ce /* ǎ */: BSEQ(0xc7,0x8d) /* Ǎ */;
+ case 0x1d0 /* ǐ */: BSEQ(0xc7,0x8f) /* Ǐ */;
+ case 0x1d2 /* ǒ */: BSEQ(0xc7,0x91) /* Ǒ */;
+ case 0x1d4 /* ǔ */: BSEQ(0xc7,0x93) /* Ǔ */;
+ case 0x1d6 /* ǖ */: BSEQ(0xc7,0x95) /* Ǖ */;
+ case 0x1d8 /* ǘ */: BSEQ(0xc7,0x97) /* Ǘ */;
+ case 0x1da /* ǚ */: BSEQ(0xc7,0x99) /* Ǚ */;
+ case 0x1dc /* ǜ */: BSEQ(0xc7,0x9b) /* Ǜ */;
+ case 0x1dd /* ǝ */: BSEQ(0xc6,0x8e) /* Ǝ */;
+ case 0x1df /* ǟ */: BSEQ(0xc7,0x9e) /* Ǟ */;
+ case 0x1e1 /* ǡ */: BSEQ(0xc7,0xa0) /* Ǡ */;
+ case 0x1e3 /* ǣ */: BSEQ(0xc7,0xa2) /* Ǣ */;
+ case 0x1e5 /* ǥ */: BSEQ(0xc7,0xa4) /* Ǥ */;
+ case 0x1e7 /* ǧ */: BSEQ(0xc7,0xa6) /* Ǧ */;
+ case 0x1e9 /* ǩ */: BSEQ(0xc7,0xa8) /* Ǩ */;
+ case 0x1eb /* ǫ */: BSEQ(0xc7,0xaa) /* Ǫ */;
+ case 0x1ed /* ǭ */: BSEQ(0xc7,0xac) /* Ǭ */;
+ case 0x1ef /* ǯ */: BSEQ(0xc7,0xae) /* Ǯ */;
+ case 0x1f0 /* ǰ */: BSEQ(0x4a,0xcc,0x8c) /* J̌ */;
+ case 0x1f2 /* Dz */: BSEQ(0xc7,0xb1) /* DZ */;
+ case 0x1f3 /* dz */: BSEQ(0xc7,0xb1) /* DZ */;
+ case 0x1f5 /* ǵ */: BSEQ(0xc7,0xb4) /* Ǵ */;
+ case 0x1f9 /* ǹ */: BSEQ(0xc7,0xb8) /* Ǹ */;
+ case 0x1fb /* ǻ */: BSEQ(0xc7,0xba) /* Ǻ */;
+ case 0x1fd /* ǽ */: BSEQ(0xc7,0xbc) /* Ǽ */;
+ case 0x1ff /* ǿ */: BSEQ(0xc7,0xbe) /* Ǿ */;
+ case 0x201 /* ȁ */: BSEQ(0xc8,0x80) /* Ȁ */;
+ case 0x203 /* ȃ */: BSEQ(0xc8,0x82) /* Ȃ */;
+ case 0x205 /* ȅ */: BSEQ(0xc8,0x84) /* Ȅ */;
+ case 0x207 /* ȇ */: BSEQ(0xc8,0x86) /* Ȇ */;
+ case 0x209 /* ȉ */: BSEQ(0xc8,0x88) /* Ȉ */;
+ case 0x20b /* ȋ */: BSEQ(0xc8,0x8a) /* Ȋ */;
+ case 0x20d /* ȍ */: BSEQ(0xc8,0x8c) /* Ȍ */;
+ case 0x20f /* ȏ */: BSEQ(0xc8,0x8e) /* Ȏ */;
+ case 0x211 /* ȑ */: BSEQ(0xc8,0x90) /* Ȑ */;
+ case 0x213 /* ȓ */: BSEQ(0xc8,0x92) /* Ȓ */;
+ case 0x215 /* ȕ */: BSEQ(0xc8,0x94) /* Ȕ */;
+ case 0x217 /* ȗ */: BSEQ(0xc8,0x96) /* Ȗ */;
+ case 0x219 /* ș */: BSEQ(0xc8,0x98) /* Ș */;
+ case 0x21b /* ț */: BSEQ(0xc8,0x9a) /* Ț */;
+ case 0x21d /* ȝ */: BSEQ(0xc8,0x9c) /* Ȝ */;
+ case 0x21f /* ȟ */: BSEQ(0xc8,0x9e) /* Ȟ */;
+ case 0x223 /* ȣ */: BSEQ(0xc8,0xa2) /* Ȣ */;
+ case 0x225 /* ȥ */: BSEQ(0xc8,0xa4) /* Ȥ */;
+ case 0x227 /* ȧ */: BSEQ(0xc8,0xa6) /* Ȧ */;
+ case 0x229 /* ȩ */: BSEQ(0xc8,0xa8) /* Ȩ */;
+ case 0x22b /* ȫ */: BSEQ(0xc8,0xaa) /* Ȫ */;
+ case 0x22d /* ȭ */: BSEQ(0xc8,0xac) /* Ȭ */;
+ case 0x22f /* ȯ */: BSEQ(0xc8,0xae) /* Ȯ */;
+ case 0x231 /* ȱ */: BSEQ(0xc8,0xb0) /* Ȱ */;
+ case 0x233 /* ȳ */: BSEQ(0xc8,0xb2) /* Ȳ */;
+ case 0x23c /* ȼ */: BSEQ(0xc8,0xbb) /* Ȼ */;
+ case 0x23f /* ȿ */: BSEQ(0xe2,0xb1,0xbe) /* Ȿ */;
+ case 0x240 /* ɀ */: BSEQ(0xe2,0xb1,0xbf) /* Ɀ */;
+ case 0x242 /* ɂ */: BSEQ(0xc9,0x81) /* Ɂ */;
+ case 0x247 /* ɇ */: BSEQ(0xc9,0x86) /* Ɇ */;
+ case 0x249 /* ɉ */: BSEQ(0xc9,0x88) /* Ɉ */;
+ case 0x24b /* ɋ */: BSEQ(0xc9,0x8a) /* Ɋ */;
+ case 0x24d /* ɍ */: BSEQ(0xc9,0x8c) /* Ɍ */;
+ case 0x24f /* ɏ */: BSEQ(0xc9,0x8e) /* Ɏ */;
+ case 0x250 /* ɐ */: BSEQ(0xe2,0xb1,0xaf) /* Ɐ */;
+ case 0x251 /* ɑ */: BSEQ(0xe2,0xb1,0xad) /* Ɑ */;
+ case 0x252 /* ɒ */: BSEQ(0xe2,0xb1,0xb0) /* Ɒ */;
+ case 0x253 /* ɓ */: BSEQ(0xc6,0x81) /* Ɓ */;
+ case 0x254 /* ɔ */: BSEQ(0xc6,0x86) /* Ɔ */;
+ case 0x256 /* ɖ */: BSEQ(0xc6,0x89) /* Ɖ */;
+ case 0x257 /* ɗ */: BSEQ(0xc6,0x8a) /* Ɗ */;
+ case 0x259 /* ə */: BSEQ(0xc6,0x8f) /* Ə */;
+ case 0x25b /* ɛ */: BSEQ(0xc6,0x90) /* Ɛ */;
+ case 0x25c /* ɜ */: BSEQ(0xea,0x9e,0xab) /* Ɜ */;
+ case 0x260 /* ɠ */: BSEQ(0xc6,0x93) /* Ɠ */;
+ case 0x261 /* ɡ */: BSEQ(0xea,0x9e,0xac) /* Ɡ */;
+ case 0x263 /* ɣ */: BSEQ(0xc6,0x94) /* Ɣ */;
+ case 0x265 /* ɥ */: BSEQ(0xea,0x9e,0x8d) /* Ɥ */;
+ case 0x266 /* ɦ */: BSEQ(0xea,0x9e,0xaa) /* Ɦ */;
+ case 0x268 /* ɨ */: BSEQ(0xc6,0x97) /* Ɨ */;
+ case 0x269 /* ɩ */: BSEQ(0xc6,0x96) /* Ɩ */;
+ case 0x26a /* ɪ */: BSEQ(0xea,0x9e,0xae) /* Ɪ */;
+ case 0x26b /* ɫ */: BSEQ(0xe2,0xb1,0xa2) /* Ɫ */;
+ case 0x26c /* ɬ */: BSEQ(0xea,0x9e,0xad) /* Ɬ */;
+ case 0x26f /* ɯ */: BSEQ(0xc6,0x9c) /* Ɯ */;
+ case 0x271 /* ɱ */: BSEQ(0xe2,0xb1,0xae) /* Ɱ */;
+ case 0x272 /* ɲ */: BSEQ(0xc6,0x9d) /* Ɲ */;
+ case 0x275 /* ɵ */: BSEQ(0xc6,0x9f) /* Ɵ */;
+ case 0x27d /* ɽ */: BSEQ(0xe2,0xb1,0xa4) /* Ɽ */;
+ case 0x280 /* ʀ */: BSEQ(0xc6,0xa6) /* Ʀ */;
+ case 0x282 /* ʂ */: BSEQ(0xea,0x9f,0x85) /* Ʂ */;
+ case 0x283 /* ʃ */: BSEQ(0xc6,0xa9) /* Ʃ */;
+ case 0x287 /* ʇ */: BSEQ(0xea,0x9e,0xb1) /* Ʇ */;
+ case 0x288 /* ʈ */: BSEQ(0xc6,0xae) /* Ʈ */;
+ case 0x289 /* ʉ */: BSEQ(0xc9,0x84) /* Ʉ */;
+ case 0x28a /* ʊ */: BSEQ(0xc6,0xb1) /* Ʊ */;
+ case 0x28b /* ʋ */: BSEQ(0xc6,0xb2) /* Ʋ */;
+ case 0x28c /* ʌ */: BSEQ(0xc9,0x85) /* Ʌ */;
+ case 0x292 /* ʒ */: BSEQ(0xc6,0xb7) /* Ʒ */;
+ case 0x29d /* ʝ */: BSEQ(0xea,0x9e,0xb2) /* Ʝ */;
+ case 0x29e /* ʞ */: BSEQ(0xea,0x9e,0xb0) /* Ʞ */;
+ case 0x345 /* ͅ */: BSEQ(0xce,0x99) /* Ι */;
+ case 0x371 /* ͱ */: BSEQ(0xcd,0xb0) /* Ͱ */;
+ case 0x373 /* ͳ */: BSEQ(0xcd,0xb2) /* Ͳ */;
+ case 0x377 /* ͷ */: BSEQ(0xcd,0xb6) /* Ͷ */;
+ case 0x37b /* ͻ */: BSEQ(0xcf,0xbd) /* Ͻ */;
+ case 0x37c /* ͼ */: BSEQ(0xcf,0xbe) /* Ͼ */;
+ case 0x37d /* ͽ */: BSEQ(0xcf,0xbf) /* Ͽ */;
+ case 0x390 /* ΐ */: BSEQ(0xce,0x99,0xcc,0x88,0xcc,0x81) /* Ϊ́ */;
+ case 0x3ac /* ά */: BSEQ(0xce,0x86) /* Ά */;
+ case 0x3ad /* έ */: BSEQ(0xce,0x88) /* Έ */;
+ case 0x3ae /* ή */: BSEQ(0xce,0x89) /* Ή */;
+ case 0x3af /* ί */: BSEQ(0xce,0x8a) /* Ί */;
+ case 0x3b0 /* ΰ */: BSEQ(0xce,0xa5,0xcc,0x88,0xcc,0x81) /* Ϋ́ */;
+ case 0x3b1 /* α */: BSEQ(0xce,0x91) /* Α */;
+ case 0x3b2 /* β */: BSEQ(0xce,0x92) /* Β */;
+ case 0x3b3 /* γ */: BSEQ(0xce,0x93) /* Γ */;
+ case 0x3b4 /* δ */: BSEQ(0xce,0x94) /* Δ */;
+ case 0x3b5 /* ε */: BSEQ(0xce,0x95) /* Ε */;
+ case 0x3b6 /* ζ */: BSEQ(0xce,0x96) /* Ζ */;
+ case 0x3b7 /* η */: BSEQ(0xce,0x97) /* Η */;
+ case 0x3b8 /* θ */: BSEQ(0xce,0x98) /* Θ */;
+ case 0x3b9 /* ι */: BSEQ(0xce,0x99) /* Ι */;
+ case 0x3ba /* κ */: BSEQ(0xce,0x9a) /* Κ */;
+ case 0x3bb /* λ */: BSEQ(0xce,0x9b) /* Λ */;
+ case 0x3bc /* μ */: BSEQ(0xce,0x9c) /* Μ */;
+ case 0x3bd /* ν */: BSEQ(0xce,0x9d) /* Ν */;
+ case 0x3be /* ξ */: BSEQ(0xce,0x9e) /* Ξ */;
+ case 0x3bf /* ο */: BSEQ(0xce,0x9f) /* Ο */;
+ case 0x3c0 /* π */: BSEQ(0xce,0xa0) /* Π */;
+ case 0x3c1 /* ρ */: BSEQ(0xce,0xa1) /* Ρ */;
+ case 0x3c2 /* ς */: BSEQ(0xce,0xa3) /* Σ */;
+ case 0x3c3 /* σ */: BSEQ(0xce,0xa3) /* Σ */;
+ case 0x3c4 /* τ */: BSEQ(0xce,0xa4) /* Τ */;
+ case 0x3c5 /* υ */: BSEQ(0xce,0xa5) /* Υ */;
+ case 0x3c6 /* φ */: BSEQ(0xce,0xa6) /* Φ */;
+ case 0x3c7 /* χ */: BSEQ(0xce,0xa7) /* Χ */;
+ case 0x3c8 /* ψ */: BSEQ(0xce,0xa8) /* Ψ */;
+ case 0x3c9 /* ω */: BSEQ(0xce,0xa9) /* Ω */;
+ case 0x3ca /* ϊ */: BSEQ(0xce,0xaa) /* Ϊ */;
+ case 0x3cb /* ϋ */: BSEQ(0xce,0xab) /* Ϋ */;
+ case 0x3cc /* ό */: BSEQ(0xce,0x8c) /* Ό */;
+ case 0x3cd /* ύ */: BSEQ(0xce,0x8e) /* Ύ */;
+ case 0x3ce /* ώ */: BSEQ(0xce,0x8f) /* Ώ */;
+ case 0x3d0 /* ϐ */: BSEQ(0xce,0x92) /* Β */;
+ case 0x3d1 /* ϑ */: BSEQ(0xce,0x98) /* Θ */;
+ case 0x3d5 /* ϕ */: BSEQ(0xce,0xa6) /* Φ */;
+ case 0x3d6 /* ϖ */: BSEQ(0xce,0xa0) /* Π */;
+ case 0x3d7 /* ϗ */: BSEQ(0xcf,0x8f) /* Ϗ */;
+ case 0x3d9 /* ϙ */: BSEQ(0xcf,0x98) /* Ϙ */;
+ case 0x3db /* ϛ */: BSEQ(0xcf,0x9a) /* Ϛ */;
+ case 0x3dd /* ϝ */: BSEQ(0xcf,0x9c) /* Ϝ */;
+ case 0x3df /* ϟ */: BSEQ(0xcf,0x9e) /* Ϟ */;
+ case 0x3e1 /* ϡ */: BSEQ(0xcf,0xa0) /* Ϡ */;
+ case 0x3e3 /* ϣ */: BSEQ(0xcf,0xa2) /* Ϣ */;
+ case 0x3e5 /* ϥ */: BSEQ(0xcf,0xa4) /* Ϥ */;
+ case 0x3e7 /* ϧ */: BSEQ(0xcf,0xa6) /* Ϧ */;
+ case 0x3e9 /* ϩ */: BSEQ(0xcf,0xa8) /* Ϩ */;
+ case 0x3eb /* ϫ */: BSEQ(0xcf,0xaa) /* Ϫ */;
+ case 0x3ed /* ϭ */: BSEQ(0xcf,0xac) /* Ϭ */;
+ case 0x3ef /* ϯ */: BSEQ(0xcf,0xae) /* Ϯ */;
+ case 0x3f0 /* ϰ */: BSEQ(0xce,0x9a) /* Κ */;
+ case 0x3f1 /* ϱ */: BSEQ(0xce,0xa1) /* Ρ */;
+ case 0x3f2 /* ϲ */: BSEQ(0xcf,0xb9) /* Ϲ */;
+ case 0x3f3 /* ϳ */: BSEQ(0xcd,0xbf) /* Ϳ */;
+ case 0x3f5 /* ϵ */: BSEQ(0xce,0x95) /* Ε */;
+ case 0x3f8 /* ϸ */: BSEQ(0xcf,0xb7) /* Ϸ */;
+ case 0x3fb /* ϻ */: BSEQ(0xcf,0xba) /* Ϻ */;
+ case 0x430 /* а */: BSEQ(0xd0,0x90) /* А */;
+ case 0x431 /* б */: BSEQ(0xd0,0x91) /* Б */;
+ case 0x432 /* в */: BSEQ(0xd0,0x92) /* В */;
+ case 0x433 /* г */: BSEQ(0xd0,0x93) /* Г */;
+ case 0x434 /* д */: BSEQ(0xd0,0x94) /* Д */;
+ case 0x435 /* е */: BSEQ(0xd0,0x95) /* Е */;
+ case 0x436 /* ж */: BSEQ(0xd0,0x96) /* Ж */;
+ case 0x437 /* з */: BSEQ(0xd0,0x97) /* З */;
+ case 0x438 /* и */: BSEQ(0xd0,0x98) /* И */;
+ case 0x439 /* й */: BSEQ(0xd0,0x99) /* Й */;
+ case 0x43a /* к */: BSEQ(0xd0,0x9a) /* К */;
+ case 0x43b /* л */: BSEQ(0xd0,0x9b) /* Л */;
+ case 0x43c /* м */: BSEQ(0xd0,0x9c) /* М */;
+ case 0x43d /* н */: BSEQ(0xd0,0x9d) /* Н */;
+ case 0x43e /* о */: BSEQ(0xd0,0x9e) /* О */;
+ case 0x43f /* п */: BSEQ(0xd0,0x9f) /* П */;
+ case 0x440 /* р */: BSEQ(0xd0,0xa0) /* Р */;
+ case 0x441 /* с */: BSEQ(0xd0,0xa1) /* С */;
+ case 0x442 /* т */: BSEQ(0xd0,0xa2) /* Т */;
+ case 0x443 /* у */: BSEQ(0xd0,0xa3) /* У */;
+ case 0x444 /* ф */: BSEQ(0xd0,0xa4) /* Ф */;
+ case 0x445 /* х */: BSEQ(0xd0,0xa5) /* Х */;
+ case 0x446 /* ц */: BSEQ(0xd0,0xa6) /* Ц */;
+ case 0x447 /* ч */: BSEQ(0xd0,0xa7) /* Ч */;
+ case 0x448 /* ш */: BSEQ(0xd0,0xa8) /* Ш */;
+ case 0x449 /* щ */: BSEQ(0xd0,0xa9) /* Щ */;
+ case 0x44a /* ъ */: BSEQ(0xd0,0xaa) /* Ъ */;
+ case 0x44b /* ы */: BSEQ(0xd0,0xab) /* Ы */;
+ case 0x44c /* ь */: BSEQ(0xd0,0xac) /* Ь */;
+ case 0x44d /* э */: BSEQ(0xd0,0xad) /* Э */;
+ case 0x44e /* ю */: BSEQ(0xd0,0xae) /* Ю */;
+ case 0x44f /* я */: BSEQ(0xd0,0xaf) /* Я */;
+ case 0x450 /* ѐ */: BSEQ(0xd0,0x80) /* Ѐ */;
+ case 0x451 /* ё */: BSEQ(0xd0,0x81) /* Ё */;
+ case 0x452 /* ђ */: BSEQ(0xd0,0x82) /* Ђ */;
+ case 0x453 /* ѓ */: BSEQ(0xd0,0x83) /* Ѓ */;
+ case 0x454 /* є */: BSEQ(0xd0,0x84) /* Є */;
+ case 0x455 /* ѕ */: BSEQ(0xd0,0x85) /* Ѕ */;
+ case 0x456 /* і */: BSEQ(0xd0,0x86) /* І */;
+ case 0x457 /* ї */: BSEQ(0xd0,0x87) /* Ї */;
+ case 0x458 /* ј */: BSEQ(0xd0,0x88) /* Ј */;
+ case 0x459 /* љ */: BSEQ(0xd0,0x89) /* Љ */;
+ case 0x45a /* њ */: BSEQ(0xd0,0x8a) /* Њ */;
+ case 0x45b /* ћ */: BSEQ(0xd0,0x8b) /* Ћ */;
+ case 0x45c /* ќ */: BSEQ(0xd0,0x8c) /* Ќ */;
+ case 0x45d /* ѝ */: BSEQ(0xd0,0x8d) /* Ѝ */;
+ case 0x45e /* ў */: BSEQ(0xd0,0x8e) /* Ў */;
+ case 0x45f /* џ */: BSEQ(0xd0,0x8f) /* Џ */;
+ case 0x461 /* ѡ */: BSEQ(0xd1,0xa0) /* Ѡ */;
+ case 0x463 /* ѣ */: BSEQ(0xd1,0xa2) /* Ѣ */;
+ case 0x465 /* ѥ */: BSEQ(0xd1,0xa4) /* Ѥ */;
+ case 0x467 /* ѧ */: BSEQ(0xd1,0xa6) /* Ѧ */;
+ case 0x469 /* ѩ */: BSEQ(0xd1,0xa8) /* Ѩ */;
+ case 0x46b /* ѫ */: BSEQ(0xd1,0xaa) /* Ѫ */;
+ case 0x46d /* ѭ */: BSEQ(0xd1,0xac) /* Ѭ */;
+ case 0x46f /* ѯ */: BSEQ(0xd1,0xae) /* Ѯ */;
+ case 0x471 /* ѱ */: BSEQ(0xd1,0xb0) /* Ѱ */;
+ case 0x473 /* ѳ */: BSEQ(0xd1,0xb2) /* Ѳ */;
+ case 0x475 /* ѵ */: BSEQ(0xd1,0xb4) /* Ѵ */;
+ case 0x477 /* ѷ */: BSEQ(0xd1,0xb6) /* Ѷ */;
+ case 0x479 /* ѹ */: BSEQ(0xd1,0xb8) /* Ѹ */;
+ case 0x47b /* ѻ */: BSEQ(0xd1,0xba) /* Ѻ */;
+ case 0x47d /* ѽ */: BSEQ(0xd1,0xbc) /* Ѽ */;
+ case 0x47f /* ѿ */: BSEQ(0xd1,0xbe) /* Ѿ */;
+ case 0x481 /* ҁ */: BSEQ(0xd2,0x80) /* Ҁ */;
+ case 0x48b /* ҋ */: BSEQ(0xd2,0x8a) /* Ҋ */;
+ case 0x48d /* ҍ */: BSEQ(0xd2,0x8c) /* Ҍ */;
+ case 0x48f /* ҏ */: BSEQ(0xd2,0x8e) /* Ҏ */;
+ case 0x491 /* ґ */: BSEQ(0xd2,0x90) /* Ґ */;
+ case 0x493 /* ғ */: BSEQ(0xd2,0x92) /* Ғ */;
+ case 0x495 /* ҕ */: BSEQ(0xd2,0x94) /* Ҕ */;
+ case 0x497 /* җ */: BSEQ(0xd2,0x96) /* Җ */;
+ case 0x499 /* ҙ */: BSEQ(0xd2,0x98) /* Ҙ */;
+ case 0x49b /* қ */: BSEQ(0xd2,0x9a) /* Қ */;
+ case 0x49d /* ҝ */: BSEQ(0xd2,0x9c) /* Ҝ */;
+ case 0x49f /* ҟ */: BSEQ(0xd2,0x9e) /* Ҟ */;
+ case 0x4a1 /* ҡ */: BSEQ(0xd2,0xa0) /* Ҡ */;
+ case 0x4a3 /* ң */: BSEQ(0xd2,0xa2) /* Ң */;
+ case 0x4a5 /* ҥ */: BSEQ(0xd2,0xa4) /* Ҥ */;
+ case 0x4a7 /* ҧ */: BSEQ(0xd2,0xa6) /* Ҧ */;
+ case 0x4a9 /* ҩ */: BSEQ(0xd2,0xa8) /* Ҩ */;
+ case 0x4ab /* ҫ */: BSEQ(0xd2,0xaa) /* Ҫ */;
+ case 0x4ad /* ҭ */: BSEQ(0xd2,0xac) /* Ҭ */;
+ case 0x4af /* ү */: BSEQ(0xd2,0xae) /* Ү */;
+ case 0x4b1 /* ұ */: BSEQ(0xd2,0xb0) /* Ұ */;
+ case 0x4b3 /* ҳ */: BSEQ(0xd2,0xb2) /* Ҳ */;
+ case 0x4b5 /* ҵ */: BSEQ(0xd2,0xb4) /* Ҵ */;
+ case 0x4b7 /* ҷ */: BSEQ(0xd2,0xb6) /* Ҷ */;
+ case 0x4b9 /* ҹ */: BSEQ(0xd2,0xb8) /* Ҹ */;
+ case 0x4bb /* һ */: BSEQ(0xd2,0xba) /* Һ */;
+ case 0x4bd /* ҽ */: BSEQ(0xd2,0xbc) /* Ҽ */;
+ case 0x4bf /* ҿ */: BSEQ(0xd2,0xbe) /* Ҿ */;
+ case 0x4c2 /* ӂ */: BSEQ(0xd3,0x81) /* Ӂ */;
+ case 0x4c4 /* ӄ */: BSEQ(0xd3,0x83) /* Ӄ */;
+ case 0x4c6 /* ӆ */: BSEQ(0xd3,0x85) /* Ӆ */;
+ case 0x4c8 /* ӈ */: BSEQ(0xd3,0x87) /* Ӈ */;
+ case 0x4ca /* ӊ */: BSEQ(0xd3,0x89) /* Ӊ */;
+ case 0x4cc /* ӌ */: BSEQ(0xd3,0x8b) /* Ӌ */;
+ case 0x4ce /* ӎ */: BSEQ(0xd3,0x8d) /* Ӎ */;
+ case 0x4cf /* ӏ */: BSEQ(0xd3,0x80) /* Ӏ */;
+ case 0x4d1 /* ӑ */: BSEQ(0xd3,0x90) /* Ӑ */;
+ case 0x4d3 /* ӓ */: BSEQ(0xd3,0x92) /* Ӓ */;
+ case 0x4d5 /* ӕ */: BSEQ(0xd3,0x94) /* Ӕ */;
+ case 0x4d7 /* ӗ */: BSEQ(0xd3,0x96) /* Ӗ */;
+ case 0x4d9 /* ә */: BSEQ(0xd3,0x98) /* Ә */;
+ case 0x4db /* ӛ */: BSEQ(0xd3,0x9a) /* Ӛ */;
+ case 0x4dd /* ӝ */: BSEQ(0xd3,0x9c) /* Ӝ */;
+ case 0x4df /* ӟ */: BSEQ(0xd3,0x9e) /* Ӟ */;
+ case 0x4e1 /* ӡ */: BSEQ(0xd3,0xa0) /* Ӡ */;
+ case 0x4e3 /* ӣ */: BSEQ(0xd3,0xa2) /* Ӣ */;
+ case 0x4e5 /* ӥ */: BSEQ(0xd3,0xa4) /* Ӥ */;
+ case 0x4e7 /* ӧ */: BSEQ(0xd3,0xa6) /* Ӧ */;
+ case 0x4e9 /* ө */: BSEQ(0xd3,0xa8) /* Ө */;
+ case 0x4eb /* ӫ */: BSEQ(0xd3,0xaa) /* Ӫ */;
+ case 0x4ed /* ӭ */: BSEQ(0xd3,0xac) /* Ӭ */;
+ case 0x4ef /* ӯ */: BSEQ(0xd3,0xae) /* Ӯ */;
+ case 0x4f1 /* ӱ */: BSEQ(0xd3,0xb0) /* Ӱ */;
+ case 0x4f3 /* ӳ */: BSEQ(0xd3,0xb2) /* Ӳ */;
+ case 0x4f5 /* ӵ */: BSEQ(0xd3,0xb4) /* Ӵ */;
+ case 0x4f7 /* ӷ */: BSEQ(0xd3,0xb6) /* Ӷ */;
+ case 0x4f9 /* ӹ */: BSEQ(0xd3,0xb8) /* Ӹ */;
+ case 0x4fb /* ӻ */: BSEQ(0xd3,0xba) /* Ӻ */;
+ case 0x4fd /* ӽ */: BSEQ(0xd3,0xbc) /* Ӽ */;
+ case 0x4ff /* ӿ */: BSEQ(0xd3,0xbe) /* Ӿ */;
+ case 0x501 /* ԁ */: BSEQ(0xd4,0x80) /* Ԁ */;
+ case 0x503 /* ԃ */: BSEQ(0xd4,0x82) /* Ԃ */;
+ case 0x505 /* ԅ */: BSEQ(0xd4,0x84) /* Ԅ */;
+ case 0x507 /* ԇ */: BSEQ(0xd4,0x86) /* Ԇ */;
+ case 0x509 /* ԉ */: BSEQ(0xd4,0x88) /* Ԉ */;
+ case 0x50b /* ԋ */: BSEQ(0xd4,0x8a) /* Ԋ */;
+ case 0x50d /* ԍ */: BSEQ(0xd4,0x8c) /* Ԍ */;
+ case 0x50f /* ԏ */: BSEQ(0xd4,0x8e) /* Ԏ */;
+ case 0x511 /* ԑ */: BSEQ(0xd4,0x90) /* Ԑ */;
+ case 0x513 /* ԓ */: BSEQ(0xd4,0x92) /* Ԓ */;
+ case 0x515 /* ԕ */: BSEQ(0xd4,0x94) /* Ԕ */;
+ case 0x517 /* ԗ */: BSEQ(0xd4,0x96) /* Ԗ */;
+ case 0x519 /* ԙ */: BSEQ(0xd4,0x98) /* Ԙ */;
+ case 0x51b /* ԛ */: BSEQ(0xd4,0x9a) /* Ԛ */;
+ case 0x51d /* ԝ */: BSEQ(0xd4,0x9c) /* Ԝ */;
+ case 0x51f /* ԟ */: BSEQ(0xd4,0x9e) /* Ԟ */;
+ case 0x521 /* ԡ */: BSEQ(0xd4,0xa0) /* Ԡ */;
+ case 0x523 /* ԣ */: BSEQ(0xd4,0xa2) /* Ԣ */;
+ case 0x525 /* ԥ */: BSEQ(0xd4,0xa4) /* Ԥ */;
+ case 0x527 /* ԧ */: BSEQ(0xd4,0xa6) /* Ԧ */;
+ case 0x529 /* ԩ */: BSEQ(0xd4,0xa8) /* Ԩ */;
+ case 0x52b /* ԫ */: BSEQ(0xd4,0xaa) /* Ԫ */;
+ case 0x52d /* ԭ */: BSEQ(0xd4,0xac) /* Ԭ */;
+ case 0x52f /* ԯ */: BSEQ(0xd4,0xae) /* Ԯ */;
+ case 0x561 /* ա */: BSEQ(0xd4,0xb1) /* Ա */;
+ case 0x562 /* բ */: BSEQ(0xd4,0xb2) /* Բ */;
+ case 0x563 /* գ */: BSEQ(0xd4,0xb3) /* Գ */;
+ case 0x564 /* դ */: BSEQ(0xd4,0xb4) /* Դ */;
+ case 0x565 /* ե */: BSEQ(0xd4,0xb5) /* Ե */;
+ case 0x566 /* զ */: BSEQ(0xd4,0xb6) /* Զ */;
+ case 0x567 /* է */: BSEQ(0xd4,0xb7) /* Է */;
+ case 0x568 /* ը */: BSEQ(0xd4,0xb8) /* Ը */;
+ case 0x569 /* թ */: BSEQ(0xd4,0xb9) /* Թ */;
+ case 0x56a /* ժ */: BSEQ(0xd4,0xba) /* Ժ */;
+ case 0x56b /* ի */: BSEQ(0xd4,0xbb) /* Ի */;
+ case 0x56c /* լ */: BSEQ(0xd4,0xbc) /* Լ */;
+ case 0x56d /* խ */: BSEQ(0xd4,0xbd) /* Խ */;
+ case 0x56e /* ծ */: BSEQ(0xd4,0xbe) /* Ծ */;
+ case 0x56f /* կ */: BSEQ(0xd4,0xbf) /* Կ */;
+ case 0x570 /* հ */: BSEQ(0xd5,0x80) /* Հ */;
+ case 0x571 /* ձ */: BSEQ(0xd5,0x81) /* Ձ */;
+ case 0x572 /* ղ */: BSEQ(0xd5,0x82) /* Ղ */;
+ case 0x573 /* ճ */: BSEQ(0xd5,0x83) /* Ճ */;
+ case 0x574 /* մ */: BSEQ(0xd5,0x84) /* Մ */;
+ case 0x575 /* յ */: BSEQ(0xd5,0x85) /* Յ */;
+ case 0x576 /* ն */: BSEQ(0xd5,0x86) /* Ն */;
+ case 0x577 /* շ */: BSEQ(0xd5,0x87) /* Շ */;
+ case 0x578 /* ո */: BSEQ(0xd5,0x88) /* Ո */;
+ case 0x579 /* չ */: BSEQ(0xd5,0x89) /* Չ */;
+ case 0x57a /* պ */: BSEQ(0xd5,0x8a) /* Պ */;
+ case 0x57b /* ջ */: BSEQ(0xd5,0x8b) /* Ջ */;
+ case 0x57c /* ռ */: BSEQ(0xd5,0x8c) /* Ռ */;
+ case 0x57d /* ս */: BSEQ(0xd5,0x8d) /* Ս */;
+ case 0x57e /* վ */: BSEQ(0xd5,0x8e) /* Վ */;
+ case 0x57f /* տ */: BSEQ(0xd5,0x8f) /* Տ */;
+ case 0x580 /* ր */: BSEQ(0xd5,0x90) /* Ր */;
+ case 0x581 /* ց */: BSEQ(0xd5,0x91) /* Ց */;
+ case 0x582 /* ւ */: BSEQ(0xd5,0x92) /* Ւ */;
+ case 0x583 /* փ */: BSEQ(0xd5,0x93) /* Փ */;
+ case 0x584 /* ք */: BSEQ(0xd5,0x94) /* Ք */;
+ case 0x585 /* օ */: BSEQ(0xd5,0x95) /* Օ */;
+ case 0x586 /* ֆ */: BSEQ(0xd5,0x96) /* Ֆ */;
+ case 0x587 /* և */: BSEQ(0xd4,0xb5,0xd5,0x92) /* ԵՒ */;
+ case 0x10d0 /* ა */: BSEQ(0xe1,0xb2,0x90) /* Ა */;
+ case 0x10d1 /* ბ */: BSEQ(0xe1,0xb2,0x91) /* Ბ */;
+ case 0x10d2 /* გ */: BSEQ(0xe1,0xb2,0x92) /* Გ */;
+ case 0x10d3 /* დ */: BSEQ(0xe1,0xb2,0x93) /* Დ */;
+ case 0x10d4 /* ე */: BSEQ(0xe1,0xb2,0x94) /* Ე */;
+ case 0x10d5 /* ვ */: BSEQ(0xe1,0xb2,0x95) /* Ვ */;
+ case 0x10d6 /* ზ */: BSEQ(0xe1,0xb2,0x96) /* Ზ */;
+ case 0x10d7 /* თ */: BSEQ(0xe1,0xb2,0x97) /* Თ */;
+ case 0x10d8 /* ი */: BSEQ(0xe1,0xb2,0x98) /* Ი */;
+ case 0x10d9 /* კ */: BSEQ(0xe1,0xb2,0x99) /* Კ */;
+ case 0x10da /* ლ */: BSEQ(0xe1,0xb2,0x9a) /* Ლ */;
+ case 0x10db /* მ */: BSEQ(0xe1,0xb2,0x9b) /* Მ */;
+ case 0x10dc /* ნ */: BSEQ(0xe1,0xb2,0x9c) /* Ნ */;
+ case 0x10dd /* ო */: BSEQ(0xe1,0xb2,0x9d) /* Ო */;
+ case 0x10de /* პ */: BSEQ(0xe1,0xb2,0x9e) /* Პ */;
+ case 0x10df /* ჟ */: BSEQ(0xe1,0xb2,0x9f) /* Ჟ */;
+ case 0x10e0 /* რ */: BSEQ(0xe1,0xb2,0xa0) /* Რ */;
+ case 0x10e1 /* ს */: BSEQ(0xe1,0xb2,0xa1) /* Ს */;
+ case 0x10e2 /* ტ */: BSEQ(0xe1,0xb2,0xa2) /* Ტ */;
+ case 0x10e3 /* უ */: BSEQ(0xe1,0xb2,0xa3) /* Უ */;
+ case 0x10e4 /* ფ */: BSEQ(0xe1,0xb2,0xa4) /* Ფ */;
+ case 0x10e5 /* ქ */: BSEQ(0xe1,0xb2,0xa5) /* Ქ */;
+ case 0x10e6 /* ღ */: BSEQ(0xe1,0xb2,0xa6) /* Ღ */;
+ case 0x10e7 /* ყ */: BSEQ(0xe1,0xb2,0xa7) /* Ყ */;
+ case 0x10e8 /* შ */: BSEQ(0xe1,0xb2,0xa8) /* Შ */;
+ case 0x10e9 /* ჩ */: BSEQ(0xe1,0xb2,0xa9) /* Ჩ */;
+ case 0x10ea /* ც */: BSEQ(0xe1,0xb2,0xaa) /* Ც */;
+ case 0x10eb /* ძ */: BSEQ(0xe1,0xb2,0xab) /* Ძ */;
+ case 0x10ec /* წ */: BSEQ(0xe1,0xb2,0xac) /* Წ */;
+ case 0x10ed /* ჭ */: BSEQ(0xe1,0xb2,0xad) /* Ჭ */;
+ case 0x10ee /* ხ */: BSEQ(0xe1,0xb2,0xae) /* Ხ */;
+ case 0x10ef /* ჯ */: BSEQ(0xe1,0xb2,0xaf) /* Ჯ */;
+ case 0x10f0 /* ჰ */: BSEQ(0xe1,0xb2,0xb0) /* Ჰ */;
+ case 0x10f1 /* ჱ */: BSEQ(0xe1,0xb2,0xb1) /* Ჱ */;
+ case 0x10f2 /* ჲ */: BSEQ(0xe1,0xb2,0xb2) /* Ჲ */;
+ case 0x10f3 /* ჳ */: BSEQ(0xe1,0xb2,0xb3) /* Ჳ */;
+ case 0x10f4 /* ჴ */: BSEQ(0xe1,0xb2,0xb4) /* Ჴ */;
+ case 0x10f5 /* ჵ */: BSEQ(0xe1,0xb2,0xb5) /* Ჵ */;
+ case 0x10f6 /* ჶ */: BSEQ(0xe1,0xb2,0xb6) /* Ჶ */;
+ case 0x10f7 /* ჷ */: BSEQ(0xe1,0xb2,0xb7) /* Ჷ */;
+ case 0x10f8 /* ჸ */: BSEQ(0xe1,0xb2,0xb8) /* Ჸ */;
+ case 0x10f9 /* ჹ */: BSEQ(0xe1,0xb2,0xb9) /* Ჹ */;
+ case 0x10fa /* ჺ */: BSEQ(0xe1,0xb2,0xba) /* Ჺ */;
+ case 0x10fd /* ჽ */: BSEQ(0xe1,0xb2,0xbd) /* Ჽ */;
+ case 0x10fe /* ჾ */: BSEQ(0xe1,0xb2,0xbe) /* Ჾ */;
+ case 0x10ff /* ჿ */: BSEQ(0xe1,0xb2,0xbf) /* Ჿ */;
+ case 0x13f8 /* ᏸ */: BSEQ(0xe1,0x8f,0xb0) /* Ᏸ */;
+ case 0x13f9 /* ᏹ */: BSEQ(0xe1,0x8f,0xb1) /* Ᏹ */;
+ case 0x13fa /* ᏺ */: BSEQ(0xe1,0x8f,0xb2) /* Ᏺ */;
+ case 0x13fb /* ᏻ */: BSEQ(0xe1,0x8f,0xb3) /* Ᏻ */;
+ case 0x13fc /* ᏼ */: BSEQ(0xe1,0x8f,0xb4) /* Ᏼ */;
+ case 0x13fd /* ᏽ */: BSEQ(0xe1,0x8f,0xb5) /* Ᏽ */;
+ case 0x1c80 /* ᲀ */: BSEQ(0xd0,0x92) /* В */;
+ case 0x1c81 /* ᲁ */: BSEQ(0xd0,0x94) /* Д */;
+ case 0x1c82 /* ᲂ */: BSEQ(0xd0,0x9e) /* О */;
+ case 0x1c83 /* ᲃ */: BSEQ(0xd0,0xa1) /* С */;
+ case 0x1c84 /* ᲄ */: BSEQ(0xd0,0xa2) /* Т */;
+ case 0x1c85 /* ᲅ */: BSEQ(0xd0,0xa2) /* Т */;
+ case 0x1c86 /* ᲆ */: BSEQ(0xd0,0xaa) /* Ъ */;
+ case 0x1c87 /* ᲇ */: BSEQ(0xd1,0xa2) /* Ѣ */;
+ case 0x1c88 /* ᲈ */: BSEQ(0xea,0x99,0x8a) /* Ꙋ */;
+ case 0x1d79 /* ᵹ */: BSEQ(0xea,0x9d,0xbd) /* Ᵹ */;
+ case 0x1d7d /* ᵽ */: BSEQ(0xe2,0xb1,0xa3) /* Ᵽ */;
+ case 0x1d8e /* ᶎ */: BSEQ(0xea,0x9f,0x86) /* Ᶎ */;
+ case 0x1e01 /* ḁ */: BSEQ(0xe1,0xb8,0x80) /* Ḁ */;
+ case 0x1e03 /* ḃ */: BSEQ(0xe1,0xb8,0x82) /* Ḃ */;
+ case 0x1e05 /* ḅ */: BSEQ(0xe1,0xb8,0x84) /* Ḅ */;
+ case 0x1e07 /* ḇ */: BSEQ(0xe1,0xb8,0x86) /* Ḇ */;
+ case 0x1e09 /* ḉ */: BSEQ(0xe1,0xb8,0x88) /* Ḉ */;
+ case 0x1e0b /* ḋ */: BSEQ(0xe1,0xb8,0x8a) /* Ḋ */;
+ case 0x1e0d /* ḍ */: BSEQ(0xe1,0xb8,0x8c) /* Ḍ */;
+ case 0x1e0f /* ḏ */: BSEQ(0xe1,0xb8,0x8e) /* Ḏ */;
+ case 0x1e11 /* ḑ */: BSEQ(0xe1,0xb8,0x90) /* Ḑ */;
+ case 0x1e13 /* ḓ */: BSEQ(0xe1,0xb8,0x92) /* Ḓ */;
+ case 0x1e15 /* ḕ */: BSEQ(0xe1,0xb8,0x94) /* Ḕ */;
+ case 0x1e17 /* ḗ */: BSEQ(0xe1,0xb8,0x96) /* Ḗ */;
+ case 0x1e19 /* ḙ */: BSEQ(0xe1,0xb8,0x98) /* Ḙ */;
+ case 0x1e1b /* ḛ */: BSEQ(0xe1,0xb8,0x9a) /* Ḛ */;
+ case 0x1e1d /* ḝ */: BSEQ(0xe1,0xb8,0x9c) /* Ḝ */;
+ case 0x1e1f /* ḟ */: BSEQ(0xe1,0xb8,0x9e) /* Ḟ */;
+ case 0x1e21 /* ḡ */: BSEQ(0xe1,0xb8,0xa0) /* Ḡ */;
+ case 0x1e23 /* ḣ */: BSEQ(0xe1,0xb8,0xa2) /* Ḣ */;
+ case 0x1e25 /* ḥ */: BSEQ(0xe1,0xb8,0xa4) /* Ḥ */;
+ case 0x1e27 /* ḧ */: BSEQ(0xe1,0xb8,0xa6) /* Ḧ */;
+ case 0x1e29 /* ḩ */: BSEQ(0xe1,0xb8,0xa8) /* Ḩ */;
+ case 0x1e2b /* ḫ */: BSEQ(0xe1,0xb8,0xaa) /* Ḫ */;
+ case 0x1e2d /* ḭ */: BSEQ(0xe1,0xb8,0xac) /* Ḭ */;
+ case 0x1e2f /* ḯ */: BSEQ(0xe1,0xb8,0xae) /* Ḯ */;
+ case 0x1e31 /* ḱ */: BSEQ(0xe1,0xb8,0xb0) /* Ḱ */;
+ case 0x1e33 /* ḳ */: BSEQ(0xe1,0xb8,0xb2) /* Ḳ */;
+ case 0x1e35 /* ḵ */: BSEQ(0xe1,0xb8,0xb4) /* Ḵ */;
+ case 0x1e37 /* ḷ */: BSEQ(0xe1,0xb8,0xb6) /* Ḷ */;
+ case 0x1e39 /* ḹ */: BSEQ(0xe1,0xb8,0xb8) /* Ḹ */;
+ case 0x1e3b /* ḻ */: BSEQ(0xe1,0xb8,0xba) /* Ḻ */;
+ case 0x1e3d /* ḽ */: BSEQ(0xe1,0xb8,0xbc) /* Ḽ */;
+ case 0x1e3f /* ḿ */: BSEQ(0xe1,0xb8,0xbe) /* Ḿ */;
+ case 0x1e41 /* ṁ */: BSEQ(0xe1,0xb9,0x80) /* Ṁ */;
+ case 0x1e43 /* ṃ */: BSEQ(0xe1,0xb9,0x82) /* Ṃ */;
+ case 0x1e45 /* ṅ */: BSEQ(0xe1,0xb9,0x84) /* Ṅ */;
+ case 0x1e47 /* ṇ */: BSEQ(0xe1,0xb9,0x86) /* Ṇ */;
+ case 0x1e49 /* ṉ */: BSEQ(0xe1,0xb9,0x88) /* Ṉ */;
+ case 0x1e4b /* ṋ */: BSEQ(0xe1,0xb9,0x8a) /* Ṋ */;
+ case 0x1e4d /* ṍ */: BSEQ(0xe1,0xb9,0x8c) /* Ṍ */;
+ case 0x1e4f /* ṏ */: BSEQ(0xe1,0xb9,0x8e) /* Ṏ */;
+ case 0x1e51 /* ṑ */: BSEQ(0xe1,0xb9,0x90) /* Ṑ */;
+ case 0x1e53 /* ṓ */: BSEQ(0xe1,0xb9,0x92) /* Ṓ */;
+ case 0x1e55 /* ṕ */: BSEQ(0xe1,0xb9,0x94) /* Ṕ */;
+ case 0x1e57 /* ṗ */: BSEQ(0xe1,0xb9,0x96) /* Ṗ */;
+ case 0x1e59 /* ṙ */: BSEQ(0xe1,0xb9,0x98) /* Ṙ */;
+ case 0x1e5b /* ṛ */: BSEQ(0xe1,0xb9,0x9a) /* Ṛ */;
+ case 0x1e5d /* ṝ */: BSEQ(0xe1,0xb9,0x9c) /* Ṝ */;
+ case 0x1e5f /* ṟ */: BSEQ(0xe1,0xb9,0x9e) /* Ṟ */;
+ case 0x1e61 /* ṡ */: BSEQ(0xe1,0xb9,0xa0) /* Ṡ */;
+ case 0x1e63 /* ṣ */: BSEQ(0xe1,0xb9,0xa2) /* Ṣ */;
+ case 0x1e65 /* ṥ */: BSEQ(0xe1,0xb9,0xa4) /* Ṥ */;
+ case 0x1e67 /* ṧ */: BSEQ(0xe1,0xb9,0xa6) /* Ṧ */;
+ case 0x1e69 /* ṩ */: BSEQ(0xe1,0xb9,0xa8) /* Ṩ */;
+ case 0x1e6b /* ṫ */: BSEQ(0xe1,0xb9,0xaa) /* Ṫ */;
+ case 0x1e6d /* ṭ */: BSEQ(0xe1,0xb9,0xac) /* Ṭ */;
+ case 0x1e6f /* ṯ */: BSEQ(0xe1,0xb9,0xae) /* Ṯ */;
+ case 0x1e71 /* ṱ */: BSEQ(0xe1,0xb9,0xb0) /* Ṱ */;
+ case 0x1e73 /* ṳ */: BSEQ(0xe1,0xb9,0xb2) /* Ṳ */;
+ case 0x1e75 /* ṵ */: BSEQ(0xe1,0xb9,0xb4) /* Ṵ */;
+ case 0x1e77 /* ṷ */: BSEQ(0xe1,0xb9,0xb6) /* Ṷ */;
+ case 0x1e79 /* ṹ */: BSEQ(0xe1,0xb9,0xb8) /* Ṹ */;
+ case 0x1e7b /* ṻ */: BSEQ(0xe1,0xb9,0xba) /* Ṻ */;
+ case 0x1e7d /* ṽ */: BSEQ(0xe1,0xb9,0xbc) /* Ṽ */;
+ case 0x1e7f /* ṿ */: BSEQ(0xe1,0xb9,0xbe) /* Ṿ */;
+ case 0x1e81 /* ẁ */: BSEQ(0xe1,0xba,0x80) /* Ẁ */;
+ case 0x1e83 /* ẃ */: BSEQ(0xe1,0xba,0x82) /* Ẃ */;
+ case 0x1e85 /* ẅ */: BSEQ(0xe1,0xba,0x84) /* Ẅ */;
+ case 0x1e87 /* ẇ */: BSEQ(0xe1,0xba,0x86) /* Ẇ */;
+ case 0x1e89 /* ẉ */: BSEQ(0xe1,0xba,0x88) /* Ẉ */;
+ case 0x1e8b /* ẋ */: BSEQ(0xe1,0xba,0x8a) /* Ẋ */;
+ case 0x1e8d /* ẍ */: BSEQ(0xe1,0xba,0x8c) /* Ẍ */;
+ case 0x1e8f /* ẏ */: BSEQ(0xe1,0xba,0x8e) /* Ẏ */;
+ case 0x1e91 /* ẑ */: BSEQ(0xe1,0xba,0x90) /* Ẑ */;
+ case 0x1e93 /* ẓ */: BSEQ(0xe1,0xba,0x92) /* Ẓ */;
+ case 0x1e95 /* ẕ */: BSEQ(0xe1,0xba,0x94) /* Ẕ */;
+ case 0x1e96 /* ẖ */: BSEQ(0x48,0xcc,0xb1) /* H̱ */;
+ case 0x1e97 /* ẗ */: BSEQ(0x54,0xcc,0x88) /* T̈ */;
+ case 0x1e98 /* ẘ */: BSEQ(0x57,0xcc,0x8a) /* W̊ */;
+ case 0x1e99 /* ẙ */: BSEQ(0x59,0xcc,0x8a) /* Y̊ */;
+ case 0x1e9a /* ẚ */: BSEQ(0x41,0xca,0xbe) /* Aʾ */;
+ case 0x1e9b /* ẛ */: BSEQ(0xe1,0xb9,0xa0) /* Ṡ */;
+ case 0x1ea1 /* ạ */: BSEQ(0xe1,0xba,0xa0) /* Ạ */;
+ case 0x1ea3 /* ả */: BSEQ(0xe1,0xba,0xa2) /* Ả */;
+ case 0x1ea5 /* ấ */: BSEQ(0xe1,0xba,0xa4) /* Ấ */;
+ case 0x1ea7 /* ầ */: BSEQ(0xe1,0xba,0xa6) /* Ầ */;
+ case 0x1ea9 /* ẩ */: BSEQ(0xe1,0xba,0xa8) /* Ẩ */;
+ case 0x1eab /* ẫ */: BSEQ(0xe1,0xba,0xaa) /* Ẫ */;
+ case 0x1ead /* ậ */: BSEQ(0xe1,0xba,0xac) /* Ậ */;
+ case 0x1eaf /* ắ */: BSEQ(0xe1,0xba,0xae) /* Ắ */;
+ case 0x1eb1 /* ằ */: BSEQ(0xe1,0xba,0xb0) /* Ằ */;
+ case 0x1eb3 /* ẳ */: BSEQ(0xe1,0xba,0xb2) /* Ẳ */;
+ case 0x1eb5 /* ẵ */: BSEQ(0xe1,0xba,0xb4) /* Ẵ */;
+ case 0x1eb7 /* ặ */: BSEQ(0xe1,0xba,0xb6) /* Ặ */;
+ case 0x1eb9 /* ẹ */: BSEQ(0xe1,0xba,0xb8) /* Ẹ */;
+ case 0x1ebb /* ẻ */: BSEQ(0xe1,0xba,0xba) /* Ẻ */;
+ case 0x1ebd /* ẽ */: BSEQ(0xe1,0xba,0xbc) /* Ẽ */;
+ case 0x1ebf /* ế */: BSEQ(0xe1,0xba,0xbe) /* Ế */;
+ case 0x1ec1 /* ề */: BSEQ(0xe1,0xbb,0x80) /* Ề */;
+ case 0x1ec3 /* ể */: BSEQ(0xe1,0xbb,0x82) /* Ể */;
+ case 0x1ec5 /* ễ */: BSEQ(0xe1,0xbb,0x84) /* Ễ */;
+ case 0x1ec7 /* ệ */: BSEQ(0xe1,0xbb,0x86) /* Ệ */;
+ case 0x1ec9 /* ỉ */: BSEQ(0xe1,0xbb,0x88) /* Ỉ */;
+ case 0x1ecb /* ị */: BSEQ(0xe1,0xbb,0x8a) /* Ị */;
+ case 0x1ecd /* ọ */: BSEQ(0xe1,0xbb,0x8c) /* Ọ */;
+ case 0x1ecf /* ỏ */: BSEQ(0xe1,0xbb,0x8e) /* Ỏ */;
+ case 0x1ed1 /* ố */: BSEQ(0xe1,0xbb,0x90) /* Ố */;
+ case 0x1ed3 /* ồ */: BSEQ(0xe1,0xbb,0x92) /* Ồ */;
+ case 0x1ed5 /* ổ */: BSEQ(0xe1,0xbb,0x94) /* Ổ */;
+ case 0x1ed7 /* ỗ */: BSEQ(0xe1,0xbb,0x96) /* Ỗ */;
+ case 0x1ed9 /* ộ */: BSEQ(0xe1,0xbb,0x98) /* Ộ */;
+ case 0x1edb /* ớ */: BSEQ(0xe1,0xbb,0x9a) /* Ớ */;
+ case 0x1edd /* ờ */: BSEQ(0xe1,0xbb,0x9c) /* Ờ */;
+ case 0x1edf /* ở */: BSEQ(0xe1,0xbb,0x9e) /* Ở */;
+ case 0x1ee1 /* ỡ */: BSEQ(0xe1,0xbb,0xa0) /* Ỡ */;
+ case 0x1ee3 /* ợ */: BSEQ(0xe1,0xbb,0xa2) /* Ợ */;
+ case 0x1ee5 /* ụ */: BSEQ(0xe1,0xbb,0xa4) /* Ụ */;
+ case 0x1ee7 /* ủ */: BSEQ(0xe1,0xbb,0xa6) /* Ủ */;
+ case 0x1ee9 /* ứ */: BSEQ(0xe1,0xbb,0xa8) /* Ứ */;
+ case 0x1eeb /* ừ */: BSEQ(0xe1,0xbb,0xaa) /* Ừ */;
+ case 0x1eed /* ử */: BSEQ(0xe1,0xbb,0xac) /* Ử */;
+ case 0x1eef /* ữ */: BSEQ(0xe1,0xbb,0xae) /* Ữ */;
+ case 0x1ef1 /* ự */: BSEQ(0xe1,0xbb,0xb0) /* Ự */;
+ case 0x1ef3 /* ỳ */: BSEQ(0xe1,0xbb,0xb2) /* Ỳ */;
+ case 0x1ef5 /* ỵ */: BSEQ(0xe1,0xbb,0xb4) /* Ỵ */;
+ case 0x1ef7 /* ỷ */: BSEQ(0xe1,0xbb,0xb6) /* Ỷ */;
+ case 0x1ef9 /* ỹ */: BSEQ(0xe1,0xbb,0xb8) /* Ỹ */;
+ case 0x1efb /* ỻ */: BSEQ(0xe1,0xbb,0xba) /* Ỻ */;
+ case 0x1efd /* ỽ */: BSEQ(0xe1,0xbb,0xbc) /* Ỽ */;
+ case 0x1eff /* ỿ */: BSEQ(0xe1,0xbb,0xbe) /* Ỿ */;
+ case 0x1f00 /* ἀ */: BSEQ(0xe1,0xbc,0x88) /* Ἀ */;
+ case 0x1f01 /* ἁ */: BSEQ(0xe1,0xbc,0x89) /* Ἁ */;
+ case 0x1f02 /* ἂ */: BSEQ(0xe1,0xbc,0x8a) /* Ἂ */;
+ case 0x1f03 /* ἃ */: BSEQ(0xe1,0xbc,0x8b) /* Ἃ */;
+ case 0x1f04 /* ἄ */: BSEQ(0xe1,0xbc,0x8c) /* Ἄ */;
+ case 0x1f05 /* ἅ */: BSEQ(0xe1,0xbc,0x8d) /* Ἅ */;
+ case 0x1f06 /* ἆ */: BSEQ(0xe1,0xbc,0x8e) /* Ἆ */;
+ case 0x1f07 /* ἇ */: BSEQ(0xe1,0xbc,0x8f) /* Ἇ */;
+ case 0x1f10 /* ἐ */: BSEQ(0xe1,0xbc,0x98) /* Ἐ */;
+ case 0x1f11 /* ἑ */: BSEQ(0xe1,0xbc,0x99) /* Ἑ */;
+ case 0x1f12 /* ἒ */: BSEQ(0xe1,0xbc,0x9a) /* Ἒ */;
+ case 0x1f13 /* ἓ */: BSEQ(0xe1,0xbc,0x9b) /* Ἓ */;
+ case 0x1f14 /* ἔ */: BSEQ(0xe1,0xbc,0x9c) /* Ἔ */;
+ case 0x1f15 /* ἕ */: BSEQ(0xe1,0xbc,0x9d) /* Ἕ */;
+ case 0x1f20 /* ἠ */: BSEQ(0xe1,0xbc,0xa8) /* Ἠ */;
+ case 0x1f21 /* ἡ */: BSEQ(0xe1,0xbc,0xa9) /* Ἡ */;
+ case 0x1f22 /* ἢ */: BSEQ(0xe1,0xbc,0xaa) /* Ἢ */;
+ case 0x1f23 /* ἣ */: BSEQ(0xe1,0xbc,0xab) /* Ἣ */;
+ case 0x1f24 /* ἤ */: BSEQ(0xe1,0xbc,0xac) /* Ἤ */;
+ case 0x1f25 /* ἥ */: BSEQ(0xe1,0xbc,0xad) /* Ἥ */;
+ case 0x1f26 /* ἦ */: BSEQ(0xe1,0xbc,0xae) /* Ἦ */;
+ case 0x1f27 /* ἧ */: BSEQ(0xe1,0xbc,0xaf) /* Ἧ */;
+ case 0x1f30 /* ἰ */: BSEQ(0xe1,0xbc,0xb8) /* Ἰ */;
+ case 0x1f31 /* ἱ */: BSEQ(0xe1,0xbc,0xb9) /* Ἱ */;
+ case 0x1f32 /* ἲ */: BSEQ(0xe1,0xbc,0xba) /* Ἲ */;
+ case 0x1f33 /* ἳ */: BSEQ(0xe1,0xbc,0xbb) /* Ἳ */;
+ case 0x1f34 /* ἴ */: BSEQ(0xe1,0xbc,0xbc) /* Ἴ */;
+ case 0x1f35 /* ἵ */: BSEQ(0xe1,0xbc,0xbd) /* Ἵ */;
+ case 0x1f36 /* ἶ */: BSEQ(0xe1,0xbc,0xbe) /* Ἶ */;
+ case 0x1f37 /* ἷ */: BSEQ(0xe1,0xbc,0xbf) /* Ἷ */;
+ case 0x1f40 /* ὀ */: BSEQ(0xe1,0xbd,0x88) /* Ὀ */;
+ case 0x1f41 /* ὁ */: BSEQ(0xe1,0xbd,0x89) /* Ὁ */;
+ case 0x1f42 /* ὂ */: BSEQ(0xe1,0xbd,0x8a) /* Ὂ */;
+ case 0x1f43 /* ὃ */: BSEQ(0xe1,0xbd,0x8b) /* Ὃ */;
+ case 0x1f44 /* ὄ */: BSEQ(0xe1,0xbd,0x8c) /* Ὄ */;
+ case 0x1f45 /* ὅ */: BSEQ(0xe1,0xbd,0x8d) /* Ὅ */;
+ case 0x1f50 /* ὐ */: BSEQ(0xce,0xa5,0xcc,0x93) /* Υ̓ */;
+ case 0x1f51 /* ὑ */: BSEQ(0xe1,0xbd,0x99) /* Ὑ */;
+ case 0x1f52 /* ὒ */: BSEQ(0xce,0xa5,0xcc,0x93,0xcc,0x80) /* Υ̓̀ */;
+ case 0x1f53 /* ὓ */: BSEQ(0xe1,0xbd,0x9b) /* Ὓ */;
+ case 0x1f54 /* ὔ */: BSEQ(0xce,0xa5,0xcc,0x93,0xcc,0x81) /* Υ̓́ */;
+ case 0x1f55 /* ὕ */: BSEQ(0xe1,0xbd,0x9d) /* Ὕ */;
+ case 0x1f56 /* ὖ */: BSEQ(0xce,0xa5,0xcc,0x93,0xcd,0x82) /* Υ̓͂ */;
+ case 0x1f57 /* ὗ */: BSEQ(0xe1,0xbd,0x9f) /* Ὗ */;
+ case 0x1f60 /* ὠ */: BSEQ(0xe1,0xbd,0xa8) /* Ὠ */;
+ case 0x1f61 /* ὡ */: BSEQ(0xe1,0xbd,0xa9) /* Ὡ */;
+ case 0x1f62 /* ὢ */: BSEQ(0xe1,0xbd,0xaa) /* Ὢ */;
+ case 0x1f63 /* ὣ */: BSEQ(0xe1,0xbd,0xab) /* Ὣ */;
+ case 0x1f64 /* ὤ */: BSEQ(0xe1,0xbd,0xac) /* Ὤ */;
+ case 0x1f65 /* ὥ */: BSEQ(0xe1,0xbd,0xad) /* Ὥ */;
+ case 0x1f66 /* ὦ */: BSEQ(0xe1,0xbd,0xae) /* Ὦ */;
+ case 0x1f67 /* ὧ */: BSEQ(0xe1,0xbd,0xaf) /* Ὧ */;
+ case 0x1f70 /* ὰ */: BSEQ(0xe1,0xbe,0xba) /* Ὰ */;
+ case 0x1f71 /* ά */: BSEQ(0xe1,0xbe,0xbb) /* Ά */;
+ case 0x1f72 /* ὲ */: BSEQ(0xe1,0xbf,0x88) /* Ὲ */;
+ case 0x1f73 /* έ */: BSEQ(0xe1,0xbf,0x89) /* Έ */;
+ case 0x1f74 /* ὴ */: BSEQ(0xe1,0xbf,0x8a) /* Ὴ */;
+ case 0x1f75 /* ή */: BSEQ(0xe1,0xbf,0x8b) /* Ή */;
+ case 0x1f76 /* ὶ */: BSEQ(0xe1,0xbf,0x9a) /* Ὶ */;
+ case 0x1f77 /* ί */: BSEQ(0xe1,0xbf,0x9b) /* Ί */;
+ case 0x1f78 /* ὸ */: BSEQ(0xe1,0xbf,0xb8) /* Ὸ */;
+ case 0x1f79 /* ό */: BSEQ(0xe1,0xbf,0xb9) /* Ό */;
+ case 0x1f7a /* ὺ */: BSEQ(0xe1,0xbf,0xaa) /* Ὺ */;
+ case 0x1f7b /* ύ */: BSEQ(0xe1,0xbf,0xab) /* Ύ */;
+ case 0x1f7c /* ὼ */: BSEQ(0xe1,0xbf,0xba) /* Ὼ */;
+ case 0x1f7d /* ώ */: BSEQ(0xe1,0xbf,0xbb) /* Ώ */;
+ case 0x1f80 /* ᾀ */: BSEQ(0xe1,0xbc,0x88,0xce,0x99) /* ἈΙ */;
+ case 0x1f81 /* ᾁ */: BSEQ(0xe1,0xbc,0x89,0xce,0x99) /* ἉΙ */;
+ case 0x1f82 /* ᾂ */: BSEQ(0xe1,0xbc,0x8a,0xce,0x99) /* ἊΙ */;
+ case 0x1f83 /* ᾃ */: BSEQ(0xe1,0xbc,0x8b,0xce,0x99) /* ἋΙ */;
+ case 0x1f84 /* ᾄ */: BSEQ(0xe1,0xbc,0x8c,0xce,0x99) /* ἌΙ */;
+ case 0x1f85 /* ᾅ */: BSEQ(0xe1,0xbc,0x8d,0xce,0x99) /* ἍΙ */;
+ case 0x1f86 /* ᾆ */: BSEQ(0xe1,0xbc,0x8e,0xce,0x99) /* ἎΙ */;
+ case 0x1f87 /* ᾇ */: BSEQ(0xe1,0xbc,0x8f,0xce,0x99) /* ἏΙ */;
+ case 0x1f88 /* ᾈ */: BSEQ(0xe1,0xbc,0x88,0xce,0x99) /* ἈΙ */;
+ case 0x1f89 /* ᾉ */: BSEQ(0xe1,0xbc,0x89,0xce,0x99) /* ἉΙ */;
+ case 0x1f8a /* ᾊ */: BSEQ(0xe1,0xbc,0x8a,0xce,0x99) /* ἊΙ */;
+ case 0x1f8b /* ᾋ */: BSEQ(0xe1,0xbc,0x8b,0xce,0x99) /* ἋΙ */;
+ case 0x1f8c /* ᾌ */: BSEQ(0xe1,0xbc,0x8c,0xce,0x99) /* ἌΙ */;
+ case 0x1f8d /* ᾍ */: BSEQ(0xe1,0xbc,0x8d,0xce,0x99) /* ἍΙ */;
+ case 0x1f8e /* ᾎ */: BSEQ(0xe1,0xbc,0x8e,0xce,0x99) /* ἎΙ */;
+ case 0x1f8f /* ᾏ */: BSEQ(0xe1,0xbc,0x8f,0xce,0x99) /* ἏΙ */;
+ case 0x1f90 /* ᾐ */: BSEQ(0xe1,0xbc,0xa8,0xce,0x99) /* ἨΙ */;
+ case 0x1f91 /* ᾑ */: BSEQ(0xe1,0xbc,0xa9,0xce,0x99) /* ἩΙ */;
+ case 0x1f92 /* ᾒ */: BSEQ(0xe1,0xbc,0xaa,0xce,0x99) /* ἪΙ */;
+ case 0x1f93 /* ᾓ */: BSEQ(0xe1,0xbc,0xab,0xce,0x99) /* ἫΙ */;
+ case 0x1f94 /* ᾔ */: BSEQ(0xe1,0xbc,0xac,0xce,0x99) /* ἬΙ */;
+ case 0x1f95 /* ᾕ */: BSEQ(0xe1,0xbc,0xad,0xce,0x99) /* ἭΙ */;
+ case 0x1f96 /* ᾖ */: BSEQ(0xe1,0xbc,0xae,0xce,0x99) /* ἮΙ */;
+ case 0x1f97 /* ᾗ */: BSEQ(0xe1,0xbc,0xaf,0xce,0x99) /* ἯΙ */;
+ case 0x1f98 /* ᾘ */: BSEQ(0xe1,0xbc,0xa8,0xce,0x99) /* ἨΙ */;
+ case 0x1f99 /* ᾙ */: BSEQ(0xe1,0xbc,0xa9,0xce,0x99) /* ἩΙ */;
+ case 0x1f9a /* ᾚ */: BSEQ(0xe1,0xbc,0xaa,0xce,0x99) /* ἪΙ */;
+ case 0x1f9b /* ᾛ */: BSEQ(0xe1,0xbc,0xab,0xce,0x99) /* ἫΙ */;
+ case 0x1f9c /* ᾜ */: BSEQ(0xe1,0xbc,0xac,0xce,0x99) /* ἬΙ */;
+ case 0x1f9d /* ᾝ */: BSEQ(0xe1,0xbc,0xad,0xce,0x99) /* ἭΙ */;
+ case 0x1f9e /* ᾞ */: BSEQ(0xe1,0xbc,0xae,0xce,0x99) /* ἮΙ */;
+ case 0x1f9f /* ᾟ */: BSEQ(0xe1,0xbc,0xaf,0xce,0x99) /* ἯΙ */;
+ case 0x1fa0 /* ᾠ */: BSEQ(0xe1,0xbd,0xa8,0xce,0x99) /* ὨΙ */;
+ case 0x1fa1 /* ᾡ */: BSEQ(0xe1,0xbd,0xa9,0xce,0x99) /* ὩΙ */;
+ case 0x1fa2 /* ᾢ */: BSEQ(0xe1,0xbd,0xaa,0xce,0x99) /* ὪΙ */;
+ case 0x1fa3 /* ᾣ */: BSEQ(0xe1,0xbd,0xab,0xce,0x99) /* ὫΙ */;
+ case 0x1fa4 /* ᾤ */: BSEQ(0xe1,0xbd,0xac,0xce,0x99) /* ὬΙ */;
+ case 0x1fa5 /* ᾥ */: BSEQ(0xe1,0xbd,0xad,0xce,0x99) /* ὭΙ */;
+ case 0x1fa6 /* ᾦ */: BSEQ(0xe1,0xbd,0xae,0xce,0x99) /* ὮΙ */;
+ case 0x1fa7 /* ᾧ */: BSEQ(0xe1,0xbd,0xaf,0xce,0x99) /* ὯΙ */;
+ case 0x1fa8 /* ᾨ */: BSEQ(0xe1,0xbd,0xa8,0xce,0x99) /* ὨΙ */;
+ case 0x1fa9 /* ᾩ */: BSEQ(0xe1,0xbd,0xa9,0xce,0x99) /* ὩΙ */;
+ case 0x1faa /* ᾪ */: BSEQ(0xe1,0xbd,0xaa,0xce,0x99) /* ὪΙ */;
+ case 0x1fab /* ᾫ */: BSEQ(0xe1,0xbd,0xab,0xce,0x99) /* ὫΙ */;
+ case 0x1fac /* ᾬ */: BSEQ(0xe1,0xbd,0xac,0xce,0x99) /* ὬΙ */;
+ case 0x1fad /* ᾭ */: BSEQ(0xe1,0xbd,0xad,0xce,0x99) /* ὭΙ */;
+ case 0x1fae /* ᾮ */: BSEQ(0xe1,0xbd,0xae,0xce,0x99) /* ὮΙ */;
+ case 0x1faf /* ᾯ */: BSEQ(0xe1,0xbd,0xaf,0xce,0x99) /* ὯΙ */;
+ case 0x1fb0 /* ᾰ */: BSEQ(0xe1,0xbe,0xb8) /* Ᾰ */;
+ case 0x1fb1 /* ᾱ */: BSEQ(0xe1,0xbe,0xb9) /* Ᾱ */;
+ case 0x1fb2 /* ᾲ */: BSEQ(0xe1,0xbe,0xba,0xce,0x99) /* ᾺΙ */;
+ case 0x1fb3 /* ᾳ */: BSEQ(0xce,0x91,0xce,0x99) /* ΑΙ */;
+ case 0x1fb4 /* ᾴ */: BSEQ(0xce,0x86,0xce,0x99) /* ΆΙ */;
+ case 0x1fb6 /* ᾶ */: BSEQ(0xce,0x91,0xcd,0x82) /* Α͂ */;
+ case 0x1fb7 /* ᾷ */: BSEQ(0xce,0x91,0xcd,0x82,0xce,0x99) /* Α͂Ι */;
+ case 0x1fbc /* ᾼ */: BSEQ(0xce,0x91,0xce,0x99) /* ΑΙ */;
+ case 0x1fbe /* ι */: BSEQ(0xce,0x99) /* Ι */;
+ case 0x1fc2 /* ῂ */: BSEQ(0xe1,0xbf,0x8a,0xce,0x99) /* ῊΙ */;
+ case 0x1fc3 /* ῃ */: BSEQ(0xce,0x97,0xce,0x99) /* ΗΙ */;
+ case 0x1fc4 /* ῄ */: BSEQ(0xce,0x89,0xce,0x99) /* ΉΙ */;
+ case 0x1fc6 /* ῆ */: BSEQ(0xce,0x97,0xcd,0x82) /* Η͂ */;
+ case 0x1fc7 /* ῇ */: BSEQ(0xce,0x97,0xcd,0x82,0xce,0x99) /* Η͂Ι */;
+ case 0x1fcc /* ῌ */: BSEQ(0xce,0x97,0xce,0x99) /* ΗΙ */;
+ case 0x1fd0 /* ῐ */: BSEQ(0xe1,0xbf,0x98) /* Ῐ */;
+ case 0x1fd1 /* ῑ */: BSEQ(0xe1,0xbf,0x99) /* Ῑ */;
+ case 0x1fd2 /* ῒ */: BSEQ(0xce,0x99,0xcc,0x88,0xcc,0x80) /* Ϊ̀ */;
+ case 0x1fd3 /* ΐ */: BSEQ(0xce,0x99,0xcc,0x88,0xcc,0x81) /* Ϊ́ */;
+ case 0x1fd6 /* ῖ */: BSEQ(0xce,0x99,0xcd,0x82) /* Ι͂ */;
+ case 0x1fd7 /* ῗ */: BSEQ(0xce,0x99,0xcc,0x88,0xcd,0x82) /* Ϊ͂ */;
+ case 0x1fe0 /* ῠ */: BSEQ(0xe1,0xbf,0xa8) /* Ῠ */;
+ case 0x1fe1 /* ῡ */: BSEQ(0xe1,0xbf,0xa9) /* Ῡ */;
+ case 0x1fe2 /* ῢ */: BSEQ(0xce,0xa5,0xcc,0x88,0xcc,0x80) /* Ϋ̀ */;
+ case 0x1fe3 /* ΰ */: BSEQ(0xce,0xa5,0xcc,0x88,0xcc,0x81) /* Ϋ́ */;
+ case 0x1fe4 /* ῤ */: BSEQ(0xce,0xa1,0xcc,0x93) /* Ρ̓ */;
+ case 0x1fe5 /* ῥ */: BSEQ(0xe1,0xbf,0xac) /* Ῥ */;
+ case 0x1fe6 /* ῦ */: BSEQ(0xce,0xa5,0xcd,0x82) /* Υ͂ */;
+ case 0x1fe7 /* ῧ */: BSEQ(0xce,0xa5,0xcc,0x88,0xcd,0x82) /* Ϋ͂ */;
+ case 0x1ff2 /* ῲ */: BSEQ(0xe1,0xbf,0xba,0xce,0x99) /* ῺΙ */;
+ case 0x1ff3 /* ῳ */: BSEQ(0xce,0xa9,0xce,0x99) /* ΩΙ */;
+ case 0x1ff4 /* ῴ */: BSEQ(0xce,0x8f,0xce,0x99) /* ΏΙ */;
+ case 0x1ff6 /* ῶ */: BSEQ(0xce,0xa9,0xcd,0x82) /* Ω͂ */;
+ case 0x1ff7 /* ῷ */: BSEQ(0xce,0xa9,0xcd,0x82,0xce,0x99) /* Ω͂Ι */;
+ case 0x1ffc /* ῼ */: BSEQ(0xce,0xa9,0xce,0x99) /* ΩΙ */;
+ case 0x214e /* ⅎ */: BSEQ(0xe2,0x84,0xb2) /* Ⅎ */;
+ case 0x2170 /* ⅰ */: BSEQ(0xe2,0x85,0xa0) /* Ⅰ */;
+ case 0x2171 /* ⅱ */: BSEQ(0xe2,0x85,0xa1) /* Ⅱ */;
+ case 0x2172 /* ⅲ */: BSEQ(0xe2,0x85,0xa2) /* Ⅲ */;
+ case 0x2173 /* ⅳ */: BSEQ(0xe2,0x85,0xa3) /* Ⅳ */;
+ case 0x2174 /* ⅴ */: BSEQ(0xe2,0x85,0xa4) /* Ⅴ */;
+ case 0x2175 /* ⅵ */: BSEQ(0xe2,0x85,0xa5) /* Ⅵ */;
+ case 0x2176 /* ⅶ */: BSEQ(0xe2,0x85,0xa6) /* Ⅶ */;
+ case 0x2177 /* ⅷ */: BSEQ(0xe2,0x85,0xa7) /* Ⅷ */;
+ case 0x2178 /* ⅸ */: BSEQ(0xe2,0x85,0xa8) /* Ⅸ */;
+ case 0x2179 /* ⅹ */: BSEQ(0xe2,0x85,0xa9) /* Ⅹ */;
+ case 0x217a /* ⅺ */: BSEQ(0xe2,0x85,0xaa) /* Ⅺ */;
+ case 0x217b /* ⅻ */: BSEQ(0xe2,0x85,0xab) /* Ⅻ */;
+ case 0x217c /* ⅼ */: BSEQ(0xe2,0x85,0xac) /* Ⅼ */;
+ case 0x217d /* ⅽ */: BSEQ(0xe2,0x85,0xad) /* Ⅽ */;
+ case 0x217e /* ⅾ */: BSEQ(0xe2,0x85,0xae) /* Ⅾ */;
+ case 0x217f /* ⅿ */: BSEQ(0xe2,0x85,0xaf) /* Ⅿ */;
+ case 0x2184 /* ↄ */: BSEQ(0xe2,0x86,0x83) /* Ↄ */;
+ case 0x24d0 /* ⓐ */: BSEQ(0xe2,0x92,0xb6) /* Ⓐ */;
+ case 0x24d1 /* ⓑ */: BSEQ(0xe2,0x92,0xb7) /* Ⓑ */;
+ case 0x24d2 /* ⓒ */: BSEQ(0xe2,0x92,0xb8) /* Ⓒ */;
+ case 0x24d3 /* ⓓ */: BSEQ(0xe2,0x92,0xb9) /* Ⓓ */;
+ case 0x24d4 /* ⓔ */: BSEQ(0xe2,0x92,0xba) /* Ⓔ */;
+ case 0x24d5 /* ⓕ */: BSEQ(0xe2,0x92,0xbb) /* Ⓕ */;
+ case 0x24d6 /* ⓖ */: BSEQ(0xe2,0x92,0xbc) /* Ⓖ */;
+ case 0x24d7 /* ⓗ */: BSEQ(0xe2,0x92,0xbd) /* Ⓗ */;
+ case 0x24d8 /* ⓘ */: BSEQ(0xe2,0x92,0xbe) /* Ⓘ */;
+ case 0x24d9 /* ⓙ */: BSEQ(0xe2,0x92,0xbf) /* Ⓙ */;
+ case 0x24da /* ⓚ */: BSEQ(0xe2,0x93,0x80) /* Ⓚ */;
+ case 0x24db /* ⓛ */: BSEQ(0xe2,0x93,0x81) /* Ⓛ */;
+ case 0x24dc /* ⓜ */: BSEQ(0xe2,0x93,0x82) /* Ⓜ */;
+ case 0x24dd /* ⓝ */: BSEQ(0xe2,0x93,0x83) /* Ⓝ */;
+ case 0x24de /* ⓞ */: BSEQ(0xe2,0x93,0x84) /* Ⓞ */;
+ case 0x24df /* ⓟ */: BSEQ(0xe2,0x93,0x85) /* Ⓟ */;
+ case 0x24e0 /* ⓠ */: BSEQ(0xe2,0x93,0x86) /* Ⓠ */;
+ case 0x24e1 /* ⓡ */: BSEQ(0xe2,0x93,0x87) /* Ⓡ */;
+ case 0x24e2 /* ⓢ */: BSEQ(0xe2,0x93,0x88) /* Ⓢ */;
+ case 0x24e3 /* ⓣ */: BSEQ(0xe2,0x93,0x89) /* Ⓣ */;
+ case 0x24e4 /* ⓤ */: BSEQ(0xe2,0x93,0x8a) /* Ⓤ */;
+ case 0x24e5 /* ⓥ */: BSEQ(0xe2,0x93,0x8b) /* Ⓥ */;
+ case 0x24e6 /* ⓦ */: BSEQ(0xe2,0x93,0x8c) /* Ⓦ */;
+ case 0x24e7 /* ⓧ */: BSEQ(0xe2,0x93,0x8d) /* Ⓧ */;
+ case 0x24e8 /* ⓨ */: BSEQ(0xe2,0x93,0x8e) /* Ⓨ */;
+ case 0x24e9 /* ⓩ */: BSEQ(0xe2,0x93,0x8f) /* Ⓩ */;
+ case 0x2c30 /* ⰰ */: BSEQ(0xe2,0xb0,0x80) /* Ⰰ */;
+ case 0x2c31 /* ⰱ */: BSEQ(0xe2,0xb0,0x81) /* Ⰱ */;
+ case 0x2c32 /* ⰲ */: BSEQ(0xe2,0xb0,0x82) /* Ⰲ */;
+ case 0x2c33 /* ⰳ */: BSEQ(0xe2,0xb0,0x83) /* Ⰳ */;
+ case 0x2c34 /* ⰴ */: BSEQ(0xe2,0xb0,0x84) /* Ⰴ */;
+ case 0x2c35 /* ⰵ */: BSEQ(0xe2,0xb0,0x85) /* Ⰵ */;
+ case 0x2c36 /* ⰶ */: BSEQ(0xe2,0xb0,0x86) /* Ⰶ */;
+ case 0x2c37 /* ⰷ */: BSEQ(0xe2,0xb0,0x87) /* Ⰷ */;
+ case 0x2c38 /* ⰸ */: BSEQ(0xe2,0xb0,0x88) /* Ⰸ */;
+ case 0x2c39 /* ⰹ */: BSEQ(0xe2,0xb0,0x89) /* Ⰹ */;
+ case 0x2c3a /* ⰺ */: BSEQ(0xe2,0xb0,0x8a) /* Ⰺ */;
+ case 0x2c3b /* ⰻ */: BSEQ(0xe2,0xb0,0x8b) /* Ⰻ */;
+ case 0x2c3c /* ⰼ */: BSEQ(0xe2,0xb0,0x8c) /* Ⰼ */;
+ case 0x2c3d /* ⰽ */: BSEQ(0xe2,0xb0,0x8d) /* Ⰽ */;
+ case 0x2c3e /* ⰾ */: BSEQ(0xe2,0xb0,0x8e) /* Ⰾ */;
+ case 0x2c3f /* ⰿ */: BSEQ(0xe2,0xb0,0x8f) /* Ⰿ */;
+ case 0x2c40 /* ⱀ */: BSEQ(0xe2,0xb0,0x90) /* Ⱀ */;
+ case 0x2c41 /* ⱁ */: BSEQ(0xe2,0xb0,0x91) /* Ⱁ */;
+ case 0x2c42 /* ⱂ */: BSEQ(0xe2,0xb0,0x92) /* Ⱂ */;
+ case 0x2c43 /* ⱃ */: BSEQ(0xe2,0xb0,0x93) /* Ⱃ */;
+ case 0x2c44 /* ⱄ */: BSEQ(0xe2,0xb0,0x94) /* Ⱄ */;
+ case 0x2c45 /* ⱅ */: BSEQ(0xe2,0xb0,0x95) /* Ⱅ */;
+ case 0x2c46 /* ⱆ */: BSEQ(0xe2,0xb0,0x96) /* Ⱆ */;
+ case 0x2c47 /* ⱇ */: BSEQ(0xe2,0xb0,0x97) /* Ⱇ */;
+ case 0x2c48 /* ⱈ */: BSEQ(0xe2,0xb0,0x98) /* Ⱈ */;
+ case 0x2c49 /* ⱉ */: BSEQ(0xe2,0xb0,0x99) /* Ⱉ */;
+ case 0x2c4a /* ⱊ */: BSEQ(0xe2,0xb0,0x9a) /* Ⱊ */;
+ case 0x2c4b /* ⱋ */: BSEQ(0xe2,0xb0,0x9b) /* Ⱋ */;
+ case 0x2c4c /* ⱌ */: BSEQ(0xe2,0xb0,0x9c) /* Ⱌ */;
+ case 0x2c4d /* ⱍ */: BSEQ(0xe2,0xb0,0x9d) /* Ⱍ */;
+ case 0x2c4e /* ⱎ */: BSEQ(0xe2,0xb0,0x9e) /* Ⱎ */;
+ case 0x2c4f /* ⱏ */: BSEQ(0xe2,0xb0,0x9f) /* Ⱏ */;
+ case 0x2c50 /* ⱐ */: BSEQ(0xe2,0xb0,0xa0) /* Ⱐ */;
+ case 0x2c51 /* ⱑ */: BSEQ(0xe2,0xb0,0xa1) /* Ⱑ */;
+ case 0x2c52 /* ⱒ */: BSEQ(0xe2,0xb0,0xa2) /* Ⱒ */;
+ case 0x2c53 /* ⱓ */: BSEQ(0xe2,0xb0,0xa3) /* Ⱓ */;
+ case 0x2c54 /* ⱔ */: BSEQ(0xe2,0xb0,0xa4) /* Ⱔ */;
+ case 0x2c55 /* ⱕ */: BSEQ(0xe2,0xb0,0xa5) /* Ⱕ */;
+ case 0x2c56 /* ⱖ */: BSEQ(0xe2,0xb0,0xa6) /* Ⱖ */;
+ case 0x2c57 /* ⱗ */: BSEQ(0xe2,0xb0,0xa7) /* Ⱗ */;
+ case 0x2c58 /* ⱘ */: BSEQ(0xe2,0xb0,0xa8) /* Ⱘ */;
+ case 0x2c59 /* ⱙ */: BSEQ(0xe2,0xb0,0xa9) /* Ⱙ */;
+ case 0x2c5a /* ⱚ */: BSEQ(0xe2,0xb0,0xaa) /* Ⱚ */;
+ case 0x2c5b /* ⱛ */: BSEQ(0xe2,0xb0,0xab) /* Ⱛ */;
+ case 0x2c5c /* ⱜ */: BSEQ(0xe2,0xb0,0xac) /* Ⱜ */;
+ case 0x2c5d /* ⱝ */: BSEQ(0xe2,0xb0,0xad) /* Ⱝ */;
+ case 0x2c5e /* ⱞ */: BSEQ(0xe2,0xb0,0xae) /* Ⱞ */;
+ case 0x2c61 /* ⱡ */: BSEQ(0xe2,0xb1,0xa0) /* Ⱡ */;
+ case 0x2c65 /* ⱥ */: BSEQ(0xc8,0xba) /* Ⱥ */;
+ case 0x2c66 /* ⱦ */: BSEQ(0xc8,0xbe) /* Ⱦ */;
+ case 0x2c68 /* ⱨ */: BSEQ(0xe2,0xb1,0xa7) /* Ⱨ */;
+ case 0x2c6a /* ⱪ */: BSEQ(0xe2,0xb1,0xa9) /* Ⱪ */;
+ case 0x2c6c /* ⱬ */: BSEQ(0xe2,0xb1,0xab) /* Ⱬ */;
+ case 0x2c73 /* ⱳ */: BSEQ(0xe2,0xb1,0xb2) /* Ⱳ */;
+ case 0x2c76 /* ⱶ */: BSEQ(0xe2,0xb1,0xb5) /* Ⱶ */;
+ case 0x2c81 /* ⲁ */: BSEQ(0xe2,0xb2,0x80) /* Ⲁ */;
+ case 0x2c83 /* ⲃ */: BSEQ(0xe2,0xb2,0x82) /* Ⲃ */;
+ case 0x2c85 /* ⲅ */: BSEQ(0xe2,0xb2,0x84) /* Ⲅ */;
+ case 0x2c87 /* ⲇ */: BSEQ(0xe2,0xb2,0x86) /* Ⲇ */;
+ case 0x2c89 /* ⲉ */: BSEQ(0xe2,0xb2,0x88) /* Ⲉ */;
+ case 0x2c8b /* ⲋ */: BSEQ(0xe2,0xb2,0x8a) /* Ⲋ */;
+ case 0x2c8d /* ⲍ */: BSEQ(0xe2,0xb2,0x8c) /* Ⲍ */;
+ case 0x2c8f /* ⲏ */: BSEQ(0xe2,0xb2,0x8e) /* Ⲏ */;
+ case 0x2c91 /* ⲑ */: BSEQ(0xe2,0xb2,0x90) /* Ⲑ */;
+ case 0x2c93 /* ⲓ */: BSEQ(0xe2,0xb2,0x92) /* Ⲓ */;
+ case 0x2c95 /* ⲕ */: BSEQ(0xe2,0xb2,0x94) /* Ⲕ */;
+ case 0x2c97 /* ⲗ */: BSEQ(0xe2,0xb2,0x96) /* Ⲗ */;
+ case 0x2c99 /* ⲙ */: BSEQ(0xe2,0xb2,0x98) /* Ⲙ */;
+ case 0x2c9b /* ⲛ */: BSEQ(0xe2,0xb2,0x9a) /* Ⲛ */;
+ case 0x2c9d /* ⲝ */: BSEQ(0xe2,0xb2,0x9c) /* Ⲝ */;
+ case 0x2c9f /* ⲟ */: BSEQ(0xe2,0xb2,0x9e) /* Ⲟ */;
+ case 0x2ca1 /* ⲡ */: BSEQ(0xe2,0xb2,0xa0) /* Ⲡ */;
+ case 0x2ca3 /* ⲣ */: BSEQ(0xe2,0xb2,0xa2) /* Ⲣ */;
+ case 0x2ca5 /* ⲥ */: BSEQ(0xe2,0xb2,0xa4) /* Ⲥ */;
+ case 0x2ca7 /* ⲧ */: BSEQ(0xe2,0xb2,0xa6) /* Ⲧ */;
+ case 0x2ca9 /* ⲩ */: BSEQ(0xe2,0xb2,0xa8) /* Ⲩ */;
+ case 0x2cab /* ⲫ */: BSEQ(0xe2,0xb2,0xaa) /* Ⲫ */;
+ case 0x2cad /* ⲭ */: BSEQ(0xe2,0xb2,0xac) /* Ⲭ */;
+ case 0x2caf /* ⲯ */: BSEQ(0xe2,0xb2,0xae) /* Ⲯ */;
+ case 0x2cb1 /* ⲱ */: BSEQ(0xe2,0xb2,0xb0) /* Ⲱ */;
+ case 0x2cb3 /* ⲳ */: BSEQ(0xe2,0xb2,0xb2) /* Ⲳ */;
+ case 0x2cb5 /* ⲵ */: BSEQ(0xe2,0xb2,0xb4) /* Ⲵ */;
+ case 0x2cb7 /* ⲷ */: BSEQ(0xe2,0xb2,0xb6) /* Ⲷ */;
+ case 0x2cb9 /* ⲹ */: BSEQ(0xe2,0xb2,0xb8) /* Ⲹ */;
+ case 0x2cbb /* ⲻ */: BSEQ(0xe2,0xb2,0xba) /* Ⲻ */;
+ case 0x2cbd /* ⲽ */: BSEQ(0xe2,0xb2,0xbc) /* Ⲽ */;
+ case 0x2cbf /* ⲿ */: BSEQ(0xe2,0xb2,0xbe) /* Ⲿ */;
+ case 0x2cc1 /* ⳁ */: BSEQ(0xe2,0xb3,0x80) /* Ⳁ */;
+ case 0x2cc3 /* ⳃ */: BSEQ(0xe2,0xb3,0x82) /* Ⳃ */;
+ case 0x2cc5 /* ⳅ */: BSEQ(0xe2,0xb3,0x84) /* Ⳅ */;
+ case 0x2cc7 /* ⳇ */: BSEQ(0xe2,0xb3,0x86) /* Ⳇ */;
+ case 0x2cc9 /* ⳉ */: BSEQ(0xe2,0xb3,0x88) /* Ⳉ */;
+ case 0x2ccb /* ⳋ */: BSEQ(0xe2,0xb3,0x8a) /* Ⳋ */;
+ case 0x2ccd /* ⳍ */: BSEQ(0xe2,0xb3,0x8c) /* Ⳍ */;
+ case 0x2ccf /* ⳏ */: BSEQ(0xe2,0xb3,0x8e) /* Ⳏ */;
+ case 0x2cd1 /* ⳑ */: BSEQ(0xe2,0xb3,0x90) /* Ⳑ */;
+ case 0x2cd3 /* ⳓ */: BSEQ(0xe2,0xb3,0x92) /* Ⳓ */;
+ case 0x2cd5 /* ⳕ */: BSEQ(0xe2,0xb3,0x94) /* Ⳕ */;
+ case 0x2cd7 /* ⳗ */: BSEQ(0xe2,0xb3,0x96) /* Ⳗ */;
+ case 0x2cd9 /* ⳙ */: BSEQ(0xe2,0xb3,0x98) /* Ⳙ */;
+ case 0x2cdb /* ⳛ */: BSEQ(0xe2,0xb3,0x9a) /* Ⳛ */;
+ case 0x2cdd /* ⳝ */: BSEQ(0xe2,0xb3,0x9c) /* Ⳝ */;
+ case 0x2cdf /* ⳟ */: BSEQ(0xe2,0xb3,0x9e) /* Ⳟ */;
+ case 0x2ce1 /* ⳡ */: BSEQ(0xe2,0xb3,0xa0) /* Ⳡ */;
+ case 0x2ce3 /* ⳣ */: BSEQ(0xe2,0xb3,0xa2) /* Ⳣ */;
+ case 0x2cec /* ⳬ */: BSEQ(0xe2,0xb3,0xab) /* Ⳬ */;
+ case 0x2cee /* ⳮ */: BSEQ(0xe2,0xb3,0xad) /* Ⳮ */;
+ case 0x2cf3 /* ⳳ */: BSEQ(0xe2,0xb3,0xb2) /* Ⳳ */;
+ case 0x2d00 /* ⴀ */: BSEQ(0xe1,0x82,0xa0) /* Ⴀ */;
+ case 0x2d01 /* ⴁ */: BSEQ(0xe1,0x82,0xa1) /* Ⴁ */;
+ case 0x2d02 /* ⴂ */: BSEQ(0xe1,0x82,0xa2) /* Ⴂ */;
+ case 0x2d03 /* ⴃ */: BSEQ(0xe1,0x82,0xa3) /* Ⴃ */;
+ case 0x2d04 /* ⴄ */: BSEQ(0xe1,0x82,0xa4) /* Ⴄ */;
+ case 0x2d05 /* ⴅ */: BSEQ(0xe1,0x82,0xa5) /* Ⴅ */;
+ case 0x2d06 /* ⴆ */: BSEQ(0xe1,0x82,0xa6) /* Ⴆ */;
+ case 0x2d07 /* ⴇ */: BSEQ(0xe1,0x82,0xa7) /* Ⴇ */;
+ case 0x2d08 /* ⴈ */: BSEQ(0xe1,0x82,0xa8) /* Ⴈ */;
+ case 0x2d09 /* ⴉ */: BSEQ(0xe1,0x82,0xa9) /* Ⴉ */;
+ case 0x2d0a /* ⴊ */: BSEQ(0xe1,0x82,0xaa) /* Ⴊ */;
+ case 0x2d0b /* ⴋ */: BSEQ(0xe1,0x82,0xab) /* Ⴋ */;
+ case 0x2d0c /* ⴌ */: BSEQ(0xe1,0x82,0xac) /* Ⴌ */;
+ case 0x2d0d /* ⴍ */: BSEQ(0xe1,0x82,0xad) /* Ⴍ */;
+ case 0x2d0e /* ⴎ */: BSEQ(0xe1,0x82,0xae) /* Ⴎ */;
+ case 0x2d0f /* ⴏ */: BSEQ(0xe1,0x82,0xaf) /* Ⴏ */;
+ case 0x2d10 /* ⴐ */: BSEQ(0xe1,0x82,0xb0) /* Ⴐ */;
+ case 0x2d11 /* ⴑ */: BSEQ(0xe1,0x82,0xb1) /* Ⴑ */;
+ case 0x2d12 /* ⴒ */: BSEQ(0xe1,0x82,0xb2) /* Ⴒ */;
+ case 0x2d13 /* ⴓ */: BSEQ(0xe1,0x82,0xb3) /* Ⴓ */;
+ case 0x2d14 /* ⴔ */: BSEQ(0xe1,0x82,0xb4) /* Ⴔ */;
+ case 0x2d15 /* ⴕ */: BSEQ(0xe1,0x82,0xb5) /* Ⴕ */;
+ case 0x2d16 /* ⴖ */: BSEQ(0xe1,0x82,0xb6) /* Ⴖ */;
+ case 0x2d17 /* ⴗ */: BSEQ(0xe1,0x82,0xb7) /* Ⴗ */;
+ case 0x2d18 /* ⴘ */: BSEQ(0xe1,0x82,0xb8) /* Ⴘ */;
+ case 0x2d19 /* ⴙ */: BSEQ(0xe1,0x82,0xb9) /* Ⴙ */;
+ case 0x2d1a /* ⴚ */: BSEQ(0xe1,0x82,0xba) /* Ⴚ */;
+ case 0x2d1b /* ⴛ */: BSEQ(0xe1,0x82,0xbb) /* Ⴛ */;
+ case 0x2d1c /* ⴜ */: BSEQ(0xe1,0x82,0xbc) /* Ⴜ */;
+ case 0x2d1d /* ⴝ */: BSEQ(0xe1,0x82,0xbd) /* Ⴝ */;
+ case 0x2d1e /* ⴞ */: BSEQ(0xe1,0x82,0xbe) /* Ⴞ */;
+ case 0x2d1f /* ⴟ */: BSEQ(0xe1,0x82,0xbf) /* Ⴟ */;
+ case 0x2d20 /* ⴠ */: BSEQ(0xe1,0x83,0x80) /* Ⴠ */;
+ case 0x2d21 /* ⴡ */: BSEQ(0xe1,0x83,0x81) /* Ⴡ */;
+ case 0x2d22 /* ⴢ */: BSEQ(0xe1,0x83,0x82) /* Ⴢ */;
+ case 0x2d23 /* ⴣ */: BSEQ(0xe1,0x83,0x83) /* Ⴣ */;
+ case 0x2d24 /* ⴤ */: BSEQ(0xe1,0x83,0x84) /* Ⴤ */;
+ case 0x2d25 /* ⴥ */: BSEQ(0xe1,0x83,0x85) /* Ⴥ */;
+ case 0x2d27 /* ⴧ */: BSEQ(0xe1,0x83,0x87) /* Ⴧ */;
+ case 0x2d2d /* ⴭ */: BSEQ(0xe1,0x83,0x8d) /* Ⴭ */;
+ case 0xa641 /* ꙁ */: BSEQ(0xea,0x99,0x80) /* Ꙁ */;
+ case 0xa643 /* ꙃ */: BSEQ(0xea,0x99,0x82) /* Ꙃ */;
+ case 0xa645 /* ꙅ */: BSEQ(0xea,0x99,0x84) /* Ꙅ */;
+ case 0xa647 /* ꙇ */: BSEQ(0xea,0x99,0x86) /* Ꙇ */;
+ case 0xa649 /* ꙉ */: BSEQ(0xea,0x99,0x88) /* Ꙉ */;
+ case 0xa64b /* ꙋ */: BSEQ(0xea,0x99,0x8a) /* Ꙋ */;
+ case 0xa64d /* ꙍ */: BSEQ(0xea,0x99,0x8c) /* Ꙍ */;
+ case 0xa64f /* ꙏ */: BSEQ(0xea,0x99,0x8e) /* Ꙏ */;
+ case 0xa651 /* ꙑ */: BSEQ(0xea,0x99,0x90) /* Ꙑ */;
+ case 0xa653 /* ꙓ */: BSEQ(0xea,0x99,0x92) /* Ꙓ */;
+ case 0xa655 /* ꙕ */: BSEQ(0xea,0x99,0x94) /* Ꙕ */;
+ case 0xa657 /* ꙗ */: BSEQ(0xea,0x99,0x96) /* Ꙗ */;
+ case 0xa659 /* ꙙ */: BSEQ(0xea,0x99,0x98) /* Ꙙ */;
+ case 0xa65b /* ꙛ */: BSEQ(0xea,0x99,0x9a) /* Ꙛ */;
+ case 0xa65d /* ꙝ */: BSEQ(0xea,0x99,0x9c) /* Ꙝ */;
+ case 0xa65f /* ꙟ */: BSEQ(0xea,0x99,0x9e) /* Ꙟ */;
+ case 0xa661 /* ꙡ */: BSEQ(0xea,0x99,0xa0) /* Ꙡ */;
+ case 0xa663 /* ꙣ */: BSEQ(0xea,0x99,0xa2) /* Ꙣ */;
+ case 0xa665 /* ꙥ */: BSEQ(0xea,0x99,0xa4) /* Ꙥ */;
+ case 0xa667 /* ꙧ */: BSEQ(0xea,0x99,0xa6) /* Ꙧ */;
+ case 0xa669 /* ꙩ */: BSEQ(0xea,0x99,0xa8) /* Ꙩ */;
+ case 0xa66b /* ꙫ */: BSEQ(0xea,0x99,0xaa) /* Ꙫ */;
+ case 0xa66d /* ꙭ */: BSEQ(0xea,0x99,0xac) /* Ꙭ */;
+ case 0xa681 /* ꚁ */: BSEQ(0xea,0x9a,0x80) /* Ꚁ */;
+ case 0xa683 /* ꚃ */: BSEQ(0xea,0x9a,0x82) /* Ꚃ */;
+ case 0xa685 /* ꚅ */: BSEQ(0xea,0x9a,0x84) /* Ꚅ */;
+ case 0xa687 /* ꚇ */: BSEQ(0xea,0x9a,0x86) /* Ꚇ */;
+ case 0xa689 /* ꚉ */: BSEQ(0xea,0x9a,0x88) /* Ꚉ */;
+ case 0xa68b /* ꚋ */: BSEQ(0xea,0x9a,0x8a) /* Ꚋ */;
+ case 0xa68d /* ꚍ */: BSEQ(0xea,0x9a,0x8c) /* Ꚍ */;
+ case 0xa68f /* ꚏ */: BSEQ(0xea,0x9a,0x8e) /* Ꚏ */;
+ case 0xa691 /* ꚑ */: BSEQ(0xea,0x9a,0x90) /* Ꚑ */;
+ case 0xa693 /* ꚓ */: BSEQ(0xea,0x9a,0x92) /* Ꚓ */;
+ case 0xa695 /* ꚕ */: BSEQ(0xea,0x9a,0x94) /* Ꚕ */;
+ case 0xa697 /* ꚗ */: BSEQ(0xea,0x9a,0x96) /* Ꚗ */;
+ case 0xa699 /* ꚙ */: BSEQ(0xea,0x9a,0x98) /* Ꚙ */;
+ case 0xa69b /* ꚛ */: BSEQ(0xea,0x9a,0x9a) /* Ꚛ */;
+ case 0xa723 /* ꜣ */: BSEQ(0xea,0x9c,0xa2) /* Ꜣ */;
+ case 0xa725 /* ꜥ */: BSEQ(0xea,0x9c,0xa4) /* Ꜥ */;
+ case 0xa727 /* ꜧ */: BSEQ(0xea,0x9c,0xa6) /* Ꜧ */;
+ case 0xa729 /* ꜩ */: BSEQ(0xea,0x9c,0xa8) /* Ꜩ */;
+ case 0xa72b /* ꜫ */: BSEQ(0xea,0x9c,0xaa) /* Ꜫ */;
+ case 0xa72d /* ꜭ */: BSEQ(0xea,0x9c,0xac) /* Ꜭ */;
+ case 0xa72f /* ꜯ */: BSEQ(0xea,0x9c,0xae) /* Ꜯ */;
+ case 0xa733 /* ꜳ */: BSEQ(0xea,0x9c,0xb2) /* Ꜳ */;
+ case 0xa735 /* ꜵ */: BSEQ(0xea,0x9c,0xb4) /* Ꜵ */;
+ case 0xa737 /* ꜷ */: BSEQ(0xea,0x9c,0xb6) /* Ꜷ */;
+ case 0xa739 /* ꜹ */: BSEQ(0xea,0x9c,0xb8) /* Ꜹ */;
+ case 0xa73b /* ꜻ */: BSEQ(0xea,0x9c,0xba) /* Ꜻ */;
+ case 0xa73d /* ꜽ */: BSEQ(0xea,0x9c,0xbc) /* Ꜽ */;
+ case 0xa73f /* ꜿ */: BSEQ(0xea,0x9c,0xbe) /* Ꜿ */;
+ case 0xa741 /* ꝁ */: BSEQ(0xea,0x9d,0x80) /* Ꝁ */;
+ case 0xa743 /* ꝃ */: BSEQ(0xea,0x9d,0x82) /* Ꝃ */;
+ case 0xa745 /* ꝅ */: BSEQ(0xea,0x9d,0x84) /* Ꝅ */;
+ case 0xa747 /* ꝇ */: BSEQ(0xea,0x9d,0x86) /* Ꝇ */;
+ case 0xa749 /* ꝉ */: BSEQ(0xea,0x9d,0x88) /* Ꝉ */;
+ case 0xa74b /* ꝋ */: BSEQ(0xea,0x9d,0x8a) /* Ꝋ */;
+ case 0xa74d /* ꝍ */: BSEQ(0xea,0x9d,0x8c) /* Ꝍ */;
+ case 0xa74f /* ꝏ */: BSEQ(0xea,0x9d,0x8e) /* Ꝏ */;
+ case 0xa751 /* ꝑ */: BSEQ(0xea,0x9d,0x90) /* Ꝑ */;
+ case 0xa753 /* ꝓ */: BSEQ(0xea,0x9d,0x92) /* Ꝓ */;
+ case 0xa755 /* ꝕ */: BSEQ(0xea,0x9d,0x94) /* Ꝕ */;
+ case 0xa757 /* ꝗ */: BSEQ(0xea,0x9d,0x96) /* Ꝗ */;
+ case 0xa759 /* ꝙ */: BSEQ(0xea,0x9d,0x98) /* Ꝙ */;
+ case 0xa75b /* ꝛ */: BSEQ(0xea,0x9d,0x9a) /* Ꝛ */;
+ case 0xa75d /* ꝝ */: BSEQ(0xea,0x9d,0x9c) /* Ꝝ */;
+ case 0xa75f /* ꝟ */: BSEQ(0xea,0x9d,0x9e) /* Ꝟ */;
+ case 0xa761 /* ꝡ */: BSEQ(0xea,0x9d,0xa0) /* Ꝡ */;
+ case 0xa763 /* ꝣ */: BSEQ(0xea,0x9d,0xa2) /* Ꝣ */;
+ case 0xa765 /* ꝥ */: BSEQ(0xea,0x9d,0xa4) /* Ꝥ */;
+ case 0xa767 /* ꝧ */: BSEQ(0xea,0x9d,0xa6) /* Ꝧ */;
+ case 0xa769 /* ꝩ */: BSEQ(0xea,0x9d,0xa8) /* Ꝩ */;
+ case 0xa76b /* ꝫ */: BSEQ(0xea,0x9d,0xaa) /* Ꝫ */;
+ case 0xa76d /* ꝭ */: BSEQ(0xea,0x9d,0xac) /* Ꝭ */;
+ case 0xa76f /* ꝯ */: BSEQ(0xea,0x9d,0xae) /* Ꝯ */;
+ case 0xa77a /* ꝺ */: BSEQ(0xea,0x9d,0xb9) /* Ꝺ */;
+ case 0xa77c /* ꝼ */: BSEQ(0xea,0x9d,0xbb) /* Ꝼ */;
+ case 0xa77f /* ꝿ */: BSEQ(0xea,0x9d,0xbe) /* Ꝿ */;
+ case 0xa781 /* ꞁ */: BSEQ(0xea,0x9e,0x80) /* Ꞁ */;
+ case 0xa783 /* ꞃ */: BSEQ(0xea,0x9e,0x82) /* Ꞃ */;
+ case 0xa785 /* ꞅ */: BSEQ(0xea,0x9e,0x84) /* Ꞅ */;
+ case 0xa787 /* ꞇ */: BSEQ(0xea,0x9e,0x86) /* Ꞇ */;
+ case 0xa78c /* ꞌ */: BSEQ(0xea,0x9e,0x8b) /* Ꞌ */;
+ case 0xa791 /* ꞑ */: BSEQ(0xea,0x9e,0x90) /* Ꞑ */;
+ case 0xa793 /* ꞓ */: BSEQ(0xea,0x9e,0x92) /* Ꞓ */;
+ case 0xa794 /* ꞔ */: BSEQ(0xea,0x9f,0x84) /* Ꞔ */;
+ case 0xa797 /* ꞗ */: BSEQ(0xea,0x9e,0x96) /* Ꞗ */;
+ case 0xa799 /* ꞙ */: BSEQ(0xea,0x9e,0x98) /* Ꞙ */;
+ case 0xa79b /* ꞛ */: BSEQ(0xea,0x9e,0x9a) /* Ꞛ */;
+ case 0xa79d /* ꞝ */: BSEQ(0xea,0x9e,0x9c) /* Ꞝ */;
+ case 0xa79f /* ꞟ */: BSEQ(0xea,0x9e,0x9e) /* Ꞟ */;
+ case 0xa7a1 /* ꞡ */: BSEQ(0xea,0x9e,0xa0) /* Ꞡ */;
+ case 0xa7a3 /* ꞣ */: BSEQ(0xea,0x9e,0xa2) /* Ꞣ */;
+ case 0xa7a5 /* ꞥ */: BSEQ(0xea,0x9e,0xa4) /* Ꞥ */;
+ case 0xa7a7 /* ꞧ */: BSEQ(0xea,0x9e,0xa6) /* Ꞧ */;
+ case 0xa7a9 /* ꞩ */: BSEQ(0xea,0x9e,0xa8) /* Ꞩ */;
+ case 0xa7b5 /* ꞵ */: BSEQ(0xea,0x9e,0xb4) /* Ꞵ */;
+ case 0xa7b7 /* ꞷ */: BSEQ(0xea,0x9e,0xb6) /* Ꞷ */;
+ case 0xa7b9 /* ꞹ */: BSEQ(0xea,0x9e,0xb8) /* Ꞹ */;
+ case 0xa7bb /* ꞻ */: BSEQ(0xea,0x9e,0xba) /* Ꞻ */;
+ case 0xa7bd /* ꞽ */: BSEQ(0xea,0x9e,0xbc) /* Ꞽ */;
+ case 0xa7bf /* ꞿ */: BSEQ(0xea,0x9e,0xbe) /* Ꞿ */;
+ case 0xa7c3 /* ꟃ */: BSEQ(0xea,0x9f,0x82) /* Ꟃ */;
+ case 0xa7c8 /* ꟈ */: BSEQ(0xea,0x9f,0x87) /* Ꟈ */;
+ case 0xa7ca /* ꟊ */: BSEQ(0xea,0x9f,0x89) /* Ꟊ */;
+ case 0xa7f6 /* ꟶ */: BSEQ(0xea,0x9f,0xb5) /* Ꟶ */;
+ case 0xab53 /* ꭓ */: BSEQ(0xea,0x9e,0xb3) /* Ꭓ */;
+ case 0xab70 /* ꭰ */: BSEQ(0xe1,0x8e,0xa0) /* Ꭰ */;
+ case 0xab71 /* ꭱ */: BSEQ(0xe1,0x8e,0xa1) /* Ꭱ */;
+ case 0xab72 /* ꭲ */: BSEQ(0xe1,0x8e,0xa2) /* Ꭲ */;
+ case 0xab73 /* ꭳ */: BSEQ(0xe1,0x8e,0xa3) /* Ꭳ */;
+ case 0xab74 /* ꭴ */: BSEQ(0xe1,0x8e,0xa4) /* Ꭴ */;
+ case 0xab75 /* ꭵ */: BSEQ(0xe1,0x8e,0xa5) /* Ꭵ */;
+ case 0xab76 /* ꭶ */: BSEQ(0xe1,0x8e,0xa6) /* Ꭶ */;
+ case 0xab77 /* ꭷ */: BSEQ(0xe1,0x8e,0xa7) /* Ꭷ */;
+ case 0xab78 /* ꭸ */: BSEQ(0xe1,0x8e,0xa8) /* Ꭸ */;
+ case 0xab79 /* ꭹ */: BSEQ(0xe1,0x8e,0xa9) /* Ꭹ */;
+ case 0xab7a /* ꭺ */: BSEQ(0xe1,0x8e,0xaa) /* Ꭺ */;
+ case 0xab7b /* ꭻ */: BSEQ(0xe1,0x8e,0xab) /* Ꭻ */;
+ case 0xab7c /* ꭼ */: BSEQ(0xe1,0x8e,0xac) /* Ꭼ */;
+ case 0xab7d /* ꭽ */: BSEQ(0xe1,0x8e,0xad) /* Ꭽ */;
+ case 0xab7e /* ꭾ */: BSEQ(0xe1,0x8e,0xae) /* Ꭾ */;
+ case 0xab7f /* ꭿ */: BSEQ(0xe1,0x8e,0xaf) /* Ꭿ */;
+ case 0xab80 /* ꮀ */: BSEQ(0xe1,0x8e,0xb0) /* Ꮀ */;
+ case 0xab81 /* ꮁ */: BSEQ(0xe1,0x8e,0xb1) /* Ꮁ */;
+ case 0xab82 /* ꮂ */: BSEQ(0xe1,0x8e,0xb2) /* Ꮂ */;
+ case 0xab83 /* ꮃ */: BSEQ(0xe1,0x8e,0xb3) /* Ꮃ */;
+ case 0xab84 /* ꮄ */: BSEQ(0xe1,0x8e,0xb4) /* Ꮄ */;
+ case 0xab85 /* ꮅ */: BSEQ(0xe1,0x8e,0xb5) /* Ꮅ */;
+ case 0xab86 /* ꮆ */: BSEQ(0xe1,0x8e,0xb6) /* Ꮆ */;
+ case 0xab87 /* ꮇ */: BSEQ(0xe1,0x8e,0xb7) /* Ꮇ */;
+ case 0xab88 /* ꮈ */: BSEQ(0xe1,0x8e,0xb8) /* Ꮈ */;
+ case 0xab89 /* ꮉ */: BSEQ(0xe1,0x8e,0xb9) /* Ꮉ */;
+ case 0xab8a /* ꮊ */: BSEQ(0xe1,0x8e,0xba) /* Ꮊ */;
+ case 0xab8b /* ꮋ */: BSEQ(0xe1,0x8e,0xbb) /* Ꮋ */;
+ case 0xab8c /* ꮌ */: BSEQ(0xe1,0x8e,0xbc) /* Ꮌ */;
+ case 0xab8d /* ꮍ */: BSEQ(0xe1,0x8e,0xbd) /* Ꮍ */;
+ case 0xab8e /* ꮎ */: BSEQ(0xe1,0x8e,0xbe) /* Ꮎ */;
+ case 0xab8f /* ꮏ */: BSEQ(0xe1,0x8e,0xbf) /* Ꮏ */;
+ case 0xab90 /* ꮐ */: BSEQ(0xe1,0x8f,0x80) /* Ꮐ */;
+ case 0xab91 /* ꮑ */: BSEQ(0xe1,0x8f,0x81) /* Ꮑ */;
+ case 0xab92 /* ꮒ */: BSEQ(0xe1,0x8f,0x82) /* Ꮒ */;
+ case 0xab93 /* ꮓ */: BSEQ(0xe1,0x8f,0x83) /* Ꮓ */;
+ case 0xab94 /* ꮔ */: BSEQ(0xe1,0x8f,0x84) /* Ꮔ */;
+ case 0xab95 /* ꮕ */: BSEQ(0xe1,0x8f,0x85) /* Ꮕ */;
+ case 0xab96 /* ꮖ */: BSEQ(0xe1,0x8f,0x86) /* Ꮖ */;
+ case 0xab97 /* ꮗ */: BSEQ(0xe1,0x8f,0x87) /* Ꮗ */;
+ case 0xab98 /* ꮘ */: BSEQ(0xe1,0x8f,0x88) /* Ꮘ */;
+ case 0xab99 /* ꮙ */: BSEQ(0xe1,0x8f,0x89) /* Ꮙ */;
+ case 0xab9a /* ꮚ */: BSEQ(0xe1,0x8f,0x8a) /* Ꮚ */;
+ case 0xab9b /* ꮛ */: BSEQ(0xe1,0x8f,0x8b) /* Ꮛ */;
+ case 0xab9c /* ꮜ */: BSEQ(0xe1,0x8f,0x8c) /* Ꮜ */;
+ case 0xab9d /* ꮝ */: BSEQ(0xe1,0x8f,0x8d) /* Ꮝ */;
+ case 0xab9e /* ꮞ */: BSEQ(0xe1,0x8f,0x8e) /* Ꮞ */;
+ case 0xab9f /* ꮟ */: BSEQ(0xe1,0x8f,0x8f) /* Ꮟ */;
+ case 0xaba0 /* ꮠ */: BSEQ(0xe1,0x8f,0x90) /* Ꮠ */;
+ case 0xaba1 /* ꮡ */: BSEQ(0xe1,0x8f,0x91) /* Ꮡ */;
+ case 0xaba2 /* ꮢ */: BSEQ(0xe1,0x8f,0x92) /* Ꮢ */;
+ case 0xaba3 /* ꮣ */: BSEQ(0xe1,0x8f,0x93) /* Ꮣ */;
+ case 0xaba4 /* ꮤ */: BSEQ(0xe1,0x8f,0x94) /* Ꮤ */;
+ case 0xaba5 /* ꮥ */: BSEQ(0xe1,0x8f,0x95) /* Ꮥ */;
+ case 0xaba6 /* ꮦ */: BSEQ(0xe1,0x8f,0x96) /* Ꮦ */;
+ case 0xaba7 /* ꮧ */: BSEQ(0xe1,0x8f,0x97) /* Ꮧ */;
+ case 0xaba8 /* ꮨ */: BSEQ(0xe1,0x8f,0x98) /* Ꮨ */;
+ case 0xaba9 /* ꮩ */: BSEQ(0xe1,0x8f,0x99) /* Ꮩ */;
+ case 0xabaa /* ꮪ */: BSEQ(0xe1,0x8f,0x9a) /* Ꮪ */;
+ case 0xabab /* ꮫ */: BSEQ(0xe1,0x8f,0x9b) /* Ꮫ */;
+ case 0xabac /* ꮬ */: BSEQ(0xe1,0x8f,0x9c) /* Ꮬ */;
+ case 0xabad /* ꮭ */: BSEQ(0xe1,0x8f,0x9d) /* Ꮭ */;
+ case 0xabae /* ꮮ */: BSEQ(0xe1,0x8f,0x9e) /* Ꮮ */;
+ case 0xabaf /* ꮯ */: BSEQ(0xe1,0x8f,0x9f) /* Ꮯ */;
+ case 0xabb0 /* ꮰ */: BSEQ(0xe1,0x8f,0xa0) /* Ꮰ */;
+ case 0xabb1 /* ꮱ */: BSEQ(0xe1,0x8f,0xa1) /* Ꮱ */;
+ case 0xabb2 /* ꮲ */: BSEQ(0xe1,0x8f,0xa2) /* Ꮲ */;
+ case 0xabb3 /* ꮳ */: BSEQ(0xe1,0x8f,0xa3) /* Ꮳ */;
+ case 0xabb4 /* ꮴ */: BSEQ(0xe1,0x8f,0xa4) /* Ꮴ */;
+ case 0xabb5 /* ꮵ */: BSEQ(0xe1,0x8f,0xa5) /* Ꮵ */;
+ case 0xabb6 /* ꮶ */: BSEQ(0xe1,0x8f,0xa6) /* Ꮶ */;
+ case 0xabb7 /* ꮷ */: BSEQ(0xe1,0x8f,0xa7) /* Ꮷ */;
+ case 0xabb8 /* ꮸ */: BSEQ(0xe1,0x8f,0xa8) /* Ꮸ */;
+ case 0xabb9 /* ꮹ */: BSEQ(0xe1,0x8f,0xa9) /* Ꮹ */;
+ case 0xabba /* ꮺ */: BSEQ(0xe1,0x8f,0xaa) /* Ꮺ */;
+ case 0xabbb /* ꮻ */: BSEQ(0xe1,0x8f,0xab) /* Ꮻ */;
+ case 0xabbc /* ꮼ */: BSEQ(0xe1,0x8f,0xac) /* Ꮼ */;
+ case 0xabbd /* ꮽ */: BSEQ(0xe1,0x8f,0xad) /* Ꮽ */;
+ case 0xabbe /* ꮾ */: BSEQ(0xe1,0x8f,0xae) /* Ꮾ */;
+ case 0xabbf /* ꮿ */: BSEQ(0xe1,0x8f,0xaf) /* Ꮿ */;
+ case 0xfb00 /* ff */: BSEQ(0x46,0x46) /* FF */;
+ case 0xfb01 /* fi */: BSEQ(0x46,0x49) /* FI */;
+ case 0xfb02 /* fl */: BSEQ(0x46,0x4c) /* FL */;
+ case 0xfb03 /* ffi */: BSEQ(0x46,0x46,0x49) /* FFI */;
+ case 0xfb04 /* ffl */: BSEQ(0x46,0x46,0x4c) /* FFL */;
+ case 0xfb05 /* ſt */: BSEQ(0x53,0x54) /* ST */;
+ case 0xfb06 /* st */: BSEQ(0x53,0x54) /* ST */;
+ case 0xfb13 /* ﬓ */: BSEQ(0xd5,0x84,0xd5,0x86) /* ՄՆ */;
+ case 0xfb14 /* ﬔ */: BSEQ(0xd5,0x84,0xd4,0xb5) /* ՄԵ */;
+ case 0xfb15 /* ﬕ */: BSEQ(0xd5,0x84,0xd4,0xbb) /* ՄԻ */;
+ case 0xfb16 /* ﬖ */: BSEQ(0xd5,0x8e,0xd5,0x86) /* ՎՆ */;
+ case 0xfb17 /* ﬗ */: BSEQ(0xd5,0x84,0xd4,0xbd) /* ՄԽ */;
+ case 0xff41 /* a */: BSEQ(0xef,0xbc,0xa1) /* A */;
+ case 0xff42 /* b */: BSEQ(0xef,0xbc,0xa2) /* B */;
+ case 0xff43 /* c */: BSEQ(0xef,0xbc,0xa3) /* C */;
+ case 0xff44 /* d */: BSEQ(0xef,0xbc,0xa4) /* D */;
+ case 0xff45 /* e */: BSEQ(0xef,0xbc,0xa5) /* E */;
+ case 0xff46 /* f */: BSEQ(0xef,0xbc,0xa6) /* F */;
+ case 0xff47 /* g */: BSEQ(0xef,0xbc,0xa7) /* G */;
+ case 0xff48 /* h */: BSEQ(0xef,0xbc,0xa8) /* H */;
+ case 0xff49 /* i */: BSEQ(0xef,0xbc,0xa9) /* I */;
+ case 0xff4a /* j */: BSEQ(0xef,0xbc,0xaa) /* J */;
+ case 0xff4b /* k */: BSEQ(0xef,0xbc,0xab) /* K */;
+ case 0xff4c /* l */: BSEQ(0xef,0xbc,0xac) /* L */;
+ case 0xff4d /* m */: BSEQ(0xef,0xbc,0xad) /* M */;
+ case 0xff4e /* n */: BSEQ(0xef,0xbc,0xae) /* N */;
+ case 0xff4f /* o */: BSEQ(0xef,0xbc,0xaf) /* O */;
+ case 0xff50 /* p */: BSEQ(0xef,0xbc,0xb0) /* P */;
+ case 0xff51 /* q */: BSEQ(0xef,0xbc,0xb1) /* Q */;
+ case 0xff52 /* r */: BSEQ(0xef,0xbc,0xb2) /* R */;
+ case 0xff53 /* s */: BSEQ(0xef,0xbc,0xb3) /* S */;
+ case 0xff54 /* t */: BSEQ(0xef,0xbc,0xb4) /* T */;
+ case 0xff55 /* u */: BSEQ(0xef,0xbc,0xb5) /* U */;
+ case 0xff56 /* v */: BSEQ(0xef,0xbc,0xb6) /* V */;
+ case 0xff57 /* w */: BSEQ(0xef,0xbc,0xb7) /* W */;
+ case 0xff58 /* x */: BSEQ(0xef,0xbc,0xb8) /* X */;
+ case 0xff59 /* y */: BSEQ(0xef,0xbc,0xb9) /* Y */;
+ case 0xff5a /* z */: BSEQ(0xef,0xbc,0xba) /* Z */;
+ case 0x10428 /* 𐐨 */: BSEQ(0xf0,0x90,0x90,0x80) /* 𐐀 */;
+ case 0x10429 /* 𐐩 */: BSEQ(0xf0,0x90,0x90,0x81) /* 𐐁 */;
+ case 0x1042a /* 𐐪 */: BSEQ(0xf0,0x90,0x90,0x82) /* 𐐂 */;
+ case 0x1042b /* 𐐫 */: BSEQ(0xf0,0x90,0x90,0x83) /* 𐐃 */;
+ case 0x1042c /* 𐐬 */: BSEQ(0xf0,0x90,0x90,0x84) /* 𐐄 */;
+ case 0x1042d /* 𐐭 */: BSEQ(0xf0,0x90,0x90,0x85) /* 𐐅 */;
+ case 0x1042e /* 𐐮 */: BSEQ(0xf0,0x90,0x90,0x86) /* 𐐆 */;
+ case 0x1042f /* 𐐯 */: BSEQ(0xf0,0x90,0x90,0x87) /* 𐐇 */;
+ case 0x10430 /* 𐐰 */: BSEQ(0xf0,0x90,0x90,0x88) /* 𐐈 */;
+ case 0x10431 /* 𐐱 */: BSEQ(0xf0,0x90,0x90,0x89) /* 𐐉 */;
+ case 0x10432 /* 𐐲 */: BSEQ(0xf0,0x90,0x90,0x8a) /* 𐐊 */;
+ case 0x10433 /* 𐐳 */: BSEQ(0xf0,0x90,0x90,0x8b) /* 𐐋 */;
+ case 0x10434 /* 𐐴 */: BSEQ(0xf0,0x90,0x90,0x8c) /* 𐐌 */;
+ case 0x10435 /* 𐐵 */: BSEQ(0xf0,0x90,0x90,0x8d) /* 𐐍 */;
+ case 0x10436 /* 𐐶 */: BSEQ(0xf0,0x90,0x90,0x8e) /* 𐐎 */;
+ case 0x10437 /* 𐐷 */: BSEQ(0xf0,0x90,0x90,0x8f) /* 𐐏 */;
+ case 0x10438 /* 𐐸 */: BSEQ(0xf0,0x90,0x90,0x90) /* 𐐐 */;
+ case 0x10439 /* 𐐹 */: BSEQ(0xf0,0x90,0x90,0x91) /* 𐐑 */;
+ case 0x1043a /* 𐐺 */: BSEQ(0xf0,0x90,0x90,0x92) /* 𐐒 */;
+ case 0x1043b /* 𐐻 */: BSEQ(0xf0,0x90,0x90,0x93) /* 𐐓 */;
+ case 0x1043c /* 𐐼 */: BSEQ(0xf0,0x90,0x90,0x94) /* 𐐔 */;
+ case 0x1043d /* 𐐽 */: BSEQ(0xf0,0x90,0x90,0x95) /* 𐐕 */;
+ case 0x1043e /* 𐐾 */: BSEQ(0xf0,0x90,0x90,0x96) /* 𐐖 */;
+ case 0x1043f /* 𐐿 */: BSEQ(0xf0,0x90,0x90,0x97) /* 𐐗 */;
+ case 0x10440 /* 𐑀 */: BSEQ(0xf0,0x90,0x90,0x98) /* 𐐘 */;
+ case 0x10441 /* 𐑁 */: BSEQ(0xf0,0x90,0x90,0x99) /* 𐐙 */;
+ case 0x10442 /* 𐑂 */: BSEQ(0xf0,0x90,0x90,0x9a) /* 𐐚 */;
+ case 0x10443 /* 𐑃 */: BSEQ(0xf0,0x90,0x90,0x9b) /* 𐐛 */;
+ case 0x10444 /* 𐑄 */: BSEQ(0xf0,0x90,0x90,0x9c) /* 𐐜 */;
+ case 0x10445 /* 𐑅 */: BSEQ(0xf0,0x90,0x90,0x9d) /* 𐐝 */;
+ case 0x10446 /* 𐑆 */: BSEQ(0xf0,0x90,0x90,0x9e) /* 𐐞 */;
+ case 0x10447 /* 𐑇 */: BSEQ(0xf0,0x90,0x90,0x9f) /* 𐐟 */;
+ case 0x10448 /* 𐑈 */: BSEQ(0xf0,0x90,0x90,0xa0) /* 𐐠 */;
+ case 0x10449 /* 𐑉 */: BSEQ(0xf0,0x90,0x90,0xa1) /* 𐐡 */;
+ case 0x1044a /* 𐑊 */: BSEQ(0xf0,0x90,0x90,0xa2) /* 𐐢 */;
+ case 0x1044b /* 𐑋 */: BSEQ(0xf0,0x90,0x90,0xa3) /* 𐐣 */;
+ case 0x1044c /* 𐑌 */: BSEQ(0xf0,0x90,0x90,0xa4) /* 𐐤 */;
+ case 0x1044d /* 𐑍 */: BSEQ(0xf0,0x90,0x90,0xa5) /* 𐐥 */;
+ case 0x1044e /* 𐑎 */: BSEQ(0xf0,0x90,0x90,0xa6) /* 𐐦 */;
+ case 0x1044f /* 𐑏 */: BSEQ(0xf0,0x90,0x90,0xa7) /* 𐐧 */;
+ case 0x104d8 /* 𐓘 */: BSEQ(0xf0,0x90,0x92,0xb0) /* 𐒰 */;
+ case 0x104d9 /* 𐓙 */: BSEQ(0xf0,0x90,0x92,0xb1) /* 𐒱 */;
+ case 0x104da /* 𐓚 */: BSEQ(0xf0,0x90,0x92,0xb2) /* 𐒲 */;
+ case 0x104db /* 𐓛 */: BSEQ(0xf0,0x90,0x92,0xb3) /* 𐒳 */;
+ case 0x104dc /* 𐓜 */: BSEQ(0xf0,0x90,0x92,0xb4) /* 𐒴 */;
+ case 0x104dd /* 𐓝 */: BSEQ(0xf0,0x90,0x92,0xb5) /* 𐒵 */;
+ case 0x104de /* 𐓞 */: BSEQ(0xf0,0x90,0x92,0xb6) /* 𐒶 */;
+ case 0x104df /* 𐓟 */: BSEQ(0xf0,0x90,0x92,0xb7) /* 𐒷 */;
+ case 0x104e0 /* 𐓠 */: BSEQ(0xf0,0x90,0x92,0xb8) /* 𐒸 */;
+ case 0x104e1 /* 𐓡 */: BSEQ(0xf0,0x90,0x92,0xb9) /* 𐒹 */;
+ case 0x104e2 /* 𐓢 */: BSEQ(0xf0,0x90,0x92,0xba) /* 𐒺 */;
+ case 0x104e3 /* 𐓣 */: BSEQ(0xf0,0x90,0x92,0xbb) /* 𐒻 */;
+ case 0x104e4 /* 𐓤 */: BSEQ(0xf0,0x90,0x92,0xbc) /* 𐒼 */;
+ case 0x104e5 /* 𐓥 */: BSEQ(0xf0,0x90,0x92,0xbd) /* 𐒽 */;
+ case 0x104e6 /* 𐓦 */: BSEQ(0xf0,0x90,0x92,0xbe) /* 𐒾 */;
+ case 0x104e7 /* 𐓧 */: BSEQ(0xf0,0x90,0x92,0xbf) /* 𐒿 */;
+ case 0x104e8 /* 𐓨 */: BSEQ(0xf0,0x90,0x93,0x80) /* 𐓀 */;
+ case 0x104e9 /* 𐓩 */: BSEQ(0xf0,0x90,0x93,0x81) /* 𐓁 */;
+ case 0x104ea /* 𐓪 */: BSEQ(0xf0,0x90,0x93,0x82) /* 𐓂 */;
+ case 0x104eb /* 𐓫 */: BSEQ(0xf0,0x90,0x93,0x83) /* 𐓃 */;
+ case 0x104ec /* 𐓬 */: BSEQ(0xf0,0x90,0x93,0x84) /* 𐓄 */;
+ case 0x104ed /* 𐓭 */: BSEQ(0xf0,0x90,0x93,0x85) /* 𐓅 */;
+ case 0x104ee /* 𐓮 */: BSEQ(0xf0,0x90,0x93,0x86) /* 𐓆 */;
+ case 0x104ef /* 𐓯 */: BSEQ(0xf0,0x90,0x93,0x87) /* 𐓇 */;
+ case 0x104f0 /* 𐓰 */: BSEQ(0xf0,0x90,0x93,0x88) /* 𐓈 */;
+ case 0x104f1 /* 𐓱 */: BSEQ(0xf0,0x90,0x93,0x89) /* 𐓉 */;
+ case 0x104f2 /* 𐓲 */: BSEQ(0xf0,0x90,0x93,0x8a) /* 𐓊 */;
+ case 0x104f3 /* 𐓳 */: BSEQ(0xf0,0x90,0x93,0x8b) /* 𐓋 */;
+ case 0x104f4 /* 𐓴 */: BSEQ(0xf0,0x90,0x93,0x8c) /* 𐓌 */;
+ case 0x104f5 /* 𐓵 */: BSEQ(0xf0,0x90,0x93,0x8d) /* 𐓍 */;
+ case 0x104f6 /* 𐓶 */: BSEQ(0xf0,0x90,0x93,0x8e) /* 𐓎 */;
+ case 0x104f7 /* 𐓷 */: BSEQ(0xf0,0x90,0x93,0x8f) /* 𐓏 */;
+ case 0x104f8 /* 𐓸 */: BSEQ(0xf0,0x90,0x93,0x90) /* 𐓐 */;
+ case 0x104f9 /* 𐓹 */: BSEQ(0xf0,0x90,0x93,0x91) /* 𐓑 */;
+ case 0x104fa /* 𐓺 */: BSEQ(0xf0,0x90,0x93,0x92) /* 𐓒 */;
+ case 0x104fb /* 𐓻 */: BSEQ(0xf0,0x90,0x93,0x93) /* 𐓓 */;
+ case 0x10cc0 /* 𐳀 */: BSEQ(0xf0,0x90,0xb2,0x80) /* 𐲀 */;
+ case 0x10cc1 /* 𐳁 */: BSEQ(0xf0,0x90,0xb2,0x81) /* 𐲁 */;
+ case 0x10cc2 /* 𐳂 */: BSEQ(0xf0,0x90,0xb2,0x82) /* 𐲂 */;
+ case 0x10cc3 /* 𐳃 */: BSEQ(0xf0,0x90,0xb2,0x83) /* 𐲃 */;
+ case 0x10cc4 /* 𐳄 */: BSEQ(0xf0,0x90,0xb2,0x84) /* 𐲄 */;
+ case 0x10cc5 /* 𐳅 */: BSEQ(0xf0,0x90,0xb2,0x85) /* 𐲅 */;
+ case 0x10cc6 /* 𐳆 */: BSEQ(0xf0,0x90,0xb2,0x86) /* 𐲆 */;
+ case 0x10cc7 /* 𐳇 */: BSEQ(0xf0,0x90,0xb2,0x87) /* 𐲇 */;
+ case 0x10cc8 /* 𐳈 */: BSEQ(0xf0,0x90,0xb2,0x88) /* 𐲈 */;
+ case 0x10cc9 /* 𐳉 */: BSEQ(0xf0,0x90,0xb2,0x89) /* 𐲉 */;
+ case 0x10cca /* 𐳊 */: BSEQ(0xf0,0x90,0xb2,0x8a) /* 𐲊 */;
+ case 0x10ccb /* 𐳋 */: BSEQ(0xf0,0x90,0xb2,0x8b) /* 𐲋 */;
+ case 0x10ccc /* 𐳌 */: BSEQ(0xf0,0x90,0xb2,0x8c) /* 𐲌 */;
+ case 0x10ccd /* 𐳍 */: BSEQ(0xf0,0x90,0xb2,0x8d) /* 𐲍 */;
+ case 0x10cce /* 𐳎 */: BSEQ(0xf0,0x90,0xb2,0x8e) /* 𐲎 */;
+ case 0x10ccf /* 𐳏 */: BSEQ(0xf0,0x90,0xb2,0x8f) /* 𐲏 */;
+ case 0x10cd0 /* 𐳐 */: BSEQ(0xf0,0x90,0xb2,0x90) /* 𐲐 */;
+ case 0x10cd1 /* 𐳑 */: BSEQ(0xf0,0x90,0xb2,0x91) /* 𐲑 */;
+ case 0x10cd2 /* 𐳒 */: BSEQ(0xf0,0x90,0xb2,0x92) /* 𐲒 */;
+ case 0x10cd3 /* 𐳓 */: BSEQ(0xf0,0x90,0xb2,0x93) /* 𐲓 */;
+ case 0x10cd4 /* 𐳔 */: BSEQ(0xf0,0x90,0xb2,0x94) /* 𐲔 */;
+ case 0x10cd5 /* 𐳕 */: BSEQ(0xf0,0x90,0xb2,0x95) /* 𐲕 */;
+ case 0x10cd6 /* 𐳖 */: BSEQ(0xf0,0x90,0xb2,0x96) /* 𐲖 */;
+ case 0x10cd7 /* 𐳗 */: BSEQ(0xf0,0x90,0xb2,0x97) /* 𐲗 */;
+ case 0x10cd8 /* 𐳘 */: BSEQ(0xf0,0x90,0xb2,0x98) /* 𐲘 */;
+ case 0x10cd9 /* 𐳙 */: BSEQ(0xf0,0x90,0xb2,0x99) /* 𐲙 */;
+ case 0x10cda /* 𐳚 */: BSEQ(0xf0,0x90,0xb2,0x9a) /* 𐲚 */;
+ case 0x10cdb /* 𐳛 */: BSEQ(0xf0,0x90,0xb2,0x9b) /* 𐲛 */;
+ case 0x10cdc /* 𐳜 */: BSEQ(0xf0,0x90,0xb2,0x9c) /* 𐲜 */;
+ case 0x10cdd /* 𐳝 */: BSEQ(0xf0,0x90,0xb2,0x9d) /* 𐲝 */;
+ case 0x10cde /* 𐳞 */: BSEQ(0xf0,0x90,0xb2,0x9e) /* 𐲞 */;
+ case 0x10cdf /* 𐳟 */: BSEQ(0xf0,0x90,0xb2,0x9f) /* 𐲟 */;
+ case 0x10ce0 /* 𐳠 */: BSEQ(0xf0,0x90,0xb2,0xa0) /* 𐲠 */;
+ case 0x10ce1 /* 𐳡 */: BSEQ(0xf0,0x90,0xb2,0xa1) /* 𐲡 */;
+ case 0x10ce2 /* 𐳢 */: BSEQ(0xf0,0x90,0xb2,0xa2) /* 𐲢 */;
+ case 0x10ce3 /* 𐳣 */: BSEQ(0xf0,0x90,0xb2,0xa3) /* 𐲣 */;
+ case 0x10ce4 /* 𐳤 */: BSEQ(0xf0,0x90,0xb2,0xa4) /* 𐲤 */;
+ case 0x10ce5 /* 𐳥 */: BSEQ(0xf0,0x90,0xb2,0xa5) /* 𐲥 */;
+ case 0x10ce6 /* 𐳦 */: BSEQ(0xf0,0x90,0xb2,0xa6) /* 𐲦 */;
+ case 0x10ce7 /* 𐳧 */: BSEQ(0xf0,0x90,0xb2,0xa7) /* 𐲧 */;
+ case 0x10ce8 /* 𐳨 */: BSEQ(0xf0,0x90,0xb2,0xa8) /* 𐲨 */;
+ case 0x10ce9 /* 𐳩 */: BSEQ(0xf0,0x90,0xb2,0xa9) /* 𐲩 */;
+ case 0x10cea /* 𐳪 */: BSEQ(0xf0,0x90,0xb2,0xaa) /* 𐲪 */;
+ case 0x10ceb /* 𐳫 */: BSEQ(0xf0,0x90,0xb2,0xab) /* 𐲫 */;
+ case 0x10cec /* 𐳬 */: BSEQ(0xf0,0x90,0xb2,0xac) /* 𐲬 */;
+ case 0x10ced /* 𐳭 */: BSEQ(0xf0,0x90,0xb2,0xad) /* 𐲭 */;
+ case 0x10cee /* 𐳮 */: BSEQ(0xf0,0x90,0xb2,0xae) /* 𐲮 */;
+ case 0x10cef /* 𐳯 */: BSEQ(0xf0,0x90,0xb2,0xaf) /* 𐲯 */;
+ case 0x10cf0 /* 𐳰 */: BSEQ(0xf0,0x90,0xb2,0xb0) /* 𐲰 */;
+ case 0x10cf1 /* 𐳱 */: BSEQ(0xf0,0x90,0xb2,0xb1) /* 𐲱 */;
+ case 0x10cf2 /* 𐳲 */: BSEQ(0xf0,0x90,0xb2,0xb2) /* 𐲲 */;
+ case 0x118c0 /* 𑣀 */: BSEQ(0xf0,0x91,0xa2,0xa0) /* 𑢠 */;
+ case 0x118c1 /* 𑣁 */: BSEQ(0xf0,0x91,0xa2,0xa1) /* 𑢡 */;
+ case 0x118c2 /* 𑣂 */: BSEQ(0xf0,0x91,0xa2,0xa2) /* 𑢢 */;
+ case 0x118c3 /* 𑣃 */: BSEQ(0xf0,0x91,0xa2,0xa3) /* 𑢣 */;
+ case 0x118c4 /* 𑣄 */: BSEQ(0xf0,0x91,0xa2,0xa4) /* 𑢤 */;
+ case 0x118c5 /* 𑣅 */: BSEQ(0xf0,0x91,0xa2,0xa5) /* 𑢥 */;
+ case 0x118c6 /* 𑣆 */: BSEQ(0xf0,0x91,0xa2,0xa6) /* 𑢦 */;
+ case 0x118c7 /* 𑣇 */: BSEQ(0xf0,0x91,0xa2,0xa7) /* 𑢧 */;
+ case 0x118c8 /* 𑣈 */: BSEQ(0xf0,0x91,0xa2,0xa8) /* 𑢨 */;
+ case 0x118c9 /* 𑣉 */: BSEQ(0xf0,0x91,0xa2,0xa9) /* 𑢩 */;
+ case 0x118ca /* 𑣊 */: BSEQ(0xf0,0x91,0xa2,0xaa) /* 𑢪 */;
+ case 0x118cb /* 𑣋 */: BSEQ(0xf0,0x91,0xa2,0xab) /* 𑢫 */;
+ case 0x118cc /* 𑣌 */: BSEQ(0xf0,0x91,0xa2,0xac) /* 𑢬 */;
+ case 0x118cd /* 𑣍 */: BSEQ(0xf0,0x91,0xa2,0xad) /* 𑢭 */;
+ case 0x118ce /* 𑣎 */: BSEQ(0xf0,0x91,0xa2,0xae) /* 𑢮 */;
+ case 0x118cf /* 𑣏 */: BSEQ(0xf0,0x91,0xa2,0xaf) /* 𑢯 */;
+ case 0x118d0 /* 𑣐 */: BSEQ(0xf0,0x91,0xa2,0xb0) /* 𑢰 */;
+ case 0x118d1 /* 𑣑 */: BSEQ(0xf0,0x91,0xa2,0xb1) /* 𑢱 */;
+ case 0x118d2 /* 𑣒 */: BSEQ(0xf0,0x91,0xa2,0xb2) /* 𑢲 */;
+ case 0x118d3 /* 𑣓 */: BSEQ(0xf0,0x91,0xa2,0xb3) /* 𑢳 */;
+ case 0x118d4 /* 𑣔 */: BSEQ(0xf0,0x91,0xa2,0xb4) /* 𑢴 */;
+ case 0x118d5 /* 𑣕 */: BSEQ(0xf0,0x91,0xa2,0xb5) /* 𑢵 */;
+ case 0x118d6 /* 𑣖 */: BSEQ(0xf0,0x91,0xa2,0xb6) /* 𑢶 */;
+ case 0x118d7 /* 𑣗 */: BSEQ(0xf0,0x91,0xa2,0xb7) /* 𑢷 */;
+ case 0x118d8 /* 𑣘 */: BSEQ(0xf0,0x91,0xa2,0xb8) /* 𑢸 */;
+ case 0x118d9 /* 𑣙 */: BSEQ(0xf0,0x91,0xa2,0xb9) /* 𑢹 */;
+ case 0x118da /* 𑣚 */: BSEQ(0xf0,0x91,0xa2,0xba) /* 𑢺 */;
+ case 0x118db /* 𑣛 */: BSEQ(0xf0,0x91,0xa2,0xbb) /* 𑢻 */;
+ case 0x118dc /* 𑣜 */: BSEQ(0xf0,0x91,0xa2,0xbc) /* 𑢼 */;
+ case 0x118dd /* 𑣝 */: BSEQ(0xf0,0x91,0xa2,0xbd) /* 𑢽 */;
+ case 0x118de /* 𑣞 */: BSEQ(0xf0,0x91,0xa2,0xbe) /* 𑢾 */;
+ case 0x118df /* 𑣟 */: BSEQ(0xf0,0x91,0xa2,0xbf) /* 𑢿 */;
+ case 0x16e60 /* 𖹠 */: BSEQ(0xf0,0x96,0xb9,0x80) /* 𖹀 */;
+ case 0x16e61 /* 𖹡 */: BSEQ(0xf0,0x96,0xb9,0x81) /* 𖹁 */;
+ case 0x16e62 /* 𖹢 */: BSEQ(0xf0,0x96,0xb9,0x82) /* 𖹂 */;
+ case 0x16e63 /* 𖹣 */: BSEQ(0xf0,0x96,0xb9,0x83) /* 𖹃 */;
+ case 0x16e64 /* 𖹤 */: BSEQ(0xf0,0x96,0xb9,0x84) /* 𖹄 */;
+ case 0x16e65 /* 𖹥 */: BSEQ(0xf0,0x96,0xb9,0x85) /* 𖹅 */;
+ case 0x16e66 /* 𖹦 */: BSEQ(0xf0,0x96,0xb9,0x86) /* 𖹆 */;
+ case 0x16e67 /* 𖹧 */: BSEQ(0xf0,0x96,0xb9,0x87) /* 𖹇 */;
+ case 0x16e68 /* 𖹨 */: BSEQ(0xf0,0x96,0xb9,0x88) /* 𖹈 */;
+ case 0x16e69 /* 𖹩 */: BSEQ(0xf0,0x96,0xb9,0x89) /* 𖹉 */;
+ case 0x16e6a /* 𖹪 */: BSEQ(0xf0,0x96,0xb9,0x8a) /* 𖹊 */;
+ case 0x16e6b /* 𖹫 */: BSEQ(0xf0,0x96,0xb9,0x8b) /* 𖹋 */;
+ case 0x16e6c /* 𖹬 */: BSEQ(0xf0,0x96,0xb9,0x8c) /* 𖹌 */;
+ case 0x16e6d /* 𖹭 */: BSEQ(0xf0,0x96,0xb9,0x8d) /* 𖹍 */;
+ case 0x16e6e /* 𖹮 */: BSEQ(0xf0,0x96,0xb9,0x8e) /* 𖹎 */;
+ case 0x16e6f /* 𖹯 */: BSEQ(0xf0,0x96,0xb9,0x8f) /* 𖹏 */;
+ case 0x16e70 /* 𖹰 */: BSEQ(0xf0,0x96,0xb9,0x90) /* 𖹐 */;
+ case 0x16e71 /* 𖹱 */: BSEQ(0xf0,0x96,0xb9,0x91) /* 𖹑 */;
+ case 0x16e72 /* 𖹲 */: BSEQ(0xf0,0x96,0xb9,0x92) /* 𖹒 */;
+ case 0x16e73 /* 𖹳 */: BSEQ(0xf0,0x96,0xb9,0x93) /* 𖹓 */;
+ case 0x16e74 /* 𖹴 */: BSEQ(0xf0,0x96,0xb9,0x94) /* 𖹔 */;
+ case 0x16e75 /* 𖹵 */: BSEQ(0xf0,0x96,0xb9,0x95) /* 𖹕 */;
+ case 0x16e76 /* 𖹶 */: BSEQ(0xf0,0x96,0xb9,0x96) /* 𖹖 */;
+ case 0x16e77 /* 𖹷 */: BSEQ(0xf0,0x96,0xb9,0x97) /* 𖹗 */;
+ case 0x16e78 /* 𖹸 */: BSEQ(0xf0,0x96,0xb9,0x98) /* 𖹘 */;
+ case 0x16e79 /* 𖹹 */: BSEQ(0xf0,0x96,0xb9,0x99) /* 𖹙 */;
+ case 0x16e7a /* 𖹺 */: BSEQ(0xf0,0x96,0xb9,0x9a) /* 𖹚 */;
+ case 0x16e7b /* 𖹻 */: BSEQ(0xf0,0x96,0xb9,0x9b) /* 𖹛 */;
+ case 0x16e7c /* 𖹼 */: BSEQ(0xf0,0x96,0xb9,0x9c) /* 𖹜 */;
+ case 0x16e7d /* 𖹽 */: BSEQ(0xf0,0x96,0xb9,0x9d) /* 𖹝 */;
+ case 0x16e7e /* 𖹾 */: BSEQ(0xf0,0x96,0xb9,0x9e) /* 𖹞 */;
+ case 0x16e7f /* 𖹿 */: BSEQ(0xf0,0x96,0xb9,0x9f) /* 𖹟 */;
+ case 0x1e922 /* 𞤢 */: BSEQ(0xf0,0x9e,0xa4,0x80) /* 𞤀 */;
+ case 0x1e923 /* 𞤣 */: BSEQ(0xf0,0x9e,0xa4,0x81) /* 𞤁 */;
+ case 0x1e924 /* 𞤤 */: BSEQ(0xf0,0x9e,0xa4,0x82) /* 𞤂 */;
+ case 0x1e925 /* 𞤥 */: BSEQ(0xf0,0x9e,0xa4,0x83) /* 𞤃 */;
+ case 0x1e926 /* 𞤦 */: BSEQ(0xf0,0x9e,0xa4,0x84) /* 𞤄 */;
+ case 0x1e927 /* 𞤧 */: BSEQ(0xf0,0x9e,0xa4,0x85) /* 𞤅 */;
+ case 0x1e928 /* 𞤨 */: BSEQ(0xf0,0x9e,0xa4,0x86) /* 𞤆 */;
+ case 0x1e929 /* 𞤩 */: BSEQ(0xf0,0x9e,0xa4,0x87) /* 𞤇 */;
+ case 0x1e92a /* 𞤪 */: BSEQ(0xf0,0x9e,0xa4,0x88) /* 𞤈 */;
+ case 0x1e92b /* 𞤫 */: BSEQ(0xf0,0x9e,0xa4,0x89) /* 𞤉 */;
+ case 0x1e92c /* 𞤬 */: BSEQ(0xf0,0x9e,0xa4,0x8a) /* 𞤊 */;
+ case 0x1e92d /* 𞤭 */: BSEQ(0xf0,0x9e,0xa4,0x8b) /* 𞤋 */;
+ case 0x1e92e /* 𞤮 */: BSEQ(0xf0,0x9e,0xa4,0x8c) /* 𞤌 */;
+ case 0x1e92f /* 𞤯 */: BSEQ(0xf0,0x9e,0xa4,0x8d) /* 𞤍 */;
+ case 0x1e930 /* 𞤰 */: BSEQ(0xf0,0x9e,0xa4,0x8e) /* 𞤎 */;
+ case 0x1e931 /* 𞤱 */: BSEQ(0xf0,0x9e,0xa4,0x8f) /* 𞤏 */;
+ case 0x1e932 /* 𞤲 */: BSEQ(0xf0,0x9e,0xa4,0x90) /* 𞤐 */;
+ case 0x1e933 /* 𞤳 */: BSEQ(0xf0,0x9e,0xa4,0x91) /* 𞤑 */;
+ case 0x1e934 /* 𞤴 */: BSEQ(0xf0,0x9e,0xa4,0x92) /* 𞤒 */;
+ case 0x1e935 /* 𞤵 */: BSEQ(0xf0,0x9e,0xa4,0x93) /* 𞤓 */;
+ case 0x1e936 /* 𞤶 */: BSEQ(0xf0,0x9e,0xa4,0x94) /* 𞤔 */;
+ case 0x1e937 /* 𞤷 */: BSEQ(0xf0,0x9e,0xa4,0x95) /* 𞤕 */;
+ case 0x1e938 /* 𞤸 */: BSEQ(0xf0,0x9e,0xa4,0x96) /* 𞤖 */;
+ case 0x1e939 /* 𞤹 */: BSEQ(0xf0,0x9e,0xa4,0x97) /* 𞤗 */;
+ case 0x1e93a /* 𞤺 */: BSEQ(0xf0,0x9e,0xa4,0x98) /* 𞤘 */;
+ case 0x1e93b /* 𞤻 */: BSEQ(0xf0,0x9e,0xa4,0x99) /* 𞤙 */;
+ case 0x1e93c /* 𞤼 */: BSEQ(0xf0,0x9e,0xa4,0x9a) /* 𞤚 */;
+ case 0x1e93d /* 𞤽 */: BSEQ(0xf0,0x9e,0xa4,0x9b) /* 𞤛 */;
+ case 0x1e93e /* 𞤾 */: BSEQ(0xf0,0x9e,0xa4,0x9c) /* 𞤜 */;
+ case 0x1e93f /* 𞤿 */: BSEQ(0xf0,0x9e,0xa4,0x9d) /* 𞤝 */;
+ case 0x1e940 /* 𞥀 */: BSEQ(0xf0,0x9e,0xa4,0x9e) /* 𞤞 */;
+ case 0x1e941 /* 𞥁 */: BSEQ(0xf0,0x9e,0xa4,0x9f) /* 𞤟 */;
+ case 0x1e942 /* 𞥂 */: BSEQ(0xf0,0x9e,0xa4,0xa0) /* 𞤠 */;
+ case 0x1e943 /* 𞥃 */: BSEQ(0xf0,0x9e,0xa4,0xa1) /* 𞤡 */;
+ default: return nullptr;
+ }
+}
+
+inline const char *convertUnicodeToLower(uint32_t code)
+{
+ switch(code)
+ {
+ case 0x41 /* A */: BSEQ(0x61) /* a */;
+ case 0x42 /* B */: BSEQ(0x62) /* b */;
+ case 0x43 /* C */: BSEQ(0x63) /* c */;
+ case 0x44 /* D */: BSEQ(0x64) /* d */;
+ case 0x45 /* E */: BSEQ(0x65) /* e */;
+ case 0x46 /* F */: BSEQ(0x66) /* f */;
+ case 0x47 /* G */: BSEQ(0x67) /* g */;
+ case 0x48 /* H */: BSEQ(0x68) /* h */;
+ case 0x49 /* I */: BSEQ(0x69) /* i */;
+ case 0x4a /* J */: BSEQ(0x6a) /* j */;
+ case 0x4b /* K */: BSEQ(0x6b) /* k */;
+ case 0x4c /* L */: BSEQ(0x6c) /* l */;
+ case 0x4d /* M */: BSEQ(0x6d) /* m */;
+ case 0x4e /* N */: BSEQ(0x6e) /* n */;
+ case 0x4f /* O */: BSEQ(0x6f) /* o */;
+ case 0x50 /* P */: BSEQ(0x70) /* p */;
+ case 0x51 /* Q */: BSEQ(0x71) /* q */;
+ case 0x52 /* R */: BSEQ(0x72) /* r */;
+ case 0x53 /* S */: BSEQ(0x73) /* s */;
+ case 0x54 /* T */: BSEQ(0x74) /* t */;
+ case 0x55 /* U */: BSEQ(0x75) /* u */;
+ case 0x56 /* V */: BSEQ(0x76) /* v */;
+ case 0x57 /* W */: BSEQ(0x77) /* w */;
+ case 0x58 /* X */: BSEQ(0x78) /* x */;
+ case 0x59 /* Y */: BSEQ(0x79) /* y */;
+ case 0x5a /* Z */: BSEQ(0x7a) /* z */;
+ case 0xc0 /* À */: BSEQ(0xc3,0xa0) /* à */;
+ case 0xc1 /* Á */: BSEQ(0xc3,0xa1) /* á */;
+ case 0xc2 /* Â */: BSEQ(0xc3,0xa2) /* â */;
+ case 0xc3 /* Ã */: BSEQ(0xc3,0xa3) /* ã */;
+ case 0xc4 /* Ä */: BSEQ(0xc3,0xa4) /* ä */;
+ case 0xc5 /* Å */: BSEQ(0xc3,0xa5) /* å */;
+ case 0xc6 /* Æ */: BSEQ(0xc3,0xa6) /* æ */;
+ case 0xc7 /* Ç */: BSEQ(0xc3,0xa7) /* ç */;
+ case 0xc8 /* È */: BSEQ(0xc3,0xa8) /* è */;
+ case 0xc9 /* É */: BSEQ(0xc3,0xa9) /* é */;
+ case 0xca /* Ê */: BSEQ(0xc3,0xaa) /* ê */;
+ case 0xcb /* Ë */: BSEQ(0xc3,0xab) /* ë */;
+ case 0xcc /* Ì */: BSEQ(0xc3,0xac) /* ì */;
+ case 0xcd /* Í */: BSEQ(0xc3,0xad) /* í */;
+ case 0xce /* Î */: BSEQ(0xc3,0xae) /* î */;
+ case 0xcf /* Ï */: BSEQ(0xc3,0xaf) /* ï */;
+ case 0xd0 /* Ð */: BSEQ(0xc3,0xb0) /* ð */;
+ case 0xd1 /* Ñ */: BSEQ(0xc3,0xb1) /* ñ */;
+ case 0xd2 /* Ò */: BSEQ(0xc3,0xb2) /* ò */;
+ case 0xd3 /* Ó */: BSEQ(0xc3,0xb3) /* ó */;
+ case 0xd4 /* Ô */: BSEQ(0xc3,0xb4) /* ô */;
+ case 0xd5 /* Õ */: BSEQ(0xc3,0xb5) /* õ */;
+ case 0xd6 /* Ö */: BSEQ(0xc3,0xb6) /* ö */;
+ case 0xd8 /* Ø */: BSEQ(0xc3,0xb8) /* ø */;
+ case 0xd9 /* Ù */: BSEQ(0xc3,0xb9) /* ù */;
+ case 0xda /* Ú */: BSEQ(0xc3,0xba) /* ú */;
+ case 0xdb /* Û */: BSEQ(0xc3,0xbb) /* û */;
+ case 0xdc /* Ü */: BSEQ(0xc3,0xbc) /* ü */;
+ case 0xdd /* Ý */: BSEQ(0xc3,0xbd) /* ý */;
+ case 0xde /* Þ */: BSEQ(0xc3,0xbe) /* þ */;
+ case 0x100 /* Ā */: BSEQ(0xc4,0x81) /* ā */;
+ case 0x102 /* Ă */: BSEQ(0xc4,0x83) /* ă */;
+ case 0x104 /* Ą */: BSEQ(0xc4,0x85) /* ą */;
+ case 0x106 /* Ć */: BSEQ(0xc4,0x87) /* ć */;
+ case 0x108 /* Ĉ */: BSEQ(0xc4,0x89) /* ĉ */;
+ case 0x10a /* Ċ */: BSEQ(0xc4,0x8b) /* ċ */;
+ case 0x10c /* Č */: BSEQ(0xc4,0x8d) /* č */;
+ case 0x10e /* Ď */: BSEQ(0xc4,0x8f) /* ď */;
+ case 0x110 /* Đ */: BSEQ(0xc4,0x91) /* đ */;
+ case 0x112 /* Ē */: BSEQ(0xc4,0x93) /* ē */;
+ case 0x114 /* Ĕ */: BSEQ(0xc4,0x95) /* ĕ */;
+ case 0x116 /* Ė */: BSEQ(0xc4,0x97) /* ė */;
+ case 0x118 /* Ę */: BSEQ(0xc4,0x99) /* ę */;
+ case 0x11a /* Ě */: BSEQ(0xc4,0x9b) /* ě */;
+ case 0x11c /* Ĝ */: BSEQ(0xc4,0x9d) /* ĝ */;
+ case 0x11e /* Ğ */: BSEQ(0xc4,0x9f) /* ğ */;
+ case 0x120 /* Ġ */: BSEQ(0xc4,0xa1) /* ġ */;
+ case 0x122 /* Ģ */: BSEQ(0xc4,0xa3) /* ģ */;
+ case 0x124 /* Ĥ */: BSEQ(0xc4,0xa5) /* ĥ */;
+ case 0x126 /* Ħ */: BSEQ(0xc4,0xa7) /* ħ */;
+ case 0x128 /* Ĩ */: BSEQ(0xc4,0xa9) /* ĩ */;
+ case 0x12a /* Ī */: BSEQ(0xc4,0xab) /* ī */;
+ case 0x12c /* Ĭ */: BSEQ(0xc4,0xad) /* ĭ */;
+ case 0x12e /* Į */: BSEQ(0xc4,0xaf) /* į */;
+ case 0x130 /* İ */: BSEQ(0x69,0xcc,0x87) /* i̇ */;
+ case 0x132 /* IJ */: BSEQ(0xc4,0xb3) /* ij */;
+ case 0x134 /* Ĵ */: BSEQ(0xc4,0xb5) /* ĵ */;
+ case 0x136 /* Ķ */: BSEQ(0xc4,0xb7) /* ķ */;
+ case 0x139 /* Ĺ */: BSEQ(0xc4,0xba) /* ĺ */;
+ case 0x13b /* Ļ */: BSEQ(0xc4,0xbc) /* ļ */;
+ case 0x13d /* Ľ */: BSEQ(0xc4,0xbe) /* ľ */;
+ case 0x13f /* Ŀ */: BSEQ(0xc5,0x80) /* ŀ */;
+ case 0x141 /* Ł */: BSEQ(0xc5,0x82) /* ł */;
+ case 0x143 /* Ń */: BSEQ(0xc5,0x84) /* ń */;
+ case 0x145 /* Ņ */: BSEQ(0xc5,0x86) /* ņ */;
+ case 0x147 /* Ň */: BSEQ(0xc5,0x88) /* ň */;
+ case 0x14a /* Ŋ */: BSEQ(0xc5,0x8b) /* ŋ */;
+ case 0x14c /* Ō */: BSEQ(0xc5,0x8d) /* ō */;
+ case 0x14e /* Ŏ */: BSEQ(0xc5,0x8f) /* ŏ */;
+ case 0x150 /* Ő */: BSEQ(0xc5,0x91) /* ő */;
+ case 0x152 /* Œ */: BSEQ(0xc5,0x93) /* œ */;
+ case 0x154 /* Ŕ */: BSEQ(0xc5,0x95) /* ŕ */;
+ case 0x156 /* Ŗ */: BSEQ(0xc5,0x97) /* ŗ */;
+ case 0x158 /* Ř */: BSEQ(0xc5,0x99) /* ř */;
+ case 0x15a /* Ś */: BSEQ(0xc5,0x9b) /* ś */;
+ case 0x15c /* Ŝ */: BSEQ(0xc5,0x9d) /* ŝ */;
+ case 0x15e /* Ş */: BSEQ(0xc5,0x9f) /* ş */;
+ case 0x160 /* Š */: BSEQ(0xc5,0xa1) /* š */;
+ case 0x162 /* Ţ */: BSEQ(0xc5,0xa3) /* ţ */;
+ case 0x164 /* Ť */: BSEQ(0xc5,0xa5) /* ť */;
+ case 0x166 /* Ŧ */: BSEQ(0xc5,0xa7) /* ŧ */;
+ case 0x168 /* Ũ */: BSEQ(0xc5,0xa9) /* ũ */;
+ case 0x16a /* Ū */: BSEQ(0xc5,0xab) /* ū */;
+ case 0x16c /* Ŭ */: BSEQ(0xc5,0xad) /* ŭ */;
+ case 0x16e /* Ů */: BSEQ(0xc5,0xaf) /* ů */;
+ case 0x170 /* Ű */: BSEQ(0xc5,0xb1) /* ű */;
+ case 0x172 /* Ų */: BSEQ(0xc5,0xb3) /* ų */;
+ case 0x174 /* Ŵ */: BSEQ(0xc5,0xb5) /* ŵ */;
+ case 0x176 /* Ŷ */: BSEQ(0xc5,0xb7) /* ŷ */;
+ case 0x178 /* Ÿ */: BSEQ(0xc3,0xbf) /* ÿ */;
+ case 0x179 /* Ź */: BSEQ(0xc5,0xba) /* ź */;
+ case 0x17b /* Ż */: BSEQ(0xc5,0xbc) /* ż */;
+ case 0x17d /* Ž */: BSEQ(0xc5,0xbe) /* ž */;
+ case 0x181 /* Ɓ */: BSEQ(0xc9,0x93) /* ɓ */;
+ case 0x182 /* Ƃ */: BSEQ(0xc6,0x83) /* ƃ */;
+ case 0x184 /* Ƅ */: BSEQ(0xc6,0x85) /* ƅ */;
+ case 0x186 /* Ɔ */: BSEQ(0xc9,0x94) /* ɔ */;
+ case 0x187 /* Ƈ */: BSEQ(0xc6,0x88) /* ƈ */;
+ case 0x189 /* Ɖ */: BSEQ(0xc9,0x96) /* ɖ */;
+ case 0x18a /* Ɗ */: BSEQ(0xc9,0x97) /* ɗ */;
+ case 0x18b /* Ƌ */: BSEQ(0xc6,0x8c) /* ƌ */;
+ case 0x18e /* Ǝ */: BSEQ(0xc7,0x9d) /* ǝ */;
+ case 0x18f /* Ə */: BSEQ(0xc9,0x99) /* ə */;
+ case 0x190 /* Ɛ */: BSEQ(0xc9,0x9b) /* ɛ */;
+ case 0x191 /* Ƒ */: BSEQ(0xc6,0x92) /* ƒ */;
+ case 0x193 /* Ɠ */: BSEQ(0xc9,0xa0) /* ɠ */;
+ case 0x194 /* Ɣ */: BSEQ(0xc9,0xa3) /* ɣ */;
+ case 0x196 /* Ɩ */: BSEQ(0xc9,0xa9) /* ɩ */;
+ case 0x197 /* Ɨ */: BSEQ(0xc9,0xa8) /* ɨ */;
+ case 0x198 /* Ƙ */: BSEQ(0xc6,0x99) /* ƙ */;
+ case 0x19c /* Ɯ */: BSEQ(0xc9,0xaf) /* ɯ */;
+ case 0x19d /* Ɲ */: BSEQ(0xc9,0xb2) /* ɲ */;
+ case 0x19f /* Ɵ */: BSEQ(0xc9,0xb5) /* ɵ */;
+ case 0x1a0 /* Ơ */: BSEQ(0xc6,0xa1) /* ơ */;
+ case 0x1a2 /* Ƣ */: BSEQ(0xc6,0xa3) /* ƣ */;
+ case 0x1a4 /* Ƥ */: BSEQ(0xc6,0xa5) /* ƥ */;
+ case 0x1a6 /* Ʀ */: BSEQ(0xca,0x80) /* ʀ */;
+ case 0x1a7 /* Ƨ */: BSEQ(0xc6,0xa8) /* ƨ */;
+ case 0x1a9 /* Ʃ */: BSEQ(0xca,0x83) /* ʃ */;
+ case 0x1ac /* Ƭ */: BSEQ(0xc6,0xad) /* ƭ */;
+ case 0x1ae /* Ʈ */: BSEQ(0xca,0x88) /* ʈ */;
+ case 0x1af /* Ư */: BSEQ(0xc6,0xb0) /* ư */;
+ case 0x1b1 /* Ʊ */: BSEQ(0xca,0x8a) /* ʊ */;
+ case 0x1b2 /* Ʋ */: BSEQ(0xca,0x8b) /* ʋ */;
+ case 0x1b3 /* Ƴ */: BSEQ(0xc6,0xb4) /* ƴ */;
+ case 0x1b5 /* Ƶ */: BSEQ(0xc6,0xb6) /* ƶ */;
+ case 0x1b7 /* Ʒ */: BSEQ(0xca,0x92) /* ʒ */;
+ case 0x1b8 /* Ƹ */: BSEQ(0xc6,0xb9) /* ƹ */;
+ case 0x1bc /* Ƽ */: BSEQ(0xc6,0xbd) /* ƽ */;
+ case 0x1c4 /* DŽ */: BSEQ(0xc7,0x86) /* dž */;
+ case 0x1c5 /* Dž */: BSEQ(0xc7,0x86) /* dž */;
+ case 0x1c7 /* LJ */: BSEQ(0xc7,0x89) /* lj */;
+ case 0x1c8 /* Lj */: BSEQ(0xc7,0x89) /* lj */;
+ case 0x1ca /* NJ */: BSEQ(0xc7,0x8c) /* nj */;
+ case 0x1cb /* Nj */: BSEQ(0xc7,0x8c) /* nj */;
+ case 0x1cd /* Ǎ */: BSEQ(0xc7,0x8e) /* ǎ */;
+ case 0x1cf /* Ǐ */: BSEQ(0xc7,0x90) /* ǐ */;
+ case 0x1d1 /* Ǒ */: BSEQ(0xc7,0x92) /* ǒ */;
+ case 0x1d3 /* Ǔ */: BSEQ(0xc7,0x94) /* ǔ */;
+ case 0x1d5 /* Ǖ */: BSEQ(0xc7,0x96) /* ǖ */;
+ case 0x1d7 /* Ǘ */: BSEQ(0xc7,0x98) /* ǘ */;
+ case 0x1d9 /* Ǚ */: BSEQ(0xc7,0x9a) /* ǚ */;
+ case 0x1db /* Ǜ */: BSEQ(0xc7,0x9c) /* ǜ */;
+ case 0x1de /* Ǟ */: BSEQ(0xc7,0x9f) /* ǟ */;
+ case 0x1e0 /* Ǡ */: BSEQ(0xc7,0xa1) /* ǡ */;
+ case 0x1e2 /* Ǣ */: BSEQ(0xc7,0xa3) /* ǣ */;
+ case 0x1e4 /* Ǥ */: BSEQ(0xc7,0xa5) /* ǥ */;
+ case 0x1e6 /* Ǧ */: BSEQ(0xc7,0xa7) /* ǧ */;
+ case 0x1e8 /* Ǩ */: BSEQ(0xc7,0xa9) /* ǩ */;
+ case 0x1ea /* Ǫ */: BSEQ(0xc7,0xab) /* ǫ */;
+ case 0x1ec /* Ǭ */: BSEQ(0xc7,0xad) /* ǭ */;
+ case 0x1ee /* Ǯ */: BSEQ(0xc7,0xaf) /* ǯ */;
+ case 0x1f1 /* DZ */: BSEQ(0xc7,0xb3) /* dz */;
+ case 0x1f2 /* Dz */: BSEQ(0xc7,0xb3) /* dz */;
+ case 0x1f4 /* Ǵ */: BSEQ(0xc7,0xb5) /* ǵ */;
+ case 0x1f6 /* Ƕ */: BSEQ(0xc6,0x95) /* ƕ */;
+ case 0x1f7 /* Ƿ */: BSEQ(0xc6,0xbf) /* ƿ */;
+ case 0x1f8 /* Ǹ */: BSEQ(0xc7,0xb9) /* ǹ */;
+ case 0x1fa /* Ǻ */: BSEQ(0xc7,0xbb) /* ǻ */;
+ case 0x1fc /* Ǽ */: BSEQ(0xc7,0xbd) /* ǽ */;
+ case 0x1fe /* Ǿ */: BSEQ(0xc7,0xbf) /* ǿ */;
+ case 0x200 /* Ȁ */: BSEQ(0xc8,0x81) /* ȁ */;
+ case 0x202 /* Ȃ */: BSEQ(0xc8,0x83) /* ȃ */;
+ case 0x204 /* Ȅ */: BSEQ(0xc8,0x85) /* ȅ */;
+ case 0x206 /* Ȇ */: BSEQ(0xc8,0x87) /* ȇ */;
+ case 0x208 /* Ȉ */: BSEQ(0xc8,0x89) /* ȉ */;
+ case 0x20a /* Ȋ */: BSEQ(0xc8,0x8b) /* ȋ */;
+ case 0x20c /* Ȍ */: BSEQ(0xc8,0x8d) /* ȍ */;
+ case 0x20e /* Ȏ */: BSEQ(0xc8,0x8f) /* ȏ */;
+ case 0x210 /* Ȑ */: BSEQ(0xc8,0x91) /* ȑ */;
+ case 0x212 /* Ȓ */: BSEQ(0xc8,0x93) /* ȓ */;
+ case 0x214 /* Ȕ */: BSEQ(0xc8,0x95) /* ȕ */;
+ case 0x216 /* Ȗ */: BSEQ(0xc8,0x97) /* ȗ */;
+ case 0x218 /* Ș */: BSEQ(0xc8,0x99) /* ș */;
+ case 0x21a /* Ț */: BSEQ(0xc8,0x9b) /* ț */;
+ case 0x21c /* Ȝ */: BSEQ(0xc8,0x9d) /* ȝ */;
+ case 0x21e /* Ȟ */: BSEQ(0xc8,0x9f) /* ȟ */;
+ case 0x220 /* Ƞ */: BSEQ(0xc6,0x9e) /* ƞ */;
+ case 0x222 /* Ȣ */: BSEQ(0xc8,0xa3) /* ȣ */;
+ case 0x224 /* Ȥ */: BSEQ(0xc8,0xa5) /* ȥ */;
+ case 0x226 /* Ȧ */: BSEQ(0xc8,0xa7) /* ȧ */;
+ case 0x228 /* Ȩ */: BSEQ(0xc8,0xa9) /* ȩ */;
+ case 0x22a /* Ȫ */: BSEQ(0xc8,0xab) /* ȫ */;
+ case 0x22c /* Ȭ */: BSEQ(0xc8,0xad) /* ȭ */;
+ case 0x22e /* Ȯ */: BSEQ(0xc8,0xaf) /* ȯ */;
+ case 0x230 /* Ȱ */: BSEQ(0xc8,0xb1) /* ȱ */;
+ case 0x232 /* Ȳ */: BSEQ(0xc8,0xb3) /* ȳ */;
+ case 0x23a /* Ⱥ */: BSEQ(0xe2,0xb1,0xa5) /* ⱥ */;
+ case 0x23b /* Ȼ */: BSEQ(0xc8,0xbc) /* ȼ */;
+ case 0x23d /* Ƚ */: BSEQ(0xc6,0x9a) /* ƚ */;
+ case 0x23e /* Ⱦ */: BSEQ(0xe2,0xb1,0xa6) /* ⱦ */;
+ case 0x241 /* Ɂ */: BSEQ(0xc9,0x82) /* ɂ */;
+ case 0x243 /* Ƀ */: BSEQ(0xc6,0x80) /* ƀ */;
+ case 0x244 /* Ʉ */: BSEQ(0xca,0x89) /* ʉ */;
+ case 0x245 /* Ʌ */: BSEQ(0xca,0x8c) /* ʌ */;
+ case 0x246 /* Ɇ */: BSEQ(0xc9,0x87) /* ɇ */;
+ case 0x248 /* Ɉ */: BSEQ(0xc9,0x89) /* ɉ */;
+ case 0x24a /* Ɋ */: BSEQ(0xc9,0x8b) /* ɋ */;
+ case 0x24c /* Ɍ */: BSEQ(0xc9,0x8d) /* ɍ */;
+ case 0x24e /* Ɏ */: BSEQ(0xc9,0x8f) /* ɏ */;
+ case 0x370 /* Ͱ */: BSEQ(0xcd,0xb1) /* ͱ */;
+ case 0x372 /* Ͳ */: BSEQ(0xcd,0xb3) /* ͳ */;
+ case 0x376 /* Ͷ */: BSEQ(0xcd,0xb7) /* ͷ */;
+ case 0x37f /* Ϳ */: BSEQ(0xcf,0xb3) /* ϳ */;
+ case 0x386 /* Ά */: BSEQ(0xce,0xac) /* ά */;
+ case 0x388 /* Έ */: BSEQ(0xce,0xad) /* έ */;
+ case 0x389 /* Ή */: BSEQ(0xce,0xae) /* ή */;
+ case 0x38a /* Ί */: BSEQ(0xce,0xaf) /* ί */;
+ case 0x38c /* Ό */: BSEQ(0xcf,0x8c) /* ό */;
+ case 0x38e /* Ύ */: BSEQ(0xcf,0x8d) /* ύ */;
+ case 0x38f /* Ώ */: BSEQ(0xcf,0x8e) /* ώ */;
+ case 0x391 /* Α */: BSEQ(0xce,0xb1) /* α */;
+ case 0x392 /* Β */: BSEQ(0xce,0xb2) /* β */;
+ case 0x393 /* Γ */: BSEQ(0xce,0xb3) /* γ */;
+ case 0x394 /* Δ */: BSEQ(0xce,0xb4) /* δ */;
+ case 0x395 /* Ε */: BSEQ(0xce,0xb5) /* ε */;
+ case 0x396 /* Ζ */: BSEQ(0xce,0xb6) /* ζ */;
+ case 0x397 /* Η */: BSEQ(0xce,0xb7) /* η */;
+ case 0x398 /* Θ */: BSEQ(0xce,0xb8) /* θ */;
+ case 0x399 /* Ι */: BSEQ(0xce,0xb9) /* ι */;
+ case 0x39a /* Κ */: BSEQ(0xce,0xba) /* κ */;
+ case 0x39b /* Λ */: BSEQ(0xce,0xbb) /* λ */;
+ case 0x39c /* Μ */: BSEQ(0xce,0xbc) /* μ */;
+ case 0x39d /* Ν */: BSEQ(0xce,0xbd) /* ν */;
+ case 0x39e /* Ξ */: BSEQ(0xce,0xbe) /* ξ */;
+ case 0x39f /* Ο */: BSEQ(0xce,0xbf) /* ο */;
+ case 0x3a0 /* Π */: BSEQ(0xcf,0x80) /* π */;
+ case 0x3a1 /* Ρ */: BSEQ(0xcf,0x81) /* ρ */;
+ case 0x3a3 /* Σ */: BSEQ(0xcf,0x83) /* σ */;
+ case 0x3a4 /* Τ */: BSEQ(0xcf,0x84) /* τ */;
+ case 0x3a5 /* Υ */: BSEQ(0xcf,0x85) /* υ */;
+ case 0x3a6 /* Φ */: BSEQ(0xcf,0x86) /* φ */;
+ case 0x3a7 /* Χ */: BSEQ(0xcf,0x87) /* χ */;
+ case 0x3a8 /* Ψ */: BSEQ(0xcf,0x88) /* ψ */;
+ case 0x3a9 /* Ω */: BSEQ(0xcf,0x89) /* ω */;
+ case 0x3aa /* Ϊ */: BSEQ(0xcf,0x8a) /* ϊ */;
+ case 0x3ab /* Ϋ */: BSEQ(0xcf,0x8b) /* ϋ */;
+ case 0x3cf /* Ϗ */: BSEQ(0xcf,0x97) /* ϗ */;
+ case 0x3d8 /* Ϙ */: BSEQ(0xcf,0x99) /* ϙ */;
+ case 0x3da /* Ϛ */: BSEQ(0xcf,0x9b) /* ϛ */;
+ case 0x3dc /* Ϝ */: BSEQ(0xcf,0x9d) /* ϝ */;
+ case 0x3de /* Ϟ */: BSEQ(0xcf,0x9f) /* ϟ */;
+ case 0x3e0 /* Ϡ */: BSEQ(0xcf,0xa1) /* ϡ */;
+ case 0x3e2 /* Ϣ */: BSEQ(0xcf,0xa3) /* ϣ */;
+ case 0x3e4 /* Ϥ */: BSEQ(0xcf,0xa5) /* ϥ */;
+ case 0x3e6 /* Ϧ */: BSEQ(0xcf,0xa7) /* ϧ */;
+ case 0x3e8 /* Ϩ */: BSEQ(0xcf,0xa9) /* ϩ */;
+ case 0x3ea /* Ϫ */: BSEQ(0xcf,0xab) /* ϫ */;
+ case 0x3ec /* Ϭ */: BSEQ(0xcf,0xad) /* ϭ */;
+ case 0x3ee /* Ϯ */: BSEQ(0xcf,0xaf) /* ϯ */;
+ case 0x3f4 /* ϴ */: BSEQ(0xce,0xb8) /* θ */;
+ case 0x3f7 /* Ϸ */: BSEQ(0xcf,0xb8) /* ϸ */;
+ case 0x3f9 /* Ϲ */: BSEQ(0xcf,0xb2) /* ϲ */;
+ case 0x3fa /* Ϻ */: BSEQ(0xcf,0xbb) /* ϻ */;
+ case 0x3fd /* Ͻ */: BSEQ(0xcd,0xbb) /* ͻ */;
+ case 0x3fe /* Ͼ */: BSEQ(0xcd,0xbc) /* ͼ */;
+ case 0x3ff /* Ͽ */: BSEQ(0xcd,0xbd) /* ͽ */;
+ case 0x400 /* Ѐ */: BSEQ(0xd1,0x90) /* ѐ */;
+ case 0x401 /* Ё */: BSEQ(0xd1,0x91) /* ё */;
+ case 0x402 /* Ђ */: BSEQ(0xd1,0x92) /* ђ */;
+ case 0x403 /* Ѓ */: BSEQ(0xd1,0x93) /* ѓ */;
+ case 0x404 /* Є */: BSEQ(0xd1,0x94) /* є */;
+ case 0x405 /* Ѕ */: BSEQ(0xd1,0x95) /* ѕ */;
+ case 0x406 /* І */: BSEQ(0xd1,0x96) /* і */;
+ case 0x407 /* Ї */: BSEQ(0xd1,0x97) /* ї */;
+ case 0x408 /* Ј */: BSEQ(0xd1,0x98) /* ј */;
+ case 0x409 /* Љ */: BSEQ(0xd1,0x99) /* љ */;
+ case 0x40a /* Њ */: BSEQ(0xd1,0x9a) /* њ */;
+ case 0x40b /* Ћ */: BSEQ(0xd1,0x9b) /* ћ */;
+ case 0x40c /* Ќ */: BSEQ(0xd1,0x9c) /* ќ */;
+ case 0x40d /* Ѝ */: BSEQ(0xd1,0x9d) /* ѝ */;
+ case 0x40e /* Ў */: BSEQ(0xd1,0x9e) /* ў */;
+ case 0x40f /* Џ */: BSEQ(0xd1,0x9f) /* џ */;
+ case 0x410 /* А */: BSEQ(0xd0,0xb0) /* а */;
+ case 0x411 /* Б */: BSEQ(0xd0,0xb1) /* б */;
+ case 0x412 /* В */: BSEQ(0xd0,0xb2) /* в */;
+ case 0x413 /* Г */: BSEQ(0xd0,0xb3) /* г */;
+ case 0x414 /* Д */: BSEQ(0xd0,0xb4) /* д */;
+ case 0x415 /* Е */: BSEQ(0xd0,0xb5) /* е */;
+ case 0x416 /* Ж */: BSEQ(0xd0,0xb6) /* ж */;
+ case 0x417 /* З */: BSEQ(0xd0,0xb7) /* з */;
+ case 0x418 /* И */: BSEQ(0xd0,0xb8) /* и */;
+ case 0x419 /* Й */: BSEQ(0xd0,0xb9) /* й */;
+ case 0x41a /* К */: BSEQ(0xd0,0xba) /* к */;
+ case 0x41b /* Л */: BSEQ(0xd0,0xbb) /* л */;
+ case 0x41c /* М */: BSEQ(0xd0,0xbc) /* м */;
+ case 0x41d /* Н */: BSEQ(0xd0,0xbd) /* н */;
+ case 0x41e /* О */: BSEQ(0xd0,0xbe) /* о */;
+ case 0x41f /* П */: BSEQ(0xd0,0xbf) /* п */;
+ case 0x420 /* Р */: BSEQ(0xd1,0x80) /* р */;
+ case 0x421 /* С */: BSEQ(0xd1,0x81) /* с */;
+ case 0x422 /* Т */: BSEQ(0xd1,0x82) /* т */;
+ case 0x423 /* У */: BSEQ(0xd1,0x83) /* у */;
+ case 0x424 /* Ф */: BSEQ(0xd1,0x84) /* ф */;
+ case 0x425 /* Х */: BSEQ(0xd1,0x85) /* х */;
+ case 0x426 /* Ц */: BSEQ(0xd1,0x86) /* ц */;
+ case 0x427 /* Ч */: BSEQ(0xd1,0x87) /* ч */;
+ case 0x428 /* Ш */: BSEQ(0xd1,0x88) /* ш */;
+ case 0x429 /* Щ */: BSEQ(0xd1,0x89) /* щ */;
+ case 0x42a /* Ъ */: BSEQ(0xd1,0x8a) /* ъ */;
+ case 0x42b /* Ы */: BSEQ(0xd1,0x8b) /* ы */;
+ case 0x42c /* Ь */: BSEQ(0xd1,0x8c) /* ь */;
+ case 0x42d /* Э */: BSEQ(0xd1,0x8d) /* э */;
+ case 0x42e /* Ю */: BSEQ(0xd1,0x8e) /* ю */;
+ case 0x42f /* Я */: BSEQ(0xd1,0x8f) /* я */;
+ case 0x460 /* Ѡ */: BSEQ(0xd1,0xa1) /* ѡ */;
+ case 0x462 /* Ѣ */: BSEQ(0xd1,0xa3) /* ѣ */;
+ case 0x464 /* Ѥ */: BSEQ(0xd1,0xa5) /* ѥ */;
+ case 0x466 /* Ѧ */: BSEQ(0xd1,0xa7) /* ѧ */;
+ case 0x468 /* Ѩ */: BSEQ(0xd1,0xa9) /* ѩ */;
+ case 0x46a /* Ѫ */: BSEQ(0xd1,0xab) /* ѫ */;
+ case 0x46c /* Ѭ */: BSEQ(0xd1,0xad) /* ѭ */;
+ case 0x46e /* Ѯ */: BSEQ(0xd1,0xaf) /* ѯ */;
+ case 0x470 /* Ѱ */: BSEQ(0xd1,0xb1) /* ѱ */;
+ case 0x472 /* Ѳ */: BSEQ(0xd1,0xb3) /* ѳ */;
+ case 0x474 /* Ѵ */: BSEQ(0xd1,0xb5) /* ѵ */;
+ case 0x476 /* Ѷ */: BSEQ(0xd1,0xb7) /* ѷ */;
+ case 0x478 /* Ѹ */: BSEQ(0xd1,0xb9) /* ѹ */;
+ case 0x47a /* Ѻ */: BSEQ(0xd1,0xbb) /* ѻ */;
+ case 0x47c /* Ѽ */: BSEQ(0xd1,0xbd) /* ѽ */;
+ case 0x47e /* Ѿ */: BSEQ(0xd1,0xbf) /* ѿ */;
+ case 0x480 /* Ҁ */: BSEQ(0xd2,0x81) /* ҁ */;
+ case 0x48a /* Ҋ */: BSEQ(0xd2,0x8b) /* ҋ */;
+ case 0x48c /* Ҍ */: BSEQ(0xd2,0x8d) /* ҍ */;
+ case 0x48e /* Ҏ */: BSEQ(0xd2,0x8f) /* ҏ */;
+ case 0x490 /* Ґ */: BSEQ(0xd2,0x91) /* ґ */;
+ case 0x492 /* Ғ */: BSEQ(0xd2,0x93) /* ғ */;
+ case 0x494 /* Ҕ */: BSEQ(0xd2,0x95) /* ҕ */;
+ case 0x496 /* Җ */: BSEQ(0xd2,0x97) /* җ */;
+ case 0x498 /* Ҙ */: BSEQ(0xd2,0x99) /* ҙ */;
+ case 0x49a /* Қ */: BSEQ(0xd2,0x9b) /* қ */;
+ case 0x49c /* Ҝ */: BSEQ(0xd2,0x9d) /* ҝ */;
+ case 0x49e /* Ҟ */: BSEQ(0xd2,0x9f) /* ҟ */;
+ case 0x4a0 /* Ҡ */: BSEQ(0xd2,0xa1) /* ҡ */;
+ case 0x4a2 /* Ң */: BSEQ(0xd2,0xa3) /* ң */;
+ case 0x4a4 /* Ҥ */: BSEQ(0xd2,0xa5) /* ҥ */;
+ case 0x4a6 /* Ҧ */: BSEQ(0xd2,0xa7) /* ҧ */;
+ case 0x4a8 /* Ҩ */: BSEQ(0xd2,0xa9) /* ҩ */;
+ case 0x4aa /* Ҫ */: BSEQ(0xd2,0xab) /* ҫ */;
+ case 0x4ac /* Ҭ */: BSEQ(0xd2,0xad) /* ҭ */;
+ case 0x4ae /* Ү */: BSEQ(0xd2,0xaf) /* ү */;
+ case 0x4b0 /* Ұ */: BSEQ(0xd2,0xb1) /* ұ */;
+ case 0x4b2 /* Ҳ */: BSEQ(0xd2,0xb3) /* ҳ */;
+ case 0x4b4 /* Ҵ */: BSEQ(0xd2,0xb5) /* ҵ */;
+ case 0x4b6 /* Ҷ */: BSEQ(0xd2,0xb7) /* ҷ */;
+ case 0x4b8 /* Ҹ */: BSEQ(0xd2,0xb9) /* ҹ */;
+ case 0x4ba /* Һ */: BSEQ(0xd2,0xbb) /* һ */;
+ case 0x4bc /* Ҽ */: BSEQ(0xd2,0xbd) /* ҽ */;
+ case 0x4be /* Ҿ */: BSEQ(0xd2,0xbf) /* ҿ */;
+ case 0x4c0 /* Ӏ */: BSEQ(0xd3,0x8f) /* ӏ */;
+ case 0x4c1 /* Ӂ */: BSEQ(0xd3,0x82) /* ӂ */;
+ case 0x4c3 /* Ӄ */: BSEQ(0xd3,0x84) /* ӄ */;
+ case 0x4c5 /* Ӆ */: BSEQ(0xd3,0x86) /* ӆ */;
+ case 0x4c7 /* Ӈ */: BSEQ(0xd3,0x88) /* ӈ */;
+ case 0x4c9 /* Ӊ */: BSEQ(0xd3,0x8a) /* ӊ */;
+ case 0x4cb /* Ӌ */: BSEQ(0xd3,0x8c) /* ӌ */;
+ case 0x4cd /* Ӎ */: BSEQ(0xd3,0x8e) /* ӎ */;
+ case 0x4d0 /* Ӑ */: BSEQ(0xd3,0x91) /* ӑ */;
+ case 0x4d2 /* Ӓ */: BSEQ(0xd3,0x93) /* ӓ */;
+ case 0x4d4 /* Ӕ */: BSEQ(0xd3,0x95) /* ӕ */;
+ case 0x4d6 /* Ӗ */: BSEQ(0xd3,0x97) /* ӗ */;
+ case 0x4d8 /* Ә */: BSEQ(0xd3,0x99) /* ә */;
+ case 0x4da /* Ӛ */: BSEQ(0xd3,0x9b) /* ӛ */;
+ case 0x4dc /* Ӝ */: BSEQ(0xd3,0x9d) /* ӝ */;
+ case 0x4de /* Ӟ */: BSEQ(0xd3,0x9f) /* ӟ */;
+ case 0x4e0 /* Ӡ */: BSEQ(0xd3,0xa1) /* ӡ */;
+ case 0x4e2 /* Ӣ */: BSEQ(0xd3,0xa3) /* ӣ */;
+ case 0x4e4 /* Ӥ */: BSEQ(0xd3,0xa5) /* ӥ */;
+ case 0x4e6 /* Ӧ */: BSEQ(0xd3,0xa7) /* ӧ */;
+ case 0x4e8 /* Ө */: BSEQ(0xd3,0xa9) /* ө */;
+ case 0x4ea /* Ӫ */: BSEQ(0xd3,0xab) /* ӫ */;
+ case 0x4ec /* Ӭ */: BSEQ(0xd3,0xad) /* ӭ */;
+ case 0x4ee /* Ӯ */: BSEQ(0xd3,0xaf) /* ӯ */;
+ case 0x4f0 /* Ӱ */: BSEQ(0xd3,0xb1) /* ӱ */;
+ case 0x4f2 /* Ӳ */: BSEQ(0xd3,0xb3) /* ӳ */;
+ case 0x4f4 /* Ӵ */: BSEQ(0xd3,0xb5) /* ӵ */;
+ case 0x4f6 /* Ӷ */: BSEQ(0xd3,0xb7) /* ӷ */;
+ case 0x4f8 /* Ӹ */: BSEQ(0xd3,0xb9) /* ӹ */;
+ case 0x4fa /* Ӻ */: BSEQ(0xd3,0xbb) /* ӻ */;
+ case 0x4fc /* Ӽ */: BSEQ(0xd3,0xbd) /* ӽ */;
+ case 0x4fe /* Ӿ */: BSEQ(0xd3,0xbf) /* ӿ */;
+ case 0x500 /* Ԁ */: BSEQ(0xd4,0x81) /* ԁ */;
+ case 0x502 /* Ԃ */: BSEQ(0xd4,0x83) /* ԃ */;
+ case 0x504 /* Ԅ */: BSEQ(0xd4,0x85) /* ԅ */;
+ case 0x506 /* Ԇ */: BSEQ(0xd4,0x87) /* ԇ */;
+ case 0x508 /* Ԉ */: BSEQ(0xd4,0x89) /* ԉ */;
+ case 0x50a /* Ԋ */: BSEQ(0xd4,0x8b) /* ԋ */;
+ case 0x50c /* Ԍ */: BSEQ(0xd4,0x8d) /* ԍ */;
+ case 0x50e /* Ԏ */: BSEQ(0xd4,0x8f) /* ԏ */;
+ case 0x510 /* Ԑ */: BSEQ(0xd4,0x91) /* ԑ */;
+ case 0x512 /* Ԓ */: BSEQ(0xd4,0x93) /* ԓ */;
+ case 0x514 /* Ԕ */: BSEQ(0xd4,0x95) /* ԕ */;
+ case 0x516 /* Ԗ */: BSEQ(0xd4,0x97) /* ԗ */;
+ case 0x518 /* Ԙ */: BSEQ(0xd4,0x99) /* ԙ */;
+ case 0x51a /* Ԛ */: BSEQ(0xd4,0x9b) /* ԛ */;
+ case 0x51c /* Ԝ */: BSEQ(0xd4,0x9d) /* ԝ */;
+ case 0x51e /* Ԟ */: BSEQ(0xd4,0x9f) /* ԟ */;
+ case 0x520 /* Ԡ */: BSEQ(0xd4,0xa1) /* ԡ */;
+ case 0x522 /* Ԣ */: BSEQ(0xd4,0xa3) /* ԣ */;
+ case 0x524 /* Ԥ */: BSEQ(0xd4,0xa5) /* ԥ */;
+ case 0x526 /* Ԧ */: BSEQ(0xd4,0xa7) /* ԧ */;
+ case 0x528 /* Ԩ */: BSEQ(0xd4,0xa9) /* ԩ */;
+ case 0x52a /* Ԫ */: BSEQ(0xd4,0xab) /* ԫ */;
+ case 0x52c /* Ԭ */: BSEQ(0xd4,0xad) /* ԭ */;
+ case 0x52e /* Ԯ */: BSEQ(0xd4,0xaf) /* ԯ */;
+ case 0x531 /* Ա */: BSEQ(0xd5,0xa1) /* ա */;
+ case 0x532 /* Բ */: BSEQ(0xd5,0xa2) /* բ */;
+ case 0x533 /* Գ */: BSEQ(0xd5,0xa3) /* գ */;
+ case 0x534 /* Դ */: BSEQ(0xd5,0xa4) /* դ */;
+ case 0x535 /* Ե */: BSEQ(0xd5,0xa5) /* ե */;
+ case 0x536 /* Զ */: BSEQ(0xd5,0xa6) /* զ */;
+ case 0x537 /* Է */: BSEQ(0xd5,0xa7) /* է */;
+ case 0x538 /* Ը */: BSEQ(0xd5,0xa8) /* ը */;
+ case 0x539 /* Թ */: BSEQ(0xd5,0xa9) /* թ */;
+ case 0x53a /* Ժ */: BSEQ(0xd5,0xaa) /* ժ */;
+ case 0x53b /* Ի */: BSEQ(0xd5,0xab) /* ի */;
+ case 0x53c /* Լ */: BSEQ(0xd5,0xac) /* լ */;
+ case 0x53d /* Խ */: BSEQ(0xd5,0xad) /* խ */;
+ case 0x53e /* Ծ */: BSEQ(0xd5,0xae) /* ծ */;
+ case 0x53f /* Կ */: BSEQ(0xd5,0xaf) /* կ */;
+ case 0x540 /* Հ */: BSEQ(0xd5,0xb0) /* հ */;
+ case 0x541 /* Ձ */: BSEQ(0xd5,0xb1) /* ձ */;
+ case 0x542 /* Ղ */: BSEQ(0xd5,0xb2) /* ղ */;
+ case 0x543 /* Ճ */: BSEQ(0xd5,0xb3) /* ճ */;
+ case 0x544 /* Մ */: BSEQ(0xd5,0xb4) /* մ */;
+ case 0x545 /* Յ */: BSEQ(0xd5,0xb5) /* յ */;
+ case 0x546 /* Ն */: BSEQ(0xd5,0xb6) /* ն */;
+ case 0x547 /* Շ */: BSEQ(0xd5,0xb7) /* շ */;
+ case 0x548 /* Ո */: BSEQ(0xd5,0xb8) /* ո */;
+ case 0x549 /* Չ */: BSEQ(0xd5,0xb9) /* չ */;
+ case 0x54a /* Պ */: BSEQ(0xd5,0xba) /* պ */;
+ case 0x54b /* Ջ */: BSEQ(0xd5,0xbb) /* ջ */;
+ case 0x54c /* Ռ */: BSEQ(0xd5,0xbc) /* ռ */;
+ case 0x54d /* Ս */: BSEQ(0xd5,0xbd) /* ս */;
+ case 0x54e /* Վ */: BSEQ(0xd5,0xbe) /* վ */;
+ case 0x54f /* Տ */: BSEQ(0xd5,0xbf) /* տ */;
+ case 0x550 /* Ր */: BSEQ(0xd6,0x80) /* ր */;
+ case 0x551 /* Ց */: BSEQ(0xd6,0x81) /* ց */;
+ case 0x552 /* Ւ */: BSEQ(0xd6,0x82) /* ւ */;
+ case 0x553 /* Փ */: BSEQ(0xd6,0x83) /* փ */;
+ case 0x554 /* Ք */: BSEQ(0xd6,0x84) /* ք */;
+ case 0x555 /* Օ */: BSEQ(0xd6,0x85) /* օ */;
+ case 0x556 /* Ֆ */: BSEQ(0xd6,0x86) /* ֆ */;
+ case 0x10a0 /* Ⴀ */: BSEQ(0xe2,0xb4,0x80) /* ⴀ */;
+ case 0x10a1 /* Ⴁ */: BSEQ(0xe2,0xb4,0x81) /* ⴁ */;
+ case 0x10a2 /* Ⴂ */: BSEQ(0xe2,0xb4,0x82) /* ⴂ */;
+ case 0x10a3 /* Ⴃ */: BSEQ(0xe2,0xb4,0x83) /* ⴃ */;
+ case 0x10a4 /* Ⴄ */: BSEQ(0xe2,0xb4,0x84) /* ⴄ */;
+ case 0x10a5 /* Ⴅ */: BSEQ(0xe2,0xb4,0x85) /* ⴅ */;
+ case 0x10a6 /* Ⴆ */: BSEQ(0xe2,0xb4,0x86) /* ⴆ */;
+ case 0x10a7 /* Ⴇ */: BSEQ(0xe2,0xb4,0x87) /* ⴇ */;
+ case 0x10a8 /* Ⴈ */: BSEQ(0xe2,0xb4,0x88) /* ⴈ */;
+ case 0x10a9 /* Ⴉ */: BSEQ(0xe2,0xb4,0x89) /* ⴉ */;
+ case 0x10aa /* Ⴊ */: BSEQ(0xe2,0xb4,0x8a) /* ⴊ */;
+ case 0x10ab /* Ⴋ */: BSEQ(0xe2,0xb4,0x8b) /* ⴋ */;
+ case 0x10ac /* Ⴌ */: BSEQ(0xe2,0xb4,0x8c) /* ⴌ */;
+ case 0x10ad /* Ⴍ */: BSEQ(0xe2,0xb4,0x8d) /* ⴍ */;
+ case 0x10ae /* Ⴎ */: BSEQ(0xe2,0xb4,0x8e) /* ⴎ */;
+ case 0x10af /* Ⴏ */: BSEQ(0xe2,0xb4,0x8f) /* ⴏ */;
+ case 0x10b0 /* Ⴐ */: BSEQ(0xe2,0xb4,0x90) /* ⴐ */;
+ case 0x10b1 /* Ⴑ */: BSEQ(0xe2,0xb4,0x91) /* ⴑ */;
+ case 0x10b2 /* Ⴒ */: BSEQ(0xe2,0xb4,0x92) /* ⴒ */;
+ case 0x10b3 /* Ⴓ */: BSEQ(0xe2,0xb4,0x93) /* ⴓ */;
+ case 0x10b4 /* Ⴔ */: BSEQ(0xe2,0xb4,0x94) /* ⴔ */;
+ case 0x10b5 /* Ⴕ */: BSEQ(0xe2,0xb4,0x95) /* ⴕ */;
+ case 0x10b6 /* Ⴖ */: BSEQ(0xe2,0xb4,0x96) /* ⴖ */;
+ case 0x10b7 /* Ⴗ */: BSEQ(0xe2,0xb4,0x97) /* ⴗ */;
+ case 0x10b8 /* Ⴘ */: BSEQ(0xe2,0xb4,0x98) /* ⴘ */;
+ case 0x10b9 /* Ⴙ */: BSEQ(0xe2,0xb4,0x99) /* ⴙ */;
+ case 0x10ba /* Ⴚ */: BSEQ(0xe2,0xb4,0x9a) /* ⴚ */;
+ case 0x10bb /* Ⴛ */: BSEQ(0xe2,0xb4,0x9b) /* ⴛ */;
+ case 0x10bc /* Ⴜ */: BSEQ(0xe2,0xb4,0x9c) /* ⴜ */;
+ case 0x10bd /* Ⴝ */: BSEQ(0xe2,0xb4,0x9d) /* ⴝ */;
+ case 0x10be /* Ⴞ */: BSEQ(0xe2,0xb4,0x9e) /* ⴞ */;
+ case 0x10bf /* Ⴟ */: BSEQ(0xe2,0xb4,0x9f) /* ⴟ */;
+ case 0x10c0 /* Ⴠ */: BSEQ(0xe2,0xb4,0xa0) /* ⴠ */;
+ case 0x10c1 /* Ⴡ */: BSEQ(0xe2,0xb4,0xa1) /* ⴡ */;
+ case 0x10c2 /* Ⴢ */: BSEQ(0xe2,0xb4,0xa2) /* ⴢ */;
+ case 0x10c3 /* Ⴣ */: BSEQ(0xe2,0xb4,0xa3) /* ⴣ */;
+ case 0x10c4 /* Ⴤ */: BSEQ(0xe2,0xb4,0xa4) /* ⴤ */;
+ case 0x10c5 /* Ⴥ */: BSEQ(0xe2,0xb4,0xa5) /* ⴥ */;
+ case 0x10c7 /* Ⴧ */: BSEQ(0xe2,0xb4,0xa7) /* ⴧ */;
+ case 0x10cd /* Ⴭ */: BSEQ(0xe2,0xb4,0xad) /* ⴭ */;
+ case 0x13a0 /* Ꭰ */: BSEQ(0xea,0xad,0xb0) /* ꭰ */;
+ case 0x13a1 /* Ꭱ */: BSEQ(0xea,0xad,0xb1) /* ꭱ */;
+ case 0x13a2 /* Ꭲ */: BSEQ(0xea,0xad,0xb2) /* ꭲ */;
+ case 0x13a3 /* Ꭳ */: BSEQ(0xea,0xad,0xb3) /* ꭳ */;
+ case 0x13a4 /* Ꭴ */: BSEQ(0xea,0xad,0xb4) /* ꭴ */;
+ case 0x13a5 /* Ꭵ */: BSEQ(0xea,0xad,0xb5) /* ꭵ */;
+ case 0x13a6 /* Ꭶ */: BSEQ(0xea,0xad,0xb6) /* ꭶ */;
+ case 0x13a7 /* Ꭷ */: BSEQ(0xea,0xad,0xb7) /* ꭷ */;
+ case 0x13a8 /* Ꭸ */: BSEQ(0xea,0xad,0xb8) /* ꭸ */;
+ case 0x13a9 /* Ꭹ */: BSEQ(0xea,0xad,0xb9) /* ꭹ */;
+ case 0x13aa /* Ꭺ */: BSEQ(0xea,0xad,0xba) /* ꭺ */;
+ case 0x13ab /* Ꭻ */: BSEQ(0xea,0xad,0xbb) /* ꭻ */;
+ case 0x13ac /* Ꭼ */: BSEQ(0xea,0xad,0xbc) /* ꭼ */;
+ case 0x13ad /* Ꭽ */: BSEQ(0xea,0xad,0xbd) /* ꭽ */;
+ case 0x13ae /* Ꭾ */: BSEQ(0xea,0xad,0xbe) /* ꭾ */;
+ case 0x13af /* Ꭿ */: BSEQ(0xea,0xad,0xbf) /* ꭿ */;
+ case 0x13b0 /* Ꮀ */: BSEQ(0xea,0xae,0x80) /* ꮀ */;
+ case 0x13b1 /* Ꮁ */: BSEQ(0xea,0xae,0x81) /* ꮁ */;
+ case 0x13b2 /* Ꮂ */: BSEQ(0xea,0xae,0x82) /* ꮂ */;
+ case 0x13b3 /* Ꮃ */: BSEQ(0xea,0xae,0x83) /* ꮃ */;
+ case 0x13b4 /* Ꮄ */: BSEQ(0xea,0xae,0x84) /* ꮄ */;
+ case 0x13b5 /* Ꮅ */: BSEQ(0xea,0xae,0x85) /* ꮅ */;
+ case 0x13b6 /* Ꮆ */: BSEQ(0xea,0xae,0x86) /* ꮆ */;
+ case 0x13b7 /* Ꮇ */: BSEQ(0xea,0xae,0x87) /* ꮇ */;
+ case 0x13b8 /* Ꮈ */: BSEQ(0xea,0xae,0x88) /* ꮈ */;
+ case 0x13b9 /* Ꮉ */: BSEQ(0xea,0xae,0x89) /* ꮉ */;
+ case 0x13ba /* Ꮊ */: BSEQ(0xea,0xae,0x8a) /* ꮊ */;
+ case 0x13bb /* Ꮋ */: BSEQ(0xea,0xae,0x8b) /* ꮋ */;
+ case 0x13bc /* Ꮌ */: BSEQ(0xea,0xae,0x8c) /* ꮌ */;
+ case 0x13bd /* Ꮍ */: BSEQ(0xea,0xae,0x8d) /* ꮍ */;
+ case 0x13be /* Ꮎ */: BSEQ(0xea,0xae,0x8e) /* ꮎ */;
+ case 0x13bf /* Ꮏ */: BSEQ(0xea,0xae,0x8f) /* ꮏ */;
+ case 0x13c0 /* Ꮐ */: BSEQ(0xea,0xae,0x90) /* ꮐ */;
+ case 0x13c1 /* Ꮑ */: BSEQ(0xea,0xae,0x91) /* ꮑ */;
+ case 0x13c2 /* Ꮒ */: BSEQ(0xea,0xae,0x92) /* ꮒ */;
+ case 0x13c3 /* Ꮓ */: BSEQ(0xea,0xae,0x93) /* ꮓ */;
+ case 0x13c4 /* Ꮔ */: BSEQ(0xea,0xae,0x94) /* ꮔ */;
+ case 0x13c5 /* Ꮕ */: BSEQ(0xea,0xae,0x95) /* ꮕ */;
+ case 0x13c6 /* Ꮖ */: BSEQ(0xea,0xae,0x96) /* ꮖ */;
+ case 0x13c7 /* Ꮗ */: BSEQ(0xea,0xae,0x97) /* ꮗ */;
+ case 0x13c8 /* Ꮘ */: BSEQ(0xea,0xae,0x98) /* ꮘ */;
+ case 0x13c9 /* Ꮙ */: BSEQ(0xea,0xae,0x99) /* ꮙ */;
+ case 0x13ca /* Ꮚ */: BSEQ(0xea,0xae,0x9a) /* ꮚ */;
+ case 0x13cb /* Ꮛ */: BSEQ(0xea,0xae,0x9b) /* ꮛ */;
+ case 0x13cc /* Ꮜ */: BSEQ(0xea,0xae,0x9c) /* ꮜ */;
+ case 0x13cd /* Ꮝ */: BSEQ(0xea,0xae,0x9d) /* ꮝ */;
+ case 0x13ce /* Ꮞ */: BSEQ(0xea,0xae,0x9e) /* ꮞ */;
+ case 0x13cf /* Ꮟ */: BSEQ(0xea,0xae,0x9f) /* ꮟ */;
+ case 0x13d0 /* Ꮠ */: BSEQ(0xea,0xae,0xa0) /* ꮠ */;
+ case 0x13d1 /* Ꮡ */: BSEQ(0xea,0xae,0xa1) /* ꮡ */;
+ case 0x13d2 /* Ꮢ */: BSEQ(0xea,0xae,0xa2) /* ꮢ */;
+ case 0x13d3 /* Ꮣ */: BSEQ(0xea,0xae,0xa3) /* ꮣ */;
+ case 0x13d4 /* Ꮤ */: BSEQ(0xea,0xae,0xa4) /* ꮤ */;
+ case 0x13d5 /* Ꮥ */: BSEQ(0xea,0xae,0xa5) /* ꮥ */;
+ case 0x13d6 /* Ꮦ */: BSEQ(0xea,0xae,0xa6) /* ꮦ */;
+ case 0x13d7 /* Ꮧ */: BSEQ(0xea,0xae,0xa7) /* ꮧ */;
+ case 0x13d8 /* Ꮨ */: BSEQ(0xea,0xae,0xa8) /* ꮨ */;
+ case 0x13d9 /* Ꮩ */: BSEQ(0xea,0xae,0xa9) /* ꮩ */;
+ case 0x13da /* Ꮪ */: BSEQ(0xea,0xae,0xaa) /* ꮪ */;
+ case 0x13db /* Ꮫ */: BSEQ(0xea,0xae,0xab) /* ꮫ */;
+ case 0x13dc /* Ꮬ */: BSEQ(0xea,0xae,0xac) /* ꮬ */;
+ case 0x13dd /* Ꮭ */: BSEQ(0xea,0xae,0xad) /* ꮭ */;
+ case 0x13de /* Ꮮ */: BSEQ(0xea,0xae,0xae) /* ꮮ */;
+ case 0x13df /* Ꮯ */: BSEQ(0xea,0xae,0xaf) /* ꮯ */;
+ case 0x13e0 /* Ꮰ */: BSEQ(0xea,0xae,0xb0) /* ꮰ */;
+ case 0x13e1 /* Ꮱ */: BSEQ(0xea,0xae,0xb1) /* ꮱ */;
+ case 0x13e2 /* Ꮲ */: BSEQ(0xea,0xae,0xb2) /* ꮲ */;
+ case 0x13e3 /* Ꮳ */: BSEQ(0xea,0xae,0xb3) /* ꮳ */;
+ case 0x13e4 /* Ꮴ */: BSEQ(0xea,0xae,0xb4) /* ꮴ */;
+ case 0x13e5 /* Ꮵ */: BSEQ(0xea,0xae,0xb5) /* ꮵ */;
+ case 0x13e6 /* Ꮶ */: BSEQ(0xea,0xae,0xb6) /* ꮶ */;
+ case 0x13e7 /* Ꮷ */: BSEQ(0xea,0xae,0xb7) /* ꮷ */;
+ case 0x13e8 /* Ꮸ */: BSEQ(0xea,0xae,0xb8) /* ꮸ */;
+ case 0x13e9 /* Ꮹ */: BSEQ(0xea,0xae,0xb9) /* ꮹ */;
+ case 0x13ea /* Ꮺ */: BSEQ(0xea,0xae,0xba) /* ꮺ */;
+ case 0x13eb /* Ꮻ */: BSEQ(0xea,0xae,0xbb) /* ꮻ */;
+ case 0x13ec /* Ꮼ */: BSEQ(0xea,0xae,0xbc) /* ꮼ */;
+ case 0x13ed /* Ꮽ */: BSEQ(0xea,0xae,0xbd) /* ꮽ */;
+ case 0x13ee /* Ꮾ */: BSEQ(0xea,0xae,0xbe) /* ꮾ */;
+ case 0x13ef /* Ꮿ */: BSEQ(0xea,0xae,0xbf) /* ꮿ */;
+ case 0x13f0 /* Ᏸ */: BSEQ(0xe1,0x8f,0xb8) /* ᏸ */;
+ case 0x13f1 /* Ᏹ */: BSEQ(0xe1,0x8f,0xb9) /* ᏹ */;
+ case 0x13f2 /* Ᏺ */: BSEQ(0xe1,0x8f,0xba) /* ᏺ */;
+ case 0x13f3 /* Ᏻ */: BSEQ(0xe1,0x8f,0xbb) /* ᏻ */;
+ case 0x13f4 /* Ᏼ */: BSEQ(0xe1,0x8f,0xbc) /* ᏼ */;
+ case 0x13f5 /* Ᏽ */: BSEQ(0xe1,0x8f,0xbd) /* ᏽ */;
+ case 0x1c90 /* Ა */: BSEQ(0xe1,0x83,0x90) /* ა */;
+ case 0x1c91 /* Ბ */: BSEQ(0xe1,0x83,0x91) /* ბ */;
+ case 0x1c92 /* Გ */: BSEQ(0xe1,0x83,0x92) /* გ */;
+ case 0x1c93 /* Დ */: BSEQ(0xe1,0x83,0x93) /* დ */;
+ case 0x1c94 /* Ე */: BSEQ(0xe1,0x83,0x94) /* ე */;
+ case 0x1c95 /* Ვ */: BSEQ(0xe1,0x83,0x95) /* ვ */;
+ case 0x1c96 /* Ზ */: BSEQ(0xe1,0x83,0x96) /* ზ */;
+ case 0x1c97 /* Თ */: BSEQ(0xe1,0x83,0x97) /* თ */;
+ case 0x1c98 /* Ი */: BSEQ(0xe1,0x83,0x98) /* ი */;
+ case 0x1c99 /* Კ */: BSEQ(0xe1,0x83,0x99) /* კ */;
+ case 0x1c9a /* Ლ */: BSEQ(0xe1,0x83,0x9a) /* ლ */;
+ case 0x1c9b /* Მ */: BSEQ(0xe1,0x83,0x9b) /* მ */;
+ case 0x1c9c /* Ნ */: BSEQ(0xe1,0x83,0x9c) /* ნ */;
+ case 0x1c9d /* Ო */: BSEQ(0xe1,0x83,0x9d) /* ო */;
+ case 0x1c9e /* Პ */: BSEQ(0xe1,0x83,0x9e) /* პ */;
+ case 0x1c9f /* Ჟ */: BSEQ(0xe1,0x83,0x9f) /* ჟ */;
+ case 0x1ca0 /* Რ */: BSEQ(0xe1,0x83,0xa0) /* რ */;
+ case 0x1ca1 /* Ს */: BSEQ(0xe1,0x83,0xa1) /* ს */;
+ case 0x1ca2 /* Ტ */: BSEQ(0xe1,0x83,0xa2) /* ტ */;
+ case 0x1ca3 /* Უ */: BSEQ(0xe1,0x83,0xa3) /* უ */;
+ case 0x1ca4 /* Ფ */: BSEQ(0xe1,0x83,0xa4) /* ფ */;
+ case 0x1ca5 /* Ქ */: BSEQ(0xe1,0x83,0xa5) /* ქ */;
+ case 0x1ca6 /* Ღ */: BSEQ(0xe1,0x83,0xa6) /* ღ */;
+ case 0x1ca7 /* Ყ */: BSEQ(0xe1,0x83,0xa7) /* ყ */;
+ case 0x1ca8 /* Შ */: BSEQ(0xe1,0x83,0xa8) /* შ */;
+ case 0x1ca9 /* Ჩ */: BSEQ(0xe1,0x83,0xa9) /* ჩ */;
+ case 0x1caa /* Ც */: BSEQ(0xe1,0x83,0xaa) /* ც */;
+ case 0x1cab /* Ძ */: BSEQ(0xe1,0x83,0xab) /* ძ */;
+ case 0x1cac /* Წ */: BSEQ(0xe1,0x83,0xac) /* წ */;
+ case 0x1cad /* Ჭ */: BSEQ(0xe1,0x83,0xad) /* ჭ */;
+ case 0x1cae /* Ხ */: BSEQ(0xe1,0x83,0xae) /* ხ */;
+ case 0x1caf /* Ჯ */: BSEQ(0xe1,0x83,0xaf) /* ჯ */;
+ case 0x1cb0 /* Ჰ */: BSEQ(0xe1,0x83,0xb0) /* ჰ */;
+ case 0x1cb1 /* Ჱ */: BSEQ(0xe1,0x83,0xb1) /* ჱ */;
+ case 0x1cb2 /* Ჲ */: BSEQ(0xe1,0x83,0xb2) /* ჲ */;
+ case 0x1cb3 /* Ჳ */: BSEQ(0xe1,0x83,0xb3) /* ჳ */;
+ case 0x1cb4 /* Ჴ */: BSEQ(0xe1,0x83,0xb4) /* ჴ */;
+ case 0x1cb5 /* Ჵ */: BSEQ(0xe1,0x83,0xb5) /* ჵ */;
+ case 0x1cb6 /* Ჶ */: BSEQ(0xe1,0x83,0xb6) /* ჶ */;
+ case 0x1cb7 /* Ჷ */: BSEQ(0xe1,0x83,0xb7) /* ჷ */;
+ case 0x1cb8 /* Ჸ */: BSEQ(0xe1,0x83,0xb8) /* ჸ */;
+ case 0x1cb9 /* Ჹ */: BSEQ(0xe1,0x83,0xb9) /* ჹ */;
+ case 0x1cba /* Ჺ */: BSEQ(0xe1,0x83,0xba) /* ჺ */;
+ case 0x1cbd /* Ჽ */: BSEQ(0xe1,0x83,0xbd) /* ჽ */;
+ case 0x1cbe /* Ჾ */: BSEQ(0xe1,0x83,0xbe) /* ჾ */;
+ case 0x1cbf /* Ჿ */: BSEQ(0xe1,0x83,0xbf) /* ჿ */;
+ case 0x1e00 /* Ḁ */: BSEQ(0xe1,0xb8,0x81) /* ḁ */;
+ case 0x1e02 /* Ḃ */: BSEQ(0xe1,0xb8,0x83) /* ḃ */;
+ case 0x1e04 /* Ḅ */: BSEQ(0xe1,0xb8,0x85) /* ḅ */;
+ case 0x1e06 /* Ḇ */: BSEQ(0xe1,0xb8,0x87) /* ḇ */;
+ case 0x1e08 /* Ḉ */: BSEQ(0xe1,0xb8,0x89) /* ḉ */;
+ case 0x1e0a /* Ḋ */: BSEQ(0xe1,0xb8,0x8b) /* ḋ */;
+ case 0x1e0c /* Ḍ */: BSEQ(0xe1,0xb8,0x8d) /* ḍ */;
+ case 0x1e0e /* Ḏ */: BSEQ(0xe1,0xb8,0x8f) /* ḏ */;
+ case 0x1e10 /* Ḑ */: BSEQ(0xe1,0xb8,0x91) /* ḑ */;
+ case 0x1e12 /* Ḓ */: BSEQ(0xe1,0xb8,0x93) /* ḓ */;
+ case 0x1e14 /* Ḕ */: BSEQ(0xe1,0xb8,0x95) /* ḕ */;
+ case 0x1e16 /* Ḗ */: BSEQ(0xe1,0xb8,0x97) /* ḗ */;
+ case 0x1e18 /* Ḙ */: BSEQ(0xe1,0xb8,0x99) /* ḙ */;
+ case 0x1e1a /* Ḛ */: BSEQ(0xe1,0xb8,0x9b) /* ḛ */;
+ case 0x1e1c /* Ḝ */: BSEQ(0xe1,0xb8,0x9d) /* ḝ */;
+ case 0x1e1e /* Ḟ */: BSEQ(0xe1,0xb8,0x9f) /* ḟ */;
+ case 0x1e20 /* Ḡ */: BSEQ(0xe1,0xb8,0xa1) /* ḡ */;
+ case 0x1e22 /* Ḣ */: BSEQ(0xe1,0xb8,0xa3) /* ḣ */;
+ case 0x1e24 /* Ḥ */: BSEQ(0xe1,0xb8,0xa5) /* ḥ */;
+ case 0x1e26 /* Ḧ */: BSEQ(0xe1,0xb8,0xa7) /* ḧ */;
+ case 0x1e28 /* Ḩ */: BSEQ(0xe1,0xb8,0xa9) /* ḩ */;
+ case 0x1e2a /* Ḫ */: BSEQ(0xe1,0xb8,0xab) /* ḫ */;
+ case 0x1e2c /* Ḭ */: BSEQ(0xe1,0xb8,0xad) /* ḭ */;
+ case 0x1e2e /* Ḯ */: BSEQ(0xe1,0xb8,0xaf) /* ḯ */;
+ case 0x1e30 /* Ḱ */: BSEQ(0xe1,0xb8,0xb1) /* ḱ */;
+ case 0x1e32 /* Ḳ */: BSEQ(0xe1,0xb8,0xb3) /* ḳ */;
+ case 0x1e34 /* Ḵ */: BSEQ(0xe1,0xb8,0xb5) /* ḵ */;
+ case 0x1e36 /* Ḷ */: BSEQ(0xe1,0xb8,0xb7) /* ḷ */;
+ case 0x1e38 /* Ḹ */: BSEQ(0xe1,0xb8,0xb9) /* ḹ */;
+ case 0x1e3a /* Ḻ */: BSEQ(0xe1,0xb8,0xbb) /* ḻ */;
+ case 0x1e3c /* Ḽ */: BSEQ(0xe1,0xb8,0xbd) /* ḽ */;
+ case 0x1e3e /* Ḿ */: BSEQ(0xe1,0xb8,0xbf) /* ḿ */;
+ case 0x1e40 /* Ṁ */: BSEQ(0xe1,0xb9,0x81) /* ṁ */;
+ case 0x1e42 /* Ṃ */: BSEQ(0xe1,0xb9,0x83) /* ṃ */;
+ case 0x1e44 /* Ṅ */: BSEQ(0xe1,0xb9,0x85) /* ṅ */;
+ case 0x1e46 /* Ṇ */: BSEQ(0xe1,0xb9,0x87) /* ṇ */;
+ case 0x1e48 /* Ṉ */: BSEQ(0xe1,0xb9,0x89) /* ṉ */;
+ case 0x1e4a /* Ṋ */: BSEQ(0xe1,0xb9,0x8b) /* ṋ */;
+ case 0x1e4c /* Ṍ */: BSEQ(0xe1,0xb9,0x8d) /* ṍ */;
+ case 0x1e4e /* Ṏ */: BSEQ(0xe1,0xb9,0x8f) /* ṏ */;
+ case 0x1e50 /* Ṑ */: BSEQ(0xe1,0xb9,0x91) /* ṑ */;
+ case 0x1e52 /* Ṓ */: BSEQ(0xe1,0xb9,0x93) /* ṓ */;
+ case 0x1e54 /* Ṕ */: BSEQ(0xe1,0xb9,0x95) /* ṕ */;
+ case 0x1e56 /* Ṗ */: BSEQ(0xe1,0xb9,0x97) /* ṗ */;
+ case 0x1e58 /* Ṙ */: BSEQ(0xe1,0xb9,0x99) /* ṙ */;
+ case 0x1e5a /* Ṛ */: BSEQ(0xe1,0xb9,0x9b) /* ṛ */;
+ case 0x1e5c /* Ṝ */: BSEQ(0xe1,0xb9,0x9d) /* ṝ */;
+ case 0x1e5e /* Ṟ */: BSEQ(0xe1,0xb9,0x9f) /* ṟ */;
+ case 0x1e60 /* Ṡ */: BSEQ(0xe1,0xb9,0xa1) /* ṡ */;
+ case 0x1e62 /* Ṣ */: BSEQ(0xe1,0xb9,0xa3) /* ṣ */;
+ case 0x1e64 /* Ṥ */: BSEQ(0xe1,0xb9,0xa5) /* ṥ */;
+ case 0x1e66 /* Ṧ */: BSEQ(0xe1,0xb9,0xa7) /* ṧ */;
+ case 0x1e68 /* Ṩ */: BSEQ(0xe1,0xb9,0xa9) /* ṩ */;
+ case 0x1e6a /* Ṫ */: BSEQ(0xe1,0xb9,0xab) /* ṫ */;
+ case 0x1e6c /* Ṭ */: BSEQ(0xe1,0xb9,0xad) /* ṭ */;
+ case 0x1e6e /* Ṯ */: BSEQ(0xe1,0xb9,0xaf) /* ṯ */;
+ case 0x1e70 /* Ṱ */: BSEQ(0xe1,0xb9,0xb1) /* ṱ */;
+ case 0x1e72 /* Ṳ */: BSEQ(0xe1,0xb9,0xb3) /* ṳ */;
+ case 0x1e74 /* Ṵ */: BSEQ(0xe1,0xb9,0xb5) /* ṵ */;
+ case 0x1e76 /* Ṷ */: BSEQ(0xe1,0xb9,0xb7) /* ṷ */;
+ case 0x1e78 /* Ṹ */: BSEQ(0xe1,0xb9,0xb9) /* ṹ */;
+ case 0x1e7a /* Ṻ */: BSEQ(0xe1,0xb9,0xbb) /* ṻ */;
+ case 0x1e7c /* Ṽ */: BSEQ(0xe1,0xb9,0xbd) /* ṽ */;
+ case 0x1e7e /* Ṿ */: BSEQ(0xe1,0xb9,0xbf) /* ṿ */;
+ case 0x1e80 /* Ẁ */: BSEQ(0xe1,0xba,0x81) /* ẁ */;
+ case 0x1e82 /* Ẃ */: BSEQ(0xe1,0xba,0x83) /* ẃ */;
+ case 0x1e84 /* Ẅ */: BSEQ(0xe1,0xba,0x85) /* ẅ */;
+ case 0x1e86 /* Ẇ */: BSEQ(0xe1,0xba,0x87) /* ẇ */;
+ case 0x1e88 /* Ẉ */: BSEQ(0xe1,0xba,0x89) /* ẉ */;
+ case 0x1e8a /* Ẋ */: BSEQ(0xe1,0xba,0x8b) /* ẋ */;
+ case 0x1e8c /* Ẍ */: BSEQ(0xe1,0xba,0x8d) /* ẍ */;
+ case 0x1e8e /* Ẏ */: BSEQ(0xe1,0xba,0x8f) /* ẏ */;
+ case 0x1e90 /* Ẑ */: BSEQ(0xe1,0xba,0x91) /* ẑ */;
+ case 0x1e92 /* Ẓ */: BSEQ(0xe1,0xba,0x93) /* ẓ */;
+ case 0x1e94 /* Ẕ */: BSEQ(0xe1,0xba,0x95) /* ẕ */;
+ case 0x1e9e /* ẞ */: BSEQ(0xc3,0x9f) /* ß */;
+ case 0x1ea0 /* Ạ */: BSEQ(0xe1,0xba,0xa1) /* ạ */;
+ case 0x1ea2 /* Ả */: BSEQ(0xe1,0xba,0xa3) /* ả */;
+ case 0x1ea4 /* Ấ */: BSEQ(0xe1,0xba,0xa5) /* ấ */;
+ case 0x1ea6 /* Ầ */: BSEQ(0xe1,0xba,0xa7) /* ầ */;
+ case 0x1ea8 /* Ẩ */: BSEQ(0xe1,0xba,0xa9) /* ẩ */;
+ case 0x1eaa /* Ẫ */: BSEQ(0xe1,0xba,0xab) /* ẫ */;
+ case 0x1eac /* Ậ */: BSEQ(0xe1,0xba,0xad) /* ậ */;
+ case 0x1eae /* Ắ */: BSEQ(0xe1,0xba,0xaf) /* ắ */;
+ case 0x1eb0 /* Ằ */: BSEQ(0xe1,0xba,0xb1) /* ằ */;
+ case 0x1eb2 /* Ẳ */: BSEQ(0xe1,0xba,0xb3) /* ẳ */;
+ case 0x1eb4 /* Ẵ */: BSEQ(0xe1,0xba,0xb5) /* ẵ */;
+ case 0x1eb6 /* Ặ */: BSEQ(0xe1,0xba,0xb7) /* ặ */;
+ case 0x1eb8 /* Ẹ */: BSEQ(0xe1,0xba,0xb9) /* ẹ */;
+ case 0x1eba /* Ẻ */: BSEQ(0xe1,0xba,0xbb) /* ẻ */;
+ case 0x1ebc /* Ẽ */: BSEQ(0xe1,0xba,0xbd) /* ẽ */;
+ case 0x1ebe /* Ế */: BSEQ(0xe1,0xba,0xbf) /* ế */;
+ case 0x1ec0 /* Ề */: BSEQ(0xe1,0xbb,0x81) /* ề */;
+ case 0x1ec2 /* Ể */: BSEQ(0xe1,0xbb,0x83) /* ể */;
+ case 0x1ec4 /* Ễ */: BSEQ(0xe1,0xbb,0x85) /* ễ */;
+ case 0x1ec6 /* Ệ */: BSEQ(0xe1,0xbb,0x87) /* ệ */;
+ case 0x1ec8 /* Ỉ */: BSEQ(0xe1,0xbb,0x89) /* ỉ */;
+ case 0x1eca /* Ị */: BSEQ(0xe1,0xbb,0x8b) /* ị */;
+ case 0x1ecc /* Ọ */: BSEQ(0xe1,0xbb,0x8d) /* ọ */;
+ case 0x1ece /* Ỏ */: BSEQ(0xe1,0xbb,0x8f) /* ỏ */;
+ case 0x1ed0 /* Ố */: BSEQ(0xe1,0xbb,0x91) /* ố */;
+ case 0x1ed2 /* Ồ */: BSEQ(0xe1,0xbb,0x93) /* ồ */;
+ case 0x1ed4 /* Ổ */: BSEQ(0xe1,0xbb,0x95) /* ổ */;
+ case 0x1ed6 /* Ỗ */: BSEQ(0xe1,0xbb,0x97) /* ỗ */;
+ case 0x1ed8 /* Ộ */: BSEQ(0xe1,0xbb,0x99) /* ộ */;
+ case 0x1eda /* Ớ */: BSEQ(0xe1,0xbb,0x9b) /* ớ */;
+ case 0x1edc /* Ờ */: BSEQ(0xe1,0xbb,0x9d) /* ờ */;
+ case 0x1ede /* Ở */: BSEQ(0xe1,0xbb,0x9f) /* ở */;
+ case 0x1ee0 /* Ỡ */: BSEQ(0xe1,0xbb,0xa1) /* ỡ */;
+ case 0x1ee2 /* Ợ */: BSEQ(0xe1,0xbb,0xa3) /* ợ */;
+ case 0x1ee4 /* Ụ */: BSEQ(0xe1,0xbb,0xa5) /* ụ */;
+ case 0x1ee6 /* Ủ */: BSEQ(0xe1,0xbb,0xa7) /* ủ */;
+ case 0x1ee8 /* Ứ */: BSEQ(0xe1,0xbb,0xa9) /* ứ */;
+ case 0x1eea /* Ừ */: BSEQ(0xe1,0xbb,0xab) /* ừ */;
+ case 0x1eec /* Ử */: BSEQ(0xe1,0xbb,0xad) /* ử */;
+ case 0x1eee /* Ữ */: BSEQ(0xe1,0xbb,0xaf) /* ữ */;
+ case 0x1ef0 /* Ự */: BSEQ(0xe1,0xbb,0xb1) /* ự */;
+ case 0x1ef2 /* Ỳ */: BSEQ(0xe1,0xbb,0xb3) /* ỳ */;
+ case 0x1ef4 /* Ỵ */: BSEQ(0xe1,0xbb,0xb5) /* ỵ */;
+ case 0x1ef6 /* Ỷ */: BSEQ(0xe1,0xbb,0xb7) /* ỷ */;
+ case 0x1ef8 /* Ỹ */: BSEQ(0xe1,0xbb,0xb9) /* ỹ */;
+ case 0x1efa /* Ỻ */: BSEQ(0xe1,0xbb,0xbb) /* ỻ */;
+ case 0x1efc /* Ỽ */: BSEQ(0xe1,0xbb,0xbd) /* ỽ */;
+ case 0x1efe /* Ỿ */: BSEQ(0xe1,0xbb,0xbf) /* ỿ */;
+ case 0x1f08 /* Ἀ */: BSEQ(0xe1,0xbc,0x80) /* ἀ */;
+ case 0x1f09 /* Ἁ */: BSEQ(0xe1,0xbc,0x81) /* ἁ */;
+ case 0x1f0a /* Ἂ */: BSEQ(0xe1,0xbc,0x82) /* ἂ */;
+ case 0x1f0b /* Ἃ */: BSEQ(0xe1,0xbc,0x83) /* ἃ */;
+ case 0x1f0c /* Ἄ */: BSEQ(0xe1,0xbc,0x84) /* ἄ */;
+ case 0x1f0d /* Ἅ */: BSEQ(0xe1,0xbc,0x85) /* ἅ */;
+ case 0x1f0e /* Ἆ */: BSEQ(0xe1,0xbc,0x86) /* ἆ */;
+ case 0x1f0f /* Ἇ */: BSEQ(0xe1,0xbc,0x87) /* ἇ */;
+ case 0x1f18 /* Ἐ */: BSEQ(0xe1,0xbc,0x90) /* ἐ */;
+ case 0x1f19 /* Ἑ */: BSEQ(0xe1,0xbc,0x91) /* ἑ */;
+ case 0x1f1a /* Ἒ */: BSEQ(0xe1,0xbc,0x92) /* ἒ */;
+ case 0x1f1b /* Ἓ */: BSEQ(0xe1,0xbc,0x93) /* ἓ */;
+ case 0x1f1c /* Ἔ */: BSEQ(0xe1,0xbc,0x94) /* ἔ */;
+ case 0x1f1d /* Ἕ */: BSEQ(0xe1,0xbc,0x95) /* ἕ */;
+ case 0x1f28 /* Ἠ */: BSEQ(0xe1,0xbc,0xa0) /* ἠ */;
+ case 0x1f29 /* Ἡ */: BSEQ(0xe1,0xbc,0xa1) /* ἡ */;
+ case 0x1f2a /* Ἢ */: BSEQ(0xe1,0xbc,0xa2) /* ἢ */;
+ case 0x1f2b /* Ἣ */: BSEQ(0xe1,0xbc,0xa3) /* ἣ */;
+ case 0x1f2c /* Ἤ */: BSEQ(0xe1,0xbc,0xa4) /* ἤ */;
+ case 0x1f2d /* Ἥ */: BSEQ(0xe1,0xbc,0xa5) /* ἥ */;
+ case 0x1f2e /* Ἦ */: BSEQ(0xe1,0xbc,0xa6) /* ἦ */;
+ case 0x1f2f /* Ἧ */: BSEQ(0xe1,0xbc,0xa7) /* ἧ */;
+ case 0x1f38 /* Ἰ */: BSEQ(0xe1,0xbc,0xb0) /* ἰ */;
+ case 0x1f39 /* Ἱ */: BSEQ(0xe1,0xbc,0xb1) /* ἱ */;
+ case 0x1f3a /* Ἲ */: BSEQ(0xe1,0xbc,0xb2) /* ἲ */;
+ case 0x1f3b /* Ἳ */: BSEQ(0xe1,0xbc,0xb3) /* ἳ */;
+ case 0x1f3c /* Ἴ */: BSEQ(0xe1,0xbc,0xb4) /* ἴ */;
+ case 0x1f3d /* Ἵ */: BSEQ(0xe1,0xbc,0xb5) /* ἵ */;
+ case 0x1f3e /* Ἶ */: BSEQ(0xe1,0xbc,0xb6) /* ἶ */;
+ case 0x1f3f /* Ἷ */: BSEQ(0xe1,0xbc,0xb7) /* ἷ */;
+ case 0x1f48 /* Ὀ */: BSEQ(0xe1,0xbd,0x80) /* ὀ */;
+ case 0x1f49 /* Ὁ */: BSEQ(0xe1,0xbd,0x81) /* ὁ */;
+ case 0x1f4a /* Ὂ */: BSEQ(0xe1,0xbd,0x82) /* ὂ */;
+ case 0x1f4b /* Ὃ */: BSEQ(0xe1,0xbd,0x83) /* ὃ */;
+ case 0x1f4c /* Ὄ */: BSEQ(0xe1,0xbd,0x84) /* ὄ */;
+ case 0x1f4d /* Ὅ */: BSEQ(0xe1,0xbd,0x85) /* ὅ */;
+ case 0x1f59 /* Ὑ */: BSEQ(0xe1,0xbd,0x91) /* ὑ */;
+ case 0x1f5b /* Ὓ */: BSEQ(0xe1,0xbd,0x93) /* ὓ */;
+ case 0x1f5d /* Ὕ */: BSEQ(0xe1,0xbd,0x95) /* ὕ */;
+ case 0x1f5f /* Ὗ */: BSEQ(0xe1,0xbd,0x97) /* ὗ */;
+ case 0x1f68 /* Ὠ */: BSEQ(0xe1,0xbd,0xa0) /* ὠ */;
+ case 0x1f69 /* Ὡ */: BSEQ(0xe1,0xbd,0xa1) /* ὡ */;
+ case 0x1f6a /* Ὢ */: BSEQ(0xe1,0xbd,0xa2) /* ὢ */;
+ case 0x1f6b /* Ὣ */: BSEQ(0xe1,0xbd,0xa3) /* ὣ */;
+ case 0x1f6c /* Ὤ */: BSEQ(0xe1,0xbd,0xa4) /* ὤ */;
+ case 0x1f6d /* Ὥ */: BSEQ(0xe1,0xbd,0xa5) /* ὥ */;
+ case 0x1f6e /* Ὦ */: BSEQ(0xe1,0xbd,0xa6) /* ὦ */;
+ case 0x1f6f /* Ὧ */: BSEQ(0xe1,0xbd,0xa7) /* ὧ */;
+ case 0x1f88 /* ᾈ */: BSEQ(0xe1,0xbe,0x80) /* ᾀ */;
+ case 0x1f89 /* ᾉ */: BSEQ(0xe1,0xbe,0x81) /* ᾁ */;
+ case 0x1f8a /* ᾊ */: BSEQ(0xe1,0xbe,0x82) /* ᾂ */;
+ case 0x1f8b /* ᾋ */: BSEQ(0xe1,0xbe,0x83) /* ᾃ */;
+ case 0x1f8c /* ᾌ */: BSEQ(0xe1,0xbe,0x84) /* ᾄ */;
+ case 0x1f8d /* ᾍ */: BSEQ(0xe1,0xbe,0x85) /* ᾅ */;
+ case 0x1f8e /* ᾎ */: BSEQ(0xe1,0xbe,0x86) /* ᾆ */;
+ case 0x1f8f /* ᾏ */: BSEQ(0xe1,0xbe,0x87) /* ᾇ */;
+ case 0x1f98 /* ᾘ */: BSEQ(0xe1,0xbe,0x90) /* ᾐ */;
+ case 0x1f99 /* ᾙ */: BSEQ(0xe1,0xbe,0x91) /* ᾑ */;
+ case 0x1f9a /* ᾚ */: BSEQ(0xe1,0xbe,0x92) /* ᾒ */;
+ case 0x1f9b /* ᾛ */: BSEQ(0xe1,0xbe,0x93) /* ᾓ */;
+ case 0x1f9c /* ᾜ */: BSEQ(0xe1,0xbe,0x94) /* ᾔ */;
+ case 0x1f9d /* ᾝ */: BSEQ(0xe1,0xbe,0x95) /* ᾕ */;
+ case 0x1f9e /* ᾞ */: BSEQ(0xe1,0xbe,0x96) /* ᾖ */;
+ case 0x1f9f /* ᾟ */: BSEQ(0xe1,0xbe,0x97) /* ᾗ */;
+ case 0x1fa8 /* ᾨ */: BSEQ(0xe1,0xbe,0xa0) /* ᾠ */;
+ case 0x1fa9 /* ᾩ */: BSEQ(0xe1,0xbe,0xa1) /* ᾡ */;
+ case 0x1faa /* ᾪ */: BSEQ(0xe1,0xbe,0xa2) /* ᾢ */;
+ case 0x1fab /* ᾫ */: BSEQ(0xe1,0xbe,0xa3) /* ᾣ */;
+ case 0x1fac /* ᾬ */: BSEQ(0xe1,0xbe,0xa4) /* ᾤ */;
+ case 0x1fad /* ᾭ */: BSEQ(0xe1,0xbe,0xa5) /* ᾥ */;
+ case 0x1fae /* ᾮ */: BSEQ(0xe1,0xbe,0xa6) /* ᾦ */;
+ case 0x1faf /* ᾯ */: BSEQ(0xe1,0xbe,0xa7) /* ᾧ */;
+ case 0x1fb8 /* Ᾰ */: BSEQ(0xe1,0xbe,0xb0) /* ᾰ */;
+ case 0x1fb9 /* Ᾱ */: BSEQ(0xe1,0xbe,0xb1) /* ᾱ */;
+ case 0x1fba /* Ὰ */: BSEQ(0xe1,0xbd,0xb0) /* ὰ */;
+ case 0x1fbb /* Ά */: BSEQ(0xe1,0xbd,0xb1) /* ά */;
+ case 0x1fbc /* ᾼ */: BSEQ(0xe1,0xbe,0xb3) /* ᾳ */;
+ case 0x1fc8 /* Ὲ */: BSEQ(0xe1,0xbd,0xb2) /* ὲ */;
+ case 0x1fc9 /* Έ */: BSEQ(0xe1,0xbd,0xb3) /* έ */;
+ case 0x1fca /* Ὴ */: BSEQ(0xe1,0xbd,0xb4) /* ὴ */;
+ case 0x1fcb /* Ή */: BSEQ(0xe1,0xbd,0xb5) /* ή */;
+ case 0x1fcc /* ῌ */: BSEQ(0xe1,0xbf,0x83) /* ῃ */;
+ case 0x1fd8 /* Ῐ */: BSEQ(0xe1,0xbf,0x90) /* ῐ */;
+ case 0x1fd9 /* Ῑ */: BSEQ(0xe1,0xbf,0x91) /* ῑ */;
+ case 0x1fda /* Ὶ */: BSEQ(0xe1,0xbd,0xb6) /* ὶ */;
+ case 0x1fdb /* Ί */: BSEQ(0xe1,0xbd,0xb7) /* ί */;
+ case 0x1fe8 /* Ῠ */: BSEQ(0xe1,0xbf,0xa0) /* ῠ */;
+ case 0x1fe9 /* Ῡ */: BSEQ(0xe1,0xbf,0xa1) /* ῡ */;
+ case 0x1fea /* Ὺ */: BSEQ(0xe1,0xbd,0xba) /* ὺ */;
+ case 0x1feb /* Ύ */: BSEQ(0xe1,0xbd,0xbb) /* ύ */;
+ case 0x1fec /* Ῥ */: BSEQ(0xe1,0xbf,0xa5) /* ῥ */;
+ case 0x1ff8 /* Ὸ */: BSEQ(0xe1,0xbd,0xb8) /* ὸ */;
+ case 0x1ff9 /* Ό */: BSEQ(0xe1,0xbd,0xb9) /* ό */;
+ case 0x1ffa /* Ὼ */: BSEQ(0xe1,0xbd,0xbc) /* ὼ */;
+ case 0x1ffb /* Ώ */: BSEQ(0xe1,0xbd,0xbd) /* ώ */;
+ case 0x1ffc /* ῼ */: BSEQ(0xe1,0xbf,0xb3) /* ῳ */;
+ case 0x2126 /* Ω */: BSEQ(0xcf,0x89) /* ω */;
+ case 0x212a /* K */: BSEQ(0x6b) /* k */;
+ case 0x212b /* Å */: BSEQ(0xc3,0xa5) /* å */;
+ case 0x2132 /* Ⅎ */: BSEQ(0xe2,0x85,0x8e) /* ⅎ */;
+ case 0x2160 /* Ⅰ */: BSEQ(0xe2,0x85,0xb0) /* ⅰ */;
+ case 0x2161 /* Ⅱ */: BSEQ(0xe2,0x85,0xb1) /* ⅱ */;
+ case 0x2162 /* Ⅲ */: BSEQ(0xe2,0x85,0xb2) /* ⅲ */;
+ case 0x2163 /* Ⅳ */: BSEQ(0xe2,0x85,0xb3) /* ⅳ */;
+ case 0x2164 /* Ⅴ */: BSEQ(0xe2,0x85,0xb4) /* ⅴ */;
+ case 0x2165 /* Ⅵ */: BSEQ(0xe2,0x85,0xb5) /* ⅵ */;
+ case 0x2166 /* Ⅶ */: BSEQ(0xe2,0x85,0xb6) /* ⅶ */;
+ case 0x2167 /* Ⅷ */: BSEQ(0xe2,0x85,0xb7) /* ⅷ */;
+ case 0x2168 /* Ⅸ */: BSEQ(0xe2,0x85,0xb8) /* ⅸ */;
+ case 0x2169 /* Ⅹ */: BSEQ(0xe2,0x85,0xb9) /* ⅹ */;
+ case 0x216a /* Ⅺ */: BSEQ(0xe2,0x85,0xba) /* ⅺ */;
+ case 0x216b /* Ⅻ */: BSEQ(0xe2,0x85,0xbb) /* ⅻ */;
+ case 0x216c /* Ⅼ */: BSEQ(0xe2,0x85,0xbc) /* ⅼ */;
+ case 0x216d /* Ⅽ */: BSEQ(0xe2,0x85,0xbd) /* ⅽ */;
+ case 0x216e /* Ⅾ */: BSEQ(0xe2,0x85,0xbe) /* ⅾ */;
+ case 0x216f /* Ⅿ */: BSEQ(0xe2,0x85,0xbf) /* ⅿ */;
+ case 0x2183 /* Ↄ */: BSEQ(0xe2,0x86,0x84) /* ↄ */;
+ case 0x24b6 /* Ⓐ */: BSEQ(0xe2,0x93,0x90) /* ⓐ */;
+ case 0x24b7 /* Ⓑ */: BSEQ(0xe2,0x93,0x91) /* ⓑ */;
+ case 0x24b8 /* Ⓒ */: BSEQ(0xe2,0x93,0x92) /* ⓒ */;
+ case 0x24b9 /* Ⓓ */: BSEQ(0xe2,0x93,0x93) /* ⓓ */;
+ case 0x24ba /* Ⓔ */: BSEQ(0xe2,0x93,0x94) /* ⓔ */;
+ case 0x24bb /* Ⓕ */: BSEQ(0xe2,0x93,0x95) /* ⓕ */;
+ case 0x24bc /* Ⓖ */: BSEQ(0xe2,0x93,0x96) /* ⓖ */;
+ case 0x24bd /* Ⓗ */: BSEQ(0xe2,0x93,0x97) /* ⓗ */;
+ case 0x24be /* Ⓘ */: BSEQ(0xe2,0x93,0x98) /* ⓘ */;
+ case 0x24bf /* Ⓙ */: BSEQ(0xe2,0x93,0x99) /* ⓙ */;
+ case 0x24c0 /* Ⓚ */: BSEQ(0xe2,0x93,0x9a) /* ⓚ */;
+ case 0x24c1 /* Ⓛ */: BSEQ(0xe2,0x93,0x9b) /* ⓛ */;
+ case 0x24c2 /* Ⓜ */: BSEQ(0xe2,0x93,0x9c) /* ⓜ */;
+ case 0x24c3 /* Ⓝ */: BSEQ(0xe2,0x93,0x9d) /* ⓝ */;
+ case 0x24c4 /* Ⓞ */: BSEQ(0xe2,0x93,0x9e) /* ⓞ */;
+ case 0x24c5 /* Ⓟ */: BSEQ(0xe2,0x93,0x9f) /* ⓟ */;
+ case 0x24c6 /* Ⓠ */: BSEQ(0xe2,0x93,0xa0) /* ⓠ */;
+ case 0x24c7 /* Ⓡ */: BSEQ(0xe2,0x93,0xa1) /* ⓡ */;
+ case 0x24c8 /* Ⓢ */: BSEQ(0xe2,0x93,0xa2) /* ⓢ */;
+ case 0x24c9 /* Ⓣ */: BSEQ(0xe2,0x93,0xa3) /* ⓣ */;
+ case 0x24ca /* Ⓤ */: BSEQ(0xe2,0x93,0xa4) /* ⓤ */;
+ case 0x24cb /* Ⓥ */: BSEQ(0xe2,0x93,0xa5) /* ⓥ */;
+ case 0x24cc /* Ⓦ */: BSEQ(0xe2,0x93,0xa6) /* ⓦ */;
+ case 0x24cd /* Ⓧ */: BSEQ(0xe2,0x93,0xa7) /* ⓧ */;
+ case 0x24ce /* Ⓨ */: BSEQ(0xe2,0x93,0xa8) /* ⓨ */;
+ case 0x24cf /* Ⓩ */: BSEQ(0xe2,0x93,0xa9) /* ⓩ */;
+ case 0x2c00 /* Ⰰ */: BSEQ(0xe2,0xb0,0xb0) /* ⰰ */;
+ case 0x2c01 /* Ⰱ */: BSEQ(0xe2,0xb0,0xb1) /* ⰱ */;
+ case 0x2c02 /* Ⰲ */: BSEQ(0xe2,0xb0,0xb2) /* ⰲ */;
+ case 0x2c03 /* Ⰳ */: BSEQ(0xe2,0xb0,0xb3) /* ⰳ */;
+ case 0x2c04 /* Ⰴ */: BSEQ(0xe2,0xb0,0xb4) /* ⰴ */;
+ case 0x2c05 /* Ⰵ */: BSEQ(0xe2,0xb0,0xb5) /* ⰵ */;
+ case 0x2c06 /* Ⰶ */: BSEQ(0xe2,0xb0,0xb6) /* ⰶ */;
+ case 0x2c07 /* Ⰷ */: BSEQ(0xe2,0xb0,0xb7) /* ⰷ */;
+ case 0x2c08 /* Ⰸ */: BSEQ(0xe2,0xb0,0xb8) /* ⰸ */;
+ case 0x2c09 /* Ⰹ */: BSEQ(0xe2,0xb0,0xb9) /* ⰹ */;
+ case 0x2c0a /* Ⰺ */: BSEQ(0xe2,0xb0,0xba) /* ⰺ */;
+ case 0x2c0b /* Ⰻ */: BSEQ(0xe2,0xb0,0xbb) /* ⰻ */;
+ case 0x2c0c /* Ⰼ */: BSEQ(0xe2,0xb0,0xbc) /* ⰼ */;
+ case 0x2c0d /* Ⰽ */: BSEQ(0xe2,0xb0,0xbd) /* ⰽ */;
+ case 0x2c0e /* Ⰾ */: BSEQ(0xe2,0xb0,0xbe) /* ⰾ */;
+ case 0x2c0f /* Ⰿ */: BSEQ(0xe2,0xb0,0xbf) /* ⰿ */;
+ case 0x2c10 /* Ⱀ */: BSEQ(0xe2,0xb1,0x80) /* ⱀ */;
+ case 0x2c11 /* Ⱁ */: BSEQ(0xe2,0xb1,0x81) /* ⱁ */;
+ case 0x2c12 /* Ⱂ */: BSEQ(0xe2,0xb1,0x82) /* ⱂ */;
+ case 0x2c13 /* Ⱃ */: BSEQ(0xe2,0xb1,0x83) /* ⱃ */;
+ case 0x2c14 /* Ⱄ */: BSEQ(0xe2,0xb1,0x84) /* ⱄ */;
+ case 0x2c15 /* Ⱅ */: BSEQ(0xe2,0xb1,0x85) /* ⱅ */;
+ case 0x2c16 /* Ⱆ */: BSEQ(0xe2,0xb1,0x86) /* ⱆ */;
+ case 0x2c17 /* Ⱇ */: BSEQ(0xe2,0xb1,0x87) /* ⱇ */;
+ case 0x2c18 /* Ⱈ */: BSEQ(0xe2,0xb1,0x88) /* ⱈ */;
+ case 0x2c19 /* Ⱉ */: BSEQ(0xe2,0xb1,0x89) /* ⱉ */;
+ case 0x2c1a /* Ⱊ */: BSEQ(0xe2,0xb1,0x8a) /* ⱊ */;
+ case 0x2c1b /* Ⱋ */: BSEQ(0xe2,0xb1,0x8b) /* ⱋ */;
+ case 0x2c1c /* Ⱌ */: BSEQ(0xe2,0xb1,0x8c) /* ⱌ */;
+ case 0x2c1d /* Ⱍ */: BSEQ(0xe2,0xb1,0x8d) /* ⱍ */;
+ case 0x2c1e /* Ⱎ */: BSEQ(0xe2,0xb1,0x8e) /* ⱎ */;
+ case 0x2c1f /* Ⱏ */: BSEQ(0xe2,0xb1,0x8f) /* ⱏ */;
+ case 0x2c20 /* Ⱐ */: BSEQ(0xe2,0xb1,0x90) /* ⱐ */;
+ case 0x2c21 /* Ⱑ */: BSEQ(0xe2,0xb1,0x91) /* ⱑ */;
+ case 0x2c22 /* Ⱒ */: BSEQ(0xe2,0xb1,0x92) /* ⱒ */;
+ case 0x2c23 /* Ⱓ */: BSEQ(0xe2,0xb1,0x93) /* ⱓ */;
+ case 0x2c24 /* Ⱔ */: BSEQ(0xe2,0xb1,0x94) /* ⱔ */;
+ case 0x2c25 /* Ⱕ */: BSEQ(0xe2,0xb1,0x95) /* ⱕ */;
+ case 0x2c26 /* Ⱖ */: BSEQ(0xe2,0xb1,0x96) /* ⱖ */;
+ case 0x2c27 /* Ⱗ */: BSEQ(0xe2,0xb1,0x97) /* ⱗ */;
+ case 0x2c28 /* Ⱘ */: BSEQ(0xe2,0xb1,0x98) /* ⱘ */;
+ case 0x2c29 /* Ⱙ */: BSEQ(0xe2,0xb1,0x99) /* ⱙ */;
+ case 0x2c2a /* Ⱚ */: BSEQ(0xe2,0xb1,0x9a) /* ⱚ */;
+ case 0x2c2b /* Ⱛ */: BSEQ(0xe2,0xb1,0x9b) /* ⱛ */;
+ case 0x2c2c /* Ⱜ */: BSEQ(0xe2,0xb1,0x9c) /* ⱜ */;
+ case 0x2c2d /* Ⱝ */: BSEQ(0xe2,0xb1,0x9d) /* ⱝ */;
+ case 0x2c2e /* Ⱞ */: BSEQ(0xe2,0xb1,0x9e) /* ⱞ */;
+ case 0x2c60 /* Ⱡ */: BSEQ(0xe2,0xb1,0xa1) /* ⱡ */;
+ case 0x2c62 /* Ɫ */: BSEQ(0xc9,0xab) /* ɫ */;
+ case 0x2c63 /* Ᵽ */: BSEQ(0xe1,0xb5,0xbd) /* ᵽ */;
+ case 0x2c64 /* Ɽ */: BSEQ(0xc9,0xbd) /* ɽ */;
+ case 0x2c67 /* Ⱨ */: BSEQ(0xe2,0xb1,0xa8) /* ⱨ */;
+ case 0x2c69 /* Ⱪ */: BSEQ(0xe2,0xb1,0xaa) /* ⱪ */;
+ case 0x2c6b /* Ⱬ */: BSEQ(0xe2,0xb1,0xac) /* ⱬ */;
+ case 0x2c6d /* Ɑ */: BSEQ(0xc9,0x91) /* ɑ */;
+ case 0x2c6e /* Ɱ */: BSEQ(0xc9,0xb1) /* ɱ */;
+ case 0x2c6f /* Ɐ */: BSEQ(0xc9,0x90) /* ɐ */;
+ case 0x2c70 /* Ɒ */: BSEQ(0xc9,0x92) /* ɒ */;
+ case 0x2c72 /* Ⱳ */: BSEQ(0xe2,0xb1,0xb3) /* ⱳ */;
+ case 0x2c75 /* Ⱶ */: BSEQ(0xe2,0xb1,0xb6) /* ⱶ */;
+ case 0x2c7e /* Ȿ */: BSEQ(0xc8,0xbf) /* ȿ */;
+ case 0x2c7f /* Ɀ */: BSEQ(0xc9,0x80) /* ɀ */;
+ case 0x2c80 /* Ⲁ */: BSEQ(0xe2,0xb2,0x81) /* ⲁ */;
+ case 0x2c82 /* Ⲃ */: BSEQ(0xe2,0xb2,0x83) /* ⲃ */;
+ case 0x2c84 /* Ⲅ */: BSEQ(0xe2,0xb2,0x85) /* ⲅ */;
+ case 0x2c86 /* Ⲇ */: BSEQ(0xe2,0xb2,0x87) /* ⲇ */;
+ case 0x2c88 /* Ⲉ */: BSEQ(0xe2,0xb2,0x89) /* ⲉ */;
+ case 0x2c8a /* Ⲋ */: BSEQ(0xe2,0xb2,0x8b) /* ⲋ */;
+ case 0x2c8c /* Ⲍ */: BSEQ(0xe2,0xb2,0x8d) /* ⲍ */;
+ case 0x2c8e /* Ⲏ */: BSEQ(0xe2,0xb2,0x8f) /* ⲏ */;
+ case 0x2c90 /* Ⲑ */: BSEQ(0xe2,0xb2,0x91) /* ⲑ */;
+ case 0x2c92 /* Ⲓ */: BSEQ(0xe2,0xb2,0x93) /* ⲓ */;
+ case 0x2c94 /* Ⲕ */: BSEQ(0xe2,0xb2,0x95) /* ⲕ */;
+ case 0x2c96 /* Ⲗ */: BSEQ(0xe2,0xb2,0x97) /* ⲗ */;
+ case 0x2c98 /* Ⲙ */: BSEQ(0xe2,0xb2,0x99) /* ⲙ */;
+ case 0x2c9a /* Ⲛ */: BSEQ(0xe2,0xb2,0x9b) /* ⲛ */;
+ case 0x2c9c /* Ⲝ */: BSEQ(0xe2,0xb2,0x9d) /* ⲝ */;
+ case 0x2c9e /* Ⲟ */: BSEQ(0xe2,0xb2,0x9f) /* ⲟ */;
+ case 0x2ca0 /* Ⲡ */: BSEQ(0xe2,0xb2,0xa1) /* ⲡ */;
+ case 0x2ca2 /* Ⲣ */: BSEQ(0xe2,0xb2,0xa3) /* ⲣ */;
+ case 0x2ca4 /* Ⲥ */: BSEQ(0xe2,0xb2,0xa5) /* ⲥ */;
+ case 0x2ca6 /* Ⲧ */: BSEQ(0xe2,0xb2,0xa7) /* ⲧ */;
+ case 0x2ca8 /* Ⲩ */: BSEQ(0xe2,0xb2,0xa9) /* ⲩ */;
+ case 0x2caa /* Ⲫ */: BSEQ(0xe2,0xb2,0xab) /* ⲫ */;
+ case 0x2cac /* Ⲭ */: BSEQ(0xe2,0xb2,0xad) /* ⲭ */;
+ case 0x2cae /* Ⲯ */: BSEQ(0xe2,0xb2,0xaf) /* ⲯ */;
+ case 0x2cb0 /* Ⲱ */: BSEQ(0xe2,0xb2,0xb1) /* ⲱ */;
+ case 0x2cb2 /* Ⲳ */: BSEQ(0xe2,0xb2,0xb3) /* ⲳ */;
+ case 0x2cb4 /* Ⲵ */: BSEQ(0xe2,0xb2,0xb5) /* ⲵ */;
+ case 0x2cb6 /* Ⲷ */: BSEQ(0xe2,0xb2,0xb7) /* ⲷ */;
+ case 0x2cb8 /* Ⲹ */: BSEQ(0xe2,0xb2,0xb9) /* ⲹ */;
+ case 0x2cba /* Ⲻ */: BSEQ(0xe2,0xb2,0xbb) /* ⲻ */;
+ case 0x2cbc /* Ⲽ */: BSEQ(0xe2,0xb2,0xbd) /* ⲽ */;
+ case 0x2cbe /* Ⲿ */: BSEQ(0xe2,0xb2,0xbf) /* ⲿ */;
+ case 0x2cc0 /* Ⳁ */: BSEQ(0xe2,0xb3,0x81) /* ⳁ */;
+ case 0x2cc2 /* Ⳃ */: BSEQ(0xe2,0xb3,0x83) /* ⳃ */;
+ case 0x2cc4 /* Ⳅ */: BSEQ(0xe2,0xb3,0x85) /* ⳅ */;
+ case 0x2cc6 /* Ⳇ */: BSEQ(0xe2,0xb3,0x87) /* ⳇ */;
+ case 0x2cc8 /* Ⳉ */: BSEQ(0xe2,0xb3,0x89) /* ⳉ */;
+ case 0x2cca /* Ⳋ */: BSEQ(0xe2,0xb3,0x8b) /* ⳋ */;
+ case 0x2ccc /* Ⳍ */: BSEQ(0xe2,0xb3,0x8d) /* ⳍ */;
+ case 0x2cce /* Ⳏ */: BSEQ(0xe2,0xb3,0x8f) /* ⳏ */;
+ case 0x2cd0 /* Ⳑ */: BSEQ(0xe2,0xb3,0x91) /* ⳑ */;
+ case 0x2cd2 /* Ⳓ */: BSEQ(0xe2,0xb3,0x93) /* ⳓ */;
+ case 0x2cd4 /* Ⳕ */: BSEQ(0xe2,0xb3,0x95) /* ⳕ */;
+ case 0x2cd6 /* Ⳗ */: BSEQ(0xe2,0xb3,0x97) /* ⳗ */;
+ case 0x2cd8 /* Ⳙ */: BSEQ(0xe2,0xb3,0x99) /* ⳙ */;
+ case 0x2cda /* Ⳛ */: BSEQ(0xe2,0xb3,0x9b) /* ⳛ */;
+ case 0x2cdc /* Ⳝ */: BSEQ(0xe2,0xb3,0x9d) /* ⳝ */;
+ case 0x2cde /* Ⳟ */: BSEQ(0xe2,0xb3,0x9f) /* ⳟ */;
+ case 0x2ce0 /* Ⳡ */: BSEQ(0xe2,0xb3,0xa1) /* ⳡ */;
+ case 0x2ce2 /* Ⳣ */: BSEQ(0xe2,0xb3,0xa3) /* ⳣ */;
+ case 0x2ceb /* Ⳬ */: BSEQ(0xe2,0xb3,0xac) /* ⳬ */;
+ case 0x2ced /* Ⳮ */: BSEQ(0xe2,0xb3,0xae) /* ⳮ */;
+ case 0x2cf2 /* Ⳳ */: BSEQ(0xe2,0xb3,0xb3) /* ⳳ */;
+ case 0xa640 /* Ꙁ */: BSEQ(0xea,0x99,0x81) /* ꙁ */;
+ case 0xa642 /* Ꙃ */: BSEQ(0xea,0x99,0x83) /* ꙃ */;
+ case 0xa644 /* Ꙅ */: BSEQ(0xea,0x99,0x85) /* ꙅ */;
+ case 0xa646 /* Ꙇ */: BSEQ(0xea,0x99,0x87) /* ꙇ */;
+ case 0xa648 /* Ꙉ */: BSEQ(0xea,0x99,0x89) /* ꙉ */;
+ case 0xa64a /* Ꙋ */: BSEQ(0xea,0x99,0x8b) /* ꙋ */;
+ case 0xa64c /* Ꙍ */: BSEQ(0xea,0x99,0x8d) /* ꙍ */;
+ case 0xa64e /* Ꙏ */: BSEQ(0xea,0x99,0x8f) /* ꙏ */;
+ case 0xa650 /* Ꙑ */: BSEQ(0xea,0x99,0x91) /* ꙑ */;
+ case 0xa652 /* Ꙓ */: BSEQ(0xea,0x99,0x93) /* ꙓ */;
+ case 0xa654 /* Ꙕ */: BSEQ(0xea,0x99,0x95) /* ꙕ */;
+ case 0xa656 /* Ꙗ */: BSEQ(0xea,0x99,0x97) /* ꙗ */;
+ case 0xa658 /* Ꙙ */: BSEQ(0xea,0x99,0x99) /* ꙙ */;
+ case 0xa65a /* Ꙛ */: BSEQ(0xea,0x99,0x9b) /* ꙛ */;
+ case 0xa65c /* Ꙝ */: BSEQ(0xea,0x99,0x9d) /* ꙝ */;
+ case 0xa65e /* Ꙟ */: BSEQ(0xea,0x99,0x9f) /* ꙟ */;
+ case 0xa660 /* Ꙡ */: BSEQ(0xea,0x99,0xa1) /* ꙡ */;
+ case 0xa662 /* Ꙣ */: BSEQ(0xea,0x99,0xa3) /* ꙣ */;
+ case 0xa664 /* Ꙥ */: BSEQ(0xea,0x99,0xa5) /* ꙥ */;
+ case 0xa666 /* Ꙧ */: BSEQ(0xea,0x99,0xa7) /* ꙧ */;
+ case 0xa668 /* Ꙩ */: BSEQ(0xea,0x99,0xa9) /* ꙩ */;
+ case 0xa66a /* Ꙫ */: BSEQ(0xea,0x99,0xab) /* ꙫ */;
+ case 0xa66c /* Ꙭ */: BSEQ(0xea,0x99,0xad) /* ꙭ */;
+ case 0xa680 /* Ꚁ */: BSEQ(0xea,0x9a,0x81) /* ꚁ */;
+ case 0xa682 /* Ꚃ */: BSEQ(0xea,0x9a,0x83) /* ꚃ */;
+ case 0xa684 /* Ꚅ */: BSEQ(0xea,0x9a,0x85) /* ꚅ */;
+ case 0xa686 /* Ꚇ */: BSEQ(0xea,0x9a,0x87) /* ꚇ */;
+ case 0xa688 /* Ꚉ */: BSEQ(0xea,0x9a,0x89) /* ꚉ */;
+ case 0xa68a /* Ꚋ */: BSEQ(0xea,0x9a,0x8b) /* ꚋ */;
+ case 0xa68c /* Ꚍ */: BSEQ(0xea,0x9a,0x8d) /* ꚍ */;
+ case 0xa68e /* Ꚏ */: BSEQ(0xea,0x9a,0x8f) /* ꚏ */;
+ case 0xa690 /* Ꚑ */: BSEQ(0xea,0x9a,0x91) /* ꚑ */;
+ case 0xa692 /* Ꚓ */: BSEQ(0xea,0x9a,0x93) /* ꚓ */;
+ case 0xa694 /* Ꚕ */: BSEQ(0xea,0x9a,0x95) /* ꚕ */;
+ case 0xa696 /* Ꚗ */: BSEQ(0xea,0x9a,0x97) /* ꚗ */;
+ case 0xa698 /* Ꚙ */: BSEQ(0xea,0x9a,0x99) /* ꚙ */;
+ case 0xa69a /* Ꚛ */: BSEQ(0xea,0x9a,0x9b) /* ꚛ */;
+ case 0xa722 /* Ꜣ */: BSEQ(0xea,0x9c,0xa3) /* ꜣ */;
+ case 0xa724 /* Ꜥ */: BSEQ(0xea,0x9c,0xa5) /* ꜥ */;
+ case 0xa726 /* Ꜧ */: BSEQ(0xea,0x9c,0xa7) /* ꜧ */;
+ case 0xa728 /* Ꜩ */: BSEQ(0xea,0x9c,0xa9) /* ꜩ */;
+ case 0xa72a /* Ꜫ */: BSEQ(0xea,0x9c,0xab) /* ꜫ */;
+ case 0xa72c /* Ꜭ */: BSEQ(0xea,0x9c,0xad) /* ꜭ */;
+ case 0xa72e /* Ꜯ */: BSEQ(0xea,0x9c,0xaf) /* ꜯ */;
+ case 0xa732 /* Ꜳ */: BSEQ(0xea,0x9c,0xb3) /* ꜳ */;
+ case 0xa734 /* Ꜵ */: BSEQ(0xea,0x9c,0xb5) /* ꜵ */;
+ case 0xa736 /* Ꜷ */: BSEQ(0xea,0x9c,0xb7) /* ꜷ */;
+ case 0xa738 /* Ꜹ */: BSEQ(0xea,0x9c,0xb9) /* ꜹ */;
+ case 0xa73a /* Ꜻ */: BSEQ(0xea,0x9c,0xbb) /* ꜻ */;
+ case 0xa73c /* Ꜽ */: BSEQ(0xea,0x9c,0xbd) /* ꜽ */;
+ case 0xa73e /* Ꜿ */: BSEQ(0xea,0x9c,0xbf) /* ꜿ */;
+ case 0xa740 /* Ꝁ */: BSEQ(0xea,0x9d,0x81) /* ꝁ */;
+ case 0xa742 /* Ꝃ */: BSEQ(0xea,0x9d,0x83) /* ꝃ */;
+ case 0xa744 /* Ꝅ */: BSEQ(0xea,0x9d,0x85) /* ꝅ */;
+ case 0xa746 /* Ꝇ */: BSEQ(0xea,0x9d,0x87) /* ꝇ */;
+ case 0xa748 /* Ꝉ */: BSEQ(0xea,0x9d,0x89) /* ꝉ */;
+ case 0xa74a /* Ꝋ */: BSEQ(0xea,0x9d,0x8b) /* ꝋ */;
+ case 0xa74c /* Ꝍ */: BSEQ(0xea,0x9d,0x8d) /* ꝍ */;
+ case 0xa74e /* Ꝏ */: BSEQ(0xea,0x9d,0x8f) /* ꝏ */;
+ case 0xa750 /* Ꝑ */: BSEQ(0xea,0x9d,0x91) /* ꝑ */;
+ case 0xa752 /* Ꝓ */: BSEQ(0xea,0x9d,0x93) /* ꝓ */;
+ case 0xa754 /* Ꝕ */: BSEQ(0xea,0x9d,0x95) /* ꝕ */;
+ case 0xa756 /* Ꝗ */: BSEQ(0xea,0x9d,0x97) /* ꝗ */;
+ case 0xa758 /* Ꝙ */: BSEQ(0xea,0x9d,0x99) /* ꝙ */;
+ case 0xa75a /* Ꝛ */: BSEQ(0xea,0x9d,0x9b) /* ꝛ */;
+ case 0xa75c /* Ꝝ */: BSEQ(0xea,0x9d,0x9d) /* ꝝ */;
+ case 0xa75e /* Ꝟ */: BSEQ(0xea,0x9d,0x9f) /* ꝟ */;
+ case 0xa760 /* Ꝡ */: BSEQ(0xea,0x9d,0xa1) /* ꝡ */;
+ case 0xa762 /* Ꝣ */: BSEQ(0xea,0x9d,0xa3) /* ꝣ */;
+ case 0xa764 /* Ꝥ */: BSEQ(0xea,0x9d,0xa5) /* ꝥ */;
+ case 0xa766 /* Ꝧ */: BSEQ(0xea,0x9d,0xa7) /* ꝧ */;
+ case 0xa768 /* Ꝩ */: BSEQ(0xea,0x9d,0xa9) /* ꝩ */;
+ case 0xa76a /* Ꝫ */: BSEQ(0xea,0x9d,0xab) /* ꝫ */;
+ case 0xa76c /* Ꝭ */: BSEQ(0xea,0x9d,0xad) /* ꝭ */;
+ case 0xa76e /* Ꝯ */: BSEQ(0xea,0x9d,0xaf) /* ꝯ */;
+ case 0xa779 /* Ꝺ */: BSEQ(0xea,0x9d,0xba) /* ꝺ */;
+ case 0xa77b /* Ꝼ */: BSEQ(0xea,0x9d,0xbc) /* ꝼ */;
+ case 0xa77d /* Ᵹ */: BSEQ(0xe1,0xb5,0xb9) /* ᵹ */;
+ case 0xa77e /* Ꝿ */: BSEQ(0xea,0x9d,0xbf) /* ꝿ */;
+ case 0xa780 /* Ꞁ */: BSEQ(0xea,0x9e,0x81) /* ꞁ */;
+ case 0xa782 /* Ꞃ */: BSEQ(0xea,0x9e,0x83) /* ꞃ */;
+ case 0xa784 /* Ꞅ */: BSEQ(0xea,0x9e,0x85) /* ꞅ */;
+ case 0xa786 /* Ꞇ */: BSEQ(0xea,0x9e,0x87) /* ꞇ */;
+ case 0xa78b /* Ꞌ */: BSEQ(0xea,0x9e,0x8c) /* ꞌ */;
+ case 0xa78d /* Ɥ */: BSEQ(0xc9,0xa5) /* ɥ */;
+ case 0xa790 /* Ꞑ */: BSEQ(0xea,0x9e,0x91) /* ꞑ */;
+ case 0xa792 /* Ꞓ */: BSEQ(0xea,0x9e,0x93) /* ꞓ */;
+ case 0xa796 /* Ꞗ */: BSEQ(0xea,0x9e,0x97) /* ꞗ */;
+ case 0xa798 /* Ꞙ */: BSEQ(0xea,0x9e,0x99) /* ꞙ */;
+ case 0xa79a /* Ꞛ */: BSEQ(0xea,0x9e,0x9b) /* ꞛ */;
+ case 0xa79c /* Ꞝ */: BSEQ(0xea,0x9e,0x9d) /* ꞝ */;
+ case 0xa79e /* Ꞟ */: BSEQ(0xea,0x9e,0x9f) /* ꞟ */;
+ case 0xa7a0 /* Ꞡ */: BSEQ(0xea,0x9e,0xa1) /* ꞡ */;
+ case 0xa7a2 /* Ꞣ */: BSEQ(0xea,0x9e,0xa3) /* ꞣ */;
+ case 0xa7a4 /* Ꞥ */: BSEQ(0xea,0x9e,0xa5) /* ꞥ */;
+ case 0xa7a6 /* Ꞧ */: BSEQ(0xea,0x9e,0xa7) /* ꞧ */;
+ case 0xa7a8 /* Ꞩ */: BSEQ(0xea,0x9e,0xa9) /* ꞩ */;
+ case 0xa7aa /* Ɦ */: BSEQ(0xc9,0xa6) /* ɦ */;
+ case 0xa7ab /* Ɜ */: BSEQ(0xc9,0x9c) /* ɜ */;
+ case 0xa7ac /* Ɡ */: BSEQ(0xc9,0xa1) /* ɡ */;
+ case 0xa7ad /* Ɬ */: BSEQ(0xc9,0xac) /* ɬ */;
+ case 0xa7ae /* Ɪ */: BSEQ(0xc9,0xaa) /* ɪ */;
+ case 0xa7b0 /* Ʞ */: BSEQ(0xca,0x9e) /* ʞ */;
+ case 0xa7b1 /* Ʇ */: BSEQ(0xca,0x87) /* ʇ */;
+ case 0xa7b2 /* Ʝ */: BSEQ(0xca,0x9d) /* ʝ */;
+ case 0xa7b3 /* Ꭓ */: BSEQ(0xea,0xad,0x93) /* ꭓ */;
+ case 0xa7b4 /* Ꞵ */: BSEQ(0xea,0x9e,0xb5) /* ꞵ */;
+ case 0xa7b6 /* Ꞷ */: BSEQ(0xea,0x9e,0xb7) /* ꞷ */;
+ case 0xa7b8 /* Ꞹ */: BSEQ(0xea,0x9e,0xb9) /* ꞹ */;
+ case 0xa7ba /* Ꞻ */: BSEQ(0xea,0x9e,0xbb) /* ꞻ */;
+ case 0xa7bc /* Ꞽ */: BSEQ(0xea,0x9e,0xbd) /* ꞽ */;
+ case 0xa7be /* Ꞿ */: BSEQ(0xea,0x9e,0xbf) /* ꞿ */;
+ case 0xa7c2 /* Ꟃ */: BSEQ(0xea,0x9f,0x83) /* ꟃ */;
+ case 0xa7c4 /* Ꞔ */: BSEQ(0xea,0x9e,0x94) /* ꞔ */;
+ case 0xa7c5 /* Ʂ */: BSEQ(0xca,0x82) /* ʂ */;
+ case 0xa7c6 /* Ᶎ */: BSEQ(0xe1,0xb6,0x8e) /* ᶎ */;
+ case 0xa7c7 /* Ꟈ */: BSEQ(0xea,0x9f,0x88) /* ꟈ */;
+ case 0xa7c9 /* Ꟊ */: BSEQ(0xea,0x9f,0x8a) /* ꟊ */;
+ case 0xa7f5 /* Ꟶ */: BSEQ(0xea,0x9f,0xb6) /* ꟶ */;
+ case 0xff21 /* A */: BSEQ(0xef,0xbd,0x81) /* a */;
+ case 0xff22 /* B */: BSEQ(0xef,0xbd,0x82) /* b */;
+ case 0xff23 /* C */: BSEQ(0xef,0xbd,0x83) /* c */;
+ case 0xff24 /* D */: BSEQ(0xef,0xbd,0x84) /* d */;
+ case 0xff25 /* E */: BSEQ(0xef,0xbd,0x85) /* e */;
+ case 0xff26 /* F */: BSEQ(0xef,0xbd,0x86) /* f */;
+ case 0xff27 /* G */: BSEQ(0xef,0xbd,0x87) /* g */;
+ case 0xff28 /* H */: BSEQ(0xef,0xbd,0x88) /* h */;
+ case 0xff29 /* I */: BSEQ(0xef,0xbd,0x89) /* i */;
+ case 0xff2a /* J */: BSEQ(0xef,0xbd,0x8a) /* j */;
+ case 0xff2b /* K */: BSEQ(0xef,0xbd,0x8b) /* k */;
+ case 0xff2c /* L */: BSEQ(0xef,0xbd,0x8c) /* l */;
+ case 0xff2d /* M */: BSEQ(0xef,0xbd,0x8d) /* m */;
+ case 0xff2e /* N */: BSEQ(0xef,0xbd,0x8e) /* n */;
+ case 0xff2f /* O */: BSEQ(0xef,0xbd,0x8f) /* o */;
+ case 0xff30 /* P */: BSEQ(0xef,0xbd,0x90) /* p */;
+ case 0xff31 /* Q */: BSEQ(0xef,0xbd,0x91) /* q */;
+ case 0xff32 /* R */: BSEQ(0xef,0xbd,0x92) /* r */;
+ case 0xff33 /* S */: BSEQ(0xef,0xbd,0x93) /* s */;
+ case 0xff34 /* T */: BSEQ(0xef,0xbd,0x94) /* t */;
+ case 0xff35 /* U */: BSEQ(0xef,0xbd,0x95) /* u */;
+ case 0xff36 /* V */: BSEQ(0xef,0xbd,0x96) /* v */;
+ case 0xff37 /* W */: BSEQ(0xef,0xbd,0x97) /* w */;
+ case 0xff38 /* X */: BSEQ(0xef,0xbd,0x98) /* x */;
+ case 0xff39 /* Y */: BSEQ(0xef,0xbd,0x99) /* y */;
+ case 0xff3a /* Z */: BSEQ(0xef,0xbd,0x9a) /* z */;
+ case 0x10400 /* 𐐀 */: BSEQ(0xf0,0x90,0x90,0xa8) /* 𐐨 */;
+ case 0x10401 /* 𐐁 */: BSEQ(0xf0,0x90,0x90,0xa9) /* 𐐩 */;
+ case 0x10402 /* 𐐂 */: BSEQ(0xf0,0x90,0x90,0xaa) /* 𐐪 */;
+ case 0x10403 /* 𐐃 */: BSEQ(0xf0,0x90,0x90,0xab) /* 𐐫 */;
+ case 0x10404 /* 𐐄 */: BSEQ(0xf0,0x90,0x90,0xac) /* 𐐬 */;
+ case 0x10405 /* 𐐅 */: BSEQ(0xf0,0x90,0x90,0xad) /* 𐐭 */;
+ case 0x10406 /* 𐐆 */: BSEQ(0xf0,0x90,0x90,0xae) /* 𐐮 */;
+ case 0x10407 /* 𐐇 */: BSEQ(0xf0,0x90,0x90,0xaf) /* 𐐯 */;
+ case 0x10408 /* 𐐈 */: BSEQ(0xf0,0x90,0x90,0xb0) /* 𐐰 */;
+ case 0x10409 /* 𐐉 */: BSEQ(0xf0,0x90,0x90,0xb1) /* 𐐱 */;
+ case 0x1040a /* 𐐊 */: BSEQ(0xf0,0x90,0x90,0xb2) /* 𐐲 */;
+ case 0x1040b /* 𐐋 */: BSEQ(0xf0,0x90,0x90,0xb3) /* 𐐳 */;
+ case 0x1040c /* 𐐌 */: BSEQ(0xf0,0x90,0x90,0xb4) /* 𐐴 */;
+ case 0x1040d /* 𐐍 */: BSEQ(0xf0,0x90,0x90,0xb5) /* 𐐵 */;
+ case 0x1040e /* 𐐎 */: BSEQ(0xf0,0x90,0x90,0xb6) /* 𐐶 */;
+ case 0x1040f /* 𐐏 */: BSEQ(0xf0,0x90,0x90,0xb7) /* 𐐷 */;
+ case 0x10410 /* 𐐐 */: BSEQ(0xf0,0x90,0x90,0xb8) /* 𐐸 */;
+ case 0x10411 /* 𐐑 */: BSEQ(0xf0,0x90,0x90,0xb9) /* 𐐹 */;
+ case 0x10412 /* 𐐒 */: BSEQ(0xf0,0x90,0x90,0xba) /* 𐐺 */;
+ case 0x10413 /* 𐐓 */: BSEQ(0xf0,0x90,0x90,0xbb) /* 𐐻 */;
+ case 0x10414 /* 𐐔 */: BSEQ(0xf0,0x90,0x90,0xbc) /* 𐐼 */;
+ case 0x10415 /* 𐐕 */: BSEQ(0xf0,0x90,0x90,0xbd) /* 𐐽 */;
+ case 0x10416 /* 𐐖 */: BSEQ(0xf0,0x90,0x90,0xbe) /* 𐐾 */;
+ case 0x10417 /* 𐐗 */: BSEQ(0xf0,0x90,0x90,0xbf) /* 𐐿 */;
+ case 0x10418 /* 𐐘 */: BSEQ(0xf0,0x90,0x91,0x80) /* 𐑀 */;
+ case 0x10419 /* 𐐙 */: BSEQ(0xf0,0x90,0x91,0x81) /* 𐑁 */;
+ case 0x1041a /* 𐐚 */: BSEQ(0xf0,0x90,0x91,0x82) /* 𐑂 */;
+ case 0x1041b /* 𐐛 */: BSEQ(0xf0,0x90,0x91,0x83) /* 𐑃 */;
+ case 0x1041c /* 𐐜 */: BSEQ(0xf0,0x90,0x91,0x84) /* 𐑄 */;
+ case 0x1041d /* 𐐝 */: BSEQ(0xf0,0x90,0x91,0x85) /* 𐑅 */;
+ case 0x1041e /* 𐐞 */: BSEQ(0xf0,0x90,0x91,0x86) /* 𐑆 */;
+ case 0x1041f /* 𐐟 */: BSEQ(0xf0,0x90,0x91,0x87) /* 𐑇 */;
+ case 0x10420 /* 𐐠 */: BSEQ(0xf0,0x90,0x91,0x88) /* 𐑈 */;
+ case 0x10421 /* 𐐡 */: BSEQ(0xf0,0x90,0x91,0x89) /* 𐑉 */;
+ case 0x10422 /* 𐐢 */: BSEQ(0xf0,0x90,0x91,0x8a) /* 𐑊 */;
+ case 0x10423 /* 𐐣 */: BSEQ(0xf0,0x90,0x91,0x8b) /* 𐑋 */;
+ case 0x10424 /* 𐐤 */: BSEQ(0xf0,0x90,0x91,0x8c) /* 𐑌 */;
+ case 0x10425 /* 𐐥 */: BSEQ(0xf0,0x90,0x91,0x8d) /* 𐑍 */;
+ case 0x10426 /* 𐐦 */: BSEQ(0xf0,0x90,0x91,0x8e) /* 𐑎 */;
+ case 0x10427 /* 𐐧 */: BSEQ(0xf0,0x90,0x91,0x8f) /* 𐑏 */;
+ case 0x104b0 /* 𐒰 */: BSEQ(0xf0,0x90,0x93,0x98) /* 𐓘 */;
+ case 0x104b1 /* 𐒱 */: BSEQ(0xf0,0x90,0x93,0x99) /* 𐓙 */;
+ case 0x104b2 /* 𐒲 */: BSEQ(0xf0,0x90,0x93,0x9a) /* 𐓚 */;
+ case 0x104b3 /* 𐒳 */: BSEQ(0xf0,0x90,0x93,0x9b) /* 𐓛 */;
+ case 0x104b4 /* 𐒴 */: BSEQ(0xf0,0x90,0x93,0x9c) /* 𐓜 */;
+ case 0x104b5 /* 𐒵 */: BSEQ(0xf0,0x90,0x93,0x9d) /* 𐓝 */;
+ case 0x104b6 /* 𐒶 */: BSEQ(0xf0,0x90,0x93,0x9e) /* 𐓞 */;
+ case 0x104b7 /* 𐒷 */: BSEQ(0xf0,0x90,0x93,0x9f) /* 𐓟 */;
+ case 0x104b8 /* 𐒸 */: BSEQ(0xf0,0x90,0x93,0xa0) /* 𐓠 */;
+ case 0x104b9 /* 𐒹 */: BSEQ(0xf0,0x90,0x93,0xa1) /* 𐓡 */;
+ case 0x104ba /* 𐒺 */: BSEQ(0xf0,0x90,0x93,0xa2) /* 𐓢 */;
+ case 0x104bb /* 𐒻 */: BSEQ(0xf0,0x90,0x93,0xa3) /* 𐓣 */;
+ case 0x104bc /* 𐒼 */: BSEQ(0xf0,0x90,0x93,0xa4) /* 𐓤 */;
+ case 0x104bd /* 𐒽 */: BSEQ(0xf0,0x90,0x93,0xa5) /* 𐓥 */;
+ case 0x104be /* 𐒾 */: BSEQ(0xf0,0x90,0x93,0xa6) /* 𐓦 */;
+ case 0x104bf /* 𐒿 */: BSEQ(0xf0,0x90,0x93,0xa7) /* 𐓧 */;
+ case 0x104c0 /* 𐓀 */: BSEQ(0xf0,0x90,0x93,0xa8) /* 𐓨 */;
+ case 0x104c1 /* 𐓁 */: BSEQ(0xf0,0x90,0x93,0xa9) /* 𐓩 */;
+ case 0x104c2 /* 𐓂 */: BSEQ(0xf0,0x90,0x93,0xaa) /* 𐓪 */;
+ case 0x104c3 /* 𐓃 */: BSEQ(0xf0,0x90,0x93,0xab) /* 𐓫 */;
+ case 0x104c4 /* 𐓄 */: BSEQ(0xf0,0x90,0x93,0xac) /* 𐓬 */;
+ case 0x104c5 /* 𐓅 */: BSEQ(0xf0,0x90,0x93,0xad) /* 𐓭 */;
+ case 0x104c6 /* 𐓆 */: BSEQ(0xf0,0x90,0x93,0xae) /* 𐓮 */;
+ case 0x104c7 /* 𐓇 */: BSEQ(0xf0,0x90,0x93,0xaf) /* 𐓯 */;
+ case 0x104c8 /* 𐓈 */: BSEQ(0xf0,0x90,0x93,0xb0) /* 𐓰 */;
+ case 0x104c9 /* 𐓉 */: BSEQ(0xf0,0x90,0x93,0xb1) /* 𐓱 */;
+ case 0x104ca /* 𐓊 */: BSEQ(0xf0,0x90,0x93,0xb2) /* 𐓲 */;
+ case 0x104cb /* 𐓋 */: BSEQ(0xf0,0x90,0x93,0xb3) /* 𐓳 */;
+ case 0x104cc /* 𐓌 */: BSEQ(0xf0,0x90,0x93,0xb4) /* 𐓴 */;
+ case 0x104cd /* 𐓍 */: BSEQ(0xf0,0x90,0x93,0xb5) /* 𐓵 */;
+ case 0x104ce /* 𐓎 */: BSEQ(0xf0,0x90,0x93,0xb6) /* 𐓶 */;
+ case 0x104cf /* 𐓏 */: BSEQ(0xf0,0x90,0x93,0xb7) /* 𐓷 */;
+ case 0x104d0 /* 𐓐 */: BSEQ(0xf0,0x90,0x93,0xb8) /* 𐓸 */;
+ case 0x104d1 /* 𐓑 */: BSEQ(0xf0,0x90,0x93,0xb9) /* 𐓹 */;
+ case 0x104d2 /* 𐓒 */: BSEQ(0xf0,0x90,0x93,0xba) /* 𐓺 */;
+ case 0x104d3 /* 𐓓 */: BSEQ(0xf0,0x90,0x93,0xbb) /* 𐓻 */;
+ case 0x10c80 /* 𐲀 */: BSEQ(0xf0,0x90,0xb3,0x80) /* 𐳀 */;
+ case 0x10c81 /* 𐲁 */: BSEQ(0xf0,0x90,0xb3,0x81) /* 𐳁 */;
+ case 0x10c82 /* 𐲂 */: BSEQ(0xf0,0x90,0xb3,0x82) /* 𐳂 */;
+ case 0x10c83 /* 𐲃 */: BSEQ(0xf0,0x90,0xb3,0x83) /* 𐳃 */;
+ case 0x10c84 /* 𐲄 */: BSEQ(0xf0,0x90,0xb3,0x84) /* 𐳄 */;
+ case 0x10c85 /* 𐲅 */: BSEQ(0xf0,0x90,0xb3,0x85) /* 𐳅 */;
+ case 0x10c86 /* 𐲆 */: BSEQ(0xf0,0x90,0xb3,0x86) /* 𐳆 */;
+ case 0x10c87 /* 𐲇 */: BSEQ(0xf0,0x90,0xb3,0x87) /* 𐳇 */;
+ case 0x10c88 /* 𐲈 */: BSEQ(0xf0,0x90,0xb3,0x88) /* 𐳈 */;
+ case 0x10c89 /* 𐲉 */: BSEQ(0xf0,0x90,0xb3,0x89) /* 𐳉 */;
+ case 0x10c8a /* 𐲊 */: BSEQ(0xf0,0x90,0xb3,0x8a) /* 𐳊 */;
+ case 0x10c8b /* 𐲋 */: BSEQ(0xf0,0x90,0xb3,0x8b) /* 𐳋 */;
+ case 0x10c8c /* 𐲌 */: BSEQ(0xf0,0x90,0xb3,0x8c) /* 𐳌 */;
+ case 0x10c8d /* 𐲍 */: BSEQ(0xf0,0x90,0xb3,0x8d) /* 𐳍 */;
+ case 0x10c8e /* 𐲎 */: BSEQ(0xf0,0x90,0xb3,0x8e) /* 𐳎 */;
+ case 0x10c8f /* 𐲏 */: BSEQ(0xf0,0x90,0xb3,0x8f) /* 𐳏 */;
+ case 0x10c90 /* 𐲐 */: BSEQ(0xf0,0x90,0xb3,0x90) /* 𐳐 */;
+ case 0x10c91 /* 𐲑 */: BSEQ(0xf0,0x90,0xb3,0x91) /* 𐳑 */;
+ case 0x10c92 /* 𐲒 */: BSEQ(0xf0,0x90,0xb3,0x92) /* 𐳒 */;
+ case 0x10c93 /* 𐲓 */: BSEQ(0xf0,0x90,0xb3,0x93) /* 𐳓 */;
+ case 0x10c94 /* 𐲔 */: BSEQ(0xf0,0x90,0xb3,0x94) /* 𐳔 */;
+ case 0x10c95 /* 𐲕 */: BSEQ(0xf0,0x90,0xb3,0x95) /* 𐳕 */;
+ case 0x10c96 /* 𐲖 */: BSEQ(0xf0,0x90,0xb3,0x96) /* 𐳖 */;
+ case 0x10c97 /* 𐲗 */: BSEQ(0xf0,0x90,0xb3,0x97) /* 𐳗 */;
+ case 0x10c98 /* 𐲘 */: BSEQ(0xf0,0x90,0xb3,0x98) /* 𐳘 */;
+ case 0x10c99 /* 𐲙 */: BSEQ(0xf0,0x90,0xb3,0x99) /* 𐳙 */;
+ case 0x10c9a /* 𐲚 */: BSEQ(0xf0,0x90,0xb3,0x9a) /* 𐳚 */;
+ case 0x10c9b /* 𐲛 */: BSEQ(0xf0,0x90,0xb3,0x9b) /* 𐳛 */;
+ case 0x10c9c /* 𐲜 */: BSEQ(0xf0,0x90,0xb3,0x9c) /* 𐳜 */;
+ case 0x10c9d /* 𐲝 */: BSEQ(0xf0,0x90,0xb3,0x9d) /* 𐳝 */;
+ case 0x10c9e /* 𐲞 */: BSEQ(0xf0,0x90,0xb3,0x9e) /* 𐳞 */;
+ case 0x10c9f /* 𐲟 */: BSEQ(0xf0,0x90,0xb3,0x9f) /* 𐳟 */;
+ case 0x10ca0 /* 𐲠 */: BSEQ(0xf0,0x90,0xb3,0xa0) /* 𐳠 */;
+ case 0x10ca1 /* 𐲡 */: BSEQ(0xf0,0x90,0xb3,0xa1) /* 𐳡 */;
+ case 0x10ca2 /* 𐲢 */: BSEQ(0xf0,0x90,0xb3,0xa2) /* 𐳢 */;
+ case 0x10ca3 /* 𐲣 */: BSEQ(0xf0,0x90,0xb3,0xa3) /* 𐳣 */;
+ case 0x10ca4 /* 𐲤 */: BSEQ(0xf0,0x90,0xb3,0xa4) /* 𐳤 */;
+ case 0x10ca5 /* 𐲥 */: BSEQ(0xf0,0x90,0xb3,0xa5) /* 𐳥 */;
+ case 0x10ca6 /* 𐲦 */: BSEQ(0xf0,0x90,0xb3,0xa6) /* 𐳦 */;
+ case 0x10ca7 /* 𐲧 */: BSEQ(0xf0,0x90,0xb3,0xa7) /* 𐳧 */;
+ case 0x10ca8 /* 𐲨 */: BSEQ(0xf0,0x90,0xb3,0xa8) /* 𐳨 */;
+ case 0x10ca9 /* 𐲩 */: BSEQ(0xf0,0x90,0xb3,0xa9) /* 𐳩 */;
+ case 0x10caa /* 𐲪 */: BSEQ(0xf0,0x90,0xb3,0xaa) /* 𐳪 */;
+ case 0x10cab /* 𐲫 */: BSEQ(0xf0,0x90,0xb3,0xab) /* 𐳫 */;
+ case 0x10cac /* 𐲬 */: BSEQ(0xf0,0x90,0xb3,0xac) /* 𐳬 */;
+ case 0x10cad /* 𐲭 */: BSEQ(0xf0,0x90,0xb3,0xad) /* 𐳭 */;
+ case 0x10cae /* 𐲮 */: BSEQ(0xf0,0x90,0xb3,0xae) /* 𐳮 */;
+ case 0x10caf /* 𐲯 */: BSEQ(0xf0,0x90,0xb3,0xaf) /* 𐳯 */;
+ case 0x10cb0 /* 𐲰 */: BSEQ(0xf0,0x90,0xb3,0xb0) /* 𐳰 */;
+ case 0x10cb1 /* 𐲱 */: BSEQ(0xf0,0x90,0xb3,0xb1) /* 𐳱 */;
+ case 0x10cb2 /* 𐲲 */: BSEQ(0xf0,0x90,0xb3,0xb2) /* 𐳲 */;
+ case 0x118a0 /* 𑢠 */: BSEQ(0xf0,0x91,0xa3,0x80) /* 𑣀 */;
+ case 0x118a1 /* 𑢡 */: BSEQ(0xf0,0x91,0xa3,0x81) /* 𑣁 */;
+ case 0x118a2 /* 𑢢 */: BSEQ(0xf0,0x91,0xa3,0x82) /* 𑣂 */;
+ case 0x118a3 /* 𑢣 */: BSEQ(0xf0,0x91,0xa3,0x83) /* 𑣃 */;
+ case 0x118a4 /* 𑢤 */: BSEQ(0xf0,0x91,0xa3,0x84) /* 𑣄 */;
+ case 0x118a5 /* 𑢥 */: BSEQ(0xf0,0x91,0xa3,0x85) /* 𑣅 */;
+ case 0x118a6 /* 𑢦 */: BSEQ(0xf0,0x91,0xa3,0x86) /* 𑣆 */;
+ case 0x118a7 /* 𑢧 */: BSEQ(0xf0,0x91,0xa3,0x87) /* 𑣇 */;
+ case 0x118a8 /* 𑢨 */: BSEQ(0xf0,0x91,0xa3,0x88) /* 𑣈 */;
+ case 0x118a9 /* 𑢩 */: BSEQ(0xf0,0x91,0xa3,0x89) /* 𑣉 */;
+ case 0x118aa /* 𑢪 */: BSEQ(0xf0,0x91,0xa3,0x8a) /* 𑣊 */;
+ case 0x118ab /* 𑢫 */: BSEQ(0xf0,0x91,0xa3,0x8b) /* 𑣋 */;
+ case 0x118ac /* 𑢬 */: BSEQ(0xf0,0x91,0xa3,0x8c) /* 𑣌 */;
+ case 0x118ad /* 𑢭 */: BSEQ(0xf0,0x91,0xa3,0x8d) /* 𑣍 */;
+ case 0x118ae /* 𑢮 */: BSEQ(0xf0,0x91,0xa3,0x8e) /* 𑣎 */;
+ case 0x118af /* 𑢯 */: BSEQ(0xf0,0x91,0xa3,0x8f) /* 𑣏 */;
+ case 0x118b0 /* 𑢰 */: BSEQ(0xf0,0x91,0xa3,0x90) /* 𑣐 */;
+ case 0x118b1 /* 𑢱 */: BSEQ(0xf0,0x91,0xa3,0x91) /* 𑣑 */;
+ case 0x118b2 /* 𑢲 */: BSEQ(0xf0,0x91,0xa3,0x92) /* 𑣒 */;
+ case 0x118b3 /* 𑢳 */: BSEQ(0xf0,0x91,0xa3,0x93) /* 𑣓 */;
+ case 0x118b4 /* 𑢴 */: BSEQ(0xf0,0x91,0xa3,0x94) /* 𑣔 */;
+ case 0x118b5 /* 𑢵 */: BSEQ(0xf0,0x91,0xa3,0x95) /* 𑣕 */;
+ case 0x118b6 /* 𑢶 */: BSEQ(0xf0,0x91,0xa3,0x96) /* 𑣖 */;
+ case 0x118b7 /* 𑢷 */: BSEQ(0xf0,0x91,0xa3,0x97) /* 𑣗 */;
+ case 0x118b8 /* 𑢸 */: BSEQ(0xf0,0x91,0xa3,0x98) /* 𑣘 */;
+ case 0x118b9 /* 𑢹 */: BSEQ(0xf0,0x91,0xa3,0x99) /* 𑣙 */;
+ case 0x118ba /* 𑢺 */: BSEQ(0xf0,0x91,0xa3,0x9a) /* 𑣚 */;
+ case 0x118bb /* 𑢻 */: BSEQ(0xf0,0x91,0xa3,0x9b) /* 𑣛 */;
+ case 0x118bc /* 𑢼 */: BSEQ(0xf0,0x91,0xa3,0x9c) /* 𑣜 */;
+ case 0x118bd /* 𑢽 */: BSEQ(0xf0,0x91,0xa3,0x9d) /* 𑣝 */;
+ case 0x118be /* 𑢾 */: BSEQ(0xf0,0x91,0xa3,0x9e) /* 𑣞 */;
+ case 0x118bf /* 𑢿 */: BSEQ(0xf0,0x91,0xa3,0x9f) /* 𑣟 */;
+ case 0x16e40 /* 𖹀 */: BSEQ(0xf0,0x96,0xb9,0xa0) /* 𖹠 */;
+ case 0x16e41 /* 𖹁 */: BSEQ(0xf0,0x96,0xb9,0xa1) /* 𖹡 */;
+ case 0x16e42 /* 𖹂 */: BSEQ(0xf0,0x96,0xb9,0xa2) /* 𖹢 */;
+ case 0x16e43 /* 𖹃 */: BSEQ(0xf0,0x96,0xb9,0xa3) /* 𖹣 */;
+ case 0x16e44 /* 𖹄 */: BSEQ(0xf0,0x96,0xb9,0xa4) /* 𖹤 */;
+ case 0x16e45 /* 𖹅 */: BSEQ(0xf0,0x96,0xb9,0xa5) /* 𖹥 */;
+ case 0x16e46 /* 𖹆 */: BSEQ(0xf0,0x96,0xb9,0xa6) /* 𖹦 */;
+ case 0x16e47 /* 𖹇 */: BSEQ(0xf0,0x96,0xb9,0xa7) /* 𖹧 */;
+ case 0x16e48 /* 𖹈 */: BSEQ(0xf0,0x96,0xb9,0xa8) /* 𖹨 */;
+ case 0x16e49 /* 𖹉 */: BSEQ(0xf0,0x96,0xb9,0xa9) /* 𖹩 */;
+ case 0x16e4a /* 𖹊 */: BSEQ(0xf0,0x96,0xb9,0xaa) /* 𖹪 */;
+ case 0x16e4b /* 𖹋 */: BSEQ(0xf0,0x96,0xb9,0xab) /* 𖹫 */;
+ case 0x16e4c /* 𖹌 */: BSEQ(0xf0,0x96,0xb9,0xac) /* 𖹬 */;
+ case 0x16e4d /* 𖹍 */: BSEQ(0xf0,0x96,0xb9,0xad) /* 𖹭 */;
+ case 0x16e4e /* 𖹎 */: BSEQ(0xf0,0x96,0xb9,0xae) /* 𖹮 */;
+ case 0x16e4f /* 𖹏 */: BSEQ(0xf0,0x96,0xb9,0xaf) /* 𖹯 */;
+ case 0x16e50 /* 𖹐 */: BSEQ(0xf0,0x96,0xb9,0xb0) /* 𖹰 */;
+ case 0x16e51 /* 𖹑 */: BSEQ(0xf0,0x96,0xb9,0xb1) /* 𖹱 */;
+ case 0x16e52 /* 𖹒 */: BSEQ(0xf0,0x96,0xb9,0xb2) /* 𖹲 */;
+ case 0x16e53 /* 𖹓 */: BSEQ(0xf0,0x96,0xb9,0xb3) /* 𖹳 */;
+ case 0x16e54 /* 𖹔 */: BSEQ(0xf0,0x96,0xb9,0xb4) /* 𖹴 */;
+ case 0x16e55 /* 𖹕 */: BSEQ(0xf0,0x96,0xb9,0xb5) /* 𖹵 */;
+ case 0x16e56 /* 𖹖 */: BSEQ(0xf0,0x96,0xb9,0xb6) /* 𖹶 */;
+ case 0x16e57 /* 𖹗 */: BSEQ(0xf0,0x96,0xb9,0xb7) /* 𖹷 */;
+ case 0x16e58 /* 𖹘 */: BSEQ(0xf0,0x96,0xb9,0xb8) /* 𖹸 */;
+ case 0x16e59 /* 𖹙 */: BSEQ(0xf0,0x96,0xb9,0xb9) /* 𖹹 */;
+ case 0x16e5a /* 𖹚 */: BSEQ(0xf0,0x96,0xb9,0xba) /* 𖹺 */;
+ case 0x16e5b /* 𖹛 */: BSEQ(0xf0,0x96,0xb9,0xbb) /* 𖹻 */;
+ case 0x16e5c /* 𖹜 */: BSEQ(0xf0,0x96,0xb9,0xbc) /* 𖹼 */;
+ case 0x16e5d /* 𖹝 */: BSEQ(0xf0,0x96,0xb9,0xbd) /* 𖹽 */;
+ case 0x16e5e /* 𖹞 */: BSEQ(0xf0,0x96,0xb9,0xbe) /* 𖹾 */;
+ case 0x16e5f /* 𖹟 */: BSEQ(0xf0,0x96,0xb9,0xbf) /* 𖹿 */;
+ case 0x1e900 /* 𞤀 */: BSEQ(0xf0,0x9e,0xa4,0xa2) /* 𞤢 */;
+ case 0x1e901 /* 𞤁 */: BSEQ(0xf0,0x9e,0xa4,0xa3) /* 𞤣 */;
+ case 0x1e902 /* 𞤂 */: BSEQ(0xf0,0x9e,0xa4,0xa4) /* 𞤤 */;
+ case 0x1e903 /* 𞤃 */: BSEQ(0xf0,0x9e,0xa4,0xa5) /* 𞤥 */;
+ case 0x1e904 /* 𞤄 */: BSEQ(0xf0,0x9e,0xa4,0xa6) /* 𞤦 */;
+ case 0x1e905 /* 𞤅 */: BSEQ(0xf0,0x9e,0xa4,0xa7) /* 𞤧 */;
+ case 0x1e906 /* 𞤆 */: BSEQ(0xf0,0x9e,0xa4,0xa8) /* 𞤨 */;
+ case 0x1e907 /* 𞤇 */: BSEQ(0xf0,0x9e,0xa4,0xa9) /* 𞤩 */;
+ case 0x1e908 /* 𞤈 */: BSEQ(0xf0,0x9e,0xa4,0xaa) /* 𞤪 */;
+ case 0x1e909 /* 𞤉 */: BSEQ(0xf0,0x9e,0xa4,0xab) /* 𞤫 */;
+ case 0x1e90a /* 𞤊 */: BSEQ(0xf0,0x9e,0xa4,0xac) /* 𞤬 */;
+ case 0x1e90b /* 𞤋 */: BSEQ(0xf0,0x9e,0xa4,0xad) /* 𞤭 */;
+ case 0x1e90c /* 𞤌 */: BSEQ(0xf0,0x9e,0xa4,0xae) /* 𞤮 */;
+ case 0x1e90d /* 𞤍 */: BSEQ(0xf0,0x9e,0xa4,0xaf) /* 𞤯 */;
+ case 0x1e90e /* 𞤎 */: BSEQ(0xf0,0x9e,0xa4,0xb0) /* 𞤰 */;
+ case 0x1e90f /* 𞤏 */: BSEQ(0xf0,0x9e,0xa4,0xb1) /* 𞤱 */;
+ case 0x1e910 /* 𞤐 */: BSEQ(0xf0,0x9e,0xa4,0xb2) /* 𞤲 */;
+ case 0x1e911 /* 𞤑 */: BSEQ(0xf0,0x9e,0xa4,0xb3) /* 𞤳 */;
+ case 0x1e912 /* 𞤒 */: BSEQ(0xf0,0x9e,0xa4,0xb4) /* 𞤴 */;
+ case 0x1e913 /* 𞤓 */: BSEQ(0xf0,0x9e,0xa4,0xb5) /* 𞤵 */;
+ case 0x1e914 /* 𞤔 */: BSEQ(0xf0,0x9e,0xa4,0xb6) /* 𞤶 */;
+ case 0x1e915 /* 𞤕 */: BSEQ(0xf0,0x9e,0xa4,0xb7) /* 𞤷 */;
+ case 0x1e916 /* 𞤖 */: BSEQ(0xf0,0x9e,0xa4,0xb8) /* 𞤸 */;
+ case 0x1e917 /* 𞤗 */: BSEQ(0xf0,0x9e,0xa4,0xb9) /* 𞤹 */;
+ case 0x1e918 /* 𞤘 */: BSEQ(0xf0,0x9e,0xa4,0xba) /* 𞤺 */;
+ case 0x1e919 /* 𞤙 */: BSEQ(0xf0,0x9e,0xa4,0xbb) /* 𞤻 */;
+ case 0x1e91a /* 𞤚 */: BSEQ(0xf0,0x9e,0xa4,0xbc) /* 𞤼 */;
+ case 0x1e91b /* 𞤛 */: BSEQ(0xf0,0x9e,0xa4,0xbd) /* 𞤽 */;
+ case 0x1e91c /* 𞤜 */: BSEQ(0xf0,0x9e,0xa4,0xbe) /* 𞤾 */;
+ case 0x1e91d /* 𞤝 */: BSEQ(0xf0,0x9e,0xa4,0xbf) /* 𞤿 */;
+ case 0x1e91e /* 𞤞 */: BSEQ(0xf0,0x9e,0xa5,0x80) /* 𞥀 */;
+ case 0x1e91f /* 𞤟 */: BSEQ(0xf0,0x9e,0xa5,0x81) /* 𞥁 */;
+ case 0x1e920 /* 𞤠 */: BSEQ(0xf0,0x9e,0xa5,0x82) /* 𞥂 */;
+ case 0x1e921 /* 𞤡 */: BSEQ(0xf0,0x9e,0xa5,0x83) /* 𞥃 */;
+ default: return nullptr;
+ }
+}
+
+#endif
diff --git a/src/caseconvert.py b/src/caseconvert.py
new file mode 100644
index 0000000..ef7e403
--- /dev/null
+++ b/src/caseconvert.py
@@ -0,0 +1,59 @@
+# python3 script to generate caseconvert.h.
+# It uses difference in lower() and upper() on a character to make a mapping
+# that maps a given unicode point to either a lower or upper case UTF-8 character.
+# this also include multi-byte characters.
+
+import codecs
+
+toupper = {}
+tolower = {}
+
+def writeMapping(file,mapping):
+ for k,v in sorted(mapping.items()):
+ file.write(u" case %s /* %s */: BSEQ(%s) /* %s */;\n" %
+ (hex(ord(k[0])), k, ",".join(f"0x{b:02x}" for b in v.encode('utf-8')), v))
+
+# create mappings of characters whose upper and lower case differ
+for codeValue in range(0,0x1FFFF):
+ s = chr(codeValue)
+ sl = s.lower()
+ su = s.upper()
+ if ord(s[0])!=ord(sl[0]):
+ tolower[s]=sl
+ if ord(s[0])!=ord(su[0]):
+ toupper[s]=su
+
+file = codecs.open("caseconvert.h", "w", "utf-8")
+file.write(r'''/** This file is generated by python3 caseconvert.py. DO NOT EDIT! */
+
+#ifndef CASECONVERT_H
+#define CASECONVERT_H
+
+#include <cstdint>
+#include <string>
+
+#define BSEQ(...) { static unsigned char s[] = { __VA_ARGS__, 0x00 }; \
+ return reinterpret_cast<const char *>(s); }
+
+inline const char *convertUnicodeToUpper(uint32_t code)
+{
+ switch(code)
+ {
+''');
+writeMapping(file,toupper);
+file.write(r''' default: return nullptr;
+ }
+}
+
+inline const char *convertUnicodeToLower(uint32_t code)
+{
+ switch(code)
+ {
+''');
+writeMapping(file,tolower);
+file.write(r''' default: return nullptr;
+ }
+}
+
+#endif
+''');
diff --git a/src/cite.cpp b/src/cite.cpp
index ab090e0..79b45da 100644
--- a/src/cite.cpp
+++ b/src/cite.cpp
@@ -16,20 +16,18 @@
#include "cite.h"
#include "config.h"
-#include "ftextstream.h"
#include "language.h"
#include "message.h"
#include "portable.h"
#include "resourcemgr.h"
#include "util.h"
#include "debug.h"
-
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qdir.h>
+#include "fileinfo.h"
+#include "dir.h"
#include <map>
#include <string>
+#include <fstream>
const char *bibTmpFile = "bibTmpFile_";
const char *bibTmpDir = "bibTmpDir/";
@@ -37,13 +35,13 @@ const char *bibTmpDir = "bibTmpDir/";
class CiteInfoImpl : public CiteInfo
{
public:
- CiteInfoImpl(const char *label, const char *text=0)
+ CiteInfoImpl(const QCString &label, const QCString &text=QCString())
: m_label(label), m_text(text) { }
virtual QCString label() const { return m_label; }
virtual QCString text() const { return m_text; }
- void setText(const char *s) { m_text = s; }
+ void setText(const QCString &s) { m_text = s; }
private:
QCString m_label;
@@ -65,18 +63,18 @@ CitationManager::CitationManager() : p(new Private)
{
}
-void CitationManager::insert(const char *label)
+void CitationManager::insert(const QCString &label)
{
p->entries.insert(
std::make_pair(
- std::string(label),
+ label.str(),
std::make_unique<CiteInfoImpl>(label)
));
}
-const CiteInfo *CitationManager::find(const char *label) const
+const CiteInfo *CitationManager::find(const QCString &label) const
{
- auto it = p->entries.find(label);
+ auto it = p->entries.find(label.str());
if (it!=p->entries.end())
{
return it->second.get();
@@ -95,12 +93,12 @@ bool CitationManager::isEmpty() const
return (numFiles==0 || p->entries.empty());
}
-const char *CitationManager::fileName() const
+QCString CitationManager::fileName() const
{
return "citelist";
}
-const char *CitationManager::anchorPrefix() const
+QCString CitationManager::anchorPrefix() const
{
return "CITEREF_";
}
@@ -112,77 +110,46 @@ void CitationManager::insertCrossReferencesForBibFile(const QCString &bibFile)
{
return;
}
- QFileInfo fi(bibFile);
+ FileInfo fi(bibFile.str());
if (!fi.exists())
{
- err("bib file %s not found!\n",bibFile.data());
+ err("bib file %s not found!\n",qPrint(bibFile));
return;
}
- QFile f(bibFile);
- if (!f.open(IO_ReadOnly))
+ std::ifstream f(bibFile.str(), std::ifstream::in);
+ if (!f.is_open())
{
- err("could not open file %s for reading\n",bibFile.data());
+ err("could not open file %s for reading\n",qPrint(bibFile));
return;
}
- // convert file to string
- QCString doc;
- QCString input(fi.size()+1);
- f.readBlock(input.rawData(),fi.size());
- f.close();
- input.at(fi.size())='\0';
-
- int pos=0;
- int s;
-
- // helper lambda function to get the next line of input and update pos accordingly
- auto get_next_line = [&input,&pos,&s]()
- {
- uint prevPos = (uint)pos;
- pos=s+1;
- return input.mid(prevPos,(uint)(s-prevPos));
- };
-
- // helper lambda function to return if the end of the input has reached
- auto end_of_input = [&s]()
- {
- return s==-1;
- };
-
- // helper lambda function to proceed to the next line in the input, and update s
- // to point to the start of the line. Return true as long as there is a new line.
- auto has_next_line = [&input,&pos,&s]()
- {
- s=input.find('\n',pos);
- return s!=-1;
- };
-
// search for citation cross references
QCString citeName;
- while (has_next_line())
- {
- QCString line = get_next_line();
+ std::string lineStr;
+ while (getline(f,lineStr))
+ {
int i;
+ QCString line(lineStr);
if (line.stripWhiteSpace().startsWith("@"))
{
// assumption entry like: "@book { name," or "@book { name" (spaces optional)
int j = line.find('{');
// when no {, go hunting for it
- while (j==-1 && has_next_line())
+ while (j==-1 && getline(f,lineStr))
{
- line = get_next_line();
+ line = lineStr;
j = line.find('{');
}
// search for the name
citeName = "";
- if (!end_of_input() && j!=-1) // to prevent something like "@manual ," and no { found
+ if (!f.eof() && j!=-1) // to prevent something like "@manual ," and no { found
{
int k = line.find(',',j);
j++;
// found a line "@....{.....,...." or "@.....{....."
// ^=j ^=k ^=j k=-1
- while (!end_of_input() && citeName.isEmpty())
+ while (!f.eof() && citeName.isEmpty())
{
if (k!=-1)
{
@@ -194,14 +161,14 @@ void CitationManager::insertCrossReferencesForBibFile(const QCString &bibFile)
}
citeName = citeName.stripWhiteSpace();
j = 0;
- if (citeName.isEmpty() && has_next_line())
+ if (citeName.isEmpty() && getline(f,lineStr))
{
- line = get_next_line();
+ line = lineStr;
k = line.find(',');
}
}
}
- //printf("citeName = #%s#\n",citeName.data());
+ //printf("citeName = #%s#\n",qPrint(citeName));
}
else if ((i=line.find("crossref"))!=-1 && !citeName.isEmpty()) /* assumption cross reference is on one line and the only item */
{
@@ -212,8 +179,8 @@ void CitationManager::insertCrossReferencesForBibFile(const QCString &bibFile)
QCString crossrefName = line.mid((uint)(j+1),(uint)(k-j-1));
// check if the reference with the cross reference is used
// insert cross reference when cross reference has not yet been added.
- if ((p->entries.find(citeName.data())!=p->entries.end()) &&
- (p->entries.find(crossrefName.data())==p->entries.end())) // not found yet
+ if ((p->entries.find(citeName.str())!=p->entries.end()) &&
+ (p->entries.find(crossrefName.str())==p->entries.end())) // not found yet
{
insert(crossrefName);
}
@@ -232,7 +199,6 @@ void CitationManager::generatePage()
bool citeDebug = Debug::isFlagSet(Debug::Cite);
// 0. add cross references from the bib files to the cite dictionary
- QFile f;
const StringVector &citeDataList = Config_getList(CITE_BIB_FILES);
for (const auto &bibdata : citeDataList)
{
@@ -244,23 +210,24 @@ void CitationManager::generatePage()
// 1. generate file with markers and citations to OUTPUT_DIRECTORY
QCString outputDir = Config_getString(OUTPUT_DIRECTORY);
QCString citeListFile = outputDir+"/citelist.doc";
- f.setName(citeListFile);
- if (!f.open(IO_WriteOnly))
- {
- err("could not open file %s for writing\n",citeListFile.data());
- }
- FTextStream t(&f);
- t << "<!-- BEGIN CITATIONS -->" << endl;
- t << "<!--" << endl;
- for (const auto &it : p->entries)
{
- t << "\\citation{" << it.second->label() << "}" << endl;
+ std::ofstream t(citeListFile.str(),std::ofstream::out | std::ofstream::binary);
+ if (!t.is_open())
+ {
+ err("could not open file %s for writing\n",qPrint(citeListFile));
+ }
+ t << "<!-- BEGIN CITATIONS -->\n";
+ t << "<!--\n";
+ for (const auto &it : p->entries)
+ {
+ t << "\\citation{" << it.second->label() << "}\n";
+ }
+ t << "-->\n";
+ t << "<!-- END CITATIONS -->\n";
+ t << "<!-- BEGIN BIBLIOGRAPHY -->\n";
+ t << "<!-- END BIBLIOGRAPHY -->\n";
+ t.close();
}
- t << "-->" << endl;
- t << "<!-- END CITATIONS -->" << endl;
- t << "<!-- BEGIN BIBLIOGRAPHY -->" << endl;
- t << "<!-- END BIBLIOGRAPHY -->" << endl;
- f.close();
// 2. generate bib2xhtml
QCString bib2xhtmlFile = outputDir+"/bib2xhtml.pl";
@@ -276,10 +243,10 @@ void CitationManager::generatePage()
// Strictly not required when only latex is generated
QCString bibOutputDir = outputDir+"/"+bibTmpDir;
QCString bibOutputFiles = "";
- QDir thisDir;
- if (!thisDir.exists(bibOutputDir) && !thisDir.mkdir(bibOutputDir))
+ Dir thisDir;
+ if (!thisDir.exists(bibOutputDir.str()) && !thisDir.mkdir(bibOutputDir.str()))
{
- err("Failed to create temporary output directory '%s', skipping citations\n",bibOutputDir.data());
+ err("Failed to create temporary output directory '%s', skipping citations\n",qPrint(bibOutputDir));
return;
}
int i = 0;
@@ -287,7 +254,7 @@ void CitationManager::generatePage()
{
QCString bibFile = bibdata.c_str();
if (!bibFile.isEmpty() && bibFile.right(4)!=".bib") bibFile+=".bib";
- QFileInfo fi(bibFile);
+ FileInfo fi(bibFile.str());
if (fi.exists())
{
if (!bibFile.isEmpty())
@@ -299,73 +266,69 @@ void CitationManager::generatePage()
}
}
- QString oldDir = QDir::currentDirPath();
- QDir::setCurrent(outputDir);
+ std::string oldDir = Dir::currentDirPath();
+ Dir::setCurrent(outputDir.str());
// 5. run bib2xhtml perl script on the generated file which will insert the
// bibliography in citelist.doc
int exitCode;
Portable::sysTimerStop();
- if ((exitCode=Portable::system("perl","\""+bib2xhtmlFile+"\" "+bibOutputFiles+" \""+
- citeListFile+"\"" + (citeDebug ? " -d" : ""))) != 0)
+ QCString perlArgs = "\""+bib2xhtmlFile+"\" "+bibOutputFiles+" \""+ citeListFile+"\"";
+ if (citeDebug) perlArgs+=" -d";
+ if ((exitCode=Portable::system("perl",perlArgs)) != 0)
{
err("Problems running bibtex. Verify that the command 'perl --version' works from the command line. Exit code: %d\n",
exitCode);
}
Portable::sysTimerStop();
- QDir::setCurrent(oldDir);
+ Dir::setCurrent(oldDir);
// 6. read back the file
- f.setName(citeListFile);
- if (!f.open(IO_ReadOnly))
- {
- err("could not open file %s for reading\n",citeListFile.data());
- }
-
QCString doc;
- QFileInfo fi(citeListFile);
- QCString input(fi.size()+1);
- f.readBlock(input.rawData(),fi.size());
- f.close();
- input.at(fi.size())='\0';
-
- bool insideBib=FALSE;
- int pos=0,s;
- //printf("input=[%s]\n",input.data());
- while ((s=input.find('\n',pos))!=-1)
{
- QCString line = input.mid((uint)pos,(uint)(s-pos));
- //printf("pos=%d s=%d line=[%s]\n",pos,s,line.data());
- pos=s+1;
-
- if (line.find("<!-- BEGIN BIBLIOGRAPHY")!=-1) insideBib=TRUE;
- else if (line.find("<!-- END BIBLIOGRAPH")!=-1) insideBib=FALSE;
- // determine text to use at the location of the @cite command
- if (insideBib && (i=line.find("name=\"CITEREF_"))!=-1)
+ std::ifstream f(citeListFile.str(),std::ifstream::in);
+ if (!f.is_open())
{
- int j=line.find("\">[");
- int k=line.find("]</a>");
- if (j!=-1 && k!=-1)
+ err("could not open file %s for reading\n",qPrint(citeListFile));
+ }
+
+ bool insideBib=FALSE;
+ //printf("input=[%s]\n",qPrint(input));
+ std::string lineStr;
+ while (getline(f,lineStr))
+ {
+ QCString line(lineStr);
+ //printf("pos=%d s=%d line=[%s]\n",pos,s,qPrint(line));
+
+ if (line.find("<!-- BEGIN BIBLIOGRAPHY")!=-1) insideBib=TRUE;
+ else if (line.find("<!-- END BIBLIOGRAPH")!=-1) insideBib=FALSE;
+ // determine text to use at the location of the @cite command
+ if (insideBib && (i=line.find("name=\"CITEREF_"))!=-1)
{
- uint ui=(uint)i;
- uint uj=(uint)j;
- uint uk=(uint)k;
- QCString label = line.mid(ui+14,uj-ui-14);
- QCString number = line.mid(uj+2,uk-uj-1);
- label = substitute(substitute(label,"&ndash;","--"),"&mdash;","---");
- line = line.left(ui+14) + label + line.right(line.length()-uj);
- auto it = p->entries.find(label.data());
- //printf("label='%s' number='%s' => %p\n",label.data(),number.data(),it->second.get());
- if (it!=p->entries.end())
+ int j=line.find("\">[");
+ int k=line.find("]</a>");
+ if (j!=-1 && k!=-1)
{
- it->second->setText(number);
+ uint ui=(uint)i;
+ uint uj=(uint)j;
+ uint uk=(uint)k;
+ QCString label = line.mid(ui+14,uj-ui-14);
+ QCString number = line.mid(uj+2,uk-uj-1);
+ label = substitute(substitute(label,"&ndash;","--"),"&mdash;","---");
+ line = line.left(ui+14) + label + line.right(line.length()-uj);
+ auto it = p->entries.find(label.str());
+ //printf("label='%s' number='%s' => %p\n",qPrint(label),qPrint(number),it->second.get());
+ if (it!=p->entries.end())
+ {
+ it->second->setText(number);
+ }
}
}
+ if (insideBib) doc+=line+"\n";
}
- if (insideBib) doc+=line+"\n";
+ //printf("doc=[%s]\n",qPrint(doc));
}
- //printf("doc=[%s]\n",doc.data());
// 7. add it as a page
addRelatedPage(fileName(),theTranslator->trCiteReferences(),doc,fileName(),1,1);
@@ -382,7 +345,7 @@ void CitationManager::generatePage()
QCString bibFile = bibdata.c_str();
// Note: file can now have multiple dots
if (!bibFile.isEmpty() && bibFile.right(4)!=".bib") bibFile+=".bib";
- fi.setFile(bibFile);
+ FileInfo fi(bibFile.str());
if (fi.exists())
{
if (!bibFile.isEmpty())
@@ -395,7 +358,7 @@ void CitationManager::generatePage()
}
else
{
- err("bib file %s not found!\n",bibFile.data());
+ err("bib file %s not found!\n",qPrint(bibFile));
}
}
}
@@ -403,17 +366,18 @@ void CitationManager::generatePage()
// 9. Remove temporary files
if (!citeDebug)
{
- thisDir.remove(citeListFile);
- thisDir.remove(doxygenBstFile);
- thisDir.remove(bib2xhtmlFile);
+ thisDir.remove(citeListFile.str());
+ thisDir.remove(doxygenBstFile.str());
+ thisDir.remove(bib2xhtmlFile.str());
// we might try to remove too many files as empty files didn't get a corresponding new file
// but the remove function does not emit an error for it and we don't catch the error return
// so no problem.
for (size_t j = 1; j <= citeDataList.size(); j++)
{
- thisDir.remove(bibOutputDir + bibTmpFile + QCString().setNum(static_cast<ulong>(j)) + ".bib");
+ QCString bibFile = bibOutputDir + bibTmpFile + QCString().setNum(static_cast<ulong>(j)) + ".bib";
+ thisDir.remove(bibFile.str());
}
- thisDir.rmdir(bibOutputDir);
+ thisDir.rmdir(bibOutputDir.str());
}
}
@@ -427,7 +391,7 @@ QCString CitationManager::latexBibFiles()
QCString bibFile = bibdata.c_str();
// Note: file can now have multiple dots
if (!bibFile.isEmpty() && bibFile.right(4)!=".bib") bibFile+=".bib";
- QFileInfo fi(bibFile);
+ FileInfo fi(bibFile.str());
if (fi.exists())
{
if (!bibFile.isEmpty())
diff --git a/src/cite.h b/src/cite.h
index adf0840..499000b 100644
--- a/src/cite.h
+++ b/src/cite.h
@@ -19,9 +19,7 @@
#include <memory>
-#include <qcstring.h>
-
-class FTextStream;
+#include "qcstring.h"
/// Citation-related data.
struct CiteInfo
@@ -42,12 +40,12 @@ class CitationManager
static CitationManager &instance();
/** Insert a citation identified by \a label into the database */
- void insert(const char *label);
+ void insert(const QCString &label);
/** Return the citation info for a given \a label.
* Ownership of the info stays with the manager.
*/
- const CiteInfo *find(const char *label) const;
+ const CiteInfo *find(const QCString &label) const;
/** Generate the citations page */
void generatePage();
@@ -63,8 +61,8 @@ class CitationManager
*/
QCString latexBibFiles();
- const char *fileName() const;
- const char *anchorPrefix() const;
+ QCString fileName() const;
+ QCString anchorPrefix() const;
private:
/** Create the database, with an expected maximum of \a size entries */
diff --git a/src/clangparser.cpp b/src/clangparser.cpp
index 045b0aa..6646adf 100644
--- a/src/clangparser.cpp
+++ b/src/clangparser.cpp
@@ -19,6 +19,7 @@
#include "membername.h"
#include "filename.h"
#include "tooltip.h"
+#include "utf8.h"
#endif
//--------------------------------------------------------------------------
@@ -73,18 +74,14 @@ static QCString detab(const QCString &s)
col++;
break;
default: // non-whitespace => update minIndent
- out.addChar(c);
- if (c<0 && i<size) // multibyte sequence
{
- out.addChar(data[i++]); // >= 2 bytes
- if (((uchar)c&0xE0)==0xE0 && i<size)
- {
- out.addChar(data[i++]); // 3 bytes
- }
- if (((uchar)c&0xF0)==0xF0 && i<size)
+ int bytes = getUTF8CharNumBytes(c);
+ for (int j=0;j<bytes-1 && c!=0; j++)
{
- out.addChar(data[i++]); // 4 byres
+ out.addChar(c);
+ c = data[i++];
}
+ out.addChar(c);
}
if (col<minIndent) minIndent=col;
col++;
@@ -95,7 +92,7 @@ static QCString detab(const QCString &s)
return out.get();
}
-static QCString keywordToType(const char *keyword)
+static const char * keywordToType(const char *keyword)
{
static const StringUnorderedSet flowKeywords({
"break", "case", "catch", "continue", "default", "do",
@@ -266,7 +263,7 @@ void ClangTUParser::parse()
// provide the input and and its dependencies as unsaved files so we can
// pass the filtered versions
- argv[argc++]=qstrdup(fileName);
+ argv[argc++]=qstrdup(fileName.data());
}
//printf("source %s ----------\n%s\n-------------\n\n",
// fileName,p->source.data());
@@ -275,7 +272,7 @@ void ClangTUParser::parse()
p->sources.resize(numUnsavedFiles);
p->ufs.resize(numUnsavedFiles);
p->sources[0] = detab(fileToString(fileName,filterSourceFiles,TRUE));
- p->ufs[0].Filename = qstrdup(fileName);
+ p->ufs[0].Filename = qstrdup(fileName.data());
p->ufs[0].Contents = p->sources[0].data();
p->ufs[0].Length = p->sources[0].length();
p->fileMapping.insert({fileName.data(),0});
@@ -358,7 +355,7 @@ void ClangTUParser::switchToFile(const FileDef *fd)
p->tokens = 0;
p->numTokens = 0;
- CXFile f = clang_getFile(p->tu, fd->absFilePath());
+ CXFile f = clang_getFile(p->tu, fd->absFilePath().data());
auto it = p->fileMapping.find(fd->absFilePath().data());
if (it!=p->fileMapping.end() && it->second < p->numFiles)
{
@@ -520,7 +517,7 @@ void ClangTUParser::writeLineNumber(CodeOutputInterface &ol,const FileDef *fd,ui
}
else // no link
{
- ol.writeLineNumber(0,0,0,line);
+ ol.writeLineNumber(QCString(),QCString(),QCString(),line);
}
// set search page target
@@ -637,7 +634,7 @@ void ClangTUParser::linkInclude(CodeOutputInterface &ol,const FileDef *fd,
}
if (ifd)
{
- ol.writeCodeLink(ifd->getReference(),ifd->getOutputFileBase(),0,text,ifd->briefDescriptionAsTooltip());
+ ol.writeCodeLink(ifd->getReference(),ifd->getOutputFileBase(),QCString(),text,ifd->briefDescriptionAsTooltip());
}
else
{
diff --git a/src/classdef.cpp b/src/classdef.cpp
index 198a1c9..152c316 100644
--- a/src/classdef.cpp
+++ b/src/classdef.cpp
@@ -18,8 +18,6 @@
#include <cstdio>
#include <algorithm>
-#include <qfile.h>
-#include <qfileinfo.h>
#include "classdef.h"
#include "classlist.h"
#include "entry.h"
@@ -50,6 +48,7 @@
#include "membergroup.h"
#include "definitionimpl.h"
#include "symbolresolver.h"
+#include "fileinfo.h"
//-----------------------------------------------------------------------------
@@ -58,7 +57,7 @@ static QCString makeQualifiedNameWithTemplateParameters(const ClassDef *cd,
{
//static bool optimizeOutputJava = Config_getBool(OPTIMIZE_OUTPUT_JAVA);
bool hideScopeNames = Config_getBool(HIDE_SCOPE_NAMES);
- //printf("qualifiedNameWithTemplateParameters() localName=%s\n",localName().data());
+ //printf("qualifiedNameWithTemplateParameters() localName=%s\n",qPrint(localName()));
QCString scName;
const Definition *d=cd->getOuterScope();
if (d)
@@ -101,7 +100,7 @@ static QCString makeQualifiedNameWithTemplateParameters(const ClassDef *cd,
}
}
}
- //printf("qualifiedNameWithTemplateParameters: scope=%s qualifiedName=%s\n",name().data(),scName.data());
+ //printf("qualifiedNameWithTemplateParameters: scope=%s qualifiedName=%s\n",qPrint(name()),qPrint(scName));
return scName;
}
@@ -143,7 +142,7 @@ static QCString makeDisplayName(const ClassDef *cd,bool includeScope)
//{
// n = n.left(n.length()-2);
//}
- //printf("ClassDefImpl::displayName()=%s\n",n.data());
+ //printf("ClassDefImpl::displayName()=%s\n",qPrint(n));
return n;
}
@@ -155,9 +154,9 @@ static QCString makeDisplayName(const ClassDef *cd,bool includeScope)
class ClassDefImpl : public DefinitionMixin<ClassDefMutable>
{
public:
- ClassDefImpl(const char *fileName,int startLine,int startColumn,
- const char *name,CompoundType ct,
- const char *ref=0,const char *fName=0,
+ ClassDefImpl(const QCString &fileName,int startLine,int startColumn,
+ const QCString &name,CompoundType ct,
+ const QCString &ref=QCString(),const QCString &fName=QCString(),
bool isSymbol=TRUE,bool isJavaEnum=FALSE);
/** Destroys a compound definition. */
~ClassDefImpl();
@@ -178,9 +177,9 @@ class ClassDefImpl : public DefinitionMixin<ClassDefMutable>
virtual QCString displayName(bool includeScope=TRUE) const;
virtual CompoundType compoundType() const;
virtual QCString compoundTypeString() const;
- virtual BaseClassList baseClasses() const;
+ virtual const BaseClassList &baseClasses() const;
virtual void updateBaseClasses(const BaseClassList &bcd);
- virtual BaseClassList subClasses() const;
+ virtual const BaseClassList &subClasses() const;
virtual void updateSubClasses(const BaseClassList &bcd);
virtual const MemberNameInfoLinkedMap &memberNameInfoLinkedMap() const;
virtual Protection protection() const;
@@ -189,7 +188,6 @@ class ClassDefImpl : public DefinitionMixin<ClassDefMutable>
virtual bool isVisibleInHierarchy() const;
virtual bool visibleInParentsDeclList() const;
virtual const ArgumentList &templateArguments() const;
- virtual NamespaceDef *getNamespaceDef() const;
virtual FileDef *getFileDef() const;
virtual const MemberDef *getMemberByName(const QCString &) const;
virtual bool isBaseClass(const ClassDef *bcd,bool followInstances,int level=0) const;
@@ -203,7 +201,7 @@ class ClassDefImpl : public DefinitionMixin<ClassDefMutable>
virtual const UsesClassList &usedByImplementationClasses() const;
virtual const ConstraintClassList &templateTypeConstraints() const;
virtual bool isTemplateArgument() const;
- virtual const Definition *findInnerCompound(const char *name) const;
+ virtual const Definition *findInnerCompound(const QCString &name) const;
virtual ArgumentLists getTemplateParameterLists() const;
virtual QCString qualifiedNameWithTemplateParameters(
const ArgumentLists *actualParams=0,uint *actualParamIndex=0) const;
@@ -240,39 +238,40 @@ class ClassDefImpl : public DefinitionMixin<ClassDefMutable>
virtual bool subGrouping() const;
virtual bool isSliceLocal() const;
virtual bool hasNonReferenceSuperClass() const;
+ virtual QCString requiresClause() const;
virtual ClassDef *insertTemplateInstance(const QCString &fileName,int startLine,int startColumn,
const QCString &templSpec,bool &freshInstance) const;
- virtual void insertBaseClass(ClassDef *,const char *name,Protection p,Specifier s,const char *t=0);
- virtual void insertSubClass(ClassDef *,Protection p,Specifier s,const char *t=0);
- virtual void setIncludeFile(FileDef *fd,const char *incName,bool local,bool force);
+ virtual void insertBaseClass(ClassDef *,const QCString &name,Protection p,Specifier s,const QCString &t=QCString());
+ virtual void insertSubClass(ClassDef *,Protection p,Specifier s,const QCString &t=QCString());
+ virtual void setIncludeFile(FileDef *fd,const QCString &incName,bool local,bool force);
virtual void insertMember(MemberDef *);
virtual void insertUsedFile(const FileDef *);
- virtual bool addExample(const char *anchor,const char *name, const char *file);
+ virtual bool addExample(const QCString &anchor,const QCString &name, const QCString &file);
virtual void mergeCategory(ClassDef *category);
- virtual void setNamespace(NamespaceDef *nd);
+ //virtual void setNamespace(NamespaceDef *nd);
virtual void setFileDef(FileDef *fd);
virtual void setSubGrouping(bool enabled);
virtual void setProtection(Protection p);
virtual void setGroupDefForAllMembers(GroupDef *g,Grouping::GroupPri_t pri,const QCString &fileName,int startLine,bool hasDocs);
virtual void addInnerCompound(const Definition *d);
- virtual void addUsedClass(ClassDef *cd,const char *accessName,Protection prot);
- virtual void addUsedByClass(ClassDef *cd,const char *accessName,Protection prot);
+ virtual void addUsedClass(ClassDef *cd,const QCString &accessName,Protection prot);
+ virtual void addUsedByClass(ClassDef *cd,const QCString &accessName,Protection prot);
virtual void setIsStatic(bool b);
virtual void setCompoundType(CompoundType t);
- virtual void setClassName(const char *name);
+ virtual void setClassName(const QCString &name);
virtual void setClassSpecifier(uint64 spec);
virtual void setTemplateArguments(const ArgumentList &al);
virtual void setTemplateBaseClassNames(const TemplateNameMap &templateNames);
virtual void setTemplateMaster(const ClassDef *tm);
virtual void setTypeConstraints(const ArgumentList &al);
- virtual void addMembersToTemplateInstance(const ClassDef *cd,const ArgumentList &templateArguments,const char *templSpec);
+ virtual void addMembersToTemplateInstance(const ClassDef *cd,const ArgumentList &templateArguments,const QCString &templSpec);
virtual void makeTemplateArgument(bool b=TRUE);
virtual void setCategoryOf(ClassDef *cd);
virtual void setUsedOnly(bool b);
virtual void setTagLessReference(const ClassDef *cd);
- virtual void setName(const char *name);
- virtual void setMetaData(const char *md);
+ virtual void setName(const QCString &name);
+ virtual void setMetaData(const QCString &md);
virtual void findSectionsInDocumentation();
virtual void addMembersToMemberGroup();
virtual void addListReferences();
@@ -286,13 +285,13 @@ class ClassDefImpl : public DefinitionMixin<ClassDefMutable>
virtual void writeMemberPages(OutputList &ol) const;
virtual void writeMemberList(OutputList &ol) const;
virtual void writeDeclaration(OutputList &ol,const MemberDef *md,bool inGroup,
- const ClassDef *inheritedFrom,const char *inheritId) const;
+ const ClassDef *inheritedFrom,const QCString &inheritId) const;
virtual void writeQuickMemberLinks(OutputList &ol,const MemberDef *md) const;
virtual void writeSummaryLinks(OutputList &ol) const;
virtual void reclassifyMember(MemberDefMutable *md,MemberType t);
virtual void writeInlineDocumentation(OutputList &ol) const;
virtual void writeDeclarationLink(OutputList &ol,bool &found,
- const char *header,bool localNames) const;
+ const QCString &header,bool localNames) const;
virtual void removeMemberFromLists(MemberDef *md);
virtual void setAnonymousEnumType();
virtual void countMembers();
@@ -300,7 +299,7 @@ class ClassDefImpl : public DefinitionMixin<ClassDefMutable>
virtual void addGroupedInheritedMembers(OutputList &ol,MemberListType lt,
const ClassDef *inheritedFrom,const QCString &inheritId) const;
- virtual void writeTagFile(FTextStream &);
+ virtual void writeTagFile(TextStream &);
virtual int countMembersIncludingGrouped(MemberListType lt,const ClassDef *inheritedFrom,bool additional) const;
virtual int countInheritanceNodes() const;
@@ -308,11 +307,13 @@ class ClassDefImpl : public DefinitionMixin<ClassDefMutable>
int lt2,bool invert,bool showAlways,ClassDefSet &visitedClasses) const;
virtual void writeMemberDeclarations(OutputList &ol,ClassDefSet &visitedClasses,
MemberListType lt,const QCString &title,
- const char *subTitle=0,bool showInline=FALSE,const ClassDef *inheritedFrom=0,
+ const QCString &subTitle=QCString(),
+ bool showInline=FALSE,const ClassDef *inheritedFrom=0,
int lt2=-1,bool invert=FALSE,bool showAlways=FALSE) const;
+ virtual void setRequiresClause(const QCString &req);
private:
- void addUsedInterfaceClasses(MemberDef *md,const char *typeStr);
+ void addUsedInterfaceClasses(MemberDef *md,const QCString &typeStr);
void showUsedFiles(OutputList &ol) const;
void writeDocumentationContents(OutputList &ol,const QCString &pageTitle) const;
@@ -324,7 +325,7 @@ class ClassDefImpl : public DefinitionMixin<ClassDefMutable>
bool showAlways) const;
void writeMemberDocumentation(OutputList &ol,MemberListType lt,const QCString &title,bool showInline=FALSE) const;
void writeSimpleMemberDocumentation(OutputList &ol,MemberListType lt) const;
- void writePlainMemberDeclaration(OutputList &ol,MemberListType lt,bool inGroup,const ClassDef *inheritedFrom,const char *inheritId) const;
+ void writePlainMemberDeclaration(OutputList &ol,MemberListType lt,bool inGroup,const ClassDef *inheritedFrom,const QCString &inheritId) const;
void writeBriefDescription(OutputList &ol,bool exampleFlag) const;
void writeDetailedDescription(OutputList &ol,const QCString &pageType,bool exampleFlag,
const QCString &title,const QCString &anchor=QCString()) const;
@@ -354,6 +355,8 @@ class ClassDefImpl : public DefinitionMixin<ClassDefMutable>
QCString &title,QCString &subtitle) const;
QCString includeStatement() const;
void addTypeConstraint(const QCString &typeConstraint,const QCString &type);
+ void writeTemplateSpec(OutputList &ol,const Definition *d,
+ const QCString &type,SrcLangExt lang) const;
// PIMPL idiom
class IMPL;
@@ -361,9 +364,9 @@ class ClassDefImpl : public DefinitionMixin<ClassDefMutable>
};
ClassDefMutable *createClassDef(
- const char *fileName,int startLine,int startColumn,
- const char *name,ClassDef::CompoundType ct,
- const char *ref,const char *fName,
+ const QCString &fileName,int startLine,int startColumn,
+ const QCString &name,ClassDef::CompoundType ct,
+ const QCString &ref,const QCString &fName,
bool isSymbol,bool isJavaEnum)
{
return new ClassDefImpl(fileName,startLine,startColumn,name,ct,ref,fName,isSymbol,isJavaEnum);
@@ -409,9 +412,9 @@ class ClassDefAliasImpl : public DefinitionAliasMixin<ClassDef>
{ return getCdAlias()->compoundType(); }
virtual QCString compoundTypeString() const
{ return getCdAlias()->compoundTypeString(); }
- virtual BaseClassList baseClasses() const
+ virtual const BaseClassList &baseClasses() const
{ return getCdAlias()->baseClasses(); }
- virtual BaseClassList subClasses() const
+ virtual const BaseClassList &subClasses() const
{ return getCdAlias()->subClasses(); }
virtual const MemberNameInfoLinkedMap &memberNameInfoLinkedMap() const
{ return getCdAlias()->memberNameInfoLinkedMap(); }
@@ -427,8 +430,8 @@ class ClassDefAliasImpl : public DefinitionAliasMixin<ClassDef>
{ return getCdAlias()->visibleInParentsDeclList(); }
virtual const ArgumentList &templateArguments() const
{ return getCdAlias()->templateArguments(); }
- virtual NamespaceDef *getNamespaceDef() const
- { return getCdAlias()->getNamespaceDef(); }
+ //virtual NamespaceDef *getNamespaceDef() const
+ //{ return getCdAlias()->getNamespaceDef(); }
virtual FileDef *getFileDef() const
{ return getCdAlias()->getFileDef(); }
virtual const MemberDef *getMemberByName(const QCString &s) const
@@ -455,7 +458,7 @@ class ClassDefAliasImpl : public DefinitionAliasMixin<ClassDef>
{ return getCdAlias()->templateTypeConstraints(); }
virtual bool isTemplateArgument() const
{ return getCdAlias()->isTemplateArgument(); }
- virtual const Definition *findInnerCompound(const char *name) const
+ virtual const Definition *findInnerCompound(const QCString &name) const
{ return getCdAlias()->findInnerCompound(name); }
virtual ArgumentLists getTemplateParameterLists() const
{ return getCdAlias()->getTemplateParameterLists(); }
@@ -528,6 +531,8 @@ class ClassDefAliasImpl : public DefinitionAliasMixin<ClassDef>
{ return getCdAlias()->isSliceLocal(); }
virtual bool hasNonReferenceSuperClass() const
{ return getCdAlias()->hasNonReferenceSuperClass(); }
+ virtual QCString requiresClause() const
+ { return getCdAlias()->requiresClause(); }
virtual int countMembersIncludingGrouped(MemberListType lt,const ClassDef *inheritedFrom,bool additional) const
{ return getCdAlias()->countMembersIncludingGrouped(lt,inheritedFrom,additional); }
@@ -538,7 +543,7 @@ class ClassDefAliasImpl : public DefinitionAliasMixin<ClassDef>
{ return getCdAlias()->countMemberDeclarations(lt,inheritedFrom,lt2,invert,showAlways,visitedClasses); }
virtual void writeDeclarationLink(OutputList &ol,bool &found,
- const char *header,bool localNames) const
+ const QCString &header,bool localNames) const
{ getCdAlias()->writeDeclarationLink(ol,found,header,localNames); }
virtual ClassDef *insertTemplateInstance(const QCString &fileName,int startLine,int startColumn,
const QCString &templSpec,bool &freshInstance) const
@@ -548,14 +553,12 @@ class ClassDefAliasImpl : public DefinitionAliasMixin<ClassDef>
virtual void updateSubClasses(const BaseClassList &) {}
};
-
-
ClassDef *createClassDefAlias(const Definition *newScope,const ClassDef *cd)
{
ClassDef *acd = new ClassDefAliasImpl(newScope,cd);
//printf("cd name=%s localName=%s qualifiedName=%s qualifiedNameWith=%s displayName()=%s\n",
- // acd->name().data(),acd->localName().data(),acd->qualifiedName().data(),
- // acd->qualifiedNameWithTemplateParameters().data(),acd->displayName().data());
+ // qPrint(acd->name()),qPrint(acd->localName()),qPrint(acd->qualifiedName()),
+ // qPrint(acd->qualifiedNameWithTemplateParameters()),qPrint(acd->displayName()));
return acd;
}
@@ -567,8 +570,8 @@ class ClassDefImpl::IMPL
public:
IMPL();
~IMPL();
- void init(const char *defFileName, const char *name,
- const QCString &ctStr, const char *fName);
+ void init(const QCString &defFileName, const QCString &name,
+ const QCString &ctStr, const QCString &fName);
/*! file name that forms the base for the output file containing the
* class documentation. For compatibility with Qt (e.g. links via tag
@@ -602,7 +605,7 @@ class ClassDefImpl::IMPL
/*! Namespace this class is part of
* (this is the inner most namespace in case of nested namespaces)
*/
- NamespaceDef *nspace = 0;
+ //NamespaceDef *nspace = 0;
/*! File this class is defined in */
FileDef *fileDef = 0;
@@ -705,12 +708,15 @@ class ClassDefImpl::IMPL
uint64 spec = 0;
QCString metaData;
+
+ /** C++20 requires clause */
+ QCString requiresClause;
};
-void ClassDefImpl::IMPL::init(const char *defFileName, const char *name,
- const QCString &ctStr, const char *fName)
+void ClassDefImpl::IMPL::init(const QCString &defFileName, const QCString &name,
+ const QCString &ctStr, const QCString &fName)
{
- if (fName)
+ if (!fName.isEmpty())
{
fileName=stripExtension(fName);
}
@@ -719,7 +725,7 @@ void ClassDefImpl::IMPL::init(const char *defFileName, const char *name,
fileName=ctStr+name;
}
prot=Public;
- nspace=0;
+ //nspace=0;
fileDef=0;
subGrouping=Config_getBool(SUBGROUPING);
templateMaster =0;
@@ -735,7 +741,7 @@ void ClassDefImpl::IMPL::init(const char *defFileName, const char *name,
spec=0;
//QCString ns;
//extractNamespaceName(name,className,ns);
- //printf("m_name=%s m_className=%s ns=%s\n",m_name.data(),m_className.data(),ns.data());
+ //printf("m_name=%s m_className=%s ns=%s\n",qPrint(m_name),qPrint(m_className),qPrint(ns));
// we cannot use getLanguage at this point, as setLanguage has not been called.
SrcLangExt lang = getLanguageFromFileName(defFileName);
@@ -762,9 +768,9 @@ ClassDefImpl::IMPL::~IMPL()
// constructs a new class definition
ClassDefImpl::ClassDefImpl(
- const char *defFileName,int defLine,int defColumn,
- const char *nm,CompoundType ct,
- const char *lref,const char *fName,
+ const QCString &defFileName,int defLine,int defColumn,
+ const QCString &nm,CompoundType ct,
+ const QCString &lref,const QCString &fName,
bool isSymbol,bool isJavaEnum)
: DefinitionMixin(defFileName,defLine,defColumn,removeRedundantWhiteSpace(nm),0,0,isSymbol)
{
@@ -776,7 +782,7 @@ ClassDefImpl::ClassDefImpl(
m_impl->memberListFileName = convertNameToFile(compoundTypeString()+name()+"-members");
m_impl->collabFileName = convertNameToFile(m_impl->fileName+"_coll_graph");
m_impl->inheritFileName = convertNameToFile(m_impl->fileName+"_inherit_graph");
- if (!lref)
+ if (lref.isEmpty())
{
m_impl->fileName = convertNameToFile(m_impl->fileName);
}
@@ -799,22 +805,22 @@ QCString ClassDefImpl::displayName(bool includeScope) const
}
// inserts a base/super class in the inheritance list
-void ClassDefImpl::insertBaseClass(ClassDef *cd,const char *n,Protection p,
- Specifier s,const char *t)
+void ClassDefImpl::insertBaseClass(ClassDef *cd,const QCString &n,Protection p,
+ Specifier s,const QCString &t)
{
- //printf("*** insert base class %s into %s\n",cd->name().data(),name().data());
+ //printf("*** insert base class %s into %s\n",qPrint(cd->name()),qPrint(name()));
m_impl->inherits.push_back(BaseClassDef(cd,n,p,s,t));
m_impl->isSimple = FALSE;
}
// inserts a derived/sub class in the inherited-by list
void ClassDefImpl::insertSubClass(ClassDef *cd,Protection p,
- Specifier s,const char *t)
+ Specifier s,const QCString &t)
{
- //printf("*** insert sub class %s into %s\n",cd->name().data(),name().data());
+ //printf("*** insert sub class %s into %s\n",qPrint(cd->name()),qPrint(name()));
static bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
if (!extractPrivate && cd->protection()==Private) return;
- m_impl->inheritedBy.push_back(BaseClassDef(cd,0,p,s,t));
+ m_impl->inheritedBy.push_back(BaseClassDef(cd,QCString(),p,s,t));
m_impl->isSimple = FALSE;
}
@@ -833,7 +839,7 @@ void ClassDefImpl::addMembersToMemberGroup()
{
if (mg->allMembersInSameSection() && m_impl->subGrouping)
{
- //printf("addToDeclarationSection(%s)\n",mg->header().data());
+ //printf("addToDeclarationSection(%s)\n",qPrint(mg->header()));
mg->addToDeclarationSection();
}
}
@@ -845,7 +851,7 @@ void ClassDefImpl::internalInsertMember(const MemberDef *md,
bool addToAllList
)
{
- //printf("insertInternalMember(%s) isHidden()=%d\n",md->name().data(),md->isHidden());
+ //printf("insertInternalMember(%s) isHidden()=%d\n",qPrint(md->name()),md->isHidden());
if (md->isHidden()) return;
if (getLanguage()==SrcLangExt_VHDL)
@@ -1015,7 +1021,7 @@ void ClassDefImpl::internalInsertMember(const MemberDef *md,
{
m_impl->isSimple = FALSE;
}
- //printf("adding %s simple=%d total_simple=%d\n",name().data(),isSimple,m_impl->isSimple);
+ //printf("adding %s simple=%d total_simple=%d\n",qPrint(name()),isSimple,m_impl->isSimple);
/*******************************************************/
/* insert member in the detailed documentation section */
@@ -1083,7 +1089,7 @@ void ClassDefImpl::internalInsertMember(const MemberDef *md,
break;
case MemberType_Define:
warn(md->getDefFileName(),md->getDefLine()-1,"A define (%s) cannot be made a member of %s",
- md->name().data(), this->name().data());
+ qPrint(md->name()), qPrint(this->name()));
break;
default:
err("Unexpected member type %d found!\n",md->memberType());
@@ -1120,7 +1126,7 @@ void ClassDefImpl::internalInsertMember(const MemberDef *md,
QCString(md->typeString())=="friend struct" ||
QCString(md->typeString())=="friend union")))
{
- //printf("=======> adding member %s to class %s\n",md->name().data(),name().data());
+ //printf("=======> adding member %s to class %s\n",qPrint(md->name()),qPrint(name()));
MemberNameInfo *mni = m_impl->allMemberNameInfoLinkedMap.add(md->name());
mni->push_back(std::make_unique<MemberInfo>(md,prot,md->virtualness(),FALSE));
@@ -1217,11 +1223,11 @@ static void writeInheritanceSpecifier(OutputList &ol,const BaseClassDef &bcd)
}
void ClassDefImpl::setIncludeFile(FileDef *fd,
- const char *includeName,bool local, bool force)
+ const QCString &includeName,bool local, bool force)
{
//printf("ClassDefImpl::setIncludeFile(%p,%s,%d,%d)\n",fd,includeName,local,force);
if (!m_impl->incInfo) m_impl->incInfo = std::make_unique<IncludeInfo>();
- if ((includeName && m_impl->incInfo->includeName.isEmpty()) ||
+ if ((!includeName.isEmpty() && m_impl->incInfo->includeName.isEmpty()) ||
(fd!=0 && m_impl->incInfo->fileDef==0)
)
{
@@ -1230,7 +1236,7 @@ void ClassDefImpl::setIncludeFile(FileDef *fd,
m_impl->incInfo->includeName = includeName;
m_impl->incInfo->local = local;
}
- if (force && includeName)
+ if (force && !includeName.isEmpty())
{
m_impl->incInfo->includeName = includeName;
m_impl->incInfo->local = local;
@@ -1290,15 +1296,15 @@ static void searchTemplateSpecs(/*in*/ const Definition *d,
}
}
-static void writeTemplateSpec(OutputList &ol,const Definition *d,
- const QCString &type,SrcLangExt lang)
+void ClassDefImpl::writeTemplateSpec(OutputList &ol,const Definition *d,
+ const QCString &type,SrcLangExt lang) const
{
ArgumentLists specs;
QCString name;
searchTemplateSpecs(d,specs,name,lang);
if (!specs.empty()) // class has template scope specifiers
{
- ol.startSubsubsection();
+ ol.startCompoundTemplateParams();
for (const ArgumentList &al : specs)
{
ol.docify("template<");
@@ -1306,7 +1312,13 @@ static void writeTemplateSpec(OutputList &ol,const Definition *d,
while (it!=al.end())
{
Argument a = *it;
- ol.docify(a.type);
+ linkifyText(TextGeneratorOLImpl(ol), // out
+ d, // scope
+ getFileDef(), // fileScope
+ this, // self
+ a.type, // text
+ FALSE // autoBreak
+ );
if (!a.name.isEmpty())
{
ol.docify(" ");
@@ -1323,9 +1335,20 @@ static void writeTemplateSpec(OutputList &ol,const Definition *d,
ol.docify(">");
ol.lineBreak();
}
+ if (!m_impl->requiresClause.isEmpty())
+ {
+ ol.docify("requires ");
+ linkifyText(TextGeneratorOLImpl(ol), // out
+ d, // scope
+ getFileDef(), // fileScope
+ this, // self
+ m_impl->requiresClause, // text
+ FALSE // autoBreak
+ );
+ ol.lineBreak();
+ }
ol.docify(type.lower()+" "+name);
- ol.endSubsubsection();
- ol.writeString("\n");
+ ol.endCompoundTemplateParams();
}
}
@@ -1339,7 +1362,7 @@ void ClassDefImpl::writeBriefDescription(OutputList &ol,bool exampleFlag) const
ol.writeString(" - ");
ol.popGeneratorState();
ol.generateDoc(briefFile(),briefLine(),this,0,
- briefDescription(),TRUE,FALSE,0,
+ briefDescription(),TRUE,FALSE,QCString(),
TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
ol.pushGeneratorState();
ol.disable(OutputGenerator::RTF);
@@ -1372,7 +1395,7 @@ void ClassDefImpl::writeDetailedDocumentationBody(OutputList &ol) const
if (!briefDescription().isEmpty() && repeatBrief)
{
ol.generateDoc(briefFile(),briefLine(),this,0,briefDescription(),FALSE,FALSE,
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
}
if (!briefDescription().isEmpty() && repeatBrief &&
!documentation().isEmpty())
@@ -1386,7 +1409,7 @@ void ClassDefImpl::writeDetailedDocumentationBody(OutputList &ol) const
if (!documentation().isEmpty())
{
ol.generateDoc(docFile(),docLine(),this,0,documentation(),TRUE,FALSE,
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
}
// write type constraints
writeTypeConstraints(ol,this,m_impl->typeConstraints);
@@ -1429,7 +1452,7 @@ void ClassDefImpl::writeDetailedDescription(OutputList &ol, const QCString &/*pa
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
- ol.writeAnchor(0,anchor.isEmpty() ? QCString("details") : anchor);
+ ol.writeAnchor(QCString(),anchor.isEmpty() ? QCString("details") : anchor);
ol.popGeneratorState();
if (!anchor.isEmpty())
@@ -1529,12 +1552,11 @@ void ClassDefImpl::showUsedFiles(OutputList &ol) const
ol.disableAllBut(OutputGenerator::Html);
if (fd->generateSourceFile())
{
- ol.writeObjectLink(0,fd->getSourceFileBase(),0,fname);
+ ol.writeObjectLink(QCString(),fd->getSourceFileBase(),QCString(),fname);
}
else if (fd->isLinkable())
{
- ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),0,
- fname);
+ ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),QCString(),fname);
}
else
{
@@ -1547,8 +1569,7 @@ void ClassDefImpl::showUsedFiles(OutputList &ol) const
ol.disable(OutputGenerator::Html);
if (fd->isLinkable())
{
- ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),0,
- fname);
+ ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),QCString(),fname);
}
else
{
@@ -1593,7 +1614,7 @@ void ClassDefImpl::writeInheritanceGraph(OutputList &ol) const
if (inheritanceGraph.isTooBig())
{
warn_uncond("Inheritance graph for '%s' not generated, too many nodes (%d), threshold is %d. Consider increasing DOT_GRAPH_MAX_NODES.\n",
- name().data(), inheritanceGraph.numNodes(), Config_getInt(DOT_GRAPH_MAX_NODES));
+ qPrint(name()), inheritanceGraph.numNodes(), Config_getInt(DOT_GRAPH_MAX_NODES));
}
else if (!inheritanceGraph.isTrivial())
{
@@ -1738,10 +1759,10 @@ void ClassDefImpl::writeIncludeFilesForSlice(OutputList &ol) const
unsigned int length = 0;
for (const auto &s : paths)
{
- QFileInfo info(s.c_str());
+ FileInfo info(s);
if (info.exists())
{
- QCString prefix = info.absFilePath().utf8();
+ QCString prefix = info.absFilePath();
if (prefix.at(prefix.length() - 1) != '/')
{
prefix += '/';
@@ -1764,7 +1785,7 @@ void ClassDefImpl::writeIncludeFilesForSlice(OutputList &ol) const
if (nm.isEmpty())
{
- nm = m_impl->incInfo->includeName.data();
+ nm = m_impl->incInfo->includeName;
}
ol.startParagraph();
@@ -1773,7 +1794,7 @@ void ClassDefImpl::writeIncludeFilesForSlice(OutputList &ol) const
ol.docify("<");
if (m_impl->incInfo->fileDef)
{
- ol.writeObjectLink(0,m_impl->incInfo->fileDef->includeName(),0,nm);
+ ol.writeObjectLink(QCString(),m_impl->incInfo->fileDef->includeName(),QCString(),nm);
}
else
{
@@ -1873,9 +1894,9 @@ void ClassDefImpl::writeIncludeFiles(OutputList &ol) const
SrcLangExt lang = getLanguage();
QCString nm=m_impl->incInfo->includeName.isEmpty() ?
(m_impl->incInfo->fileDef ?
- m_impl->incInfo->fileDef->docName().data() : ""
+ m_impl->incInfo->fileDef->docName() : QCString()
) :
- m_impl->incInfo->includeName.data();
+ m_impl->incInfo->includeName;
if (!nm.isEmpty())
{
ol.startParagraph();
@@ -1893,7 +1914,7 @@ void ClassDefImpl::writeIncludeFiles(OutputList &ol) const
ol.enable(OutputGenerator::Html);
if (m_impl->incInfo->fileDef)
{
- ol.writeObjectLink(0,m_impl->incInfo->fileDef->includeName(),0,nm);
+ ol.writeObjectLink(QCString(),m_impl->incInfo->fileDef->includeName(),QCString(),nm);
}
else
{
@@ -1923,7 +1944,7 @@ void ClassDefImpl::writeMemberGroups(OutputList &ol,bool showInline) const
}
else // add this group to the corresponding member section
{
- //printf("addToDeclarationSection(%s)\n",mg->header().data());
+ //printf("addToDeclarationSection(%s)\n",qPrint(mg->header()));
//mg->addToDeclarationSection();
}
}
@@ -1942,7 +1963,7 @@ void ClassDefImpl::writeInlineClasses(OutputList &ol) const
void ClassDefImpl::startMemberDocumentation(OutputList &ol) const
{
- //printf("%s: ClassDefImpl::startMemberDocumentation()\n",name().data());
+ //printf("%s: ClassDefImpl::startMemberDocumentation()\n",qPrint(name()));
if (Config_getBool(SEPARATE_MEMBER_PAGES))
{
ol.disable(OutputGenerator::Html);
@@ -1952,7 +1973,7 @@ void ClassDefImpl::startMemberDocumentation(OutputList &ol) const
void ClassDefImpl::endMemberDocumentation(OutputList &ol) const
{
- //printf("%s: ClassDefImpl::endMemberDocumentation()\n",name().data());
+ //printf("%s: ClassDefImpl::endMemberDocumentation()\n",qPrint(name()));
if (Config_getBool(SEPARATE_MEMBER_PAGES))
{
ol.enable(OutputGenerator::Html);
@@ -1962,13 +1983,13 @@ void ClassDefImpl::endMemberDocumentation(OutputList &ol) const
void ClassDefImpl::startMemberDeclarations(OutputList &ol) const
{
- //printf("%s: ClassDefImpl::startMemberDeclarations()\n",name().data());
+ //printf("%s: ClassDefImpl::startMemberDeclarations()\n",qPrint(name()));
ol.startMemberSections();
}
void ClassDefImpl::endMemberDeclarations(OutputList &ol) const
{
- //printf("%s: ClassDefImpl::endMemberDeclarations()\n",name().data());
+ //printf("%s: ClassDefImpl::endMemberDeclarations()\n",qPrint(name()));
static bool inlineInheritedMembers = Config_getBool(INLINE_INHERITED_MEMB);
if (!inlineInheritedMembers && countAdditionalInheritedMembers()>0)
{
@@ -2009,7 +2030,7 @@ void ClassDefImpl::writeSummaryLinks(OutputList &ol) const
)
{
const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
- ol.writeSummaryLink(0,"nested-classes",ls->title(lang),first);
+ ol.writeSummaryLink(QCString(),"nested-classes",ls->title(lang),first);
first=FALSE;
}
else if (lde->kind()==LayoutDocEntry::ClassAllMembersLink &&
@@ -2026,7 +2047,7 @@ void ClassDefImpl::writeSummaryLinks(OutputList &ol) const
MemberList * ml = getMemberList(lmd->type);
if (ml && ml->declVisible())
{
- ol.writeSummaryLink(0,MemberList::listTypeAsString(ml->listType()),lmd->title(lang),first);
+ ol.writeSummaryLink(QCString(),MemberList::listTypeAsString(ml->listType()),lmd->title(lang),first);
first=FALSE;
}
}
@@ -2036,7 +2057,7 @@ void ClassDefImpl::writeSummaryLinks(OutputList &ol) const
{
for (const auto &s : m_impl->vhdlSummaryTitles)
{
- ol.writeSummaryLink(0,convertToId(s.c_str()),s.c_str(),first);
+ ol.writeSummaryLink(QCString(),convertToId(QCString(s)),QCString(s),first);
first=FALSE;
}
}
@@ -2047,7 +2068,7 @@ void ClassDefImpl::writeSummaryLinks(OutputList &ol) const
ol.popGeneratorState();
}
-void ClassDefImpl::writeTagFile(FTextStream &tagFile)
+void ClassDefImpl::writeTagFile(TextStream &tagFile)
{
if (!isLinkableInProject() || isArtificial()) return;
tagFile << " <compound kind=\"";
@@ -2057,17 +2078,17 @@ void ClassDefImpl::writeTagFile(FTextStream &tagFile)
tagFile << compoundTypeString();
tagFile << "\"";
if (isObjectiveC()) { tagFile << " objc=\"yes\""; }
- tagFile << ">" << endl;
- tagFile << " <name>" << convertToXML(name()) << "</name>" << endl;
- tagFile << " <filename>" << convertToXML(getOutputFileBase()) << Doxygen::htmlFileExtension << "</filename>" << endl;
+ tagFile << ">\n";
+ tagFile << " <name>" << convertToXML(name()) << "</name>\n";
+ tagFile << " <filename>" << convertToXML(getOutputFileBase()) << Doxygen::htmlFileExtension << "</filename>\n";
if (!anchor().isEmpty())
{
- tagFile << " <anchor>" << convertToXML(anchor()) << "</anchor>" << endl;
+ tagFile << " <anchor>" << convertToXML(anchor()) << "</anchor>\n";
}
QCString idStr = id();
if (!idStr.isEmpty())
{
- tagFile << " <clangid>" << convertToXML(idStr) << "</clangid>" << endl;
+ tagFile << " <clangid>" << convertToXML(idStr) << "</clangid>\n";
}
for (const Argument &a : m_impl->tempArgs)
{
@@ -2076,7 +2097,7 @@ void ClassDefImpl::writeTagFile(FTextStream &tagFile)
{
tagFile << " " << convertToXML(a.name);
}
- tagFile << "</templarg>" << endl;
+ tagFile << "</templarg>\n";
}
for (const auto &ibcd : m_impl->inherits)
{
@@ -2098,7 +2119,7 @@ void ClassDefImpl::writeTagFile(FTextStream &tagFile)
{
tagFile << " virtualness=\"virtual\"";
}
- tagFile << ">" << convertToXML(cd->name()) << "</base>" << endl;
+ tagFile << ">" << convertToXML(cd->name()) << "</base>\n";
}
}
}
@@ -2116,7 +2137,7 @@ void ClassDefImpl::writeTagFile(FTextStream &tagFile)
)
{
tagFile << " <class kind=\"" << innerCd->compoundTypeString() <<
- "\">" << convertToXML(innerCd->name()) << "</class>" << endl;
+ "\">" << convertToXML(innerCd->name()) << "</class>\n";
}
}
}
@@ -2144,7 +2165,7 @@ void ClassDefImpl::writeTagFile(FTextStream &tagFile)
}
}
writeDocAnchorsToTagFile(tagFile);
- tagFile << " </compound>" << endl;
+ tagFile << " </compound>\n";
}
/** Write class documentation inside another container (i.e. a group) */
@@ -2152,8 +2173,8 @@ void ClassDefImpl::writeInlineDocumentation(OutputList &ol) const
{
bool isSimple = m_impl->isSimple;
- ol.addIndexItem(name(),0);
- //printf("ClassDefImpl::writeInlineDocumentation(%s)\n",name().data());
+ ol.addIndexItem(name(),QCString());
+ //printf("ClassDefImpl::writeInlineDocumentation(%s)\n",qPrint(name()));
// part 1: anchor and title
QCString s = compoundTypeString()+" "+name();
@@ -2162,8 +2183,8 @@ void ClassDefImpl::writeInlineDocumentation(OutputList &ol) const
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
{ // only HTML only
- ol.writeAnchor(0,anchor());
- ol.startMemberDoc(0,0,anchor(),name(),1,1,FALSE);
+ ol.writeAnchor(QCString(),anchor());
+ ol.startMemberDoc(QCString(),QCString(),anchor(),name(),1,1,FALSE);
ol.startMemberDocName(FALSE);
ol.parseText(s);
ol.endMemberDocName();
@@ -2319,7 +2340,7 @@ bool ClassDefImpl::visibleInParentsDeclList() const
);
}
-void ClassDefImpl::writeDeclarationLink(OutputList &ol,bool &found,const char *header,bool localNames) const
+void ClassDefImpl::writeDeclarationLink(OutputList &ol,bool &found,const QCString &header,bool localNames) const
{
//static bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
//static bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
@@ -2352,7 +2373,7 @@ void ClassDefImpl::writeDeclarationLink(OutputList &ol,bool &found,const char *h
{
ol.startMemberHeader("nested-classes");
}
- if (header)
+ if (!header.isEmpty())
{
ol.parseText(header);
}
@@ -2412,7 +2433,7 @@ void ClassDefImpl::writeDeclarationLink(OutputList &ol,bool &found,const char *h
{
DocRoot *rootNode = validatingParseDoc(briefFile(),briefLine(),this,0,
briefDescription(),FALSE,FALSE,
- 0,TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
if (rootNode && !rootNode->isEmpty())
{
ol.startMemberDescription(anchor());
@@ -2425,29 +2446,28 @@ void ClassDefImpl::writeDeclarationLink(OutputList &ol,bool &found,const char *h
}
delete rootNode;
}
- ol.endMemberDeclaration(anchor(),0);
+ ol.endMemberDeclaration(anchor(),QCString());
}
}
void ClassDefImpl::addClassAttributes(OutputList &ol) const
{
- QStrList sl;
- if (isFinal()) sl.append("final");
- if (isSealed()) sl.append("sealed");
- if (isAbstract()) sl.append("abstract");
- if (getLanguage()==SrcLangExt_IDL && isPublished()) sl.append("published");
+ StringVector sl;
+ if (isFinal()) sl.push_back("final");
+ if (isSealed()) sl.push_back("sealed");
+ if (isAbstract()) sl.push_back("abstract");
+ if (getLanguage()==SrcLangExt_IDL && isPublished()) sl.push_back("published");
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
- if (sl.count()>0)
+ if (!sl.empty())
{
ol.startLabels();
- const char *s=sl.first();
- while (s)
+ size_t i=0;
+ for (const auto &s : sl)
{
- const char *ns = sl.next();
- ol.writeLabel(s,ns==0);
- s=ns;
+ i++;
+ ol.writeLabel(s.c_str(),i==sl.size());
}
ol.endLabels();
}
@@ -2552,11 +2572,14 @@ void ClassDefImpl::writeDocumentationContents(OutputList &ol,const QCString & /*
case LayoutDocEntry::NamespaceNestedNamespaces:
case LayoutDocEntry::NamespaceNestedConstantGroups:
case LayoutDocEntry::NamespaceClasses:
+ case LayoutDocEntry::NamespaceConcepts:
case LayoutDocEntry::NamespaceInterfaces:
case LayoutDocEntry::NamespaceStructs:
case LayoutDocEntry::NamespaceExceptions:
case LayoutDocEntry::NamespaceInlineClasses:
+ case LayoutDocEntry::ConceptDefinition:
case LayoutDocEntry::FileClasses:
+ case LayoutDocEntry::FileConcepts:
case LayoutDocEntry::FileInterfaces:
case LayoutDocEntry::FileStructs:
case LayoutDocEntry::FileExceptions:
@@ -2568,6 +2591,7 @@ void ClassDefImpl::writeDocumentationContents(OutputList &ol,const QCString & /*
case LayoutDocEntry::FileSourceLink:
case LayoutDocEntry::FileInlineClasses:
case LayoutDocEntry::GroupClasses:
+ case LayoutDocEntry::GroupConcepts:
case LayoutDocEntry::GroupInlineClasses:
case LayoutDocEntry::GroupNamespaces:
case LayoutDocEntry::GroupDirs:
@@ -2829,9 +2853,9 @@ void ClassDefImpl::writeMemberList(OutputList &ol) const
}
ol.endQuickIndices();
}
- startTitle(ol,0);
+ startTitle(ol,QCString());
ol.parseText(displayName()+" "+theTranslator->trMemberList());
- endTitle(ol,0,0);
+ endTitle(ol,QCString(),QCString());
ol.startContents();
ol.startParagraph();
ol.parseText(theTranslator->trThisIsTheListOfAllMembers());
@@ -2853,7 +2877,7 @@ void ClassDefImpl::writeMemberList(OutputList &ol) const
Specifier virt=md->virtualness();
//printf("%s: Member %s of class %s md->protection()=%d mi->prot=%d prot=%d inherited=%d\n",
- // name().data(),md->name().data(),cd->name().data(),md->protection(),mi->prot,prot,mi->inherited);
+ // qPrint(name()),qPrint(md->name()),qPrint(cd->name()),md->protection(),mi->prot,prot,mi->inherited);
if (cd && !md->name().isEmpty() && !md->isAnonymous())
{
@@ -2899,7 +2923,7 @@ void ClassDefImpl::writeMemberList(OutputList &ol) const
md->anchor(),name);
if ( md->isFunction() || md->isSignal() || md->isSlot() ||
- (md->isFriend() && md->argsString()))
+ (md->isFriend() && md->argsString().isEmpty()))
ol.docify(md->argsString());
else if (md->isEnumerate())
ol.parseText(" "+theTranslator->trEnumName());
@@ -2907,7 +2931,7 @@ void ClassDefImpl::writeMemberList(OutputList &ol) const
ol.parseText(" "+theTranslator->trEnumValue());
else if (md->isTypedef())
ol.docify(" typedef");
- else if (md->isFriend() && !qstrcmp(md->typeString(),"friend class"))
+ else if (md->isFriend() && md->typeString()=="friend class")
ol.docify(" class");
//ol.writeString("\n");
}
@@ -3000,50 +3024,56 @@ void ClassDefImpl::writeMemberList(OutputList &ol) const
)
&& memberWritten)
{
- ol.writeString("<span class=\"mlabel\">");
- QStrList sl;
+ StringVector sl;
if (lang==SrcLangExt_VHDL)
{
- sl.append(theTranslator->trVhdlType(md->getMemberSpecifiers(),TRUE)); //append vhdl type
+ sl.push_back(theTranslator->trVhdlType(md->getMemberSpecifiers(),TRUE).str()); //append vhdl type
}
- else if (md->isFriend()) sl.append("friend");
- else if (md->isRelated()) sl.append("related");
+ else if (md->isFriend()) sl.push_back("friend");
+ else if (md->isRelated()) sl.push_back("related");
else
{
if (Config_getBool(INLINE_INFO) && md->isInline())
- sl.append("inline");
- if (md->isExplicit()) sl.append("explicit");
- if (md->isMutable()) sl.append("mutable");
- if (prot==Protected) sl.append("protected");
- else if (prot==Private) sl.append("private");
- else if (prot==Package) sl.append("package");
+ sl.push_back("inline");
+ if (md->isExplicit()) sl.push_back("explicit");
+ if (md->isMutable()) sl.push_back("mutable");
+ if (prot==Protected) sl.push_back("protected");
+ else if (prot==Private) sl.push_back("private");
+ else if (prot==Package) sl.push_back("package");
if (virt==Virtual && getLanguage()!=SrcLangExt_ObjC)
- sl.append("virtual");
- else if (virt==Pure) sl.append("pure virtual");
- if (md->isStatic()) sl.append("static");
- if (md->isSignal()) sl.append("signal");
- if (md->isSlot()) sl.append("slot");
+ sl.push_back("virtual");
+ else if (virt==Pure) sl.push_back("pure virtual");
+ if (md->isStatic()) sl.push_back("static");
+ if (md->isSignal()) sl.push_back("signal");
+ if (md->isSlot()) sl.push_back("slot");
// this is the extra member page
- if (md->isOptional()) sl.append("optional");
- if (md->isAttribute()) sl.append("attribute");
- if (md->isUNOProperty()) sl.append("property");
- if (md->isReadonly()) sl.append("readonly");
- if (md->isBound()) sl.append("bound");
- if (md->isRemovable()) sl.append("removable");
- if (md->isConstrained()) sl.append("constrained");
- if (md->isTransient()) sl.append("transient");
- if (md->isMaybeVoid()) sl.append("maybevoid");
- if (md->isMaybeDefault()) sl.append("maybedefault");
- if (md->isMaybeAmbiguous())sl.append("maybeambiguous");
+ if (md->isOptional()) sl.push_back("optional");
+ if (md->isAttribute()) sl.push_back("attribute");
+ if (md->isUNOProperty()) sl.push_back("property");
+ if (md->isReadonly()) sl.push_back("readonly");
+ if (md->isBound()) sl.push_back("bound");
+ if (md->isRemovable()) sl.push_back("removable");
+ if (md->isConstrained()) sl.push_back("constrained");
+ if (md->isTransient()) sl.push_back("transient");
+ if (md->isMaybeVoid()) sl.push_back("maybevoid");
+ if (md->isMaybeDefault()) sl.push_back("maybedefault");
+ if (md->isMaybeAmbiguous())sl.push_back("maybeambiguous");
}
- const char *s=sl.first();
- while (s)
+ bool firstSpan=true;
+ for (const auto &s : sl)
{
- ol.docify(s);
- s=sl.next();
- if (s) ol.writeString("</span><span class=\"mlabel\">");
+ if (!firstSpan)
+ {
+ ol.writeString("</span><span class=\"mlabel\">");
+ }
+ else
+ {
+ ol.writeString("<span class=\"mlabel\">");
+ firstSpan=false;
+ }
+ ol.docify(s.c_str());
}
- ol.writeString("</span>");
+ if (!firstSpan) ol.writeString("</span>");
}
if (memberWritten)
{
@@ -3062,7 +3092,7 @@ void ClassDefImpl::writeMemberList(OutputList &ol) const
}
// add a reference to an example
-bool ClassDefImpl::addExample(const char *anchor,const char *nameStr, const char *file)
+bool ClassDefImpl::addExample(const QCString &anchor,const QCString &nameStr, const QCString &file)
{
return m_impl->examples.inSort(Example(anchor,nameStr,file));
}
@@ -3075,7 +3105,7 @@ bool ClassDefImpl::hasExamples() const
void ClassDefImpl::addTypeConstraint(const QCString &typeConstraint,const QCString &type)
{
- //printf("addTypeConstraint(%s,%s)\n",type.data(),typeConstraint.data());
+ //printf("addTypeConstraint(%s,%s)\n",qPrint(type),qPrint(typeConstraint));
static bool hideUndocRelation = Config_getBool(HIDE_UNDOC_RELATIONS);
if (typeConstraint.isEmpty() || type.isEmpty()) return;
SymbolResolver resolver(getFileDef());
@@ -3095,7 +3125,7 @@ void ClassDefImpl::addTypeConstraint(const QCString &typeConstraint,const QCStri
cd->setUsedOnly(TRUE);
cd->setLanguage(getLanguage());
//printf("Adding undocumented constraint '%s' to class %s on type %s\n",
- // typeConstraint.data(),name().data(),type.data());
+ // qPrint(typeConstraint),qPrint(name()),qPrint(type));
}
}
if (cd)
@@ -3111,7 +3141,7 @@ void ClassDefImpl::addTypeConstraint(const QCString &typeConstraint,const QCStri
}
(*it).addAccessor(type);
//printf("Adding constraint '%s' to class %s on type %s\n",
- // typeConstraint.data(),name().data(),type.data());
+ // qPrint(typeConstraint),qPrint(name()),qPrint(type));
}
}
@@ -3180,13 +3210,23 @@ bool ClassDefImpl::hasNonReferenceSuperClass() const
return found;
}
+QCString ClassDefImpl::requiresClause() const
+{
+ return m_impl->requiresClause;
+}
+
+void ClassDefImpl::setRequiresClause(const QCString &req)
+{
+ m_impl->requiresClause = req;
+}
+
/*! called from MemberDef::writeDeclaration() to (recursively) write the
* definition of an anonymous struct, union or class.
*/
void ClassDefImpl::writeDeclaration(OutputList &ol,const MemberDef *md,bool inGroup,
- const ClassDef *inheritedFrom,const char *inheritId) const
+ const ClassDef *inheritedFrom,const QCString &inheritId) const
{
- //printf("ClassName='%s' inGroup=%d\n",name().data(),inGroup);
+ //printf("ClassName='%s' inGroup=%d\n",qPrint(name()),inGroup);
ol.docify(compoundTypeString());
QCString cn = displayName(FALSE);
@@ -3195,7 +3235,7 @@ void ClassDefImpl::writeDeclaration(OutputList &ol,const MemberDef *md,bool inGr
ol.docify(" ");
if (md && isLinkable())
{
- ol.writeObjectLink(0,0,md->anchor(),cn);
+ ol.writeObjectLink(QCString(),QCString(),md->anchor(),cn);
}
else
{
@@ -3296,7 +3336,7 @@ bool ClassDefImpl::hasDocumentation() const
bool ClassDefImpl::isBaseClass(const ClassDef *bcd, bool followInstances,int level) const
{
bool found=FALSE;
- //printf("isBaseClass(cd=%s) looking for %s\n",name().data(),bcd->name().data());
+ //printf("isBaseClass(cd=%s) looking for %s\n",qPrint(name()),qPrint(bcd->name()));
if (level>256)
{
err("Possible recursive class relation while inside %s and looking for base class %s\n",qPrint(name()),qPrint(bcd->name()));
@@ -3356,7 +3396,7 @@ void ClassDefImpl::mergeMembers()
uint sepLen = sep.length();
m_impl->membersMerged=TRUE;
- //printf(" mergeMembers for %s\n",name().data());
+ //printf(" mergeMembers for %s\n",qPrint(name()));
static bool inlineInheritedMembers = Config_getBool(INLINE_INHERITED_MEMB);
static bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
for (const auto &bcd : baseClasses())
@@ -3393,7 +3433,7 @@ void ClassDefImpl::mergeMembers()
if (srcMd!=dstMd) // different members
{
const ClassDef *dstCd = dstMd->getClassDef();
- //printf(" Is %s a base class of %s?\n",srcCd->name().data(),dstCd->name().data());
+ //printf(" Is %s a base class of %s?\n",qPrint(srcCd->name()),qPrint(dstCd->name()));
if (srcCd==dstCd || dstCd->isBaseClass(srcCd,TRUE))
// member is in the same or a base class
{
@@ -3405,8 +3445,8 @@ void ClassDefImpl::mergeMembers()
TRUE
);
//printf(" Yes, matching (%s<->%s): %d\n",
- // argListToString(srcMd->argumentList()).data(),
- // argListToString(dstMd->argumentList()).data(),
+ // qPrint(argListToString(srcMd->argumentList())),
+ // qPrint(argListToString(dstMd->argumentList())),
// found);
hidden = hidden || !found;
}
@@ -3414,9 +3454,9 @@ void ClassDefImpl::mergeMembers()
// using the same base class.
{
//printf("$$ Existing member %s %s add scope %s\n",
- // dstMi->ambiguityResolutionScope.data(),
- // dstMd->name().data(),
- // dstMi->scopePath.left(dstMi->scopePath.find("::")+2).data());
+ // qPrint(dstMi->ambiguityResolutionScope),
+ // qPrint(dstMd->name()),
+ // qPrint(dstMi->scopePath.left(dstMi->scopePath.find("::")+2));
QCString scope=dstMi->scopePath().left((uint)dstMi->scopePath().find(sep)+sepLen);
if (scope!=dstMi->ambiguityResolutionScope().left(scope.length()))
@@ -3443,9 +3483,9 @@ void ClassDefImpl::mergeMembers()
// inheritance tree
{
//printf("$$ Existing member %s %s add scope %s\n",
- // dstMi->ambiguityResolutionScope.data(),
- // dstMd->name().data(),
- // dstMi->scopePath.left(dstMi->scopePath.find("::")+2).data());
+ // qPrint(dstMi->ambiguityResolutionScope),
+ // qPrint(dstMd->name()),
+ // qPrint(dstMi->scopePath.left(dstMi->scopePath.find("::")+2));
QCString scope=dstMi->scopePath().left((uint)dstMi->scopePath().find(sep)+sepLen);
if (scope!=dstMi->ambiguityResolutionScope().left(scope.length()))
@@ -3458,7 +3498,7 @@ void ClassDefImpl::mergeMembers()
if (found) break;
}
//printf("member %s::%s hidden %d ambiguous %d srcMi->ambigClass=%p\n",
- // srcCd->name().data(),srcMd->name().data(),hidden,ambiguous,srcMi->ambigClass);
+ // qPrint(srcCd->name()),qPrint(srcMd->name()),hidden,ambiguous,srcMi->ambigClass);
// TODO: fix the case where a member is hidden by inheritance
// of a member with the same name but with another prototype,
@@ -3477,7 +3517,7 @@ void ClassDefImpl::mergeMembers()
{
if (!isStandardFunc(srcMd))
{
- //printf(" insertMember '%s'\n",srcMd->name().data());
+ //printf(" insertMember '%s'\n",qPrint(srcMd->name()));
internalInsertMember(srcMd,prot,FALSE);
}
}
@@ -3490,9 +3530,9 @@ void ClassDefImpl::mergeMembers()
if (ambiguous)
{
//printf("$$ New member %s %s add scope %s::\n",
- // srcMi->ambiguityResolutionScope.data(),
- // srcMd->name().data(),
- // bClass->name().data());
+ // qPrint(srcMi->ambiguityResolutionScope),
+ // qPrint(srcMd->name()),
+ // qPrint(bClass->name()));
QCString scope=bClass->name()+sep;
if (scope!=srcMi->ambiguityResolutionScope().left(scope.length()))
@@ -3538,7 +3578,7 @@ void ClassDefImpl::mergeMembers()
prot=Private;
}
//printf("%s::%s: prot=%d bcd.prot=%d result=%d\n",
- // name().data(),mi->memberDef->name().data(),mi->prot,
+ // qPrint(name()),qPrint(mi->memberDef->name()),mi->prot,
// bcd.prot,prot);
if (prot!=Private || extractPrivate)
@@ -3550,7 +3590,7 @@ void ClassDefImpl::mergeMembers()
{
if (!isStandardFunc(mi->memberDef()))
{
- //printf(" insertMember '%s'\n",mi->memberDef->name().data());
+ //printf(" insertMember '%s'\n",qPrint(mi->memberDef->name()));
internalInsertMember(mi->memberDef(),prot,FALSE);
}
}
@@ -3609,7 +3649,7 @@ void ClassDefImpl::mergeCategory(ClassDef *cat)
}
}
// make methods private for categories defined in the .m file
- //printf("%s::mergeCategory makePrivate=%d\n",name().data(),makePrivate);
+ //printf("%s::mergeCategory makePrivate=%d\n",qPrint(name()),makePrivate);
const MemberNameInfoLinkedMap &srcMnd = category->memberNameInfoLinkedMap();
MemberNameInfoLinkedMap &dstMnd = m_impl->allMemberNameInfoLinkedMap;
@@ -3644,13 +3684,13 @@ void ClassDefImpl::mergeCategory(ClassDef *cat)
// copy the member(s) from the category to this class
for (auto &mi : *srcMni)
{
- //printf("Adding '%s'\n",mi->memberDef->name().data());
+ //printf("Adding '%s'\n",qPrint(mi->memberDef->name()));
Protection prot = mi->prot();
//if (makePrivate) prot = Private;
std::unique_ptr<MemberDefMutable> newMd { toMemberDefMutable(mi->memberDef()->deepCopy()) };
if (newMd)
{
- //printf("Copying member %s\n",mi->memberDef->name().data());
+ //printf("Copying member %s\n",qPrint(mi->memberDef->name()));
newMd->moveTo(this);
std::unique_ptr<MemberInfo> newMi=std::make_unique<MemberInfo>(newMd.get(),prot,mi->virt(),mi->inherited());
@@ -3689,13 +3729,13 @@ void ClassDefImpl::mergeCategory(ClassDef *cat)
//----------------------------------------------------------------------------
-void ClassDefImpl::addUsedClass(ClassDef *cd,const char *accessName,
+void ClassDefImpl::addUsedClass(ClassDef *cd,const QCString &accessName,
Protection prot)
{
static bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
static bool umlLook = Config_getBool(UML_LOOK);
if (prot==Private && !extractPrivate) return;
- //printf("%s::addUsedClass(%s,%s)\n",name().data(),cd->name().data(),accessName);
+ //printf("%s::addUsedClass(%s,%s)\n",qPrint(name()),qPrint(cd->name()),accessName);
auto it = std::find_if(m_impl->usesImplClassList.begin(),
m_impl->usesImplClassList.end(),
@@ -3704,7 +3744,7 @@ void ClassDefImpl::addUsedClass(ClassDef *cd,const char *accessName,
{
m_impl->usesImplClassList.emplace_back(cd);
//printf("Adding used class %s to class %s via accessor %s\n",
- // cd->name().data(),name().data(),accessName);
+ // qPrint(cd->name()),qPrint(name()),accessName);
it = m_impl->usesImplClassList.end()-1;
}
QCString acc = accessName;
@@ -3721,13 +3761,13 @@ void ClassDefImpl::addUsedClass(ClassDef *cd,const char *accessName,
(*it).addAccessor(acc);
}
-void ClassDefImpl::addUsedByClass(ClassDef *cd,const char *accessName,
+void ClassDefImpl::addUsedByClass(ClassDef *cd,const QCString &accessName,
Protection prot)
{
static bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
static bool umlLook = Config_getBool(UML_LOOK);
if (prot==Private && !extractPrivate) return;
- //printf("%s::addUsedByClass(%s,%s)\n",name().data(),cd->name().data(),accessName);
+ //printf("%s::addUsedByClass(%s,%s)\n",qPrint(name()),qPrint(cd->name()),accessName);
//
auto it = std::find_if(m_impl->usedByImplClassList.begin(),
m_impl->usedByImplClassList.end(),
@@ -3736,7 +3776,7 @@ void ClassDefImpl::addUsedByClass(ClassDef *cd,const char *accessName,
{
m_impl->usedByImplClassList.emplace_back(cd);
//printf("Adding used by class %s to class %s\n",
- // cd->name().data(),name().data());
+ // qPrint(cd->name()),qPrint(name()));
it = m_impl->usedByImplClassList.end()-1;
}
QCString acc = accessName;
@@ -3845,7 +3885,7 @@ QCString ClassDefImpl::getSourceFileBase() const
void ClassDefImpl::setGroupDefForAllMembers(GroupDef *gd,Grouping::GroupPri_t pri,const QCString &fileName,int startLine,bool hasDocs)
{
gd->addClass(this);
- //printf("ClassDefImpl::setGroupDefForAllMembers(%s)\n",gd->name().data());
+ //printf("ClassDefImpl::setGroupDefForAllMembers(%s)\n",qPrint(gd->name()));
for (auto &mni : m_impl->allMemberNameInfoLinkedMap)
{
for (auto &mi : *mni)
@@ -3864,7 +3904,7 @@ void ClassDefImpl::setGroupDefForAllMembers(GroupDef *gd,Grouping::GroupPri_t pr
void ClassDefImpl::addInnerCompound(const Definition *d)
{
- //printf("**** %s::addInnerCompound(%s)\n",name().data(),d->name().data());
+ //printf("**** %s::addInnerCompound(%s)\n",qPrint(name()),qPrint(d->name()));
if (d->definitionType()==Definition::TypeClass) // only classes can be
// nested in classes.
{
@@ -3872,7 +3912,7 @@ void ClassDefImpl::addInnerCompound(const Definition *d)
}
}
-const Definition *ClassDefImpl::findInnerCompound(const char *name) const
+const Definition *ClassDefImpl::findInnerCompound(const QCString &name) const
{
return m_impl->innerClasses.find(name);
}
@@ -3945,9 +3985,9 @@ const TemplateNameMap &ClassDefImpl::getTemplateBaseClassNames() const
return m_impl->templBaseClassNames;
}
-void ClassDefImpl::addMembersToTemplateInstance(const ClassDef *cd,const ArgumentList &templateArguments,const char *templSpec)
+void ClassDefImpl::addMembersToTemplateInstance(const ClassDef *cd,const ArgumentList &templateArguments,const QCString &templSpec)
{
- //printf("%s::addMembersToTemplateInstance(%s,%s)\n",name().data(),cd->name().data(),templSpec);
+ //printf("%s::addMembersToTemplateInstance(%s,%s)\n",qPrint(name()),qPrint(cd->name()),templSpec);
for (const auto &mni : cd->memberNameInfoLinkedMap())
{
for (const auto &mi : *mni)
@@ -3956,7 +3996,7 @@ void ClassDefImpl::addMembersToTemplateInstance(const ClassDef *cd,const Argumen
const MemberDef *md = mi->memberDef();
std::unique_ptr<MemberDefMutable> imd { md->createTemplateInstanceMember(
templateArguments,actualArguments_p) };
- //printf("%s->setMemberClass(%p)\n",imd->name().data(),this);
+ //printf("%s->setMemberClass(%p)\n",qPrint(imd->name()),this);
imd->setMemberClass(this);
imd->setTemplateMaster(md);
imd->setDocumentation(md->documentation(),md->docFile(),md->docLine());
@@ -3966,10 +4006,10 @@ void ClassDefImpl::addMembersToTemplateInstance(const ClassDef *cd,const Argumen
imd->setMemberGroupId(md->getMemberGroupId());
insertMember(imd.get());
//printf("Adding member=%s %s%s to class %s templSpec %s\n",
- // imd->typeString(),imd->name().data(),imd->argsString(),
- // imd->getClassDef()->name().data(),templSpec);
+ // imd->typeString(),qPrint(imd->name()),imd->argsString(),
+ // qPrint(imd->getClassDef()->name()),templSpec);
// insert imd in the list of all members
- //printf("Adding member=%s class=%s\n",imd->name().data(),name().data());
+ //printf("Adding member=%s class=%s\n",qPrint(imd->name()),qPrint(name()));
MemberName *mn = Doxygen::memberNameLinkedMap->add(imd->name());
mn->push_back(std::move(imd));
}
@@ -4043,7 +4083,7 @@ QCString ClassDefImpl::className() const
}
}
-void ClassDefImpl::setClassName(const char *name)
+void ClassDefImpl::setClassName(const QCString &name)
{
m_impl->className = name;
}
@@ -4052,7 +4092,7 @@ void ClassDefImpl::addListReferences()
{
SrcLangExt lang = getLanguage();
if (!isLinkableInProject()) return;
- //printf("ClassDef(%s)::addListReferences()\n",name().data());
+ //printf("ClassDef(%s)::addListReferences()\n",qPrint(name()));
{
const RefItemVector &xrefItems = xrefListItems();
addRefItem(xrefItems,
@@ -4061,7 +4101,7 @@ void ClassDefImpl::addListReferences()
: theTranslator->trClass(TRUE,TRUE),
getOutputFileBase(),
displayName(),
- 0,
+ QCString(),
this
);
}
@@ -4091,7 +4131,7 @@ const MemberDef *ClassDefImpl::getMemberByName(const QCString &name) const
const ClassDef *mcd=mi->memberDef()->getClassDef();
int m=minClassDistance(this,mcd);
//printf("found member in %s linkable=%d m=%d\n",
- // mcd->name().data(),mcd->isLinkable(),m);
+ // qPrint(mcd->name()),mcd->isLinkable(),m);
if (m<mdist && mcd->isLinkable())
{
mdist=m;
@@ -4099,7 +4139,7 @@ const MemberDef *ClassDefImpl::getMemberByName(const QCString &name) const
}
}
}
- //printf("getMemberByName(%s)=%p\n",name.data(),xmd);
+ //printf("getMemberByName(%s)=%p\n",qPrint(name),xmd);
return xmd;
}
@@ -4158,7 +4198,7 @@ void ClassDefImpl::sortMemberLists()
int ClassDefImpl::countMemberDeclarations(MemberListType lt,const ClassDef *inheritedFrom,
int lt2,bool invert,bool showAlways,ClassDefSet &visitedClasses) const
{
- //printf("%s: countMemberDeclarations for %d and %d\n",name().data(),lt,lt2);
+ //printf("%s: countMemberDeclarations for %d and %d\n",qPrint(name()),lt,lt2);
int count=0;
MemberList * ml = getMemberList(lt);
MemberList * ml2 = getMemberList((MemberListType)lt2);
@@ -4238,7 +4278,7 @@ int ClassDefImpl::countInheritedDecMembers(MemberListType lt,
int count = countMembersIncludingGrouped(lt,inheritedFrom,FALSE);
bool process = count>0;
//printf("%s: countInheritedDecMembers: lt=%d process=%d count=%d invert=%d\n",
- // name().data(),lt,process,count,invert);
+ // qPrint(name()),lt,process,count,invert);
if ((process^invert) || showAlways)
{
for (const auto &ibcd : m_impl->inherits)
@@ -4249,7 +4289,7 @@ int ClassDefImpl::countInheritedDecMembers(MemberListType lt,
{
convertProtectionLevel(lt,ibcd.prot,&lt1,&lt2);
//printf("%s: convert %d->(%d,%d) prot=%d\n",
- // icd->name().data(),lt,lt1,lt2,ibcd->prot);
+ // qPrint(icd->name()),lt,lt1,lt2,ibcd->prot);
if (visitedClasses.find(icd)==visitedClasses.end())
{
visitedClasses.insert(icd); // guard for multiple virtual inheritance
@@ -4330,7 +4370,7 @@ int ClassDefImpl::countMembersIncludingGrouped(MemberListType lt,
{
count=ml->countInheritableMembers(inheritedFrom);
}
- //printf("%s:countMembersIncludingGrouped: count=%d\n",name().data(),count);
+ //printf("%s:countMembersIncludingGrouped: count=%d\n",qPrint(name()),count);
for (const auto &mg : m_impl->memberGroups)
{
bool hasOwnSection = !mg->allMembersInSameSection() ||
@@ -4341,7 +4381,7 @@ int ClassDefImpl::countMembersIncludingGrouped(MemberListType lt,
}
}
//printf("%s:countMembersIncludingGrouped(lt=%d,%s)=%d\n",
- // name().data(),lt,ml?ml->listTypeAsString(ml->listType()).data():"<none>",count);
+ // qPrint(name()),lt,ml?qPrint(ml->listTypeAsString(ml->listType())):"<none>",count);
return count;
}
@@ -4355,7 +4395,7 @@ void ClassDefImpl::writeInheritedMemberDeclarations(OutputList &ol,ClassDefSet &
int count = countMembersIncludingGrouped(lt,inheritedFrom,FALSE);
bool process = count>0;
//printf("%s: writeInheritedMemberDec: lt=%d process=%d invert=%d always=%d\n",
- // name().data(),lt,process,invert,showAlways);
+ // qPrint(name()),lt,process,invert,showAlways);
if ((process^invert) || showAlways)
{
for (const auto &ibcd : m_impl->inherits)
@@ -4369,7 +4409,7 @@ void ClassDefImpl::writeInheritedMemberDeclarations(OutputList &ol,ClassDefSet &
{
lt2=lt3;
}
- //printf("%s:convert %d->(%d,%d) prot=%d\n",icd->name().data(),lt,lt1,lt2,ibcd->prot);
+ //printf("%s:convert %d->(%d,%d) prot=%d\n",qPrint(icd->name()),lt,lt1,lt2,ibcd->prot);
if (visitedClasses.find(icd)==visitedClasses.end())
{
visitedClasses.insert(icd); // guard for multiple virtual inheritance
@@ -4381,7 +4421,7 @@ void ClassDefImpl::writeInheritedMemberDeclarations(OutputList &ol,ClassDefSet &
}
else
{
- //printf("%s: class already visited!\n",icd->name().data());
+ //printf("%s: class already visited!\n",qPrint(icd->name()));
}
}
}
@@ -4391,10 +4431,10 @@ void ClassDefImpl::writeInheritedMemberDeclarations(OutputList &ol,ClassDefSet &
void ClassDefImpl::writeMemberDeclarations(OutputList &ol,ClassDefSet &visitedClasses,
MemberListType lt,const QCString &title,
- const char *subTitle,bool showInline,const ClassDef *inheritedFrom,int lt2,
+ const QCString &subTitle,bool showInline,const ClassDef *inheritedFrom,int lt2,
bool invert,bool showAlways) const
{
- //printf("%s: ClassDefImpl::writeMemberDeclarations lt=%d lt2=%d\n",name().data(),lt,lt2);
+ //printf("%s: ClassDefImpl::writeMemberDeclarations lt=%d lt2=%d\n",qPrint(name()),lt,lt2);
MemberList * ml = getMemberList(lt);
MemberList * ml2 = getMemberList((MemberListType)lt2);
if (getLanguage()==SrcLangExt_VHDL) // use specific declarations function
@@ -4412,7 +4452,7 @@ void ClassDefImpl::writeMemberDeclarations(OutputList &ol,ClassDefSet &visitedCl
}
else
{
- //printf("%s::writeMemberDeclarations(%s) ml=%p ml2=%p\n",name().data(),title.data(),ml,ml2);
+ //printf("%s::writeMemberDeclarations(%s) ml=%p ml2=%p\n",qPrint(name()),qPrint(title),ml,ml2);
QCString tt = title, st = subTitle;
if (ml)
{
@@ -4439,7 +4479,7 @@ void ClassDefImpl::writeMemberDeclarations(OutputList &ol,ClassDefSet &visitedCl
void ClassDefImpl::addGroupedInheritedMembers(OutputList &ol,MemberListType lt,
const ClassDef *inheritedFrom,const QCString &inheritId) const
{
- //printf("** %s::addGroupedInheritedMembers(%p) inheritId=%s\n",name().data(),m_impl->memberGroupSDict,inheritId.data());
+ //printf("** %s::addGroupedInheritedMembers(%p) inheritId=%s\n",qPrint(name()),m_impl->memberGroupSDict,qPrint(inheritId));
for (const auto &mg : m_impl->memberGroups)
{
if (!mg->allMembersInSameSection() || !m_impl->subGrouping) // group is in its own section
@@ -4451,23 +4491,23 @@ void ClassDefImpl::addGroupedInheritedMembers(OutputList &ol,MemberListType lt,
void ClassDefImpl::writeMemberDocumentation(OutputList &ol,MemberListType lt,const QCString &title,bool showInline) const
{
- //printf("%s: ClassDefImpl::writeMemberDocumentation()\n",name().data());
+ //printf("%s: ClassDefImpl::writeMemberDocumentation()\n",qPrint(name()));
MemberList * ml = getMemberList(lt);
if (ml) ml->writeDocumentation(ol,displayName(),this,title,FALSE,showInline);
}
void ClassDefImpl::writeSimpleMemberDocumentation(OutputList &ol,MemberListType lt) const
{
- //printf("%s: ClassDefImpl::writeSimpleMemberDocumentation()\n",name().data());
+ //printf("%s: ClassDefImpl::writeSimpleMemberDocumentation()\n",qPrint(name()));
MemberList * ml = getMemberList(lt);
if (ml) ml->writeSimpleDocumentation(ol,this);
}
void ClassDefImpl::writePlainMemberDeclaration(OutputList &ol,
MemberListType lt,bool inGroup,
- const ClassDef *inheritedFrom,const char *inheritId) const
+ const ClassDef *inheritedFrom,const QCString &inheritId) const
{
- //printf("%s: ClassDefImpl::writePlainMemberDeclaration()\n",name().data());
+ //printf("%s: ClassDefImpl::writePlainMemberDeclaration()\n",qPrint(name()));
MemberList * ml = getMemberList(lt);
if (ml)
{
@@ -4491,7 +4531,7 @@ ClassDefImpl::CompoundType ClassDefImpl::compoundType() const
return m_impl->compType;
}
-BaseClassList ClassDefImpl::baseClasses() const
+const BaseClassList &ClassDefImpl::baseClasses() const
{
return m_impl->inherits;
}
@@ -4501,7 +4541,7 @@ void ClassDefImpl::updateBaseClasses(const BaseClassList &bcd)
m_impl->inherits = bcd;
}
-BaseClassList ClassDefImpl::subClasses() const
+const BaseClassList &ClassDefImpl::subClasses() const
{
return m_impl->inheritedBy;
}
@@ -4536,10 +4576,10 @@ const ArgumentList &ClassDefImpl::templateArguments() const
return m_impl->tempArgs;
}
-NamespaceDef *ClassDefImpl::getNamespaceDef() const
-{
- return m_impl->nspace;
-}
+//NamespaceDef *ClassDefImpl::getNamespaceDef() const
+//{
+// return m_impl->nspace;
+//}
FileDef *ClassDefImpl::getFileDef() const
{
@@ -4646,11 +4686,6 @@ const MemberGroupList &ClassDefImpl::getMemberGroups() const
return m_impl->memberGroups;
}
-void ClassDefImpl::setNamespace(NamespaceDef *nd)
-{
- m_impl->nspace = nd;
-}
-
void ClassDefImpl::setFileDef(FileDef *fd)
{
m_impl->fileDef=fd;
@@ -4764,8 +4799,8 @@ bool ClassDefImpl::isEmbeddedInOuterScope() const
//printf("%s::isEmbeddedInOuterScope(): inlineGroupedClasses=%d "
// "inlineSimpleClasses=%d partOfGroups()=%p m_impl->isSimple=%d "
// "getOuterScope()=%s b1=%d b2=%d\n",
- // name().data(),inlineGroupedClasses,inlineSimpleClasses,
- // partOfGroups().pointer(),m_impl->isSimple,getOuterScope()?getOuterScope()->name().data():"<none>",b1,b2);
+ // qPrint(name()),inlineGroupedClasses,inlineSimpleClasses,
+ // partOfGroups().pointer(),m_impl->isSimple,getOuterScope()?qPrint(getOuterScope()->name()):"<none>",b1,b2);
return b1 || b2; // either reason will do
}
@@ -4831,12 +4866,12 @@ bool ClassDefImpl::isSliceLocal() const
return m_impl->spec&Entry::Local;
}
-void ClassDefImpl::setName(const char *name)
+void ClassDefImpl::setName(const QCString &name)
{
DefinitionMixin::setName(name);
}
-void ClassDefImpl::setMetaData(const char *md)
+void ClassDefImpl::setMetaData(const QCString &md)
{
m_impl->metaData = md;
}
diff --git a/src/classdef.h b/src/classdef.h
index ea14675..2c8f870 100644
--- a/src/classdef.h
+++ b/src/classdef.h
@@ -43,7 +43,6 @@ class PackageDef;
class GroupDef;
struct IncludeInfo;
class ClassDefImpl;
-class FTextStream;
class ClassDef;
class ClassDefMutable;
class UsesClassList;
@@ -54,7 +53,7 @@ class MemberGroupList;
*/
struct BaseClassDef
{
- BaseClassDef(ClassDef *cd,const char *n,Protection p, Specifier v,const char *t) :
+ BaseClassDef(ClassDef *cd,const QCString &n,Protection p, Specifier v,const QCString &t) :
classDef(cd), usedName(n), prot(p), virt(v), templSpecifiers(t) {}
/** Class definition that this relation inherits from. */
@@ -168,14 +167,14 @@ class ClassDef : public Definition
/** Returns the list of base classes from which this class directly
* inherits.
*/
- virtual BaseClassList baseClasses() const = 0;
+ virtual const BaseClassList &baseClasses() const = 0;
/** Update the list of base classes to the one passed */
virtual void updateBaseClasses(const BaseClassList &bcd) = 0;
/** Returns the list of sub classes that directly derive from this class
*/
- virtual BaseClassList subClasses() const = 0;
+ virtual const BaseClassList &subClasses() const = 0;
/** Update the list of sub classes to the one passed */
virtual void updateSubClasses(const BaseClassList &bcd) = 0;
@@ -212,7 +211,7 @@ class ClassDef : public Definition
/** Returns the namespace this compound is in, or 0 if it has a global
* scope.
*/
- virtual NamespaceDef *getNamespaceDef() const = 0;
+ //virtual NamespaceDef *getNamespaceDef() const = 0;
/** Returns the file in which this compound's definition can be found.
* Should not return 0 (but it might be a good idea to check anyway).
@@ -267,7 +266,7 @@ class ClassDef : public Definition
* available, or 0 otherwise.
* @param name The name of the nested compound
*/
- virtual const Definition *findInnerCompound(const char *name) const = 0;
+ virtual const Definition *findInnerCompound(const QCString &name) const = 0;
/** Returns the template parameter lists that form the template
* declaration of this class.
@@ -359,6 +358,8 @@ class ClassDef : public Definition
virtual bool isSliceLocal() const = 0;
virtual bool hasNonReferenceSuperClass() const = 0;
+ virtual QCString requiresClause() const = 0;
+
//-----------------------------------------------------------------------------------
// --- count members ----
//-----------------------------------------------------------------------------------
@@ -376,7 +377,7 @@ class ClassDef : public Definition
virtual ClassDef *insertTemplateInstance(const QCString &fileName,int startLine,int startColumn,
const QCString &templSpec,bool &freshInstance) const = 0;
virtual void writeDeclarationLink(OutputList &ol,bool &found,
- const char *header,bool localNames) const = 0;
+ const QCString &header,bool localNames) const = 0;
};
@@ -387,15 +388,14 @@ class ClassDefMutable : public DefinitionMutable, public ClassDef
// --- setters ----
//-----------------------------------------------------------------------------------
- virtual void setIncludeFile(FileDef *fd,const char *incName,bool local,bool force) = 0;
- virtual void setNamespace(NamespaceDef *nd) = 0;
+ virtual void setIncludeFile(FileDef *fd,const QCString &incName,bool local,bool force) = 0;
virtual void setFileDef(FileDef *fd) = 0;
virtual void setSubGrouping(bool enabled) = 0;
virtual void setProtection(Protection p) = 0;
virtual void setGroupDefForAllMembers(GroupDef *g,Grouping::GroupPri_t pri,const QCString &fileName,int startLine,bool hasDocs) = 0;
virtual void setIsStatic(bool b) = 0;
virtual void setCompoundType(CompoundType t) = 0;
- virtual void setClassName(const char *name) = 0;
+ virtual void setClassName(const QCString &name) = 0;
virtual void setClassSpecifier(uint64 spec) = 0;
virtual void setTemplateArguments(const ArgumentList &al) = 0;
virtual void setTemplateBaseClassNames(const TemplateNameMap &templateNames) = 0;
@@ -404,22 +404,23 @@ class ClassDefMutable : public DefinitionMutable, public ClassDef
virtual void setCategoryOf(ClassDef *cd) = 0;
virtual void setUsedOnly(bool b) = 0;
virtual void setTagLessReference(const ClassDef *cd) = 0;
- virtual void setName(const char *name) = 0;
- virtual void setMetaData(const char *md) = 0;
+ virtual void setName(const QCString &name) = 0;
+ virtual void setMetaData(const QCString &md) = 0;
+ virtual void setRequiresClause(const QCString &req) = 0;
//-----------------------------------------------------------------------------------
// --- actions ----
//-----------------------------------------------------------------------------------
- virtual void insertBaseClass(ClassDef *,const char *name,Protection p,Specifier s,const char *t=0) = 0;
- virtual void insertSubClass(ClassDef *,Protection p,Specifier s,const char *t=0) = 0;
+ virtual void insertBaseClass(ClassDef *,const QCString &name,Protection p,Specifier s,const QCString &t=QCString()) = 0;
+ virtual void insertSubClass(ClassDef *,Protection p,Specifier s,const QCString &t=QCString()) = 0;
virtual void insertMember(MemberDef *) = 0;
virtual void insertUsedFile(const FileDef *) = 0;
- virtual void addMembersToTemplateInstance(const ClassDef *cd,const ArgumentList &templateArguments,const char *templSpec) = 0;
+ virtual void addMembersToTemplateInstance(const ClassDef *cd,const ArgumentList &templateArguments,const QCString &templSpec) = 0;
virtual void addInnerCompound(const Definition *d) = 0;
- virtual bool addExample(const char *anchor,const char *name, const char *file) = 0;
- virtual void addUsedClass(ClassDef *cd,const char *accessName,Protection prot) = 0;
- virtual void addUsedByClass(ClassDef *cd,const char *accessName,Protection prot) = 0;
+ virtual bool addExample(const QCString &anchor,const QCString &name, const QCString &file) = 0;
+ virtual void addUsedClass(ClassDef *cd,const QCString &accessName,Protection prot) = 0;
+ virtual void addUsedByClass(ClassDef *cd,const QCString &accessName,Protection prot) = 0;
virtual void makeTemplateArgument(bool b=TRUE) = 0;
virtual void mergeCategory(ClassDef *category) = 0;
virtual void findSectionsInDocumentation() = 0;
@@ -445,14 +446,15 @@ class ClassDefMutable : public DefinitionMutable, public ClassDef
virtual void writeMemberPages(OutputList &ol) const = 0;
virtual void writeMemberList(OutputList &ol) const = 0;
virtual void writeDeclaration(OutputList &ol,const MemberDef *md,bool inGroup,
- const ClassDef *inheritedFrom,const char *inheritId) const = 0;
+ const ClassDef *inheritedFrom,const QCString &inheritId) const = 0;
virtual void writeQuickMemberLinks(OutputList &ol,const MemberDef *md) const = 0;
virtual void writeSummaryLinks(OutputList &ol) const = 0;
virtual void writeInlineDocumentation(OutputList &ol) const = 0;
- virtual void writeTagFile(FTextStream &) = 0;
+ virtual void writeTagFile(TextStream &) = 0;
virtual void writeMemberDeclarations(OutputList &ol,ClassDefSet &visitedClasses,
MemberListType lt,const QCString &title,
- const char *subTitle=0,bool showInline=FALSE,const ClassDef *inheritedFrom=0,
+ const QCString &subTitle=QCString(),
+ bool showInline=FALSE,const ClassDef *inheritedFrom=0,
int lt2=-1,bool invert=FALSE,bool showAlways=FALSE) const = 0;
virtual void addGroupedInheritedMembers(OutputList &ol,MemberListType lt,
const ClassDef *inheritedFrom,const QCString &inheritId) const = 0;
@@ -462,9 +464,9 @@ class ClassDefMutable : public DefinitionMutable, public ClassDef
/** Factory method to create a new ClassDef object */
ClassDefMutable *createClassDef(
- const char *fileName,int startLine,int startColumn,
- const char *name,ClassDef::CompoundType ct,
- const char *ref=0,const char *fName=0,
+ const QCString &fileName,int startLine,int startColumn,
+ const QCString &name,ClassDef::CompoundType ct,
+ const QCString &ref=QCString(),const QCString &fName=QCString(),
bool isSymbol=TRUE,bool isJavaEnum=FALSE);
ClassDef *createClassDefAlias(const Definition *newScope,const ClassDef *cd);
@@ -489,11 +491,11 @@ struct UsesClassDef
~UsesClassDef()
{
}
- void addAccessor(const char *s)
+ void addAccessor(const QCString &s)
{
- if (accessors.find(s)==accessors.end())
+ if (accessors.find(s.str())==accessors.end())
{
- accessors.insert(s);
+ accessors.insert(s.str());
}
}
/** Class definition that this relation uses. */
@@ -526,11 +528,11 @@ struct ConstraintClassDef
~ConstraintClassDef()
{
}
- void addAccessor(const char *s)
+ void addAccessor(const QCString &s)
{
- if (accessors.find(s)==accessors.end())
+ if (accessors.find(s.str())==accessors.end())
{
- accessors.insert(s);
+ accessors.insert(s.str());
}
}
/** Class definition that this relation uses. */
diff --git a/src/classlist.cpp b/src/classlist.cpp
index af64478..b4c2412 100644
--- a/src/classlist.cpp
+++ b/src/classlist.cpp
@@ -51,7 +51,7 @@ bool ClassLinkedRefMap::declVisible(const ClassDef::CompoundType *filter) const
}
void ClassLinkedRefMap::writeDeclaration(OutputList &ol,const ClassDef::CompoundType *filter,
- const char *header,bool localNames) const
+ const QCString &header,bool localNames) const
{
static bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
bool found=FALSE;
diff --git a/src/classlist.h b/src/classlist.h
index 709412b..75bc713 100644
--- a/src/classlist.h
+++ b/src/classlist.h
@@ -31,7 +31,7 @@ class ClassLinkedRefMap : public LinkedRefMap<const ClassDef>
{
public:
bool declVisible(const ClassDef::CompoundType *filter=0) const;
- void writeDeclaration(OutputList &ol,const ClassDef::CompoundType *filter,const char *header,bool localNames) const;
+ void writeDeclaration(OutputList &ol,const ClassDef::CompoundType *filter,const QCString &header,bool localNames) const;
void writeDocumentation(OutputList &ol,const Definition * container=0) const;
};
diff --git a/src/cmdmapper.cpp b/src/cmdmapper.cpp
index 264a74b..bc8719a 100644
--- a/src/cmdmapper.cpp
+++ b/src/cmdmapper.cpp
@@ -233,10 +233,10 @@ CommandMap htmlTagMap[] =
Mapper *Mappers::cmdMapper = new Mapper(cmdMap,true);
Mapper *Mappers::htmlTagMapper = new Mapper(htmlTagMap,false);
-int Mapper::map(const char *n)
+int Mapper::map(const QCString &n)
{
- QCString name=n;
- if (name.isEmpty()) return 0;
+ if (n.isEmpty()) return 0;
+ QCString name = n;
if (!m_cs) name=name.lower();
auto it = m_map.find(name.str());
return it!=m_map.end() ? it->second : 0;
diff --git a/src/cmdmapper.h b/src/cmdmapper.h
index 8cbf017..17e17e9 100644
--- a/src/cmdmapper.h
+++ b/src/cmdmapper.h
@@ -18,7 +18,7 @@
#include <map>
#include <string>
-#include <qcstring.h>
+#include "qcstring.h"
struct CommandMap;
@@ -218,7 +218,7 @@ enum HtmlTagType
class Mapper
{
public:
- int map(const char *n);
+ int map(const QCString &n);
QCString find(const int n);
Mapper(const CommandMap *cm,bool caseSensitive);
private:
diff --git a/src/code.h b/src/code.h
index ba24242..be50b27 100644
--- a/src/code.h
+++ b/src/code.h
@@ -1,12 +1,12 @@
/******************************************************************************
*
- *
+ *
*
* Copyright (C) 1997-2015 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
- * documentation under the terms of the GNU General Public License is hereby
- * granted. No representations are made about the suitability of this software
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
@@ -31,11 +31,11 @@ class CCodeParser : public CodeParserInterface
CCodeParser();
virtual ~CCodeParser();
void parseCode(CodeOutputInterface &codeOutIntf,
- const char *scopeName,
+ const QCString &scopeName,
const QCString &input,
SrcLangExt lang,
bool isExampleBlock,
- const char *exampleName=0,
+ const QCString &exampleName=QCString(),
FileDef *fileDef=0,
int startLine=-1,
int endLine=-1,
diff --git a/src/code.l b/src/code.l
index be1f179..ed94853 100644
--- a/src/code.l
+++ b/src/code.l
@@ -34,11 +34,11 @@
#include <vector>
#include <string>
#include <mutex>
+#include <sstream>
#include <stdio.h>
#include <assert.h>
#include <ctype.h>
-#include <qdir.h>
#include "code.h"
#include "entry.h"
@@ -58,6 +58,7 @@
#include "tooltip.h"
#include "scopedtypevariant.h"
#include "symbolresolver.h"
+#include "dir.h"
// Toggle for some debugging info
//#define DBG_CTX(x) fprintf x
@@ -77,7 +78,7 @@ struct ObjCCallCtx
int id;
QCString methodName;
QCString objectTypeOrName;
- QGString comment;
+ TextStream comment;
const ClassDef *objectType;
const MemberDef *objectVar;
const MemberDef *method;
@@ -92,7 +93,7 @@ struct codeYY_state
std::unordered_map< std::string, ScopedTypeVariant > codeClassMap;
QCString curClassName;
- QStrList curClassBases;
+ StringVector curClassBases;
QCString parmType;
QCString parmName;
@@ -182,7 +183,7 @@ struct codeYY_state
SymbolResolver symbolResolver;
};
-static bool isCastKeyword(const QCString &s);
+static bool isCastKeyword(const char *s);
//-------------------------------------------------------------------
#if USE_STATE2STRING
@@ -192,9 +193,10 @@ static const char *stateToString(yyscan_t yyscanner,int state);
static void saveObjCContext(yyscan_t yyscanner);
static void restoreObjCContext(yyscan_t yyscanner);
static void addUsingDirective(yyscan_t yyscanner,const char *name);
-static void pushScope(yyscan_t yyscanner,const char *s);
+static void pushScope(yyscan_t yyscanner,const QCString &s);
static void popScope(yyscan_t yyscanner);
static void setCurrentDoc(yyscan_t yyscanner,const QCString &anchor);
+static void addToSearchIndex(yyscan_t yyscanner,const QCString &text);
static void addToSearchIndex(yyscan_t yyscanner,const char *text);
static void setClassScope(yyscan_t yyscanner,const QCString &name);
static void startCodeLine(yyscan_t yyscanner);
@@ -202,37 +204,41 @@ static void endCodeLine(yyscan_t yyscanner);
static void nextCodeLine(yyscan_t yyscanner);
static void startFontClass(yyscan_t yyscanner,const char *s);
static void endFontClass(yyscan_t yyscanner);
+static void codifyLines(yyscan_t yyscanner,const QCString &text);
static void codifyLines(yyscan_t yyscanner,const char *text);
static void incrementFlowKeyWordCount(yyscan_t yyscanner);
static void writeMultiLineCodeLink(yyscan_t yyscanner,CodeOutputInterface &ol,
const Definition *d,
- const char *text);
+ const QCString &text);
static void addType(yyscan_t yyscanner);
static void addParmType(yyscan_t yyscanner);
static void addUsingDirective(yyscan_t yyscanner,const char *name);
static void setParameterList(yyscan_t yyscanner,const MemberDef *md);
-static const ClassDef *stripClassName(yyscan_t yyscanner,const char *s,const Definition *d);
+static const ClassDef *stripClassName(yyscan_t yyscanner,const QCString &s,const Definition *d);
static const MemberDef *setCallContextForVar(yyscan_t yyscanner,const QCString &name);
static void updateCallContextForSmartPointer(yyscan_t yyscanner);
static bool getLinkInScope(yyscan_t yyscanner,const QCString &c, // scope
const QCString &m, // member
- const char *memberText, // exact text
+ const QCString &memberText, // exact text
CodeOutputInterface &ol,
- const char *text,
+ const QCString &text,
bool varOnly=FALSE
);
-static bool getLink(yyscan_t yyscanner,const char *className,
- const char *memberName,
+static bool getLink(yyscan_t yyscanner,const QCString &className,
+ const QCString &memberName,
CodeOutputInterface &ol,
- const char *text=0,
+ const QCString &text=QCString(),
bool varOnly=FALSE);
+static void generateClassOrGlobalLink(yyscan_t yyscanner,CodeOutputInterface &ol,const QCString &clName,
+ bool typeOnly=FALSE,bool varOnly=FALSE);
static void generateClassOrGlobalLink(yyscan_t yyscanner,CodeOutputInterface &ol,const char *clName,
bool typeOnly=FALSE,bool varOnly=FALSE);
-static bool generateClassMemberLink(yyscan_t yyscanner,CodeOutputInterface &ol,const MemberDef *xmd,const char *memName);
-static bool generateClassMemberLink(yyscan_t yyscanner,CodeOutputInterface &ol,const Definition *def,const char *memName);
+static bool generateClassMemberLink(yyscan_t yyscanner,CodeOutputInterface &ol,const MemberDef *xmd,const QCString &memName);
+static bool generateClassMemberLink(yyscan_t yyscanner,CodeOutputInterface &ol,const Definition *def,const QCString &memName);
static void generateMemberLink(yyscan_t yyscanner,CodeOutputInterface &ol,const QCString &varName,
- const char *memName);
+ const QCString &memName);
static void generatePHPVariableLink(yyscan_t yyscanner,CodeOutputInterface &ol,const char *varName);
+static void generateFunctionLink(yyscan_t yyscanner,CodeOutputInterface &ol,const QCString &funcName);
static void generateFunctionLink(yyscan_t yyscanner,CodeOutputInterface &ol,const char *funcName);
static int countLines(yyscan_t yyscanner);
static void writeObjCMethodCall(yyscan_t yyscanner,ObjCCallCtx *ctx);
@@ -240,7 +246,7 @@ static QCString escapeName(yyscan_t yyscanner,const char *s);
static QCString escapeObject(yyscan_t yyscanner,const char *s);
static QCString escapeWord(yyscan_t yyscanner,const char *s);
static QCString escapeComment(yyscan_t yyscanner,const char *s);
-static bool skipLanguageSpecificKeyword(yyscan_t yyscanner,const QCString &kw);
+static bool skipLanguageSpecificKeyword(yyscan_t yyscanner,const char *kw);
static yy_size_t yyread(yyscan_t yyscanner,char *buf,yy_size_t max_size);
static void addVariable(yyscan_t yyscanner,QCString type,QCString name);
@@ -269,7 +275,7 @@ TEMPLIST "<"[^\"\}\{\(\)\/\n\>]*">"
SCOPETNAME (((({ID}{TEMPLIST}?){BN}*)?{SEP}{BN}*)*)((~{BN}*)?{ID})
SCOPEPREFIX ({ID}{TEMPLIST}?{BN}*{SEP}{BN}*)+
KEYWORD_OBJC ("@public"|"@private"|"@protected"|"@class"|"@implementation"|"@interface"|"@end"|"@selector"|"@protocol"|"@optional"|"@required"|"@throw"|"@synthesize"|"@property")
-KEYWORD ("asm"|"__assume"|"auto"|"class"|"const"|"delete"|"enum"|"explicit"|"extern"|"false"|"friend"|"gcnew"|"gcroot"|"set"|"get"|"inline"|"internal"|"mutable"|"namespace"|"new"|"null"|"nullptr"|"override"|"operator"|"pin_ptr"|"private"|"protected"|"public"|"raise"|"register"|"remove"|"self"|"sizeof"|"static"|"struct"|"__super"|"function"|"template"|"generic"|"this"|"true"|"typedef"|"typeid"|"typename"|"union"|"using"|"virtual"|"volatile"|"abstract"|"final"|"import"|"synchronized"|"transient"|"alignas"|"alignof"|{KEYWORD_OBJC})
+KEYWORD ("asm"|"__assume"|"auto"|"class"|"const"|"delete"|"enum"|"explicit"|"extern"|"false"|"friend"|"gcnew"|"gcroot"|"set"|"get"|"inline"|"internal"|"mutable"|"namespace"|"new"|"null"|"nullptr"|"override"|"operator"|"pin_ptr"|"private"|"protected"|"public"|"raise"|"register"|"remove"|"self"|"sizeof"|"static"|"struct"|"__super"|"function"|"template"|"generic"|"this"|"true"|"typedef"|"typeid"|"typename"|"union"|"using"|"virtual"|"volatile"|"abstract"|"final"|"import"|"synchronized"|"transient"|"alignas"|"alignof"|"concept"|"requires"|{KEYWORD_OBJC})
FLOWKW ("break"|"catch"|"continue"|"default"|"do"|"else"|"finally"|"return"|"switch"|"throw"|"throws"|"@catch"|"@finally")
FLOWCONDITION ("case"|"for"|"foreach"|"for each"|"goto"|"if"|"try"|"while"|"@try")
TYPEKW ("bool"|"byte"|"char"|"double"|"float"|"int"|"long"|"object"|"short"|"signed"|"unsigned"|"void"|"wchar_t"|"size_t"|"boolean"|"id"|"SEL"|"string"|"nullptr")
@@ -361,6 +367,7 @@ ENDQopt ("const"|"volatile"|"sealed"|"override")({BN}+("const"|"volatile"|"seale
%x ObjCSkipStr
%x ObjCCallComment
%x OldStyleArgs
+%x ConceptName
%x UsingName
%x RawString
%x InlineInit
@@ -491,13 +498,13 @@ ENDQopt ("const"|"volatile"|"sealed"|"override")({BN}+("const"|"volatile"|"seale
bool found=FALSE;
const FileDef *fd=findFileDef(Doxygen::inputNameLinkedMap,yytext,ambig);
- //printf("looking for include %s -> %s fd=%p\n",yytext,absPath.data(),fd);
+ //printf("looking for include %s -> %s fd=%p\n",yytext,qPrint(absPath),fd);
if (fd && fd->isLinkable())
{
if (ambig) // multiple input files match the name
{
DBG_CTX((stderr,"===== yes %s is ambiguous\n",yytext));
- QCString name = QDir::cleanDirPath(yytext).utf8();
+ QCString name(Dir::cleanDirPath(yytext));
if (!name.isEmpty() && yyextra->sourceFileDef)
{
const FileName *fn = Doxygen::inputNameLinkedMap->find(name);
@@ -518,7 +525,7 @@ ENDQopt ("const"|"volatile"|"sealed"|"override")({BN}+("const"|"volatile"|"seale
found = TRUE;
}
}
- DBG_CTX((stderr," include file %s found=%d\n",fd ? fd->absFilePath().data() : "<none>",found));
+ DBG_CTX((stderr," include file %s found=%d\n",fd ? qPrint(fd->absFilePath()) : "<none>",found));
if (found)
{
writeMultiLineCodeLink(yyscanner,*yyextra->code,fd,yytext);
@@ -606,7 +613,7 @@ ENDQopt ("const"|"volatile"|"sealed"|"override")({BN}+("const"|"volatile"|"seale
BEGIN(Body);
}
<Body,ClassVar>"@end" {
- DBG_CTX((stderr,"End of objc scope fd=%s\n",yyextra->sourceFileDef->name().data()));
+ DBG_CTX((stderr,"End of objc scope fd=%s\n",qPrint(yyextra->sourceFileDef->name())));
if (yyextra->sourceFileDef)
{
const FileDef *fd=yyextra->sourceFileDef;
@@ -650,7 +657,7 @@ ENDQopt ("const"|"volatile"|"sealed"|"override")({BN}+("const"|"volatile"|"seale
BEGIN( Body );
}
<ClassName,ClassVar>[*&^%]+ {
- yyextra->type=yyextra->curClassName.copy();
+ yyextra->type=yyextra->curClassName;
yyextra->name.resize(0);
yyextra->code->codify(yytext);
BEGIN( Body ); // variable of type struct *
@@ -721,7 +728,7 @@ ENDQopt ("const"|"volatile"|"sealed"|"override")({BN}+("const"|"volatile"|"seale
}
<PackageName>{ID}("."{ID})* {
yyextra->curClassName=substitute(yytext,".","::");
- DBG_CTX((stderr,"found package: %s\n",yyextra->curClassName.data()));
+ DBG_CTX((stderr,"found package: %s\n",qPrint(yyextra->curClassName)));
addType(yyscanner);
codifyLines(yyscanner,yytext);
}
@@ -737,14 +744,14 @@ ENDQopt ("const"|"volatile"|"sealed"|"override")({BN}+("const"|"volatile"|"seale
BEGIN( Bases );
}
<ClassVar>("sealed"|"abstract")/{BN}*(":"|"{") {
- DBG_CTX((stderr,"***** C++/CLI modifier %s on yyextra->curClassName=%s\n",yytext,yyextra->curClassName.data()));
+ DBG_CTX((stderr,"***** C++/CLI modifier %s on yyextra->curClassName=%s\n",yytext,qPrint(yyextra->curClassName)));
startFontClass(yyscanner,"keyword");
codifyLines(yyscanner,yytext);
endFontClass(yyscanner);
BEGIN( CppCliTypeModifierFollowup );
}
<ClassVar>{ID} {
- yyextra->type = yyextra->curClassName.copy();
+ yyextra->type = yyextra->curClassName;
yyextra->name = yytext;
if (yyextra->insideBody)
{
@@ -764,7 +771,7 @@ ENDQopt ("const"|"volatile"|"sealed"|"override")({BN}+("const"|"volatile"|"seale
yyextra->code->codify(yytext);
if (YY_START==ClassVar && yyextra->curClassName.isEmpty())
{
- yyextra->curClassName = yyextra->name.copy();
+ yyextra->curClassName = yyextra->name;
}
if (yyextra->searchingForBody)
{
@@ -777,14 +784,13 @@ ENDQopt ("const"|"volatile"|"sealed"|"override")({BN}+("const"|"volatile"|"seale
DBG_CTX((stderr,"** scope stack push CLASSBLOCK\n"));
yyextra->scopeStack.push(CLASSBLOCK);
pushScope(yyscanner,yyextra->curClassName);
- DBG_CTX((stderr,"***** yyextra->curClassName=%s\n",yyextra->curClassName.data()));
+ DBG_CTX((stderr,"***** yyextra->curClassName=%s\n",qPrint(yyextra->curClassName)));
if (yyextra->symbolResolver.resolveClass(yyextra->currentDefinition,yyextra->curClassName)==0)
{
- DBG_CTX((stderr,"Adding new class %s\n",yyextra->curClassName.data()));
+ DBG_CTX((stderr,"Adding new class %s\n",qPrint(yyextra->curClassName)));
ScopedTypeVariant var(yyextra->curClassName);
// insert base classes.
- char *s=yyextra->curClassBases.first();
- while (s)
+ for (const auto &s : yyextra->curClassBases)
{
const ClassDef *bcd=0;
auto it = yyextra->codeClassMap.find(s);
@@ -792,12 +798,11 @@ ENDQopt ("const"|"volatile"|"sealed"|"override")({BN}+("const"|"volatile"|"seale
{
bcd = toClassDef(it->second.globalDef());
}
- if (bcd==0) bcd=yyextra->symbolResolver.resolveClass(yyextra->currentDefinition,s);
+ if (bcd==0) bcd=yyextra->symbolResolver.resolveClass(yyextra->currentDefinition,QCString(s));
if (bcd && bcd->name()!=yyextra->curClassName)
{
var.localDef()->insertBaseClass(bcd->name());
}
- s=yyextra->curClassBases.next();
}
yyextra->codeClassMap.emplace(std::make_pair(yyextra->curClassName.str(),std::move(var)));
}
@@ -818,8 +823,8 @@ ENDQopt ("const"|"volatile"|"sealed"|"override")({BN}+("const"|"volatile"|"seale
endFontClass(yyscanner);
}
<Bases>{SEP}?({ID}{SEP})*{ID} {
- DBG_CTX((stderr,"%s:addBase(%s)\n",yyextra->curClassName.data(),yytext));
- yyextra->curClassBases.inSort(yytext);
+ DBG_CTX((stderr,"%s:addBase(%s)\n",qPrint(yyextra->curClassName),yytext));
+ yyextra->curClassBases.push_back(yytext);
generateClassOrGlobalLink(yyscanner,*yyextra->code,yytext);
}
<Bases>"<" {
@@ -909,12 +914,23 @@ ENDQopt ("const"|"volatile"|"sealed"|"override")({BN}+("const"|"volatile"|"seale
yyextra->insideTemplate=TRUE;
yyextra->sharpCount=0;
}
+<Body>"concept"{BN}+ {
+ startFontClass(yyscanner,"keyword");
+ codifyLines(yyscanner,yytext);
+ endFontClass(yyscanner);
+ BEGIN(ConceptName);
+ }
<Body>"using"{BN}+"namespace"{BN}+ {
startFontClass(yyscanner,"keyword");
codifyLines(yyscanner,yytext);
endFontClass(yyscanner);
BEGIN(UsingName);
}
+<ConceptName>{ID}("::"{ID})* {
+ addUsingDirective(yyscanner,yytext);
+ generateClassOrGlobalLink(yyscanner,*yyextra->code,yytext);
+ }
+<ConceptName>"=" { codifyLines(yyscanner,yytext); BEGIN(Body); }
<UsingName>{ID}("::"{ID})* {
addUsingDirective(yyscanner,yytext);
generateClassOrGlobalLink(yyscanner,*yyextra->code,yytext);
@@ -1121,7 +1137,6 @@ ENDQopt ("const"|"volatile"|"sealed"|"override")({BN}+("const"|"volatile"|"seale
<Body>{SCOPENAME}/{BN}*[:;,)\]] { // "int var;" or "var, var2" or "debug(f) macro" , or int var : 5;
addType(yyscanner);
// changed this to generateFunctionLink, see bug 624514
- //generateClassOrGlobalLink(yyscanner,*yyextra->code,yytext,FALSE,TRUE);
generateFunctionLink(yyscanner,*yyextra->code,yytext);
yyextra->name+=yytext;
}
@@ -1152,11 +1167,11 @@ ENDQopt ("const"|"volatile"|"sealed"|"override")({BN}+("const"|"volatile"|"seale
BEGIN( FuncCall );
}
<FuncCall,Body,MemberCall,MemberCall2,SkipInits,InlineInit>{RAWBEGIN} {
- QCString text=yytext;
+ QCString text(yytext);
uint i=(uint)text.find('R');
yyextra->code->codify(text.left(i+1));
startFontClass(yyscanner,"stringliteral");
- yyextra->code->codify(yytext+i+1);
+ yyextra->code->codify(QCString(yytext+i+1));
yyextra->lastStringContext=YY_START;
yyextra->inForEachExpression = FALSE;
yyextra->delimiter = yytext+i+2;
@@ -1205,7 +1220,7 @@ ENDQopt ("const"|"volatile"|"sealed"|"override")({BN}+("const"|"volatile"|"seale
}
<RawString>{RAWEND} {
yyextra->code->codify(yytext);
- QCString delimiter = yytext+1;
+ QCString delimiter(yytext+1);
delimiter=delimiter.left(delimiter.length()-1);
if (delimiter==yyextra->delimiter)
{
@@ -1296,7 +1311,7 @@ ENDQopt ("const"|"volatile"|"sealed"|"override")({BN}+("const"|"volatile"|"seale
<MemberCall>{SCOPENAME}/{B}* {
if (yyextra->theCallContext.getScope().globalDef())
{
- DBG_CTX((stderr,"yyextra->theCallContext.getClass()=%p\n",yyextra->theCallContext.getScope().globalDef()));
+ DBG_CTX((stderr,"yyextra->theCallContext.getClass()=%p\n",(void*)yyextra->theCallContext.getScope().globalDef()));
if (!generateClassMemberLink(yyscanner,*yyextra->code,yyextra->theCallContext.getScope().globalDef(),yytext))
{
yyextra->code->codify(yytext);
@@ -1335,15 +1350,15 @@ ENDQopt ("const"|"volatile"|"sealed"|"override")({BN}+("const"|"volatile"|"seale
else
{
yyextra->code->codify(yytext);
- yyextra->saveName = yyextra->name.copy();
- yyextra->saveType = yyextra->type.copy();
+ yyextra->saveName = yyextra->name;
+ yyextra->saveType = yyextra->type;
if (*yytext!='[' && !yyextra->type.isEmpty())
{
//printf("yyextra->scopeStack.bottom()=%p\n",yyextra->scopeStack.bottom());
//if (yyextra->scopeStack.top()!=CLASSBLOCK) // commented out for bug731363
{
//printf("AddVariable: '%s' '%s' context=%d\n",
- // yyextra->type.data(),yyextra->name.data(),yyextra->theVarContext.count());
+ // qPrint(yyextra->type),qPrint(yyextra->name),yyextra->theVarContext.count());
addVariable(yyscanner,yyextra->type,yyextra->name);
}
yyextra->name.resize(0);
@@ -1362,52 +1377,6 @@ ENDQopt ("const"|"volatile"|"sealed"|"override")({BN}+("const"|"volatile"|"seale
yyextra->parmName.resize(0);
}
}
- /*
-<ObjCMemberCall>{ID} {
- if (qstrcmp(yytext,"self")==0 || qstrcmp(yytext,"super")==0)
- {
- // TODO: get proper base class for "super"
- yyextra->theCallContext.setClass(getClass(yyextra->curClassName));
- startFontClass(yyscanner,"keyword");
- yyextra->code->codify(yytext);
- endFontClass(yyscanner);
- }
- else
- {
- generateClassOrGlobalLink(yyscanner,*yyextra->code,yytext);
- }
- yyextra->name.resize(0);
- BEGIN(ObjCMemberCall2);
- }
-<ObjCMemberCall>"[" {
- yyextra->code->codify(yytext);
- yyextra->theCallContext.pushScope(yyscanner,yyextra->name, yyextra->type);
- }
-<ObjCMemberCall2>{ID}":"? {
- yyextra->name+=yytext;
- if (yyextra->theCallContext.getClass())
- {
- DBG_CTX((stderr,"Calling method %s\n",yyextra->name.data()));
- if (!generateClassMemberLink(yyscanner,*yyextra->code,yyextra->theCallContext.getClass(),yyextra->name))
- {
- yyextra->code->codify(yytext);
- addToSearchIndex(yyscanner,yyextra->name);
- }
- }
- else
- {
- yyextra->code->codify(yytext);
- addToSearchIndex(yyscanner,yyextra->name);
- }
- yyextra->name.resize(0);
- BEGIN(ObjCMemberCall3);
- }
-<ObjCMemberCall2,ObjCMemberCall3>"]" {
- yyextra->theCallContext.popScope(yyextra->name, yyextra->type);
- yyextra->code->codify(yytext);
- BEGIN(Body);
- }
- */
<ObjCCall,ObjCMName>"["|"{" {
saveObjCContext(yyscanner);
yyextra->currentCtx->format+=*yytext;
@@ -1437,24 +1406,25 @@ ENDQopt ("const"|"volatile"|"sealed"|"override")({BN}+("const"|"volatile"|"seale
}
<ObjCCall,ObjCMName>{CCS} {
yyextra->lastObjCCallContext = YY_START;
- yyextra->currentCtx->comment=yytext;
+ yyextra->currentCtx->comment.str(yytext);
BEGIN(ObjCCallComment);
}
<ObjCCallComment>{CCE} {
- yyextra->currentCtx->comment+=yytext;
- yyextra->currentCtx->format+=escapeComment(yyscanner,yyextra->currentCtx->comment);
+ yyextra->currentCtx->comment << yytext;
+ std::string commentStr = yyextra->currentCtx->comment.str();
+ yyextra->currentCtx->format+=escapeComment(yyscanner,commentStr.c_str());
BEGIN(yyextra->lastObjCCallContext);
}
-<ObjCCallComment>[^*\n]+ { yyextra->currentCtx->comment+=yytext; }
-<ObjCCallComment>{CPPC}|{CCS} { yyextra->currentCtx->comment+=yytext; }
-<ObjCCallComment>\n { yyextra->currentCtx->comment+=*yytext; }
-<ObjCCallComment>. { yyextra->currentCtx->comment+=*yytext; }
+<ObjCCallComment>[^*\n]+ { yyextra->currentCtx->comment << yytext; }
+<ObjCCallComment>{CPPC}|{CCS} { yyextra->currentCtx->comment << yytext; }
+<ObjCCallComment>\n { yyextra->currentCtx->comment << *yytext; }
+<ObjCCallComment>. { yyextra->currentCtx->comment << *yytext; }
<ObjCCall>{ID} {
yyextra->currentCtx->format+=escapeObject(yyscanner,yytext);
if (yyextra->braceCount==0)
{
yyextra->currentCtx->objectTypeOrName=yytext;
- DBG_CTX((stderr,"new type=%s\n",yyextra->currentCtx->objectTypeOrName.data()));
+ DBG_CTX((stderr,"new type=%s\n",qPrint(yyextra->currentCtx->objectTypeOrName)));
BEGIN(ObjCMName);
}
}
@@ -1502,8 +1472,8 @@ ENDQopt ("const"|"volatile"|"sealed"|"override")({BN}+("const"|"volatile"|"seale
yyextra->theCallContext.popScope(yyextra->name, yyextra->type);
yyextra->code->codify(yytext);
// TODO: nested arrays like: a[b[0]->func()]->func()
- yyextra->name = yyextra->saveName.copy();
- yyextra->type = yyextra->saveType.copy();
+ yyextra->name = yyextra->saveName;
+ yyextra->type = yyextra->saveType;
}
<Body>[0-9]+ {
yyextra->code->codify(yytext);
@@ -1627,7 +1597,7 @@ ENDQopt ("const"|"volatile"|"sealed"|"override")({BN}+("const"|"volatile"|"seale
<MemberCall,MemberCall2,FuncCall>("*"{B}*)?")" {
if (yytext[0]==')') // no a pointer cast
{
- DBG_CTX((stderr,"addVariable(%s,%s)\n",yyextra->parmType.data(),yyextra->parmName.data()));
+ DBG_CTX((stderr,"addVariable(%s,%s)\n",qPrint(yyextra->parmType),qPrint(yyextra->parmName)));
if (yyextra->parmType.isEmpty())
{
yyextra->parmType=yyextra->parmName;
@@ -1667,7 +1637,7 @@ ENDQopt ("const"|"volatile"|"sealed"|"override")({BN}+("const"|"volatile"|"seale
if (*yytext==';') yyextra->searchingForBody=FALSE;
if (!yyextra->type.isEmpty())
{
- DBG_CTX((stderr,"add variable yyextra->type=%s yyextra->name=%s)\n",yyextra->type.data(),yyextra->name.data()));
+ DBG_CTX((stderr,"add variable yyextra->type=%s yyextra->name=%s)\n",qPrint(yyextra->type),qPrint(yyextra->name)));
addVariable(yyscanner,yyextra->type,yyextra->name);
}
yyextra->parmType.resize(0);yyextra->parmName.resize(0);
@@ -1701,11 +1671,11 @@ ENDQopt ("const"|"volatile"|"sealed"|"override")({BN}+("const"|"volatile"|"seale
//yyextra->theCallContext.popScope(yyextra->name, yyextra->type);
yyextra->parmType.resize(0);yyextra->parmName.resize(0);
int index = yyextra->name.findRev("::");
- DBG_CTX((stderr,"yyextra->name=%s\n",yyextra->name.data()));
+ DBG_CTX((stderr,"yyextra->name=%s\n",qPrint(yyextra->name)));
if (index!=-1)
{
QCString scope = yyextra->name.left((uint)index);
- if (!yyextra->classScope.isEmpty()) scope.prepend(yyextra->classScope+"::");
+ if (!yyextra->classScope.isEmpty()) scope.prepend((yyextra->classScope+"::"));
const ClassDef *cd=yyextra->symbolResolver.resolveClass(Doxygen::globalScope,scope);
if (cd)
{
@@ -1753,6 +1723,11 @@ ENDQopt ("const"|"volatile"|"sealed"|"override")({BN}+("const"|"volatile"|"seale
endFontClass(yyscanner);
yyextra->inFunctionTryBlock=TRUE;
}
+<CallEnd>"requires" { // function-try-block
+ startFontClass(yyscanner,"keyword");
+ yyextra->code->codify(yytext);
+ endFontClass(yyscanner);
+ }
<CallEnd>{ID} {
if (yyextra->insideBody || !yyextra->parmType.isEmpty())
{
@@ -1819,12 +1794,12 @@ ENDQopt ("const"|"volatile"|"sealed"|"override")({BN}+("const"|"volatile"|"seale
BEGIN( Body );
}
<SkipInits>{ID}{B}*"{" {
- QCString text = yytext;
+ QCString text(yytext);
int bracketPos = text.find('{');
int spacePos = text.find(' ');
int len = spacePos==-1 ? bracketPos : spacePos;
generateClassOrGlobalLink(yyscanner,*yyextra->code,text.left(len));
- yyextra->code->codify(yytext+len);
+ yyextra->code->codify(QCString(yytext+len));
}
<SkipInits>{ID} {
generateClassOrGlobalLink(yyscanner,*yyextra->code,yytext);
@@ -2196,7 +2171,7 @@ ENDQopt ("const"|"volatile"|"sealed"|"override")({BN}+("const"|"volatile"|"seale
static void addVariable(yyscan_t yyscanner,QCString type,QCString name)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
- DBG_CTX((stderr,"VariableContext::addVariable(%s,%s)\n",type.data(),name.data()));
+ DBG_CTX((stderr,"VariableContext::addVariable(%s,%s)\n",qPrint(type),qPrint(name)));
QCString ltype = type.simplifyWhiteSpace();
QCString lname = name.simplifyWhiteSpace();
if (ltype.left(7)=="struct ")
@@ -2209,11 +2184,11 @@ static void addVariable(yyscan_t yyscanner,QCString type,QCString name)
}
if (ltype.isEmpty() || lname.isEmpty()) return;
DBG_CTX((stderr,"** addVariable trying: type='%s' name='%s' currentDefinition=%s\n",
- ltype.data(),lname.data(),yyextra->currentDefinition?yyextra->currentDefinition->name().data():"<none>"));
+ qPrint(ltype),qPrint(lname),yyextra->currentDefinition?qPrint(yyextra->currentDefinition->name()):"<none>"));
auto it = yyextra->codeClassMap.find(ltype.str());
if (it!=yyextra->codeClassMap.end()) // look for class definitions inside the code block
{
- DBG_CTX((stderr,"** addVariable type='%s' name='%s'\n",ltype.data(),lname.data()));
+ DBG_CTX((stderr,"** addVariable type='%s' name='%s'\n",qPrint(ltype),qPrint(lname)));
yyextra->theVarContext.addVariable(lname,std::move(it->second)); // add it to a list
}
else
@@ -2222,7 +2197,7 @@ static void addVariable(yyscan_t yyscanner,QCString type,QCString name)
int i=0;
if (varDef)
{
- DBG_CTX((stderr,"** addVariable type='%s' name='%s'\n",ltype.data(),lname.data()));
+ DBG_CTX((stderr,"** addVariable type='%s' name='%s'\n",qPrint(ltype),qPrint(lname)));
yyextra->theVarContext.addVariable(lname,ScopedTypeVariant(varDef)); // add it to a list
}
else if ((i=ltype.find('<'))!=-1)
@@ -2237,7 +2212,7 @@ static void addVariable(yyscan_t yyscanner,QCString type,QCString name)
// is hidden to avoid false links to global variables with the same name
// TODO: make this work for namespaces as well!
{
- DBG_CTX((stderr,"** addVariable: dummy context for '%s'\n",lname.data()));
+ DBG_CTX((stderr,"** addVariable: dummy context for '%s'\n",qPrint(lname)));
yyextra->theVarContext.addVariable(lname,ScopedTypeVariant());
}
else
@@ -2251,7 +2226,7 @@ static void addVariable(yyscan_t yyscanner,QCString type,QCString name)
//-------------------------------------------------------------------
/*! add class/namespace name s to the scope */
-static void pushScope(yyscan_t yyscanner,const char *s)
+static void pushScope(yyscan_t yyscanner,const QCString &s)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
yyextra->classScopeLengthStack.push(int(yyextra->classScope.length()));
@@ -2264,7 +2239,7 @@ static void pushScope(yyscan_t yyscanner,const char *s)
yyextra->classScope += "::";
yyextra->classScope += s;
}
- DBG_CTX((stderr,"pushScope(%s) result: '%s'\n",s,yyextra->classScope.data()));
+ DBG_CTX((stderr,"pushScope(%s) result: '%s'\n",qPrint(s),qPrint(yyextra->classScope)));
}
@@ -2282,7 +2257,7 @@ static void popScope(yyscan_t yyscanner)
{
//err("Too many end of scopes found!\n");
}
- DBG_CTX((stderr,"popScope() result: '%s'\n",yyextra->classScope.data()));
+ DBG_CTX((stderr,"popScope() result: '%s'\n",qPrint(yyextra->classScope)));
}
static void setCurrentDoc(yyscan_t yyscanner,const QCString &anchor)
@@ -2302,7 +2277,7 @@ static void setCurrentDoc(yyscan_t yyscanner,const QCString &anchor)
}
}
-static void addToSearchIndex(yyscan_t yyscanner,const char *text)
+static void addToSearchIndex(yyscan_t yyscanner,const QCString &text)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
if (Doxygen::searchIndex)
@@ -2312,10 +2287,16 @@ static void addToSearchIndex(yyscan_t yyscanner,const char *text)
}
}
+static void addToSearchIndex(yyscan_t yyscanner,const char *text)
+{
+ addToSearchIndex(yyscanner,QCString(text));
+}
+
+
static void setClassScope(yyscan_t yyscanner,const QCString &name)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
- DBG_CTX((stderr,"setClassScope(%s)\n",name.data()));
+ DBG_CTX((stderr,"setClassScope(%s)\n",qPrint(name)));
QCString n=name;
n=n.simplifyWhiteSpace();
int ts=n.find('<'); // start of template
@@ -2338,7 +2319,7 @@ static void setClassScope(yyscan_t yyscanner,const QCString &name)
n = n.mid(i+2);
}
pushScope(yyscanner,n);
- DBG_CTX((stderr,"--->New class scope '%s'\n",yyextra->classScope.data()));
+ DBG_CTX((stderr,"--->New class scope '%s'\n",qPrint(yyextra->classScope)));
}
/*! start a new line of code, inserting a line number if yyextra->sourceFileDef
@@ -2356,7 +2337,7 @@ static void startCodeLine(yyscan_t yyscanner)
//lineAnchor.sprintf("l%05d",yyextra->yyLineNr);
const Definition *d = yyextra->sourceFileDef->getSourceDefinition(yyextra->yyLineNr);
- DBG_CTX((stderr,"%s:startCodeLine(%d)=%p\n",yyextra->sourceFileDef->name().data(),yyextra->yyLineNr,d));
+ DBG_CTX((stderr,"%s:startCodeLine(%d)=%p\n",qPrint(yyextra->sourceFileDef->name()),yyextra->yyLineNr,(void*)d));
if (!yyextra->includeCodeFragment && d)
{
yyextra->currentDefinition = d;
@@ -2370,7 +2351,7 @@ static void startCodeLine(yyscan_t yyscanner)
yyextra->args.resize(0);
yyextra->parmType.resize(0);
yyextra->parmName.resize(0);
- DBG_CTX((stderr,"Real scope: '%s'\n",yyextra->realScope.data()));
+ DBG_CTX((stderr,"Real scope: '%s'\n",qPrint(yyextra->realScope)));
yyextra->bodyCurlyCount = 0;
QCString lineAnchor;
lineAnchor.sprintf("l%05d",yyextra->yyLineNr);
@@ -2378,27 +2359,28 @@ static void startCodeLine(yyscan_t yyscanner)
{
yyextra->code->writeLineNumber(yyextra->currentMemberDef->getReference(),
yyextra->currentMemberDef->getOutputFileBase(),
- yyextra->currentMemberDef->anchor(),yyextra->yyLineNr);
+ yyextra->currentMemberDef->anchor(),
+ yyextra->yyLineNr);
setCurrentDoc(yyscanner,lineAnchor);
}
else if (d->isLinkableInProject())
{
yyextra->code->writeLineNumber(d->getReference(),
d->getOutputFileBase(),
- 0,yyextra->yyLineNr);
+ QCString(),yyextra->yyLineNr);
setCurrentDoc(yyscanner,lineAnchor);
}
}
else
{
- yyextra->code->writeLineNumber(0,0,0,yyextra->yyLineNr);
+ yyextra->code->writeLineNumber(QCString(),QCString(),QCString(),yyextra->yyLineNr);
}
}
DBG_CTX((stderr,"startCodeLine(%d)\n",yyextra->yyLineNr));
yyextra->code->startCodeLine(yyextra->sourceFileDef && yyextra->lineNumbers);
if (yyextra->currentFontClass)
{
- yyextra->code->startFontClass(yyextra->currentFontClass);
+ yyextra->code->startFontClass(QCString(yyextra->currentFontClass));
}
}
@@ -2427,11 +2409,12 @@ static void nextCodeLine(yyscan_t yyscanner)
/*! write a code fragment 'text' that may span multiple lines, inserting
* line numbers for each line.
*/
-static void codifyLines(yyscan_t yyscanner,const char *text)
+static void codifyLines(yyscan_t yyscanner,const QCString &text)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
- DBG_CTX((stderr,"codifyLines(%d,\"%s\")\n",yyextra->yyLineNr,text));
- const char *p=text,*sp=p;
+ DBG_CTX((stderr,"codifyLines(%d,\"%s\")\n",yyextra->yyLineNr,qPrint(text)));
+ if (text.isEmpty()) return;
+ const char *p=text.data(),*sp=p;
char c;
bool done=FALSE;
while (!done)
@@ -2446,18 +2429,23 @@ static void codifyLines(yyscan_t yyscanner,const char *text)
char *tmp = (char*)malloc(l+1);
memcpy(tmp,sp,l);
tmp[l]='\0';
- yyextra->code->codify(tmp);
+ yyextra->code->codify(QCString(tmp));
free(tmp);
nextCodeLine(yyscanner);
}
else
{
- yyextra->code->codify(sp);
+ yyextra->code->codify(QCString(sp));
done=TRUE;
}
}
}
+static void codifyLines(yyscan_t yyscanner,const char *text)
+{
+ codifyLines(yyscanner,QCString(text));
+}
+
static void incrementFlowKeyWordCount(yyscan_t yyscanner)
{
std::lock_guard<std::mutex> lock(g_countFlowKeywordsMutex);
@@ -2478,7 +2466,7 @@ static void incrementFlowKeyWordCount(yyscan_t yyscanner)
*/
static void writeMultiLineCodeLink(yyscan_t yyscanner,CodeOutputInterface &ol,
const Definition *d,
- const char *text)
+ const QCString &text)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
bool sourceTooltips = Config_getBool(SOURCE_TOOLTIPS);
@@ -2492,24 +2480,23 @@ static void writeMultiLineCodeLink(yyscan_t yyscanner,CodeOutputInterface &ol,
tooltip = d->briefDescriptionAsTooltip();
}
bool done=FALSE;
- char *p=(char *)text;
+ const char *p=text.data();
while (!done)
{
- char *sp=p;
+ const char *sp=p;
char c;
while ((c=*p++) && c!='\n') { }
if (c=='\n')
{
yyextra->yyLineNr++;
- *(p-1)='\0';
- DBG_CTX((stderr,"writeCodeLink(%s,%s,%s,%s)\n",ref,file,anchor,sp));
- ol.writeCodeLink(ref,file,anchor,sp,tooltip);
+ DBG_CTX((stderr,"writeCodeLink(%s,%s,%s,%s)\n",qPrint(ref),qPrint(file),qPrint(anchor),qPrint(QCString(sp,p-sp-1))));
+ ol.writeCodeLink(ref,file,anchor,QCString(sp,p-sp-1),tooltip);
nextCodeLine(yyscanner);
}
else
{
- DBG_CTX((stderr,"writeCodeLink(%s,%s,%s,%s)\n",ref,file,anchor,sp));
- ol.writeCodeLink(ref,file,anchor,sp,tooltip);
+ DBG_CTX((stderr,"writeCodeLink(%s,%s,%s,%s)\n",qPrint(ref),qPrint(file),qPrint(anchor),sp));
+ ol.writeCodeLink(ref,file,anchor,QCString(sp),tooltip);
done=TRUE;
}
}
@@ -2552,7 +2539,7 @@ static void addUsingDirective(yyscan_t yyscanner,const char *name)
static void setParameterList(yyscan_t yyscanner,const MemberDef *md)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
- yyextra->classScope = md->getClassDef() ? md->getClassDef()->name().data() : "";
+ yyextra->classScope = md->getClassDef() ? md->getClassDef()->name() : QCString();
for (const Argument &a : md->argumentList())
{
yyextra->parmName = a.name;
@@ -2567,7 +2554,7 @@ static void setParameterList(yyscan_t yyscanner,const MemberDef *md)
}
}
-static const ClassDef *stripClassName(yyscan_t yyscanner,const char *s,const Definition *d)
+static const ClassDef *stripClassName(yyscan_t yyscanner,const QCString &s,const Definition *d)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
int pos=0;
@@ -2586,7 +2573,7 @@ static const ClassDef *stripClassName(yyscan_t yyscanner,const char *s,const Def
{
cd=yyextra->symbolResolver.resolveClass(d,clName);
}
- DBG_CTX((stderr,"stripClass trying '%s' = %p\n",clName.data(),cd));
+ DBG_CTX((stderr,"stripClass trying '%s' = %p\n",qPrint(clName),(void*)cd));
if (cd)
{
return cd;
@@ -2600,21 +2587,21 @@ static const MemberDef *setCallContextForVar(yyscan_t yyscanner,const QCString &
{
if (name.isEmpty()) return 0;
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
- DBG_CTX((stderr,"setCallContextForVar(%s) yyextra->classScope=%s\n",name.data(),yyextra->classScope.data()));
+ DBG_CTX((stderr,"setCallContextForVar(%s) yyextra->classScope=%s\n",qPrint(name),qPrint(yyextra->classScope)));
int scopeEnd = name.findRev("::");
if (scopeEnd!=-1) // name with explicit scope
{
QCString scope = name.left(scopeEnd);
QCString locName = name.right(name.length()-scopeEnd-2);
- DBG_CTX((stderr,"explicit scope: name=%s scope=%s\n",locName.data(),scope.data()));
+ DBG_CTX((stderr,"explicit scope: name=%s scope=%s\n",qPrint(locName),qPrint(scope)));
const ClassDef *mcd = getClass(scope);
if (mcd && !locName.isEmpty())
{
const MemberDef *md=mcd->getMemberByName(locName);
if (md)
{
- DBG_CTX((stderr,"name=%s scope=%s\n",locName.data(),scope.data()));
+ DBG_CTX((stderr,"name=%s scope=%s\n",qPrint(locName),qPrint(scope)));
yyextra->theCallContext.setScope(ScopedTypeVariant(stripClassName(yyscanner,md->typeString(),md->getOuterScope())));
return md;
}
@@ -2627,7 +2614,7 @@ static const MemberDef *setCallContextForVar(yyscan_t yyscanner,const QCString &
const MemberDef *md=mnd->getMemberByName(locName);
if (md)
{
- DBG_CTX((stderr,"name=%s scope=%s\n",locName.data(),scope.data()));
+ DBG_CTX((stderr,"name=%s scope=%s\n",qPrint(locName),qPrint(scope)));
yyextra->theCallContext.setScope(ScopedTypeVariant(stripClassName(yyscanner,md->typeString(),md->getOuterScope())));
return md;
}
@@ -2642,25 +2629,25 @@ static const MemberDef *setCallContextForVar(yyscan_t yyscanner,const QCString &
DBG_CTX((stderr,"local variable?\n"));
if (mcv->type()!=ScopedTypeVariant::Dummy) // locally found variable
{
- DBG_CTX((stderr,"local var '%s' mcd=%s\n",name.data(),mcv->name().data()));
+ DBG_CTX((stderr,"local var '%s' mcd=%s\n",qPrint(name),qPrint(mcv->name())));
yyextra->theCallContext.setScope(*mcv);
}
}
else
{
- DBG_CTX((stderr,"class member? scope=%s\n",yyextra->classScope.data()));
+ DBG_CTX((stderr,"class member? scope=%s\n",qPrint(yyextra->classScope)));
// look for a class member
const ClassDef *mcd = getClass(yyextra->classScope);
if (mcd)
{
- DBG_CTX((stderr,"Inside class %s\n",mcd->name().data()));
+ DBG_CTX((stderr,"Inside class %s\n",qPrint(mcd->name())));
const MemberDef *md=mcd->getMemberByName(name);
if (md)
{
- DBG_CTX((stderr,"Found member %s\n",md->name().data()));
+ DBG_CTX((stderr,"Found member %s\n",qPrint(md->name())));
if (yyextra->scopeStack.empty() || yyextra->scopeStack.top()!=CLASSBLOCK)
{
- DBG_CTX((stderr,"class member '%s' mcd=%s\n",name.data(),mcd->name().data()));
+ DBG_CTX((stderr,"class member '%s' mcd=%s\n",qPrint(name),qPrint(mcd->name())));
yyextra->theCallContext.setScope(ScopedTypeVariant(stripClassName(yyscanner,md->typeString(),md->getOuterScope())));
}
return md;
@@ -2671,7 +2658,7 @@ static const MemberDef *setCallContextForVar(yyscan_t yyscanner,const QCString &
// look for a global member
if ((mn=Doxygen::functionNameLinkedMap->find(name)))
{
- DBG_CTX((stderr,"global var '%s'\n",name.data()));
+ DBG_CTX((stderr,"global var '%s'\n",qPrint(name)));
if (mn->size()==1) // global defined only once
{
const std::unique_ptr<MemberDef> &md=mn->front();
@@ -2696,7 +2683,7 @@ static const MemberDef *setCallContextForVar(yyscan_t yyscanner,const QCString &
if (!md->isStatic() || md->getBodyDef()==yyextra->sourceFileDef)
{
yyextra->theCallContext.setScope(ScopedTypeVariant(stripClassName(yyscanner,md->typeString(),md->getOuterScope())));
- DBG_CTX((stderr,"returning member %s in source file %s\n",md->name().data(),yyextra->sourceFileDef->name().data()));
+ DBG_CTX((stderr,"returning member %s in source file %s\n",qPrint(md->name()),qPrint(yyextra->sourceFileDef->name())));
return md.get();
}
}
@@ -2710,7 +2697,7 @@ static void updateCallContextForSmartPointer(yyscan_t yyscanner)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
const Definition *d = yyextra->theCallContext.getScope().globalDef();
- //printf("updateCallContextForSmartPointer() cd=%s\n",cd ? d->name().data() : "<none>");
+ //printf("updateCallContextForSmartPointer() cd=%s\n",cd ? qPrint(d->name()) : "<none>");
const MemberDef *md;
if (d && d->definitionType()==Definition::TypeClass && (md=(toClassDef(d))->isSmartPointer()))
{
@@ -2718,7 +2705,7 @@ static void updateCallContextForSmartPointer(yyscan_t yyscanner)
if (ncd)
{
yyextra->theCallContext.setScope(ScopedTypeVariant(ncd));
- //printf("Found smart pointer call %s->%s!\n",cd->name().data(),ncd->name().data());
+ //printf("Found smart pointer call %s->%s!\n",qPrint(cd->name()),qPrint(ncd->name()));
}
}
}
@@ -2726,9 +2713,9 @@ static void updateCallContextForSmartPointer(yyscan_t yyscanner)
static bool getLinkInScope(yyscan_t yyscanner,
const QCString &c, // scope
const QCString &m, // member
- const char *memberText, // exact text
+ const QCString &memberText, // exact text
CodeOutputInterface &ol,
- const char *text,
+ const QCString &text,
bool varOnly
)
{
@@ -2738,20 +2725,20 @@ static bool getLinkInScope(yyscan_t yyscanner,
const FileDef *fd = 0;
const NamespaceDef *nd = 0;
const GroupDef *gd = 0;
- DBG_CTX((stderr,"getLinkInScope: trying '%s'::'%s' varOnly=%d\n",c.data(),m.data(),varOnly));
+ DBG_CTX((stderr,"getLinkInScope: trying '%s'::'%s' varOnly=%d\n",qPrint(c),qPrint(m),varOnly));
if (getDefs(c,m,"()",md,cd,fd,nd,gd,FALSE,yyextra->sourceFileDef,FALSE) &&
(!varOnly || md->isVariable()))
{
if (md->isLinkable())
{
- DBG_CTX((stderr,"found it %s!\n",md->qualifiedName().data()));
+ DBG_CTX((stderr,"found it %s!\n",qPrint(md->qualifiedName())));
if (yyextra->exampleBlock)
{
std::lock_guard<std::mutex> lock(g_addExampleMutex);
QCString anchor;
anchor.sprintf("a%d",yyextra->anchorCount);
- DBG_CTX((stderr,"addExampleFile(%s,%s,%s)\n",anchor.data(),yyextra->exampleName.data(),
- yyextra->exampleFile.data()));
+ DBG_CTX((stderr,"addExampleFile(%s,%s,%s)\n",qPrint(anchor),qPrint(yyextra->exampleName),
+ qPrint(yyextra->exampleFile)));
MemberDefMutable *mdm = toMemberDefMutable(md);
if (mdm && mdm->addExample(anchor,yyextra->exampleName,yyextra->exampleFile))
{
@@ -2767,7 +2754,7 @@ static bool getLinkInScope(yyscan_t yyscanner,
{
yyextra->theCallContext.setScope(ScopedTypeVariant(stripClassName(yyscanner,md->typeString(),md->getOuterScope())));
DBG_CTX((stderr,"yyextra->currentDefinition=%p yyextra->currentMemberDef=%p yyextra->insideBody=%d\n",
- yyextra->currentDefinition,yyextra->currentMemberDef,yyextra->insideBody));
+ (void*)yyextra->currentDefinition,(void*)yyextra->currentMemberDef,yyextra->insideBody));
if (yyextra->currentDefinition && yyextra->currentMemberDef &&
md!=yyextra->currentMemberDef && yyextra->insideBody && yyextra->collectXRefs)
@@ -2775,17 +2762,17 @@ static bool getLinkInScope(yyscan_t yyscanner,
std::lock_guard<std::mutex> lock(g_docCrossReferenceMutex);
addDocCrossReference(toMemberDefMutable(yyextra->currentMemberDef),toMemberDefMutable(md));
}
- DBG_CTX((stderr,"d->getReference()='%s' d->getOutputBase()='%s' name='%s' member name='%s'\n",d->getReference().data(),d->getOutputFileBase().data(),d->name().data(),md->name().data()));
+ DBG_CTX((stderr,"d->getReference()='%s' d->getOutputBase()='%s' name='%s' member name='%s'\n",qPrint(d->getReference()),qPrint(d->getOutputFileBase()),qPrint(d->name()),qPrint(md->name())));
- writeMultiLineCodeLink(yyscanner,ol,md, text ? text : memberText);
- addToSearchIndex(yyscanner,text ? text : memberText);
+ writeMultiLineCodeLink(yyscanner,ol,md, !text.isEmpty() ? text : memberText);
+ addToSearchIndex(yyscanner,!text.isEmpty() ? text : memberText);
return TRUE;
}
}
else // found member, but it is not linkable, so make sure content inside is not assigned
// to the previous member, see bug762760
{
- DBG_CTX((stderr,"unlinkable member %s\n",md->name().data()));
+ DBG_CTX((stderr,"unlinkable member %s\n",qPrint(md->name())));
yyextra->currentMemberDef = 0;
}
}
@@ -2793,14 +2780,15 @@ static bool getLinkInScope(yyscan_t yyscanner,
}
static bool getLink(yyscan_t yyscanner,
- const char *className,
- const char *memberName,
+ const QCString &className,
+ const QCString &memberName,
CodeOutputInterface &ol,
- const char *text,
+ const QCString &text,
bool varOnly)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
- DBG_CTX((stderr,"getLink(%s,%s) yyextra->curClassName=%s\n",className,memberName,yyextra->curClassName.data()));
+ DBG_CTX((stderr,"getLink(%s,%s) yyextra->curClassName=%s\n",
+ qPrint(className),qPrint(memberName),qPrint(yyextra->curClassName)));
QCString m=removeRedundantWhiteSpace(memberName);
QCString c=className;
if (!getLinkInScope(yyscanner,c,m,memberName,ol,text,varOnly))
@@ -2818,18 +2806,18 @@ static bool getLink(yyscan_t yyscanner,
static void generateClassOrGlobalLink(yyscan_t yyscanner,
CodeOutputInterface &ol,
- const char *clName,
+ const QCString &clName,
bool typeOnly,
bool varOnly)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
int i=0;
- if (*clName=='~') // correct for matching negated values i.s.o. destructors.
+ QCString className=clName;
+ if (!className.isEmpty() && className[0]=='~') // correct for matching negated values i.s.o. destructors.
{
yyextra->code->codify("~");
- clName++;
+ className=className.mid(1);
}
- QCString className=clName;
if (className.isEmpty()) return;
if (yyextra->insideProtocolList) // for Obj-C
{
@@ -2848,20 +2836,22 @@ static void generateClassOrGlobalLink(yyscan_t yyscanner,
const MemberDef *md=0;
bool isLocal=FALSE;
- DBG_CTX((stderr,"generateClassOrGlobalLink(className=%s)\n",className.data()));
+ DBG_CTX((stderr,"generateClassOrGlobalLink(className=%s)\n",qPrint(className)));
if (!yyextra->isPrefixedWithThis || (lcd=yyextra->theVarContext.findVariable(className))==0) // not a local variable
{
const Definition *d = yyextra->currentDefinition;
- DBG_CTX((stderr,"d=%s yyextra->sourceFileDef=%s\n",d?d->name().data():"<none>",yyextra->sourceFileDef?yyextra->sourceFileDef->name().data():"<none>"));
+ DBG_CTX((stderr,"d=%s yyextra->sourceFileDef=%s\n",d?qPrint(d->name()):"<none>",yyextra->sourceFileDef?qPrint(yyextra->sourceFileDef->name()):"<none>"));
cd = yyextra->symbolResolver.resolveClass(d,className);
md = yyextra->symbolResolver.getTypedef();
DBG_CTX((stderr,"non-local variable name=%s cd=%s md=%s!\n",
- className.data(),cd?cd->name().data():"<none>",
- md?md->name().data():"<none>"));
- if (cd==0 && md==0 && (i=className.find('<'))!=-1)
+ qPrint(className),cd?qPrint(cd->name()):"<none>",
+ md?qPrint(md->name()):"<none>"));
+ i=className.find('<');
+ QCString bareName = className;
+ if (i!=-1) bareName = bareName.left(i);
+ if (cd==0 && md==0 && i!=-1)
{
- QCString bareName = className.left(i); //stripTemplateSpecifiersFromScope(className);
- DBG_CTX((stderr,"bareName=%s\n",bareName.data()));
+ DBG_CTX((stderr,"bareName=%s\n",qPrint(bareName)));
if (bareName!=className)
{
cd = yyextra->symbolResolver.resolveClass(d,bareName); // try unspecialized version
@@ -2876,10 +2866,18 @@ static void generateClassOrGlobalLink(yyscan_t yyscanner,
writeMultiLineCodeLink(yyscanner,*yyextra->code,nd,clName);
return;
}
- DBG_CTX((stderr,"md=%s\n",md?md->name().data():"<none>"));
+ const ConceptDef *conceptDef = getResolvedConcept(d,bareName);
+ if (conceptDef && conceptDef->isLinkable())
+ {
+ yyextra->theCallContext.setScope(ScopedTypeVariant(conceptDef));
+ addToSearchIndex(yyscanner,className);
+ writeMultiLineCodeLink(yyscanner,*yyextra->code,conceptDef,clName);
+ return;
+ }
+ DBG_CTX((stderr,"md=%s\n",md?qPrint(md->name()):"<none>"));
DBG_CTX((stderr,"is found as a type cd=%s nd=%s\n",
- cd?cd->name().data():"<null>",
- nd?nd->name().data():"<null>"));
+ cd?qPrint(cd->name()):"<null>",
+ nd?qPrint(nd->name()):"<null>"));
if (cd==0 && md==0) // also see if it is variable or enum or enum value
{
if (getLink(yyscanner,yyextra->classScope,clName,ol,clName,varOnly))
@@ -2893,7 +2891,7 @@ static void generateClassOrGlobalLink(yyscan_t yyscanner,
DBG_CTX((stderr,"local variable!\n"));
if (lcd->type()!=ScopedTypeVariant::Dummy)
{
- DBG_CTX((stderr,"non-dummy context lcd=%s!\n",lcd->name().data()));
+ DBG_CTX((stderr,"non-dummy context lcd=%s!\n",qPrint(lcd->name())));
yyextra->theCallContext.setScope(*lcd);
// to following is needed for links to a global variable, but is
@@ -2905,20 +2903,20 @@ static void generateClassOrGlobalLink(yyscan_t yyscanner,
//}
}
isLocal=TRUE;
- DBG_CTX((stderr,"is a local variable cd=%p!\n",cd));
+ DBG_CTX((stderr,"is a local variable cd=%p!\n",(void*)cd));
}
yyextra->isPrefixedWithThis = FALSE; // discard the "this" prefix for the next calls
if (cd && cd->isLinkable()) // is it a linkable class
{
- DBG_CTX((stderr,"is linkable class %s\n",clName));
+ DBG_CTX((stderr,"is linkable class %s\n",qPrint(clName)));
if (yyextra->exampleBlock)
{
std::lock_guard<std::mutex> lock(g_addExampleMutex);
QCString anchor;
anchor.sprintf("_a%d",yyextra->anchorCount);
- DBG_CTX((stderr,"addExampleClass(%s,%s,%s)\n",anchor.data(),yyextra->exampleName.data(),
- yyextra->exampleFile.data()));
+ DBG_CTX((stderr,"addExampleClass(%s,%s,%s)\n",qPrint(anchor),qPrint(yyextra->exampleName),
+ qPrint(yyextra->exampleFile)));
ClassDefMutable *cdm = toClassDefMutable(const_cast<ClassDef*>(cd));
if (cdm && cdm->addExample(anchor,yyextra->exampleName,yyextra->exampleFile))
{
@@ -2944,19 +2942,19 @@ static void generateClassOrGlobalLink(yyscan_t yyscanner,
}
else // not a class, maybe a global member
{
- DBG_CTX((stderr,"class %s not linkable! cd=%p md=%p typeOnly=%d\n",clName,cd,md,typeOnly));
+ DBG_CTX((stderr,"class %s not linkable! cd=%p md=%p typeOnly=%d\n",qPrint(clName),(void*)cd,(void*)md,typeOnly));
if (!isLocal && (md!=0 || (cd==0 && !typeOnly))) // not a class, see if it is a global enum/variable/typedef.
{
if (md==0) // not found as a typedef
{
md = setCallContextForVar(yyscanner,clName);
- DBG_CTX((stderr,"setCallContextForVar(%s) md=%p yyextra->currentDefinition=%p\n",clName,md,yyextra->currentDefinition));
+ DBG_CTX((stderr,"setCallContextForVar(%s) md=%p yyextra->currentDefinition=%p\n",qPrint(clName),(void*)md,(void*)yyextra->currentDefinition));
if (md && yyextra->currentDefinition)
{
DBG_CTX((stderr,"%s accessible from %s? %d md->getOuterScope=%s\n",
- md->name().data(),yyextra->currentDefinition->name().data(),
+ qPrint(md->name()),qPrint(yyextra->currentDefinition->name()),
yyextra->symbolResolver.isAccessibleFrom(yyextra->currentDefinition,md),
- md->getOuterScope()->name().data()));
+ qPrint(md->getOuterScope()->name())));
}
if (md && yyextra->currentDefinition &&
@@ -2967,7 +2965,7 @@ static void generateClassOrGlobalLink(yyscan_t yyscanner,
}
if (md && (!varOnly || md->isVariable()))
{
- DBG_CTX((stderr,"is a global md=%p yyextra->currentDefinition=%s linkable=%d\n",md,yyextra->currentDefinition?yyextra->currentDefinition->name().data():"<none>",md->isLinkable()));
+ DBG_CTX((stderr,"is a global md=%p yyextra->currentDefinition=%s linkable=%d\n",(void*)md,yyextra->currentDefinition?qPrint(yyextra->currentDefinition->name()):"<none>",md->isLinkable()));
if (md->isLinkable())
{
QCString text=clName;
@@ -2990,26 +2988,32 @@ static void generateClassOrGlobalLink(yyscan_t yyscanner,
}
}
+static void generateClassOrGlobalLink(yyscan_t yyscanner,CodeOutputInterface &ol,const char *clName,
+ bool typeOnly,bool varOnly)
+{
+ generateClassOrGlobalLink(yyscanner,ol,QCString(clName),typeOnly,varOnly);
+}
+
static bool generateClassMemberLink(yyscan_t yyscanner,
CodeOutputInterface &ol,
const MemberDef *xmd,
- const char *memName)
+ const QCString &memName)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
// extract class definition of the return type in order to resolve
// a->b()->c() like call chains
DBG_CTX((stderr,"type='%s' args='%s' class=%s\n",
- xmd->typeString(),xmd->argsString(),
- xmd->getClassDef()->name().data()));
+ qPrint(xmd->typeString()),qPrint(xmd->argsString()),
+ qPrint(xmd->getClassDef()->name())));
if (yyextra->exampleBlock)
{
std::lock_guard<std::mutex> lock(g_addExampleMutex);
QCString anchor;
anchor.sprintf("a%d",yyextra->anchorCount);
- DBG_CTX((stderr,"addExampleFile(%s,%s,%s)\n",anchor.data(),yyextra->exampleName.data(),
- yyextra->exampleFile.data()));
+ DBG_CTX((stderr,"addExampleFile(%s,%s,%s)\n",qPrint(anchor),qPrint(yyextra->exampleName),
+ qPrint(yyextra->exampleFile)));
MemberDefMutable *mdm = toMemberDefMutable(xmd);
if (mdm && mdm->addExample(anchor,yyextra->exampleName,yyextra->exampleFile))
{
@@ -3019,7 +3023,7 @@ static bool generateClassMemberLink(yyscan_t yyscanner,
}
const ClassDef *typeClass = stripClassName(yyscanner,removeAnonymousScopes(xmd->typeString()),xmd->getOuterScope());
- DBG_CTX((stderr,"%s -> typeName=%p\n",xmd->typeString(),typeClass));
+ DBG_CTX((stderr,"%s -> typeName=%p\n",qPrint(xmd->typeString()),(void*)typeClass));
yyextra->theCallContext.setScope(ScopedTypeVariant(typeClass));
const Definition *xd = xmd->getOuterScope()==Doxygen::globalScope ?
@@ -3028,7 +3032,8 @@ static bool generateClassMemberLink(yyscan_t yyscanner,
if (xd && xd->isLinkable())
{
- DBG_CTX((stderr,"yyextra->currentDefinition=%p yyextra->currentMemberDef=%p xmd=%p yyextra->insideBody=%d\n",yyextra->currentDefinition,yyextra->currentMemberDef,xmd,yyextra->insideBody));
+ DBG_CTX((stderr,"yyextra->currentDefinition=%p yyextra->currentMemberDef=%p xmd=%p yyextra->insideBody=%d\n",
+ (void*)yyextra->currentDefinition,(void*)yyextra->currentMemberDef,(void*)xmd,yyextra->insideBody));
if (xmd->templateMaster()) xmd = xmd->templateMaster();
@@ -3055,14 +3060,14 @@ static bool generateClassMemberLink(yyscan_t yyscanner,
static bool generateClassMemberLink(yyscan_t yyscanner,
CodeOutputInterface &ol,
const Definition *def,
- const char *memName)
+ const QCString &memName)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
if (def && def->definitionType()==Definition::TypeClass)
{
const ClassDef *cd = toClassDef(def);
const MemberDef *xmd = cd->getMemberByName(memName);
- DBG_CTX((stderr,"generateClassMemberLink(class=%s,member=%s)=%p\n",def->name().data(),memName,xmd));
+ DBG_CTX((stderr,"generateClassMemberLink(class=%s,member=%s)=%p\n",qPrint(def->name()),qPrint(memName),(void*)xmd));
if (xmd)
{
return generateClassMemberLink(yyscanner,ol,xmd,memName);
@@ -3082,7 +3087,7 @@ static bool generateClassMemberLink(yyscan_t yyscanner,
else if (def && def->definitionType()==Definition::TypeNamespace)
{
const NamespaceDef *nd = toNamespaceDef(def);
- DBG_CTX((stderr,"Looking for %s inside namespace %s\n",memName,nd->name().data()));
+ DBG_CTX((stderr,"Looking for %s inside namespace %s\n",qPrint(memName),qPrint(nd->name())));
const Definition *innerDef = nd->findInnerCompound(memName);
if (innerDef)
{
@@ -3098,11 +3103,11 @@ static bool generateClassMemberLink(yyscan_t yyscanner,
static void generateMemberLink(yyscan_t yyscanner,
CodeOutputInterface &ol,
const QCString &varName,
- const char *memName)
+ const QCString &memName)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
DBG_CTX((stderr,"generateMemberLink(object=%s,mem=%s) classScope=%s\n",
- varName.data(),memName,yyextra->classScope.data()));
+ qPrint(varName),qPrint(memName),qPrint(yyextra->classScope)));
if (varName.isEmpty()) return;
@@ -3136,7 +3141,7 @@ static void generateMemberLink(yyscan_t yyscanner,
const ClassDef *vcd = yyextra->symbolResolver.resolveClass(yyextra->currentDefinition,yyextra->classScope);
if (vcd && vcd->isLinkable())
{
- DBG_CTX((stderr,"Found class %s for variable '%s'\n",yyextra->classScope.data(),varName.data()));
+ DBG_CTX((stderr,"Found class %s for variable '%s'\n",qPrint(yyextra->classScope),qPrint(varName)));
MemberName *vmn=Doxygen::memberNameLinkedMap->find(varName);
if (vmn==0)
{
@@ -3147,14 +3152,14 @@ static void generateMemberLink(yyscan_t yyscanner,
const ClassDef *jcd = getClass(vn.left(vi));
vn=vn.right(vn.length()-vi-2);
vmn=Doxygen::memberNameLinkedMap->find(vn);
- //printf("Trying name '%s' scope=%s\n",vn.data(),scope.data());
+ //printf("Trying name '%s' scope=%s\n",qPrint(vn),qPrint(scope));
if (vmn)
{
for (const auto &vmd : *vmn)
{
if (vmd->getClassDef()==jcd)
{
- DBG_CTX((stderr,"Found variable type=%s\n",vmd->typeString()));
+ DBG_CTX((stderr,"Found variable type=%s\n",qPrint(vmd->typeString())));
const ClassDef *mcd=stripClassName(yyscanner,vmd->typeString(),vmd->getOuterScope());
if (mcd && mcd->isLinkable())
{
@@ -3167,12 +3172,12 @@ static void generateMemberLink(yyscan_t yyscanner,
}
if (vmn)
{
- DBG_CTX((stderr,"There is a variable with name '%s'\n",varName));
+ DBG_CTX((stderr,"There is a variable with name '%s'\n",qPrint(varName)));
for (const auto &vmd : *vmn)
{
if (vmd->getClassDef()==vcd)
{
- DBG_CTX((stderr,"Found variable type=%s\n",vmd->typeString()));
+ DBG_CTX((stderr,"Found variable type=%s\n",qPrint(vmd->typeString())));
const ClassDef *mcd=stripClassName(yyscanner,vmd->typeString(),vmd->getOuterScope());
if (mcd && mcd->isLinkable())
{
@@ -3192,16 +3197,16 @@ static void generateMemberLink(yyscan_t yyscanner,
static void generatePHPVariableLink(yyscan_t yyscanner,CodeOutputInterface &ol,const char *varName)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
- QCString name = varName+7; // strip $this->
+ QCString name(varName+7); // strip $this->
name.prepend("$");
- DBG_CTX((stderr,"generatePHPVariableLink(%s) name=%s scope=%s\n",varName,name.data(),yyextra->classScope.data()));
- if (!getLink(yyscanner,yyextra->classScope,name,ol,varName))
+ DBG_CTX((stderr,"generatePHPVariableLink(%s) name=%s scope=%s\n",varName,qPrint(name),qPrint(yyextra->classScope)));
+ if (!getLink(yyscanner,yyextra->classScope,name,ol,QCString(varName)))
{
codifyLines(yyscanner,varName);
}
}
-static void generateFunctionLink(yyscan_t yyscanner,CodeOutputInterface &ol,const char *funcName)
+static void generateFunctionLink(yyscan_t yyscanner,CodeOutputInterface &ol,const QCString &funcName)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
//CodeClassDef *ccd=0;
@@ -3212,7 +3217,7 @@ static void generateFunctionLink(yyscan_t yyscanner,CodeOutputInterface &ol,cons
QCString funcWithScope=locFunc;
QCString funcWithFullScope=locFunc;
QCString fullScope=locScope;
- DBG_CTX((stdout,"*** locScope=%s locFunc=%s\n",locScope.data(),locFunc.data()));
+ DBG_CTX((stdout,"*** locScope=%s locFunc=%s\n",qPrint(locScope),qPrint(locFunc)));
int len=2;
int i=locFunc.findRev("::");
if (yyextra->currentMemberDef && yyextra->currentMemberDef->resolveAlias()->getClassDef() &&
@@ -3310,6 +3315,11 @@ exit:
return;
}
+static void generateFunctionLink(yyscan_t yyscanner,CodeOutputInterface &ol,const char *funcName)
+{
+ generateFunctionLink(yyscanner,ol,QCString(funcName));
+}
+
/*! counts the number of lines in the input */
static int countLines(yyscan_t yyscanner)
{
@@ -3345,7 +3355,7 @@ static void startFontClass(yyscan_t yyscanner,const char *s)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
endFontClass(yyscanner);
- yyextra->code->startFontClass(s);
+ yyextra->code->startFontClass(QCString(s));
yyextra->currentFontClass=s;
}
@@ -3357,15 +3367,14 @@ static void writeObjCMethodCall(yyscan_t yyscanner,ObjCCallCtx *ctx)
if (ctx==0) return;
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
char c;
- const char *p = ctx->format.data();
if (!ctx->methodName.isEmpty())
{
DBG_CTX((stderr,"writeObjCMethodCall(%s) obj=%s method=%s\n",
- ctx->format.data(),ctx->objectTypeOrName.data(),ctx->methodName.data()));
+ qPrint(ctx->format),qPrint(ctx->objectTypeOrName),qPrint(ctx->methodName)));
if (!ctx->objectTypeOrName.isEmpty() && ctx->objectTypeOrName.at(0)!='$')
{
- DBG_CTX((stderr,"Looking for object=%s method=%s\n",ctx->objectTypeOrName.data(),
- ctx->methodName.data()));
+ DBG_CTX((stderr,"Looking for object=%s method=%s\n",qPrint(ctx->objectTypeOrName),
+ qPrint(ctx->methodName)));
const ScopedTypeVariant *stv = yyextra->theVarContext.findVariable(ctx->objectTypeOrName);
if (stv==0) // not a local variable
{
@@ -3382,29 +3391,29 @@ static void writeObjCMethodCall(yyscan_t yyscanner,ObjCCallCtx *ctx)
ctx->objectType = yyextra->symbolResolver.resolveClass(yyextra->currentDefinition,ctx->objectTypeOrName);
ctx->method = yyextra->symbolResolver.getTypedef();
}
- DBG_CTX((stderr," object is class? %p\n",ctx->objectType));
+ DBG_CTX((stderr," object is class? %p\n",(void*)ctx->objectType));
if (ctx->objectType) // found class
{
ctx->method = ctx->objectType->getMemberByName(ctx->methodName);
- DBG_CTX((stderr," yes->method=%s\n",ctx->method?ctx->method->name().data():"<none>"));
+ DBG_CTX((stderr," yes->method=%s\n",ctx->method?qPrint(ctx->method->name()):"<none>"));
}
else if (ctx->method==0) // search for class variable with the same name
{
DBG_CTX((stderr," no\n"));
- DBG_CTX((stderr,"yyextra->currentDefinition=%p\n",yyextra->currentDefinition));
+ DBG_CTX((stderr,"yyextra->currentDefinition=%p\n",(void*)yyextra->currentDefinition));
if (yyextra->currentDefinition &&
yyextra->currentDefinition->definitionType()==Definition::TypeClass)
{
ctx->objectVar = (toClassDef(yyextra->currentDefinition))->getMemberByName(ctx->objectTypeOrName);
- DBG_CTX((stderr," ctx->objectVar=%p\n",ctx->objectVar));
+ DBG_CTX((stderr," ctx->objectVar=%p\n",(void*)ctx->objectVar));
if (ctx->objectVar)
{
ctx->objectType = stripClassName(yyscanner,ctx->objectVar->typeString(),yyextra->currentDefinition);
- DBG_CTX((stderr," ctx->objectType=%p\n",ctx->objectType));
+ DBG_CTX((stderr," ctx->objectType=%p\n",(void*)ctx->objectType));
if (ctx->objectType && !ctx->methodName.isEmpty())
{
ctx->method = ctx->objectType->getMemberByName(ctx->methodName);
- DBG_CTX((stderr," ctx->method=%p\n",ctx->method));
+ DBG_CTX((stderr," ctx->method=%p\n",(void*)ctx->method));
}
}
}
@@ -3420,236 +3429,240 @@ static void writeObjCMethodCall(yyscan_t yyscanner,ObjCCallCtx *ctx)
{
ctx->method = cd->getMemberByName(ctx->methodName);
}
- DBG_CTX((stderr," class=%p method=%p\n",cd,ctx->method));
+ DBG_CTX((stderr," class=%p method=%p\n",(void*)cd,(void*)ctx->method));
}
}
}
}
DBG_CTX((stderr,"["));
- while ((c=*p++)) // for each character in ctx->format
+ if (!ctx->format.isEmpty())
{
- if (c=='$')
+ const char *p = ctx->format.data();
+ while ((c=*p++)) // for each character in ctx->format
{
- char nc=*p++;
- if (nc=='$') // escaped $
- {
- yyextra->code->codify("$");
- }
- else // name fragment or reference to a nested call
+ if (c=='$')
{
- if (nc=='n') // name fragment
+ char nc=*p++;
+ if (nc=='$') // escaped $
+ {
+ yyextra->code->codify("$");
+ }
+ else // name fragment or reference to a nested call
{
- nc=*p++;
- QCString refIdStr;
- while (nc!=0 && isdigit(nc)) { refIdStr+=nc; nc=*p++; }
- p--;
- int refId=refIdStr.toInt();
- auto it = yyextra->nameMap.find(refId);
- if (it!=yyextra->nameMap.end())
+ if (nc=='n') // name fragment
{
- QCString name = it->second;
- if (ctx->method && ctx->method->isLinkable())
+ nc=*p++;
+ QCString refIdStr;
+ while (nc!=0 && isdigit(nc)) { refIdStr+=nc; nc=*p++; }
+ p--;
+ int refId=refIdStr.toInt();
+ auto it = yyextra->nameMap.find(refId);
+ if (it!=yyextra->nameMap.end())
{
- writeMultiLineCodeLink(yyscanner,*yyextra->code,ctx->method,name);
- if (yyextra->currentMemberDef && yyextra->collectXRefs)
+ QCString name = it->second;
+ if (ctx->method && ctx->method->isLinkable())
{
- std::lock_guard<std::mutex> lock(g_docCrossReferenceMutex);
- addDocCrossReference(toMemberDefMutable(yyextra->currentMemberDef),toMemberDefMutable(ctx->method));
+ writeMultiLineCodeLink(yyscanner,*yyextra->code,ctx->method,name);
+ if (yyextra->currentMemberDef && yyextra->collectXRefs)
+ {
+ std::lock_guard<std::mutex> lock(g_docCrossReferenceMutex);
+ addDocCrossReference(toMemberDefMutable(yyextra->currentMemberDef),toMemberDefMutable(ctx->method));
+ }
+ }
+ else
+ {
+ codifyLines(yyscanner,name);
}
}
else
{
- codifyLines(yyscanner,name);
+ DBG_CTX((stderr,"Invalid name: id=%d\n",refId));
}
}
- else
- {
- DBG_CTX((stderr,"Invalid name: id=%d\n",refId));
- }
- }
- else if (nc=='o') // reference to potential object name
- {
- nc=*p++;
- QCString refIdStr;
- while (nc!=0 && isdigit(nc)) { refIdStr+=nc; nc=*p++; }
- p--;
- int refId=refIdStr.toInt();
- auto it = yyextra->objectMap.find(refId);
- if (it!=yyextra->objectMap.end())
+ else if (nc=='o') // reference to potential object name
{
- QCString object = it->second;
- if (object=="self")
+ nc=*p++;
+ QCString refIdStr;
+ while (nc!=0 && isdigit(nc)) { refIdStr+=nc; nc=*p++; }
+ p--;
+ int refId=refIdStr.toInt();
+ auto it = yyextra->objectMap.find(refId);
+ if (it!=yyextra->objectMap.end())
{
- if (yyextra->currentDefinition &&
- yyextra->currentDefinition->definitionType()==Definition::TypeClass)
+ QCString object = it->second;
+ if (object=="self")
{
- ctx->objectType = toClassDef(yyextra->currentDefinition);
- if (ctx->objectType->categoryOf())
- {
- ctx->objectType = ctx->objectType->categoryOf();
- }
- if (ctx->objectType && !ctx->methodName.isEmpty())
+ if (yyextra->currentDefinition &&
+ yyextra->currentDefinition->definitionType()==Definition::TypeClass)
{
- ctx->method = ctx->objectType->getMemberByName(ctx->methodName);
+ ctx->objectType = toClassDef(yyextra->currentDefinition);
+ if (ctx->objectType->categoryOf())
+ {
+ ctx->objectType = ctx->objectType->categoryOf();
+ }
+ if (ctx->objectType && !ctx->methodName.isEmpty())
+ {
+ ctx->method = ctx->objectType->getMemberByName(ctx->methodName);
+ }
}
+ startFontClass(yyscanner,"keyword");
+ codifyLines(yyscanner,object);
+ endFontClass(yyscanner);
}
- startFontClass(yyscanner,"keyword");
- codifyLines(yyscanner,object);
- endFontClass(yyscanner);
- }
- else if (object=="super")
- {
- if (yyextra->currentDefinition &&
- yyextra->currentDefinition->definitionType()==Definition::TypeClass)
+ else if (object=="super")
{
- const ClassDef *cd = toClassDef(yyextra->currentDefinition);
- if (cd->categoryOf())
+ if (yyextra->currentDefinition &&
+ yyextra->currentDefinition->definitionType()==Definition::TypeClass)
{
- cd = cd->categoryOf();
- }
- for (const auto &bclass : cd->baseClasses())
- {
- if (bclass.classDef->compoundType()!=ClassDef::Protocol)
+ const ClassDef *cd = toClassDef(yyextra->currentDefinition);
+ if (cd->categoryOf())
{
- ctx->objectType = bclass.classDef;
- if (ctx->objectType && !ctx->methodName.isEmpty())
+ cd = cd->categoryOf();
+ }
+ for (const auto &bclass : cd->baseClasses())
+ {
+ if (bclass.classDef->compoundType()!=ClassDef::Protocol)
{
- ctx->method = ctx->objectType->getMemberByName(ctx->methodName);
+ ctx->objectType = bclass.classDef;
+ if (ctx->objectType && !ctx->methodName.isEmpty())
+ {
+ ctx->method = ctx->objectType->getMemberByName(ctx->methodName);
+ }
}
}
}
+ startFontClass(yyscanner,"keyword");
+ codifyLines(yyscanner,object);
+ endFontClass(yyscanner);
}
- startFontClass(yyscanner,"keyword");
- codifyLines(yyscanner,object);
- endFontClass(yyscanner);
- }
- else if (ctx->objectVar && ctx->objectVar->isLinkable()) // object is class variable
- {
- writeMultiLineCodeLink(yyscanner,*yyextra->code,ctx->objectVar,object);
- if (yyextra->currentMemberDef && yyextra->collectXRefs)
+ else if (ctx->objectVar && ctx->objectVar->isLinkable()) // object is class variable
{
- std::lock_guard<std::mutex> lock(g_docCrossReferenceMutex);
- addDocCrossReference(toMemberDefMutable(yyextra->currentMemberDef),toMemberDefMutable(ctx->objectVar));
+ writeMultiLineCodeLink(yyscanner,*yyextra->code,ctx->objectVar,object);
+ if (yyextra->currentMemberDef && yyextra->collectXRefs)
+ {
+ std::lock_guard<std::mutex> lock(g_docCrossReferenceMutex);
+ addDocCrossReference(toMemberDefMutable(yyextra->currentMemberDef),toMemberDefMutable(ctx->objectVar));
+ }
}
- }
- else if (ctx->objectType &&
- ctx->objectType->isLinkable()
- ) // object is class name
- {
- const ClassDef *cd = ctx->objectType;
- writeMultiLineCodeLink(yyscanner,*yyextra->code,cd,object);
- }
- else // object still needs to be resolved
- {
- const ClassDef *cd = yyextra->symbolResolver.resolveClass(yyextra->currentDefinition, object);
- if (cd && cd->isLinkable())
+ else if (ctx->objectType &&
+ ctx->objectType->isLinkable()
+ ) // object is class name
{
- if (ctx->objectType==0) ctx->objectType=cd;
+ const ClassDef *cd = ctx->objectType;
writeMultiLineCodeLink(yyscanner,*yyextra->code,cd,object);
}
- else
+ else // object still needs to be resolved
{
- codifyLines(yyscanner,object);
+ const ClassDef *cd = yyextra->symbolResolver.resolveClass(yyextra->currentDefinition, object);
+ if (cd && cd->isLinkable())
+ {
+ if (ctx->objectType==0) ctx->objectType=cd;
+ writeMultiLineCodeLink(yyscanner,*yyextra->code,cd,object);
+ }
+ else
+ {
+ codifyLines(yyscanner,object);
+ }
}
}
+ else
+ {
+ DBG_CTX((stderr,"Invalid object: id=%d\n",refId));
+ }
}
- else
- {
- DBG_CTX((stderr,"Invalid object: id=%d\n",refId));
- }
- }
- else if (nc=='c') // reference to nested call
- {
- nc=*p++;
- QCString refIdStr;
- while (nc!=0 && isdigit(nc)) { refIdStr+=nc; nc=*p++; }
- p--;
- int refId=refIdStr.toInt();
- auto it = yyextra->contextMap.find(refId);
- if (it!=yyextra->contextMap.end()) // recurse into nested call
+ else if (nc=='c') // reference to nested call
{
- ObjCCallCtx *ictx = it->second.get();
- writeObjCMethodCall(yyscanner,ictx);
- if (ictx->method) // link to nested call successfully
+ nc=*p++;
+ QCString refIdStr;
+ while (nc!=0 && isdigit(nc)) { refIdStr+=nc; nc=*p++; }
+ p--;
+ int refId=refIdStr.toInt();
+ auto it = yyextra->contextMap.find(refId);
+ if (it!=yyextra->contextMap.end()) // recurse into nested call
{
- // get the ClassDef representing the method's return type
- if (QCString(ictx->method->typeString())=="id")
+ ObjCCallCtx *ictx = it->second.get();
+ writeObjCMethodCall(yyscanner,ictx);
+ if (ictx->method) // link to nested call successfully
{
- // see if the method name is unique, if so we link to it
- MemberName *mn=Doxygen::memberNameLinkedMap->find(ctx->methodName);
- //printf("mn->count=%d ictx->method=%s ctx->methodName=%s\n",
- // mn==0?-1:(int)mn->count(),
- // ictx->method->name().data(),
- // ctx->methodName.data());
- if (mn && mn->size()==1) // member name unique
+ // get the ClassDef representing the method's return type
+ if (QCString(ictx->method->typeString())=="id")
{
- ctx->method = mn->front().get();
+ // see if the method name is unique, if so we link to it
+ MemberName *mn=Doxygen::memberNameLinkedMap->find(ctx->methodName);
+ //printf("mn->count=%d ictx->method=%s ctx->methodName=%s\n",
+ // mn==0?-1:(int)mn->count(),
+ // qPrint(ictx->method->name()),
+ // qPrint(ctx->methodName));
+ if (mn && mn->size()==1) // member name unique
+ {
+ ctx->method = mn->front().get();
+ }
}
- }
- else
- {
- ctx->objectType = stripClassName(yyscanner,ictx->method->typeString(),yyextra->currentDefinition);
- if (ctx->objectType && !ctx->methodName.isEmpty())
+ else
{
- ctx->method = ctx->objectType->getMemberByName(ctx->methodName);
+ ctx->objectType = stripClassName(yyscanner,ictx->method->typeString(),yyextra->currentDefinition);
+ if (ctx->objectType && !ctx->methodName.isEmpty())
+ {
+ ctx->method = ctx->objectType->getMemberByName(ctx->methodName);
+ }
}
+ DBG_CTX((stderr," ***** method=%s -> object=%p\n",qPrint(ictx->method->name()),(void*)ctx->objectType));
}
- DBG_CTX((stderr," ***** method=%s -> object=%p\n",ictx->method->name().data(),ctx->objectType));
+ }
+ else
+ {
+ DBG_CTX((stderr,"Invalid context: id=%d\n",refId));
}
}
- else
+ else if (nc=='w') // some word
{
- DBG_CTX((stderr,"Invalid context: id=%d\n",refId));
+ nc=*p++;
+ QCString refIdStr;
+ while (nc!=0 && isdigit(nc)) { refIdStr+=nc; nc=*p++; }
+ p--;
+ int refId=refIdStr.toInt();
+ auto it = yyextra->wordMap.find(refId);
+ if (it!=yyextra->wordMap.end())
+ {
+ QCString word = it->second;
+ codifyLines(yyscanner,word);
+ }
}
- }
- else if (nc=='w') // some word
- {
- nc=*p++;
- QCString refIdStr;
- while (nc!=0 && isdigit(nc)) { refIdStr+=nc; nc=*p++; }
- p--;
- int refId=refIdStr.toInt();
- auto it = yyextra->wordMap.find(refId);
- if (it!=yyextra->wordMap.end())
+ else if (nc=='d') // comment block
{
- QCString word = it->second;
- codifyLines(yyscanner,word);
+ nc=*p++;
+ QCString refIdStr;
+ while (nc!=0 && isdigit(nc)) { refIdStr+=nc; nc=*p++; }
+ p--;
+ int refId=refIdStr.toInt();
+ auto it = yyextra->commentMap.find(refId);
+ if (it!=yyextra->commentMap.end())
+ {
+ QCString comment = it->second;
+ startFontClass(yyscanner,"comment");
+ codifyLines(yyscanner,comment);
+ endFontClass(yyscanner);
+ }
}
- }
- else if (nc=='d') // comment block
- {
- nc=*p++;
- QCString refIdStr;
- while (nc!=0 && isdigit(nc)) { refIdStr+=nc; nc=*p++; }
- p--;
- int refId=refIdStr.toInt();
- auto it = yyextra->commentMap.find(refId);
- if (it!=yyextra->commentMap.end())
+ else // illegal marker
{
- QCString comment = it->second;
- startFontClass(yyscanner,"comment");
- codifyLines(yyscanner,comment);
- endFontClass(yyscanner);
+ ASSERT("invalid escape sequence"==0);
}
}
- else // illegal marker
- {
- ASSERT("invalid escape sequence"==0);
- }
}
- }
- else // normal non-marker character
- {
- char s[2];
- s[0]=c;s[1]=0;
- codifyLines(yyscanner,s);
+ else // normal non-marker character
+ {
+ char s[2];
+ s[0]=c;s[1]=0;
+ codifyLines(yyscanner,s);
+ }
}
}
- DBG_CTX((stderr,"%s %s]\n",ctx->objectTypeOrName.data(),ctx->methodName.data()));
+ DBG_CTX((stderr,"%s %s]\n",qPrint(ctx->objectTypeOrName),qPrint(ctx->methodName)));
DBG_CTX((stderr,"}=(type='%s',name='%s')",
- ctx->objectTypeOrName.data(),
- ctx->methodName.data()));
+ qPrint(ctx->objectTypeOrName),
+ qPrint(ctx->methodName)));
}
// Replaces an Objective-C method name fragment s by a marker of the form
@@ -3695,14 +3708,16 @@ static QCString escapeComment(yyscan_t yyscanner,const char *s)
return result;
}
-static bool skipLanguageSpecificKeyword(yyscan_t yyscanner,const QCString &kw)
+static bool skipLanguageSpecificKeyword(yyscan_t yyscanner,const char *keyword)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ QCString kw(keyword);
return yyextra->lang==SrcLangExt_Cpp && (kw == "remove" || kw == "set" || kw == "get");
}
-static bool isCastKeyword(const QCString &s)
+static bool isCastKeyword(const char *keyword)
{
+ QCString s(keyword);
int i=s.find('<');
if (i==-1) return FALSE;
QCString kw = s.left(i).stripWhiteSpace();
@@ -3734,7 +3749,7 @@ static void saveObjCContext(yyscan_t yyscanner)
if (yyextra->braceCount==0 && YY_START==ObjCCall)
{
yyextra->currentCtx->objectTypeOrName=yyextra->currentCtx->format.mid(1);
- DBG_CTX((stderr,"new type=%s\n",yyextra->currentCtx->objectTypeOrName.data()));
+ DBG_CTX((stderr,"new type=%s\n",qPrint(yyextra->currentCtx->objectTypeOrName)));
}
yyextra->contextStack.push(yyextra->currentCtx);
}
@@ -3811,8 +3826,8 @@ void CCodeParser::setStartCodeLine(const bool inp)
yyextra->beginCodeLine = inp;
}
-void CCodeParser::parseCode(CodeOutputInterface &od,const char *className,const QCString &s,
- SrcLangExt lang,bool exBlock, const char *exName,FileDef *fd,
+void CCodeParser::parseCode(CodeOutputInterface &od,const QCString &className,const QCString &s,
+ SrcLangExt lang,bool exBlock, const QCString &exName,FileDef *fd,
int startLine,int endLine,bool inlineFragment,
const MemberDef *memberDef,bool showLineNumbers,const Definition *searchCtx,
bool collectXRefs)
@@ -3820,14 +3835,14 @@ void CCodeParser::parseCode(CodeOutputInterface &od,const char *className,const
yyscan_t yyscanner = p->yyscanner;
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
DBG_CTX((stderr,"***parseCode() exBlock=%d exName=%s fd=%p className=%s searchCtx=%s\n",
- exBlock,exName,fd,className,searchCtx?searchCtx->name().data():"<none>"));
+ exBlock,qPrint(exName),(void*)fd,qPrint(className),searchCtx?qPrint(searchCtx->name()):"<none>"));
if (s.isEmpty()) return;
- printlex(yy_flex_debug, TRUE, __FILE__, fd ? fd->fileName().data(): NULL);
+ printlex(yy_flex_debug, TRUE, __FILE__, fd ? qPrint(fd->fileName()): NULL);
yyextra->code = &od;
- yyextra->inputString = s;
+ yyextra->inputString = s.data();
yyextra->inputPosition = 0;
codeYYrestart(0,yyscanner);
yyextra->currentFontClass = 0;
@@ -3855,7 +3870,7 @@ void CCodeParser::parseCode(CodeOutputInterface &od,const char *className,const
yyextra->theCallContext.clear();
while (!yyextra->scopeStack.empty()) yyextra->scopeStack.pop();
yyextra->classScope = className;
- DBG_CTX((stderr,"parseCCode %s\n",className));
+ DBG_CTX((stderr,"parseCCode %s\n",qPrint(className)));
yyextra->exampleBlock = exBlock;
yyextra->exampleName = exName;
yyextra->sourceFileDef = fd;
@@ -3864,7 +3879,7 @@ void CCodeParser::parseCode(CodeOutputInterface &od,const char *className,const
if (fd==0)
{
// create a dummy filedef for the example
- yyextra->sourceFileDef = createFileDef("",(exName?exName:"generated"));
+ yyextra->sourceFileDef = createFileDef(QCString(),(!exName.isEmpty()?exName:"generated"));
cleanupSourceDef = TRUE;
}
yyextra->lang = lang;
@@ -3873,7 +3888,7 @@ void CCodeParser::parseCode(CodeOutputInterface &od,const char *className,const
{
setCurrentDoc(yyscanner,"l00001");
}
- yyextra->currentDefinition = 0;
+ yyextra->currentDefinition = getResolvedNamespace(className);
yyextra->currentMemberDef = 0;
yyextra->searchingForBody = exBlock;
yyextra->insideBody = FALSE;
@@ -3881,10 +3896,10 @@ void CCodeParser::parseCode(CodeOutputInterface &od,const char *className,const
if (!yyextra->exampleName.isEmpty())
{
yyextra->exampleFile = convertNameToFile(yyextra->exampleName+"-example",FALSE,TRUE);
- DBG_CTX((stderr,"yyextra->exampleFile=%s\n",yyextra->exampleFile.data()));
+ DBG_CTX((stderr,"yyextra->exampleFile=%s\n",qPrint(yyextra->exampleFile)));
}
yyextra->includeCodeFragment = inlineFragment;
- DBG_CTX((stderr,"** exBlock=%d exName=%s include=%d\n",exBlock,exName,inlineFragment));
+ DBG_CTX((stderr,"** exBlock=%d exName=%s include=%d\n",exBlock,qPrint(exName),inlineFragment));
if (yyextra->beginCodeLine) startCodeLine(yyscanner);
yyextra->type.resize(0);
yyextra->name.resize(0);
@@ -3910,7 +3925,7 @@ void CCodeParser::parseCode(CodeOutputInterface &od,const char *className,const
// write the tooltips
TooltipManager::instance().writeTooltips(od);
- printlex(yy_flex_debug, FALSE, __FILE__, fd ? fd->fileName().data(): NULL);
+ printlex(yy_flex_debug, FALSE, __FILE__, fd ? qPrint(fd->fileName()): NULL);
return;
}
diff --git a/src/commentcnv.h b/src/commentcnv.h
index a45d29c..973a602 100644
--- a/src/commentcnv.h
+++ b/src/commentcnv.h
@@ -1,12 +1,12 @@
/*****************************************************************************
*
- *
+ *
*
* Copyright (C) 1997-2015 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
- * documentation under the terms of the GNU General Public License is hereby
- * granted. No representations are made about the suitability of this software
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
@@ -19,9 +19,10 @@
#define _COMMENTCNV_H
class BufStr;
+class QCString;
extern void convertCppComments(BufStr *inBuf,BufStr *outBuf,
- const char *fileName);
+ const QCString &fileName);
#endif
diff --git a/src/commentcnv.l b/src/commentcnv.l
index 09583d3..23611a9 100644
--- a/src/commentcnv.l
+++ b/src/commentcnv.l
@@ -28,6 +28,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <stack>
+#include <algorithm>
#include "bufstr.h"
#include "debug.h"
@@ -107,10 +108,10 @@ static inline int computeIndent(const char *s);
static void replaceCommentMarker(yyscan_t yyscanner,const char *s,int len);
static inline void copyToOutput(yyscan_t yyscanner,const char *s,int len);
-static void startCondSection(yyscan_t yyscanner,const char *sectId);
+static void startCondSection(yyscan_t yyscanner,const QCString &sectId);
static void endCondSection(yyscan_t yyscanner);
static void handleCondSectionId(yyscan_t yyscanner,const char *expression);
-static void replaceAliases(yyscan_t yyscanner,const char *s);
+static void replaceAliases(yyscan_t yyscanner,const QCString &s);
static yy_size_t yyread(yyscan_t yyscanner,char *buf,yy_size_t max_size);
static void replaceComment(yyscan_t yyscanner,int offset);
static void clearCommentStack(yyscan_t yyscanner);
@@ -305,7 +306,7 @@ SLASHopt [/]*
}
yyextra->blockHeadCol=yyextra->col;
copyToOutput(yyscanner,"/**",3);
- replaceAliases(yyscanner,yytext+i);
+ replaceAliases(yyscanner,QCString(yytext+i));
yyextra->inSpecialComment=TRUE;
//BEGIN(SComment);
yyextra->readLineCtx=SComment;
@@ -317,7 +318,7 @@ SLASHopt [/]*
int i=17; //=strlen("//##Documentation");
yyextra->blockHeadCol=yyextra->col;
copyToOutput(yyscanner,"/**",3);
- replaceAliases(yyscanner,yytext+i);
+ replaceAliases(yyscanner,QCString(yytext+i));
yyextra->inRoseComment=TRUE;
BEGIN(SComment);
}
@@ -872,7 +873,7 @@ SLASHopt [/]*
if (*yytext=='\n') yyextra->lineNr++;
}
<CComment,ReadLine>[\\@][a-z_A-Z][a-z_A-Z0-9]* { // expand alias without arguments
- replaceAliases(yyscanner,yytext);
+ replaceAliases(yyscanner,QCString(yytext));
}
<CComment,ReadLine>[\\@][a-z_A-Z][a-z_A-Z0-9]*"{" { // expand alias with arguments
yyextra->lastBlockContext=YY_START;
@@ -890,7 +891,7 @@ SLASHopt [/]*
}
else // abort the alias, restart scanning
{
- copyToOutput(yyscanner,yyextra->aliasString,yyextra->aliasString.length());
+ copyToOutput(yyscanner,yyextra->aliasString.data(),yyextra->aliasString.length());
copyToOutput(yyscanner,yytext,(int)yyleng);
BEGIN(Scan);
}
@@ -1042,7 +1043,7 @@ static void clearCommentStack(yyscan_t yyscanner)
while (!yyextra->commentStack.empty()) yyextra->commentStack.pop();
}
-static void startCondSection(yyscan_t yyscanner,const char *sectId)
+static void startCondSection(yyscan_t yyscanner,const QCString &sectId)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
//printf("startCondSection: skip=%d stack=%d\n",g_skip,g_condStack.count());
@@ -1076,7 +1077,7 @@ static void handleCondSectionId(yyscan_t yyscanner,const char *expression)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
bool oldSkip=yyextra->skip;
- startCondSection(yyscanner,expression);
+ startCondSection(yyscanner,QCString(expression));
if ((yyextra->condCtx==CComment || yyextra->readLineCtx==SComment) &&
!oldSkip && yyextra->skip)
{
@@ -1102,11 +1103,11 @@ static void handleCondSectionId(yyscan_t yyscanner,const char *expression)
/** copies string \a s with length \a len to the output, while
* replacing any alias commands found in the string.
*/
-static void replaceAliases(yyscan_t yyscanner,const char *s)
+static void replaceAliases(yyscan_t yyscanner,const QCString &s)
{
QCString result = resolveAliasCmd(s);
//printf("replaceAliases(%s)->'%s'\n",s,result.data());
- copyToOutput(yyscanner,result,result.length());
+ copyToOutput(yyscanner,result.data(),result.length());
}
@@ -1114,7 +1115,7 @@ static yy_size_t yyread(yyscan_t yyscanner,char *buf,yy_size_t max_size)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
yy_size_t bytesInBuf = yyextra->inBuf->curPos()-yyextra->inBufPos;
- yy_size_t bytesToCopy = QMIN(max_size,bytesInBuf);
+ yy_size_t bytesToCopy = std::min(max_size,bytesInBuf);
memcpy(buf,yyextra->inBuf->data()+yyextra->inBufPos,bytesToCopy);
yyextra->inBufPos+=bytesToCopy;
return bytesToCopy;
@@ -1151,7 +1152,7 @@ static void replaceComment(yyscan_t yyscanner,int offset)
* -# It replaces aliases with their definition (see ALIASES)
* -# It handles conditional sections (cond...endcond blocks)
*/
-void convertCppComments(BufStr *inBuf,BufStr *outBuf,const char *fileName)
+void convertCppComments(BufStr *inBuf,BufStr *outBuf,const QCString &fileName)
{
yyscan_t yyscanner;
commentcnvYY_state extra;
@@ -1175,12 +1176,12 @@ void convertCppComments(BufStr *inBuf,BufStr *outBuf,const char *fileName)
clearCommentStack(yyscanner);
yyextra->vhdl = FALSE;
- printlex(yy_flex_debug, TRUE, __FILE__, fileName);
+ printlex(yy_flex_debug, TRUE, __FILE__, qPrint(fileName));
yyextra->isFixedForm = FALSE;
if (yyextra->lang==SrcLangExt_Fortran)
{
FortranFormat fmt = convertFileNameFortranParserCode(fileName);
- yyextra->isFixedForm = recognizeFixedForm(inBuf->data(),fmt);
+ yyextra->isFixedForm = recognizeFixedForm(QCString(inBuf->data()),fmt);
}
if (yyextra->lang==SrcLangExt_Markdown)
@@ -1197,7 +1198,7 @@ void convertCppComments(BufStr *inBuf,BufStr *outBuf,const char *fileName)
while (!yyextra->condStack.empty())
{
const CondCtx &ctx = yyextra->condStack.top();
- QCString sectionInfo = " ";
+ QCString sectionInfo(" ");
if (ctx.sectionId!=" ") sectionInfo.sprintf(" with label '%s' ",ctx.sectionId.stripWhiteSpace().data());
warn(yyextra->fileName,ctx.lineNr,"Conditional section%sdoes not have "
"a corresponding \\endcond command within this file.",sectionInfo.data());
@@ -1205,7 +1206,7 @@ void convertCppComments(BufStr *inBuf,BufStr *outBuf,const char *fileName)
}
if (yyextra->nestingCount>0 && yyextra->lang!=SrcLangExt_Markdown && yyextra->lang!=SrcLangExt_Fortran)
{
- QCString tmp= "(probable line reference: ";
+ QCString tmp("(probable line reference: ");
bool first = TRUE;
while (!yyextra->commentStack.empty())
{
@@ -1224,10 +1225,10 @@ void convertCppComments(BufStr *inBuf,BufStr *outBuf,const char *fileName)
{
yyextra->outBuf->at(yyextra->outBuf->curPos())='\0';
Debug::print(Debug::CommentCnv,0,"-----------\nCommentCnv: %s\n"
- "output=[\n%s]\n-----------\n",fileName,yyextra->outBuf->data()
+ "output=[\n%s]\n-----------\n",qPrint(fileName),yyextra->outBuf->data()
);
}
- printlex(yy_flex_debug, FALSE, __FILE__, fileName);
+ printlex(yy_flex_debug, FALSE, __FILE__, qPrint(fileName));
commentcnvYYlex_destroy(yyscanner);
}
diff --git a/src/commentscan.h b/src/commentscan.h
index a111352..d9910d7 100644
--- a/src/commentscan.h
+++ b/src/commentscan.h
@@ -81,12 +81,12 @@ class CommentScanner
bool markdownEnabled
);
void initGroupInfo(Entry *entry);
- void enterFile(const char *fileName,int lineNr);
- void leaveFile(const char *fileName,int lineNr);
- void enterCompound(const char *fileName,int line,const char *name);
- void leaveCompound(const char *fileName,int line,const char *name);
- void open(Entry *e,const char *fileName,int line,bool implicit=false);
- void close(Entry *e,const char *fileName,int line,bool foundInline,bool implicit=false);
+ void enterFile(const QCString &fileName,int lineNr);
+ void leaveFile(const QCString &fileName,int lineNr);
+ void enterCompound(const QCString &fileName,int line,const QCString &name);
+ void leaveCompound(const QCString &fileName,int line,const QCString &name);
+ void open(Entry *e,const QCString &fileName,int line,bool implicit=false);
+ void close(Entry *e,const QCString &fileName,int line,bool foundInline,bool implicit=false);
private:
struct Private;
std::unique_ptr<Private> p;
diff --git a/src/commentscan.l b/src/commentscan.l
index 89b8052..399f5fb 100644
--- a/src/commentscan.l
+++ b/src/commentscan.l
@@ -37,9 +37,7 @@
#include <assert.h>
#include <ctype.h>
-#include <qcstring.h>
-#include <qcstringlist.h>
-
+#include "qcstring.h"
#include "cite.h"
#include "commentscan.h"
#include "condparser.h"
@@ -60,89 +58,90 @@
#define USE_STATE2STRING 0
// forward declarations
-static bool handleBrief(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleFn(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleDef(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleOverload(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleEnum(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleDefGroup(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleAddToGroup(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleWeakGroup(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleNamespace(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handlePackage(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleClass(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleHeaderFile(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleProtocol(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleCategory(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleUnion(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleStruct(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleInterface(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleIdlException(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handlePage(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleMainpage(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleFile(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleDir(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleExample(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleDetails(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleNoop(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleName(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleTodo(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleTest(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleBug(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleSubpage(yyscan_t yyscanner,const QCString &s, const QCStringList &);
-static bool handleDeprecated(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleXRefItem(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleRelated(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleRelatedAlso(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleMemberOf(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleRefItem(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleSection(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleAnchor(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleCite(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleFormatBlock(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleAddIndex(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleIf(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleIfNot(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleElseIf(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleElse(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleEndIf(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleIngroup(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleNoSubGrouping(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleShowInitializer(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleHideInitializer(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleCallgraph(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleHideCallgraph(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleCallergraph(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleHideCallergraph(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleReferencedByRelation(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleHideReferencedByRelation(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleReferencesRelation(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleHideReferencesRelation(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleInternal(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleStatic(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handlePure(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handlePrivate(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handlePrivateSection(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleProtected(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleProtectedSection(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handlePublic(yyscan_t yyscanner,const QCString &s, const QCStringList &);
-static bool handlePublicSection(yyscan_t yyscanner,const QCString &s, const QCStringList &);
-static bool handleToc(yyscan_t yyscanner,const QCString &s, const QCStringList &);
-static bool handleInherit(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleExtends(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleCopyDoc(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleCopyBrief(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleCopyDetails(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleParBlock(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleEndParBlock(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleParam(yyscan_t yyscanner,const QCString &, const QCStringList &);
-static bool handleRetval(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleBrief(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleFn(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleDef(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleOverload(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleEnum(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleDefGroup(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleAddToGroup(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleWeakGroup(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleNamespace(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handlePackage(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleConcept(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleClass(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleHeaderFile(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleProtocol(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleCategory(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleUnion(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleStruct(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleInterface(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleIdlException(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handlePage(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleMainpage(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleFile(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleDir(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleExample(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleDetails(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleNoop(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleName(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleTodo(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleTest(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleBug(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleSubpage(yyscan_t yyscanner,const QCString &s, const StringVector &);
+static bool handleDeprecated(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleXRefItem(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleRelated(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleRelatedAlso(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleMemberOf(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleRefItem(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleSection(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleAnchor(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleCite(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleFormatBlock(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleAddIndex(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleIf(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleIfNot(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleElseIf(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleElse(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleEndIf(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleIngroup(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleNoSubGrouping(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleShowInitializer(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleHideInitializer(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleCallgraph(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleHideCallgraph(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleCallergraph(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleHideCallergraph(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleReferencedByRelation(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleHideReferencedByRelation(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleReferencesRelation(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleHideReferencesRelation(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleInternal(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleStatic(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handlePure(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handlePrivate(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handlePrivateSection(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleProtected(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleProtectedSection(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handlePublic(yyscan_t yyscanner,const QCString &s, const StringVector &);
+static bool handlePublicSection(yyscan_t yyscanner,const QCString &s, const StringVector &);
+static bool handleToc(yyscan_t yyscanner,const QCString &s, const StringVector &);
+static bool handleInherit(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleExtends(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleCopyDoc(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleCopyBrief(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleCopyDetails(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleParBlock(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleEndParBlock(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleParam(yyscan_t yyscanner,const QCString &, const StringVector &);
+static bool handleRetval(yyscan_t yyscanner,const QCString &, const StringVector &);
#if USE_STATE2STRING
static const char *stateToString(int state);
#endif
-typedef bool (*DocCmdFunc)(yyscan_t yyscanner,const QCString &name, const QCStringList &optList);
+typedef bool (*DocCmdFunc)(yyscan_t yyscanner,const QCString &name, const StringVector &optList);
enum class CommandSpacing
{
@@ -178,6 +177,7 @@ static const std::map< std::string, DocCmdMap > docCmdMap =
{ "cite", { &handleCite, CommandSpacing::Inline }},
{ "class", { &handleClass, CommandSpacing::Invisible }},
{ "code", { &handleFormatBlock, CommandSpacing::Block }},
+ { "concept", { &handleConcept, CommandSpacing::Invisible }},
{ "copybrief", { &handleCopyBrief, CommandSpacing::Invisible }},
{ "copydetails", { &handleCopyDetails, CommandSpacing::Block }},
{ "copydoc", { &handleCopyDoc, CommandSpacing::Block }},
@@ -425,14 +425,15 @@ static void initParser(yyscan_t yyscanner);
static bool makeStructuralIndicator(yyscan_t yyscanner,Entry::Sections s);
static void lineCount(yyscan_t yyscanner);
static void addXRefItem(yyscan_t yyscanner,
- const char *listName,const char *itemTitle,
- const char *listTitle,bool append);
+ const QCString &listName,const QCString &itemTitle,
+ const QCString &listTitle,bool append);
static QCString addFormula(yyscan_t yyscanner);
static void checkFormula(yyscan_t yyscanner);
static void addSection(yyscan_t yyscanner);
static inline void setOutput(yyscan_t yyscanner,OutputContext ctx);
-static void addAnchor(yyscan_t yyscanner,const char *anchor);
+static void addAnchor(yyscan_t yyscanner,const QCString &anchor);
static inline void addOutput(yyscan_t yyscanner,const char *s);
+static inline void addOutput(yyscan_t yyscanner,const QCString &s);
static inline void addOutput(yyscan_t yyscanner,char c);
static void endBrief(yyscan_t yyscanner,bool addToOutput=TRUE);
static void handleGuard(yyscan_t yyscanner,const QCString &expr);
@@ -520,6 +521,7 @@ STopt [^\n@\\]*
%x EnumDocArg1
%x NameSpaceDocArg1
%x PackageDocArg1
+%x ConceptDocArg1
%x GroupDocArg1
%x GroupDocArg2
%x SectionLabel
@@ -613,7 +615,7 @@ STopt [^\n@\\]*
addOutput(yyscanner,yytext);
}
<Comment>"<"{CAPTION}{ATTR}">" {
- QCString tag=yytext;
+ QCString tag(yytext);
int s=tag.find("id=");
if (s!=-1) // command has id attribute
{
@@ -668,19 +670,19 @@ STopt [^\n@\\]*
if ((idx > 1) && (yytext[idx-1] == 'f') && (yytext[idx-2] == '\\' || yytext[idx-2] =='@')) REJECT;
int idxEnd = fullMatch.find("}",idx+1);
QCString cmdName;
- QCStringList optList;
+ StringVector optList;
if (idx == -1) // no options
{
- cmdName = QCString(yytext).stripWhiteSpace().data()+1; // to remove {CMD}
+ cmdName = QCString(yytext).stripWhiteSpace().mid(1); // to remove {CMD}
}
else // options present
{
- cmdName = fullMatch.left(idx).stripWhiteSpace().data()+1; // to remove {CMD}
+ cmdName = fullMatch.left(idx).stripWhiteSpace().mid(1); // to remove {CMD}
QCString optStr = fullMatch.mid(idx+1,idxEnd-idx-1).stripWhiteSpace();
- optList = QCStringList::split(',',optStr);
+ optList = split(optStr.str(),",");
}
- auto it = docCmdMap.find(cmdName.data());
- //printf("lookup command '%s' found=%d\n",cmdName.data(),it!=docCmdMap.end());
+ auto it = docCmdMap.find(cmdName.str());
+ //printf("lookup command '%s' found=%d\n",qPrint(cmdName),it!=docCmdMap.end());
if (it!=docCmdMap.end()) // special action is required
{
int i=0;
@@ -727,9 +729,9 @@ STopt [^\n@\\]*
addOutput(yyscanner,yytext);
}
<Comment>{B}*{CMD}"~"[a-z_A-Z-]* { // language switch command
- QCString langId = QCString(yytext).stripWhiteSpace().data()+2;
+ QCString langId = QCString(yytext).stripWhiteSpace().mid(2);
if (!langId.isEmpty() &&
- qstricmp(Config_getEnum(OUTPUT_LANGUAGE),langId)!=0)
+ qstricmp(Config_getEnum(OUTPUT_LANGUAGE).data(),langId.data())!=0)
{ // enable language specific section
BEGIN(SkipLang);
}
@@ -737,7 +739,7 @@ STopt [^\n@\\]*
<Comment>{B}*{CMD}"f{"[^}\n]+"}"("{"?) { // start of a formula with custom environment
setOutput(yyscanner,OutputDoc);
yyextra->formulaText="\\begin";
- yyextra->formulaEnv=QCString(yytext).stripWhiteSpace().data()+2;
+ yyextra->formulaEnv=QCString(yytext).stripWhiteSpace().mid(2);
if (yyextra->formulaEnv.at(yyextra->formulaEnv.length()-1)=='{')
{
// remove trailing open brace
@@ -983,7 +985,7 @@ STopt [^\n@\\]*
/* ------------ handle argument of namespace command --------------- */
<NameSpaceDocArg1>{SCOPENAME} { // handle argument
- yyextra->current->name = substitute(yytext,".","::");
+ yyextra->current->name = substitute(QCString(yytext),QCString("."),QCString("::"));
BEGIN( Comment );
}
<NameSpaceDocArg1>{LC} { // line continuation
@@ -1026,14 +1028,36 @@ STopt [^\n@\\]*
<PackageDocArg1>. { // ignore other stuff
}
+ /* ------------ handle argument of concept command --------------- */
+
+<ConceptDocArg1>{SCOPEID} { // handle argument
+ yyextra->current->name = yytext;
+ BEGIN( Comment );
+ }
+<ConceptDocArg1>{LC} { // line continuation
+ yyextra->lineNr++;
+ addOutput(yyscanner,'\n');
+ }
+<ConceptDocArg1>{DOCNL} { // missing argument
+ warn(yyextra->fileName,yyextra->lineNr,
+ "missing argument after "
+ "\\concept."
+ );
+ unput_string(yytext,yyleng);
+ BEGIN( Comment );
+ }
+<ConceptDocArg1>. { // ignore other stuff
+ }
+
+
/* ------ handle argument of class/struct/union command --------------- */
<ClassDocArg1>{SCOPENAME}{TMPLSPEC} {
- yyextra->current->name = substitute(removeRedundantWhiteSpace(yytext),".","::");
+ yyextra->current->name = substitute(removeRedundantWhiteSpace(QCString(yytext)),".","::");
BEGIN( ClassDocArg2 );
}
<ClassDocArg1>{SCOPENAME} { // first argument
- yyextra->current->name = substitute(yytext,".","::");
+ yyextra->current->name = substitute(QCString(yytext),".","::");
if (yyextra->current->section==Entry::PROTOCOLDOC_SEC)
{
yyextra->current->name+="-p";
@@ -1042,7 +1066,7 @@ STopt [^\n@\\]*
BEGIN( ClassDocArg2 );
}
<CategoryDocArg1>{SCOPENAME}{B}*"("[^\)]+")" {
- yyextra->current->name = substitute(yytext,".","::");
+ yyextra->current->name = substitute(QCString(yytext),".","::");
BEGIN( ClassDocArg2 );
}
<ClassDocArg1,CategoryDocArg1>{LC} { // line continuation
@@ -1052,7 +1076,7 @@ STopt [^\n@\\]*
<ClassDocArg1,CategoryDocArg1>{DOCNL} {
warn(yyextra->fileName,yyextra->lineNr,
"missing argument after "
- "'\\%s'.",yyextra->currentCmd.data()
+ "'\\%s'.",qPrint(yyextra->currentCmd)
);
//addOutput(yyscanner,'\n');
//if (*yytext=='\n') yyextra->lineNr++;
@@ -1140,7 +1164,7 @@ STopt [^\n@\\]*
{
warn(yyextra->fileName,yyextra->lineNr,
"missing title after "
- "\\defgroup %s", yyextra->current->name.data()
+ "\\defgroup %s", qPrint(yyextra->current->name)
);
}
unput_string(yytext,yyleng);
@@ -1183,7 +1207,7 @@ STopt [^\n@\\]*
}
<PageDocArg2>{CMD}[<>] {
// bug 748927
- QCString tmp = yytext;
+ QCString tmp(yytext);
tmp = substitute(substitute(tmp,"@<","&lt;"),"@>","&gt;");
tmp = substitute(substitute(tmp,"\\<","&lt;"),"\\>","&gt;");
yyextra->current->args += tmp;
@@ -1198,6 +1222,10 @@ STopt [^\n@\\]*
<ParamArg1>"," {
addOutput(yyscanner," , ");
}
+<ParamArg1>{DOCNL} {
+ if (*yytext=='\n') yyextra->lineNr++;
+ addOutput(yyscanner," ");
+ }
<ParamArg1>{ID} {
addOutput(yyscanner,yytext);
BEGIN( Comment );
@@ -1306,7 +1334,7 @@ STopt [^\n@\\]*
}
<RelatesParam1>{DOCNL} { // missing argument
warn(yyextra->fileName,yyextra->lineNr,
- "Missing argument of '\\%s' command",yyextra->currentCmd.data()
+ "Missing argument of '\\%s' command",qPrint(yyextra->currentCmd)
);
unput_string(yytext,yyleng);
//if (*yytext=='\n') yyextra->lineNr++;
@@ -1392,7 +1420,7 @@ STopt [^\n@\\]*
addOutput(yyscanner,yytext);
// we add subpage labels as a kind of "inheritance" relation to prevent
// needing to add another list to the Entry class.
- yyextra->current->extends.push_back(BaseInfo(yytext,Public,Normal));
+ yyextra->current->extends.push_back(BaseInfo(QCString(yytext),Public,Normal));
BEGIN(SubpageTitle);
}
<SubpageLabel>{DOCNL} { // missing argument
@@ -1419,7 +1447,7 @@ STopt [^\n@\\]*
/* ----- handle arguments of the anchor command ------- */
<AnchorLabel>{LABELID} { // found argument
- addAnchor(yyscanner,yytext);
+ addAnchor(yyscanner,QCString(yytext));
addOutput(yyscanner,yytext);
BEGIN( Comment );
}
@@ -1474,7 +1502,7 @@ STopt [^\n@\\]*
if (yyextra->commentCount<0)
{
warn(yyextra->fileName,yyextra->lineNr,
- "found */ without matching /* while inside a \\%s block! Perhaps a missing \\end%s?\n",yyextra->blockName.data(),yyextra->blockName.data());
+ "found */ without matching /* while inside a \\%s block! Perhaps a missing \\end%s?\n",qPrint(yyextra->blockName),qPrint(yyextra->blockName));
}
}
}
@@ -1486,7 +1514,7 @@ STopt [^\n@\\]*
if (yyextra->blockName=="startuml") endTag="enduml";
warn(yyextra->fileName,yyextra->lineNr,
"reached end of comment while inside a \\%s block; check for missing \\%s tag!",
- yyextra->blockName.data(),endTag.data()
+ qPrint(yyextra->blockName),qPrint(endTag)
);
yyterminate();
}
@@ -1515,12 +1543,12 @@ STopt [^\n@\\]*
}
<GuardExpr>\n {
warn(yyextra->fileName,yyextra->lineNr,
- "invalid expression '%s' for yyextra->guards",yyextra->guardExpr.data());
+ "invalid expression '%s' for yyextra->guards",qPrint(yyextra->guardExpr));
unput(*yytext);
BEGIN(GuardParam);
}
<GuardParam>{B}*[a-z_A-Z0-9.\-]+ { // parameter of if/ifnot yyextra->guards
- handleGuard(yyscanner,yytext);
+ handleGuard(yyscanner,QCString(yytext));
}
<GuardParam>{DOCNL} { // end of argument
if (*yytext=='\n') yyextra->lineNr++;
@@ -1711,7 +1739,7 @@ STopt [^\n@\\]*
<InGroupParam>{LABELID} { // group id
yyextra->current->groups.push_back(
- Grouping(yytext, Grouping::GROUPING_INGROUP)
+ Grouping(QCString(yytext), Grouping::GROUPING_INGROUP)
);
yyextra->inGroupParamFound=TRUE;
}
@@ -1796,7 +1824,7 @@ STopt [^\n@\\]*
<InheritParam>({ID}("::"|"."))*{ID} { // found argument
yyextra->current->extends.push_back(
- BaseInfo(removeRedundantWhiteSpace(yytext),Public,Normal)
+ BaseInfo(removeRedundantWhiteSpace(QCString(yytext)),Public,Normal)
);
BEGIN( Comment );
}
@@ -1819,13 +1847,13 @@ STopt [^\n@\\]*
<ExtendsParam>({ID}("::"|"."))*{ID} { // found argument
yyextra->current->extends.push_back(
- BaseInfo(removeRedundantWhiteSpace(yytext),Public,Normal)
+ BaseInfo(removeRedundantWhiteSpace(QCString(yytext)),Public,Normal)
);
BEGIN( Comment );
}
<ExtendsParam>{DOCNL} { // missing argument
warn(yyextra->fileName,yyextra->lineNr,
- "'\\%s' command has no argument",yyextra->currentCmd.data()
+ "'\\%s' command has no argument",qPrint(yyextra->currentCmd)
);
//if (*yytext=='\n') yyextra->lineNr++;
//addOutput(yyscanner,'\n');
@@ -1838,9 +1866,9 @@ STopt [^\n@\\]*
/* ----- handle language specific sections ------- */
<SkipLang>[\\@]"~"[a-zA-Z-]* { /* language switch */
- QCString langId = &yytext[2];
+ QCString langId(&yytext[2]);
if (langId.isEmpty() ||
- qstricmp(Config_getEnum(OUTPUT_LANGUAGE),langId)==0)
+ qstricmp(Config_getEnum(OUTPUT_LANGUAGE).data(),langId.data())==0)
{ // enable language specific section
BEGIN(Comment);
}
@@ -1897,19 +1925,23 @@ STopt [^\n@\\]*
addOutput(yyscanner,yytext);
}
+ /*
+<*>. { fprintf(stderr,"Lex scanner %s %sdefault rule for state %s: #%s#\n", __FILE__,yyextra->fileName ? ("(" + yyextra->fileName +") ").data(): "",stateToString(YY_START),yytext);}
+<*>\n { fprintf(stderr,"Lex scanner %s %sdefault rule newline for state %s.\n", __FILE__, yyextra->fileName ? ("(" + yyextra->fileName +") ").data(): "",stateToString(YY_START));}
+ */
%%
//----------------------------------------------------------------------------
-static bool handleBrief(yyscan_t yyscanner,const QCString &, const QCStringList &)
+static bool handleBrief(yyscan_t yyscanner,const QCString &, const StringVector &)
{
//printf("handleBrief\n");
setOutput(yyscanner,OutputBrief);
return FALSE;
}
-static bool handleFn(yyscan_t yyscanner,const QCString &, const QCStringList &)
+static bool handleFn(yyscan_t yyscanner,const QCString &, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
bool stop=makeStructuralIndicator(yyscanner,Entry::MEMBERDOC_SEC);
@@ -1919,7 +1951,7 @@ static bool handleFn(yyscan_t yyscanner,const QCString &, const QCStringList &)
return stop;
}
-static bool handleDef(yyscan_t yyscanner,const QCString &, const QCStringList &)
+static bool handleDef(yyscan_t yyscanner,const QCString &, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
bool stop=makeStructuralIndicator(yyscanner,Entry::DEFINEDOC_SEC);
@@ -1928,7 +1960,7 @@ static bool handleDef(yyscan_t yyscanner,const QCString &, const QCStringList &)
return stop;
}
-static bool handleOverload(yyscan_t yyscanner,const QCString &, const QCStringList &)
+static bool handleOverload(yyscan_t yyscanner,const QCString &, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
yyextra->functionProto.resize(0);
@@ -1936,7 +1968,7 @@ static bool handleOverload(yyscan_t yyscanner,const QCString &, const QCStringLi
return FALSE;
}
-static bool handleEnum(yyscan_t yyscanner,const QCString &, const QCStringList &)
+static bool handleEnum(yyscan_t yyscanner,const QCString &, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
bool stop=makeStructuralIndicator(yyscanner,Entry::ENUMDOC_SEC);
@@ -1944,7 +1976,7 @@ static bool handleEnum(yyscan_t yyscanner,const QCString &, const QCStringList &
return stop;
}
-static bool handleDefGroup(yyscan_t yyscanner,const QCString &, const QCStringList &)
+static bool handleDefGroup(yyscan_t yyscanner,const QCString &, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
bool stop=makeStructuralIndicator(yyscanner,Entry::GROUPDOC_SEC);
@@ -1953,7 +1985,7 @@ static bool handleDefGroup(yyscan_t yyscanner,const QCString &, const QCStringLi
return stop;
}
-static bool handleAddToGroup(yyscan_t yyscanner,const QCString &, const QCStringList &)
+static bool handleAddToGroup(yyscan_t yyscanner,const QCString &, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
bool stop=makeStructuralIndicator(yyscanner,Entry::GROUPDOC_SEC);
@@ -1962,7 +1994,7 @@ static bool handleAddToGroup(yyscan_t yyscanner,const QCString &, const QCString
return stop;
}
-static bool handleWeakGroup(yyscan_t yyscanner,const QCString &, const QCStringList &)
+static bool handleWeakGroup(yyscan_t yyscanner,const QCString &, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
bool stop=makeStructuralIndicator(yyscanner,Entry::GROUPDOC_SEC);
@@ -1971,7 +2003,7 @@ static bool handleWeakGroup(yyscan_t yyscanner,const QCString &, const QCStringL
return stop;
}
-static bool handleNamespace(yyscan_t yyscanner,const QCString &, const QCStringList &)
+static bool handleNamespace(yyscan_t yyscanner,const QCString &, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
bool stop=makeStructuralIndicator(yyscanner,Entry::NAMESPACEDOC_SEC);
@@ -1979,7 +2011,7 @@ static bool handleNamespace(yyscan_t yyscanner,const QCString &, const QCStringL
return stop;
}
-static bool handlePackage(yyscan_t yyscanner,const QCString &, const QCStringList &)
+static bool handlePackage(yyscan_t yyscanner,const QCString &, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
bool stop=makeStructuralIndicator(yyscanner,Entry::PACKAGEDOC_SEC);
@@ -1987,7 +2019,7 @@ static bool handlePackage(yyscan_t yyscanner,const QCString &, const QCStringLis
return stop;
}
-static bool handleClass(yyscan_t yyscanner,const QCString &cmd, const QCStringList &)
+static bool handleClass(yyscan_t yyscanner,const QCString &cmd, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
bool stop=makeStructuralIndicator(yyscanner,Entry::CLASSDOC_SEC);
@@ -1996,14 +2028,23 @@ static bool handleClass(yyscan_t yyscanner,const QCString &cmd, const QCStringLi
return stop;
}
-static bool handleHeaderFile(yyscan_t yyscanner,const QCString &, const QCStringList &)
+static bool handleConcept(yyscan_t yyscanner,const QCString &cmd, const StringVector &)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ bool stop=makeStructuralIndicator(yyscanner,Entry::CONCEPTDOC_SEC);
+ yyextra->currentCmd = cmd;
+ BEGIN( ConceptDocArg1 );
+ return stop;
+}
+
+static bool handleHeaderFile(yyscan_t yyscanner,const QCString &, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
BEGIN( ClassDocArg2 );
return FALSE;
}
-static bool handleProtocol(yyscan_t yyscanner,const QCString &cmd, const QCStringList &)
+static bool handleProtocol(yyscan_t yyscanner,const QCString &cmd, const StringVector &)
{ // Obj-C protocol
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
bool stop=makeStructuralIndicator(yyscanner,Entry::PROTOCOLDOC_SEC);
@@ -2012,7 +2053,7 @@ static bool handleProtocol(yyscan_t yyscanner,const QCString &cmd, const QCStrin
return stop;
}
-static bool handleCategory(yyscan_t yyscanner,const QCString &cmd, const QCStringList &)
+static bool handleCategory(yyscan_t yyscanner,const QCString &cmd, const StringVector &)
{ // Obj-C category
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
bool stop=makeStructuralIndicator(yyscanner,Entry::CATEGORYDOC_SEC);
@@ -2021,7 +2062,7 @@ static bool handleCategory(yyscan_t yyscanner,const QCString &cmd, const QCStrin
return stop;
}
-static bool handleUnion(yyscan_t yyscanner,const QCString &cmd, const QCStringList &)
+static bool handleUnion(yyscan_t yyscanner,const QCString &cmd, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
bool stop=makeStructuralIndicator(yyscanner,Entry::UNIONDOC_SEC);
@@ -2030,7 +2071,7 @@ static bool handleUnion(yyscan_t yyscanner,const QCString &cmd, const QCStringLi
return stop;
}
-static bool handleStruct(yyscan_t yyscanner,const QCString &cmd, const QCStringList &)
+static bool handleStruct(yyscan_t yyscanner,const QCString &cmd, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
bool stop=makeStructuralIndicator(yyscanner,Entry::STRUCTDOC_SEC);
@@ -2039,7 +2080,7 @@ static bool handleStruct(yyscan_t yyscanner,const QCString &cmd, const QCStringL
return stop;
}
-static bool handleInterface(yyscan_t yyscanner,const QCString &cmd, const QCStringList &)
+static bool handleInterface(yyscan_t yyscanner,const QCString &cmd, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
bool stop=makeStructuralIndicator(yyscanner,Entry::INTERFACEDOC_SEC);
@@ -2048,7 +2089,7 @@ static bool handleInterface(yyscan_t yyscanner,const QCString &cmd, const QCStri
return stop;
}
-static bool handleIdlException(yyscan_t yyscanner,const QCString &cmd, const QCStringList &)
+static bool handleIdlException(yyscan_t yyscanner,const QCString &cmd, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
bool stop=makeStructuralIndicator(yyscanner,Entry::EXCEPTIONDOC_SEC);
@@ -2057,7 +2098,7 @@ static bool handleIdlException(yyscan_t yyscanner,const QCString &cmd, const QCS
return stop;
}
-static bool handlePage(yyscan_t yyscanner,const QCString &, const QCStringList &)
+static bool handlePage(yyscan_t yyscanner,const QCString &, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
bool stop=makeStructuralIndicator(yyscanner,Entry::PAGEDOC_SEC);
@@ -2065,7 +2106,7 @@ static bool handlePage(yyscan_t yyscanner,const QCString &, const QCStringList &
return stop;
}
-static bool handleMainpage(yyscan_t yyscanner,const QCString &, const QCStringList &)
+static bool handleMainpage(yyscan_t yyscanner,const QCString &, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
bool stop=makeStructuralIndicator(yyscanner,Entry::MAINPAGEDOC_SEC);
@@ -2078,7 +2119,7 @@ static bool handleMainpage(yyscan_t yyscanner,const QCString &, const QCStringLi
return stop;
}
-static bool handleFile(yyscan_t yyscanner,const QCString &, const QCStringList &)
+static bool handleFile(yyscan_t yyscanner,const QCString &, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
bool stop=makeStructuralIndicator(yyscanner,Entry::FILEDOC_SEC);
@@ -2090,7 +2131,7 @@ static bool handleFile(yyscan_t yyscanner,const QCString &, const QCStringList &
return stop;
}
-static bool handleParam(yyscan_t yyscanner,const QCString &, const QCStringList &)
+static bool handleParam(yyscan_t yyscanner,const QCString &, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
// we need process param and retval arguments to escape leading underscores in case of
@@ -2100,7 +2141,7 @@ static bool handleParam(yyscan_t yyscanner,const QCString &, const QCStringList
return FALSE;
}
-static bool handleRetval(yyscan_t yyscanner,const QCString &, const QCStringList &)
+static bool handleRetval(yyscan_t yyscanner,const QCString &, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
addOutput(yyscanner,"@retval ");
@@ -2108,7 +2149,7 @@ static bool handleRetval(yyscan_t yyscanner,const QCString &, const QCStringList
return FALSE;
}
-static bool handleDir(yyscan_t yyscanner,const QCString &, const QCStringList &)
+static bool handleDir(yyscan_t yyscanner,const QCString &, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
bool stop=makeStructuralIndicator(yyscanner,Entry::DIRDOC_SEC);
@@ -2117,14 +2158,12 @@ static bool handleDir(yyscan_t yyscanner,const QCString &, const QCStringList &)
return stop;
}
-static bool handleExample(yyscan_t yyscanner,const QCString &cmd, const QCStringList &optList)
+static bool handleExample(yyscan_t yyscanner,const QCString &cmd, const StringVector &optList)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
Entry::Sections section=Entry::EXAMPLE_SEC;
- QCStringList::ConstIterator it;
- for ( it = optList.begin(); it != optList.end(); ++it )
+ for (const auto &opt : optList)
{
- QCString opt = (*it).stripWhiteSpace().lower();
if (opt=="lineno")
{
section=Entry::EXAMPLE_LINENO_SEC;
@@ -2132,7 +2171,7 @@ static bool handleExample(yyscan_t yyscanner,const QCString &cmd, const QCString
else
{
warn(yyextra->fileName,yyextra->lineNr,
- "unsupported option '%s' for command '\\%s'",qPrint(opt),qPrint(cmd));
+ "unsupported option '%s' for command '\\%s'",opt.c_str(),qPrint(cmd));
}
}
bool stop=makeStructuralIndicator(yyscanner,section);
@@ -2141,7 +2180,7 @@ static bool handleExample(yyscan_t yyscanner,const QCString &cmd, const QCString
return stop;
}
-static bool handleDetails(yyscan_t yyscanner,const QCString &, const QCStringList &)
+static bool handleDetails(yyscan_t yyscanner,const QCString &, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
if (yyextra->inContext!=OutputBrief)
@@ -2153,14 +2192,14 @@ static bool handleDetails(yyscan_t yyscanner,const QCString &, const QCStringLis
return FALSE;
}
-static bool handleNoop(yyscan_t yyscanner,const QCString &, const QCStringList &)
+static bool handleNoop(yyscan_t yyscanner,const QCString &, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
BEGIN( Noop );
return FALSE;
}
-static bool handleName(yyscan_t yyscanner,const QCString &, const QCStringList &)
+static bool handleName(yyscan_t yyscanner,const QCString &, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
bool stop=makeStructuralIndicator(yyscanner,Entry::MEMBERGRP_SEC);
@@ -2176,7 +2215,7 @@ static bool handleName(yyscan_t yyscanner,const QCString &, const QCStringList &
return stop;
}
-static bool handleTodo(yyscan_t yyscanner,const QCString &, const QCStringList &)
+static bool handleTodo(yyscan_t yyscanner,const QCString &, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
yyextra->newXRefKind = XRef_Todo;
@@ -2185,7 +2224,7 @@ static bool handleTodo(yyscan_t yyscanner,const QCString &, const QCStringList &
return FALSE;
}
-static bool handleTest(yyscan_t yyscanner,const QCString &, const QCStringList &)
+static bool handleTest(yyscan_t yyscanner,const QCString &, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
yyextra->newXRefKind = XRef_Test;
@@ -2194,7 +2233,7 @@ static bool handleTest(yyscan_t yyscanner,const QCString &, const QCStringList &
return FALSE;
}
-static bool handleBug(yyscan_t yyscanner,const QCString &, const QCStringList &)
+static bool handleBug(yyscan_t yyscanner,const QCString &, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
yyextra->newXRefKind = XRef_Bug;
@@ -2203,7 +2242,7 @@ static bool handleBug(yyscan_t yyscanner,const QCString &, const QCStringList &)
return FALSE;
}
-static bool handleDeprecated(yyscan_t yyscanner,const QCString &, const QCStringList &)
+static bool handleDeprecated(yyscan_t yyscanner,const QCString &, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
yyextra->newXRefKind = XRef_Deprecated;
@@ -2212,7 +2251,7 @@ static bool handleDeprecated(yyscan_t yyscanner,const QCString &, const QCString
return FALSE;
}
-static bool handleXRefItem(yyscan_t yyscanner,const QCString &, const QCStringList &)
+static bool handleXRefItem(yyscan_t yyscanner,const QCString &, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
yyextra->newXRefKind = XRef_Item;
@@ -2220,7 +2259,7 @@ static bool handleXRefItem(yyscan_t yyscanner,const QCString &, const QCStringLi
return FALSE;
}
-static bool handleParBlock(yyscan_t yyscanner,const QCString &, const QCStringList &)
+static bool handleParBlock(yyscan_t yyscanner,const QCString &, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
if (yyextra->insideParBlock)
@@ -2238,7 +2277,7 @@ static bool handleParBlock(yyscan_t yyscanner,const QCString &, const QCStringLi
return FALSE;
}
-static bool handleEndParBlock(yyscan_t yyscanner,const QCString &, const QCStringList &)
+static bool handleEndParBlock(yyscan_t yyscanner,const QCString &, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
if (!yyextra->insideParBlock)
@@ -2252,7 +2291,7 @@ static bool handleEndParBlock(yyscan_t yyscanner,const QCString &, const QCStrin
return FALSE;
}
-static bool handleRelated(yyscan_t yyscanner,const QCString &cmd, const QCStringList &)
+static bool handleRelated(yyscan_t yyscanner,const QCString &cmd, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
if (!yyextra->current->relates.isEmpty())
@@ -2265,7 +2304,7 @@ static bool handleRelated(yyscan_t yyscanner,const QCString &cmd, const QCString
return FALSE;
}
-static bool handleRelatedAlso(yyscan_t yyscanner,const QCString &cmd, const QCStringList &)
+static bool handleRelatedAlso(yyscan_t yyscanner,const QCString &cmd, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
if (!yyextra->current->relates.isEmpty())
@@ -2279,7 +2318,7 @@ static bool handleRelatedAlso(yyscan_t yyscanner,const QCString &cmd, const QCSt
return FALSE;
}
-static bool handleMemberOf(yyscan_t yyscanner,const QCString &cmd, const QCStringList &)
+static bool handleMemberOf(yyscan_t yyscanner,const QCString &cmd, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
if (!yyextra->current->relates.isEmpty())
@@ -2293,7 +2332,7 @@ static bool handleMemberOf(yyscan_t yyscanner,const QCString &cmd, const QCStrin
return FALSE;
}
-static bool handleRefItem(yyscan_t yyscanner,const QCString &, const QCStringList &)
+static bool handleRefItem(yyscan_t yyscanner,const QCString &, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
addOutput(yyscanner,"@refitem ");
@@ -2301,7 +2340,7 @@ static bool handleRefItem(yyscan_t yyscanner,const QCString &, const QCStringLis
return FALSE;
}
-static bool handleSection(yyscan_t yyscanner,const QCString &s, const QCStringList &)
+static bool handleSection(yyscan_t yyscanner,const QCString &s, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
setOutput(yyscanner,OutputDoc);
@@ -2314,7 +2353,7 @@ static bool handleSection(yyscan_t yyscanner,const QCString &s, const QCStringLi
return FALSE;
}
-static bool handleSubpage(yyscan_t yyscanner,const QCString &s, const QCStringList &)
+static bool handleSubpage(yyscan_t yyscanner,const QCString &s, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
if (yyextra->current->section!=Entry::EMPTY_SEC &&
@@ -2335,7 +2374,7 @@ static bool handleSubpage(yyscan_t yyscanner,const QCString &s, const QCStringLi
return FALSE;
}
-static bool handleAnchor(yyscan_t yyscanner,const QCString &s, const QCStringList &)
+static bool handleAnchor(yyscan_t yyscanner,const QCString &s, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
addOutput(yyscanner,"@"+s+" ");
@@ -2343,7 +2382,7 @@ static bool handleAnchor(yyscan_t yyscanner,const QCString &s, const QCStringLis
return FALSE;
}
-static bool handleCite(yyscan_t yyscanner,const QCString &s, const QCStringList &)
+static bool handleCite(yyscan_t yyscanner,const QCString &s, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
if (!yyextra->spaceBeforeCmd.isEmpty())
@@ -2356,25 +2395,25 @@ static bool handleCite(yyscan_t yyscanner,const QCString &s, const QCStringList
return FALSE;
}
-static bool handleFormatBlock(yyscan_t yyscanner,const QCString &s, const QCStringList &optList)
+static bool handleFormatBlock(yyscan_t yyscanner,const QCString &s, const StringVector &optList)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
- if (optList.isEmpty())
+ if (optList.empty())
{
addOutput(yyscanner,"@"+s+" ");
}
else
{
- addOutput(yyscanner,"@"+s+"{"+optList.join(",")+"} ");
+ addOutput(yyscanner,"@"+s+"{"+QCString(join(optList,","))+"} ");
}
- //printf("handleFormatBlock(%s) with option(%s)\n",s.data(),opt.data());
+ //printf("handleFormatBlock(%s) with option(%s)\n",qPrint(s),qPrint(opt));
yyextra->blockName=s;
yyextra->commentCount=0;
BEGIN(FormatBlock);
return FALSE;
}
-static bool handleAddIndex(yyscan_t yyscanner,const QCString &, const QCStringList &)
+static bool handleAddIndex(yyscan_t yyscanner,const QCString &, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
addOutput(yyscanner,"@addindex ");
@@ -2382,7 +2421,7 @@ static bool handleAddIndex(yyscan_t yyscanner,const QCString &, const QCStringLi
return FALSE;
}
-static bool handleIf(yyscan_t yyscanner,const QCString &, const QCStringList &)
+static bool handleIf(yyscan_t yyscanner,const QCString &, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
yyextra->enabledSectionFound=FALSE;
@@ -2392,7 +2431,7 @@ static bool handleIf(yyscan_t yyscanner,const QCString &, const QCStringList &)
return FALSE;
}
-static bool handleIfNot(yyscan_t yyscanner,const QCString &, const QCStringList &)
+static bool handleIfNot(yyscan_t yyscanner,const QCString &, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
yyextra->enabledSectionFound=FALSE;
@@ -2402,7 +2441,7 @@ static bool handleIfNot(yyscan_t yyscanner,const QCString &, const QCStringList
return FALSE;
}
-static bool handleElseIf(yyscan_t yyscanner,const QCString &, const QCStringList &)
+static bool handleElseIf(yyscan_t yyscanner,const QCString &, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
if (yyextra->guards.empty())
@@ -2419,7 +2458,7 @@ static bool handleElseIf(yyscan_t yyscanner,const QCString &, const QCStringList
return FALSE;
}
-static bool handleElse(yyscan_t yyscanner,const QCString &, const QCStringList &)
+static bool handleElse(yyscan_t yyscanner,const QCString &, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
if (yyextra->guards.empty())
@@ -2435,7 +2474,7 @@ static bool handleElse(yyscan_t yyscanner,const QCString &, const QCStringList &
return FALSE;
}
-static bool handleEndIf(yyscan_t yyscanner,const QCString &, const QCStringList &)
+static bool handleEndIf(yyscan_t yyscanner,const QCString &, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
if (yyextra->guards.empty())
@@ -2457,7 +2496,7 @@ static bool handleEndIf(yyscan_t yyscanner,const QCString &, const QCStringList
return FALSE;
}
-static bool handleIngroup(yyscan_t yyscanner,const QCString &, const QCStringList &)
+static bool handleIngroup(yyscan_t yyscanner,const QCString &, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
yyextra->inGroupParamFound=FALSE;
@@ -2465,84 +2504,84 @@ static bool handleIngroup(yyscan_t yyscanner,const QCString &, const QCStringLis
return FALSE;
}
-static bool handleNoSubGrouping(yyscan_t yyscanner,const QCString &, const QCStringList &)
+static bool handleNoSubGrouping(yyscan_t yyscanner,const QCString &, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
yyextra->current->subGrouping = FALSE;
return FALSE;
}
-static bool handleShowInitializer(yyscan_t yyscanner,const QCString &, const QCStringList &)
+static bool handleShowInitializer(yyscan_t yyscanner,const QCString &, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
yyextra->current->initLines = 100000; // ON
return FALSE;
}
-static bool handleHideInitializer(yyscan_t yyscanner,const QCString &, const QCStringList &)
+static bool handleHideInitializer(yyscan_t yyscanner,const QCString &, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
yyextra->current->initLines = 0; // OFF
return FALSE;
}
-static bool handleCallgraph(yyscan_t yyscanner,const QCString &, const QCStringList &)
+static bool handleCallgraph(yyscan_t yyscanner,const QCString &, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
yyextra->current->callGraph = TRUE; // ON
return FALSE;
}
-static bool handleHideCallgraph(yyscan_t yyscanner,const QCString &, const QCStringList &)
+static bool handleHideCallgraph(yyscan_t yyscanner,const QCString &, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
yyextra->current->callGraph = FALSE; // OFF
return FALSE;
}
-static bool handleCallergraph(yyscan_t yyscanner,const QCString &, const QCStringList &)
+static bool handleCallergraph(yyscan_t yyscanner,const QCString &, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
yyextra->current->callerGraph = TRUE; // ON
return FALSE;
}
-static bool handleHideCallergraph(yyscan_t yyscanner,const QCString &, const QCStringList &)
+static bool handleHideCallergraph(yyscan_t yyscanner,const QCString &, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
yyextra->current->callerGraph = FALSE; // OFF
return FALSE;
}
-static bool handleReferencedByRelation(yyscan_t yyscanner,const QCString &, const QCStringList &)
+static bool handleReferencedByRelation(yyscan_t yyscanner,const QCString &, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
yyextra->current->referencedByRelation = TRUE; // ON
return FALSE;
}
-static bool handleHideReferencedByRelation(yyscan_t yyscanner,const QCString &, const QCStringList &)
+static bool handleHideReferencedByRelation(yyscan_t yyscanner,const QCString &, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
yyextra->current->referencedByRelation = FALSE; // OFF
return FALSE;
}
-static bool handleReferencesRelation(yyscan_t yyscanner,const QCString &, const QCStringList &)
+static bool handleReferencesRelation(yyscan_t yyscanner,const QCString &, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
yyextra->current->referencesRelation = TRUE; // ON
return FALSE;
}
-static bool handleHideReferencesRelation(yyscan_t yyscanner,const QCString &, const QCStringList &)
+static bool handleHideReferencesRelation(yyscan_t yyscanner,const QCString &, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
yyextra->current->referencesRelation = FALSE; // OFF
return FALSE;
}
-static bool handleInternal(yyscan_t yyscanner,const QCString &, const QCStringList &)
+static bool handleInternal(yyscan_t yyscanner,const QCString &, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
if (!Config_getBool(INTERNAL_DOCS))
@@ -2565,72 +2604,71 @@ static bool handleInternal(yyscan_t yyscanner,const QCString &, const QCStringLi
return FALSE;
}
-static bool handleStatic(yyscan_t yyscanner,const QCString &, const QCStringList &)
+static bool handleStatic(yyscan_t yyscanner,const QCString &, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
yyextra->current->stat = TRUE;
return FALSE;
}
-static bool handlePure(yyscan_t yyscanner,const QCString &, const QCStringList &)
+static bool handlePure(yyscan_t yyscanner,const QCString &, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
yyextra->current->virt = Pure;
return FALSE;
}
-static bool handlePrivate(yyscan_t yyscanner,const QCString &, const QCStringList &)
+static bool handlePrivate(yyscan_t yyscanner,const QCString &, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
yyextra->current->protection = Private;
return FALSE;
}
-static bool handlePrivateSection(yyscan_t yyscanner,const QCString &, const QCStringList &)
+static bool handlePrivateSection(yyscan_t yyscanner,const QCString &, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
yyextra->current->protection = yyextra->protection = Private;
return FALSE;
}
-static bool handleProtected(yyscan_t yyscanner,const QCString &, const QCStringList &)
+static bool handleProtected(yyscan_t yyscanner,const QCString &, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
yyextra->current->protection = Protected;
return FALSE;
}
-static bool handleProtectedSection(yyscan_t yyscanner,const QCString &, const QCStringList &)
+static bool handleProtectedSection(yyscan_t yyscanner,const QCString &, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
yyextra->current->protection = yyextra->protection = Protected ;
return FALSE;
}
-static bool handlePublic(yyscan_t yyscanner,const QCString &, const QCStringList &)
+static bool handlePublic(yyscan_t yyscanner,const QCString &, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
yyextra->current->protection = Public;
return FALSE;
}
-static bool handlePublicSection(yyscan_t yyscanner,const QCString &, const QCStringList &)
+static bool handlePublicSection(yyscan_t yyscanner,const QCString &, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
yyextra->current->protection = yyextra->protection = Public;
return FALSE;
}
-static bool handleToc(yyscan_t yyscanner,const QCString &, const QCStringList &optList)
+static bool handleToc(yyscan_t yyscanner,const QCString &, const StringVector &optList)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
if (yyextra->current->section==Entry::PAGEDOC_SEC ||
yyextra->current->section==Entry::MAINPAGEDOC_SEC)
{
- QCStringList::ConstIterator it;
- for ( it = optList.begin(); it != optList.end(); ++it )
+ for (const auto &opt_ : optList)
{
- QCString opt = (*it).stripWhiteSpace().lower();
+ QCString opt = QCString(opt_).stripWhiteSpace().lower();
char dum;
int level = 5;
int i = opt.find(':');
@@ -2638,7 +2676,7 @@ static bool handleToc(yyscan_t yyscanner,const QCString &, const QCStringList &o
{
if (sscanf(opt.right(opt.length() - i - 1).data(),"%d%c",&level,&dum) != 1)
{
- warn(yyextra->fileName,yyextra->lineNr,"Unknown option:level specified with \\tableofcontents: '%s'", (*it).stripWhiteSpace().data());
+ warn(yyextra->fileName,yyextra->lineNr,"Unknown option:level specified with \\tableofcontents: '%s'", qPrint(QCString(opt_).stripWhiteSpace()));
opt = "";
}
else
@@ -2668,7 +2706,7 @@ static bool handleToc(yyscan_t yyscanner,const QCString &, const QCStringList &o
}
else
{
- warn(yyextra->fileName,yyextra->lineNr,"Unknown option specified with \\tableofcontents: '%s'", (*it).stripWhiteSpace().data());
+ warn(yyextra->fileName,yyextra->lineNr,"Unknown option specified with \\tableofcontents: '%s'", qPrint(QCString(opt_).stripWhiteSpace()));
}
}
}
@@ -2682,14 +2720,14 @@ static bool handleToc(yyscan_t yyscanner,const QCString &, const QCStringList &o
return FALSE;
}
-static bool handleInherit(yyscan_t yyscanner,const QCString &, const QCStringList &)
+static bool handleInherit(yyscan_t yyscanner,const QCString &, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
BEGIN(InheritParam);
return FALSE;
}
-static bool handleExtends(yyscan_t yyscanner,const QCString &cmd, const QCStringList &)
+static bool handleExtends(yyscan_t yyscanner,const QCString &cmd, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
yyextra->currentCmd = cmd;
@@ -2697,7 +2735,7 @@ static bool handleExtends(yyscan_t yyscanner,const QCString &cmd, const QCString
return FALSE;
}
-static bool handleCopyBrief(yyscan_t yyscanner,const QCString &, const QCStringList &)
+static bool handleCopyBrief(yyscan_t yyscanner,const QCString &, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
if (yyextra->current->brief.isEmpty() && yyextra->current->doc.isEmpty())
@@ -2715,7 +2753,7 @@ static bool handleCopyBrief(yyscan_t yyscanner,const QCString &, const QCStringL
return FALSE;
}
-static bool handleCopyDetails(yyscan_t yyscanner,const QCString &, const QCStringList &)
+static bool handleCopyDetails(yyscan_t yyscanner,const QCString &, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
setOutput(yyscanner,OutputDoc);
@@ -2728,7 +2766,7 @@ static bool handleCopyDetails(yyscan_t yyscanner,const QCString &, const QCStrin
return FALSE;
}
-static bool handleCopyDoc(yyscan_t yyscanner,const QCString &, const QCStringList &)
+static bool handleCopyDoc(yyscan_t yyscanner,const QCString &, const StringVector &)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
setOutput(yyscanner,OutputBrief);
@@ -2779,6 +2817,7 @@ static bool getDocSectionName(int s)
case Entry::DIRDOC_SEC:
case Entry::EXAMPLE_SEC:
case Entry::MEMBERGRP_SEC:
+ case Entry::CONCEPTDOC_SEC:
return TRUE;
default:
return FALSE;
@@ -2832,11 +2871,11 @@ static QCString stripQuotes(const char *s)
//-----------------------------------------------------------------
static void addXRefItem(yyscan_t yyscanner,
- const char *listName,const char *itemTitle,
- const char *listTitle,bool append)
+ const QCString &listName,const QCString &itemTitle,
+ const QCString &listTitle,bool append)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
- if (listName==0) return;
+ if (listName.isEmpty()) return;
//printf("addXRefItem(%s,%s,%s,%d)\n",listName,itemTitle,listTitle,append);
std::unique_lock<std::mutex> lock(g_sectionMutex);
@@ -2846,9 +2885,9 @@ static void addXRefItem(yyscan_t yyscanner,
for (auto it = yyextra->current->sli.rbegin(); it != yyextra->current->sli.rend(); ++it)
{
RefItem *i = *it;
- if (i && qstrcmp(i->list()->listName(),listName)==0)
+ if (i && i->list()->listName()==listName)
{
- //printf("found %s lii->type=%s\n",listName,i->list()->listName().data());
+ //printf("found %s lii->type=%s\n",listName,qPrint(i->list()->listName()));
item = i;
break;
}
@@ -2857,7 +2896,7 @@ static void addXRefItem(yyscan_t yyscanner,
{
//printf("listName=%s item id = %d existing\n",listName,item->id());
item->setText(item->text() + " <p>" + yyextra->outputXRef);
- //printf("%s: text +=%s\n",listName,item->text.data());
+ //printf("%s: text +=%s\n",listName,qPrint(item->text));
}
else // new item
{
@@ -2867,12 +2906,12 @@ static void addXRefItem(yyscan_t yyscanner,
item = refList->add();
//printf("listName=%s item id = %d new yyextra->current=%p\n",listName,item->id(),yyextra->current);
QCString anchorLabel;
- anchorLabel.sprintf("_%s%06d",listName,item->id());
+ anchorLabel.sprintf("_%s%06d",listName.data(),item->id());
item->setText(yyextra->outputXRef);
item->setAnchor(anchorLabel);
yyextra->current->sli.push_back(item);
QCString cmdString;
- cmdString.sprintf(" \\xrefitem %s %d.",listName,item->id());
+ cmdString.sprintf(" \\xrefitem %s %d.",qPrint(listName),item->id());
if (yyextra->inBody)
{
yyextra->current->inbodyDocs += cmdString;
@@ -2889,11 +2928,11 @@ static void addXRefItem(yyscan_t yyscanner,
{
if (si->lineNr() != -1)
{
- warn(listName,yyextra->lineNr,"multiple use of section label '%s', (first occurrence: %s, line %d)",anchorLabel.data(),si->fileName().data(),si->lineNr());
+ warn(listName,yyextra->lineNr,"multiple use of section label '%s', (first occurrence: %s, line %d)",qPrint(anchorLabel),qPrint(si->fileName()),si->lineNr());
}
else
{
- warn(listName,yyextra->lineNr,"multiple use of section label '%s', (first occurrence: %s)",anchorLabel.data(),si->fileName().data());
+ warn(listName,yyextra->lineNr,"multiple use of section label '%s', (first occurrence: %s)",qPrint(anchorLabel),qPrint(si->fileName()));
}
}
else
@@ -2944,11 +2983,11 @@ static void addSection(yyscan_t yyscanner)
{
if (si->lineNr() != -1)
{
- warn(yyextra->fileName,yyextra->lineNr,"multiple use of section label '%s' while adding section, (first occurrence: %s, line %d)",yyextra->sectionLabel.data(),si->fileName().data(),si->lineNr());
+ warn(yyextra->fileName,yyextra->lineNr,"multiple use of section label '%s' while adding section, (first occurrence: %s, line %d)",qPrint(yyextra->sectionLabel),qPrint(si->fileName()),si->lineNr());
}
else
{
- warn(yyextra->fileName,yyextra->lineNr,"multiple use of section label '%s' while adding section, (first occurrence: %s)",yyextra->sectionLabel.data(),si->fileName().data());
+ warn(yyextra->fileName,yyextra->lineNr,"multiple use of section label '%s' while adding section, (first occurrence: %s)",qPrint(yyextra->sectionLabel),qPrint(si->fileName()));
}
}
else
@@ -2971,13 +3010,13 @@ static void addCite(yyscan_t yyscanner)
{
std::unique_lock<std::mutex> lock(g_citeMutex);
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
- QCString name=yytext;
+ QCString name(yytext);
if (yytext[0] =='"')
{
name=yytext+1;
name=name.left((int)yyleng-2);
}
- CitationManager::instance().insert(name.data());
+ CitationManager::instance().insert(name);
}
//-----------------------------------------------------------------------------
@@ -3004,7 +3043,7 @@ static void stripTrailingWhiteSpace(QCString &s)
break;
}
}
- //printf("stripTrailingWhitespace(%s) i=%d len=%d\n",s.data(),i,len);
+ //printf("stripTrailingWhitespace(%s) i=%d len=%d\n",qPrint(s),i,len);
if (i!=(int)len-1)
{
s.resize(i+2); // string up to and including char at pos i and \0 terminator
@@ -3040,28 +3079,28 @@ static inline void setOutput(yyscan_t yyscanner,OutputContext ctx)
switch(yyextra->xrefKind)
{
case XRef_Todo:
- addXRefItem(yyscanner,"todo",
+ addXRefItem(yyscanner,QCString("todo"),
theTranslator->trTodo(),
theTranslator->trTodoList(),
xrefAppendToPrev
);
break;
case XRef_Test:
- addXRefItem(yyscanner,"test",
+ addXRefItem(yyscanner,QCString("test"),
theTranslator->trTest(),
theTranslator->trTestList(),
xrefAppendToPrev
);
break;
case XRef_Bug:
- addXRefItem(yyscanner,"bug",
+ addXRefItem(yyscanner,QCString("bug"),
theTranslator->trBug(),
theTranslator->trBugList(),
xrefAppendToPrev
);
break;
case XRef_Deprecated:
- addXRefItem(yyscanner,"deprecated",
+ addXRefItem(yyscanner,QCString("deprecated"),
theTranslator->trDeprecated(),
theTranslator->trDeprecatedList(),
xrefAppendToPrev
@@ -3135,7 +3174,7 @@ static inline void setOutput(yyscan_t yyscanner,OutputContext ctx)
}
-static void addAnchor(yyscan_t yyscanner,const char *anchor)
+static void addAnchor(yyscan_t yyscanner,const QCString &anchor)
{
std::unique_lock<std::mutex> lock(g_sectionMutex);
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
@@ -3145,16 +3184,19 @@ static void addAnchor(yyscan_t yyscanner,const char *anchor)
{
if (si->lineNr() != -1)
{
- warn(yyextra->fileName,yyextra->lineNr,"multiple use of section label '%s' while adding anchor, (first occurrence: %s, line %d)",anchor,si->fileName().data(),si->lineNr());
+ warn(yyextra->fileName,yyextra->lineNr,
+ "multiple use of section label '%s' while adding anchor, (first occurrence: %s, line %d)",
+ qPrint(anchor),qPrint(si->fileName()),si->lineNr());
}
else
{
- warn(yyextra->fileName,yyextra->lineNr,"multiple use of section label '%s' while adding anchor, (first occurrence: %s)",anchor,si->fileName().data());
+ warn(yyextra->fileName,yyextra->lineNr,"multiple use of section label '%s' while adding anchor, (first occurrence: %s)",
+ qPrint(anchor),qPrint(si->fileName()));
}
}
else
{
- si = sm.add(anchor,yyextra->fileName,yyextra->lineNr,nullptr,SectionType::Anchor,0);
+ si = sm.add(anchor,yyextra->fileName,yyextra->lineNr,QCString(),SectionType::Anchor,0);
yyextra->current->anchors.push_back(si);
}
}
@@ -3167,6 +3209,14 @@ static inline void addOutput(yyscan_t yyscanner,const char *s)
*yyextra->pOutputString+=s;
}
+// add a string to the output
+static inline void addOutput(yyscan_t yyscanner,const QCString &s)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ //printf("addOutput(yyscanner,%s)\n",s);
+ *yyextra->pOutputString+=s;
+}
+
// add a character to the output
static inline void addOutput(yyscan_t yyscanner,char c)
{
@@ -3282,7 +3332,7 @@ bool CommentScanner::parseCommentBlock(/* in */ OutlineParserInterface *pars
yyextra->spaceBeforeCmd.resize(0);
yyextra->spaceBeforeIf.resize(0);
- printlex(yy_flex_debug, TRUE, __FILE__, fileName ? fileName.data(): NULL);
+ printlex(yy_flex_debug, TRUE, __FILE__, !fileName.isEmpty() ? qPrint(fileName): NULL);
if (!yyextra->current->inbodyDocs.isEmpty() && isInbody) // separate in body fragments
{
yyextra->current->inbodyDocs+="\n\n";
@@ -3353,7 +3403,7 @@ bool CommentScanner::parseCommentBlock(/* in */ OutlineParserInterface *pars
//printf("position=%d yyextra->parseMore=%d newEntryNeeded=%d\n",
// position,yyextra->parseMore,newEntryNeeded);
- printlex(yy_flex_debug, FALSE, __FILE__, fileName ? fileName.data(): NULL);
+ printlex(yy_flex_debug, FALSE, __FILE__, !fileName.isEmpty() ? qPrint(fileName): NULL);
return yyextra->parseMore;
}
@@ -3397,37 +3447,37 @@ void CommentScanner::initGroupInfo(Entry *entry)
yyextra->docGroup.initGroupInfo(entry);
}
-void CommentScanner::enterFile(const char *fileName,int lineNr)
+void CommentScanner::enterFile(const QCString &fileName,int lineNr)
{
struct yyguts_t *yyg = (struct yyguts_t*)p->yyscanner;
yyextra->docGroup.enterFile(fileName,lineNr);
}
-void CommentScanner::leaveFile(const char *fileName,int lineNr)
+void CommentScanner::leaveFile(const QCString &fileName,int lineNr)
{
struct yyguts_t *yyg = (struct yyguts_t*)p->yyscanner;
yyextra->docGroup.leaveFile(fileName,lineNr);
}
-void CommentScanner::enterCompound(const char *fileName,int lineNr,const char *name)
+void CommentScanner::enterCompound(const QCString &fileName,int lineNr,const QCString &name)
{
struct yyguts_t *yyg = (struct yyguts_t*)p->yyscanner;
yyextra->docGroup.enterCompound(fileName,lineNr,name);
}
-void CommentScanner::leaveCompound(const char *fileName,int lineNr,const char *name)
+void CommentScanner::leaveCompound(const QCString &fileName,int lineNr,const QCString &name)
{
struct yyguts_t *yyg = (struct yyguts_t*)p->yyscanner;
yyextra->docGroup.leaveCompound(fileName,lineNr,name);
}
-void CommentScanner::open(Entry *e,const char *fileName,int lineNr,bool implicit)
+void CommentScanner::open(Entry *e,const QCString &fileName,int lineNr,bool implicit)
{
struct yyguts_t *yyg = (struct yyguts_t*)p->yyscanner;
yyextra->docGroup.open(e,fileName,lineNr,implicit);
}
-void CommentScanner::close(Entry *e,const char *fileName,int lineNr,bool foundInline,bool implicit)
+void CommentScanner::close(Entry *e,const QCString &fileName,int lineNr,bool foundInline,bool implicit)
{
struct yyguts_t *yyg = (struct yyguts_t*)p->yyscanner;
yyextra->docGroup.close(e,fileName,lineNr,foundInline,implicit);
diff --git a/src/conceptdef.cpp b/src/conceptdef.cpp
new file mode 100644
index 0000000..b9dd085
--- /dev/null
+++ b/src/conceptdef.cpp
@@ -0,0 +1,733 @@
+/******************************************************************************
+ *
+ * Copyright (C) 1997-2021 by Dimitri van Heesch.
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
+ * for any purpose. It is provided "as is" without express or implied warranty.
+ * See the GNU General Public License for more details.
+ *
+ * Documents produced by Doxygen are derivative works derived from the
+ * input used in their production; they are not affected by this license.
+ *
+ */
+
+#include "conceptdef.h"
+#include "definitionimpl.h"
+#include "util.h"
+#include "config.h"
+#include "doxygen.h"
+#include "language.h"
+#include "outputlist.h"
+#include "searchindex.h"
+#include "message.h"
+#include "parserintf.h"
+
+//------------------------------------------------------------------------------------
+
+class ConceptDefImpl : public DefinitionMixin<ConceptDefMutable>
+{
+ public:
+ ConceptDefImpl(const QCString &fileName,int startLine,int startColumn,
+ const QCString &name,const QCString &tagRef=QCString(),const QCString &tagFile=QCString());
+ ~ConceptDefImpl();
+
+ virtual ConceptDef *resolveAlias() { return this; }
+
+ //---------- ConceptDef
+ virtual DefType definitionType() const;
+ virtual QCString getOutputFileBase() const;
+ virtual bool hasDetailedDescription() const;
+ virtual QCString displayName(bool includeScope=true) const;
+ virtual const IncludeInfo *includeInfo() const;
+ virtual ArgumentList getTemplateParameterList() const;
+ virtual QCString anchor() const;
+ virtual bool isLinkableInProject() const;
+ virtual bool isLinkable() const;
+ virtual QCString initializer() const;
+ virtual void writeDeclarationLink(OutputList &ol,bool &found,
+ const QCString &header,bool localNames) const;
+ virtual const NamespaceDef *getNamespaceDef() const;
+ virtual const FileDef *getFileDef() const;
+
+ //---------- ConceptDefMutable
+ virtual void setIncludeFile(FileDef *fd,const QCString &incName,bool local,bool force);
+ virtual void setTemplateArguments(const ArgumentList &al);
+ virtual void setNamespace(NamespaceDef *nd);
+ virtual void setFileDef(FileDef *fd);
+ virtual void writeTagFile(TextStream &);
+ virtual void writeDocumentation(OutputList &);
+ virtual void setInitializer(const QCString &init);
+ virtual void findSectionsInDocumentation();
+
+ //---------- Helpers
+ void writeBriefDescription(OutputList &) const;
+ void writeAuthorSection(OutputList &ol) const;
+ void writeIncludeFiles(OutputList &ol) const;
+ void writeDetailedDescription(OutputList &ol,const QCString &title) const;
+ void writeDefinition(OutputList &ol,const QCString &title) const;
+
+ private:
+ QCString m_fileName;
+ std::unique_ptr<IncludeInfo> m_incInfo;
+ NamespaceDef *m_nspace = 0;
+ FileDef *m_fileDef = 0;
+ ArgumentList m_tArgList;
+ QCString m_initializer;
+};
+
+ConceptDefMutable *createConceptDef(
+ const QCString &fileName,int startLine,int startColumn,
+ const QCString &name, const QCString &tagRef,const QCString &tagFile)
+{
+ return new ConceptDefImpl(fileName,startLine,startColumn,name,tagRef,tagFile);
+}
+
+//------------------------------------------------------------------------------------
+
+class ConceptDefAliasImpl : public DefinitionAliasMixin<ConceptDef>
+{
+ public:
+ ConceptDefAliasImpl(const Definition *newScope,const ConceptDef *cd)
+ : DefinitionAliasMixin(newScope,cd) { init(); }
+ virtual ~ConceptDefAliasImpl() { deinit(); }
+
+ const ConceptDef *getCdAlias() const { return toConceptDef(getAlias()); }
+ virtual ConceptDef *resolveAlias() { return const_cast<ConceptDef*>(getCdAlias()); }
+
+ virtual DefType definitionType() const { return TypeConcept; }
+ virtual QCString getOutputFileBase() const
+ { return getCdAlias()->getOutputFileBase(); }
+ virtual QCString getReference() const
+ { return getCdAlias()->getReference(); }
+ virtual bool isReference() const
+ { return getCdAlias()->isReference(); }
+ virtual bool hasDetailedDescription() const
+ { return getCdAlias()->hasDetailedDescription(); }
+ virtual QCString displayName(bool includeScope=true) const
+ { return getCdAlias()->displayName(includeScope); }
+ virtual const IncludeInfo *includeInfo() const
+ { return getCdAlias()->includeInfo(); }
+ virtual ArgumentList getTemplateParameterList() const
+ { return getCdAlias()->getTemplateParameterList(); }
+ virtual QCString anchor() const
+ { return getCdAlias()->anchor(); }
+ virtual bool isLinkableInProject() const
+ { return getCdAlias()->isLinkableInProject(); }
+ virtual bool isLinkable() const
+ { return getCdAlias()->isLinkable(); }
+ virtual QCString initializer() const
+ { return getCdAlias()->initializer(); }
+ virtual const NamespaceDef *getNamespaceDef() const
+ { return getCdAlias()->getNamespaceDef(); }
+ virtual const FileDef *getFileDef() const
+ { return getCdAlias()->getFileDef(); }
+ virtual void writeDeclarationLink(OutputList &ol,bool &found,
+ const QCString &header,bool localNames) const
+ { getCdAlias()->writeDeclarationLink(ol,found,header,localNames); }
+};
+
+ConceptDef *createConceptDefAlias(const Definition *newScope,const ConceptDef *cd)
+{
+ ConceptDef *acd = new ConceptDefAliasImpl(newScope,cd);
+ return acd;
+}
+
+//------------------------------------------------------------------------------------
+
+ConceptDefImpl::ConceptDefImpl(const QCString &fileName,int startLine,int startColumn,
+ const QCString &name,const QCString &tagRef,const QCString &tagFile) : DefinitionMixin(fileName,startLine,startColumn,name)
+{
+ if (!tagFile.isEmpty())
+ {
+ if (!tagRef.isEmpty())
+ {
+ m_fileName = stripExtension(tagFile);
+ }
+ else
+ {
+ m_fileName = convertNameToFile(stripExtension(tagFile));
+ }
+ }
+ else
+ {
+ m_fileName = convertNameToFile(QCString("concept")+name);
+ }
+ setReference(tagRef);
+}
+
+ConceptDefImpl::~ConceptDefImpl()
+{
+}
+
+Definition::DefType ConceptDefImpl::definitionType() const
+{
+ return TypeConcept;
+}
+
+QCString ConceptDefImpl::getOutputFileBase() const
+{
+ return m_fileName;
+}
+
+bool ConceptDefImpl::hasDetailedDescription() const
+{
+ bool repeatBrief = Config_getBool(REPEAT_BRIEF);
+ bool sourceBrowser = Config_getBool(SOURCE_BROWSER);
+ return ((!briefDescription().isEmpty() && repeatBrief) ||
+ !documentation().isEmpty() ||
+ (sourceBrowser && getStartBodyLine()!=-1 && getBodyDef()));
+}
+
+QCString ConceptDefImpl::anchor() const
+{
+ return "";
+}
+
+QCString ConceptDefImpl::displayName(bool includeScope) const
+{
+ return includeScope ? name() : localName();
+}
+
+const IncludeInfo *ConceptDefImpl::includeInfo() const
+{
+ return m_incInfo.get();
+}
+
+ArgumentList ConceptDefImpl::getTemplateParameterList() const
+{
+ return m_tArgList;
+}
+
+bool ConceptDefImpl::isLinkableInProject() const
+{
+ return hasDocumentation() && !isReference() && !isHidden();
+}
+
+bool ConceptDefImpl::isLinkable() const
+{
+ return isLinkableInProject() || isReference();
+}
+
+void ConceptDefImpl::setIncludeFile(FileDef *fd,const QCString &incName,bool local,bool force)
+{
+ if (!m_incInfo) m_incInfo = std::make_unique<IncludeInfo>();
+ if ((!incName.isEmpty() && m_incInfo->includeName.isEmpty()) ||
+ (fd!=0 && m_incInfo->fileDef==0)
+ )
+ {
+ m_incInfo->fileDef = fd;
+ m_incInfo->includeName = incName;
+ m_incInfo->local = local;
+ }
+ if (force && !incName.isEmpty())
+ {
+ m_incInfo->includeName = incName;
+ m_incInfo->local = local;
+ }
+}
+
+void ConceptDefImpl::setTemplateArguments(const ArgumentList &al)
+{
+ m_tArgList = al;
+}
+
+void ConceptDefImpl::setNamespace(NamespaceDef *nd)
+{
+ m_nspace = nd;
+}
+
+const NamespaceDef *ConceptDefImpl::getNamespaceDef() const
+{
+ return m_nspace;
+}
+
+void ConceptDefImpl::setFileDef(FileDef *fd)
+{
+ m_fileDef=fd;
+}
+
+const FileDef *ConceptDefImpl::getFileDef() const
+{
+ return m_fileDef;
+}
+
+void ConceptDefImpl::setInitializer(const QCString &init)
+{
+ m_initializer = init;
+}
+
+QCString ConceptDefImpl::initializer() const
+{
+ return m_initializer;
+}
+
+void ConceptDefImpl::writeTagFile(TextStream &tagFile)
+{
+ tagFile << " <compound kind=\"concept\">\n";
+ tagFile << " <name>" << convertToXML(name()) << "</name>\n";
+ tagFile << " <filename>" << convertToXML(getOutputFileBase()) << Doxygen::htmlFileExtension << "</filename>\n";
+ QCString idStr = id();
+ if (!idStr.isEmpty())
+ {
+ tagFile << " <clangid>" << convertToXML(idStr) << "</clangid>\n";
+ }
+ writeDocAnchorsToTagFile(tagFile);
+ tagFile << " </compound>\n";
+}
+
+void ConceptDefImpl::writeBriefDescription(OutputList &ol) const
+{
+ if (hasBriefDescription())
+ {
+ DocRoot *rootNode = validatingParseDoc(briefFile(),briefLine(),this,0,
+ briefDescription(),TRUE,FALSE,
+ QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ if (rootNode && !rootNode->isEmpty())
+ {
+ ol.startParagraph();
+ ol.pushGeneratorState();
+ ol.disableAllBut(OutputGenerator::Man);
+ ol.writeString(" - ");
+ ol.popGeneratorState();
+ ol.writeDoc(rootNode,this,0);
+ ol.pushGeneratorState();
+ ol.disable(OutputGenerator::RTF);
+ ol.writeString(" \n");
+ ol.enable(OutputGenerator::RTF);
+
+ if (hasDetailedDescription())
+ {
+ ol.disableAllBut(OutputGenerator::Html);
+ ol.startTextLink(getOutputFileBase(),"details");
+ ol.parseText(theTranslator->trMore());
+ ol.endTextLink();
+ }
+ ol.popGeneratorState();
+ ol.endParagraph();
+ }
+ delete rootNode;
+ }
+ ol.writeSynopsis();
+}
+
+void ConceptDefImpl::writeIncludeFiles(OutputList &ol) const
+{
+ if (m_incInfo)
+ {
+ QCString nm=m_incInfo->includeName.isEmpty() ?
+ (m_incInfo->fileDef ?
+ m_incInfo->fileDef->docName() : QCString()
+ ) :
+ m_incInfo->includeName;
+ if (!nm.isEmpty())
+ {
+ ol.startParagraph();
+ ol.startTypewriter();
+ ol.docify("#include ");
+ if (m_incInfo->local)
+ ol.docify("\"");
+ else
+ ol.docify("<");
+ ol.pushGeneratorState();
+ ol.disable(OutputGenerator::Html);
+ ol.docify(nm);
+ ol.disableAllBut(OutputGenerator::Html);
+ ol.enable(OutputGenerator::Html);
+ if (m_incInfo->fileDef)
+ {
+ ol.writeObjectLink(QCString(),m_incInfo->fileDef->includeName(),QCString(),nm);
+ }
+ else
+ {
+ ol.docify(nm);
+ }
+ ol.popGeneratorState();
+ if (m_incInfo->local)
+ ol.docify("\"");
+ else
+ ol.docify(">");
+ ol.endTypewriter();
+ ol.endParagraph();
+ }
+ }
+}
+
+static QCString templateSpec(const ArgumentList &al)
+{
+ TextStream t;
+ t << "template<";
+ bool first=true;
+ for (const auto &a : al)
+ {
+ if (!first) t << ", ";
+ t << a.type;
+ if (!a.name.isEmpty())
+ {
+ t << " " << a.name;
+ }
+ if (a.defval.length()!=0)
+ {
+ t << " " << a.defval;
+ }
+ first=false;
+ }
+ t << ">";
+ return t.str();
+}
+
+void ConceptDefImpl::writeDefinition(OutputList &ol,const QCString &title) const
+{
+ ol.startGroupHeader();
+ ol.parseText(title);
+ ol.endGroupHeader();
+
+ auto intf = Doxygen::parserManager->getCodeParser(".cpp");
+ intf->resetCodeParserState();
+ ol.startCodeFragment("DoxyCode");
+ QCString scopeName;
+ if (getOuterScope()!=Doxygen::globalScope) scopeName=getOuterScope()->name();
+ TextStream conceptDef;
+ conceptDef << templateSpec(m_tArgList);
+ conceptDef << "\nconcept ";
+ conceptDef << name();
+ conceptDef << " = ";
+ conceptDef << m_initializer;
+ intf->parseCode(ol,scopeName,conceptDef.str(),SrcLangExt_Cpp,false,QCString(),
+ m_fileDef, -1,-1,true,0,false,this);
+ ol.endCodeFragment("DoxyCode");
+}
+
+void ConceptDefImpl::writeDetailedDescription(OutputList &ol,const QCString &title) const
+{
+ static bool repeatBrief = Config_getBool(REPEAT_BRIEF);
+ if (hasDetailedDescription())
+ {
+ ol.pushGeneratorState();
+ ol.disable(OutputGenerator::Html);
+ ol.writeRuler();
+ ol.popGeneratorState();
+
+ ol.pushGeneratorState();
+ ol.disableAllBut(OutputGenerator::Html);
+ ol.writeAnchor(QCString(),"details");
+ ol.popGeneratorState();
+
+ ol.startGroupHeader();
+ ol.parseText(title);
+ ol.endGroupHeader();
+
+ ol.startTextBlock();
+ // repeat brief description
+ if (!briefDescription().isEmpty() && repeatBrief)
+ {
+ ol.generateDoc(briefFile(),briefLine(),this,0,briefDescription(),FALSE,FALSE,
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ }
+ if (!briefDescription().isEmpty() && repeatBrief &&
+ !documentation().isEmpty())
+ {
+ ol.pushGeneratorState();
+ ol.disable(OutputGenerator::Html);
+ ol.writeString("\n\n");
+ ol.popGeneratorState();
+ }
+
+ // write documentation
+ if (!documentation().isEmpty())
+ {
+ ol.generateDoc(docFile(),docLine(),this,0,documentation(),TRUE,FALSE,
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ }
+
+ writeSourceDef(ol,name());
+ ol.endTextBlock();
+ }
+}
+
+void ConceptDefImpl::writeAuthorSection(OutputList &ol) const
+{
+ // write Author section (Man only)
+ ol.pushGeneratorState();
+ ol.disableAllBut(OutputGenerator::Man);
+ ol.startGroupHeader();
+ ol.parseText(theTranslator->trAuthor(TRUE,TRUE));
+ ol.endGroupHeader();
+ ol.parseText(theTranslator->trGeneratedAutomatically(Config_getString(PROJECT_NAME)));
+ ol.popGeneratorState();
+}
+
+void ConceptDefImpl::writeDocumentation(OutputList &ol)
+{
+ static bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
+ QCString pageTitle = theTranslator->trConceptReference(displayName());
+ startFile(ol,getOutputFileBase(),name(),pageTitle,HLI_ConceptVisible,!generateTreeView);
+
+ // ---- navigation part
+ if (!generateTreeView)
+ {
+ if (getOuterScope()!=Doxygen::globalScope)
+ {
+ writeNavigationPath(ol);
+ }
+ ol.endQuickIndices();
+ }
+
+ // ---- title part
+ startTitle(ol,getOutputFileBase(),this);
+ ol.parseText(pageTitle);
+ endTitle(ol,getOutputFileBase(),displayName());
+
+ // ---- contents part
+
+ ol.startContents();
+
+ if (Doxygen::searchIndex)
+ {
+ Doxygen::searchIndex->setCurrentDoc(this,anchor(),FALSE);
+ Doxygen::searchIndex->addWord(localName(),TRUE);
+ }
+
+ Doxygen::indexList->addIndexItem(this,0);
+ //---------------------------------------- start flexible part -------------------------------
+
+ for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Concept))
+ {
+ switch (lde->kind())
+ {
+ case LayoutDocEntry::BriefDesc:
+ writeBriefDescription(ol);
+ break;
+ case LayoutDocEntry::ConceptDefinition:
+ {
+ const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
+ writeDefinition(ol,ls->title(getLanguage()));
+ }
+ break;
+ case LayoutDocEntry::DetailedDesc:
+ {
+ const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
+ writeDetailedDescription(ol,ls->title(getLanguage()));
+ }
+ break;
+ case LayoutDocEntry::AuthorSection:
+ writeAuthorSection(ol);
+ break;
+ case LayoutDocEntry::ClassIncludes:
+ writeIncludeFiles(ol);
+ break;
+ case LayoutDocEntry::MemberDeclStart:
+ case LayoutDocEntry::NamespaceClasses:
+ case LayoutDocEntry::NamespaceInterfaces:
+ case LayoutDocEntry::NamespaceStructs:
+ case LayoutDocEntry::NamespaceExceptions:
+ case LayoutDocEntry::NamespaceConcepts:
+ case LayoutDocEntry::NamespaceNestedNamespaces:
+ case LayoutDocEntry::NamespaceNestedConstantGroups:
+ case LayoutDocEntry::MemberGroups:
+ case LayoutDocEntry::MemberDecl:
+ case LayoutDocEntry::MemberDeclEnd:
+ case LayoutDocEntry::MemberDefStart:
+ case LayoutDocEntry::NamespaceInlineClasses:
+ case LayoutDocEntry::MemberDef:
+ case LayoutDocEntry::MemberDefEnd:
+ case LayoutDocEntry::ClassInheritanceGraph:
+ case LayoutDocEntry::ClassNestedClasses:
+ case LayoutDocEntry::ClassCollaborationGraph:
+ case LayoutDocEntry::ClassAllMembersLink:
+ case LayoutDocEntry::ClassUsedFiles:
+ case LayoutDocEntry::ClassInlineClasses:
+ case LayoutDocEntry::FileClasses:
+ case LayoutDocEntry::FileConcepts:
+ case LayoutDocEntry::FileInterfaces:
+ case LayoutDocEntry::FileStructs:
+ case LayoutDocEntry::FileExceptions:
+ case LayoutDocEntry::FileNamespaces:
+ case LayoutDocEntry::FileConstantGroups:
+ case LayoutDocEntry::FileIncludes:
+ case LayoutDocEntry::FileIncludeGraph:
+ case LayoutDocEntry::FileIncludedByGraph:
+ case LayoutDocEntry::FileInlineClasses:
+ case LayoutDocEntry::FileSourceLink:
+ case LayoutDocEntry::GroupClasses:
+ case LayoutDocEntry::GroupConcepts:
+ case LayoutDocEntry::GroupInlineClasses:
+ case LayoutDocEntry::GroupNamespaces:
+ case LayoutDocEntry::GroupDirs:
+ case LayoutDocEntry::GroupNestedGroups:
+ case LayoutDocEntry::GroupFiles:
+ case LayoutDocEntry::GroupGraph:
+ case LayoutDocEntry::GroupPageDocs:
+ case LayoutDocEntry::DirSubDirs:
+ case LayoutDocEntry::DirFiles:
+ case LayoutDocEntry::DirGraph:
+ err("Internal inconsistency: member %d should not be part of "
+ "LayoutDocManager::Namespace entry list\n",lde->kind());
+ break;
+ }
+ }
+
+ //---------------------------------------- end flexible part -------------------------------
+
+ ol.endContents();
+
+ endFileWithNavPath(this,ol);
+}
+
+void ConceptDefImpl::writeDeclarationLink(OutputList &ol,bool &found,const QCString &header,bool localNames) const
+{
+ if (isLinkable())
+ {
+ if (!found) // first concept
+ {
+ ol.startMemberHeader("concepts");
+ if (!header.isEmpty())
+ {
+ ol.parseText(header);
+ }
+ else
+ {
+ theTranslator->trConcept(true,false);
+ }
+ ol.endMemberHeader();
+ ol.startMemberList();
+ found=TRUE;
+ }
+ ol.startMemberDeclaration();
+ ol.startMemberItem(anchor(),FALSE);
+ ol.writeString("concept ");
+ QCString cname = displayName(!localNames);
+ ol.insertMemberAlign();
+ if (isLinkable())
+ {
+ ol.writeObjectLink(getReference(),
+ getOutputFileBase(),
+ anchor(),
+ cname
+ );
+ }
+ else
+ {
+ ol.startBold();
+ ol.docify(cname);
+ ol.endBold();
+ }
+ ol.endMemberItem();
+ // add the brief description if available
+ if (!briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC))
+ {
+ DocRoot *rootNode = validatingParseDoc(briefFile(),briefLine(),this,0,
+ briefDescription(),FALSE,FALSE,
+ QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ if (rootNode && !rootNode->isEmpty())
+ {
+ ol.startMemberDescription(anchor());
+ ol.writeDoc(rootNode,this,0);
+ ol.endMemberDescription();
+ }
+ delete rootNode;
+ }
+ ol.endMemberDeclaration(anchor(),QCString());
+ }
+}
+
+void ConceptDefImpl::findSectionsInDocumentation()
+{
+ docFindSections(briefDescription(),this,docFile());
+ docFindSections(documentation(),this,docFile());
+}
+
+//------------------------------------------------------------------------------------
+
+bool ConceptLinkedRefMap::declVisible() const
+{
+ bool hideUndocClasses = Config_getBool(HIDE_UNDOC_CLASSES);
+ for (const auto &cd : *this)
+ {
+ bool isLink = cd->isLinkable();
+ if (isLink || !hideUndocClasses)
+ {
+ return true;
+ }
+ }
+ return false;
+}
+
+void ConceptLinkedRefMap::writeDeclaration(OutputList &ol,const QCString &header,bool localNames) const
+{
+ bool found=FALSE;
+ for (const auto &cd : *this)
+ {
+ cd->writeDeclarationLink(ol,found,header,localNames);
+ }
+ if (found) ol.endMemberList();
+}
+
+//------------------------------------------------------------------------------------
+
+// --- Cast functions
+//
+ConceptDef *toConceptDef(Definition *d)
+{
+ if (d && (typeid(*d)==typeid(ConceptDefImpl) || typeid(*d)==typeid(ConceptDefAliasImpl)))
+ {
+ return static_cast<ConceptDef*>(d);
+ }
+ else
+ {
+ return 0;
+ }
+}
+
+ConceptDef *toConceptDef(DefinitionMutable *md)
+{
+ Definition *d = toDefinition(md);
+ if (d && typeid(*d)==typeid(ConceptDefImpl))
+ {
+ return static_cast<ConceptDef*>(d);
+ }
+ else
+ {
+ return 0;
+ }
+}
+
+const ConceptDef *toConceptDef(const Definition *d)
+{
+ if (d && (typeid(*d)==typeid(ConceptDefImpl) || typeid(*d)==typeid(ConceptDefAliasImpl)))
+ {
+ return static_cast<const ConceptDef*>(d);
+ }
+ else
+ {
+ return 0;
+ }
+}
+
+ConceptDefMutable *toConceptDefMutable(Definition *d)
+{
+ if (d && typeid(*d)==typeid(ConceptDefImpl))
+ {
+ return static_cast<ConceptDefMutable*>(d);
+ }
+ else
+ {
+ return 0;
+ }
+}
+
+ConceptDefMutable *toConceptDefMutable(const Definition *d)
+{
+ if (d && typeid(*d)==typeid(ConceptDefImpl))
+ {
+ return const_cast<ConceptDefMutable*>(static_cast<const ConceptDefMutable*>(d));
+ }
+ else
+ {
+ return 0;
+ }
+}
+
+
+
diff --git a/src/conceptdef.h b/src/conceptdef.h
new file mode 100644
index 0000000..9a2075c
--- /dev/null
+++ b/src/conceptdef.h
@@ -0,0 +1,82 @@
+/******************************************************************************
+ *
+ * Copyright (C) 1997-2021 by Dimitri van Heesch.
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
+ * for any purpose. It is provided "as is" without express or implied warranty.
+ * See the GNU General Public License for more details.
+ *
+ * Documents produced by Doxygen are derivative works derived from the
+ * input used in their production; they are not affected by this license.
+ *
+ */
+
+#ifndef CONCEPTDEF_H
+#define CONCEPTDEF_H
+
+#include "definition.h"
+#include "filedef.h"
+
+class ConceptDef : public Definition
+{
+ public:
+ virtual DefType definitionType() const = 0;
+ virtual QCString getOutputFileBase() const = 0;
+ virtual bool hasDetailedDescription() const = 0;
+ virtual QCString displayName(bool includeScope=true) const = 0;
+ virtual const IncludeInfo *includeInfo() const = 0;
+ virtual ArgumentList getTemplateParameterList() const = 0;
+ virtual QCString anchor() const = 0;
+ virtual bool isLinkableInProject() const = 0;
+ virtual bool isLinkable() const = 0;
+ virtual QCString initializer() const = 0;
+ virtual void writeDeclarationLink(OutputList &ol,bool &found,
+ const QCString &header,bool localNames) const = 0;
+ virtual const NamespaceDef *getNamespaceDef() const = 0;
+ virtual const FileDef *getFileDef() const = 0;
+};
+
+class ConceptDefMutable : public DefinitionMutable, public ConceptDef
+{
+ public:
+ virtual void setIncludeFile(FileDef *fd,const QCString &incName,bool local,bool force) = 0;
+ virtual void setTemplateArguments(const ArgumentList &al) = 0;
+ virtual void setNamespace(NamespaceDef *nd) = 0;
+ virtual void setFileDef(FileDef *fd) = 0;
+ virtual void writeTagFile(TextStream &) = 0;
+ virtual void writeDocumentation(OutputList &ol) = 0;
+ virtual void setInitializer(const QCString &init) = 0;
+ virtual void findSectionsInDocumentation() = 0;
+};
+
+ConceptDefMutable *createConceptDef(
+ const QCString &fileName,int startLine,int startColumn,const QCString &name,
+ const QCString &tagRef=QCString(),const QCString &tagFile=QCString());
+
+ConceptDef *createConceptDefAlias(const Definition *newScope,const ConceptDef *cd);
+
+// ---- Map
+
+class ConceptLinkedMap : public LinkedMap<ConceptDef>
+{
+};
+
+class ConceptLinkedRefMap : public LinkedRefMap<const ConceptDef>
+{
+ public:
+ bool declVisible() const;
+ void writeDeclaration(OutputList &ol,const QCString &header,bool localNames) const;
+ void writeDocumentation(OutputList &ol,const Definition * container=0) const;
+};
+
+// ---- Cast functions
+
+ConceptDef *toConceptDef(Definition *d);
+ConceptDef *toConceptDef(DefinitionMutable *d);
+const ConceptDef *toConceptDef(const Definition *d);
+ConceptDefMutable *toConceptDefMutable(Definition *d);
+ConceptDefMutable *toConceptDefMutable(const Definition *d);
+
+#endif
diff --git a/src/condparser.cpp b/src/condparser.cpp
index ac6ff61..b968878 100644
--- a/src/condparser.cpp
+++ b/src/condparser.cpp
@@ -33,15 +33,16 @@
* - On error, an error message is returned.
* - On success, the result of the expression is either "1" or "0".
*/
-bool CondParser::parse(const char *fileName,int lineNr,const char *expr)
+bool CondParser::parse(const QCString &fileName,int lineNr,const QCString &expr)
{
+ if (expr.isEmpty()) return false;
m_expr = expr;
m_tokenType = NOTHING;
// initialize all variables
- m_e = m_expr; // let m_e point to the start of the expression
+ m_e = m_expr.data(); // let m_e point to the start of the expression
- bool answer=FALSE;
+ bool answer=false;
getToken();
if (m_tokenType==DELIMITER && m_token.isEmpty())
{
@@ -50,35 +51,11 @@ bool CondParser::parse(const char *fileName,int lineNr,const char *expr)
else if (m_err.isEmpty())
{
answer = parseLevel1();
-
-#if 0
- // check for garbage at the end of the expression
- // an expression ends with a character '\0' and token_type = delimiter
- if (m_tokenType!=DELIMITER || !m_token.isEmpty())
- {
- if (m_tokenType == DELIMITER)
- {
- if (m_token=="(" || m_token==")")
- {
- m_err=QCString("Unexpected parenthesis ")+m_token+"'";
- }
- else
- {
- // user entered a not existing operator like "//"
- m_err=QCString("Unexpected operator ")+m_token+"'";
- }
- }
- else
- {
- m_err=QCString("Unexpected part '")+m_token+"'";
- }
- }
-#endif
}
- if (m_err)
+ if (!m_err.isEmpty())
{
warn(fileName,lineNr,"problem evaluating expression '%s': %s",
- expr,m_err.data());
+ qPrint(expr),qPrint(m_err));
}
//printf("expr='%s' answer=%d\n",expr,answer);
return answer;
@@ -303,9 +280,9 @@ bool CondParser::evalOperator(int opId, bool lhs, bool rhs)
/**
* evaluate a variable
*/
-bool CondParser::evalVariable(const char *varName)
+bool CondParser::evalVariable(const QCString &varName)
{
const StringVector &list = Config_getList(ENABLED_SECTIONS);
- return std::find(list.begin(),list.end(),varName)!=list.end();
+ return std::find(list.begin(),list.end(),varName.str())!=list.end();
}
diff --git a/src/condparser.h b/src/condparser.h
index 1ad13b1..a2f806e 100644
--- a/src/condparser.h
+++ b/src/condparser.h
@@ -5,8 +5,8 @@
* Copyright (C) 1997-2015 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
- * documentation under the terms of the GNU General Public License is hereby
- * granted. No representations are made about the suitability of this software
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
@@ -22,14 +22,14 @@
* ! NOT operator
*/
-#include <qcstring.h>
+#include "qcstring.h"
class CondParser
{
// public functions
public:
CondParser() : m_e(0), m_tokenType(NOTHING) {}
- bool parse(const char *fileName,int lineNr,const char *expr);
+ bool parse(const QCString &fileName,int lineNr,const QCString &expr);
// enumerations
private:
@@ -68,7 +68,7 @@ class CondParser
bool parseVar();
bool evalOperator(const int opId, bool lhs, bool rhs);
- bool evalVariable(const char *varName);
+ bool evalVariable(const QCString &varName);
int getOperatorId(const QCString &opName);
};
diff --git a/src/config.h b/src/config.h
index 31be3a1..45fd4f8 100644
--- a/src/config.h
+++ b/src/config.h
@@ -16,8 +16,6 @@
#ifndef CONFIG_H
#define CONFIG_H
-class FTextStream;
-
// note: this header file is generated from config.xml
#include "configvalues.h"
@@ -44,6 +42,8 @@ class FTextStream;
//#endif
//! @}
+class TextStream;
+
/** \brief Public function to deal with the configuration file. */
namespace Config
{
@@ -54,18 +54,18 @@ namespace Config
* is \c TRUE the description of each configuration option will
* be omitted.
*/
- void writeTemplate(FTextStream &t,bool shortList,bool updateOnly=FALSE);
+ void writeTemplate(TextStream &t,bool shortList,bool updateOnly=FALSE);
/*! Writes a the differences between the current configuration and the
* template configuration to stream \a t.
*/
- void compareDoxyfile(FTextStream &t);
+ void compareDoxyfile(TextStream &t);
/*! Parses a configuration file with name \a fn.
* \returns TRUE if successful, FALSE if the file could not be
* opened or read.
*/
- bool parse(const char *fileName,bool update=FALSE);
+ bool parse(const QCString &fileName,bool update=FALSE);
/*! Post processed the parsed data. Replaces raw string values by the actual values.
* and replaces environment variables.
diff --git a/src/config.xml b/src/config.xml
index 5a3543c..f3f4e5c 100644
--- a/src/config.xml
+++ b/src/config.xml
@@ -340,19 +340,6 @@ Go to the <a href="commands.html">next</a> section or return to the
<value name='Ukrainian'/>
<value name='Vietnamese'/>
</option>
- <option type='enum' id='OUTPUT_TEXT_DIRECTION' defval='None'>
- <docs>
-<![CDATA[
- The \c OUTPUT_TEXT_DIRECTION tag is used to specify the direction in which all
- documentation generated by doxygen is written. Doxygen will use this
- information to generate all generated output in the proper direction.
-]]>
- </docs>
- <value name='None'/>
- <value name='LTR'/>
- <value name='RTL'/>
- <value name='Context'/>
- </option>
<option type='bool' id='BRIEF_MEMBER_DESC' defval='1'>
<docs>
<![CDATA[
@@ -832,7 +819,7 @@ Go to the <a href="commands.html">next</a> section or return to the
to get more control over the balance between CPU load and processing speed.
At this moment only the input processing can be done using multiple threads.
Since this is still an experimental feature the default is set to 1,
- which efficively disables parallel processing. Please report any issues you
+ which effectively disables parallel processing. Please report any issues you
encounter.
Generating dot graphs in parallel is controlled by the \c DOT_NUM_THREADS setting.
]]>
@@ -2061,7 +2048,7 @@ hr.footer {
<![CDATA[
The \c HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
Doxygen will adjust the colors in the style sheet and background images
- according to this color. Hue is specified as an angle on a colorwheel,
+ according to this color. Hue is specified as an angle on a color-wheel,
see https://en.wikipedia.org/wiki/Hue for more information.
For instance the value 0 represents red, 60 is yellow, 120 is green,
180 is cyan, 240 is blue, 300 purple, and 360 is red again.
@@ -2073,7 +2060,7 @@ hr.footer {
<![CDATA[
The \c HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of
the colors in the HTML output. For a value of 0 the output will use
- grayscales only. A value of 255 will produce the most vivid colors.
+ gray-scales only. A value of 255 will produce the most vivid colors.
]]>
</docs>
</option>
@@ -2197,7 +2184,7 @@ The \c DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.
project file that can be read by Microsoft's HTML Help Workshop
on Windows.
In the beginning of 2021 Microsoft took the original page, with a.o. the download links,
- offline the HTML help workshop was already many years in maintenance mode).
+ offline the HTML help workshop was already many years in maintenance mode).
You can download the HTML help workshop from the web archives at
<a href="http://web.archive.org/web/20160201063255/http://download.microsoft.com/download/0/A/9/0A939EF6-E31C-430F-A3DF-DFAE7960D564/htmlhelp.exe">Installation executable</a>.
<br>
@@ -2488,20 +2475,33 @@ The \c DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.
]]>
</docs>
</option>
+ <option type='enum' id='MATHJAX_VERSION' defval='MathJax_2' depends='USE_MATHJAX'>
+ <docs>
+<![CDATA[
+ With \c MATHJAX_VERSION it is possible to specify the MathJax version to be used.
+ Note that the different versions of MathJax have different requirements with regards to
+ the different settings, so it is possible that also other MathJax settings have to be changed
+ when switching between the different MathJax versions.
+]]>
+ </docs>
+ <value name="MathJax_2"/>
+ <value name="MathJax_3"/>
+ </option>
<option type='enum' id='MATHJAX_FORMAT' defval='HTML-CSS' depends='USE_MATHJAX'>
<docs>
<![CDATA[
When MathJax is enabled you can set the default output format to be used for
the MathJax output.
- See <a href="http://docs.mathjax.org/en/v2.7-latest/output.html">the MathJax site</a>
- for more details.
+ For more details about the output format see <a href="http://docs.mathjax.org/en/v2.7-latest/output.html">MathJax version 2</a>
+ and <a href="http://docs.mathjax.org/en/latest/web/components/output.html">MathJax version 3</a>.
]]>
</docs>
- <value name="HTML-CSS" desc="(which is slower, but has the best compatibility)"/>
- <value name="NativeMML" desc="(i.e. MathML)"/>
+ <value name="HTML-CSS" desc="(which is slower, but has the best compatibility. This is the name for Mathjax version 2, for MathJax version 3 this will be translated into \c chtml)"/>
+ <value name="NativeMML" desc="(i.e. MathML. Only supported for NathJax 2. For MathJax version 3 \c chtml will be used instead.)"/>
+ <value name="chtml" desc="(This is the name for Mathjax version 3, for MathJax version 2 this will be translated into \c HTML-CSS)"/>
<value name="SVG"/>
</option>
- <option type='string' id='MATHJAX_RELPATH' format='string' defval='https://cdn.jsdelivr.net/npm/mathjax@2' depends='USE_MATHJAX'>
+ <option type='string' id='MATHJAX_RELPATH' format='string' depends='USE_MATHJAX'>
<docs>
<![CDATA[
When MathJax is enabled you need to specify the location relative to the
@@ -2512,6 +2512,10 @@ The \c DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.
the MathJax Content Delivery Network so you can quickly see the result without
installing MathJax. However, it is strongly recommended to install a local
copy of MathJax from https://www.mathjax.org before deployment.
+
+ The default value is:
+ - in case of MathJax version 2: https://cdn.jsdelivr.net/npm/mathjax@2
+ - in case of MathJax version 3: https://cdn.jsdelivr.net/npm/mathjax@3
]]>
</docs>
</option>
@@ -2519,10 +2523,15 @@ The \c DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.
<docs>
<![CDATA[
The \c MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax extension
- names that should be enabled during MathJax rendering. For example
+ names that should be enabled during MathJax rendering. For example for MathJax version 2
+ (see https://docs.mathjax.org/en/v2.7-latest/tex.html#tex-and-latex-extensions):
\verbatim
MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
\endverbatim
+For example for MathJax version 3 (see http://docs.mathjax.org/en/latest/input/tex/extensions/index.html):
+\verbatim
+MATHJAX_EXTENSIONS = ams
+\endverbatim
]]>
</docs>
</option>
@@ -3906,5 +3915,6 @@ temporary files.
<option type='obsolete' id='MSCGEN_PATH'/>
<option type='obsolete' id='TCL_SUBST'/>
<option type='obsolete' id='COLS_IN_ALPHA_INDEX'/>
+ <option type='obsolete' id='OUTPUT_TEXT_DIRECTION'/>
</group>
</doxygenconfig>
diff --git a/src/configgen.py b/src/configgen.py
index 1dcf3b5..d3b9137 100755
--- a/src/configgen.py
+++ b/src/configgen.py
@@ -683,7 +683,7 @@ def main():
print("#ifndef CONFIGVALUES_H")
print("#define CONFIGVALUES_H")
print("")
- print("#include <qcstring.h>")
+ print("#include \"qcstring.h\"")
print("#include \"containers.h\"")
print("#include \"settings.h\"")
print("")
@@ -720,7 +720,7 @@ def main():
print(" StringVector ConfigValues::*l;");
print(" } value;");
print(" };");
- print(" const Info *get(const char *tag) const;");
+ print(" const Info *get(const QCString &tag) const;");
print(" private:")
for n in elem.childNodes:
if n.nodeType == Node.ELEMENT_NODE:
@@ -738,7 +738,7 @@ def main():
print("#include \"configimpl.h\"")
print("#include <unordered_map>")
print("")
- print("const ConfigValues::Info *ConfigValues::get(const char *tag) const");
+ print("const ConfigValues::Info *ConfigValues::get(const QCString &tag) const");
print("{");
print(" static const std::unordered_map< std::string, Info > configMap =");
print(" {");
@@ -747,7 +747,7 @@ def main():
if (n.nodeName == "group"):
parseGroupMapInit(n)
print(" };");
- print(" auto it = configMap.find(tag);");
+ print(" auto it = configMap.find(tag.str());");
print(" return it!=configMap.end() ? &it->second : nullptr;");
print("}");
print("")
diff --git a/src/configimpl.h b/src/configimpl.h
index a34c45b..d90fe8c 100644
--- a/src/configimpl.h
+++ b/src/configimpl.h
@@ -23,10 +23,12 @@
#include <unordered_map>
#include <string>
#include <memory>
+#include <iostream>
-#include "ftextstream.h"
#include "containers.h"
+#include "qcstring.h"
+class TextStream;
/** Abstract base class for any configuration option.
*/
@@ -74,17 +76,17 @@ class ConfigOption
void setUserComment(const QCString &u) { m_userComment += u; }
protected:
- virtual void writeTemplate(FTextStream &t,bool sl,bool upd) = 0;
- virtual void compareDoxyfile(FTextStream &t) = 0;
+ virtual void writeTemplate(TextStream &t,bool sl,bool upd) = 0;
+ virtual void compareDoxyfile(TextStream &t) = 0;
virtual void convertStrToVal() {}
virtual void emptyValueToDefault() {}
virtual void substEnvVars() = 0;
virtual void init() {}
- void writeBoolValue(FTextStream &t,bool v);
- void writeIntValue(FTextStream &t,int i);
- void writeStringValue(FTextStream &t,const QCString &s);
- void writeStringList(FTextStream &t,const StringVector &l);
+ void writeBoolValue(TextStream &t,bool v);
+ void writeIntValue(TextStream &t,int i);
+ void writeStringValue(TextStream &t,const QCString &s);
+ void writeStringList(TextStream &t,const StringVector &l);
QCString m_spaces;
QCString m_name;
@@ -106,8 +108,8 @@ class ConfigInfo : public ConfigOption
m_name = name;
m_doc = doc;
}
- void writeTemplate(FTextStream &t, bool sl,bool);
- void compareDoxyfile(FTextStream &){};
+ void writeTemplate(TextStream &t, bool sl,bool);
+ void compareDoxyfile(TextStream &){};
void substEnvVars() {}
};
@@ -129,8 +131,8 @@ class ConfigList : public ConfigOption
WidgetType widgetType() const { return m_widgetType; }
StringVector *valueRef() { return &m_value; }
StringVector getDefault() { return m_defaultValue; }
- void writeTemplate(FTextStream &t,bool sl,bool);
- void compareDoxyfile(FTextStream &t);
+ void writeTemplate(TextStream &t,bool sl,bool);
+ void compareDoxyfile(TextStream &t);
void substEnvVars();
void init() { m_value = m_defaultValue; }
private:
@@ -156,10 +158,10 @@ class ConfigEnum : public ConfigOption
const std::vector<QCString> &values() const { return m_valueRange; }
QCString *valueRef() { return &m_value; }
void substEnvVars();
- void writeTemplate(FTextStream &t,bool sl,bool);
+ void writeTemplate(TextStream &t,bool sl,bool);
void convertStrToVal();
- void compareDoxyfile(FTextStream &t);
- void init() { m_value = m_defValue.copy(); }
+ void compareDoxyfile(TextStream &t);
+ void init() { m_value = m_defValue; }
private:
std::vector<QCString> m_valueRange;
@@ -187,10 +189,10 @@ class ConfigString : public ConfigOption
WidgetType widgetType() const { return m_widgetType; }
void setDefaultValue(const char *v) { m_defValue = v; }
QCString *valueRef() { return &m_value; }
- void writeTemplate(FTextStream &t,bool sl,bool);
- void compareDoxyfile(FTextStream &t);
+ void writeTemplate(TextStream &t,bool sl,bool);
+ void compareDoxyfile(TextStream &t);
void substEnvVars();
- void init() { m_value = m_defValue.copy(); }
+ void init() { m_value = m_defValue; }
void emptyValueToDefault() { if(m_value.isEmpty()) m_value=m_defValue; };
private:
@@ -220,8 +222,8 @@ class ConfigInt : public ConfigOption
int maxVal() const { return m_maxVal; }
void convertStrToVal();
void substEnvVars();
- void writeTemplate(FTextStream &t,bool sl,bool upd);
- void compareDoxyfile(FTextStream &t);
+ void writeTemplate(TextStream &t,bool sl,bool upd);
+ void compareDoxyfile(TextStream &t);
void init() { m_value = m_defValue; }
private:
int m_value;
@@ -249,8 +251,8 @@ class ConfigBool : public ConfigOption
void convertStrToVal();
void substEnvVars();
void setValueString(const QCString &v) { m_valueString = v; }
- void writeTemplate(FTextStream &t,bool sl,bool upd);
- void compareDoxyfile(FTextStream &t);
+ void writeTemplate(TextStream &t,bool sl,bool upd);
+ void compareDoxyfile(TextStream &t);
void init() { m_value = m_defValue; }
private:
bool m_value;
@@ -265,8 +267,8 @@ class ConfigObsolete : public ConfigOption
public:
ConfigObsolete(const char *name) : ConfigOption(O_Obsolete)
{ m_name = name; }
- void writeTemplate(FTextStream &,bool,bool);
- void compareDoxyfile(FTextStream &) {}
+ void writeTemplate(TextStream &,bool,bool);
+ void compareDoxyfile(TextStream &) {}
void substEnvVars() {}
};
@@ -277,8 +279,8 @@ class ConfigDisabled : public ConfigOption
public:
ConfigDisabled(const char *name) : ConfigOption(O_Disabled)
{ m_name = name; }
- void writeTemplate(FTextStream &,bool,bool);
- void compareDoxyfile(FTextStream &) {}
+ void writeTemplate(TextStream &,bool,bool);
+ void compareDoxyfile(TextStream &) {}
void substEnvVars() {}
};
@@ -362,9 +364,9 @@ class ConfigImpl
/*! Returns the ConfigOption corresponding with \a name or 0 if
* the option is not supported.
*/
- ConfigOption *get(const char *name) const
+ ConfigOption *get(const QCString &name) const
{
- auto it = m_dict.find(name);
+ auto it = m_dict.find(name.str());
return it!=m_dict.end() ? it->second : nullptr;
}
/* @} */
@@ -472,12 +474,12 @@ class ConfigImpl
* is \c TRUE the description of each configuration option will
* be omitted.
*/
- void writeTemplate(FTextStream &t,bool shortIndex,bool updateOnly);
+ void writeTemplate(TextStream &t,bool shortIndex,bool updateOnly);
/*! Writes a the differences between the current configuration and the
* template configuration to stream \a t.
*/
- void compareDoxyfile(FTextStream &t);
+ void compareDoxyfile(TextStream &t);
void setHeader(const char *header) { m_header = header; }
@@ -506,14 +508,13 @@ class ConfigImpl
* \returns TRUE if successful, or FALSE if the string could not be
* parsed.
*/
- //bool parseString(const char *fn,const char *str);
- bool parseString(const char *fn,const char *str,bool upd = FALSE);
+ bool parseString(const QCString &fn,const QCString &str,bool upd = FALSE);
/*! Parse a configuration file with name \a fn.
* \returns TRUE if successful, FALSE if the file could not be
* opened or read.
*/
- bool parse(const char *fn,bool upd = FALSE);
+ bool parse(const QCString &fn,bool upd = FALSE);
/*! Called from the constructor, will add doxygen's default options
* to the configuration object
diff --git a/src/configimpl.l b/src/configimpl.l
index 1f9be8d..cf5386e 100644
--- a/src/configimpl.l
+++ b/src/configimpl.l
@@ -26,21 +26,21 @@
#include <ctype.h>
#include <stdarg.h>
#include <errno.h>
-
-#include <qfileinfo.h>
-#include <qdir.h>
-
#include <thread>
#include <algorithm>
+#include <fstream>
+#include <iostream>
#include "regex.h"
#include "configimpl.h"
#include "version.h"
#include "portable.h"
#include "message.h"
-
#include "lang_cfg.h"
#include "configoptions.h"
+#include "fileinfo.h"
+#include "dir.h"
+#include "textstream.h"
#define YY_NO_INPUT 1
#define YY_NO_UNISTD_H 1
@@ -58,14 +58,14 @@ void config_err(const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
- vfprintf(stderr, (QCString(error_str) + fmt).data(), args);
+ vfprintf(stderr, qPrint(QCString(error_str) + fmt), args);
va_end(args);
}
void config_term(const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
- vfprintf(stderr, (QCString(error_str) + fmt).data(), args);
+ vfprintf(stderr, qPrint(QCString(error_str) + fmt), args);
va_end(args);
fprintf(stderr, "%s\n", "Exiting...");
exit(1);
@@ -75,14 +75,14 @@ void config_warn(const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
- vfprintf(stderr, (QCString(warning_str) + fmt).data(), args);
+ vfprintf(stderr, qPrint(QCString(warning_str) + fmt), args);
va_end(args);
}
static QCString configStringRecode(
const QCString &str,
- const char *fromEncoding,
- const char *toEncoding);
+ const QCString &fromEncoding,
+ const QCString &toEncoding);
#define MAX_INCLUDE_DEPTH 10
#define YY_NEVER_INTERACTIVE 1
@@ -91,7 +91,7 @@ static QCString configStringRecode(
*/
static QCString convertToComment(const QCString &s, const QCString &u)
{
- //printf("convertToComment(%s)=%s\n",s.data(),u.data());
+ //printf("convertToComment(%s)=%s\n",qPrint(s),qPrint(u));
QCString result;
if (!s.isEmpty())
{
@@ -128,23 +128,24 @@ static QCString convertToComment(const QCString &s, const QCString &u)
return result;
}
-void ConfigOption::writeBoolValue(FTextStream &t,bool v)
+void ConfigOption::writeBoolValue(TextStream &t,bool v)
{
t << " ";
if (v) t << "YES"; else t << "NO";
}
-void ConfigOption::writeIntValue(FTextStream &t,int i)
+void ConfigOption::writeIntValue(TextStream &t,int i)
{
t << " " << i;
}
-void ConfigOption::writeStringValue(FTextStream &t,const QCString &s)
+void ConfigOption::writeStringValue(TextStream &t,const QCString &s)
{
char c;
bool needsEscaping=FALSE;
// convert the string back to it original g_encoding
QCString se = configStringRecode(s,"UTF-8",m_encoding);
+ if (se.isEmpty()) return;
const char *p=se.data();
if (p)
{
@@ -170,12 +171,12 @@ void ConfigOption::writeStringValue(FTextStream &t,const QCString &s)
}
}
-void ConfigOption::writeStringList(FTextStream &t,const StringVector &l)
+void ConfigOption::writeStringList(TextStream &t,const StringVector &l)
{
bool first=TRUE;
for (const auto &p : l)
{
- if (!first) t << " \\" << endl;
+ if (!first) t << " \\\n";
QCString s=p.c_str();
if (!first)
t << " ";
@@ -198,7 +199,7 @@ void ConfigInt::convertStrToVal()
if (!ok || val<m_minVal || val>m_maxVal)
{
config_warn("argument '%s' for option %s is not a valid number in the range [%d..%d]!\n"
- "Using the default: %d!\n",m_valueString.data(),m_name.data(),m_minVal,m_maxVal,m_value);
+ "Using the default: %d!\n",qPrint(m_valueString),qPrint(m_name),m_minVal,m_maxVal,m_value);
}
else
{
@@ -223,7 +224,7 @@ void ConfigBool::convertStrToVal()
else
{
config_warn("argument '%s' for option %s is not a valid boolean value\n"
- "Using the default: %s!\n",m_valueString.data(),m_name.data(),m_value?"YES":"NO");
+ "Using the default: %s!\n",qPrint(m_valueString),qPrint(m_name),m_value?"YES":"NO");
}
}
}
@@ -246,7 +247,7 @@ void ConfigEnum::convertStrToVal()
}
config_warn("argument '%s' for option %s is not a valid enum value\n"
- "Using the default: %s!\n",m_value.data(),m_name.data(),m_defValue.data());
+ "Using the default: %s!\n",qPrint(m_value),qPrint(m_name),qPrint(m_defValue));
m_value = m_defValue;
}
@@ -322,24 +323,24 @@ bool &ConfigImpl::getBool(const char *fileName,int num,const char *name) const
/* ------------------------------------------ */
-void ConfigInfo::writeTemplate(FTextStream &t, bool sl,bool)
+void ConfigInfo::writeTemplate(TextStream &t, bool sl,bool)
{
if (!sl)
{
t << "\n";
}
t << "#---------------------------------------------------------------------------\n";
- t << "# " << m_doc << endl;
+ t << "# " << m_doc << "\n";
t << "#---------------------------------------------------------------------------\n";
}
-void ConfigList::writeTemplate(FTextStream &t,bool sl,bool)
+void ConfigList::writeTemplate(TextStream &t,bool sl,bool)
{
if (!sl)
{
- t << endl;
+ t << "\n";
t << convertToComment(m_doc, m_userComment);
- t << endl;
+ t << "\n";
}
else if (!m_userComment.isEmpty())
{
@@ -350,12 +351,12 @@ void ConfigList::writeTemplate(FTextStream &t,bool sl,bool)
t << "\n";
}
-void ConfigList::compareDoxyfile(FTextStream &t)
+void ConfigList::compareDoxyfile(TextStream &t)
{
auto get_stripped = [](std::string s) { return QCString(s.c_str()).stripWhiteSpace(); };
auto is_not_empty = [get_stripped](std::string s) { return !get_stripped(s).isEmpty(); };
- int defCnt = std::count_if( m_value.begin(), m_value.end(),is_not_empty);
- int valCnt = std::count_if(m_defaultValue.begin(),m_defaultValue.end(),is_not_empty);
+ size_t defCnt = std::count_if( m_value.begin(), m_value.end(),is_not_empty);
+ size_t valCnt = std::count_if(m_defaultValue.begin(),m_defaultValue.end(),is_not_empty);
if ( valCnt != defCnt)
{
writeTemplate(t,TRUE,TRUE);
@@ -383,13 +384,13 @@ void ConfigList::compareDoxyfile(FTextStream &t)
}
}
-void ConfigEnum::writeTemplate(FTextStream &t,bool sl,bool)
+void ConfigEnum::writeTemplate(TextStream &t,bool sl,bool)
{
if (!sl)
{
- t << endl;
+ t << "\n";
t << convertToComment(m_doc, m_userComment);
- t << endl;
+ t << "\n";
}
else if (!m_userComment.isEmpty())
{
@@ -400,18 +401,18 @@ void ConfigEnum::writeTemplate(FTextStream &t,bool sl,bool)
t << "\n";
}
-void ConfigEnum::compareDoxyfile(FTextStream &t)
+void ConfigEnum::compareDoxyfile(TextStream &t)
{
if (m_value != m_defValue) writeTemplate(t,TRUE,TRUE);
}
-void ConfigString::writeTemplate(FTextStream &t,bool sl,bool)
+void ConfigString::writeTemplate(TextStream &t,bool sl,bool)
{
if (!sl)
{
- t << endl;
+ t << "\n";
t << convertToComment(m_doc, m_userComment);
- t << endl;
+ t << "\n";
}
else if (!m_userComment.isEmpty())
{
@@ -422,18 +423,18 @@ void ConfigString::writeTemplate(FTextStream &t,bool sl,bool)
t << "\n";
}
-void ConfigString::compareDoxyfile(FTextStream &t)
+void ConfigString::compareDoxyfile(TextStream &t)
{
if (m_value.stripWhiteSpace() != m_defValue.stripWhiteSpace()) writeTemplate(t,TRUE,TRUE);
}
-void ConfigInt::writeTemplate(FTextStream &t,bool sl,bool upd)
+void ConfigInt::writeTemplate(TextStream &t,bool sl,bool upd)
{
if (!sl)
{
- t << endl;
+ t << "\n";
t << convertToComment(m_doc, m_userComment);
- t << endl;
+ t << "\n";
}
else if (!m_userComment.isEmpty())
{
@@ -451,24 +452,25 @@ void ConfigInt::writeTemplate(FTextStream &t,bool sl,bool upd)
t << "\n";
}
-void ConfigInt::compareDoxyfile(FTextStream &t)
+void ConfigInt::compareDoxyfile(TextStream &t)
{
if (m_value != m_defValue) writeTemplate(t,TRUE,TRUE);
}
-void ConfigBool::writeTemplate(FTextStream &t,bool sl,bool upd)
+void ConfigBool::writeTemplate(TextStream &t,bool sl,bool upd)
{
if (!sl)
{
- t << endl;
+ t << "\n";
t << convertToComment(m_doc, m_userComment);
- t << endl;
+ t << "\n";
}
else if (!m_userComment.isEmpty())
{
t << convertToComment("", m_userComment);
}
- t << m_name << m_spaces.left(MAX_OPTION_LENGTH-m_name.length()) << "=";
+ QCString spaces = m_spaces.left(MAX_OPTION_LENGTH-m_name.length());
+ t << m_name << spaces << "=";
if (upd && !m_valueString.isEmpty())
{
writeStringValue(t,m_valueString);
@@ -480,13 +482,13 @@ void ConfigBool::writeTemplate(FTextStream &t,bool sl,bool upd)
t << "\n";
}
-void ConfigBool::compareDoxyfile(FTextStream &t)
+void ConfigBool::compareDoxyfile(TextStream &t)
{
if (m_value != m_defValue) writeTemplate(t,TRUE,TRUE);
}
-void ConfigObsolete::writeTemplate(FTextStream &,bool,bool) {}
-void ConfigDisabled::writeTemplate(FTextStream &,bool,bool) {}
+void ConfigObsolete::writeTemplate(TextStream &,bool,bool) {}
+void ConfigDisabled::writeTemplate(TextStream &,bool,bool) {}
/* -----------------------------------------------------------------
*
@@ -545,36 +547,34 @@ static yy_size_t yyread(char *buf,yy_size_t max_size)
static QCString configStringRecode(
const QCString &str,
- const char *fromEncoding,
- const char *toEncoding)
+ const QCString &inputEncoding,
+ const QCString &outputEncoding)
{
- 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);
+ void *cd = portable_iconv_open(outputEncoding.data(),inputEncoding.data());
if (cd==(void *)(-1))
{
config_term("Error: unsupported character conversion: '%s'->'%s'\n",
- inputEncoding.data(),outputEncoding.data());
+ qPrint(inputEncoding),qPrint(outputEncoding));
}
size_t iLeft=(size_t)inputSize;
size_t oLeft=(size_t)outputSize;
- char *inputPtr = str.rawData();
+ const char *inputPtr = str.data();
char *outputPtr = output.rawData();
if (!portable_iconv(cd, &inputPtr, &iLeft, &outputPtr, &oLeft))
{
outputSize-=(int)oLeft;
output.resize(outputSize+1);
output.at(outputSize)='\0';
- //printf("iconv: input size=%d output size=%d\n[%s]\n",size,newSize,srcBuf.data());
+ //printf("iconv: input size=%d output size=%d\n[%s]\n",size,newSize,qPrint(srcBuf));
}
else
{
config_term("Error: failed to translate characters from %s to %s: %s\n",
- inputEncoding.data(),outputEncoding.data(),strerror(errno));
+ qPrint(inputEncoding),qPrint(outputEncoding),strerror(errno));
}
portable_iconv_close(cd);
return output;
@@ -655,7 +655,7 @@ static void processString()
if (!warned)
{
config_warn("Invalid value for '%s' tag at line %d, file %s: Value '%s' is not properly quoted\n",
- g_cmd.data(),g_yyLineNr,g_yyFileName.data(),g_string->stripWhiteSpace().data());
+ qPrint(g_cmd),g_yyLineNr,qPrint(g_yyFileName),qPrint(g_string->stripWhiteSpace()));
}
warned=true;
}
@@ -671,14 +671,14 @@ static void processString()
// update encoding
checkEncoding();
- //printf("Processed string '%s'\n",g_string->data());
+ //printf("Processed string '%s'\n",qPrint(g_string));
}
static void processList()
{
bool allowCommaAsSeparator = g_cmd!="PREDEFINED";
- const QCString s = stripComment(g_listStr.stripWhiteSpace());
+ QCString s = stripComment(g_listStr.stripWhiteSpace());
int l = s.length();
QCString elemStr;
@@ -689,7 +689,7 @@ static void processList()
if (!elemStr.isEmpty())
{
QCString e = configStringRecode(elemStr,g_encoding,"UTF-8");
- //printf("Processed list element '%s'\n",e.data());
+ //printf("Processed list element '%s'\n",qPrint(e));
g_list->push_back(e.str());
elemStr="";
}
@@ -741,7 +741,7 @@ static void processList()
if (!warned)
{
config_warn("Invalid value for '%s' tag at line %d, file %s: Values in list '%s' are not properly space %sseparated\n",
- g_cmd.data(),g_yyLineNr,g_yyFileName.data(),g_listStr.stripWhiteSpace().data(),allowCommaAsSeparator?"or comma ":"");
+ qPrint(g_cmd),g_yyLineNr,qPrint(g_yyFileName),qPrint(g_listStr.stripWhiteSpace()),allowCommaAsSeparator?"or comma ":"");
warned=true;
}
needsSeparator=false;
@@ -759,18 +759,18 @@ static void processList()
if (insideQuote)
{
config_warn("Invalid value for '%s' tag at line %d, file %s: Values in list '%s' are not properly quoted\n",
- g_cmd.data(),g_yyLineNr,g_yyFileName.data(),g_listStr.stripWhiteSpace().data());
+ qPrint(g_cmd),g_yyLineNr,qPrint(g_yyFileName),qPrint(g_listStr.stripWhiteSpace()));
}
}
-static FILE *tryPath(const char *path,const char *fileName)
+static FILE *tryPath(const QCString &path,const QCString &fileName)
{
- QCString absName=(path ? (QCString)path+"/"+fileName : (QCString)fileName);
- QFileInfo fi(absName);
+ QCString absName=(!path.isEmpty() ? path+"/"+fileName : fileName);
+ FileInfo fi(absName.str());
if (fi.exists() && fi.isFile())
{
FILE *f=Portable::fopen(absName,"r");
- if (!f) config_err("could not open file %s for reading\n",absName.data());
+ if (!f) config_err("could not open file %s for reading\n",qPrint(absName));
return f;
}
return 0;
@@ -779,15 +779,15 @@ static FILE *tryPath(const char *path,const char *fileName)
static void substEnvVarsInStrList(StringVector &sl);
static void substEnvVarsInString(QCString &s);
-static FILE *findFile(const char *fileName)
+static FILE *findFile(const QCString &fileName)
{
- if (fileName==0)
+ if (fileName.isEmpty())
{
return 0;
}
if (Portable::isAbsolutePath(fileName))
{
- return tryPath(NULL, fileName);
+ return tryPath(QCString(), fileName);
}
substEnvVarsInStrList(g_includePathList);
for (const auto &s : g_includePathList)
@@ -799,11 +799,11 @@ static FILE *findFile(const char *fileName)
return tryPath(".",fileName);
}
-static void readIncludeFile(const char *incName)
+static void readIncludeFile(const QCString &incName)
{
if (g_includeStack.size()==MAX_INCLUDE_DEPTH) {
config_term("maximum include depth (%d) reached, %s is not included. Aborting...\n",
- MAX_INCLUDE_DEPTH,incName);
+ MAX_INCLUDE_DEPTH,qPrint(incName));
}
QCString inc = incName;
@@ -822,7 +822,7 @@ static void readIncludeFile(const char *incName)
// For debugging
#if SHOW_INCLUDES
for (size_t i=0;i<g_includeStack.size();i++) msg(" ");
- msg("@INCLUDE = %s: parsing...\n",inc.data());
+ msg("@INCLUDE = %s: parsing...\n",qPrint(inc));
#endif
// store the state of the old file
@@ -840,7 +840,7 @@ static void readIncludeFile(const char *incName)
}
else
{
- config_term("@INCLUDE = %s: not found!\n",inc.data());
+ config_term("@INCLUDE = %s: not found!\n",qPrint(inc));
}
}
@@ -878,7 +878,7 @@ static void readIncludeFile(const char *incName)
if (option==0) // oops not known
{
config_warn("ignoring unsupported tag '%s' at line %d, file %s\n",
- g_cmd.data(),g_yyLineNr,g_yyFileName.data());
+ qPrint(g_cmd),g_yyLineNr,qPrint(g_yyFileName));
BEGIN(SkipInvalid);
}
else // known tag
@@ -921,13 +921,13 @@ static void readIncludeFile(const char *incName)
if (g_configUpdate)
{
config_warn("Tag '%s' at line %d of file '%s' has become obsolete.\n"
- " This tag has been removed.\n", g_cmd.data(),g_yyLineNr,g_yyFileName.data());
+ " This tag has been removed.\n", qPrint(g_cmd),g_yyLineNr,qPrint(g_yyFileName));
}
else
{
config_warn("Tag '%s' at line %d of file '%s' has become obsolete.\n"
" To avoid this warning please remove this line from your configuration "
- "file or upgrade it using \"doxygen -u\"\n", g_cmd.data(),g_yyLineNr,g_yyFileName.data());
+ "file or upgrade it using \"doxygen -u\"\n", qPrint(g_cmd),g_yyLineNr,qPrint(g_yyFileName));
}
BEGIN(SkipInvalid);
break;
@@ -935,13 +935,13 @@ static void readIncludeFile(const char *incName)
if (g_configUpdate)
{
config_warn("Tag '%s' at line %d of file '%s' belongs to an option that was not enabled at compile time.\n"
- " This tag has been removed.\n", g_cmd.data(),g_yyLineNr,g_yyFileName.data());
+ " This tag has been removed.\n", qPrint(g_cmd),g_yyLineNr,qPrint(g_yyFileName));
}
else
{
config_warn("Tag '%s' at line %d of file '%s' belongs to an option that was not enabled at compile time.\n"
" To avoid this warning please remove this line from your configuration "
- "file or upgrade it using \"doxygen -u\", or recompile doxygen with this feature enabled.\n", g_cmd.data(),g_yyLineNr,g_yyFileName.data());
+ "file or upgrade it using \"doxygen -u\", or recompile doxygen with this feature enabled.\n", qPrint(g_cmd),g_yyLineNr,qPrint(g_yyFileName));
}
BEGIN(SkipInvalid);
break;
@@ -954,7 +954,7 @@ static void readIncludeFile(const char *incName)
if (option==0) // oops not known
{
config_warn("ignoring unsupported tag '%s' at line %d, file %s\n",
- g_cmd.data(),g_yyLineNr,g_yyFileName.data());
+ qPrint(g_cmd),g_yyLineNr,qPrint(g_yyFileName));
BEGIN(SkipInvalid);
}
else // known tag
@@ -976,19 +976,19 @@ static void readIncludeFile(const char *incName)
case ConfigOption::O_Int:
case ConfigOption::O_Bool:
config_warn("operator += not supported for '%s'. Ignoring line at line %d, file %s\n",
- yytext,g_yyLineNr,g_yyFileName.data());
+ yytext,g_yyLineNr,qPrint(g_yyFileName));
BEGIN(SkipInvalid);
break;
case ConfigOption::O_Obsolete:
config_warn("Tag '%s' at line %d of file %s has become obsolete.\n"
"To avoid this warning please update your configuration "
- "file using \"doxygen -u\"\n", g_cmd.data(),g_yyLineNr,g_yyFileName.data());
+ "file using \"doxygen -u\"\n", qPrint(g_cmd),g_yyLineNr,qPrint(g_yyFileName));
BEGIN(SkipInvalid);
break;
case ConfigOption::O_Disabled:
config_warn("Tag '%s' at line %d of file %s belongs to an option that was not enabled at compile time.\n"
"To avoid this warning please remove this line from your configuration "
- "file, upgrade it using \"doxygen -u\", or recompile doxygen with this feature enabled.\n", g_cmd.data(),g_yyLineNr,g_yyFileName.data());
+ "file, upgrade it using \"doxygen -u\", or recompile doxygen with this feature enabled.\n", qPrint(g_cmd),g_yyLineNr,qPrint(g_yyFileName));
BEGIN(SkipInvalid);
break;
}
@@ -1025,7 +1025,7 @@ static void readIncludeFile(const char *incName)
}
}
-<Start>[a-z_A-Z0-9]+ { config_warn("ignoring unknown tag '%s' at line %d, file %s\n",yytext,g_yyLineNr,g_yyFileName.data()); }
+<Start>[a-z_A-Z0-9]+ { config_warn("ignoring unknown tag '%s' at line %d, file %s\n",yytext,g_yyLineNr,qPrint(g_yyFileName)); }
/*-------------- GetString ---------------*/
<GetString>\n { processString();
@@ -1075,21 +1075,21 @@ static void readIncludeFile(const char *incName)
<*>\\[ \r\t]*\n { g_yyLineNr++; }
<*>[ \t\r]
<*>\n { g_yyLineNr++ ; }
-<*>. { config_warn("ignoring unknown character '%c' at line %d, file %s\n",yytext[0],g_yyLineNr,g_yyFileName.data()); }
+<*>. { config_warn("ignoring unknown character '%c' at line %d, file %s\n",yytext[0],g_yyLineNr,qPrint(g_yyFileName)); }
%%
/*@ ----------------------------------------------------------------------------
*/
-void ConfigImpl::writeTemplate(FTextStream &t,bool sl,bool upd)
+void ConfigImpl::writeTemplate(TextStream &t,bool sl,bool upd)
{
/* print first lines of user comment that were at the beginning of the file, might have special meaning for editors */
- if (m_startComment)
+ if (!m_startComment.isEmpty())
{
- t << takeStartComment() << endl;
+ t << takeStartComment() << "\n";
}
- t << "# Doxyfile " << getDoxygenVersion() << endl << endl;
+ t << "# Doxyfile " << getDoxygenVersion() << "\n\n";
if (!sl)
{
t << convertToComment(m_header,"");
@@ -1099,17 +1099,17 @@ void ConfigImpl::writeTemplate(FTextStream &t,bool sl,bool upd)
option->writeTemplate(t,sl,upd);
}
/* print last lines of user comment that were at the end of the file */
- if (m_userComment)
+ if (!m_userComment.isEmpty())
{
t << "\n";
t << takeUserComment();
}
}
-void ConfigImpl::compareDoxyfile(FTextStream &t)
+void ConfigImpl::compareDoxyfile(TextStream &t)
{
t << "# Difference with default Doxyfile " << getFullVersion();
- t << endl;
+ t << "\n";
for (const auto &option : m_options)
{
option->m_userComment = "";
@@ -1173,7 +1173,7 @@ static void substEnvVarsInStrList(StringVector &sl)
// here we strip the quote again
substEnvVarsInString(result);
- //printf("Result %s was quoted=%d\n",result.data(),wasQuoted);
+ //printf("Result %s was quoted=%d\n",qPrint(result),wasQuoted);
if (!wasQuoted) /* as a result of the expansion, a single string
may have expanded into a list, which we'll
@@ -1285,7 +1285,7 @@ void ConfigImpl::init()
if (opt==0)
{
config_term("Config option '%s' has invalid depends relation on unknown option '%s'\n",
- option->name().data(),depName.data());
+ qPrint(option->name()),qPrint(depName));
}
}
}
@@ -1298,68 +1298,41 @@ void ConfigImpl::create()
addConfigOptions(this);
}
-static QCString configFileToString(const char *name)
+static QCString configFileToString(const QCString &name)
{
- if (name==0 || name[0]==0) return 0;
- QFile f;
+ if (name.isEmpty()) return QCString();
- bool fileOpened=FALSE;
- if (name[0]=='-' && name[1]==0) // read from stdin
+ auto stream2string = [](std::istream &in) -> std::string
{
- fileOpened=f.open(IO_ReadOnly,stdin);
- if (fileOpened)
- {
- const int bSize=4096;
- QCString contents(bSize+1);
- int totalSize=0;
- int size;
- while ((size=f.readBlock(contents.rawData()+totalSize,bSize))==bSize)
- {
- totalSize+=bSize;
- contents.resize(totalSize+bSize+1);
- }
- totalSize+=size+2;
- contents.resize(totalSize);
- contents.at(totalSize-2)='\n'; // to help the scanner
- contents.at(totalSize-1)='\0';
- return contents;
- }
+ std::string ret;
+ char buffer[4096];
+ while (in.read(buffer, sizeof(buffer))) ret.append(buffer, sizeof(buffer));
+ ret.append(buffer, static_cast<uint>(in.gcount()));
+ if (!ret.empty() && ret[ret.length()-1]!='\n') ret+='\n'; // to help the scanner
+ return ret;
+ };
+
+ if (name=="-") // read from stdin
+ {
+ // read contents from stdin into contents string
+ return stream2string(std::cin);
}
else // read from file
{
- QFileInfo fi(name);
- if (!fi.exists() || !fi.isFile())
+ std::ifstream f(name.str(),std::istream::in);
+ if (!f.is_open())
{
- config_err("file '%s' not found\n",name);
+ config_term("file '%s' not found or could not be opened\n",qPrint(name));
return "";
}
- f.setName(name);
- fileOpened=f.open(IO_ReadOnly);
- if (fileOpened)
- {
- int fsize=f.size();
- QCString contents(fsize+2);
- f.readBlock(contents.rawData(),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;
- }
+ return stream2string(f);
}
- if (!fileOpened)
- {
- config_term("cannot open file '%s' for reading\n",name);
- }
- return "";
}
-bool ConfigImpl::parseString(const char *fn,const char *str,bool update)
+bool ConfigImpl::parseString(const QCString &fn,const QCString &str,bool update)
{
g_config = ConfigImpl::instance();
- g_inputString = str;
+ g_inputString = str.data();
g_inputPosition = 0;
g_yyFileName = fn;
g_yyLineNr = 1;
@@ -1373,13 +1346,13 @@ bool ConfigImpl::parseString(const char *fn,const char *str,bool update)
return TRUE;
}
-bool ConfigImpl::parse(const char *fn,bool update)
+bool ConfigImpl::parse(const QCString &fn,bool update)
{
int retval;
g_encoding = "UTF-8";
- printlex(yy_flex_debug, TRUE, __FILE__, fn);
+ printlex(yy_flex_debug, TRUE, __FILE__, qPrint(fn));
retval = parseString(fn,configFileToString(fn), update);
- printlex(yy_flex_debug, FALSE, __FILE__, fn);
+ printlex(yy_flex_debug, FALSE, __FILE__, qPrint(fn));
return retval;
}
@@ -1393,10 +1366,10 @@ static void cleanUpPaths(StringVector &str)
std::replace(path.begin(),path.end(),'\\','/');
if ((path[0]!='/' && (path.size()<=2 || path[1]!=':')) || path[path.size()-1]!='/')
{
- QFileInfo fi(path.c_str());
+ FileInfo fi(path);
if (fi.exists() && fi.isDir())
{
- path = fi.absFilePath().utf8().str();
+ path = fi.absFilePath();
if (path[path.size()-1]!='/') path+='/';
}
}
@@ -1410,7 +1383,7 @@ static bool checkFileName(const QCString &s,const char *optionName)
if ((val=="yes" || val=="true" || val=="1" || val=="all") ||
(val=="no" || val=="false" || val=="0" || val=="none"))
{
- err("file name expected for option %s, got %s instead. Ignoring...\n",optionName,s.data());
+ err("file name expected for option %s, got %s instead. Ignoring...\n",optionName,qPrint(s));
return false;
}
return true;
@@ -1432,21 +1405,21 @@ static void checkList(const StringVector &list,const char *name, bool equalRequi
int i=item.find('=');
if (i==-1 && equalRequired)
{
- err("Illegal format for option %s, no equal sign ('=') specified for item '%s'\n",name,item.data());
+ err("Illegal format for option %s, no equal sign ('=') specified for item '%s'\n",name,qPrint(item));
}
if (i!=-1)
{
QCString myName=item.left(i).stripWhiteSpace();
if (myName.isEmpty())
{
- err("Illegal format for option %s, no name specified for item '%s'\n",name,item.data());
+ err("Illegal format for option %s, no name specified for item '%s'\n",name,qPrint(item));
}
else if (valueRequired)
{
QCString myValue=item.right(item.length()-i-1).stripWhiteSpace();
if (myValue.isEmpty())
{
- err("Illegal format for option %s, no value specified for item '%s'\n",name,item.data());
+ err("Illegal format for option %s, no value specified for item '%s'\n",name,qPrint(item));
}
}
}
@@ -1529,10 +1502,8 @@ void Config::checkAndCorrect()
StringVector stripFromPath = Config_getList(STRIP_FROM_PATH);
if (stripFromPath.empty()) // by default use the current path
{
- QString p = QDir::currentDirPath();
- if (p.at(p.length()-1)!='/')
- p.append('/');
- stripFromPath.push_back(p.utf8().str());
+ std::string p = Dir::currentDirPath()+"/";
+ stripFromPath.push_back(p);
}
else
{
@@ -1551,11 +1522,11 @@ void Config::checkAndCorrect()
QCString headerFile = Config_getString(HTML_HEADER);
if (!headerFile.isEmpty())
{
- QFileInfo fi(headerFile);
+ FileInfo fi(headerFile.str());
if (!fi.exists())
{
config_term("tag HTML_HEADER: header file '%s' "
- "does not exist\n",headerFile.data());
+ "does not exist\n",qPrint(headerFile));
}
}
@@ -1564,11 +1535,11 @@ void Config::checkAndCorrect()
QCString footerFile = Config_getString(HTML_FOOTER);
if (!footerFile.isEmpty())
{
- QFileInfo fi(footerFile);
+ FileInfo fi(footerFile.str());
if (!fi.exists())
{
config_term("tag HTML_FOOTER: footer file '%s' "
- "does not exist\n",footerFile.data());
+ "does not exist\n",qPrint(footerFile));
}
}
@@ -1576,18 +1547,47 @@ void Config::checkAndCorrect()
// Test to see if MathJax code file is valid
if (Config_getBool(USE_MATHJAX))
{
+ QCString mathJaxFormat = Config_getEnum(MATHJAX_FORMAT);
+ QCString mathjaxVersion = Config_getEnum(MATHJAX_VERSION);
+ if (!mathJaxFormat.isEmpty())
+ {
+ if (mathjaxVersion == "MathJax_2")
+ {
+ if (mathJaxFormat=="chtml") Config_updateEnum(MATHJAX_FORMAT,"HTML-CSS");
+ }
+ else
+ {
+ if (mathJaxFormat=="HTML-CSS" || mathJaxFormat=="NativeMML")
+ {
+ Config_updateEnum(MATHJAX_FORMAT,"chtml");
+ }
+ }
+ }
+
QCString mathJaxCodefile = Config_getString(MATHJAX_CODEFILE);
if (!mathJaxCodefile.isEmpty())
{
- QFileInfo fi(mathJaxCodefile);
+ FileInfo fi(mathJaxCodefile.str());
if (!fi.exists())
{
config_term("tag MATHJAX_CODEFILE file '%s' "
- "does not exist\n",mathJaxCodefile.data());
+ "does not exist\n",qPrint(mathJaxCodefile));
}
}
QCString path = Config_getString(MATHJAX_RELPATH);
- if (!path.isEmpty() && path.at(path.length()-1)!='/')
+ if (path.isEmpty())
+ {
+ if (mathjaxVersion == "MathJax_2")
+ {
+ path = "https://cdn.jsdelivr.net/npm/mathjax@2";
+ }
+ else
+ {
+ path = "https://cdn.jsdelivr.net/npm/mathjax@3";
+ }
+ }
+
+ if (path.at(path.length()-1)!='/')
{
path+="/";
}
@@ -1599,11 +1599,11 @@ void Config::checkAndCorrect()
QCString latexHeaderFile = Config_getString(LATEX_HEADER);
if (!latexHeaderFile.isEmpty())
{
- QFileInfo fi(latexHeaderFile);
+ FileInfo fi(latexHeaderFile.str());
if (!fi.exists())
{
config_term("tag LATEX_HEADER: header file '%s' "
- "does not exist\n",latexHeaderFile.data());
+ "does not exist\n",qPrint(latexHeaderFile));
}
}
@@ -1612,11 +1612,11 @@ void Config::checkAndCorrect()
QCString latexFooterFile = Config_getString(LATEX_FOOTER);
if (!latexFooterFile.isEmpty())
{
- QFileInfo fi(latexFooterFile);
+ FileInfo fi(latexFooterFile.str());
if (!fi.exists())
{
config_term("tag LATEX_FOOTER: footer file '%s' "
- "does not exist\n",latexFooterFile.data());
+ "does not exist\n",qPrint(latexFooterFile));
}
}
@@ -1625,7 +1625,7 @@ void Config::checkAndCorrect()
const StringVector &includePath = Config_getList(INCLUDE_PATH);
for (const auto &s : includePath)
{
- QFileInfo fi(s.c_str());
+ FileInfo fi(s);
if (!fi.exists()) warn_uncond("tag INCLUDE_PATH: include path '%s' "
"does not exist\n",s.c_str());
}
@@ -1643,7 +1643,7 @@ void Config::checkAndCorrect()
int i_obrace=predef.find('(');
if ((i_obrace==0) || (i_equals==0) || (i_equals==1 && predef.at(i_equals-1)==':'))
{
- err("Illegal PREDEFINED format '%s', no define name specified\n",predef.data());
+ err("Illegal PREDEFINED format '%s', no define name specified\n",qPrint(predef));
}
}
}
@@ -1654,8 +1654,8 @@ void Config::checkAndCorrect()
for (const auto &alias : aliasList)
{
// match aliases of the form re1='name=' and re2='name{2} ='
- static const reg::Ex re1(R"(\a\w*\s*=)");
- static const reg::Ex re2(R"(\a\w*{\d+}\s*=)");
+ static const reg::Ex re1(R"(^\a\w*\s*=)");
+ static const reg::Ex re2(R"(^\a\w*{\d+}\s*=)");
if (!reg::search(alias,re1) && !reg::search(alias,re2))
{
err("Illegal ALIASES format '%s'. Use \"name=value\" or \"name{n}=value\", where n is the number of arguments\n",
@@ -1765,7 +1765,7 @@ void Config::checkAndCorrect()
}
else if (dotNumThreads<=0)
{
- dotNumThreads=QMAX(2,std::thread::hardware_concurrency()+1);
+ dotNumThreads=std::max(2u,std::thread::hardware_concurrency()+1);
}
Config_updateInt(DOT_NUM_THREADS,dotNumThreads);
@@ -1774,22 +1774,23 @@ void Config::checkAndCorrect()
QCString dotPath = Config_getString(DOT_PATH);
if (!dotPath.isEmpty())
{
- QFileInfo fi(dotPath);
+ FileInfo fi(dotPath.str());
if (fi.exists() && fi.isFile()) // user specified path + exec
{
- dotPath=fi.dirPath(TRUE).utf8()+"/";
+ dotPath=fi.dirPath(TRUE)+"/";
}
else
{
- QFileInfo dp(dotPath+"/dot"+Portable::commandExtension());
+ QCString dotExe = dotPath+"/dot"+Portable::commandExtension();
+ FileInfo dp(dotExe.str());
if (!dp.exists() || !dp.isFile())
{
- warn_uncond("the dot tool could not be found at %s\n",dotPath.data());
+ warn_uncond("the dot tool could not be found at %s\n",qPrint(dotPath));
dotPath="";
}
else
{
- dotPath=dp.dirPath(TRUE).utf8()+"/";
+ dotPath=dp.dirPath(TRUE)+"/";
}
}
#if defined(_WIN32) // convert slashes
@@ -1808,29 +1809,30 @@ void Config::checkAndCorrect()
QCString plantumlJarPath = Config_getString(PLANTUML_JAR_PATH);
if (!plantumlJarPath.isEmpty())
{
- QFileInfo pu(plantumlJarPath);
+ FileInfo pu(plantumlJarPath.str());
if (pu.exists() && pu.isDir()) // PLANTUML_JAR_PATH is directory
{
- QFileInfo jar(plantumlJarPath+Portable::pathSeparator()+"plantuml.jar");
+ QCString plantumlJar = plantumlJarPath+Portable::pathSeparator()+"plantuml.jar";
+ FileInfo jar(plantumlJar.str());
if (jar.exists() && jar.isFile())
{
- plantumlJarPath = jar.dirPath(TRUE).utf8()+Portable::pathSeparator();
+ plantumlJarPath = jar.dirPath(TRUE)+Portable::pathSeparator();
}
else
{
err("Jar file plantuml.jar not found at location "
- "specified via PLANTUML_JAR_PATH: '%s'\n",plantumlJarPath.data());
+ "specified via PLANTUML_JAR_PATH: '%s'\n",qPrint(plantumlJarPath));
plantumlJarPath="";
}
}
else if (pu.exists() && pu.isFile() && plantumlJarPath.right(4)==".jar") // PLANTUML_JAR_PATH is file
{
- plantumlJarPath = pu.dirPath(TRUE).utf8()+Portable::pathSeparator();
+ plantumlJarPath = pu.dirPath(TRUE)+Portable::pathSeparator();
}
else
{
err("path specified via PLANTUML_JAR_PATH does not exist or not a directory: %s\n",
- plantumlJarPath.data());
+ qPrint(plantumlJarPath));
plantumlJarPath="";
}
}
@@ -1841,15 +1843,16 @@ void Config::checkAndCorrect()
QCString diaPath = Config_getString(DIA_PATH);
if (!diaPath.isEmpty())
{
- QFileInfo dp(diaPath+"/dia"+Portable::commandExtension());
+ QCString diaExe = diaPath+"/dia"+Portable::commandExtension();
+ FileInfo dp(diaExe.str());
if (!dp.exists() || !dp.isFile())
{
- warn_uncond("dia could not be found at %s\n",diaPath.data());
+ warn_uncond("dia could not be found at %s\n",qPrint(diaPath));
diaPath="";
}
else
{
- diaPath=dp.dirPath(TRUE).utf8()+"/";
+ diaPath=dp.dirPath(TRUE)+"/";
#if defined(_WIN32) // convert slashes
uint i=0,l=diaPath.length();
for (i=0;i<l;i++) if (diaPath.at(i)=='/') diaPath.at(i)='\\';
@@ -1868,13 +1871,13 @@ void Config::checkAndCorrect()
if (inputSources.empty())
{
// use current dir as the default
- inputSources.push_back(QDir::currentDirPath().utf8().str());
+ inputSources.push_back(Dir::currentDirPath());
}
else
{
for (const auto &s : inputSources)
{
- QFileInfo fi(s.c_str());
+ FileInfo fi(s.c_str());
if (!fi.exists())
{
warn_uncond("tag INPUT: input source '%s' does not exist\n",s.c_str());
@@ -2000,15 +2003,6 @@ void Config::checkAndCorrect()
Config_updateInt(HTML_COLORSTYLE_GAMMA,gamma);
//------------------------
- QCString mathJaxFormat = Config_getEnum(MATHJAX_FORMAT);
- if (!mathJaxFormat.isEmpty() && mathJaxFormat!="HTML-CSS" &&
- mathJaxFormat!="NativeMML" && mathJaxFormat!="SVG")
- {
- err("Unsupported value for MATHJAX_FORMAT: Should be one of HTML-CSS, NativeMML, or SVG\n");
- Config_updateEnum(MATHJAX_FORMAT,"HTML-CSS");
- }
-
- //------------------------
// add default words if needed
const StringVector &annotationFromBrief = Config_getList(ABBREVIATE_BRIEF);
if (annotationFromBrief.empty())
@@ -2077,7 +2071,7 @@ void Config::checkAndCorrect()
{
if (option->kind()==ConfigOption::O_Bool)
{
- printf("disabling option %s\n",option->name().data());
+ printf("disabling option %s\n",qPrint(option->name()));
ConfigImpl_getBool("option->name("))=FALSE; // also disable this option
}
}
@@ -2088,20 +2082,27 @@ void Config::checkAndCorrect()
}
-void Config::writeTemplate(FTextStream &t,bool shortList,bool update)
+void Config::writeTemplate(TextStream &t,bool shortList,bool update)
{
ConfigImpl::instance()->writeTemplate(t,shortList,update);
}
-void Config::compareDoxyfile(FTextStream &t)
+void Config::compareDoxyfile(TextStream &t)
{
postProcess(FALSE, TRUE);
ConfigImpl::instance()->compareDoxyfile(t);
}
-bool Config::parse(const char *fileName,bool update)
+bool Config::parse(const QCString &fileName,bool update)
{
- return ConfigImpl::instance()->parse(fileName,update);
+ bool parseRes = ConfigImpl::instance()->parse(fileName,update);
+ if (!parseRes) return parseRes;
+
+ // Internally we use the default format UTF-8 and
+ // when updating etc. the output is in this format as well and not in the read format
+ ConfigString *option = (ConfigString*)g_config->get("DOXYFILE_ENCODING");
+ option->init();
+ return parseRes;
}
void Config::postProcess(bool clearHeaderAndFooter, bool compare)
diff --git a/src/constexp.l b/src/constexp.l
index acff1eb..a26d517 100644
--- a/src/constexp.l
+++ b/src/constexp.l
@@ -147,7 +147,7 @@ bool ConstExpressionParser::parse(const char *fileName,int lineNr,const std::str
constexpYYrestart( yyin, p->yyscanner );
printlex(yy_flex_debug, true, __FILE__, fileName);
- //printf("Expression: '%s'\n",s.data());
+ //printf("Expression: '%s'\n",qPrint(s));
constexpYYparse(p->yyscanner);
diff --git a/src/context.cpp b/src/context.cpp
index f4614dd..2ae62a0 100644
--- a/src/context.cpp
+++ b/src/context.cpp
@@ -14,7 +14,7 @@
*/
#include <assert.h>
-#include <qdir.h>
+#include <sstream>
#include "context.h"
#include "config.h"
@@ -54,6 +54,7 @@
#include "groupdef.h"
#include "searchindex.h"
#include "resourcemgr.h"
+#include "dir.h"
// TODO: pass the current file to Dot*::writeGraph, so the user can put dot graphs in other
// files as well
@@ -254,9 +255,9 @@ class PropertyMapper
void addProperty(const char *name,typename PropertyFunc::Handler handle)
{
auto it = m_map.find(name);
- if (it==m_map.end())
+ if (it!=m_map.end())
{
- err("Error: adding property '%s' more than once",name);
+ err("adding property '%s' more than once\n",name);
}
else
{
@@ -270,11 +271,11 @@ class PropertyMapper
* @returns A variant representing the properties value or an
* invalid variant if it was not found.
*/
- TemplateVariant get(const T *obj,const char *name) const
+ TemplateVariant get(const T *obj,const QCString &name) const
{
//printf("PropertyMapper::get(%s)\n",name);
TemplateVariant result;
- auto it = m_map.find(name);
+ auto it = m_map.find(name.str());
return it!=m_map.end() ? (*it->second)(obj) : TemplateVariant();
}
@@ -325,10 +326,10 @@ ConfigContext::~ConfigContext()
delete p;
}
-TemplateVariant ConfigContext::get(const char *name) const
+TemplateVariant ConfigContext::get(const QCString &name) const
{
TemplateVariant result;
- if (name)
+ if (!name.isEmpty())
{
const ConfigValues::Info *option = ConfigValues::instance().get(name);
if (option)
@@ -396,7 +397,7 @@ class DoxygenContext::Private
init=TRUE;
}
}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -424,7 +425,7 @@ DoxygenContext::~DoxygenContext()
delete p;
}
-TemplateVariant DoxygenContext::get(const char *n) const
+TemplateVariant DoxygenContext::get(const QCString &n) const
{
return p->get(n);
}
@@ -1222,7 +1223,7 @@ class TranslateContext::Private
m_vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
m_sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -1247,7 +1248,7 @@ TranslateContext::~TranslateContext()
delete p;
}
-TemplateVariant TranslateContext::get(const char *n) const
+TemplateVariant TranslateContext::get(const QCString &n) const
{
return p->get(n);
}
@@ -1257,37 +1258,34 @@ static TemplateVariant parseDoc(const Definition *def,const QCString &file,int l
{
TemplateVariant result;
DocRoot *root = validatingParseDoc(file,line,def,0,docStr,TRUE,FALSE,
- 0,isBrief,FALSE,Config_getBool(MARKDOWN_SUPPORT));
- QGString docs;
+ QCString(),isBrief,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ TextStream ts;
+ switch (g_globals.outputFormat)
{
- FTextStream ts(&docs);
- switch (g_globals.outputFormat)
- {
- case ContextOutputFormat_Html:
- {
- HtmlCodeGenerator codeGen(ts,relPath);
- HtmlDocVisitor visitor(ts,codeGen,def);
- root->accept(&visitor);
- }
- break;
- case ContextOutputFormat_Latex:
- {
- LatexCodeGenerator codeGen(ts,relPath,file);
- LatexDocVisitor visitor(ts,codeGen,def->getDefFileExtension(),FALSE);
- root->accept(&visitor);
- }
- break;
- // TODO: support other generators
- default:
- err("context.cpp: output format not yet supported");
- break;
- }
+ case ContextOutputFormat_Html:
+ {
+ HtmlCodeGenerator codeGen(ts,relPath);
+ HtmlDocVisitor visitor(ts,codeGen,def);
+ root->accept(&visitor);
+ }
+ break;
+ case ContextOutputFormat_Latex:
+ {
+ LatexCodeGenerator codeGen(ts,relPath,file);
+ LatexDocVisitor visitor(ts,codeGen,def->getDefFileExtension(),FALSE);
+ root->accept(&visitor);
+ }
+ break;
+ // TODO: support other generators
+ default:
+ err("context.cpp: output format not yet supported\n");
+ break;
}
bool isEmpty = root->isEmpty();
if (isEmpty)
result = "";
else
- result = TemplateVariant(docs,TRUE);
+ result = TemplateVariant(ts.str().c_str(),TRUE);
delete root;
return result;
}
@@ -1297,30 +1295,29 @@ static TemplateVariant parseCode(MemberDef *md,const QCString &scopeName,const Q
{
auto intf = Doxygen::parserManager->getCodeParser(md->getDefFileExtension());
intf->resetCodeParserState();
- QGString s;
- FTextStream t(&s);
+ TextStream t;
switch (g_globals.outputFormat)
{
case ContextOutputFormat_Html:
{
HtmlCodeGenerator codeGen(t,relPath);
- intf->parseCode(codeGen,scopeName,code,md->getLanguage(),FALSE,0,md->getBodyDef(),
+ intf->parseCode(codeGen,scopeName,code,md->getLanguage(),FALSE,QCString(),md->getBodyDef(),
startLine,endLine,TRUE,md,showLineNumbers,md);
}
break;
case ContextOutputFormat_Latex:
{
LatexCodeGenerator codeGen(t,relPath,md->docFile());
- intf->parseCode(codeGen,scopeName,code,md->getLanguage(),FALSE,0,md->getBodyDef(),
+ intf->parseCode(codeGen,scopeName,code,md->getLanguage(),FALSE,QCString(),md->getBodyDef(),
startLine,endLine,TRUE,md,showLineNumbers,md);
}
break;
// TODO: support other generators
default:
- err("context.cpp: output format not yet supported");
+ err("context.cpp: output format not yet supported\n");
break;
}
- return TemplateVariant(s.data(),TRUE);
+ return TemplateVariant(t.str(),TRUE);
}
static TemplateVariant parseCode(const FileDef *fd,const QCString &relPath)
@@ -1328,18 +1325,17 @@ static TemplateVariant parseCode(const FileDef *fd,const QCString &relPath)
static bool filterSourceFiles = Config_getBool(FILTER_SOURCE_FILES);
auto intf = Doxygen::parserManager->getCodeParser(fd->getDefFileExtension());
intf->resetCodeParserState();
- QGString s;
- FTextStream t(&s);
+ TextStream t;
switch (g_globals.outputFormat)
{
case ContextOutputFormat_Html:
{
HtmlCodeGenerator codeGen(t,relPath);
- intf->parseCode(codeGen,0,
+ intf->parseCode(codeGen,QCString(),
fileToString(fd->absFilePath(),filterSourceFiles,TRUE), // the sources
fd->getLanguage(), // lang
FALSE, // isExampleBlock
- 0, // exampleName
+ QCString(), // exampleName
const_cast<FileDef*>(fd), // fileDef, TODO: should be const
-1, // startLine
-1, // endLine
@@ -1354,11 +1350,11 @@ static TemplateVariant parseCode(const FileDef *fd,const QCString &relPath)
case ContextOutputFormat_Latex:
{
LatexCodeGenerator codeGen(t,relPath,fd->docFile());
- intf->parseCode(codeGen,0,
+ intf->parseCode(codeGen,QCString(),
fileToString(fd->absFilePath(),filterSourceFiles,TRUE), // the sources
fd->getLanguage(), // lang
FALSE, // isExampleBlock
- 0, // exampleName
+ QCString(), // exampleName
const_cast<FileDef*>(fd), // fileDef, TODO: should be const
-1, // startLine
-1, // endLine
@@ -1372,10 +1368,10 @@ static TemplateVariant parseCode(const FileDef *fd,const QCString &relPath)
break;
// TODO: support other generators
default:
- err("context.cpp: output format not yet supported");
+ err("context.cpp: output format not yet supported\n");
break;
}
- return TemplateVariant(s.data(),TRUE);
+ return TemplateVariant(t.str().c_str(),TRUE);
}
//------------------------------------------------------------------------
@@ -1556,6 +1552,7 @@ class DefinitionContext
case Definition::TypePackage: result="package"; break;
case Definition::TypePage: result="page"; break;
case Definition::TypeDir: result="dir"; break;
+ case Definition::TypeConcept: result="concept"; break;
case Definition::TypeMember: break;
}
return result;
@@ -1697,7 +1694,7 @@ class IncludeInfoContext::Private
init=TRUE;
}
}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -1748,7 +1745,7 @@ IncludeInfoContext::~IncludeInfoContext()
delete p;
}
-TemplateVariant IncludeInfoContext::get(const char *n) const
+TemplateVariant IncludeInfoContext::get(const QCString &n) const
{
return p->get(n);
}
@@ -1880,7 +1877,7 @@ class ClassContext::Private : public DefinitionContext<ClassContext::Private>
if (!cd->cookie()) { cd->setCookie(new ClassContext::Private::Cachable(cd)); }
}
virtual ~Private() {}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -1950,14 +1947,13 @@ class ClassContext::Private : public DefinitionContext<ClassContext::Private>
}
TemplateVariant inheritanceDiagram() const
{
- QGString result;
+ TextStream t;
static bool haveDot = Config_getBool(HAVE_DOT);
static bool classDiagrams = Config_getBool(CLASS_DIAGRAMS);
static bool classGraph = Config_getBool(CLASS_GRAPH);
if (haveDot && (classDiagrams || classGraph))
{
DotClassGraph *cg = getClassGraph();
- FTextStream t(&result);
switch (g_globals.outputFormat)
{
case ContextOutputFormat_Html:
@@ -1980,7 +1976,7 @@ class ClassContext::Private : public DefinitionContext<ClassContext::Private>
break;
// TODO: support other generators
default:
- err("context.cpp: output format not yet supported");
+ err("context.cpp: output format not yet supported\n");
break;
}
g_globals.dynSectionId++;
@@ -1988,34 +1984,33 @@ class ClassContext::Private : public DefinitionContext<ClassContext::Private>
else if (classDiagrams)
{
ClassDiagram d(m_classDef);
- FTextStream t(&result);
switch (g_globals.outputFormat)
{
case ContextOutputFormat_Html:
{
- FTextStream tt(&result);
+ TextStream tt;
QCString name = convertToHtml(m_classDef->displayName());
d.writeImage(tt,g_globals.outputDir,
relPathAsString(),
m_classDef->getOutputFileBase());
- if (!result.isEmpty())
+ if (!tt.empty())
{
- t << "<div class=\"center\">" << endl;
+ t << "<div class=\"center\">\n";
t << " <img src=\"";
t << relPathAsString() << m_classDef->getOutputFileBase();
- t << ".png\" usemap=\"#" << convertToId(name) << "_map\" alt=\"\"/>" << endl;
- t << " <map id=\"" << convertToId(name) << "_map\" name=\"" << convertToId(name) << "_map\">" << endl;
- t << result;
- t << " </map>" << endl;
+ t << ".png\" usemap=\"#" << convertToId(name) << "_map\" alt=\"\"/>\n";
+ t << " <map id=\"" << convertToId(name) << "_map\" name=\"" << convertToId(name) << "_map\">\n";
+ t << tt.str();
+ t << " </map>\n";
t << "</div>";
}
else
{
- t << "<div class=\"center\">" << endl;
+ t << "<div class=\"center\">\n";
t << " <img src=\"";
t << relPathAsString() << m_classDef->getOutputFileBase();
- t << ".png\" alt=\"\"/>" << endl;
+ t << ".png\" alt=\"\"/>\n";
t << "</div>";
}
}
@@ -2027,12 +2022,12 @@ class ClassContext::Private : public DefinitionContext<ClassContext::Private>
break;
// TODO: support other generators
default:
- err("context.cpp: output format not yet supported");
+ err("context.cpp: output format not yet supported\n");
break;
}
g_globals.dynSectionId++;
}
- return TemplateVariant(result.data(),TRUE);
+ return TemplateVariant(t.str().c_str(),TRUE);
}
DotClassGraph *getCollaborationGraph() const
{
@@ -2051,11 +2046,10 @@ class ClassContext::Private : public DefinitionContext<ClassContext::Private>
TemplateVariant collaborationDiagram() const
{
static bool haveDot = Config_getBool(HAVE_DOT);
- QGString result;
+ TextStream t;
if (haveDot)
{
DotClassGraph *cg = getCollaborationGraph();
- FTextStream t(&result);
switch (g_globals.outputFormat)
{
case ContextOutputFormat_Html:
@@ -2078,12 +2072,12 @@ class ClassContext::Private : public DefinitionContext<ClassContext::Private>
break;
// TODO: support other generators
default:
- err("context.cpp: output format not yet supported");
+ err("context.cpp: output format not yet supported\n");
break;
}
g_globals.dynSectionId++;
}
- return TemplateVariant(result.data(),TRUE);
+ return TemplateVariant(t.str().c_str(),TRUE);
}
TemplateVariant includeInfo() const
@@ -2121,7 +2115,7 @@ class ClassContext::Private : public DefinitionContext<ClassContext::Private>
return cache.inheritedByList.get();
}
TemplateVariant getMemberList(SharedPtr<MemberListInfoContext> &list,
- MemberListType type,const char *title,bool=FALSE) const
+ MemberListType type,const QCString &title,bool=FALSE) const
{
if (!list)
{
@@ -2644,7 +2638,7 @@ PropertyMapper<ClassContext::Private> ClassContext::Private::s_inst;
ClassContext::ClassContext(const ClassDef *cd) : RefCountedContext("ClassContext")
{
- //printf("ClassContext::ClassContext(%s)\n",cd?cd->name().data():"<none>");
+ //printf("ClassContext::ClassContext(%s)\n",cd?qPrint(cd->name()):"<none>");
p = new Private(cd);
}
@@ -2653,7 +2647,7 @@ ClassContext::~ClassContext()
delete p;
}
-TemplateVariant ClassContext::get(const char *n) const
+TemplateVariant ClassContext::get(const QCString &n) const
{
return p->get(n);
}
@@ -2700,7 +2694,7 @@ class NamespaceContext::Private : public DefinitionContext<NamespaceContext::Pri
if (!nd->cookie()) { nd->setCookie(new NamespaceContext::Private::Cachable(nd)); }
}
virtual ~Private() {}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -2783,7 +2777,7 @@ class NamespaceContext::Private : public DefinitionContext<NamespaceContext::Pri
return cache.constantgroups.get();
}
TemplateVariant getMemberList(SharedPtr<MemberListInfoContext> &list,
- MemberListType type,const char *title,bool=FALSE) const
+ MemberListType type,const QCString &title,bool=FALSE) const
{
if (!list)
{
@@ -2944,7 +2938,7 @@ NamespaceContext::~NamespaceContext()
delete p;
}
-TemplateVariant NamespaceContext::get(const char *n) const
+TemplateVariant NamespaceContext::get(const QCString &n) const
{
return p->get(n);
}
@@ -3001,7 +2995,7 @@ class FileContext::Private : public DefinitionContext<FileContext::Private>
if (!fd->cookie()) { fd->setCookie(new FileContext::Private::Cachable(fd)); }
}
virtual ~Private() {}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -3056,11 +3050,10 @@ class FileContext::Private : public DefinitionContext<FileContext::Private>
TemplateVariant includeGraph() const
{
static bool haveDot = Config_getBool(HAVE_DOT);
- QGString result;
+ TextStream t;
if (haveDot)
{
DotInclDepGraph *cg = getIncludeGraph();
- FTextStream t(&result);
switch (g_globals.outputFormat)
{
case ContextOutputFormat_Html:
@@ -3083,12 +3076,12 @@ class FileContext::Private : public DefinitionContext<FileContext::Private>
break;
// TODO: support other generators
default:
- err("context.cpp: output format not yet supported");
+ err("context.cpp: output format not yet supported\n");
break;
}
g_globals.dynSectionId++;
}
- return TemplateVariant(result.data(),TRUE);
+ return TemplateVariant(t.str().c_str(),TRUE);
}
DotInclDepGraph *getIncludedByGraph() const
{
@@ -3108,11 +3101,10 @@ class FileContext::Private : public DefinitionContext<FileContext::Private>
TemplateVariant includedByGraph() const
{
static bool haveDot = Config_getBool(HAVE_DOT);
- QGString result;
+ TextStream t;
if (haveDot)
{
DotInclDepGraph *cg = getIncludedByGraph();
- FTextStream t(&result);
switch (g_globals.outputFormat)
{
case ContextOutputFormat_Html:
@@ -3135,12 +3127,12 @@ class FileContext::Private : public DefinitionContext<FileContext::Private>
break;
// TODO: support other generators
default:
- err("context.cpp: output format not yet supported");
+ err("context.cpp: output format not yet supported\n");
break;
}
g_globals.dynSectionId++;
}
- return TemplateVariant(result.data(),TRUE);
+ return TemplateVariant(t.str().c_str(),TRUE);
}
TemplateVariant hasDetails() const
{
@@ -3222,7 +3214,7 @@ class FileContext::Private : public DefinitionContext<FileContext::Private>
return cache.constantgroups.get();
}
TemplateVariant getMemberList(SharedPtr<MemberListInfoContext> &list,
- MemberListType type,const char *title,bool=FALSE) const
+ MemberListType type,const QCString &title,bool=FALSE) const
{
if (!list)
{
@@ -3398,7 +3390,7 @@ FileContext::~FileContext()
delete p;
}
-TemplateVariant FileContext::get(const char *n) const
+TemplateVariant FileContext::get(const QCString &n) const
{
return p->get(n);
}
@@ -3431,7 +3423,7 @@ class DirContext::Private : public DefinitionContext<DirContext::Private>
if (!dd->cookie()) { dd->setCookie(new DirContext::Private::Cachable(dd)); }
}
virtual ~Private() {}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -3514,13 +3506,12 @@ class DirContext::Private : public DefinitionContext<DirContext::Private>
}
TemplateVariant dirGraph() const
{
- QGString result;
+ TextStream t;
static bool haveDot = Config_getBool(HAVE_DOT);
static bool dirGraph = Config_getBool(DIRECTORY_GRAPH);
if (haveDot && dirGraph)
{
DotDirDeps *graph = getDirDepsGraph();
- FTextStream t(&result);
switch (g_globals.outputFormat)
{
case ContextOutputFormat_Html:
@@ -3549,12 +3540,12 @@ class DirContext::Private : public DefinitionContext<DirContext::Private>
break;
// TODO: support other generators
default:
- err("context.cpp: output format not yet supported");
+ err("context.cpp: output format not yet supported\n");
break;
}
g_globals.dynSectionId++;
}
- return TemplateVariant(result.data(),TRUE);
+ return TemplateVariant(t.str().c_str(),TRUE);
}
private:
@@ -3588,7 +3579,7 @@ DirContext::~DirContext()
delete p;
}
-TemplateVariant DirContext::get(const char *n) const
+TemplateVariant DirContext::get(const QCString &n) const
{
return p->get(n);
}
@@ -3617,7 +3608,7 @@ class PageContext::Private : public DefinitionContext<PageContext::Private>
if (!pd->cookie()) { pd->setCookie(new PageContext::Private::Cachable(pd)); }
}
virtual ~Private() {}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -3721,7 +3712,7 @@ PageContext::~PageContext()
delete p;
}
-TemplateVariant PageContext::get(const char *n) const
+TemplateVariant PageContext::get(const QCString &n) const
{
return p->get(n);
}
@@ -3731,15 +3722,15 @@ TemplateVariant PageContext::get(const char *n) const
class TextGeneratorHtml : public TextGeneratorIntf
{
public:
- TextGeneratorHtml(FTextStream &ts,const QCString &relPath)
+ TextGeneratorHtml(TextStream &ts,const QCString &relPath)
: m_ts(ts), m_relPath(relPath) {}
- void writeString(const char *s,bool keepSpaces) const
+ void writeString(const QCString &s,bool keepSpaces) const
{
static const char *hex="0123456789ABCDEF";
- if (s==0) return;
+ if (s.isEmpty()) return;
if (keepSpaces)
{
- const char *p=s;
+ const char *p=s.data();
char c;
while ((c=*p++))
{
@@ -3782,11 +3773,11 @@ class TextGeneratorHtml : public TextGeneratorIntf
}
}
- void writeLink(const char *ref,const char *f,
- const char *anchor,const char *name
+ void writeLink(const QCString &ref,const QCString &f,
+ const QCString &anchor,const QCString &name
) const
{
- if (ref)
+ if (!ref.isEmpty())
{
m_ts << "<a class=\"elRef\" ";
m_ts << externalLinkTarget();
@@ -3797,15 +3788,15 @@ class TextGeneratorHtml : public TextGeneratorIntf
}
m_ts << "href=\"";
m_ts << externalRef(m_relPath,ref,TRUE);
- if (f) m_ts << f << Doxygen::htmlFileExtension;
- if (anchor) m_ts << "#" << anchor;
+ if (!f.isEmpty()) m_ts << f << Doxygen::htmlFileExtension;
+ if (!anchor.isEmpty()) m_ts << "#" << anchor;
m_ts << "\">";
m_ts << convertToHtml(name);
m_ts << "</a>";
}
private:
- FTextStream &m_ts;
+ TextStream &m_ts;
QCString m_relPath;
};
@@ -3814,8 +3805,8 @@ class TextGeneratorHtml : public TextGeneratorIntf
class TextGeneratorLatex : public TextGeneratorIntf
{
public:
- TextGeneratorLatex(FTextStream &ts) : m_ts(ts) {}
- void writeString(const char *s,bool keepSpaces) const
+ TextGeneratorLatex(TextStream &ts) : m_ts(ts) {}
+ void writeString(const QCString &s,bool keepSpaces) const
{
if (s==0) return;
m_ts << convertToLaTeX(s,FALSE,keepSpaces);
@@ -3828,17 +3819,17 @@ class TextGeneratorLatex : public TextGeneratorIntf
m_ts << "~";
}
}
- void writeLink(const char *ref,const char *f,
- const char *anchor,const char *text
+ void writeLink(const QCString &ref,const QCString &f,
+ const QCString &anchor,const QCString &text
) const
{
static bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
- if (!ref && pdfHyperlinks)
+ if (ref.isEmpty() && pdfHyperlinks)
{
m_ts << "\\mbox{\\hyperlink{";
- if (f) m_ts << stripPath(f);
- if (f && anchor) m_ts << "_";
- if (anchor) m_ts << anchor;
+ if (!f.isEmpty()) m_ts << stripPath(f);
+ if (!f.isEmpty() && !anchor.isEmpty()) m_ts << "_";
+ if (!anchor.isEmpty()) m_ts << anchor;
m_ts << "}{";
filterLatexString(m_ts,text,
false, // insideTabbing
@@ -3864,7 +3855,7 @@ class TextGeneratorLatex : public TextGeneratorIntf
}
private:
- FTextStream &m_ts;
+ TextStream &m_ts;
};
//------------------------------------------------------------------------
@@ -3878,7 +3869,7 @@ class TextGeneratorFactory
if (instance==0) instance = new TextGeneratorFactory;
return instance;
}
- TextGeneratorIntf *create(FTextStream &ts,const QCString &relPath)
+ TextGeneratorIntf *create(TextStream &ts,const QCString &relPath)
{
switch (g_globals.outputFormat)
{
@@ -3898,14 +3889,13 @@ class TextGeneratorFactory
TemplateVariant createLinkedText(const Definition *def,const QCString &relPath,const QCString &text)
{
- QGString s;
- FTextStream ts(&s);
+ TextStream ts;
TextGeneratorIntf *tg = TextGeneratorFactory::instance()->create(ts,relPath);
if (tg)
{
linkifyText(*tg,def->getOuterScope(),def->getBodyDef(),def,text);
delete tg;
- return TemplateVariant(s.data(),TRUE);
+ return TemplateVariant(ts.str().c_str(),true);
}
else
{
@@ -4069,7 +4059,7 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private>
}
}
virtual ~Private() {}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -4687,16 +4677,11 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private>
Cachable &cache = getCache();
if (!cache.labels)
{
- QStrList sl;
- m_memberDef->getLabels(sl,m_memberDef->getOuterScope());
+ StringVector sl = m_memberDef->getLabels(m_memberDef->getOuterScope());
TemplateList *tl = TemplateList::alloc();
- if (sl.count()>0)
+ for (const auto &s : sl)
{
- QStrListIterator it(sl);
- for (;it.current();++it)
- {
- tl->append(*it);
- }
+ tl->append(s.c_str());
}
cache.labels.reset(tl);
}
@@ -4945,8 +4930,7 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private>
if (hasCallGraph().toBool())
{
DotCallGraph *cg = getCallGraph();
- QGString result;
- FTextStream t(&result);
+ TextStream t;
switch (g_globals.outputFormat)
{
case ContextOutputFormat_Html:
@@ -4969,11 +4953,11 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private>
break;
// TODO: support other generators
default:
- err("context.cpp: output format not yet supported");
+ err("context.cpp: output format not yet supported\n");
break;
}
g_globals.dynSectionId++;
- return TemplateVariant(result.data(),TRUE);
+ return TemplateVariant(t.str().c_str(),TRUE);
}
else
{
@@ -4984,7 +4968,7 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private>
{
if (hasReferencedByRelation().toBool())
{
- err("context.cpp: output format not yet supported");
+ err("context.cpp: output format not yet supported\n");
}
return TemplateVariant("");
}
@@ -5017,8 +5001,7 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private>
if (hasCallerGraph().toBool())
{
DotCallGraph *cg = getCallerGraph();
- QGString result;
- FTextStream t(&result);
+ TextStream t;
switch (g_globals.outputFormat)
{
case ContextOutputFormat_Html:
@@ -5041,11 +5024,11 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private>
break;
// TODO: support other generators
default:
- err("context.cpp: output format not yet supported");
+ err("context.cpp: output format not yet supported\n");
break;
}
g_globals.dynSectionId++;
- return TemplateVariant(result.data(),TRUE);
+ return TemplateVariant(t.str().c_str(),TRUE);
}
else
{
@@ -5056,7 +5039,7 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private>
{
if (hasReferencesRelation().toBool())
{
- err("context.cpp: output format not yet supported");
+ err("context.cpp: output format not yet supported\n");
}
return TemplateVariant("");
}
@@ -5176,7 +5159,7 @@ MemberContext::~MemberContext()
delete p;
}
-TemplateVariant MemberContext::get(const char *n) const
+TemplateVariant MemberContext::get(const QCString &n) const
{
return p->get(n);
}
@@ -5242,7 +5225,7 @@ class ModuleContext::Private : public DefinitionContext<ModuleContext::Private>
if (!gd->cookie()) { gd->setCookie(new ModuleContext::Private::Cachable(gd)); }
}
virtual ~Private() {}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -5281,13 +5264,12 @@ class ModuleContext::Private : public DefinitionContext<ModuleContext::Private>
}
TemplateVariant groupGraph() const
{
- QGString result;
+ TextStream t;
static bool haveDot = Config_getBool(HAVE_DOT);
static bool groupGraphs = Config_getBool(GROUP_GRAPHS);
if (haveDot && groupGraphs)
{
DotGroupCollaboration *graph = getGroupGraph();
- FTextStream t(&result);
switch (g_globals.outputFormat)
{
case ContextOutputFormat_Html:
@@ -5314,12 +5296,12 @@ class ModuleContext::Private : public DefinitionContext<ModuleContext::Private>
break;
// TODO: support other generators
default:
- err("context.cpp: output format not yet supported");
+ err("context.cpp: output format not yet supported\n");
break;
}
g_globals.dynSectionId++;
}
- return TemplateVariant(result.data(),TRUE);
+ return TemplateVariant(t.str().c_str(),TRUE);
}
TemplateVariant hasDetails() const
{
@@ -5451,7 +5433,7 @@ class ModuleContext::Private : public DefinitionContext<ModuleContext::Private>
}
TemplateVariant getMemberList(SharedPtr<MemberListInfoContext> &list,
- MemberListType type,const char *title,bool=FALSE) const
+ MemberListType type,const QCString &title,bool=FALSE) const
{
if (!list)
{
@@ -5688,7 +5670,7 @@ ModuleContext::~ModuleContext()
delete p;
}
-TemplateVariant ModuleContext::get(const char *n) const
+TemplateVariant ModuleContext::get(const QCString &n) const
{
return p->get(n);
}
@@ -5767,7 +5749,7 @@ class ClassIndexContext::Private
init=TRUE;
}
}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -5853,7 +5835,7 @@ ClassIndexContext::~ClassIndexContext()
}
// TemplateStructIntf
-TemplateVariant ClassIndexContext::get(const char *n) const
+TemplateVariant ClassIndexContext::get(const QCString &n) const
{
return p->get(n);
}
@@ -5959,7 +5941,7 @@ class ClassHierarchyContext::Private
init=TRUE;
}
}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -6066,7 +6048,7 @@ ClassHierarchyContext::~ClassHierarchyContext()
delete p;
}
-TemplateVariant ClassHierarchyContext::get(const char *name) const
+TemplateVariant ClassHierarchyContext::get(const QCString &name) const
{
return p->get(name);
}
@@ -6126,7 +6108,7 @@ class NestingNodeContext::Private
addPages(visitedClasses);
addModules(visitedClasses);
}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -6388,7 +6370,7 @@ NestingNodeContext::~NestingNodeContext()
delete p;
}
-TemplateVariant NestingNodeContext::get(const char *n) const
+TemplateVariant NestingNodeContext::get(const QCString &n) const
{
return p->get(n);
}
@@ -6412,7 +6394,9 @@ class NestingContext::Private : public GenericNodeListContext
if (!nd->isAnonymous() &&
(!rootOnly || nd->getOuterScope()==Doxygen::globalScope))
{
- bool hasChildren = namespaceHasNestedNamespace(nd);
+ bool hasChildren = namespaceHasNestedNamespace(nd) ||
+ namespaceHasNestedClass(nd,false,ClassDef::Class) ||
+ namespaceHasNestedConcept(nd);
bool isLinkable = nd->isLinkableInProject();
if (isLinkable || hasChildren)
{
@@ -6752,7 +6736,7 @@ class ClassTreeContext::Private
init=TRUE;
}
}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -6839,7 +6823,7 @@ ClassTreeContext::~ClassTreeContext()
delete p;
}
-TemplateVariant ClassTreeContext::get(const char *name) const
+TemplateVariant ClassTreeContext::get(const QCString &name) const
{
return p->get(name);
}
@@ -6916,7 +6900,7 @@ class NamespaceTreeContext::Private
init=TRUE;
}
}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -7005,7 +6989,7 @@ NamespaceTreeContext::~NamespaceTreeContext()
delete p;
}
-TemplateVariant NamespaceTreeContext::get(const char *name) const
+TemplateVariant NamespaceTreeContext::get(const QCString &name) const
{
return p->get(name);
}
@@ -7186,7 +7170,7 @@ class FileTreeContext::Private
init=TRUE;
}
}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -7260,7 +7244,7 @@ FileTreeContext::~FileTreeContext()
delete p;
}
-TemplateVariant FileTreeContext::get(const char *name) const
+TemplateVariant FileTreeContext::get(const QCString &name) const
{
return p->get(name);
}
@@ -7294,7 +7278,7 @@ class PageTreeContext::Private
init=TRUE;
}
}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -7368,7 +7352,7 @@ PageTreeContext::~PageTreeContext()
delete p;
}
-TemplateVariant PageTreeContext::get(const char *name) const
+TemplateVariant PageTreeContext::get(const QCString &name) const
{
return p->get(name);
}
@@ -7536,7 +7520,7 @@ class ModuleTreeContext::Private
init=TRUE;
}
}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -7610,7 +7594,7 @@ ModuleTreeContext::~ModuleTreeContext()
delete p;
}
-TemplateVariant ModuleTreeContext::get(const char *name) const
+TemplateVariant ModuleTreeContext::get(const QCString &name) const
{
return p->get(name);
}
@@ -7636,7 +7620,7 @@ class NavPathElemContext::Private
init=TRUE;
}
}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -7704,7 +7688,7 @@ NavPathElemContext::~NavPathElemContext()
delete p;
}
-TemplateVariant NavPathElemContext::get(const char *name) const
+TemplateVariant NavPathElemContext::get(const QCString &name) const
{
return p->get(name);
}
@@ -7738,7 +7722,7 @@ class ExampleTreeContext::Private
init=TRUE;
}
}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -7812,7 +7796,7 @@ ExampleTreeContext::~ExampleTreeContext()
delete p;
}
-TemplateVariant ExampleTreeContext::get(const char *name) const
+TemplateVariant ExampleTreeContext::get(const QCString &name) const
{
return p->get(name);
}
@@ -7847,7 +7831,7 @@ class GlobalsIndexContext::Private
init=TRUE;
}
}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -7965,7 +7949,7 @@ GlobalsIndexContext::~GlobalsIndexContext()
delete p;
}
-TemplateVariant GlobalsIndexContext::get(const char *name) const
+TemplateVariant GlobalsIndexContext::get(const QCString &name) const
{
return p->get(name);
}
@@ -8000,7 +7984,7 @@ class ClassMembersIndexContext::Private
init=TRUE;
}
}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -8120,7 +8104,7 @@ ClassMembersIndexContext::~ClassMembersIndexContext()
delete p;
}
-TemplateVariant ClassMembersIndexContext::get(const char *name) const
+TemplateVariant ClassMembersIndexContext::get(const QCString &name) const
{
return p->get(name);
}
@@ -8155,7 +8139,7 @@ class NamespaceMembersIndexContext::Private
init=TRUE;
}
}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -8272,7 +8256,7 @@ NamespaceMembersIndexContext::~NamespaceMembersIndexContext()
delete p;
}
-TemplateVariant NamespaceMembersIndexContext::get(const char *name) const
+TemplateVariant NamespaceMembersIndexContext::get(const QCString &name) const
{
return p->get(name);
}
@@ -8293,18 +8277,17 @@ class InheritanceGraphContext::Private
init=TRUE;
}
}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
TemplateVariant graph() const
{
- QGString result;
+ TextStream t;
static bool haveDot = Config_getBool(HAVE_DOT);
static bool graphicalHierarchy = Config_getBool(GRAPHICAL_HIERARCHY);
if (haveDot && graphicalHierarchy)
{
- FTextStream t(&result);
m_hierarchy->createGraph(m_node,t,
/*GOF_BITMAP,
EOF_Html,*/
@@ -8312,7 +8295,7 @@ class InheritanceGraphContext::Private
g_globals.outputDir+Portable::pathSeparator()+"inherits"+Doxygen::htmlFileExtension,
m_id);
}
- return TemplateVariant(result.data(),TRUE);
+ return TemplateVariant(t.str().c_str(),TRUE);
}
private:
DotGfxHierarchyTable *m_hierarchy;
@@ -8334,7 +8317,7 @@ InheritanceGraphContext::~InheritanceGraphContext()
delete p;
}
-TemplateVariant InheritanceGraphContext::get(const char *name) const
+TemplateVariant InheritanceGraphContext::get(const QCString &name) const
{
return p->get(name);
}
@@ -8357,7 +8340,7 @@ class InheritanceNodeContext::Private
init=TRUE;
}
}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -8393,7 +8376,7 @@ InheritanceNodeContext::~InheritanceNodeContext()
delete p;
}
-TemplateVariant InheritanceNodeContext::get(const char *name) const
+TemplateVariant InheritanceNodeContext::get(const QCString &name) const
{
return p->get(name);
}
@@ -8426,7 +8409,7 @@ InheritanceListContext::InheritanceListContext(const BaseClassList &list, bool b
{
name = cd->displayName();
}
- //printf("InheritanceListContext: adding %s baseClass=%d\n",name.data(),baseClasses);
+ //printf("InheritanceListContext: adding %s baseClass=%d\n",qPrint(name),baseClasses);
p->addClass(cd,name);
}
}
@@ -8541,7 +8524,7 @@ class MemberInfoContext::Private
init=TRUE;
}
}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -8604,7 +8587,7 @@ MemberInfoContext::~MemberInfoContext()
delete p;
}
-TemplateVariant MemberInfoContext::get(const char *name) const
+TemplateVariant MemberInfoContext::get(const QCString &name) const
{
return p->get(name);
}
@@ -8693,7 +8676,7 @@ class MemberGroupInfoContext::Private
init=TRUE;
}
}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -8776,7 +8759,7 @@ MemberGroupInfoContext::~MemberGroupInfoContext()
delete p;
}
-TemplateVariant MemberGroupInfoContext::get(const char *name) const
+TemplateVariant MemberGroupInfoContext::get(const QCString &name) const
{
return p->get(name);
}
@@ -8867,7 +8850,7 @@ class MemberListInfoContext::Private
init=TRUE;
}
}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -8948,7 +8931,7 @@ MemberListInfoContext::~MemberListInfoContext()
delete p;
}
-TemplateVariant MemberListInfoContext::get(const char *name) const
+TemplateVariant MemberListInfoContext::get(const QCString &name) const
{
return p->get(name);
}
@@ -8974,7 +8957,7 @@ class InheritedMemberInfoContext::Private
init=TRUE;
}
}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -9042,7 +9025,7 @@ InheritedMemberInfoContext::~InheritedMemberInfoContext()
delete p;
}
-TemplateVariant InheritedMemberInfoContext::get(const char *name) const
+TemplateVariant InheritedMemberInfoContext::get(const QCString &name) const
{
return p->get(name);
}
@@ -9155,7 +9138,7 @@ void InheritedMemberInfoListContext::addMemberList(
bool memberInSection = cd->countMembersIncludingGrouped(lt,cd,FALSE)>0;
bool show = (additionalList && !memberInSection) || // inherited member to show in the additional inherited members list
(!additionalList && memberInSection); // inherited member to show in a member list of the class
- //printf("%s:%s show=%d\n",cd->name().data(),MemberList::listTypeAsString(lt).data(),show);
+ //printf("%s:%s show=%d\n",qPrint(cd->name()),qPrint(MemberList::listTypeAsString(lt)),show);
if (show)
{
p->findInheritedMembers(cd,cd,lt,-1,title,additionalList,visited);
@@ -9206,7 +9189,7 @@ class ArgumentContext::Private
init=TRUE;
}
}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -9283,7 +9266,7 @@ ArgumentContext::~ArgumentContext()
delete p;
}
-TemplateVariant ArgumentContext::get(const char *name) const
+TemplateVariant ArgumentContext::get(const QCString &name) const
{
return p->get(name);
}
@@ -9373,7 +9356,7 @@ class SymbolContext::Private
init=TRUE;
}
}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -9477,7 +9460,7 @@ SymbolContext::~SymbolContext()
delete p;
}
-TemplateVariant SymbolContext::get(const char *name) const
+TemplateVariant SymbolContext::get(const QCString &name) const
{
return p->get(name);
}
@@ -9550,7 +9533,7 @@ class SymbolGroupContext::Private
init=TRUE;
}
}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -9596,7 +9579,7 @@ SymbolGroupContext::~SymbolGroupContext()
delete p;
}
-TemplateVariant SymbolGroupContext::get(const char *name) const
+TemplateVariant SymbolGroupContext::get(const QCString &name) const
{
return p->get(name);
}
@@ -9677,7 +9660,7 @@ class SymbolIndexContext::Private
init=TRUE;
}
}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -9723,7 +9706,7 @@ SymbolIndexContext::~SymbolIndexContext()
delete p;
}
-TemplateVariant SymbolIndexContext::get(const char *name) const
+TemplateVariant SymbolIndexContext::get(const QCString &name) const
{
return p->get(name);
}
@@ -9788,7 +9771,7 @@ class SearchIndexContext::Private
init=TRUE;
}
}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -9832,7 +9815,7 @@ SearchIndexContext::~SearchIndexContext()
delete p;
}
-TemplateVariant SearchIndexContext::get(const char *name) const
+TemplateVariant SearchIndexContext::get(const QCString &name) const
{
return p->get(name);
}
@@ -9900,7 +9883,8 @@ class LatexSpaceless : public TemplateSpacelessIntf
void reset() { }
QCString remove(const QCString &s)
{
- QGString result;
+ if (s.isEmpty()) return s;
+ TextStream result;
const char *p = s.data();
char c;
while ((c=*p++))
@@ -9910,12 +9894,11 @@ class LatexSpaceless : public TemplateSpacelessIntf
case '\t': case ' ': case '\n':
break;
default:
- result+=c;
+ result << c;
break;
}
}
- result+='\0';
- return result.data();
+ return result.str();
}
private:
};
@@ -9934,7 +9917,8 @@ class HtmlSpaceless : public TemplateSpacelessIntf
}
QCString remove(const QCString &s)
{
- QGString result;
+ if (s.isEmpty()) return s;
+ TextStream result;
const char *p = s.data();
char c;
while ((c=*p++))
@@ -9943,15 +9927,15 @@ class HtmlSpaceless : public TemplateSpacelessIntf
{
case '<': // start of a tag
if (!m_insideString) m_insideTag=TRUE,m_removeSpaces=FALSE;
- result+=c;
+ result << c;
break;
case '>': // end of a tag
if (!m_insideString) m_insideTag=FALSE,m_removeSpaces=TRUE;
- result+=c;
+ result << c;
break;
case '\\': // escaped character in a string
- result+=c;
- if (m_insideString && *p) result+=*p++;
+ result << c;
+ if (m_insideString && *p) result << *p++;
break;
case '"': case '\'':
if (m_insideTag)
@@ -9965,7 +9949,7 @@ class HtmlSpaceless : public TemplateSpacelessIntf
m_insideString=c;
}
}
- result+=c;
+ result << c;
break;
case ' ': case '\t': case '\n': // whitespace
if (!m_insideTag) // outside tags strip consecutive whitespace
@@ -9974,20 +9958,19 @@ class HtmlSpaceless : public TemplateSpacelessIntf
}
else
{
- result+=' ';
+ result << ' ';
}
break;
default:
//if (m_removeSpaces) result+=' ';
- result+=c;
+ result << c;
m_removeSpaces=FALSE;
break;
}
}
- result+='\0';
- //printf("HtmlSpaceless::remove({%s})={%s} m_insideTag=%d m_insideString=%c (%d) removeSpaces=%d\n",s.data(),result.data(),
+ //printf("HtmlSpaceless::remove({%s})={%s} m_insideTag=%d m_insideString=%c (%d) removeSpaces=%d\n",qPrint(s),qPrint(result),
// m_insideTag,m_insideString,m_insideString,m_removeSpaces);
- return result.data();
+ return result.str();
}
private:
bool m_insideTag;
@@ -10118,14 +10101,14 @@ void generateOutputViaTemplate()
g_globals.outputFormat = ContextOutputFormat_Html;
g_globals.dynSectionId = 0;
g_globals.outputDir = Config_getString(HTML_OUTPUT);
- QDir dir(g_globals.outputDir);
+ Dir dir(g_globals.outputDir.str());
createSubDirs(dir);
HtmlEscaper htmlEsc;
ctx->setEscapeIntf(Config_getString(HTML_FILE_EXTENSION),&htmlEsc);
HtmlSpaceless spl;
ctx->setSpacelessIntf(&spl);
ctx->setOutputDirectory(g_globals.outputDir);
- FTextStream ts;
+ TextStream ts;
tpl->render(ts,ctx);
e.unload(tpl);
}
@@ -10143,14 +10126,14 @@ void generateOutputViaTemplate()
g_globals.outputFormat = ContextOutputFormat_Latex;
g_globals.dynSectionId = 0;
g_globals.outputDir = Config_getString(LATEX_OUTPUT);
- QDir dir(g_globals.outputDir);
+ Dir dir(g_globals.outputDir.str());
createSubDirs(dir);
LatexEscaper latexEsc;
ctx->setEscapeIntf(".tex",&latexEsc);
LatexSpaceless spl;
ctx->setSpacelessIntf(&spl);
ctx->setOutputDirectory(g_globals.outputDir);
- FTextStream ts;
+ TextStream ts;
tpl->render(ts,ctx);
e.unload(tpl);
}
@@ -10170,20 +10153,20 @@ void generateOutputViaTemplate()
#endif
}
-void generateTemplateFiles(const char *templateDir)
+void generateTemplateFiles(const QCString &templateDir)
{
- if (!templateDir) return;
- QDir thisDir;
- if (!thisDir.exists(templateDir) && !thisDir.mkdir(templateDir))
+ if (templateDir.isEmpty()) return;
+ Dir thisDir;
+ if (!thisDir.exists(templateDir.str()) && !thisDir.mkdir(templateDir.str()))
{
- err("Failed to create output directory '%s'\n",templateDir);
+ err("Failed to create output directory '%s'\n",qPrint(templateDir));
return;
}
- QCString outDir = QCString(templateDir)+"/html";
+ std::string outDir = templateDir.str()+"/html";
if (!thisDir.exists(outDir) && !thisDir.mkdir(outDir))
{
- err("Failed to create output directory '%s'\n",outDir.data());
+ err("Failed to create output directory '%s'\n",outDir.c_str());
return;
}
- ResourceMgr::instance().writeCategory("html",outDir);
+ ResourceMgr::instance().writeCategory("html",outDir.c_str());
}
diff --git a/src/context.h b/src/context.h
index 9573643..1fb934e 100644
--- a/src/context.h
+++ b/src/context.h
@@ -80,13 +80,13 @@ class RefCountedContext
int addRef()
{
++s_totalCount;
- printf("%p:%s::addRef()=%d\n",this,m_className.data(),m_refCount);
+ printf("%p:%s::addRef()=%d\n",this,qPrint(m_className),m_refCount);
return ++m_refCount;
}
int release()
{
--s_totalCount;
- printf("%p:%s::release()=%d\n",this,m_className.data(),m_refCount-1);
+ printf("%p:%s::release()=%d\n",this,qPrint(m_className),m_refCount-1);
int count = --m_refCount;
if (count<=0)
{
@@ -134,7 +134,7 @@ class ConfigContext : public RefCountedContext, public TemplateStructIntf
static ConfigContext *alloc() { return new ConfigContext; }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -153,7 +153,7 @@ class DoxygenContext : public RefCountedContext, public TemplateStructIntf
static DoxygenContext *alloc() { return new DoxygenContext; }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -172,7 +172,7 @@ class TranslateContext : public RefCountedContext, public TemplateStructIntf
static TranslateContext *alloc() { return new TranslateContext; }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -216,7 +216,7 @@ class IncludeInfoContext : public RefCountedContext, public TemplateStructIntf
{ return new IncludeInfoContext(info,lang); }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -258,7 +258,7 @@ class ClassContext : public RefCountedContext, public TemplateStructIntf
static ClassContext *alloc(const ClassDef *cd) { return new ClassContext(cd); }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -277,7 +277,7 @@ class NamespaceContext : public RefCountedContext, public TemplateStructIntf
static NamespaceContext *alloc(const NamespaceDef *nd) { return new NamespaceContext(nd); }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -296,7 +296,7 @@ class FileContext : public RefCountedContext, public TemplateStructIntf
static FileContext *alloc(const FileDef *fd) { return new FileContext(fd); }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -314,7 +314,7 @@ class DirContext : public RefCountedContext, public TemplateStructIntf
static DirContext *alloc(const DirDef *dd) { return new DirContext(dd); }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -334,7 +334,7 @@ class PageContext : public RefCountedContext, public TemplateStructIntf
static PageContext *alloc(const PageDef *pd,bool isMainPage,bool isExample) { return new PageContext(pd,isMainPage,isExample); }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -353,7 +353,7 @@ class MemberContext : public RefCountedContext, public TemplateStructIntf
static MemberContext *alloc(const MemberDef *md) { return new MemberContext(md); }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -373,7 +373,7 @@ class ModuleContext : public RefCountedContext, public TemplateStructIntf
static ModuleContext *alloc(const GroupDef *gd) { return new ModuleContext(gd); }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -413,7 +413,7 @@ class ClassIndexContext : public RefCountedContext, public TemplateStructIntf
static ClassIndexContext *alloc() { return new ClassIndexContext; }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -433,7 +433,7 @@ class InheritanceGraphContext : public RefCountedContext, public TemplateStructI
{ return new InheritanceGraphContext(hierarchy,n,id); }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -453,7 +453,7 @@ class ClassInheritanceNodeContext : public RefCountedContext, public TemplateStr
{ return new ClassInheritanceNodeContext(cd); }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -495,7 +495,7 @@ class ClassHierarchyContext : public RefCountedContext, public TemplateStructInt
static ClassHierarchyContext *alloc() { return new ClassHierarchyContext; }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -519,7 +519,7 @@ class NestingNodeContext : public RefCountedContext, public TemplateStructIntf
QCString id() const;
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -578,7 +578,7 @@ class ClassTreeContext : public RefCountedContext, public TemplateStructIntf
static ClassTreeContext *alloc() { return new ClassTreeContext; }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -618,7 +618,7 @@ class NamespaceTreeContext : public RefCountedContext, public TemplateStructIntf
static NamespaceTreeContext *alloc() { return new NamespaceTreeContext; }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -679,7 +679,7 @@ class FileTreeContext : public RefCountedContext, public TemplateStructIntf
static FileTreeContext *alloc() { return new FileTreeContext; }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -721,7 +721,7 @@ class PageTreeContext : public RefCountedContext, public TemplateStructIntf
static PageTreeContext *alloc(const PageLinkedMap &pages) { return new PageTreeContext(pages); }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -740,7 +740,7 @@ class ModuleNodeContext : public RefCountedContext, public TemplateStructIntf
static ModuleNodeContext *alloc(const GroupDef *gd) { return new ModuleNodeContext(gd); }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -783,7 +783,7 @@ class ModuleTreeContext : public RefCountedContext, public TemplateStructIntf
static ModuleTreeContext *alloc() { return new ModuleTreeContext(); }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -824,7 +824,7 @@ class ExampleTreeContext : public RefCountedContext, public TemplateStructIntf
static ExampleTreeContext *alloc() { return new ExampleTreeContext; }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -843,7 +843,7 @@ class GlobalsIndexContext : public RefCountedContext, public TemplateStructIntf
static GlobalsIndexContext *alloc() { return new GlobalsIndexContext(); }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -862,7 +862,7 @@ class ClassMembersIndexContext : public RefCountedContext, public TemplateStruct
static ClassMembersIndexContext *alloc() { return new ClassMembersIndexContext(); }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -881,7 +881,7 @@ class NamespaceMembersIndexContext : public RefCountedContext, public TemplateSt
static NamespaceMembersIndexContext *alloc() { return new NamespaceMembersIndexContext(); }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -900,7 +900,7 @@ class NavPathElemContext : public RefCountedContext, public TemplateStructIntf
static NavPathElemContext *alloc(const Definition *def) { return new NavPathElemContext(def); }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -921,7 +921,7 @@ class InheritanceNodeContext : public RefCountedContext, public TemplateStructIn
{ return new InheritanceNodeContext(cd,name); }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -991,7 +991,7 @@ class MemberGroupInfoContext : public RefCountedContext, public TemplateStructIn
{ return new MemberGroupInfoContext(def,relPath,mg); }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -1042,7 +1042,7 @@ class MemberListInfoContext : public RefCountedContext, public TemplateStructInt
{ return new MemberListInfoContext(def,relPath,ml,title,subtitle); }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -1063,7 +1063,7 @@ class MemberInfoContext : public RefCountedContext, public TemplateStructIntf
static MemberInfoContext *alloc(const MemberInfo *mi) { return new MemberInfoContext(mi); }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -1083,7 +1083,7 @@ class InheritedMemberInfoContext : public RefCountedContext, public TemplateStru
{ return new InheritedMemberInfoContext(cd,ml,title); }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -1147,7 +1147,7 @@ class ArgumentContext : public RefCountedContext, public TemplateStructIntf
{ return new ArgumentContext(arg,def,relPath); }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -1191,7 +1191,7 @@ class SymbolContext : public RefCountedContext, public TemplateStructIntf
{ return new SymbolContext(def,prev,next); }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -1236,7 +1236,7 @@ class SymbolGroupContext : public RefCountedContext, public TemplateStructIntf
{ return new SymbolGroupContext(start,end); }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -1280,7 +1280,7 @@ class SymbolIndexContext : public RefCountedContext, public TemplateStructIntf
{ return new SymbolIndexContext(letter,sl,name); }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -1322,7 +1322,7 @@ class SearchIndexContext : public RefCountedContext, public TemplateStructIntf
{ return new SearchIndexContext(info); }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -1357,6 +1357,6 @@ class SearchIndicesContext : public RefCountedContext, public TemplateListIntf
//----------------------------------------------------
void generateOutputViaTemplate();
-void generateTemplateFiles(const char *templateDir);
+void generateTemplateFiles(const QCString &templateDir);
#endif
diff --git a/src/cppvalue.cpp b/src/cppvalue.cpp
index 31f0ab5..77677d9 100644
--- a/src/cppvalue.cpp
+++ b/src/cppvalue.cpp
@@ -47,7 +47,7 @@ CPPValue parseHexadecimal(const std::string& token)
else if (*p >= 'a' && *p <= 'f') val = val * 16 + *p - 'a' + 10;
else if (*p >= 'A' && *p <= 'F') val = val * 16 + *p - 'A' + 10;
}
- //printf("parseHexadecimal %s->%x\n",token.data(),val);
+ //printf("parseHexadecimal %s->%x\n",qPrint(token),val);
return CPPValue(val);
}
@@ -79,7 +79,7 @@ CPPValue parseCharacter(const std::string& token) // does not work for '\n' and
return parseOctal(token);
case 'x':
case 'X': return parseHexadecimal(token);
- default: printf("Invalid escape sequence %s found!\n",token.data());
+ default: printf("Invalid escape sequence %s found!\n",token.c_str());
return CPPValue(0L);
}
}
diff --git a/src/debug.cpp b/src/debug.cpp
index bc5abb2..ea6f272 100644
--- a/src/debug.cpp
+++ b/src/debug.cpp
@@ -22,6 +22,7 @@
#include "debug.h"
#include "message.h"
+#include "qcstring.h"
//------------------------------------------------------------------------
@@ -69,22 +70,22 @@ static char asciiToLower(char in) {
return in;
}
-static int labelToEnumValue(const char *l)
+static int labelToEnumValue(const QCString &l)
{
- std::string s = l;
+ std::string s = l.str();
std::transform(s.begin(),s.end(),s.begin(),asciiToLower);
auto it = s_labels.find(s);
return (it!=s_labels.end()) ? it->second : 0;
}
-int Debug::setFlag(const char *lab)
+int Debug::setFlag(const QCString &lab)
{
int retVal = labelToEnumValue(lab);
curMask = (DebugMask)(curMask | retVal);
return retVal;
}
-void Debug::clearFlag(const char *lab)
+void Debug::clearFlag(const QCString &lab)
{
curMask = (DebugMask)(curMask & ~labelToEnumValue(lab));
}
diff --git a/src/debug.h b/src/debug.h
index 5d4717a..bc93011 100644
--- a/src/debug.h
+++ b/src/debug.h
@@ -16,6 +16,8 @@
#ifndef _DEBUG_H
#define _DEBUG_H
+class QCString;
+
/** Class containing a print function for diagnostics. */
class Debug
{
@@ -42,8 +44,8 @@ class Debug
};
static void print(DebugMask mask,int prio,const char *fmt,...);
- static int setFlag(const char *label);
- static void clearFlag(const char *label);
+ static int setFlag(const QCString &label);
+ static void clearFlag(const QCString &label);
static bool isFlagSet(DebugMask mask);
static void printFlags();
static void setPriority(int p);
diff --git a/src/declinfo.h b/src/declinfo.h
index 2039dca..002fe8e 100644
--- a/src/declinfo.h
+++ b/src/declinfo.h
@@ -1,12 +1,12 @@
/******************************************************************************
*
- *
+ *
*
* Copyright (C) 1997-2015 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
- * documentation under the terms of the GNU General Public License is hereby
- * granted. No representations are made about the suitability of this software
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
@@ -19,7 +19,7 @@
#define DECLINFO_H
#include <stdio.h>
-#include <qcstring.h>
+#include "qcstring.h"
#include "types.h"
extern void parseFuncDecl(const QCString &decl,
diff --git a/src/declinfo.l b/src/declinfo.l
index 9ed7738..e340df5 100644
--- a/src/declinfo.l
+++ b/src/declinfo.l
@@ -118,7 +118,7 @@ ID "$"?([a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF]*)|(@[0-9]+)
REJECT;
}
addTypeName(yyscanner);
- yyextra->name += removeRedundantWhiteSpace(yytext);
+ yyextra->name += removeRedundantWhiteSpace(QCString(yytext));
}
<Start>([~!]{B}*)?{ID}/({B}*"["{B}*"]")* { // the []'s are for Java,
// the / was add to deal with multi-
@@ -126,7 +126,7 @@ ID "$"?([a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF]*)|(@[0-9]+)
// the leading ~ is for a destructor
// the leading ! is for a C++/CLI finalizer (see bug 456475 and 635198)
addTypeName(yyscanner);
- yyextra->name += removeRedundantWhiteSpace(yytext);
+ yyextra->name += removeRedundantWhiteSpace(QCString(yytext));
}
<Start>{B}*"::"{B}* { // found a yyextra->scope specifier
if (!yyextra->scope.isEmpty())
@@ -135,7 +135,7 @@ ID "$"?([a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF]*)|(@[0-9]+)
}
else
{
- yyextra->scope = yyextra->name.copy(); // yyextra->scope becomes yyextra->name
+ yyextra->scope = yyextra->name; // yyextra->scope becomes yyextra->name
}
yyextra->name.resize(0);
}
@@ -152,7 +152,7 @@ ID "$"?([a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF]*)|(@[0-9]+)
<Start>{B}*"("({ID}"::")*{B}*[&*]({B}*("const"|"volatile"){B}+)? {
if (yyextra->insidePHP) REJECT;
addType(yyscanner);
- QCString text=yytext;
+ QCString text(yytext);
yyextra->type+=text.stripWhiteSpace();
}
<Start>{B}*")" {
@@ -220,7 +220,7 @@ static void addType(yyscan_t yyscanner)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
//printf("addType() yyextra->type='%s' yyextra->scope='%s' yyextra->name='%s'\n",
- // yyextra->type.data(),yyextra->scope.data(),yyextra->name.data());
+ // qPrint(yyextra->type),qPrint(yyextra->scope),qPrint(yyextra->name));
if (yyextra->name.isEmpty() && yyextra->scope.isEmpty()) return;
if (!yyextra->type.isEmpty()) yyextra->type+=" ";
if (!yyextra->scope.isEmpty()) yyextra->type+=yyextra->scope+"::";
@@ -233,7 +233,7 @@ static void addTypeName(yyscan_t yyscanner)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
//printf("addTypeName() yyextra->type='%s' yyextra->scope='%s' yyextra->name='%s'\n",
- // yyextra->type.data(),yyextra->scope.data(),yyextra->name.data());
+ // qPrint(yyextra->type),qPrint(yyextra->scope),qPrint(yyextra->name));
if (yyextra->name.isEmpty() ||
yyextra->name.at(yyextra->name.length()-1)==':') // end of Objective-C keyword => append to yyextra->name not yyextra->type
{
@@ -276,7 +276,7 @@ void parseFuncDecl(const QCString &decl,const SrcLangExt lang,QCString &cl,QCStr
#endif
printlex(yy_flex_debug, TRUE, __FILE__, NULL);
- yyextra->inputString = decl;
+ yyextra->inputString = decl.data();
//printf("Input='%s'\n",yyextra->inputString);
yyextra->inputPosition = 0;
yyextra->classTempListFound = FALSE;
@@ -297,7 +297,7 @@ void parseFuncDecl(const QCString &decl,const SrcLangExt lang,QCString &cl,QCStr
declinfoYYlex(g_yyscanner);
//printf("yyextra->type='%s' class='%s' yyextra->name='%s' yyextra->args='%s'\n",
- // yyextra->type.data(),yyextra->scope.data(),yyextra->name.data(),yyextra->args.data());
+ // qPrint(yyextra->type),qPrint(yyextra->scope),qPrint(yyextra->name),qPrint(yyextra->args));
int nb = yyextra->name.findRev('[');
if (nb!=-1 && yyextra->args.isEmpty()) // correct for [] in yyextra->name ambiguity (due to Java return yyextra->type allowing [])
@@ -350,7 +350,7 @@ void parseFuncDecl(const QCString &decl,const SrcLangExt lang,QCString &cl,QCStr
t=t.left(t.length()-1);
}
//printf("yyextra->type='%s' class='%s' yyextra->name='%s' yyextra->args='%s'\n",
- // t.data(),cl.data(),n.data(),a.data());
+ // qPrint(t),qPrint(cl),qPrint(n),qPrint(a));
printlex(yy_flex_debug, FALSE, __FILE__, NULL);
declinfoYYlex_destroy(g_yyscanner);
@@ -370,8 +370,8 @@ void dumpDecl(const char *s)
parseFuncDecl(s,yyextra->className,classTNames,yyextra->type,yyextra->name,yyextra->args,funcTNames);
msg("yyextra->type='%s' class='%s' classTempl='%s' yyextra->name='%s' "
"funcTemplateNames='%s' yyextra->args='%s'\n",
- yyextra->type.data(),yyextra->className.data(),classTNames.data(),
- yyextra->name.data(),funcTNames.data(),yyextra->args.data()
+ qPrint(yyextra->type),qPrint(yyextra->className),qPrint(classTNames),
+ qPrint(yyextra->name),qPrint(funcTNames),qPrint(yyextra->args)
);
}
diff --git a/src/defargs.h b/src/defargs.h
index 589eb90..a988b0b 100644
--- a/src/defargs.h
+++ b/src/defargs.h
@@ -25,7 +25,7 @@ class ArgumentList;
class QCString;
std::unique_ptr<ArgumentList> stringToArgumentList(SrcLangExt lang,
- const char *argsString,
+ const QCString &argsString,
QCString *extraTypeChars=0);
#endif
diff --git a/src/defargs.l b/src/defargs.l
index 18e9505..9385cc3 100644
--- a/src/defargs.l
+++ b/src/defargs.l
@@ -56,7 +56,6 @@
//#include <iostream.h>
#include <assert.h>
#include <ctype.h>
-#include <qcstringlist.h>
#include "defargs.h"
#include "entry.h"
@@ -166,7 +165,7 @@ CPPC "/\/"
<ReadFuncArgDef>"'"\\."'" { yyextra->curArgDefValue+=yytext; }
<ReadFuncArgDef>"'"."'" { yyextra->curArgDefValue+=yytext; }
<ReadFuncArgDef>{RAWBEGIN} { yyextra->curArgDefValue+=yytext;
- QCString text=yytext;
+ QCString text(yytext);
int i=text.find('"');
yyextra->delimiter = yytext+i+1;
yyextra->delimiter=yyextra->delimiter.left(yyextra->delimiter.length()-1);
@@ -330,7 +329,7 @@ CPPC "/\/"
}
<CopyRawString>{RAWEND} {
yyextra->curArgDefValue+=yytext;
- QCString delimiter = yytext+1;
+ QCString delimiter(yytext+1);
delimiter=delimiter.left(delimiter.length()-1);
if (delimiter==yyextra->delimiter)
{
@@ -347,7 +346,7 @@ CPPC "/\/"
<ReadFuncArgType,ReadFuncArgDef>[,)>]{B}*({CCS}[*!]|{CPPC}[/!])"<" {
yyextra->lastDocContext=YY_START;
yyextra->lastDocChar=*yytext;
- QCString text=yytext;
+ QCString text(yytext);
if (text.find("//")!=-1)
BEGIN( ReadDocLine );
else
@@ -363,7 +362,7 @@ CPPC "/\/"
{
yyextra->curArgTypeName=removeRedundantWhiteSpace(yyextra->curArgTypeName);
yyextra->curArgDefValue=yyextra->curArgDefValue.stripWhiteSpace();
- //printf("curArgType='%s' curArgDefVal='%s'\n",yyextra->curArgTypeName.data(),yyextra->curArgDefValue.data());
+ //printf("curArgType='%s' curArgDefVal='%s'\n",qPrint(yyextra->curArgTypeName),qPrint(yyextra->curArgDefValue));
int l=yyextra->curArgTypeName.length();
if (l>0)
{
@@ -371,10 +370,10 @@ CPPC "/\/"
while (i>=0 && (isspace((uchar)yyextra->curArgTypeName.at(i)) || yyextra->curArgTypeName.at(i)=='.')) i--;
while (i>=0 && (isId(yyextra->curArgTypeName.at(i)) || yyextra->curArgTypeName.at(i)=='$')) i--;
Argument a;
- a.attrib = yyextra->curArgAttrib.copy();
+ a.attrib = yyextra->curArgAttrib;
a.typeConstraint = yyextra->curTypeConstraint.stripWhiteSpace();
//printf("a->type=%s a->name=%s i=%d l=%d\n",
- // a->type.data(),a->name.data(),i,l);
+ // qPrint(a->type),qPrint(a->name),i,l);
a.array.resize(0);
if (i==l-1 && yyextra->curArgTypeName.at(i)==')') // function argument
{
@@ -415,7 +414,7 @@ CPPC "/\/"
a.type = a.type + " " + a.name;
a.name.resize(0);
}
- //printf(" --> a->type='%s' a->name='%s'\n",a->type.data(),a->name.data());
+ //printf(" --> a->type='%s' a->name='%s'\n",qPrint(a->type),qPrint(a->name));
}
else // assume only the type was specified, try to determine name later
{
@@ -427,7 +426,7 @@ CPPC "/\/"
a.type = "";
}
a.array += removeRedundantWhiteSpace(yyextra->curArgArray);
- //printf("array=%s\n",a->array.data());
+ //printf("array=%s\n",qPrint(a->array));
int alen = a.array.length();
if (alen>2 && a.array.at(0)=='(' &&
a.array.at(alen-1)==')') // fix-up for int *(a[10])
@@ -440,10 +439,10 @@ CPPC "/\/"
a.array = a.array.mid(i);
}
}
- a.defval = yyextra->curArgDefValue.copy();
- //printf("a->type=%s a->name=%s a->defval=\"%s\"\n",a->type.data(),a->name.data(),a->defval.data());
+ a.defval = yyextra->curArgDefValue;
+ //printf("a->type=%s a->name=%s a->defval=\"%s\"\n",qPrint(a->type),qPrint(a->name),qPrint(a->defval));
a.docs = yyextra->curArgDocs.stripWhiteSpace();
- //printf("Argument '%s' '%s' adding docs='%s'\n",a->type.data(),a->name.data(),a->docs.data());
+ //printf("Argument '%s' '%s' adding docs='%s'\n",qPrint(a->type),qPrint(a->name),qPrint(a->docs));
yyextra->argList->push_back(a);
}
yyextra->curArgAttrib.resize(0);
@@ -476,13 +475,13 @@ CPPC "/\/"
}
}
<ReadFuncArgType,ReadFuncArgPtr>"$"?{ID} {
- QCString name=yytext; //resolveDefines(yytext);
+ QCString name(yytext);
if (YY_START==ReadFuncArgType && yyextra->curArgArray=="[]") // Java style array
{
yyextra->curArgTypeName+=" []";
yyextra->curArgArray.resize(0);
}
- //printf("resolveName '%s'->'%s'\n",yytext,name.data());
+ //printf("resolveName '%s'->'%s'\n",yytext,qPrint(name));
yyextra->curArgTypeName+=name;
}
<ReadFuncArgType,ReadFuncArgPtr>. {
@@ -496,8 +495,7 @@ CPPC "/\/"
yyextra->curArgDefValue+=*yytext;
}
<CopyArgRound,CopyArgRound2,CopyArgSharp,CopyArgCurly>{ID} {
- QCString name=yytext; //resolveDefines(yytext);
- *yyextra->copyArgValue+=name;
+ *yyextra->copyArgValue+=yytext;
}
<CopyArgRound,CopyArgRound2,CopyArgSharp,CopyArgCurly>. {
*yyextra->copyArgValue += *yytext;
@@ -531,7 +529,7 @@ CPPC "/\/"
BEGIN(FuncQual);
}
<FuncQual>"->" { // C++11 trailing return type
- yyextra->argList->setTrailingReturnType(" -> ");
+ yyextra->argList->setTrailingReturnType(QCString(" -> "));
BEGIN(TrailingReturn);
}
<TrailingReturn>{B}/("final"|"override"){B}* {
@@ -771,19 +769,19 @@ static bool nameIsActuallyPartOfType(QCString &name)
}
/*! Converts an argument string into an ArgumentList.
- * \param[in] lang langage of the current argument list
+ * \param[in] lang language of the current argument list
* \param[in] argsString the list of Arguments.
* \param[out] extraTypeChars point to string to which trailing characters
* for complex types are written to
*/
-std::unique_ptr<ArgumentList> stringToArgumentList(SrcLangExt lang, const char *argsString,QCString *extraTypeChars)
+std::unique_ptr<ArgumentList> stringToArgumentList(SrcLangExt lang, const QCString &argsString,QCString *extraTypeChars)
{
std::unique_ptr<ArgumentList> al = std::make_unique<ArgumentList>();
- if (argsString==0) return al;
+ if (argsString.isEmpty()) return al;
yyscan_t yyscanner;
- defargsYY_state extra(argsString,al,lang);
+ defargsYY_state extra(argsString.data(),al,lang);
defargsYYlex_init_extra(&extra,&yyscanner);
#ifdef FLEX_DEBUG
defargsYYset_debug(1,yyscanner);
@@ -799,7 +797,7 @@ std::unique_ptr<ArgumentList> stringToArgumentList(SrcLangExt lang, const char *
yyextra->argList->setNoParameters(TRUE);
}
if (extraTypeChars) *extraTypeChars=yyextra->extraTypeChars;
- //printf("stringToArgumentList(%s) result=%s\n",argsString,argListToString(*al).data());
+ //printf("stringToArgumentList(%s) result=%s\n",argsString,qPrint(argListToString(*al)));
printlex(yy_flex_debug, FALSE, __FILE__, NULL);
defargsYYlex_destroy(yyscanner);
return al;
diff --git a/src/defgen.cpp b/src/defgen.cpp
index 1cb09f5..c99d59b 100644
--- a/src/defgen.cpp
+++ b/src/defgen.cpp
@@ -18,6 +18,8 @@
#include <stdlib.h>
+#include <fstream>
+
#include "defgen.h"
#include "doxygen.h"
#include "message.h"
@@ -33,31 +35,32 @@
#include "namespacedef.h"
#include "filedef.h"
#include "filename.h"
-
-#include <qdir.h>
-#include <qfile.h>
+#include "dir.h"
+#include "textstream.h"
#define DEF_DB(x)
-static inline void writeDEFString(FTextStream &t,const char *s)
+static inline void writeDEFString(TextStream &t,const QCString &s)
{
- const char* p=s;
- char c;
-
t << '\'';
- while ((c = *(p++)))
+ if (!s.isEmpty())
{
- if (c == '\'')
- t << '\\';
- t << c;
+ const char* p=s.data();
+ char c;
+
+ while ((c = *(p++)))
+ {
+ if (c == '\'') t << '\\';
+ t << c;
+ }
}
t << '\'';
}
static void generateDEFForMember(const MemberDef *md,
- FTextStream &t,
+ TextStream &t,
const Definition *def,
- const char* Prefix)
+ const QCString &prefix)
{
QCString memPrefix;
@@ -80,9 +83,9 @@ static void generateDEFForMember(const MemberDef *md,
else if (md->getNamespaceDef())
scopeName=md->getNamespaceDef()->name();
- t << " " << Prefix << "-member = {" << endl;
+ t << " " << prefix << "-member = {\n";
memPrefix = " ";
- memPrefix.append( Prefix );
+ memPrefix.append( prefix );
memPrefix.append( "-mem-" );
QCString memType;
@@ -107,27 +110,27 @@ static void generateDEFForMember(const MemberDef *md,
case MemberType_Slot: memType="slot"; isFunc=TRUE; break;
}
- t << memPrefix << "kind = '" << memType << "';" << endl;
+ t << memPrefix << "kind = '" << memType << "';\n";
t << memPrefix << "id = '"
<< md->getOutputFileBase() << "_1" << md->anchor()
- << "';" << endl;
+ << "';\n";
t << memPrefix << "virt = ";
switch (md->virtualness())
{
- case Normal: t << "normal;" << endl; break;
- case Virtual: t << "virtual;" << endl; break;
- case Pure: t << "pure-virtual;" << endl; break;
+ case Normal: t << "normal;\n"; break;
+ case Virtual: t << "virtual;\n"; break;
+ case Pure: t << "pure-virtual;\n"; break;
default: ASSERT(0);
}
t << memPrefix << "prot = ";
switch(md->protection())
{
- case Public: t << "public;" << endl; break;
- case Protected: t << "protected;" << endl; break;
- case Private: t << "private;" << endl; break;
- case Package: t << "package;" << endl; break;
+ case Public: t << "public;\n"; break;
+ case Protected: t << "protected;\n"; break;
+ case Private: t << "private;\n"; break;
+ case Package: t << "package;\n"; break;
}
if (md->memberType()!=MemberType_Define &&
@@ -135,11 +138,11 @@ static void generateDEFForMember(const MemberDef *md,
)
{
QCString typeStr = replaceAnonymousScopes(md->typeString());
- t << memPrefix << "type = <<_EnD_oF_dEf_TeXt_" << endl << typeStr << endl
- << "_EnD_oF_dEf_TeXt_;" << endl;
+ t << memPrefix << "type = <<_EnD_oF_dEf_TeXt_\n" << typeStr << "\n"
+ << "_EnD_oF_dEf_TeXt_;\n";
}
- t << memPrefix << "name = '" << md->name() << "';" << endl;
+ t << memPrefix << "name = '" << md->name() << "';\n";
if (isFunc) //function
{
@@ -156,42 +159,42 @@ static void generateDEFForMember(const MemberDef *md,
defArg = &(*defIt);
++defIt;
}
- t << memPrefix << "param = {" << endl;
+ t << memPrefix << "param = {\n";
if (!a.attrib.isEmpty())
{
t << fcnPrefix << "attributes = ";
writeDEFString(t,a.attrib);
- t << ';' << endl;
+ t << ";\n";
}
if (!a.type.isEmpty())
{
- t << fcnPrefix << "type = <<_EnD_oF_dEf_TeXt_" << endl
- << a.type << endl << "_EnD_oF_dEf_TeXt_;" << endl;
+ t << fcnPrefix << "type = <<_EnD_oF_dEf_TeXt_\n"
+ << a.type << "\n_EnD_oF_dEf_TeXt_;\n";
}
if (!a.name.isEmpty())
{
t << fcnPrefix << "declname = ";
writeDEFString(t,a.name);
- t << ';' << endl;
+ t << ";\n";
}
if (defArg && !defArg->name.isEmpty() && defArg->name!=a.name)
{
t << fcnPrefix << "defname = ";
writeDEFString(t,defArg->name);
- t << ';' << endl;
+ t << ";\n";
}
if (!a.array.isEmpty())
{
t << fcnPrefix << "array = ";
writeDEFString(t,a.array);
- t << ';' << endl;
+ t << ";\n";
}
if (!a.defval.isEmpty())
{
- t << fcnPrefix << "defval = <<_EnD_oF_dEf_TeXt_" << endl
- << a.defval << endl << "_EnD_oF_dEf_TeXt_;" << endl;
+ t << fcnPrefix << "defval = <<_EnD_oF_dEf_TeXt_\n"
+ << a.defval << "\n_EnD_oF_dEf_TeXt_;\n";
}
- t << " }; /*" << fcnPrefix << "-param */" << endl;
+ t << " }; /*" << fcnPrefix << "-param */\n";
}
}
else if ( md->memberType()==MemberType_Define
@@ -200,16 +203,16 @@ static void generateDEFForMember(const MemberDef *md,
QCString defPrefix = " " + memPrefix + "def-";
for (const Argument &a : md->argumentList())
{
- t << memPrefix << "param = {" << endl;
- t << defPrefix << "name = '" << a.type << "';" << endl;
- t << " }; /*" << defPrefix << "-param */" << endl;
+ t << memPrefix << "param = {\n";
+ t << defPrefix << "name = '" << a.type << "';\n";
+ t << " }; /*" << defPrefix << "-param */\n";
}
}
if (!md->initializer().isEmpty())
{
- t << memPrefix << "initializer = <<_EnD_oF_dEf_TeXt_" << endl
- << md->initializer() << endl << "_EnD_oF_dEf_TeXt_;" << endl;
+ t << memPrefix << "initializer = <<_EnD_oF_dEf_TeXt_\n"
+ << md->initializer() << "\n_EnD_oF_dEf_TeXt_;\n";
}
// TODO: exceptions, const volatile
if (md->memberType()==MemberType_Enumeration) // enum
@@ -223,16 +226,16 @@ static void generateDEFForMember(const MemberDef *md,
writeDEFString(t,emd->initializer());
t << ';';
}
- t << " };" << endl;
+ t << " };\n";
}
}
- t << memPrefix << "desc-file = '" << md->getDefFileName() << "';" << endl;
- t << memPrefix << "desc-line = '" << md->getDefLine() << "';" << endl;
- t << memPrefix << "briefdesc = <<_EnD_oF_dEf_TeXt_" << endl
- << md->briefDescription() << endl << "_EnD_oF_dEf_TeXt_;" << endl;
- t << memPrefix << "documentation = <<_EnD_oF_dEf_TeXt_" << endl
- << md->documentation() << endl << "_EnD_oF_dEf_TeXt_;" << endl;
+ t << memPrefix << "desc-file = '" << md->getDefFileName() << "';\n";
+ t << memPrefix << "desc-line = '" << md->getDefLine() << "';\n";
+ t << memPrefix << "briefdesc = <<_EnD_oF_dEf_TeXt_\n"
+ << md->briefDescription() << "\n_EnD_oF_dEf_TeXt_;\n";
+ t << memPrefix << "documentation = <<_EnD_oF_dEf_TeXt_\n"
+ << md->documentation() << "\n_EnD_oF_dEf_TeXt_;\n";
//printf("md->getReferencesMembers()=%p\n",md->getReferencesMembers());
@@ -242,14 +245,14 @@ static void generateDEFForMember(const MemberDef *md,
{
if (rmd->getStartBodyLine()!=-1 && rmd->getBodyDef())
{
- t << memPrefix << "referenceto = {" << endl;
+ t << memPrefix << "referenceto = {\n";
t << refPrefix << "id = '"
<< rmd->getBodyDef()->getOutputFileBase()
<< "_1" // encoded ':' character (see util.cpp:convertNameToFile)
- << rmd->anchor() << "';" << endl;
+ << rmd->anchor() << "';\n";
t << refPrefix << "line = '"
- << rmd->getStartBodyLine() << "';" << endl;
+ << rmd->getStartBodyLine() << "';\n";
QCString scope = rmd->getScopeString();
QCString name = rmd->name();
@@ -260,7 +263,7 @@ static void generateDEFForMember(const MemberDef *md,
t << refPrefix << "name = ";
writeDEFString(t,name);
- t << ';' << endl << " };" << endl;
+ t << ';' << "\n };\n";
}
}
auto refByList = md->getReferencedByMembers();
@@ -268,14 +271,14 @@ static void generateDEFForMember(const MemberDef *md,
{
if (rmd->getStartBodyLine()!=-1 && rmd->getBodyDef())
{
- t << memPrefix << "referencedby = {" << endl;
+ t << memPrefix << "referencedby = {\n";
t << refPrefix << "id = '"
<< rmd->getBodyDef()->getOutputFileBase()
<< "_1" // encoded ':' character (see util.cpp:convertNameToFile)
- << rmd->anchor() << "';" << endl;
+ << rmd->anchor() << "';\n";
t << refPrefix << "line = '"
- << rmd->getStartBodyLine() << "';" << endl;
+ << rmd->getStartBodyLine() << "';\n";
QCString scope = rmd->getScopeString();
QCString name = rmd->name();
@@ -286,33 +289,33 @@ static void generateDEFForMember(const MemberDef *md,
t << refPrefix << "name = ";
writeDEFString(t,name);
- t << ';' << endl << " };" << endl;
+ t << ';' << "\n };\n";
}
}
- t << " }; /* " << Prefix << "-member */" << endl;
+ t << " }; /* " << prefix << "-member */\n";
}
static void generateDEFClassSection(const ClassDef *cd,
- FTextStream &t,
+ TextStream &t,
const MemberList *ml,
- const char *kind)
+ const QCString &kind)
{
if (cd && ml && !ml->empty())
{
- t << " cp-section = {" << endl;
- t << " sec-kind = '" << kind << "';" << endl;
+ t << " cp-section = {\n";
+ t << " sec-kind = '" << kind << "';\n";
for (const auto &md : *ml)
{
generateDEFForMember(md,t,cd,"sec");
}
- t << " }; /* cp-section */" << endl;
+ t << " }; /* cp-section */\n";
}
}
-static void generateDEFForClass(const ClassDef *cd,FTextStream &t)
+static void generateDEFForClass(const ClassDef *cd,TextStream &t)
{
// + brief description
// + detailed description
@@ -332,22 +335,22 @@ static void generateDEFForClass(const ClassDef *cd,FTextStream &t)
if (cd->name().find('@')!=-1) return; // skip anonymous compounds.
if (cd->templateMaster()!=0) return; // skip generated template instances.
- t << cd->compoundTypeString() << " = {" << endl;
- t << " cp-id = '" << cd->getOutputFileBase() << "';" << endl;
- t << " cp-name = '" << cd->name() << "';" << endl;
+ t << cd->compoundTypeString() << " = {\n";
+ t << " cp-id = '" << cd->getOutputFileBase() << "';\n";
+ t << " cp-name = '" << cd->name() << "';\n";
for (const auto &bcd : cd->baseClasses())
{
- t << " cp-ref = {" << endl << " ref-type = base;" << endl;
+ t << " cp-ref = {\n" << " ref-type = base;\n";
t << " ref-id = '"
- << bcd.classDef->getOutputFileBase() << "';" << endl;
+ << bcd.classDef->getOutputFileBase() << "';\n";
t << " ref-prot = ";
switch (bcd.prot)
{
- case Public: t << "public;" << endl; break;
+ case Public: t << "public;\n"; break;
case Package: // package scope is not possible
- case Protected: t << "protected;" << endl; break;
- case Private: t << "private;" << endl; break;
+ case Protected: t << "protected;\n"; break;
+ case Private: t << "private;\n"; break;
}
t << " ref-virt = ";
switch(bcd.virt)
@@ -356,21 +359,21 @@ static void generateDEFForClass(const ClassDef *cd,FTextStream &t)
case Virtual: t << "virtual;"; break;
case Pure: t << "pure-virtual;"; break;
}
- t << endl << " };" << endl;
+ t << "\n };\n";
}
for (const auto &bcd : cd->subClasses())
{
- t << " cp-ref = {" << endl << " ref-type = derived;" << endl;
+ t << " cp-ref = {\n" << " ref-type = derived;\n";
t << " ref-id = '"
- << bcd.classDef->getOutputFileBase() << "';" << endl;
+ << bcd.classDef->getOutputFileBase() << "';\n";
t << " ref-prot = ";
switch (bcd.prot)
{
- case Public: t << "public;" << endl; break;
+ case Public: t << "public;\n"; break;
case Package: // packet scope is not possible!
- case Protected: t << "protected;" << endl; break;
- case Private: t << "private;" << endl; break;
+ case Protected: t << "protected;\n"; break;
+ case Private: t << "private;\n"; break;
}
t << " ref-virt = ";
switch (bcd.virt)
@@ -379,7 +382,7 @@ static void generateDEFForClass(const ClassDef *cd,FTextStream &t)
case Virtual: t << "virtual;"; break;
case Pure: t << "pure-virtual;"; break;
}
- t << endl << " };" << endl;
+ t << "\n };\n";
}
size_t numMembers = 0;
@@ -419,55 +422,55 @@ static void generateDEFForClass(const ClassDef *cd,FTextStream &t)
generateDEFClassSection(cd,t,cd->getMemberList(MemberListType_related),"related");
}
- t << " cp-filename = '" << cd->getDefFileName() << "';" << endl;
- t << " cp-fileline = '" << cd->getDefLine() << "';" << endl;
- t << " cp-briefdesc = <<_EnD_oF_dEf_TeXt_" << endl
- << cd->briefDescription() << endl << "_EnD_oF_dEf_TeXt_;" << endl;
+ t << " cp-filename = '" << cd->getDefFileName() << "';\n";
+ t << " cp-fileline = '" << cd->getDefLine() << "';\n";
+ t << " cp-briefdesc = <<_EnD_oF_dEf_TeXt_\n"
+ << cd->briefDescription() << "\n_EnD_oF_dEf_TeXt_;\n";
- t << " cp-documentation = <<_EnD_oF_dEf_TeXt_" << endl
- << cd->documentation() << endl << "_EnD_oF_dEf_TeXt_;" << endl;
+ t << " cp-documentation = <<_EnD_oF_dEf_TeXt_\n"
+ << cd->documentation() << "\n_EnD_oF_dEf_TeXt_;\n";
DotClassGraph inheritanceGraph(cd,Inheritance);
if (!inheritanceGraph.isTrivial())
{
- t << " cp-inheritancegraph = <<_EnD_oF_dEf_TeXt_" << endl;
+ t << " cp-inheritancegraph = <<_EnD_oF_dEf_TeXt_\n";
inheritanceGraph.writeDEF(t);
- t << endl << "_EnD_oF_dEf_TeXt_;" << endl;
+ t << "\n_EnD_oF_dEf_TeXt_;\n";
}
DotClassGraph collaborationGraph(cd,Collaboration);
if (!collaborationGraph.isTrivial())
{
- t << " cp-collaborationgraph = <<_EnD_oF_dEf_TeXt_" << endl;
+ t << " cp-collaborationgraph = <<_EnD_oF_dEf_TeXt_\n";
collaborationGraph.writeDEF(t);
- t << endl << "_EnD_oF_dEf_TeXt_;" << endl;
+ t << "\n_EnD_oF_dEf_TeXt_;\n";
}
- t << "}; /* " << cd->compoundTypeString() << " */" << endl;
+ t << "}; /* " << cd->compoundTypeString() << " */\n";
}
static void generateDEFSection(const Definition *d,
- FTextStream &t,
+ TextStream &t,
const MemberList *ml,
- const char *kind)
+ const QCString &kind)
{
if (ml && !ml->empty())
{
- t << " " << kind << " = {" << endl;
+ t << " " << kind << " = {\n";
for (const auto &md : *ml)
{
generateDEFForMember(md,t,d,kind);
}
- t << " };" << endl;
+ t << " };\n";
}
}
-static void generateDEFForNamespace(const NamespaceDef *nd,FTextStream &t)
+static void generateDEFForNamespace(const NamespaceDef *nd,TextStream &t)
{
if (nd->isReference()) return; // skip external references
- t << " namespace = {" << endl;
- t << " ns-id = '" << nd->getOutputFileBase() << "';" << endl;
+ t << " namespace = {\n";
+ t << " ns-id = '" << nd->getOutputFileBase() << "';\n";
t << " ns-name = ";
writeDEFString(t,nd->name());
- t << ';' << endl;
+ t << ";\n";
generateDEFSection(nd,t,nd->getMemberList(MemberListType_decDefineMembers),"define");
generateDEFSection(nd,t,nd->getMemberList(MemberListType_decProtoMembers),"prototype");
@@ -478,25 +481,25 @@ static void generateDEFForNamespace(const NamespaceDef *nd,FTextStream &t)
generateDEFSection(nd,t,nd->getMemberList(MemberListType_decFuncMembers),"func");
generateDEFSection(nd,t,nd->getMemberList(MemberListType_decVarMembers),"var");
- t << " ns-filename = '" << nd->getDefFileName() << "';" << endl;
- t << " ns-fileline = '" << nd->getDefLine() << "';" << endl;
- t << " ns-briefdesc = <<_EnD_oF_dEf_TeXt_" << endl
- << nd->briefDescription() << endl << "_EnD_oF_dEf_TeXt_;" << endl;
+ t << " ns-filename = '" << nd->getDefFileName() << "';\n";
+ t << " ns-fileline = '" << nd->getDefLine() << "';\n";
+ t << " ns-briefdesc = <<_EnD_oF_dEf_TeXt_\n"
+ << nd->briefDescription() << "\n_EnD_oF_dEf_TeXt_;\n";
- t << " ns-documentation = <<_EnD_oF_dEf_TeXt_" << endl
- << nd->documentation() << endl << "_EnD_oF_dEf_TeXt_;" << endl;
- t << " };" << endl;
+ t << " ns-documentation = <<_EnD_oF_dEf_TeXt_\n"
+ << nd->documentation() << "\n_EnD_oF_dEf_TeXt_;\n";
+ t << " };\n";
}
-static void generateDEFForFile(const FileDef *fd,FTextStream &t)
+static void generateDEFForFile(const FileDef *fd,TextStream &t)
{
if (fd->isReference()) return; // skip external references
- t << "file = {" << endl;
- t << " file-id = '" << fd->getOutputFileBase() << "';" << endl;
+ t << "file = {\n";
+ t << " file-id = '" << fd->getOutputFileBase() << "';\n";
t << " file-name = ";
writeDEFString(t,fd->name());
- t << ';' << endl;
+ t << ";\n";
generateDEFSection(fd,t,fd->getMemberList(MemberListType_decDefineMembers),"define");
generateDEFSection(fd,t,fd->getMemberList(MemberListType_decProtoMembers),"prototype");
@@ -507,73 +510,38 @@ static void generateDEFForFile(const FileDef *fd,FTextStream &t)
generateDEFSection(fd,t,fd->getMemberList(MemberListType_decFuncMembers),"func");
generateDEFSection(fd,t,fd->getMemberList(MemberListType_decVarMembers),"var");
- t << " file-full-name = '" << fd->getDefFileName() << "';" << endl;
- t << " file-first-line = '" << fd->getDefLine() << "';" << endl;
+ t << " file-full-name = '" << fd->getDefFileName() << "';\n";
+ t << " file-first-line = '" << fd->getDefLine() << "';\n";
- t << " file-briefdesc = <<_EnD_oF_dEf_TeXt_" << endl
- << fd->briefDescription() << endl << "_EnD_oF_dEf_TeXt_;" << endl;
+ t << " file-briefdesc = <<_EnD_oF_dEf_TeXt_\n"
+ << fd->briefDescription() << "\n_EnD_oF_dEf_TeXt_;\n";
- t << " file-documentation = <<_EnD_oF_dEf_TeXt_" << endl
- << fd->documentation() << endl << "_EnD_oF_dEf_TeXt_;" << endl;
+ t << " file-documentation = <<_EnD_oF_dEf_TeXt_\n"
+ << fd->documentation() << "\n_EnD_oF_dEf_TeXt_;\n";
- t << "}; /* file */" << endl;
+ t << "}; /* file */\n";
}
void generateDEF()
{
- QCString outputDirectory = Config_getString(OUTPUT_DIRECTORY);
- if (outputDirectory.isEmpty())
- {
- outputDirectory=QDir::currentDirPath().utf8();
- }
- else
- {
- QDir dir(outputDirectory);
- if (!dir.exists())
- {
- dir.setPath(QDir::currentDirPath());
- if (!dir.mkdir(outputDirectory))
- {
- term("tag OUTPUT_DIRECTORY: Output directory '%s' does not "
- "exist and cannot be created\n",outputDirectory.data());
- }
- else
- {
- msg("Notice: Output directory '%s' does not exist. "
- "I have created it for you.\n", outputDirectory.data());
- }
- dir.cd(outputDirectory);
- }
- outputDirectory=dir.absPath().utf8();
- }
-
- QDir dir(outputDirectory);
- if (!dir.exists())
- {
- dir.setPath(QDir::currentDirPath());
- if (!dir.mkdir(outputDirectory))
- {
- err("Cannot create directory %s\n",outputDirectory.data());
- return;
- }
- }
- QDir defDir(outputDirectory+"/def");
- if (!defDir.exists() && !defDir.mkdir(outputDirectory+"/def"))
+ QCString outputDirectory = Config_getString(OUTPUT_DIRECTORY)+"/def";
+ Dir defDir(outputDirectory.str());
+ if (!defDir.exists() && !defDir.mkdir(outputDirectory.str()))
{
- err("Could not create def directory in %s\n",outputDirectory.data());
+ err("Could not create def directory in %s\n",qPrint(outputDirectory));
return;
}
- QCString fileName=outputDirectory+"/def/doxygen.def";
- QFile f(fileName);
- if (!f.open(IO_WriteOnly))
+ QCString fileName=outputDirectory+"/doxygen.def";
+ std::ofstream f(fileName.str(),std::ostream::out | std::ostream::binary);
+ if (!f.is_open())
{
- err("Cannot open file %s for writing!\n",fileName.data());
+ err("Cannot open file %s for writing!\n",qPrint(fileName));
return;
}
- FTextStream t(&f);
- t << "AutoGen Definitions dummy;" << endl;
+ TextStream t(&f);
+ t << "AutoGen Definitions dummy;\n";
if (Doxygen::classLinkedMap->size()+
Doxygen::inputNameLinkedMap->size()+
@@ -597,6 +565,6 @@ void generateDEF()
}
else
{
- t << "dummy_value = true;" << endl;
+ t << "dummy_value = true;\n";
}
}
diff --git a/src/define.h b/src/define.h
index 23da59d..6cbb636 100644
--- a/src/define.h
+++ b/src/define.h
@@ -21,7 +21,7 @@
#include <string>
#include <unordered_map>
-#include <qcstring.h>
+#include "qcstring.h"
#include "containers.h"
class FileDef;
diff --git a/src/definition.cpp b/src/definition.cpp
index 70c1839..a03a676 100644
--- a/src/definition.cpp
+++ b/src/definition.cpp
@@ -1,8 +1,6 @@
/******************************************************************************
*
- *
- *
- * Copyright (C) 1997-2015 by Dimitri van Heesch.
+ * Copyright (C) 1997-2021 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
@@ -49,7 +47,7 @@
#include "pagedef.h"
#include "bufstr.h"
#include "reflist.h"
-
+#include "utf8.h"
//-----------------------------------------------------------------------------------------
@@ -58,7 +56,7 @@ class DefinitionImpl::IMPL
{
public:
~IMPL();
- void init(const char *df, const char *n);
+ void init(const QCString &df, const QCString &n);
void setDefFileName(const QCString &df);
Definition *def = 0;
@@ -123,7 +121,7 @@ void DefinitionImpl::IMPL::setDefFileName(const QCString &df)
}
}
-void DefinitionImpl::IMPL::init(const char *df, const char *n)
+void DefinitionImpl::IMPL::init(const QCString &df, const QCString &n)
{
setDefFileName(df);
QCString lname = n;
@@ -136,7 +134,7 @@ void DefinitionImpl::IMPL::init(const char *df, const char *n)
{
localName=n;
}
- //printf("m_localName=%s\n",m_localName.data());
+ //printf("m_localName=%s\n",qPrint(m_localName));
brief = 0;
details = 0;
@@ -160,11 +158,11 @@ void DefinitionImpl::setDefFile(const QCString &df,int defLine,int defCol)
//-----------------------------------------------------------------------------------------
-static bool matchExcludedSymbols(const char *name)
+static bool matchExcludedSymbols(const QCString &name)
{
const StringVector &exclSyms = Config_getList(EXCLUDE_SYMBOLS);
if (exclSyms.empty()) return FALSE; // nothing specified
- std::string symName = name;
+ std::string symName = name.str();
for (const auto &pat : exclSyms)
{
QCString pattern = pat.c_str();
@@ -187,14 +185,14 @@ static bool matchExcludedSymbols(const char *name)
(ui+pl==sl || pattern.at(pattern.length()-1)=='*' || (!isId(symName.at(ui+pl)) && !forceEnd))
)
{
- //printf("--> name=%s pattern=%s match at %d\n",symName.data(),pattern.data(),i);
+ //printf("--> name=%s pattern=%s match at %d\n",qPrint(symName),qPrint(pattern),i);
return TRUE;
}
}
}
else if (!pattern.isEmpty()) // match words
{
- size_t i = symName.find(pattern);
+ size_t i = symName.find(pattern.str());
if (i!=std::string::npos) // we have a match!
{
size_t ui=i;
@@ -205,7 +203,7 @@ static bool matchExcludedSymbols(const char *name)
(ui+pl==sl || (!isId(symName.at(ui+pl)) && !forceEnd))
)
{
- //printf("--> name=%s pattern=%s match at %d\n",symName.data(),pattern.data(),i);
+ //printf("--> name=%s pattern=%s match at %d\n",qPrint(symName),qPrint(pattern),i);
return TRUE;
}
}
@@ -215,7 +213,7 @@ static bool matchExcludedSymbols(const char *name)
return FALSE;
}
-static void addToMap(const char *name,Definition *d)
+static void addToMap(const QCString &name,Definition *d)
{
bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
QCString symbolName = name;
@@ -229,14 +227,14 @@ static void addToMap(const char *name,Definition *d)
}
}
-static void removeFromMap(const char *name,Definition *d)
+static void removeFromMap(const QCString &name,Definition *d)
{
Doxygen::symbolMap.remove(name,d);
}
DefinitionImpl::DefinitionImpl(Definition *def,
- const char *df,int dl,int dc,
- const char *name,const char *b,
+ const QCString &df,int dl,int dc,
+ const QCString &name,const char *b,
const char *d,bool isSymbol)
{
m_impl = new DefinitionImpl::IMPL;
@@ -293,23 +291,23 @@ DefinitionImpl::~DefinitionImpl()
m_impl=0;
}
-void DefinitionImpl::setName(const char *name)
+void DefinitionImpl::setName(const QCString &name)
{
- if (name==0) return;
+ if (name.isEmpty()) return;
m_impl->name = name;
m_impl->isAnonymous = m_impl->name.isEmpty() ||
m_impl->name.at(0)=='@' ||
m_impl->name.find("::@")!=-1;
}
-void DefinitionImpl::setId(const char *id)
+void DefinitionImpl::setId(const QCString &id)
{
- if (id==0) return;
+ if (id.isEmpty()) return;
m_impl->id = id;
if (Doxygen::clangUsrMap)
{
- //printf("DefinitionImpl::setId '%s'->'%s'\n",id,m_impl->name.data());
- Doxygen::clangUsrMap->insert(std::make_pair(id,m_impl->def));
+ //printf("DefinitionImpl::setId '%s'->'%s'\n",id,qPrint(m_impl->name));
+ Doxygen::clangUsrMap->insert(std::make_pair(id.str(),m_impl->def));
}
}
@@ -320,14 +318,14 @@ QCString DefinitionImpl::id() const
void DefinitionImpl::addSectionsToDefinition(const std::vector<const SectionInfo*> &anchorList)
{
- //printf("%s: addSectionsToDefinition(%d)\n",name().data(),anchorList->count());
+ //printf("%s: addSectionsToDefinition(%d)\n",qPrint(name()),anchorList->count());
for (const SectionInfo *si : anchorList)
{
//printf("Add section '%s' to definition '%s'\n",
- // si->label().data(),name().data());
+ // qPrint(si->label()),qPrint(name()));
SectionManager &sm = SectionManager::instance();
SectionInfo *gsi=sm.find(si->label());
- //printf("===== label=%s gsi=%p\n",si->label.data(),gsi);
+ //printf("===== label=%s gsi=%p\n",qPrint(si->label),gsi);
if (gsi==0)
{
gsi = sm.add(*si);
@@ -342,7 +340,7 @@ void DefinitionImpl::addSectionsToDefinition(const std::vector<const SectionInfo
bool DefinitionImpl::hasSections() const
{
- //printf("DefinitionImpl::hasSections(%s) #sections=%d\n",name().data(),
+ //printf("DefinitionImpl::hasSections(%s) #sections=%d\n",qPrint(name()),
// m_impl->sectionRefs.size());
if (m_impl->sectionRefs.empty()) return FALSE;
for (const SectionInfo *si : m_impl->sectionRefs)
@@ -366,7 +364,7 @@ void DefinitionImpl::addSectionsToIndex()
SectionType type = si->type();
if (isSection(type))
{
- //printf(" level=%d title=%s\n",level,si->title.data());
+ //printf(" level=%d title=%s\n",level,qPrint(si->title));
int nextLevel = (int)type;
int i;
if (nextLevel>level)
@@ -405,11 +403,11 @@ void DefinitionImpl::addSectionsToIndex()
}
}
-void DefinitionImpl::writeDocAnchorsToTagFile(FTextStream &tagFile) const
+void DefinitionImpl::writeDocAnchorsToTagFile(TextStream &tagFile) const
{
if (!m_impl->sectionRefs.empty())
{
- //printf("%s: writeDocAnchorsToTagFile(%d)\n",name().data(),m_impl->sectionRef.size());
+ //printf("%s: writeDocAnchorsToTagFile(%d)\n",qPrint(name()),m_impl->sectionRef.size());
for (const SectionInfo *si : m_impl->sectionRefs)
{
if (!si->generated() && si->ref().isEmpty() && !si->label().startsWith("autotoc_md"))
@@ -421,7 +419,7 @@ void DefinitionImpl::writeDocAnchorsToTagFile(FTextStream &tagFile) const
{
tagFile << " title=\"" << convertToXML(si->title()) << "\"";
}
- tagFile << ">" << si->label() << "</docanchor>" << endl;
+ tagFile << ">" << si->label() << "</docanchor>\n";
}
}
}
@@ -430,17 +428,17 @@ void DefinitionImpl::writeDocAnchorsToTagFile(FTextStream &tagFile) const
bool DefinitionImpl::_docsAlreadyAdded(const QCString &doc,QCString &sigList)
{
uchar md5_sig[16];
- QCString sigStr(33);
+ char sigStr[33];
// to avoid mismatches due to differences in indenting, we first remove
// double whitespaces...
QCString docStr = doc.simplifyWhiteSpace();
MD5Buffer((const unsigned char *)docStr.data(),docStr.length(),md5_sig);
- MD5SigToString(md5_sig,sigStr.rawData(),33);
+ MD5SigToString(md5_sig,sigStr);
//printf("%s:_docsAlreadyAdded doc='%s' sig='%s' docSigs='%s'\n",
- // name().data(),doc.data(),sigStr.data(),sigList.data());
+ // qPrint(name()),qPrint(doc),qPrint(sigStr),qPrint(sigList));
if (sigList.find(sigStr)==-1) // new docs, add signature to prevent re-adding it
{
- sigList+=":"+sigStr;
+ sigList+=QCString(":")+sigStr;
return FALSE;
}
else
@@ -449,11 +447,11 @@ bool DefinitionImpl::_docsAlreadyAdded(const QCString &doc,QCString &sigList)
}
}
-void DefinitionImpl::_setDocumentation(const char *d,const char *docFile,int docLine,
+void DefinitionImpl::_setDocumentation(const QCString &d,const QCString &docFile,int docLine,
bool stripWhiteSpace,bool atTop)
{
- //printf("%s::setDocumentation(%s,%s,%d,%d)\n",name().data(),d,docFile,docLine,stripWhiteSpace);
- if (d==0) return;
+ //printf("%s::setDocumentation(%s,%s,%d,%d)\n",qPrint(name()),d,docFile,docLine,stripWhiteSpace);
+ if (d.isEmpty()) return;
QCString doc = d;
if (stripWhiteSpace)
{
@@ -465,7 +463,7 @@ void DefinitionImpl::_setDocumentation(const char *d,const char *docFile,int doc
}
if (!_docsAlreadyAdded(doc,m_impl->docSignatures))
{
- //printf("setting docs for %s: '%s'\n",name().data(),m_doc.data());
+ //printf("setting docs for %s: '%s'\n",qPrint(name()),qPrint(m_doc));
if (m_impl->details==0)
{
m_impl->details = new DocInfo;
@@ -495,27 +493,13 @@ void DefinitionImpl::_setDocumentation(const char *d,const char *docFile,int doc
}
}
-void DefinitionImpl::setDocumentation(const char *d,const char *docFile,int docLine,bool stripWhiteSpace)
+void DefinitionImpl::setDocumentation(const QCString &d,const QCString &docFile,int docLine,bool stripWhiteSpace)
{
- if (d==0) return;
+ if (d.isEmpty()) return;
_setDocumentation(d,docFile,docLine,stripWhiteSpace,FALSE);
}
-#define uni_isupper(c) (QChar(c).category()==QChar::Letter_Uppercase)
-
-// do a UTF-8 aware search for the last real character and return TRUE
-// if that is a multibyte one.
-static bool lastCharIsMultibyte(const QCString &s)
-{
- uint l = s.length();
- int p = 0;
- int pp = -1;
- while ((p=nextUtf8CharPosition(s,l,(uint)p))<(int)l) pp=p;
- if (pp==-1 || ((uchar)s[pp])<0x80) return FALSE;
- return TRUE;
-}
-
-void DefinitionImpl::_setBriefDescription(const char *b,const char *briefFile,int briefLine)
+void DefinitionImpl::_setBriefDescription(const QCString &b,const QCString &briefFile,int briefLine)
{
static QCString outputLanguage = Config_getEnum(OUTPUT_LANGUAGE);
static bool needsDot = outputLanguage!="Japanese" &&
@@ -534,7 +518,7 @@ void DefinitionImpl::_setBriefDescription(const char *b,const char *briefFile,in
{
case '.': case '!': case '?': case '>': case ':': case ')': break;
default:
- if (uni_isupper(brief.at(0)) && !lastCharIsMultibyte(brief)) brief+='.';
+ if (isUTF8CharUpperCase(brief.str(),0) && !lastUTF8CharIsMultibyte(brief.str())) brief+='.';
break;
}
}
@@ -572,13 +556,13 @@ void DefinitionImpl::_setBriefDescription(const char *b,const char *briefFile,in
}
}
-void DefinitionImpl::setBriefDescription(const char *b,const char *briefFile,int briefLine)
+void DefinitionImpl::setBriefDescription(const QCString &b,const QCString &briefFile,int briefLine)
{
- if (b==0) return;
+ if (b.isEmpty()) return;
_setBriefDescription(b,briefFile,briefLine);
}
-void DefinitionImpl::_setInbodyDocumentation(const char *doc,const char *inbodyFile,int inbodyLine)
+void DefinitionImpl::_setInbodyDocumentation(const QCString &doc,const QCString &inbodyFile,int inbodyLine)
{
if (m_impl->inbodyDocs==0)
{
@@ -596,9 +580,9 @@ void DefinitionImpl::_setInbodyDocumentation(const char *doc,const char *inbodyF
}
}
-void DefinitionImpl::setInbodyDocumentation(const char *d,const char *inbodyFile,int inbodyLine)
+void DefinitionImpl::setInbodyDocumentation(const QCString &d,const QCString &inbodyFile,int inbodyLine)
{
- if (d==0) return;
+ if (d.isEmpty()) return;
_setInbodyDocumentation(d,inbodyFile,inbodyLine);
}
@@ -745,7 +729,7 @@ static FilterCache g_filterCache;
* The line actually containing the bracket is returned via endLine.
* Note that for VHDL code the bracket search is not done.
*/
-bool readCodeFragment(const char *fileName,
+bool readCodeFragment(const QCString &fileName,
int &startLine,int &endLine,QCString &result)
{
//printf("readCodeFragment(%s,startLine=%d,endLine=%d)\n",fileName,startLine,endLine);
@@ -881,7 +865,7 @@ bool readCodeFragment(const char *fileName,
}
result = transcodeCharacterStringToUTF8(result);
if (!result.isEmpty() && result.at(result.length()-1)!='\n') result += "\n";
- //printf("readCodeFragment(%d-%d)=%s\n",startLine,endLine,result.data());
+ //printf("readCodeFragment(%d-%d)=%s\n",startLine,endLine,qPrint(result));
return found;
}
@@ -918,7 +902,7 @@ QCString DefinitionImpl::getSourceAnchor() const
}
/*! Write a reference to the source code defining this definition */
-void DefinitionImpl::writeSourceDef(OutputList &ol,const char *) const
+void DefinitionImpl::writeSourceDef(OutputList &ol,const QCString &) const
{
static bool latexSourceCode = Config_getBool(LATEX_SOURCE_CODE);
static bool rtfSourceCode = Config_getBool(RTF_SOURCE_CODE);
@@ -956,7 +940,7 @@ void DefinitionImpl::writeSourceDef(OutputList &ol,const char *) const
ol.disable(OutputGenerator::RTF);
}
// write line link (HTML and optionally LaTeX, Docbook, RTF)
- ol.writeObjectLink(0,fn,anchorStr,lineStr);
+ ol.writeObjectLink(QCString(),fn,anchorStr,lineStr);
ol.enableAll();
ol.disable(OutputGenerator::Html);
if (latexSourceCode)
@@ -994,7 +978,7 @@ void DefinitionImpl::writeSourceDef(OutputList &ol,const char *) const
ol.disable(OutputGenerator::RTF);
}
// write file link (HTML, LaTeX optionally, RTF optionally)
- ol.writeObjectLink(0,fn,0,m_impl->body->fileDef->name());
+ ol.writeObjectLink(QCString(),fn,QCString(),m_impl->body->fileDef->name());
ol.enableAll();
ol.disable(OutputGenerator::Html);
if (latexSourceCode)
@@ -1035,7 +1019,7 @@ void DefinitionImpl::writeSourceDef(OutputList &ol,const char *) const
ol.disable(OutputGenerator::RTF);
}
// write file link (HTML only)
- ol.writeObjectLink(0,fn,0,m_impl->body->fileDef->name());
+ ol.writeObjectLink(QCString(),fn,QCString(),m_impl->body->fileDef->name());
ol.enableAll();
ol.disable(OutputGenerator::Html);
if (latexSourceCode)
@@ -1074,7 +1058,7 @@ void DefinitionImpl::writeSourceDef(OutputList &ol,const char *) const
ol.enable(OutputGenerator::RTF);
}
// write line link (HTML only)
- ol.writeObjectLink(0,fn,anchorStr,lineStr);
+ ol.writeObjectLink(QCString(),fn,anchorStr,lineStr);
ol.enableAll();
ol.disable(OutputGenerator::Html);
if (latexSourceCode)
@@ -1108,7 +1092,7 @@ void DefinitionImpl::writeSourceDef(OutputList &ol,const char *) const
void DefinitionImpl::setBodySegment(int defLine, int bls,int ble)
{
- //printf("setBodySegment(%d,%d) for %s\n",bls,ble,name().data());
+ //printf("setBodySegment(%d,%d) for %s\n",bls,ble,qPrint(name()));
if (m_impl->body==0) m_impl->body = new BodyInfo;
m_impl->body->defLine = defLine;
m_impl->body->startLine = bls;
@@ -1129,11 +1113,11 @@ bool DefinitionImpl::hasSources() const
}
/*! Write code of this definition into the documentation */
-void DefinitionImpl::writeInlineCode(OutputList &ol,const char *scopeName) const
+void DefinitionImpl::writeInlineCode(OutputList &ol,const QCString &scopeName) const
{
static bool inlineSources = Config_getBool(INLINE_SOURCES);
ol.pushGeneratorState();
- //printf("Source Fragment %s: %d-%d bodyDef=%p\n",name().data(),
+ //printf("Source Fragment %s: %d-%d bodyDef=%p\n",qPrint(name()),
// m_startBodyLine,m_endBodyLine,m_bodyDef);
if (inlineSources && hasSources())
{
@@ -1144,10 +1128,10 @@ void DefinitionImpl::writeInlineCode(OutputList &ol,const char *scopeName) const
)
{
//printf("Adding code fragment '%s' ext='%s'\n",
- // codeFragment.data(),m_impl->defFileExt.data());
+ // qPrint(codeFragment),qPrint(m_impl->defFileExt));
auto intf = Doxygen::parserManager->getCodeParser(m_impl->defFileExt);
intf->resetCodeParserState();
- //printf("Read:\n'%s'\n\n",codeFragment.data());
+ //printf("Read:\n'%s'\n\n",qPrint(codeFragment));
const MemberDef *thisMd = 0;
if (m_impl->def->definitionType()==Definition::TypeMember)
{
@@ -1160,7 +1144,7 @@ void DefinitionImpl::writeInlineCode(OutputList &ol,const char *scopeName) const
codeFragment, // input
m_impl->lang, // lang
FALSE, // isExample
- 0, // exampleName
+ QCString(), // exampleName
m_impl->body->fileDef, // fileDef
actualStart, // startLine
actualEnd, // endLine
@@ -1192,7 +1176,7 @@ static inline std::vector<const MemberDef*> refMapToVector(const std::unordered_
/*! Write a reference to the source code fragments in which this
* definition is used.
*/
-void DefinitionImpl::_writeSourceRefList(OutputList &ol,const char *scopeName,
+void DefinitionImpl::_writeSourceRefList(OutputList &ol,const QCString &scopeName,
const QCString &text,const std::unordered_map<std::string,const MemberDef *> &membersMap,
bool /*funcOnly*/) const
{
@@ -1213,7 +1197,7 @@ void DefinitionImpl::_writeSourceRefList(OutputList &ol,const char *scopeName,
{
QCString scope=md->getScopeString();
QCString name=md->name();
- //printf("class=%p scope=%s scopeName=%s\n",md->getClassDef(),scope.data(),scopeName);
+ //printf("class=%p scope=%s scopeName=%s\n",md->getClassDef(),qPrint(scope),scopeName);
if (!scope.isEmpty() && scope!=scopeName)
{
name.prepend(scope+getLanguageSpecificSeparator(m_impl->lang));
@@ -1255,8 +1239,8 @@ void DefinitionImpl::_writeSourceRefList(OutputList &ol,const char *scopeName,
const int maxLineNrStr = 10;
char anchorStr[maxLineNrStr];
qsnprintf(anchorStr,maxLineNrStr,"l%05d",md->getStartBodyLine());
- //printf("Write object link to %s\n",md->getBodyDef()->getSourceFileBase().data());
- ol.writeObjectLink(0,md->getBodyDef()->getSourceFileBase(),anchorStr,name);
+ //printf("Write object link to %s\n",qPrint(md->getBodyDef()->getSourceFileBase()));
+ ol.writeObjectLink(QCString(),md->getBodyDef()->getSourceFileBase(),anchorStr,name);
ol.popGeneratorState();
// for the other output formats just mention the name
@@ -1340,12 +1324,12 @@ void DefinitionImpl::_writeSourceRefList(OutputList &ol,const char *scopeName,
ol.popGeneratorState();
}
-void DefinitionImpl::writeSourceReffedBy(OutputList &ol,const char *scopeName) const
+void DefinitionImpl::writeSourceReffedBy(OutputList &ol,const QCString &scopeName) const
{
_writeSourceRefList(ol,scopeName,theTranslator->trReferencedBy(),m_impl->sourceRefByDict,FALSE);
}
-void DefinitionImpl::writeSourceRefs(OutputList &ol,const char *scopeName) const
+void DefinitionImpl::writeSourceRefs(OutputList &ol,const QCString &scopeName) const
{
_writeSourceRefList(ol,scopeName,theTranslator->trReferences(),m_impl->sourceRefsDict,TRUE);
}
@@ -1407,7 +1391,7 @@ void DefinitionImpl::addSourceReferences(const MemberDef *md)
}
}
-const Definition *DefinitionImpl::findInnerCompound(const char *) const
+const Definition *DefinitionImpl::findInnerCompound(const QCString &) const
{
return 0;
}
@@ -1427,7 +1411,7 @@ QCString DefinitionImpl::qualifiedName() const
return m_impl->qualifiedName;
}
- //printf("start %s::qualifiedName() localName=%s\n",name().data(),m_impl->localName.data());
+ //printf("start %s::qualifiedName() localName=%s\n",qPrint(name()),qPrint(m_impl->localName));
if (m_impl->outerScope==0)
{
if (m_impl->localName=="<globalScope>")
@@ -1452,14 +1436,14 @@ QCString DefinitionImpl::qualifiedName() const
getLanguageSpecificSeparator(getLanguage())+
m_impl->localName;
}
- //printf("end %s::qualifiedName()=%s\n",name().data(),m_impl->qualifiedName.data());
+ //printf("end %s::qualifiedName()=%s\n",qPrint(name()),qPrint(m_impl->qualifiedName));
//count--;
return m_impl->qualifiedName;
}
void DefinitionImpl::setOuterScope(Definition *d)
{
- //printf("%s::setOuterScope(%s)\n",name().data(),d?d->name().data():"<none>");
+ //printf("%s::setOuterScope(%s)\n",qPrint(name()),d?qPrint(d->name()):"<none>");
Definition *p = m_impl->outerScope;
bool found=false;
// make sure that we are not creating a recursive scope relation.
@@ -1505,7 +1489,7 @@ void DefinitionImpl::mergeRefItems(Definition *d)
[](RefItem *left,RefItem *right)
{ return left->id() <right->id() ||
(left->id()==right->id() &&
- qstrcmp(left->list()->listName(),right->list()->listName())<0);
+ left->list()->listName() < right->list()->listName());
});
// filter out duplicates
@@ -1517,7 +1501,7 @@ void DefinitionImpl::mergeRefItems(Definition *d)
m_impl->xrefListItems.erase(last, m_impl->xrefListItems.end());
}
-int DefinitionImpl::_getXRefListId(const char *listName) const
+int DefinitionImpl::_getXRefListId(const QCString &listName) const
{
for (const RefItem *item : m_impl->xrefListItems)
{
@@ -1545,14 +1529,14 @@ QCString DefinitionImpl::pathFragment() const
{
if (!result.isEmpty()) result+="/";
if (m_impl->def->definitionType()==Definition::TypeGroup &&
- (toGroupDef(m_impl->def))->groupTitle())
+ !toGroupDef(m_impl->def)->groupTitle().isEmpty())
{
- result+=(toGroupDef(m_impl->def))->groupTitle();
+ result+=toGroupDef(m_impl->def)->groupTitle();
}
else if (m_impl->def->definitionType()==Definition::TypePage &&
- (toPageDef(m_impl->def))->hasTitle())
+ toPageDef(m_impl->def)->hasTitle())
{
- result+=(toPageDef(m_impl->def))->title();
+ result+=toPageDef(m_impl->def)->title();
}
else
{
@@ -1581,19 +1565,22 @@ QCString DefinitionImpl::navigationPathAsString() const
{
result+=outerScope->navigationPathAsString();
}
- else if (m_impl->def->definitionType()==Definition::TypeFile && (toFileDef(m_impl->def))->getDirDef())
+ else if (m_impl->def->definitionType()==Definition::TypeFile &&
+ toFileDef(m_impl->def)->getDirDef())
{
result+=(toFileDef(m_impl->def))->getDirDef()->navigationPathAsString();
}
result+="<li class=\"navelem\">";
if (m_impl->def->isLinkable())
{
- if (m_impl->def->definitionType()==Definition::TypeGroup && (toGroupDef(m_impl->def))->groupTitle())
+ if (m_impl->def->definitionType()==Definition::TypeGroup &&
+ !toGroupDef(m_impl->def)->groupTitle().isEmpty())
{
result+="<a class=\"el\" href=\"$relpath^"+m_impl->def->getOutputFileBase()+Doxygen::htmlFileExtension+"\">"+
- convertToHtml((toGroupDef(m_impl->def))->groupTitle())+"</a>";
+ convertToHtml(toGroupDef(m_impl->def)->groupTitle())+"</a>";
}
- else if (m_impl->def->definitionType()==Definition::TypePage && (toPageDef(m_impl->def))->hasTitle())
+ else if (m_impl->def->definitionType()==Definition::TypePage &&
+ toPageDef(m_impl->def)->hasTitle())
{
result+="<a class=\"el\" href=\"$relpath^"+m_impl->def->getOutputFileBase()+Doxygen::htmlFileExtension+"\">"+
convertToHtml((toPageDef(m_impl->def))->title())+"</a>";
@@ -1663,7 +1650,7 @@ void DefinitionImpl::writeToc(OutputList &ol, const LocalToc &localToc) const
SectionType type = si->type();
if (isSection(type))
{
- //printf(" level=%d title=%s\n",level,si->title.data());
+ //printf(" level=%d title=%s\n",level,qPrint(si->title));
int nextLevel = (int)type;
if (nextLevel>level)
{
@@ -1729,7 +1716,7 @@ void DefinitionImpl::writeToc(OutputList &ol, const LocalToc &localToc) const
SectionType type = si->type();
if (isSection(type))
{
- //printf(" level=%d title=%s\n",level,si->title.data());
+ //printf(" level=%d title=%s\n",level,qPrint(si->title));
int nextLevel = (int)type;
if (nextLevel>level)
{
@@ -1826,7 +1813,7 @@ static bool stripWord(QCString &s,QCString w)
//----------------------------------------------------------------------------
// some quasi intelligent brief description abbreviator :^)
-QCString abbreviate(const char *s,const char *name)
+static QCString abbreviate(const QCString &s,const QCString &name)
{
QCString scopelessName=name;
int i=scopelessName.findRev("::");
@@ -1861,7 +1848,7 @@ QCString abbreviate(const char *s,const char *name)
QCString DefinitionImpl::briefDescription(bool abbr) const
{
- //printf("%s::briefDescription(%d)='%s'\n",name().data(),abbr,m_impl->brief?m_impl->brief->doc.data():"<none>");
+ //printf("%s::briefDescription(%d)='%s'\n",qPrint(name()),abbr,m_impl->brief?qPrint(m_impl->brief->doc):"<none>");
return m_impl->brief ?
(abbr ? abbreviate(m_impl->brief->doc,m_impl->def->displayName()) : m_impl->brief->doc) :
QCString("");
@@ -2035,7 +2022,7 @@ void DefinitionImpl::mergeReferencedBy(const Definition *other)
}
-void DefinitionImpl::setReference(const char *r)
+void DefinitionImpl::setReference(const QCString &r)
{
m_impl->ref=r;
}
@@ -2055,7 +2042,7 @@ void DefinitionImpl::setArtificial(bool b)
m_impl->isArtificial = b;
}
-void DefinitionImpl::setLocalName(const QCString name)
+void DefinitionImpl::setLocalName(const QCString &name)
{
m_impl->localName=name;
}
@@ -2090,7 +2077,7 @@ QCString DefinitionImpl::externalReference(const QCString &relPath) const
auto it = Doxygen::tagDestinationMap.find(ref.str());
if (it!=Doxygen::tagDestinationMap.end())
{
- QCString result = it->second;
+ QCString result(it->second);
uint l = result.length();
if (!relPath.isEmpty() && l>0 && result.at(0)=='.')
{ // relative path -> prepend relPath.
@@ -2167,7 +2154,7 @@ void DefinitionAliasImpl::deinit()
QCString DefinitionAliasImpl::qualifiedName() const
{
- //printf("start %s::qualifiedName() localName=%s\n",name().data(),m_impl->localName.data());
+ //printf("start %s::qualifiedName() localName=%s\n",qPrint(name()),qPrint(m_impl->localName));
if (m_scope==0)
{
return m_def->localName();
diff --git a/src/definition.h b/src/definition.h
index 4c0c566..6a1edfa 100644
--- a/src/definition.h
+++ b/src/definition.h
@@ -39,7 +39,7 @@ class SectionInfo;
class Definition;
class DefinitionMutable;
class DefinitionImpl;
-class FTextStream;
+class TextStream;
/** Data associated with a detailed description. */
struct DocInfo
@@ -90,7 +90,8 @@ class Definition
TypeGroup = 4,
TypePackage = 5,
TypePage = 6,
- TypeDir = 7
+ TypeDir = 7,
+ TypeConcept = 8
};
@@ -263,7 +264,7 @@ class Definition
virtual const RefItemVector &xrefListItems() const = 0;
- virtual const Definition *findInnerCompound(const char *name) const = 0;
+ virtual const Definition *findInnerCompound(const QCString &name) const = 0;
virtual Definition *getOuterScope() const = 0;
virtual std::vector<const MemberDef *> getReferencesMembers() const = 0;
@@ -316,30 +317,30 @@ class DefinitionMutable
//-----------------------------------------------------------------------------------
/*! Sets a new \a name for the definition */
- virtual void setName(const char *name) = 0;
+ virtual void setName(const QCString &name) = 0;
/*! Sets a unique id for the symbol. Used for libclang integration. */
- virtual void setId(const char *name) = 0;
+ virtual void setId(const QCString &name) = 0;
/*! Set a new file name and position */
virtual void setDefFile(const QCString& df,int defLine,int defColumn) = 0;
/*! Sets the documentation of this definition to \a d. */
- virtual void setDocumentation(const char *d,const char *docFile,int docLine,bool stripWhiteSpace=TRUE) = 0;
+ virtual void setDocumentation(const QCString &d,const QCString &docFile,int docLine,bool stripWhiteSpace=TRUE) = 0;
/*! Sets the brief description of this definition to \a b.
* A dot is added to the sentence if not available.
*/
- virtual void setBriefDescription(const char *b,const char *briefFile,int briefLine) = 0;
+ virtual void setBriefDescription(const QCString &b,const QCString &briefFile,int briefLine) = 0;
/*! Set the documentation that was found inside the body of an item.
* If there was already some documentation set, the new documentation
* will be appended.
*/
- virtual void setInbodyDocumentation(const char *d,const char *docFile,int docLine) = 0;
+ virtual void setInbodyDocumentation(const QCString &d,const QCString &docFile,int docLine) = 0;
/*! Sets the tag file id via which this definition was imported. */
- virtual void setReference(const char *r) = 0;
+ virtual void setReference(const QCString &r) = 0;
// source references
virtual void setBodySegment(int defLine, int bls,int ble) = 0;
@@ -352,7 +353,7 @@ class DefinitionMutable
virtual void setArtificial(bool b) = 0;
virtual void setLanguage(SrcLangExt lang) = 0;
- virtual void setLocalName(const QCString name) = 0;
+ virtual void setLocalName(const QCString &name) = 0;
//-----------------------------------------------------------------------------------
// --- actions ----
@@ -376,14 +377,14 @@ class DefinitionMutable
//-----------------------------------------------------------------------------------
// --- writing output ----
//-----------------------------------------------------------------------------------
- virtual void writeSourceDef(OutputList &ol,const char *scopeName) const = 0;
- virtual void writeInlineCode(OutputList &ol,const char *scopeName) const = 0;
- virtual void writeSourceRefs(OutputList &ol,const char *scopeName) const = 0;
- virtual void writeSourceReffedBy(OutputList &ol,const char *scopeName) const = 0;
+ virtual void writeSourceDef(OutputList &ol,const QCString &scopeName) const = 0;
+ virtual void writeInlineCode(OutputList &ol,const QCString &scopeName) const = 0;
+ virtual void writeSourceRefs(OutputList &ol,const QCString &scopeName) const = 0;
+ virtual void writeSourceReffedBy(OutputList &ol,const QCString &scopeName) const = 0;
virtual void writeNavigationPath(OutputList &ol) const = 0;
virtual void writeQuickMemberLinks(OutputList &,const MemberDef *) const = 0;
virtual void writeSummaryLinks(OutputList &) const = 0;
- virtual void writeDocAnchorsToTagFile(FTextStream &) const = 0;
+ virtual void writeDocAnchorsToTagFile(TextStream &) const = 0;
virtual void writeToc(OutputList &ol, const LocalToc &lt) const = 0;
// ---------------------------------
@@ -403,7 +404,7 @@ DefinitionMutable *toDefinitionMutable(const Definition *d);
* via \a result. The function returns TRUE if successful and FALSE
* in case of an error.
*/
-bool readCodeFragment(const char *fileName,
+bool readCodeFragment(const QCString &fileName,
int &startLine,int &endLine,
QCString &result);
#endif
diff --git a/src/definitionimpl.h b/src/definitionimpl.h
index 541e346..aeb3f8d 100644
--- a/src/definitionimpl.h
+++ b/src/definitionimpl.h
@@ -28,8 +28,8 @@ class DefinitionImpl
public:
DefinitionImpl(
Definition *def,
- const char *defFileName,int defLine,int defColumn,
- const char *name,const char *b=0,const char *d=0,
+ const QCString &defFileName,int defLine,int defColumn,
+ const QCString &name,const char *b=0,const char *d=0,
bool isSymbol=TRUE);
virtual ~DefinitionImpl();
@@ -71,7 +71,7 @@ class DefinitionImpl
const GroupList &partOfGroups() const;
bool isLinkableViaGroup() const;
const RefItemVector &xrefListItems() const;
- const Definition *findInnerCompound(const char *name) const;
+ const Definition *findInnerCompound(const QCString &name) const;
Definition *getOuterScope() const;
std::vector<const MemberDef *> getReferencesMembers() const;
std::vector<const MemberDef *> getReferencedByMembers() const;
@@ -80,13 +80,13 @@ class DefinitionImpl
bool hasBriefDescription() const;
QCString id() const;
const SectionRefs &getSectionRefs() const;
- void setName(const char *name);
- void setId(const char *name);
+ void setName(const QCString &name);
+ void setId(const QCString &name);
void setDefFile(const QCString& df,int defLine,int defColumn);
- void setDocumentation(const char *d,const char *docFile,int docLine,bool stripWhiteSpace=TRUE);
- void setBriefDescription(const char *b,const char *briefFile,int briefLine);
- void setInbodyDocumentation(const char *d,const char *docFile,int docLine);
- void setReference(const char *r);
+ void setDocumentation(const QCString &d,const QCString &docFile,int docLine,bool stripWhiteSpace=TRUE);
+ void setBriefDescription(const QCString &b,const QCString &briefFile,int briefLine);
+ void setInbodyDocumentation(const QCString &d,const QCString &docFile,int docLine);
+ void setReference(const QCString &r);
void addSectionsToDefinition(const std::vector<const SectionInfo*> &anchorList);
void setBodySegment(int defLine,int bls,int ble);
void setBodyDef(FileDef *fd);
@@ -101,18 +101,18 @@ class DefinitionImpl
void setHidden(bool b);
void setArtificial(bool b);
void setLanguage(SrcLangExt lang);
- void writeSourceDef(OutputList &ol,const char *scopeName) const;
- void writeInlineCode(OutputList &ol,const char *scopeName) const;
- void writeSourceRefs(OutputList &ol,const char *scopeName) const;
- void writeSourceReffedBy(OutputList &ol,const char *scopeName) const;
+ void writeSourceDef(OutputList &ol,const QCString &scopeName) const;
+ void writeInlineCode(OutputList &ol,const QCString &scopeName) const;
+ void writeSourceRefs(OutputList &ol,const QCString &scopeName) const;
+ void writeSourceReffedBy(OutputList &ol,const QCString &scopeName) const;
void makePartOfGroup(const GroupDef *gd);
void writeNavigationPath(OutputList &ol) const;
QCString navigationPathAsString() const;
void writeQuickMemberLinks(OutputList &,const MemberDef *) const;
void writeSummaryLinks(OutputList &) const;
QCString pathFragment() const;
- void writeDocAnchorsToTagFile(FTextStream &) const;
- void setLocalName(const QCString name);
+ void writeDocAnchorsToTagFile(TextStream &) const;
+ void setLocalName(const QCString &name);
void addSectionsToIndex();
void writeToc(OutputList &ol, const LocalToc &lt) const;
void setCookie(Definition::Cookie *cookie) const;
@@ -125,12 +125,12 @@ class DefinitionImpl
private:
- int _getXRefListId(const char *listName) const;
- void _writeSourceRefList(OutputList &ol,const char *scopeName,const QCString &text,
+ int _getXRefListId(const QCString &listName) const;
+ void _writeSourceRefList(OutputList &ol,const QCString &scopeName,const QCString &text,
const std::unordered_map<std::string,const MemberDef *> &members,bool) const;
- void _setBriefDescription(const char *b,const char *briefFile,int briefLine);
- void _setDocumentation(const char *d,const char *docFile,int docLine,bool stripWhiteSpace,bool atTop);
- void _setInbodyDocumentation(const char *d,const char *docFile,int docLine);
+ void _setBriefDescription(const QCString &b,const QCString &briefFile,int briefLine);
+ void _setDocumentation(const QCString &d,const QCString &docFile,int docLine,bool stripWhiteSpace,bool atTop);
+ void _setInbodyDocumentation(const QCString &d,const QCString &docFile,int docLine);
bool _docsAlreadyAdded(const QCString &doc,QCString &sigList);
// PIMPL idiom
@@ -144,8 +144,8 @@ class DefinitionMixin : public Base
public:
/*! Create a new definition */
DefinitionMixin(
- const char *defFileName,int defLine,int defColumn,
- const char *name,const char *b=0,const char *d=0,
+ const QCString &defFileName,int defLine,int defColumn,
+ const QCString &name,const char *b=0,const char *d=0,
bool isSymbol=TRUE) : m_impl(this,defFileName,defLine,defColumn,name,b,d,isSymbol) {}
virtual ~DefinitionMixin() {}
@@ -190,7 +190,7 @@ class DefinitionMixin : public Base
virtual const GroupList &partOfGroups() const { return m_impl.partOfGroups(); }
virtual bool isLinkableViaGroup() const { return m_impl.isLinkableViaGroup(); }
virtual const RefItemVector &xrefListItems() const { return m_impl.xrefListItems(); }
- virtual const Definition *findInnerCompound(const char *name) const { return m_impl.findInnerCompound(name); }
+ virtual const Definition *findInnerCompound(const QCString &name) const { return m_impl.findInnerCompound(name); }
virtual Definition *getOuterScope() const { return m_impl.getOuterScope(); }
virtual std::vector<const MemberDef *> getReferencesMembers() const { return m_impl.getReferencesMembers(); }
virtual std::vector<const MemberDef *> getReferencedByMembers() const { return m_impl.getReferencedByMembers(); }
@@ -201,17 +201,17 @@ class DefinitionMixin : public Base
virtual const SectionRefs &getSectionRefs() const { return m_impl.getSectionRefs(); }
//======== DefinitionMutable
- virtual void setName(const char *name) { m_impl.setName(name); }
- virtual void setId(const char *name) { m_impl.setId(name); }
+ virtual void setName(const QCString &name) { m_impl.setName(name); }
+ virtual void setId(const QCString &name) { m_impl.setId(name); }
virtual void setDefFile(const QCString& df,int defLine,int defColumn)
{ m_impl.setDefFile(df,defLine,defColumn); }
- virtual void setDocumentation(const char *doc,const char *docFile,int docLine,bool stripWhiteSpace=TRUE)
+ virtual void setDocumentation(const QCString &doc,const QCString &docFile,int docLine,bool stripWhiteSpace=TRUE)
{ m_impl.setDocumentation(doc,docFile,docLine,stripWhiteSpace); }
- virtual void setBriefDescription(const char *brief,const char *briefFile,int briefLine)
+ virtual void setBriefDescription(const QCString &brief,const QCString &briefFile,int briefLine)
{ m_impl.setBriefDescription(brief,briefFile,briefLine); }
- virtual void setInbodyDocumentation(const char *doc,const char *docFile,int docLine)
+ virtual void setInbodyDocumentation(const QCString &doc,const QCString &docFile,int docLine)
{ m_impl.setInbodyDocumentation(doc,docFile,docLine); }
- virtual void setReference(const char *r)
+ virtual void setReference(const QCString &r)
{ m_impl.setReference(r); }
virtual void addSectionsToDefinition(const std::vector<const SectionInfo*> &anchorList)
{ m_impl.addSectionsToDefinition(anchorList); }
@@ -241,13 +241,13 @@ class DefinitionMixin : public Base
{ m_impl.setArtificial(b); }
virtual void setLanguage(SrcLangExt lang)
{ m_impl.setLanguage(lang); }
- virtual void writeSourceDef(OutputList &ol,const char *scopeName) const
+ virtual void writeSourceDef(OutputList &ol,const QCString &scopeName) const
{ m_impl.writeSourceDef(ol,scopeName); }
- virtual void writeInlineCode(OutputList &ol,const char *scopeName) const
+ virtual void writeInlineCode(OutputList &ol,const QCString &scopeName) const
{ m_impl.writeInlineCode(ol,scopeName); }
- virtual void writeSourceRefs(OutputList &ol,const char *scopeName) const
+ virtual void writeSourceRefs(OutputList &ol,const QCString &scopeName) const
{ m_impl.writeSourceRefs(ol,scopeName); }
- virtual void writeSourceReffedBy(OutputList &ol,const char *scopeName) const
+ virtual void writeSourceReffedBy(OutputList &ol,const QCString &scopeName) const
{ m_impl.writeSourceReffedBy(ol,scopeName); }
virtual void makePartOfGroup(const GroupDef *gd)
{ m_impl.makePartOfGroup(gd); }
@@ -261,9 +261,9 @@ class DefinitionMixin : public Base
{ m_impl.writeSummaryLinks(ol); }
virtual QCString pathFragment() const
{ return m_impl.pathFragment(); }
- virtual void writeDocAnchorsToTagFile(FTextStream &fs) const
+ virtual void writeDocAnchorsToTagFile(TextStream &fs) const
{ m_impl.writeDocAnchorsToTagFile(fs); }
- virtual void setLocalName(const QCString name)
+ virtual void setLocalName(const QCString &name)
{ m_impl.setLocalName(name); }
virtual void addSectionsToIndex()
{ m_impl.addSectionsToIndex(); }
@@ -399,7 +399,7 @@ class DefinitionAliasMixin : public Base
{ return m_alias->isLinkableViaGroup(); }
virtual const RefItemVector &xrefListItems() const
{ return m_alias->xrefListItems(); }
- virtual const Definition *findInnerCompound(const char *name) const
+ virtual const Definition *findInnerCompound(const QCString &name) const
{ return m_alias->findInnerCompound(name); }
virtual Definition *getOuterScope() const
{ return const_cast<Definition*>(m_scope); }
diff --git a/src/dia.cpp b/src/dia.cpp
index 4a00a17..13c1316 100644
--- a/src/dia.cpp
+++ b/src/dia.cpp
@@ -1,12 +1,10 @@
/******************************************************************************
*
- *
- *
- * Copyright (C) 1997-2015 by Dimitri van Heesch.
+ * Copyright (C) 1997-2021 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
- * documentation under the terms of the GNU General Public License is hereby
- * granted. No representations are made about the suitability of this software
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
@@ -20,23 +18,23 @@
#include "config.h"
#include "message.h"
#include "util.h"
+#include "dir.h"
-#include <qdir.h>
static const int maxCmdLine = 40960;
-void writeDiaGraphFromFile(const char *inFile,const char *outDir,
- const char *outFile,DiaOutputFormat format)
+void writeDiaGraphFromFile(const QCString &inFile,const QCString &outDir,
+ const QCString &outFile,DiaOutputFormat format)
{
QCString absOutFile = outDir;
absOutFile+=Portable::pathSeparator();
absOutFile+=outFile;
// chdir to the output dir, so dot can find the font file.
- QCString oldDir = QDir::currentDirPath().utf8();
+ std::string oldDir = Dir::currentDirPath();
// go to the html output directory (i.e. path)
- QDir::setCurrent(outDir);
- //printf("Going to dir %s\n",QDir::currentDirPath().data());
+ Dir::setCurrent(outDir.str());
+ //printf("Going to dir %s\n",Dir::currentDirPath().c_str());
QCString diaExe = Config_getString(DIA_PATH)+"dia"+Portable::commandExtension();
QCString diaArgs;
QCString extension;
@@ -61,12 +59,12 @@ void writeDiaGraphFromFile(const char *inFile,const char *outDir,
diaArgs+="\"";
int exitCode;
- //printf("*** running: %s %s outDir:%s %s\n",diaExe.data(),diaArgs.data(),outDir,outFile);
+ //printf("*** running: %s %s outDir:%s %s\n",qPrint(diaExe),qPrint(diaArgs),outDir,outFile);
Portable::sysTimerStart();
if ((exitCode=Portable::system(diaExe,diaArgs,FALSE))!=0)
{
err("Problems running %s. Check your installation or look typos in you dia file %s\n",
- diaExe.data(),inFile);
+ qPrint(diaExe),qPrint(inFile));
Portable::sysTimerStop();
goto error;
}
@@ -75,7 +73,7 @@ void writeDiaGraphFromFile(const char *inFile,const char *outDir,
{
QCString epstopdfArgs(maxCmdLine);
epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"",
- outFile,outFile);
+ qPrint(outFile),qPrint(outFile));
Portable::sysTimerStart();
if (Portable::system("epstopdf",epstopdfArgs)!=0)
{
@@ -85,6 +83,6 @@ void writeDiaGraphFromFile(const char *inFile,const char *outDir,
}
error:
- QDir::setCurrent(oldDir);
+ Dir::setCurrent(oldDir);
}
diff --git a/src/dia.h b/src/dia.h
index 93d7b04..bd0a378 100644
--- a/src/dia.h
+++ b/src/dia.h
@@ -1,12 +1,12 @@
/******************************************************************************
*
- *
+ *
*
* Copyright (C) 1997-2015 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
- * documentation under the terms of the GNU General Public License is hereby
- * granted. No representations are made about the suitability of this software
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
@@ -19,12 +19,11 @@
#define _DIA_H
class QCString;
-class FTextStream;
enum DiaOutputFormat { DIA_BITMAP , DIA_EPS };
-void writeDiaGraphFromFile(const char *inFile,const char *outDir,
- const char *outFile,DiaOutputFormat format);
+void writeDiaGraphFromFile(const QCString &inFile,const QCString &outDir,
+ const QCString &outFile,DiaOutputFormat format);
#endif
diff --git a/src/diagram.cpp b/src/diagram.cpp
index 052c1f4..0f20636 100644
--- a/src/diagram.cpp
+++ b/src/diagram.cpp
@@ -15,8 +15,8 @@
#include <stdio.h>
#include <stdlib.h>
-#include "ftextstream.h"
-#include <qfile.h>
+#include <fstream>
+#include <algorithm>
#include "diagram.h"
#include "image.h"
@@ -28,6 +28,7 @@
#include "portable.h"
#include "index.h"
#include "classlist.h"
+#include "textstream.h"
//-----------------------------------------------------------------------------
@@ -40,7 +41,7 @@ class DiagramItem
{
public:
DiagramItem(DiagramItem *p,uint number,const ClassDef *cd,
- Protection prot,Specifier virt,const char *ts);
+ Protection prot,Specifier virt,const QCString &ts);
QCString label() const;
QCString fileName() const;
DiagramItem *parentItem() { return m_parent; }
@@ -80,7 +81,7 @@ class DiagramRow
using reverse_iterator = typename Vec::reverse_iterator;
DiagramRow(TreeDiagram *d,uint l) : m_diagram(d), m_level(l) {}
void insertClass(DiagramItem *parent,const ClassDef *cd,bool doBases,
- Protection prot,Specifier virt,const char *ts);
+ Protection prot,Specifier virt,const QCString &ts);
uint number() { return m_level; }
DiagramItem *item(int index) { return m_items.at(index).get(); }
@@ -107,13 +108,13 @@ class TreeDiagram
uint computeRows();
void moveChildren(DiagramItem *root,int dx);
void computeExtremes(uint *labelWidth,uint *xpos);
- void drawBoxes(FTextStream &t,Image *image,
+ void drawBoxes(TextStream &t,Image *image,
bool doBase,bool bitmap,
uint baseRows,uint superRows,
uint cellWidth,uint cellHeight,
QCString relPath="",
bool generateMap=TRUE);
- void drawConnectors(FTextStream &t,Image *image,
+ void drawConnectors(TextStream &t,Image *image,
bool doBase,bool bitmap,
uint baseRows,uint superRows,
uint cellWidth,uint cellheight);
@@ -176,7 +177,7 @@ static QCString protToString(Protection p)
case Protected: return "dashed";
case Private: return "dotted";
}
- return 0;
+ return QCString();
}
static uint virtToMask(Specifier p)
@@ -232,7 +233,7 @@ static void writeBitmapBox(DiagramItem *di,Image *image,
}
}
-static void writeVectorBox(FTextStream &t,DiagramItem *di,
+static void writeVectorBox(TextStream &t,DiagramItem *di,
float x,float y,bool children=FALSE)
{
if (di->virtualness()==Virtual) t << "dashed\n";
@@ -241,7 +242,7 @@ static void writeVectorBox(FTextStream &t,DiagramItem *di,
if (di->virtualness()==Virtual) t << "solid\n";
}
-static void writeMapArea(FTextStream &t,const ClassDef *cd,QCString relPath,
+static void writeMapArea(TextStream &t,const ClassDef *cd,QCString relPath,
uint x,uint y,uint w,uint h)
{
if (cd->isLinkable())
@@ -267,13 +268,13 @@ static void writeMapArea(FTextStream &t,const ClassDef *cd,QCString relPath,
}
t << "alt=\"" << convertToXML(cd->displayName());
t << "\" shape=\"rect\" coords=\"" << x << "," << y << ",";
- t << (x+w) << "," << (y+h) << "\"/>" << endl;
+ t << (x+w) << "," << (y+h) << "\"/>\n";
}
}
//-----------------------------------------------------------------------------
DiagramItem::DiagramItem(DiagramItem *p,uint number,const ClassDef *cd,
- Protection pr,Specifier vi,const char *ts)
+ Protection pr,Specifier vi,const QCString &ts)
: m_parent(p), m_num(number), m_prot(pr), m_virt(vi), m_templSpec(ts), m_classDef(cd)
{
}
@@ -332,7 +333,7 @@ void DiagramItem::addChild(DiagramItem *di)
//---------------------------------------------------------------------------
void DiagramRow::insertClass(DiagramItem *parent,const ClassDef *cd,bool doBases,
- Protection prot,Specifier virt,const char *ts)
+ Protection prot,Specifier virt,const QCString &ts)
{
auto di = std::make_unique<DiagramItem>(parent, m_diagram->row(m_level)->numItems(),
cd,prot,virt,ts);
@@ -365,7 +366,7 @@ void DiagramRow::insertClass(DiagramItem *parent,const ClassDef *cd,bool doBases
{
row->insertClass(di_ptr,ccd,doBases,bcd.prot,
doBases?bcd.virt:Normal,
- doBases?bcd.templSpecifiers.data():"");
+ doBases?bcd.templSpecifiers:QCString());
}
}
}
@@ -378,7 +379,7 @@ TreeDiagram::TreeDiagram(const ClassDef *root,bool doBases)
auto row = std::make_unique<DiagramRow>(this,0);
DiagramRow *row_ptr = row.get();
m_rows.push_back(std::move(row));
- row_ptr->insertClass(0,root,doBases,Public,Normal,0);
+ row_ptr->insertClass(0,root,doBases,Public,Normal,QCString());
}
void TreeDiagram::moveChildren(DiagramItem *root,int dx)
@@ -393,7 +394,7 @@ void TreeDiagram::moveChildren(DiagramItem *root,int dx)
bool TreeDiagram::layoutTree(DiagramItem *root,uint r)
{
bool moved=FALSE;
- //printf("layoutTree(%s,%d)\n",root->label().data(),r);
+ //printf("layoutTree(%s,%d)\n",qPrint(root->label()),r);
if (root->numChildren()>0)
{
@@ -520,8 +521,8 @@ void TreeDiagram::computeExtremes(uint *maxLabelLen,uint *maxXPos)
for (const auto &di : *dr) // for each item in a row
{
if (di->isInList()) done=TRUE;
- if (maxXPos) mx=QMAX(mx,(uint)di->xPos());
- if (maxLabelLen) ml=QMAX(ml,Image::stringLength(di->label()));
+ if (maxXPos) mx=std::max(mx,(uint)di->xPos());
+ if (maxLabelLen) ml=std::max(ml,Image::stringLength(di->label()));
}
if (done) break;
}
@@ -564,7 +565,7 @@ class DualDirIterator
typename C::reverse_iterator m_rit;
};
-void TreeDiagram::drawBoxes(FTextStream &t,Image *image,
+void TreeDiagram::drawBoxes(TextStream &t,Image *image,
bool doBase,bool bitmap,
uint baseRows,uint superRows,
uint cellWidth,uint cellHeight,
@@ -694,7 +695,7 @@ void TreeDiagram::drawBoxes(FTextStream &t,Image *image,
}
}
-void TreeDiagram::drawConnectors(FTextStream &t,Image *image,
+void TreeDiagram::drawConnectors(TextStream &t,Image *image,
bool doBase,bool bitmap,
uint baseRows,uint superRows,
uint cellWidth,uint cellHeight)
@@ -742,7 +743,7 @@ void TreeDiagram::drawConnectors(FTextStream &t,Image *image,
}
else // draw vectors
{
- t << protToString(di->protection()) << endl;
+ t << protToString(di->protection()) << "\n";
if (doBase)
{
t << "1 " << (di->xPos()/(float)gridWidth) << " "
@@ -811,7 +812,7 @@ void TreeDiagram::drawConnectors(FTextStream &t,Image *image,
}
else
{
- t << protToString(di->protection()) << endl;
+ t << protToString(di->protection()) << "\n";
if (doBase)
{
t << "1 " << xf << " " << yf << " hedge\n";
@@ -850,7 +851,7 @@ void TreeDiagram::drawConnectors(FTextStream &t,Image *image,
}
else
{
- t << protToString(di->protection()) << endl;
+ t << protToString(di->protection()) << "\n";
if (doBase)
{
t << "1 " << xf << " " << yf << " hedge\n";
@@ -859,7 +860,7 @@ void TreeDiagram::drawConnectors(FTextStream &t,Image *image,
{
t << "0 " << xf << " " << yf << " hedge\n";
}
- t << protToString(getMinProtectionLevel(dil)) << endl;
+ t << protToString(getMinProtectionLevel(dil)) << "\n";
if (doBase)
{
t << xf << " " << ysf << " " << yf << " vedge\n";
@@ -909,7 +910,7 @@ void TreeDiagram::drawConnectors(FTextStream &t,Image *image,
}
else // draw pixels
{
- t << protToString(di->protection()) << endl;
+ t << protToString(di->protection()) << "\n";
if (doBase)
{
t << "1 " << di->xPos()/(float)gridWidth << " "
@@ -949,7 +950,7 @@ void TreeDiagram::drawConnectors(FTextStream &t,Image *image,
}
else
{
- t << protToString(p) << endl;
+ t << protToString(p) << "\n";
if (doBase)
{
t << "0 " << di->xPos()/(float)gridWidth << " "
@@ -984,7 +985,7 @@ void TreeDiagram::drawConnectors(FTextStream &t,Image *image,
}
else
{
- t << protToString(p) << endl;
+ t << protToString(p) << "\n";
if (doBase)
{
t << first->xPos()/(float)gridWidth << " "
@@ -1043,8 +1044,8 @@ ClassDiagram::~ClassDiagram()
{
}
-void ClassDiagram::writeFigure(FTextStream &output,const char *path,
- const char *fileName) const
+void ClassDiagram::writeFigure(TextStream &output,const QCString &path,
+ const QCString &fileName) const
{
uint baseRows=p->base.computeRows();
uint superRows=p->super.computeRows();
@@ -1052,12 +1053,12 @@ void ClassDiagram::writeFigure(FTextStream &output,const char *path,
p->base.computeExtremes(&baseMaxLabelWidth,&baseMaxX);
p->super.computeExtremes(&superMaxLabelWidth,&superMaxX);
- uint rows=QMAX(1,baseRows+superRows-1);
- uint cols=(QMAX(baseMaxX,superMaxX)+gridWidth*2-1)/gridWidth;
+ uint rows=std::max(1u,baseRows+superRows-1);
+ uint cols=(std::max(baseMaxX,superMaxX)+gridWidth*2-1)/gridWidth;
// Estimate the image aspect width and height in pixels.
uint estHeight = rows*40;
- uint estWidth = cols*(20+QMAX(baseMaxLabelWidth,superMaxLabelWidth));
+ uint estWidth = cols*(20+std::max(baseMaxLabelWidth,superMaxLabelWidth));
//printf("Estimated size %d x %d\n",estWidth,estHeight);
const float pageWidth = 14.0f; // estimated page width in cm.
@@ -1065,8 +1066,8 @@ void ClassDiagram::writeFigure(FTextStream &output,const char *path,
// errors.
// compute the image height in centimeters based on the estimates
- float realHeight = QMIN(rows,12); // real height in cm
- float realWidth = realHeight * estWidth/(float)estHeight;
+ float realHeight = static_cast<float>(std::min(rows,12u)); // real height in cm
+ float realWidth = realHeight * estWidth/static_cast<float>(estHeight);
if (realWidth>pageWidth) // assume that the page width is about 15 cm
{
realHeight*=pageWidth/realWidth;
@@ -1078,7 +1079,7 @@ void ClassDiagram::writeFigure(FTextStream &output,const char *path,
"\\begin{center}\n"
"\\leavevmode\n";
output << "\\includegraphics[height=" << realHeight << "cm]{"
- << fileName << "}" << endl;
+ << fileName << "}\n";
output << "\\end{center}\n"
"\\end{figure}\n";
@@ -1086,244 +1087,247 @@ void ClassDiagram::writeFigure(FTextStream &output,const char *path,
QCString epsBaseName=(QCString)path+"/"+fileName;
QCString epsName=epsBaseName+".eps";
- QFile f1;
- f1.setName(epsName.data());
- if (!f1.open(IO_WriteOnly))
+ std::ofstream f(epsName.str(),std::ofstream::out | std::ofstream::binary);
+ if (!f.is_open())
{
- term("Could not open file %s for writing\n",f1.name().data());
+ term("Could not open file %s for writing\n",qPrint(epsName));
}
- FTextStream t(&f1);
-
- //printf("writeEPS() rows=%d cols=%d\n",rows,cols);
-
- // generate EPS header and postscript variables and procedures
-
- t << "%!PS-Adobe-2.0 EPSF-2.0\n";
- t << "%%Title: ClassName\n";
- t << "%%Creator: Doxygen\n";
- t << "%%CreationDate: Time\n";
- t << "%%For: \n";
- t << "%Magnification: 1.00\n";
- t << "%%Orientation: Portrait\n";
- t << "%%BoundingBox: 0 0 500 " << estHeight*500.0f/(float)estWidth << "\n";
- t << "%%Pages: 0\n";
- t << "%%BeginSetup\n";
- t << "%%EndSetup\n";
- t << "%%EndComments\n";
- t << "\n";
- t << "% ----- variables -----\n";
- t << "\n";
- t << "/boxwidth 0 def\n";
- t << "/boxheight 40 def\n";
- t << "/fontheight 24 def\n";
- t << "/marginwidth 10 def\n";
- t << "/distx 20 def\n";
- t << "/disty 40 def\n";
- t << "/boundaspect " << estWidth/(float)estHeight << " def % aspect ratio of the BoundingBox (width/height)\n";
- t << "/boundx 500 def\n";
- t << "/boundy boundx boundaspect div def\n";
- t << "/xspacing 0 def\n";
- t << "/yspacing 0 def\n";
- t << "/rows " << rows << " def\n";
- t << "/cols " << cols << " def\n";
- t << "/scalefactor 0 def\n";
- t << "/boxfont /Times-Roman findfont fontheight scalefont def\n";
- t << "\n";
- t << "% ----- procedures -----\n";
- t << "\n";
- t << "/dotted { [1 4] 0 setdash } def\n";
- t << "/dashed { [5] 0 setdash } def\n";
- t << "/solid { [] 0 setdash } def\n";
- t << "\n";
- t << "/max % result = MAX(arg1,arg2)\n";
- t << "{\n";
- t << " /a exch def\n";
- t << " /b exch def\n";
- t << " a b gt {a} {b} ifelse\n";
- t << "} def\n";
- t << "\n";
- t << "/xoffset % result = MAX(0,(scalefactor-(boxwidth*cols+distx*(cols-1)))/2)\n";
- t << "{\n";
- t << " 0 scalefactor boxwidth cols mul distx cols 1 sub mul add sub 2 div max\n";
- t << "} def\n";
- t << "\n";
- t << "/cw % boxwidth = MAX(boxwidth, stringwidth(arg1))\n";
- t << "{\n";
- t << " /str exch def\n";
- t << " /boxwidth boxwidth str stringwidth pop max def\n";
- t << "} def\n";
- t << "\n";
- t << "/box % draws a box with text 'arg1' at grid pos (arg2,arg3)\n";
- t << "{ gsave\n";
- t << " 2 setlinewidth\n";
- t << " newpath\n";
- t << " exch xspacing mul xoffset add\n";
- t << " exch yspacing mul\n";
- t << " moveto\n";
- t << " boxwidth 0 rlineto \n";
- t << " 0 boxheight rlineto \n";
- t << " boxwidth neg 0 rlineto \n";
- t << " 0 boxheight neg rlineto \n";
- t << " closepath\n";
- t << " dup stringwidth pop neg boxwidth add 2 div\n";
- t << " boxheight fontheight 2 div sub 2 div\n";
- t << " rmoveto show stroke\n";
- t << " grestore\n";
- t << "} def \n";
- t << "\n";
- t << "/mark\n";
- t << "{ newpath\n";
- t << " exch xspacing mul xoffset add boxwidth add\n";
- t << " exch yspacing mul\n";
- t << " moveto\n";
- t << " 0 boxheight 4 div rlineto\n";
- t << " boxheight neg 4 div boxheight neg 4 div rlineto\n";
- t << " closepath\n";
- t << " eofill\n";
- t << " stroke\n";
- t << "} def\n";
- t << "\n";
- t << "/arrow\n";
- t << "{ newpath\n";
- t << " moveto\n";
- t << " 3 -8 rlineto\n";
- t << " -6 0 rlineto\n";
- t << " 3 8 rlineto\n";
- t << " closepath\n";
- t << " eofill\n";
- t << " stroke\n";
- t << "} def\n";
- t << "\n";
- t << "/out % draws an output connector for the block at (arg1,arg2)\n";
- t << "{\n";
- t << " newpath\n";
- t << " exch xspacing mul xoffset add boxwidth 2 div add\n";
- t << " exch yspacing mul boxheight add\n";
- t << " /y exch def\n";
- t << " /x exch def\n";
- t << " x y moveto\n";
- t << " 0 disty 2 div rlineto \n";
- t << " stroke\n";
- t << " 1 eq { x y disty 2 div add arrow } if\n";
- t << "} def\n";
- t << "\n";
- t << "/in % draws an input connector for the block at (arg1,arg2)\n";
- t << "{\n";
- t << " newpath\n";
- t << " exch xspacing mul xoffset add boxwidth 2 div add\n";
- t << " exch yspacing mul disty 2 div sub\n";
- t << " /y exch def\n";
- t << " /x exch def\n";
- t << " x y moveto\n";
- t << " 0 disty 2 div rlineto\n";
- t << " stroke\n";
- t << " 1 eq { x y disty 2 div add arrow } if\n";
- t << "} def\n";
- t << "\n";
- t << "/hedge\n";
- t << "{\n";
- t << " exch xspacing mul xoffset add boxwidth 2 div add\n";
- t << " exch yspacing mul boxheight 2 div sub\n";
- t << " /y exch def\n";
- t << " /x exch def\n";
- t << " newpath\n";
- t << " x y moveto\n";
- t << " boxwidth 2 div distx add 0 rlineto\n";
- t << " stroke\n";
- t << " 1 eq\n";
- t << " { newpath x boxwidth 2 div distx add add y moveto\n";
- t << " -8 3 rlineto\n";
- t << " 0 -6 rlineto\n";
- t << " 8 3 rlineto\n";
- t << " closepath\n";
- t << " eofill\n";
- t << " stroke\n";
- t << " } if\n";
- t << "} def\n";
- t << "\n";
- t << "/vedge\n";
- t << "{\n";
- t << " /ye exch def\n";
- t << " /ys exch def\n";
- t << " /xs exch def\n";
- t << " newpath\n";
- t << " xs xspacing mul xoffset add boxwidth 2 div add dup\n";
- t << " ys yspacing mul boxheight 2 div sub\n";
- t << " moveto\n";
- t << " ye yspacing mul boxheight 2 div sub\n";
- t << " lineto\n";
- t << " stroke\n";
- t << "} def\n";
- t << "\n";
- t << "/conn % connections the blocks from col 'arg1' to 'arg2' of row 'arg3'\n";
- t << "{\n";
- t << " /ys exch def\n";
- t << " /xe exch def\n";
- t << " /xs exch def\n";
- t << " newpath\n";
- t << " xs xspacing mul xoffset add boxwidth 2 div add\n";
- t << " ys yspacing mul disty 2 div sub\n";
- t << " moveto\n";
- t << " xspacing xe xs sub mul 0\n";
- t << " rlineto\n";
- t << " stroke\n";
- t << "} def\n";
- t << "\n";
- t << "% ----- main ------\n";
- t << "\n";
- t << "boxfont setfont\n";
- t << "1 boundaspect scale\n";
-
-
- for (const auto &dr : p->base)
+ else
{
- bool done=FALSE;
- for (const auto &di : *dr)
+ TextStream t(&f);
+
+ //printf("writeEPS() rows=%d cols=%d\n",rows,cols);
+
+ // generate EPS header and postscript variables and procedures
+
+ t << "%!PS-Adobe-2.0 EPSF-2.0\n";
+ t << "%%Title: ClassName\n";
+ t << "%%Creator: Doxygen\n";
+ t << "%%CreationDate: Time\n";
+ t << "%%For: \n";
+ t << "%Magnification: 1.00\n";
+ t << "%%Orientation: Portrait\n";
+ t << "%%BoundingBox: 0 0 500 " << estHeight*500.0f/(float)estWidth << "\n";
+ t << "%%Pages: 0\n";
+ t << "%%BeginSetup\n";
+ t << "%%EndSetup\n";
+ t << "%%EndComments\n";
+ t << "\n";
+ t << "% ----- variables -----\n";
+ t << "\n";
+ t << "/boxwidth 0 def\n";
+ t << "/boxheight 40 def\n";
+ t << "/fontheight 24 def\n";
+ t << "/marginwidth 10 def\n";
+ t << "/distx 20 def\n";
+ t << "/disty 40 def\n";
+ t << "/boundaspect " << estWidth/(float)estHeight << " def % aspect ratio of the BoundingBox (width/height)\n";
+ t << "/boundx 500 def\n";
+ t << "/boundy boundx boundaspect div def\n";
+ t << "/xspacing 0 def\n";
+ t << "/yspacing 0 def\n";
+ t << "/rows " << rows << " def\n";
+ t << "/cols " << cols << " def\n";
+ t << "/scalefactor 0 def\n";
+ t << "/boxfont /Times-Roman findfont fontheight scalefont def\n";
+ t << "\n";
+ t << "% ----- procedures -----\n";
+ t << "\n";
+ t << "/dotted { [1 4] 0 setdash } def\n";
+ t << "/dashed { [5] 0 setdash } def\n";
+ t << "/solid { [] 0 setdash } def\n";
+ t << "\n";
+ t << "/max % result = MAX(arg1,arg2)\n";
+ t << "{\n";
+ t << " /a exch def\n";
+ t << " /b exch def\n";
+ t << " a b gt {a} {b} ifelse\n";
+ t << "} def\n";
+ t << "\n";
+ t << "/xoffset % result = MAX(0,(scalefactor-(boxwidth*cols+distx*(cols-1)))/2)\n";
+ t << "{\n";
+ t << " 0 scalefactor boxwidth cols mul distx cols 1 sub mul add sub 2 div max\n";
+ t << "} def\n";
+ t << "\n";
+ t << "/cw % boxwidth = MAX(boxwidth, stringwidth(arg1))\n";
+ t << "{\n";
+ t << " /str exch def\n";
+ t << " /boxwidth boxwidth str stringwidth pop max def\n";
+ t << "} def\n";
+ t << "\n";
+ t << "/box % draws a box with text 'arg1' at grid pos (arg2,arg3)\n";
+ t << "{ gsave\n";
+ t << " 2 setlinewidth\n";
+ t << " newpath\n";
+ t << " exch xspacing mul xoffset add\n";
+ t << " exch yspacing mul\n";
+ t << " moveto\n";
+ t << " boxwidth 0 rlineto \n";
+ t << " 0 boxheight rlineto \n";
+ t << " boxwidth neg 0 rlineto \n";
+ t << " 0 boxheight neg rlineto \n";
+ t << " closepath\n";
+ t << " dup stringwidth pop neg boxwidth add 2 div\n";
+ t << " boxheight fontheight 2 div sub 2 div\n";
+ t << " rmoveto show stroke\n";
+ t << " grestore\n";
+ t << "} def \n";
+ t << "\n";
+ t << "/mark\n";
+ t << "{ newpath\n";
+ t << " exch xspacing mul xoffset add boxwidth add\n";
+ t << " exch yspacing mul\n";
+ t << " moveto\n";
+ t << " 0 boxheight 4 div rlineto\n";
+ t << " boxheight neg 4 div boxheight neg 4 div rlineto\n";
+ t << " closepath\n";
+ t << " eofill\n";
+ t << " stroke\n";
+ t << "} def\n";
+ t << "\n";
+ t << "/arrow\n";
+ t << "{ newpath\n";
+ t << " moveto\n";
+ t << " 3 -8 rlineto\n";
+ t << " -6 0 rlineto\n";
+ t << " 3 8 rlineto\n";
+ t << " closepath\n";
+ t << " eofill\n";
+ t << " stroke\n";
+ t << "} def\n";
+ t << "\n";
+ t << "/out % draws an output connector for the block at (arg1,arg2)\n";
+ t << "{\n";
+ t << " newpath\n";
+ t << " exch xspacing mul xoffset add boxwidth 2 div add\n";
+ t << " exch yspacing mul boxheight add\n";
+ t << " /y exch def\n";
+ t << " /x exch def\n";
+ t << " x y moveto\n";
+ t << " 0 disty 2 div rlineto \n";
+ t << " stroke\n";
+ t << " 1 eq { x y disty 2 div add arrow } if\n";
+ t << "} def\n";
+ t << "\n";
+ t << "/in % draws an input connector for the block at (arg1,arg2)\n";
+ t << "{\n";
+ t << " newpath\n";
+ t << " exch xspacing mul xoffset add boxwidth 2 div add\n";
+ t << " exch yspacing mul disty 2 div sub\n";
+ t << " /y exch def\n";
+ t << " /x exch def\n";
+ t << " x y moveto\n";
+ t << " 0 disty 2 div rlineto\n";
+ t << " stroke\n";
+ t << " 1 eq { x y disty 2 div add arrow } if\n";
+ t << "} def\n";
+ t << "\n";
+ t << "/hedge\n";
+ t << "{\n";
+ t << " exch xspacing mul xoffset add boxwidth 2 div add\n";
+ t << " exch yspacing mul boxheight 2 div sub\n";
+ t << " /y exch def\n";
+ t << " /x exch def\n";
+ t << " newpath\n";
+ t << " x y moveto\n";
+ t << " boxwidth 2 div distx add 0 rlineto\n";
+ t << " stroke\n";
+ t << " 1 eq\n";
+ t << " { newpath x boxwidth 2 div distx add add y moveto\n";
+ t << " -8 3 rlineto\n";
+ t << " 0 -6 rlineto\n";
+ t << " 8 3 rlineto\n";
+ t << " closepath\n";
+ t << " eofill\n";
+ t << " stroke\n";
+ t << " } if\n";
+ t << "} def\n";
+ t << "\n";
+ t << "/vedge\n";
+ t << "{\n";
+ t << " /ye exch def\n";
+ t << " /ys exch def\n";
+ t << " /xs exch def\n";
+ t << " newpath\n";
+ t << " xs xspacing mul xoffset add boxwidth 2 div add dup\n";
+ t << " ys yspacing mul boxheight 2 div sub\n";
+ t << " moveto\n";
+ t << " ye yspacing mul boxheight 2 div sub\n";
+ t << " lineto\n";
+ t << " stroke\n";
+ t << "} def\n";
+ t << "\n";
+ t << "/conn % connections the blocks from col 'arg1' to 'arg2' of row 'arg3'\n";
+ t << "{\n";
+ t << " /ys exch def\n";
+ t << " /xe exch def\n";
+ t << " /xs exch def\n";
+ t << " newpath\n";
+ t << " xs xspacing mul xoffset add boxwidth 2 div add\n";
+ t << " ys yspacing mul disty 2 div sub\n";
+ t << " moveto\n";
+ t << " xspacing xe xs sub mul 0\n";
+ t << " rlineto\n";
+ t << " stroke\n";
+ t << "} def\n";
+ t << "\n";
+ t << "% ----- main ------\n";
+ t << "\n";
+ t << "boxfont setfont\n";
+ t << "1 boundaspect scale\n";
+
+
+ for (const auto &dr : p->base)
{
- done=di->isInList();
- t << "(" << convertToPSString(di->label()) << ") cw\n";
+ bool done=FALSE;
+ for (const auto &di : *dr)
+ {
+ done=di->isInList();
+ t << "(" << convertToPSString(di->label()) << ") cw\n";
+ }
+ if (done) break;
}
- if (done) break;
- }
- auto it = p->super.begin();
- if (it!=p->super.end()) ++it;
- for (;it!=p->super.end();++it)
- {
- const auto &dr = *it;
- bool done=FALSE;
- for (const auto &di : *dr)
+ auto it = p->super.begin();
+ if (it!=p->super.end()) ++it;
+ for (;it!=p->super.end();++it)
{
- done=di->isInList();
- t << "(" << convertToPSString(di->label()) << ") cw\n";
+ const auto &dr = *it;
+ bool done=FALSE;
+ for (const auto &di : *dr)
+ {
+ done=di->isInList();
+ t << "(" << convertToPSString(di->label()) << ") cw\n";
+ }
+ if (done) break;
}
- if (done) break;
- }
- t << "/boxwidth boxwidth marginwidth 2 mul add def\n"
- << "/xspacing boxwidth distx add def\n"
- << "/yspacing boxheight disty add def\n"
- << "/scalefactor \n"
- << " boxwidth cols mul distx cols 1 sub mul add\n"
- << " boxheight rows mul disty rows 1 sub mul add boundaspect mul \n"
- << " max def\n"
- << "boundx scalefactor div boundy scalefactor div scale\n";
+ t << "/boxwidth boxwidth marginwidth 2 mul add def\n"
+ << "/xspacing boxwidth distx add def\n"
+ << "/yspacing boxheight disty add def\n"
+ << "/scalefactor \n"
+ << " boxwidth cols mul distx cols 1 sub mul add\n"
+ << " boxheight rows mul disty rows 1 sub mul add boundaspect mul \n"
+ << " max def\n"
+ << "boundx scalefactor div boundy scalefactor div scale\n";
- t << "\n% ----- classes -----\n\n";
- p->base.drawBoxes(t,0,TRUE,FALSE,baseRows,superRows,0,0);
- p->super.drawBoxes(t,0,FALSE,FALSE,baseRows,superRows,0,0);
+ t << "\n% ----- classes -----\n\n";
+ p->base.drawBoxes(t,0,TRUE,FALSE,baseRows,superRows,0,0);
+ p->super.drawBoxes(t,0,FALSE,FALSE,baseRows,superRows,0,0);
- t << "\n% ----- relations -----\n\n";
- p->base.drawConnectors(t,0,TRUE,FALSE,baseRows,superRows,0,0);
- p->super.drawConnectors(t,0,FALSE,FALSE,baseRows,superRows,0,0);
+ t << "\n% ----- relations -----\n\n";
+ p->base.drawConnectors(t,0,TRUE,FALSE,baseRows,superRows,0,0);
+ p->super.drawConnectors(t,0,FALSE,FALSE,baseRows,superRows,0,0);
+
+ }
+ f.close();
- f1.close();
if (Config_getBool(USE_PDFLATEX))
{
QCString epstopdfArgs(4096);
epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"",
- epsBaseName.data(),epsBaseName.data());
- //printf("Converting eps using '%s'\n",epstopdfArgs.data());
+ qPrint(epsBaseName),qPrint(epsBaseName));
+ //printf("Converting eps using '%s'\n",qPrint(epstopdfArgs));
Portable::sysTimerStart();
if (Portable::system("epstopdf",epstopdfArgs)!=0)
{
@@ -1336,8 +1340,8 @@ void ClassDiagram::writeFigure(FTextStream &output,const char *path,
}
-void ClassDiagram::writeImage(FTextStream &t,const char *path,
- const char *relPath,const char *fileName,
+void ClassDiagram::writeImage(TextStream &t,const QCString &path,
+ const QCString &relPath,const QCString &fileName,
bool generateMap) const
{
uint baseRows=p->base.computeRows();
@@ -1348,9 +1352,9 @@ void ClassDiagram::writeImage(FTextStream &t,const char *path,
p->base.computeExtremes(&lb,&xb);
p->super.computeExtremes(&ls,&xs);
- uint cellWidth = QMAX(lb,ls)+labelHorMargin*2;
- uint maxXPos = QMAX(xb,xs);
- uint labelVertMargin = 6; //QMAX(6,(cellWidth-fontHeight)/6); // aspect at least 1:3
+ uint cellWidth = std::max(lb,ls)+labelHorMargin*2;
+ uint maxXPos = std::max(xb,xs);
+ uint labelVertMargin = 6; //std::max(6,(cellWidth-fontHeight)/6); // aspect at least 1:3
uint cellHeight = labelVertMargin*2+fontHeight;
uint imageWidth = (maxXPos+gridWidth)*cellWidth/gridWidth+
(maxXPos*labelHorSpacing)/gridWidth;
diff --git a/src/diagram.h b/src/diagram.h
index d8e7612..e2544e0 100644
--- a/src/diagram.h
+++ b/src/diagram.h
@@ -20,9 +20,10 @@
#define DIAGRAM_H
#include <memory>
+#include "qcstring.h"
class ClassDef;
-class FTextStream;
+class TextStream;
/** Class representing a built-in class diagram. */
class ClassDiagram
@@ -30,10 +31,10 @@ class ClassDiagram
public:
ClassDiagram(const ClassDef *root);
~ClassDiagram();
- void writeFigure(FTextStream &t,const char *path,
- const char *file) const;
- void writeImage(FTextStream &t,const char *path,const char *relPath,
- const char *file,bool generateMap=TRUE) const;
+ void writeFigure(TextStream &t,const QCString &path,
+ const QCString &file) const;
+ void writeImage(TextStream &t,const QCString &path,const QCString &relPath,
+ const QCString &file,bool generateMap=true) const;
private:
struct Private;
std::unique_ptr<Private> p;
diff --git a/src/dir.cpp b/src/dir.cpp
new file mode 100644
index 0000000..327bc72
--- /dev/null
+++ b/src/dir.cpp
@@ -0,0 +1,303 @@
+/******************************************************************************
+ *
+ * Copyright (C) 1997-2021 by Dimitri van Heesch.
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
+ * for any purpose. It is provided "as is" without express or implied warranty.
+ * See the GNU General Public License for more details.
+ *
+ * Documents produced by Doxygen are derivative works derived from the
+ * input used in their production; they are not affected by this license.
+ *
+ */
+
+#include "filesystem.hpp"
+#include "dir.h"
+
+namespace fs = ghc::filesystem;
+
+//-----------------------------------------------------------------------------------------------
+
+struct DirEntry::Private
+{
+ fs::directory_entry entry;
+};
+
+DirEntry::DirEntry() : p(std::make_unique<Private>())
+{
+}
+
+DirEntry::~DirEntry()
+{
+}
+
+bool DirEntry::is_directory() const
+{
+ return p->entry.is_directory();
+}
+
+bool DirEntry::is_regular_file() const
+{
+ return p->entry.is_regular_file();
+}
+
+bool DirEntry::is_symlink() const
+{
+ return p->entry.is_symlink();
+}
+
+std::string DirEntry::path() const
+{
+ return p->entry.path().string();
+}
+
+//-----------------------------------------------------------------------------------------------
+
+struct DirIterator::Private
+{
+ Private() : it() {}
+ Private(const std::string &path) : it(path) {}
+ fs::directory_iterator it;
+ mutable DirEntry current;
+};
+
+DirIterator::DirIterator() : p(std::make_unique<Private>())
+{
+}
+
+DirIterator::DirIterator(const std::string &path) : p(std::make_unique<Private>(path))
+{
+}
+
+DirIterator::DirIterator(const DirIterator &it) : p(std::make_unique<Private>())
+{
+ p->it = it.p->it;
+}
+
+DirIterator::~DirIterator()
+{
+}
+
+DirIterator &DirIterator::operator=(const DirIterator &it)
+{
+ if (&it!=this)
+ {
+ p->it = it.p->it;
+ }
+ return *this;
+}
+
+DirIterator DirIterator::operator++()
+{
+ DirIterator result;
+ result.p->it = ++p->it;
+ return result;
+}
+
+const DirIterator::value_type &DirIterator::operator*() const
+{
+ p->current.p->entry = *p->it;
+ return p->current;
+}
+
+const DirIterator::value_type *DirIterator::operator->() const
+{
+ p->current.p->entry = *p->it;
+ return &p->current;
+}
+
+bool operator==(const DirIterator &it1,const DirIterator &it2)
+{
+ return it1.p->it!=it2.p->it;
+}
+
+bool operator!=(const DirIterator &it1,const DirIterator &it2)
+{
+ return it1.p->it!=it2.p->it;
+}
+
+DirIterator begin(DirIterator it) noexcept
+{
+ return it;
+}
+
+DirIterator end(const DirIterator &) noexcept
+{
+ return DirIterator();
+}
+
+
+//-----------------------------------------------------------------------------------------------
+
+
+struct Dir::Private
+{
+ fs::path path;
+};
+
+Dir::Dir() : p(std::make_unique<Private>())
+{
+ std::error_code ec;
+ p->path = fs::current_path(ec);
+}
+
+Dir::Dir(const Dir &d) : p(std::make_unique<Private>())
+{
+ p->path = d.p->path;
+}
+
+Dir &Dir::operator=(const Dir &d)
+{
+ if (&d!=this)
+ {
+ p->path = d.p->path;
+ }
+ return *this;
+}
+
+Dir::Dir(const std::string &path) : p(std::make_unique<Private>())
+{
+ setPath(path);
+}
+
+Dir::~Dir()
+{
+}
+
+void Dir::setPath(const std::string &path)
+{
+ p->path = path;
+}
+
+std::string Dir::path() const
+{
+ return p->path.string();
+}
+
+DirIterator Dir::iterator() const
+{
+ return DirIterator(p->path.string());
+}
+
+static void correctPath(std::string &s)
+{
+ std::replace( s.begin(), s.end(), '\\', '/' );
+}
+
+bool Dir::exists(const std::string &path,bool acceptsAbsPath) const
+{
+ std::string result = filePath(path,acceptsAbsPath);
+ std::error_code ec;
+ bool exist = fs::exists(fs::path(result),ec);
+ return !ec && exist;
+}
+
+bool Dir::exists() const
+{
+ FileInfo fi(p->path.string());
+ return fi.exists() && fi.isDir();
+}
+
+bool Dir::isRelative() const
+{
+ return isRelativePath(p->path.string());
+}
+
+bool Dir::isRelativePath(const std::string &path)
+{
+ return fs::path(path).is_relative();
+}
+
+std::string Dir::filePath(const std::string &path,bool acceptsAbsPath) const
+{
+ std::string result;
+ if (acceptsAbsPath && !isRelativePath(path))
+ {
+ result = path;
+ }
+ else
+ {
+ result = (p->path / path).string();
+ }
+ correctPath(result);
+ return result;
+}
+
+bool Dir::mkdir(const std::string &path,bool acceptsAbsPath) const
+{
+ std::error_code ec;
+ std::string result = filePath(path,acceptsAbsPath);
+ if (exists(path,acceptsAbsPath))
+ {
+ return true;
+ }
+ else
+ {
+ return fs::create_directory(result,ec);
+ }
+}
+
+bool Dir::rmdir(const std::string &path,bool acceptsAbsPath) const
+{
+ return remove(path,acceptsAbsPath);
+}
+
+bool Dir::remove(const std::string &path,bool acceptsAbsPath) const
+{
+ std::error_code ec;
+ std::string result = filePath(path,acceptsAbsPath);
+ return fs::remove(result,ec);
+}
+
+bool Dir::rename(const std::string &orgName,const std::string &newName,bool acceptsAbsPath) const
+{
+ std::error_code ec;
+ std::string fn1 = filePath(orgName,acceptsAbsPath);
+ std::string fn2 = filePath(newName,acceptsAbsPath);
+ fs::rename(fn1,fn2,ec);
+ return !ec;
+}
+
+bool Dir::copy(const std::string &srcName,const std::string &dstName,bool acceptsAbsPath) const
+{
+ const auto copyOptions = fs::copy_options::overwrite_existing;
+ std::error_code ec;
+ std::string sn = filePath(srcName,acceptsAbsPath);
+ std::string dn = filePath(dstName,acceptsAbsPath);
+ fs::copy(sn,dn,copyOptions,ec);
+ return !ec;
+}
+
+std::string Dir::currentDirPath()
+{
+ std::error_code ec;
+ std::string result = fs::current_path(ec).string();
+ correctPath(result);
+ return result;
+}
+
+bool Dir::setCurrent(const std::string &path)
+{
+ std::error_code ec;
+ fs::current_path(path,ec);
+ return !ec;
+}
+
+std::string Dir::cleanDirPath(const std::string &path)
+{
+ std::error_code ec;
+ std::string result = fs::path(path).lexically_normal().string();
+ correctPath(result);
+ return result;
+}
+
+std::string Dir::absPath() const
+{
+ std::error_code ec;
+ std::string result = fs::absolute(p->path,ec).string();
+ correctPath(result);
+ return result;
+}
+
diff --git a/src/dir.h b/src/dir.h
new file mode 100644
index 0000000..0a1cc12
--- /dev/null
+++ b/src/dir.h
@@ -0,0 +1,104 @@
+/******************************************************************************
+ *
+ * Copyright (C) 1997-2021 by Dimitri van Heesch.
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
+ * for any purpose. It is provided "as is" without express or implied warranty.
+ * See the GNU General Public License for more details.
+ *
+ * Documents produced by Doxygen are derivative works derived from the
+ * input used in their production; they are not affected by this license.
+ *
+ */
+
+#ifndef DIR_H
+#define DIR_H
+
+#include <string>
+#include <memory>
+
+#include "fileinfo.h"
+
+class DirEntry
+{
+ public:
+ ~DirEntry();
+ bool is_directory() const;
+ bool is_regular_file() const;
+ bool is_symlink() const;
+ std::string path() const;
+ private:
+ friend class DirIterator;
+ DirEntry();
+ struct Private;
+ std::unique_ptr<Private> p;
+};
+
+class DirIterator
+{
+ public:
+ using value_type = DirEntry;
+ using difference_type = std::ptrdiff_t;
+ using pointer = value_type*;
+ using reference = value_type&;
+ using iterator_category = std::input_iterator_tag;
+ DirIterator(const DirIterator &it);
+ DirIterator &operator=(const DirIterator &it);
+ DirIterator operator++();
+ const value_type &operator*() const;
+ const value_type *operator->() const;
+
+ friend bool operator==(const DirIterator &it1,const DirIterator &it2);
+ friend bool operator!=(const DirIterator &it1,const DirIterator &it2);
+ friend DirIterator begin(DirIterator it) noexcept;
+ friend DirIterator end(const DirIterator &) noexcept;
+ ~DirIterator();
+
+ private:
+ friend class Dir;
+ DirIterator();
+ DirIterator(const std::string &path);
+ struct Private;
+ std::unique_ptr<Private> p;
+};
+
+/** Class representing a directory in the file system */
+class Dir final
+{
+ public:
+ Dir();
+ Dir(const std::string &path);
+ Dir(const Dir &d);
+ Dir &operator=(const Dir &d);
+ ~Dir();
+ void setPath(const std::string &path);
+ std::string path() const;
+
+ DirIterator iterator() const;
+
+ bool exists() const;
+ std::string filePath(const std::string &path,bool acceptsAbsPath=true) const;
+ bool exists(const std::string &path,bool acceptsAbsPath=true) const;
+ bool mkdir(const std::string &path,bool acceptsAbsPath=true) const;
+ bool rmdir(const std::string &path,bool acceptsAbsPath=true) const;
+ bool remove(const std::string &path,bool acceptsAbsPath=true) const;
+ bool rename(const std::string &orgName,const std::string &newName,
+ bool acceptsAbsPath=true) const;
+ bool copy(const std::string &src,const std::string &dest,bool acceptsAbsPath=true) const;
+ std::string absPath() const;
+
+ bool isRelative() const;
+
+ static bool isRelativePath(const std::string &path);
+ static std::string currentDirPath();
+ static bool setCurrent(const std::string &path);
+ static std::string cleanDirPath(const std::string &path);
+
+ private:
+ struct Private;
+ std::unique_ptr<Private> p;
+};
+
+#endif
diff --git a/src/dirdef.cpp b/src/dirdef.cpp
index 5e5ca93..1814b51 100644
--- a/src/dirdef.cpp
+++ b/src/dirdef.cpp
@@ -26,7 +26,6 @@
#include "dot.h"
#include "dotdirdeps.h"
#include "layout.h"
-#include "ftextstream.h"
#include "config.h"
#include "docparser.h"
#include "definitionimpl.h"
@@ -38,7 +37,7 @@
class DirDefImpl : public DefinitionMixin<DirDef>
{
public:
- DirDefImpl(const char *path);
+ DirDefImpl(const QCString &path);
virtual ~DirDefImpl();
virtual DefType definitionType() const { return TypeDir; }
@@ -62,7 +61,7 @@ class DirDefImpl : public DefinitionMixin<DirDef>
virtual QCString shortTitle() const;
virtual bool hasDetailedDescription() const;
virtual void writeDocumentation(OutputList &ol);
- virtual void writeTagFile(FTextStream &t);
+ virtual void writeTagFile(TextStream &t);
virtual void setDiskName(const QCString &name) { m_diskName = name; }
virtual void sort();
virtual void setParent(DirDef *parent);
@@ -84,7 +83,7 @@ class DirDefImpl : public DefinitionMixin<DirDef>
void startMemberDeclarations(OutputList &ol);
void endMemberDeclarations(OutputList &ol);
- static DirDef *createNewDir(const char *path);
+ static DirDef *createNewDir(const QCString &path);
static bool matchPath(const QCString &path,const StringVector &l);
DirList m_subdirs;
@@ -98,7 +97,7 @@ class DirDefImpl : public DefinitionMixin<DirDef>
UsedDirLinkedMap m_usedDirs;
};
-DirDef *createDirDef(const char *path)
+DirDef *createDirDef(const QCString &path)
{
return new DirDefImpl(path);
}
@@ -109,7 +108,7 @@ DirDef *createDirDef(const char *path)
static int g_dirCount=0;
-DirDefImpl::DirDefImpl(const char *path) : DefinitionMixin(path,1,1,path)
+DirDefImpl::DirDefImpl(const QCString &path) : DefinitionMixin(path,1,1,path)
{
bool fullPathNames = Config_getBool(FULL_PATH_NAMES);
// get display name (stripping the paths mentioned in STRIP_FROM_PATH)
@@ -179,9 +178,9 @@ static QCString encodeDirName(const QCString &anchor)
{
// convert to md5 hash
uchar md5_sig[16];
- QCString sigStr(33);
+ char sigStr[33];
MD5Buffer((const unsigned char *)anchor.data(),anchor.length(),md5_sig);
- MD5SigToString(md5_sig,sigStr.rawData(),33);
+ MD5SigToString(md5_sig,sigStr);
return sigStr;
// old algorithm
@@ -210,7 +209,7 @@ static QCString encodeDirName(const QCString &anchor)
QCString DirDefImpl::getOutputFileBase() const
{
//printf("DirDefImpl::getOutputFileBase() %s->dir_%s\n",
- // m_diskName.data(),encodeDirName(m_diskName).data());
+ // qPrint(m_diskName),qPrint(encodeDirName(m_diskName)));
return "dir_"+encodeDirName(m_diskName);
}
@@ -225,7 +224,7 @@ void DirDefImpl::writeDetailedDescription(OutputList &ol,const QCString &title)
ol.popGeneratorState();
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
- ol.writeAnchor(0,"details");
+ ol.writeAnchor(QCString(),"details");
ol.popGeneratorState();
ol.startGroupHeader();
ol.parseText(title);
@@ -235,7 +234,7 @@ void DirDefImpl::writeDetailedDescription(OutputList &ol,const QCString &title)
if (!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF))
{
ol.generateDoc(briefFile(),briefLine(),this,0,briefDescription(),FALSE,FALSE,
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
}
// separator between brief and details
if (!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF) &&
@@ -256,7 +255,7 @@ void DirDefImpl::writeDetailedDescription(OutputList &ol,const QCString &title)
if (!documentation().isEmpty())
{
ol.generateDoc(docFile(),docLine(),this,0,documentation()+"\n",TRUE,FALSE,
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
}
}
}
@@ -267,7 +266,7 @@ void DirDefImpl::writeBriefDescription(OutputList &ol)
{
DocRoot *rootNode = validatingParseDoc(
briefFile(),briefLine(),this,0,briefDescription(),TRUE,FALSE,
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
if (rootNode && !rootNode->isEmpty())
{
ol.startParagraph();
@@ -286,7 +285,7 @@ void DirDefImpl::writeBriefDescription(OutputList &ol)
)
{
ol.disableAllBut(OutputGenerator::Html);
- ol.startTextLink(0,"details");
+ ol.startTextLink(QCString(),"details");
ol.parseText(theTranslator->trMore());
ol.endTextLink();
}
@@ -307,7 +306,7 @@ void DirDefImpl::writeDirectoryGraph(OutputList &ol)
DotDirDeps dirDep(this);
if (!dirDep.isTrivial())
{
- msg("Generating dependency graph for directory %s\n",displayName().data());
+ msg("Generating dependency graph for directory %s\n",qPrint(displayName()));
ol.disable(OutputGenerator::Man);
//ol.startParagraph();
ol.startDirDepGraph();
@@ -345,7 +344,7 @@ void DirDefImpl::writeSubDirList(OutputList &ol)
ol.startMemberItem(dd->getOutputFileBase(),0);
ol.parseText(theTranslator->trDir(FALSE,TRUE)+" ");
ol.insertMemberAlign();
- ol.writeObjectLink(dd->getReference(),dd->getOutputFileBase(),0,dd->shortName());
+ ol.writeObjectLink(dd->getReference(),dd->getOutputFileBase(),QCString(),dd->shortName());
ol.endMemberItem();
if (!dd->briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC))
{
@@ -353,14 +352,14 @@ void DirDefImpl::writeSubDirList(OutputList &ol)
ol.generateDoc(briefFile(),briefLine(),dd,0,dd->briefDescription(),
FALSE, // indexWords
FALSE, // isExample
- 0, // exampleName
+ QCString(), // exampleName
TRUE, // single line
TRUE, // link from index
Config_getBool(MARKDOWN_SUPPORT)
);
ol.endMemberDescription();
}
- ol.endMemberDeclaration(0,0);
+ ol.endMemberDeclaration(QCString(),QCString());
}
}
@@ -396,7 +395,7 @@ void DirDefImpl::writeFileList(OutputList &ol)
ol.insertMemberAlign();
if (fd->isLinkable())
{
- ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),0,fd->name());
+ ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),QCString(),fd->name());
}
else
{
@@ -409,7 +408,7 @@ void DirDefImpl::writeFileList(OutputList &ol)
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
ol.docify(" ");
- ol.startTextLink(fd->includeName(),0);
+ ol.startTextLink(fd->includeName(),QCString());
ol.docify("[");
ol.parseText(theTranslator->trCode());
ol.docify("]");
@@ -423,14 +422,14 @@ void DirDefImpl::writeFileList(OutputList &ol)
ol.generateDoc(briefFile(),briefLine(),fd,0,fd->briefDescription(),
FALSE, // indexWords
FALSE, // isExample
- 0, // exampleName
+ QCString(), // exampleName
TRUE, // single line
TRUE, // link from index
Config_getBool(MARKDOWN_SUPPORT)
);
ol.endMemberDescription();
}
- ol.endMemberDeclaration(0,0);
+ ol.endMemberDeclaration(QCString(),QCString());
}
}
ol.endMemberList();
@@ -458,12 +457,12 @@ bool DirDefImpl::hasDetailedDescription() const
return (!briefDescription().isEmpty() && repeatBrief) || !documentation().isEmpty();
}
-void DirDefImpl::writeTagFile(FTextStream &tagFile)
+void DirDefImpl::writeTagFile(TextStream &tagFile)
{
- tagFile << " <compound kind=\"dir\">" << endl;
- tagFile << " <name>" << convertToXML(displayName()) << "</name>" << endl;
- tagFile << " <path>" << convertToXML(name()) << "</path>" << endl;
- tagFile << " <filename>" << convertToXML(getOutputFileBase()) << Doxygen::htmlFileExtension << "</filename>" << endl;
+ tagFile << " <compound kind=\"dir\">\n";
+ tagFile << " <name>" << convertToXML(displayName()) << "</name>\n";
+ tagFile << " <path>" << convertToXML(name()) << "</path>\n";
+ tagFile << " <filename>" << convertToXML(getOutputFileBase()) << Doxygen::htmlFileExtension << "</filename>\n";
for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Directory))
{
switch (lde->kind())
@@ -474,7 +473,7 @@ void DirDefImpl::writeTagFile(FTextStream &tagFile)
{
for(const auto dd : m_subdirs)
{
- tagFile << " <dir>" << convertToXML(dd->displayName()) << "</dir>" << endl;
+ tagFile << " <dir>" << convertToXML(dd->displayName()) << "</dir>\n";
}
}
}
@@ -483,7 +482,7 @@ void DirDefImpl::writeTagFile(FTextStream &tagFile)
{
for (const auto &fd : m_fileList)
{
- tagFile << " <file>" << convertToXML(fd->name()) << "</file>" << endl;
+ tagFile << " <file>" << convertToXML(fd->name()) << "</file>\n";
}
}
break;
@@ -492,7 +491,7 @@ void DirDefImpl::writeTagFile(FTextStream &tagFile)
}
}
writeDocAnchorsToTagFile(tagFile);
- tagFile << " </compound>" << endl;
+ tagFile << " </compound>\n";
}
void DirDefImpl::writeDocumentation(OutputList &ol)
@@ -562,11 +561,14 @@ void DirDefImpl::writeDocumentation(OutputList &ol)
case LayoutDocEntry::NamespaceNestedNamespaces:
case LayoutDocEntry::NamespaceNestedConstantGroups:
case LayoutDocEntry::NamespaceClasses:
+ case LayoutDocEntry::NamespaceConcepts:
case LayoutDocEntry::NamespaceInterfaces:
case LayoutDocEntry::NamespaceStructs:
case LayoutDocEntry::NamespaceExceptions:
case LayoutDocEntry::NamespaceInlineClasses:
+ case LayoutDocEntry::ConceptDefinition:
case LayoutDocEntry::FileClasses:
+ case LayoutDocEntry::FileConcepts:
case LayoutDocEntry::FileInterfaces:
case LayoutDocEntry::FileStructs:
case LayoutDocEntry::FileExceptions:
@@ -578,6 +580,7 @@ void DirDefImpl::writeDocumentation(OutputList &ol)
case LayoutDocEntry::FileSourceLink:
case LayoutDocEntry::FileInlineClasses:
case LayoutDocEntry::GroupClasses:
+ case LayoutDocEntry::GroupConcepts:
case LayoutDocEntry::GroupInlineClasses:
case LayoutDocEntry::GroupNamespaces:
case LayoutDocEntry::GroupDirs:
@@ -632,10 +635,10 @@ void DirDefImpl::addUsesDependency(const DirDef *dir,const FileDef *srcFd,
if (this==dir) return; // do not add self-dependencies
//static int count=0;
//printf(" %d add dependency %s->%s due to %s->%s\n",
- // count++,shortName().data(),
- // dir->shortName().data(),
- // srcFd->name().data(),
- // dstFd->name().data());
+ // count++,qPrint(shortName()),
+ // qPrint(dir->shortName()),
+ // qPrint(srcFd->name()),
+ // qPrint(dstFd->name()));
// levels match => add direct dependency
bool added=FALSE;
@@ -683,12 +686,12 @@ void DirDefImpl::computeDependencies()
{
for (const auto &fd : m_fileList)
{
- //printf(" File %s\n",fd->name().data());
- //printf("** dir=%s file=%s\n",shortName().data(),fd->name().data());
+ //printf(" File %s\n",qPrint(fd->name()));
+ //printf("** dir=%s file=%s\n",qPrint(shortName()),qPrint(fd->name()));
for (const auto &ii : fd->includeFileList())
{
- //printf(" > %s\n",ii->includeName.data());
- //printf(" #include %s\n",ii->includeName.data());
+ //printf(" > %s\n",qPrint(ii->includeName));
+ //printf(" #include %s\n",qPrint(ii->includeName));
if (ii.fileDef && ii.fileDef->isLinkable()) // linkable file
{
DirDef *usedDir = ii.fileDef->getDirDef();
@@ -696,7 +699,7 @@ void DirDefImpl::computeDependencies()
{
// add dependency: thisDir->usedDir
//static int count=0;
- //printf(" %d: add dependency %s->%s\n",count++,name().data(),usedDir->name().data());
+ //printf(" %d: add dependency %s->%s\n",count++,qPrint(name()),qPrint(usedDir->name()));
addUsesDependency(usedDir,fd,ii.fileDef,FALSE);
}
}
@@ -758,12 +761,12 @@ void UsedDir::sort()
});
}
-FilePair *UsedDir::findFilePair(const char *name)
+FilePair *UsedDir::findFilePair(const QCString &name)
{
return m_filePairs.find(name);
}
-DirDef *DirDefImpl::createNewDir(const char *path)
+DirDef *DirDefImpl::createNewDir(const QCString &path)
{
ASSERT(path!=0);
DirDef *dir = Doxygen::dirLinkedMap->find(path);
@@ -773,7 +776,7 @@ DirDef *DirDefImpl::createNewDir(const char *path)
std::unique_ptr<DirDef>(
createDirDef(path)));
//printf("Adding new dir %s\n",path);
- //printf("createNewDir %s short=%s\n",path,dir->shortName().data());
+ //printf("createNewDir %s short=%s\n",path,qPrint(dir->shortName()));
}
return dir;
}
@@ -796,7 +799,7 @@ bool DirDefImpl::matchPath(const QCString &path,const StringVector &l)
*/
DirDef *DirDefImpl::mergeDirectoryInTree(const QCString &path)
{
- //printf("DirDefImpl::mergeDirectoryInTree(%s)\n",path.data());
+ //printf("DirDefImpl::mergeDirectoryInTree(%s)\n",qPrint(path));
int p=0,i=0;
DirDef *dir=0;
while ((i=path.find('/',p))!=-1)
@@ -827,7 +830,7 @@ static void writePartialDirPath(OutputList &ol,const DirDef *root,const DirDef *
writePartialDirPath(ol,root,target->parent());
ol.writeString("&#160;/&#160;");
}
- ol.writeObjectLink(target->getReference(),target->getOutputFileBase(),0,target->shortName());
+ ol.writeObjectLink(target->getReference(),target->getOutputFileBase(),QCString(),target->shortName());
}
static void writePartialFilePath(OutputList &ol,const DirDef *root,const FileDef *fd)
@@ -839,7 +842,7 @@ static void writePartialFilePath(OutputList &ol,const DirDef *root,const FileDef
}
if (fd->isLinkable())
{
- ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),0,fd->name());
+ ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),QCString(),fd->name());
}
else
{
@@ -856,11 +859,9 @@ void DirRelation::writeDocumentation(OutputList &ol)
ol.disableAllBut(OutputGenerator::Html);
QCString shortTitle=theTranslator->trDirRelation(
- m_src->shortName()+" &rarr; "+
- m_dst->dir()->shortName());
+ (m_src->shortName()+" &rarr; "+m_dst->dir()->shortName()));
QCString title=theTranslator->trDirRelation(
- m_src->displayName()+" -> "+
- m_dst->dir()->shortName());
+ (m_src->displayName()+" -> "+m_dst->dir()->shortName()));
startFile(ol,getOutputFileBase(),getOutputFileBase(),
title,HLI_None,!generateTreeView,m_src->getOutputFileBase());
@@ -935,7 +936,7 @@ static void computeCommonDirPrefix()
QCString dirName = dir->name();
if (dirName.length()>path.length())
{
- if (qstrncmp(dirName,path,l)!=0) // dirName does not start with path
+ if (dirName.left(l)!=path) // dirName does not start with path
{
i=path.findRev('/',(int)l-2);
if (i==-1) // no unique prefix -> stop
@@ -980,7 +981,7 @@ static void computeCommonDirPrefix()
{
QCString diskName = dir->name().right(dir->name().length()-path.length());
dir->setDiskName(diskName);
- //printf("set disk name: %s -> %s\n",dir->name().data(),diskName.data());
+ //printf("set disk name: %s -> %s\n",qPrint(dir->name()),qPrint(diskName));
}
}
@@ -991,7 +992,7 @@ void buildDirectories()
{
for (const auto &fd : *fn)
{
- //printf("buildDirectories %s\n",fd->name().data());
+ //printf("buildDirectories %s\n",qPrint(fd->name()));
if (fd->getReference().isEmpty())
{
DirDef *dir;
@@ -1021,7 +1022,7 @@ void buildDirectories()
{
parent->addSubDir(dir.get());
//printf("DirDefImpl::addSubdir(): Adding subdir\n%s to\n%s\n",
- // dir->displayName().data(), parent->displayName().data());
+ // qPrint(dir->displayName()), qPrint(parent->displayName()));
}
}
}
@@ -1051,7 +1052,7 @@ void computeDirDependencies()
// compute uses dependencies between directories
for (const auto &dir : *Doxygen::dirLinkedMap)
{
- //printf("computeDependencies for %s: #dirs=%d\n",dir->name().data(),Doxygen::directories.count());
+ //printf("computeDependencies for %s: #dirs=%d\n",qPrint(dir->name()),Doxygen::directories.count());
dir->computeDependencies();
}
diff --git a/src/dirdef.h b/src/dirdef.h
index 0e3db91..3d775d0 100644
--- a/src/dirdef.h
+++ b/src/dirdef.h
@@ -16,19 +16,18 @@
#ifndef DIRDEF_H
#define DIRDEF_H
-#include "linkedmap.h"
-#include "definition.h"
#include <vector>
#include <map>
-#include <qcstring.h>
+
+#include "qcstring.h"
+#include "linkedmap.h"
+#include "definition.h"
class FileList;
-class QStrList;
class FileDef;
class OutputList;
class UsedDir;
-class FTextStream;
class FilePair;
class FilePairDict;
class DirDef;
@@ -67,7 +66,7 @@ class UsedDir
UsedDir(const DirDef *dir,bool inherited);
virtual ~UsedDir();
void addFileDep(const FileDef *srcFd,const FileDef *dstFd);
- FilePair *findFilePair(const char *name);
+ FilePair *findFilePair(const QCString &name);
const FilePairLinkedMap &filePairs() const { return m_filePairs; }
const DirDef *dir() const { return m_dir; }
bool inherited() const { return m_inherited; }
@@ -113,7 +112,7 @@ class DirDef : public DefinitionMutable, public Definition
// generate output
virtual void writeDocumentation(OutputList &ol) = 0;
- virtual void writeTagFile(FTextStream &t) = 0;
+ virtual void writeTagFile(TextStream &t) = 0;
virtual void setDiskName(const QCString &name) = 0;
virtual void sort() = 0;
@@ -165,6 +164,5 @@ class DirRelationLinkedMap : public LinkedMap<DirRelation>
void buildDirectories();
void generateDirDocs(OutputList &ol);
void computeDirDependencies();
-void writeDirDependencyGraph(const char *file);
#endif
diff --git a/src/docbookgen.cpp b/src/docbookgen.cpp
index 4319dda..ab2fb84 100644
--- a/src/docbookgen.cpp
+++ b/src/docbookgen.cpp
@@ -17,8 +17,6 @@
#include <stdlib.h>
-#include <qdir.h>
-#include <qfile.h>
#include "docbookgen.h"
#include "doxygen.h"
#include "message.h"
@@ -51,6 +49,7 @@
#include "membergroup.h"
#include "dirdef.h"
#include "section.h"
+#include "dir.h"
// no debug info
#define Docbook_DB(x) do {} while(0)
@@ -72,13 +71,15 @@
#endif
//------------------
-inline void writeDocbookString(FTextStream &t,const char *s)
+inline void writeDocbookString(TextStream &t,const QCString &s)
{
t << convertToDocBook(s);
}
-inline void writeDocbookCodeString(FTextStream &t,const char *s, int &col)
+inline void writeDocbookCodeString(TextStream &t,const QCString &str, int &col)
{
+ if (str.isEmpty()) return;
+ const char *s = str.data();
char c;
while ((c=*s++))
{
@@ -117,7 +118,7 @@ inline void writeDocbookCodeString(FTextStream &t,const char *s, int &col)
}
}
-static void addIndexTerm(FTextStream &t, QCString prim, QCString sec = "")
+static void addIndexTerm(TextStream &t, QCString prim, QCString sec = "")
{
t << "<indexterm><primary>";
t << convertToDocBook(prim);
@@ -128,94 +129,98 @@ static void addIndexTerm(FTextStream &t, QCString prim, QCString sec = "")
t << convertToDocBook(sec);
t << "</secondary>";
}
- t << "</indexterm>" << endl;
+ t << "</indexterm>\n";
}
-void writeDocbookLink(FTextStream &t,const char * /*extRef*/,const char *compoundId,
- const char *anchorId,const char * text,const char * /*tooltip*/)
+void writeDocbookLink(TextStream &t,const QCString & /*extRef*/,const QCString &compoundId,
+ const QCString &anchorId,const QCString & text,const QCString & /*tooltip*/)
{
t << "<link linkend=\"_" << stripPath(compoundId);
- if (anchorId) t << "_1" << anchorId;
+ if (!anchorId.isEmpty()) t << "_1" << anchorId;
t << "\"";
t << ">";
writeDocbookString(t,text);
t << "</link>";
}
-DocbookCodeGenerator::DocbookCodeGenerator(FTextStream &t)
+DocbookCodeGenerator::DocbookCodeGenerator(TextStream &t) : m_t(t)
{
m_prettyCode=Config_getBool(DOCBOOK_PROGRAMLISTING);
- setTextStream(t);
-}
-
-DocbookCodeGenerator::DocbookCodeGenerator()
-{
}
DocbookCodeGenerator::~DocbookCodeGenerator() {}
-void DocbookCodeGenerator::codify(const char *text)
+void DocbookCodeGenerator::codify(const QCString &text)
{
Docbook_DB(("(codify \"%s\")\n",text));
writeDocbookCodeString(m_t,text,m_col);
}
-void DocbookCodeGenerator::writeCodeLink(const char *ref,const char *file,
- const char *anchor,const char *name,
- const char *tooltip)
+
+void DocbookCodeGenerator::writeCodeLink(const QCString &ref,const QCString &file,
+ const QCString &anchor,const QCString &name,
+ const QCString &tooltip)
{
Docbook_DB(("(writeCodeLink)\n"));
writeDocbookLink(m_t,ref,file,anchor,name,tooltip);
- m_col+=(int)strlen(name);
+ m_col+=name.length();
}
-void DocbookCodeGenerator::writeCodeLinkLine(const char *,const char *file,
- const char *,const char *name,
- const char *)
+
+void DocbookCodeGenerator::writeCodeLinkLine(const QCString &,const QCString &file,
+ const QCString &,const QCString &name,
+ const QCString &)
{
Docbook_DB(("(writeCodeLinkLine)\n"));
m_t << "<anchor xml:id=\"_" << stripExtensionGeneral(stripPath(file),".xml");
m_t << "_1l";
writeDocbookString(m_t,name);
m_t << "\"/>";
- m_col+=(int)strlen(name);
+ m_col+=name.length();
}
-void DocbookCodeGenerator::writeTooltip(const char *, const DocLinkInfo &, const char *,
- const char *, const SourceLinkInfo &, const SourceLinkInfo &
+
+void DocbookCodeGenerator::writeTooltip(const QCString &, const DocLinkInfo &, const QCString &,
+ const QCString &, const SourceLinkInfo &, const SourceLinkInfo &
)
{
Docbook_DB(("(writeToolTip)\n"));
}
+
void DocbookCodeGenerator::startCodeLine(bool)
{
Docbook_DB(("(startCodeLine)\n"));
m_insideCodeLine=TRUE;
m_col=0;
}
+
void DocbookCodeGenerator::endCodeLine()
{
- if (m_insideCodeLine) m_t << endl;
+ if (m_insideCodeLine) m_t << "\n";
Docbook_DB(("(endCodeLine)\n"));
m_lineNumber = -1;
m_refId.resize(0);
m_external.resize(0);
m_insideCodeLine=FALSE;
}
-void DocbookCodeGenerator::startFontClass(const char *colorClass)
+
+void DocbookCodeGenerator::startFontClass(const QCString &colorClass)
{
Docbook_DB(("(startFontClass)\n"));
m_t << "<emphasis role=\"" << colorClass << "\">";
m_insideSpecialHL=TRUE;
}
+
void DocbookCodeGenerator::endFontClass()
{
Docbook_DB(("(endFontClass)\n"));
m_t << "</emphasis>"; // non DocBook
m_insideSpecialHL=FALSE;
}
-void DocbookCodeGenerator::writeCodeAnchor(const char *)
+
+void DocbookCodeGenerator::writeCodeAnchor(const QCString &)
{
Docbook_DB(("(writeCodeAnchor)\n"));
}
-void DocbookCodeGenerator::writeLineNumber(const char *ref,const char *fileName,
- const char *anchor,int l)
+
+void DocbookCodeGenerator::writeLineNumber(const QCString &ref,const QCString &fileName,
+ const QCString &anchor,int l)
{
Docbook_DB(("(writeLineNumber)\n"));
m_insideCodeLine = TRUE;
@@ -224,10 +229,10 @@ void DocbookCodeGenerator::writeLineNumber(const char *ref,const char *fileName,
QCString lineNumber;
lineNumber.sprintf("%05d",l);
- if (fileName && !m_sourceFileName.isEmpty())
+ if (!fileName.isEmpty() && !m_sourceFileName.isEmpty())
{
- writeCodeLinkLine(ref,m_sourceFileName,anchor,lineNumber,0);
- writeCodeLink(ref,fileName,anchor,lineNumber,0);
+ writeCodeLinkLine(ref,m_sourceFileName,anchor,lineNumber,QCString());
+ writeCodeLink(ref,fileName,anchor,lineNumber,QCString());
}
else
{
@@ -241,23 +246,27 @@ void DocbookCodeGenerator::writeLineNumber(const char *ref,const char *fileName,
}
m_col=0;
}
-void DocbookCodeGenerator::setCurrentDoc(const Definition *,const char *,bool)
+
+void DocbookCodeGenerator::setCurrentDoc(const Definition *,const QCString &,bool)
{
}
-void DocbookCodeGenerator::addWord(const char *,bool)
+
+void DocbookCodeGenerator::addWord(const QCString &,bool)
{
}
+
void DocbookCodeGenerator::finish()
{
endCodeLine();
}
-void DocbookCodeGenerator::startCodeFragment(const char *)
+
+void DocbookCodeGenerator::startCodeFragment(const QCString &)
{
DB_GEN_C1(m_t)
m_t << "<programlisting>";
}
-void DocbookCodeGenerator::endCodeFragment(const char *)
+void DocbookCodeGenerator::endCodeFragment(const QCString &)
{
DB_GEN_C1(m_t)
//endCodeLine checks is there is still an open code line, if so closes it.
@@ -268,12 +277,12 @@ DB_GEN_C1(m_t)
//-------------------------------------------------------------------------------
-DocbookGenerator::DocbookGenerator() : OutputGenerator(Config_getString(DOCBOOK_OUTPUT))
+DocbookGenerator::DocbookGenerator() : OutputGenerator(Config_getString(DOCBOOK_OUTPUT)), m_codeGen(m_t)
{
DB_GEN_C
}
-DocbookGenerator::DocbookGenerator(const DocbookGenerator &og) : OutputGenerator(og)
+DocbookGenerator::DocbookGenerator(const DocbookGenerator &og) : OutputGenerator(og), m_codeGen(og.m_codeGen)
{
}
@@ -296,16 +305,16 @@ DB_GEN_C
void DocbookGenerator::init()
{
QCString dir=Config_getString(DOCBOOK_OUTPUT);
- QDir d(dir);
- if (!d.exists() && !d.mkdir(dir))
+ Dir d(dir.str());
+ if (!d.exists() && !d.mkdir(dir.str()))
{
- term("Could not create output directory %s\n",dir.data());
+ term("Could not create output directory %s\n",qPrint(dir));
}
createSubDirs(d);
}
-void DocbookGenerator::startFile(const char *name,const char *,const char *,int)
+void DocbookGenerator::startFile(const QCString &name,const QCString &,const QCString &,int)
{
DB_GEN_C
QCString fileName=name;
@@ -325,28 +334,27 @@ DB_GEN_C
relPath = relativePathToRoot(fileName);
if (fileName.right(4)!=".xml") fileName+=".xml";
startPlainFile(fileName);
- m_codeGen.setTextStream(t);
m_codeGen.setRelativePath(relPath);
m_codeGen.setSourceFileName(stripPath(fileName));
- t << "<?xml version='1.0' encoding='UTF-8' standalone='no'?>" << endl;;
- t << "<" << fileType << " xmlns=\"http://docbook.org/ns/docbook\" version=\"5.0\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"";
- if (!pageName.isEmpty()) t << " xml:id=\"_" << stripPath(pageName) << "\"";
- t << " xml:lang=\"" << theTranslator->trISOLang() << "\"";
- t << ">" << endl;
+ m_t << "<?xml version='1.0' encoding='UTF-8' standalone='no'?>\n";;
+ m_t << "<" << fileType << " xmlns=\"http://docbook.org/ns/docbook\" version=\"5.0\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"";
+ if (!pageName.isEmpty()) m_t << " xml:id=\"_" << stripPath(pageName) << "\"";
+ m_t << " xml:lang=\"" << theTranslator->trISOLang() << "\"";
+ m_t << ">\n";
}
void DocbookGenerator::endFile()
{
DB_GEN_C
- if (m_inDetail) t << "</section>" << endl;
+ if (m_inDetail) m_t << "</section>\n";
m_inDetail = FALSE;
while (m_inLevel != -1)
{
- t << "</section>" << endl;
+ m_t << "</section>\n";
m_inLevel--;
}
- if (m_inGroup) t << "</section>" << endl;
+ if (m_inGroup) m_t << "</section>\n";
m_inGroup = FALSE;
QCString fileType="section";
@@ -359,7 +367,7 @@ DB_GEN_C
{
fileType="chapter";
}
- t << "</" << fileType << ">" << endl;
+ m_t << "</" << fileType << ">\n";
endPlainFile();
m_codeGen.setSourceFileName("");
}
@@ -372,16 +380,16 @@ DB_GEN_C2("IndexSections " << is)
case isTitlePageStart:
{
QCString dbk_projectName = Config_getString(PROJECT_NAME);
- t << " <info>" << endl;
- t << " <title>" << convertToDocBook(dbk_projectName) << "</title>" << endl;
- t << " </info>" << endl;
+ m_t << " <info>\n";
+ m_t << " <title>" << convertToDocBook(dbk_projectName) << "</title>\n";
+ m_t << " </info>\n";
}
break;
case isTitlePageAuthor:
break;
case isMainPage:
- t << "<chapter>" << endl;
- t << " <title>";
+ m_t << "<chapter>\n";
+ m_t << " <title>";
break;
case isModuleIndex:
//Module Index}\n"
@@ -392,11 +400,14 @@ DB_GEN_C2("IndexSections " << is)
case isNamespaceIndex:
//Namespace Index}\n"
break;
+ case isConceptIndex:
+ //Concept Index}\n"
+ break;
case isClassHierarchyIndex:
//Hierarchical Index}\n"
break;
case isCompoundIndex:
- //t << "{"; //Class Index}\n"
+ //m_t << "{"; //Class Index}\n"
break;
case isFileIndex:
//Annotated File Index}\n"
@@ -405,28 +416,32 @@ DB_GEN_C2("IndexSections " << is)
//Annotated Page Index}\n"
break;
case isModuleDocumentation:
- t << "<chapter>\n";
- t << " <title>";
+ m_t << "<chapter>\n";
+ m_t << " <title>";
break;
case isDirDocumentation:
- t << "<chapter>\n";
- t << " <title>";
+ m_t << "<chapter>\n";
+ m_t << " <title>";
break;
case isNamespaceDocumentation:
- t << "<chapter>\n";
- t << " <title>";
+ m_t << "<chapter>\n";
+ m_t << " <title>";
+ break;
+ case isConceptDocumentation:
+ m_t << "<chapter>\n";
+ m_t << " <title>";
break;
case isClassDocumentation:
- t << "<chapter>\n";
- t << " <title>";
+ m_t << "<chapter>\n";
+ m_t << " <title>";
break;
case isFileDocumentation:
- t << "<chapter>\n";
- t << " <title>";
+ m_t << "<chapter>\n";
+ m_t << " <title>";
break;
case isExampleDocumentation:
- t << "<chapter>\n";
- t << " <title>";
+ m_t << "<chapter>\n";
+ m_t << " <title>";
break;
case isPageDocumentation:
break;
@@ -448,78 +463,95 @@ DB_GEN_C2("IndexSections " << is)
case isTitlePageAuthor:
break;
case isMainPage:
- t << "</title>" << endl;
- t << " <xi:include href=\"mainpage.xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>" << endl;
- t << "</chapter>" << endl;
+ m_t << "</title>\n";
+ m_t << " <xi:include href=\"mainpage.xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>\n";
+ m_t << "</chapter>\n";
break;
case isModuleIndex:
- //t << "</chapter>" << endl;
+ //m_t << "</chapter>\n";
break;
case isDirIndex:
- //t << "<xi:include href=\"dirs.xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>";
- //t << "</chapter>" << endl;
+ //m_t << "<xi:include href=\"dirs.xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>";
+ //m_t << "</chapter>\n";
break;
case isNamespaceIndex:
- //t << "<xi:include href=\"namespaces.xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>";
- //t << "</chapter>" << endl;
+ //m_t << "<xi:include href=\"namespaces.xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>";
+ //m_t << "</chapter>\n";
+ break;
+ case isConceptIndex:
+ //m_t << "<xi:include href=\"concepts.xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>";
+ //m_t << "</chapter>\n";
break;
case isClassHierarchyIndex:
- //t << "<xi:include href=\"hierarchy.xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>";
- //t << "</chapter>" << endl;
+ //m_t << "<xi:include href=\"hierarchy.xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>";
+ //m_t << "</chapter>\n";
break;
case isCompoundIndex:
- //t << "</chapter>" << endl;
+ //m_t << "</chapter>\n";
break;
case isFileIndex:
- //t << "<xi:include href=\"files.xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>";
- //t << "</chapter>" << endl;
+ //m_t << "<xi:include href=\"files.xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>";
+ //m_t << "</chapter>\n";
break;
case isPageIndex:
- //t << "<xi:include href=\"pages.xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>";
- //t << "</chapter>" << endl;
+ //m_t << "<xi:include href=\"pages.xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>";
+ //m_t << "</chapter>\n";
break;
case isModuleDocumentation:
{
- t << "</title>" << endl;
+ m_t << "</title>\n";
for (const auto &gd : *Doxygen::groupLinkedMap)
{
if (!gd->isReference())
{
- t << " <xi:include href=\"" << gd->getOutputFileBase() << ".xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>" << endl;
+ m_t << " <xi:include href=\"" << gd->getOutputFileBase() << ".xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>\n";
}
}
}
- t << "</chapter>\n";
+ m_t << "</chapter>\n";
break;
case isDirDocumentation:
{
- t << "</title>" << endl;
+ m_t << "</title>\n";
for (const auto &dd : *Doxygen::dirLinkedMap)
{
if (dd->isLinkableInProject())
{
- t << "< xi:include href=\"" << dd->getOutputFileBase() << ".xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>" << endl;
+ m_t << "< xi:include href=\"" << dd->getOutputFileBase() << ".xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>\n";
}
}
}
- t << "</chapter>\n";
+ m_t << "</chapter>\n";
break;
case isNamespaceDocumentation:
{
- t << "</title>" << endl;
+ m_t << "</title>\n";
for (const auto &nd : *Doxygen::namespaceLinkedMap)
{
if (nd->isLinkableInProject() && !nd->isAlias())
{
- t << "<xi:include href=\"" << nd->getOutputFileBase() << ".xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>" << endl;
+ m_t << "<xi:include href=\"" << nd->getOutputFileBase() << ".xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>\n";
}
}
}
- t << "</chapter>\n";
+ m_t << "</chapter>\n";
+ break;
+ case isConceptDocumentation:
+ {
+ m_t << "</title>\n";
+ for (const auto &cd : *Doxygen::conceptLinkedMap)
+ {
+ if (cd->isLinkableInProject() && !cd->isAlias())
+ {
+ m_t << "<xi:include href=\"" << cd->getOutputFileBase() << ".xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>\n";
+ }
+ }
+ }
+ m_t << "</chapter>\n";
break;
case isClassDocumentation:
{
- t << "</title>" << endl;
+ m_t << "</title>\n";
for (const auto &cd : *Doxygen::classLinkedMap)
{
if (cd->isLinkableInProject() &&
@@ -528,15 +560,15 @@ DB_GEN_C2("IndexSections " << is)
!cd->isAlias()
)
{
- t << " <xi:include href=\"" << cd->getOutputFileBase() << ".xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>" << endl;
+ m_t << " <xi:include href=\"" << cd->getOutputFileBase() << ".xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>\n";
}
}
}
- t << "</chapter>\n";
+ m_t << "</chapter>\n";
break;
case isFileDocumentation:
{
- t << "</title>" << endl;
+ m_t << "</title>\n";
bool isFirst=TRUE;
for (const auto &fn : *Doxygen::inputNameLinkedMap)
{
@@ -546,64 +578,64 @@ DB_GEN_C2("IndexSections " << is)
{
if (isFirst)
{
- t << " <xi:include href=\"" << fd->getOutputFileBase() << ".xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>" << endl;
+ m_t << " <xi:include href=\"" << fd->getOutputFileBase() << ".xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>\n";
if (sourceBrowser && m_prettyCode && fd->generateSourceFile())
{
- t << " <xi:include href=\"" << fd->getSourceFileBase() << ".xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>" << endl;
+ m_t << " <xi:include href=\"" << fd->getSourceFileBase() << ".xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>\n";
}
isFirst=FALSE;
}
else
{
- t << " <xi:include href=\"" << fd->getOutputFileBase() << ".xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>" << endl;
+ m_t << " <xi:include href=\"" << fd->getOutputFileBase() << ".xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>\n";
if (sourceBrowser && m_prettyCode && fd->generateSourceFile())
{
- t << " <xi:include href=\"" << fd->getSourceFileBase() << ".xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>" << endl;
+ m_t << " <xi:include href=\"" << fd->getSourceFileBase() << ".xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>\n";
}
}
}
}
}
}
- t << "</chapter>\n";
+ m_t << "</chapter>\n";
break;
case isExampleDocumentation:
{
- t << "</title>" << endl;
+ m_t << "</title>\n";
for (const auto &pd : *Doxygen::exampleLinkedMap)
{
- t << " <xi:include href=\"" << pd->getOutputFileBase() << ".xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>" << endl;
+ m_t << " <xi:include href=\"" << pd->getOutputFileBase() << ".xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>\n";
}
}
- t << "</chapter>\n";
+ m_t << "</chapter>\n";
break;
case isPageDocumentation:
break;
case isPageDocumentation2:
break;
case isEndIndex:
- t << "<index/>" << endl;
+ m_t << "<index/>\n";
break;
}
}
-void DocbookGenerator::writePageLink(const char *name, bool /*first*/)
+void DocbookGenerator::writePageLink(const QCString &name, bool /*first*/)
{
DB_GEN_C
for (const auto &pd : *Doxygen::pageLinkedMap)
{
if (!pd->getGroupDef() && !pd->isReference() && pd->name() == stripPath(name))
{
- t << "<chapter>\n";
+ m_t << "<chapter>\n";
if (pd->hasTitle())
{
- t << " <title>" << convertToDocBook(pd->title()) << "</title>" << endl;
+ m_t << " <title>" << convertToDocBook(pd->title()) << "</title>\n";
}
else
{
- t << " <title>" << convertToDocBook(pd->name()) << "</title>" << endl;
+ m_t << " <title>" << convertToDocBook(pd->name()) << "</title>\n";
}
- t << " <xi:include href=\"" << pd->getOutputFileBase() << ".xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>" << endl;
- t << "</chapter>\n";
+ m_t << " <xi:include href=\"" << pd->getOutputFileBase() << ".xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>\n";
+ m_t << "</chapter>\n";
}
}
}
@@ -612,126 +644,130 @@ void DocbookGenerator::writeDoc(DocNode *n,const Definition *ctx,const MemberDef
{
DB_GEN_C
DocbookDocVisitor *visitor =
- new DocbookDocVisitor(t,*this,ctx?ctx->getDefFileExtension():QCString(""));
+ new DocbookDocVisitor(m_t,*this,ctx?ctx->getDefFileExtension():QCString());
n->accept(visitor);
delete visitor;
}
-void DocbookGenerator::startParagraph(const char *)
+void DocbookGenerator::startParagraph(const QCString &)
{
DB_GEN_C
- t << "<para>" << endl;
+ m_t << "<para>\n";
}
void DocbookGenerator::endParagraph()
{
DB_GEN_C
- t << "</para>" << endl;
+ m_t << "</para>\n";
}
-void DocbookGenerator::writeString(const char *text)
+void DocbookGenerator::writeString(const QCString &text)
{
DB_GEN_C
- t << text;
+ m_t << text;
}
-void DocbookGenerator::startMemberHeader(const char *,int)
+void DocbookGenerator::startMemberHeader(const QCString &,int)
{
DB_GEN_C
- t << "<simplesect>" << endl;
+ m_t << "<simplesect>\n";
m_inSimpleSect[m_levelListItem] = TRUE;
- t << " <title>";
+ m_t << " <title>";
}
void DocbookGenerator::endMemberHeader()
{
DB_GEN_C
- t << " </title>" << endl;
+ m_t << " </title>\n";
}
-void DocbookGenerator::docify(const char *str)
+void DocbookGenerator::docify(const QCString &str)
{
DB_GEN_C
- t << convertToDocBook(str);
+ m_t << convertToDocBook(str);
}
-void DocbookGenerator::writeObjectLink(const char *, const char *f,
- const char *anchor, const char *text)
+void DocbookGenerator::writeObjectLink(const QCString &, const QCString &f,
+ const QCString &anchor, const QCString &text)
{
DB_GEN_C
- if (anchor)
- if (f) t << "<link linkend=\"_" << stripPath(f) << "_1" << anchor << "\">";
- else t << "<link linkend=\"_" << anchor << "\">";
+ if (!anchor.isEmpty())
+ {
+ if (!f.isEmpty()) m_t << "<link linkend=\"_" << stripPath(f) << "_1" << anchor << "\">";
+ else m_t << "<link linkend=\"_" << anchor << "\">";
+ }
else
- t << "<link linkend=\"_" << stripPath(f) << "\">";
+ {
+ m_t << "<link linkend=\"_" << stripPath(f) << "\">";
+ }
docify(text);
- t << "</link>";
+ m_t << "</link>";
}
void DocbookGenerator::startMemberList()
{
DB_GEN_C
- t << " <itemizedlist>" << endl;
+ m_t << " <itemizedlist>\n";
m_levelListItem++;
}
void DocbookGenerator::endMemberList()
{
DB_GEN_C
- if (m_inListItem[m_levelListItem]) t << "</listitem>" << endl;
+ if (m_inListItem[m_levelListItem]) m_t << "</listitem>\n";
m_inListItem[m_levelListItem] = FALSE;
- t << " </itemizedlist>" << endl;
+ m_t << " </itemizedlist>\n";
m_levelListItem = (m_levelListItem> 0 ? m_levelListItem - 1 : 0);
- if (m_inSimpleSect[m_levelListItem]) t << "</simplesect>" << endl;
+ if (m_inSimpleSect[m_levelListItem]) m_t << "</simplesect>\n";
m_inSimpleSect[m_levelListItem] = FALSE;
}
-void DocbookGenerator::startMemberItem(const char *,int,const char *)
+void DocbookGenerator::startMemberItem(const QCString &,int,const QCString &)
{
DB_GEN_C
- if (m_inListItem[m_levelListItem]) t << "</listitem>" << endl;
- t << " <listitem><para>";
+ if (m_inListItem[m_levelListItem]) m_t << "</listitem>\n";
+ m_t << " <listitem><para>";
m_inListItem[m_levelListItem] = TRUE;
}
void DocbookGenerator::endMemberItem()
{
DB_GEN_C
- t << "</para>" << endl;
+ m_t << "</para>\n";
}
void DocbookGenerator::startBold()
{
DB_GEN_C
- t << "<emphasis role=\"strong\">";
+ m_t << "<emphasis role=\"strong\">";
}
void DocbookGenerator::endBold()
{
DB_GEN_C
- t << "</emphasis>";
+ m_t << "</emphasis>";
}
void DocbookGenerator::startGroupHeader(int extraIndentLevel)
{
DB_GEN_C2("m_inLevel " << m_inLevel)
DB_GEN_C2("extraIndentLevel " << extraIndentLevel)
m_firstMember = TRUE;
- if (m_inSimpleSect[m_levelListItem]) t << "</simplesect>" << endl;
+ if (m_inSimpleSect[m_levelListItem]) m_t << "</simplesect>\n";
m_inSimpleSect[m_levelListItem] = FALSE;
if (m_inLevel != -1) m_inGroup = TRUE;
- if (m_inLevel == extraIndentLevel) t << "</section>" << endl;
+ if (m_inLevel == extraIndentLevel) m_t << "</section>\n";
m_inLevel = extraIndentLevel;
- t << "<section>" << endl;
- t << "<title>";
+ m_t << "<section>\n";
+ m_t << "<title>";
}
void DocbookGenerator::writeRuler()
{
DB_GEN_C2("m_inLevel " << m_inLevel)
DB_GEN_C2("m_inGroup " << m_inGroup)
- if (m_inGroup) t << "</section>" << endl;
+ if (m_inGroup) m_t << "</section>\n";
m_inGroup = FALSE;
}
void DocbookGenerator::endGroupHeader(int)
{
DB_GEN_C
- t << "</title>" << endl;
+ m_t << "</title>\n";
}
void DocbookGenerator::startParameterList(bool openBracket)
{
DB_GEN_C
- if (openBracket) t << "(";
+ if (openBracket) m_t << "(";
}
void DocbookGenerator::endParameterList()
{
@@ -740,22 +776,22 @@ DB_GEN_C
void DocbookGenerator::writeNonBreakableSpace(int n)
{
DB_GEN_C
- for (int i=0;i<n;i++) t << " ";
+ for (int i=0;i<n;i++) m_t << " ";
}
-void DocbookGenerator::lineBreak(const char *)
+void DocbookGenerator::lineBreak(const QCString &)
{
DB_GEN_C
- t << endl;
+ m_t << "\n";
}
void DocbookGenerator::startTypewriter()
{
DB_GEN_C
- if (!m_denseText) t << "<computeroutput>";
+ if (!m_denseText) m_t << "<computeroutput>";
}
void DocbookGenerator::endTypewriter()
{
DB_GEN_C
- if (!m_denseText) t << "</computeroutput>" << endl;
+ if (!m_denseText) m_t << "</computeroutput>\n";
}
void DocbookGenerator::startTextBlock(bool dense)
{
@@ -763,7 +799,7 @@ DB_GEN_C
if (dense)
{
m_denseText = TRUE;
- t << "<programlisting>";
+ m_t << "<programlisting>";
}
}
void DocbookGenerator::endTextBlock(bool)
@@ -772,65 +808,65 @@ DB_GEN_C
if (m_denseText)
{
m_denseText = FALSE;
- t << "</programlisting>";
+ m_t << "</programlisting>";
}
}
-void DocbookGenerator::startMemberDoc(const char *clname, const char *memname, const char *, const char *title,
+void DocbookGenerator::startMemberDoc(const QCString &clname, const QCString &memname, const QCString &, const QCString &title,
int memCount, int memTotal, bool)
{
DB_GEN_C2("m_inLevel " << m_inLevel)
- t << " <section>" << endl;
- t << " <title>" << convertToDocBook(title);
+ m_t << " <section>\n";
+ m_t << " <title>" << convertToDocBook(title);
if (memTotal>1)
{
- t << "<computeroutput>[" << memCount << "/" << memTotal << "]</computeroutput>";
+ m_t << "<computeroutput>[" << memCount << "/" << memTotal << "]</computeroutput>";
}
- t << "</title>" << endl;
- if (memname && memname[0]!='@')
+ m_t << "</title>\n";
+ if (!memname.isEmpty() && memname[0]!='@')
{
- addIndexTerm(t,memname,clname);
- addIndexTerm(t,clname,memname);
+ addIndexTerm(m_t,memname,clname);
+ addIndexTerm(m_t,clname,memname);
}
}
void DocbookGenerator::endMemberDoc(bool)
{
DB_GEN_C
- t << "</computeroutput></para>";
+ m_t << "</computeroutput></para>";
}
-void DocbookGenerator::startTitleHead(const char *)
+void DocbookGenerator::startTitleHead(const QCString &)
{
DB_GEN_C
- t << "<title>";
+ m_t << "<title>";
}
-void DocbookGenerator::endTitleHead(const char *,const char *name)
+void DocbookGenerator::endTitleHead(const QCString &,const QCString &name)
{
DB_GEN_C
- t << "</title>" << endl;
- if (name) addIndexTerm(t, name);
+ m_t << "</title>\n";
+ if (!name.isEmpty()) addIndexTerm(m_t, name);
}
-void DocbookGenerator::startDoxyAnchor(const char *fName,const char *,
- const char *anchor,const char *,
- const char *)
+void DocbookGenerator::startDoxyAnchor(const QCString &fName,const QCString &,
+ const QCString &anchor,const QCString &,
+ const QCString &)
{
DB_GEN_C
if (!m_inListItem[m_levelListItem] && !m_descTable)
{
- if (!m_firstMember) t << " </section>";
+ if (!m_firstMember) m_t << " </section>";
m_firstMember = FALSE;
}
- if (anchor)
+ if (!anchor.isEmpty())
{
- t << "<anchor xml:id=\"_" << stripPath(fName) << "_1" << anchor << "\"/>";
+ m_t << "<anchor xml:id=\"_" << stripPath(fName) << "_1" << anchor << "\"/>";
}
}
-void DocbookGenerator::endDoxyAnchor(const char *,const char *)
+void DocbookGenerator::endDoxyAnchor(const QCString &,const QCString &)
{
DB_GEN_C
}
void DocbookGenerator::startMemberDocName(bool)
{
DB_GEN_C
- t << "<para><computeroutput>";
+ m_t << "<para><computeroutput>";
}
void DocbookGenerator::endMemberDocName()
{
@@ -839,12 +875,12 @@ DB_GEN_C
void DocbookGenerator::startMemberGroupHeader(bool)
{
DB_GEN_C
- t << "<simplesect><title>";
+ m_t << "<simplesect><title>";
}
void DocbookGenerator::endMemberGroupHeader()
{
DB_GEN_C
- t << "</title>" << endl;
+ m_t << "</title>\n";
}
void DocbookGenerator::startMemberGroup()
{
@@ -853,38 +889,38 @@ DB_GEN_C
void DocbookGenerator::endMemberGroup(bool)
{
DB_GEN_C
- t << "</simplesect>" << endl;
+ m_t << "</simplesect>\n";
}
void DocbookGenerator::startClassDiagram()
{
DB_GEN_C
- t << "<para>";
+ m_t << "<para>";
}
-void DocbookGenerator::endClassDiagram(const ClassDiagram &d, const char *fileName,const char *)
+void DocbookGenerator::endClassDiagram(const ClassDiagram &d, const QCString &fileName,const QCString &)
{
DB_GEN_C
- t << " <informalfigure>" << endl;
- t << " <mediaobject>" << endl;
- t << " <imageobject>" << endl;
- t << " <imagedata width=\"50%\" align=\"center\" valign=\"middle\" scalefit=\"0\" fileref=\""
- << relPath << fileName << ".png\">" << "</imagedata>" << endl;
- t << " </imageobject>" << endl;
- d.writeImage(t,dir(),relPath,fileName,FALSE);
- t << " </mediaobject>" << endl;
- t << " </informalfigure>" << endl;
- t << "</para>" << endl;
+ m_t << " <informalfigure>\n";
+ m_t << " <mediaobject>\n";
+ m_t << " <imageobject>\n";
+ m_t << " <imagedata width=\"50%\" align=\"center\" valign=\"middle\" scalefit=\"0\" fileref=\""
+ << relPath << fileName << ".png\">" << "</imagedata>\n";
+ m_t << " </imageobject>\n";
+ d.writeImage(m_t,dir(),relPath,fileName,FALSE);
+ m_t << " </mediaobject>\n";
+ m_t << " </informalfigure>\n";
+ m_t << "</para>\n";
}
void DocbookGenerator::startLabels()
{
DB_GEN_C
}
-void DocbookGenerator::writeLabel(const char *l,bool isLast)
+void DocbookGenerator::writeLabel(const QCString &l,bool isLast)
{
DB_GEN_C
- t << "<computeroutput>[" << l << "]</computeroutput>";
- if (!isLast) t << ", ";
+ m_t << "<computeroutput>[" << l << "]</computeroutput>";
+ if (!isLast) m_t << ", ";
}
void DocbookGenerator::endLabels()
@@ -894,25 +930,25 @@ DB_GEN_C
void DocbookGenerator::startExamples()
{
DB_GEN_C
- t << "<simplesect><title>";
+ m_t << "<simplesect><title>";
docify(theTranslator->trExamples());
- t << "</title>";
+ m_t << "</title>";
}
void DocbookGenerator::endExamples()
{
DB_GEN_C
- t << "</simplesect>" << endl;
+ m_t << "</simplesect>\n";
}
void DocbookGenerator::startSubsubsection()
{
DB_GEN_C
- t << "<simplesect><title>";
+ m_t << "<simplesect><title>";
}
void DocbookGenerator::endSubsubsection()
{
DB_GEN_C
- t << "</title></simplesect>" << endl;
+ m_t << "</title></simplesect>\n";
}
void DocbookGenerator::writeChar(char c)
{
@@ -925,33 +961,37 @@ DB_GEN_C
void DocbookGenerator::startMemberDocPrefixItem()
{
DB_GEN_C
- t << "<computeroutput>";
+ m_t << "<computeroutput>";
}
void DocbookGenerator::endMemberDocPrefixItem()
{
DB_GEN_C
- t << "</computeroutput>";
+ m_t << "</computeroutput>";
}
-void DocbookGenerator::exceptionEntry(const char* prefix,bool closeBracket)
+void DocbookGenerator::exceptionEntry(const QCString &prefix,bool closeBracket)
{
DB_GEN_C
- if (prefix)
- t << " " << prefix << "(";
+ if (!prefix.isEmpty())
+ {
+ m_t << " " << prefix << "(";
+ }
else if (closeBracket)
- t << ")";
- t << " ";
+ {
+ m_t << ")";
+ }
+ m_t << " ";
}
void DocbookGenerator::startParameterName(bool)
{
DB_GEN_C
- t << " ";
+ m_t << " ";
}
void DocbookGenerator::endParameterName(bool last,bool /*emptyList*/,bool closeBracket)
{
DB_GEN_C
if (last)
{
- if (closeBracket) t << ")";
+ if (closeBracket) m_t << ")";
}
}
void DocbookGenerator::startMemberTemplateParams()
@@ -959,65 +999,65 @@ void DocbookGenerator::startMemberTemplateParams()
DB_GEN_C
}
-void DocbookGenerator::endMemberTemplateParams(const char *,const char *)
+void DocbookGenerator::endMemberTemplateParams(const QCString &,const QCString &)
{
DB_GEN_C
- t << "</para>";
- t << "<para>";
+ m_t << "</para>";
+ m_t << "<para>";
}
-void DocbookGenerator::startSection(const char *lab,const char *,SectionType)
+void DocbookGenerator::startSection(const QCString &lab,const QCString &,SectionType)
{
DB_GEN_C
- t << " <section xml:id=\"_" << stripPath(lab) << "\">";
- t << "<title>";
+ m_t << " <section xml:id=\"_" << stripPath(lab) << "\">";
+ m_t << "<title>";
}
-void DocbookGenerator::endSection(const char *,SectionType)
+void DocbookGenerator::endSection(const QCString &,SectionType)
{
DB_GEN_C
- t << "</title>";
- t << " </section>";
+ m_t << "</title>";
+ m_t << " </section>";
}
-void DocbookGenerator::addIndexItem(const char *prim,const char *sec)
+void DocbookGenerator::addIndexItem(const QCString &prim,const QCString &sec)
{
DB_GEN_C
- addIndexTerm(t, prim, sec);
+ addIndexTerm(m_t, prim, sec);
}
-void DocbookGenerator::startDescTable(const char *title)
+void DocbookGenerator::startDescTable(const QCString &title)
{
DB_GEN_C
int ncols = 2;
- t << "<informaltable frame=\"all\">" << endl;
- if (title)t << "<title>" << convertToDocBook(title) << "</title>" << endl;
- t << " <tgroup cols=\"" << ncols << "\" align=\"left\" colsep=\"1\" rowsep=\"1\">" << endl;
+ m_t << "<informaltable frame=\"all\">\n";
+ if (!title.isEmpty()) m_t << "<title>" << convertToDocBook(title) << "</title>\n";
+ m_t << " <tgroup cols=\"" << ncols << "\" align=\"left\" colsep=\"1\" rowsep=\"1\">\n";
for (int i = 0; i < ncols; i++)
{
- t << " <colspec colname='c" << i+1 << "'/>\n";
+ m_t << " <colspec colname='c" << i+1 << "'/>\n";
}
- t << "<tbody>\n";
+ m_t << "<tbody>\n";
m_descTable = TRUE;
}
void DocbookGenerator::endDescTable()
{
DB_GEN_C
- t << " </tbody>" << endl;
- t << " </tgroup>" << endl;
- t << "</informaltable>" << endl;
+ m_t << " </tbody>\n";
+ m_t << " </tgroup>\n";
+ m_t << "</informaltable>\n";
m_descTable = FALSE;
}
void DocbookGenerator::startDescTableRow()
{
DB_GEN_C
- t << "<row>";
- t << "<entry>";
+ m_t << "<row>";
+ m_t << "<entry>";
}
void DocbookGenerator::endDescTableRow()
{
DB_GEN_C
- t << "</row>";
+ m_t << "</row>";
}
void DocbookGenerator::startDescTableTitle()
@@ -1033,13 +1073,13 @@ DB_GEN_C
void DocbookGenerator::startDescTableData()
{
DB_GEN_C
- t << "</entry><entry>";
+ m_t << "</entry><entry>";
}
void DocbookGenerator::endDescTableData()
{
DB_GEN_C
- t << "</entry>";
+ m_t << "</entry>";
}
void DocbookGenerator::startGroupCollaboration()
{
@@ -1048,7 +1088,7 @@ DB_GEN_C
void DocbookGenerator::endGroupCollaboration(DotGroupCollaboration &g)
{
DB_GEN_C
- g.writeGraph(t,GOF_BITMAP,EOF_DocBook,dir(),fileName(),relPath,FALSE);
+ g.writeGraph(m_t,GOF_BITMAP,EOF_DocBook,dir(),fileName(),relPath,FALSE);
}
void DocbookGenerator::startDotGraph()
{
@@ -1057,7 +1097,7 @@ DB_GEN_C
void DocbookGenerator::endDotGraph(DotClassGraph &g)
{
DB_GEN_C
- g.writeGraph(t,GOF_BITMAP,EOF_DocBook,dir(),fileName(),relPath,TRUE,FALSE);
+ g.writeGraph(m_t,GOF_BITMAP,EOF_DocBook,dir(),fileName(),relPath,TRUE,FALSE);
}
void DocbookGenerator::startInclDepGraph()
{
@@ -1066,7 +1106,7 @@ DB_GEN_C
void DocbookGenerator::endInclDepGraph(DotInclDepGraph &g)
{
DB_GEN_C
- QCString fn = g.writeGraph(t,GOF_BITMAP,EOF_DocBook,dir(),fileName(),relPath,FALSE);
+ QCString fn = g.writeGraph(m_t,GOF_BITMAP,EOF_DocBook,dir(),fileName(),relPath,FALSE);
}
void DocbookGenerator::startCallGraph()
{
@@ -1075,7 +1115,7 @@ DB_GEN_C
void DocbookGenerator::endCallGraph(DotCallGraph &g)
{
DB_GEN_C
- QCString fn = g.writeGraph(t,GOF_BITMAP,EOF_DocBook,dir(),fileName(),relPath,FALSE);
+ QCString fn = g.writeGraph(m_t,GOF_BITMAP,EOF_DocBook,dir(),fileName(),relPath,FALSE);
}
void DocbookGenerator::startDirDepGraph()
{
@@ -1084,7 +1124,7 @@ DB_GEN_C
void DocbookGenerator::endDirDepGraph(DotDirDeps &g)
{
DB_GEN_C
- QCString fn = g.writeGraph(t,GOF_BITMAP,EOF_DocBook,dir(),fileName(),relPath,FALSE);
+ QCString fn = g.writeGraph(m_t,GOF_BITMAP,EOF_DocBook,dir(),fileName(),relPath,FALSE);
}
void DocbookGenerator::startMemberDocList()
{
@@ -1095,17 +1135,17 @@ void DocbookGenerator::endMemberDocList()
DB_GEN_C
m_inGroup = TRUE;
}
-void DocbookGenerator::startConstraintList(const char *header)
+void DocbookGenerator::startConstraintList(const QCString &header)
{
DB_GEN_C
- t << "<simplesect><title>";
+ m_t << "<simplesect><title>";
docify(header);
- t << "</title>" << endl;
+ m_t << "</title>\n";
}
void DocbookGenerator::startConstraintParam()
{
DB_GEN_C
- t << "<para><emphasis role=\"strong\">";
+ m_t << "<para><emphasis role=\"strong\">";
}
void DocbookGenerator::endConstraintParam()
{
@@ -1114,12 +1154,12 @@ DB_GEN_C
void DocbookGenerator::startConstraintType()
{
DB_GEN_C
- t << ":";
+ m_t << ":";
}
void DocbookGenerator::endConstraintType()
{
DB_GEN_C
- t << "</emphasis></para>" << endl;
+ m_t << "</emphasis></para>\n";
}
void DocbookGenerator::startConstraintDocs()
{
@@ -1132,5 +1172,5 @@ DB_GEN_C
void DocbookGenerator::endConstraintList()
{
DB_GEN_C
- t << "</simplesect>" << endl;
+ m_t << "</simplesect>\n";
}
diff --git a/src/docbookgen.h b/src/docbookgen.h
index 214ec97..aba1527 100644
--- a/src/docbookgen.h
+++ b/src/docbookgen.h
@@ -15,50 +15,45 @@
#ifndef DOCBOOKGEN_H
#define DOCBOOKGEN_H
+#include <iostream>
+
#include "config.h"
#include "outputgen.h"
class DocbookCodeGenerator : public CodeOutputInterface
{
public:
- DocbookCodeGenerator(FTextStream &t);
- DocbookCodeGenerator();
+ DocbookCodeGenerator(TextStream &t);
virtual ~DocbookCodeGenerator();
- void setTextStream(FTextStream &t)
- {
- m_streamSet = t.device()!=0;
- m_t.setDevice(t.device());
- }
void setRelativePath(const QCString &path) { m_relPath = path; }
void setSourceFileName(const QCString &sourceFileName) { m_sourceFileName = sourceFileName; }
QCString sourceFileName() { return m_sourceFileName; }
- void codify(const char *text);
- void writeCodeLink(const char *ref,const char *file,
- const char *anchor,const char *name,
- const char *tooltip);
- void writeCodeLinkLine(const char *ref,const char *file,
- const char *anchor,const char *name,
- const char *tooltip);
- void writeTooltip(const char *, const DocLinkInfo &, const char *,
- const char *, const SourceLinkInfo &, const SourceLinkInfo &
+ void codify(const QCString &text);
+ void writeCodeLink(const QCString &ref,const QCString &file,
+ const QCString &anchor,const QCString &name,
+ const QCString &tooltip);
+ void writeCodeLinkLine(const QCString &ref,const QCString &file,
+ const QCString &anchor,const QCString &name,
+ const QCString &tooltip);
+ void writeTooltip(const QCString &, const DocLinkInfo &, const QCString &,
+ const QCString &, const SourceLinkInfo &, const SourceLinkInfo &
);
void startCodeLine(bool);
void endCodeLine();
- void startFontClass(const char *colorClass);
+ void startFontClass(const QCString &colorClass);
void endFontClass();
- void writeCodeAnchor(const char *);
- void writeLineNumber(const char *extRef,const char *compId,
- const char *anchorId,int l);
- void setCurrentDoc(const Definition *,const char *,bool);
- void addWord(const char *,bool);
+ void writeCodeAnchor(const QCString &);
+ void writeLineNumber(const QCString &extRef,const QCString &compId,
+ const QCString &anchorId,int l);
+ void setCurrentDoc(const Definition *,const QCString &,bool);
+ void addWord(const QCString &,bool);
void finish();
- void startCodeFragment(const char *style);
- void endCodeFragment(const char *style);
+ void startCodeFragment(const QCString &style);
+ void endCodeFragment(const QCString &style);
private:
- FTextStream m_t;
- bool m_streamSet = false;
+ TextStream &m_t;
QCString m_refId;
QCString m_external;
int m_lineNumber = -1;
@@ -108,31 +103,31 @@ class DocbookGenerator : public OutputGenerator
OutputType type() const { return Docbook; }
// --- CodeOutputInterface
- void codify(const char *text)
+ void codify(const QCString &text)
{ m_codeGen.codify(text); }
- void writeCodeLink(const char *ref, const char *file,
- const char *anchor,const char *name,
- const char *tooltip)
+ void writeCodeLink(const QCString &ref, const QCString &file,
+ const QCString &anchor,const QCString &name,
+ const QCString &tooltip)
{ m_codeGen.writeCodeLink(ref,file,anchor,name,tooltip); }
- void writeLineNumber(const char *ref,const char *file,const char *anchor,int lineNumber)
+ void writeLineNumber(const QCString &ref,const QCString &file,const QCString &anchor,int lineNumber)
{ m_codeGen.writeLineNumber(ref,file,anchor,lineNumber); }
- void writeTooltip(const char *id, const DocLinkInfo &docInfo, const char *decl,
- const char *desc, const SourceLinkInfo &defInfo, const SourceLinkInfo &declInfo
+ void writeTooltip(const QCString &id, const DocLinkInfo &docInfo, const QCString &decl,
+ const QCString &desc, const SourceLinkInfo &defInfo, const SourceLinkInfo &declInfo
)
{ m_codeGen.writeTooltip(id,docInfo,decl,desc,defInfo,declInfo); }
void startCodeLine(bool hasLineNumbers)
{ m_codeGen.startCodeLine(hasLineNumbers); }
void endCodeLine()
{ m_codeGen.endCodeLine(); }
- void startFontClass(const char *s)
+ void startFontClass(const QCString &s)
{ m_codeGen.startFontClass(s); }
void endFontClass()
{ m_codeGen.endFontClass(); }
- void writeCodeAnchor(const char *anchor)
+ void writeCodeAnchor(const QCString &anchor)
{ m_codeGen.writeCodeAnchor(anchor); }
- void startCodeFragment(const char *style)
+ void startCodeFragment(const QCString &style)
{ m_codeGen.startCodeFragment(style); }
- void endCodeFragment(const char *style)
+ void endCodeFragment(const QCString &style)
{ m_codeGen.endCodeFragment(style); }
// ---------------------------
@@ -141,19 +136,19 @@ class DocbookGenerator : public OutputGenerator
///////////////////////////////////////////////////////////////
// structural output interface
///////////////////////////////////////////////////////////////
- void startFile(const char *name,const char *manName,
- const char *title,int id);
+ void startFile(const QCString &name,const QCString &manName,
+ const QCString &title,int id);
void writeSearchInfo(){DB_GEN_EMPTY};
- void writeFooter(const char *){DB_GEN_NEW};
+ void writeFooter(const QCString &){DB_GEN_NEW};
void endFile();
void startIndexSection(IndexSections);
void endIndexSection(IndexSections);
- void writePageLink(const char *,bool);
+ void writePageLink(const QCString &,bool);
void startProjectNumber(){DB_GEN_NEW};
void endProjectNumber(){DB_GEN_NEW};
void writeStyleInfo(int){DB_GEN_EMPTY};
- void startTitleHead(const char *);
- void endTitleHead(const char *fileName,const char *name);
+ void startTitleHead(const QCString &);
+ void endTitleHead(const QCString &fileName,const QCString &name);
void startIndexListItem(){DB_GEN_NEW};
void endIndexListItem(){DB_GEN_NEW};
void startIndexList(){DB_GEN_NEW};
@@ -161,21 +156,21 @@ class DocbookGenerator : public OutputGenerator
void startIndexKey(){DB_GEN_NEW};
void endIndexKey(){DB_GEN_NEW};
void startIndexValue(bool){DB_GEN_NEW};
- void endIndexValue(const char *,bool){DB_GEN_NEW};
+ void endIndexValue(const QCString &,bool){DB_GEN_NEW};
void startItemList() {DB_GEN_EMPTY};
void endItemList() {DB_GEN_EMPTY};
- void startIndexItem(const char *,const char *){DB_GEN_NEW};
- void endIndexItem(const char *,const char *){DB_GEN_NEW};
+ void startIndexItem(const QCString &,const QCString &){DB_GEN_NEW};
+ void endIndexItem(const QCString &,const QCString &){DB_GEN_NEW};
void startItemListItem() {DB_GEN_EMPTY};
void endItemListItem() {DB_GEN_EMPTY};
- void docify(const char *text);
+ void docify(const QCString &text);
void writeChar(char);
- void writeString(const char *);
- void startParagraph(const char *);
+ void writeString(const QCString &);
+ void startParagraph(const QCString &);
void endParagraph();
- void writeObjectLink(const char *,const char *,const char *,const char *);
- void startHtmlLink(const char *){DB_GEN_NEW};
+ void writeObjectLink(const QCString &,const QCString &,const QCString &,const QCString &);
+ void startHtmlLink(const QCString &){DB_GEN_NEW};
void endHtmlLink(){DB_GEN_NEW};
void startBold();
void endBold();
@@ -196,17 +191,17 @@ class DocbookGenerator : public OutputGenerator
void endSmall(){DB_GEN_NEW};
void startExamples();
void endExamples();
- void startParamList(BaseOutputDocInterface::ParamListTypes,const char *){DB_GEN_NEW};
+ void startParamList(BaseOutputDocInterface::ParamListTypes,const QCString &){DB_GEN_NEW};
void endParamList(){DB_GEN_NEW};
void startTitle(){DB_GEN_NEW};
void endTitle(){DB_GEN_NEW};
- void writeAnchor(const char *,const char *){DB_GEN_EMPTY};
- void startSection(const char *,const char *,SectionType);
- void endSection(const char *,SectionType);
- void lineBreak(const char *);
- void addIndexItem(const char *,const char *);
+ void writeAnchor(const QCString &,const QCString &){DB_GEN_EMPTY};
+ void startSection(const QCString &,const QCString &,SectionType);
+ void endSection(const QCString &,SectionType);
+ void lineBreak(const QCString &);
+ void addIndexItem(const QCString &,const QCString &);
void writeNonBreakableSpace(int);
- void startDescTable(const char *);
+ void startDescTable(const QCString &);
void endDescTable();
void startDescTableRow();
void endDescTableRow();
@@ -214,10 +209,10 @@ class DocbookGenerator : public OutputGenerator
void endDescTableTitle();
void startDescTableData();
void endDescTableData();
- void startTextLink(const char *,const char *){DB_GEN_NEW};
+ void startTextLink(const QCString &,const QCString &){DB_GEN_NEW};
void endTextLink(){DB_GEN_NEW};
void startPageRef(){DB_GEN_NEW};
- void endPageRef(const char *,const char *){DB_GEN_NEW};
+ void endPageRef(const QCString &,const QCString &){DB_GEN_NEW};
void startSubsection(){DB_GEN_NEW};
void endSubsection(){DB_GEN_NEW};
void startSubsubsection();
@@ -230,7 +225,7 @@ class DocbookGenerator : public OutputGenerator
void endMemberSections(){DB_GEN_EMPTY};
void startHeaderSection(){DB_GEN_EMPTY};
void endHeaderSection(){DB_GEN_EMPTY};
- void startMemberHeader(const char *anchor, int typ);
+ void startMemberHeader(const QCString &anchor, int typ);
void endMemberHeader();
void startMemberSubtitle(){DB_GEN_EMPTY};
void endMemberSubtitle(){DB_GEN_EMPTY};
@@ -242,10 +237,12 @@ class DocbookGenerator : public OutputGenerator
void endInlineHeader(){DB_GEN_NEW};
void startAnonTypeScope(int){DB_GEN_EMPTY};
void endAnonTypeScope(int){DB_GEN_EMPTY};
- void startMemberItem(const char *,int,const char *);
+ void startMemberItem(const QCString &,int,const QCString &);
void endMemberItem();
void startMemberTemplateParams();
- void endMemberTemplateParams(const char *,const char *);
+ void endMemberTemplateParams(const QCString &,const QCString &);
+ void startCompoundTemplateParams() { startSubsubsection(); }
+ void endCompoundTemplateParams() { endSubsubsection(); }
void startMemberGroupHeader(bool);
void endMemberGroupHeader();
void startMemberGroupDocs(){DB_GEN_EMPTY};
@@ -254,29 +251,29 @@ class DocbookGenerator : public OutputGenerator
void endMemberGroup(bool);
void insertMemberAlign(bool){DB_GEN_EMPTY};
void insertMemberAlignLeft(int,bool){DB_GEN_EMPTY};
- void startMemberDoc(const char *,const char *,
- const char *,const char *,int,int,bool);
+ void startMemberDoc(const QCString &,const QCString &,
+ const QCString &,const QCString &,int,int,bool);
void endMemberDoc(bool);
- void startDoxyAnchor(const char *fName,const char *manName,
- const char *anchor,const char *name,
- const char *args);
- void endDoxyAnchor(const char *fileName,const char *anchor);
+ void startDoxyAnchor(const QCString &fName,const QCString &manName,
+ const QCString &anchor,const QCString &name,
+ const QCString &args);
+ void endDoxyAnchor(const QCString &fileName,const QCString &anchor);
void writeLatexSpacing(){DB_GEN_EMPTY}
- void writeStartAnnoItem(const char *,const char *,
- const char *,const char *){DB_GEN_NEW};
- void writeEndAnnoItem(const char *){DB_GEN_NEW};
- void startMemberDescription(const char *,const char *,bool){DB_GEN_EMPTY};
+ void writeStartAnnoItem(const QCString &,const QCString &,
+ const QCString &,const QCString &){DB_GEN_NEW};
+ void writeEndAnnoItem(const QCString &){DB_GEN_NEW};
+ void startMemberDescription(const QCString &,const QCString &,bool){DB_GEN_EMPTY};
void endMemberDescription(){DB_GEN_EMPTY};
void startMemberDeclaration(){DB_GEN_EMPTY};
- void endMemberDeclaration(const char *,const char *){DB_GEN_EMPTY};
- void writeInheritedSectionTitle(const char *,const char *,
- const char *,const char *,
- const char *,const char *){DB_GEN_NEW};
+ void endMemberDeclaration(const QCString &,const QCString &){DB_GEN_EMPTY};
+ void writeInheritedSectionTitle(const QCString &,const QCString &,
+ const QCString &,const QCString &,
+ const QCString &,const QCString &){DB_GEN_NEW};
void startIndent(){DB_GEN_EMPTY};
void endIndent(){DB_GEN_EMPTY};
void writeSynopsis(){DB_GEN_EMPTY};
void startClassDiagram();
- void endClassDiagram(const ClassDiagram &,const char *,const char *);
+ void endClassDiagram(const ClassDiagram &,const QCString &,const QCString &);
void startDotGraph();
void endDotGraph(DotClassGraph &g);
void startInclDepGraph();
@@ -290,14 +287,14 @@ class DocbookGenerator : public OutputGenerator
void writeGraphicalHierarchy(DotGfxHierarchyTable &){DB_GEN_NEW};
void startQuickIndices(){DB_GEN_EMPTY};
void endQuickIndices(){DB_GEN_EMPTY};
- void writeSplitBar(const char *){DB_GEN_EMPTY};
- void writeNavigationPath(const char *){DB_GEN_NEW};
+ void writeSplitBar(const QCString &){DB_GEN_EMPTY};
+ void writeNavigationPath(const QCString &){DB_GEN_NEW};
void writeLogo(){DB_GEN_NEW};
- void writeQuickLinks(bool,HighlightedItem,const char *){DB_GEN_EMPTY};
- void writeSummaryLink(const char *,const char *,const char *,bool){DB_GEN_EMPTY};
+ void writeQuickLinks(bool,HighlightedItem,const QCString &){DB_GEN_EMPTY};
+ void writeSummaryLink(const QCString &,const QCString &,const QCString &,bool){DB_GEN_EMPTY};
void startContents(){DB_GEN_EMPTY};
void endContents(){DB_GEN_EMPTY};
- void startPageDoc(const char *){DB_GEN_EMPTY}
+ void startPageDoc(const QCString &){DB_GEN_EMPTY}
void endPageDoc() {DB_GEN_EMPTY}
void startTextBlock(bool);
void endTextBlock(bool);
@@ -306,15 +303,15 @@ class DocbookGenerator : public OutputGenerator
void endMemberDocPrefixItem();
void startMemberDocName(bool);
void endMemberDocName();
- void startParameterType(bool,const char *){DB_GEN_EMPTY};
+ void startParameterType(bool,const QCString &){DB_GEN_EMPTY};
void endParameterType(){DB_GEN_EMPTY};
void startParameterName(bool);
void endParameterName(bool,bool,bool);
void startParameterList(bool);
void endParameterList();
- void exceptionEntry(const char*,bool);
+ void exceptionEntry(const QCString &,bool);
- void startConstraintList(const char *);
+ void startConstraintList(const QCString &);
void startConstraintParam();
void endConstraintParam();
void startConstraintType();
@@ -333,11 +330,11 @@ class DocbookGenerator : public OutputGenerator
void endInlineMemberDoc(){DB_GEN_NEW};
void startLabels();
- void writeLabel(const char *,bool);
+ void writeLabel(const QCString &,bool);
void endLabels();
- void setCurrentDoc(const Definition *,const char *,bool) {DB_GEN_EMPTY}
- void addWord(const char *,bool) {DB_GEN_EMPTY}
+ void setCurrentDoc(const Definition *,const QCString &,bool) {DB_GEN_EMPTY}
+ void addWord(const QCString &,bool) {DB_GEN_EMPTY}
private:
diff --git a/src/docbookvisitor.cpp b/src/docbookvisitor.cpp
index 84d85c7..f5133d6 100644
--- a/src/docbookvisitor.cpp
+++ b/src/docbookvisitor.cpp
@@ -13,8 +13,7 @@
*
*/
-
-#include <qfileinfo.h>
+#include <fstream>
#include "docbookvisitor.h"
#include "docparser.h"
@@ -35,6 +34,7 @@
#include "emoji.h"
#include "plantuml.h"
#include "growbuf.h"
+#include "fileinfo.h"
#if 0
#define DB_VIS_C DB_VIS_C1(m_t)
@@ -48,12 +48,12 @@
#define DB_VIS_C2a(x,y)
#endif
-static QCString filterId(const char *s)
+static QCString filterId(const QCString &s)
{
+ if (s.isEmpty()) return s;
static GrowBuf growBuf;
growBuf.clear();
- if (s==0) return "";
- const char *p=s;
+ const char *p=s.data();
char c;
while ((c=*p++))
{
@@ -89,7 +89,7 @@ void DocbookDocVisitor::visitCaption(const DocNodeList &children)
for (const auto &n : children) n->accept(this);
}
-void DocbookDocVisitor::visitPreStart(FTextStream &t,
+void DocbookDocVisitor::visitPreStart(TextStream &t,
const DocNodeList &children,
bool hasCaption,
const QCString &name,
@@ -99,17 +99,17 @@ void DocbookDocVisitor::visitPreStart(FTextStream &t,
{
if (hasCaption && !inlineImage)
{
- t << " <figure>" << endl;
- t << " <title>" << endl;
+ t << " <figure>\n";
+ t << " <title>\n";
visitCaption(children);
- t << " </title>" << endl;
+ t << " </title>\n";
}
else
{
- t << " <informalfigure>" << endl;
+ t << " <informalfigure>\n";
}
- t << " <mediaobject>" << endl;
- t << " <imageobject>" << endl;
+ t << " <mediaobject>\n";
+ t << " <imageobject>\n";
t << " <imagedata";
if (!width.isEmpty())
{
@@ -124,42 +124,42 @@ void DocbookDocVisitor::visitPreStart(FTextStream &t,
t << " depth=\"" << convertToDocBook(height) << "\"";
}
t << " align=\"center\" valign=\"middle\" scalefit=\"0\" fileref=\"" << name << "\">";
- t << "</imagedata>" << endl;
- t << " </imageobject>" << endl;
+ t << "</imagedata>\n";
+ t << " </imageobject>\n";
if (hasCaption && !inlineImage)
{
- t << " <!--" << endl; // Needed for general formatting with title for other formats
+ t << " <!--\n"; // Needed for general formatting with title for other formats
}
}
-void DocbookDocVisitor::visitPostEnd(FTextStream &t, bool hasCaption, bool inlineImage)
+void DocbookDocVisitor::visitPostEnd(TextStream &t, bool hasCaption, bool inlineImage)
{
- t << endl;
+ t << "\n";
if (hasCaption && !inlineImage)
{
- t << " -->" << endl; // Needed for general formatting with title for other formats
+ t << " -->\n"; // Needed for general formatting with title for other formats
}
- t << " </mediaobject>" << endl;
+ t << " </mediaobject>\n";
if (hasCaption && !inlineImage)
{
- t << " </figure>" << endl;
+ t << " </figure>\n";
}
else
{
- t << " </informalfigure>" << endl;
+ t << " </informalfigure>\n";
}
}
-DocbookDocVisitor::DocbookDocVisitor(FTextStream &t,CodeOutputInterface &ci,const char *langExt)
+DocbookDocVisitor::DocbookDocVisitor(TextStream &t,CodeOutputInterface &ci,const QCString &langExt)
: DocVisitor(DocVisitor_Docbook), m_t(t), m_ci(ci),m_langExt(langExt)
{
DB_VIS_C
- // m_t << "<section>" << endl;
+ // m_t << "<section>\n";
}
DocbookDocVisitor::~DocbookDocVisitor()
{
DB_VIS_C
- // m_t << "</section>" << endl;
+ // m_t << "</section>\n";
}
//--------------------------------------
@@ -242,9 +242,9 @@ void DocbookDocVisitor::visit(DocLineBreak *)
{
DB_VIS_C
if (m_hide) return;
- m_t << endl << "<literallayout>&#160;&#xa;</literallayout>" << endl;
+ m_t << "\n<literallayout>&#160;&#xa;</literallayout>\n";
// gives nicer results but gives problems as it is not allowed in <pare> and also problems with dblatex
- // m_t << endl << "<sbr/>" << endl;
+ // m_t << "\n" << "<sbr/>\n";
}
void DocbookDocVisitor::visit(DocHorRuler *)
@@ -345,22 +345,23 @@ DB_VIS_C
QCString baseName(4096);
QCString name;
QCString stext = s->text();
- m_t << "<para>" << endl;
+ m_t << "<para>\n";
name.sprintf("%s%d", "dot_inline_dotgraph_", dotindex);
baseName.sprintf("%s%d",
- (Config_getString(DOCBOOK_OUTPUT)+"/inline_dotgraph_").data(),
+ qPrint(Config_getString(DOCBOOK_OUTPUT)+"/inline_dotgraph_"),
dotindex++
);
- QFile file(baseName+".dot");
- if (!file.open(IO_WriteOnly))
+ std::string fileName = baseName.str()+".dot";
+ std::ofstream file(fileName,std::ofstream::out | std::ofstream::binary);
+ if (!file.is_open())
{
- err("Could not open file %s.dot for writing\n",baseName.data());
+ err("Could not open file %s for writing\n",fileName.c_str());
}
- file.writeBlock( stext, stext.length() );
+ file.write( stext.data(), stext.length() );
file.close();
writeDotFile(baseName, s);
- m_t << "</para>" << endl;
- if (Config_getBool(DOT_CLEANUP)) file.remove();
+ m_t << "</para>\n";
+ if (Config_getBool(DOT_CLEANUP)) Dir().remove(fileName);
}
break;
case DocVerbatim::Msc:
@@ -369,25 +370,26 @@ DB_VIS_C
QCString baseName(4096);
QCString name;
QCString stext = s->text();
- m_t << "<para>" << endl;
+ m_t << "<para>\n";
name.sprintf("%s%d", "msc_inline_mscgraph_", mscindex);
baseName.sprintf("%s%d",
(Config_getString(DOCBOOK_OUTPUT)+"/inline_mscgraph_").data(),
mscindex++
);
- QFile file(baseName+".msc");
- if (!file.open(IO_WriteOnly))
+ std::string fileName = baseName.str()+".msc";
+ std::ofstream file(fileName,std::ofstream::out | std::ofstream::binary);
+ if (!file.is_open())
{
- err("Could not open file %s.msc for writing\n",baseName.data());
+ err("Could not open file %s for writing\n",fileName.c_str());
}
QCString text = "msc {";
text+=stext;
text+="}";
- file.writeBlock( text, text.length() );
+ file.write( text.data(), text.length() );
file.close();
writeMscFile(baseName,s);
- m_t << "</para>" << endl;
- if (Config_getBool(DOT_CLEANUP)) file.remove();
+ m_t << "</para>\n";
+ if (Config_getBool(DOT_CLEANUP)) Dir().remove(fileName);
}
break;
case DocVerbatim::PlantUML:
@@ -400,9 +402,9 @@ DB_VIS_C
{
shortName=shortName.right((int)shortName.length()-i-1);
}
- m_t << "<para>" << endl;
+ m_t << "<para>\n";
writePlantUMLFile(baseName,s);
- m_t << "</para>" << endl;
+ m_t << "</para>\n";
}
break;
}
@@ -425,8 +427,8 @@ DB_VIS_C
case DocInclude::IncWithLines:
{
m_t << "<literallayout><computeroutput>";
- QFileInfo cfi( inc->file() );
- FileDef *fd = createFileDef( cfi.dirPath().utf8(), cfi.fileName().utf8() );
+ FileInfo cfi( inc->file().str() );
+ FileDef *fd = createFileDef( cfi.dirPath(), cfi.fileName() );
getCodeParser(inc->extension()).parseCode(m_ci,inc->context(),
inc->text(),
langExt,
@@ -474,8 +476,8 @@ DB_VIS_C
break;
case DocInclude::SnipWithLines:
{
- QFileInfo cfi( inc->file() );
- FileDef *fd = createFileDef( cfi.dirPath().utf8(), cfi.fileName().utf8() );
+ FileInfo cfi( inc->file().str() );
+ FileDef *fd = createFileDef( cfi.dirPath(), cfi.fileName() );
m_t << "<literallayout><computeroutput>";
getCodeParser(inc->extension()).parseCode(m_ci,
inc->context(),
@@ -525,8 +527,8 @@ DB_VIS_C
FileDef *fd = 0;
if (!op->includeFileName().isEmpty())
{
- QFileInfo cfi( op->includeFileName() );
- fd = createFileDef( cfi.dirPath().utf8(), cfi.fileName().utf8() );
+ FileInfo cfi( op->includeFileName().str() );
+ fd = createFileDef( cfi.dirPath(), cfi.fileName() );
}
getCodeParser(locLangExt).parseCode(m_ci,op->context(),
@@ -551,7 +553,7 @@ DB_VIS_C
}
else
{
- if (!m_hide) m_t << endl;
+ if (!m_hide) m_t << "\n";
}
}
@@ -560,14 +562,14 @@ void DocbookDocVisitor::visit(DocFormula *f)
DB_VIS_C
if (m_hide) return;
- if (f->isInline()) m_t << "<inlinemediaobject>" << endl;
- else m_t << " <mediaobject>" << endl;
- m_t << " <imageobject>" << endl;
+ if (f->isInline()) m_t << "<inlinemediaobject>\n";
+ else m_t << " <mediaobject>\n";
+ m_t << " <imageobject>\n";
m_t << " <imagedata ";
- m_t << "align=\"center\" valign=\"middle\" scalefit=\"0\" fileref=\"" << f->relPath() << f->name() << ".png\"/>" << endl;
- m_t << " </imageobject>" << endl;
- if (f->isInline()) m_t << "</inlinemediaobject>" << endl;
- else m_t << " </mediaobject>" << endl;
+ m_t << "align=\"center\" valign=\"middle\" scalefit=\"0\" fileref=\"" << f->relPath() << f->name() << ".png\"/>\n";
+ m_t << " </imageobject>\n";
+ if (f->isInline()) m_t << "</inlinemediaobject>\n";
+ else m_t << " </mediaobject>\n";
}
void DocbookDocVisitor::visit(DocIndexEntry *ie)
@@ -576,7 +578,7 @@ DB_VIS_C
if (m_hide) return;
m_t << "<indexterm><primary>";
filter(ie->entry());
- m_t << "</primary></indexterm>" << endl;
+ m_t << "</primary></indexterm>\n";
}
void DocbookDocVisitor::visit(DocSimpleSectSep *)
@@ -644,7 +646,7 @@ void DocbookDocVisitor::visitPre(DocPara *)
{
DB_VIS_C
if (m_hide) return;
- m_t << endl;
+ m_t << "\n";
m_t << "<para>";
}
@@ -653,7 +655,7 @@ void DocbookDocVisitor::visitPost(DocPara *)
DB_VIS_C
if (m_hide) return;
m_t << "</para>";
- m_t << endl;
+ m_t << "\n";
}
void DocbookDocVisitor::visitPre(DocRoot *)
@@ -677,161 +679,161 @@ DB_VIS_C
case DocSimpleSect::See:
if (m_insidePre)
{
- m_t << "<formalpara><title>" << theTranslator->trSeeAlso() << "</title>" << endl;
+ m_t << "<formalpara><title>" << theTranslator->trSeeAlso() << "</title>\n";
}
else
{
- m_t << "<formalpara><title>" << convertToDocBook(theTranslator->trSeeAlso()) << "</title>" << endl;
+ m_t << "<formalpara><title>" << convertToDocBook(theTranslator->trSeeAlso()) << "</title>\n";
}
break;
case DocSimpleSect::Return:
if (m_insidePre)
{
- m_t << "<formalpara><title>" << theTranslator->trReturns()<< "</title>" << endl;
+ m_t << "<formalpara><title>" << theTranslator->trReturns()<< "</title>\n";
}
else
{
- m_t << "<formalpara><title>" << convertToDocBook(theTranslator->trReturns()) << "</title>" << endl;
+ m_t << "<formalpara><title>" << convertToDocBook(theTranslator->trReturns()) << "</title>\n";
}
break;
case DocSimpleSect::Author:
if (m_insidePre)
{
- m_t << "<formalpara><title>" << theTranslator->trAuthor(TRUE, TRUE) << "</title>" << endl;
+ m_t << "<formalpara><title>" << theTranslator->trAuthor(TRUE, TRUE) << "</title>\n";
}
else
{
- m_t << "<formalpara><title>" << convertToDocBook(theTranslator->trAuthor(TRUE, TRUE)) << "</title>" << endl;
+ m_t << "<formalpara><title>" << convertToDocBook(theTranslator->trAuthor(TRUE, TRUE)) << "</title>\n";
}
break;
case DocSimpleSect::Authors:
if (m_insidePre)
{
- m_t << "<formalpara><title>" << theTranslator->trAuthor(TRUE, FALSE) << "</title>" << endl;
+ m_t << "<formalpara><title>" << theTranslator->trAuthor(TRUE, FALSE) << "</title>\n";
}
else
{
- m_t << "<formalpara><title>" << convertToDocBook(theTranslator->trAuthor(TRUE, FALSE)) << "</title>" << endl;
+ m_t << "<formalpara><title>" << convertToDocBook(theTranslator->trAuthor(TRUE, FALSE)) << "</title>\n";
}
break;
case DocSimpleSect::Version:
if (m_insidePre)
{
- m_t << "<formalpara><title>" << theTranslator->trVersion() << "</title>" << endl;
+ m_t << "<formalpara><title>" << theTranslator->trVersion() << "</title>\n";
}
else
{
- m_t << "<formalpara><title>" << convertToDocBook(theTranslator->trVersion()) << "</title>" << endl;
+ m_t << "<formalpara><title>" << convertToDocBook(theTranslator->trVersion()) << "</title>\n";
}
break;
case DocSimpleSect::Since:
if (m_insidePre)
{
- m_t << "<formalpara><title>" << theTranslator->trSince() << "</title>" << endl;
+ m_t << "<formalpara><title>" << theTranslator->trSince() << "</title>\n";
}
else
{
- m_t << "<formalpara><title>" << convertToDocBook(theTranslator->trSince()) << "</title>" << endl;
+ m_t << "<formalpara><title>" << convertToDocBook(theTranslator->trSince()) << "</title>\n";
}
break;
case DocSimpleSect::Date:
if (m_insidePre)
{
- m_t << "<formalpara><title>" << theTranslator->trDate() << "</title>" << endl;
+ m_t << "<formalpara><title>" << theTranslator->trDate() << "</title>\n";
}
else
{
- m_t << "<formalpara><title>" << convertToDocBook(theTranslator->trDate()) << "</title>" << endl;
+ m_t << "<formalpara><title>" << convertToDocBook(theTranslator->trDate()) << "</title>\n";
}
break;
case DocSimpleSect::Note:
if (m_insidePre)
{
- m_t << "<note><title>" << theTranslator->trNote() << "</title>" << endl;
+ m_t << "<note><title>" << theTranslator->trNote() << "</title>\n";
}
else
{
- m_t << "<note><title>" << convertToDocBook(theTranslator->trNote()) << "</title>" << endl;
+ m_t << "<note><title>" << convertToDocBook(theTranslator->trNote()) << "</title>\n";
}
break;
case DocSimpleSect::Warning:
if (m_insidePre)
{
- m_t << "<warning><title>" << theTranslator->trWarning() << "</title>" << endl;
+ m_t << "<warning><title>" << theTranslator->trWarning() << "</title>\n";
}
else
{
- m_t << "<warning><title>" << convertToDocBook(theTranslator->trWarning()) << "</title>" << endl;
+ m_t << "<warning><title>" << convertToDocBook(theTranslator->trWarning()) << "</title>\n";
}
break;
case DocSimpleSect::Pre:
if (m_insidePre)
{
- m_t << "<formalpara><title>" << theTranslator->trPrecondition() << "</title>" << endl;
+ m_t << "<formalpara><title>" << theTranslator->trPrecondition() << "</title>\n";
}
else
{
- m_t << "<formalpara><title>" << convertToDocBook(theTranslator->trPrecondition()) << "</title>" << endl;
+ m_t << "<formalpara><title>" << convertToDocBook(theTranslator->trPrecondition()) << "</title>\n";
}
break;
case DocSimpleSect::Post:
if (m_insidePre)
{
- m_t << "<formalpara><title>" << theTranslator->trPostcondition() << "</title>" << endl;
+ m_t << "<formalpara><title>" << theTranslator->trPostcondition() << "</title>\n";
}
else
{
- m_t << "<formalpara><title>" << convertToDocBook(theTranslator->trPostcondition()) << "</title>" << endl;
+ m_t << "<formalpara><title>" << convertToDocBook(theTranslator->trPostcondition()) << "</title>\n";
}
break;
case DocSimpleSect::Copyright:
if (m_insidePre)
{
- m_t << "<formalpara><title>" << theTranslator->trCopyright() << "</title>" << endl;
+ m_t << "<formalpara><title>" << theTranslator->trCopyright() << "</title>\n";
}
else
{
- m_t << "<formalpara><title>" << convertToDocBook(theTranslator->trCopyright()) << "</title>" << endl;
+ m_t << "<formalpara><title>" << convertToDocBook(theTranslator->trCopyright()) << "</title>\n";
}
break;
case DocSimpleSect::Invar:
if (m_insidePre)
{
- m_t << "<formalpara><title>" << theTranslator->trInvariant() << "</title>" << endl;
+ m_t << "<formalpara><title>" << theTranslator->trInvariant() << "</title>\n";
}
else
{
- m_t << "<formalpara><title>" << convertToDocBook(theTranslator->trInvariant()) << "</title>" << endl;
+ m_t << "<formalpara><title>" << convertToDocBook(theTranslator->trInvariant()) << "</title>\n";
}
break;
case DocSimpleSect::Remark:
// <remark> is miising the <title> possibility
if (m_insidePre)
{
- m_t << "<formalpara><title>" << theTranslator->trRemarks() << "</title>" << endl;
+ m_t << "<formalpara><title>" << theTranslator->trRemarks() << "</title>\n";
}
else
{
- m_t << "<formalpara><title>" << convertToDocBook(theTranslator->trRemarks()) << "</title>" << endl;
+ m_t << "<formalpara><title>" << convertToDocBook(theTranslator->trRemarks()) << "</title>\n";
}
break;
case DocSimpleSect::Attention:
if (m_insidePre)
{
- m_t << "<caution><title>" << theTranslator->trAttention() << "</title>" << endl;
+ m_t << "<caution><title>" << theTranslator->trAttention() << "</title>\n";
}
else
{
- m_t << "<caution><title>" << convertToDocBook(theTranslator->trAttention()) << "</title>" << endl;
+ m_t << "<caution><title>" << convertToDocBook(theTranslator->trAttention()) << "</title>\n";
}
break;
case DocSimpleSect::User:
case DocSimpleSect::Rcs:
case DocSimpleSect::Unknown:
if (s->hasTitle())
- m_t << "<formalpara>" << endl;
+ m_t << "<formalpara>\n";
else
- m_t << "<para>" << endl;
+ m_t << "<para>\n";
break;
}
}
@@ -846,21 +848,21 @@ DB_VIS_C
case DocSimpleSect::Rcs:
case DocSimpleSect::Unknown:
if (s->hasTitle())
- m_t << "</formalpara>" << endl;
+ m_t << "</formalpara>\n";
else
- m_t << "</para>" << endl;
+ m_t << "</para>\n";
break;
case DocSimpleSect::Note:
- m_t << "</note>" << endl;
+ m_t << "</note>\n";
break;
case DocSimpleSect::Attention:
- m_t << "</caution>" << endl;
+ m_t << "</caution>\n";
break;
case DocSimpleSect::Warning:
- m_t << "</warning>" << endl;
+ m_t << "</warning>\n";
break;
default:
- m_t << "</formalpara>" << endl;
+ m_t << "</formalpara>\n";
break;
}
}
@@ -913,10 +915,10 @@ DB_VIS_C
if (m_hide) return;
m_t << "<section xml:id=\"_" << stripPath(s->file());
if (!s->anchor().isEmpty()) m_t << "_1" << s->anchor();
- m_t << "\">" << endl;
+ m_t << "\">\n";
m_t << "<title>";
filter(s->title());
- m_t << "</title>" << endl;
+ m_t << "</title>\n";
}
void DocbookDocVisitor::visitPost(DocSection *)
@@ -1006,8 +1008,8 @@ void DocbookDocVisitor::visitPre(DocHtmlTable *t)
DB_VIS_C
m_bodySet.push(false);
if (m_hide) return;
- m_t << "<informaltable frame=\"all\">" << endl;
- m_t << " <tgroup cols=\"" << (unsigned int)t->numColumns() << "\" align=\"left\" colsep=\"1\" rowsep=\"1\">" << endl;
+ m_t << "<informaltable frame=\"all\">\n";
+ m_t << " <tgroup cols=\"" << (unsigned int)t->numColumns() << "\" align=\"left\" colsep=\"1\" rowsep=\"1\">\n";
for (uint i = 0; i <t->numColumns(); i++)
{
// do something with colwidth based of cell width specification (be aware of possible colspan in the header)?
@@ -1019,10 +1021,10 @@ void DocbookDocVisitor::visitPost(DocHtmlTable *)
{
DB_VIS_C
if (m_hide) return;
- if (m_bodySet.top()) m_t << " </tbody>" << endl;
+ if (m_bodySet.top()) m_t << " </tbody>\n";
m_bodySet.pop();
- m_t << " </tgroup>" << endl;
- m_t << "</informaltable>" << endl;
+ m_t << " </tgroup>\n";
+ m_t << "</informaltable>\n";
}
void DocbookDocVisitor::visitPre(DocHtmlRow *tr)
@@ -1190,7 +1192,7 @@ DB_VIS_C
if (img->type()==DocImage::DocBook)
{
if (m_hide) return;
- m_t << endl;
+ m_t << "\n";
QCString baseName=img->name();
int i;
if ((i=baseName.findRev('/'))!=-1 || (i=baseName.findRev('\\'))!=-1)
@@ -1227,19 +1229,7 @@ DB_VIS_C
{
m_file=fd->absFilePath();
}
- QFile inImage(m_file);
- QFile outImage(Config_getString(DOCBOOK_OUTPUT)+"/"+baseName.data());
- if (inImage.open(IO_ReadOnly))
- {
- if (outImage.open(IO_WriteOnly))
- {
- char *buffer = new char[inImage.size()];
- inImage.readBlock(buffer,inImage.size());
- outImage.writeBlock(buffer,inImage.size());
- outImage.flush();
- delete[] buffer;
- }
- }
+ copyFile(m_file,Config_getString(DOCBOOK_OUTPUT)+"/"+baseName);
}
else
{
@@ -1308,7 +1298,7 @@ DB_VIS_C
if (m_hide) return;
if (ref->isSubPage())
{
- startLink(0,ref->anchor());
+ startLink(QCString(),ref->anchor());
}
else
{
@@ -1337,30 +1327,30 @@ void DocbookDocVisitor::visitPost(DocSecRefItem *)
{
DB_VIS_C
if (m_hide) return;
- m_t << "</tocentry>" << endl;
+ m_t << "</tocentry>\n";
}
void DocbookDocVisitor::visitPre(DocSecRefList *)
{
DB_VIS_C
if (m_hide) return;
- m_t << "<toc>" << endl;
+ m_t << "<toc>\n";
}
void DocbookDocVisitor::visitPost(DocSecRefList *)
{
DB_VIS_C
if (m_hide) return;
- m_t << "</toc>" << endl;
+ m_t << "</toc>\n";
}
void DocbookDocVisitor::visitPre(DocParamSect *s)
{
DB_VIS_C
if (m_hide) return;
- m_t << endl;
- m_t << " <formalpara>" << endl;
- m_t << " <title>" << endl;
+ m_t << "\n";
+ m_t << " <formalpara>\n";
+ m_t << " <title>\n";
switch(s->type())
{
case DocParamSect::Param: m_t << theTranslator->trParameters(); break;
@@ -1370,9 +1360,9 @@ DB_VIS_C
default:
ASSERT(0);
}
- m_t << " </title>" << endl;
- m_t << " <para>" << endl;
- m_t << " <table frame=\"all\">" << endl;
+ m_t << " </title>\n";
+ m_t << " <para>\n";
+ m_t << " <table frame=\"all\">\n";
int ncols = 2;
if (s->type() == DocParamSect::Param)
{
@@ -1381,24 +1371,24 @@ DB_VIS_C
if (hasInOutSpecs && hasTypeSpecs) ncols += 2;
else if (hasInOutSpecs || hasTypeSpecs) ncols += 1;
}
- m_t << " <tgroup cols=\"" << ncols << "\" align=\"left\" colsep=\"1\" rowsep=\"1\">" << endl;
+ m_t << " <tgroup cols=\"" << ncols << "\" align=\"left\" colsep=\"1\" rowsep=\"1\">\n";
for (int i = 1; i <= ncols; i++)
{
- if (i == ncols) m_t << " <colspec colwidth=\"4*\"/>" << endl;
- else m_t << " <colspec colwidth=\"1*\"/>" << endl;
+ if (i == ncols) m_t << " <colspec colwidth=\"4*\"/>\n";
+ else m_t << " <colspec colwidth=\"1*\"/>\n";
}
- m_t << " <tbody>" << endl;
+ m_t << " <tbody>\n";
}
void DocbookDocVisitor::visitPost(DocParamSect *)
{
DB_VIS_C
if (m_hide) return;
- m_t << " </tbody>" << endl;
- m_t << " </tgroup>" << endl;
- m_t << " </table>" << endl;
- m_t << " </para>" << endl;
- m_t << " </formalpara>" << endl;
+ m_t << " </tbody>\n";
+ m_t << " </tgroup>\n";
+ m_t << " </table>\n";
+ m_t << " </para>\n";
+ m_t << " </formalpara>\n";
m_t << " ";
}
@@ -1406,7 +1396,7 @@ void DocbookDocVisitor::visitPre(DocParamList *pl)
{
DB_VIS_C
if (m_hide) return;
- m_t << " <row>" << endl;
+ m_t << " <row>\n";
DocParamSect *sect = 0;
if (pl->parent() && pl->parent()->kind()==DocNode::Kind_ParamSect)
@@ -1459,7 +1449,7 @@ DB_VIS_C
if (pl->parameters().empty())
{
- m_t << " <entry></entry>" << endl;
+ m_t << " <entry></entry>\n";
}
else
{
@@ -1481,7 +1471,7 @@ DB_VIS_C
}
cnt++;
}
- m_t << "</entry>" << endl;
+ m_t << "</entry>\n";
}
m_t << " <entry>";
}
@@ -1490,8 +1480,8 @@ void DocbookDocVisitor::visitPost(DocParamList *)
{
DB_VIS_C
if (m_hide) return;
- m_t << "</entry>" << endl;
- m_t << " </row>" << endl;
+ m_t << "</entry>\n";
+ m_t << " </row>\n";
}
void DocbookDocVisitor::visitPre(DocXRefItem *x)
@@ -1582,7 +1572,7 @@ DB_VIS_C
}
-void DocbookDocVisitor::filter(const char *str)
+void DocbookDocVisitor::filter(const QCString &str)
{
DB_VIS_C
m_t << convertToDocBook(str);
@@ -1594,7 +1584,7 @@ DB_VIS_C
m_t << "<link linkend=\"_" << stripPath(file);
if (!anchor.isEmpty())
{
- if (file) m_t << "_1";
+ if (!file.isEmpty()) m_t << "_1";
m_t << anchor;
}
m_t << "\">";
@@ -1659,7 +1649,7 @@ DB_VIS_C
baseName.prepend("msc_");
QCString outDir = Config_getString(DOCBOOK_OUTPUT);
writeMscGraphFromFile(fileName,outDir,baseName,MSC_BITMAP);
- m_t << "<para>" << endl;
+ m_t << "<para>\n";
visitPreStart(m_t, children, hasCaption, baseName + ".png", width, height);
}
@@ -1668,7 +1658,7 @@ void DocbookDocVisitor::endMscFile(bool hasCaption)
DB_VIS_C
if (m_hide) return;
visitPostEnd(m_t, hasCaption);
- m_t << "</para>" << endl;
+ m_t << "</para>\n";
}
void DocbookDocVisitor::writeDiaFile(const QCString &baseName, DocVerbatim *s)
@@ -1708,7 +1698,7 @@ DB_VIS_C
baseName.prepend("dia_");
QCString outDir = Config_getString(DOCBOOK_OUTPUT);
writeDiaGraphFromFile(fileName,outDir,baseName,DIA_BITMAP);
- m_t << "<para>" << endl;
+ m_t << "<para>\n";
visitPreStart(m_t, children, hasCaption, baseName + ".png", width, height);
}
@@ -1717,7 +1707,7 @@ void DocbookDocVisitor::endDiaFile(bool hasCaption)
DB_VIS_C
if (m_hide) return;
visitPostEnd(m_t, hasCaption);
- m_t << "</para>" << endl;
+ m_t << "</para>\n";
}
void DocbookDocVisitor::writeDotFile(const QCString &baseName, DocVerbatim *s)
@@ -1758,7 +1748,7 @@ DB_VIS_C
QCString outDir = Config_getString(DOCBOOK_OUTPUT);
QCString imgExt = getDotImageExtension();
writeDotGraphFromFile(fileName,outDir,baseName,GOF_BITMAP);
- m_t << "<para>" << endl;
+ m_t << "<para>\n";
visitPreStart(m_t, children, hasCaption, baseName + "." + imgExt, width, height);
}
@@ -1766,8 +1756,8 @@ void DocbookDocVisitor::endDotFile(bool hasCaption)
{
DB_VIS_C
if (m_hide) return;
- m_t << endl;
+ m_t << "\n";
visitPostEnd(m_t, hasCaption);
- m_t << "</para>" << endl;
+ m_t << "</para>\n";
}
diff --git a/src/docbookvisitor.h b/src/docbookvisitor.h
index ad53116..5580de0 100644
--- a/src/docbookvisitor.h
+++ b/src/docbookvisitor.h
@@ -16,20 +16,22 @@
#ifndef _DOCBOOKDOCVISITOR_H
#define _DOCBOOKDOCVISITOR_H
+#include <iostream>
+
#include "containers.h"
#include "docvisitor.h"
-#include <qcstring.h>
-#include <docparser.h>
+#include "docparser.h"
+#include "qcstring.h"
-class FTextStream;
class CodeOutputInterface;
class QCString;
+class TextStream;
/*! @brief Concrete visitor implementation for Docbook output. */
class DocbookDocVisitor : public DocVisitor
{
public:
- DocbookDocVisitor(FTextStream &t,CodeOutputInterface &ci,const char *langExt);
+ DocbookDocVisitor(TextStream &t,CodeOutputInterface &ci,const QCString &langExt);
~DocbookDocVisitor();
//--------------------------------------
// visitor functions for leaf nodes
@@ -137,7 +139,7 @@ class DocbookDocVisitor : public DocVisitor
//--------------------------------------
// helper functions
//--------------------------------------
- void filter(const char *str);
+ void filter(const QCString &str);
void startLink(const QCString &file,
const QCString &anchor);
void endLink();
@@ -154,19 +156,19 @@ class DocbookDocVisitor : public DocVisitor
void endDotFile(bool hasCaption);
void writeDotFile(const QCString &fileName, DocVerbatim *s);
void writePlantUMLFile(const QCString &fileName, DocVerbatim *s);
- void visitPreStart(FTextStream &t,
+ void visitPreStart(TextStream &t,
const DocNodeList &children,
bool hasCaption,
const QCString &name,
const QCString &width,
const QCString &height,
bool inlineImage = FALSE);
- void visitPostEnd(FTextStream &t, bool hasCaption, bool inlineImage = FALSE);
+ void visitPostEnd(TextStream &t, bool hasCaption, bool inlineImage = FALSE);
void visitCaption(const DocNodeList &children);
//--------------------------------------
// state variables
//--------------------------------------
- FTextStream &m_t;
+ TextStream &m_t;
CodeOutputInterface &m_ci;
bool m_insidePre = false;
bool m_hide = false;
diff --git a/src/docgroup.cpp b/src/docgroup.cpp
index 49fb9dc..07ff8f3 100644
--- a/src/docgroup.cpp
+++ b/src/docgroup.cpp
@@ -22,7 +22,7 @@
static std::atomic_int g_groupId;
-void DocGroup::enterFile(const char *fileName,int)
+void DocGroup::enterFile(const QCString &fileName,int)
{
m_openCount = 0;
m_autoGroupStack.clear();
@@ -32,7 +32,7 @@ void DocGroup::enterFile(const char *fileName,int)
m_compoundName=fileName;
}
-void DocGroup::leaveFile(const char *fileName,int line)
+void DocGroup::leaveFile(const QCString &fileName,int line)
{
//if (m_memberGroupId!=DOX_NOGROUP)
//{
@@ -51,11 +51,11 @@ void DocGroup::leaveFile(const char *fileName,int line)
}
}
-void DocGroup::enterCompound(const char *fileName,int line,const char *name)
+void DocGroup::enterCompound(const QCString &fileName,int line,const QCString &name)
{
if (m_memberGroupId!=DOX_NOGROUP)
{
- warn(fileName,line,"try to put compound %s inside a member group\n",name);
+ warn(fileName,line,"try to put compound %s inside a member group\n",qPrint(name));
}
m_memberGroupId=DOX_NOGROUP;
m_memberGroupRelates.resize(0);
@@ -73,12 +73,12 @@ void DocGroup::enterCompound(const char *fileName,int line,const char *name)
//printf("groupEnterCompound(%s)\n",name);
}
-void DocGroup::leaveCompound(const char *,int,const char * /*name*/)
+void DocGroup::leaveCompound(const QCString &,int,const QCString & /*name*/)
{
//printf("groupLeaveCompound(%s)\n",name);
//if (m_memberGroupId!=DOX_NOGROUP)
//{
- // warn(fileName,line,"end of compound %s while inside a member group\n",name);
+ // warn(fileName,line,"end of compound %s while inside a member group\n",qPrint(name));
//}
m_memberGroupId=DOX_NOGROUP;
m_memberGroupRelates.resize(0);
@@ -88,7 +88,7 @@ void DocGroup::leaveCompound(const char *,int,const char * /*name*/)
int DocGroup::findExistingGroup(const MemberGroupInfo *info)
{
- //printf("findExistingGroup %s:%s\n",info->header.data(),info->compoundName.data());
+ //printf("findExistingGroup %s:%s\n",qPrint(info->header),qPrint(info->compoundName));
for (const auto &kv : Doxygen::memberGroupInfoMap)
{
if (m_compoundName==kv.second->compoundName && // same file or scope
@@ -103,18 +103,18 @@ int DocGroup::findExistingGroup(const MemberGroupInfo *info)
return ++g_groupId; // start new group
}
-void DocGroup::open(Entry *e,const char *,int, bool implicit)
+void DocGroup::open(Entry *e,const QCString &,int, bool implicit)
{
if (!implicit) m_openCount++;
//printf("==> openGroup(name=%s,sec=%x) m_autoGroupStack=%d\n",
- // e->name.data(),e->section,m_autoGroupStack.size());
+ // qPrint(e->name),e->section,m_autoGroupStack.size());
if (e->section==Entry::GROUPDOC_SEC) // auto group
{
m_autoGroupStack.push_back(Grouping(e->name,e->groupingPri()));
}
else // start of a member group
{
- //printf(" membergroup id=%d %s\n",m_memberGroupId,m_memberGroupHeader.data());
+ //printf(" membergroup id=%d %s\n",m_memberGroupId,qPrint(m_memberGroupHeader));
if (m_memberGroupId==DOX_NOGROUP) // no group started yet
{
auto info = std::make_unique<MemberGroupInfo>();
@@ -133,7 +133,7 @@ void DocGroup::open(Entry *e,const char *,int, bool implicit)
}
}
-void DocGroup::close(Entry *e,const char *fileName,int line,bool foundInline,bool implicit)
+void DocGroup::close(Entry *e,const QCString &fileName,int line,bool foundInline,bool implicit)
{
if (!implicit)
{
@@ -147,7 +147,7 @@ void DocGroup::close(Entry *e,const char *fileName,int line,bool foundInline,boo
}
}
//printf("==> closeGroup(name=%s,sec=%x,file=%s,line=%d) m_autoGroupStack=%d\n",
- // e->name.data(),e->section,fileName,line,m_autoGroupStack.size());
+ // qPrint(e->name),e->section,fileName,line,m_autoGroupStack.size());
if (m_memberGroupId!=DOX_NOGROUP) // end of member group
{
auto it = Doxygen::memberGroupInfoMap.find(m_memberGroupId);
@@ -170,7 +170,7 @@ void DocGroup::close(Entry *e,const char *fileName,int line,bool foundInline,boo
m_autoGroupStack.pop_back();
// see bug577005: we should not remove the last group for e
if (!foundInline && !e->groups.empty()) e->groups.pop_back();
- //printf("Removing %s e=%p\n",grp->groupname.data(),e);
+ //printf("Removing %s e=%p\n",qPrint(grp->groupname),e);
if (!foundInline) initGroupInfo(e);
}
}
@@ -178,14 +178,14 @@ void DocGroup::close(Entry *e,const char *fileName,int line,bool foundInline,boo
void DocGroup::initGroupInfo(Entry *e)
{
//printf("==> initGroup(id=%d,related=%s,e=%p)\n",m_memberGroupId,
- // m_memberGroupRelates.data(),e);
+ // qPrint(m_memberGroupRelates),e);
e->mGrpId = m_memberGroupId;
e->relates = m_memberGroupRelates;
if (!m_autoGroupStack.empty())
{
//printf("Appending group %s to %s: count=%d entry=%p\n",
- // m_autoGroupStack.top()->groupname.data(),
- // e->name.data(),e->groups->count(),e);
+ // qPrint(m_autoGroupStack.top()->groupname),
+ // qPrint(e->name),e->groups->count(),e);
e->groups.push_back(Grouping(m_autoGroupStack.back()));
}
}
diff --git a/src/docgroup.h b/src/docgroup.h
index 696e4f7..de22098 100644
--- a/src/docgroup.h
+++ b/src/docgroup.h
@@ -27,12 +27,12 @@ class DocGroup
DocGroup() {};
public:
- void enterFile(const char *fileName,int);
- void leaveFile(const char *fileName,int line);
- void enterCompound(const char *fileName,int line,const char *name);
- void leaveCompound(const char *,int,const char * /*name*/);
- void open(Entry *e,const char *,int,bool implicit=false);
- void close(Entry *e,const char *fileName,int line,bool foundInline,bool implicit=false);
+ void enterFile(const QCString &fileName,int);
+ void leaveFile(const QCString &fileName,int line);
+ void enterCompound(const QCString &fileName,int line,const QCString &name);
+ void leaveCompound(const QCString &,int,const QCString & /*name*/);
+ void open(Entry *e,const QCString &,int,bool implicit=false);
+ void close(Entry *e,const QCString &fileName,int line,bool foundInline,bool implicit=false);
void initGroupInfo(Entry *e);
bool isEmpty() const;
void clearHeader();
diff --git a/src/docparser.cpp b/src/docparser.cpp
index 75fe570..6e2a6d8 100644
--- a/src/docparser.cpp
+++ b/src/docparser.cpp
@@ -17,12 +17,9 @@
#include <stdlib.h>
#include <cassert>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qcstring.h>
#include <ctype.h>
-#include <qcstringlist.h>
+#include "qcstring.h"
#include "regex.h"
#include "doxygen.h"
#include "debug.h"
@@ -52,8 +49,10 @@
#include "markdown.h"
#include "htmlentity.h"
#include "emoji.h"
+#include "fileinfo.h"
+#include "dir.h"
-#define TK_COMMAND_CHAR(token) ((token)==TK_COMMAND_AT ? '@' : '\\')
+#define TK_COMMAND_CHAR(token) ((token)==TK_COMMAND_AT ? "@" : "\\")
// debug off
#define DBG(x) do {} while(0)
@@ -183,7 +182,7 @@ static void docParserPushContext(bool saveParamInfo=TRUE)
{
//QCString indent;
//indent.fill(' ',g_parserStack.count()*2+2);
- //printf("%sdocParserPushContext() count=%d\n",indent.data(),g_nodeStack.count());
+ //printf("%sdocParserPushContext() count=%d\n",qPrint(indent),g_nodeStack.count());
doctokenizerYYpushContext();
@@ -267,7 +266,7 @@ static void docParserPopContext(bool keepParamInfo=FALSE)
//QCString indent;
//indent.fill(' ',g_parserStack.count()*2+2);
- //printf("%sdocParserPopContext() count=%d\n",indent.data(),g_nodeStack.count());
+ //printf("%sdocParserPopContext() count=%d\n",qPrint(indent),g_nodeStack.count());
}
//---------------------------------------------------------------------------
@@ -276,21 +275,21 @@ static void docParserPopContext(bool keepParamInfo=FALSE)
// replaces &gt; with < and &gt; with > within string s
static void unescapeCRef(QCString &s)
{
- QCString tmp(s);
- char *p = tmp.rawData();
+ QCString result;
+ const char *p = s.data();
if (p)
{
char c;
- while ((c=*p))
+ while ((c=*p++))
{
if (c=='{') c='<'; else if (c=='}') c='>';
- *p++=c;
+ result+=c;
}
}
- tmp=substitute(tmp,"&lt;","<");
- tmp=substitute(tmp,"&gt;",">");
- s = tmp;
+ result=substitute(result,"&lt;","<");
+ result=substitute(result,"&gt;",">");
+ s = result;
}
//---------------------------------------------------------------------------
@@ -299,7 +298,7 @@ static void unescapeCRef(QCString &s)
* copies the image to the output directory (which depends on the \a type
* parameter).
*/
-static QCString findAndCopyImage(const char *fileName,DocImage::Type type, bool dowarn = true)
+static QCString findAndCopyImage(const QCString &fileName,DocImage::Type type, bool dowarn = true)
{
QCString result;
bool ambig;
@@ -313,12 +312,12 @@ static QCString findAndCopyImage(const char *fileName,DocImage::Type type, bool
text.sprintf("image file name %s is ambiguous.\n",qPrint(fileName));
text+="Possible candidates:\n";
text+=showFileDefMatches(Doxygen::imageNameLinkedMap,fileName);
- warn_doc_error(g_fileName,getDoctokinizerLineNr(),"%s", text.data());
+ warn_doc_error(g_fileName,getDoctokinizerLineNr(),"%s", qPrint(text));
}
QCString inputFile = fd->absFilePath();
- QFile inImage(inputFile);
- if (inImage.open(IO_ReadOnly))
+ FileInfo infi(inputFile.str());
+ if (infi.exists())
{
result = fileName;
int i;
@@ -326,7 +325,7 @@ static QCString findAndCopyImage(const char *fileName,DocImage::Type type, bool
{
result = result.right((int)result.length()-i-1);
}
- //printf("fileName=%s result=%s\n",fileName,result.data());
+ //printf("fileName=%s result=%s\n",fileName,qPrint(result));
QCString outputDir;
switch(type)
{
@@ -348,37 +347,21 @@ static QCString findAndCopyImage(const char *fileName,DocImage::Type type, bool
break;
}
QCString outputFile = outputDir+"/"+result;
- QFileInfo outfi(outputFile);
+ FileInfo outfi(outputFile.str());
if (outfi.isSymLink())
{
- QFile::remove(outputFile);
+ Dir().remove(outputFile.str());
warn_doc_error(g_fileName,getDoctokinizerLineNr(),
"destination of image %s is a symlink, replacing with image",
qPrint(outputFile));
}
if (outputFile!=inputFile) // prevent copying to ourself
{
- QFile outImage(outputFile.data());
- if (outImage.open(IO_WriteOnly)) // copy the image
+ if (copyFile(inputFile,outputFile) && type==DocImage::Html)
{
- char *buffer = new char[inImage.size()];
- inImage.readBlock(buffer,inImage.size());
- outImage.writeBlock(buffer,inImage.size());
- outImage.flush();
- delete[] buffer;
- if (type==DocImage::Html) Doxygen::indexList->addImageFile(result);
- }
- else
- {
- warn_doc_error(g_fileName,getDoctokinizerLineNr(),
- "could not write output image %s",qPrint(outputFile));
+ Doxygen::indexList->addImageFile(result);
}
}
- //else
- //{
- // warn(g_fileName,getDoctokinizerLineNr(),
- // "Prevented to copy file %s onto itself!\n",qPrint(inputFile));
- //}
}
else
{
@@ -394,8 +377,8 @@ static QCString findAndCopyImage(const char *fileName,DocImage::Type type, bool
QCString baseName = fd->name().left(fd->name().length()-4);
QCString epstopdfArgs(4096);
epstopdfArgs.sprintf("\"%s/%s.eps\" --outfile=\"%s/%s.pdf\"",
- outputDir.data(), baseName.data(),
- outputDir.data(), baseName.data());
+ qPrint(outputDir), qPrint(baseName),
+ qPrint(outputDir), qPrint(baseName));
Portable::sysTimerStart();
if (Portable::system("epstopdf",epstopdfArgs)!=0)
{
@@ -444,14 +427,14 @@ static void checkArgumentName(const std::string &name)
const auto &match = *it;
QCString aName=match.str();
if (lang==SrcLangExt_Fortran) aName=aName.lower();
- //printf("aName='%s'\n",aName.data());
+ //printf("aName='%s'\n",qPrint(aName));
bool found=FALSE;
for (const Argument &a : al)
{
QCString argName = g_memberDef->isDefine() ? a.type : a.name;
if (lang==SrcLangExt_Fortran) argName=argName.lower();
argName=argName.stripWhiteSpace();
- //printf("argName='%s' aName=%s\n",argName.data(),aName.data());
+ //printf("argName='%s' aName=%s\n",qPrint(argName),qPrint(aName));
if (argName.right(3)=="...") argName=argName.left(argName.length()-3);
if (aName==argName)
{
@@ -498,9 +481,9 @@ static void checkRetvalName(const QCString &name)
warn_doc_error(g_memberDef->getDefFileName(),
g_memberDef->getDefLine(),
"%s",
- ("return value '" + name + "' of " +
+ qPrint("return value '" + name + "' of " +
QCString(g_memberDef->qualifiedName()) +
- " has multiple documentation sections").data());
+ " has multiple documentation sections"));
}
g_retvalsFound.insert(name.str());
}
@@ -542,7 +525,7 @@ static void checkUnOrMultipleDocumentedParams()
{
for (const auto &par : g_paramsFound)
{
- if (argName == par) count++;
+ if (argName == QCString(par)) count++;
}
}
if ((count > 1) && Config_getBool(WARN_IF_DOC_ERROR))
@@ -550,10 +533,10 @@ static void checkUnOrMultipleDocumentedParams()
warn_doc_error(g_memberDef->getDefFileName(),
g_memberDef->getDefLine(),
"%s",
- ("argument '" + aName +
+ qPrint("argument '" + aName +
"' from the argument list of " +
QCString(g_memberDef->qualifiedName()) +
- " has multiple @param documentation sections").data());
+ " has multiple @param documentation sections"));
}
}
if ((notArgCnt>0) && Config_getBool(WARN_IF_INCOMPLETE_DOC))
@@ -591,7 +574,7 @@ static void checkUnOrMultipleDocumentedParams()
warn_incomplete_doc(g_memberDef->getDefFileName(),
g_memberDef->getDefLine(),
"%s",
- substitute(errMsg,"%","%%").data());
+ qPrint(substitute(errMsg,"%","%%")));
}
}
}
@@ -600,7 +583,7 @@ static void checkUnOrMultipleDocumentedParams()
//---------------------------------------------------------------------------
/*! Strips known html and tex extensions from \a text. */
-static QCString stripKnownExtensions(const char *text)
+static QCString stripKnownExtensions(const QCString &text)
{
QCString result=text;
if (result.right(4)==".tex")
@@ -690,10 +673,10 @@ static bool insideTable(DocNode *n)
* @retval TRUE if name was found.
* @retval FALSE if name was not found.
*/
-static bool findDocsForMemberOrCompound(const char *commandName,
- QCString *pDoc,
- QCString *pBrief,
- const Definition **pDef)
+static bool findDocsForMemberOrCompound(const QCString &commandName,
+ QCString *pDoc,
+ QCString *pBrief,
+ const Definition **pDef)
{
//printf("findDocsForMemberOrCompound(%s)\n",commandName);
*pDoc="";
@@ -765,11 +748,11 @@ static bool findDocsForMemberOrCompound(const char *commandName,
const ClassDef *cd=0;
const NamespaceDef *nd=0;
bool found = getDefs(
- g_context.find('.')==-1?g_context.data():"", // find('.') is a hack to detect files
+ g_context.find('.')==-1?g_context:QCString(), // find('.') is a hack to detect files
name,
- args.isEmpty()?0:args.data(),
+ args.isEmpty() ? QCString() : args,
md,cd,fd,nd,gd,FALSE,0,TRUE);
- //printf("found=%d context=%s name=%s\n",found,g_context.data(),name.data());
+ //printf("found=%d context=%s name=%s\n",found,qPrint(g_context),qPrint(name));
if (found && md)
{
*pDoc=md->documentation();
@@ -787,7 +770,7 @@ static bool findDocsForMemberOrCompound(const char *commandName,
{
fullName.prepend(g_context.left(scopeOffset)+"::");
}
- //printf("Trying fullName='%s'\n",fullName.data());
+ //printf("Trying fullName='%s'\n",qPrint(fullName));
// try class, namespace, group, page, file reference
cd = Doxygen::classLinkedMap->find(fullName);
@@ -823,7 +806,7 @@ static bool findDocsForMemberOrCompound(const char *commandName,
//---------------------------------------------------------------------------
inline void errorHandleDefaultToken(DocNode *parent,int tok,
- DocNodeList &children,const char *txt)
+ DocNodeList &children,const QCString &txt)
{
const char *cmd_start = "\\";
switch (tok)
@@ -834,16 +817,16 @@ inline void errorHandleDefaultToken(DocNode *parent,int tok,
case TK_COMMAND_BS:
children.push_back(std::make_unique<DocWord>(parent,TK_COMMAND_CHAR(tok) + g_token->name));
warn_doc_error(g_fileName,getDoctokinizerLineNr(),"Illegal command %s as part of a %s",
- qPrint(cmd_start + g_token->name),txt);
+ qPrint(cmd_start + g_token->name),qPrint(txt));
break;
case TK_SYMBOL:
warn_doc_error(g_fileName,getDoctokinizerLineNr(),"Unsupported symbol %s found found as part of a %s",
- qPrint(g_token->name), txt);
+ qPrint(g_token->name), qPrint(txt));
break;
default:
children.push_back(std::make_unique<DocWord>(parent,g_token->name));
warn_doc_error(g_fileName,getDoctokinizerLineNr(),"Unexpected token %s found as part of a %s",
- tokToString(tok), txt);
+ tokToString(tok), qPrint(txt));
break;
}
}
@@ -919,7 +902,7 @@ static void handleStyleEnter(DocNode *parent,DocNodeList &children,
* encountered.
*/
static void handleStyleLeave(DocNode *parent,DocNodeList &children,
- DocStyleChange::Style s,const char *tagName)
+ DocStyleChange::Style s,const QCString &tagName)
{
DBG(("HandleStyleLeave\n"));
QCString tagNameLower = QCString(tagName).lower();
@@ -1081,7 +1064,7 @@ static void handleLinkedWord(DocNode *parent,DocNodeList &children,bool ignoreAu
ClassDef *cd=0;
bool ambig;
FileDef *fd = findFileDef(Doxygen::inputNameLinkedMap,g_fileName,ambig);
- //printf("handleLinkedWord(%s) g_context=%s\n",g_token->name.data(),g_context.data());
+ //printf("handleLinkedWord(%s) g_context=%s\n",qPrint(g_token->name),qPrint(g_context));
if (!g_insideHtmlLink &&
(resolveRef(g_context,g_token->name,g_inSeeBlock,&compound,&member,TRUE,fd,TRUE)
|| (!g_context.isEmpty() && // also try with global scope
@@ -1114,7 +1097,7 @@ static void handleLinkedWord(DocNode *parent,DocNodeList &children,bool ignoreAu
}
else if (compound->definitionType()==Definition::TypeGroup)
{
- name=(toGroupDef(compound))->groupTitle();
+ name=toGroupDef(compound)->groupTitle();
}
children.push_back(
std::make_unique<DocLinkedWord>(
@@ -1273,7 +1256,7 @@ static void defaultHandleTitleAndSize(const int cmd, DocNode *parent, DocNodeLis
}
if (!defaultHandleToken(parent,tok,children))
{
- errorHandleDefaultToken(parent,tok,children,Mappers::cmdMapper->find(cmd).data());
+ errorHandleDefaultToken(parent,tok,children,Mappers::cmdMapper->find(cmd));
}
}
// parse size attributes
@@ -1302,7 +1285,7 @@ static void defaultHandleTitleAndSize(const int cmd, DocNode *parent, DocNodeLis
else
{
warn_doc_error(g_fileName,getDoctokinizerLineNr(),"Unknown option '%s' after \\%s command, expected 'width' or 'height'",
- qPrint(g_token->name), Mappers::cmdMapper->find(cmd).data());
+ qPrint(g_token->name), qPrint(Mappers::cmdMapper->find(cmd)));
break;
}
}
@@ -1524,7 +1507,7 @@ reparsetoken:
(void)doctokenizerYYlex();
scope = g_token->name;
g_context = scope;
- //printf("Found scope='%s'\n",scope.data());
+ //printf("Found scope='%s'\n",qPrint(scope));
doctokenizerYYsetStatePara();
}
break;
@@ -1737,7 +1720,7 @@ static void handleImg(DocNode *parent, DocNodeList &children,const HtmlAttribLis
uint index=0;
for (const auto &opt : tagHtmlAttribs)
{
- //printf("option name=%s value=%s\n",opt.name.data(),opt.value.data());
+ //printf("option name=%s value=%s\n",qPrint(opt.name),qPrint(opt.value));
if (opt.name=="src" && !opt.value.isEmpty())
{
// copy attributes
@@ -1780,7 +1763,7 @@ DocEmoji::DocEmoji(DocNode *parent,const QCString &symName) :
if (locSymName.at(0)!=':') locSymName.prepend(":");
}
m_symName = locSymName;
- m_index = EmojiEntityMapper::instance()->symbol2index(m_symName);
+ m_index = EmojiEntityMapper::instance()->symbol2index(m_symName.str());
if (m_index==-1)
{
warn_doc_error(g_fileName,getDoctokinizerLineNr(),"Found unsupported emoji symbol '%s'\n",qPrint(m_symName));
@@ -1796,7 +1779,7 @@ static int internalValidatingParseDoc(DocNode *parent,DocNodeList &children,
if (doc.isEmpty()) return retval;
- doctokenizerYYinit(doc,g_fileName,g_markdownSupport);
+ doctokenizerYYinit(doc.data(),g_fileName,g_markdownSupport);
// first parse any number of paragraphs
bool isFirst=TRUE;
@@ -1834,9 +1817,9 @@ static int internalValidatingParseDoc(DocNode *parent,DocNodeList &children,
static void readTextFileByName(const QCString &file,QCString &text)
{
- if (Portable::isAbsolutePath(file.data()))
+ if (Portable::isAbsolutePath(file))
{
- QFileInfo fi(file);
+ FileInfo fi(file.str());
if (fi.exists())
{
text = fileToString(file,Config_getBool(FILTER_SOURCE_FILES));
@@ -1846,11 +1829,11 @@ static void readTextFileByName(const QCString &file,QCString &text)
const StringVector &examplePathList = Config_getList(EXAMPLE_PATH);
for (const auto &s : examplePathList)
{
- QCString absFileName = QCString(s.c_str())+Portable::pathSeparator()+file;
- QFileInfo fi(absFileName);
+ std::string absFileName = s+(Portable::pathSeparator()+file).str();
+ FileInfo fi(absFileName);
if (fi.exists())
{
- text = fileToString(absFileName,Config_getBool(FILTER_SOURCE_FILES));
+ text = fileToString(QCString(absFileName),Config_getBool(FILTER_SOURCE_FILES));
return;
}
}
@@ -1882,7 +1865,7 @@ DocWord::DocWord(DocNode *parent,const QCString &word) :
m_word(word)
{
m_parent = parent;
- //printf("new word %s url=%s\n",word.data(),g_searchUrl.data());
+ //printf("new word %s url=%s\n",qPrint(word),qPrint(g_searchUrl));
if (Doxygen::searchIndex && !g_searchUrl.isEmpty())
{
Doxygen::searchIndex->addWord(word,FALSE);
@@ -1900,7 +1883,7 @@ DocLinkedWord::DocLinkedWord(DocNode *parent,const QCString &word,
{
m_parent = parent;
//printf("DocLinkedWord: new word %s url=%s tooltip='%s'\n",
- // word.data(),g_searchUrl.data(),tooltip.data());
+ // qPrint(word),qPrint(g_searchUrl),qPrint(tooltip));
if (Doxygen::searchIndex && !g_searchUrl.isEmpty())
{
Doxygen::searchIndex->addWord(word,FALSE);
@@ -1944,7 +1927,7 @@ DocAnchor::DocAnchor(DocNode *parent,const QCString &id,bool newAnchor)
const SectionInfo *sec = SectionManager::instance().find(id);
if (sec)
{
- //printf("Found anchor %s\n",id.data());
+ //printf("Found anchor %s\n",qPrint(id));
m_file = sec->fileName();
m_anchor = sec->label();
}
@@ -1991,7 +1974,7 @@ void DocInclude::parse()
g_includeFileLength = m_text.length();
g_includeFileLine = 0;
g_includeFileShowLineNo = (m_type == DontIncWithLines || m_type == IncWithLines);
- //printf("g_includeFile=<<%s>>\n",g_includeFileText.data());
+ //printf("g_includeFile=<<%s>>\n",qPrint(g_includeFileText));
break;
case VerbInclude:
// fall through
@@ -2012,7 +1995,7 @@ void DocInclude::parse()
if (!m_blockId.isEmpty() && (count=m_text.contains(m_blockId.data()))!=2)
{
warn_doc_error(g_fileName,getDoctokinizerLineNr(),"block marked with %s for \\snippet should appear twice in file %s, found it %d times\n",
- m_blockId.data(),m_file.data(),count);
+ qPrint(m_blockId),qPrint(m_file),count);
}
break;
case DocInclude::SnippetDoc:
@@ -2035,11 +2018,11 @@ void DocIncOperator::parse()
}
m_includeFileName = g_includeFileName;
- const char *p = g_includeFileText;
+ const char *p = g_includeFileText.data();
uint l = g_includeFileLength;
uint o = g_includeFileOffset;
int il = g_includeFileLine;
- DBG(("DocIncOperator::parse() text=%s off=%d len=%d\n",qPrint(p),o,l));
+ DBG(("DocIncOperator::parse() text=%s off=%d len=%d\n",p,o,l));
uint so = o,bo;
bool nonEmpty = FALSE;
switch(type())
@@ -2066,7 +2049,7 @@ void DocIncOperator::parse()
m_text = g_includeFileText.mid(so,o-so);
DBG(("DocIncOperator::parse() Line: %s\n",qPrint(m_text)));
}
- g_includeFileOffset = QMIN(l,o+1); // set pointer to start of new line
+ g_includeFileOffset = std::min(l,o+1); // set pointer to start of new line
m_showLineNo = g_includeFileShowLineNo;
break;
case SkipLine:
@@ -2097,7 +2080,7 @@ void DocIncOperator::parse()
}
o++; // skip new line
}
- g_includeFileOffset = QMIN(l,o+1); // set pointer to start of new line
+ g_includeFileOffset = std::min(l,o+1); // set pointer to start of new line
m_showLineNo = g_includeFileShowLineNo;
break;
case Skip:
@@ -2157,7 +2140,7 @@ void DocIncOperator::parse()
}
o++; // skip new line
}
- g_includeFileOffset = QMIN(l,o+1); // set pointer to start of new line
+ g_includeFileOffset = std::min(l,o+1); // set pointer to start of new line
m_showLineNo = g_includeFileShowLineNo;
break;
}
@@ -2165,7 +2148,7 @@ void DocIncOperator::parse()
//---------------------------------------------------------------------------
-DocXRefItem::DocXRefItem(DocNode *parent,int id,const char *key) :
+DocXRefItem::DocXRefItem(DocNode *parent,int id,const QCString &key) :
m_id(id), m_key(key), m_relPath(g_relPath)
{
m_parent = parent;
@@ -2192,7 +2175,7 @@ bool DocXRefItem::parse()
}
m_title = refList->sectionTitle();
//printf("DocXRefItem: file=%s anchor=%s title=%s\n",
- // m_file.data(),m_anchor.data(),m_title.data());
+ // qPrint(m_file),qPrint(m_anchor),qPrint(m_title));
if (!item->text().isEmpty())
{
@@ -2401,7 +2384,7 @@ DocRef::DocRef(DocNode *parent,const QCString &target,const QCString &context) :
m_parent = parent;
const Definition *compound = 0;
QCString anchor;
- //printf("DocRef::DocRef(target=%s,context=%s)\n",target.data(),context.data());
+ //printf("DocRef::DocRef(target=%s,context=%s)\n",qPrint(target),qPrint(context));
ASSERT(!target.isEmpty());
SrcLangExt lang = getLanguageFromFileName(target);
m_relPath = g_relPath;
@@ -2437,7 +2420,7 @@ DocRef::DocRef(DocNode *parent,const QCString &target,const QCString &context) :
m_isSubPage = pd && pd->hasParentPage();
if (sec->type()!=SectionType::Page || m_isSubPage) m_anchor = sec->label();
//printf("m_text=%s,m_ref=%s,m_file=%s,type=%d\n",
- // m_text.data(),m_ref.data(),m_file.data(),m_refType);
+ // qPrint(m_text),qPrint(m_ref),qPrint(m_file),m_refType);
return;
}
else if (resolveLink(context,target,TRUE,&compound,anchor))
@@ -2452,13 +2435,13 @@ DocRef::DocRef(DocNode *parent,const QCString &target,const QCString &context) :
{
if (anchor.isEmpty() && /* compound link */
compound->definitionType()==Definition::TypeGroup && /* is group */
- (toGroupDef(compound))->groupTitle() /* with title */
+ !toGroupDef(compound)->groupTitle().isEmpty() /* with title */
)
{
m_text=(toGroupDef(compound))->groupTitle(); // use group's title as link
}
else if (compound->definitionType()==Definition::TypeMember &&
- (toMemberDef(compound))->isObjCMethod())
+ toMemberDef(compound)->isObjCMethod())
{
// Objective C Method
const MemberDef *member = toMemberDef(compound);
@@ -2468,12 +2451,12 @@ DocRef::DocRef(DocNode *parent,const QCString &target,const QCString &context) :
m_file = compound->getOutputFileBase();
m_ref = compound->getReference();
- //printf("isFile=%d compound=%s (%d)\n",isFile,compound->name().data(),
+ //printf("isFile=%d compound=%s (%d)\n",isFile,qPrint(compound->name()),
// compound->definitionType());
return;
}
else if (compound && compound->definitionType()==Definition::TypeFile &&
- (toFileDef(compound))->generateSourceFile()
+ toFileDef(compound)->generateSourceFile()
) // undocumented file that has source code we can link to
{
m_file = compound->getSourceFileBase();
@@ -2553,12 +2536,12 @@ DocCite::DocCite(DocNode *parent,const QCString &target,const QCString &) //cont
{
size_t numBibFiles = Config_getList(CITE_BIB_FILES).size();
m_parent = parent;
- //printf("DocCite::DocCite(target=%s)\n",target.data());
+ //printf("DocCite::DocCite(target=%s)\n",qPrint(target));
ASSERT(!target.isEmpty());
m_relPath = g_relPath;
const CitationManager &ct = CitationManager::instance();
const CiteInfo *cite = ct.find(target);
- //printf("cite=%p text='%s' numBibFiles=%d\n",cite,cite?cite->text.data():"<null>",numBibFiles);
+ //printf("cite=%p text='%s' numBibFiles=%d\n",cite,cite?qPrint(cite->text):"<null>",numBibFiles);
if (numBibFiles>0 && cite && !cite->text().isEmpty()) // ref to citation
{
m_text = cite->text();
@@ -2566,7 +2549,7 @@ DocCite::DocCite(DocNode *parent,const QCString &target,const QCString &) //cont
m_anchor = ct.anchorPrefix()+cite->label();
m_file = convertNameToFile(ct.fileName(),FALSE,TRUE);
//printf("CITE ==> m_text=%s,m_ref=%s,m_file=%s,m_anchor=%s\n",
- // m_text.data(),m_ref.data(),m_file.data(),m_anchor.data());
+ // qPrint(m_text),qPrint(m_ref),qPrint(m_file),qPrint(m_anchor));
return;
}
m_text = target;
@@ -2599,8 +2582,7 @@ DocLink::DocLink(DocNode *parent,const QCString &target)
{
m_refText = m_refText.right(m_refText.length()-1);
}
- if (resolveLink(g_context,stripKnownExtensions(target),g_inSeeBlock,
- &compound,anchor))
+ if (resolveLink(g_context,stripKnownExtensions(target),g_inSeeBlock,&compound,anchor))
{
m_anchor = anchor;
if (compound && compound->isLinkable())
@@ -3087,7 +3069,7 @@ int DocInternal::parse(int level)
)
{
DocSection *s=new DocSection(this,
- QMIN(level+Doxygen::subpageNestingLevel,5),g_token->sectionId);
+ std::min(level+Doxygen::subpageNestingLevel,5),g_token->sectionId);
m_children.push_back(std::unique_ptr<DocSection>(s));
retval = s->parse();
}
@@ -3206,7 +3188,7 @@ DocHtmlCaption::DocHtmlCaption(DocNode *parent,const HtmlAttribList &attribs)
const SectionInfo *sec = SectionManager::instance().find(opt.value);
if (sec)
{
- //printf("Found anchor %s\n",id.data());
+ //printf("Found anchor %s\n",qPrint(id));
m_file = sec->fileName();
m_anchor = sec->label();
m_hasCaptionId = TRUE;
@@ -3358,7 +3340,7 @@ uint DocHtmlCell::colSpan() const
{
if (attr.name.lower()=="colspan")
{
- return QMAX(1,attr.value.toUInt());
+ return std::max(1u,attr.value.toUInt());
}
}
return 1;
@@ -4309,7 +4291,7 @@ int DocAutoList::parse()
//printf("DocAutoList::parse(): retval=0x%x g_token->indent=%d m_indent=%d "
// "m_isEnumList=%d g_token->isEnumList=%d g_token->name=%s\n",
// retval,g_token->indent,m_indent,m_isEnumList,g_token->isEnumList,
- // g_token->name.data());
+ // qPrint(g_token->name));
//printf("num=%d g_token->id=%d\n",num,g_token->id);
}
while (retval==TK_LISTITEM && // new list item
@@ -5076,24 +5058,28 @@ void DocPara::handleInclude(const QCString &cmdName,DocInclude::Type t)
doctokenizerYYsetStateOptions();
tok=doctokenizerYYlex();
doctokenizerYYsetStatePara();
- QCStringList optList=QCStringList::split(",",g_token->name);
- if (t==DocInclude::Include && optList.contains("lineno"))
+ StringVector optList=split(g_token->name.str(),",");
+ auto contains = [&optList](const char *kw)
+ {
+ return std::find(optList.begin(),optList.end(),kw)!=optList.end();
+ };
+ if (t==DocInclude::Include && contains("lineno"))
{
t = DocInclude::IncWithLines;
}
- else if (t==DocInclude::Snippet && optList.contains("lineno"))
+ else if (t==DocInclude::Snippet && contains("lineno"))
{
t = DocInclude::SnipWithLines;
}
- else if (t==DocInclude::DontInclude && optList.contains("lineno"))
+ else if (t==DocInclude::DontInclude && contains("lineno"))
{
t = DocInclude::DontIncWithLines;
}
- else if (t==DocInclude::Include && optList.contains("doc"))
+ else if (t==DocInclude::Include && contains("doc"))
{
t = DocInclude::IncludeDoc;
}
- else if (t==DocInclude::Snippet && optList.contains("doc"))
+ else if (t==DocInclude::Snippet && contains("doc"))
{
t = DocInclude::SnippetDoc;
}
@@ -5256,7 +5242,7 @@ void DocPara::handleInheritDoc()
if (reMd) // member from which was inherited.
{
const MemberDef *thisMd = g_memberDef;
- //printf("{InheritDocs:%s=>%s}\n",g_memberDef->qualifiedName().data(),reMd->qualifiedName().data());
+ //printf("{InheritDocs:%s=>%s}\n",qPrint(g_memberDef->qualifiedName()),qPrint(reMd->qualifiedName()));
docParserPushContext();
g_scope=reMd->getOuterScope();
if (g_scope!=Doxygen::globalScope)
@@ -5286,7 +5272,7 @@ int DocPara::handleCommand(const QCString &cmdName, const int tok)
{
case CMD_UNKNOWN:
m_children.push_back(std::make_unique<DocWord>(this,TK_COMMAND_CHAR(tok) + cmdName));
- warn_doc_error(g_fileName,getDoctokinizerLineNr(),"Found unknown command '%c%s'",TK_COMMAND_CHAR(tok),qPrint(cmdName));
+ warn_doc_error(g_fileName,getDoctokinizerLineNr(),"Found unknown command '%s%s'",TK_COMMAND_CHAR(tok),qPrint(cmdName));
break;
case CMD_EMPHASIS:
m_children.push_back(std::make_unique<DocStyleChange>(this,(uint)g_nodeStack.size(),DocStyleChange::Italic,cmdName,TRUE));
@@ -5809,7 +5795,7 @@ int DocPara::handleHtmlStartTag(const QCString &tagName,const HtmlAttribList &ta
tagId!=HTML_UNKNOWN && tagId!=HTML_IMG && tagId!=HTML_BR && tagId!=HTML_HR && tagId!=HTML_P)
{
warn_doc_error(g_fileName,getDoctokinizerLineNr(),"HTML tag ('<%s/>') may not use the 'empty tag' XHTML syntax.",
- tagName.data());
+ qPrint(tagName));
}
switch (tagId)
{
@@ -6035,7 +6021,7 @@ int DocPara::handleHtmlStartTag(const QCString &tagName,const HtmlAttribList &ta
QCString paramName;
if (findAttribute(tagHtmlAttribs,"name",&paramName))
{
- //printf("paramName=%s\n",paramName.data());
+ //printf("paramName=%s\n",qPrint(paramName));
m_children.push_back(std::make_unique<DocStyleChange>(this,(uint)g_nodeStack.size(),DocStyleChange::Italic,tagName,TRUE));
m_children.push_back(std::make_unique<DocWord>(this,paramName));
m_children.push_back(std::make_unique<DocStyleChange>(this,(uint)g_nodeStack.size(),DocStyleChange::Italic,tagName,FALSE));
@@ -6590,7 +6576,7 @@ reparsetoken:
{
// simple section cannot start in this paragraph, need
// to unwind the stack and remember the command.
- g_token->simpleSectName = g_token->name.copy();
+ g_token->simpleSectName = g_token->name;
retval=RetVal_SimpleSec;
goto endparagraph;
}
@@ -6807,7 +6793,7 @@ int DocSection::parse()
while (retval==RetVal_Subsection) // more sections follow
{
DocSection *s=new DocSection(this,
- QMIN(2+Doxygen::subpageNestingLevel,5),g_token->sectionId);
+ std::min(2+Doxygen::subpageNestingLevel,5),g_token->sectionId);
m_children.push_back(std::unique_ptr<DocSection>(s));
retval = s->parse();
}
@@ -6821,13 +6807,13 @@ int DocSection::parse()
while (retval==RetVal_Subsubsection) // more sections follow
{
DocSection *s=new DocSection(this,
- QMIN(3+Doxygen::subpageNestingLevel,5),g_token->sectionId);
+ std::min(3+Doxygen::subpageNestingLevel,5),g_token->sectionId);
m_children.push_back(std::unique_ptr<DocSection>(s));
retval = s->parse();
}
if (!(m_level<Doxygen::subpageNestingLevel+2 && retval == RetVal_Subsection)) break;
}
- else if (retval==RetVal_Paragraph && m_level<=QMIN(5,Doxygen::subpageNestingLevel+3))
+ else if (retval==RetVal_Paragraph && m_level<=std::min(5,Doxygen::subpageNestingLevel+3))
{
if ((m_level<=2+Doxygen::subpageNestingLevel) && !g_token->sectionId.startsWith("autotoc_md"))
warn_doc_error(g_fileName,getDoctokinizerLineNr(),"Unexpected paragraph command found inside %s!",sectionLevelToName[m_level]);
@@ -6835,7 +6821,7 @@ int DocSection::parse()
while (retval==RetVal_Paragraph) // more sections follow
{
DocSection *s=new DocSection(this,
- QMIN(4+Doxygen::subpageNestingLevel,5),g_token->sectionId);
+ std::min(4+Doxygen::subpageNestingLevel,5),g_token->sectionId);
m_children.push_back(std::unique_ptr<DocSection>(s));
retval = s->parse();
}
@@ -7008,7 +6994,7 @@ void DocRoot::parse()
if (sec)
{
DocSection *s=new DocSection(this,
- QMIN(4+Doxygen::subpageNestingLevel,5),g_token->sectionId);
+ std::min(4+Doxygen::subpageNestingLevel,5),g_token->sectionId);
m_children.push_back(std::unique_ptr<DocSection>(s));
retval = s->parse();
}
@@ -7037,7 +7023,7 @@ void DocRoot::parse()
if (sec)
{
DocSection *s=new DocSection(this,
- QMIN(3+Doxygen::subpageNestingLevel,5),g_token->sectionId);
+ std::min(3+Doxygen::subpageNestingLevel,5),g_token->sectionId);
m_children.push_back(std::unique_ptr<DocSection>(s));
retval = s->parse();
}
@@ -7068,7 +7054,7 @@ void DocRoot::parse()
if (sec)
{
DocSection *s=new DocSection(this,
- QMIN(2+Doxygen::subpageNestingLevel,5),g_token->sectionId);
+ std::min(2+Doxygen::subpageNestingLevel,5),g_token->sectionId);
m_children.push_back(std::unique_ptr<DocSection>(s));
retval = s->parse();
}
@@ -7108,7 +7094,7 @@ void DocRoot::parse()
if (sec)
{
DocSection *s=new DocSection(this,
- QMIN(1+Doxygen::subpageNestingLevel,5),g_token->sectionId);
+ std::min(1+Doxygen::subpageNestingLevel,5),g_token->sectionId);
m_children.push_back(std::unique_ptr<DocSection>(s));
retval = s->parse();
}
@@ -7180,10 +7166,8 @@ static QCString extractCopyDocId(const char *data, uint &j, uint len)
j+=9;
}
e=j;
- QCString id(e-s+1);
- if (e>s) memcpy(id.rawData(),data+s,e-s);
- id.at(e-s)='\0';
- //printf("extractCopyDocId='%s' input='%s'\n",id.data(),&data[s]);
+ QCString id(data+s,e-s);
+ //printf("extractCopyDocId='%s' input='%s'\n",qPrint(id),&data[s]);
return id;
}
@@ -7223,7 +7207,7 @@ static uint isVerbatimSection(const char *data,uint i,uint len,QCString &endMark
CHECK_FOR_COMMAND("docbookonly",endMarker="enddocbookonly");
CHECK_FOR_COMMAND("startuml",endMarker="enduml");
}
- //printf("isVerbatimSection(%s)=%d)\n",QCString(&data[i]).left(10).data(),j);
+ //printf("isVerbatimSection(%s)=%d)\n",qPrint(QCString(&data[i]).left(10)),j);
return j;
}
@@ -7234,7 +7218,7 @@ static uint skipToEndMarker(const char *data,uint i,uint len,const QCString &end
if ((data[i]=='@' || data[i]=='\\') && // start of command character
(i==0 || (data[i-1]!='@' && data[i-1]!='\\'))) // that is not escaped
{
- if (i+endMarker.length()+1<=len && qstrncmp(data+i+1,endMarker,endMarker.length())==0)
+ if (i+endMarker.length()+1<=len && qstrncmp(data+i+1,endMarker.data(),endMarker.length())==0)
{
return i+endMarker.length()+1;
}
@@ -7265,10 +7249,10 @@ static QCString processCopyDoc(const char *data,uint &len)
QCString id = extractCopyDocId(data,j,len);
const Definition *def = 0;
QCString doc,brief;
- //printf("resolving docs='%s'\n",id.data());
+ //printf("resolving docs='%s'\n",qPrint(id));
if (findDocsForMemberOrCompound(id,&doc,&brief,&def))
{
- //printf("found it def=%p brief='%s' doc='%s' isBrief=%d\n",def,brief.data(),doc.data(),isBrief);
+ //printf("found it def=%p brief='%s' doc='%s' isBrief=%d\n",def,qPrint(brief),qPrint(doc),isBrief);
auto it = std::find(g_copyStack.begin(),g_copyStack.end(),def);
if (it==g_copyStack.end()) // definition not parsed earlier
{
@@ -7276,12 +7260,12 @@ static QCString processCopyDoc(const char *data,uint &len)
if (isBrief)
{
uint l=brief.length();
- buf.addStr(processCopyDoc(brief,l));
+ buf.addStr(processCopyDoc(brief.data(),l));
}
else
{
uint l=doc.length();
- buf.addStr(processCopyDoc(doc,l));
+ buf.addStr(processCopyDoc(doc.data(),l));
}
g_copyStack.pop_back();
}
@@ -7289,14 +7273,14 @@ static QCString processCopyDoc(const char *data,uint &len)
{
warn_doc_error(g_fileName,getDoctokinizerLineNr(),
"Found recursive @copy%s or @copydoc relation for argument '%s'.\n",
- isBrief?"brief":"details",id.data());
+ isBrief?"brief":"details",qPrint(id));
}
}
else
{
warn_doc_error(g_fileName,getDoctokinizerLineNr(),
"@copy%s or @copydoc target '%s' not found", isBrief?"brief":"details",
- id.data());
+ qPrint(id));
}
// skip over command
i=j;
@@ -7331,15 +7315,15 @@ static QCString processCopyDoc(const char *data,uint &len)
//---------------------------------------------------------------------------
-DocRoot *validatingParseDoc(const char *fileName,int startLine,
+DocRoot *validatingParseDoc(const QCString &fileName,int startLine,
const Definition *ctx,const MemberDef *md,
- const char *input,bool indexWords,
- bool isExample, const char *exampleName,
+ const QCString &input,bool indexWords,
+ bool isExample, const QCString &exampleName,
bool singleLine, bool linkFromIndex,
bool markdownSupport)
{
- //printf("validatingParseDoc(%s,%s)=[%s]\n",ctx?ctx->name().data():"<none>",
- // md?md->name().data():"<none>",
+ //printf("validatingParseDoc(%s,%s)=[%s]\n",ctx?qPrint(ctx->name()):"<none>",
+ // md?qPrint(md->name()):"<none>",
// input);
//printf("========== validating %s at line %d\n",fileName,startLine);
//printf("---------------- input --------------------\n%s\n----------- end input -------------------\n",input);
@@ -7474,7 +7458,7 @@ DocRoot *validatingParseDoc(const char *fileName,int startLine,
g_relPath = (!linkFromIndex && ctx) ?
QCString(relativePathToRoot(ctx->getOutputFileBase())) :
QCString("");
- //printf("ctx->name=%s relPath=%s\n",ctx->name().data(),g_relPath.data());
+ //printf("ctx->name=%s relPath=%s\n",qPrint(ctx->name()),qPrint(g_relPath));
g_memberDef = md;
while (!g_nodeStack.empty()) g_nodeStack.pop();
while (!g_styleStack.empty()) g_styleStack.pop();
@@ -7493,16 +7477,16 @@ DocRoot *validatingParseDoc(const char *fileName,int startLine,
g_paramsFound.clear();
g_markdownSupport = markdownSupport;
- //printf("Starting comment block at %s:%d\n",g_fileName.data(),startLine);
+ //printf("Starting comment block at %s:%d\n",qPrint(g_fileName),startLine);
setDoctokinizerLineNr(startLine);
- uint inpLen=qstrlen(input);
- QCString inpStr = processCopyDoc(input,inpLen);
+ uint ioLen = input.length();
+ QCString inpStr = processCopyDoc(input.data(),ioLen);
if (inpStr.isEmpty() || inpStr.at(inpStr.length()-1)!='\n')
{
inpStr+='\n';
}
- //printf("processCopyDoc(in='%s' out='%s')\n",input,inpStr.data());
- doctokenizerYYinit(inpStr,g_fileName,markdownSupport);
+ //printf("processCopyDoc(in='%s' out='%s')\n",input,qPrint(inpStr));
+ doctokenizerYYinit(inpStr.data(),g_fileName,markdownSupport);
// build abstract syntax tree
DocRoot *root = new DocRoot(md!=0,singleLine);
@@ -7528,13 +7512,13 @@ DocRoot *validatingParseDoc(const char *fileName,int startLine,
// restore original parser state
docParserPopContext();
- //printf(">>>>>> end validatingParseDoc(%s,%s)\n",ctx?ctx->name().data():"<none>",
- // md?md->name().data():"<none>");
+ //printf(">>>>>> end validatingParseDoc(%s,%s)\n",ctx?qPrint(ctx->name()):"<none>",
+ // md?qPrint(md->name()):"<none>");
return root;
}
-DocText *validatingParseText(const char *input)
+DocText *validatingParseText(const QCString &input)
{
// store parser state so we can re-enter this function if needed
docParserPushContext();
@@ -7565,10 +7549,10 @@ DocText *validatingParseText(const char *input)
DocText *txt = new DocText;
- if (input)
+ if (!input.isEmpty())
{
setDoctokinizerLineNr(1);
- doctokenizerYYinit(input,g_fileName,Config_getBool(MARKDOWN_SUPPORT));
+ doctokenizerYYinit(input.data(),g_fileName,Config_getBool(MARKDOWN_SUPPORT));
// build abstract syntax tree
txt->parse();
@@ -7587,9 +7571,9 @@ DocText *validatingParseText(const char *input)
return txt;
}
-void docFindSections(const char *input,
+void docFindSections(const QCString &input,
const Definition *d,
- const char *fileName)
+ const QCString &fileName)
{
doctokenizerYYFindSections(input,d,fileName);
}
diff --git a/src/docparser.h b/src/docparser.h
index 3f243e2..3de54bd 100644
--- a/src/docparser.h
+++ b/src/docparser.h
@@ -23,8 +23,7 @@
#include <vector>
#include <memory>
-#include <qcstring.h>
-
+#include "qcstring.h"
#include "docvisitor.h"
#include "htmlattrib.h"
@@ -57,22 +56,22 @@ class MemberGroup;
* @returns Root node of the abstract syntax tree. Ownership of the
* pointer is handed over to the caller.
*/
-DocRoot *validatingParseDoc(const char *fileName,int startLine,
+DocRoot *validatingParseDoc(const QCString &fileName,int startLine,
const Definition *context, const MemberDef *md,
- const char *input,bool indexWords,
- bool isExample,const char *exampleName,
+ const QCString &input,bool indexWords,
+ bool isExample,const QCString &exampleName,
bool singleLine,bool linkFromIndex,
bool markdownSupport);
/*! Main entry point for parsing simple text fragments. These
* fragments are limited to words, whitespace and symbols.
*/
-DocText *validatingParseText(const char *input);
+DocText *validatingParseText(const QCString &input);
/*! Searches for section and anchor commands in the input */
-void docFindSections(const char *input,
+void docFindSections(const QCString &input,
const Definition *d,
- const char *fileName);
+ const QCString &fileName);
//---------------------------------------------------------------------------
@@ -160,9 +159,6 @@ class DocNode
/*! Returns TRUE iff this node is inside a preformatted section */
bool isPreformatted() const { return m_insidePre; }
- //virtual QString::Direction getTextDir() const { return QString::DirNeutral; }
- //virtual QString::Direction getTextBasicDir() const { return QString::DirNeutral; }
-
protected:
/*! Sets whether or not this item is inside a preformatted section */
void setInsidePreformatted(bool p) { m_insidePre = p; }
@@ -540,9 +536,9 @@ class DocInclude : public DocNode
IncWithLines, Snippet , IncludeDoc, SnippetDoc, SnipWithLines,
DontIncWithLines, RtfInclude, ManInclude, DocbookInclude, XmlInclude};
DocInclude(DocNode *parent,const QCString &file,
- const QCString context, Type t,
- bool isExample,const QCString exampleFile,
- const QCString blockId, bool isBlock) :
+ const QCString &context, Type t,
+ bool isExample,const QCString &exampleFile,
+ const QCString &blockId, bool isBlock) :
m_file(file), m_context(context), m_type(t),
m_isExample(isExample), m_isBlock(isBlock),
m_exampleFile(exampleFile), m_blockId(blockId) { m_parent = parent; }
@@ -552,7 +548,7 @@ class DocInclude : public DocNode
if (i!=-1)
return m_file.right(m_file.length()-(uint)i);
else
- return "";
+ return QCString();
}
Type type() const { return m_type; }
QCString text() const { return m_text; }
@@ -718,7 +714,7 @@ class DocTitle : public CompAccept<DocTitle>
class DocXRefItem : public CompAccept<DocXRefItem>
{
public:
- DocXRefItem(DocNode *parent,int id,const char *key);
+ DocXRefItem(DocNode *parent,int id,const QCString &key);
Kind kind() const { return Kind_XRefItem; }
QCString file() const { return m_file; }
QCString anchor() const { return m_anchor; }
diff --git a/src/docsets.cpp b/src/docsets.cpp
index f7c8c18..bf589c4 100644
--- a/src/docsets.cpp
+++ b/src/docsets.cpp
@@ -15,8 +15,8 @@
#include <set>
#include <stack>
+#include <fstream>
-#include <qfile.h>
#include "docsets.h"
#include "config.h"
#include "message.h"
@@ -27,15 +27,15 @@
#include "memberdef.h"
#include "namespacedef.h"
#include "util.h"
-#include "ftextstream.h"
+#include "textstream.h"
struct DocSets::Private
{
QCString indent();
- QFile nf;
- QFile tf;
- FTextStream nts;
- FTextStream tts;
+ std::ofstream ntf;
+ TextStream nts;
+ std::ofstream ttf;
+ TextStream tts;
std::stack<bool> indentStack;
std::set<std::string> scopes;
};
@@ -67,135 +67,135 @@ void DocSets::initialize()
// -- write Makefile
{
- QCString mfName = Config_getString(HTML_OUTPUT) + "/Makefile";
- QFile makefile(mfName);
- if (!makefile.open(IO_WriteOnly))
- {
- term("Could not open file %s for writing\n",mfName.data());
- }
- FTextStream ts(&makefile);
+ QCString mfName = Config_getString(HTML_OUTPUT) + "/Makefile";
+ std::ofstream ts(mfName.str(),std::ofstream::out | std::ofstream::binary);
+ if (!ts.is_open())
+ {
+ term("Could not open file %s for writing\n",qPrint(mfName));
+ }
- ts << "DOCSET_NAME=" << bundleId << ".docset\n"
- "DOCSET_CONTENTS=$(DOCSET_NAME)/Contents\n"
- "DOCSET_RESOURCES=$(DOCSET_CONTENTS)/Resources\n"
- "DOCSET_DOCUMENTS=$(DOCSET_RESOURCES)/Documents\n"
- "DESTDIR=~/Library/Developer/Shared/Documentation/DocSets\n"
- "XCODE_INSTALL=\"$(shell xcode-select -print-path)\"\n"
- "\n"
- "all: docset\n"
- "\n"
- "docset:\n"
- "\tmkdir -p $(DOCSET_DOCUMENTS)\n"
- "\tcp Nodes.xml $(DOCSET_RESOURCES)\n"
- "\tcp Tokens.xml $(DOCSET_RESOURCES)\n"
- "\tcp Info.plist $(DOCSET_CONTENTS)\n"
- "\ttar --exclude $(DOCSET_NAME) \\\n"
- "\t --exclude Nodes.xml \\\n"
- "\t --exclude Tokens.xml \\\n"
- "\t --exclude Info.plist \\\n"
- "\t --exclude Makefile -c -f - . \\\n"
- "\t | (cd $(DOCSET_DOCUMENTS); tar xvf -)\n"
- "\t$(XCODE_INSTALL)/usr/bin/docsetutil index $(DOCSET_NAME)\n"
- "\trm -f $(DOCSET_DOCUMENTS)/Nodes.xml\n"
- "\trm -f $(DOCSET_DOCUMENTS)/Info.plist\n"
- "\trm -f $(DOCSET_DOCUMENTS)/Makefile\n"
- "\trm -f $(DOCSET_RESOURCES)/Nodes.xml\n"
- "\trm -f $(DOCSET_RESOURCES)/Tokens.xml\n"
- "\n"
- "clean:\n"
- "\trm -rf $(DOCSET_NAME)\n"
- "\n"
- "install: docset\n"
- "\tmkdir -p $(DESTDIR)\n"
- "\tcp -R $(DOCSET_NAME) $(DESTDIR)\n"
- "\n"
- "uninstall:\n"
- "\trm -rf $(DESTDIR)/$(DOCSET_NAME)\n"
- "\n"
- "always:\n";
+ ts << "DOCSET_NAME=" << bundleId << ".docset\n"
+ "DOCSET_CONTENTS=$(DOCSET_NAME)/Contents\n"
+ "DOCSET_RESOURCES=$(DOCSET_CONTENTS)/Resources\n"
+ "DOCSET_DOCUMENTS=$(DOCSET_RESOURCES)/Documents\n"
+ "DESTDIR=~/Library/Developer/Shared/Documentation/DocSets\n"
+ "XCODE_INSTALL=\"$(shell xcode-select -print-path)\"\n"
+ "\n"
+ "all: docset\n"
+ "\n"
+ "docset:\n"
+ "\tmkdir -p $(DOCSET_DOCUMENTS)\n"
+ "\tcp Nodes.xml $(DOCSET_RESOURCES)\n"
+ "\tcp Tokens.xml $(DOCSET_RESOURCES)\n"
+ "\tcp Info.plist $(DOCSET_CONTENTS)\n"
+ "\ttar --exclude $(DOCSET_NAME) \\\n"
+ "\t --exclude Nodes.xml \\\n"
+ "\t --exclude Tokens.xml \\\n"
+ "\t --exclude Info.plist \\\n"
+ "\t --exclude Makefile -c -f - . \\\n"
+ "\t | (cd $(DOCSET_DOCUMENTS); tar xvf -)\n"
+ "\t$(XCODE_INSTALL)/usr/bin/docsetutil index $(DOCSET_NAME)\n"
+ "\trm -f $(DOCSET_DOCUMENTS)/Nodes.xml\n"
+ "\trm -f $(DOCSET_DOCUMENTS)/Info.plist\n"
+ "\trm -f $(DOCSET_DOCUMENTS)/Makefile\n"
+ "\trm -f $(DOCSET_RESOURCES)/Nodes.xml\n"
+ "\trm -f $(DOCSET_RESOURCES)/Tokens.xml\n"
+ "\n"
+ "clean:\n"
+ "\trm -rf $(DOCSET_NAME)\n"
+ "\n"
+ "install: docset\n"
+ "\tmkdir -p $(DESTDIR)\n"
+ "\tcp -R $(DOCSET_NAME) $(DESTDIR)\n"
+ "\n"
+ "uninstall:\n"
+ "\trm -rf $(DESTDIR)/$(DOCSET_NAME)\n"
+ "\n"
+ "always:\n";
}
// -- write Info.plist
{
- QCString plName = Config_getString(HTML_OUTPUT) + "/Info.plist";
- QFile plist(plName);
- if (!plist.open(IO_WriteOnly))
- {
- term("Could not open file %s for writing\n",plName.data());
- }
- FTextStream ts(&plist);
+ QCString plName = Config_getString(HTML_OUTPUT) + "/Info.plist";
+ std::ofstream ts(plName.str(),std::ofstream::out | std::ofstream::binary);
+ if (!ts.is_open())
+ {
+ term("Could not open file %s for writing\n",qPrint(plName));
+ }
- ts << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
- "<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\"\n"
- "\"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n"
- "<plist version=\"1.0\">\n"
- "<dict>\n"
- " <key>CFBundleName</key>\n"
- " <string>" << projectName << "</string>\n"
- " <key>CFBundleIdentifier</key>\n"
- " <string>" << bundleId << "</string>\n"
- " <key>CFBundleVersion</key>\n"
- " <string>" << projectNumber << "</string>\n"
- " <key>DocSetFeedName</key>\n"
- " <string>" << feedName << "</string>\n"
- " <key>DocSetPublisherIdentifier</key>\n"
- " <string>" << publisherId << "</string>\n"
- " <key>DocSetPublisherName</key>\n"
- " <string>" << publisherName << "</string>\n"
- // markers for Dash
- " <key>DashDocSetFamily</key>\n"
- " <string>doxy</string>\n"
- " <key>DocSetPlatformFamily</key>\n"
- " <string>doxygen</string>\n"
- "</dict>\n"
- "</plist>\n";
+ ts << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+ "<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\"\n"
+ "\"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n"
+ "<plist version=\"1.0\">\n"
+ "<dict>\n"
+ " <key>CFBundleName</key>\n"
+ " <string>" << projectName << "</string>\n"
+ " <key>CFBundleIdentifier</key>\n"
+ " <string>" << bundleId << "</string>\n"
+ " <key>CFBundleVersion</key>\n"
+ " <string>" << projectNumber << "</string>\n"
+ " <key>DocSetFeedName</key>\n"
+ " <string>" << feedName << "</string>\n"
+ " <key>DocSetPublisherIdentifier</key>\n"
+ " <string>" << publisherId << "</string>\n"
+ " <key>DocSetPublisherName</key>\n"
+ " <string>" << publisherName << "</string>\n"
+ // markers for Dash
+ " <key>DashDocSetFamily</key>\n"
+ " <string>doxy</string>\n"
+ " <key>DocSetPlatformFamily</key>\n"
+ " <string>doxygen</string>\n"
+ "</dict>\n"
+ "</plist>\n";
}
// -- start Nodes.xml
QCString notes = Config_getString(HTML_OUTPUT) + "/Nodes.xml";
- p->nf.setName(notes);
- if (!p->nf.open(IO_WriteOnly))
+ p->ntf.open(notes.str(),std::ofstream::out | std::ofstream::binary);
+ if (!p->ntf.is_open())
{
- term("Could not open file %s for writing\n",notes.data());
+ term("Could not open file %s for writing\n",qPrint(notes));
}
+ p->nts.setStream(&p->ntf);
//QCString indexName=Config_getBool(GENERATE_TREEVIEW)?"main":"index";
QCString indexName="index";
- p->nts.setDevice(&p->nf);
- p->nts << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl;
- p->nts << "<DocSetNodes version=\"1.0\">" << endl;
- p->nts << " <TOC>" << endl;
- p->nts << " <Node>" << endl;
- p->nts << " <Name>Root</Name>" << endl;
- p->nts << " <Path>" << indexName << Doxygen::htmlFileExtension << "</Path>" << endl;
- p->nts << " <Subnodes>" << endl;
+ p->nts << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
+ p->nts << "<DocSetNodes version=\"1.0\">\n";
+ p->nts << " <TOC>\n";
+ p->nts << " <Node>\n";
+ p->nts << " <Name>Root</Name>\n";
+ p->nts << " <Path>" << indexName << Doxygen::htmlFileExtension << "</Path>\n";
+ p->nts << " <Subnodes>\n";
p->indentStack.push(true);
QCString tokens = Config_getString(HTML_OUTPUT) + "/Tokens.xml";
- p->tf.setName(tokens);
- if (!p->tf.open(IO_WriteOnly))
+ p->ttf.open(tokens.str(),std::ofstream::out | std::ofstream::binary);
+ if (!p->ttf.is_open())
{
- term("Could not open file %s for writing\n",tokens.data());
+ term("Could not open file %s for writing\n",qPrint(tokens));
}
- p->tts.setDevice(&p->tf);
- p->tts << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl;
- p->tts << "<Tokens version=\"1.0\">" << endl;
+ p->tts.setStream(&p->ttf);
+ p->tts << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
+ p->tts << "<Tokens version=\"1.0\">\n";
}
void DocSets::finalize()
{
if (!p->indentStack.top())
{
- p->nts << p->indent() << " </Node>" << endl;
+ p->nts << p->indent() << " </Node>\n";
}
p->indentStack.pop();
- p->nts << " </Subnodes>" << endl;
- p->nts << " </Node>" << endl;
- p->nts << " </TOC>" << endl;
- p->nts << "</DocSetNodes>" << endl;
- p->nf.close();
+ p->nts << " </Subnodes>\n";
+ p->nts << " </Node>\n";
+ p->nts << " </TOC>\n";
+ p->nts << "</DocSetNodes>\n";
+ p->nts.flush();
+ p->ntf.close();
- p->tts << "</Tokens>" << endl;
- p->tf.close();
+ p->tts << "</Tokens>\n";
+ p->tts.flush();
+ p->ttf.close();
}
QCString DocSets::Private::indent()
@@ -208,7 +208,7 @@ QCString DocSets::Private::indent()
void DocSets::incContentsDepth()
{
//printf("DocSets::incContentsDepth() depth=%zu\n",p->indentStack.size());
- p->nts << p->indent() << "<Subnodes>" << endl;
+ p->nts << p->indent() << "<Subnodes>\n";
p->indentStack.push(true);
}
@@ -216,18 +216,18 @@ void DocSets::decContentsDepth()
{
if (!p->indentStack.top())
{
- p->nts << p->indent() << " </Node>" << endl;
+ p->nts << p->indent() << " </Node>\n";
}
- p->nts << p->indent() << "</Subnodes>" << endl;
+ p->nts << p->indent() << "</Subnodes>\n";
p->indentStack.pop();
//printf("DocSets::decContentsDepth() depth=%zu\n",p->indentStack.size());
}
void DocSets::addContentsItem(bool isDir,
- const char *name,
- const char *ref,
- const char *file,
- const char *anchor,
+ const QCString &name,
+ const QCString &ref,
+ const QCString &file,
+ const QCString &anchor,
bool /* separateIndex */,
bool /* addToNavIndex */,
const Definition * /*def*/)
@@ -238,38 +238,38 @@ void DocSets::addContentsItem(bool isDir,
{
if (!p->indentStack.top())
{
- p->nts << p->indent() << " </Node>" << endl;
+ p->nts << p->indent() << " </Node>\n";
}
p->indentStack.top()=false;
- p->nts << p->indent() << " <Node>" << endl;
- p->nts << p->indent() << " <Name>" << convertToXML(name) << "</Name>" << endl;
- if (file && file[0]=='^') // URL marker
+ p->nts << p->indent() << " <Node>\n";
+ p->nts << p->indent() << " <Name>" << convertToXML(name) << "</Name>\n";
+ if (!file.isEmpty() && file[0]=='^') // URL marker
{
p->nts << p->indent() << " <URL>" << convertToXML(&file[1])
- << "</URL>" << endl;
+ << "</URL>\n";
}
else // relative file
{
p->nts << p->indent() << " <Path>";
- if (file && file[0]=='!') // user specified file
+ if (!file.isEmpty() && file[0]=='!') // user specified file
{
p->nts << convertToXML(&file[1]);
}
- else if (file) // doxygen generated file
+ else if (!file.isEmpty()) // doxygen generated file
{
p->nts << file << Doxygen::htmlFileExtension;
}
- p->nts << "</Path>" << endl;
- if (file && anchor)
+ p->nts << "</Path>\n";
+ if (!file.isEmpty() && !anchor.isEmpty())
{
- p->nts << p->indent() << " <Anchor>" << anchor << "</Anchor>" << endl;
+ p->nts << p->indent() << " <Anchor>" << anchor << "</Anchor>\n";
}
}
}
}
void DocSets::addIndexItem(const Definition *context,const MemberDef *md,
- const char *,const char *)
+ const QCString &,const QCString &)
{
if (md==0 && context==0) return;
@@ -477,57 +477,57 @@ void DocSets::addIndexItem(const Definition *context,const MemberDef *md,
}
if (p->scopes.find(context->getOutputFileBase().str())==p->scopes.end())
{
- writeToken(p->tts,context,type,lang,scope,0,decl);
+ writeToken(p->tts,context,type,lang,scope,QCString(),decl);
p->scopes.insert(context->getOutputFileBase().str());
}
}
}
-void DocSets::writeToken(FTextStream &t,
+void DocSets::writeToken(TextStream &t,
const Definition *d,
const QCString &type,
const QCString &lang,
- const char *scope,
- const char *anchor,
- const char *decl)
+ const QCString &scope,
+ const QCString &anchor,
+ const QCString &decl)
{
- t << " <Token>" << endl;
- t << " <TokenIdentifier>" << endl;
+ t << " <Token>\n";
+ t << " <TokenIdentifier>\n";
QCString name = d->name();
if (name.right(2)=="-p") name=name.left(name.length()-2);
- t << " <Name>" << convertToXML(name) << "</Name>" << endl;
+ t << " <Name>" << convertToXML(name) << "</Name>\n";
if (!lang.isEmpty())
{
- t << " <APILanguage>" << lang << "</APILanguage>" << endl;
+ t << " <APILanguage>" << lang << "</APILanguage>\n";
}
if (!type.isEmpty())
{
- t << " <Type>" << type << "</Type>" << endl;
+ t << " <Type>" << type << "</Type>\n";
}
- if (scope)
+ if (!scope.isEmpty())
{
- t << " <Scope>" << convertToXML(scope) << "</Scope>" << endl;
+ t << " <Scope>" << convertToXML(scope) << "</Scope>\n";
}
- t << " </TokenIdentifier>" << endl;
+ t << " </TokenIdentifier>\n";
t << " <Path>" << d->getOutputFileBase()
- << Doxygen::htmlFileExtension << "</Path>" << endl;
- if (anchor)
+ << Doxygen::htmlFileExtension << "</Path>\n";
+ if (!anchor.isEmpty())
{
- t << " <Anchor>" << anchor << "</Anchor>" << endl;
+ t << " <Anchor>" << anchor << "</Anchor>\n";
}
QCString tooltip = d->briefDescriptionAsTooltip();
if (!tooltip.isEmpty())
{
- t << " <Abstract>" << convertToXML(tooltip) << "</Abstract>" << endl;
+ t << " <Abstract>" << convertToXML(tooltip) << "</Abstract>\n";
}
- if (decl)
+ if (!decl.isEmpty())
{
- t << " <DeclaredIn>" << convertToXML(decl) << "</DeclaredIn>" << endl;
+ t << " <DeclaredIn>" << convertToXML(decl) << "</DeclaredIn>\n";
}
- t << " </Token>" << endl;
+ t << " </Token>\n";
}
-void DocSets::addIndexFile(const char *name)
+void DocSets::addIndexFile(const QCString &name)
{
(void)name;
}
diff --git a/src/docsets.h b/src/docsets.h
index 6065cfe..03146f1 100644
--- a/src/docsets.h
+++ b/src/docsets.h
@@ -20,9 +20,9 @@
#include "index.h"
-class QFile;
+class TextStream;
+
class Definition;
-class FTextStream;
/** A class that generates docset files.
*
@@ -40,25 +40,25 @@ class DocSets : public IndexIntf
void incContentsDepth();
void decContentsDepth();
void addContentsItem(bool isDir,
- const char *name,
- const char *ref,
- const char *file,
- const char *anchor,
+ const QCString &name,
+ const QCString &ref,
+ const QCString &file,
+ const QCString &anchor,
bool separateIndex,
bool addToNavIndex,
const Definition *def
);
void addIndexItem(const Definition *context,const MemberDef *md,
- const char *sectionAnchor,const char *title);
- void addIndexFile(const char *name);
- void addImageFile(const char *) {}
- void addStyleSheetFile(const char *) {}
+ const QCString &sectionAnchor,const QCString &title);
+ void addIndexFile(const QCString &name);
+ void addImageFile(const QCString &) {}
+ void addStyleSheetFile(const QCString &) {}
private:
- void writeToken(FTextStream &t, const Definition *d,
+ void writeToken(TextStream &t, const Definition *d,
const QCString &type, const QCString &lang,
- const char *scope=0, const char *anchor=0,
- const char *decl=0);
+ const QCString &scope=QCString(), const QCString &anchor=QCString(),
+ const QCString &decl=QCString());
struct Private;
std::unique_ptr<Private> p;
diff --git a/src/doctokenizer.h b/src/doctokenizer.h
index ec73e61..02dbecd 100644
--- a/src/doctokenizer.h
+++ b/src/doctokenizer.h
@@ -19,9 +19,10 @@
#ifndef _DOCTOKENIZER_H
#define _DOCTOKENIZER_H
-#include <qcstring.h>
#include <stdio.h>
+
#include "htmlattrib.h"
+#include "qcstring.h"
class Definition;
@@ -123,9 +124,9 @@ void setDoctokinizerLineNr(int lineno);
int getDoctokinizerLineNr(void);
// operations on the scanner
-void doctokenizerYYFindSections(const char *input,const Definition *d,
- const char *fileName);
-void doctokenizerYYinit(const char *input,const char *fileName,bool markdownSupport);
+void doctokenizerYYFindSections(const QCString &input,const Definition *d,
+ const QCString &fileName);
+void doctokenizerYYinit(const char *input,const QCString &fileName,bool markdownSupport);
void doctokenizerYYcleanup();
void doctokenizerYYpushContext();
bool doctokenizerYYpopContext();
@@ -156,7 +157,7 @@ void doctokenizerYYsetStateText();
void doctokenizerYYsetStateSkipTitle();
void doctokenizerYYsetStateAnchor();
void doctokenizerYYsetInsidePre(bool b);
-void doctokenizerYYpushBackHtmlTag(const char *tag);
+void doctokenizerYYpushBackHtmlTag(const QCString &tag);
void doctokenizerYYsetStateSnippet();
void doctokenizerYYstartAutoList();
void doctokenizerYYendAutoList();
diff --git a/src/doctokenizer.l b/src/doctokenizer.l
index eaf8a43..b29afcb 100644
--- a/src/doctokenizer.l
+++ b/src/doctokenizer.l
@@ -27,8 +27,7 @@
#include <ctype.h>
#include <stack>
#include <string>
-
-#include <qfile.h>
+#include <cassert>
#include "doctokenizer.h"
#include "cmdmapper.h"
@@ -117,12 +116,12 @@ bool doctokenizerYYpopContext()
QCString extractPartAfterNewLine(const QCString &text)
{
- int nl1 = text.findRev('\n');
- if (nl1!=-1)
+ int nl1 = text.find('\n');
+ int nl2 = text.find("\\ilinebr");
+ if (nl1!=-1 && nl1<nl2)
{
return text.mid(nl1+1);
}
- int nl2 = text.findRev("\\ilinebr");
if (nl2!=-1)
{
if (text.at(nl2+8)==' ') nl2++; // skip space after \\ilinebr
@@ -154,9 +153,10 @@ const char *tokToString(int token)
return "ERROR";
}
-static int computeIndent(const char *str,int length)
+static int computeIndent(const char *str,size_t length)
{
- int i;
+ if (str==0 || length==std::string::npos) return 0;
+ size_t i;
int indent=0;
static int tabSize=Config_getInt(TAB_SIZE);
for (i=0;i<length;i++)
@@ -181,7 +181,7 @@ static int computeIndent(const char *str,int length)
static void processSection()
{
- //printf("%s: found section/anchor with name '%s'\n",g_fileName.data(),g_secLabel.data());
+ //printf("%s: found section/anchor with name '%s'\n",qPrint(g_fileName),qPrint(g_secLabel));
QCString file;
if (g_definition)
{
@@ -189,7 +189,7 @@ static void processSection()
}
else
{
- warn(g_fileName,g_yyLineNr,"Found section/anchor %s without context\n",g_secLabel.data());
+ warn(g_fileName,g_yyLineNr,"Found section/anchor %s without context\n",qPrint(g_secLabel));
}
SectionInfo *si = SectionManager::instance().find(g_secLabel);
if (si)
@@ -201,7 +201,7 @@ static void processSection()
static void handleHtmlTag()
{
- QCString tagText=yytext;
+ QCString tagText(yytext);
g_token->attribs.clear();
g_token->endTag = FALSE;
g_token->emptyTag = FALSE;
@@ -293,7 +293,7 @@ static void handleHtmlTag()
{
}
//printf("=====> Adding option name=<%s> value=<%s>\n",
- // opt.name.data(),opt.value.data());
+ // qPrint(opt.name),qPrint(opt.value));
g_token->attribs.push_back(opt);
}
g_token->attribsStr = tagText.mid(startAttribList,i-startAttribList);
@@ -499,8 +499,9 @@ RCSID "$"("Author"|"Date"|"Header"|"Id"|"Locker"|"Log"|"Name"|"RCSfile"|"Revisio
<St_Para>\r /* skip carriage return */
<St_Para>^{LISTITEM} { /* list item */
lineCount(yytext,yyleng);
- QCString text=yytext;
- int dashPos = text.findRev('-');
+ QCString text(yytext);
+ size_t dashPos = static_cast<size_t>(text.findRev('-'));
+ assert(dashPos!=std::string::npos);
g_token->isEnumList = text.at(dashPos+1)=='#';
g_token->id = -1;
g_token->indent = computeIndent(yytext,dashPos);
@@ -514,11 +515,12 @@ RCSID "$"("Author"|"Date"|"Header"|"Id"|"Locker"|"Log"|"Name"|"RCSfile"|"Revisio
else
{
lineCount(yytext,yyleng);
- std::string text=yytext;
+ std::string text(yytext);
static const reg::Ex re(R"([*+][^*+]*$)"); // find last + or *
reg::Match match;
reg::search(text,match,re);
size_t listPos = match.position();
+ assert(listPos!=std::string::npos);
g_token->isEnumList = FALSE;
g_token->id = -1;
g_token->indent = computeIndent(yytext,listPos);
@@ -532,23 +534,26 @@ RCSID "$"("Author"|"Date"|"Header"|"Id"|"Locker"|"Log"|"Name"|"RCSfile"|"Revisio
}
else
{
- std::string text=yytext;
+ std::string text(yytext);
static const reg::Ex re(R"(\d+)");
reg::Match match;
reg::search(text,match,re);
+ size_t markPos = match.position();
+ assert(markPos!=std::string::npos);
g_token->isEnumList = true;
g_token->id = std::stoul(match.str());
- g_token->indent = computeIndent(yytext,match.position());
+ g_token->indent = computeIndent(yytext,markPos);
return TK_LISTITEM;
}
}
<St_Para>{BLANK}*(\n|"\\ilinebr"){LISTITEM} { /* list item on next line */
lineCount(yytext,yyleng);
- QCString text=extractPartAfterNewLine(yytext);
- int dashPos = text.findRev('-');
+ QCString text=extractPartAfterNewLine(QCString(yytext));
+ size_t dashPos = static_cast<size_t>(text.findRev('-'));
+ assert(dashPos!=std::string::npos);
g_token->isEnumList = text.at(dashPos+1)=='#';
g_token->id = -1;
- g_token->indent = computeIndent(text,dashPos);
+ g_token->indent = computeIndent(text.data(),dashPos);
return TK_LISTITEM;
}
<St_Para>{BLANK}*(\n|"\\ilinebr"){MLISTITEM} { /* list item on next line */
@@ -559,11 +564,12 @@ RCSID "$"("Author"|"Date"|"Header"|"Id"|"Locker"|"Log"|"Name"|"RCSfile"|"Revisio
else
{
lineCount(yytext,yyleng);
- std::string text=extractPartAfterNewLine(yytext).str();
+ std::string text=extractPartAfterNewLine(QCString(yytext)).str();
static const reg::Ex re(R"([*+][^*+]*$)"); // find last + or *
reg::Match match;
reg::search(text,match,re);
size_t markPos = match.position();
+ assert(markPos!=std::string::npos);
g_token->isEnumList = FALSE;
g_token->id = -1;
g_token->indent = computeIndent(text.c_str(),markPos);
@@ -578,27 +584,30 @@ RCSID "$"("Author"|"Date"|"Header"|"Id"|"Locker"|"Log"|"Name"|"RCSfile"|"Revisio
else
{
lineCount(yytext,yyleng);
- std::string text=extractPartAfterNewLine(yytext).str();
+ std::string text=extractPartAfterNewLine(QCString(yytext)).str();
static const reg::Ex re(R"(\d+)");
reg::Match match;
reg::search(text,match,re);
+ size_t markPos = match.position();
+ assert(markPos!=std::string::npos);
g_token->isEnumList = true;
g_token->id = std::stoul(match.str());
- g_token->indent = computeIndent(text.c_str(),match.position());
+ g_token->indent = computeIndent(text.c_str(),markPos);
return TK_LISTITEM;
}
}
<St_Para>^{ENDLIST} { /* end list */
lineCount(yytext,yyleng);
int dotPos = QCString(yytext).findRev('.');
+ assert(dotPos!=-1);
g_token->indent = computeIndent(yytext,dotPos);
return TK_ENDLIST;
}
<St_Para>{BLANK}*(\n|"\\ilinebr"){ENDLIST} { /* end list on next line */
lineCount(yytext,yyleng);
- QCString text=extractPartAfterNewLine(yytext);
+ QCString text=extractPartAfterNewLine(QCString(yytext));
int dotPos = text.findRev('.');
- g_token->indent = computeIndent(text,dotPos);
+ g_token->indent = computeIndent(text.data(),dotPos);
return TK_ENDLIST;
}
<St_Para>"{"{BLANK}*"@link"/{BLANK}+ {
@@ -714,7 +723,7 @@ RCSID "$"("Author"|"Date"|"Header"|"Id"|"Locker"|"Log"|"Name"|"RCSfile"|"Revisio
}
<St_Para,St_HtmlOnly,St_ManOnly,St_LatexOnly,St_RtfOnly,St_XmlOnly,St_DbOnly>"$("{ID}")" | /* environment variable */
<St_Para,St_HtmlOnly,St_ManOnly,St_LatexOnly,St_RtfOnly,St_XmlOnly,St_DbOnly>"$("{ID}"("{ID}"))" { /* environment variable */
- QCString name = &yytext[2];
+ QCString name(&yytext[2]);
name = name.left(name.length()-1);
QCString value = Portable::getenv(name);
for (int i=value.length()-1;i>=0;i--) unput(value.at(i));
@@ -822,7 +831,7 @@ RCSID "$"("Author"|"Date"|"Header"|"Id"|"Locker"|"Log"|"Name"|"RCSfile"|"Revisio
}
else
{
- g_token->indent=computeIndent(yytext,(int)yyleng);
+ g_token->indent=computeIndent(yytext,yyleng);
int i;
// put back the indentation (needed for list items)
for (i=0;i<g_token->indent;i++)
@@ -1230,7 +1239,7 @@ RCSID "$"("Author"|"Date"|"Header"|"Id"|"Locker"|"Log"|"Name"|"RCSfile"|"Revisio
BEGIN(St_XRefItem2);
}
<St_XRefItem2>[0-9]+"." {
- QCString numStr=yytext;
+ QCString numStr(yytext);
numStr=numStr.left((int)yyleng-1);
g_token->id=numStr.toInt();
return RetVal_OK;
@@ -1246,7 +1255,7 @@ RCSID "$"("Author"|"Date"|"Header"|"Id"|"Locker"|"Log"|"Name"|"RCSfile"|"Revisio
}
<St_Param>({PHPTYPE}{BLANK}*("["{BLANK}*"]")*{BLANK}*"|"{BLANK}*)*{PHPTYPE}{BLANK}*("["{BLANK}*"]")*{WS}+("&")?"$"{LABELID} {
lineCount(yytext,yyleng);
- QCString params = yytext;
+ QCString params(yytext);
int j = params.find('&');
int i = params.find('$');
if (j<i && j!=-1) i=j;
@@ -1297,7 +1306,7 @@ RCSID "$"("Author"|"Date"|"Header"|"Id"|"Locker"|"Log"|"Name"|"RCSfile"|"Revisio
return TK_WORD;
}
<St_File>"\""[^\n\"]+"\"" {
- QCString text=yytext;
+ QCString text(yytext);
g_token->name = text.mid(1,text.length()-2);
return TK_WORD;
}
@@ -1340,7 +1349,7 @@ RCSID "$"("Author"|"Date"|"Header"|"Id"|"Locker"|"Log"|"Name"|"RCSfile"|"Revisio
<St_Sections>{CMD}("<"|{CMD})
<St_Sections>"<"{CAPTION}({WS}+{ATTRIB})*">" {
lineCount(yytext,yyleng);
- QCString tag=yytext;
+ QCString tag(yytext);
int s=tag.find("id=");
if (s!=-1) // command has id attribute
{
@@ -1426,13 +1435,13 @@ RCSID "$"("Author"|"Date"|"Header"|"Id"|"Locker"|"Log"|"Name"|"RCSfile"|"Revisio
BEGIN(St_SecSkip);
}
<St_SecSkip>{CMD}{ID} {
- if (qstrcmp(yytext+1,g_endMarker)==0)
+ if (g_endMarker==yytext+1)
{
BEGIN(St_Sections);
}
}
<St_SecSkip>"-->" {
- if (qstrcmp(yytext,g_endMarker)==0)
+ if (g_endMarker==yytext)
{
BEGIN(St_Sections);
}
@@ -1501,12 +1510,12 @@ RCSID "$"("Author"|"Date"|"Header"|"Id"|"Locker"|"Log"|"Name"|"RCSfile"|"Revisio
//--------------------------------------------------------------------------
-void doctokenizerYYFindSections(const char *input,const Definition *d,
- const char *fileName)
+void doctokenizerYYFindSections(const QCString &input,const Definition *d,
+ const QCString &fileName)
{
- if (input==0) return;
- printlex(yy_flex_debug, TRUE, __FILE__, fileName);
- g_inputString = input;
+ if (input.isEmpty()) return;
+ printlex(yy_flex_debug, TRUE, __FILE__, qPrint(fileName));
+ g_inputString = input.data();
//printf("parsing --->'%s'<---\n",input);
g_inputPos = 0;
g_definition = d;
@@ -1514,10 +1523,10 @@ void doctokenizerYYFindSections(const char *input,const Definition *d,
BEGIN(St_Sections);
g_yyLineNr = 1;
doctokenizerYYlex();
- printlex(yy_flex_debug, FALSE, __FILE__, fileName);
+ printlex(yy_flex_debug, FALSE, __FILE__, qPrint(fileName));
}
-void doctokenizerYYinit(const char *input,const char *fileName,bool markdownSupport)
+void doctokenizerYYinit(const char *input,const QCString &fileName,bool markdownSupport)
{
g_autoListLevel = 0;
g_inputString = input;
@@ -1720,7 +1729,7 @@ void doctokenizerYYsetInsidePre(bool b)
g_insidePre = b;
}
-void doctokenizerYYpushBackHtmlTag(const char *tag)
+void doctokenizerYYpushBackHtmlTag(const QCString &tag)
{
QCString tagName = tag;
int i,l = tagName.length();
diff --git a/src/docvisitor.cpp b/src/docvisitor.cpp
index 5356faf..506c9f8 100644
--- a/src/docvisitor.cpp
+++ b/src/docvisitor.cpp
@@ -38,9 +38,9 @@ DocVisitor::~DocVisitor()
{
}
-CodeParserInterface &DocVisitor::getCodeParser(const char *extension)
+CodeParserInterface &DocVisitor::getCodeParser(const QCString &extension)
{
- std::string ext(extension?extension:"");
+ std::string ext = extension.str();
// for each extension we create a code parser once per visitor, so that
// the context of the same parser object is reused throughout multiple passes for instance
// for code fragments shown via dontinclude.
diff --git a/src/docvisitor.h b/src/docvisitor.h
index baf5bef..b19e76e 100644
--- a/src/docvisitor.h
+++ b/src/docvisitor.h
@@ -18,6 +18,8 @@
#include <memory>
+#include "qcstring.h"
+
// ids
const int DocVisitor_Html = 0;
const int DocVisitor_Latex = 1;
@@ -95,7 +97,7 @@ class DocVisitor
DocVisitor(int id);
virtual ~DocVisitor();
int id() const;
- CodeParserInterface &getCodeParser(const char *langExt);
+ CodeParserInterface &getCodeParser(const QCString &langExt);
void pushHidden(bool hide);
bool popHidden();
diff --git a/src/dot.cpp b/src/dot.cpp
index ddabbc7..8aa30b7 100644
--- a/src/dot.cpp
+++ b/src/dot.cpp
@@ -15,8 +15,8 @@
#include <cstdlib>
#include <cassert>
-
-#include <qdir.h>
+#include <sstream>
+#include <algorithm>
#include "config.h"
#include "dot.h"
@@ -25,10 +25,10 @@
#include "util.h"
#include "portable.h"
#include "message.h"
-#include "ftextstream.h"
#include "doxygen.h"
#include "language.h"
#include "index.h"
+#include "dir.h"
#define MAP_CMD "cmapx"
@@ -36,17 +36,16 @@
static QCString g_dotFontPath;
-static void setDotFontPath(const char *path)
+static void setDotFontPath(const QCString &path)
{
ASSERT(g_dotFontPath.isEmpty());
g_dotFontPath = Portable::getenv("DOTFONTPATH");
QCString newFontPath = Config_getString(DOT_FONTPATH);
- QCString spath = path;
- if (!newFontPath.isEmpty() && !spath.isEmpty())
+ if (!newFontPath.isEmpty() && !path.isEmpty())
{
- newFontPath.prepend(spath+Portable::pathListSeparator());
+ newFontPath.prepend(path+Portable::pathListSeparator());
}
- else if (newFontPath.isEmpty() && !spath.isEmpty())
+ else if (newFontPath.isEmpty() && !path.isEmpty())
{
newFontPath=path;
}
@@ -118,22 +117,22 @@ DotManager::~DotManager()
delete m_queue;
}
-DotRunner* DotManager::createRunner(const std::string &absDotName, const std::string& md5Hash)
+DotRunner* DotManager::createRunner(const QCString &absDotName, const QCString& md5Hash)
{
DotRunner* rv = nullptr;
- auto const runit = m_runners.find(absDotName);
+ auto const runit = m_runners.find(absDotName.str());
if (runit == m_runners.end())
{
auto insobj = std::make_unique<DotRunner>(absDotName, md5Hash);
rv = insobj.get();
- m_runners.emplace(absDotName, std::move(insobj));
+ m_runners.emplace(absDotName.str(), std::move(insobj));
}
else
{
// we have a match
if (md5Hash != runit->second->getMd5Hash())
{
- err("md5 hash does not match for two different runs of %s !\n", absDotName.data());
+ err("md5 hash does not match for two different runs of %s !\n", qPrint(absDotName));
}
rv = runit->second.get();
}
@@ -141,13 +140,13 @@ DotRunner* DotManager::createRunner(const std::string &absDotName, const std::st
return rv;
}
-DotFilePatcher *DotManager::createFilePatcher(const std::string &fileName)
+DotFilePatcher *DotManager::createFilePatcher(const QCString &fileName)
{
- auto patcher = m_filePatchers.find(fileName);
+ auto patcher = m_filePatchers.find(fileName.str());
if (patcher != m_filePatchers.end()) return &(patcher->second);
- auto rv = m_filePatchers.emplace(fileName, fileName.c_str());
+ auto rv = m_filePatchers.emplace(fileName.str(), fileName.data());
assert(rv.second);
return &(rv.first->second);
}
@@ -164,7 +163,7 @@ bool DotManager::run() const
}
else
{
- msg("Generating dot graphs using %zu parallel threads...\n",QMIN(numDotRuns+numFilePatchers,m_workers.size()));
+ msg("Generating dot graphs using %zu parallel threads...\n",std::min(numDotRuns+numFilePatchers,m_workers.size()));
}
}
size_t i=1;
@@ -270,19 +269,19 @@ bool DotManager::run() const
//--------------------------------------------------------------------
-void writeDotGraphFromFile(const char *inFile,const char *outDir,
- const char *outFile,GraphOutputFormat format)
+void writeDotGraphFromFile(const QCString &inFile,const QCString &outDir,
+ const QCString &outFile,GraphOutputFormat format)
{
- QDir d(outDir);
+ Dir d(outDir.str());
if (!d.exists())
{
- term("Output dir %s does not exist!\n",outDir);
+ term("Output dir %s does not exist!\n",qPrint(outDir));
}
QCString imgExt = getDotImageExtension();
QCString imgName = (QCString)outFile+"."+imgExt;
- QCString absImgName = d.absPath().utf8()+"/"+imgName;
- QCString absOutFile = d.absPath().utf8()+"/"+outFile;
+ QCString absImgName = QCString(d.absPath())+"/"+imgName;
+ QCString absOutFile = QCString(d.absPath())+"/"+outFile;
DotRunner dotRun(inFile);
if (format==GOF_BITMAP)
@@ -320,24 +319,24 @@ void writeDotGraphFromFile(const char *inFile,const char *outDir,
* \param context the scope in which this graph is found (for resolving links)
* \param graphId a unique id for this graph, use for dynamic sections
*/
-void writeDotImageMapFromFile(FTextStream &t,
+void writeDotImageMapFromFile(TextStream &t,
const QCString &inFile, const QCString &outDir,
const QCString &relPath, const QCString &baseName,
const QCString &context,int graphId)
{
- QDir d(outDir);
+ Dir d(outDir.str());
if (!d.exists())
{
- term("Output dir %s does not exist!\n",outDir.data());
+ term("Output dir %s does not exist!\n",qPrint(outDir));
}
QCString mapName = baseName+".map";
QCString imgExt = getDotImageExtension();
QCString imgName = baseName+"."+imgExt;
- QCString absOutFile = d.absPath().utf8()+"/"+mapName;
+ QCString absOutFile = QCString(d.absPath())+"/"+mapName;
- DotRunner dotRun(inFile.data());
+ DotRunner dotRun(inFile);
dotRun.addJob(MAP_CMD,absOutFile);
dotRun.preventCleanUp();
if (!dotRun.run())
@@ -347,7 +346,7 @@ void writeDotImageMapFromFile(FTextStream &t,
if (imgExt=="svg") // vector graphics
{
- QCString svgName=outDir+"/"+baseName+".svg";
+ QCString svgName = outDir+"/"+baseName+".svg";
DotFilePatcher::writeSVGFigureLink(t,relPath,baseName,svgName);
DotFilePatcher patcher(svgName);
patcher.addSVGConversion("",TRUE,context,TRUE,graphId);
@@ -355,18 +354,16 @@ void writeDotImageMapFromFile(FTextStream &t,
}
else // bitmap graphics
{
- QGString result;
- FTextStream tt(&result);
-
+ TextStream tt;
t << "<img src=\"" << relPath << imgName << "\" alt=\""
- << imgName << "\" border=\"0\" usemap=\"#" << mapName << "\"/>" << endl;
+ << imgName << "\" border=\"0\" usemap=\"#" << mapName << "\"/>\n";
DotFilePatcher::convertMapFile(tt, absOutFile, relPath ,TRUE, context);
- if (!result.isEmpty())
+ if (!tt.empty())
{
t << "<map name=\"" << mapName << "\" id=\"" << mapName << "\">";
- t << result;
- t << "</map>" << endl;
+ t << tt.str();
+ t << "</map>\n";
}
}
- d.remove(absOutFile);
+ d.remove(absOutFile.str());
}
diff --git a/src/dot.h b/src/dot.h
index c2f9605..219d1d5 100644
--- a/src/dot.h
+++ b/src/dot.h
@@ -16,16 +16,16 @@
#ifndef DOT_H
#define DOT_H
-#include <qcstring.h>
#include <map>
+#include "qcstring.h"
#include "dotgraph.h" // only for GraphOutputFormat
#include "dotfilepatcher.h"
#include "dotrunner.h"
-class FTextStream;
class DotRunner;
class DotRunnerQueue;
+class TextStream;
/** Singleton that manages parallel dot invocations and patching files for embedding image maps */
class DotManager
@@ -33,8 +33,8 @@ class DotManager
public:
static DotManager *instance();
static void deleteInstance();
- DotRunner* createRunner(const std::string& absDotName, const std::string& md5Hash);
- DotFilePatcher *createFilePatcher(const std::string &fileName);
+ DotRunner* createRunner(const QCString& absDotName, const QCString& md5Hash);
+ DotFilePatcher *createFilePatcher(const QCString &fileName);
bool run() const;
private:
@@ -48,9 +48,9 @@ class DotManager
std::vector< std::unique_ptr<DotWorkerThread> > m_workers;
};
-void writeDotGraphFromFile(const char *inFile,const char *outDir,
- const char *outFile,GraphOutputFormat format);
-void writeDotImageMapFromFile(FTextStream &t,
+void writeDotGraphFromFile(const QCString &inFile,const QCString &outDir,
+ const QCString &outFile,GraphOutputFormat format);
+void writeDotImageMapFromFile(TextStream &t,
const QCString& inFile, const QCString& outDir,
const QCString& relPath,const QCString& baseName,
const QCString& context,int graphId=-1);
diff --git a/src/dotcallgraph.cpp b/src/dotcallgraph.cpp
index 78e9b9b..1f77e33 100644
--- a/src/dotcallgraph.cpp
+++ b/src/dotcallgraph.cpp
@@ -40,7 +40,7 @@ void DotCallGraph::buildGraph(DotNode *n,const MemberDef *md,int distance)
if (it!=m_usedNodes.end()) // file is already a node in the graph
{
DotNode *bn = it->second;
- n->addChild(bn,0,0,0);
+ n->addChild(bn,0,0);
bn->addParent(n);
bn->setDistance(distance);
}
@@ -64,7 +64,7 @@ void DotCallGraph::buildGraph(DotNode *n,const MemberDef *md,int distance)
uniqueId,
0 //distance
);
- n->addChild(bn,0,0,0);
+ n->addChild(bn,0,0);
bn->addParent(n);
bn->setDistance(distance);
m_usedNodes.insert(std::make_pair(uniqueId.str(),bn));
@@ -134,7 +134,7 @@ DotCallGraph::DotCallGraph(const MemberDef *md,bool inverse)
m_startNode = new DotNode(getNextNodeNumber(),
linkToText(md->getLanguage(),name,FALSE),
tooltip,
- uniqueId.data(),
+ uniqueId,
TRUE // root node
);
m_startNode->setDistance(0);
@@ -179,12 +179,12 @@ QCString DotCallGraph::getMapLabel() const
}
QCString DotCallGraph::writeGraph(
- FTextStream &out,
+ TextStream &out,
GraphOutputFormat graphFormat,
EmbeddedOutputFormat textFormat,
- const char *path,
- const char *fileName,
- const char *relPath,bool generateImageMap,
+ const QCString &path,
+ const QCString &fileName,
+ const QCString &relPath,bool generateImageMap,
int graphId)
{
return DotGraph::writeGraph(out, graphFormat, textFormat, path, fileName, relPath, generateImageMap, graphId);
diff --git a/src/dotcallgraph.h b/src/dotcallgraph.h
index 1bc8882..e8361a2 100644
--- a/src/dotcallgraph.h
+++ b/src/dotcallgraph.h
@@ -18,7 +18,6 @@
#include "dotnode.h"
#include "dotgraph.h"
-#include "ftextstream.h"
#include "memberdef.h"
/** Representation of an call graph */
@@ -30,9 +29,9 @@ class DotCallGraph : public DotGraph
bool isTrivial() const;
bool isTooBig() const;
int numNodes() const;
- QCString writeGraph(FTextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef,
- const char *path,const char *fileName,
- const char *relPath,bool writeImageMap=TRUE,
+ QCString writeGraph(TextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef,
+ const QCString &path,const QCString &fileName,
+ const QCString &relPath,bool writeImageMap=TRUE,
int graphId=-1);
protected:
diff --git a/src/dotclassgraph.cpp b/src/dotclassgraph.cpp
index 9146a25..1bbe4de 100644
--- a/src/dotclassgraph.cpp
+++ b/src/dotclassgraph.cpp
@@ -13,19 +13,22 @@
*
*/
+#include <algorithm>
+
#include "containers.h"
#include "dotclassgraph.h"
#include "dotnode.h"
+#include "textstream.h"
#include "config.h"
#include "util.h"
void DotClassGraph::addClass(const ClassDef *cd,DotNode *n,int prot,
- const char *label,const char *usedName,const char *templSpec,bool base,int distance)
+ const QCString &label,const QCString &usedName,const QCString &templSpec,bool base,int distance)
{
if (Config_getBool(HIDE_UNDOC_CLASSES) && !cd->isLinkable()) return;
- int edgeStyle = (label || prot==EdgeInfo::Orange || prot==EdgeInfo::Orange2) ? EdgeInfo::Dashed : EdgeInfo::Solid;
+ int edgeStyle = (!label.isEmpty() || prot==EdgeInfo::Orange || prot==EdgeInfo::Orange2) ? EdgeInfo::Dashed : EdgeInfo::Solid;
QCString className;
QCString fullName;
if (cd->isAnonymous())
@@ -34,12 +37,12 @@ void DotClassGraph::addClass(const ClassDef *cd,DotNode *n,int prot,
className+=label;
fullName = className;
}
- else if (usedName) // name is a typedef
+ else if (!usedName.isEmpty()) // name is a typedef
{
className=usedName;
fullName = className;
}
- else if (templSpec) // name has a template part
+ else if (!templSpec.isEmpty()) // name has a template part
{
className=insertTemplateSpecifierInScope(cd->displayName(),templSpec);
fullName =insertTemplateSpecifierInScope(cd->name(),templSpec);
@@ -50,7 +53,7 @@ void DotClassGraph::addClass(const ClassDef *cd,DotNode *n,int prot,
fullName = cd->name();
}
//printf("DotClassGraph::addClass(class='%s',parent=%s,prot=%d,label=%s,dist=%d,usedName=%s,templSpec=%s,base=%d)\n",
- // className.data(),n->label().data(),prot,label,distance,usedName,templSpec,base);
+ // qPrint(className),qPrint(n->label()),prot,label,distance,usedName,templSpec,base);
auto it = m_usedNodes.find(fullName.str());
if (it!=m_usedNodes.end()) // class already inserted
{
@@ -66,7 +69,7 @@ void DotClassGraph::addClass(const ClassDef *cd,DotNode *n,int prot,
n->addParent(bn);
}
bn->setDistance(distance);
- //printf(" add exiting node %s of %s\n",bn->label().data(),n->label().data());
+ //printf(" add exiting node %s of %s\n",qPrint(bn->label()),qPrint(n->label()));
}
else // new class
{
@@ -85,7 +88,7 @@ void DotClassGraph::addClass(const ClassDef *cd,DotNode *n,int prot,
DotNode *bn = new DotNode(getNextNodeNumber(),
displayName,
tooltip,
- tmp_url.data(),
+ tmp_url,
FALSE, // rootNode
cd
);
@@ -102,7 +105,7 @@ void DotClassGraph::addClass(const ClassDef *cd,DotNode *n,int prot,
bn->setDistance(distance);
m_usedNodes.insert(std::make_pair(fullName.str(),bn));
//printf(" add new child node '%s' to %s hidden=%d url=%s\n",
- // className.data(),n->label().data(),cd->isHidden(),tmp_url.data());
+ // qPrint(className),qPrint(n->label()),cd->isHidden(),qPrint(tmp_url));
buildGraph(cd,bn,base,distance+1);
}
@@ -164,7 +167,7 @@ bool DotClassGraph::determineVisibleNodes(DotNode *rootNode,
int oldSize=(int)childTreeWidth.size();
if (distance>oldSize)
{
- childTreeWidth.resize(QMAX(childTreeWidth.size(),(uint)distance));
+ childTreeWidth.resize(std::max(childTreeWidth.size(),(size_t)distance));
int i; for (i=oldSize;i<distance;i++) childTreeWidth[i]=0;
}
childTreeWidth[distance-1]+=n->label().length();
@@ -191,7 +194,7 @@ bool DotClassGraph::determineVisibleNodes(DotNode *rootNode,
int oldSize = (int)parentTreeWidth.size();
if (distance>oldSize)
{
- parentTreeWidth.resize(QMAX(parentTreeWidth.size(),(uint)distance));
+ parentTreeWidth.resize(std::max(parentTreeWidth.size(),(size_t)distance));
int i; for (i=oldSize;i<distance;i++) parentTreeWidth[i]=0;
}
parentTreeWidth[distance-1]+=n->label().length();
@@ -208,7 +211,7 @@ bool DotClassGraph::determineVisibleNodes(DotNode *rootNode,
}
if (Config_getBool(UML_LOOK)) return FALSE; // UML graph are always top to bottom
int maxWidth=0;
- int maxHeight=(int)QMAX(childTreeWidth.size(),parentTreeWidth.size());
+ int maxHeight=(int)std::max(childTreeWidth.size(),parentTreeWidth.size());
uint i;
for (i=0;i<childTreeWidth.size();i++)
{
@@ -247,7 +250,7 @@ static QCString joinLabels(const StringSet &ss)
void DotClassGraph::buildGraph(const ClassDef *cd,DotNode *n,bool base,int distance)
{
//printf("DocClassGraph::buildGraph(%s,distance=%d,base=%d)\n",
- // cd->name().data(),distance,base);
+ // qPrint(cd->name()),distance,base);
// ---- Add inheritance relations
if (m_graphType == Inheritance || m_graphType==Collaboration)
@@ -255,8 +258,8 @@ void DotClassGraph::buildGraph(const ClassDef *cd,DotNode *n,bool base,int dista
for (const auto &bcd : base ? cd->baseClasses() : cd->subClasses())
{
//printf("-------- inheritance relation %s->%s templ='%s'\n",
- // cd->name().data(),bcd->classDef->name().data(),bcd->templSpecifiers.data());
- addClass(bcd.classDef,n,bcd.prot,0,bcd.usedName,bcd.templSpecifiers,base,distance);
+ // qPrint(cd->name()),qPrint(bcd->classDef->name()),qPrint(bcd->templSpecifiers));
+ addClass(bcd.classDef,n,bcd.prot,QCString(),bcd.usedName,bcd.templSpecifiers,base,distance);
}
}
if (m_graphType == Collaboration)
@@ -267,8 +270,8 @@ void DotClassGraph::buildGraph(const ClassDef *cd,DotNode *n,bool base,int dista
cd->usedByImplementationClasses() ;
for (const auto &ucd : list)
{
- //printf("addClass: %s templSpec=%s\n",ucd.classDef->name().data(),ucd.templSpecifiers.data());
- addClass(ucd.classDef,n,EdgeInfo::Purple,joinLabels(ucd.accessors),0,
+ //printf("addClass: %s templSpec=%s\n",qPrint(ucd.classDef->name()),qPrint(ucd.templSpecifiers));
+ addClass(ucd.classDef,n,EdgeInfo::Purple,joinLabels(ucd.accessors),QCString(),
ucd.templSpecifiers,base,distance);
}
}
@@ -276,9 +279,9 @@ void DotClassGraph::buildGraph(const ClassDef *cd,DotNode *n,bool base,int dista
{
for (const auto &ccd : cd->templateTypeConstraints())
{
- //printf("addClass: %s\n",ccd.classDef->name().data());
- addClass(ccd.classDef,n,EdgeInfo::Orange2,joinLabels(ccd.accessors),0,
- 0,TRUE,distance);
+ //printf("addClass: %s\n",qPrint(ccd.classDef->name()));
+ addClass(ccd.classDef,n,EdgeInfo::Orange2,joinLabels(ccd.accessors),QCString(),
+ QCString(),TRUE,distance);
}
}
@@ -294,7 +297,7 @@ void DotClassGraph::buildGraph(const ClassDef *cd,DotNode *n,bool base,int dista
for (const auto &ti : templMaster->getTemplateInstances())
if (ti.classDef==cd)
{
- addClass(templMaster,n,EdgeInfo::Orange,ti.templSpec,0,0,TRUE,distance);
+ addClass(templMaster,n,EdgeInfo::Orange,ti.templSpec,QCString(),QCString(),TRUE,distance);
}
}
}
@@ -302,7 +305,7 @@ void DotClassGraph::buildGraph(const ClassDef *cd,DotNode *n,bool base,int dista
{
for (const auto &ti : cd->getTemplateInstances())
{
- addClass(ti.classDef,n,EdgeInfo::Orange,ti.templSpec,0,0,FALSE,distance);
+ addClass(ti.classDef,n,EdgeInfo::Orange,ti.templSpec,QCString(),QCString(),FALSE,distance);
}
}
}
@@ -310,7 +313,7 @@ void DotClassGraph::buildGraph(const ClassDef *cd,DotNode *n,bool base,int dista
DotClassGraph::DotClassGraph(const ClassDef *cd,GraphType t)
{
- //printf("--------------- DotClassGraph::DotClassGraph '%s'\n",cd->displayName().data());
+ //printf("--------------- DotClassGraph::DotClassGraph '%s'\n",qPrint(cd->displayName()));
m_graphType = t;
QCString tmp_url="";
if (cd->isLinkable() && !cd->isHidden())
@@ -326,7 +329,7 @@ DotClassGraph::DotClassGraph(const ClassDef *cd,GraphType t)
m_startNode = new DotNode(getNextNodeNumber(),
className,
tooltip,
- tmp_url.data(),
+ tmp_url,
TRUE, // is a root node
cd
);
@@ -441,12 +444,12 @@ QCString DotClassGraph::getImgAltText() const
return "";
}
-QCString DotClassGraph::writeGraph(FTextStream &out,
+QCString DotClassGraph::writeGraph(TextStream &out,
GraphOutputFormat graphFormat,
EmbeddedOutputFormat textFormat,
- const char *path,
- const char *fileName,
- const char *relPath,
+ const QCString &path,
+ const QCString &fileName,
+ const QCString &relPath,
bool /*isTBRank*/,
bool generateImageMap,
int graphId)
@@ -456,7 +459,7 @@ QCString DotClassGraph::writeGraph(FTextStream &out,
//--------------------------------------------------------------------
-void DotClassGraph::writeXML(FTextStream &t)
+void DotClassGraph::writeXML(TextStream &t)
{
for (const auto &kv : m_usedNodes)
{
@@ -464,7 +467,7 @@ void DotClassGraph::writeXML(FTextStream &t)
}
}
-void DotClassGraph::writeDocbook(FTextStream &t)
+void DotClassGraph::writeDocbook(TextStream &t)
{
for (const auto &kv : m_usedNodes)
{
@@ -472,7 +475,7 @@ void DotClassGraph::writeDocbook(FTextStream &t)
}
}
-void DotClassGraph::writeDEF(FTextStream &t)
+void DotClassGraph::writeDEF(TextStream &t)
{
for (const auto &kv : m_usedNodes)
{
diff --git a/src/dotclassgraph.h b/src/dotclassgraph.h
index 168d315..6ccba08 100644
--- a/src/dotclassgraph.h
+++ b/src/dotclassgraph.h
@@ -20,6 +20,8 @@
#include "dotnode.h"
#include "dotgraph.h"
+class TextStream;
+
/** Representation of a class inheritance or dependency graph */
class DotClassGraph : public DotGraph
{
@@ -29,13 +31,13 @@ public:
bool isTrivial() const;
bool isTooBig() const;
int numNodes() const;
- QCString writeGraph(FTextStream &t,GraphOutputFormat gf,EmbeddedOutputFormat ef,
- const char *path, const char *fileName, const char *relPath,
+ QCString writeGraph(TextStream &t,GraphOutputFormat gf,EmbeddedOutputFormat ef,
+ const QCString &path, const QCString &fileName, const QCString &relPath,
bool TBRank=TRUE,bool imageMap=TRUE,int graphId=-1);
- void writeXML(FTextStream &t);
- void writeDocbook(FTextStream &t);
- void writeDEF(FTextStream &t);
+ void writeXML(TextStream &t);
+ void writeDocbook(TextStream &t);
+ void writeDEF(TextStream &t);
protected:
virtual QCString getBaseName() const;
@@ -47,8 +49,8 @@ private:
void buildGraph(const ClassDef *cd,DotNode *n,bool base,int distance);
bool determineVisibleNodes(DotNode *rootNode,int maxNodes,bool includeParents);
void determineTruncatedNodes(DotNodeDeque &queue,bool includeParents);
- void addClass(const ClassDef *cd,DotNode *n,int prot,const char *label,
- const char *usedName,const char *templSpec,
+ void addClass(const ClassDef *cd,DotNode *n,int prot,const QCString &label,
+ const QCString &usedName,const QCString &templSpec,
bool base,int distance);
DotNode * m_startNode;
diff --git a/src/dotdirdeps.cpp b/src/dotdirdeps.cpp
index a4e556e..12236a0 100644
--- a/src/dotdirdeps.cpp
+++ b/src/dotdirdeps.cpp
@@ -13,9 +13,9 @@
*
*/
-#include "dotdirdeps.h"
+#include <sstream>
-#include "ftextstream.h"
+#include "dotdirdeps.h"
#include "util.h"
#include "doxygen.h"
#include "config.h"
@@ -29,7 +29,7 @@ using DirDefMap = std::map<std::string,const DirDef *>;
* @param[in] fillBackground if the node shall be explicitly filled
* @param[in,out] directoriesInGraph lists the directories which have been written to the output stream
*/
-static void drawDirectory(FTextStream &outStream, const DirDef *const directory, const bool fillBackground,
+static void drawDirectory(TextStream &outStream, const DirDef *const directory, const bool fillBackground,
DirDefMap &directoriesInGraph)
{
outStream << " " << directory->getOutputFileBase() << " [shape=box "
@@ -46,7 +46,7 @@ static void drawDirectory(FTextStream &outStream, const DirDef *const directory,
directoriesInGraph.insert(std::make_pair(directory->getOutputFileBase().str(), directory));
}
-void writeDotDirDepGraph(FTextStream &t,const DirDef *dd,bool linkRelations)
+void writeDotDirDepGraph(TextStream &t,const DirDef *dd,bool linkRelations)
{
int fontSize = Config_getInt(DOT_FONTSIZE);
QCString fontName = Config_getString(DOT_FONTNAME);
@@ -124,7 +124,7 @@ void writeDotDirDepGraph(FTextStream &t,const DirDef *dd,bool linkRelations)
// add nodes for other used directories
{
- //printf("*** For dir %s\n",shortName().data());
+ //printf("*** For dir %s\n",qPrint(shortName()));
for (const auto &usedDir : usedDirsNotDrawn)
// for each used dir (=directly used or a parent of a directly used dir)
{
@@ -132,10 +132,10 @@ void writeDotDirDepGraph(FTextStream &t,const DirDef *dd,bool linkRelations)
while (dir)
{
//printf("*** check relation %s->%s same_parent=%d !%s->isParentOf(%s)=%d\n",
- // dir->shortName().data(),usedDir->shortName().data(),
+ // qPrint(dir->shortName()),qPrint(usedDir->shortName()),
// dir->parent()==usedDir->parent(),
- // usedDir->shortName().data(),
- // shortName().data(),
+ // qPrint(usedDir->shortName()),
+ // qPrint(shortName()),
// !usedDir->isParentOf(this)
// );
if (dir!=usedDir && dir->parent()==usedDir->parent())
@@ -199,9 +199,9 @@ QCString DotDirDeps::getBaseName() const
void DotDirDeps::computeTheGraph()
{
// compute md5 checksum of the graph were are about to generate
- FTextStream md5stream(&m_theGraph);
- //m_dir->writeDepGraph(md5stream);
+ TextStream md5stream;
writeDotDirDepGraph(md5stream,m_dir,m_linkRelations);
+ m_theGraph = md5stream.str();
}
QCString DotDirDeps::getMapLabel() const
@@ -214,12 +214,12 @@ QCString DotDirDeps::getImgAltText() const
return convertToXML(m_dir->displayName());
}
-QCString DotDirDeps::writeGraph(FTextStream &out,
+QCString DotDirDeps::writeGraph(TextStream &out,
GraphOutputFormat graphFormat,
EmbeddedOutputFormat textFormat,
- const char *path,
- const char *fileName,
- const char *relPath,
+ const QCString &path,
+ const QCString &fileName,
+ const QCString &relPath,
bool generateImageMap,
int graphId,
bool linkRelations)
diff --git a/src/dotdirdeps.h b/src/dotdirdeps.h
index a71e8f1..4f915f9 100644
--- a/src/dotdirdeps.h
+++ b/src/dotdirdeps.h
@@ -26,12 +26,12 @@ class DotDirDeps : public DotGraph
DotDirDeps(const DirDef *dir);
~DotDirDeps();
bool isTrivial() const;
- QCString writeGraph(FTextStream &out,
+ QCString writeGraph(TextStream &out,
GraphOutputFormat gf,
EmbeddedOutputFormat ef,
- const char *path,
- const char *fileName,
- const char *relPath,
+ const QCString &path,
+ const QCString &fileName,
+ const QCString &relPath,
bool writeImageMap=TRUE,
int graphId=-1,
bool linkRelations=TRUE);
diff --git a/src/dotfilepatcher.cpp b/src/dotfilepatcher.cpp
index aafca34..326c1e1 100644
--- a/src/dotfilepatcher.cpp
+++ b/src/dotfilepatcher.cpp
@@ -13,18 +13,17 @@
*
*/
+#include <sstream>
+
#include "dotfilepatcher.h"
#include "dotrunner.h"
-
-#include "qstring.h"
#include "config.h"
-#include "qdir.h"
#include "message.h"
-#include "ftextstream.h"
#include "docparser.h"
#include "doxygen.h"
#include "util.h"
#include "dot.h"
+#include "dir.h"
static const char svgZoomHeader[] =
"<svg id=\"main\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xml:space=\"preserve\" onload=\"init(evt)\">\n"
@@ -124,7 +123,7 @@ static const char svgZoomFooter[] =
"</svg>\n"
;
-static QCString replaceRef(const QCString &buf,const QCString relPath,
+static QCString replaceRef(const QCString &buf,const QCString &relPath,
bool urlOnly,const QCString &context,const QCString &target=QCString())
{
// search for href="...", store ... part in link
@@ -153,7 +152,7 @@ static QCString replaceRef(const QCString &buf,const QCString relPath,
DocRef *df = new DocRef( (DocNode*) 0, link.mid(5), context );
result+=externalRef(relPath,df->ref(),TRUE);
if (!df->file().isEmpty())
- result += df->file().data() + Doxygen::htmlFileExtension;
+ result += df->file() + Doxygen::htmlFileExtension;
if (!df->anchor().isEmpty())
result += "#" + df->anchor();
delete df;
@@ -192,7 +191,7 @@ static QCString replaceRef(const QCString &buf,const QCString relPath,
QCString leftPart = buf.left(indexS);
QCString rightPart = buf.mid(indexE+1);
//printf("replaceRef(\n'%s'\n)->\n'%s+%s+%s'\n",
- // buf.data(),leftPart.data(),result.data(),rightPart.data());
+ // qPrint(buf),qPrint(leftPart),qPrint(result),qPrint(rightPart));
return leftPart + result + rightPart;
}
else
@@ -212,47 +211,41 @@ static QCString replaceRef(const QCString &buf,const QCString relPath,
* map file was found
* \returns TRUE if successful.
*/
-bool DotFilePatcher::convertMapFile(FTextStream &t,const char *mapName,
- const QCString relPath, bool urlOnly,
+bool DotFilePatcher::convertMapFile(TextStream &t,const QCString &mapName,
+ const QCString &relPath, bool urlOnly,
const QCString &context)
{
- QFile f(mapName);
- if (!f.open(IO_ReadOnly))
+ std::ifstream f(mapName.str(),std::ifstream::in);
+ if (!f.is_open())
{
err("problems opening map file %s for inclusion in the docs!\n"
"If you installed Graphviz/dot after a previous failing run, \n"
- "try deleting the output directory and rerun doxygen.\n",mapName);
+ "try deleting the output directory and rerun doxygen.\n",qPrint(mapName));
return FALSE;
}
- const int maxLineLen=10240;
- while (!f.atEnd()) // foreach line
+ std::string line;
+ while (getline(f,line)) // foreach line
{
- QCString buf(maxLineLen);
- int numBytes = f.readLine(buf.rawData(),maxLineLen);
- if (numBytes>0)
+ QCString buf = line+'\n';
+ if (buf.left(5)=="<area")
{
- buf.resize(numBytes+1);
-
- if (buf.left(5)=="<area")
+ QCString replBuf = replaceRef(buf,relPath,urlOnly,context);
+ // strip id="..." from replBuf since the id's are not needed and not unique.
+ int indexS = replBuf.find("id=\""), indexE;
+ if (indexS>0 && (indexE=replBuf.find('"',indexS+4))!=-1)
{
- QCString replBuf = replaceRef(buf,relPath,urlOnly,context);
- // strip id="..." from replBuf since the id's are not needed and not unique.
- int indexS = replBuf.find("id=\""), indexE;
- if (indexS>0 && (indexE=replBuf.find('"',indexS+4))!=-1)
- {
- t << replBuf.left(indexS-1) << replBuf.right(replBuf.length() - indexE - 1);
- }
- else
- {
- t << replBuf;
- }
+ t << replBuf.left(indexS-1) << replBuf.right(replBuf.length() - indexE - 1);
+ }
+ else
+ {
+ t << replBuf;
}
}
}
return TRUE;
}
-DotFilePatcher::DotFilePatcher(const char *patchFile)
+DotFilePatcher::DotFilePatcher(const QCString &patchFile)
: m_patchFile(patchFile)
{
}
@@ -298,7 +291,7 @@ int DotFilePatcher::addSVGObject(const QCString &baseName,
bool DotFilePatcher::run() const
{
- //printf("DotFilePatcher::run(): %s\n",m_patchFile.data());
+ //printf("DotFilePatcher::run(): %s\n",qPrint(m_patchFile));
bool interactiveSVG_local = Config_getBool(INTERACTIVE_SVG);
bool isSVGFile = m_patchFile.right(4)==".svg";
int graphId = -1;
@@ -310,49 +303,42 @@ bool DotFilePatcher::run() const
graphId = map.graphId;
relPath = map.relPath;
//printf("DotFilePatcher::addSVGConversion: file=%s zoomable=%d\n",
- // m_patchFile.data(),map->zoomable);
+ // qPrint(m_patchFile),map->zoomable);
}
- QCString tmpName = m_patchFile+".tmp";
- QCString patchFile = m_patchFile;
- if (!QDir::current().rename(patchFile,tmpName))
+ std::string tmpName = m_patchFile.str()+".tmp";
+ std::string patchFile = m_patchFile.str();
+ Dir thisDir;
+ if (!thisDir.rename(patchFile,tmpName))
{
- err("Failed to rename file %s to %s!\n",m_patchFile.data(),tmpName.data());
+ err("Failed to rename file %s to %s!\n",qPrint(m_patchFile),tmpName.c_str());
return FALSE;
}
- QFile fi(tmpName);
- QFile fo(patchFile);
- if (!fi.open(IO_ReadOnly))
+ std::ifstream fi(tmpName, std::ifstream::in);
+ std::ofstream fo(patchFile, std::ofstream::out | std::ofstream::binary);
+ if (!fi.is_open())
{
- err("problem opening file %s for patching!\n",tmpName.data());
- QDir::current().rename(tmpName,patchFile);
+ err("problem opening file %s for patching!\n",tmpName.c_str());
+ thisDir.rename(tmpName,patchFile);
return FALSE;
}
- if (!fo.open(IO_WriteOnly))
+ if (!fo.is_open())
{
- err("problem opening file %s for patching!\n",m_patchFile.data());
- QDir::current().rename(tmpName,patchFile);
+ err("problem opening file %s for patching!\n",qPrint(m_patchFile));
+ thisDir.rename(tmpName,patchFile);
return FALSE;
}
- FTextStream t(&fo);
- const int maxLineLen=100*1024;
- int lineNr=1;
+ TextStream t(&fo);
int width,height;
bool insideHeader=FALSE;
bool replacedHeader=FALSE;
bool foundSize=FALSE;
- while (!fi.atEnd()) // foreach line
+ int lineNr=1;
+ std::string lineStr;
+ while (getline(fi,lineStr))
{
- QCString line(maxLineLen);
- int numBytes = fi.readLine(line.rawData(),maxLineLen);
- if (numBytes<=0)
- {
- break;
- }
- line.resize(numBytes+1);
-
- //printf("line=[%s]\n",line.stripWhiteSpace().data());
+ QCString line = lineStr+'\n';
+ //printf("line=[%s]\n",qPrint(line.stripWhiteSpace()));
int i;
- ASSERT(numBytes<maxLineLen);
if (isSVGFile)
{
if (interactiveSVG_local)
@@ -403,19 +389,19 @@ bool DotFilePatcher::run() const
int n = sscanf(line.data()+i+1,"!-- SVG %d",&mapId);
if (n==1 && mapId>=0 && mapId<(int)m_maps.size())
{
- int e = QMAX(line.find("--]"),line.find("-->"));
+ int e = std::max(line.find("--]"),line.find("-->"));
const Map &map = m_maps.at(mapId);
//printf("DotFilePatcher::writeSVGFigure: file=%s zoomable=%d\n",
- // m_patchFile.data(),map.zoomable);
+ // qPrint(m_patchFile),map.zoomable);
if (!writeSVGFigureLink(t,map.relPath,map.label,map.mapFile))
{
- err("Problem extracting size from SVG file %s\n",map.mapFile.data());
+ err("Problem extracting size from SVG file %s\n",qPrint(map.mapFile));
}
if (e!=-1) t << line.mid(e+3);
}
else // error invalid map id!
{
- err("Found invalid SVG id in file %s!\n",m_patchFile.data());
+ err("Found invalid SVG id in file %s!\n",qPrint(m_patchFile));
t << line.mid(i);
}
}
@@ -426,22 +412,21 @@ bool DotFilePatcher::run() const
int n = sscanf(line.data()+i,"<!-- MAP %d",&mapId);
if (n==1 && mapId>=0 && mapId<(int)m_maps.size())
{
- QGString result;
- FTextStream tt(&result);
+ TextStream tt;
const Map &map = m_maps.at(mapId);
//printf("patching MAP %d in file %s with contents of %s\n",
- // mapId,m_patchFile.data(),map.mapFile.data());
+ // mapId,qPrint(m_patchFile),qPrint(map.mapFile));
convertMapFile(tt,map.mapFile,map.relPath,map.urlOnly,map.context);
- if (!result.isEmpty())
+ if (!tt.empty())
{
- t << "<map name=\"" << correctId(map.label) << "\" id=\"" << correctId(map.label) << "\">" << endl;
- t << result;
- t << "</map>" << endl;
+ t << "<map name=\"" << correctId(map.label) << "\" id=\"" << correctId(map.label) << "\">\n";
+ t << tt.str();
+ t << "</map>\n";
}
}
else // error invalid map id!
{
- err("Found invalid MAP id in file %s!\n",m_patchFile.data());
+ err("Found invalid MAP id in file %s!\n",qPrint(m_patchFile));
t << line.mid(i);
}
}
@@ -449,12 +434,12 @@ bool DotFilePatcher::run() const
{
int mapId=-1;
int n = sscanf(line.data()+i+2,"FIG %d",&mapId);
- //printf("line='%s' n=%d\n",line.data()+i,n);
+ //printf("line='%s' n=%d\n",qPrint(line)+i,n);
if (n==1 && mapId>=0 && mapId<(int)m_maps.size())
{
const Map &map = m_maps.at(mapId);
//printf("patching FIG %d in file %s with contents of %s\n",
- // mapId,m_patchFile.data(),map.mapFile.data());
+ // mapId,qPrint(m_patchFile),qPrint(map.mapFile));
if (!writeVecGfxFigure(t,map.label,map.mapFile))
{
err("problem writing FIG %d figure!\n",mapId);
@@ -463,7 +448,7 @@ bool DotFilePatcher::run() const
}
else // error invalid map id!
{
- err("Found invalid bounding FIG %d in file %s!\n",mapId,m_patchFile.data());
+ err("Found invalid bounding FIG %d in file %s!\n",mapId,qPrint(m_patchFile));
t << line;
}
}
@@ -478,39 +463,35 @@ bool DotFilePatcher::run() const
{
QCString orgName=m_patchFile.left(m_patchFile.length()-4)+"_org.svg";
t << substitute(svgZoomFooter,"$orgname",stripPath(orgName));
+ t.flush();
fo.close();
// keep original SVG file so we can refer to it, we do need to replace
// dummy link by real ones
- fi.setName(tmpName);
- fo.setName(orgName);
- if (!fi.open(IO_ReadOnly))
+ fi.open(tmpName,std::ifstream::in);
+ fo.open(orgName.str(),std::ofstream::out | std::ofstream::binary);
+ if (!fi.is_open())
{
- err("problem opening file %s for reading!\n",tmpName.data());
+ err("problem opening file %s for reading!\n",tmpName.c_str());
return FALSE;
}
- if (!fo.open(IO_WriteOnly))
+ if (!fo.is_open())
{
- err("problem opening file %s for writing!\n",orgName.data());
+ err("problem opening file %s for writing!\n",qPrint(orgName));
return FALSE;
}
- FTextStream to(&fo);
- while (!fi.atEnd()) // foreach line
+ t.setStream(&fo);
+ while (getline(fi,lineStr)) // foreach line
{
- QCString line(maxLineLen);
- int numBytes = fi.readLine(line.rawData(),maxLineLen);
- if (numBytes<=0)
- {
- break;
- }
- line.resize(numBytes+1);
+ std::string line = lineStr+'\n';
const Map &map = m_maps.front(); // there is only one 'map' for a SVG file
- to << replaceRef(line,map.relPath,map.urlOnly,map.context,"_top");
+ t << replaceRef(line.c_str(),map.relPath,map.urlOnly,map.context,"_top");
}
+ t.flush();
fi.close();
fo.close();
}
// remove temporary file
- QDir::current().remove(tmpName);
+ thisDir.remove(tmpName);
return TRUE;
}
@@ -521,50 +502,37 @@ bool DotFilePatcher::run() const
static bool readSVGSize(const QCString &fileName,int *width,int *height)
{
bool found=FALSE;
- QFile f(fileName);
- if (!f.open(IO_ReadOnly))
+ std::ifstream f(fileName.str(),std::ifstream::in);
+ if (!f.is_open())
{
- return FALSE;
+ return false;
}
- const int maxLineLen=4096;
- char buf[maxLineLen];
- while (!f.atEnd() && !found)
+ std::string line;
+ while (getline(f,line) && !found)
{
- int numBytes = f.readLine(buf,maxLineLen-1); // read line
- if (numBytes>0)
+ if (qstrncmp(line.c_str(),"<!--zoomable ",13)==0)
{
- buf[numBytes]='\0';
- if (qstrncmp(buf,"<!--zoomable ",13)==0)
- {
- *width=-1;
- *height=-1;
- sscanf(buf,"<!--zoomable %d",height);
- //printf("Found zoomable for %s!\n",fileName.data());
- found=TRUE;
- }
- else if (sscanf(buf,"<svg width=\"%dpt\" height=\"%dpt\"",width,height)==2)
- {
- //printf("Found fixed size %dx%d for %s!\n",*width,*height,fileName.data());
- found=TRUE;
- }
+ *width=-1;
+ *height=-1;
+ sscanf(line.c_str(),"<!--zoomable %d",height);
+ found=true;
}
- else // read error!
+ else if (sscanf(line.c_str(),"<svg width=\"%dpt\" height=\"%dpt\"",width,height)==2)
{
- //printf("Read error %d!\n",numBytes);
- return FALSE;
+ found=true;
}
}
- return TRUE;
+ return true;
}
-static void writeSVGNotSupported(FTextStream &out)
+static void writeSVGNotSupported(TextStream &out)
{
out << "<p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p>";
}
/// Check if a reference to a SVG figure can be written and do so if possible.
/// Returns FALSE if not possible (for instance because the SVG file is not yet generated).
-bool DotFilePatcher::writeSVGFigureLink(FTextStream &out,const QCString &relPath,
+bool DotFilePatcher::writeSVGFigureLink(TextStream &out,const QCString &relPath,
const QCString &baseName,const QCString &absImgName)
{
int width=600,height=600;
@@ -603,7 +571,7 @@ bool DotFilePatcher::writeSVGFigureLink(FTextStream &out,const QCString &relPath
return TRUE;
}
-bool DotFilePatcher::writeVecGfxFigure(FTextStream &out,const QCString &baseName,
+bool DotFilePatcher::writeVecGfxFigure(TextStream &out,const QCString &baseName,
const QCString &figureName)
{
int width=400,height=550;
diff --git a/src/dotfilepatcher.h b/src/dotfilepatcher.h
index 1886e47..af2c855 100644
--- a/src/dotfilepatcher.h
+++ b/src/dotfilepatcher.h
@@ -20,14 +20,13 @@
#include "qcstring.h"
-class FTextStream;
+class TextStream;
/** Helper class to insert a set of map file into an output file */
class DotFilePatcher
{
public:
- DotFilePatcher(const char *patchFile);
-
+ DotFilePatcher(const QCString &patchFile);
int addMap(const QCString &mapFile,const QCString &relPath,
bool urlOnly,const QCString &context,const QCString &label);
@@ -42,14 +41,14 @@ class DotFilePatcher
bool run() const;
bool isSVGFile() const;
- static bool convertMapFile(FTextStream &t,const char *mapName,
- const QCString relPath, bool urlOnly=FALSE,
+ static bool convertMapFile(TextStream &t,const QCString &mapName,
+ const QCString &relPath, bool urlOnly=FALSE,
const QCString &context=QCString());
- static bool writeSVGFigureLink(FTextStream &out,const QCString &relPath,
+ static bool writeSVGFigureLink(TextStream &out,const QCString &relPath,
const QCString &baseName,const QCString &absImgName);
- static bool writeVecGfxFigure(FTextStream& out, const QCString& baseName,
+ static bool writeVecGfxFigure(TextStream& out, const QCString& baseName,
const QCString& figureName);
private:
diff --git a/src/dotgfxhierarchytable.cpp b/src/dotgfxhierarchytable.cpp
index 9f81e22..f7b95d9 100644
--- a/src/dotgfxhierarchytable.cpp
+++ b/src/dotgfxhierarchytable.cpp
@@ -13,13 +13,15 @@
*
*/
-#include "dotgfxhierarchytable.h"
+#include <sstream>
+#include "dotgfxhierarchytable.h"
#include "language.h"
#include "util.h"
#include "message.h"
#include "doxygen.h"
#include "classlist.h"
+#include "dir.h"
QCString DotGfxHierarchyTable::getBaseName() const
{
@@ -27,15 +29,15 @@ QCString DotGfxHierarchyTable::getBaseName() const
if (m_prefix.isEmpty())
baseName.sprintf("inherit_graph_%d", m_graphId);
else
- baseName.sprintf("%sinherit_graph_%d",m_prefix.data(), m_graphId);
+ baseName.sprintf("%sinherit_graph_%d",qPrint(m_prefix), m_graphId);
return baseName;
}
void DotGfxHierarchyTable::computeTheGraph()
{
- FTextStream md5stream(&m_theGraph);
+ TextStream md5stream;
writeGraphHeader(md5stream,theTranslator->trGraphicalHierarchy());
- md5stream << " rankdir=\"LR\";" << endl;
+ md5stream << " rankdir=\"LR\";\n";
for (auto node : m_rootNodes)
{
if (node->subgraphId()==m_rootSubgraphNode->subgraphId())
@@ -51,7 +53,7 @@ void DotGfxHierarchyTable::computeTheGraph()
}
}
writeGraphFooter(md5stream);
-
+ m_theGraph = md5stream.str();
}
QCString DotGfxHierarchyTable::getMapLabel() const
@@ -59,8 +61,8 @@ QCString DotGfxHierarchyTable::getMapLabel() const
return escapeCharsInString(m_rootSubgraphNode->label(),FALSE);
}
-void DotGfxHierarchyTable::createGraph(DotNode *n,FTextStream &out,
- const char *path,const char *fileName,int id)
+void DotGfxHierarchyTable::createGraph(DotNode *n,TextStream &out,
+ const QCString &path,const QCString &fileName,int id)
{
m_rootSubgraphNode = n;
m_graphId = id;
@@ -69,23 +71,23 @@ void DotGfxHierarchyTable::createGraph(DotNode *n,FTextStream &out,
DotGraph::writeGraph(out, GOF_BITMAP, EOF_Html, path, fileName, "", TRUE, 0);
}
-void DotGfxHierarchyTable::writeGraph(FTextStream &out,
- const char *path,const char *fileName)
+void DotGfxHierarchyTable::writeGraph(TextStream &out,
+ const QCString &path,const QCString &fileName)
{
//printf("DotGfxHierarchyTable::writeGraph(%s)\n",name);
//printf("m_rootNodes=%p count=%d\n",m_rootNodes,m_rootNodes->count());
if (m_rootSubgraphs.empty()) return;
- QDir d(path);
+ Dir d(path.str());
// store the original directory
if (!d.exists())
{
- term("Output dir %s does not exist!\n",path);
+ term("Output dir %s does not exist!\n",qPrint(path));
}
// put each connected subgraph of the hierarchy in a row of the HTML output
- out << "<table border=\"0\" cellspacing=\"10\" cellpadding=\"0\">" << endl;
+ out << "<table border=\"0\" cellspacing=\"10\" cellpadding=\"0\">\n";
int count=0;
std::sort(m_rootSubgraphs.begin(),m_rootSubgraphs.end(),
@@ -94,23 +96,23 @@ void DotGfxHierarchyTable::writeGraph(FTextStream &out,
{
out << "<tr><td>";
createGraph(n,out,path,fileName,count++);
- out << "</td></tr>" << endl;
+ out << "</td></tr>\n";
}
- out << "</table>" << endl;
+ out << "</table>\n";
}
void DotGfxHierarchyTable::addHierarchy(DotNode *n,const ClassDef *cd,ClassDefSet &visitedClasses)
{
- //printf("addHierarchy '%s' baseClasses=%d\n",cd->name().data(),cd->baseClasses()->count());
+ //printf("addHierarchy '%s' baseClasses=%d\n",qPrint(cd->name()),cd->baseClasses()->count());
for (const auto &bcd : cd->subClasses())
{
ClassDef *bClass=bcd.classDef;
- //printf(" Trying sub class='%s' usedNodes=%d\n",bClass->name().data(),m_usedNodes->count());
+ //printf(" Trying sub class='%s' usedNodes=%d\n",qPrint(bClass->name()),m_usedNodes->count());
if (bClass && bClass->isVisibleInHierarchy() && hasVisibleRoot(bClass->baseClasses()))
{
auto it = m_usedNodes.find(bClass->name().str());
- //printf(" Node '%s' Found visible class='%s'\n",n->label().data(),
- // bClass->name().data());
+ //printf(" Node '%s' Found visible class='%s'\n",qPrint(n->label()),
+ // qPrint(bClass->name()));
DotNode *root = 0;
if (it!=m_usedNodes.end()) // node already present
{
@@ -123,8 +125,8 @@ void DotGfxHierarchyTable::addHierarchy(DotNode *n,const ClassDef *cd,ClassDefSe
n->addChild(bn.get(),bcd.prot);
bn->addParent(n);
//printf(" Adding node %s to existing base node %s (c=%d,p=%d)\n",
- // n->label().data(),
- // bn->label().data(),
+ // qPrint(n->label()),
+ // qPrint(bn->label()),
// bn->children() ? bn->children()->count() : 0,
// bn->parents() ? bn->parents()->count() : 0
// );
@@ -149,18 +151,18 @@ void DotGfxHierarchyTable::addHierarchy(DotNode *n,const ClassDef *cd,ClassDefSe
auto bn = std::make_unique<DotNode>(getNextNodeNumber(),
bClass->displayName(),
tooltip,
- tmp_url.data()
+ tmp_url
);
n->addChild(bn.get(),bcd.prot);
bn->addParent(n);
root = bn.get();
//printf(" Adding node %s to new base node %s (c=%d,p=%d)\n",
- // n->label().data(),
- // bn->label().data(),
+ // qPrint(n->label()),
+ // qPrint(bn->label()),
// bn->children() ? bn->children()->count() : 0,
// bn->parents() ? bn->parents()->count() : 0
// );
- //printf(" inserting %s (%p)\n",bClass->name().data(),bn);
+ //printf(" inserting %s (%p)\n",qPrint(bClass->name()),bn);
m_usedNodes.insert(std::make_pair(bClass->name().str(),std::move(bn))); // add node to the used list
}
if (visitedClasses.find(bClass)==visitedClasses.end() && !bClass->subClasses().empty())
@@ -177,7 +179,7 @@ void DotGfxHierarchyTable::addClassList(const ClassLinkedMap &cl,ClassDefSet &vi
{
for (const auto &cd : cl)
{
- //printf("Trying %s subClasses=%d\n",cd->name().data(),cd->subClasses()->count());
+ //printf("Trying %s subClasses=%d\n",qPrint(cd->name()),cd->subClasses()->count());
if (cd->getLanguage()==SrcLangExt_VHDL &&
(VhdlDocGen::VhdlClasses)cd->protection()!=VhdlDocGen::ENTITYCLASS
)
@@ -201,12 +203,12 @@ void DotGfxHierarchyTable::addClassList(const ClassLinkedMap &cl,ClassDefSet &vi
tmp_url+="#"+cd->anchor();
}
}
- //printf("Inserting root class %s\n",cd->name().data());
+ //printf("Inserting root class %s\n",qPrint(cd->name()));
QCString tooltip = cd->briefDescriptionAsTooltip();
auto n = std::make_unique<DotNode>(getNextNodeNumber(),
cd->displayName(),
tooltip,
- tmp_url.data());
+ tmp_url);
DotNode *root = n.get();
m_usedNodes.insert(std::make_pair(cd->name().str(),std::move(n)));
@@ -220,7 +222,7 @@ void DotGfxHierarchyTable::addClassList(const ClassLinkedMap &cl,ClassDefSet &vi
}
}
-DotGfxHierarchyTable::DotGfxHierarchyTable(const char *prefix,ClassDef::CompoundType ct)
+DotGfxHierarchyTable::DotGfxHierarchyTable(const QCString &prefix,ClassDef::CompoundType ct)
: m_prefix(prefix)
, m_classType(ct)
{
@@ -241,7 +243,7 @@ DotGfxHierarchyTable::DotGfxHierarchyTable(const char *prefix,ClassDef::Compound
{
if (n->subgraphId()==-1) // not yet colored
{
- //printf("Starting at node %s (%p): %d\n",n->label().data(),n,curColor);
+ //printf("Starting at node %s (%p): %d\n",qPrint(n->label()),n,curColor);
done=FALSE; // still uncolored nodes
n->setSubgraphId(curColor);
n->markAsVisible();
@@ -260,7 +262,7 @@ DotGfxHierarchyTable::DotGfxHierarchyTable(const char *prefix,ClassDef::Compound
for (auto n : m_rootSubgraphs)
{
//printf("Node %s color=%d (c=%d,p=%d)\n",
- // n->label().data(),n->m_subgraphId,
+ // qPrint(n->label()),n->m_subgraphId,
// n->children()?n->children()->count():0,
// n->parents()?n->parents()->count():0);
int number=0;
diff --git a/src/dotgfxhierarchytable.h b/src/dotgfxhierarchytable.h
index 089ecd2..0d37881 100644
--- a/src/dotgfxhierarchytable.h
+++ b/src/dotgfxhierarchytable.h
@@ -22,8 +22,6 @@
#include <vector>
#include "classdef.h"
-#include "ftextstream.h"
-
#include "dotgraph.h"
#include "dotnode.h"
@@ -33,10 +31,10 @@ class ClassLinkedMap;
class DotGfxHierarchyTable : public DotGraph
{
public:
- DotGfxHierarchyTable(const char *prefix="",ClassDef::CompoundType ct=ClassDef::Class);
- void createGraph(DotNode *rootNode,FTextStream &t,const char *path,
- const char *fileName,int id);
- void writeGraph(FTextStream &t,const char *path, const char *fileName);
+ DotGfxHierarchyTable(const QCString &prefix="",ClassDef::CompoundType ct=ClassDef::Class);
+ void createGraph(DotNode *rootNode,TextStream &t,const QCString &path,
+ const QCString &fileName,int id);
+ void writeGraph(TextStream &t,const QCString &path, const QCString &fileName);
const std::vector<DotNode*> subGraphs() const { return m_rootSubgraphs; }
protected:
diff --git a/src/dotgraph.cpp b/src/dotgraph.cpp
index 0da1db9..37a1587 100644
--- a/src/dotgraph.cpp
+++ b/src/dotgraph.cpp
@@ -13,6 +13,8 @@
*
*/
+#include <sstream>
+
#include "config.h"
#include "doxygen.h"
#include "index.h"
@@ -25,6 +27,7 @@
#include "dotgraph.h"
#include "dotnode.h"
#include "dotfilepatcher.h"
+#include "fileinfo.h"
#define MAP_CMD "cmapx"
@@ -38,22 +41,21 @@
static bool checkMd5Signature(const QCString &baseName,
const QCString &md5)
{
- QFile f(baseName+".md5");
- if (f.open(IO_ReadOnly))
+ std::ifstream f(baseName.str()+".md5",std::ifstream::in | std::ifstream::binary);
+ if (f.is_open())
{
// read checksum
- QCString md5stored(33);
- int bytesRead=f.readBlock(md5stored.rawData(),32);
+ char md5stored[33];
+ f.read(md5stored,32);
md5stored[32]='\0';
// compare checksum
- if (bytesRead==32 && md5==md5stored)
+ if (!f.fail() && md5==md5stored)
{
// bail out if equal
- return FALSE;
+ return false;
}
}
- f.close();
- return TRUE;
+ return true;
}
static bool checkDeliverables(const QCString &file1,
@@ -63,35 +65,34 @@ static bool checkDeliverables(const QCString &file1,
bool file2Ok = TRUE;
if (!file1.isEmpty())
{
- QFileInfo fi(file1);
+ FileInfo fi(file1.str());
file1Ok = (fi.exists() && fi.size()>0);
}
if (!file2.isEmpty())
{
- QFileInfo fi(file2);
+ FileInfo fi(file2.str());
file2Ok = (fi.exists() && fi.size()>0);
}
return file1Ok && file2Ok;
}
-static bool insertMapFile(FTextStream &out,const QCString &mapFile,
+static bool insertMapFile(TextStream &out,const QCString &mapFile,
const QCString &relPath,const QCString &mapLabel)
{
- QFileInfo fi(mapFile);
+ FileInfo fi(mapFile.str());
if (fi.exists() && fi.size()>0) // reuse existing map file
{
- QGString tmpstr;
- FTextStream tmpout(&tmpstr);
- DotFilePatcher::convertMapFile(tmpout,mapFile,relPath,FALSE);
- if (!tmpstr.isEmpty())
+ TextStream t;
+ DotFilePatcher::convertMapFile(t,mapFile,relPath,false);
+ if (!t.empty())
{
- out << "<map name=\"" << mapLabel << "\" id=\"" << mapLabel << "\">" << endl;
- out << tmpstr;
- out << "</map>" << endl;
+ out << "<map name=\"" << mapLabel << "\" id=\"" << mapLabel << "\">\n";
+ out << t.str();
+ out << "</map>\n";
}
- return TRUE;
+ return true;
}
- return FALSE; // no map file yet, need to generate it
+ return false; // no map file yet, need to generate it
}
//--------------------------------------------------------------------
@@ -103,24 +104,24 @@ QCString DotGraph::imgName() const
}
QCString DotGraph::writeGraph(
- FTextStream& t, // output stream for the code file (html, ...)
+ TextStream& t, // output stream for the code file (html, ...)
GraphOutputFormat gf, // bitmap(png/svg) or ps(eps/pdf)
EmbeddedOutputFormat ef, // html, latex, ...
- const char* path, // output folder
- const char* fileName, // name of the code file (for code patcher)
- const char* relPath, // output folder relative to code file
+ const QCString &path, // output folder
+ const QCString &fileName, // name of the code file (for code patcher)
+ const QCString &relPath, // output folder relative to code file
bool generateImageMap, // in case of bitmap, shall there be code generated?
int graphId) // number of this graph in the current code, used in svg code
{
m_graphFormat = gf;
m_textFormat = ef;
- m_dir = QDir(path);
+ m_dir = Dir(path.str());
m_fileName = fileName;
m_relPath = relPath;
m_generateImageMap = generateImageMap;
m_graphId = graphId;
- m_absPath = QCString(m_dir.absPath().data()) + "/";
+ m_absPath = m_dir.absPath() + "/";
m_baseName = getBaseName();
computeTheGraph();
@@ -138,15 +139,15 @@ bool DotGraph::prepareDotFile()
{
if (!m_dir.exists())
{
- term("Output dir %s does not exist!\n", m_dir.path().data());
+ term("Output dir %s does not exist!\n", m_dir.path().c_str());
}
- QCString sigStr(33);
+ char sigStr[33];
uchar md5_sig[16];
// calculate md5
MD5Buffer((const unsigned char*)m_theGraph.data(), m_theGraph.length(), md5_sig);
// convert result to a string
- MD5SigToString(md5_sig, sigStr.rawData(), 33);
+ MD5SigToString(md5_sig, sigStr);
// already queued files are processed again in case the output format has changed
@@ -163,27 +164,26 @@ bool DotGraph::prepareDotFile()
// need to rebuild the image
// write .dot file because image was new or has changed
- QFile f(absDotName());
- if (!f.open(IO_WriteOnly))
+ std::ofstream f(absDotName().str(),std::ofstream::out | std::ofstream::binary);
+ if (!f.is_open())
{
- err("Could not open file %s for writing\n",f.name().data());
+ err("Could not open file %s for writing\n",qPrint(absDotName()));
return TRUE;
}
- FTextStream t(&f);
- t << m_theGraph;
+ f << m_theGraph;
f.close();
if (m_graphFormat == GOF_BITMAP)
{
// run dot to create a bitmap image
- DotRunner * dotRun = DotManager::instance()->createRunner(absDotName().data(), sigStr.data());
+ DotRunner * dotRun = DotManager::instance()->createRunner(absDotName(), sigStr);
dotRun->addJob(Config_getEnum(DOT_IMAGE_FORMAT), absImgName());
if (m_generateImageMap) dotRun->addJob(MAP_CMD, absMapName());
}
else if (m_graphFormat == GOF_EPS)
{
// run dot to create a .eps image
- DotRunner *dotRun = DotManager::instance()->createRunner(absDotName().data(), sigStr.data());
+ DotRunner *dotRun = DotManager::instance()->createRunner(absDotName(), sigStr);
if (Config_getBool(USE_PDFLATEX))
{
dotRun->addJob("pdf",absImgName());
@@ -196,22 +196,22 @@ bool DotGraph::prepareDotFile()
return TRUE;
}
-void DotGraph::generateCode(FTextStream &t)
+void DotGraph::generateCode(TextStream &t)
{
QCString imgExt = getDotImageExtension();
if (m_graphFormat==GOF_BITMAP && m_textFormat==EOF_DocBook)
{
- t << "<para>" << endl;
- t << " <informalfigure>" << endl;
- t << " <mediaobject>" << endl;
- t << " <imageobject>" << endl;
+ t << "<para>\n";
+ t << " <informalfigure>\n";
+ t << " <mediaobject>\n";
+ t << " <imageobject>\n";
t << " <imagedata";
t << " width=\"50%\" align=\"center\" valign=\"middle\" scalefit=\"0\" fileref=\"" << m_relPath << m_baseName << "." << imgExt << "\">";
- t << "</imagedata>" << endl;
- t << " </imageobject>" << endl;
- t << " </mediaobject>" << endl;
- t << " </informalfigure>" << endl;
- t << "</para>" << endl;
+ t << "</imagedata>\n";
+ t << " </imageobject>\n";
+ t << " </mediaobject>\n";
+ t << " </informalfigure>\n";
+ t << "</para>\n";
}
else if (m_graphFormat==GOF_BITMAP && m_generateImageMap) // produce HTML to include the image
{
@@ -223,28 +223,28 @@ void DotGraph::generateCode(FTextStream &t)
if (m_regenerate)
{
DotManager::instance()->
- createFilePatcher(absImgName().data())->
+ createFilePatcher(absImgName())->
addSVGConversion(m_relPath,FALSE,QCString(),m_zoomable,m_graphId);
}
int mapId = DotManager::instance()->
- createFilePatcher(m_fileName.data())->
+ createFilePatcher(m_fileName)->
addSVGObject(m_baseName,absImgName(),m_relPath);
- t << "<!-- SVG " << mapId << " -->" << endl;
+ t << "<!-- SVG " << mapId << " -->\n";
}
- if (!m_noDivTag) t << "</div>" << endl;
+ if (!m_noDivTag) t << "</div>\n";
}
else // add link to bitmap file with image map
{
if (!m_noDivTag) t << "<div class=\"center\">";
t << "<img src=\"" << relImgName() << "\" border=\"0\" usemap=\"#" << correctId(getMapLabel()) << "\" alt=\"" << getImgAltText() << "\"/>";
if (!m_noDivTag) t << "</div>";
- t << endl;
+ t << "\n";
if (m_regenerate || !insertMapFile(t, absMapName(), m_relPath, correctId(getMapLabel())))
{
int mapId = DotManager::instance()->
- createFilePatcher(m_fileName.data())->
+ createFilePatcher(m_fileName)->
addMap(absMapName(), m_relPath, m_urlOnly, QCString(), getMapLabel());
- t << "<!-- MAP " << mapId << " -->" << endl;
+ t << "<!-- MAP " << mapId << " -->\n";
}
}
}
@@ -253,14 +253,14 @@ void DotGraph::generateCode(FTextStream &t)
if (m_regenerate || !DotFilePatcher::writeVecGfxFigure(t,m_baseName,absBaseName()))
{
int figId = DotManager::instance()->
- createFilePatcher(m_fileName.data())->
+ createFilePatcher(m_fileName)->
addFigure(m_baseName,absBaseName(),FALSE /*TRUE*/);
- t << endl << "% FIG " << figId << endl;
+ t << "\n% FIG " << figId << "\n";
}
}
}
-void DotGraph::writeGraphHeader(FTextStream &t,const QCString &title)
+void DotGraph::writeGraphHeader(TextStream &t,const QCString &title)
{
int fontSize = Config_getInt(DOT_FONTSIZE);
QCString fontName = Config_getString(DOT_FONTNAME);
@@ -273,7 +273,7 @@ void DotGraph::writeGraphHeader(FTextStream &t,const QCString &title)
{
t << "\"" << convertToXML(title) << "\"";
}
- t << endl << "{" << endl;
+ t << "\n{\n";
if (Config_getBool(INTERACTIVE_SVG)) // insert a comment to force regeneration when this
// option is toggled
{
@@ -282,7 +282,7 @@ void DotGraph::writeGraphHeader(FTextStream &t,const QCString &title)
t << " // LATEX_PDF_SIZE\n"; // write placeholder for LaTeX PDF bounding box size replacement
if (Config_getBool(DOT_TRANSPARENT))
{
- t << " bgcolor=\"transparent\";" << endl;
+ t << " bgcolor=\"transparent\";\n";
}
t << " edge [fontname=\"" << fontName << "\","
"fontsize=\"" << fontSize << "\","
@@ -292,9 +292,9 @@ void DotGraph::writeGraphHeader(FTextStream &t,const QCString &title)
"fontsize=\"" << fontSize << "\",shape=record];\n";
}
-void DotGraph::writeGraphFooter(FTextStream &t)
+void DotGraph::writeGraphFooter(TextStream &t)
{
- t << "}" << endl;
+ t << "}\n";
}
void DotGraph::computeGraph(DotNode *root,
@@ -304,15 +304,14 @@ void DotGraph::computeGraph(DotNode *root,
bool renderParents,
bool backArrows,
const QCString &title,
- QGString &graphStr)
+ QCString &graphStr)
{
//printf("computeMd5Signature\n");
- QGString buf;
- FTextStream md5stream(&buf);
+ TextStream md5stream;
writeGraphHeader(md5stream,title);
if (!rank.isEmpty())
{
- md5stream << " rankdir=\"" << rank << "\";" << endl;
+ md5stream << " rankdir=\"" << rank << "\";\n";
}
root->clearWriteFlag();
root->write(md5stream, gt, format, gt!=CallGraph && gt!=Dependency, TRUE, backArrows);
@@ -324,7 +323,7 @@ void DotGraph::computeGraph(DotNode *root,
{
const auto &children = pn->children();
auto child_it = std::find(children.begin(),children.end(),root);
- int index = child_it - children.begin();
+ size_t index = child_it - children.begin();
root->writeArrow(md5stream, // stream
gt, // graph type
format, // output format
@@ -345,6 +344,6 @@ void DotGraph::computeGraph(DotNode *root,
}
writeGraphFooter(md5stream);
- graphStr=buf.data();
+ graphStr=md5stream.str();
}
diff --git a/src/dotgraph.h b/src/dotgraph.h
index b90d980..2a77504 100644
--- a/src/dotgraph.h
+++ b/src/dotgraph.h
@@ -16,12 +16,13 @@
#ifndef DOTGRAPH_H
#define DOTGRAPH_H
-#include <qcstring.h>
-#include <qgstring.h>
-#include <qdir.h>
+#include <iostream>
+
+#include "qcstring.h"
+#include "dir.h"
-class FTextStream;
class DotNode;
+class TextStream;
enum GraphOutputFormat { GOF_BITMAP, GOF_EPS };
enum EmbeddedOutputFormat { EOF_Html, EOF_LaTeX, EOF_Rtf, EOF_DocBook };
@@ -39,18 +40,18 @@ class DotGraph
/** returns node numbers. The Counter is reset by the constructor */
int getNextNodeNumber() { return ++m_curNodeNumber; }
- QCString writeGraph(FTextStream &t,
+ QCString writeGraph(TextStream &t,
GraphOutputFormat gf,
EmbeddedOutputFormat ef,
- const char *path,
- const char *fileName,
- const char *relPath,
+ const QCString &path,
+ const QCString &fileName,
+ const QCString &relPath,
bool writeImageMap=TRUE,
int graphId=-1
);
- static void writeGraphHeader(FTextStream& t, const QCString& title = QCString());
- static void writeGraphFooter(FTextStream& t);
+ static void writeGraphHeader(TextStream& t, const QCString& title = QCString());
+ static void writeGraphFooter(TextStream& t);
static void computeGraph(DotNode* root,
GraphType gt,
GraphOutputFormat format,
@@ -58,7 +59,7 @@ class DotGraph
bool renderParents,
bool backArrows,
const QCString& title,
- QGString& graphStr
+ QCString& graphStr
);
virtual QCString getBaseName() const = 0;
@@ -77,7 +78,7 @@ class DotGraph
// the following variables are used while writing the graph to a .dot file
GraphOutputFormat m_graphFormat = GOF_BITMAP;
EmbeddedOutputFormat m_textFormat = EOF_Html;
- QDir m_dir;
+ Dir m_dir;
QCString m_fileName;
QCString m_relPath;
bool m_generateImageMap = false;
@@ -85,7 +86,7 @@ class DotGraph
QCString m_absPath;
QCString m_baseName;
- QGString m_theGraph;
+ QCString m_theGraph;
bool m_regenerate = false;
bool m_doNotAddImageToIndex = false;
bool m_noDivTag = false;
@@ -97,7 +98,7 @@ class DotGraph
DotGraph &operator=(const DotGraph &);
bool prepareDotFile();
- void generateCode(FTextStream &t);
+ void generateCode(TextStream &t);
int m_curNodeNumber = 0;
};
diff --git a/src/dotgroupcollaboration.cpp b/src/dotgroupcollaboration.cpp
index 1dc1380..d409d50 100644
--- a/src/dotgroupcollaboration.cpp
+++ b/src/dotgroupcollaboration.cpp
@@ -20,6 +20,7 @@
#include "pagedef.h"
#include "util.h"
#include "config.h"
+#include "textstream.h"
DotGroupCollaboration::DotGroupCollaboration(const GroupDef* gd)
{
@@ -207,7 +208,7 @@ QCString DotGroupCollaboration::getBaseName() const
void DotGroupCollaboration::computeTheGraph()
{
- FTextStream md5stream(&m_theGraph);
+ TextStream md5stream;
writeGraphHeader(md5stream,m_rootNode->label());
// clean write flags
@@ -230,6 +231,7 @@ void DotGroupCollaboration::computeTheGraph()
writeGraphFooter(md5stream);
+ m_theGraph = md5stream.str();
}
QCString DotGroupCollaboration::getMapLabel() const
@@ -237,9 +239,9 @@ QCString DotGroupCollaboration::getMapLabel() const
return escapeCharsInString(m_baseName, FALSE);
}
-QCString DotGroupCollaboration::writeGraph( FTextStream &t,
+QCString DotGroupCollaboration::writeGraph( TextStream &t,
GraphOutputFormat graphFormat, EmbeddedOutputFormat textFormat,
- const char *path, const char *fileName, const char *relPath,
+ const QCString &path, const QCString &fileName, const QCString &relPath,
bool generateImageMap,int graphId)
{
m_doNotAddImageToIndex = TRUE;
@@ -247,7 +249,7 @@ QCString DotGroupCollaboration::writeGraph( FTextStream &t,
return DotGraph::writeGraph(t, graphFormat, textFormat, path, fileName, relPath, generateImageMap, graphId);
}
-void DotGroupCollaboration::Edge::write( FTextStream &t ) const
+void DotGroupCollaboration::Edge::write( TextStream &t ) const
{
const char* linkTypeColor[] = {
"darkorchid3"
@@ -304,7 +306,7 @@ void DotGroupCollaboration::Edge::write( FTextStream &t ) const
break;
}
t << ", " << arrowStyle;
- t << "];" << endl;
+ t << "];\n";
}
bool DotGroupCollaboration::isTrivial() const
@@ -312,7 +314,7 @@ bool DotGroupCollaboration::isTrivial() const
return m_usedNodes.size() <= 1;
}
-void DotGroupCollaboration::writeGraphHeader(FTextStream &t,const QCString &title) const
+void DotGroupCollaboration::writeGraphHeader(TextStream &t,const QCString &title) const
{
int fontSize = Config_getInt(DOT_FONTSIZE);
QCString fontName = Config_getString(DOT_FONTNAME);
@@ -325,11 +327,11 @@ void DotGroupCollaboration::writeGraphHeader(FTextStream &t,const QCString &titl
{
t << "\"" << convertToXML(title) << "\"";
}
- t << endl;
- t << "{" << endl;
+ t << "\n";
+ t << "{\n";
if (Config_getBool(DOT_TRANSPARENT))
{
- t << " bgcolor=\"transparent\";" << endl;
+ t << " bgcolor=\"transparent\";\n";
}
t << " edge [fontname=\"" << fontName << "\",fontsize=\"" << fontSize << "\","
"labelfontname=\"" << fontName << "\",labelfontsize=\"" << fontSize << "\"];\n";
diff --git a/src/dotgroupcollaboration.h b/src/dotgroupcollaboration.h
index ebfe6e7..872e7f7 100644
--- a/src/dotgroupcollaboration.h
+++ b/src/dotgroupcollaboration.h
@@ -20,14 +20,16 @@
#include "dotgraph.h"
#include "groupdef.h"
+class TextStream;
+
/** Representation of a group collaboration graph */
class DotGroupCollaboration : public DotGraph
{
public :
DotGroupCollaboration(const GroupDef* gd);
~DotGroupCollaboration();
- QCString writeGraph(FTextStream &t, GraphOutputFormat gf,EmbeddedOutputFormat ef,
- const char *path,const char *fileName,const char *relPath,
+ QCString writeGraph(TextStream &t, GraphOutputFormat gf,EmbeddedOutputFormat ef,
+ const QCString &path,const QCString &fileName,const QCString &relPath,
bool writeImageMap=TRUE,int graphId=-1);
bool isTrivial() const;
@@ -50,7 +52,7 @@ class DotGroupCollaboration : public DotGraph
struct Link
{
- Link(const QCString lab,const QCString &u) : label(lab), url(u) {}
+ Link(const QCString &lab,const QCString &u) : label(lab), url(u) {}
QCString label;
QCString url;
};
@@ -65,13 +67,13 @@ class DotGroupCollaboration : public DotGraph
EdgeType eType;
std::vector<Link> links;
- void write( FTextStream &t ) const;
+ void write( TextStream &t ) const;
};
void buildGraph(const GroupDef* gd);
void addCollaborationMember(const Definition* def, QCString& url, EdgeType eType );
void addMemberList( class MemberList* ml );
- void writeGraphHeader(FTextStream &t,const QCString &title) const;
+ void writeGraphHeader(TextStream &t,const QCString &title) const;
Edge* addEdge( DotNode* _pNStart, DotNode* _pNEnd, EdgeType _eType,
const QCString& _label, const QCString& _url );
diff --git a/src/dotincldepgraph.cpp b/src/dotincldepgraph.cpp
index 07b2139..5a2f7ca 100644
--- a/src/dotincldepgraph.cpp
+++ b/src/dotincldepgraph.cpp
@@ -17,6 +17,7 @@
#include "dotnode.h"
#include "util.h"
#include "config.h"
+#include "textstream.h"
void DotInclDepGraph::buildGraph(DotNode *n,const FileDef *fd,int distance)
{
@@ -25,7 +26,7 @@ void DotInclDepGraph::buildGraph(DotNode *n,const FileDef *fd,int distance)
{
const FileDef *bfd = ii.fileDef;
QCString in = ii.includeName;
- //printf(">>>> in='%s' bfd=%p\n",ii->includeName.data(),bfd);
+ //printf(">>>> in='%s' bfd=%p\n",qPrint(ii->includeName),bfd);
bool doc=TRUE,src=FALSE;
if (bfd)
{
@@ -36,7 +37,7 @@ void DotInclDepGraph::buildGraph(DotNode *n,const FileDef *fd,int distance)
if (doc || src || !Config_getBool(HIDE_UNDOC_RELATIONS))
{
QCString url="";
- if (bfd) url=bfd->getOutputFileBase().copy();
+ if (bfd) url=bfd->getOutputFileBase();
if (!doc && src)
{
url=bfd->getSourceFileBase();
@@ -45,7 +46,7 @@ void DotInclDepGraph::buildGraph(DotNode *n,const FileDef *fd,int distance)
if (it!=m_usedNodes.end()) // file is already a node in the graph
{
DotNode *bn = it->second;
- n->addChild(bn,0,0,0);
+ n->addChild(bn,0,0);
bn->addParent(n);
bn->setDistance(distance);
}
@@ -64,7 +65,7 @@ void DotInclDepGraph::buildGraph(DotNode *n,const FileDef *fd,int distance)
tmp_url, // url
FALSE, // rootNode
0); // cd
- n->addChild(bn,0,0,0);
+ n->addChild(bn,0,0);
bn->addParent(n);
m_usedNodes.insert(std::make_pair(in.str(),bn));
bn->setDistance(distance);
@@ -130,7 +131,7 @@ DotInclDepGraph::DotInclDepGraph(const FileDef *fd,bool inverse)
m_startNode = new DotNode(getNextNodeNumber(),
fd->docName(),
tooltip,
- tmp_url.data(),
+ tmp_url,
TRUE); // root node
m_startNode->setDistance(0);
m_usedNodes.insert(std::make_pair(fd->absFilePath().str(),m_startNode));
@@ -180,12 +181,12 @@ QCString DotInclDepGraph::getMapLabel() const
}
}
-QCString DotInclDepGraph::writeGraph(FTextStream &out,
+QCString DotInclDepGraph::writeGraph(TextStream &out,
GraphOutputFormat graphFormat,
EmbeddedOutputFormat textFormat,
- const char *path,
- const char *fileName,
- const char *relPath,
+ const QCString &path,
+ const QCString &fileName,
+ const QCString &relPath,
bool generateImageMap,
int graphId)
{
@@ -207,7 +208,7 @@ int DotInclDepGraph::numNodes() const
return (int)m_startNode->children().size();
}
-void DotInclDepGraph::writeXML(FTextStream &t)
+void DotInclDepGraph::writeXML(TextStream &t)
{
for (const auto &kv : m_usedNodes)
{
@@ -215,7 +216,7 @@ void DotInclDepGraph::writeXML(FTextStream &t)
}
}
-void DotInclDepGraph::writeDocbook(FTextStream &t)
+void DotInclDepGraph::writeDocbook(TextStream &t)
{
for (const auto &kv : m_usedNodes)
{
diff --git a/src/dotincldepgraph.h b/src/dotincldepgraph.h
index 0105489..a0e58bf 100644
--- a/src/dotincldepgraph.h
+++ b/src/dotincldepgraph.h
@@ -22,20 +22,22 @@
#include "dotnode.h"
#include "dotgraph.h"
+class TextStream;
+
/** Representation of an include dependency graph */
class DotInclDepGraph : public DotGraph
{
public:
DotInclDepGraph(const FileDef *fd,bool inverse);
~DotInclDepGraph();
- QCString writeGraph(FTextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef,
- const char *path,const char *fileName,const char *relPath,
+ QCString writeGraph(TextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef,
+ const QCString &path,const QCString &fileName,const QCString &relPath,
bool writeImageMap=TRUE,int graphId=-1);
bool isTrivial() const;
bool isTooBig() const;
int numNodes() const;
- void writeXML(FTextStream &t);
- void writeDocbook(FTextStream &t);
+ void writeXML(TextStream &t);
+ void writeDocbook(TextStream &t);
protected:
virtual QCString getBaseName() const;
diff --git a/src/dotlegendgraph.cpp b/src/dotlegendgraph.cpp
index b17a293..f512fa2 100644
--- a/src/dotlegendgraph.cpp
+++ b/src/dotlegendgraph.cpp
@@ -13,6 +13,8 @@
*
*/
+#include <sstream>
+
#include "dotlegendgraph.h"
#include "util.h"
#include "config.h"
@@ -21,15 +23,15 @@
#include "language.h"
#include "dotfilepatcher.h"
-void DotLegendGraph::writeGraph(const char *path)
+void DotLegendGraph::writeGraph(const QCString &path)
{
- FTextStream ts;
+ TextStream ts;
DotGraph::writeGraph(ts, GOF_BITMAP, EOF_Html, path, "", "", FALSE, 0);
if (getDotImageExtension()=="svg")
{
DotManager::instance()->
- createFilePatcher((absBaseName()+Config_getString(HTML_FILE_EXTENSION)).data())->
+ createFilePatcher(absBaseName()+Config_getString(HTML_FILE_EXTENSION))->
addSVGObject("graph_legend", absImgName(),QCString());
}
}
@@ -43,7 +45,7 @@ void DotLegendGraph::computeTheGraph()
{
int fontSize = Config_getInt(DOT_FONTSIZE);
QCString fontName = Config_getString(DOT_FONTNAME);
- FTextStream md5stream(&m_theGraph);
+ TextStream md5stream;
writeGraphHeader(md5stream,theTranslator->trLegendTitle());
md5stream << " Node9 [shape=\"box\",label=\"Inherited\",fontsize=\"" << fontSize << "\",height=0.2,width=0.4,fontname=\"" << fontName << "\",fillcolor=\"grey75\",style=\"filled\" fontcolor=\"black\"];\n";
md5stream << " Node10 -> Node9 [dir=\"back\",color=\"midnightblue\",fontsize=\"" << fontSize << "\",style=\"solid\",fontname=\"" << fontName << "\"];\n";
@@ -63,6 +65,7 @@ void DotLegendGraph::computeTheGraph()
md5stream << " Node18 -> Node9 [dir=\"back\",color=\"darkorchid3\",fontsize=\"" << fontSize << "\",style=\"dashed\",label=\"m_usedClass\",fontname=\"" << fontName << "\"];\n";
md5stream << " Node18 [shape=\"box\",label=\"Used\",fontsize=\"" << fontSize << "\",height=0.2,width=0.4,fontname=\"" << fontName << "\",color=\"black\"];\n";
writeGraphFooter(md5stream);
+ m_theGraph = md5stream.str();
}
QCString DotLegendGraph::getMapLabel() const
diff --git a/src/dotlegendgraph.h b/src/dotlegendgraph.h
index 2d8eeec..2adf625 100644
--- a/src/dotlegendgraph.h
+++ b/src/dotlegendgraph.h
@@ -22,7 +22,7 @@
class DotLegendGraph : public DotGraph
{
public:
- void writeGraph(const char *path);
+ void writeGraph(const QCString &path);
private:
virtual QCString getBaseName() const;
diff --git a/src/dotnode.cpp b/src/dotnode.cpp
index 318878d..bfc7c08 100644
--- a/src/dotnode.cpp
+++ b/src/dotnode.cpp
@@ -14,8 +14,6 @@
*/
#include "dotnode.h"
-
-#include "ftextstream.h"
#include "classdef.h"
#include "config.h"
#include "memberlist.h"
@@ -23,6 +21,7 @@
#include "language.h"
#include "doxygen.h"
#include "util.h"
+#include "textstream.h"
/** Helper struct holding the properties of a edge in a dot graph. */
struct EdgeProperties
@@ -123,9 +122,9 @@ static UmlDetailLevel getUmlDetailLevelFromConfig()
static QCString escapeTooltip(const QCString &tooltip)
{
+ if (tooltip.isEmpty()) return tooltip;
QCString result;
const char *p=tooltip.data();
- if (p==0) return result;
char c;
while ((c=*p++))
{
@@ -139,7 +138,7 @@ static QCString escapeTooltip(const QCString &tooltip)
return result;
}
-static void writeBoxMemberList(FTextStream &t,
+static void writeBoxMemberList(TextStream &t,
char prot,const MemberList *ml,const ClassDef *scope,
bool isStatic=FALSE,const StringUnorderedSet *skipNames=nullptr)
{
@@ -287,7 +286,7 @@ static QCString stripProtectionPrefix(const QCString &s)
}
}
-DotNode::DotNode(int n,const char *lab,const char *tip, const char *url,
+DotNode::DotNode(int n,const QCString &lab,const QCString &tip, const QCString &url,
bool isRoot,const ClassDef *cd)
: m_number(n)
, m_label(lab)
@@ -305,8 +304,8 @@ DotNode::~DotNode()
void DotNode::addChild(DotNode *n,
int edgeColor,
int edgeStyle,
- const char *edgeLab,
- const char *edgeURL,
+ const QCString &edgeLab,
+ const QCString &edgeURL,
int edgeLabCol
)
{
@@ -362,7 +361,7 @@ void DotNode::setDistance(int distance)
inline int DotNode::findParent( DotNode *n )
{
auto it = std::find(m_parents.begin(),m_parents.end(),n);
- return it!=m_parents.end() ? it-m_parents.begin() : -1;
+ return it!=m_parents.end() ? static_cast<int>(it-m_parents.begin()) : -1;
}
/*! helper function that deletes all nodes in a connected graph, given
@@ -378,7 +377,7 @@ void DotNode::deleteNodes(DotNode *node)
}
}
-void DotNode::writeBox(FTextStream &t,
+void DotNode::writeBox(TextStream &t,
GraphType gt,
GraphOutputFormat /*format*/,
bool hasNonReachableChildren) const
@@ -412,7 +411,7 @@ void DotNode::writeBox(FTextStream &t,
}
}
- //printf("DotNode::writeBox for %s\n",m_classDef->name().data());
+ //printf("DotNode::writeBox for %s\n",qPrint(m_classDef->name()));
t << "{" << convertLabel(m_label) << "\\n";
if (getUmlDetailLevelFromConfig()!=UmlDetailLevel::None)
{
@@ -500,10 +499,10 @@ void DotNode::writeBox(FTextStream &t,
{
t << ",tooltip=\" \""; // space in tooltip is required otherwise still something like 'Node0' is used
}
- t << "];" << endl;
+ t << "];\n";
}
-void DotNode::writeArrow(FTextStream &t,
+void DotNode::writeArrow(TextStream &t,
GraphType gt,
GraphOutputFormat format,
const DotNode *cn,
@@ -549,17 +548,17 @@ void DotNode::writeArrow(FTextStream &t,
}
if (format==GOF_BITMAP) t << ",fontname=\"" << Config_getString(DOT_FONTNAME) << "\"";
- t << "];" << endl;
+ t << "];\n";
}
-void DotNode::write(FTextStream &t,
+void DotNode::write(TextStream &t,
GraphType gt,
GraphOutputFormat format,
bool topDown,
bool toChildren,
bool backArrows) const
{
- //printf("DotNode::write(%d) name=%s this=%p written=%d visible=%d\n",m_distance,m_label.data(),this,m_written,m_visible);
+ //printf("DotNode::write(%d) name=%s this=%p written=%d visible=%d\n",m_distance,qPrint(m_label),this,m_written,m_visible);
if (m_written) return; // node already written to the output
if (!m_visible) return; // node is not visible
writeBox(t,gt,format,m_truncated==Truncated);
@@ -571,7 +570,7 @@ void DotNode::write(FTextStream &t,
{
if (cn->isVisible())
{
- //printf("write arrow %s%s%s\n",label().data(),backArrows?"<-":"->",cn->label().data());
+ //printf("write arrow %s%s%s\n",qPrint(label()),backArrows?"<-":"->",qPrint(cn->label()));
writeArrow(t,gt,format,cn,&(*it),topDown,backArrows);
}
cn->write(t,gt,format,topDown,toChildren,backArrows);
@@ -586,8 +585,8 @@ void DotNode::write(FTextStream &t,
{
const auto &children = pn->children();
auto child_it = std::find(children.begin(),children.end(),this);
- int index = child_it - children.begin();
- //printf("write arrow %s%s%s\n",label().data(),backArrows?"<-":"->",pn->label().data());
+ size_t index = child_it - children.begin();
+ //printf("write arrow %s%s%s\n",qPrint(label()),backArrows?"<-":"->",qPrint(pn->label()));
writeArrow(t,
gt,
format,
@@ -600,27 +599,25 @@ void DotNode::write(FTextStream &t,
pn->write(t,gt,format,TRUE,FALSE,backArrows);
}
}
- //printf("end DotNode::write(%d) name=%s\n",distance,m_label.data());
+ //printf("end DotNode::write(%d) name=%s\n",distance,qPrint(m_label));
}
-void DotNode::writeXML(FTextStream &t,bool isClassGraph) const
+void DotNode::writeXML(TextStream &t,bool isClassGraph) const
{
- t << " <node id=\"" << m_number << "\">" << endl;
- t << " <label>" << convertToXML(m_label) << "</label>" << endl;
+ t << " <node id=\"" << m_number << "\">\n";
+ t << " <label>" << convertToXML(m_label) << "</label>\n";
if (!m_url.isEmpty())
{
QCString url(m_url);
- const char *refPtr = url.data();
- char *urlPtr = strchr(url.rawData(),'$');
- if (urlPtr)
+ int dollarPos = url.find('$');
+ if (dollarPos!=-1)
{
- *urlPtr++='\0';
- t << " <link refid=\"" << convertToXML(urlPtr) << "\"";
- if (*refPtr!='\0')
+ t << " <link refid=\"" << convertToXML(url.mid(dollarPos+1)) << "\"";
+ if (dollarPos>0)
{
- t << " external=\"" << convertToXML(refPtr) << "\"";
+ t << " external=\"" << convertToXML(url.left(dollarPos)) << "\"";
}
- t << "/>" << endl;
+ t << "/>\n";
}
}
auto it = m_edgeInfo.begin();
@@ -645,7 +642,7 @@ void DotNode::writeXML(FTextStream &t,bool isClassGraph) const
{
t << "include";
}
- t << "\">" << endl;
+ t << "\">\n";
if (!edgeInfo.label().isEmpty())
{
int p=0;
@@ -654,37 +651,35 @@ void DotNode::writeXML(FTextStream &t,bool isClassGraph) const
{
t << " <edgelabel>"
<< convertToXML(edgeInfo.label().mid(p,ni-p))
- << "</edgelabel>" << endl;
+ << "</edgelabel>\n";
p=ni+1;
}
t << " <edgelabel>"
<< convertToXML(edgeInfo.label().right(edgeInfo.label().length()-p))
- << "</edgelabel>" << endl;
+ << "</edgelabel>\n";
}
- t << " </childnode>" << endl;
+ t << " </childnode>\n";
++it;
}
- t << " </node>" << endl;
+ t << " </node>\n";
}
-void DotNode::writeDocbook(FTextStream &t,bool isClassGraph) const
+void DotNode::writeDocbook(TextStream &t,bool isClassGraph) const
{
- t << " <node id=\"" << m_number << "\">" << endl;
- t << " <label>" << convertToXML(m_label) << "</label>" << endl;
+ t << " <node id=\"" << m_number << "\">\n";
+ t << " <label>" << convertToXML(m_label) << "</label>\n";
if (!m_url.isEmpty())
{
QCString url(m_url);
- const char *refPtr = url.data();
- char *urlPtr = strchr(url.rawData(),'$');
- if (urlPtr)
+ int dollarPos = url.find('$');
+ if (dollarPos!=-1)
{
- *urlPtr++='\0';
- t << " <link refid=\"" << convertToXML(urlPtr) << "\"";
- if (*refPtr!='\0')
+ t << " <link refid=\"" << convertToXML(url.mid(dollarPos+1)) << "\"";
+ if (dollarPos>0)
{
- t << " external=\"" << convertToXML(refPtr) << "\"";
+ t << " external=\"" << convertToXML(url.left(dollarPos)) << "\"";
}
- t << "/>" << endl;
+ t << "/>\n";
}
}
auto it = m_edgeInfo.begin();
@@ -709,7 +704,7 @@ void DotNode::writeDocbook(FTextStream &t,bool isClassGraph) const
{
t << "include";
}
- t << "\">" << endl;
+ t << "\">\n";
if (!edgeInfo.label().isEmpty())
{
int p=0;
@@ -718,53 +713,50 @@ void DotNode::writeDocbook(FTextStream &t,bool isClassGraph) const
{
t << " <edgelabel>"
<< convertToXML(edgeInfo.label().mid(p,ni-p))
- << "</edgelabel>" << endl;
+ << "</edgelabel>\n";
p=ni+1;
}
t << " <edgelabel>"
<< convertToXML(edgeInfo.label().right(edgeInfo.label().length()-p))
- << "</edgelabel>" << endl;
+ << "</edgelabel>\n";
}
- t << " </childnode>" << endl;
+ t << " </childnode>\n";
++it;
}
- t << " </node>" << endl;
+ t << " </node>\n";
}
-void DotNode::writeDEF(FTextStream &t) const
+void DotNode::writeDEF(TextStream &t) const
{
const char* nodePrefix = " node-";
- t << " node = {" << endl;
- t << nodePrefix << "id = " << m_number << ';' << endl;
- t << nodePrefix << "label = '" << m_label << "';" << endl;
+ t << " node = {\n";
+ t << nodePrefix << "id = " << m_number << ";\n";
+ t << nodePrefix << "label = '" << m_label << "';\n";
if (!m_url.isEmpty())
{
QCString url(m_url);
- const char *refPtr = url.data();
- char *urlPtr = strchr(url.rawData(),'$');
- if (urlPtr)
+ int dollarPos = url.find('$');
+ if (dollarPos!=-1)
{
- *urlPtr++='\0';
- t << nodePrefix << "link = {" << endl << " "
- << nodePrefix << "link-id = '" << urlPtr << "';" << endl;
-
- if (*refPtr!='\0')
+ t << nodePrefix << "link = {\n" << " "
+ << nodePrefix << "link-id = '" << url.mid(dollarPos+1) << "';\n";
+ if (dollarPos>0)
{
t << " " << nodePrefix << "link-external = '"
- << refPtr << "';" << endl;
+ << url.left(dollarPos) << "';\n";
}
- t << " };" << endl;
+ t << " };\n";
}
}
auto it = m_edgeInfo.begin();
for (const auto &childNode : m_children)
{
const EdgeInfo &edgeInfo = *it;
- t << " node-child = {" << endl;
- t << " child-id = '" << childNode->number() << "';" << endl;
+ t << " node-child = {\n";
+ t << " child-id = '" << childNode->number() << "';\n";
t << " relation = ";
switch (edgeInfo.color())
@@ -777,18 +769,18 @@ void DotNode::writeDEF(FTextStream &t) const
case EdgeInfo::Orange2: t << "type-constraint"; break;
case EdgeInfo::Grey: ASSERT(0); break;
}
- t << ';' << endl;
+ t << ";\n";
if (!edgeInfo.label().isEmpty())
{
- t << " edgelabel = <<_EnD_oF_dEf_TeXt_" << endl
- << edgeInfo.label() << endl
- << "_EnD_oF_dEf_TeXt_;" << endl;
+ t << " edgelabel = <<_EnD_oF_dEf_TeXt_\n"
+ << edgeInfo.label() << "\n"
+ << "_EnD_oF_dEf_TeXt_;\n";
}
- t << " }; /* node-child */" << endl;
+ t << " }; /* node-child */\n";
++it;
}
- t << " }; /* node */" << endl;
+ t << " }; /* node */\n";
}
@@ -808,7 +800,7 @@ void DotNode::colorConnectedNodes(int curColor)
cn->setSubgraphId(curColor);
cn->markAsVisible();
cn->colorConnectedNodes(curColor);
- //printf("coloring node %s (%p): %d\n",cn->label().data(),cn,cn->subgraphId());
+ //printf("coloring node %s (%p): %d\n",qPrint(cn->label()),cn,cn->subgraphId());
}
}
@@ -819,7 +811,7 @@ void DotNode::colorConnectedNodes(int curColor)
pn->setSubgraphId(curColor);
pn->markAsVisible();
pn->colorConnectedNodes(curColor);
- //printf("coloring node %s (%p): %d\n",pn->label().data(),pn,pn->subgraphId());
+ //printf("coloring node %s (%p): %d\n",qPrint(pn->label()),pn,pn->subgraphId());
}
}
}
@@ -840,7 +832,7 @@ void DotNode::renumberNodes(int &number)
const DotNode *DotNode::findDocNode() const
{
if (!m_url.isEmpty()) return this;
- //printf("findDocNode(): '%s'\n",m_label.data());
+ //printf("findDocNode(): '%s'\n",qPrint(m_label));
for (const auto &pn : m_parents)
{
if (!pn->hasDocumentation())
diff --git a/src/dotnode.h b/src/dotnode.h
index 2eb3f7d..cd1e75b 100644
--- a/src/dotnode.h
+++ b/src/dotnode.h
@@ -19,12 +19,13 @@
#include <vector>
#include <map>
#include <deque>
+#include <iostream>
#include "dotgraph.h"
class ClassDef;
class DotNode;
-class FTextStream;
+class TextStream;
/** Attributes of an edge of a dot graph */
class EdgeInfo
@@ -57,7 +58,7 @@ class DotNode
public:
static void deleteNodes(DotNode* node);
static QCString convertLabel(const QCString& l);
- DotNode(int n,const char *lab,const char *tip,const char *url,
+ DotNode(int n,const QCString &lab,const QCString &tip,const QCString &url,
bool rootNode=FALSE,const ClassDef *cd=0);
~DotNode();
@@ -66,8 +67,8 @@ class DotNode
void addChild(DotNode *n,
int edgeColor=EdgeInfo::Purple,
int edgeStyle=EdgeInfo::Solid,
- const char *edgeLab=0,
- const char *edgeURL=0,
+ const QCString &edgeLab=QCString(),
+ const QCString &edgeURL=QCString(),
int edgeLabCol=-1);
void addParent(DotNode *n);
void deleteNode(DotNodeRefVector &deletedList);
@@ -75,14 +76,14 @@ class DotNode
void removeParent(DotNode *n);
int findParent( DotNode *n );
- void write(FTextStream &t,GraphType gt,GraphOutputFormat f,
+ void write(TextStream &t,GraphType gt,GraphOutputFormat f,
bool topDown,bool toChildren,bool backArrows) const;
- void writeXML(FTextStream &t,bool isClassGraph) const;
- void writeDocbook(FTextStream &t,bool isClassGraph) const;
- void writeDEF(FTextStream &t) const;
- void writeBox(FTextStream &t,GraphType gt,GraphOutputFormat f,
+ void writeXML(TextStream &t,bool isClassGraph) const;
+ void writeDocbook(TextStream &t,bool isClassGraph) const;
+ void writeDEF(TextStream &t) const;
+ void writeBox(TextStream &t,GraphType gt,GraphOutputFormat f,
bool hasNonReachableChildren) const;
- void writeArrow(FTextStream &t,GraphType gt,GraphOutputFormat f,const DotNode *cn,
+ void writeArrow(TextStream &t,GraphType gt,GraphOutputFormat f,const DotNode *cn,
const EdgeInfo *ei,bool topDown, bool pointBack=TRUE) const;
QCString label() const { return m_label; }
diff --git a/src/dotrunner.cpp b/src/dotrunner.cpp
index a1bbc52..f9f077d 100644
--- a/src/dotrunner.cpp
+++ b/src/dotrunner.cpp
@@ -16,14 +16,12 @@
#include <cassert>
#include "dotrunner.h"
-
-#include "qstring.h"
#include "util.h"
#include "portable.h"
#include "dot.h"
#include "message.h"
-#include "ftextstream.h"
#include "config.h"
+#include "dir.h"
// the graphicx LaTeX has a limitation of maximum size of 16384
// To be on the save side we take it a little bit smaller i.e. 150 inch * 72 dpi
@@ -35,7 +33,7 @@
// since dot silently reproduces the input file when it does not
// support the PNG format, we need to check the result.
-static void checkPngResult(const char *imgName)
+static void checkPngResult(const QCString &imgName)
{
FILE *f = Portable::fopen(imgName,"rb");
if (f)
@@ -48,73 +46,65 @@ static void checkPngResult(const char *imgName)
err("Image '%s' produced by dot is not a valid PNG!\n"
"You should either select a different format "
"(DOT_IMAGE_FORMAT in the config file) or install a more "
- "recent version of graphviz (1.7+)\n",imgName
+ "recent version of graphviz (1.7+)\n",qPrint(imgName)
);
}
}
else
{
- err("Could not read image '%s' generated by dot!\n",imgName);
+ err("Could not read image '%s' generated by dot!\n",qPrint(imgName));
}
fclose(f);
}
else
{
- err("Could not open image '%s' generated by dot!\n",imgName);
+ err("Could not open image '%s' generated by dot!\n",qPrint(imgName));
}
}
-static bool resetPDFSize(const int width,const int height, const char *base)
+static bool resetPDFSize(const int width,const int height, const QCString &base)
{
- QCString tmpName = QCString(base)+".tmp";
- QCString patchFile = QCString(base)+".dot";
- if (!QDir::current().rename(patchFile,tmpName))
+ std::string tmpName = base.str()+".tmp";
+ std::string patchFile = base.str()+".dot";
+ Dir thisDir;
+ if (!thisDir.rename(patchFile,tmpName))
{
- err("Failed to rename file %s to %s!\n",patchFile.data(),tmpName.data());
+ err("Failed to rename file %s to %s!\n",qPrint(patchFile),qPrint(tmpName));
return FALSE;
}
- QFile fi(tmpName);
- QFile fo(patchFile);
- if (!fi.open(IO_ReadOnly))
+ std::ifstream fi(tmpName,std::ifstream::in);
+ std::ofstream t(patchFile,std::ofstream::out | std::ofstream::binary);
+ if (!fi.is_open())
{
- err("problem opening file %s for patching!\n",tmpName.data());
- QDir::current().rename(tmpName,patchFile);
+ err("problem opening file %s for patching!\n",qPrint(tmpName));
+ thisDir.rename(tmpName,patchFile);
return FALSE;
}
- if (!fo.open(IO_WriteOnly))
+ if (!t.is_open())
{
- err("problem opening file %s for patching!\n",patchFile.data());
- QDir::current().rename(tmpName,patchFile);
- fi.close();
+ err("problem opening file %s for patching!\n",qPrint(patchFile));
+ thisDir.rename(tmpName,patchFile);
return FALSE;
}
- FTextStream t(&fo);
- const int maxLineLen=100*1024;
- while (!fi.atEnd()) // foreach line
+ std::string line;
+ while (getline(fi,line)) // foreach line
{
- QCString line(maxLineLen);
- int numBytes = fi.readLine(line.rawData(),maxLineLen);
- if (numBytes<=0)
- {
- break;
- }
- line.resize(numBytes+1);
- if (line.find("LATEX_PDF_SIZE") != -1)
+ if (line.find("LATEX_PDF_SIZE") != std::string::npos)
{
double scale = (width > height ? width : height)/double(MAX_LATEX_GRAPH_INCH);
- t << " size=\""<<width/scale << "," <<height/scale <<"\";\n";
+ t << " size=\""<<width/scale << "," <<height/scale << "\";\n";
}
else
- t << line;
+ t << line << "\n";
}
fi.close();
- fo.close();
+ t.close();
// remove temporary file
- QDir::current().remove(tmpName);
+ thisDir.remove(tmpName);
return TRUE;
}
-bool DotRunner::readBoundingBox(const char *fileName,int *width,int *height,bool isEps)
+bool DotRunner::readBoundingBox(const QCString &fileName,int *width,int *height,bool isEps)
{
const char *bb = isEps ? "%%PageBoundingBox:" : "/MediaBox [";
int bblen = (int)strlen(bb);
@@ -141,23 +131,23 @@ bool DotRunner::readBoundingBox(const char *fileName,int *width,int *height,bool
return TRUE;
}
}
- err("Failed to extract bounding box from generated diagram file %s\n",fileName);
+ err("Failed to extract bounding box from generated diagram file %s\n",qPrint(fileName));
fclose(f);
return FALSE;
}
//---------------------------------------------------------------------------------
-DotRunner::DotRunner(const std::string& absDotName, const std::string& md5Hash)
- : m_file(absDotName.data())
- , m_md5Hash(md5Hash.data())
+DotRunner::DotRunner(const QCString& absDotName, const QCString& md5Hash)
+ : m_file(absDotName)
+ , m_md5Hash(md5Hash)
, m_dotExe(Config_getString(DOT_PATH)+"dot")
, m_cleanUp(Config_getBool(DOT_CLEANUP))
{
}
-void DotRunner::addJob(const char *format, const char *output)
+void DotRunner::addJob(const QCString &format, const QCString &output)
{
for (auto& s: m_jobs)
@@ -167,8 +157,8 @@ void DotRunner::addJob(const char *format, const char *output)
// we have this job already
return;
}
- auto args = std::string ("-T") + format + " -o \"" + output + "\"";
- m_jobs.emplace_back(format, output, args);
+ auto args = QCString("-T") + format + " -o \"" + output + "\"";
+ m_jobs.emplace_back(format.str(), output, args);
}
QCString getBaseNameOfOutput(const QCString &output)
@@ -187,20 +177,20 @@ bool DotRunner::run()
// create output
if (Config_getBool(DOT_MULTI_TARGETS))
{
- dotArgs=QCString("\"")+m_file.data()+"\"";
+ dotArgs=QCString("\"")+m_file+"\"";
for (auto& s: m_jobs)
{
dotArgs+=' ';
- dotArgs+=s.args.data();
+ dotArgs+=s.args;
}
- if ((exitCode=Portable::system(m_dotExe.data(),dotArgs,FALSE))!=0) goto error;
+ if ((exitCode=Portable::system(m_dotExe,dotArgs,FALSE))!=0) goto error;
}
else
{
for (auto& s : m_jobs)
{
- dotArgs=QCString("\"")+m_file.data()+"\" "+s.args.data();
- if ((exitCode=Portable::system(m_dotExe.data(),dotArgs,FALSE))!=0) goto error;
+ dotArgs=QCString("\"")+m_file+"\" "+s.args;
+ if ((exitCode=Portable::system(m_dotExe,dotArgs,FALSE))!=0) goto error;
}
}
@@ -208,35 +198,35 @@ bool DotRunner::run()
// As there should be only one pdf file be generated, we don't need code for regenerating multiple pdf files in one call
for (auto& s : m_jobs)
{
- if (s.format.compare(0, 3, "pdf") == 0)
+ if (s.format.left(3)=="pdf")
{
int width=0,height=0;
- if (!readBoundingBox(s.output.data(),&width,&height,FALSE)) goto error;
+ if (!readBoundingBox(s.output,&width,&height,FALSE)) goto error;
if ((width > MAX_LATEX_GRAPH_SIZE) || (height > MAX_LATEX_GRAPH_SIZE))
{
- if (!resetPDFSize(width,height,getBaseNameOfOutput(s.output.data()))) goto error;
- dotArgs=QCString("\"")+m_file.data()+"\" "+s.args.data();
- if ((exitCode=Portable::system(m_dotExe.data(),dotArgs,FALSE))!=0) goto error;
+ if (!resetPDFSize(width,height,getBaseNameOfOutput(s.output))) goto error;
+ dotArgs=QCString("\"")+m_file+"\" "+s.args;
+ if ((exitCode=Portable::system(m_dotExe,dotArgs,FALSE))!=0) goto error;
}
}
- if (s.format.compare(0, 3, "png") == 0)
+ if (s.format.left(3)=="png")
{
- checkPngResult(s.output.data());
+ checkPngResult(s.output);
}
}
// remove .dot files
if (m_cleanUp)
{
- //printf("removing dot file %s\n",m_file.data());
- Portable::unlink(m_file.data());
+ //printf("removing dot file %s\n",qPrint(m_file));
+ Portable::unlink(m_file);
}
// create checksum file
- if (!m_md5Hash.empty())
+ if (!m_md5Hash.isEmpty())
{
- QCString md5Name = getBaseNameOfOutput(m_file.data()) + ".md5";
+ QCString md5Name = getBaseNameOfOutput(m_file) + ".md5";
FILE *f = Portable::fopen(md5Name,"w");
if (f)
{
@@ -247,7 +237,7 @@ bool DotRunner::run()
return TRUE;
error:
err("Problems running dot: exit code=%d, command='%s', arguments='%s'\n",
- exitCode,m_dotExe.data(),dotArgs.data());
+ exitCode,qPrint(m_dotExe),qPrint(dotArgs));
return FALSE;
}
diff --git a/src/dotrunner.h b/src/dotrunner.h
index 1b54617..19bdc79 100644
--- a/src/dotrunner.h
+++ b/src/dotrunner.h
@@ -24,26 +24,28 @@
#include <condition_variable>
#include <memory>
+#include "qcstring.h"
+
/** Helper class to run dot from doxygen from multiple threads. */
class DotRunner
{
struct DotJob
{
- DotJob(std::string f, std::string o, std::string a)
+ DotJob(const QCString &f, const QCString &o, const QCString &a)
: format(f), output(o), args(a) {}
- std::string format;
- std::string output;
- std::string args;
+ QCString format;
+ QCString output;
+ QCString args;
};
public:
/** Creates a runner for a dot \a file. */
- DotRunner(const std::string& absDotName, const std::string& md5Hash = std::string());
+ DotRunner(const QCString & absDotName, const QCString& md5Hash = QCString());
/** Adds an additional job to the run.
* Performing multiple jobs one file can be faster.
*/
- void addJob(const char *format,const char *output);
+ void addJob(const QCString &format,const QCString &output);
/** Prevent cleanup of the dot file (for user provided dot files) */
void preventCleanUp() { m_cleanUp = false; }
@@ -51,16 +53,15 @@ class DotRunner
/** Runs dot for all jobs added. */
bool run();
- // DotConstString const& getFileName() { return m_file; }
- std::string const & getMd5Hash() { return m_md5Hash; }
+ QCString getMd5Hash() { return m_md5Hash; }
- static bool readBoundingBox(const char* fileName, int* width, int* height, bool isEps);
+ static bool readBoundingBox(const QCString &fileName, int* width, int* height, bool isEps);
private:
- std::string m_file;
- std::string m_md5Hash;
- std::string m_dotExe;
- bool m_cleanUp;
+ QCString m_file;
+ QCString m_md5Hash;
+ QCString m_dotExe;
+ bool m_cleanUp;
std::vector<DotJob> m_jobs;
};
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index 6257eb8..3850448 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -13,10 +13,6 @@
*
*/
-#include <qfileinfo.h>
-#include <qfile.h>
-#include <qdir.h>
-
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
@@ -106,6 +102,9 @@
#include "clangparser.h"
#include "symbolresolver.h"
#include "regex.h"
+#include "fileinfo.h"
+#include "dir.h"
+#include "conceptdef.h"
#if USE_SQLITE3
#include <sqlite3.h>
@@ -126,6 +125,7 @@ extern void initResources();
// globally accessible variables
ClassLinkedMap *Doxygen::classLinkedMap = 0;
ClassLinkedMap *Doxygen::hiddenClassLinkedMap = 0;
+ConceptLinkedMap *Doxygen::conceptLinkedMap = 0;
NamespaceLinkedMap *Doxygen::namespaceLinkedMap = 0;
MemberNameLinkedMap *Doxygen::memberNameLinkedMap = 0;
MemberNameLinkedMap *Doxygen::functionNameLinkedMap = 0;
@@ -186,6 +186,7 @@ void clearAll()
Doxygen::classLinkedMap->clear();
Doxygen::hiddenClassLinkedMap->clear();
+ Doxygen::conceptLinkedMap->clear();
Doxygen::namespaceLinkedMap->clear();
Doxygen::pageLinkedMap->clear();
Doxygen::exampleLinkedMap->clear();
@@ -247,7 +248,7 @@ class Statistics
} g_s;
-static void addMemberDocs(const Entry *root,MemberDefMutable *md, const char *funcDecl,
+static void addMemberDocs(const Entry *root,MemberDefMutable *md, const QCString &funcDecl,
const ArgumentList *al,bool over_load,uint64 spec);
static void findMember(const Entry *root,
const QCString &relates,
@@ -308,7 +309,7 @@ static void addRelatedPage(Entry *root)
{
if (!g.groupname.isEmpty() && (gd=Doxygen::groupLinkedMap->find(g.groupname))) break;
}
- //printf("---> addRelatedPage() %s gd=%p\n",root->name.data(),gd);
+ //printf("---> addRelatedPage() %s gd=%p\n",qPrint(root->name),gd);
QCString doc;
if (root->brief.isEmpty())
{
@@ -349,7 +350,7 @@ static void buildGroupListFiltered(const Entry *root,bool additional, bool inclu
{
GroupDef *gd = Doxygen::groupLinkedMap->find(root->name);
//printf("Processing group '%s':'%s' add=%d ext=%d gd=%p\n",
- // root->type.data(),root->name.data(),additional,includeExternal,gd);
+ // qPrint(root->type),qPrint(root->name),additional,includeExternal,gd);
if (gd)
{
@@ -448,7 +449,7 @@ static void organizeSubGroupsFiltered(const Entry *root,bool additional)
GroupDef *gd;
if ((gd=Doxygen::groupLinkedMap->find(root->name)))
{
- //printf("adding %s to group %s\n",root->name.data(),gd->name().data());
+ //printf("adding %s to group %s\n",qPrint(root->name),qPrint(gd->name()));
addGroupToGroups(root,gd);
}
}
@@ -487,7 +488,7 @@ static void buildFileList(const Entry *root)
fd=findFileDef(Doxygen::inputNameLinkedMap,fn.left(newIndex) + "/" + root->name,ambig);
if (!fd) ambig = save_ambig;
}
- //printf("**************** root->name=%s fd=%p\n",root->name.data(),fd);
+ //printf("**************** root->name=%s fd=%p\n",qPrint(root->name),fd);
if (fd && !ambig)
{
//printf("Adding documentation!\n");
@@ -505,13 +506,12 @@ static void buildFileList(const Entry *root)
{
gd->addFile(fd);
fd->makePartOfGroup(gd);
- //printf("File %s: in group %s\n",fd->name().data(),s->data());
+ //printf("File %s: in group %s\n",qPrint(fd->name()),qPrint(gd->name()));
}
}
}
else
{
- const char *fn = root->fileName.data();
QCString text(4096);
text.sprintf("the name '%s' supplied as "
"the argument in the \\file statement ",
@@ -527,13 +527,14 @@ static void buildFileList(const Entry *root)
{
text+="is not an input file";
}
- warn(fn,root->startLine,"%s", text.data());
+ warn(root->fileName,root->startLine,"%s", qPrint(text));
}
}
for (const auto &e : root->children()) buildFileList(e.get());
}
-static void addIncludeFile(ClassDefMutable *cd,FileDef *ifd,const Entry *root)
+template<class DefMutable>
+static void addIncludeFile(DefMutable *cd,FileDef *ifd,const Entry *root)
{
if (
(!root->doc.stripWhiteSpace().isEmpty() ||
@@ -542,7 +543,7 @@ static void addIncludeFile(ClassDefMutable *cd,FileDef *ifd,const Entry *root)
) && root->protection!=Private
)
{
- //printf(">>>>>> includeFile=%s\n",root->includeFile.data());
+ //printf(">>>>>> includeFile=%s\n",qPrint(root->includeFile));
bool local=Config_getBool(FORCE_LOCAL_INCLUDES);
QCString includeFile = root->includeFile;
@@ -560,7 +561,7 @@ static void addIncludeFile(ClassDefMutable *cd,FileDef *ifd,const Entry *root)
bool ambig;
FileDef *fd=0;
// see if we need to include a verbatim copy of the header file
- //printf("root->includeFile=%s\n",root->includeFile.data());
+ //printf("root->includeFile=%s\n",qPrint(root->includeFile));
if (!includeFile.isEmpty() &&
(fd=findFileDef(Doxygen::inputNameLinkedMap,includeFile,ambig))==0
)
@@ -581,7 +582,7 @@ static void addIncludeFile(ClassDefMutable *cd,FileDef *ifd,const Entry *root)
{
text+="is not an input file";
}
- warn(root->fileName,root->startLine, "%s", text.data());
+ warn(root->fileName,root->startLine, "%s", qPrint(text));
}
else if (includeFile.isEmpty() && ifd &&
// see if the file extension makes sense
@@ -641,7 +642,7 @@ static bool addNamespace(Entry *root,ClassDef *cd)
{
NamespaceDef *nd=0;
QCString nsName = stripAnonymousNamespaceScope(e->name);
- //printf("addNameSpace() trying: %s\n",nsName.data());
+ //printf("addNameSpace() trying: %s\n",qPrint(nsName));
if (!nsName.isEmpty() && nsName.at(0)!='@' &&
(nd=getResolvedNamespace(nsName))
)
@@ -663,14 +664,14 @@ static bool addNamespace(Entry *root,ClassDef *cd)
static Definition *findScope(Entry *root,int level=0)
{
if (root==0) return 0;
- //printf("start findScope name=%s\n",root->name.data());
+ //printf("start findScope name=%s\n",qPrint(root->name));
Definition *result=0;
if (root->section&Entry::SCOPE_MASK)
{
result = findScope(root->parent,level+1); // traverse to the root of the tree
if (result)
{
- //printf("Found %s inside %s at level %d\n",root->name.data(),result->name().data(),level);
+ //printf("Found %s inside %s at level %d\n",qPrint(root->name),qPrint(result->name()),level);
// TODO: look at template arguments
result = result->findInnerCompound(root->name);
}
@@ -678,11 +679,11 @@ static Definition *findScope(Entry *root,int level=0)
{
// TODO: look at template arguments
result = Doxygen::globalScope->findInnerCompound(root->name);
- //printf("Found in globalScope %s at level %d\n",result->name().data(),level);
+ //printf("Found in globalScope %s at level %d\n",qPrint(result->name()),level);
}
}
- //printf("end findScope(%s,%d)=%s\n",root->name.data(),
- // level,result==0 ? "<none>" : result->name().data());
+ //printf("end findScope(%s,%d)=%s\n",qPrint(root->name),
+ // level,result==0 ? "<none>" : qPrint(result->name()));
return result;
}
#endif
@@ -705,7 +706,7 @@ QCString stripTemplateSpecifiers(const QCString &s)
}
if (c=='>' && round==0 && count>0) count--;
}
- //printf("stripTemplateSpecifiers(%s)=%s\n",s.data(),result.data());
+ //printf("stripTemplateSpecifiers(%s)=%s\n",qPrint(s),qPrint(result));
return result;
}
@@ -713,11 +714,11 @@ QCString stripTemplateSpecifiers(const QCString &s)
* full qualified name \a name. Creates an artificial scope if the scope is
* not found and set the parent/child scope relation if the scope is found.
*/
-static Definition *buildScopeFromQualifiedName(const QCString name_,SrcLangExt lang,const TagInfo *tagInfo)
+static Definition *buildScopeFromQualifiedName(const QCString &name_,SrcLangExt lang,const TagInfo *tagInfo)
{
QCString name = stripTemplateSpecifiers(name_);
int level = name.contains("::");
- //printf("buildScopeFromQualifiedName(%s) level=%d\n",name.data(),level);
+ //printf("buildScopeFromQualifiedName(%s) level=%d\n",qPrint(name),level);
int i=0;
int p=0,l;
Definition *prevScope=Doxygen::globalScope;
@@ -741,7 +742,7 @@ static Definition *buildScopeFromQualifiedName(const QCString name_,SrcLangExt l
else if (nd==0 && cd==0 && fullScope.find('<')==-1) // scope is not known and could be a namespace!
{
// introduce bogus namespace
- //printf("++ adding dummy namespace %s to %s tagInfo=%p\n",nsName.data(),prevScope->name().data(),tagInfo);
+ //printf("++ adding dummy namespace %s to %s tagInfo=%p\n",qPrint(nsName),qPrint(prevScope->name()),tagInfo);
NamespaceDefMutable *newNd=
toNamespaceDefMutable(
Doxygen::namespaceLinkedMap->add(fullScope,
@@ -786,7 +787,7 @@ static Definition *buildScopeFromQualifiedName(const QCString name_,SrcLangExt l
static Definition *findScopeFromQualifiedName(NamespaceDefMutable *startScope,const QCString &n,
FileDef *fileScope,const TagInfo *tagInfo)
{
- //printf("<findScopeFromQualifiedName(%s,%s)\n",startScope ? startScope->name().data() : 0, n.data());
+ //printf("<findScopeFromQualifiedName(%s,%s)\n",startScope ? qPrint(startScope->name()) : 0, qPrint(n));
Definition *resultScope=toDefinition(startScope);
if (resultScope==0) resultScope=Doxygen::globalScope;
QCString scope=stripTemplateSpecifiersFromScope(n,FALSE);
@@ -802,7 +803,7 @@ static Definition *findScopeFromQualifiedName(NamespaceDefMutable *startScope,co
{
QCString nestedNameSpecifier = scope.mid(i1,l1);
Definition *orgScope = resultScope;
- //printf(" nestedNameSpecifier=%s\n",nestedNameSpecifier.data());
+ //printf(" nestedNameSpecifier=%s\n",qPrint(nestedNameSpecifier));
resultScope = const_cast<Definition*>(resultScope->findInnerCompound(nestedNameSpecifier));
//printf(" resultScope=%p\n",resultScope);
if (resultScope==0)
@@ -820,7 +821,7 @@ static Definition *findScopeFromQualifiedName(NamespaceDefMutable *startScope,co
// for a nested class A::I in used namespace N, we get
// N::A::I while looking for A, so we should compare
// resultScope->name() against scope.left(i2+l2)
- //printf(" -> result=%s scope=%s\n",resultScope->name().data(),scope.data());
+ //printf(" -> result=%s scope=%s\n",qPrint(resultScope->name()),qPrint(scope));
if (rightScopeMatch(resultScope->name(),scope.left(i2+l2)))
{
break;
@@ -843,16 +844,16 @@ static Definition *findScopeFromQualifiedName(NamespaceDefMutable *startScope,co
// so use this instead.
QCString fqn = QCString(usedName) + scope.right(scope.length()-p);
resultScope = buildScopeFromQualifiedName(fqn,startScope->getLanguage(),0);
- //printf("Creating scope from fqn=%s result %p\n",fqn.data(),resultScope);
+ //printf("Creating scope from fqn=%s result %p\n",qPrint(fqn),resultScope);
if (resultScope)
{
- //printf("> Match! resultScope=%s\n",resultScope->name().data());
+ //printf("> Match! resultScope=%s\n",qPrint(resultScope->name()));
return resultScope;
}
}
}
- //printf("> name %s not found in scope %s\n",nestedNameSpecifier.data(),orgScope->name().data());
+ //printf("> name %s not found in scope %s\n",qPrint(nestedNameSpecifier),qPrint(orgScope->name()));
return 0;
}
nextFragment:
@@ -860,7 +861,7 @@ static Definition *findScopeFromQualifiedName(NamespaceDefMutable *startScope,co
l1=l2;
p=i2+l2;
}
- //printf(">findScopeFromQualifiedName scope %s\n",resultScope->name().data());
+ //printf(">findScopeFromQualifiedName scope %s\n",qPrint(resultScope->name()));
return resultScope;
}
@@ -985,7 +986,7 @@ static void addClassToContext(const Entry *root)
Debug::print(Debug::Classes,0," Existing class %s!\n",qPrint(cd->name()));
//if (cd->templateArguments()==0)
//{
- // //printf("existing ClassDef tempArgList=%p specScope=%s\n",root->tArgList,root->scopeSpec.data());
+ // //printf("existing ClassDef tempArgList=%p specScope=%s\n",root->tArgList,qPrint(root->scopeSpec));
// cd->setTemplateArguments(tArgList);
//}
@@ -1013,6 +1014,10 @@ static void addClassToContext(const Entry *root)
cd->setTemplateArguments(*tArgList);
}
}
+ if (cd->requiresClause().isEmpty() && !root->req.isEmpty())
+ {
+ cd->setRequiresClause(root->req);
+ }
cd->setCompoundType(convertToCompoundType(root->section,root->spec));
@@ -1027,7 +1032,7 @@ static void addClassToContext(const Entry *root)
extractNamespaceName(fullName,className,namespaceName);
//printf("New class: fullname %s namespace '%s' name='%s' brief='%s' docs='%s'\n",
- // fullName.data(),namespaceName.data(),className.data(),root->brief.data(),root->doc.data());
+ // qPrint(fullName),qPrint(namespaceName),qPrint(className),qPrint(root->brief),qPrint(root->doc));
QCString tagName;
QCString refFileName;
@@ -1057,7 +1062,7 @@ static void addClassToContext(const Entry *root)
tArgList = getTemplateArgumentsFromName(fullName,root->tArgLists);
}
// add class to the list
- //printf("ClassDict.insert(%s)\n",fullName.data());
+ //printf("ClassDict.insert(%s)\n",qPrint(fullName));
cd = toClassDefMutable(
Doxygen::classLinkedMap->add(fullName,
std::unique_ptr<ClassDef>(
@@ -1075,14 +1080,15 @@ static void addClassToContext(const Entry *root)
cd->setArtificial(root->artificial);
cd->setClassSpecifier(root->spec);
cd->setTypeConstraints(root->typeConstr);
- //printf("new ClassDef %s tempArgList=%p specScope=%s\n",fullName.data(),root->tArgList,root->scopeSpec.data());
+ //printf("new ClassDef %s tempArgList=%p specScope=%s\n",qPrint(fullName),root->tArgList,qPrint(root->scopeSpec));
- //printf("class %s template args=%s\n",fullName.data(),
- // tArgList ? tempArgListToString(tArgList,root->lang).data() : "<none>");
+ //printf("class %s template args=%s\n",qPrint(fullName),
+ // tArgList ? tempArgListToString(tArgList,qPrint(root->lang)) : "<none>");
if (tArgList)
{
cd->setTemplateArguments(*tArgList);
}
+ cd->setRequiresClause(root->req);
cd->setProtection(root->protection);
cd->setIsStatic(root->stat);
@@ -1116,9 +1122,9 @@ static void addClassToContext(const Entry *root)
if (fd && (root->section & Entry::COMPOUND_MASK))
{
//printf(">> Inserting class '%s' in file '%s' (root->fileName='%s')\n",
- // cd->name().data(),
- // fd->name().data(),
- // root->fileName.data()
+ // qPrint(cd->name()),
+ // qPrint(fd->name()),
+ // qPrint(root->fileName)
// );
cd->setFileDef(fd);
fd->insertClass(cd);
@@ -1155,6 +1161,148 @@ static void buildClassDocList(const Entry *root)
for (const auto &e : root->children()) buildClassDocList(e.get());
}
+//----------------------------------------------------------------------
+// build a list of all classes mentioned in the documentation
+// and all classes that have a documentation block before their definition.
+
+static void addConceptToContext(const Entry *root)
+{
+ FileDef *fd = root->fileDef();
+
+ QCString scName;
+ if (root->parent()->section&Entry::SCOPE_MASK)
+ {
+ scName=root->parent()->name;
+ }
+
+ // name with scope (if not present already)
+ QCString qualifiedName = root->name;
+ if (!scName.isEmpty() && !leftScopeMatch(qualifiedName,scName))
+ {
+ qualifiedName.prepend(scName+"::");
+ }
+
+ // see if we already found the concept before
+ ConceptDefMutable *cd = getConceptMutable(qualifiedName);
+
+ Debug::print(Debug::Classes,0, " Found concept with name %s (qualifiedName=%s -> cd=%p)\n",
+ cd ? qPrint(cd->name()) : qPrint(root->name), qPrint(qualifiedName),cd);
+
+ if (cd)
+ {
+ qualifiedName=cd->name();
+ Debug::print(Debug::Classes,0," Existing concept %s!\n",qPrint(cd->name()));
+
+ cd->setDocumentation(root->doc,root->docFile,root->docLine);
+ cd->setBriefDescription(root->brief,root->briefFile,root->briefLine);
+
+ addIncludeFile(cd,fd,root);
+ }
+ else // new concept
+ {
+ QCString className;
+ QCString namespaceName;
+ extractNamespaceName(qualifiedName,className,namespaceName);
+
+ //printf("New concept: fullname %s namespace '%s' name='%s' brief='%s' docs='%s'\n",
+ // qPrint(qualifiedName),qPrint(namespaceName),qPrint(className),qPrint(root->brief),qPrint(root->doc));
+
+ QCString tagName;
+ QCString refFileName;
+ const TagInfo *tagInfo = root->tagInfo();
+ if (tagInfo)
+ {
+ tagName = tagInfo->tagName;
+ refFileName = tagInfo->fileName;
+ if (qualifiedName.find("::")!=-1)
+ // symbols imported via tag files may come without the parent scope,
+ // so we artificially create it here
+ {
+ buildScopeFromQualifiedName(qualifiedName,root->lang,tagInfo);
+ }
+ }
+ std::unique_ptr<ArgumentList> tArgList = getTemplateArgumentsFromName(qualifiedName,root->tArgLists);
+ // add concept to the list
+ //printf("ClassDict.insert(%s)\n",qPrint(fullName));
+ cd = toConceptDefMutable(
+ Doxygen::conceptLinkedMap->add(qualifiedName,
+ std::unique_ptr<ConceptDef>(
+ createConceptDef(tagInfo?tagName:root->fileName,root->startLine,root->startColumn,
+ qualifiedName,tagName,refFileName))));
+ if (cd)
+ {
+ Debug::print(Debug::Classes,0," New concept '%s' #tArgLists=%d tagInfo=%p\n",
+ qPrint(qualifiedName),root->tArgLists.size(),tagInfo);
+ cd->setDocumentation(root->doc,root->docFile,root->docLine); // copy docs to definition
+ cd->setBriefDescription(root->brief,root->briefFile,root->briefLine);
+ cd->setLanguage(root->lang);
+ cd->setId(root->id);
+ cd->setHidden(root->hidden);
+ cd->setInitializer(root->initializer.str().c_str());
+ if (tArgList)
+ {
+ cd->setTemplateArguments(*tArgList);
+ }
+ // file definition containing the class cd
+ cd->setBodySegment(root->startLine,root->bodyLine,root->endBodyLine);
+ cd->setBodyDef(fd);
+ addIncludeFile(cd,fd,root);
+
+ // also add namespace to the correct structural context
+ Definition *d = findScopeFromQualifiedName(Doxygen::globalScope,qualifiedName,0,tagInfo);
+ if (d && d->definitionType()==Definition::TypeNamespace)
+ {
+ DefinitionMutable *dm = toDefinitionMutable(d);
+ if (dm)
+ {
+ dm->addInnerCompound(cd);
+ }
+ cd->setOuterScope(d);
+ }
+ }
+ else
+ {
+ Debug::print(Debug::Classes,0," Not added concept '%s', already exists (as alias)\n", qPrint(qualifiedName));
+ }
+ }
+
+ if (cd)
+ {
+ cd->addSectionsToDefinition(root->anchors);
+ if (fd)
+ {
+ //printf(">> Inserting concept '%s' in file '%s' (root->fileName='%s')\n",
+ // qPrint(cd->name()),
+ // qPrint(fd->name()),
+ // qPrint(root->fileName)
+ // );
+ cd->setFileDef(fd);
+ fd->insertConcept(cd);
+ }
+ addConceptToGroups(root,cd);
+ cd->setRefItems(root->sli);
+ }
+}
+static void buildConceptList(const Entry *root)
+{
+ if (root->section & Entry::CONCEPT_SEC)
+ {
+ addConceptToContext(root);
+ }
+ for (const auto &e : root->children()) buildConceptList(e.get());
+}
+
+static void buildConceptDocList(const Entry *root)
+{
+ if (root->section & Entry::CONCEPTDOC_SEC)
+ {
+ addConceptToContext(root);
+ }
+ for (const auto &e : root->children()) buildConceptDocList(e.get());
+}
+
+//----------------------------------------------------------------------
+
static void resolveClassNestingRelations()
{
ClassDefSet visitedClasses;
@@ -1169,7 +1317,7 @@ static void resolveClassNestingRelations()
{
ClassAlias(const QCString &name,std::unique_ptr<ClassDef> cd,DefinitionMutable *ctx) :
aliasFullName(name),aliasCd(std::move(cd)), aliasContext(ctx) {}
- const QCString aliasFullName;
+ QCString aliasFullName;
std::unique_ptr<ClassDef> aliasCd;
DefinitionMutable *aliasContext;
};
@@ -1180,13 +1328,13 @@ static void resolveClassNestingRelations()
if (cd && visitedClasses.find(icd.get())==visitedClasses.end())
{
QCString name = stripAnonymousNamespaceScope(icd->name());
- //printf("processing=%s, iteration=%d\n",cd->name().data(),iteration);
+ //printf("processing=%s, iteration=%d\n",qPrint(cd->name()),iteration);
// also add class to the correct structural context
Definition *d = findScopeFromQualifiedName(Doxygen::globalScope,
name,icd->getFileDef(),0);
if (d)
{
- //printf("****** adding %s to scope %s in iteration %d\n",cd->name().data(),d->name().data(),iteration);
+ //printf("****** adding %s to scope %s in iteration %d\n",qPrint(cd->name()),qPrint(d->name()),iteration);
DefinitionMutable *dm = toDefinitionMutable(d);
if (dm)
{
@@ -1225,7 +1373,7 @@ static void resolveClassNestingRelations()
}
//else
//{
- // printf("****** ignoring %s: scope not (yet) found in iteration %d\n",cd->name().data(),iteration);
+ // printf("****** ignoring %s: scope not (yet) found in iteration %d\n",qPrint(cd->name()),iteration);
//}
}
}
@@ -1247,7 +1395,7 @@ static void resolveClassNestingRelations()
if (cd && visitedClasses.find(icd.get())==visitedClasses.end())
{
QCString name = stripAnonymousNamespaceScope(cd->name());
- //printf("processing unresolved=%s, iteration=%d\n",cd->name().data(),iteration);
+ //printf("processing unresolved=%s, iteration=%d\n",qPrint(cd->name()),iteration);
/// create the scope artificially
// anyway, so we can at least relate scopes properly.
Definition *d = buildScopeFromQualifiedName(name,cd->getLanguage(),0);
@@ -1264,7 +1412,7 @@ static void resolveClassNestingRelations()
cd->setOuterScope(d);
warn(cd->getDefFileName(),cd->getDefLine(),
"Internal inconsistency: scope for class %s not "
- "found!",name.data()
+ "found!",qPrint(name)
);
}
}
@@ -1280,7 +1428,7 @@ void distributeClassGroupRelations()
ClassDefSet visitedClasses;
for (const auto &cd : *Doxygen::classLinkedMap)
{
- //printf("Checking %s\n",cd->name().data());
+ //printf("Checking %s\n",qPrint(cd->name()));
// distribute the group to nested classes as well
if (visitedClasses.find(cd.get())==visitedClasses.end() && !cd->partOfGroups().empty())
{
@@ -1291,7 +1439,7 @@ void distributeClassGroupRelations()
ClassDefMutable *ncdm = toClassDefMutable(ncd);
if (ncdm && ncdm->partOfGroups().empty())
{
- //printf(" Adding %s to group '%s'\n",ncd->name().data(),
+ //printf(" Adding %s to group '%s'\n",qPrint(ncd->name()),
// gd->groupTitle());
ncdm->makePartOfGroup(gd);
const_cast<GroupDef*>(gd)->addClass(ncdm);
@@ -1310,7 +1458,7 @@ static ClassDefMutable *createTagLessInstance(const ClassDef *rootCd,const Class
if (fullName.right(2)=="::") fullName=fullName.left(fullName.length()-2);
fullName+="."+fieldName;
- //printf("** adding class %s based on %s\n",fullName.data(),templ->name().data());
+ //printf("** adding class %s based on %s\n",qPrint(fullName),qPrint(templ->name()));
ClassDefMutable *cd = toClassDefMutable(
Doxygen::classLinkedMap->add(fullName,
std::unique_ptr<ClassDef>(
@@ -1354,7 +1502,7 @@ static ClassDefMutable *createTagLessInstance(const ClassDef *rootCd,const Class
{
for (const auto &md : *ml)
{
- //printf(" Member %s type=%s\n",md->name().data(),md->typeString());
+ //printf(" Member %s type=%s\n",qPrint(md->name()),md->typeString());
MemberDefMutable *imd = createMemberDef(md->getDefFileName(),md->getDefLine(),md->getDefColumn(),
md->typeString(),md->name(),md->argsString(),md->excpString(),
md->protection(),md->virtualness(),md->isStatic(),Member,
@@ -1367,6 +1515,7 @@ static ClassDefMutable *createTagLessInstance(const ClassDef *rootCd,const Class
imd->setMemberSpecifiers(md->getMemberSpecifiers());
imd->setMemberGroupId(md->getMemberGroupId());
imd->setInitializer(md->initializer());
+ imd->setRequiresClause(md->requiresClause());
imd->setMaxInitLines(md->initializerLines());
imd->setBitfields(md->bitfieldString());
imd->setLanguage(md->getLanguage());
@@ -1391,8 +1540,8 @@ static void processTagLessClasses(const ClassDef *rootCd,
ClassDefMutable *tagParentCd,
const QCString &prefix,int count)
{
- //printf("%d: processTagLessClasses %s\n",count,cd->name().data());
- //printf("checking members for %s\n",cd->name().data());
+ //printf("%d: processTagLessClasses %s\n",count,qPrint(cd->name()));
+ //printf("checking members for %s\n",qPrint(cd->name()));
if (tagParentCd && !cd->getClasses().empty())
{
MemberList *ml = cd->getMemberList(MemberListType_pubAttribs);
@@ -1405,19 +1554,19 @@ static void processTagLessClasses(const ClassDef *rootCd,
{
for (const auto &icd : cd->getClasses())
{
- //printf(" member %s: type='%s'\n",md->name().data(),type.data());
- //printf(" comparing '%s'<->'%s'\n",type.data(),icd->name().data());
+ //printf(" member %s: type='%s'\n",qPrint(md->name()),qPrint(type));
+ //printf(" comparing '%s'<->'%s'\n",qPrint(type),qPrint(icd->name()));
if (type.find(icd->name())!=-1) // matching tag less struct/union
{
QCString name = md->name();
if (md->isAnonymous()) name = "__unnamed" + name.right(name.length()-1)+"__";
if (!prefix.isEmpty()) name.prepend(prefix+".");
- //printf(" found %s for class %s\n",name.data(),cd->name().data());
+ //printf(" found %s for class %s\n",qPrint(name),qPrint(cd->name()));
ClassDefMutable *ncd = createTagLessInstance(rootCd,icd,name);
if (ncd)
{
processTagLessClasses(rootCd,icd,ncd,name,count+1);
- //printf(" addTagged %s to %s\n",ncd->name().data(),tagParentCd->name().data());
+ //printf(" addTagged %s to %s\n",qPrint(ncd->name()),qPrint(tagParentCd->name()));
ncd->setTagLessReference(icd);
// replace tag-less type for generated/original member
@@ -1500,7 +1649,7 @@ static void buildNamespaceList(const Entry *root)
!root->name.isEmpty()
)
{
- //printf("** buildNamespaceList(%s)\n",root->name.data());
+ //printf("** buildNamespaceList(%s)\n",qPrint(root->name));
QCString fName = root->name;
if (root->section==Entry::PACKAGEDOC_SEC)
@@ -1511,8 +1660,8 @@ static void buildNamespaceList(const Entry *root)
QCString fullName = stripAnonymousNamespaceScope(fName);
if (!fullName.isEmpty())
{
- //printf("Found namespace %s in %s at line %d\n",root->name.data(),
- // root->fileName.data(), root->startLine);
+ //printf("Found namespace %s in %s at line %d\n",qPrint(root->name),
+ // qPrint(root->fileName), root->startLine);
NamespaceDef *ndi = Doxygen::namespaceLinkedMap->find(fullName);
if (ndi) // existing namespace
{
@@ -1554,7 +1703,7 @@ static void buildNamespaceList(const Entry *root)
tagName = tagInfo->tagName;
tagFileName = tagInfo->fileName;
}
- //printf("++ new namespace %s lang=%s tagName=%s\n",fullName.data(),langToString(root->lang).data(),tagName.data());
+ //printf("++ new namespace %s lang=%s tagName=%s\n",qPrint(fullName),qPrint(langToString(root->lang)),qPrint(tagName));
// add namespace to the list
NamespaceDefMutable *nd = toNamespaceDefMutable(
Doxygen::namespaceLinkedMap->add(fullName,
@@ -1591,7 +1740,7 @@ static void buildNamespaceList(const Entry *root)
// also add namespace to the correct structural context
Definition *d = findScopeFromQualifiedName(Doxygen::globalScope,fullName,0,tagInfo);
- //printf("adding namespace %s to context %s\n",nd->name().data(),d?d->name().data():"<none>");
+ //printf("adding namespace %s to context %s\n",qPrint(nd->name()),d?qPrint(d->name()):"<none>");
if (d==0) // we didn't find anything, create the scope artificially
// anyway, so we can at least relate scopes properly.
{
@@ -1671,7 +1820,7 @@ static void findUsingDirectives(const Entry *root)
if (root->section==Entry::USINGDIR_SEC)
{
//printf("Found using directive %s at line %d of %s\n",
- // root->name.data(),root->startLine,root->fileName.data());
+ // qPrint(root->name),root->startLine,qPrint(root->fileName));
QCString name=substitute(root->name,".","::");
if (name.right(2)=="::")
{
@@ -1707,7 +1856,7 @@ static void findUsingDirectives(const Entry *root)
QCString scope=scopeOffset>0 ?
nsName.left(scopeOffset)+"::" : QCString();
usingNd = getResolvedNamespace(scope+name);
- //printf("Trying with scope='%s' usingNd=%p\n",(scope+name).data(),usingNd);
+ //printf("Trying with scope='%s' usingNd=%p\n",(scope+qPrint(name)),usingNd);
if (scopeOffset==0)
{
scopeOffset=-1;
@@ -1745,7 +1894,7 @@ static void findUsingDirectives(const Entry *root)
usingNd = findUsedNamespace(fd->getUsedNamespaces(),name);
}
- //printf("%s -> %s\n",name.data(),usingNd?usingNd->name().data():"<none>");
+ //printf("%s -> %s\n",qPrint(name),usingNd?qPrint(usingNd->name()):"<none>");
// add the namespace the correct scope
if (usingNd)
@@ -1753,18 +1902,18 @@ static void findUsingDirectives(const Entry *root)
//printf("using fd=%p nd=%p\n",fd,nd);
if (nd)
{
- //printf("Inside namespace %s\n",nd->name().data());
+ //printf("Inside namespace %s\n",qPrint(nd->name()));
nd->addUsingDirective(usingNd);
}
else if (fd)
{
- //printf("Inside file %s\n",fd->name().data());
+ //printf("Inside file %s\n",qPrint(fd->name()));
fd->addUsingDirective(usingNd);
}
}
else // unknown namespace, but add it anyway.
{
- //printf("++ new unknown namespace %s lang=%s\n",name.data(),langToString(root->lang).data());
+ //printf("++ new unknown namespace %s lang=%s\n",qPrint(name),qPrint(langToString(root->lang)));
// add namespace to the list
nd = toNamespaceDefMutable(
Doxygen::namespaceLinkedMap->add(name,
@@ -1775,7 +1924,7 @@ static void findUsingDirectives(const Entry *root)
nd->setDocumentation(root->doc,root->docFile,root->docLine); // copy docs to definition
nd->setBriefDescription(root->brief,root->briefFile,root->briefLine);
nd->addSectionsToDefinition(root->anchors);
- //printf("** Adding namespace %s hidden=%d\n",name.data(),root->hidden);
+ //printf("** Adding namespace %s hidden=%d\n",qPrint(name),root->hidden);
nd->setHidden(root->hidden);
nd->setArtificial(TRUE);
nd->setLanguage(root->lang);
@@ -1830,7 +1979,7 @@ static void findUsingDeclarations(const Entry *root)
)
{
//printf("Found using declaration %s at line %d of %s inside section %x\n",
- // root->name.data(),root->startLine,root->fileName.data(),
+ // qPrint(root->name),root->startLine,qPrint(root->fileName),
// rootNav->parent()->section());
if (!root->name.isEmpty())
{
@@ -1870,7 +2019,7 @@ static void findUsingDeclarations(const Entry *root)
usingCd = toClassDefMutable(Doxygen::hiddenClassLinkedMap->find(name)); // check if it is already hidden
}
- //printf("%s -> %p\n",root->name.data(),usingCd);
+ //printf("%s -> %p\n",qPrint(root->name),usingCd);
if (usingCd==0) // definition not in the input => add an artificial class
{
Debug::print(Debug::Classes,0," New using class '%s' (sec=0x%08x)! #tArgLists=%d\n",
@@ -1896,12 +2045,12 @@ static void findUsingDeclarations(const Entry *root)
if (nd)
{
- //printf("Inside namespace %s\n",nd->name().data());
+ //printf("Inside namespace %s\n",qPrint(nd->name()));
nd->addUsingDeclaration(usingCd);
}
else if (fd)
{
- //printf("Inside file %s\n",fd->name().data());
+ //printf("Inside file %s\n",qPrint(fd->name()));
fd->addUsingDeclaration(usingCd);
}
}
@@ -1918,14 +2067,14 @@ static void findUsingDeclImports(const Entry *root)
)
{
//printf("Found using declaration %s inside section %x\n",
- // root->name.data(), root->parent()->section);
+ // qPrint(root->name), root->parent()->section);
QCString fullName=removeRedundantWhiteSpace(root->parent()->name);
fullName=stripAnonymousNamespaceScope(fullName);
fullName=stripTemplateSpecifiersFromScope(fullName);
ClassDefMutable *cd = getClassMutable(fullName);
if (cd)
{
- //printf("found class %s\n",cd->name().data());
+ //printf("found class %s\n",qPrint(cd->name()));
int i=root->name.find("::");
if (i!=-1)
{
@@ -1935,7 +2084,7 @@ static void findUsingDeclImports(const Entry *root)
const ClassDef *bcd = resolver.resolveClass(cd,scope); // todo: file in fileScope parameter
if (bcd && bcd!=cd)
{
- //printf("found class %s memName=%s\n",bcd->name().data(),memName.data());
+ //printf("found class %s memName=%s\n",qPrint(bcd->name()),qPrint(memName));
const MemberNameInfoLinkedMap &mnlm=bcd->memberNameInfoLinkedMap();
const MemberNameInfo *mni = mnlm.find(memName);
if (mni)
@@ -1984,6 +2133,7 @@ static void findUsingDeclImports(const Entry *root)
newMd->setBodySegment(md->getDefLine(),md->getStartBodyLine(),md->getEndBodyLine());
newMd->setBodyDef(md->getBodyDef());
newMd->setInitializer(md->initializer());
+ newMd->setRequiresClause(md->requiresClause());
newMd->setMaxInitLines(md->initializerLines());
newMd->setMemberGroupId(root->mGrpId);
newMd->setMemberSpecifiers(md->getMemberSpecifiers());
@@ -2013,7 +2163,7 @@ static void findIncludedUsingDirectives()
{
for (const auto &fd : *fn)
{
- //printf("----- adding using directives for file %s\n",fd->name().data());
+ //printf("----- adding using directives for file %s\n",qPrint(fd->name()));
fd->addIncludedUsingDirectives(visitedFiles);
}
}
@@ -2050,7 +2200,7 @@ static MemberDef *addVariableToClass(
qPrint(args),
root->protection,
fromAnnScope,
- qPrint(root->initializer)
+ qPrint(root->initializer.str())
);
QCString def;
@@ -2101,7 +2251,7 @@ static MemberDef *addVariableToClass(
for (const auto &imd : *mn)
{
//printf("md->getClassDef()=%p cd=%p type=[%s] md->typeString()=[%s]\n",
- // md->getClassDef(),cd,type.data(),md->typeString());
+ // md->getClassDef(),cd,qPrint(type),md->typeString());
MemberDefMutable *md = toMemberDefMutable(imd.get());
if (md &&
md->getClassDef()==cd &&
@@ -2149,7 +2299,8 @@ static MemberDef *addVariableToClass(
md->setFromAnonymousMember(fromAnnMemb);
//md->setIndentDepth(indentDepth);
md->setBodySegment(root->startLine,root->bodyLine,root->endBodyLine);
- md->setInitializer(root->initializer);
+ std::string init = root->initializer.str();
+ md->setInitializer(init.c_str());
md->setMaxInitLines(root->initLines);
md->setMemberGroupId(root->mGrpId);
md->setMemberSpecifiers(root->spec);
@@ -2166,7 +2317,7 @@ static MemberDef *addVariableToClass(
addMemberToGroups(root,md.get());
md->setBodyDef(root->fileDef());
- //printf(" New member adding to %s (%p)!\n",cd->name().data(),cd);
+ //printf(" New member adding to %s (%p)!\n",qPrint(cd->name()),cd);
cd->insertMember(md.get());
md->setRefItems(root->sli);
@@ -2174,7 +2325,7 @@ static MemberDef *addVariableToClass(
cd->insertUsedFile(root->fileDef());
root->markAsProcessed();
- //printf(" Adding member=%s\n",md->name().data());
+ //printf(" Adding member=%s\n",qPrint(md->name()));
// add the member to the global list
MemberDef *result = md.get();
mn = Doxygen::memberNameLinkedMap->add(name);
@@ -2372,7 +2523,7 @@ static MemberDef *addVariableToFile(
// new global variable, enum value or typedef
std::unique_ptr<MemberDefMutable> md { createMemberDef(
fileName,root->startLine,root->startColumn,
- type,name,args,0,
+ type,name,args,QCString(),
root->protection, Normal,root->stat,Member,
mtype,!root->tArgLists.empty() ? root->tArgLists.back() : ArgumentList(),
root->argList, root->metaData) };
@@ -2384,7 +2535,8 @@ static MemberDef *addVariableToFile(
md->addSectionsToDefinition(root->anchors);
md->setFromAnonymousScope(fromAnnScope);
md->setFromAnonymousMember(fromAnnMemb);
- md->setInitializer(root->initializer);
+ std::string init = root->initializer.str();
+ md->setInitializer(init.c_str());
md->setMaxInitLines(root->initLines);
md->setMemberGroupId(root->mGrpId);
md->setDefinition(def);
@@ -2485,7 +2637,7 @@ static bool isVarWithConstructor(const Entry *root)
int ti;
SymbolResolver resolver(fd);
- //printf("isVarWithConstructor(%s)\n",rootNav->name().data());
+ //printf("isVarWithConstructor(%s)\n",qPrint(rootNav->name()));
if (root->parent()->section & Entry::COMPOUND_MASK)
{ // inside a class
result=FALSE;
@@ -2578,7 +2730,7 @@ static bool isVarWithConstructor(const Entry *root)
if (reg::search(resType,match,idChars) && match.position()==0) // resType starts with identifier
{
resType=match.str();
- //printf("resType=%s\n",resType.data());
+ //printf("resType=%s\n",qPrint(resType));
if (resType=="int" || resType=="long" || resType=="float" ||
resType=="double" || resType=="char" || resType=="signed" ||
resType=="const" || resType=="unsigned" || resType=="void")
@@ -2592,8 +2744,8 @@ static bool isVarWithConstructor(const Entry *root)
}
done:
- //printf("isVarWithConstructor(%s,%s)=%d\n",rootNav->parent()->name().data(),
- // root->type.data(),result);
+ //printf("isVarWithConstructor(%s,%s)=%d\n",qPrint(rootNav->parent()->name()),
+ // qPrint(root->type),result);
return result;
}
@@ -2611,7 +2763,7 @@ static void addVariable(const Entry *root,int isFuncPtr=-1)
root->mGrpId,
qPrint(root->relates)
);
- //printf("root->parent->name=%s\n",root->parent->name.data());
+ //printf("root->parent->name=%s\n",qPrint(root->parent->name));
QCString type = root->type;
QCString name = root->name;
@@ -2635,7 +2787,7 @@ static void addVariable(const Entry *root,int isFuncPtr=-1)
if (j!=std::string::npos) args=sargs.substr(0,j); // extract, e.g '[10]' from '[10])'
}
//printf("new: type='%s' name='%s' args='%s'\n",
- // type.data(),name.data(),args.data());
+ // qPrint(type),qPrint(name),qPrint(args));
}
else
{
@@ -2654,7 +2806,7 @@ static void addVariable(const Entry *root,int isFuncPtr=-1)
{
type=type.left(type.length()-1);
args.prepend(") ");
- //printf("type=%s args=%s\n",type.data(),args.data());
+ //printf("type=%s args=%s\n",qPrint(type),qPrint(args));
}
}
}
@@ -2761,7 +2913,7 @@ static void addVariable(const Entry *root,int isFuncPtr=-1)
{
QCString pScope;
ClassDefMutable *pcd=0;
- pScope = scope.left(QMAX(si-2,0)); // scope without tag less parts
+ pScope = scope.left(std::max(si-2,0)); // scope without tag less parts
if (!pScope.isEmpty())
pScope.prepend(annScopePrefix);
else if (annScopePrefix.length()>2)
@@ -2795,8 +2947,8 @@ static void addVariable(const Entry *root,int isFuncPtr=-1)
}
//printf("name='%s' scope=%s scope.right=%s\n",
- // name.data(),scope.data(),
- // scope.right(scope.length()-si).data());
+ // qPrint(name),qPrint(scope),
+ // qPrint(scope.right(scope.length()-si)));
addVariableToClass(root, // entry
cd, // class to add member to
mtype, // member type
@@ -2810,7 +2962,7 @@ static void addVariable(const Entry *root,int isFuncPtr=-1)
}
else if (!name.isEmpty()) // global variable
{
- //printf("Inserting member in global scope %s!\n",scope.data());
+ //printf("Inserting member in global scope %s!\n",qPrint(scope));
addVariableToFile(root,mtype,scope,type,name,args,FALSE,/*0,*/0);
}
@@ -2821,7 +2973,7 @@ static void addVariable(const Entry *root,int isFuncPtr=-1)
// If found they are stored in their class or in the global list.
static void buildTypedefList(const Entry *root)
{
- //printf("buildVarList(%s)\n",rootNav->name().data());
+ //printf("buildVarList(%s)\n",qPrint(rootNav->name()));
if (!root->name.isEmpty() &&
root->section==Entry::VARIABLE_SEC &&
root->type.find("typedef ")!=-1 // its a typedef
@@ -2874,7 +3026,7 @@ static void buildDictionaryList(const Entry *root)
static void buildVarList(const Entry *root)
{
- //printf("buildVarList(%s) section=%08x\n",rootNav->name().data(),rootNav->section());
+ //printf("buildVarList(%s) section=%08x\n",qPrint(rootNav->name()),rootNav->section());
int isFuncPtr=-1;
if (!root->name.isEmpty() &&
(root->type.isEmpty() || g_compoundKeywords.find(root->type.str())==g_compoundKeywords.end()) &&
@@ -3080,7 +3232,7 @@ static void addMethodToClass(const Entry *root,ClassDefMutable *cd,
}
//printf("root->name='%s; args='%s' root->argList='%s'\n",
- // root->name.data(),args.data(),argListToString(root->argList).data()
+ // qPrint(root->name),qPrint(args),qPrint(argListToString(root->argList))
// );
// adding class member
@@ -3104,6 +3256,7 @@ static void addMethodToClass(const Entry *root,ClassDefMutable *cd,
md->setMemberGroupId(root->mGrpId);
md->setTypeConstraints(root->typeConstr);
md->setLanguage(root->lang);
+ md->setRequiresClause(root->req);
md->setId(root->id);
md->setBodyDef(fd);
md->setFileDef(fd);
@@ -3173,7 +3326,7 @@ static void addMethodToClass(const Entry *root,ClassDefMutable *cd,
md->setRefItems(root->sli);
// add member to the global list of all members
- //printf("Adding member=%s class=%s\n",md->name().data(),cd->name().data());
+ //printf("Adding member=%s class=%s\n",qPrint(md->name()),qPrint(cd->name()));
MemberName *mn = Doxygen::memberNameLinkedMap->add(name);
mn->push_back(std::move(md));
}
@@ -3185,7 +3338,7 @@ static void addGlobalFunction(const Entry *root,const QCString &rname,const QCSt
QCString scope = sc;
Debug::print(Debug::Functions,0," --> new function %s found!\n",qPrint(rname));
//printf("New function type='%s' name='%s' args='%s' bodyLine=%d\n",
- // root->type.data(),rname.data(),root->args.data(),root->bodyLine);
+ // qPrint(root->type),qPrint(rname),qPrint(root->args),root->bodyLine);
// new global function
QCString name=removeRedundantWhiteSpace(rname);
@@ -3213,6 +3366,7 @@ static void addGlobalFunction(const Entry *root,const QCString &rname,const QCSt
md->addSectionsToDefinition(root->anchors);
md->setMemberSpecifiers(root->spec);
md->setMemberGroupId(root->mGrpId);
+ md->setRequiresClause(root->req);
NamespaceDefMutable *nd = 0;
// see if the function is inside a namespace that was not part of
@@ -3291,7 +3445,7 @@ static void addGlobalFunction(const Entry *root,const QCString &rname,const QCSt
}
// add member to the list of file members
- //printf("Adding member=%s\n",md->name().data());
+ //printf("Adding member=%s\n",qPrint(md->name()));
MemberName *mn = Doxygen::functionNameLinkedMap->add(name);
mn->push_back(std::move(md));
}
@@ -3323,7 +3477,7 @@ static void buildFunctionList(const Entry *root)
bool isFriend=root->type.find("friend ")!=-1;
QCString rname = removeRedundantWhiteSpace(root->name);
- //printf("rname=%s\n",rname.data());
+ //printf("rname=%s\n",qPrint(rname));
QCString scope=root->parent()->name; //stripAnonymousNamespaceScope(root->parent->name);
if (!rname.isEmpty() && scope.find('@')==-1)
@@ -3405,7 +3559,7 @@ static void buildFunctionList(const Entry *root)
{
const NamespaceDef *mnd = md->getNamespaceDef();
NamespaceDef *rnd = 0;
- //printf("root namespace=%s\n",rootNav->parent()->name().data());
+ //printf("root namespace=%s\n",qPrint(rootNav->parent()->name()));
QCString fullScope = scope;
QCString parentScope = root->parent()->name;
if (!parentScope.isEmpty() && !leftScopeMatch(parentScope,scope))
@@ -3413,14 +3567,14 @@ static void buildFunctionList(const Entry *root)
if (!scope.isEmpty()) fullScope.prepend("::");
fullScope.prepend(parentScope);
}
- //printf("fullScope=%s\n",fullScope.data());
+ //printf("fullScope=%s\n",qPrint(fullScope));
rnd = getResolvedNamespace(fullScope);
const FileDef *mfd = md->getFileDef();
QCString nsName,rnsName;
- if (mnd) nsName = mnd->name().copy();
- if (rnd) rnsName = rnd->name().copy();
+ if (mnd) nsName = mnd->name();
+ if (rnd) rnsName = rnd->name();
//printf("matching arguments for %s%s %s%s\n",
- // md->name().data(),md->argsString(),rname.data(),argListToString(root->argList).data());
+ // qPrint(md->name()),md->argsString(),qPrint(rname),qPrint(argListToString(root->argList)));
const ArgumentList &mdAl = md->argumentList();
const ArgumentList &mdTempl = md->templateArguments();
@@ -3428,6 +3582,7 @@ static void buildFunctionList(const Entry *root)
// functions have the same number of template parameters
bool sameNumTemplateArgs = TRUE;
bool matchingReturnTypes = TRUE;
+ bool sameRequiresClause = TRUE;
if (!mdTempl.empty() && !root->tArgLists.empty())
{
if (mdTempl.size()!=root->tArgLists.back().size())
@@ -3438,6 +3593,10 @@ static void buildFunctionList(const Entry *root)
{
matchingReturnTypes = FALSE;
}
+ if (md->requiresClause()!=root->req)
+ {
+ sameRequiresClause = FALSE;
+ }
}
bool staticsInDifferentFiles =
@@ -3449,6 +3608,7 @@ static void buildFunctionList(const Entry *root)
FALSE) &&
sameNumTemplateArgs &&
matchingReturnTypes &&
+ sameRequiresClause &&
!staticsInDifferentFiles
)
{
@@ -3458,7 +3618,7 @@ static void buildFunctionList(const Entry *root)
gd = Doxygen::groupLinkedMap->find(root->groups.front().groupname);
}
//printf("match!\n");
- //printf("mnd=%p rnd=%p nsName=%s rnsName=%s\n",mnd,rnd,nsName.data(),rnsName.data());
+ //printf("mnd=%p rnd=%p nsName=%s rnsName=%s\n",mnd,rnd,qPrint(nsName),qPrint(rnsName));
// see if we need to create a new member
found=(mnd && rnd && nsName==rnsName) || // members are in the same namespace
((mnd==0 && rnd==0 && mfd!=0 && // no external reference and
@@ -3473,7 +3633,7 @@ static void buildFunctionList(const Entry *root)
}
//printf("combining function with prototype found=%d in namespace %s\n",
- // found,nsName.data());
+ // found,qPrint(nsName));
if (found)
{
@@ -3568,7 +3728,7 @@ static void buildFunctionList(const Entry *root)
}
//printf("unrelated function %d '%s' '%s' '%s'\n",
- // root->parent->section,root->type.data(),rname.data(),root->args.data());
+ // root->parent->section,qPrint(root->type),qPrint(rname),qPrint(root->args));
}
else
{
@@ -3770,7 +3930,7 @@ static void transferRelatedFunctionDocumentation()
MemberDefMutable *md = toMemberDefMutable(imd.get());
if (md)
{
- //printf(" Function '%s'\n",md->name().data());
+ //printf(" Function '%s'\n",qPrint(md->name()));
MemberName *rmn;
if ((rmn=Doxygen::memberNameLinkedMap->find(md->name()))) // check if there is a member with the same name
{
@@ -3788,7 +3948,7 @@ static void transferRelatedFunctionDocumentation()
)
)
{
- //printf(" Found related member '%s'\n",md->name().data());
+ //printf(" Found related member '%s'\n",qPrint(md->name()));
if (rmd->relatedAlso())
md->setRelatedAlso(rmd->relatedAlso());
else if (rmd->isForeign())
@@ -3823,7 +3983,7 @@ static TemplateNameMap getTemplateArgumentsInName(const ArgumentList &templateAr
{
const auto &match = *it;
std::string n = match.str();
- if (n==arg.name)
+ if (n==arg.name.str())
{
if (templateNames.find(n)==templateNames.end())
{
@@ -3863,10 +4023,10 @@ static ClassDef *findClassWithinClassContext(Definition *context,ClassDef *cd,co
}
//printf("3. result=%p\n",result);
//printf("** Trying to find %s within context %s class %s result=%s lookup=%p\n",
- // name.data(),
- // context ? context->name().data() : "<none>",
- // cd ? cd->name().data() : "<none>",
- // result ? result->name().data() : "<none>",
+ // qPrint(name),
+ // context ? qPrint(context->name()) : "<none>",
+ // cd ? qPrint(cd->name()) : "<none>",
+ // result ? qPrint(result->name()) : "<none>",
// Doxygen::classLinkedMap->find(name)
// );
return result;
@@ -3890,7 +4050,7 @@ static void findUsedClassesForClass(const Entry *root,
const MemberDef *md=mi->memberDef();
if (md->isVariable() || md->isObjCProperty()) // for each member variable in this class
{
- //printf(" Found variable %s in class %s\n",md->name().data(),masterCd->name().data());
+ //printf(" Found variable %s in class %s\n",qPrint(md->name()),qPrint(masterCd->name()));
QCString type = normalizeNonTemplateArgumentsInString(md->typeString(),masterCd,formalArgs);
QCString typedefValue = resolveTypeDef(masterCd,type);
if (!typedefValue.isEmpty())
@@ -3902,16 +4062,16 @@ static void findUsedClassesForClass(const Entry *root,
QCString templSpec;
bool found=FALSE;
// the type can contain template variables, replace them if present
- type = substituteTemplateArgumentsInString(type.str(),formalArgs,actualArgs);
+ type = substituteTemplateArgumentsInString(type,formalArgs,actualArgs);
- //printf(" template substitution gives=%s\n",type.data());
+ //printf(" template substitution gives=%s\n",qPrint(type));
while (!found && extractClassNameFromType(type,pos,usedClassName,templSpec,root->lang)!=-1)
{
// find the type (if any) that matches usedClassName
SymbolResolver resolver(masterCd->getFileDef());
const ClassDefMutable *typeCd = resolver.resolveClassMutable(masterCd,usedClassName,false,true);
//printf("====> usedClassName=%s -> typeCd=%s\n",
- // usedClassName.data(),typeCd?typeCd->name().data():"<none>");
+ // qPrint(usedClassName),typeCd?qPrint(typeCd->name()):"<none>");
if (typeCd)
{
usedClassName = typeCd->name();
@@ -3927,7 +4087,7 @@ static void findUsedClassesForClass(const Entry *root,
}
// add any template arguments to the class
QCString usedName = removeRedundantWhiteSpace(usedClassName+templSpec);
- //printf(" usedName=%s\n",usedName.data());
+ //printf(" usedName=%s\n",qPrint(usedName));
TemplateNameMap formTemplateNames;
if (templateNames.empty())
@@ -3957,7 +4117,7 @@ static void findUsedClassesForClass(const Entry *root,
ClassDef::Class))));
if (usedCdm)
{
- //printf("making %s a template argument!!!\n",usedCd->name().data());
+ //printf("making %s a template argument!!!\n",qPrint(usedCd->name()));
usedCdm->makeTemplateArgument();
usedCdm->setUsedOnly(TRUE);
usedCdm->setLanguage(masterCd->getLanguage());
@@ -3982,7 +4142,7 @@ static void findUsedClassesForClass(const Entry *root,
{
ClassDef *usedCd=findClassWithinClassContext(context,masterCd,usedName);
//printf("Looking for used class %s: result=%s master=%s\n",
- // usedName.data(),usedCd?usedCd->name().data():"<none>",masterCd?masterCd->name().data():"<none>");
+ // qPrint(usedName),usedCd?qPrint(usedCd->name()):"<none>",masterCd?qPrint(masterCd->name()):"<none>");
if (usedCd)
{
@@ -4054,15 +4214,15 @@ static void findBaseClassesForClass(
for (const BaseInfo &bi : root->extends)
{
//printf("masterCd=%s bi.name='%s' #actualArgs=%d\n",
- // masterCd->localName().data(),bi.name.data(),actualArgs ? (int)actualArgs->size() : -1);
+ // qPrint(masterCd->localName()),qPrint(bi.name),actualArgs ? (int)actualArgs->size() : -1);
TemplateNameMap formTemplateNames;
if (templateNames.empty())
{
formTemplateNames = getTemplateArgumentsInName(formalArgs,bi.name.str());
}
BaseInfo tbi = bi;
- tbi.name = substituteTemplateArgumentsInString(bi.name.str(),formalArgs,actualArgs);
- //printf("bi->name=%s tbi.name=%s\n",bi->name.data(),tbi.name.data());
+ tbi.name = substituteTemplateArgumentsInString(bi.name,formalArgs,actualArgs);
+ //printf("bi->name=%s tbi.name=%s\n",qPrint(bi->name),qPrint(tbi.name));
if (mode==DocumentedOnly)
{
@@ -4097,7 +4257,7 @@ static void findTemplateInstanceRelation(const Entry *root,
Debug::print(Debug::Classes,0," derived from template %s with parameters %s isArtificial=%d\n",
qPrint(templateClass->name()),qPrint(templSpec),isArtificial);
//printf("findTemplateInstanceRelation(base=%s templSpec=%s templateNames=",
- // templateClass->name().data(),templSpec.data());
+ // qPrint(templateClass->name()),qPrint(templSpec));
//for (const auto &kv : templNames)
//{
// printf("(%s->%d) ",kv.first.c_str(),kv.second);
@@ -4125,7 +4285,7 @@ static void findTemplateInstanceRelation(const Entry *root,
// search for new template instances caused by base classes of
// instanceClass
- auto it_pair = g_classEntries.equal_range(templateClass->name().data());
+ auto it_pair = g_classEntries.equal_range(templateClass->name().str());
for (auto it=it_pair.first ; it!=it_pair.second ; ++it)
{
const Entry *templateRoot = it->second;
@@ -4139,7 +4299,7 @@ static void findTemplateInstanceRelation(const Entry *root,
isArtificial,templArgs,templateNames);
}
- //Debug::print(Debug::Classes,0," Template instance %s : \n",instanceClass->name().data());
+ //Debug::print(Debug::Classes,0," Template instance %s : \n",qPrint(instanceClass->name()));
//ArgumentList *tl = templateClass->templateArguments();
}
else
@@ -4240,10 +4400,10 @@ static int findEndOfTemplate(const QCString &s,int startPos)
return brCount==0 ? e : -1;
}
-static int findTemplateSpecializationPosition(const char *name)
+static int findTemplateSpecializationPosition(const QCString &name)
{
- if (name==0 || name[0]=='\0') return 0;
- int l = static_cast<int>(strlen(name));
+ if (name.isEmpty()) return 0;
+ int l = static_cast<int>(name.length());
if (name[l-1]=='>') // search backward to find the matching <, allowing nested <...> and strings.
{
int count=1;
@@ -4281,7 +4441,7 @@ static bool findClassRelation(
)
{
//printf("findClassRelation(class=%s base=%s templateNames=",
- // cd->name().data(),bi->name.data());
+ // qPrint(cd->name()),qPrint(bi->name));
//for (const auto &kv : templateNames)
//{
// printf("(%s->%d) ",kv.first.c_str(),kv.second);
@@ -4290,7 +4450,7 @@ static bool findClassRelation(
QCString biName=bi->name;
bool explicitGlobalScope=FALSE;
- //printf("findClassRelation: biName='%s'\n",biName.data());
+ //printf("findClassRelation: biName='%s'\n",qPrint(biName));
if (biName.left(2)=="::") // explicit global scope
{
biName=biName.right(biName.length()-2);
@@ -4302,12 +4462,12 @@ static bool findClassRelation(
do // for each parent scope, starting with the largest scope
// (in case of nested classes)
{
- QCString scopeName= parentNode ? parentNode->name.data() : "";
+ QCString scopeName= parentNode ? parentNode->name : QCString();
int scopeOffset=explicitGlobalScope ? 0 : scopeName.length();
do // try all parent scope prefixes, starting with the largest scope
{
//printf("scopePrefix='%s' biName='%s'\n",
- // scopeName.left(scopeOffset).data(),biName.data());
+ // qPrint(scopeName.left(scopeOffset)),qPrint(biName));
QCString baseClassName=biName;
if (scopeOffset>0)
@@ -4327,12 +4487,12 @@ static bool findClassRelation(
const MemberDef *baseClassTypeDef = resolver.getTypedef();
QCString templSpec = resolver.getTemplateSpec();
//printf("baseClassName=%s baseClass=%p cd=%p explicitGlobalScope=%d\n",
- // baseClassName.data(),baseClass,cd,explicitGlobalScope);
+ // qPrint(baseClassName),baseClass,cd,explicitGlobalScope);
//printf(" scope='%s' baseClassName='%s' baseClass=%s templSpec=%s\n",
- // cd ? cd->name().data():"<none>",
- // baseClassName.data(),
- // baseClass?baseClass->name().data():"<none>",
- // templSpec.data()
+ // cd ? qPrint(cd->name()):"<none>",
+ // qPrint(baseClassName),
+ // baseClass?qPrint(baseClass->name()):"<none>",
+ // qPrint(templSpec)
// );
//if (baseClassName.left(root->name.length())!=root->name ||
// baseClassName.at(root->name.length())!='<'
@@ -4377,7 +4537,7 @@ static bool findClassRelation(
);
baseClassTypeDef = resolver.getTypedef();
//printf("baseClass=%p -> baseClass=%s templSpec=%s\n",
- // baseClass,baseClassName.data(),templSpec.data());
+ // baseClass,qPrint(baseClassName),qPrint(templSpec));
}
}
else if (baseClass && !templSpec.isEmpty()) // we have a known class, but also
@@ -4386,7 +4546,7 @@ static bool findClassRelation(
// instance (for instance if a class
// derived from a template argument)
{
- //printf("baseClass=%s templSpec=%s\n",baseClass->name().data(),templSpec.data());
+ //printf("baseClass=%s templSpec=%s\n",qPrint(baseClass->name()),qPrint(templSpec));
ClassDefMutable *templClass=getClassMutable(baseClass->name()+templSpec);
if (templClass)
{
@@ -4419,7 +4579,7 @@ static bool findClassRelation(
{
baseClass=toClassDefMutable(findClassWithinClassContext(context,cd,baseClassName));
//printf("findClassWithinClassContext(%s,%s)=%p\n",
- // cd->name().data(),baseClassName.data(),baseClass);
+ // qPrint(cd->name()),qPrint(baseClassName),baseClass);
found = baseClass!=0 && baseClass!=cd;
}
@@ -4428,7 +4588,7 @@ static bool findClassRelation(
{
// for PHP the "use A\B as C" construct map class C to A::B, so we lookup
// the class name also in the alias mapping.
- auto it = Doxygen::namespaceAliasMap.find(baseClassName.data());
+ auto it = Doxygen::namespaceAliasMap.find(baseClassName.str());
if (it!=Doxygen::namespaceAliasMap.end()) // see if it is indeed a class.
{
baseClass=getClassMutable(it->second.c_str());
@@ -4474,7 +4634,7 @@ static bool findClassRelation(
if (baseClassTypeDef || cd->isCSharp())
{
usedName=biName;
- //printf("***** usedName=%s templSpec=%s\n",usedName.data(),templSpec.data());
+ //printf("***** usedName=%s templSpec=%s\n",qPrint(usedName),qPrint(templSpec));
}
Protection prot = bi->prot;
if (Config_getBool(SIP_SUPPORT)) prot=Public;
@@ -4489,7 +4649,7 @@ static bool findClassRelation(
warn(root->fileName,root->startLine,
"Detected potential recursive class relation "
"between class %s and base class %s!",
- cd->name().data(),baseClass->name().data()
+ qPrint(cd->name()),qPrint(baseClass->name())
);
}
}
@@ -4524,7 +4684,7 @@ static bool findClassRelation(
{
baseClass = toClassDefMutable(Doxygen::classLinkedMap->find(baseClassName));
//printf("*** classDDict->find(%s)=%p biName=%s templSpec=%s\n",
- // baseClassName.data(),baseClass,biName.data(),templSpec.data());
+ // qPrint(baseClassName),baseClass,qPrint(biName),qPrint(templSpec));
if (baseClass==0) // not found (or alias)
{
baseClass = toClassDefMutable(
@@ -4591,7 +4751,7 @@ static bool findClassRelation(
warn(root->fileName,root->startLine,
"Detected potential recursive class relation "
"between class %s and base class %s!\n",
- root->name.data(),baseClassName.data()
+ qPrint(root->name),qPrint(baseClassName)
);
}
// for mode==TemplateInstance this case is quite common and
@@ -4691,7 +4851,7 @@ static void findInheritedTemplateInstances()
ClassDefMutable *cdm = toClassDefMutable(cd);
if (cdm)
{
- //printf("Class %s %zu\n",cd->name().data(),root->extends.size());
+ //printf("Class %s %zu\n",qPrint(cd->name()),root->extends.size());
findBaseClassesForClass(root,cd,cdm,cdm,TemplateInstances,FALSE);
}
}
@@ -4744,7 +4904,7 @@ static void computeClassRelations()
warn_undoc(
root->fileName,root->startLine,
"Compound %s is not documented.",
- root->name.data()
+ qPrint(root->name)
);
}
}
@@ -4801,7 +4961,7 @@ static void computeTemplateClassRelations()
}
}
- tbi.name = substituteTemplateArgumentsInString(bi.name.str(),tl,templArgs);
+ tbi.name = substituteTemplateArgumentsInString(bi.name,tl,templArgs);
// find a documented base class in the correct scope
if (!findClassRelation(root,cd,tcd,&tbi,actualTemplateNames,DocumentedOnly,FALSE))
{
@@ -4897,7 +5057,7 @@ static void addListReferences()
addRefItem(xrefItems,
name,
theTranslator->trPage(TRUE,TRUE),
- name,pd->title(),0,0);
+ name,pd->title(),QCString(),0);
}
}
@@ -4912,7 +5072,7 @@ static void addListReferences()
addRefItem(xrefItems,
name,
theTranslator->trDir(TRUE,TRUE),
- name,dd->displayName(),0,0);
+ name,dd->displayName(),QCString(),0);
}
}
@@ -4932,7 +5092,7 @@ static void generateXRefPages()
// over_load is set the standard overload text is added.
static void addMemberDocs(const Entry *root,
- MemberDefMutable *md, const char *funcDecl,
+ MemberDefMutable *md, const QCString &funcDecl,
const ArgumentList *al,
bool over_load,
uint64 spec
@@ -4940,7 +5100,7 @@ static void addMemberDocs(const Entry *root,
{
if (md==0) return;
//printf("addMemberDocs: '%s'::'%s' '%s' funcDecl='%s' mSpec=%lld\n",
- // root->parent()->name.data(),md->name().data(),md->argsString(),funcDecl,spec);
+ // qPrint(root->parent()->name),qPrint(md->name()),md->argsString(),funcDecl,spec);
QCString fDecl=funcDecl;
// strip extern specifier
fDecl.stripPrefix("extern ");
@@ -5017,13 +5177,18 @@ static void addMemberDocs(const Entry *root,
}
//printf("initializer: '%s'(isEmpty=%d) '%s'(isEmpty=%d)\n",
- // md->initializer().data(),md->initializer().isEmpty(),
- // root->initializer.data(),root->initializer.isEmpty()
+ // qPrint(md->initializer()),md->initializer().isEmpty(),
+ // qPrint(root->initializer),root->initializer.isEmpty()
// );
- if (md->initializer().isEmpty() && !root->initializer.isEmpty())
+ std::string rootInit = root->initializer.str();
+ if (md->initializer().isEmpty() && !rootInit.empty())
{
//printf("setInitializer\n");
- md->setInitializer(root->initializer);
+ md->setInitializer(rootInit.c_str());
+ }
+ if (md->requiresClause().isEmpty() && !root->req.isEmpty())
+ {
+ md->setRequiresClause(root->req);
}
md->setMaxInitLines(root->initLines);
@@ -5061,13 +5226,13 @@ static void addMemberDocs(const Entry *root,
root->fileName,root->startLine,
"member %s belongs to two different groups. The second "
"one found here will be ignored.",
- md->name().data()
+ qPrint(md->name())
);
}
}
else // set group id
{
- //printf("setMemberGroupId=%d md=%s\n",root->mGrpId,md->name().data());
+ //printf("setMemberGroupId=%d md=%s\n",root->mGrpId,qPrint(md->name()));
md->setMemberGroupId(root->mGrpId);
}
}
@@ -5078,7 +5243,7 @@ static void addMemberDocs(const Entry *root,
// template list specifier
static const ClassDef *findClassDefinition(FileDef *fd,NamespaceDef *nd,
- const char *scopeName)
+ const QCString &scopeName)
{
SymbolResolver resolver(fd);
const ClassDef *tcd = resolver.resolveClass(nd,scopeName,true,true);
@@ -5093,11 +5258,11 @@ static const ClassDef *findClassDefinition(FileDef *fd,NamespaceDef *nd,
static bool findGlobalMember(const Entry *root,
const QCString &namespaceName,
- const char *type,
- const char *name,
- const char *tempArg,
- const char *,
- const char *decl,
+ const QCString &type,
+ const QCString &name,
+ const QCString &tempArg,
+ const QCString &,
+ const QCString &decl,
uint64 spec)
{
Debug::print(Debug::FindMembers,0,
@@ -5173,7 +5338,7 @@ static bool findGlobalMember(const Entry *root,
}
const FileDef *fd=root->fileDef();
- //printf("File %s\n",fd ? fd->name().data() : "<none>");
+ //printf("File %s\n",fd ? qPrint(fd->name()) : "<none>");
LinkedRefMap<const NamespaceDef> nl;
if (fd)
{
@@ -5217,8 +5382,8 @@ static bool findGlobalMember(const Entry *root,
}
//printf("%s<->%s\n",
- // argListToString(md->argumentList()).data(),
- // argListToString(root->argList).data());
+ // qPrint(argListToString(md->argumentList())),
+ // qPrint(argListToString(root->argList)));
// for static members we also check if the comment block was found in
// the same file. This is needed because static members with the same
@@ -5231,13 +5396,14 @@ static bool findGlobalMember(const Entry *root,
matching = FALSE;
}
- // for template member we also need to check the return type
+ // for template member we also need to check the return type and requires
if (!md->templateArguments().empty() && !root->tArgLists.empty())
{
//printf("Comparing return types '%s'<->'%s'\n",
// md->typeString(),type);
if (md->templateArguments().size()!=root->tArgLists.back().size() ||
- qstrcmp(md->typeString(),type)!=0)
+ md->typeString()!=type ||
+ md->requiresClause()!=root->req)
{
//printf(" ---> no matching\n");
matching = FALSE;
@@ -5270,7 +5436,7 @@ static bool findGlobalMember(const Entry *root,
" of file "+md->getDefFileName()+"\n";
}
}
- warn(root->fileName,root->startLine, "%s", warnMsg.data());
+ warn(root->fileName,root->startLine, "%s", qPrint(warnMsg));
}
}
else // got docs for an undefined member!
@@ -5284,7 +5450,7 @@ static bool findGlobalMember(const Entry *root,
)
{
warn(root->fileName,root->startLine,
- "documented symbol '%s' was not declared or defined.",decl
+ "documented symbol '%s' was not declared or defined.",qPrint(decl)
);
}
}
@@ -5328,7 +5494,7 @@ static QCString substituteTemplatesInString(
static const reg::Ex re(R"(\a\w*)");
reg::Iterator it(src,re);
reg::Iterator end;
- //printf("type=%s\n",sa->type.data());
+ //printf("type=%s\n",qPrint(sa->type));
size_t p=0;
for (; it!=end ; ++it) // for each word in srcType
{
@@ -5363,9 +5529,9 @@ static QCString substituteTemplatesInString(
++tdaIt;
}
//if (tda) printf("tsa=%s|%s tda=%s|%s\n",
- // tsa.type.data(),tsa.name.data(),
- // tda->type.data(),tda->name.data());
- if (name==tsa.name)
+ // qPrint(tsa.type),qPrint(tsa.name),
+ // qPrint(tda->type),qPrint(tda->name));
+ if (name==tsa.name.str())
{
if (tda && tda->name.isEmpty())
{
@@ -5388,9 +5554,9 @@ static QCString substituteTemplatesInString(
}
//printf(" srcList='%s' dstList='%s faList='%s'\n",
- // argListToString(srclali.current()).data(),
- // argListToString(dstlali.current()).data(),
- // funcTempArgList ? argListToString(funcTempArgList).data() : "<none>");
+ // qPrint(argListToString(srclali.current())),
+ // qPrint(argListToString(dstlali.current())),
+ // funcTempArgList ? qPrint(argListToString(funcTempArgList)) : "<none>");
++srcIt;
}
dst+=name;
@@ -5398,7 +5564,7 @@ static QCString substituteTemplatesInString(
}
dst+=src.substr(p);
//printf(" substituteTemplatesInString(%s)=%s\n",
- // src.data(),dst.data());
+ // qPrint(src),qPrint(dst));
return dst;
}
@@ -5437,7 +5603,7 @@ static void substituteTemplatesInArgList(
srcTempArgLists,dstTempArgLists,
src.trailingReturnType().str()));
//printf("substituteTemplatesInArgList: replacing %s with %s\n",
- // argListToString(src).data(),argListToString(dst).data()
+ // qPrint(argListToString(src)),qPrint(argListToString(dst))
// );
}
@@ -5449,13 +5615,13 @@ static void addLocalObjCMethod(const Entry *root,
const QCString &exceptions,const QCString &funcDecl,
uint64 spec)
{
- //printf("scopeName='%s' className='%s'\n",scopeName.data(),className.data());
+ //printf("scopeName='%s' className='%s'\n",qPrint(scopeName),qPrint(className));
ClassDefMutable *cd=0;
if (Config_getBool(EXTRACT_LOCAL_METHODS) && (cd=getClassMutable(scopeName)))
{
Debug::print(Debug::FindMembers,0,"4. Local objective C method %s\n"
" scopeName=%s\n",qPrint(root->name),qPrint(scopeName));
- //printf("Local objective C method '%s' of class '%s' found\n",root->name.data(),cd->name().data());
+ //printf("Local objective C method '%s' of class '%s' found\n",qPrint(root->name),qPrint(cd->name()));
std::unique_ptr<MemberDefMutable> md { createMemberDef(
root->fileName,root->startLine,root->startColumn,
funcType,funcName,funcArgs,exceptions,
@@ -5533,13 +5699,13 @@ static void addMemberFunction(const Entry *root,
qPrint(md->argsString()),
qPrint(root->fileName));
//printf("Member %s (member scopeName=%s) (this scopeName=%s) isEnumValue()=%d\n",
- // md->name().data(),cd->name().data(),scopeName.data(),md->isEnumValue());
+ // qPrint(md->name()),qPrint(cd->name()),qPrint(scopeName),md->isEnumValue());
FileDef *fd=root->fileDef();
NamespaceDef *nd=0;
if (!namespaceName.isEmpty()) nd=getResolvedNamespace(namespaceName);
- //printf("scopeName %s->%s\n",scopeName.data(),
- // stripTemplateSpecifiersFromScope(scopeName,FALSE).data());
+ //printf("scopeName %s->%s\n",qPrint(scopeName),
+ // qPrint(stripTemplateSpecifiersFromScope(scopeName,FALSE)));
// if the member we are searching for is an enum value that is part of
// a "strong" enum, we need to look into the fields of the enum for a match
@@ -5550,7 +5716,7 @@ static void addMemberFunction(const Entry *root,
if (className.left(enumNamePos)==cd->name())
{
MemberName *enumMn=Doxygen::memberNameLinkedMap->find(enumName);
- //printf("enumMn(%s)=%p\n",className.data(),enumMn);
+ //printf("enumMn(%s)=%p\n",qPrint(className),enumMn);
if (enumMn)
{
for (const auto &emd : *enumMn)
@@ -5575,12 +5741,12 @@ static void addMemberFunction(const Entry *root,
tcd=cd;
}
//printf("Looking for %s inside nd=%s result=%p (%s) cd=%p\n",
- // scopeName.data(),nd?nd->name().data():"<none>",tcd,tcd?tcd->name().data():"",cd);
+ // qPrint(scopeName),nd?qPrint(nd->name()):"<none>",tcd,tcd?qPrint(tcd->name()):"",cd);
if (cd && tcd==cd) // member's classes match
{
Debug::print(Debug::FindMembers,0,
- "4. class definition %s found\n",cd->name().data());
+ "4. class definition %s found\n",qPrint(cd->name()));
// get the template parameter lists found at the member declaration
ArgumentLists declTemplArgs = cd->getTemplateParameterLists();
@@ -5649,8 +5815,7 @@ static void addMemberFunction(const Entry *root,
"5b. Comparing return types '%s'<->'%s' #args %d<->%d\n",
qPrint(md->typeString()),qPrint(funcType),
md->templateArguments().size(),root->tArgLists.back().size());
- if (md->templateArguments().size()!=root->tArgLists.back().size() ||
- qstrcmp(memType,funcType))
+ if (md->templateArguments().size()!=root->tArgLists.back().size() || memType!=funcType)
{
//printf(" ---> no matching\n");
matching = FALSE;
@@ -5731,7 +5896,7 @@ static void addMemberFunction(const Entry *root,
{
ClassDefMutable *ccd=md->getClassDefMutable();
MemberDef *cmd=md.get();
- //printf("ccd->name()==%s className=%s\n",ccd->name().data(),className.data());
+ //printf("ccd->name()==%s className=%s\n",qPrint(ccd->name()),qPrint(className));
if (ccd!=0 && rightScopeMatch(ccd->name(),className))
{
const ArgumentList &templAl = md->templateArguments();
@@ -5793,7 +5958,7 @@ static void addMemberFunction(const Entry *root,
warnMsg+='\n';
}
- QCString fullFuncDecl=funcDecl.copy();
+ QCString fullFuncDecl=funcDecl;
if (isFunc) fullFuncDecl+=argListToString(root->argList,TRUE);
warnMsg+=" ";
@@ -5817,7 +5982,7 @@ static void addMemberFunction(const Entry *root,
warnMsg+='\n';
warnMsg+=" ";
}
- if (md->typeString())
+ if (!md->typeString().isEmpty())
{
warnMsg+=md->typeString();
warnMsg+=' ';
@@ -5825,8 +5990,7 @@ static void addMemberFunction(const Entry *root,
QCString qScope = cd->qualifiedNameWithTemplateParameters();
if (!qScope.isEmpty())
warnMsg+=qScope+"::"+md->name();
- if (md->argsString())
- warnMsg+=md->argsString();
+ warnMsg+=md->argsString();
if (noMatchCount>1)
{
warnMsg+="' at line "+QCString().setNum(md->getDefLine()) +
@@ -5839,7 +6003,7 @@ static void addMemberFunction(const Entry *root,
}
}
}
- warn_simple(root->fileName,root->startLine,warnMsg);
+ warn_simple(root->fileName,root->startLine,qPrint(warnMsg));
}
}
@@ -5875,7 +6039,7 @@ static void addMemberSpecialization(const Entry *root,
declMd ? declMd->protection() : root->protection,
root->virt,root->stat,Member,
mtype,tArgList,root->argList,root->metaData) };
- //printf("new specialized member %s args='%s'\n",md->name().data(),funcArgs.data());
+ //printf("new specialized member %s args='%s'\n",qPrint(md->name()),qPrint(funcArgs));
md->setTagInfo(root->tagInfo());
md->setLanguage(root->lang);
md->setId(root->id);
@@ -5933,7 +6097,7 @@ static void addOverloaded(const Entry *root,MemberName *mn,
// new overloaded member function
std::unique_ptr<ArgumentList> tArgList =
getTemplateArgumentsFromName(cd->name()+"::"+funcName,root->tArgLists);
- //printf("new related member %s args='%s'\n",md->name().data(),funcArgs.data());
+ //printf("new related member %s args='%s'\n",qPrint(md->name()),qPrint(funcArgs));
std::unique_ptr<MemberDefMutable> md { createMemberDef(
root->fileName,root->startLine,root->startColumn,
funcType,funcName,funcArgs,exceptions,
@@ -6062,17 +6226,17 @@ static void findMember(const Entry *root,
" ::","::"
).stripWhiteSpace();
- //printf("funcDecl='%s'\n",funcDecl.data());
+ //printf("funcDecl='%s'\n",qPrint(funcDecl));
if (isFriend && funcDecl.left(6)=="class ")
{
//printf("friend class\n");
funcDecl=funcDecl.right(funcDecl.length()-6);
- funcName = funcDecl.copy();
+ funcName = funcDecl;
}
else if (isFriend && funcDecl.left(7)=="struct ")
{
funcDecl=funcDecl.right(funcDecl.length()-7);
- funcName = funcDecl.copy();
+ funcName = funcDecl;
}
else
{
@@ -6082,14 +6246,14 @@ static void findMember(const Entry *root,
);
}
//printf("scopeName='%s' funcType='%s' funcName='%s' funcArgs='%s'\n",
- // scopeName.data(),funcType.data(),funcName.data(),funcArgs.data());
+ // qPrint(scopeName),qPrint(funcType),qPrint(funcName),qPrint(funcArgs));
// the class name can also be a namespace name, we decide this later.
// if a related class name is specified and the class name could
// not be derived from the function declaration, then use the
// related field.
//printf("scopeName='%s' className='%s' namespaceName='%s'\n",
- // scopeName.data(),className.data(),namespaceName.data());
+ // qPrint(scopeName),qPrint(className),qPrint(namespaceName));
if (!relates.isEmpty())
{ // related member, prefix user specified scope
isRelated=TRUE;
@@ -6157,12 +6321,12 @@ static void findMember(const Entry *root,
// split scope into a namespace and a class part
extractNamespaceName(scopeName,className,namespaceName,TRUE);
//printf("scopeName='%s' className='%s' namespaceName='%s'\n",
- // scopeName.data(),className.data(),namespaceName.data());
+ // qPrint(scopeName),qPrint(className),qPrint(namespaceName));
//namespaceName=removeAnonymousScopes(namespaceName);
if (namespaceName.find('@')!=-1) return; // skip stuff in anonymous namespace...
- //printf("namespaceName='%s' className='%s'\n",namespaceName.data(),className.data());
+ //printf("namespaceName='%s' className='%s'\n",qPrint(namespaceName),qPrint(className));
// merge class and namespace scopes again
scopeName.resize(0);
if (!namespaceName.isEmpty())
@@ -6185,7 +6349,7 @@ static void findMember(const Entry *root,
{
scopeName=className;
}
- //printf("new scope='%s'\n",scopeName.data());
+ //printf("new scope='%s'\n",qPrint(scopeName));
QCString tempScopeName=scopeName;
ClassDefMutable *cd=getClassMutable(scopeName);
@@ -6202,9 +6366,9 @@ static void findMember(const Entry *root,
}
}
//printf("scopeName=%s cd=%p root->tArgLists=%p result=%s\n",
- // scopeName.data(),cd,root->tArgLists,tempScopeName.data());
+ // qPrint(scopeName),cd,root->tArgLists,qPrint(tempScopeName));
- //printf("scopeName='%s' className='%s'\n",scopeName.data(),className.data());
+ //printf("scopeName='%s' className='%s'\n",qPrint(scopeName),qPrint(className));
// rebuild the function declaration (needed to get the scope right).
if (!scopeName.isEmpty() && !isRelated && !isFriend && !Config_getBool(HIDE_SCOPE_NAMES))
{
@@ -6285,7 +6449,7 @@ static void findMember(const Entry *root,
if (!funcName.isEmpty()) // function name is valid
{
Debug::print(Debug::FindMembers,0,
- "1. funcName='%s'\n",funcName.data());
+ "1. funcName='%s'\n",qPrint(funcName));
// check if 'className' is actually a scoped enum, in which case we need to
// process it as a global, see issue #6471
@@ -6345,7 +6509,7 @@ static void findMember(const Entry *root,
else
{
//printf("*** Specialized member %s of unknown scope %s%s found!\n",
- // scopeName.data(),funcName.data(),funcArgs.data());
+ // qPrint(scopeName),qPrint(funcName),qPrint(funcArgs));
}
}
else if (overloaded) // check if the function belongs to only one class
@@ -6356,11 +6520,11 @@ static void findMember(const Entry *root,
{
if (!findGlobalMember(root,namespaceName,funcType,funcName,funcTempList,funcArgs,funcDecl,spec))
{
- QCString fullFuncDecl=funcDecl.copy();
+ QCString fullFuncDecl=funcDecl;
if (isFunc) fullFuncDecl+=argListToString(root->argList,TRUE);
warn(root->fileName,root->startLine,
"Cannot determine class for function\n%s",
- fullFuncDecl.data()
+ qPrint(fullFuncDecl)
);
}
}
@@ -6370,7 +6534,7 @@ static void findMember(const Entry *root,
Debug::print(Debug::FindMembers,0,"2. related function\n"
" scopeName=%s className=%s\n",qPrint(scopeName),qPrint(className));
if (className.isEmpty()) className=relates;
- //printf("scopeName='%s' className='%s'\n",scopeName.data(),className.data());
+ //printf("scopeName='%s' className='%s'\n",qPrint(scopeName),qPrint(className));
if ((cd=getClassMutable(scopeName)))
{
bool newMember=TRUE; // assume we have a new member
@@ -6421,7 +6585,7 @@ static void findMember(const Entry *root,
}
if (rmd_found) // member already exists as rmd -> add docs
{
- //printf("addMemberDocs for related member %s\n",root->name.data());
+ //printf("addMemberDocs for related member %s\n",qPrint(root->name));
//rmd->setMemberDefTemplateArguments(root->mtArgList);
addMemberDocs(root,rmd_found,funcDecl,0,overloaded,spec);
}
@@ -6449,7 +6613,7 @@ static void findMember(const Entry *root,
funcDecl=funcType + " " + funcName;
}
- //printf("New related name '%s' '%d'\n",funcName.data(),
+ //printf("New related name '%s' '%d'\n",qPrint(funcName),
// root->argList ? (int)root->argList->count() : -1);
// first note that we pass:
@@ -6490,7 +6654,7 @@ static void findMember(const Entry *root,
md->setTagInfo(root->tagInfo());
//printf("Related member name='%s' decl='%s' bodyLine='%d'\n",
- // funcName.data(),funcDecl.data(),root->bodyLine);
+ // qPrint(funcName),qPrint(funcDecl),root->bodyLine);
// try to find the matching line number of the body from the
// global function list
@@ -6564,18 +6728,18 @@ static void findMember(const Entry *root,
{
addMemberToGroups(root,md.get());
}
- //printf("Adding member=%s\n",md->name().data());
+ //printf("Adding member=%s\n",qPrint(md->name()));
mn->push_back(std::move(md));
}
if (root->relatesType == Duplicate)
{
if (!findGlobalMember(root,namespaceName,funcType,funcName,funcTempList,funcArgs,funcDecl,spec))
{
- QCString fullFuncDecl=funcDecl.copy();
+ QCString fullFuncDecl=funcDecl;
if (isFunc) fullFuncDecl+=argListToString(root->argList,TRUE);
warn(root->fileName,root->startLine,
"Cannot determine file/namespace for relatedalso function\n%s",
- fullFuncDecl.data()
+ qPrint(fullFuncDecl)
);
}
}
@@ -6585,7 +6749,7 @@ static void findMember(const Entry *root,
warn_undoc(root->fileName,root->startLine,
"class '%s' for related function '%s' is not "
"documented.",
- className.data(),funcName.data()
+ qPrint(className),qPrint(funcName)
);
}
}
@@ -6600,14 +6764,14 @@ static void findMember(const Entry *root,
{
warn(root->fileName,root->startLine,
"class for member '%s' cannot "
- "be found.", funcName.data()
+ "be found.", qPrint(funcName)
);
}
else if (!className.isEmpty() && !globMem)
{
warn(root->fileName,root->startLine,
"member '%s' of class '%s' cannot be found",
- funcName.data(),className.data());
+ qPrint(funcName),qPrint(className));
}
}
}
@@ -6624,14 +6788,14 @@ static void findMember(const Entry *root,
// find the members corresponding to the different documentation blocks
// that are extracted from the sources.
-static void filterMemberDocumentation(const Entry *root,const QCString relates)
+static void filterMemberDocumentation(const Entry *root,const QCString &relates)
{
int i=-1,l;
Debug::print(Debug::FindMembers,0,
"findMemberDocumentation(): root->type='%s' root->inside='%s' root->name='%s' root->args='%s' section=%x root->spec=%lld root->mGrpId=%d\n",
qPrint(root->type),qPrint(root->inside),qPrint(root->name),qPrint(root->args),root->section,root->spec,root->mGrpId
);
- //printf("root->parent()->name=%s\n",root->parent()->name.data());
+ //printf("root->parent()->name=%s\n",qPrint(root->parent()->name));
bool isFunc=TRUE;
QCString type = root->type;
@@ -6644,7 +6808,7 @@ static void filterMemberDocumentation(const Entry *root,const QCString relates)
// fix type and argument
args.prepend(type.right(type.length()-i-l));
type=type.left(i+l);
- //printf("Results type=%s,name=%s,args=%s\n",type.data(),root->name.data(),args.data());
+ //printf("Results type=%s,name=%s,args=%s\n",qPrint(type),qPrint(root->name),qPrint(args));
isFunc=FALSE;
}
else if ((type.left(8)=="typedef " && args.find('(')!=-1))
@@ -6653,12 +6817,12 @@ static void filterMemberDocumentation(const Entry *root,const QCString relates)
isFunc=FALSE;
}
- //printf("Member %s isFunc=%d\n",root->name.data(),isFunc);
+ //printf("Member %s isFunc=%d\n",qPrint(root->name),isFunc);
if (root->section==Entry::MEMBERDOC_SEC)
{
//printf("Documentation for inline member '%s' found args='%s'\n",
- // root->name.data(),args.data());
- //if (relates.length()) printf(" Relates %s\n",relates.data());
+ // qPrint(root->name),qPrint(args));
+ //if (relates.length()) printf(" Relates %s\n",qPrint(relates));
if (type.isEmpty())
{
findMember(root,
@@ -6682,7 +6846,7 @@ static void filterMemberDocumentation(const Entry *root,const QCString relates)
}
else if (root->section==Entry::OVERLOADDOC_SEC)
{
- //printf("Overloaded member %s found\n",root->name.data());
+ //printf("Overloaded member %s found\n",qPrint(root->name));
findMember(root,
relates,
type,
@@ -6703,9 +6867,9 @@ static void filterMemberDocumentation(const Entry *root,const QCString relates)
)
{
//printf("Documentation for member '%s' found args='%s' excp='%s'\n",
- // root->name.data(),args.data(),root->exception.data());
- //if (relates.length()) printf(" Relates %s\n",relates.data());
- //printf("Inside=%s\n Relates=%s\n",root->inside.data(),relates.data());
+ // qPrint(root->name),qPrint(args),qPrint(root->exception));
+ //if (relates.length()) printf(" Relates %s\n",qPrint(relates));
+ //printf("Inside=%s\n Relates=%s\n",qPrint(root->inside),qPrint(relates));
if (type=="friend class" || type=="friend struct" ||
type=="friend union")
{
@@ -6748,8 +6912,8 @@ static void filterMemberDocumentation(const Entry *root,const QCString relates)
}
else if (root->section==Entry::VARIABLEDOC_SEC)
{
- //printf("Documentation for variable %s found\n",root->name.data());
- //if (!relates.isEmpty()) printf(" Relates %s\n",relates.data());
+ //printf("Documentation for variable %s found\n",qPrint(root->name));
+ //if (!relates.isEmpty()) printf(" Relates %s\n",qPrint(relates));
findMember(root,
relates,
type,
@@ -6815,7 +6979,7 @@ static void findObjCMethodDefinitions(const Entry *root)
{
if (objCMethod->section==Entry::FUNCTION_SEC)
{
- //Printf(" Found ObjC method definition %s\n",objCMethod->name.data());
+ //Printf(" Found ObjC method definition %s\n",qPrint(objCMethod->name));
findMember(objCMethod.get(),
objCMethod->relates,
objCMethod->type,
@@ -6843,7 +7007,7 @@ static void findEnums(const Entry *root)
bool isGlobal;
bool isRelated=FALSE;
bool isMemberOf=FALSE;
- //printf("Found enum with name '%s' relates=%s\n",root->name.data(),root->relates.data());
+ //printf("Found enum with name '%s' relates=%s\n",qPrint(root->name),qPrint(root->relates));
int i;
QCString name;
@@ -6874,13 +7038,13 @@ static void findEnums(const Entry *root)
if (getClass(root->relates)==0 && !scope.isEmpty())
scope=mergeScopes(scope,root->relates);
else
- scope=root->relates.copy();
+ scope=root->relates;
if ((cd=getClassMutable(scope))==0) nd=getResolvedNamespaceMutable(scope);
}
if (cd && !name.isEmpty()) // found a enum inside a compound
{
- //printf("Enum '%s'::'%s'\n",cd->name().data(),name.data());
+ //printf("Enum '%s'::'%s'\n",qPrint(cd->name()),qPrint(name));
fd=0;
mnsd=Doxygen::memberNameLinkedMap;
isGlobal=FALSE;
@@ -6902,7 +7066,7 @@ static void findEnums(const Entry *root)
// new enum type
std::unique_ptr<MemberDefMutable> md { createMemberDef(
root->fileName,root->startLine,root->startColumn,
- 0,name,0,0,
+ QCString(),name,QCString(),QCString(),
root->protection,Normal,FALSE,
isMemberOf ? Foreign : isRelated ? Related : Member,
MemberType_Enumeration,
@@ -6916,16 +7080,16 @@ static void findEnums(const Entry *root)
md->setMemberSpecifiers(root->spec);
md->setEnumBaseType(root->args);
//printf("Enum %s definition at line %d of %s: protection=%d scope=%s\n",
- // root->name.data(),root->bodyLine,root->fileName.data(),root->protection,cd?cd->name().data():"<none>");
+ // qPrint(root->name),root->bodyLine,qPrint(root->fileName),root->protection,cd?qPrint(cd->name()):"<none>");
md->addSectionsToDefinition(root->anchors);
md->setMemberGroupId(root->mGrpId);
md->enableCallGraph(root->callGraph);
md->enableCallerGraph(root->callerGraph);
md->enableReferencedByRelation(root->referencedByRelation);
md->enableReferencesRelation(root->referencesRelation);
- //printf("%s::setRefItems(%zu)\n",md->name().data(),root->sli.size());
+ //printf("%s::setRefItems(%zu)\n",qPrint(md->name()),root->sli.size());
md->setRefItems(root->sli);
- //printf("found enum %s nd=%p\n",md->name().data(),nd);
+ //printf("found enum %s nd=%p\n",qPrint(md->name()),nd);
bool defSet=FALSE;
QCString baseType = root->args;
@@ -6984,7 +7148,7 @@ static void findEnums(const Entry *root)
md->setBriefDescription(root->brief,root->briefFile,root->briefLine);
md->setInbodyDocumentation(root->inbodyDocs,root->inbodyFile,root->inbodyLine);
- //printf("Adding member=%s\n",md->name().data());
+ //printf("Adding member=%s\n",qPrint(md->name()));
addMemberToGroups(root,md.get());
MemberName *mn = mnsd->add(name);
@@ -7010,7 +7174,7 @@ static void addEnumValuesToEnums(const Entry *root)
MemberNameLinkedMap *mnsd=0;
bool isGlobal;
bool isRelated=FALSE;
- //printf("Found enum with name '%s' relates=%s\n",root->name.data(),root->relates.data());
+ //printf("Found enum with name '%s' relates=%s\n",qPrint(root->name),qPrint(root->relates));
int i;
QCString name;
@@ -7040,34 +7204,34 @@ static void addEnumValuesToEnums(const Entry *root)
if (getClassMutable(root->relates)==0 && !scope.isEmpty())
scope=mergeScopes(scope,root->relates);
else
- scope=root->relates.copy();
+ scope=root->relates;
if ((cd=getClassMutable(scope))==0) nd=getResolvedNamespaceMutable(scope);
}
if (cd && !name.isEmpty()) // found a enum inside a compound
{
- //printf("Enum in class '%s'::'%s'\n",cd->name().data(),name.data());
+ //printf("Enum in class '%s'::'%s'\n",qPrint(cd->name()),qPrint(name));
fd=0;
mnsd=Doxygen::memberNameLinkedMap;
isGlobal=FALSE;
}
else if (nd && !nd->isAnonymous()) // found enum inside namespace
{
- //printf("Enum in namespace '%s'::'%s'\n",nd->name().data(),name.data());
+ //printf("Enum in namespace '%s'::'%s'\n",qPrint(nd->name()),qPrint(name));
mnsd=Doxygen::functionNameLinkedMap;
isGlobal=TRUE;
}
else // found a global enum
{
fd=root->fileDef();
- //printf("Enum in file '%s': '%s'\n",fd->name().data(),name.data());
+ //printf("Enum in file '%s': '%s'\n",qPrint(fd->name()),qPrint(name));
mnsd=Doxygen::functionNameLinkedMap;
isGlobal=TRUE;
}
if (!name.isEmpty())
{
- //printf("** name=%s\n",name.data());
+ //printf("** name=%s\n",qPrint(name));
MemberName *mn = mnsd->find(name); // for all members with this name
if (mn)
{
@@ -7101,7 +7265,7 @@ static void addEnumValuesToEnums(const Entry *root)
// values are only visible inside the enum scope, so we must create
// them here and only add them to the enum
//printf("md->qualifiedName()=%s e->name=%s tagInfo=%p name=%s\n",
- // md->qualifiedName().data(),e->name.data(),e->tagInfo,e->name.data());
+ // qPrint(md->qualifiedName()),qPrint(e->name),e->tagInfo,qPrint(e->name));
QCString qualifiedName = substitute(root->name,"::",".");
if (!scope.isEmpty() && root->tagInfo())
{
@@ -7118,7 +7282,7 @@ static void addEnumValuesToEnums(const Entry *root)
}
std::unique_ptr<MemberDefMutable> fmd { createMemberDef(
fileName,e->startLine,e->startColumn,
- e->type,e->name,e->args,0,
+ e->type,e->name,e->args,QCString(),
e->protection, Normal,e->stat,Member,
MemberType_EnumValue,ArgumentList(),ArgumentList(),e->metaData) };
const NamespaceDef *mnd = md->getNamespaceDef();
@@ -7135,7 +7299,8 @@ static void addEnumValuesToEnums(const Entry *root)
fmd->setDocumentation(e->doc,e->docFile,e->docLine);
fmd->setBriefDescription(e->brief,e->briefFile,e->briefLine);
fmd->addSectionsToDefinition(e->anchors);
- fmd->setInitializer(e->initializer);
+ std::string init = e->initializer.str();
+ fmd->setInitializer(init.c_str());
fmd->setMaxInitLines(e->initLines);
fmd->setMemberGroupId(e->mGrpId);
fmd->setExplicitExternal(e->explicitExternal,fileName,e->startLine,e->startColumn);
@@ -7148,7 +7313,7 @@ static void addEnumValuesToEnums(const Entry *root)
}
else
{
- //printf("e->name=%s isRelated=%d\n",e->name.data(),isRelated);
+ //printf("e->name=%s isRelated=%d\n",qPrint(e->name),isRelated);
MemberName *fmn=0;
MemberNameLinkedMap *emnsd = isRelated ? Doxygen::functionNameLinkedMap : mnsd;
if (!e->name.isEmpty() && (fmn=emnsd->find(e->name)))
@@ -7160,7 +7325,7 @@ static void addEnumValuesToEnums(const Entry *root)
if (fmd && fmd->isEnumValue() && fmd->getOuterScope()==md->getOuterScope()) // in same scope
{
//printf("found enum value with same name %s in scope %s\n",
- // fmd->name().data(),fmd->getOuterScope()->name().data());
+ // qPrint(fmd->name()),qPrint(fmd->getOuterScope()->name()));
if (nd && !nd->isAnonymous())
{
const NamespaceDef *fnd=fmd->getNamespaceDef();
@@ -7195,7 +7360,7 @@ static void addEnumValuesToEnums(const Entry *root)
if (fcd==cd) // enum value is inside a class
{
//printf("Inserting enum field %s in enum scope %s\n",
- // fmd->name().data(),md->name().data());
+ // qPrint(fmd->name()),qPrint(md->name()));
md->insertEnumField(fmd); // add field def to list
fmd->setEnumScope(md); // cross ref with enum name
}
@@ -7238,7 +7403,7 @@ static void addEnumDocs(const Entry *root,MemberDefMutable *md)
md->setBriefDescription(root->brief,root->briefFile,root->briefLine);
}
- if (!md->inbodyDocumentation() || !root->parent()->name.isEmpty())
+ if (md->inbodyDocumentation().isEmpty() || !root->parent()->name.isEmpty())
{
md->setInbodyDocumentation(root->inbodyDocs,root->inbodyFile,root->inbodyLine);
}
@@ -7276,7 +7441,7 @@ static void findEnumDocumentation(const Entry *root)
{
name=root->name.right(root->name.length()-i-2); // extract name
scope=root->name.left(i); // extract scope
- //printf("Scope='%s' Name='%s'\n",scope.data(),name.data());
+ //printf("Scope='%s' Name='%s'\n",qPrint(scope),qPrint(name));
}
else // just the name
{
@@ -7293,10 +7458,10 @@ static void findEnumDocumentation(const Entry *root)
const NamespaceDef *nd=Doxygen::namespaceLinkedMap->find(scope);
const FileDef *fd = root->fileDef();
Debug::print(Debug::FindMembers,0,"1. Found docs for enum with name '%s' and scope '%s' in context %s cd=%s, nd=%s fd=%s\n",
- name.data(),scope.data(),root->parent()->name.data(),
- cd?cd->name().data():"<none>",
- nd?nd->name().data():"<none>",
- fd?fd->name().data():"<none>");
+ qPrint(name),qPrint(scope),qPrint(root->parent()->name),
+ cd?qPrint(cd->name()):"<none>",
+ nd?qPrint(nd->name()):"<none>",
+ fd?qPrint(fd->name()):"<none>");
if (!name.isEmpty())
{
@@ -7348,7 +7513,7 @@ static void findEnumDocumentation(const Entry *root)
{
warn(root->fileName,root->startLine,
"Documentation for undefined enum '%s' found.",
- name.data()
+ qPrint(name)
);
}
}
@@ -7481,8 +7646,8 @@ static void computeMemberRelations()
{
const ClassDef *bmcd = bmd->getClassDef();
//printf("Check relation between '%s'::'%s' (%p) and '%s'::'%s' (%p)\n",
- // mcd->name().data(),md->name().data(),md.get(),
- // bmcd->name().data(),bmd->name().data(),bmd.get()
+ // qPrint(mcd->name()),qPrint(md->name()),md.get(),
+ // qPrint(bmcd->name()),qPrint(bmd->name()),bmd.get()
// );
if (bmcd && mcd && bmcd!=mcd &&
(bmd->virtualness()!=Normal ||
@@ -7498,8 +7663,8 @@ static void computeMemberRelations()
const ArgumentList &bmdAl = bmd->argumentList();
const ArgumentList &mdAl = md->argumentList();
//printf(" Base argList='%s'\n Super argList='%s'\n",
- // argListToString(bmdAl).data(),
- // argListToString(mdAl).data()
+ // qPrint(argListToString(bmdAl)),
+ // qPrint(argListToString(mdAl))
// );
if (
matchArguments2(bmd->getOuterScope(),bmd->getFileDef(),&bmdAl,
@@ -7515,7 +7680,7 @@ static void computeMemberRelations()
//printf("setting (new) reimplements member\n");
md->setReimplements(bmd);
}
- //printf("%s: add reimplementedBy member %s\n",bmcd->name().data(),mcd->name().data());
+ //printf("%s: add reimplementedBy member %s\n",qPrint(bmcd->name()),qPrint(mcd->name()));
bmd->insertReimplementedBy(md);
}
else
@@ -7565,7 +7730,7 @@ static void mergeCategories()
if (baseClass)
{
//printf("*** merging members of category %s into %s\n",
- // cd->name().data(),baseClass->name().data());
+ // qPrint(cd->name()),qPrint(baseClass->name()));
baseClass->mergeCategory(cd.get());
}
}
@@ -7586,7 +7751,7 @@ static void buildCompleteMemberLists()
ClassDefMutable *cdm = toClassDefMutable(cd.get());
if (cdm)
{
- //printf("*** merging members for %s\n",cd->name().data());
+ //printf("*** merging members for %s\n",qPrint(cd->name()));
cdm->mergeMembers();
}
}
@@ -7637,7 +7802,7 @@ static void generateFileSources()
auto clangParser = ClangParser::instance()->createTUParser(fd.get());
if (fd->generateSourceFile() && !g_useOutputTemplate) // sources need to be shown in the output
{
- msg("Generating code for file %s...\n",fd->docName().data());
+ msg("Generating code for file %s...\n",qPrint(fd->docName()));
clangParser->parse();
fd->writeSourceHeader(*g_outputList);
fd->writeSourceBody(*g_outputList,clangParser.get());
@@ -7646,7 +7811,7 @@ static void generateFileSources()
else if (!fd->isReference() && Doxygen::parseSourcesNeeded)
// we needed to parse the sources even if we do not show them
{
- msg("Parsing code for file %s...\n",fd->docName().data());
+ msg("Parsing code for file %s...\n",qPrint(fd->docName()));
clangParser->parse();
fd->parseSource(clangParser.get());
}
@@ -7654,7 +7819,7 @@ static void generateFileSources()
for (auto incFile : clangParser->filesInSameTU())
{
if (filesToProcess.find(incFile)!=filesToProcess.end() && // part of input
- fd->absFilePath()!=incFile && // not same file
+ fd->absFilePath()!=QCString(incFile) && // not same file
processedFiles.find(incFile)==processedFiles.end()) // not yet marked as processed
{
StringVector moreFiles;
@@ -7664,7 +7829,7 @@ static void generateFileSources()
{
if (ifd->generateSourceFile() && !g_useOutputTemplate) // sources need to be shown in the output
{
- msg(" Generating code for file %s...\n",ifd->docName().data());
+ msg(" Generating code for file %s...\n",qPrint(ifd->docName()));
ifd->writeSourceHeader(*g_outputList);
ifd->writeSourceBody(*g_outputList,clangParser.get());
ifd->writeSourceFooter(*g_outputList);
@@ -7672,7 +7837,7 @@ static void generateFileSources()
else if (!ifd->isReference() && Doxygen::parseSourcesNeeded)
// we needed to parse the sources even if we do not show them
{
- msg(" Parsing code for file %s...\n",ifd->docName().data());
+ msg(" Parsing code for file %s...\n",qPrint(ifd->docName()));
ifd->parseSource(clangParser.get());
}
processedFiles.insert(incFile);
@@ -7693,7 +7858,7 @@ static void generateFileSources()
if (fd->generateSourceFile() && !Htags::useHtags && !g_useOutputTemplate) // sources need to be shown in the output
{
auto clangParser = ClangParser::instance()->createTUParser(fd.get());
- msg("Generating code for file %s...\n",fd->docName().data());
+ msg("Generating code for file %s...\n",qPrint(fd->docName()));
clangParser->parse();
fd->writeSourceHeader(*g_outputList);
fd->writeSourceBody(*g_outputList,clangParser.get());
@@ -7703,7 +7868,7 @@ static void generateFileSources()
// we needed to parse the sources even if we do not show them
{
auto clangParser = ClangParser::instance()->createTUParser(fd.get());
- msg("Parsing code for file %s...\n",fd->docName().data());
+ msg("Parsing code for file %s...\n",qPrint(fd->docName()));
clangParser->parse();
fd->writeSourceHeader(*g_outputList);
fd->writeSourceBody(*g_outputList,clangParser.get());
@@ -7742,12 +7907,12 @@ static void generateFileSources()
auto ctx = std::make_shared<SourceContext>(fd.get(),generateSourceFile,*g_outputList);
if (generateSourceFile)
{
- msg("Generating code for file %s...\n",fd->docName().data());
+ msg("Generating code for file %s...\n",qPrint(fd->docName()));
fd->writeSourceHeader(ctx->ol);
}
else
{
- msg("Parsing code for file %s...\n",fd->docName().data());
+ msg("Parsing code for file %s...\n",qPrint(fd->docName()));
}
auto processFile = [ctx]() {
StringVector filesInSameTu;
@@ -7783,7 +7948,7 @@ static void generateFileSources()
fd->getAllIncludeFilesRecursively(filesInSameTu);
if (fd->generateSourceFile() && !Htags::useHtags && !g_useOutputTemplate) // sources need to be shown in the output
{
- msg("Generating code for file %s...\n",fd->docName().data());
+ msg("Generating code for file %s...\n",qPrint(fd->docName()));
fd->writeSourceHeader(*g_outputList);
fd->writeSourceBody(*g_outputList,nullptr);
fd->writeSourceFooter(*g_outputList);
@@ -7791,7 +7956,7 @@ static void generateFileSources()
else if (!fd->isReference() && Doxygen::parseSourcesNeeded)
// we needed to parse the sources even if we do not show them
{
- msg("Parsing code for file %s...\n",fd->docName().data());
+ msg("Parsing code for file %s...\n",qPrint(fd->docName()));
fd->parseSource(nullptr);
}
}
@@ -7816,7 +7981,7 @@ static void generateFileDocs()
bool doc = fd->isLinkableInProject();
if (doc)
{
- msg("Generating docs for file %s...\n",fd->docName().data());
+ msg("Generating docs for file %s...\n",qPrint(fd->docName()));
fd->writeDocumentation(*g_outputList);
}
}
@@ -7837,6 +8002,15 @@ static void addSourceReferences()
fd->addSourceRef(cd->getStartDefLine(),cd.get(),0);
}
}
+ // add source references for concept definitions
+ for (const auto &cd : *Doxygen::conceptLinkedMap)
+ {
+ FileDef *fd=cd->getBodyDef();
+ if (fd && cd->isLinkableInProject() && cd->getStartDefLine()!=-1)
+ {
+ fd->addSourceRef(cd->getStartDefLine(),cd.get(),0);
+ }
+ }
// add source references for namespace definitions
for (const auto &nd : *Doxygen::namespaceLinkedMap)
{
@@ -7853,8 +8027,8 @@ static void addSourceReferences()
for (const auto &md : *mn)
{
//printf("class member %s: def=%s body=%d link?=%d\n",
- // md->name().data(),
- // md->getBodyDef()?md->getBodyDef()->name().data():"<none>",
+ // qPrint(md->name()),
+ // md->getBodyDef()?qPrint(md->getBodyDef()->name()):"<none>",
// md->getStartBodyLine(),md->isLinkableInProject());
FileDef *fd=md->getBodyDef();
if (fd &&
@@ -7864,7 +8038,7 @@ static void addSourceReferences()
)
{
//printf("Found member '%s' in file '%s' at line '%d' def=%s\n",
- // md->name().data(),fd->name().data(),md->getStartBodyLine(),md->getOuterScope()->name().data());
+ // qPrint(md->name()),qPrint(fd->name()),md->getStartBodyLine(),qPrint(md->getOuterScope()->name()));
fd->addSourceRef(md->getStartDefLine(),md->getOuterScope(),md.get());
}
}
@@ -7875,7 +8049,7 @@ static void addSourceReferences()
{
FileDef *fd=md->getBodyDef();
//printf("member %s body=[%d,%d] fd=%p link=%d parseSources=%d\n",
- // md->name().data(),
+ // qPrint(md->name()),
// md->getStartBodyLine(),md->getEndBodyLine(),fd,
// md->isLinkableInProject(),
// Doxygen::parseSourcesNeeded);
@@ -7886,7 +8060,7 @@ static void addSourceReferences()
)
{
//printf("Found member '%s' in file '%s' at line '%d' def=%s\n",
- // md->name().data(),fd->name().data(),md->getStartBodyLine(),md->getOuterScope()->name().data());
+ // qPrint(md->name()),qPrint(fd->name()),md->getStartBodyLine(),qPrint(md->getOuterScope()->name()));
fd->addSourceRef(md->getStartDefLine(),md->getOuterScope(),md.get());
}
}
@@ -7907,7 +8081,7 @@ static void buildDefineList()
{
std::unique_ptr<MemberDefMutable> md { createMemberDef(
def.fileName,def.lineNr,def.columnNr,
- "#define",def.name,def.args,0,
+ "#define",def.name,def.args,QCString(),
Public,Normal,FALSE,Member,MemberType_Define,
ArgumentList(),ArgumentList(),"") };
@@ -8051,7 +8225,7 @@ static void generateClassList(const ClassLinkedMap &classList)
{
ClassDefMutable *cd=toClassDefMutable(cdi.get());
- //printf("cd=%s getOuterScope=%p global=%p\n",cd->name().data(),cd->getOuterScope(),Doxygen::globalScope);
+ //printf("cd=%s getOuterScope=%p global=%p\n",qPrint(cd->name()),cd->getOuterScope(),Doxygen::globalScope);
if (cd &&
(cd->getOuterScope()==0 || // <-- should not happen, but can if we read an old tag file
cd->getOuterScope()==Doxygen::globalScope // only look at global classes
@@ -8062,7 +8236,7 @@ static void generateClassList(const ClassLinkedMap &classList)
// template instances
if ( cd->isLinkableInProject() && cd->templateMaster()==0)
{
- msg("Generating docs for compound %s...\n",cd->name().data());
+ msg("Generating docs for compound %s...\n",qPrint(cd->name()));
cd->writeDocumentation(*g_outputList);
cd->writeMemberList(*g_outputList);
@@ -8081,6 +8255,27 @@ static void generateClassDocs()
//----------------------------------------------------------------------------
+static void generateConceptDocs()
+{
+ for (const auto &cdi : *Doxygen::conceptLinkedMap)
+ {
+ ConceptDefMutable *cd=toConceptDefMutable(cdi.get());
+
+ //printf("cd=%s getOuterScope=%p global=%p\n",qPrint(cd->name()),cd->getOuterScope(),Doxygen::globalScope);
+ if (cd &&
+ (cd->getOuterScope()==0 || // <-- should not happen, but can if we read an old tag file
+ cd->getOuterScope()==Doxygen::globalScope // only look at global concepts
+ ) && !cd->isHidden() && cd->isLinkableInProject()
+ )
+ {
+ msg("Generating docs for concept %s...\n",qPrint(cd->name()));
+ cd->writeDocumentation(*g_outputList);
+ }
+ }
+}
+
+//----------------------------------------------------------------------------
+
static void inheritDocumentation()
{
for (const auto &mn : *Doxygen::memberNameLinkedMap)
@@ -8089,7 +8284,7 @@ static void inheritDocumentation()
{
MemberDefMutable *md = toMemberDefMutable(imd.get());
//static int count=0;
- //printf("%04d Member '%s'\n",count++,md->qualifiedName().data());
+ //printf("%04d Member '%s'\n",count++,qPrint(md->qualifiedName()));
if (md && md->documentation().isEmpty() && md->briefDescription().isEmpty())
{ // no documentation yet
const MemberDef *bmd = md->reimplements();
@@ -8097,7 +8292,7 @@ static void inheritDocumentation()
bmd->briefDescription().isEmpty()
)
{ // search up the inheritance tree for a documentation member
- //printf("bmd=%s class=%s\n",bmd->name().data(),bmd->getClassDef()->name().data());
+ //printf("bmd=%s class=%s\n",qPrint(bmd->name()),qPrint(bmd->getClassDef()->name()));
bmd = bmd->reimplements();
}
if (bmd) // copy the documentation from the reimplemented member
@@ -8226,6 +8421,15 @@ static void findSectionsInDocumentation()
cdm->findSectionsInDocumentation();
}
}
+ // for each concept
+ for (const auto &cd : *Doxygen::conceptLinkedMap)
+ {
+ ConceptDefMutable *cdm = toConceptDefMutable(cd.get());
+ if (cdm)
+ {
+ cdm->findSectionsInDocumentation();
+ }
+ }
// for each file
for (const auto &fn : *Doxygen::inputNameLinkedMap)
{
@@ -8374,19 +8578,19 @@ static void findDefineDocumentation(Entry *root)
)
{
//printf("found define '%s' '%s' brief='%s' doc='%s'\n",
- // root->name.data(),root->args.data(),root->brief.data(),root->doc.data());
+ // qPrint(root->name),qPrint(root->args),qPrint(root->brief),qPrint(root->doc));
if (root->tagInfo() && !root->name.isEmpty()) // define read from a tag file
{
std::unique_ptr<MemberDefMutable> md { createMemberDef(root->tagInfo()->tagName,1,1,
- "#define",root->name,root->args,0,
+ "#define",root->name,root->args,QCString(),
Public,Normal,FALSE,Member,MemberType_Define,
ArgumentList(),ArgumentList(),"") };
md->setTagInfo(root->tagInfo());
md->setLanguage(root->lang);
- //printf("Searching for '%s' fd=%p\n",filePathName.data(),fd);
+ //printf("Searching for '%s' fd=%p\n",qPrint(filePathName),fd);
md->setFileDef(root->parent()->fileDef());
- //printf("Adding member=%s\n",md->name().data());
+ //printf("Adding member=%s\n",qPrint(md->name()));
MemberName *mn = Doxygen::functionNameLinkedMap->add(root->name);
mn->push_back(std::move(md));
}
@@ -8457,10 +8661,10 @@ static void findDefineDocumentation(Entry *root)
}
}
}
- //warn("define %s found in the following files:\n",root->name.data());
+ //warn("define %s found in the following files:\n",qPrint(root->name));
//warn("Cannot determine where to add the documentation found "
// "at line %d of file %s. \n",
- // root->startLine,root->fileName.data());
+ // root->startLine,qPrint(root->fileName));
}
}
else if (!root->doc.isEmpty() || !root->brief.isEmpty()) // define not found
@@ -8470,7 +8674,7 @@ static void findDefineDocumentation(Entry *root)
{
warn(root->fileName,root->startLine,
"documentation for unknown define %s found.\n",
- root->name.data()
+ qPrint(root->name)
);
}
else
@@ -8478,7 +8682,7 @@ static void findDefineDocumentation(Entry *root)
warn(root->fileName,root->startLine,
"found documented #define %s but ignoring it because "
"ENABLE_PREPROCESSING is NO.\n",
- root->name.data()
+ qPrint(root->name)
);
}
}
@@ -8495,7 +8699,7 @@ static void findDirDocumentation(const Entry *root)
QCString normalizedName = root->name;
normalizedName = substitute(normalizedName,"\\","/");
//printf("root->docFile=%s normalizedName=%s\n",
- // root->docFile.data(),normalizedName.data());
+ // qPrint(root->docFile),qPrint(normalizedName));
if (root->docFile==normalizedName) // current dir?
{
int lastSlashPos=normalizedName.findRev('/');
@@ -8511,7 +8715,7 @@ static void findDirDocumentation(const Entry *root)
DirDef *matchingDir=0;
for (const auto &dir : *Doxygen::dirLinkedMap)
{
- //printf("Dir: %s<->%s\n",dir->name().data(),normalizedName.data());
+ //printf("Dir: %s<->%s\n",qPrint(dir->name()),qPrint(normalizedName));
if (dir->name().right(normalizedName.length())==normalizedName)
{
if (matchingDir)
@@ -8520,7 +8724,7 @@ static void findDirDocumentation(const Entry *root)
"\\dir command matches multiple directories.\n"
" Applying the command for directory %s\n"
" Ignoring the command for directory %s\n",
- matchingDir->name().data(),dir->name().data()
+ qPrint(matchingDir->name()),qPrint(dir->name())
);
}
else
@@ -8531,7 +8735,7 @@ static void findDirDocumentation(const Entry *root)
}
if (matchingDir)
{
- //printf("Match for with dir %s\n",matchingDir->name().data());
+ //printf("Match for with dir %s\n",qPrint(matchingDir->name()));
matchingDir->setBriefDescription(root->brief,root->briefFile,root->briefLine);
matchingDir->setDocumentation(root->doc,root->docFile,root->docLine);
matchingDir->setRefItems(root->sli);
@@ -8540,7 +8744,7 @@ static void findDirDocumentation(const Entry *root)
else
{
warn(root->fileName,root->startLine,"No matching "
- "directory found for command \\dir %s\n",normalizedName.data());
+ "directory found for command \\dir %s\n",qPrint(normalizedName));
}
}
for (const auto &e : root->children()) findDirDocumentation(e.get());
@@ -8570,7 +8774,7 @@ static void buildPageList(Entry *root)
"page",
name,
title,
- 0,0
+ QCString(),0
);
}
for (const auto &e : root->children()) buildPageList(e.get());
@@ -8584,7 +8788,7 @@ static void findMainPage(Entry *root)
if (Doxygen::mainPage==0 && root->tagInfo()==0)
{
//printf("mainpage: docLine=%d startLine=%d\n",root->docLine,root->startLine);
- //printf("Found main page! \n======\n%s\n=======\n",root->doc.data());
+ //printf("Found main page! \n======\n%s\n=======\n",qPrint(root->doc));
QCString title=root->args.stripWhiteSpace();
if (title.isEmpty()) title = Config_getString(PROJECT_NAME);
//QCString indexName=Config_getBool(GENERATE_TREEVIEW)?"main":"index";
@@ -8604,12 +8808,12 @@ static void findMainPage(Entry *root)
if (si->lineNr() != -1)
{
warn(root->fileName,root->startLine,"multiple use of section label '%s' for main page, (first occurrence: %s, line %d)",
- Doxygen::mainPage->name().data(),si->fileName().data(),si->lineNr());
+ qPrint(Doxygen::mainPage->name()),qPrint(si->fileName()),si->lineNr());
}
else
{
warn(root->fileName,root->startLine,"multiple use of section label '%s' for main page, (first occurrence: %s)",
- Doxygen::mainPage->name().data(),si->fileName().data());
+ qPrint(Doxygen::mainPage->name()),qPrint(si->fileName()));
}
}
else
@@ -8629,7 +8833,7 @@ static void findMainPage(Entry *root)
{
warn(root->fileName,root->startLine,
"found more than one \\mainpage comment block! (first occurrence: %s, line %d), Skipping current block!",
- Doxygen::mainPage->docFile().data(),Doxygen::mainPage->getStartBodyLine());
+ qPrint(Doxygen::mainPage->docFile()),Doxygen::mainPage->getStartBodyLine());
}
}
for (const auto &e : root->children()) findMainPage(e.get());
@@ -8668,13 +8872,13 @@ static void computePageRelations(Entry *root)
{
term("page defined at line %d of file %s with label %s is a direct "
"subpage of itself! Please remove this cyclic dependency.\n",
- pd->docLine(),pd->docFile().data(),pd->name().data());
+ pd->docLine(),qPrint(pd->docFile()),qPrint(pd->name()));
}
else if (subPd)
{
pd->addInnerCompound(subPd);
//printf("*** Added subpage relation: %s->%s\n",
- // pd->name().data(),subPd->name().data());
+ // qPrint(pd->name()),qPrint(subPd->name()));
}
}
}
@@ -8693,7 +8897,7 @@ static void checkPageRelations()
{
term("page defined at line %d of file %s with label %s is a subpage "
"of itself! Please remove this cyclic dependency.\n",
- pd->docLine(),pd->docFile().data(),pd->name().data());
+ pd->docLine(),qPrint(pd->docFile()),qPrint(pd->name()));
}
ppd=ppd->getOuterScope();
}
@@ -8707,8 +8911,8 @@ static void resolveUserReferences()
for (const auto &si : SectionManager::instance())
{
//printf("si->label='%s' si->definition=%s si->fileName='%s'\n",
- // si->label.data(),si->definition?si->definition->name().data():"<none>",
- // si->fileName.data());
+ // qPrint(si->label),si->definition?qPrint(si->definition->name()):"<none>",
+ // qPrint(si->fileName));
PageDef *pd=0;
// hack: the items of a todo/test/bug/deprecated list are all fragments from
@@ -8727,7 +8931,7 @@ static void resolveUserReferences()
}
}
- //printf("start: si->label=%s si->fileName=%s\n",si->label.data(),si->fileName.data());
+ //printf("start: si->label=%s si->fileName=%s\n",qPrint(si->label),qPrint(si->fileName));
if (!si->generated())
{
// if this section is in a page and the page is in a group, then we
@@ -8755,12 +8959,12 @@ static void resolveUserReferences()
}
else
{
- //si->fileName=si->definition->getOutputFileBase().copy();
- //printf("Setting si->fileName to %s\n",si->fileName.data());
+ //si->fileName=si->definition->getOutputFileBase();
+ //printf("Setting si->fileName to %s\n",qPrint(si->fileName));
}
}
}
- //printf("end: si->label=%s si->fileName=%s\n",si->label.data(),si->fileName.data());
+ //printf("end: si->label=%s si->fileName=%s\n",qPrint(si->label),qPrint(si->fileName));
}
}
@@ -8778,7 +8982,7 @@ static void generatePageDocs()
{
if (!pd->getGroupDef() && !pd->isReference())
{
- msg("Generating docs for page %s...\n",pd->name().data());
+ msg("Generating docs for page %s...\n",qPrint(pd->name()));
Doxygen::insideMainPage=TRUE;
pd->writeDocumentation(*g_outputList);
Doxygen::insideMainPage=FALSE;
@@ -8798,7 +9002,7 @@ static void buildExampleList(Entry *root)
warn(root->fileName,root->startLine,
"Example %s was already documented. Ignoring "
"documentation found here.",
- root->name.data()
+ qPrint(root->name)
);
}
else
@@ -8828,8 +9032,8 @@ void printNavTree(Entry *root,int indent)
QCString indentStr;
indentStr.fill(' ',indent);
msg("%s%s (sec=0x%x)\n",
- indentStr.isEmpty()?"":indentStr.data(),
- root->name.isEmpty()?"<empty>":root->name.data(),
+ indentStr.isEmpty()?"":qPrint(indentStr),
+ root->name.isEmpty()?"<empty>":qPrint(root->name),
root->section);
for (const auto &e : root->children())
{
@@ -8846,14 +9050,14 @@ static void generateExampleDocs()
g_outputList->disable(OutputGenerator::Man);
for (const auto &pd : *Doxygen::exampleLinkedMap)
{
- msg("Generating docs for example %s...\n",pd->name().data());
+ msg("Generating docs for example %s...\n",qPrint(pd->name()));
auto intf = Doxygen::parserManager->getCodeParser(".c"); // TODO: do this on code type
intf->resetCodeParserState();
QCString n=pd->getOutputFileBase();
startFile(*g_outputList,n,n,pd->name());
startTitle(*g_outputList,n);
g_outputList->docify(pd->name());
- endTitle(*g_outputList,n,0);
+ endTitle(*g_outputList,n,QCString());
g_outputList->startContents();
QCString lineNoOptStr;
if (pd->showLineNo())
@@ -8909,7 +9113,7 @@ static void generateNamespaceClassDocs(const ClassLinkedRefMap &classList)
&& !cd->isHidden() && !cd->isEmbeddedInOuterScope()
)
{
- msg("Generating docs for compound %s...\n",cd->name().data());
+ msg("Generating docs for compound %s...\n",qPrint(cd->name()));
cdm->writeDocumentation(*g_outputList);
cdm->writeMemberList(*g_outputList);
@@ -8919,6 +9123,20 @@ static void generateNamespaceClassDocs(const ClassLinkedRefMap &classList)
}
}
+static void generateNamespaceConceptDocs(const ConceptLinkedRefMap &conceptList)
+{
+ // for each concept in the namespace...
+ for (const auto &cd : conceptList)
+ {
+ ConceptDefMutable *cdm = toConceptDefMutable(cd);
+ if ( cdm && cd->isLinkableInProject() && !cd->isHidden())
+ {
+ msg("Generating docs for concept %s...\n",qPrint(cd->name()));
+ cdm->writeDocumentation(*g_outputList);
+ }
+ }
+}
+
static void generateNamespaceDocs()
{
static bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
@@ -8933,7 +9151,7 @@ static void generateNamespaceDocs()
NamespaceDefMutable *ndm = toNamespaceDefMutable(nd.get());
if (ndm)
{
- msg("Generating docs for namespace %s\n",nd->name().data());
+ msg("Generating docs for namespace %s\n",qPrint(nd->name()));
ndm->writeDocumentation(*g_outputList);
}
}
@@ -8945,6 +9163,7 @@ static void generateNamespaceDocs()
generateNamespaceClassDocs(nd->getStructs());
generateNamespaceClassDocs(nd->getExceptions());
}
+ generateNamespaceConceptDocs(nd->getConcepts());
}
}
@@ -8976,72 +9195,60 @@ static QCString fixSlashes(QCString &s)
* If the \a shortList parameter is TRUE a configuration file without
* comments will be generated.
*/
-static void generateConfigFile(const char *configFile,bool shortList,
+static void generateConfigFile(const QCString &configFile,bool shortList,
bool updateOnly=FALSE)
{
- QFile f;
+ std::ofstream f;
bool fileOpened=openOutputFile(configFile,f);
- bool writeToStdout=(configFile[0]=='-' && configFile[1]=='\0');
+ bool writeToStdout=configFile=="-";
if (fileOpened)
{
- FTextStream t(&f);
+ TextStream t(&f);
Config::writeTemplate(t,shortList,updateOnly);
if (!writeToStdout)
{
if (!updateOnly)
{
- msg("\n\nConfiguration file '%s' created.\n\n",configFile);
+ msg("\n\nConfiguration file '%s' created.\n\n",qPrint(configFile));
msg("Now edit the configuration file and enter\n\n");
- if (qstrcmp(configFile,"Doxyfile") || qstrcmp(configFile,"doxyfile"))
- msg(" doxygen %s\n\n",configFile);
+ if (configFile!="Doxyfile" && configFile!="doxyfile")
+ msg(" doxygen %s\n\n",qPrint(configFile));
else
msg(" doxygen\n\n");
msg("to generate the documentation for your project\n\n");
}
else
{
- msg("\n\nConfiguration file '%s' updated.\n\n",configFile);
+ msg("\n\nConfiguration file '%s' updated.\n\n",qPrint(configFile));
}
}
}
else
{
- term("Cannot open file %s for writing\n",configFile);
+ term("Cannot open file %s for writing\n",qPrint(configFile));
}
}
+
static void compareDoxyfile()
{
- QFile f;
- char configFile[2];
- configFile[0] = '-';
- configFile[1] = '\0';
- bool fileOpened=openOutputFile(configFile,f);
+ std::ofstream f;
+ bool fileOpened=openOutputFile("-",f);
if (fileOpened)
{
- FTextStream t(&f);
+ TextStream t(&f);
Config::compareDoxyfile(t);
}
else
{
- term("Cannot open file %s for writing\n",configFile);
+ term("Cannot open stdout for writing\n");
}
}
-//----------------------------------------------------------------------------
-// read and parse a tag file
-
-//static bool readLineFromFile(QFile &f,QCString &s)
-//{
-// char c=0;
-// s.resize(0);
-// while (!f.atEnd() && (c=f.getch())!='\n') s+=c;
-// return f.atEnd();
-//}
//----------------------------------------------------------------------------
+// read and parse a tag file
-static void readTagFile(const std::shared_ptr<Entry> &root,const char *tl)
+static void readTagFile(const std::shared_ptr<Entry> &root,const QCString &tagLine)
{
- QCString tagLine = tl;
QCString fileName;
QCString destName;
int eqPos = tagLine.find('=');
@@ -9050,30 +9257,30 @@ static void readTagFile(const std::shared_ptr<Entry> &root,const char *tl)
fileName = tagLine.left(eqPos).stripWhiteSpace();
destName = tagLine.right(tagLine.length()-eqPos-1).stripWhiteSpace();
if (fileName.isEmpty() || destName.isEmpty()) return;
- QFileInfo fi(fileName);
+ FileInfo fi(fileName.str());
Doxygen::tagDestinationMap.insert(
- std::make_pair(fi.absFilePath().utf8().str(), destName.str()));
- //printf("insert tagDestination %s->%s\n",fi.fileName().data(),destName.data());
+ std::make_pair(fi.absFilePath(), destName.str()));
+ //printf("insert tagDestination %s->%s\n",qPrint(fi.fileName()),qPrint(destName));
}
else
{
fileName = tagLine;
}
- QFileInfo fi(fileName);
+ FileInfo fi(fileName.str());
if (!fi.exists() || !fi.isFile())
{
err("Tag file '%s' does not exist or is not a file. Skipping it...\n",
- fileName.data());
+ qPrint(fileName));
return;
}
if (!destName.isEmpty())
- msg("Reading tag file '%s', location '%s'...\n",fileName.data(),destName.data());
+ msg("Reading tag file '%s', location '%s'...\n",qPrint(fileName),qPrint(destName));
else
- msg("Reading tag file '%s'...\n",fileName.data());
+ msg("Reading tag file '%s'...\n",qPrint(fileName));
- parseTagFile(root,fi.absFilePath().utf8());
+ parseTagFile(root,fi.absFilePath().c_str());
}
//----------------------------------------------------------------------------
@@ -9082,22 +9289,22 @@ static void copyLatexStyleSheet()
const StringVector &latexExtraStyleSheet = Config_getList(LATEX_EXTRA_STYLESHEET);
for (const auto &sheet : latexExtraStyleSheet)
{
- QCString fileName = sheet.c_str();
- if (!fileName.isEmpty())
+ std::string fileName = sheet;
+ if (!fileName.empty())
{
- QFileInfo fi(fileName);
+ FileInfo fi(fileName);
if (!fi.exists())
{
- err("Style sheet '%s' specified by LATEX_EXTRA_STYLESHEET does not exist!\n",fileName.data());
+ err("Style sheet '%s' specified by LATEX_EXTRA_STYLESHEET does not exist!\n",qPrint(fileName));
}
else
{
- QCString destFileName = Config_getString(LATEX_OUTPUT)+"/"+fi.fileName().data();
- if (!checkExtension(fi.fileName().data(), LATEX_STYLE_EXTENSION))
+ QCString destFileName = Config_getString(LATEX_OUTPUT)+"/"+fi.fileName();
+ if (!checkExtension(fi.fileName().c_str(), LATEX_STYLE_EXTENSION))
{
destFileName += LATEX_STYLE_EXTENSION;
}
- copyFile(fileName, destFileName);
+ copyFile(QCString(fileName), destFileName);
}
}
}
@@ -9109,37 +9316,37 @@ static void copyStyleSheet()
QCString htmlStyleSheet = Config_getString(HTML_STYLESHEET);
if (!htmlStyleSheet.isEmpty())
{
- QFileInfo fi(htmlStyleSheet);
+ FileInfo fi(htmlStyleSheet.str());
if (!fi.exists())
{
- err("Style sheet '%s' specified by HTML_STYLESHEET does not exist!\n",htmlStyleSheet.data());
+ err("Style sheet '%s' specified by HTML_STYLESHEET does not exist!\n",qPrint(htmlStyleSheet));
htmlStyleSheet = Config_updateString(HTML_STYLESHEET,""); // revert to the default
}
else
{
- QCString destFileName = Config_getString(HTML_OUTPUT)+"/"+fi.fileName().data();
+ QCString destFileName = Config_getString(HTML_OUTPUT)+"/"+fi.fileName();
copyFile(htmlStyleSheet,destFileName);
}
}
const StringVector &htmlExtraStyleSheet = Config_getList(HTML_EXTRA_STYLESHEET);
for (const auto &sheet : htmlExtraStyleSheet)
{
- QCString fileName = sheet.c_str();
- if (!fileName.isEmpty())
+ std::string fileName = sheet;
+ if (!fileName.empty())
{
- QFileInfo fi(fileName);
+ FileInfo fi(fileName);
if (!fi.exists())
{
- err("Style sheet '%s' specified by HTML_EXTRA_STYLESHEET does not exist!\n",fileName.data());
+ err("Style sheet '%s' specified by HTML_EXTRA_STYLESHEET does not exist!\n",fileName.c_str());
}
else if (fi.fileName()=="doxygen.css" || fi.fileName()=="tabs.css" || fi.fileName()=="navtree.css")
{
- err("Style sheet %s specified by HTML_EXTRA_STYLESHEET is already a built-in stylesheet. Please use a different name\n",fi.fileName().data());
+ err("Style sheet %s specified by HTML_EXTRA_STYLESHEET is already a built-in stylesheet. Please use a different name\n",qPrint(fi.fileName()));
}
else
{
- QCString destFileName = Config_getString(HTML_OUTPUT)+"/"+fi.fileName().data();
- copyFile(fileName, destFileName);
+ QCString destFileName = Config_getString(HTML_OUTPUT)+"/"+fi.fileName();
+ copyFile(QCString(fileName), destFileName);
}
}
}
@@ -9150,38 +9357,37 @@ static void copyLogo(const QCString &outputOption)
QCString projectLogo = Config_getString(PROJECT_LOGO);
if (!projectLogo.isEmpty())
{
- QFileInfo fi(projectLogo);
+ FileInfo fi(projectLogo.str());
if (!fi.exists())
{
- err("Project logo '%s' specified by PROJECT_LOGO does not exist!\n",projectLogo.data());
+ err("Project logo '%s' specified by PROJECT_LOGO does not exist!\n",qPrint(projectLogo));
projectLogo = Config_updateString(PROJECT_LOGO,""); // revert to the default
}
else
{
- QCString destFileName = outputOption+"/"+fi.fileName().data();
+ QCString destFileName = outputOption+"/"+fi.fileName();
copyFile(projectLogo,destFileName);
- Doxygen::indexList->addImageFile(fi.fileName().data());
+ Doxygen::indexList->addImageFile(fi.fileName().c_str());
}
}
}
static void copyExtraFiles(const StringVector &files,const QCString &filesOption,const QCString &outputOption)
{
- for (const auto &file : files)
+ for (const auto &fileName : files)
{
- QCString fileName = file.c_str();
- if (!fileName.isEmpty())
+ if (!fileName.empty())
{
- QFileInfo fi(fileName);
+ FileInfo fi(fileName);
if (!fi.exists())
{
- err("Extra file '%s' specified in %s does not exist!\n", fileName.data(),filesOption.data());
+ err("Extra file '%s' specified in %s does not exist!\n", fileName.c_str(),qPrint(filesOption));
}
else
{
- QCString destFileName = outputOption+"/"+fi.fileName().data();
- Doxygen::indexList->addImageFile(fi.fileName().utf8());
- copyFile(fileName, destFileName);
+ QCString destFileName = outputOption+"/"+fi.fileName();
+ Doxygen::indexList->addImageFile(fi.fileName().c_str());
+ copyFile(QCString(fileName), destFileName);
}
}
}
@@ -9223,7 +9429,7 @@ static void generateDiskNames()
std::sort(fileEntries.begin(),
fileEntries.end(),
[](const FileEntry &fe1,const FileEntry &fe2)
- { return qstrcmp(fe1.path.data(),fe2.path.data())<0; }
+ { return fe1.path < fe2.path; }
);
// since the entries are sorted, the common prefix of the whole array is same
@@ -9255,7 +9461,7 @@ static void generateDiskNames()
{
QCString prefix = fileEntry.path.right(fileEntry.path.length()-j-1);
fileEntry.fileDef->setName(prefix+fn->fileName());
- //printf("!!!!!!!! non unique disk name=%s:%s\n",prefix.data(),fn->fileName());
+ //printf("!!!!!!!! non unique disk name=%s:%s\n",qPrint(prefix),fn->fileName());
fileEntry.fileDef->setDiskName(prefix+fn->fileName());
}
}
@@ -9266,7 +9472,7 @@ static void generateDiskNames()
//----------------------------------------------------------------------------
-static std::unique_ptr<OutlineParserInterface> getParserForFile(const char *fn)
+static std::unique_ptr<OutlineParserInterface> getParserForFile(const QCString &fn)
{
QCString fileName=fn;
QCString extension;
@@ -9285,7 +9491,7 @@ static std::unique_ptr<OutlineParserInterface> getParserForFile(const char *fn)
}
static std::shared_ptr<Entry> parseFile(OutlineParserInterface &parser,
- FileDef *fd,const char *fn,
+ FileDef *fd,const QCString &fn,
ClangTUParser *clangParser,bool newTU)
{
QCString fileName=fn;
@@ -9300,8 +9506,8 @@ static std::shared_ptr<Entry> parseFile(OutlineParserInterface &parser,
extension = ".no_extension";
}
- QFileInfo fi(fileName);
- BufStr preBuf(fi.size()+4096);
+ FileInfo fi(fileName.str());
+ BufStr preBuf((uint)fi.size()+4096);
if (Config_getBool(ENABLE_PREPROCESSING) &&
parser.needsPreprocessing(extension))
@@ -9310,16 +9516,17 @@ static std::shared_ptr<Entry> parseFile(OutlineParserInterface &parser,
const StringVector &includePath = Config_getList(INCLUDE_PATH);
for (const auto &s : includePath)
{
- preprocessor.addSearchDir(QFileInfo(s.c_str()).absFilePath().utf8());
+ std::string absPath = FileInfo(s).absFilePath();
+ preprocessor.addSearchDir(absPath.c_str());
}
- BufStr inBuf(fi.size()+4096);
- msg("Preprocessing %s...\n",fn);
+ BufStr inBuf((uint)fi.size()+4096);
+ msg("Preprocessing %s...\n",qPrint(fn));
readInputFile(fileName,inBuf);
preprocessor.processFile(fileName,inBuf,preBuf);
}
else // no preprocessing
{
- msg("Reading %s...\n",fn);
+ msg("Reading %s...\n",qPrint(fn));
readInputFile(fileName,preBuf);
}
if (preBuf.data() && preBuf.curPos()>0 && *(preBuf.data()+preBuf.curPos()-1)!='\n')
@@ -9569,14 +9776,13 @@ static void parseFilesSingleThreading(const std::shared_ptr<Entry> &root)
// resolves a path that may include symlinks, if a recursive symlink is
// found an empty string is returned.
-static QCString resolveSymlink(QCString path)
+static std::string resolveSymlink(const std::string &path)
{
int sepPos=0;
int oldPos=0;
- QFileInfo fi;
StringSet nonSymlinks;
StringSet known;
- QCString result = path;
+ QCString result(path);
QCString oldPrefix = "/";
do
{
@@ -9592,14 +9798,14 @@ static QCString resolveSymlink(QCString path)
QCString prefix = sepPos==-1 ? result : result.left(sepPos);
if (nonSymlinks.find(prefix.str())==nonSymlinks.end())
{
- fi.setFile(prefix);
+ FileInfo fi(prefix.str());
if (fi.isSymLink())
{
- QString target = fi.readLink();
- bool isRelative = QFileInfo(target).isRelative();
+ QCString target = fi.readLink();
+ bool isRelative = FileInfo(target.str()).isRelative();
if (isRelative)
{
- target = QDir::cleanDirPath(oldPrefix+"/"+target.data());
+ target = Dir::cleanDirPath(oldPrefix.str()+"/"+target.str());
}
if (sepPos!=-1)
{
@@ -9609,9 +9815,9 @@ static QCString resolveSymlink(QCString path)
}
target+=result.mid(sepPos);
}
- result = QDir::cleanDirPath(target).data();
+ result = Dir::cleanDirPath(target.str());
sepPos = 0;
- if (known.find(result.str())!=known.end()) return QCString(); // recursive symlink!
+ if (known.find(result.str())!=known.end()) return std::string(); // recursive symlink!
known.insert(result.str());
if (isRelative)
{
@@ -9632,7 +9838,7 @@ static QCString resolveSymlink(QCString path)
}
}
while (sepPos!=-1);
- return QDir::cleanDirPath(result).data();
+ return Dir::cleanDirPath(result.str());
}
static std::mutex g_pathsVisitedMutex;
@@ -9644,7 +9850,7 @@ static StringUnorderedSet g_pathsVisited(1009);
// The directory is read iff the recursiveFlag is set.
// The contents of all files is append to the input string
-static int readDir(QFileInfo *fi,
+static void readDir(FileInfo *fi,
FileNameLinkedMap *fnMap,
StringUnorderedSet *exclSet,
const StringVector *patList,
@@ -9657,84 +9863,72 @@ static int readDir(QFileInfo *fi,
StringSet *paths
)
{
- QCString dirName = fi->absFilePath().utf8();
- if (paths && !dirName.isEmpty())
+ std::string dirName = fi->absFilePath();
+ if (paths && !dirName.empty())
{
- paths->insert(dirName.data());
+ paths->insert(dirName);
}
if (fi->isSymLink())
{
- dirName = resolveSymlink(dirName.data());
- if (dirName.isEmpty()) return 0; // recursive symlink
+ dirName = resolveSymlink(dirName);
+ if (dirName.empty()) return; // recursive symlink
std::lock_guard<std::mutex> lock(g_pathsVisitedMutex);
- if (g_pathsVisited.find(dirName.str())!=g_pathsVisited.end()) return 0; // already visited path
- g_pathsVisited.insert(dirName.str());
+ if (g_pathsVisited.find(dirName)!=g_pathsVisited.end()) return; // already visited path
+ g_pathsVisited.insert(dirName);
}
- QDir dir(dirName);
- dir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden );
- int totalSize=0;
- msg("Searching for files in directory %s\n", fi->absFilePath().data());
+ Dir dir(dirName);
+ msg("Searching for files in directory %s\n", qPrint(fi->absFilePath()));
//printf("killSet=%p count=%d\n",killSet,killSet ? (int)killSet->count() : -1);
- const QFileInfoList *list = dir.entryInfoList();
- if (list)
+ for (const auto &dirEntry : dir.iterator())
{
- QFileInfoListIterator it( *list );
- QFileInfo *cfi;
-
- while ((cfi=it.current()))
- {
- if (exclSet==0 || exclSet->find(cfi->absFilePath().utf8().data())==exclSet->end())
- { // file should not be excluded
- //printf("killSet->find(%s)\n",cfi->absFilePath().data());
- if (!cfi->exists() || !cfi->isReadable())
+ FileInfo cfi(dirEntry.path());
+ if (exclSet==0 || exclSet->find(cfi.absFilePath())==exclSet->end())
+ { // file should not be excluded
+ //printf("killSet->find(%s)\n",qPrint(cfi->absFilePath()));
+ if (!cfi.exists() || !cfi.isReadable())
+ {
+ if (errorIfNotExist)
{
- if (errorIfNotExist)
- {
- warn_uncond("source '%s' is not a readable file or directory... skipping.\n",cfi->absFilePath().data());
- }
+ warn_uncond("source '%s' is not a readable file or directory... skipping.\n",cfi.absFilePath().c_str());
}
- else if (cfi->isFile() &&
- (!Config_getBool(EXCLUDE_SYMLINKS) || !cfi->isSymLink()) &&
- (patList==0 || patternMatch(*cfi,*patList)) &&
- (exclPatList==0 || !patternMatch(*cfi,*exclPatList)) &&
- (killSet==0 || killSet->find(cfi->absFilePath().utf8().data())==killSet->end())
- )
+ }
+ else if (cfi.isFile() &&
+ (!Config_getBool(EXCLUDE_SYMLINKS) || !cfi.isSymLink()) &&
+ (patList==0 || patternMatch(cfi,*patList)) &&
+ (exclPatList==0 || !patternMatch(cfi,*exclPatList)) &&
+ (killSet==0 || killSet->find(cfi.absFilePath())==killSet->end())
+ )
+ {
+ std::string name=cfi.fileName();
+ if (fnMap)
{
- totalSize+=cfi->size()+cfi->absFilePath().length()+4;
- QCString name=cfi->fileName().utf8();
- //printf("New file %s\n",name.data());
- if (fnMap)
+ std::unique_ptr<FileDef> fd { createFileDef(QCString(cfi.dirPath()+"/"),QCString(name)) };
+ FileName *fn=0;
+ if (!name.empty())
{
- std::unique_ptr<FileDef> fd { createFileDef(cfi->dirPath().utf8()+"/",name) };
- FileName *fn=0;
- if (!name.isEmpty())
- {
- fn = fnMap->add(name,cfi->absFilePath().utf8());
- fn->push_back(std::move(fd));
- }
+ fn = fnMap->add(QCString(name),QCString(cfi.absFilePath()));
+ fn->push_back(std::move(fd));
}
- if (resultList) resultList->push_back(cfi->absFilePath().utf8().data());
- if (resultSet) resultSet->insert(cfi->absFilePath().utf8().data());
- if (killSet) killSet->insert(cfi->absFilePath().utf8().data());
- }
- else if (recursive &&
- (!Config_getBool(EXCLUDE_SYMLINKS) || !cfi->isSymLink()) &&
- cfi->isDir() &&
- (exclPatList==0 || !patternMatch(*cfi,*exclPatList)) &&
- cfi->fileName().at(0)!='.') // skip "." ".." and ".dir"
- {
- cfi->setFile(cfi->absFilePath());
- totalSize+=readDir(cfi,fnMap,exclSet,
- patList,exclPatList,resultList,resultSet,errorIfNotExist,
- recursive,killSet,paths);
}
+ if (resultList) resultList->push_back(cfi.absFilePath());
+ if (resultSet) resultSet->insert(cfi.absFilePath());
+ if (killSet) killSet->insert(cfi.absFilePath());
+ }
+ else if (recursive &&
+ (!Config_getBool(EXCLUDE_SYMLINKS) || !cfi.isSymLink()) &&
+ cfi.isDir() &&
+ (exclPatList==0 || !patternMatch(cfi,*exclPatList)) &&
+ cfi.fileName().at(0)!='.') // skip "." ".." and ".dir"
+ {
+ FileInfo acfi(cfi.absFilePath());
+ readDir(&acfi,fnMap,exclSet,
+ patList,exclPatList,resultList,resultSet,errorIfNotExist,
+ recursive,killSet,paths);
}
- ++it;
}
}
- return totalSize;
}
@@ -9742,7 +9936,7 @@ static int readDir(QFileInfo *fi,
// read a file or all files in a directory and append their contents to the
// input string. The names of the files are appended to the 'fiList' list.
-int readFileOrDirectory(const char *s,
+void readFileOrDirectory(const QCString &s,
FileNameLinkedMap *fnMap,
StringUnorderedSet *exclSet,
const StringVector *patList,
@@ -9757,69 +9951,61 @@ int readFileOrDirectory(const char *s,
{
//printf("killSet count=%d\n",killSet ? (int)killSet->size() : -1);
// strip trailing slashes
- if (s==0) return 0;
- QCString fs = s;
- char lc = fs.at(fs.length()-1);
- if (lc=='/' || lc=='\\') fs = fs.left(fs.length()-1);
+ if (s.isEmpty()) return;
- QFileInfo fi(fs);
+ FileInfo fi(s.str());
//printf("readFileOrDirectory(%s)\n",s);
- int totalSize=0;
{
- if (exclSet==0 || exclSet->find(fi.absFilePath().utf8().data())==exclSet->end())
+ if (exclSet==0 || exclSet->find(fi.absFilePath())==exclSet->end())
{
if (!fi.exists() || !fi.isReadable())
{
if (errorIfNotExist)
{
- warn_uncond("source '%s' is not a readable file or directory... skipping.\n",s);
+ warn_uncond("source '%s' is not a readable file or directory... skipping.\n",qPrint(s));
}
}
else if (!Config_getBool(EXCLUDE_SYMLINKS) || !fi.isSymLink())
{
if (fi.isFile())
{
- QCString dirPath = fi.dirPath(TRUE).utf8();
- QCString filePath = fi.absFilePath().utf8();
- if (paths && !dirPath.isEmpty())
+ std::string dirPath = fi.dirPath(true);
+ std::string filePath = fi.absFilePath();
+ if (paths && !dirPath.empty())
{
- paths->insert(dirPath.data());
+ paths->insert(dirPath);
}
- //printf("killSet.find(%s)=%d\n",fi.absFilePath().data(),killSet.find(fi.absFilePath())!=killSet.end());
- if (killSet==0 || killSet->find(filePath.data())==killSet->end())
+ //printf("killSet.find(%s)=%d\n",qPrint(fi.absFilePath()),killSet.find(fi.absFilePath())!=killSet.end());
+ if (killSet==0 || killSet->find(filePath)==killSet->end())
{
- totalSize+=fi.size()+fi.absFilePath().length()+4; //readFile(&fi,fiList,input);
- //fiList->inSort(new FileInfo(fi));
- QCString name=fi.fileName().utf8();
- //printf("New file %s\n",name.data());
+ std::string name=fi.fileName();
if (fnMap)
{
- std::unique_ptr<FileDef> fd { createFileDef(dirPath+"/",name) };
- if (!name.isEmpty())
+ std::unique_ptr<FileDef> fd { createFileDef(QCString(dirPath+"/"),QCString(name)) };
+ if (!name.empty())
{
- FileName *fn = fnMap->add(name,filePath);
+ FileName *fn = fnMap->add(QCString(name),QCString(filePath));
fn->push_back(std::move(fd));
}
}
if (resultList || resultSet)
{
- if (resultList) resultList->push_back(filePath.data());
- if (resultSet) resultSet->insert(filePath.data());
+ if (resultList) resultList->push_back(filePath);
+ if (resultSet) resultSet->insert(filePath);
}
- if (killSet) killSet->insert(fi.absFilePath().utf8().data());
+ if (killSet) killSet->insert(fi.absFilePath());
}
}
else if (fi.isDir()) // readable dir
{
- totalSize+=readDir(&fi,fnMap,exclSet,patList,
+ readDir(&fi,fnMap,exclSet,patList,
exclPatList,resultList,resultSet,errorIfNotExist,
recursive,killSet,paths);
}
}
}
}
- return totalSize;
}
//----------------------------------------------------------------------------
@@ -9838,7 +10024,7 @@ static void escapeAliases()
{
for (auto &kv : Doxygen::aliasMap)
{
- QCString value=kv.second;
+ QCString value(kv.second);
QCString newValue;
int in,p=0;
// for each \n in the alias command value
@@ -9872,7 +10058,7 @@ static void escapeAliases()
}
newValue+=value.mid(p,value.length()-p);
kv.second=newValue.str();
- //printf("Alias %s has value %s\n",adi.currentKey().data(),s->data());
+ //printf("Alias %s has value %s\n",kv.first.c_str(),qPrint(newValue));
}
}
@@ -9884,13 +10070,13 @@ void readAliases()
const StringVector &aliasList = Config_getList(ALIASES);
for (const auto &al : aliasList)
{
- QCString alias = al;
+ QCString alias(al);
int i=alias.find('=');
if (i>0)
{
QCString name=alias.left(i).stripWhiteSpace();
QCString value=alias.right(alias.length()-i-1);
- //printf("Alias: found name='%s' value='%s'\n",name.data(),value.data());
+ //printf("Alias: found name='%s' value='%s'\n",qPrint(name),qPrint(value));
if (!name.isEmpty())
{
auto it = Doxygen::aliasMap.find(name.str());
@@ -9911,7 +10097,7 @@ void readAliases()
//----------------------------------------------------------------------------
-static void dumpSymbol(FTextStream &t,Definition *d)
+static void dumpSymbol(TextStream &t,Definition *d)
{
QCString anchor;
if (d->definitionType()==Definition::TypeMember)
@@ -9930,15 +10116,15 @@ static void dumpSymbol(FTextStream &t,Definition *d)
<< d->name() << "','"
<< d->getDefFileName() << "','"
<< d->getDefLine()
- << "');" << endl;
+ << "');\n";
}
static void dumpSymbolMap()
{
- QFile f("symbols.sql");
- if (f.open(IO_WriteOnly))
+ std::ofstream f("symbols.sql",std::ofstream::out | std::ofstream::binary);
+ if (f.is_open())
{
- FTextStream t(&f);
+ TextStream t(&f);
for (const auto &kv : Doxygen::symbolMap)
{
dumpSymbol(t,kv.second);
@@ -9964,7 +10150,7 @@ static void devUsage()
static void version(const bool extended)
{
QCString versionString = getFullVersion();
- msg("%s\n",versionString.data());
+ msg("%s\n",qPrint(versionString));
if (extended)
{
QCString extVers;
@@ -9986,7 +10172,7 @@ static void version(const bool extended)
{
int lastComma = extVers.findRev(',');
if (lastComma != -1) extVers = extVers.replace(lastComma,1," and");
- msg(" with %s.\n",extVers.data());
+ msg(" with %s.\n",qPrint(extVers));
}
}
}
@@ -9994,33 +10180,33 @@ static void version(const bool extended)
//----------------------------------------------------------------------------
// print the usage of doxygen
-static void usage(const char *name,const char *versionString)
+static void usage(const QCString &name,const QCString &versionString)
{
- msg("Doxygen version %s\nCopyright Dimitri van Heesch 1997-2021\n\n",versionString);
+ msg("Doxygen version %s\nCopyright Dimitri van Heesch 1997-2021\n\n",qPrint(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);
+ msg(" %s [-s] -g [configName]\n\n",qPrint(name));
msg("2) Use doxygen to update an old configuration file:\n");
- msg(" %s [-s] -u [configName]\n\n",name);
+ msg(" %s [-s] -u [configName]\n\n",qPrint(name));
msg("3) Use doxygen to generate documentation using an existing ");
msg("configuration file:\n");
- msg(" %s [configName]\n\n",name);
+ msg(" %s [configName]\n\n",qPrint(name));
msg("4) Use doxygen to generate a template file controlling the layout of the\n");
msg(" generated documentation:\n");
- msg(" %s -l [layoutFileName]\n\n",name);
+ msg(" %s -l [layoutFileName]\n\n",qPrint(name));
msg(" In case layoutFileName is omitted layoutFileName.xml will be used as filename.\n");
msg(" If - is used for layoutFileName doxygen will write to standard output.\n\n");
msg("5) Use doxygen to generate a template style sheet file for RTF, HTML or Latex.\n");
- msg(" RTF: %s -w rtf styleSheetFile\n",name);
- msg(" HTML: %s -w html headerFile footerFile styleSheetFile [configFile]\n",name);
- msg(" LaTeX: %s -w latex headerFile footerFile styleSheetFile [configFile]\n\n",name);
+ msg(" RTF: %s -w rtf styleSheetFile\n",qPrint(name));
+ msg(" HTML: %s -w html headerFile footerFile styleSheetFile [configFile]\n",qPrint(name));
+ msg(" LaTeX: %s -w latex headerFile footerFile styleSheetFile [configFile]\n\n",qPrint(name));
msg("6) Use doxygen to generate a rtf extensions file\n");
- msg(" RTF: %s -e rtf extensionsFile\n\n",name);
+ msg(" RTF: %s -e rtf extensionsFile\n\n",qPrint(name));
msg(" If - is used for extensionsFile doxygen will write to standard output.\n\n");
msg("7) Use doxygen to compare the used configuration file with the template configuration file\n");
- msg(" %s -x [configFile]\n\n",name);
+ msg(" %s -x [configFile]\n\n",qPrint(name));
msg("8) Use doxygen to show a list of built-in emojis.\n");
- msg(" %s -f emoji outputFileName\n\n",name);
+ msg(" %s -f emoji outputFileName\n\n",qPrint(name));
msg(" If - is used for outputFileName doxygen will write to standard output.\n\n");
msg("If -s is specified the comments of the configuration items in the config file will be omitted.\n");
msg("If configName is omitted 'Doxyfile' will be used as a default.\n");
@@ -10048,9 +10234,9 @@ static const char *getArg(int argc,char **argv,int &optind)
class NullOutlineParser : public OutlineParserInterface
{
public:
- void parseInput(const char *, const char *,const std::shared_ptr<Entry> &, ClangTUParser*) {}
+ void parseInput(const QCString &file, const char *buf,const std::shared_ptr<Entry> &, ClangTUParser*) {}
bool needsPreprocessing(const QCString &) const { return FALSE; }
- void parsePrototype(const char *) {}
+ void parsePrototype(const QCString &) {}
};
@@ -10062,8 +10248,8 @@ template<class T> std::function< std::unique_ptr<T>() > make_parser_factory()
void initDoxygen()
{
initResources();
- const char *lang = Portable::getenv("LC_ALL");
- if (lang) Portable::setenv("LANG",lang);
+ QCString lang = Portable::getenv("LC_ALL");
+ if (!lang.isEmpty()) Portable::setenv("LANG",lang);
std::setlocale(LC_ALL,"");
std::setlocale(LC_CTYPE,"C"); // to get isspace(0xA0)==0, needed for UTF-8
std::setlocale(LC_NUMERIC,"C");
@@ -10110,6 +10296,7 @@ void initDoxygen()
Doxygen::namespaceLinkedMap = new NamespaceLinkedMap;
Doxygen::classLinkedMap = new ClassLinkedMap;
Doxygen::hiddenClassLinkedMap = new ClassLinkedMap;
+ Doxygen::conceptLinkedMap = new ConceptLinkedMap;
Doxygen::dirLinkedMap = new DirLinkedMap;
Doxygen::pageLinkedMap = new PageLinkedMap; // all doc pages
Doxygen::exampleLinkedMap = new PageLinkedMap; // all examples
@@ -10171,7 +10358,7 @@ void cleanUpDoxygen()
DotManager::deleteInstance();
}
-static int computeIdealCacheParam(uint v)
+static int computeIdealCacheParam(size_t v)
{
//printf("computeIdealCacheParam(v=%u)\n",v);
@@ -10180,7 +10367,7 @@ static int computeIdealCacheParam(uint v)
// r = log2(v)
// convert to a valid cache size value
- return QMAX(0,QMIN(r-16,9));
+ return std::max(0,std::min(r-16,9));
}
void readConfiguration(int argc, char **argv)
@@ -10192,11 +10379,11 @@ void readConfiguration(int argc, char **argv)
**************************************************************************/
int optind=1;
- const char *configName=0;
- const char *layoutName=0;
- const char *debugLabel;
- const char *formatName;
- const char *listName;
+ QCString configName;
+ QCString layoutName;
+ QCString debugLabel;
+ QCString formatName;
+ QCString listName;
bool genConfig=FALSE;
bool shortList=FALSE;
bool diffList=FALSE;
@@ -10227,7 +10414,7 @@ void readConfiguration(int argc, char **argv)
break;
case 'd':
debugLabel=getArg(argc,argv,optind);
- if (!debugLabel)
+ if (debugLabel.isEmpty())
{
devUsage();
cleanUpDoxygen();
@@ -10236,7 +10423,7 @@ void readConfiguration(int argc, char **argv)
retVal = Debug::setFlag(debugLabel);
if (!retVal)
{
- err("option \"-d\" has unknown debug specifier: \"%s\".\n",debugLabel);
+ err("option \"-d\" has unknown debug specifier: \"%s\".\n",qPrint(debugLabel));
devUsage();
cleanUpDoxygen();
exit(1);
@@ -10253,13 +10440,13 @@ void readConfiguration(int argc, char **argv)
break;
case 'e':
formatName=getArg(argc,argv,optind);
- if (!formatName)
+ if (formatName.isEmpty())
{
err("option \"-e\" is missing format specifier rtf.\n");
cleanUpDoxygen();
exit(1);
}
- if (qstricmp(formatName,"rtf")==0)
+ if (qstricmp(formatName.data(),"rtf")==0)
{
if (optind+1>=argc)
{
@@ -10267,10 +10454,11 @@ void readConfiguration(int argc, char **argv)
cleanUpDoxygen();
exit(1);
}
- QFile f;
+ std::ofstream f;
if (openOutputFile(argv[optind+1],f))
{
- RTFGenerator::writeExtensionsFile(f);
+ TextStream t(&f);
+ RTFGenerator::writeExtensionsFile(t);
}
cleanUpDoxygen();
exit(0);
@@ -10281,13 +10469,13 @@ void readConfiguration(int argc, char **argv)
break;
case 'f':
listName=getArg(argc,argv,optind);
- if (!listName)
+ if (listName.isEmpty())
{
err("option \"-f\" is missing list specifier.\n");
cleanUpDoxygen();
exit(1);
}
- if (qstricmp(listName,"emoji")==0)
+ if (qstricmp(listName.data(),"emoji")==0)
{
if (optind+1>=argc)
{
@@ -10295,10 +10483,11 @@ void readConfiguration(int argc, char **argv)
cleanUpDoxygen();
exit(1);
}
- QFile f;
+ std::ofstream f;
if (openOutputFile(argv[optind+1],f))
{
- EmojiEntityMapper::instance()->writeEmojiFile(f);
+ TextStream t(&f);
+ EmojiEntityMapper::instance()->writeEmojiFile(t);
}
cleanUpDoxygen();
exit(0);
@@ -10309,13 +10498,13 @@ void readConfiguration(int argc, char **argv)
break;
case 'w':
formatName=getArg(argc,argv,optind);
- if (!formatName)
+ if (formatName.isEmpty())
{
err("option \"-w\" is missing format specifier rtf, html or latex\n");
cleanUpDoxygen();
exit(1);
}
- if (qstricmp(formatName,"rtf")==0)
+ if (qstricmp(formatName.data(),"rtf")==0)
{
if (optind+1>=argc)
{
@@ -10323,18 +10512,19 @@ void readConfiguration(int argc, char **argv)
cleanUpDoxygen();
exit(1);
}
- QFile f;
+ std::ofstream f;
if (openOutputFile(argv[optind+1],f))
{
- RTFGenerator::writeStyleSheetFile(f);
+ TextStream t(&f);
+ RTFGenerator::writeStyleSheetFile(t);
}
cleanUpDoxygen();
exit(1);
}
- else if (qstricmp(formatName,"html")==0)
+ else if (qstricmp(formatName.data(),"html")==0)
{
Config::init();
- if (optind+4<argc || QFileInfo("Doxyfile").exists())
+ if (optind+4<argc || FileInfo("Doxyfile").exists())
// explicit config file mentioned or default found on disk
{
QCString df = optind+4<argc ? argv[optind+4] : QCString("Doxyfile");
@@ -10357,31 +10547,34 @@ void readConfiguration(int argc, char **argv)
QCString outputLanguage=Config_getEnum(OUTPUT_LANGUAGE);
if (!setTranslator(outputLanguage))
{
- warn_uncond("Output language %s not supported! Using English instead.\n", outputLanguage.data());
+ warn_uncond("Output language %s not supported! Using English instead.\n", qPrint(outputLanguage));
}
- QFile f;
+ std::ofstream f;
if (openOutputFile(argv[optind+1],f))
{
- HtmlGenerator::writeHeaderFile(f, argv[optind+3]);
+ TextStream t(&f);
+ HtmlGenerator::writeHeaderFile(t, argv[optind+3]);
}
f.close();
if (openOutputFile(argv[optind+2],f))
{
- HtmlGenerator::writeFooterFile(f);
+ TextStream t(&f);
+ HtmlGenerator::writeFooterFile(t);
}
f.close();
if (openOutputFile(argv[optind+3],f))
{
- HtmlGenerator::writeStyleSheetFile(f);
+ TextStream t(&f);
+ HtmlGenerator::writeStyleSheetFile(t);
}
cleanUpDoxygen();
exit(0);
}
- else if (qstricmp(formatName,"latex")==0)
+ else if (qstricmp(formatName.data(),"latex")==0)
{
Config::init();
- if (optind+4<argc || QFileInfo("Doxyfile").exists())
+ if (optind+4<argc || FileInfo("Doxyfile").exists())
{
QCString df = optind+4<argc ? argv[optind+4] : QCString("Doxyfile");
if (!Config::parse(df))
@@ -10403,30 +10596,33 @@ void readConfiguration(int argc, char **argv)
QCString outputLanguage=Config_getEnum(OUTPUT_LANGUAGE);
if (!setTranslator(outputLanguage))
{
- warn_uncond("Output language %s not supported! Using English instead.\n", outputLanguage.data());
+ warn_uncond("Output language %s not supported! Using English instead.\n", qPrint(outputLanguage));
}
- QFile f;
+ std::ofstream f;
if (openOutputFile(argv[optind+1],f))
{
- LatexGenerator::writeHeaderFile(f);
+ TextStream t(&f);
+ LatexGenerator::writeHeaderFile(t);
}
f.close();
if (openOutputFile(argv[optind+2],f))
{
- LatexGenerator::writeFooterFile(f);
+ TextStream t(&f);
+ LatexGenerator::writeFooterFile(t);
}
f.close();
if (openOutputFile(argv[optind+3],f))
{
- LatexGenerator::writeStyleSheetFile(f);
+ TextStream t(&f);
+ LatexGenerator::writeStyleSheetFile(t);
}
cleanUpDoxygen();
exit(0);
}
else
{
- err("Illegal format specifier \"%s\": should be one of rtf, html or latex\n",formatName);
+ err("Illegal format specifier \"%s\": should be one of rtf, html or latex\n",qPrint(formatName));
cleanUpDoxygen();
exit(1);
}
@@ -10499,7 +10695,7 @@ void readConfiguration(int argc, char **argv)
Config::init();
- QFileInfo configFileInfo1("Doxyfile"),configFileInfo2("doxyfile");
+ FileInfo configFileInfo1("Doxyfile"),configFileInfo2("doxyfile");
if (optind>=argc)
{
if (configFileInfo1.exists())
@@ -10523,7 +10719,7 @@ void readConfiguration(int argc, char **argv)
}
else
{
- QFileInfo fi(argv[optind]);
+ FileInfo fi(argv[optind]);
if (fi.exists() || qstrcmp(argv[optind],"-")==0 || genConfig)
{
configName=argv[optind];
@@ -10552,7 +10748,7 @@ void readConfiguration(int argc, char **argv)
if (!Config::parse(configName,updateConfig))
{
- err("could not open or read configuration file %s!\n",configName);
+ err("could not open or read configuration file %s!\n",qPrint(configName));
cleanUpDoxygen();
exit(1);
}
@@ -10572,8 +10768,8 @@ void readConfiguration(int argc, char **argv)
}
/* Perlmod wants to know the path to the config file.*/
- QFileInfo configFileInfo(configName);
- setPerlModDoxyfile(configFileInfo.absFilePath().data());
+ FileInfo configFileInfo(configName.str());
+ setPerlModDoxyfile(configFileInfo.absFilePath());
}
@@ -10602,7 +10798,7 @@ void adjustConfiguration()
if (!setTranslator(outputLanguage))
{
warn_uncond("Output language %s not supported! Using English instead.\n",
- outputLanguage.data());
+ qPrint(outputLanguage));
}
/* Set the global html file extension. */
@@ -10640,12 +10836,12 @@ void adjustConfiguration()
{
err("Failed to map file extension '%s' to unsupported language '%s'.\n"
"Check the EXTENSION_MAPPING setting in the config file.\n",
- ext.data(),language.data());
+ qPrint(ext),qPrint(language));
}
else
{
msg("Adding custom extension mapping: '%s' will be treated as language '%s'\n",
- ext.data(),language.data());
+ qPrint(ext),qPrint(language));
}
}
}
@@ -10670,11 +10866,11 @@ void adjustConfiguration()
#ifdef HAS_SIGNALS
static void stopDoxygen(int)
{
- QDir thisDir;
+ Dir thisDir;
msg("Cleaning up...\n");
if (!Doxygen::filterDBFileName.isEmpty())
{
- thisDir.remove(Doxygen::filterDBFileName);
+ thisDir.remove(Doxygen::filterDBFileName.str());
}
killpg(0,SIGINT);
exit(1);
@@ -10686,22 +10882,22 @@ static void writeTagFile()
QCString generateTagFile = Config_getString(GENERATE_TAGFILE);
if (generateTagFile.isEmpty()) return;
- QFile tag(generateTagFile);
- if (!tag.open(IO_WriteOnly))
+ std::ofstream f(generateTagFile.str(),std::ofstream::out | std::ofstream::binary);
+ if (!f.is_open())
{
err("cannot open tag file %s for writing\n",
- generateTagFile.data()
+ qPrint(generateTagFile)
);
return;
}
- FTextStream tagFile(&tag);
- tagFile << "<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>" << endl;
+ TextStream tagFile(&f);
+ tagFile << "<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\n";
tagFile << "<tagfile doxygen_version=\"" << getDoxygenVersion() << "\"";
if (strlen(getGitVersion())>0)
{
tagFile << " doxygen_gitid=\"" << getGitVersion() << "\"";
}
- tagFile << ">" << endl;
+ tagFile << ">\n";
// for each file
for (const auto &fn : *Doxygen::inputNameLinkedMap)
@@ -10720,6 +10916,15 @@ static void writeTagFile()
cdm->writeTagFile(tagFile);
}
}
+ // for each concept
+ for (const auto &cd : *Doxygen::conceptLinkedMap)
+ {
+ ConceptDefMutable *cdm = toConceptDefMutable(cd.get());
+ if (cdm && cdm->isLinkableInProject())
+ {
+ cdm->writeTagFile(tagFile);
+ }
+ }
// for each namespace
for (const auto &nd : *Doxygen::namespaceLinkedMap)
{
@@ -10741,38 +10946,18 @@ static void writeTagFile()
}
if (Doxygen::mainPage) Doxygen::mainPage->writeTagFile(tagFile);
- /*
- if (Doxygen::mainPage && !Config_getString(GENERATE_TAGFILE).isEmpty())
- {
- tagFile << " <compound kind=\"page\">" << endl
- << " <name>"
- << convertToXML(Doxygen::mainPage->name())
- << "</name>" << endl
- << " <title>"
- << convertToXML(Doxygen::mainPage->title())
- << "</title>" << endl
- << " <filename>"
- << convertToXML(Doxygen::mainPage->getOutputFileBase())
- << Doxygen::htmlFileExtension
- << "</filename>" << endl;
-
- mainPage->writeDocAnchorsToTagFile();
- tagFile << " </compound>" << endl;
- }
- */
-
- tagFile << "</tagfile>" << endl;
+ tagFile << "</tagfile>\n";
}
static void exitDoxygen()
{
if (!g_successfulRun) // premature exit
{
- QDir thisDir;
+ Dir thisDir;
msg("Exiting...\n");
if (!Doxygen::filterDBFileName.isEmpty())
{
- thisDir.remove(Doxygen::filterDBFileName);
+ thisDir.remove(Doxygen::filterDBFileName.str());
}
}
}
@@ -10788,12 +10973,12 @@ static QCString createOutputDirectory(const QCString &baseDirName,
}
else if (formatDirName[0]!='/' && (formatDirName.length()==1 || formatDirName[1]!=':'))
{
- result.prepend(baseDirName+'/');
+ result.prepend(baseDirName+"/");
}
- QDir formatDir(result);
- if (!formatDir.exists() && !formatDir.mkdir(result))
+ Dir formatDir(result.str());
+ if (!formatDir.exists() && !formatDir.mkdir(result.str()))
{
- err("Could not create output directory %s\n", result.data());
+ err("Could not create output directory %s\n", qPrint(result));
cleanUpDoxygen();
exit(1);
}
@@ -11007,7 +11192,7 @@ void parseInput()
// we would like to show the versionString earlier, but we first have to handle the configuration file
// to know the value of the QUIET setting.
QCString versionString = getFullVersion();
- msg("Doxygen version used: %s\n",versionString.data());
+ msg("Doxygen version used: %s\n",qPrint(versionString));
/**************************************************************************
* Make sure the output directory exists
@@ -11015,29 +11200,29 @@ void parseInput()
QCString outputDirectory = Config_getString(OUTPUT_DIRECTORY);
if (outputDirectory.isEmpty())
{
- outputDirectory = Config_updateString(OUTPUT_DIRECTORY,QDir::currentDirPath().utf8());
+ outputDirectory = Config_updateString(OUTPUT_DIRECTORY,Dir::currentDirPath().c_str());
}
else
{
- QDir dir(outputDirectory);
+ Dir dir(outputDirectory.str());
if (!dir.exists())
{
- dir.setPath(QDir::currentDirPath());
- if (!dir.mkdir(outputDirectory))
+ dir.setPath(Dir::currentDirPath());
+ if (!dir.mkdir(outputDirectory.str()))
{
err("tag OUTPUT_DIRECTORY: Output directory '%s' does not "
- "exist and cannot be created\n",outputDirectory.data());
+ "exist and cannot be created\n",qPrint(outputDirectory));
cleanUpDoxygen();
exit(1);
}
else
{
msg("Notice: Output directory '%s' does not exist. "
- "I have created it for you.\n", outputDirectory.data());
+ "I have created it for you.\n", qPrint(outputDirectory));
}
- dir.cd(outputDirectory);
+ dir.setPath(outputDirectory.str());
}
- outputDirectory = Config_updateString(OUTPUT_DIRECTORY,dir.absPath().utf8());
+ outputDirectory = Config_updateString(OUTPUT_DIRECTORY,dir.absPath().c_str());
}
/**************************************************************************
@@ -11133,11 +11318,11 @@ void parseInput()
newFontPath+=Portable::pathListSeparator();
newFontPath+=curFontPath;
}
- Portable::setenv("DOTFONTPATH",newFontPath);
+ Portable::setenv("DOTFONTPATH",qPrint(newFontPath));
}
else
{
- Portable::setenv("DOTFONTPATH",curFontPath);
+ Portable::setenv("DOTFONTPATH",qPrint(curFontPath));
}
}
@@ -11156,15 +11341,15 @@ void parseInput()
defaultLayoutUsed = TRUE;
}
- QFile layoutFile(layoutFileName);
- if (layoutFile.open(IO_ReadOnly))
+ FileInfo fi(layoutFileName.str());
+ if (fi.exists())
{
- msg("Parsing layout file %s...\n",layoutFileName.data());
+ msg("Parsing layout file %s...\n",qPrint(layoutFileName));
LayoutDocManager::instance().parse(layoutFileName);
}
else if (!defaultLayoutUsed)
{
- warn_uncond("failed to open layout file '%s' for reading!\n",layoutFileName.data());
+ warn_uncond("failed to open layout file '%s' for reading!\n",qPrint(layoutFileName));
}
/**************************************************************************
@@ -11173,12 +11358,12 @@ void parseInput()
// prevent search in the output directories
StringVector exclPatterns = Config_getList(EXCLUDE_PATTERNS);
- if (generateHtml) exclPatterns.push_back(htmlOutput.data());
- if (generateDocbook) exclPatterns.push_back(docbookOutput.data());
- if (generateXml) exclPatterns.push_back(xmlOutput.data());
- if (generateLatex) exclPatterns.push_back(latexOutput.data());
- if (generateRtf) exclPatterns.push_back(rtfOutput.data());
- if (generateMan) exclPatterns.push_back(manOutput.data());
+ if (generateHtml) exclPatterns.push_back(htmlOutput.str());
+ if (generateDocbook) exclPatterns.push_back(docbookOutput.str());
+ if (generateXml) exclPatterns.push_back(xmlOutput.str());
+ if (generateLatex) exclPatterns.push_back(latexOutput.str());
+ if (generateRtf) exclPatterns.push_back(rtfOutput.str());
+ if (generateMan) exclPatterns.push_back(manOutput.str());
Config_updateList(EXCLUDE_PATTERNS,exclPatterns);
searchInputFiles();
@@ -11266,6 +11451,10 @@ void parseInput()
buildClassList(root.get());
g_s.end();
+ g_s.begin("Building concept list...\n");
+ buildConceptList(root.get());
+ g_s.end();
+
// build list of using declarations here (global list)
buildListOfUsingDecls(root.get());
g_s.end();
@@ -11285,6 +11474,11 @@ void parseInput()
g_s.begin("Associating documentation with classes...\n");
buildClassDocList(root.get());
+ g_s.end();
+
+ g_s.begin("Associating documentation with concepts...\n");
+ buildConceptDocList(root.get());
+ g_s.end();
g_s.begin("Building example list...\n");
buildExampleList(root.get());
@@ -11413,8 +11607,8 @@ void parseInput()
auto memberNameComp = [](const MemberNameLinkedMap::Ptr &n1,const MemberNameLinkedMap::Ptr &n2)
{
- return qstricmp(n1->memberName()+getPrefixIndex(n1->memberName()),
- n2->memberName()+getPrefixIndex(n2->memberName())
+ return qstricmp(n1->memberName().data()+getPrefixIndex(n1->memberName()),
+ n2->memberName().data()+getPrefixIndex(n2->memberName())
)<0;
};
@@ -11436,6 +11630,11 @@ void parseInput()
return qstricmp(n1->name(),n2->name())<0;
};
+ auto conceptComp = [](const ConceptLinkedMap::Ptr &c1,const ConceptLinkedMap::Ptr &c2)
+ {
+ return qstricmp(c1->name(),c2->name())<0;
+ };
+
g_s.begin("Sorting lists...\n");
std::sort(Doxygen::memberNameLinkedMap->begin(),
Doxygen::memberNameLinkedMap->end(),
@@ -11449,13 +11648,14 @@ void parseInput()
std::sort(Doxygen::classLinkedMap->begin(),
Doxygen::classLinkedMap->end(),
classComp);
+ std::sort(Doxygen::conceptLinkedMap->begin(),
+ Doxygen::conceptLinkedMap->end(),
+ conceptComp);
std::sort(Doxygen::namespaceLinkedMap->begin(),
Doxygen::namespaceLinkedMap->end(),
namespaceComp);
g_s.end();
- QDir thisDir;
-
g_s.begin("Determining which enums are documented\n");
findDocumentedEnumValues();
g_s.end();
@@ -11566,7 +11766,7 @@ void parseInput()
std::sort(Doxygen::groupLinkedMap->begin(),
Doxygen::groupLinkedMap->end(),
[](const auto &g1,const auto &g2)
- { return qstrcmp(g1->groupTitle(),g2->groupTitle())<0; });
+ { return g1->groupTitle() < g2->groupTitle(); });
for (const auto &gd : *Doxygen::groupLinkedMap)
{
@@ -11675,11 +11875,11 @@ void generateOutput()
if (generateHtml && searchEngine)
{
QCString searchDirName = Config_getString(HTML_OUTPUT)+"/search";
- QDir searchDir(searchDirName);
- if (!searchDir.exists() && !searchDir.mkdir(searchDirName))
+ Dir searchDir(searchDirName.str());
+ if (!searchDir.exists() && !searchDir.mkdir(searchDirName.str()))
{
term("Could not create search results directory '%s' $PWD='%s'\n",
- searchDirName.data(),QDir::currentDirPath().data());
+ qPrint(searchDirName),Dir::currentDirPath().c_str());
}
HtmlGenerator::writeSearchData(searchDirName);
if (!serverBasedSearch) // client side search index
@@ -11738,6 +11938,10 @@ void generateOutput()
generateClassDocs();
g_s.end();
+ g_s.begin("Generating concept documentation...\n");
+ generateConceptDocs();
+ g_s.end();
+
g_s.begin("Generating namespace index...\n");
generateNamespaceDocs();
g_s.end();
@@ -11811,7 +12015,7 @@ void generateOutput()
{
searchDataFile="searchdata.xml";
}
- if (!Portable::isAbsolutePath(searchDataFile))
+ if (!Portable::isAbsolutePath(searchDataFile.data()))
{
searchDataFile.prepend(Config_getString(OUTPUT_DIRECTORY)+"/");
}
@@ -11877,16 +12081,16 @@ void generateOutput()
!Config_getString(HHC_LOCATION).isEmpty())
{
g_s.begin("Running html help compiler...\n");
- QString oldDir = QDir::currentDirPath();
- QDir::setCurrent(Config_getString(HTML_OUTPUT));
+ std::string oldDir = Dir::currentDirPath();
+ Dir::setCurrent(Config_getString(HTML_OUTPUT).str());
Portable::setShortDir();
Portable::sysTimerStart();
- if (Portable::system(Config_getString(HHC_LOCATION), "index.hhp", Debug::isFlagSet(Debug::ExtCmd))!=1)
+ if (Portable::system(Config_getString(HHC_LOCATION).data(), "index.hhp", Debug::isFlagSet(Debug::ExtCmd))!=1)
{
err("failed to run html help compiler on index.hhp\n");
}
Portable::sysTimerStop();
- QDir::setCurrent(oldDir);
+ Dir::setCurrent(oldDir);
g_s.end();
}
@@ -11897,19 +12101,19 @@ void generateOutput()
!Config_getString(QHG_LOCATION).isEmpty())
{
g_s.begin("Running qhelpgenerator...\n");
- QCString const qhpFileName = Qhp::getQhpFileName();
- QCString const qchFileName = getQchFileName();
+ QCString qhpFileName = Qhp::getQhpFileName();
+ QCString qchFileName = getQchFileName();
- QCString const args = QCString().sprintf("%s -o \"%s\"", qhpFileName.data(), qchFileName.data());
- QString const oldDir = QDir::currentDirPath();
- QDir::setCurrent(Config_getString(HTML_OUTPUT));
+ QCString args = QCString().sprintf("%s -o \"%s\"", qPrint(qhpFileName), qPrint(qchFileName));
+ std::string oldDir = Dir::currentDirPath();
+ Dir::setCurrent(Config_getString(HTML_OUTPUT).str());
Portable::sysTimerStart();
- if (Portable::system(Config_getString(QHG_LOCATION), args.data(), FALSE))
+ if (Portable::system(Config_getString(QHG_LOCATION).data(), args.data(), FALSE))
{
err("failed to run qhelpgenerator on index.qhp\n");
}
Portable::sysTimerStop();
- QDir::setCurrent(oldDir);
+ Dir::setCurrent(oldDir);
g_s.end();
}
@@ -11919,7 +12123,7 @@ void generateOutput()
Doxygen::lookupCache->capacity(),
Doxygen::lookupCache->hits(),
Doxygen::lookupCache->misses());
- cacheParam = computeIdealCacheParam(Doxygen::lookupCache->misses()*2/3); // part of the cache is flushed, hence the 2/3 correction factor
+ cacheParam = computeIdealCacheParam(static_cast<size_t>(Doxygen::lookupCache->misses()*2/3)); // part of the cache is flushed, hence the 2/3 correction factor
if (cacheParam>Config_getInt(LOOKUP_CACHE_SIZE))
{
msg("Note: based on cache misses the ideal setting for LOOKUP_CACHE_SIZE is %d at the cost of higher memory usage.\n",cacheParam);
@@ -11946,8 +12150,8 @@ void generateOutput()
cleanUpDoxygen();
finalizeSearchIndexer();
- QDir thisDir;
- thisDir.remove(Doxygen::filterDBFileName);
+ Dir thisDir;
+ thisDir.remove(Doxygen::filterDBFileName.str());
finishWarnExit();
Config::deinit();
delete Doxygen::clangUsrMap;
diff --git a/src/doxygen.h b/src/doxygen.h
index 227efcc..3cc6934 100644
--- a/src/doxygen.h
+++ b/src/doxygen.h
@@ -17,7 +17,6 @@
#define DOXYGEN_H
#include "containers.h"
-#include "ftextstream.h"
#include "membergroup.h"
#include "dirdef.h"
#include "memberlist.h"
@@ -34,7 +33,6 @@ class PageLinkedMap;
class PageDef;
class SearchIndexIntf;
class ParserManager;
-class QFileInfo;
class BufStr;
class CiteDict;
class MemberDef;
@@ -43,6 +41,7 @@ class GroupLinkedMap;
class FileDef;
class ClassDef;
class ClassLinkedMap;
+class ConceptLinkedMap;
class MemberNameLinkedMap;
class FileNameLinkedMap;
class NamespaceLinkedMap;
@@ -78,6 +77,7 @@ class Doxygen
public:
static ClassLinkedMap *classLinkedMap;
static ClassLinkedMap *hiddenClassLinkedMap;
+ static ConceptLinkedMap *conceptLinkedMap;
static PageLinkedMap *exampleLinkedMap;
static PageLinkedMap *pageLinkedMap;
static std::unique_ptr<PageDef> mainPage;
@@ -130,7 +130,7 @@ void generateOutput();
void readAliases();
void readFormulaRepository(QCString dir, bool cmp = FALSE);
void cleanUpDoxygen();
-int readFileOrDirectory(const char *s,
+void readFileOrDirectory(const QCString &s,
FileNameLinkedMap *fnDict,
StringUnorderedSet *exclSet,
const StringVector *patList,
diff --git a/src/eclipsehelp.cpp b/src/eclipsehelp.cpp
index bbb3b01..b2f8193 100644
--- a/src/eclipsehelp.cpp
+++ b/src/eclipsehelp.cpp
@@ -3,8 +3,8 @@
* Copyright (C) 1997-2015 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
- * documentation under the terms of the GNU General Public License is hereby
- * granted. No representations are made about the suitability of this software
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
@@ -17,13 +17,12 @@
#include "config.h"
#include "message.h"
#include "doxygen.h"
-#include <qfile.h>
-EclipseHelp::EclipseHelp() : m_depth(0), m_endtag(FALSE), m_openTags(0), m_tocfile(0)
+EclipseHelp::EclipseHelp() : m_depth(0), m_endtag(FALSE), m_openTags(0)
{
}
-EclipseHelp::~EclipseHelp()
+EclipseHelp::~EclipseHelp()
{
}
@@ -38,18 +37,18 @@ void EclipseHelp::indent()
void EclipseHelp::closedTag()
{
- if (m_endtag)
+ if (m_endtag)
{
- m_tocstream << "/>" << endl;
+ m_tocstream << "/>\n";
m_endtag = FALSE;
}
}
void EclipseHelp::openedTag()
{
- if (m_endtag)
+ if (m_endtag)
{
- m_tocstream << ">" << endl;
+ m_tocstream << ">\n";
m_endtag = FALSE;
++m_openTags;
}
@@ -61,33 +60,29 @@ void EclipseHelp::openedTag()
* This method opens the XML TOC file and writes headers of the files.
* \sa finalize()
*/
-void EclipseHelp::initialize()
+void EclipseHelp::initialize()
{
// -- read path prefix from the configuration
//m_pathprefix = Config_getString(ECLIPSE_PATHPREFIX);
//if (m_pathprefix.isEmpty()) m_pathprefix = "html/";
- // -- open the contents file
+ // -- open the contents file
QCString name = Config_getString(HTML_OUTPUT) + "/toc.xml";
- m_tocfile = new QFile(name);
- if (!m_tocfile->open(IO_WriteOnly))
+ m_tocstream.open(name.str(), std::ofstream::out | std::ofstream::binary);
+ if (!m_tocstream.is_open())
{
- term("Could not open file %s for writing\n", name.data());
+ term("Could not open file %s for writing\n", qPrint(name));
}
- // -- initialize its text stream
- m_tocstream.setDevice(m_tocfile);
- //m_tocstream.setEncoding(FTextStream::UnicodeUTF8);
-
// -- write the opening tag
QCString title = Config_getString(PROJECT_NAME);
if (title.isEmpty())
{
title = "Doxygen generated documentation";
}
- m_tocstream << "<toc label=\"" << convertToXML(title)
- << "\" topic=\"" << convertToXML(m_pathprefix)
- << "index" << Doxygen::htmlFileExtension << "\">" << endl;
+ m_tocstream << "<toc label=\"" << convertToXML(title)
+ << "\" topic=\"" << convertToXML(m_pathprefix)
+ << "index" << Doxygen::htmlFileExtension << "\">\n";
++ m_depth;
}
@@ -97,38 +92,35 @@ void EclipseHelp::initialize()
* This method writes footers of the files and closes them.
* \sa initialize()
*/
-void EclipseHelp::finalize()
+void EclipseHelp::finalize()
{
closedTag(); // -- close previous tag
- // -- write ending tag
+ // -- write ending tag
--m_depth;
- m_tocstream << "</toc>" << endl;
+ m_tocstream << "</toc>\n";
// -- close the content file
- m_tocstream.unsetDevice();
- m_tocfile->close();
- delete m_tocfile; m_tocfile = 0;
+ m_tocstream.close();
QCString name = Config_getString(HTML_OUTPUT) + "/plugin.xml";
- QFile pluginFile(name);
- if (pluginFile.open(IO_WriteOnly))
+ std::ofstream t(name.str(),std::ofstream::out | std::ofstream::binary);
+ if (t.is_open())
{
QCString docId = Config_getString(ECLIPSE_DOC_ID);
- FTextStream t(&pluginFile);
- t << "<plugin name=\"" << docId << "\" id=\"" << docId << "\"" << endl;
- t << " version=\"1.0.0\" provider-name=\"Doxygen\">" << endl;
- t << " <extension point=\"org.eclipse.help.toc\">" << endl;
- t << " <toc file=\"toc.xml\" primary=\"true\" />" << endl;
- t << " </extension>" << endl;
- t << "</plugin>" << endl;
+ t << "<plugin name=\"" << docId << "\" id=\"" << docId << "\"\n";
+ t << " version=\"1.0.0\" provider-name=\"Doxygen\">\n";
+ t << " <extension point=\"org.eclipse.help.toc\">\n";
+ t << " <toc file=\"toc.xml\" primary=\"true\" />\n";
+ t << " </extension>\n";
+ t << "</plugin>\n";
}
}
/*!
* \brief Increase the level of content hierarchy
*/
-void EclipseHelp::incContentsDepth()
+void EclipseHelp::incContentsDepth()
{
openedTag();
++m_depth;
@@ -139,7 +131,7 @@ void EclipseHelp::incContentsDepth()
*
* It closes currently opened topic tag.
*/
-void EclipseHelp::decContentsDepth()
+void EclipseHelp::decContentsDepth()
{
// -- end of the opened topic
closedTag();
@@ -149,7 +141,7 @@ void EclipseHelp::decContentsDepth()
{
--m_openTags;
indent();
- m_tocstream << "</topic>" << endl;
+ m_tocstream << "</topic>\n";
}
}
@@ -167,18 +159,18 @@ void EclipseHelp::decContentsDepth()
*/
void EclipseHelp::addContentsItem(
bool /* isDir */,
- const char *name,
- const char * /* ref */,
- const char *file,
- const char *anchor,
+ const QCString &name,
+ const QCString & /* ref */,
+ const QCString &file,
+ const QCString &anchor,
bool /* separateIndex */,
bool /* addToNavIndex */,
- const Definition * /*def*/)
+ const Definition * /*def*/)
{
- // -- write the topic tag
+ // -- write the topic tag
closedTag();
- if (file)
- {
+ if (!file.isEmpty())
+ {
switch (file[0]) // check for special markers (user defined URLs)
{
case '^':
@@ -195,9 +187,9 @@ void EclipseHelp::addContentsItem(
default:
indent();
m_tocstream << "<topic label=\"" << convertToXML(name) << "\"";
- m_tocstream << " href=\"" << convertToXML(m_pathprefix)
+ m_tocstream << " href=\"" << convertToXML(m_pathprefix)
<< file << Doxygen::htmlFileExtension;
- if (anchor)
+ if (!anchor.isEmpty())
{
m_tocstream << "#" << anchor;
}
@@ -217,20 +209,20 @@ void EclipseHelp::addContentsItem(
void EclipseHelp::addIndexItem(
const Definition * /* context */,
const MemberDef * /* md */,
- const char * /* sectionAnchor */,
- const char * /* title */)
+ const QCString & /* sectionAnchor */,
+ const QCString & /* title */)
{
}
-void EclipseHelp::addIndexFile(const char * /* name */)
+void EclipseHelp::addIndexFile(const QCString & /* name */)
{
}
-void EclipseHelp::addImageFile(const char * /* name */)
+void EclipseHelp::addImageFile(const QCString & /* name */)
{
}
-void EclipseHelp::addStyleSheetFile(const char * /* name */)
+void EclipseHelp::addStyleSheetFile(const QCString & /* name */)
{
}
diff --git a/src/eclipsehelp.h b/src/eclipsehelp.h
index 5d63768..1ba4df4 100644
--- a/src/eclipsehelp.h
+++ b/src/eclipsehelp.h
@@ -1,12 +1,12 @@
/******************************************************************************
*
- *
+ *
*
* Copyright (C) 1997-2015 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
- * documentation under the terms of the GNU General Public License is hereby
- * granted. No representations are made about the suitability of this software
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
@@ -24,11 +24,11 @@
#ifndef ECLIPSEHELP_H
#define ECLIPSEHELP_H
+#include <fstream>
+
#include "index.h"
-#include "ftextstream.h"
/* -- forward declarations */
-class QFile;
class Definition;
/** Generator for Eclipse help files.
@@ -37,7 +37,7 @@ class Definition;
* These files can be used to generate a help plugin readable
* by the Eclipse IDE.
*/
-class EclipseHelp : public IndexIntf
+class EclipseHelp : public IndexIntf
{
public:
EclipseHelp();
@@ -48,22 +48,21 @@ class EclipseHelp : public IndexIntf
virtual void finalize();
virtual void incContentsDepth();
virtual void decContentsDepth();
- virtual void addContentsItem(bool isDir, const char *name, const char *ref,
- const char *file, const char *anchor,bool separateIndex,bool addToNavIndex,
+ virtual void addContentsItem(bool isDir, const QCString &name, const QCString &ref,
+ const QCString &file, const QCString &anchor,bool separateIndex,bool addToNavIndex,
const Definition *def);
virtual void addIndexItem(const Definition *context,const MemberDef *md,
- const char *sectionAnchor,const char *title);
- virtual void addIndexFile(const char *name);
- virtual void addImageFile(const char *name);
- virtual void addStyleSheetFile(const char *name);
+ const QCString &sectionAnchor,const QCString &title);
+ virtual void addIndexFile(const QCString &name);
+ virtual void addImageFile(const QCString &name);
+ virtual void addStyleSheetFile(const QCString &name);
private:
int m_depth;
bool m_endtag;
int m_openTags;
- QFile * m_tocfile;
- FTextStream m_tocstream;
+ std::ofstream m_tocstream;
QCString m_pathprefix;
/* -- avoid copying */
diff --git a/src/emoji.cpp b/src/emoji.cpp
index a8a2bb8..d723f64 100644
--- a/src/emoji.cpp
+++ b/src/emoji.cpp
@@ -15,8 +15,8 @@
#include "emoji.h"
#include "message.h"
-#include "ftextstream.h"
#include "util.h"
+#include "textstream.h"
static struct emojiEntityInfo
{
@@ -1555,21 +1555,20 @@ void EmojiEntityMapper::deleteInstance()
* @return the code for the requested Emoji entity name,
* in case the requested Emoji item does not exist `-1` is returned.
*/
-int EmojiEntityMapper::symbol2index(const QCString &symName) const
+int EmojiEntityMapper::symbol2index(const std::string &symName) const
{
- auto it = m_name2symGh.find(symName.str());
+ auto it = m_name2symGh.find(symName);
return it!=m_name2symGh.end() ? it->second : -1;
}
/*!
* @brief Writes the list of supported emojis to the given file.
*/
-void EmojiEntityMapper::writeEmojiFile(QFile &file)
+void EmojiEntityMapper::writeEmojiFile(TextStream &t)
{
- FTextStream t(&file);
for (int i = 0; i < g_numEmojiEntities; i++)
{
- t << g_emojiEntities[i].name << endl;
+ t << g_emojiEntities[i].name << "\n";
}
}
diff --git a/src/emoji.h b/src/emoji.h
index b27b761..7ec2519 100644
--- a/src/emoji.h
+++ b/src/emoji.h
@@ -18,9 +18,7 @@
#include <map>
#include <string>
-#include <qfile.h>
-
-class FTextStream;
+class TextStream;
/** @brief Singleton helper class to map emoji entities to other formats */
class EmojiEntityMapper
@@ -30,8 +28,8 @@ class EmojiEntityMapper
static void deleteInstance();
const char *name(int index) const;
const char *unicode(int index) const;
- void writeEmojiFile(QFile &file);
- int symbol2index(const QCString &symName) const;
+ void writeEmojiFile(TextStream &t);
+ int symbol2index(const std::string &symName) const;
private:
EmojiEntityMapper();
diff --git a/src/entry.cpp b/src/entry.cpp
index 6e343b0..84d1844 100644
--- a/src/entry.cpp
+++ b/src/entry.cpp
@@ -16,8 +16,9 @@
*/
#include <algorithm>
+#include <atomic>
#include <stdlib.h>
-#include <qfile.h>
+
#include "entry.h"
#include "util.h"
#include "section.h"
@@ -71,8 +72,8 @@ Entry::Entry(const Entry &e)
bitfields = e.bitfields;
argList = e.argList;
tArgLists = e.tArgLists;
- program = e.program;
- initializer = e.initializer;
+ program.str(e.program.str());
+ initializer.str(e.initializer.str());
includeFile = e.includeFile;
includeName = e.includeName;
doc = e.doc;
@@ -107,6 +108,7 @@ Entry::Entry(const Entry &e)
id = e.id;
extends = e.extends;
groups = e.groups;
+ req = e.req;
m_fileDef = e.m_fileDef;
m_parent = e.m_parent;
@@ -122,7 +124,7 @@ Entry::~Entry()
{
//printf("Entry::~Entry(%p) num=%d\n",this,g_num);
//printf("Deleting entry %d name %s type %x children %d\n",
- // num,name.data(),section,sublist->count());
+ // num,qPrint(name),section,sublist->count());
g_num--;
}
@@ -190,7 +192,7 @@ void Entry::reset()
args.resize(0);
bitfields.resize(0);
exception.resize(0);
- program.resize(0);
+ program.str(std::string());
includeFile.resize(0);
includeName.resize(0);
doc.resize(0);
@@ -206,7 +208,7 @@ void Entry::reset()
inbodyLine=-1;
inside.resize(0);
fileName.resize(0);
- initializer.resize(0);
+ initializer.str(std::string());
initLines = -1;
startLine = 1;
startColumn = 1;
@@ -241,6 +243,7 @@ void Entry::reset()
tArgLists.clear();
typeConstr.reset();
sli.clear();
+ req.resize(0);
m_fileDef = 0;
}
diff --git a/src/entry.h b/src/entry.h
index d6c0936..831501c 100644
--- a/src/entry.h
+++ b/src/entry.h
@@ -18,17 +18,16 @@
#ifndef ENTRY_H
#define ENTRY_H
-#include <qgstring.h>
-
#include <vector>
#include <memory>
+#include <sstream>
#include "types.h"
#include "arguments.h"
#include "reflist.h"
+#include "textstream.h"
class SectionInfo;
-class QFile;
class FileDef;
/** This class stores information about an inheritance relation
@@ -36,7 +35,7 @@ class FileDef;
struct BaseInfo
{
/*! Creates an object representing an inheritance relation */
- BaseInfo(const char *n,Protection p,Specifier v) :
+ BaseInfo(const QCString &n,Protection p,Specifier v) :
name(n),prot(p),virt(v) {}
QCString name; //!< the name of the base class
Protection prot; //!< inheritance type
@@ -67,6 +66,7 @@ class Entry
enum Sections {
CLASS_SEC = 0x00000001,
NAMESPACE_SEC = 0x00000010,
+ CONCEPT_SEC = 0x00000020,
COMPOUND_MASK = CLASS_SEC,
SCOPE_MASK = COMPOUND_MASK | NAMESPACE_SEC,
@@ -80,6 +80,7 @@ class Entry
CATEGORYDOC_SEC = 0x00040000,
SERVICEDOC_SEC = 0x00080000,
SINGLETONDOC_SEC = 0x00100000,
+ CONCEPTDOC_SEC = 0x00200000,
COMPOUNDDOC_MASK = CLASSDOC_SEC | STRUCTDOC_SEC | UNIONDOC_SEC |
INTERFACEDOC_SEC | EXCEPTIONDOC_SEC | PROTOCOLDOC_SEC |
CATEGORYDOC_SEC | SERVICEDOC_SEC | SINGLETONDOC_SEC,
@@ -257,9 +258,9 @@ class Entry
QCString args; //!< member argument string
QCString bitfields; //!< member's bit fields
ArgumentList argList; //!< member arguments as a list
- ArgumentLists tArgLists; //!< template argument declarations
- QGString program; //!< the program text
- QGString initializer; //!< initial value (for variables)
+ ArgumentLists tArgLists; //!< template argument declarations
+ TextStream program; //!< the program text
+ TextStream initializer; //!< initial value (for variables)
QCString includeFile; //!< include file (2 arg of \\class, must be unique)
QCString includeName; //!< include name (3 arg of \\class)
QCString doc; //!< documentation block (partly parsed)
@@ -296,6 +297,7 @@ class Entry
QCString id; //!< libclang id
LocalToc localToc;
QCString metaData; //!< Slice metadata
+ QCString req; //!< C++20 requires clause
/// return the command name used to define GROUPDOC_SEC
const char *groupDocCmd() const
diff --git a/src/example.h b/src/example.h
index 7929c24..190b894 100644
--- a/src/example.h
+++ b/src/example.h
@@ -19,7 +19,7 @@
#include <algorithm>
#include <vector>
-#include <qcstring.h>
+#include "qcstring.h"
class ClassDef;
class MemberName;
diff --git a/src/filedef.cpp b/src/filedef.cpp
index 7adb1a1..8686636 100644
--- a/src/filedef.cpp
+++ b/src/filedef.cpp
@@ -45,6 +45,7 @@
#include "clangparser.h"
#include "settings.h"
#include "definitionimpl.h"
+#include "conceptdef.h"
//---------------------------------------------------------------------------
@@ -55,7 +56,7 @@ using IncludeInfoMap = std::unordered_map<std::string, const IncludeInfo *>;
class FileDefImpl : public DefinitionMixin<FileDef>
{
public:
- FileDefImpl(const char *p,const char *n,const char *ref=0,const char *dn=0);
+ FileDefImpl(const QCString &p,const QCString &n,const QCString &ref=QCString(),const QCString &dn=QCString());
virtual ~FileDefImpl();
virtual DefType definitionType() const { return TypeFile; }
@@ -90,8 +91,9 @@ class FileDefImpl : public DefinitionMixin<FileDef>
virtual MemberList *getMemberList(MemberListType lt) const;
virtual const MemberLists &getMemberLists() const { return m_memberLists; }
virtual const MemberGroupList &getMemberGroups() const { return m_memberGroups; }
- virtual NamespaceLinkedRefMap getNamespaces() const { return m_namespaces; }
- virtual ClassLinkedRefMap getClasses() const { return m_classes; }
+ virtual const NamespaceLinkedRefMap &getNamespaces() const { return m_namespaces; }
+ virtual const ConceptLinkedRefMap &getConcepts() const { return m_concepts; }
+ virtual const ClassLinkedRefMap &getClasses() const { return m_classes; }
virtual QCString title() const;
virtual bool hasDetailedDescription() const;
virtual QCString fileVersion() const;
@@ -104,7 +106,7 @@ class FileDefImpl : public DefinitionMixin<FileDef>
virtual void writeMemberPages(OutputList &ol);
virtual void writeQuickMemberLinks(OutputList &ol,const MemberDef *currentMd) const;
virtual void writeSummaryLinks(OutputList &ol) const;
- virtual void writeTagFile(FTextStream &t);
+ virtual void writeTagFile(TextStream &t);
virtual void writeSourceHeader(OutputList &ol);
virtual void writeSourceBody(OutputList &ol,ClangTUParser *clangParser);
virtual void writeSourceFooter(OutputList &ol);
@@ -112,6 +114,7 @@ class FileDefImpl : public DefinitionMixin<FileDef>
virtual void setDiskName(const QCString &name);
virtual void insertMember(MemberDef *md);
virtual void insertClass(const ClassDef *cd);
+ virtual void insertConcept(const ConceptDef *cd);
virtual void insertNamespace(const NamespaceDef *nd);
virtual void computeAnchors();
virtual void setPackageDef(PackageDef *pd) { m_package=pd; }
@@ -121,8 +124,8 @@ class FileDefImpl : public DefinitionMixin<FileDef>
virtual void combineUsingRelations();
virtual bool generateSourceFile() const;
virtual void sortMemberLists();
- virtual void addIncludeDependency(const FileDef *fd,const char *incName,bool local,bool imported);
- virtual void addIncludedByDependency(const FileDef *fd,const char *incName,bool local,bool imported);
+ virtual void addIncludeDependency(const FileDef *fd,const QCString &incName,bool local,bool imported);
+ virtual void addIncludedByDependency(const FileDef *fd,const QCString &incName,bool local,bool imported);
virtual void addMembersToMemberGroup();
virtual void distributeMemberGroupDocumentation();
virtual void findSectionsInDocumentation();
@@ -143,6 +146,7 @@ class FileDefImpl : public DefinitionMixin<FileDef>
void writeNamespaceDeclarations(OutputList &ol,const QCString &title,
bool isConstantGroup);
void writeClassDeclarations(OutputList &ol,const QCString &title,const ClassLinkedRefMap &list);
+ void writeConcepts(OutputList &ol,const QCString &title);
void writeInlineClasses(OutputList &ol);
void startMemberDeclarations(OutputList &ol);
void endMemberDeclarations(OutputList &ol);
@@ -150,7 +154,7 @@ class FileDefImpl : public DefinitionMixin<FileDef>
void endMemberDocumentation(OutputList &ol);
void writeDetailedDescription(OutputList &ol,const QCString &title);
void writeBriefDescription(OutputList &ol);
- void writeClassesToTagFile(FTextStream &t,const ClassLinkedRefMap &list);
+ void writeClassesToTagFile(TextStream &t,const ClassLinkedRefMap &list);
IncludeInfoMap m_includeMap;
IncludeInfoList m_includeList;
@@ -178,10 +182,11 @@ class FileDefImpl : public DefinitionMixin<FileDef>
ClassLinkedRefMap m_interfaces;
ClassLinkedRefMap m_structs;
ClassLinkedRefMap m_exceptions;
+ ConceptLinkedRefMap m_concepts;
bool m_subGrouping;
};
-FileDef *createFileDef(const char *p,const char *n,const char *ref,const char *dn)
+FileDef *createFileDef(const QCString &p,const QCString &n,const QCString &ref,const QCString &dn)
{
return new FileDefImpl(p,n,ref,dn);
}
@@ -193,25 +198,24 @@ FileDef *createFileDef(const char *p,const char *n,const char *ref,const char *d
class DevNullCodeDocInterface : public CodeOutputInterface
{
public:
- virtual void codify(const char *) {}
- virtual void writeCodeLink(const char *,const char *,
- const char *,const char *,
- const char *) {}
- virtual void writeTooltip(const char *, const DocLinkInfo &, const char *,
- const char *, const SourceLinkInfo &, const SourceLinkInfo &
- ) {}
- virtual void writeLineNumber(const char *,const char *,
- const char *,int) {}
- virtual void startCodeLine(bool) {}
- virtual void endCodeLine() {}
- virtual void startFontClass(const char *) {}
- virtual void endFontClass() {}
- virtual void writeCodeAnchor(const char *) {}
- virtual void linkableSymbol(int, const char *,Definition *,Definition *) {}
- virtual void setCurrentDoc(const Definition *,const char *,bool) {}
- virtual void addWord(const char *,bool) {}
- virtual void startCodeFragment(const char *) {}
- virtual void endCodeFragment(const char *) {}
+ virtual void codify(const QCString &) override {}
+ virtual void writeCodeLink(const QCString &,const QCString &,
+ const QCString &,const QCString &,
+ const QCString &) override {}
+ virtual void writeTooltip(const QCString &, const DocLinkInfo &, const QCString &,
+ const QCString &, const SourceLinkInfo &, const SourceLinkInfo &
+ ) override {}
+ virtual void writeLineNumber(const QCString &,const QCString &,
+ const QCString &,int) override {}
+ virtual void startCodeLine(bool) override {}
+ virtual void endCodeLine() override {}
+ virtual void startFontClass(const QCString &) override {}
+ virtual void endFontClass() override {}
+ virtual void writeCodeAnchor(const QCString &) override {}
+ virtual void setCurrentDoc(const Definition *,const QCString &,bool) override {}
+ virtual void addWord(const QCString &,bool) override {}
+ virtual void startCodeFragment(const QCString &) override {}
+ virtual void endCodeFragment(const QCString &) override {}
};
//---------------------------------------------------------------------------
@@ -220,22 +224,22 @@ class DevNullCodeDocInterface : public CodeOutputInterface
\a nm the file name, and \a lref is an HTML anchor name if the
file was read from a tag file or 0 otherwise
*/
-FileDefImpl::FileDefImpl(const char *p,const char *nm,
- const char *lref,const char *dn)
+FileDefImpl::FileDefImpl(const QCString &p,const QCString &nm,
+ const QCString &lref,const QCString &dn)
: DefinitionMixin((QCString)p+nm,1,1,nm)
{
m_path=p;
m_filePath=m_path+nm;
m_fileName=nm;
setReference(lref);
- setDiskName(dn?dn:nm);
+ setDiskName(!dn.isEmpty() ? dn : nm);
m_package = 0;
m_isSource = guessSection(nm)==Entry::SOURCE_SEC;
m_docname = nm;
m_dir = 0;
if (Config_getBool(FULL_PATH_NAMES))
{
- m_docname.prepend(stripFromPath(m_path.copy()));
+ m_docname.prepend(stripFromPath(m_path));
}
setLanguage(getLanguageFromFileName(name()));
acquireFileVersion();
@@ -307,12 +311,12 @@ bool FileDefImpl::hasDetailedDescription() const
);
}
-void FileDefImpl::writeTagFile(FTextStream &tagFile)
+void FileDefImpl::writeTagFile(TextStream &tagFile)
{
- tagFile << " <compound kind=\"file\">" << endl;
- tagFile << " <name>" << convertToXML(name()) << "</name>" << endl;
- tagFile << " <path>" << convertToXML(getPath()) << "</path>" << endl;
- tagFile << " <filename>" << convertToXML(getOutputFileBase()) << Doxygen::htmlFileExtension << "</filename>" << endl;
+ tagFile << " <compound kind=\"file\">\n";
+ tagFile << " <name>" << convertToXML(name()) << "</name>\n";
+ tagFile << " <path>" << convertToXML(getPath()) << "</path>\n";
+ tagFile << " <filename>" << convertToXML(getOutputFileBase()) << Doxygen::htmlFileExtension << "</filename>\n";
for (const auto &ii : m_includeList)
{
const FileDef *fd=ii.fileDef;
@@ -329,8 +333,7 @@ void FileDefImpl::writeTagFile(FTextStream &tagFile)
<< "local=\"" << locStr << "\" "
<< "imported=\"" << impStr << "\">"
<< convertToXML(ii.includeName)
- << "</includes>"
- << endl;
+ << "</includes>\n";
}
}
for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::File))
@@ -357,13 +360,24 @@ void FileDefImpl::writeTagFile(FTextStream &tagFile)
writeClassesToTagFile(tagFile, m_exceptions);
}
break;
+ case LayoutDocEntry::FileConcepts:
+ {
+ for (const auto *nd : m_concepts)
+ {
+ if (nd->isLinkableInProject())
+ {
+ tagFile << " <concept>" << convertToXML(nd->name()) << "</concept>\n";
+ }
+ }
+ }
+ break;
case LayoutDocEntry::FileNamespaces:
{
for (const auto *nd : m_namespaces)
{
if (nd->isLinkableInProject())
{
- tagFile << " <namespace>" << convertToXML(nd->name()) << "</namespace>" << endl;
+ tagFile << " <namespace>" << convertToXML(nd->name()) << "</namespace>\n";
}
}
}
@@ -392,7 +406,7 @@ void FileDefImpl::writeTagFile(FTextStream &tagFile)
}
writeDocAnchorsToTagFile(tagFile);
- tagFile << " </compound>" << endl;
+ tagFile << " </compound>\n";
}
void FileDefImpl::writeDetailedDescription(OutputList &ol,const QCString &title)
@@ -405,7 +419,7 @@ void FileDefImpl::writeDetailedDescription(OutputList &ol,const QCString &title)
ol.popGeneratorState();
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
- ol.writeAnchor(0,"details");
+ ol.writeAnchor(QCString(),"details");
ol.popGeneratorState();
ol.startGroupHeader();
ol.parseText(title);
@@ -415,7 +429,7 @@ void FileDefImpl::writeDetailedDescription(OutputList &ol,const QCString &title)
if (!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF))
{
ol.generateDoc(briefFile(),briefLine(),this,0,briefDescription(),FALSE,FALSE,
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
}
if (!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF) &&
!documentation().isEmpty())
@@ -433,9 +447,9 @@ void FileDefImpl::writeDetailedDescription(OutputList &ol,const QCString &title)
if (!documentation().isEmpty())
{
ol.generateDoc(docFile(),docLine(),this,0,documentation()+"\n",TRUE,FALSE,
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
}
- //printf("Writing source ref for file %s\n",name().data());
+ //printf("Writing source ref for file %s\n",qPrint(name()));
if (Config_getBool(SOURCE_BROWSER))
{
//if Latex enabled and LATEX_SOURCE_CODE isn't -> skip, bug_738548
@@ -459,8 +473,7 @@ void FileDefImpl::writeDetailedDescription(OutputList &ol,const QCString &title)
if (fileMarkerPos!=-1) // should always pass this.
{
ol.parseText(refText.left(fileMarkerPos)); //text left from marker 1
- ol.writeObjectLink(0,getSourceFileBase(),
- 0,name());
+ ol.writeObjectLink(QCString(),getSourceFileBase(),QCString(),name());
ol.parseText(refText.right(
refText.length()-fileMarkerPos-2)); // text right from marker 2
}
@@ -482,7 +495,7 @@ void FileDefImpl::writeBriefDescription(OutputList &ol)
{
DocRoot *rootNode = validatingParseDoc(briefFile(),briefLine(),this,0,
briefDescription(),TRUE,FALSE,
- 0,TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
if (rootNode && !rootNode->isEmpty())
{
@@ -502,7 +515,7 @@ void FileDefImpl::writeBriefDescription(OutputList &ol)
)
{
ol.disableAllBut(OutputGenerator::Html);
- ol.startTextLink(0,"details");
+ ol.startTextLink(QCString(),"details");
ol.parseText(theTranslator->trMore());
ol.endTextLink();
}
@@ -514,14 +527,14 @@ void FileDefImpl::writeBriefDescription(OutputList &ol)
ol.writeSynopsis();
}
-void FileDefImpl::writeClassesToTagFile(FTextStream &tagFile, const ClassLinkedRefMap &list)
+void FileDefImpl::writeClassesToTagFile(TextStream &tagFile, const ClassLinkedRefMap &list)
{
for (const auto &cd : list)
{
if (cd->isLinkableInProject())
{
tagFile << " <class kind=\"" << cd->compoundTypeString() <<
- "\">" << convertToXML(cd->name()) << "</class>" << endl;
+ "\">" << convertToXML(cd->name()) << "</class>\n";
}
}
}
@@ -569,7 +582,7 @@ void FileDefImpl::writeIncludeFiles(OutputList &ol)
{
ol.writeObjectLink(fd->getReference(),
fd->generateSourceFile() ? fd->includeName() : fd->getOutputFileBase(),
- 0,ii.includeName);
+ QCString(),ii.includeName);
}
else
{
@@ -594,12 +607,12 @@ void FileDefImpl::writeIncludeGraph(OutputList &ol)
{
if (Config_getBool(HAVE_DOT) /*&& Config_getBool(INCLUDE_GRAPH)*/)
{
- //printf("Graph for file %s\n",name().data());
+ //printf("Graph for file %s\n",qPrint(name()));
DotInclDepGraph incDepGraph(this,FALSE);
if (incDepGraph.isTooBig())
{
warn_uncond("Include graph for '%s' not generated, too many nodes (%d), threshold is %d. Consider increasing DOT_GRAPH_MAX_NODES.\n",
- name().data(), incDepGraph.numNodes(), Config_getInt(DOT_GRAPH_MAX_NODES));
+ qPrint(name()), incDepGraph.numNodes(), Config_getInt(DOT_GRAPH_MAX_NODES));
}
else if (!incDepGraph.isTrivial())
{
@@ -619,12 +632,12 @@ void FileDefImpl::writeIncludedByGraph(OutputList &ol)
{
if (Config_getBool(HAVE_DOT) /*&& Config_getBool(INCLUDED_BY_GRAPH)*/)
{
- //printf("Graph for file %s\n",name().data());
+ //printf("Graph for file %s\n",qPrint(name()));
DotInclDepGraph incDepGraph(this,TRUE);
if (incDepGraph.isTooBig())
{
warn_uncond("Included by graph for '%s' not generated, too many nodes (%d), threshold is %d. Consider increasing DOT_GRAPH_MAX_NODES.\n",
- name().data(), incDepGraph.numNodes(), Config_getInt(DOT_GRAPH_MAX_NODES));
+ qPrint(name()), incDepGraph.numNodes(), Config_getInt(DOT_GRAPH_MAX_NODES));
}
else if (!incDepGraph.isTrivial())
{
@@ -643,12 +656,12 @@ void FileDefImpl::writeIncludedByGraph(OutputList &ol)
void FileDefImpl::writeSourceLink(OutputList &ol)
{
- //printf("%s: generateSourceFile()=%d\n",name().data(),generateSourceFile());
+ //printf("%s: generateSourceFile()=%d\n",qPrint(name()),generateSourceFile());
if (generateSourceFile())
{
ol.disableAllBut(OutputGenerator::Html);
ol.startParagraph();
- ol.startTextLink(includeName(),0);
+ ol.startTextLink(includeName(),QCString());
ol.parseText(theTranslator->trGotoSourceCode());
ol.endTextLink();
ol.endParagraph();
@@ -669,6 +682,12 @@ void FileDefImpl::writeClassDeclarations(OutputList &ol,const QCString &title,co
list.writeDeclaration(ol,0,title,FALSE);
}
+void FileDefImpl::writeConcepts(OutputList &ol,const QCString &title)
+{
+ // write list of classes
+ m_concepts.writeDeclaration(ol,title,FALSE);
+}
+
void FileDefImpl::writeInlineClasses(OutputList &ol)
{
// temporarily undo the disabling could be done by startMemberDocumentation()
@@ -747,35 +766,42 @@ void FileDefImpl::writeSummaryLinks(OutputList &ol) const
{
const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
QCString label = "nested-classes";
- ol.writeSummaryLink(0,label,ls->title(lang),first);
+ ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
first=FALSE;
}
else if (lde->kind()==LayoutDocEntry::FileInterfaces && m_interfaces.declVisible())
{
const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
QCString label = "interfaces";
- ol.writeSummaryLink(0,label,ls->title(lang),first);
+ ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
first=FALSE;
}
else if (lde->kind()==LayoutDocEntry::FileStructs && m_structs.declVisible())
{
const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
QCString label = "structs";
- ol.writeSummaryLink(0,label,ls->title(lang),first);
+ ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
first=FALSE;
}
else if (lde->kind()==LayoutDocEntry::FileExceptions && m_exceptions.declVisible())
{
const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
QCString label = "exceptions";
- ol.writeSummaryLink(0,label,ls->title(lang),first);
+ ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
first=FALSE;
}
else if (lde->kind()==LayoutDocEntry::FileNamespaces && m_namespaces.declVisible())
{
const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
QCString label = "namespaces";
- ol.writeSummaryLink(0,label,ls->title(lang),first);
+ ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
+ first=FALSE;
+ }
+ else if (lde->kind()==LayoutDocEntry::FileConcepts && m_concepts.declVisible())
+ {
+ const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
+ QCString label = "concepts";
+ ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
first=FALSE;
}
else if (lde->kind()==LayoutDocEntry::MemberDecl)
@@ -784,7 +810,7 @@ void FileDefImpl::writeSummaryLinks(OutputList &ol) const
MemberList * ml = getMemberList(lmd->type);
if (ml && ml->declVisible())
{
- ol.writeSummaryLink(0,MemberList::listTypeAsString(ml->listType()),lmd->title(lang),first);
+ ol.writeSummaryLink(QCString(),MemberList::listTypeAsString(ml->listType()),lmd->title(lang),first);
first=FALSE;
}
}
@@ -807,10 +833,10 @@ void FileDefImpl::writeDocumentation(OutputList &ol)
//QCString fn = name();
//if (Config_getBool(FULL_PATH_NAMES))
//{
- // fn.prepend(stripFromPath(getPath().copy()));
+ // fn.prepend(stripFromPath(getPath()));
//}
- //printf("WriteDocumentation diskname=%s\n",diskname.data());
+ //printf("WriteDocumentation diskname=%s\n",qPrint(diskname));
QCString versionTitle;
if (!m_fileVersion.isEmpty())
@@ -920,6 +946,12 @@ void FileDefImpl::writeDocumentation(OutputList &ol)
writeClassDeclarations(ol,ls->title(lang),m_exceptions);
}
break;
+ case LayoutDocEntry::FileConcepts:
+ {
+ const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
+ writeConcepts(ol,ls->title(lang));
+ }
+ break;
case LayoutDocEntry::FileNamespaces:
{
const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
@@ -978,11 +1010,14 @@ void FileDefImpl::writeDocumentation(OutputList &ol)
case LayoutDocEntry::NamespaceNestedNamespaces:
case LayoutDocEntry::NamespaceNestedConstantGroups:
case LayoutDocEntry::NamespaceClasses:
+ case LayoutDocEntry::NamespaceConcepts:
case LayoutDocEntry::NamespaceInterfaces:
case LayoutDocEntry::NamespaceStructs:
case LayoutDocEntry::NamespaceExceptions:
case LayoutDocEntry::NamespaceInlineClasses:
+ case LayoutDocEntry::ConceptDefinition:
case LayoutDocEntry::GroupClasses:
+ case LayoutDocEntry::GroupConcepts:
case LayoutDocEntry::GroupInlineClasses:
case LayoutDocEntry::GroupNamespaces:
case LayoutDocEntry::GroupDirs:
@@ -1092,7 +1127,7 @@ void FileDefImpl::writeSourceHeader(OutputList &ol)
bool genSourceFile = !isDocFile && generateSourceFile();
if (getDirDef())
{
- startFile(ol,getSourceFileBase(),0,pageTitle,HLI_FileVisible,
+ startFile(ol,getSourceFileBase(),QCString(),pageTitle,HLI_FileVisible,
!generateTreeView,
!isDocFile && genSourceFile ? QCString() : getOutputFileBase());
if (!generateTreeView)
@@ -1106,11 +1141,11 @@ void FileDefImpl::writeSourceHeader(OutputList &ol)
}
else
{
- startFile(ol,getSourceFileBase(),0,pageTitle,HLI_FileVisible,FALSE,
+ startFile(ol,getSourceFileBase(),QCString(),pageTitle,HLI_FileVisible,FALSE,
!isDocFile && genSourceFile ? QCString() : getOutputFileBase());
startTitle(ol,getSourceFileBase());
ol.parseText(title);
- endTitle(ol,getSourceFileBase(),0);
+ endTitle(ol,getSourceFileBase(),QCString());
}
ol.startContents();
@@ -1121,7 +1156,7 @@ void FileDefImpl::writeSourceHeader(OutputList &ol)
if (latexSourceCode) ol.disable(OutputGenerator::Latex);
if (rtfSourceCode) ol.disable(OutputGenerator::RTF);
if (docbookSourceCode) ol.disable(OutputGenerator::Docbook);
- ol.startTextLink(getOutputFileBase(),0);
+ ol.startTextLink(getOutputFileBase(),QCString());
ol.parseText(theTranslator->trGotoDocumentation());
ol.endTextLink();
ol.popGeneratorState();
@@ -1155,17 +1190,17 @@ void FileDefImpl::writeSourceBody(OutputList &ol,ClangTUParser *clangParser)
if (needs2PassParsing)
{
// parse code for cross-references only (see bug707641)
- intf->parseCode(devNullIntf,0,
+ intf->parseCode(devNullIntf,QCString(),
fileToString(absFilePath(),TRUE,TRUE),
getLanguage(),
- FALSE,0,this
+ FALSE,QCString(),this
);
}
- intf->parseCode(ol,0,
+ intf->parseCode(ol,QCString(),
fileToString(absFilePath(),filterSourceFiles,TRUE),
getLanguage(), // lang
FALSE, // isExampleBlock
- 0, // exampleName
+ QCString(), // exampleName
this, // fileDef
-1, // startLine
-1, // endLine
@@ -1203,10 +1238,10 @@ void FileDefImpl::parseSource(ClangTUParser *clangParser)
auto intf = Doxygen::parserManager->getCodeParser(getDefFileExtension());
intf->resetCodeParserState();
intf->parseCode(
- devNullIntf,0,
+ devNullIntf,QCString(),
fileToString(absFilePath(),filterSourceFiles,TRUE),
getLanguage(),
- FALSE,0,this
+ FALSE,QCString(),this
);
}
}
@@ -1226,7 +1261,7 @@ void FileDefImpl::addMembersToMemberGroup()
{
if (mg->allMembersInSameSection() && m_subGrouping)
{
- //printf("----> addToDeclarationSection(%s)\n",mg->header().data());
+ //printf("----> addToDeclarationSection(%s)\n",qPrint(mg->header()));
mg->addToDeclarationSection();
}
}
@@ -1237,7 +1272,7 @@ void FileDefImpl::insertMember(MemberDef *md)
{
if (md->isHidden()) return;
//printf("%s:FileDefImpl::insertMember(%s (=%p) list has %d elements)\n",
- // name().data(),md->name().data(),md,allMemberList.count());
+ // qPrint(name()),qPrint(md->name()),md,allMemberList.count());
MemberList *allMemberList = getMemberList(MemberListType_allMembersList);
if (allMemberList && allMemberList->contains(md))
{
@@ -1287,9 +1322,9 @@ void FileDefImpl::insertMember(MemberDef *md)
default:
err("FileDefImpl::insertMembers(): "
"member '%s' with class scope '%s' inserted in file scope '%s'!\n",
- md->name().data(),
- md->getClassDef() ? md->getClassDef()->name().data() : "<global>",
- name().data());
+ qPrint(md->name()),
+ md->getClassDef() ? qPrint(md->getClassDef()->name()) : "<global>",
+ qPrint(name()));
}
//addMemberToGroup(md,groupId);
}
@@ -1320,6 +1355,12 @@ void FileDefImpl::insertClass(const ClassDef *cd)
list.add(cd->name(),cd);
}
+void FileDefImpl::insertConcept(const ConceptDef *cd)
+{
+ if (cd->isHidden()) return;
+ m_concepts.add(cd->name(),cd);
+}
+
/*! Adds namespace definition \a nd to the list of all compounds of this file */
void FileDefImpl::insertNamespace(const NamespaceDef *nd)
{
@@ -1343,21 +1384,21 @@ void FileDefImpl::addSourceRef(int line,const Definition *d,const MemberDef *md)
m_srcDefMap.insert(std::make_pair(line,d));
if (md) m_srcMemberMap.insert(std::make_pair(line,md));
//printf("Adding member %s with anchor %s at line %d to file %s\n",
- // md?md->name().data():"<none>",md?md->anchor().data():"<none>",line,name().data());
+ // md?qPrint(md->name()):"<none>",md?qPrint(md->anchor()):"<none>",line,qPrint(name()));
}
}
const Definition *FileDefImpl::getSourceDefinition(int lineNr) const
{
auto it = m_srcDefMap.find(lineNr);
- //printf("%s::getSourceDefinition(%d)=%s\n",name().data(),lineNr,it!=m_srcDefMap.end()?it->second->name().data():"none");
+ //printf("%s::getSourceDefinition(%d)=%s\n",qPrint(name()),lineNr,it!=m_srcDefMap.end()?qPrint(it->second->name()):"none");
return it!=m_srcDefMap.end() ? it->second : 0;
}
const MemberDef *FileDefImpl::getSourceMember(int lineNr) const
{
auto it = m_srcMemberMap.find(lineNr);
- //printf("%s::getSourceMember(%d)=%s\n",name().data(),lineNr,it!=m_srcMemberMap.end()?it->second->name().data():"none");
+ //printf("%s::getSourceMember(%d)=%s\n",qPrint(name()),lineNr,it!=m_srcMemberMap.end()?qPrint(it->second->name()):"none");
return it!=m_srcMemberMap.end() ? it->second : 0;
}
@@ -1365,12 +1406,12 @@ const MemberDef *FileDefImpl::getSourceMember(int lineNr) const
void FileDefImpl::addUsingDirective(const NamespaceDef *nd)
{
m_usingDirList.add(nd->qualifiedName(),nd);
- //printf("%p: FileDefImpl::addUsingDirective: %s:%d\n",this,name().data(),usingDirList->count());
+ //printf("%p: FileDefImpl::addUsingDirective: %s:%d\n",this,qPrint(name()),usingDirList->count());
}
LinkedRefMap<const NamespaceDef> FileDefImpl::getUsedNamespaces() const
{
- //printf("%p: FileDefImpl::getUsedNamespace: %s:%d\n",this,name().data(),usingDirList?usingDirList->count():0);
+ //printf("%p: FileDefImpl::getUsedNamespace: %s:%d\n",this,qPrint(name()),usingDirList?usingDirList->count():0);
return m_usingDirList;
}
@@ -1379,10 +1420,10 @@ void FileDefImpl::addUsingDeclaration(const ClassDef *cd)
m_usingDeclList.add(cd->qualifiedName(),cd);
}
-void FileDefImpl::addIncludeDependency(const FileDef *fd,const char *incName,bool local,bool imported)
+void FileDefImpl::addIncludeDependency(const FileDef *fd,const QCString &incName,bool local,bool imported)
{
//printf("FileDefImpl::addIncludeDependency(%p,%s,%d)\n",fd,incName,local);
- QCString iName = fd ? fd->absFilePath().data() : incName;
+ QCString iName = fd ? fd->absFilePath() : incName;
if (!iName.isEmpty() && m_includeMap.find(iName.str())==m_includeMap.end())
{
m_includeList.emplace_back(fd,incName,local,imported);
@@ -1394,7 +1435,7 @@ void FileDefImpl::addIncludedUsingDirectives(FileDefSet &visitedFiles)
{
if (visitedFiles.find(this)!=visitedFiles.end()) return; // file already processed
visitedFiles.insert(this);
- //printf("( FileDefImpl::addIncludedUsingDirectives for file %s\n",name().data());
+ //printf("( FileDefImpl::addIncludedUsingDirectives for file %s\n",qPrint(name()));
if (!m_includeList.empty()) // file contains #includes
{
@@ -1433,15 +1474,15 @@ void FileDefImpl::addIncludedUsingDirectives(FileDefSet &visitedFiles)
}
}
}
- //printf(") end FileDefImpl::addIncludedUsingDirectives for file %s\n",name().data());
+ //printf(") end FileDefImpl::addIncludedUsingDirectives for file %s\n",qPrint(name()));
}
-void FileDefImpl::addIncludedByDependency(const FileDef *fd,const char *incName,
+void FileDefImpl::addIncludedByDependency(const FileDef *fd,const QCString &incName,
bool local,bool imported)
{
//printf("FileDefImpl::addIncludedByDependency(%p,%s,%d)\n",fd,incName,local);
- QCString iName = fd ? fd->absFilePath().data() : incName;
+ QCString iName = fd ? fd->absFilePath() : incName;
if (!iName.isEmpty() && m_includedByMap.find(iName.str())==m_includedByMap.end())
{
m_includedByList.emplace_back(fd,incName,local,imported);
@@ -1475,7 +1516,7 @@ void FileDefImpl::addListReferences()
getOutputFileBase(),
theTranslator->trFile(TRUE,TRUE),
getOutputFileBase(),name(),
- 0,
+ QCString(),
0
);
}
@@ -1538,13 +1579,13 @@ void FileDefImpl::acquireFileVersion()
if (!vercmd.isEmpty() && !m_filePath.isEmpty() &&
m_filePath!="generated" && m_filePath!="graph_legend")
{
- msg("Version of %s : ",m_filePath.data());
+ msg("Version of %s : ",qPrint(m_filePath));
QCString cmd = vercmd+" \""+m_filePath+"\"";
Debug::print(Debug::ExtCmd,0,"Executing popen(`%s`)\n",qPrint(cmd));
FILE *f=Portable::popen(cmd,"r");
if (!f)
{
- err("could not execute %s\n",vercmd.data());
+ err("could not execute %s\n",qPrint(vercmd));
return;
}
const int bufSize=1024;
@@ -1557,7 +1598,7 @@ void FileDefImpl::acquireFileVersion()
m_fileVersion=QCString(buf,numRead).stripWhiteSpace();
if (!m_fileVersion.isEmpty())
{
- msg("%s\n",m_fileVersion.data());
+ msg("%s\n",qPrint(m_fileVersion));
return;
}
}
@@ -1673,7 +1714,7 @@ void FileDefImpl::writeMemberDeclarations(OutputList &ol,MemberListType lt,const
}
else
{
- ml->writeDeclarations(ol,0,0,this,0,title,0);
+ ml->writeDeclarations(ol,0,0,this,0,title,QCString());
}
}
}
@@ -1698,7 +1739,7 @@ static void getAllIncludeFilesRecursively(
if (ii.fileDef && !ii.fileDef->isReference() &&
filesVisited.find(ii.fileDef->absFilePath().str())==filesVisited.end())
{
- //printf("FileDefImpl::addIncludeDependency(%s)\n",ii->fileDef->absFilePath().data());
+ //printf("FileDefImpl::addIncludeDependency(%s)\n",qPrint(ii->fileDef->absFilePath()));
incFiles.push_back(ii.fileDef->absFilePath().str());
filesVisited.insert(ii.fileDef->absFilePath().str());
getAllIncludeFilesRecursively(filesVisited,ii.fileDef,incFiles);
diff --git a/src/filedef.h b/src/filedef.h
index 9655f38..7019485 100644
--- a/src/filedef.h
+++ b/src/filedef.h
@@ -24,19 +24,20 @@
#include "definition.h"
#include "memberlist.h"
#include "containers.h"
-#include "classlist.h"
class MemberList;
class FileDef;
class FileList;
class ClassDef;
+class ConceptDef;
class MemberDef;
class OutputList;
class NamespaceDef;
class NamespaceLinkedRefMap;
+class ConceptLinkedRefMap;
+class ClassLinkedRefMap;
class PackageDef;
class DirDef;
-class FTextStream;
class ClangTUParser;
// --- Set of files
@@ -134,8 +135,9 @@ class FileDef : public DefinitionMutable, public Definition
/* user defined member groups */
virtual const MemberGroupList &getMemberGroups() const = 0;
- virtual NamespaceLinkedRefMap getNamespaces() const = 0;
- virtual ClassLinkedRefMap getClasses() const = 0;
+ virtual const NamespaceLinkedRefMap &getNamespaces() const = 0;
+ virtual const ConceptLinkedRefMap &getConcepts() const = 0;
+ virtual const ClassLinkedRefMap &getClasses() const = 0;
virtual QCString title() const = 0;
virtual bool hasDetailedDescription() const = 0;
@@ -155,7 +157,7 @@ class FileDef : public DefinitionMutable, public Definition
virtual void writeMemberPages(OutputList &ol) = 0;
virtual void writeQuickMemberLinks(OutputList &ol,const MemberDef *currentMd) const = 0;
virtual void writeSummaryLinks(OutputList &ol) const = 0;
- virtual void writeTagFile(FTextStream &t) = 0;
+ virtual void writeTagFile(TextStream &t) = 0;
virtual void writeSourceHeader(OutputList &ol) = 0;
virtual void writeSourceBody(OutputList &ol,ClangTUParser *clangParser) = 0;
@@ -165,6 +167,7 @@ class FileDef : public DefinitionMutable, public Definition
virtual void insertMember(MemberDef *md) = 0;
virtual void insertClass(const ClassDef *cd) = 0;
+ virtual void insertConcept(const ConceptDef *cd) = 0;
virtual void insertNamespace(const NamespaceDef *nd) = 0;
virtual void computeAnchors() = 0;
@@ -178,8 +181,8 @@ class FileDef : public DefinitionMutable, public Definition
virtual bool generateSourceFile() const = 0;
virtual void sortMemberLists() = 0;
- virtual void addIncludeDependency(const FileDef *fd,const char *incName,bool local,bool imported) = 0;
- virtual void addIncludedByDependency(const FileDef *fd,const char *incName,bool local,bool imported) = 0;
+ virtual void addIncludeDependency(const FileDef *fd,const QCString &incName,bool local,bool imported) = 0;
+ virtual void addIncludedByDependency(const FileDef *fd,const QCString &incName,bool local,bool imported) = 0;
virtual void addMembersToMemberGroup() = 0;
virtual void distributeMemberGroupDocumentation() = 0;
@@ -189,7 +192,7 @@ class FileDef : public DefinitionMutable, public Definition
virtual void addListReferences() = 0;
};
-FileDef *createFileDef(const char *p,const char *n,const char *ref=0,const char *dn=0);
+FileDef *createFileDef(const QCString &p,const QCString &n,const QCString &ref=QCString(),const QCString &dn=QCString());
// --- Cast functions
diff --git a/src/fileinfo.cpp b/src/fileinfo.cpp
new file mode 100644
index 0000000..8d0a332
--- /dev/null
+++ b/src/fileinfo.cpp
@@ -0,0 +1,161 @@
+/******************************************************************************
+ *
+ * Copyright (C) 1997-2021 by Dimitri van Heesch.
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
+ * for any purpose. It is provided "as is" without express or implied warranty.
+ * See the GNU General Public License for more details.
+ *
+ * Documents produced by Doxygen are derivative works derived from the
+ * input used in their production; they are not affected by this license.
+ *
+ */
+
+#include "filesystem.hpp"
+#include "fileinfo.h"
+
+namespace fs = ghc::filesystem;
+
+size_t FileInfo::size() const
+{
+ std::error_code ec;
+ size_t result = static_cast<size_t>(fs::file_size(fs::path(m_name),ec));
+ return ec ? 0 : result;
+}
+
+bool FileInfo::exists() const
+{
+ std::error_code ec;
+ bool result = fs::exists(fs::path(m_name),ec);
+ return !ec && result;
+}
+
+bool FileInfo::isWritable() const
+{
+ std::error_code ec;
+ fs::file_status status = fs::status(m_name,ec);
+ return !ec && (status.permissions() & fs::perms::owner_write)!=fs::perms::none;
+}
+
+bool FileInfo::isReadable() const
+{
+ std::error_code ec;
+ fs::file_status status = fs::status(m_name,ec);
+ return !ec && (status.permissions() & fs::perms::owner_read)!=fs::perms::none;
+}
+
+bool FileInfo::isExecutable() const
+{
+ std::error_code ec;
+ fs::file_status status = fs::status(m_name,ec);
+ return !ec && (status.permissions() & fs::perms::owner_exec)!=fs::perms::none;
+}
+
+bool FileInfo::isRelative() const
+{
+ return fs::path(m_name).is_relative();
+}
+
+bool FileInfo::isFile() const
+{
+ std::error_code ec;
+ fs::file_status status = fs::status(m_name,ec);
+ return !ec && fs::is_regular_file(status);
+}
+
+bool FileInfo::isDir() const
+{
+ std::error_code ec;
+ fs::file_status status = fs::status(m_name,ec);
+ return !ec && fs::is_directory(status);
+}
+
+bool FileInfo::isSymLink() const
+{
+ std::error_code ec;
+ fs::file_status status = fs::status(m_name,ec);
+ return !ec && fs::is_symlink(status);
+}
+
+std::string FileInfo::readLink() const
+{
+ std::error_code ec;
+ fs::path targetPath = fs::read_symlink(fs::path(m_name));
+ return !ec ? targetPath.string() : std::string();
+}
+
+std::string FileInfo::filePath() const
+{
+ return m_name;
+}
+
+void FileInfo::correctPath(std::string &s)
+{
+ std::replace( s.begin(), s.end(), '\\', '/' );
+}
+
+std::string FileInfo::absFilePath() const
+{
+ std::string result;
+ std::error_code ec;
+ fs::path path(m_name);
+ if (fs::exists(path,ec))
+ {
+ result = fs::canonical(path,ec).string();
+ }
+ else
+ {
+ result = (fs::current_path(ec) / m_name).string();
+ }
+ correctPath(result);
+ return result;
+}
+
+std::string FileInfo::fileName() const
+{
+ return fs::path(m_name).filename().string();
+}
+
+std::string FileInfo::baseName() const
+{
+ std::string s = fileName();
+ size_t pos = s.find('.');
+ return pos!=std::string::npos ? s.substr(0,pos) : s;
+}
+
+std::string FileInfo::extension(bool complete) const
+{
+ std::string fn = fileName();
+ size_t pos = complete ? fn.find('.') : fn.rfind('.');
+ return pos!=std::string::npos ? fn.substr(pos+1) : std::string();
+}
+
+std::string FileInfo::dirPath(bool absPath) const
+{
+ std::string result;
+ if (absPath)
+ {
+ result = absFilePath();
+ }
+ else
+ {
+ result = m_name;
+ correctPath(result);
+ }
+ size_t pos = result.rfind('/');
+ if (pos==std::string::npos)
+ {
+ return ".";
+ }
+ else if (pos==0)
+ {
+ return "/";
+ }
+ else
+ {
+ return result.substr(0,pos);
+ }
+}
+
diff --git a/src/fileinfo.h b/src/fileinfo.h
new file mode 100644
index 0000000..3ab684f
--- /dev/null
+++ b/src/fileinfo.h
@@ -0,0 +1,47 @@
+/******************************************************************************
+ *
+ * Copyright (C) 1997-2021 by Dimitri van Heesch.
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
+ * for any purpose. It is provided "as is" without express or implied warranty.
+ * See the GNU General Public License for more details.
+ *
+ * Documents produced by Doxygen are derivative works derived from the
+ * input used in their production; they are not affected by this license.
+ *
+ */
+
+#ifndef FILEINFO_H
+#define FILEINFO_H
+
+#include <string>
+
+/** @brief Minimal replacement for QFileInfo. */
+class FileInfo
+{
+ public:
+ explicit FileInfo(const std::string &name) : m_name(name) {}
+ bool exists() const;
+ size_t size() const;
+ bool isWritable() const;
+ bool isReadable() const;
+ bool isExecutable() const;
+ bool isRelative() const;
+ bool isFile() const;
+ bool isDir() const;
+ bool isSymLink() const;
+ std::string readLink() const;
+ std::string filePath() const;
+ std::string absFilePath() const;
+ std::string fileName() const;
+ std::string baseName() const;
+ std::string extension(bool complete) const;
+ std::string dirPath(bool absPath = true) const;
+ private:
+ static void correctPath(std::string &s);
+ std::string m_name;
+};
+
+#endif
diff --git a/src/filename.h b/src/filename.h
index d236046..f2eb304 100644
--- a/src/filename.h
+++ b/src/filename.h
@@ -28,10 +28,10 @@ class FileDef;
class FileName : public std::vector< std::unique_ptr<FileDef> >
{
public:
- FileName(const char *nm,const char *fn) : m_name(nm), m_fName(fn), m_pathName("tmp") {}
- const char *fileName() const { return m_name; }
- const char *fullName() const { return m_fName; }
- const char *path() const { return m_pathName; }
+ FileName(const QCString &nm,const QCString &fn) : m_name(nm), m_fName(fn), m_pathName("tmp") {}
+ QCString fileName() const { return m_name; }
+ QCString fullName() const { return m_fName; }
+ QCString path() const { return m_pathName; }
private:
QCString m_name;
diff --git a/src/fileparser.cpp b/src/fileparser.cpp
index 34085dc..33491fc 100644
--- a/src/fileparser.cpp
+++ b/src/fileparser.cpp
@@ -17,19 +17,19 @@
#include "outputgen.h"
void FileCodeParser::parseCode(CodeOutputInterface &codeOutIntf,
- const char *, // scopeName
+ const QCString &, // scopeName
const QCString & input,
- SrcLangExt, // lang
- bool, // isExampleBlock
- const char *, // exampleName
+ SrcLangExt, // lang
+ bool, // isExampleBlock
+ const QCString &, // exampleName
FileDef * fileDef,
int startLine,
int endLine,
- bool, // inlineFragment
- const MemberDef *, // memberDef
+ bool, // inlineFragment
+ const MemberDef *, // memberDef
bool showLineNumbers,
- const Definition *, // searchCtx,
- bool // collectXRefs
+ const Definition *, // searchCtx,
+ bool // collectXRefs
)
{
int lineNr = startLine!=-1 ? startLine : 1;
@@ -41,8 +41,11 @@ void FileCodeParser::parseCode(CodeOutputInterface &codeOutIntf,
while (j<length && input[j]!='\n') j++;
QCString lineStr = input.mid(i,j-i);
codeOutIntf.startCodeLine(fileDef != 0 && showLineNumbers);
- if (fileDef != 0 && showLineNumbers) codeOutIntf.writeLineNumber(0,0,0,lineNr);
- if (!lineStr.isEmpty()) codeOutIntf.codify(lineStr);
+ if (fileDef != 0 && showLineNumbers)
+ {
+ codeOutIntf.writeLineNumber(QCString(),QCString(),QCString(),lineNr);
+ }
+ if (!lineStr.isEmpty()) codeOutIntf.codify(lineStr.data());
codeOutIntf.endCodeLine();
lineNr++;
i=j+1;
diff --git a/src/fileparser.h b/src/fileparser.h
index 3245878..c7c07aa 100644
--- a/src/fileparser.h
+++ b/src/fileparser.h
@@ -3,8 +3,8 @@
* Copyright (C) 1997-2015 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
- * documentation under the terms of the GNU General Public License is hereby
- * granted. No representations are made about the suitability of this software
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
@@ -24,11 +24,11 @@ class FileCodeParser : public CodeParserInterface
public:
virtual ~FileCodeParser() {}
void parseCode(CodeOutputInterface &codeOutIntf,
- const char *scopeName,
+ const QCString &scopeName,
const QCString &input,
SrcLangExt lang,
bool isExampleBlock,
- const char *exampleName=0,
+ const QCString &exampleName=QCString(),
FileDef *fileDef=0,
int startLine=-1,
int endLine=-1,
diff --git a/src/formula.cpp b/src/formula.cpp
index 629af45..2e5aef9 100644
--- a/src/formula.cpp
+++ b/src/formula.cpp
@@ -16,13 +16,11 @@
#include "formula.h"
#include "message.h"
#include "config.h"
-#include "ftextstream.h"
#include "util.h"
#include "portable.h"
#include "image.h"
-
-#include <qfile.h>
-#include <qdir.h>
+#include "fileinfo.h"
+#include "dir.h"
#include <map>
#include <vector>
@@ -34,7 +32,7 @@
#include "doxygen.h" // for Doxygen::indexList
#include "index.h" // for Doxygen::indexList
-static int determineInkscapeVersion(QDir &thisDir);
+static int determineInkscapeVersion(Dir &thisDir);
// Remove the temporary files
#define RM_TMP_FILES (true)
@@ -70,9 +68,9 @@ FormulaManager &FormulaManager::instance()
return fm;
}
-void FormulaManager::readFormulas(const char *dir,bool doCompare)
+void FormulaManager::readFormulas(const QCString &dir,bool doCompare)
{
- std::ifstream f(std::string(dir)+"/formula.repository");
+ std::ifstream f(dir.str()+"/formula.repository",std::ifstream::in);
if (f.is_open())
{
uint formulaCount=0;
@@ -87,7 +85,7 @@ void FormulaManager::readFormulas(const char *dir,bool doCompare)
size_t se=line.find(':'); // find name and text separator.
if (ei==std::string::npos || hi==std::string::npos || se==std::string::npos || hi>se || ei<hi || ei>se)
{
- warn_uncond("%s/formula.repository is corrupted at line %d!\n",dir,lineNr);
+ warn_uncond("%s/formula.repository is corrupted at line %d!\n",qPrint(dir),lineNr);
break;
}
else
@@ -104,7 +102,7 @@ void FormulaManager::readFormulas(const char *dir,bool doCompare)
formName = formName.substr(0,ei); // keep only the '\_form#<digits>' part
if (doCompare)
{
- int formId = stoi(formName.substr(hi+1));
+ int formId = std::stoi(formName.substr(hi+1));
std::string storedFormText = FormulaManager::instance().findFormula(formId);
if (storedFormText!=formText)
{
@@ -129,63 +127,64 @@ void FormulaManager::readFormulas(const char *dir,bool doCompare)
}
}
-void FormulaManager::generateImages(const char *path,Format format,HighDPI hd) const
+void FormulaManager::generateImages(const QCString &path,Format format,HighDPI hd) const
{
- QDir d(path);
+ Dir d(path.str());
// store the original directory
if (!d.exists())
{
- term("Output directory '%s' does not exist!\n",path);
+ term("Output directory '%s' does not exist!\n",qPrint(path));
}
- QCString oldDir = QDir::currentDirPath().utf8();
+ std::string oldDir = Dir::currentDirPath();
QCString macroFile = Config_getString(FORMULA_MACROFILE);
QCString stripMacroFile;
if (!macroFile.isEmpty())
{
- QFileInfo fi(macroFile);
- macroFile=fi.absFilePath().utf8();
- stripMacroFile = fi.fileName().data();
+ FileInfo fi(macroFile.str());
+ macroFile=fi.absFilePath();
+ stripMacroFile = fi.fileName();
}
// go to the html output directory (i.e. path)
- QDir::setCurrent(d.absPath());
- QDir thisDir;
+ Dir::setCurrent(d.absPath());
+ Dir thisDir;
// generate a latex file containing one formula per page.
QCString texName="_formulas.tex";
IntVector formulasToGenerate;
- QFile f(texName);
- if (f.open(IO_WriteOnly))
+ std::ofstream f(texName.str(),std::ofstream::out | std::ofstream::binary);
+ if (f.is_open())
{
- FTextStream t(&f);
- if (Config_getBool(LATEX_BATCHMODE)) t << "\\batchmode" << endl;
- t << "\\documentclass{article}" << endl;
- t << "\\usepackage{ifthen}" << endl;
- t << "\\usepackage{epsfig}" << endl; // for those who want to include images
- t << "\\usepackage[utf8]{inputenc}" << endl; // looks like some older distributions with newunicode package 1.1 need this option.
+ TextStream t(&f);
+ if (Config_getBool(LATEX_BATCHMODE)) t << "\\batchmode\n";
+ t << "\\documentclass{article}\n";
+ t << "\\usepackage{ifthen}\n";
+ t << "\\usepackage{epsfig}\n"; // for those who want to include images
+ t << "\\usepackage[utf8]{inputenc}\n"; // looks like some older distributions with newunicode package 1.1 need this option.
writeExtraLatexPackages(t);
writeLatexSpecialFormulaChars(t);
if (!macroFile.isEmpty())
{
copyFile(macroFile,stripMacroFile);
- t << "\\input{" << stripMacroFile << "}" << endl;
+ t << "\\input{" << stripMacroFile << "}\n";
}
- t << "\\pagestyle{empty}" << endl;
- t << "\\begin{document}" << endl;
+ t << "\\pagestyle{empty}\n";
+ t << "\\begin{document}\n";
for (int i=0; i<(int)p->formulas.size(); i++)
{
QCString resultName;
resultName.sprintf("form_%d.%s",i,format==Format::Vector?"svg":"png");
// only formulas for which no image exists are generated
- QFileInfo fi(resultName);
+ FileInfo fi(resultName.str());
if (!fi.exists())
{
// we force a pagebreak after each formula
- t << p->formulas[i].c_str() << endl << "\\pagebreak\n\n";
+ t << p->formulas[i].c_str() << "\n\\pagebreak\n\n";
formulasToGenerate.push_back(i);
}
Doxygen::indexList->addImageFile(resultName);
}
- t << "\\end{document}" << endl;
+ t << "\\end{document}\n";
+ t.flush();
f.close();
}
if (!formulasToGenerate.empty()) // there are new formulas
@@ -201,7 +200,7 @@ void FormulaManager::generateImages(const char *path,Format format,HighDPI hd) c
err("Problems running latex. Check your installation or look "
"for typos in _formulas.tex and check _formulas.log!\n");
Portable::sysTimerStop();
- QDir::setCurrent(oldDir);
+ Dir::setCurrent(oldDir);
return;
}
Portable::sysTimerStop();
@@ -215,36 +214,36 @@ void FormulaManager::generateImages(const char *path,Format format,HighDPI hd) c
// run dvips to convert the page with number pageIndex to an
// postscript file.
sprintf(args,"-q -D 600 -n 1 -p %d -o %s_tmp.ps _formulas.dvi",
- pageIndex,formBase.data());
+ pageIndex,qPrint(formBase));
Portable::sysTimerStart();
if (Portable::system("dvips",args)!=0)
{
err("Problems running dvips. Check your installation!\n");
Portable::sysTimerStop();
- QDir::setCurrent(oldDir);
+ Dir::setCurrent(oldDir);
return;
}
Portable::sysTimerStop();
// extract the bounding box for the postscript file
sprintf(args,"-q -dBATCH -dNOPAUSE -P- -dNOSAFER -sDEVICE=bbox %s_tmp.ps 2>%s_tmp.epsi",
- formBase.data(),formBase.data());
+ qPrint(formBase),qPrint(formBase));
Portable::sysTimerStart();
if (Portable::system(Portable::ghostScriptCommand(),args)!=0)
{
err("Problems running %s. Check your installation!\n",Portable::ghostScriptCommand());
Portable::sysTimerStop();
- QDir::setCurrent(oldDir);
+ Dir::setCurrent(oldDir);
return;
}
Portable::sysTimerStop();
// extract the bounding box info from the generate .epsi file
int x1=0,y1=0,x2=0,y2=0;
- QFileInfo fi(formBase+"_tmp.epsi");
+ FileInfo fi((formBase+"_tmp.epsi").str());
if (fi.exists())
{
- QString eps = fileToString(formBase+"_tmp.epsi");
+ QCString eps = fileToString(formBase+"_tmp.epsi");
int i = eps.find("%%BoundingBox:");
if (i!=-1)
{
@@ -252,7 +251,7 @@ void FormulaManager::generateImages(const char *path,Format format,HighDPI hd) c
}
else
{
- err("Couldn't extract bounding box from %s_tmp.epsi",formBase.data());
+ err("Couldn't extract bounding box from %s_tmp.epsi",qPrint(formBase));
}
}
//printf("Bounding box [%d %d %d %d]\n",x1,y1,x2,y2);
@@ -272,13 +271,13 @@ void FormulaManager::generateImages(const char *path,Format format,HighDPI hd) c
// crop the image to its bounding box
sprintf(args,"-q -dBATCH -dNOPAUSE -P- -dNOSAFER -sDEVICE=pdfwrite"
" -o %s_tmp.pdf -c \"[/CropBox [%d %d %d %d] /PAGES pdfmark\" -f %s_tmp.ps",
- formBase.data(),x1,y1,x2,y2,formBase.data());
+ qPrint(formBase),x1,y1,x2,y2,qPrint(formBase));
Portable::sysTimerStart();
if (Portable::system(Portable::ghostScriptCommand(),args)!=0)
{
err("Problems running %s. Check your installation!\n",Portable::ghostScriptCommand());
Portable::sysTimerStop();
- QDir::setCurrent(oldDir);
+ Dir::setCurrent(oldDir);
return;
}
Portable::sysTimerStop();
@@ -286,13 +285,13 @@ void FormulaManager::generateImages(const char *path,Format format,HighDPI hd) c
// if we have pdf2svg available use it to create a SVG image
if (Portable::checkForExecutable("pdf2svg"))
{
- sprintf(args,"%s_tmp.pdf form_%d.svg",formBase.data(),pageNum);
+ sprintf(args,"%s_tmp.pdf form_%d.svg",qPrint(formBase),pageNum);
Portable::sysTimerStart();
if (Portable::system("pdf2svg",args)!=0)
{
err("Problems running pdf2svg. Check your installation!\n");
Portable::sysTimerStop();
- QDir::setCurrent(oldDir);
+ Dir::setCurrent(oldDir);
return;
}
Portable::sysTimerStop();
@@ -303,23 +302,23 @@ void FormulaManager::generateImages(const char *path,Format format,HighDPI hd) c
if (inkscapeVersion == -1)
{
err("Problems determining the version of inkscape. Check your installation!\n");
- QDir::setCurrent(oldDir);
+ Dir::setCurrent(oldDir);
return;
}
else if (inkscapeVersion == 0)
{
- sprintf(args,"-l form_%d.svg -z %s_tmp.pdf 2>%s",pageNum,formBase.data(),Portable::devNull());
+ sprintf(args,"-l form_%d.svg -z %s_tmp.pdf 2>%s",pageNum,qPrint(formBase),Portable::devNull());
}
else // inkscapeVersion >= 1
{
- sprintf(args,"--export-type=svg --export-filename=form_%d.svg %s_tmp.pdf 2>%s",pageNum,formBase.data(),Portable::devNull());
+ sprintf(args,"--export-type=svg --export-filename=form_%d.svg %s_tmp.pdf 2>%s",pageNum,qPrint(formBase),Portable::devNull());
}
Portable::sysTimerStart();
if (Portable::system("inkscape",args)!=0)
{
err("Problems running inkscape. Check your installation!\n");
Portable::sysTimerStop();
- QDir::setCurrent(oldDir);
+ Dir::setCurrent(oldDir);
return;
}
Portable::sysTimerStop();
@@ -332,49 +331,42 @@ void FormulaManager::generateImages(const char *path,Format format,HighDPI hd) c
if (RM_TMP_FILES)
{
- thisDir.remove(formBase+"_tmp.pdf");
+ thisDir.remove(formBase.str()+"_tmp.pdf");
}
}
else // format==Format::Bitmap
{
// crop the image to its bounding box
sprintf(args,"-q -dBATCH -dNOPAUSE -P- -dNOSAFER -sDEVICE=eps2write"
- " -o %s_tmp.eps -f %s_tmp.ps",formBase.data(),formBase.data());
+ " -o %s_tmp.eps -f %s_tmp.ps",qPrint(formBase),qPrint(formBase));
Portable::sysTimerStart();
if (Portable::system(Portable::ghostScriptCommand(),args)!=0)
{
err("Problems running %s. Check your installation!\n",Portable::ghostScriptCommand());
Portable::sysTimerStop();
- QDir::setCurrent(oldDir);
+ Dir::setCurrent(oldDir);
return;
}
// read back %s_tmp.eps and replace
// bounding box values with x1,y1,x2,y2 and remove the HiResBoundingBox
- QFile epsIn(formBase+"_tmp.eps");
- QFile epsOut(formBase+"_tmp_corr.eps");
- if (epsIn.open(IO_ReadOnly) && epsOut.open(IO_WriteOnly))
+ std::ifstream epsIn(formBase.str()+"_tmp.eps",std::ifstream::in);
+ std::ofstream epsOut(formBase.str()+"_tmp_corr.eps",std::ofstream::out | std::ofstream::binary);
+ if (epsIn.is_open() && epsOut.is_open())
{
- int maxLineLen=100*1024;
- while (!epsIn.atEnd())
+ std::string line;
+ while (getline(epsIn,line))
{
- QCString buf(maxLineLen);
- FTextStream t(&epsOut);
- int numBytes = epsIn.readLine(buf.rawData(),maxLineLen);
- if (numBytes>0)
+ if (line.rfind("%%BoundingBox",0)==0)
+ {
+ epsOut << "%%BoundingBox: " << x1 << " " << y1 << " " << x2 << " " << y2 << "\n";
+ }
+ else if (line.rfind("%%HiResBoundingBox",0)==0) // skip this one
{
- buf.resize(numBytes+1);
- if (buf.startsWith("%%BoundingBox"))
- {
- t << "%%BoundingBox: " << x1 << " " << y1 << " " << x2 << " " << y2 << endl;
- }
- else if (buf.startsWith("%%HiResBoundingBox")) // skip this one
- {
- }
- else
- {
- t << buf;
- }
+ }
+ else
+ {
+ epsOut << line << "\n";
}
}
epsIn.close();
@@ -383,8 +375,8 @@ void FormulaManager::generateImages(const char *path,Format format,HighDPI hd) c
else
{
err("Problems correcting the eps files from %s_tmp.eps to %s_tmp_corr.eps\n",
- formBase.data(),formBase.data());
- QDir::setCurrent(oldDir);
+ qPrint(formBase),qPrint(formBase));
+ Dir::setCurrent(oldDir);
return;
}
@@ -396,29 +388,29 @@ void FormulaManager::generateImages(const char *path,Format format,HighDPI hd) c
Portable::sysTimerStop();
sprintf(args,"-q -dNOSAFER -dBATCH -dNOPAUSE -dEPSCrop -sDEVICE=pnggray -dGraphicsAlphaBits=4 -dTextAlphaBits=4 "
- "-r%d -sOutputFile=form_%d.png %s_tmp_corr.eps",(int)(scaleFactor*72),pageNum,formBase.data());
+ "-r%d -sOutputFile=form_%d.png %s_tmp_corr.eps",(int)(scaleFactor*72),pageNum,qPrint(formBase));
Portable::sysTimerStart();
if (Portable::system(Portable::ghostScriptCommand(),args)!=0)
{
err("Problems running %s. Check your installation!\n",Portable::ghostScriptCommand());
Portable::sysTimerStop();
- QDir::setCurrent(oldDir);
+ Dir::setCurrent(oldDir);
return;
}
Portable::sysTimerStop();
if (RM_TMP_FILES)
{
- thisDir.remove(formBase+"_tmp.eps");
- thisDir.remove(formBase+"_tmp_corr.eps");
+ thisDir.remove(formBase.str()+"_tmp.eps");
+ thisDir.remove(formBase.str()+"_tmp_corr.eps");
}
}
// remove intermediate image files
if (RM_TMP_FILES)
{
- thisDir.remove(formBase+"_tmp.ps");
- thisDir.remove(formBase+"_tmp.epsi");
+ thisDir.remove(formBase.str()+"_tmp.ps");
+ thisDir.remove(formBase.str()+"_tmp.epsi");
}
pageIndex++;
}
@@ -437,10 +429,10 @@ void FormulaManager::generateImages(const char *path,Format format,HighDPI hd) c
// generated images represent (we use this next time to avoid regeneration
// of the images, and to avoid forcing the user to delete all images in order
// to let a browser refresh the images).
- f.setName("formula.repository");
- if (f.open(IO_WriteOnly))
+ f.open("formula.repository",std::ofstream::out | std::ofstream::binary);
+ if (f.is_open())
{
- FTextStream t(&f);
+ TextStream t(&f);
for (int i=0; i<(int)p->formulas.size(); i++)
{
DisplaySize size = p->getDisplaySize(i);
@@ -449,12 +441,11 @@ void FormulaManager::generateImages(const char *path,Format format,HighDPI hd) c
{
t << "=" << size.width << "x" << size.height;
}
- t << ":" << p->formulas[i].c_str() << endl;
+ t << ":" << p->formulas[i].c_str() << "\n";
}
- f.close();
}
// reset the directory to the original location.
- QDir::setCurrent(oldDir);
+ Dir::setCurrent(oldDir);
}
void FormulaManager::clear()
@@ -498,7 +489,7 @@ FormulaManager::DisplaySize FormulaManager::displaySize(int formulaId) const
// helper function to detect and return the major version of inkscape.
// return -1 if the version cannot be determined.
-static int determineInkscapeVersion(QDir &thisDir)
+static int determineInkscapeVersion(Dir &thisDir)
{
// The command line interface (CLI) of Inkscape 1.0 has changed in comparison to
// previous versions. In order to invokine Inkscape, the used version is detected
@@ -521,36 +512,18 @@ static int determineInkscapeVersion(QDir &thisDir)
}
}
// read version file and determine major version
- QFile inkscapeVersionIn(inkscapeVersionFile);
- if (inkscapeVersionIn.open(IO_ReadOnly))
+ std::ifstream inkscapeVersionIn(inkscapeVersionFile.str(),std::ifstream::in);
+ if (inkscapeVersionIn.is_open())
{
- int maxLineLen=1024;
- while (!inkscapeVersionIn.atEnd())
+ std::string line;
+ while (getline(inkscapeVersionIn,line))
{
- QCString buf(maxLineLen);
- int numBytes = inkscapeVersionIn.readLine(buf.rawData(),maxLineLen);
- if (numBytes>0)
+ size_t dotPos = line.find('.');
+ if (line.rfind("Inkscape ",0)==0 && dotPos>0)
{
- buf.resize(numBytes+1);
- int dotPos = buf.find('.');
- if (buf.startsWith("Inkscape ") && dotPos>0)
- {
- // get major version
- bool ok;
- int version = buf.mid(9,dotPos-9).toInt(&ok);
- if (!ok)
- {
- Portable::sysTimerStop();
- return -1;
- }
- inkscapeVersion = version;
- break;
- }
- }
- else
- {
- Portable::sysTimerStop();
- return -1;
+ // get major version
+ inkscapeVersion = std::stoi(line.substr(9,dotPos-9));
+ break;
}
}
inkscapeVersionIn.close();
@@ -562,7 +535,7 @@ static int determineInkscapeVersion(QDir &thisDir)
}
if (RM_TMP_FILES)
{
- thisDir.remove(inkscapeVersionFile);
+ thisDir.remove(inkscapeVersionFile.str());
}
Portable::sysTimerStop();
}
diff --git a/src/formula.h b/src/formula.h
index 686cea2..9baeb24 100644
--- a/src/formula.h
+++ b/src/formula.h
@@ -20,7 +20,8 @@
#include <memory>
#include <string>
-#include <qcstring.h>
+
+#include "qcstring.h"
/*! Manager class to handle formulas */
class FormulaManager
@@ -35,10 +36,10 @@ class FormulaManager
enum class Format { Bitmap, Vector };
enum class HighDPI { On, Off };
static FormulaManager &instance();
- void readFormulas(const char *dir,bool doCompare=false);
+ void readFormulas(const QCString &dir,bool doCompare=false);
void clear();
int addFormula(const std::string &formulaText);
- void generateImages(const char *outputDir,Format format,HighDPI hd = HighDPI::Off) const;
+ void generateImages(const QCString &outputDir,Format format,HighDPI hd = HighDPI::Off) const;
std::string findFormula(int formulaId) const;
bool hasFormulas() const;
DisplaySize displaySize(int formulaId) const;
diff --git a/src/fortrancode.h b/src/fortrancode.h
index b8cac31..7601a39 100644
--- a/src/fortrancode.h
+++ b/src/fortrancode.h
@@ -32,11 +32,11 @@ class FortranCodeParser : public CodeParserInterface
FortranCodeParser(FortranFormat format=FortranFormat_Unknown);
virtual ~FortranCodeParser();
void parseCode(CodeOutputInterface &codeOutIntf,
- const char *scopeName,
+ const QCString &scopeName,
const QCString &input,
SrcLangExt lang,
bool isExampleBlock,
- const char *exampleName=0,
+ const QCString &exampleName=QCString(),
FileDef *fileDef=0,
int startLine=-1,
int endLine=-1,
diff --git a/src/fortrancode.l b/src/fortrancode.l
index fbc1a64..c7c4d89 100644
--- a/src/fortrancode.l
+++ b/src/fortrancode.l
@@ -124,12 +124,12 @@ class Scope
struct fortrancodeYY_state
{
QCString docBlock; //!< contents of all lines of a documentation block
- QCString currentModule=0; //!< name of the current enclosing module
- UseMap useMembers; //!< info about used modules
+ QCString currentModule=QCString(); //!< name of the current enclosing module
+ UseMap useMembers; //!< info about used modules
UseEntry useEntry; //!< current use statement info
std::vector<Scope> scopeStack;
bool isExternal = false;
- QCString str=""; //!> contents of fortran string
+ QCString str=QCString(); //!< contents of fortran string
CodeOutputInterface * code = 0;
@@ -181,21 +181,22 @@ static bool getFortranTypeDefs(const QCString &tname, const QCString &moduleName
static void endFontClass(yyscan_t yyscanner);
static void startFontClass(yyscan_t yyscanner,const char *s);
static void setCurrentDoc(yyscan_t yyscanner,const QCString &anchor);
-static void addToSearchIndex(yyscan_t yyscanner,const char *text);
+static void addToSearchIndex(yyscan_t yyscanner,const QCString &text);
static void startCodeLine(yyscan_t yyscanner);
static void endCodeLine(yyscan_t yyscanner);
static void nextCodeLine(yyscan_t yyscanner);
-static void codifyLines(yyscan_t yyscanner,const char *text);
+static void codifyLines(yyscan_t yyscanner,const QCString &text);
static void writeMultiLineCodeLink(yyscan_t yyscanner,CodeOutputInterface &ol,
- Definition *d,const char *text);
+ Definition *d,const QCString &text);
static bool getGenericProcedureLink(yyscan_t yyscanner,const ClassDef *cd,
- const char *memberText,
+ const QCString &memberText,
CodeOutputInterface &ol);
static bool getLink(yyscan_t yyscanner,const UseMap &useMap, // map with used modules
- const char *memberText, // exact member text
+ const QCString &memberText, // exact member text
CodeOutputInterface &ol,
- const char *text);
-static void generateLink(yyscan_t yyscanner,CodeOutputInterface &ol, char *lname);
+ const QCString &text);
+static void generateLink(yyscan_t yyscanner,CodeOutputInterface &ol, const QCString &lname);
+static void generateLink(yyscan_t yyscanner,CodeOutputInterface &ol, const char *lname);
static int countLines(yyscan_t yyscanner);
static void startScope(yyscan_t yyscanner);
static void endScope(yyscan_t yyscanner);
@@ -342,7 +343,7 @@ LANGUAGE_BIND_SPEC BIND{BS}"("{BS}C{BS}(,{BS}NAME{BS}"="{BS}"\""(.*)"\""{BS})?")
BEGIN(UseOnly);
}
<Use>{ID} {
- QCString tmp = yytext;
+ QCString tmp(yytext);
tmp = tmp.lower();
yyextra->insideBody=TRUE;
generateLink(yyscanner,*yyextra->code, yytext);
@@ -359,7 +360,7 @@ LANGUAGE_BIND_SPEC BIND{BS}"("{BS}C{BS}(,{BS}NAME{BS}"="{BS}"\""(.*)"\""{BS})?")
yyextra->contLineNr++;
YY_FTN_RESET}
<UseOnly>{ID} {
- QCString tmp = yytext;
+ QCString tmp(yytext);
tmp = tmp.lower();
yyextra->useEntry.onlyNames.push_back(tmp);
yyextra->insideBody=TRUE;
@@ -430,10 +431,10 @@ LANGUAGE_BIND_SPEC BIND{BS}"("{BS}C{BS}(,{BS}NAME{BS}"="{BS}"\""(.*)"\""{BS})?")
yy_pop_state(yyscanner);
}
<ClassName>({ACCESS_SPEC}|ABSTRACT|EXTENDS)/[,:( ] { //| variable declaration
- startFontClass(yyscanner,"keyword");
- yyextra->code->codify(yytext);
- endFontClass(yyscanner);
- }
+ startFontClass(yyscanner,"keyword");
+ yyextra->code->codify(QCString(yytext));
+ endFontClass(yyscanner);
+ }
<ClassName>\n { // interface may be without name
yy_pop_state(yyscanner);
YY_FTN_REJECT;
@@ -504,18 +505,18 @@ LANGUAGE_BIND_SPEC BIND{BS}"("{BS}C{BS}(,{BS}NAME{BS}"="{BS}"\""(.*)"\""{BS})?")
yy_push_state(YY_START,yyscanner);
BEGIN(Declaration);
startFontClass(yyscanner,"keywordtype");
- yyextra->code->codify(yytext);
+ yyextra->code->codify(QCString(yytext));
endFontClass(yyscanner);
}
<Start>{TYPE_SPEC}/[,:( ] {
- QCString typ = yytext;
+ QCString typ(yytext);
typ = removeRedundantWhiteSpace(typ.lower());
if (typ.startsWith("real")) YY_FTN_REJECT;
if (typ == "type" || typ == "class" || typ == "procedure") yyextra->inTypeDecl = 1;
yy_push_state(YY_START,yyscanner);
BEGIN(Declaration);
startFontClass(yyscanner,"keywordtype");
- yyextra->code->codify(yytext);
+ yyextra->code->codify(QCString(yytext));
endFontClass(yyscanner);
}
<Start>{ATTR_SPEC} {
@@ -526,20 +527,20 @@ LANGUAGE_BIND_SPEC BIND{BS}"("{BS}C{BS}(,{BS}NAME{BS}"="{BS}"\""(.*)"\""{BS})?")
yyextra->isExternal = true;
}
startFontClass(yyscanner,"keywordtype");
- yyextra->code->codify(yytext);
+ yyextra->code->codify(QCString(yytext));
endFontClass(yyscanner);
}
<Declaration>({TYPE_SPEC}|{ATTR_SPEC})/[,:( ] { //| variable declaration
if (QCString(yytext) == "external") yyextra->isExternal = true;
startFontClass(yyscanner,"keywordtype");
- yyextra->code->codify(yytext);
+ yyextra->code->codify(QCString(yytext));
endFontClass(yyscanner);
}
<Declaration>{ID} { // local var
if (yyextra->isFixedForm && yy_my_start == 1)
{
startFontClass(yyscanner,"comment");
- yyextra->code->codify(yytext);
+ yyextra->code->codify(QCString(yytext));
endFontClass(yyscanner);
}
else if (yyextra->currentMemberDef &&
@@ -552,13 +553,13 @@ LANGUAGE_BIND_SPEC BIND{BS}"("{BS}C{BS}(,{BS}NAME{BS}"="{BS}"\""(.*)"\""{BS})?")
}
else
{
- yyextra->code->codify(yytext);
- addLocalVar(yyscanner,yytext);
+ yyextra->code->codify(QCString(yytext));
+ addLocalVar(yyscanner,QCString(yytext));
}
}
<Declaration>{BS}("=>"|"="){BS} { // Procedure binding
BEGIN(DeclarationBinding);
- yyextra->code->codify(yytext);
+ yyextra->code->codify(QCString(yytext));
}
<DeclarationBinding>{ID} { // Type bound procedure link
generateLink(yyscanner,*yyextra->code, yytext);
@@ -566,17 +567,17 @@ LANGUAGE_BIND_SPEC BIND{BS}"("{BS}C{BS}(,{BS}NAME{BS}"="{BS}"\""(.*)"\""{BS})?")
}
<Declaration>[(] { // start of array or type / class specification
yyextra->bracketCount++;
- yyextra->code->codify(yytext);
+ yyextra->code->codify(QCString(yytext));
}
<Declaration>[)] { // end array specification
yyextra->bracketCount--;
if (!yyextra->bracketCount) yyextra->inTypeDecl = 0;
- yyextra->code->codify(yytext);
+ yyextra->code->codify(QCString(yytext));
}
<Declaration,DeclarationBinding>"&" { // continuation line
- yyextra->code->codify(yytext);
+ yyextra->code->codify(QCString(yytext));
if (!yyextra->isFixedForm)
{
yy_push_state(YY_START,yyscanner);
@@ -637,12 +638,12 @@ LANGUAGE_BIND_SPEC BIND{BS}"("{BS}C{BS}(,{BS}NAME{BS}"="{BS}"\""(.*)"\""{BS})?")
startFontClass(yyscanner,"keywordtype");
yyextra->code->codify(QCString(yytext).stripWhiteSpace());
endFontClass(yyscanner);
- yyextra->code->codify(yytext + 4);
+ yyextra->code->codify(QCString(yytext + 4));
}
else
{
yyextra->insideBody=TRUE;
- generateLink(yyscanner,*yyextra->code, yytext);
+ generateLink(yyscanner,*yyextra->code,yytext);
yyextra->insideBody=FALSE;
}
}
@@ -740,7 +741,7 @@ LANGUAGE_BIND_SPEC BIND{BS}"("{BS}C{BS}(,{BS}NAME{BS}"="{BS}"\""(.*)"\""{BS})?")
/*------ variable references? -------------------------------------*/
<Start>"%"{BS}{ID} { // ignore references to elements
- yyextra->code->codify(yytext);
+ yyextra->code->codify(QCString(yytext));
}
<Start>{ID} {
yyextra->insideBody=TRUE;
@@ -791,7 +792,7 @@ LANGUAGE_BIND_SPEC BIND{BS}"("{BS}C{BS}(,{BS}NAME{BS}"="{BS}"\""(.*)"\""{BS})?")
yyextra->contLineNr++;
YY_FTN_RESET
}
-<*>^{BS}"type"{BS}"=" { yyextra->code->codify(yytext); }
+<*>^{BS}"type"{BS}"=" { yyextra->code->codify(QCString(yytext)); }
<*>[\x80-\xFF]* { // keep utf8 characters together...
if (yyextra->isFixedForm && yy_my_start > fixedCommentAfter)
@@ -801,7 +802,7 @@ LANGUAGE_BIND_SPEC BIND{BS}"("{BS}C{BS}(,{BS}NAME{BS}"="{BS}"\""(.*)"\""{BS})?")
}
else
{
- yyextra->code->codify(yytext);
+ yyextra->code->codify(QCString(yytext));
}
}
<*>. {
@@ -815,11 +816,11 @@ LANGUAGE_BIND_SPEC BIND{BS}"("{BS}C{BS}(,{BS}NAME{BS}"="{BS}"\""(.*)"\""{BS})?")
}
else
{
- yyextra->code->codify(yytext);
+ yyextra->code->codify(QCString(yytext));
}
}
<*>{LOG_OPER} { // Fortran logical comparison keywords
- yyextra->code->codify(yytext);
+ yyextra->code->codify(QCString(yytext));
}
<*><<EOF>> {
if (YY_START == DocBlock) {
@@ -870,7 +871,7 @@ static void startFontClass(yyscan_t yyscanner,const char *s)
if (!yyextra->currentFontClass || !s || strcmp(yyextra->currentFontClass,s))
{
endFontClass(yyscanner);
- yyextra->code->startFontClass(s);
+ yyextra->code->startFontClass(QCString(s));
yyextra->currentFontClass=s;
}
}
@@ -891,7 +892,7 @@ static void setCurrentDoc(yyscan_t yyscanner,const QCString &anchor)
}
}
-static void addToSearchIndex(yyscan_t yyscanner,const char *text)
+static void addToSearchIndex(yyscan_t yyscanner,const QCString &text)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
if (Doxygen::searchIndex)
@@ -914,7 +915,7 @@ static void startCodeLine(yyscan_t yyscanner)
//lineAnchor.sprintf("l%05d",yyextra->yyLineNr);
const Definition *d = yyextra->sourceFileDef->getSourceDefinition(yyextra->yyLineNr);
- //printf("startCodeLine %d d=%s\n", yyextra->yyLineNr,d ? d->name().data() : "<null>");
+ //printf("startCodeLine %d d=%s\n", yyextra->yyLineNr,d ? qPrint(d->name()) : "<null>");
if (!yyextra->includeCodeFragment && d)
{
yyextra->currentDefinition = d;
@@ -934,19 +935,19 @@ static void startCodeLine(yyscan_t yyscanner)
{
yyextra->code->writeLineNumber(d->getReference(),
d->getOutputFileBase(),
- 0,yyextra->yyLineNr);
+ QCString(),yyextra->yyLineNr);
setCurrentDoc(yyscanner,lineAnchor);
}
}
else
{
- yyextra->code->writeLineNumber(0,0,0,yyextra->yyLineNr);
+ yyextra->code->writeLineNumber(QCString(),QCString(),QCString(),yyextra->yyLineNr);
}
}
yyextra->code->startCodeLine(yyextra->sourceFileDef);
if (yyextra->currentFontClass)
{
- yyextra->code->startFontClass(yyextra->currentFontClass);
+ yyextra->code->startFontClass(QCString(yyextra->currentFontClass));
}
}
@@ -973,11 +974,12 @@ static void nextCodeLine(yyscan_t yyscanner)
/*! write a code fragment 'text' that may span multiple lines, inserting
* line numbers for each line.
*/
-static void codifyLines(yyscan_t yyscanner,const char *text)
+static void codifyLines(yyscan_t yyscanner,const QCString &text)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
//printf("codifyLines(%d,\"%s\")\n",yyextra->yyLineNr,text);
- const char *p=text,*sp=p;
+ if (text.isEmpty()) return;
+ const char *p=text.data(),*sp=p;
char c;
bool done=FALSE;
while (!done)
@@ -991,13 +993,13 @@ static void codifyLines(yyscan_t yyscanner,const char *text)
char *tmp = (char*)malloc(l+1);
memcpy(tmp,sp,l);
tmp[l]='\0';
- yyextra->code->codify(tmp);
+ yyextra->code->codify(QCString(tmp));
free(tmp);
nextCodeLine(yyscanner);
}
else
{
- yyextra->code->codify(sp);
+ yyextra->code->codify(QCString(sp));
done=TRUE;
}
}
@@ -1008,7 +1010,7 @@ static void codifyLines(yyscan_t yyscanner,const char *text)
* split into multiple links with the same destination, one for each line.
*/
static void writeMultiLineCodeLink(yyscan_t yyscanner,CodeOutputInterface &ol,
- Definition *d,const char *text)
+ Definition *d,const QCString &text)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
static bool sourceTooltips = Config_getBool(SOURCE_TOOLTIPS);
@@ -1022,18 +1024,17 @@ static void writeMultiLineCodeLink(yyscan_t yyscanner,CodeOutputInterface &ol,
tooltip = d->briefDescriptionAsTooltip();
}
bool done=FALSE;
- char *p=(char *)text;
+ const char *p=text.data();
while (!done)
{
- char *sp=p;
+ const char *sp=p;
char c;
while ((c=*p++) && c!='\n') { }
if (c=='\n')
{
yyextra->yyLineNr++;
- *(p-1)='\0';
//printf("writeCodeLink(%s,%s,%s,%s)\n",ref,file,anchor,sp);
- ol.writeCodeLink(ref,file,anchor,sp,tooltip);
+ ol.writeCodeLink(ref,file,anchor,QCString(sp,p-sp-1),tooltip);
nextCodeLine(yyscanner);
}
else
@@ -1083,7 +1084,7 @@ static bool getFortranTypeDefs(const QCString &tname, const QCString &moduleName
//cout << "=== type found in global module" << endl;
return TRUE;
}
- else if (moduleName && (cd= Doxygen::classLinkedMap->find(moduleName+"::"+tname)))
+ else if (!moduleName.isEmpty() && (cd= Doxygen::classLinkedMap->find(moduleName+"::"+tname)))
{
//cout << "=== type found in local module" << endl;
return TRUE;
@@ -1200,7 +1201,7 @@ static MemberDef *getFortranDefs(yyscan_t yyscanner,const QCString &memberName,
@todo implementation
*/
static bool getGenericProcedureLink(yyscan_t yyscanner,const ClassDef *cd,
- const char *memberText,
+ const QCString &memberText,
CodeOutputInterface &ol)
{
(void)cd;
@@ -1210,9 +1211,9 @@ static bool getGenericProcedureLink(yyscan_t yyscanner,const ClassDef *cd,
}
static bool getLink(yyscan_t yyscanner,const UseMap &useMap, // dictionary with used modules
- const char *memberText, // exact member text
+ const QCString &memberText, // exact member text
CodeOutputInterface &ol,
- const char *text)
+ const QCString &text)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
MemberDef *md=0;
@@ -1234,8 +1235,8 @@ static bool getLink(yyscan_t yyscanner,const UseMap &useMap, // dictionary with
std::lock_guard<std::mutex> lock(g_docCrossReferenceMutex);
addDocCrossReference(toMemberDefMutable(yyextra->currentMemberDef),toMemberDefMutable(md));
}
- writeMultiLineCodeLink(yyscanner,ol,md,text ? text : memberText);
- addToSearchIndex(yyscanner, text ? text : memberText);
+ writeMultiLineCodeLink(yyscanner,ol,md,!text.isEmpty() ? text : memberText);
+ addToSearchIndex(yyscanner, !text.isEmpty() ? text : memberText);
return TRUE;
}
}
@@ -1243,36 +1244,36 @@ static bool getLink(yyscan_t yyscanner,const UseMap &useMap, // dictionary with
}
-static void generateLink(yyscan_t yyscanner,CodeOutputInterface &ol, char *lname)
+static void generateLink(yyscan_t yyscanner,CodeOutputInterface &ol, const QCString &lname)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
ClassDef *cd=0;
NamespaceDef *nsd=0;
- QCString tmp = lname;
- tmp = removeRedundantWhiteSpace(tmp.lower());
+ QCString name = lname;
+ name = removeRedundantWhiteSpace(name.lower());
// check if lowercase lname is a linkable type or interface
- if ( (getFortranTypeDefs(tmp, yyextra->currentModule, cd, yyextra->useMembers)) && cd->isLinkable() )
+ if ( (getFortranTypeDefs(name, yyextra->currentModule, cd, yyextra->useMembers)) && cd->isLinkable() )
{
if ( (cd->compoundType() == ClassDef::Class) && // was Entry::INTERFACE_SEC) &&
- (getGenericProcedureLink(yyscanner, cd, tmp, ol)) )
+ (getGenericProcedureLink(yyscanner, cd, name, ol)) )
{
//cout << "=== generic procedure resolved" << endl;
}
else
{ // write type or interface link
- writeMultiLineCodeLink(yyscanner, ol,cd,tmp);
- addToSearchIndex(yyscanner, tmp);
+ writeMultiLineCodeLink(yyscanner, ol,cd,name);
+ addToSearchIndex(yyscanner, name);
}
}
// check for module
- else if ( (getFortranNamespaceDefs(tmp, nsd)) && nsd->isLinkable() )
+ else if ( (getFortranNamespaceDefs(name, nsd)) && nsd->isLinkable() )
{ // write module link
- writeMultiLineCodeLink(yyscanner,ol,nsd,tmp);
- addToSearchIndex(yyscanner,tmp);
+ writeMultiLineCodeLink(yyscanner,ol,nsd,name);
+ addToSearchIndex(yyscanner,name);
}
// check for function/variable
- else if (getLink(yyscanner,yyextra->useMembers, tmp, ol, tmp))
+ else if (getLink(yyscanner,yyextra->useMembers, name, ol, name))
{
//cout << "=== found link for lowercase " << lname << endl;
}
@@ -1280,12 +1281,17 @@ static void generateLink(yyscan_t yyscanner,CodeOutputInterface &ol, char *lname
{
// nothing found, just write out the word
//startFontClass("charliteral"); //test
- codifyLines(yyscanner,tmp);
+ codifyLines(yyscanner,name);
//endFontClass(yyscanner); //test
- addToSearchIndex(yyscanner,tmp);
+ addToSearchIndex(yyscanner,name);
}
}
+static void generateLink(yyscan_t yyscanner,CodeOutputInterface &ol, const char *lname)
+{
+ generateLink(yyscanner,ol,QCString(lname));
+}
+
/*! counts the number of lines in the input */
static int countLines(yyscan_t yyscanner)
{
@@ -1423,11 +1429,11 @@ void FortranCodeParser::resetCodeParserState()
}
void FortranCodeParser::parseCode(CodeOutputInterface & codeOutIntf,
- const char * scopeName,
+ const QCString & scopeName,
const QCString & input,
SrcLangExt /*lang*/,
bool isExampleBlock,
- const char * exampleName,
+ const QCString & exampleName,
FileDef * fileDef,
int startLine,
int endLine,
@@ -1449,9 +1455,9 @@ void FortranCodeParser::parseCode(CodeOutputInterface & codeOutIntf,
// const MemberDef *,bool,const Definition *searchCtx,
// bool collectXRefs, FortranFormat format)
if (input.isEmpty()) return;
- printlex(yy_flex_debug, TRUE, __FILE__, fileDef ? fileDef->fileName().data(): NULL);
+ printlex(yy_flex_debug, TRUE, __FILE__, fileDef ? qPrint(fileDef->fileName()): NULL);
yyextra->code = &codeOutIntf;
- yyextra->inputString = input;
+ yyextra->inputString = input.data();
yyextra->inputPosition = 0;
yyextra->isFixedForm = recognizeFixedForm(input,p->format);
yyextra->contLineNr = 1;
@@ -1480,11 +1486,11 @@ void FortranCodeParser::parseCode(CodeOutputInterface & codeOutIntf,
if (isExampleBlock && fileDef==0)
{
// create a dummy filedef for the example
- yyextra->sourceFileDef = createFileDef("",exampleName);
+ yyextra->sourceFileDef = createFileDef(QCString(),exampleName);
}
if (yyextra->sourceFileDef)
{
- setCurrentDoc(yyscanner,"l00001");
+ setCurrentDoc(yyscanner,QCString("l00001"));
}
yyextra->currentDefinition = 0;
yyextra->currentMemberDef = 0;
@@ -1514,7 +1520,7 @@ void FortranCodeParser::parseCode(CodeOutputInterface & codeOutIntf,
// write the tooltips
TooltipManager::instance().writeTooltips(codeOutIntf);
- printlex(yy_flex_debug, FALSE, __FILE__, fileDef ? fileDef->fileName().data(): NULL);
+ printlex(yy_flex_debug, FALSE, __FILE__, fileDef ? qPrint(fileDef->fileName()): NULL);
}
//---------------------------------------------------------
diff --git a/src/fortranscanner.h b/src/fortranscanner.h
index 0fbba89..bf286c3 100644
--- a/src/fortranscanner.h
+++ b/src/fortranscanner.h
@@ -29,12 +29,12 @@ class FortranOutlineParser : public OutlineParserInterface
public:
FortranOutlineParser(FortranFormat format=FortranFormat_Unknown);
~FortranOutlineParser();
- void parseInput(const char *fileName,
+ void parseInput(const QCString &fileName,
const char *fileBuf,
const std::shared_ptr<Entry> &root,
ClangTUParser *clangParser);
bool needsPreprocessing(const QCString &extension) const;
- void parsePrototype(const char *text);
+ void parsePrototype(const QCString &text);
private:
struct Private;
diff --git a/src/fortranscanner.l b/src/fortranscanner.l
index cf8a0bb..328612a 100755
--- a/src/fortranscanner.l
+++ b/src/fortranscanner.l
@@ -56,8 +56,6 @@
#include <assert.h>
#include <ctype.h>
-#include <qfile.h>
-
#include "fortranscanner.h"
#include "entry.h"
#include "message.h"
@@ -208,8 +206,8 @@ struct fortranscannerYY_state
//-----------------------------------------------------------------------------
static int getAmpersandAtTheStart(const char *buf, int length);
static int getAmpOrExclAtTheEnd(const char *buf, int length, char ch);
-static QCString extractFromParens(const QCString name);
-static QCString extractBind(const QCString name);
+static QCString extractFromParens(const QCString &name);
+static QCString extractBind(const QCString &name);
static yy_size_t yyread(yyscan_t yyscanner,char *buf,yy_size_t max_size);
@@ -218,8 +216,8 @@ static void handleCommentBlock(yyscan_t yyscanner,const QCString &doc,bool brief
static void subrHandleCommentBlock(yyscan_t yyscanner,const QCString &doc,bool brief);
static void subrHandleCommentBlockResult(yyscan_t yyscanner,const QCString &doc,bool brief);
static void addCurrentEntry(yyscan_t yyscanner,bool case_insens);
-static void addModule(yyscan_t yyscanner,const char *name, bool isModule=FALSE);
-static void addSubprogram(yyscan_t yyscanner,const char *text);
+static void addModule(yyscan_t yyscanner,const QCString &name=QCString(), bool isModule=FALSE);
+static void addSubprogram(yyscan_t yyscanner,const QCString &text);
static void addInterface(yyscan_t yyscanner,QCString name, InterfaceType type);
static Argument *getParameter(yyscan_t yyscanner,const QCString &name);
static void scanner_abort(yyscan_t yyscanner);
@@ -228,7 +226,7 @@ static void startScope(yyscan_t yyscanner,Entry *scope);
static bool endScope(yyscan_t yyscanner,Entry *scope, bool isGlobalRoot=FALSE);
static void resolveModuleProcedures(yyscan_t yyscanner,Entry *current_root);
static void truncatePrepass(yyscan_t yyscanner,int index);
-static void pushBuffer(yyscan_t yyscanner,QCString &buffer);
+static void pushBuffer(yyscan_t yyscanner,const QCString &buffer);
static void popBuffer(yyscan_t yyscanner);
static const CommentInPrepass* locatePrepassComment(yyscan_t yyscanner,int from, int to);
static void updateVariablePrepassComment(yyscan_t yyscanner,int from, int to);
@@ -380,6 +378,7 @@ SCOPENAME ({ID}{BS}"::"{BS})*
if (YY_START != Prepass)
{
yyextra->comments.clear();
+ yyextra->inputStringPrepass=QCString();
yy_push_state(Prepass,yyscanner);
}
@@ -447,7 +446,7 @@ SCOPENAME ({ID}{BS}"::"{BS})*
}
}
<StrIgnore>.?/\n { yy_pop_state(yyscanner); // comment ends with endline character
- DBG_CTX((stderr,"end comment %d %s\n",yyextra->lineNr,yyextra->debugStr.data()));
+ DBG_CTX((stderr,"end comment %d %s\n",yyextra->lineNr,qPrint(yyextra->debugStr)));
} // comment line ends
<StrIgnore>. { yyextra->debugStr+=yytext; }
@@ -457,7 +456,7 @@ SCOPENAME ({ID}{BS}"::"{BS})*
<Start,ModuleBody,SubprogBody>"use"{BS_} {
if (YY_START == Start)
{
- addModule(yyscanner,NULL);
+ addModule(yyscanner);
yy_push_state(ModuleBody,yyscanner); //anon program
}
yy_push_state(Use,yyscanner);
@@ -557,7 +556,7 @@ SCOPENAME ({ID}{BS}"::"{BS})*
<Start>^{BS}{CONTAINS}/({BS}|\n|!|;) {
if (YY_START == Start)
{
- addModule(yyscanner,NULL);
+ addModule(yyscanner);
yy_push_state(ModuleBodyContains,yyscanner); //anon program
}
}
@@ -614,11 +613,11 @@ SCOPENAME ({ID}{BS}"::"{BS})*
}
}
<Module>{ID} {
- addModule(yyscanner,yytext, TRUE);
+ addModule(yyscanner, QCString(yytext), TRUE);
BEGIN(ModuleBody);
}
<Program>{ID} {
- addModule(yyscanner,yytext, FALSE);
+ addModule(yyscanner, QCString(yytext), FALSE);
BEGIN(ModuleBody);
}
@@ -636,7 +635,7 @@ SCOPENAME ({ID}{BS}"::"{BS})*
<Start,ModuleBody>^{BS}type/[^a-z0-9_] {
if (YY_START == Start)
{
- addModule(yyscanner,NULL);
+ addModule(yyscanner,QCString());
yy_push_state(ModuleBody,yyscanner); //anon program
}
@@ -795,7 +794,7 @@ private {
/* variable declaration starts */
if (YY_START == Start)
{
- addModule(yyscanner,NULL);
+ addModule(yyscanner);
yy_push_state(ModuleBody,yyscanner); //anon program
}
yy_push_state(AttributeList,yyscanner);
@@ -804,7 +803,7 @@ private {
/* external can be a "type" or an attribute */
if (YY_START == Start)
{
- addModule(yyscanner,NULL);
+ addModule(yyscanner);
yy_push_state(ModuleBody,yyscanner); //anon program
}
QCString tmp = yytext;
@@ -837,8 +836,8 @@ private {
}
{ATTR_SPEC}. { /* update yyextra->current yyextra->modifiers when it is an ATTR_SPEC and not a variable name */
/* buyyextra->625519 */
- QChar chr = yytext[(int)yyleng-1];
- if (chr.isLetter() || chr.isDigit() || (chr == '_'))
+ char chr = yytext[(int)yyleng-1];
+ if (isId(chr))
{
yyextra->colNr -= (int)yyleng;
REJECT;
@@ -992,7 +991,7 @@ private {
<Variable>";".*"\n" { yyextra->currentModifiers = SymbolModifiers();
yy_pop_state(yyscanner); // end variable declaration list
yyextra->docBlock.resize(0);
- yyextra->inputStringSemi =(const char*)(QCString(" \n") + QCString(yytext+1)).data();
+ yyextra->inputStringSemi = " \n"+QCString(yytext+1);
yyextra->lineNr--;
pushBuffer(yyscanner,yyextra->inputStringSemi);
}
@@ -1000,7 +999,7 @@ private {
if (YY_START == Variable) REJECT; // Just be on the safe side
if (YY_START == String) REJECT; // ";" ignored in strings
if (YY_START == StrIgnore) REJECT; // ";" ignored in regular yyextra->comments
- yyextra->inputStringSemi =(const char*)(QCString(" \n") + QCString(yytext+1)).data();
+ yyextra->inputStringSemi = " \n"+QCString(yytext+1);
yyextra->lineNr--;
pushBuffer(yyscanner,yyextra->inputStringSemi);
}
@@ -1032,11 +1031,11 @@ private {
yy_pop_state(yyscanner); // end initialization
if (yyextra->last_enum)
{
- yyextra->last_enum->initializer= yyextra->initializer;
+ yyextra->last_enum->initializer.str(yyextra->initializer.str());
}
else
{
- if (yyextra->vtype == V_VARIABLE) yyextra->last_entry->initializer= yyextra->initializer;
+ if (yyextra->vtype == V_VARIABLE) yyextra->last_entry->initializer.str(yyextra->initializer.str());
}
}
else
@@ -1048,11 +1047,11 @@ private {
yy_pop_state(yyscanner); // end initialization
if (yyextra->last_enum)
{
- yyextra->last_enum->initializer= yyextra->initializer;
+ yyextra->last_enum->initializer.str(yyextra->initializer.str());
}
else
{
- if (yyextra->vtype == V_VARIABLE) yyextra->last_entry->initializer= yyextra->initializer;
+ if (yyextra->vtype == V_VARIABLE) yyextra->last_entry->initializer.str(yyextra->initializer.str());
}
yyextra->colNr -= 1;
unput(*yytext);
@@ -1062,7 +1061,7 @@ private {
<*>{BS}"enum"{BS}","{BS}"bind"{BS}"("{BS}"c"{BS}")"{BS} {
if (YY_START == Start)
{
- addModule(yyscanner,NULL);
+ addModule(yyscanner);
yy_push_state(ModuleBody,yyscanner); //anon program
}
@@ -1177,7 +1176,7 @@ private {
<Parameterlist>{ID} {
//yyextra->current->type not yet available
QCString param = yytext;
- // std::cout << "3=========> got parameter " << param << std::endl;
+ // std::cout << "3=========> got parameter " << param << "\n";
yyextra->current->args += param;
Argument arg;
arg.name = param;
@@ -1755,7 +1754,7 @@ const char* prepassFixedForm(const char* contents, int *hasContLine)
return newContents;
}
-static void pushBuffer(yyscan_t yyscanner,QCString& buffer)
+static void pushBuffer(yyscan_t yyscanner,const QCString &buffer)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
if (yyextra->includeStackCnt <= yyextra->includeStackPtr)
@@ -1764,10 +1763,9 @@ static void pushBuffer(yyscan_t yyscanner,QCString& buffer)
yyextra->includeStack = (YY_BUFFER_STATE *)realloc(yyextra->includeStack, yyextra->includeStackCnt * sizeof(YY_BUFFER_STATE));
}
yyextra->includeStack[yyextra->includeStackPtr++] = YY_CURRENT_BUFFER;
- yy_switch_to_buffer(yy_scan_string(buffer,yyscanner),yyscanner);
+ yy_switch_to_buffer(yy_scan_string(buffer.data(),yyscanner),yyscanner);
- DBG_CTX((stderr, "--PUSH--%s", (const char *)buffer));
- buffer = NULL;
+ DBG_CTX((stderr, "--PUSH--%s", qPrint(buffer)));
}
static void popBuffer(yyscan_t yyscanner)
@@ -1816,7 +1814,7 @@ void resolveModuleProcedures(yyscan_t yyscanner,Entry *current_root)
}
/*! Extracts string which resides within parentheses of provided string. */
-static QCString extractFromParens(const QCString name)
+static QCString extractFromParens(const QCString &name)
{
QCString extracted = name;
int start = extracted.find("(");
@@ -1836,7 +1834,7 @@ static QCString extractFromParens(const QCString name)
}
/*! remove useless spaces from bind statement */
-static QCString extractBind(const QCString name)
+static QCString extractBind(const QCString &name)
{
QCString parensPart = extractFromParens(name);
if (parensPart.length() == 1)
@@ -2201,8 +2199,8 @@ static bool endScope(yyscan_t yyscanner,Entry *scope, bool isGlobalRoot)
// iterate all symbol yyextra->modifiers of the scope
for (const auto &kv : mdfsMap)
{
- //cout<<it.key()<<": "<<it.data()<<endl;
- Argument *arg = findArgument(scope, kv.first);
+ //cout<<it.key()<<": "<<qPrint(it)<<endl;
+ Argument *arg = findArgument(scope, QCString(kv.first));
if (arg)
{
@@ -2317,30 +2315,30 @@ static void addCurrentEntry(yyscan_t yyscanner,bool case_insens)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
if (case_insens) yyextra->current->name = yyextra->current->name.lower();
- //printf("===Adding entry %s to %s\n", yyextra->current->name.data(), yyextra->current_root->name.data());
+ //printf("===Adding entry %s to %s\n", qPrint(yyextra->current->name), qPrint(yyextra->current_root->name));
yyextra->last_entry = yyextra->current;
yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
initEntry(yyscanner);
}
-static void addModule(yyscan_t yyscanner,const char *name, bool isModule)
+static void addModule(yyscan_t yyscanner,const QCString &name, bool isModule)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
- DBG_CTX((stderr, "0=========> got module %s\n", name));
+ DBG_CTX((stderr, "0=========> got module %s\n", qPrint(name)));
if (isModule)
yyextra->current->section = Entry::NAMESPACE_SEC;
else
yyextra->current->section = Entry::FUNCTION_SEC;
- if (name!=NULL)
+ if (!name.isEmpty())
{
yyextra->current->name = name;
}
else
{
QCString fname = yyextra->fileName;
- int index = QMAX(fname.findRev('/'), fname.findRev('\\'));
+ int index = std::max(fname.findRev('/'), fname.findRev('\\'));
fname = fname.right(fname.length()-index-1);
fname = fname.prepend("__").append("__");
yyextra->current->name = fname;
@@ -2355,10 +2353,10 @@ static void addModule(yyscan_t yyscanner,const char *name, bool isModule)
}
-static void addSubprogram(yyscan_t yyscanner,const char *text)
+static void addSubprogram(yyscan_t yyscanner,const QCString &text)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
- DBG_CTX((stderr,"1=========> got subprog, type: %s\n",text));
+ DBG_CTX((stderr,"1=========> got subprog, type: %s\n",qPrint(text)));
yyextra->subrCurrent.push_back(yyextra->current);
yyextra->current->section = Entry::FUNCTION_SEC ;
QCString subtype = text; subtype=subtype.lower().stripWhiteSpace();
@@ -2382,7 +2380,7 @@ static void addInterface(yyscan_t yyscanner,QCString name, InterfaceType type)
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
if (YY_START == Start)
{
- addModule(yyscanner,NULL);
+ addModule(yyscanner);
yy_push_state(ModuleBody,yyscanner); //anon program
}
@@ -2428,7 +2426,7 @@ static void addInterface(yyscan_t yyscanner,QCString name, InterfaceType type)
static Argument *getParameter(yyscan_t yyscanner,const QCString &name)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
- // std::cout<<"addFortranParameter(): "<<name<<" DOCS:"<<(docs.isNull()?QCString("null"):docs)<<std::endl;
+ // std::cout<<"addFortranParameter(): "<<name<<" DOCS:"<<(docs.isNull()?QCString("null"):docs)<<"\n";
Argument *ret = 0;
for (Argument &a:yyextra->current_root->argList)
{
@@ -2469,7 +2467,7 @@ static void handleCommentBlock(yyscan_t yyscanner,const QCString &doc,bool brief
yyextra->docBlockInBody = FALSE;
return;
}
- DBG_CTX((stderr,"call parseCommentBlock [%s]\n",doc.data()));
+ DBG_CTX((stderr,"call parseCommentBlock [%s]\n",qPrint(doc)));
int lineNr = brief ? yyextra->current->briefLine : yyextra->current->docLine;
int position=0;
bool needsEntry = FALSE;
@@ -2541,8 +2539,8 @@ static void subrHandleCommentBlock(yyscan_t yyscanner,const QCString &doc,bool b
else
{
// something different specified, give warning and leave error.
- warn(yyextra->fileName,yyextra->lineNr, "%s", ("Routine: " + yyextra->current->name + yyextra->current->args +
- " inconsistency between intent attribute and documentation for parameter: " + yyextra->argName).data());
+ warn(yyextra->fileName,yyextra->lineNr, "Routine: %s%s inconsistency between intent attribute and documentation for parameter %s:",
+ qPrint(yyextra->current->name),qPrint(yyextra->current->args),qPrint(yyextra->argName));
handleCommentBlock(yyscanner,QCString("\n\n@param ") + directionParam[dir1] + " " +
yyextra->argName + " " + loc_doc,brief);
}
@@ -2565,8 +2563,8 @@ static void subrHandleCommentBlock(yyscan_t yyscanner,const QCString &doc,bool b
}
else
{
- warn(yyextra->fileName,yyextra->lineNr, "%s", ("Routine: " + yyextra->current->name + yyextra->current->args +
- " inconsistency between intent attribute and documentation for parameter: " + yyextra->argName).data());
+ warn(yyextra->fileName,yyextra->lineNr, "Routine: %s%s inconsistency between intent attribute and documentation for parameter %s:",
+ qPrint(yyextra->current->name),qPrint(yyextra->current->args),qPrint(yyextra->argName));
handleCommentBlock(yyscanner,QCString("\n\n@param ") + directionParam[dir1] + " " +
yyextra->argName + " " + loc_doc,brief);
}
@@ -2587,8 +2585,8 @@ static void subrHandleCommentBlock(yyscan_t yyscanner,const QCString &doc,bool b
}
else
{
- warn(yyextra->fileName,yyextra->lineNr, "%s", ("Routine: " + yyextra->current->name + yyextra->current->args +
- " inconsistency between intent attribute and documentation for parameter: " + yyextra->argName).data());
+ warn(yyextra->fileName,yyextra->lineNr, "Routine: %s%s inconsistency between intent attribute and documentation for parameter %s:",
+ qPrint(yyextra->current->name),qPrint(yyextra->current->args),qPrint(yyextra->argName));
handleCommentBlock(yyscanner,QCString("\n\n@param ") + directionParam[dir1] + " " +
yyextra->argName + " " + loc_doc,brief);
}
@@ -2636,20 +2634,19 @@ static void subrHandleCommentBlockResult(yyscan_t yyscanner,const QCString &doc,
//----------------------------------------------------------------------------
-static void parseMain(yyscan_t yyscanner, const char *fileName,const char *fileBuf,
+static void parseMain(yyscan_t yyscanner, const QCString &fileName,const char *fileBuf,
const std::shared_ptr<Entry> &rt, FortranFormat format)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
- char *tmpBuf = NULL;
+ char *tmpBuf = nullptr;
initParser(yyscanner);
-
if (fileBuf==0 || fileBuf[0]=='\0') return;
yyextra->defaultProtection = Public;
yyextra->inputString = fileBuf;
yyextra->inputPosition = 0;
- yyextra->inputStringPrepass = NULL;
+ yyextra->inputStringPrepass = nullptr;
yyextra->inputPositionPrepass = 0;
//yyextra->anonCount = 0; // don't reset per file
@@ -2660,13 +2657,13 @@ static void parseMain(yyscan_t yyscanner, const char *fileName,const char *fileB
if (yyextra->isFixedForm)
{
- msg("Prepassing fixed form of %s\n", fileName);
+ msg("Prepassing fixed form of %s\n", qPrint(fileName));
//printf("---strlen=%d\n", strlen(fileBuf));
//clock_t start=clock();
//printf("Input fixed form string:\n%s\n", fileBuf);
//printf("===========================\n");
- yyextra->inputString = prepassFixedForm(fileBuf, NULL);
+ yyextra->inputString = prepassFixedForm(fileBuf, nullptr);
Debug::print(Debug::FortranFixed2Free,0,"======== Fixed to Free format =========\n---- Input fixed form string ------- \n%s\n", fileBuf);
Debug::print(Debug::FortranFixed2Free,0,"---- Resulting free form string ------- \n%s\n", yyextra->inputString);
//printf("Resulting free form string:\n%s\n", yyextra->inputString);
@@ -2686,7 +2683,7 @@ static void parseMain(yyscan_t yyscanner, const char *fileName,const char *fileB
yyextra->lineNr= 1 ;
yyextra->fileName = fileName;
- msg("Parsing file %s...\n",yyextra->fileName.data());
+ msg("Parsing file %s...\n",qPrint(yyextra->fileName));
yyextra->global_scope = rt.get();
startScope(yyscanner,rt.get()); // implies yyextra->current_root = rt
@@ -2717,7 +2714,7 @@ static void parseMain(yyscan_t yyscanner, const char *fileName,const char *fileB
//debugCompounds(rt); //debug
- rt->program.resize(0);
+ rt->program.str(std::string());
//delete yyextra->current; yyextra->current=0;
yyextra->moduleProcedures.clear();
if (tmpBuf)
@@ -2762,19 +2759,19 @@ FortranOutlineParser::~FortranOutlineParser()
{
}
-void FortranOutlineParser::parseInput(const char *fileName,
- const char *fileBuf,
- const std::shared_ptr<Entry> &root,
- ClangTUParser * /*clangParser*/)
+void FortranOutlineParser::parseInput(const QCString &fileName,
+ const char *fileBuf,
+ const std::shared_ptr<Entry> &root,
+ ClangTUParser * /*clangParser*/)
{
struct yyguts_t *yyg = (struct yyguts_t*)p->yyscanner;
yyextra->thisParser = this;
- printlex(yy_flex_debug, TRUE, __FILE__, fileName);
+ printlex(yy_flex_debug, TRUE, __FILE__, qPrint(fileName));
::parseMain(p->yyscanner,fileName,fileBuf,root,p->format);
- printlex(yy_flex_debug, FALSE, __FILE__, fileName);
+ printlex(yy_flex_debug, FALSE, __FILE__, qPrint(fileName));
}
bool FortranOutlineParser::needsPreprocessing(const QCString &extension) const
@@ -2782,11 +2779,10 @@ bool FortranOutlineParser::needsPreprocessing(const QCString &extension) const
return extension!=extension.lower(); // use preprocessor only for upper case extensions
}
-void FortranOutlineParser::parsePrototype(const char *text)
+void FortranOutlineParser::parsePrototype(const QCString &text)
{
struct yyguts_t *yyg = (struct yyguts_t*)p->yyscanner;
- QCString buffer = QCString(text);
- pushBuffer(p->yyscanner,buffer);
+ pushBuffer(p->yyscanner,text);
yyextra->parsingPrototype = TRUE;
BEGIN(Prototype);
fortranscannerYYlex(p->yyscanner);
@@ -2800,7 +2796,7 @@ static void scanner_abort(yyscan_t yyscanner)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
fprintf(stderr,"********************************************************************\n");
- fprintf(stderr,"Error in file %s line: %d, state: %d(%s)\n",yyextra->fileName.data(),yyextra->lineNr,YY_START,stateToString(YY_START));
+ fprintf(stderr,"Error in file %s line: %d, state: %d(%s)\n",qPrint(yyextra->fileName),yyextra->lineNr,YY_START,stateToString(YY_START));
fprintf(stderr,"********************************************************************\n");
bool start=FALSE;
diff --git a/src/ftextstream.cpp b/src/ftextstream.cpp
deleted file mode 100644
index 3038af3..0000000
--- a/src/ftextstream.cpp
+++ /dev/null
@@ -1,260 +0,0 @@
-#include "ftextstream.h"
-#include <qfile.h>
-
-//----------------------------------------------------------------------------
-
-class QGStringBuffer : public QIODevice
-{
- public:
- QGStringBuffer( QGString* str );
- ~QGStringBuffer();
- bool open( int m );
- void close();
- void flush();
- uint size() const;
- int at() const;
- bool at( int pos );
- int readBlock( char *, uint) { return -1; }
- int writeBlock( const char *p, uint len );
- int getch() { return -1; }
- int putch( int ch );
- int ungetch( int ) { return -1; }
-
- protected:
- QGString* m_str;
-
- private: // Disabled copy constructor and operator=
- QGStringBuffer( const QGStringBuffer & );
- QGStringBuffer &operator=( const QGStringBuffer & );
-};
-
-QGStringBuffer::QGStringBuffer( QGString* str ) : m_str(str)
-{
- //printf("QGStringBuffer::QGStringBuffer(%p)\n",str);
-}
-
-QGStringBuffer::~QGStringBuffer()
-{
-}
-
-bool QGStringBuffer::open( int m )
-{
- if ( !m_str )
- {
-#if defined(CHECK_STATE)
- qWarning( "QGStringBuffer::open: No string" );
-#endif
- return FALSE;
- }
- if ( isOpen() )
- { // buffer already open
-#if defined(CHECK_STATE)
- qWarning( "QGStringBuffer::open: Buffer already open" );
-#endif
- return FALSE;
- }
- setMode( m );
- if ( m & IO_Truncate )
- { // truncate buffer
- m_str->truncate( 0 );
- }
- if ( m & IO_Append )
- { // append to end of buffer
- ioIndex = m_str->length();
- }
- else
- {
- ioIndex = 0;
- }
- setState( IO_Open );
- setStatus( 0 );
- return TRUE;
-}
-
-void QGStringBuffer::close()
-{
- if ( isOpen() )
- {
- setFlags( IO_Direct );
- ioIndex = 0;
- }
-}
-
-void QGStringBuffer::flush()
-{
-}
-
-uint QGStringBuffer::size() const
-{
- return m_str ? m_str->length() : 0;
-}
-
-int QGStringBuffer::at() const
-{
- return ioIndex;
-}
-
-bool QGStringBuffer::at( int pos )
-{
-#if defined(CHECK_STATE)
- if ( !isOpen() )
- {
- qWarning( "QGStringBuffer::at: Buffer is not open" );
- return FALSE;
- }
-#endif
- if ( (uint)pos >= m_str->length() )
- {
-#if defined(CHECK_RANGE)
- qWarning( "QGStringBuffer::at: Index %d out of range", pos );
-#endif
- return FALSE;
- }
-
- ioIndex = pos;
- return TRUE;
-}
-
-int QGStringBuffer::writeBlock( const char *p, uint len )
-{
- //printf("QGStringBuffer::writeBlock(%p,%d) m_str=%p ioIndex=%d\n",p,len,
- // m_str,ioIndex);
- m_str->enlarge(ioIndex+len+1);
- memcpy(m_str->data()+ioIndex,p,len);
- ioIndex+=len;
- m_str->data()[ioIndex]='\0';
- m_str->setLen(ioIndex);
- return len;
-}
-
-int QGStringBuffer::putch( int ch )
-{
- //printf("QGStringBuffer::putch(%d) m_str=%p ioIndex=%d\n",
- // ch,m_str,ioIndex);
- m_str->enlarge(ioIndex+2);
- m_str->data()[ioIndex] = (char)ch;
- ioIndex++;
- m_str->data()[ioIndex] = '\0';
- m_str->setLen(ioIndex);
- return ch;
-}
-
-
-//----------------------------------------------------------------------------
-
-FTextStream::FTextStream()
-{
- m_dev = 0;
- m_owndev = FALSE;
-}
-
-FTextStream::FTextStream( QIODevice *dev )
-{
- m_dev = dev;
- m_owndev = FALSE;
-}
-
-FTextStream::FTextStream( QGString *s )
-{
- m_dev = new QGStringBuffer(s);
- ((QGStringBuffer*)m_dev)->open( IO_WriteOnly );
- m_owndev = TRUE;
-}
-
-FTextStream::FTextStream( FILE *fh )
-{
- m_dev = new QFile;
- ((QFile *)m_dev)->open( IO_WriteOnly, fh);
- m_owndev = TRUE;
-}
-
-FTextStream::~FTextStream()
-{
- if (m_owndev) delete m_dev;
- m_dev = 0;
-}
-
-QIODevice *FTextStream::device() const
-{
- return m_dev;
-}
-
-void FTextStream::setDevice( QIODevice *dev )
-{
- if (m_owndev)
- {
- delete m_dev;
- m_owndev = FALSE;
- }
- m_dev = dev;
-}
-
-void FTextStream::unsetDevice()
-{
- setDevice(0);
-}
-
-FTextStream &FTextStream::output_int( ulong n, bool neg )
-{
- char buf[20];
- char *p = &buf[19];
- *p = '\0';
- if ( neg )
- {
- n = (ulong)(-(long)n);
- }
- do
- {
- *--p = ((int)(n%10)) + '0';
- n /= 10;
- } while ( n );
- if ( neg ) *--p = '-';
- return operator<<(p);
-}
-
-FTextStream &FTextStream::operator<<( signed short i )
-{
- return output_int( i, i < 0 );
-}
-
-FTextStream &FTextStream::operator<<( unsigned short i )
-{
- return output_int( i, FALSE );
-}
-
-FTextStream &FTextStream::operator<<( signed int i )
-{
- return output_int( i, i < 0 );
-}
-
-FTextStream &FTextStream::operator<<( unsigned int i )
-{
- return output_int( i, FALSE );
-}
-
-FTextStream &FTextStream::operator<<( signed long i )
-{
- return output_int( i, i < 0 );
-}
-
-FTextStream &FTextStream::operator<<( unsigned long i )
-{
- return output_int( i, FALSE );
-}
-
-FTextStream &FTextStream::operator<<( float f )
-{
- return *this << (double)f;
-}
-
-FTextStream &FTextStream::operator<<( double d )
-{
- char buf[64];
- sprintf(buf,"%f",d);
- return *this << buf;
-}
-
-
-
-
-
diff --git a/src/ftextstream.h b/src/ftextstream.h
deleted file mode 100644
index 8e56174..0000000
--- a/src/ftextstream.h
+++ /dev/null
@@ -1,76 +0,0 @@
-#ifndef FTEXTSTREAM_H
-#define FTEXTSTREAM_H
-
-#include <stdio.h>
-
-#include <qiodevice.h>
-#include <qgstring.h>
-
-/** @brief Simplified and optimized version of QTextStream */
-class FTextStream
-{
- public:
- FTextStream();
- FTextStream( QIODevice * );
- FTextStream( QGString * );
- FTextStream( FILE * );
- virtual ~FTextStream();
-
- QIODevice *device() const;
- void setDevice( QIODevice * );
- void unsetDevice();
-
- FTextStream &operator<<( char );
- FTextStream &operator<<( const char *);
- FTextStream &operator<<( const QCString & );
- FTextStream &operator<<( signed short );
- FTextStream &operator<<( unsigned short );
- FTextStream &operator<<( signed int );
- FTextStream &operator<<( unsigned int );
- FTextStream &operator<<( signed long );
- FTextStream &operator<<( unsigned long );
- FTextStream &operator<<( float );
- FTextStream &operator<<( double );
-
- private:
- QIODevice *m_dev;
- bool m_owndev;
- FTextStream &output_int( ulong n, bool neg );
-
- private: // Disabled copy constructor and operator=
-#if defined(Q_DISABLE_COPY)
- FTextStream( const FTextStream & );
- FTextStream &operator=( const FTextStream & );
-#endif
-};
-
-inline FTextStream &FTextStream::operator<<( char c)
-{
- if (m_dev) m_dev->putch(c);
- return *this;
-}
-
-inline FTextStream &FTextStream::operator<<( const char* s)
-{
- uint len = qstrlen( s );
- if (m_dev) m_dev->writeBlock( s, len );
- return *this;
-}
-
-inline FTextStream &FTextStream::operator<<( const QCString &s)
-{
- if (m_dev) m_dev->writeBlock( s, s.length() );
- return *this;
-}
-
-typedef FTextStream & (*FTSFUNC)(FTextStream &);// manipulator function
-
-inline FTextStream &operator<<( FTextStream &s, FTSFUNC f )
-{ return (*f)( s ); }
-
-inline FTextStream &endl( FTextStream & s)
-{
- return s << '\n';
-}
-
-#endif // FTEXTSTREAM_H
diff --git a/src/ftvhelp.cpp b/src/ftvhelp.cpp
index f411a60..24ed957 100644
--- a/src/ftvhelp.cpp
+++ b/src/ftvhelp.cpp
@@ -20,7 +20,6 @@
#include <stdio.h>
#include <stdlib.h>
-#include <qfileinfo.h>
#include <algorithm>
#include "ftvhelp.h"
@@ -68,8 +67,8 @@ const char *JAVASCRIPT_LICENSE_TEXT = R"LIC(/*
struct FTVNode
{
- FTVNode(bool dir,const char *r,const char *f,const char *a,
- const char *n,bool sepIndex,bool navIndex,const Definition *df)
+ FTVNode(bool dir,const QCString &r,const QCString &f,const QCString &a,
+ const QCString &n,bool sepIndex,bool navIndex,const Definition *df)
: isLast(TRUE), isDir(dir),ref(r),file(f),anchor(a),name(n), index(0),
parent(0), separateIndex(sepIndex), addToNavIndex(navIndex),
def(df) {}
@@ -209,10 +208,10 @@ void FTVHelp::decContentsDepth()
* \param def Definition corresponding to this entry
*/
void FTVHelp::addContentsItem(bool isDir,
- const char *name,
- const char *ref,
- const char *file,
- const char *anchor,
+ const QCString &name,
+ const QCString &ref,
+ const QCString &file,
+ const QCString &anchor,
bool separateIndex,
bool addToNavIndex,
const Definition *def
@@ -280,7 +279,7 @@ QCString FTVHelp::generateIndentLabel(FTVNode *n,int level)
return result;
}
-void FTVHelp::generateIndent(FTextStream &t, FTVNode *n,bool opened)
+void FTVHelp::generateIndent(TextStream &t, FTVNode *n,bool opened)
{
int indent=0;
FTVNode *p = n->parent;
@@ -300,10 +299,10 @@ void FTVHelp::generateIndent(FTextStream &t, FTVNode *n,bool opened)
}
}
-void FTVHelp::generateLink(FTextStream &t,FTVNode *n)
+void FTVHelp::generateLink(TextStream &t,FTVNode *n)
{
//printf("FTVHelp::generateLink(ref=%s,file=%s,anchor=%s\n",
- // n->ref.data(),n->file.data(),n->anchor.data());
+ // qPrint(n->ref),qPrint(n->file),qPrint(n->anchor));
bool setTarget = FALSE;
if (n->file.isEmpty()) // no link
{
@@ -345,15 +344,15 @@ void FTVHelp::generateLink(FTextStream &t,FTVNode *n)
}
}
-static void generateBriefDoc(FTextStream &t,const Definition *def)
+static void generateBriefDoc(TextStream &t,const Definition *def)
{
QCString brief = def->briefDescription(TRUE);
- //printf("*** %p: generateBriefDoc(%s)='%s'\n",def,def->name().data(),brief.data());
+ //printf("*** %p: generateBriefDoc(%s)='%s'\n",def,qPrint(def->name()),qPrint(brief));
if (!brief.isEmpty())
{
DocNode *root = validatingParseDoc(def->briefFile(),def->briefLine(),
def,0,brief,FALSE,FALSE,
- 0,TRUE,TRUE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),TRUE,TRUE,Config_getBool(MARKDOWN_SUPPORT));
QCString relPath = relativePathToRoot(def->getOutputFileBase());
HtmlCodeGenerator htmlGen(t,relPath);
HtmlDocVisitor *visitor = new HtmlDocVisitor(t,htmlGen,def);
@@ -384,7 +383,7 @@ static char compoundIcon(const ClassDef *cd)
return icon;
}
-void FTVHelp::generateTree(FTextStream &t, const std::vector<FTVNode*> &nl,int level,int maxLevel,int &index)
+void FTVHelp::generateTree(TextStream &t, const std::vector<FTVNode*> &nl,int level,int maxLevel,int &index)
{
for (const auto &n : nl)
{
@@ -438,7 +437,7 @@ void FTVHelp::generateTree(FTextStream &t, const std::vector<FTVNode*> &nl,int l
{
generateBriefDoc(t,n->def);
}
- t << "</td></tr>" << endl;
+ t << "</td></tr>\n";
folderId++;
generateTree(t,n->children,level+1,maxLevel,index);
}
@@ -480,6 +479,10 @@ void FTVHelp::generateTree(FTextStream &t, const std::vector<FTVNode*> &nl,int l
char icon=compoundIcon(toClassDef(n->def));
t << "<span class=\"icona\"><span class=\"icon\">" << icon << "</span></span>";
}
+ else if (n->def && n->def->definitionType()==Definition::TypeConcept)
+ {
+ t << "<span class=\"icona\"><span class=\"icon\">R</span></span>";
+ }
else if (n->def && n->def->definitionType()==Definition::TypeDir)
{
t << "<span class=\"iconfclosed\"></span>";
@@ -498,7 +501,7 @@ void FTVHelp::generateTree(FTextStream &t, const std::vector<FTVNode*> &nl,int l
{
generateBriefDoc(t,n->def);
}
- t << "</td></tr>" << endl;
+ t << "</td></tr>\n";
}
}
}
@@ -535,7 +538,7 @@ static bool dupOfParent(const FTVNode *n)
return FALSE;
}
-static void generateJSLink(FTextStream &t,const FTVNode *n)
+static void generateJSLink(TextStream &t,const FTVNode *n)
{
if (n->file.isEmpty()) // no link
{
@@ -558,7 +561,7 @@ static QCString convertFileId2Var(const QCString &fileId)
return substitute(varId,"-","_");
}
-static bool generateJSTree(NavIndexEntryList &navIndex,FTextStream &t,
+static bool generateJSTree(NavIndexEntryList &navIndex,TextStream &t,
const std::vector<FTVNode*> &nl,int level,bool &first)
{
static QCString htmlOutput = Config_getString(HTML_OUTPUT);
@@ -568,13 +571,13 @@ static bool generateJSTree(NavIndexEntryList &navIndex,FTextStream &t,
for (const auto &n : nl)
{
// terminate previous entry
- if (!first) t << "," << endl;
+ if (!first) t << ",\n";
first=FALSE;
// start entry
if (!found)
{
- t << "[" << endl;
+ t << "[\n";
}
found=TRUE;
@@ -608,7 +611,7 @@ static bool generateJSTree(NavIndexEntryList &navIndex,FTextStream &t,
if (!n->children.empty()) // write children to separate file for dynamic loading
{
QCString fileId = n->file;
- if (n->anchor)
+ if (!n->anchor.isEmpty())
{
fileId+="_"+n->anchor;
}
@@ -616,14 +619,16 @@ static bool generateJSTree(NavIndexEntryList &navIndex,FTextStream &t,
{
fileId+="_dup";
}
- QFile f(htmlOutput+"/"+fileId+".js");
- if (f.open(IO_WriteOnly))
+ QCString fileName = htmlOutput+"/"+fileId+".js";
+ std::ofstream f(fileName.str(),std::ofstream::out | std::ofstream::binary);
+ if (f.is_open())
{
- FTextStream tt(&f);
- tt << "var " << convertFileId2Var(fileId) << " =" << endl;
+ TextStream tt(&f);
+ tt << "var " << convertFileId2Var(fileId) << " =\n";
generateJSTree(navIndex,tt,n->children,1,firstChild);
- tt << endl << "];";
+ tt << "\n];";
}
+ f.close();
t << "\"" << fileId << "\" ]";
}
else // no children
@@ -640,7 +645,7 @@ static bool generateJSTree(NavIndexEntryList &navIndex,FTextStream &t,
if (emptySection)
t << "null ]";
else
- t << endl << indentStr << " ] ]";
+ t << "\n" << indentStr << " ] ]";
}
}
return found;
@@ -649,17 +654,17 @@ static bool generateJSTree(NavIndexEntryList &navIndex,FTextStream &t,
static void generateJSNavTree(const std::vector<FTVNode*> &nodeList)
{
QCString htmlOutput = Config_getString(HTML_OUTPUT);
- QFile f(htmlOutput+"/navtreedata.js");
+ std::ofstream f(htmlOutput.str()+"/navtreedata.js",std::ofstream::out | std::ofstream::binary);
NavIndexEntryList navIndex;
- if (f.open(IO_WriteOnly) /*&& fidx.open(IO_WriteOnly)*/)
+ if (f.is_open())
{
- //FTextStream tidx(&fidx);
- //tidx << "var NAVTREEINDEX =" << endl;
- //tidx << "{" << endl;
- FTextStream t(&f);
+ TextStream t(&f);
+ //TextStream tidx(&fidx);
+ //tidx << "var NAVTREEINDEX =\n";
+ //tidx << "{\n";
t << JAVASCRIPT_LICENSE_TEXT;
- t << "var NAVTREE =" << endl;
- t << "[" << endl;
+ t << "var NAVTREE =\n";
+ t << "[\n";
t << " [ ";
QCString projName = Config_getString(PROJECT_NAME);
if (projName.isEmpty())
@@ -689,28 +694,25 @@ static void generateJSNavTree(const std::vector<FTVNode*> &nodeList)
generateJSTree(navIndex,t,nodeList,1,first);
if (first)
- t << "]" << endl;
+ t << "]\n";
else
- t << endl << " ] ]" << endl;
- t << "];" << endl << endl;
+ t << "\n ] ]\n";
+ t << "];\n\n";
// write the navigation index (and sub-indices)
std::sort(navIndex.begin(),navIndex.end(),[](const auto &n1,const auto &n2)
- { return qstrcmp(n1.url,n2.url)<0; });
+ { return !n1.url.isEmpty() && (n2.url.isEmpty() || (n1.url<n2.url)); });
int subIndex=0;
int elemCount=0;
const int maxElemCount=250;
- //QFile fidx(htmlOutput+"/navtreeindex.js");
- QFile fsidx(htmlOutput+"/navtreeindex0.js");
- if (/*fidx.open(IO_WriteOnly) &&*/ fsidx.open(IO_WriteOnly))
+ std::ofstream tsidx(htmlOutput.str()+"/navtreeindex0.js",std::ofstream::out | std::ofstream::binary);
+ if (tsidx.is_open())
{
- //FTextStream tidx(&fidx);
- FTextStream tsidx(&fsidx);
- t << "var NAVTREEINDEX =" << endl;
- t << "[" << endl;
- tsidx << "var NAVTREEINDEX" << subIndex << " =" << endl;
- tsidx << "{" << endl;
+ t << "var NAVTREEINDEX =\n";
+ t << "[\n";
+ tsidx << "var NAVTREEINDEX" << subIndex << " =\n";
+ tsidx << "{\n";
first=TRUE;
auto it = navIndex.begin();
while (it!=navIndex.end())
@@ -720,7 +722,7 @@ static void generateJSNavTree(const std::vector<FTVNode*> &nodeList)
{
if (!first)
{
- t << "," << endl;
+ t << ",\n";
}
else
{
@@ -731,27 +733,27 @@ static void generateJSNavTree(const std::vector<FTVNode*> &nodeList)
tsidx << "\"" << e.url << "\":[" << e.path << "]";
++it;
if (it!=navIndex.end() && elemCount<maxElemCount-1) tsidx << ","; // not last entry
- tsidx << endl;
+ tsidx << "\n";
elemCount++;
if (it!=navIndex.end() && elemCount>=maxElemCount) // switch to new sub-index
{
- tsidx << "};" << endl;
+ tsidx << "};\n";
elemCount=0;
- fsidx.close();
+ tsidx.close();
subIndex++;
- fsidx.setName(htmlOutput+"/navtreeindex"+QCString().setNum(subIndex)+".js");
- if (!fsidx.open(IO_WriteOnly)) break;
- tsidx.setDevice(&fsidx);
- tsidx << "var NAVTREEINDEX" << subIndex << " =" << endl;
- tsidx << "{" << endl;
+ QCString fileName = htmlOutput+"/navtreeindex"+QCString().setNum(subIndex)+".js";
+ tsidx.open(fileName.str(),std::ofstream::out | std::ofstream::binary);
+ if (!tsidx.is_open()) break;
+ tsidx << "var NAVTREEINDEX" << subIndex << " =\n";
+ tsidx << "{\n";
}
}
- tsidx << "};" << endl;
- t << endl << "];" << endl;
+ tsidx << "};\n";
+ t << "\n];\n";
}
- t << endl << "var SYNCONMSG = '" << theTranslator->trPanelSynchronisationTooltip(FALSE) << "';";
- t << endl << "var SYNCOFFMSG = '" << theTranslator->trPanelSynchronisationTooltip(TRUE) << "';";
+ t << "\nvar SYNCONMSG = '" << theTranslator->trPanelSynchronisationTooltip(FALSE) << "';";
+ t << "\nvar SYNCOFFMSG = '" << theTranslator->trPanelSynchronisationTooltip(TRUE) << "';";
}
ResourceMgr::instance().copyResource("navtree.js",htmlOutput);
}
@@ -783,7 +785,7 @@ void FTVHelp::generateTreeViewScripts()
}
// write tree inside page
-void FTVHelp::generateTreeViewInline(FTextStream &t)
+void FTVHelp::generateTreeViewInline(TextStream &t)
{
int preferredNumEntries = Config_getInt(HTML_INDEX_NUM_ENTRIES);
t << "<div class=\"directory\">\n";
diff --git a/src/ftvhelp.h b/src/ftvhelp.h
index b04247c..196b01c 100644
--- a/src/ftvhelp.h
+++ b/src/ftvhelp.h
@@ -27,10 +27,9 @@
#include <vector>
#include "index.h"
-class QFile;
class Definition;
+class TextStream;
struct FTVNode;
-class FTextStream;
/** A class that generates a dynamic tree view side panel.
*/
@@ -44,26 +43,26 @@ class FTVHelp : public IndexIntf
void incContentsDepth();
void decContentsDepth();
void addContentsItem(bool isDir,
- const char *name,
- const char *ref,
- const char *file,
- const char *anchor,
+ const QCString &name,
+ const QCString &ref,
+ const QCString &file,
+ const QCString &anchor,
bool separateIndex,
bool addToNavIndex,
const Definition *def);
- void addIndexItem(const Definition *,const MemberDef *,const char *,const char *) {}
- void addIndexFile(const char *) {}
- void addImageFile(const char *) {}
- void addStyleSheetFile(const char *) {}
+ void addIndexItem(const Definition *,const MemberDef *,const QCString &,const QCString &) {}
+ void addIndexFile(const QCString &) {}
+ void addImageFile(const QCString &) {}
+ void addStyleSheetFile(const QCString &) {}
void generateTreeView();
- void generateTreeViewInline(FTextStream &t);
+ void generateTreeViewInline(TextStream &t);
static void generateTreeViewImages();
void generateTreeViewScripts();
private:
- void generateTree(FTextStream &t,const std::vector<FTVNode*> &nl,int level,int maxLevel,int &index);
+ void generateTree(TextStream &t,const std::vector<FTVNode*> &nl,int level,int maxLevel,int &index);
QCString generateIndentLabel(FTVNode *n,int level);
- void generateIndent(FTextStream &t,FTVNode *n,bool opened);
- void generateLink(FTextStream &t,FTVNode *n);
+ void generateIndent(TextStream &t,FTVNode *n,bool opened);
+ void generateLink(TextStream &t,FTVNode *n);
std::vector< std::vector<FTVNode*> > m_indentNodes;
int m_indent;
bool m_topLevelIndex;
diff --git a/src/groupdef.cpp b/src/groupdef.cpp
index 095069e..a1ed4d5 100644
--- a/src/groupdef.cpp
+++ b/src/groupdef.cpp
@@ -52,18 +52,19 @@
class GroupDefImpl : public DefinitionMixin<GroupDef>
{
public:
- GroupDefImpl(const char *fileName,int line,const char *name,const char *title,const char *refFileName=0);
+ GroupDefImpl(const QCString &fileName,int line,const QCString &name,const QCString &title,const QCString &refFileName=QCString());
virtual ~GroupDefImpl();
virtual DefType definitionType() const { return TypeGroup; }
virtual QCString getOutputFileBase() const;
virtual QCString anchor() const { return QCString(); }
virtual QCString displayName(bool=TRUE) const { return hasGroupTitle() ? m_title : DefinitionMixin::name(); }
- virtual const char *groupTitle() const { return m_title; }
- virtual void setGroupTitle( const char *newtitle );
+ virtual QCString groupTitle() const { return m_title; }
+ virtual void setGroupTitle( const QCString &newtitle );
virtual bool hasGroupTitle( ) const { return m_titleSet; }
virtual void addFile(const FileDef *def);
virtual bool addClass(const ClassDef *def);
+ virtual bool addConcept(const ConceptDef *def);
virtual bool addNamespace(const NamespaceDef *def);
virtual void addGroup(const GroupDef *def);
virtual void addPage(const PageDef *def);
@@ -75,7 +76,7 @@ class GroupDefImpl : public DefinitionMixin<GroupDef>
virtual void writeDocumentation(OutputList &ol);
virtual void writeMemberPages(OutputList &ol);
virtual void writeQuickMemberLinks(OutputList &ol,const MemberDef *currentMd) const;
- virtual void writeTagFile(FTextStream &);
+ virtual void writeTagFile(TextStream &);
virtual size_t numDocMembers() const;
virtual bool isLinkableInProject() const;
virtual bool isLinkable() const;
@@ -102,6 +103,7 @@ class GroupDefImpl : public DefinitionMixin<GroupDef>
virtual const FileList &getFiles() const { return m_fileList; }
virtual const ClassLinkedRefMap &getClasses() const { return m_classes; }
+ virtual const ConceptLinkedRefMap &getConcepts() const { return m_concepts; }
virtual const NamespaceLinkedRefMap &getNamespaces() const { return m_namespaces; }
virtual const GroupList &getSubGroups() const { return m_groups; }
virtual const PageLinkedRefMap &getPages() const { return m_pages; }
@@ -122,6 +124,7 @@ class GroupDefImpl : public DefinitionMixin<GroupDef>
void writeNestedGroups(OutputList &ol,const QCString &title);
void writeDirs(OutputList &ol,const QCString &title);
void writeClasses(OutputList &ol,const QCString &title);
+ void writeConcepts(OutputList &ol,const QCString &title);
void writeInlineClasses(OutputList &ol);
void writePageDocumentation(OutputList &ol);
void writeDetailedDescription(OutputList &ol,const QCString &title);
@@ -140,6 +143,7 @@ class GroupDefImpl : public DefinitionMixin<GroupDef>
QCString m_fileName; // base name of the generated file
FileList m_fileList; // list of files in the group
ClassLinkedRefMap m_classes; // list of classes in the group
+ ConceptLinkedRefMap m_concepts; // list of concepts in the group
NamespaceLinkedRefMap m_namespaces; // list of namespaces in the group
GroupList m_groups; // list of sub groups.
PageLinkedRefMap m_pages; // list of pages in the group
@@ -154,8 +158,8 @@ class GroupDefImpl : public DefinitionMixin<GroupDef>
};
-GroupDef *createGroupDef(const char *fileName,int line,const char *name,
- const char *title,const char *refFileName)
+GroupDef *createGroupDef(const QCString &fileName,int line,const QCString &name,
+ const QCString &title,const QCString &refFileName)
{
return new GroupDefImpl(fileName,line,name,title,refFileName);
}
@@ -163,11 +167,11 @@ GroupDef *createGroupDef(const char *fileName,int line,const char *name,
//---------------------------------------------------------------------------
-GroupDefImpl::GroupDefImpl(const char *df,int dl,const char *na,const char *t,
- const char *refFileName) : DefinitionMixin(df,dl,1,na),
+GroupDefImpl::GroupDefImpl(const QCString &df,int dl,const QCString &na,const QCString &t,
+ const QCString &refFileName) : DefinitionMixin(df,dl,1,na),
m_allMemberList(MemberListType_allMembersList)
{
- if (refFileName)
+ if (!refFileName.isEmpty())
{
m_fileName=stripExtension(refFileName);
}
@@ -186,9 +190,9 @@ GroupDefImpl::~GroupDefImpl()
{
}
-void GroupDefImpl::setGroupTitle( const char *t )
+void GroupDefImpl::setGroupTitle( const QCString &t )
{
- if ( t && *t )
+ if ( !t.isEmpty())
{
m_title = t;
m_titleSet = TRUE;
@@ -256,6 +260,18 @@ bool GroupDefImpl::addClass(const ClassDef *cd)
return FALSE;
}
+bool GroupDefImpl::addConcept(const ConceptDef *cd)
+{
+ if (cd->isHidden()) return FALSE;
+ QCString qn = cd->name();
+ if (m_concepts.find(qn)==0)
+ {
+ m_concepts.add(qn,cd);
+ return TRUE;
+ }
+ return FALSE;
+}
+
bool GroupDefImpl::addNamespace(const NamespaceDef *def)
{
//printf("adding namespace hidden=%d\n",def->isHidden());
@@ -278,7 +294,7 @@ void GroupDefImpl::addDir(DirDef *def)
void GroupDefImpl::addPage(const PageDef *def)
{
if (def->isHidden()) return;
- //printf("Making page %s part of a group\n",def->name.data());
+ //printf("Making page %s part of a group\n",qPrint(def->name));
m_pages.add(def->name(),def);
const_cast<PageDef*>(def)->makePartOfGroup(this);
}
@@ -312,7 +328,7 @@ bool GroupDefImpl::insertMember(const MemberDef *md,bool docOnly)
{
if (md->isHidden()) return FALSE;
updateLanguage(md);
- //printf("GroupDef(%s)::insertMember(%s)\n", title.data(), md->name().data());
+ //printf("GroupDef(%s)::insertMember(%s)\n", qPrint(title), qPrint(md->name()));
MemberNameInfo *mni = m_allMemberNameInfoLinkedMap.add(md->name());
for (auto &srcMi : *mni)
{
@@ -454,16 +470,16 @@ bool GroupDefImpl::insertMember(const MemberDef *md,bool docOnly)
default:
err("GroupDefImpl::insertMembers(): "
"member '%s' (typeid=%d) with scope '%s' inserted in group scope '%s'!\n",
- md->name().data(),md->memberType(),
- md->getClassDef() ? md->getClassDef()->name().data() : "",
- name().data());
+ qPrint(md->name()),md->memberType(),
+ md->getClassDef() ? qPrint(md->getClassDef()->name()) : "",
+ qPrint(name()));
}
return TRUE;
}
void GroupDefImpl::removeMember(MemberDef *md)
{
- // fprintf(stderr, "GroupDef(%s)::removeMember( %s )\n", title.data(), md->name().data());
+ // fprintf(stderr, "GroupDef(%s)::removeMember( %s )\n", qPrint(title), qPrint(md->name()));
MemberNameInfo *mni = m_allMemberNameInfoLinkedMap.find(md->name());
if (mni)
{
@@ -553,7 +569,7 @@ bool GroupDefImpl::findGroup(const GroupDef *def) const
void GroupDefImpl::addGroup(const GroupDef *def)
{
- //printf("adding group '%s' to group '%s'\n",def->name().data(),name().data());
+ //printf("adding group '%s' to group '%s'\n",qPrint(def->name()),qPrint(name()));
//if (Config_getBool(SORT_MEMBER_DOCS))
// groupList->inSort(def);
//else
@@ -597,12 +613,12 @@ void GroupDefImpl::computeAnchors()
m_allMemberList.setAnchors();
}
-void GroupDefImpl::writeTagFile(FTextStream &tagFile)
+void GroupDefImpl::writeTagFile(TextStream &tagFile)
{
- tagFile << " <compound kind=\"group\">" << endl;
- tagFile << " <name>" << convertToXML(name()) << "</name>" << endl;
- tagFile << " <title>" << convertToXML(m_title) << "</title>" << endl;
- tagFile << " <filename>" << convertToXML(getOutputFileBase()) << Doxygen::htmlFileExtension << "</filename>" << endl;
+ tagFile << " <compound kind=\"group\">\n";
+ tagFile << " <name>" << convertToXML(name()) << "</name>\n";
+ tagFile << " <title>" << convertToXML(m_title) << "</title>\n";
+ tagFile << " <filename>" << convertToXML(getOutputFileBase()) << Doxygen::htmlFileExtension << "</filename>\n";
for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Group))
{
switch (lde->kind())
@@ -614,7 +630,19 @@ void GroupDefImpl::writeTagFile(FTextStream &tagFile)
if (cd->isLinkableInProject())
{
tagFile << " <class kind=\"" << cd->compoundTypeString()
- << "\">" << convertToXML(cd->name()) << "</class>" << endl;
+ << "\">" << convertToXML(cd->name()) << "</class>\n";
+ }
+ }
+ }
+ break;
+ case LayoutDocEntry::GroupConcepts:
+ {
+ for (const auto &cd : m_concepts)
+ {
+ if (cd->isLinkableInProject())
+ {
+ tagFile << " <concept>" << convertToXML(cd->name())
+ << "</concept>\n";
}
}
}
@@ -626,7 +654,7 @@ void GroupDefImpl::writeTagFile(FTextStream &tagFile)
if (nd->isLinkableInProject())
{
tagFile << " <namespace>" << convertToXML(nd->name())
- << "</namespace>" << endl;
+ << "</namespace>\n";
}
}
}
@@ -637,7 +665,7 @@ void GroupDefImpl::writeTagFile(FTextStream &tagFile)
{
if (fd->isLinkableInProject())
{
- tagFile << " <file>" << convertToXML(fd->name()) << "</file>" << endl;
+ tagFile << " <file>" << convertToXML(fd->name()) << "</file>\n";
}
}
}
@@ -649,7 +677,7 @@ void GroupDefImpl::writeTagFile(FTextStream &tagFile)
QCString pageName = pd->getOutputFileBase();
if (pd->isLinkableInProject())
{
- tagFile << " <page>" << convertToXML(pageName) << "</page>" << endl;
+ tagFile << " <page>" << convertToXML(pageName) << "</page>\n";
}
}
}
@@ -660,7 +688,7 @@ void GroupDefImpl::writeTagFile(FTextStream &tagFile)
{
if (dd->isLinkableInProject())
{
- tagFile << " <dir>" << convertToXML(dd->displayName()) << "</dir>" << endl;
+ tagFile << " <dir>" << convertToXML(dd->displayName()) << "</dir>\n";
}
}
}
@@ -671,7 +699,7 @@ void GroupDefImpl::writeTagFile(FTextStream &tagFile)
{
if (gd->isVisible())
{
- tagFile << " <subgroup>" << convertToXML(gd->name()) << "</subgroup>" << endl;
+ tagFile << " <subgroup>" << convertToXML(gd->name()) << "</subgroup>\n";
}
}
}
@@ -699,7 +727,7 @@ void GroupDefImpl::writeTagFile(FTextStream &tagFile)
}
}
writeDocAnchorsToTagFile(tagFile);
- tagFile << " </compound>" << endl;
+ tagFile << " </compound>\n";
}
void GroupDefImpl::writeDetailedDescription(OutputList &ol,const QCString &title)
@@ -717,7 +745,7 @@ void GroupDefImpl::writeDetailedDescription(OutputList &ol,const QCString &title
ol.popGeneratorState();
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
- ol.writeAnchor(0,"details");
+ ol.writeAnchor(QCString(),"details");
ol.popGeneratorState();
}
else
@@ -733,7 +761,7 @@ void GroupDefImpl::writeDetailedDescription(OutputList &ol,const QCString &title
if (!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF))
{
ol.generateDoc(briefFile(),briefLine(),this,0,briefDescription(),FALSE,FALSE,
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
}
// write separator between brief and details
if (!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF) &&
@@ -754,14 +782,14 @@ void GroupDefImpl::writeDetailedDescription(OutputList &ol,const QCString &title
if (!documentation().isEmpty())
{
ol.generateDoc(docFile(),docLine(),this,0,documentation()+"\n",TRUE,FALSE,
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
}
// write inbody documentation
if (!inbodyDocumentation().isEmpty())
{
ol.generateDoc(inbodyFile(),inbodyLine(),this,0,inbodyDocumentation()+"\n",TRUE,FALSE,
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
}
}
}
@@ -772,7 +800,7 @@ void GroupDefImpl::writeBriefDescription(OutputList &ol)
{
DocRoot *rootNode = validatingParseDoc(briefFile(),briefLine(),this,0,
briefDescription(),TRUE,FALSE,
- 0,TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
if (rootNode && !rootNode->isEmpty())
{
ol.startParagraph();
@@ -789,7 +817,7 @@ void GroupDefImpl::writeBriefDescription(OutputList &ol)
if (hasDetailedDescription())
{
ol.disableAllBut(OutputGenerator::Html);
- ol.startTextLink(0,"details");
+ ol.startTextLink(QCString(),"details");
ol.parseText(theTranslator->trMore());
ol.endTextLink();
}
@@ -808,7 +836,7 @@ void GroupDefImpl::writeGroupGraph(OutputList &ol)
DotGroupCollaboration graph(this);
if (!graph.isTrivial())
{
- msg("Generating dependency graph for group %s\n",qualifiedName().data());
+ msg("Generating dependency graph for group %s\n",qPrint(qualifiedName()));
ol.pushGeneratorState();
ol.disable(OutputGenerator::Man);
//ol.startParagraph();
@@ -837,16 +865,16 @@ void GroupDefImpl::writeFiles(OutputList &ol,const QCString &title)
ol.startMemberItem(fd->getOutputFileBase(),0);
ol.docify(theTranslator->trFile(FALSE,TRUE)+" ");
ol.insertMemberAlign();
- ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),0,fd->name());
+ ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),QCString(),fd->name());
ol.endMemberItem();
if (!fd->briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC))
{
ol.startMemberDescription(fd->getOutputFileBase());
ol.generateDoc(briefFile(),briefLine(),fd,0,fd->briefDescription(),FALSE,FALSE,
- 0,TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
ol.endMemberDescription();
}
- ol.endMemberDeclaration(0,0);
+ ol.endMemberDeclaration(QCString(),QCString());
}
ol.endMemberList();
}
@@ -882,16 +910,16 @@ void GroupDefImpl::writeNestedGroups(OutputList &ol,const QCString &title)
//ol.docify(theTranslator->trGroup(FALSE,TRUE));
//ol.docify(" ");
ol.insertMemberAlign();
- ol.writeObjectLink(gd->getReference(),gd->getOutputFileBase(),0,gd->groupTitle());
+ ol.writeObjectLink(gd->getReference(),gd->getOutputFileBase(),QCString(),gd->groupTitle());
ol.endMemberItem();
if (!gd->briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC))
{
ol.startMemberDescription(gd->getOutputFileBase());
ol.generateDoc(briefFile(),briefLine(),gd,0,gd->briefDescription(),FALSE,FALSE,
- 0,TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
ol.endMemberDescription();
}
- ol.endMemberDeclaration(0,0);
+ ol.endMemberDeclaration(QCString(),QCString());
}
}
ol.endMemberList();
@@ -914,16 +942,16 @@ void GroupDefImpl::writeDirs(OutputList &ol,const QCString &title)
ol.startMemberItem(dd->getOutputFileBase(),0);
ol.parseText(theTranslator->trDir(FALSE,TRUE));
ol.insertMemberAlign();
- ol.writeObjectLink(dd->getReference(),dd->getOutputFileBase(),0,dd->shortName());
+ ol.writeObjectLink(dd->getReference(),dd->getOutputFileBase(),QCString(),dd->shortName());
ol.endMemberItem();
if (!dd->briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC))
{
ol.startMemberDescription(dd->getOutputFileBase());
ol.generateDoc(briefFile(),briefLine(),dd,0,dd->briefDescription(),FALSE,FALSE,
- 0,TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
ol.endMemberDescription();
}
- ol.endMemberDeclaration(0,0);
+ ol.endMemberDeclaration(QCString(),QCString());
}
ol.endMemberList();
@@ -936,6 +964,12 @@ void GroupDefImpl::writeClasses(OutputList &ol,const QCString &title)
m_classes.writeDeclaration(ol,0,title,FALSE);
}
+void GroupDefImpl::writeConcepts(OutputList &ol,const QCString &title)
+{
+ // write list of concepts
+ m_concepts.writeDeclaration(ol,title,FALSE);
+}
+
void GroupDefImpl::writeInlineClasses(OutputList &ol)
{
m_classes.writeDocumentation(ol);
@@ -956,8 +990,8 @@ void GroupDefImpl::writePageDocumentation(OutputList &ol)
ol.endSection(si->label(),SectionType::Subsection);
}
ol.startTextBlock();
- ol.generateDoc(pd->docFile(),pd->docLine(),pd,0,pd->documentation()+pd->inbodyDocumentation(),TRUE,FALSE,
- 0,TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ ol.generateDoc(pd->docFile(),pd->docLine(),pd,0,(pd->documentation()+pd->inbodyDocumentation()),TRUE,FALSE,
+ QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
ol.endTextBlock();
}
}
@@ -1023,20 +1057,22 @@ void GroupDefImpl::writeSummaryLinks(OutputList &ol) const
SrcLangExt lang = getLanguage();
for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Group))
{
- if ((lde->kind()==LayoutDocEntry::GroupClasses && m_classes.declVisible()) ||
- (lde->kind()==LayoutDocEntry::GroupNamespaces && m_namespaces.declVisible()) ||
- (lde->kind()==LayoutDocEntry::GroupFiles && !m_fileList.empty()) ||
+ if ((lde->kind()==LayoutDocEntry::GroupClasses && m_classes.declVisible()) ||
+ (lde->kind()==LayoutDocEntry::GroupConcepts && m_concepts.declVisible()) ||
+ (lde->kind()==LayoutDocEntry::GroupNamespaces && m_namespaces.declVisible()) ||
+ (lde->kind()==LayoutDocEntry::GroupFiles && !m_fileList.empty()) ||
(lde->kind()==LayoutDocEntry::GroupNestedGroups && !m_groups.empty()) ||
- (lde->kind()==LayoutDocEntry::GroupDirs && !m_dirList.empty())
+ (lde->kind()==LayoutDocEntry::GroupDirs && !m_dirList.empty())
)
{
const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
QCString label = lde->kind()==LayoutDocEntry::GroupClasses ? "nested-classes" :
+ lde->kind()==LayoutDocEntry::GroupConcepts ? "concepts" :
lde->kind()==LayoutDocEntry::GroupNamespaces ? "namespaces" :
lde->kind()==LayoutDocEntry::GroupFiles ? "files" :
lde->kind()==LayoutDocEntry::GroupNestedGroups ? "groups" :
"dirs";
- ol.writeSummaryLink(0,label,ls->title(lang),first);
+ ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
first=FALSE;
}
else if (lde->kind()==LayoutDocEntry::MemberDecl)
@@ -1045,7 +1081,7 @@ void GroupDefImpl::writeSummaryLinks(OutputList &ol) const
MemberList * ml = getMemberList(lmd->type);
if (ml && ml->declVisible())
{
- ol.writeSummaryLink(0,MemberList::listTypeAsString(ml->listType()),lmd->title(lang),first);
+ ol.writeSummaryLink(QCString(),MemberList::listTypeAsString(ml->listType()),lmd->title(lang),first);
first=FALSE;
}
}
@@ -1102,7 +1138,7 @@ void GroupDefImpl::writeDocumentation(OutputList &ol)
}
}
- Doxygen::indexList->addIndexItem(this,0,0,m_title);
+ Doxygen::indexList->addIndexItem(this,0,QCString(),m_title);
//---------------------------------------- start flexible part -------------------------------
@@ -1123,6 +1159,12 @@ void GroupDefImpl::writeDocumentation(OutputList &ol)
writeClasses(ol,ls->title(lang));
}
break;
+ case LayoutDocEntry::GroupConcepts:
+ {
+ const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
+ writeConcepts(ol,ls->title(lang));
+ }
+ break;
case LayoutDocEntry::GroupInlineClasses:
{
writeInlineClasses(ol);
@@ -1201,11 +1243,14 @@ void GroupDefImpl::writeDocumentation(OutputList &ol)
case LayoutDocEntry::NamespaceNestedNamespaces:
case LayoutDocEntry::NamespaceNestedConstantGroups:
case LayoutDocEntry::NamespaceClasses:
+ case LayoutDocEntry::NamespaceConcepts:
case LayoutDocEntry::NamespaceInterfaces:
case LayoutDocEntry::NamespaceStructs:
case LayoutDocEntry::NamespaceExceptions:
case LayoutDocEntry::NamespaceInlineClasses:
+ case LayoutDocEntry::ConceptDefinition:
case LayoutDocEntry::FileClasses:
+ case LayoutDocEntry::FileConcepts:
case LayoutDocEntry::FileInterfaces:
case LayoutDocEntry::FileStructs:
case LayoutDocEntry::FileExceptions:
@@ -1307,18 +1352,36 @@ void addClassToGroups(const Entry *root,ClassDef *cd)
{
cdm->makePartOfGroup(gd);
}
- //printf("Compound %s: in group %s\n",cd->name().data(),gd->groupTitle());
+ //printf("Compound %s: in group %s\n",qPrint(cd->name()),gd->groupTitle());
}
}
}
+void addConceptToGroups(const Entry *root,ConceptDef *cd)
+{
+ for (const Grouping &g : root->groups)
+ {
+ GroupDef *gd = Doxygen::groupLinkedMap->find(g.groupname);
+ if (gd && gd->addConcept(cd))
+ {
+ ConceptDefMutable *cdm = toConceptDefMutable(cd);
+ if (cdm)
+ {
+ cdm->makePartOfGroup(gd);
+ }
+ //printf("Compound %s: in group %s\n",qPrint(cd->name()),gd->groupTitle());
+ }
+ }
+}
+
+
void addNamespaceToGroups(const Entry *root,NamespaceDef *nd)
{
//printf("root->groups.size()=%zu\n",root->groups.size());
for (const Grouping &g : root->groups)
{
GroupDef *gd = Doxygen::groupLinkedMap->find(g.groupname);
- //printf("group '%s' gd=%p\n",g.groupname.data(),(void*)gd);
+ //printf("group '%s' gd=%p\n",qPrint(g.groupname),(void*)gd);
if (gd && gd->addNamespace(nd))
{
NamespaceDefMutable *ndm = toNamespaceDefMutable(nd);
@@ -1326,7 +1389,7 @@ void addNamespaceToGroups(const Entry *root,NamespaceDef *nd)
{
ndm->makePartOfGroup(gd);
}
- //printf("Namespace %s: in group %s\n",nd->name().data(),s->data());
+ //printf("Namespace %s: in group %s\n",qPrint(nd->name()),qPrint(gd->name()));
}
}
}
@@ -1337,19 +1400,19 @@ void addDirToGroups(const Entry *root,DirDef *dd)
for (const Grouping &g : root->groups)
{
GroupDef *gd = Doxygen::groupLinkedMap->find(g.groupname);
- //printf("group '%s'\n",g->groupname.data());
+ //printf("group '%s'\n",qPrint(g->groupname));
if (gd)
{
gd->addDir(dd);
dd->makePartOfGroup(gd);
- //printf("Dir %s: in group %s\n",dd->name().data(),g->groupname.data());
+ //printf("Dir %s: in group %s\n",qPrint(dd->name()),qPrint(g->groupname));
}
}
}
void addGroupToGroups(const Entry *root,GroupDef *subGroup)
{
- //printf("addGroupToGroups for %s groups=%d\n",root->name.data(),root->groups.size());
+ //printf("addGroupToGroups for %s groups=%d\n",qPrint(root->name),root->groups.size());
for (const Grouping &g : root->groups)
{
GroupDef *gd = Doxygen::groupLinkedMap->find(g.groupname);
@@ -1358,12 +1421,12 @@ void addGroupToGroups(const Entry *root,GroupDef *subGroup)
if (gd==subGroup)
{
warn(root->fileName,root->startLine,"Refusing to add group %s to itself",
- gd->name().data());
+ qPrint(gd->name()));
}
else if (subGroup->findGroup(gd))
{
warn(root->fileName,root->startLine,"Refusing to add group %s to group %s, since the latter is already a "
- "subgroup of the former\n", subGroup->name().data(),gd->name().data());
+ "subgroup of the former\n", qPrint(subGroup->name()),qPrint(gd->name()));
}
else if (!gd->findGroup(subGroup))
{
@@ -1378,7 +1441,7 @@ void addGroupToGroups(const Entry *root,GroupDef *subGroup)
void addMemberToGroups(const Entry *root,MemberDef *md)
{
//printf("addMemberToGroups: Root %p = %s, md %p=%s groups=%zu\n",
- // root, root->name.data(), md, md->name().data(), root->groups.size() );
+ // root, qPrint(root->name), md, qPrint(md->name()), root->groups.size() );
// Search entry's group list for group with highest pri.
Grouping::GroupPri_t pri = Grouping::GROUPING_LOWEST;
@@ -1392,11 +1455,11 @@ void addMemberToGroups(const Entry *root,MemberDef *md)
{
if (fgd && gd!=fgd && g.pri==pri)
{
- warn(root->fileName.data(), root->startLine,
+ warn(root->fileName, root->startLine,
"Member %s found in multiple %s groups! "
"The member will be put in group %s, and not in group %s",
- md->name().data(), Grouping::getGroupPriName( pri ),
- gd->name().data(), fgd->name().data()
+ qPrint(md->name()), Grouping::getGroupPriName( pri ),
+ qPrint(gd->name()), qPrint(fgd->name())
);
}
@@ -1440,10 +1503,10 @@ void addMemberToGroups(const Entry *root,MemberDef *md)
warn(md->getGroupFileName(),md->getGroupStartLine(),
"Member documentation for %s found several times in %s groups!\n"
"%s:%d: The member will remain in group %s, and won't be put into group %s",
- md->name().data(), Grouping::getGroupPriName( pri ),
- root->fileName.data(), root->startLine,
- mgd->name().data(),
- fgd->name().data()
+ qPrint(md->name()), Grouping::getGroupPriName( pri ),
+ qPrint(root->fileName), root->startLine,
+ qPrint(mgd->name()),
+ qPrint(fgd->name())
);
}
}
@@ -1460,8 +1523,8 @@ void addMemberToGroups(const Entry *root,MemberDef *md)
if (insertit)
{
//printf("insertMember found at %s line %d: %s: related %s\n",
- // md->getDefFileName().data(),md->getDefLine(),
- // md->name().data(),root->relates.data());
+ // qPrint(md->getDefFileName()),md->getDefLine(),
+ // qPrint(md->name()),qPrint(root->relates));
bool success = fgd->insertMember(md);
if (success)
{
@@ -1491,7 +1554,7 @@ void addExampleToGroups(const Entry *root,PageDef *eg)
{
gd->addExample(eg);
eg->makePartOfGroup(gd);
- //printf("Example %s: in group %s\n",eg->name().data(),s->data());
+ //printf("Example %s: in group %s\n",qPrint(eg->name()),s->data());
}
}
}
@@ -1509,7 +1572,7 @@ void GroupDefImpl::addListReferences()
getOutputFileBase(),
theTranslator->trGroup(TRUE,TRUE),
getOutputFileBase(),name(),
- 0,
+ QCString(),
0
);
}
@@ -1654,7 +1717,7 @@ void GroupDefImpl::writeMemberDeclarations(OutputList &ol,MemberListType lt,cons
}
if (ml)
{
- ml->writeDeclarations(ol,0,0,0,this,title,0);
+ ml->writeDeclarations(ol,0,0,0,this,title,QCString());
}
}
@@ -1675,7 +1738,7 @@ void GroupDefImpl::sortSubGroups()
std::sort(m_groups.begin(),
m_groups.end(),
[](const auto &g1,const auto &g2)
- { return qstrcmp(g1->groupTitle(),g2->groupTitle())<0; });
+ { return g1->groupTitle() < g2->groupTitle(); });
}
bool GroupDefImpl::isLinkableInProject() const
diff --git a/src/groupdef.h b/src/groupdef.h
index 94214c4..587c709 100644
--- a/src/groupdef.h
+++ b/src/groupdef.h
@@ -30,9 +30,11 @@ class MemberList;
class MemberLists;
class FileList;
class ClassLinkedRefMap;
+class ConceptLinkedRefMap;
class NamespaceLinkedRefMap;
class FileDef;
class ClassDef;
+class ConceptDef;
class NamespaceDef;
class GroupList;
class OutputList;
@@ -42,7 +44,6 @@ class DirDef;
class FTVHelp;
class Entry;
class MemberDef;
-class FTextStream;
/** A model of a group of symbols. */
class GroupDef : public DefinitionMutable, public Definition
@@ -54,11 +55,12 @@ class GroupDef : public DefinitionMutable, public Definition
virtual QCString getOutputFileBase() const = 0;
virtual QCString anchor() const = 0;
virtual QCString displayName(bool=TRUE) const = 0;
- virtual const char *groupTitle() const = 0;
- virtual void setGroupTitle( const char *newtitle ) = 0;
+ virtual QCString groupTitle() const = 0;
+ virtual void setGroupTitle( const QCString &newtitle ) = 0;
virtual bool hasGroupTitle( ) const = 0;
virtual void addFile(const FileDef *def) = 0;
virtual bool addClass(const ClassDef *def) = 0;
+ virtual bool addConcept(const ConceptDef *def) = 0;
virtual bool addNamespace(const NamespaceDef *def) = 0;
virtual void addGroup(const GroupDef *def) = 0;
virtual void addPage(const PageDef *def) = 0;
@@ -70,7 +72,7 @@ class GroupDef : public DefinitionMutable, public Definition
virtual void writeDocumentation(OutputList &ol) = 0;
virtual void writeMemberPages(OutputList &ol) = 0;
virtual void writeQuickMemberLinks(OutputList &ol,const MemberDef *currentMd) const = 0;
- virtual void writeTagFile(FTextStream &) = 0;
+ virtual void writeTagFile(TextStream &) = 0;
virtual size_t numDocMembers() const = 0;
virtual bool isLinkableInProject() const = 0;
virtual bool isLinkable() const = 0;
@@ -97,6 +99,7 @@ class GroupDef : public DefinitionMutable, public Definition
virtual const FileList &getFiles() const = 0;
virtual const ClassLinkedRefMap &getClasses() const = 0;
+ virtual const ConceptLinkedRefMap &getConcepts() const = 0;
virtual const NamespaceLinkedRefMap &getNamespaces() const = 0;
virtual const GroupList &getSubGroups() const = 0;
virtual const PageLinkedRefMap &getPages() const = 0;
@@ -107,8 +110,8 @@ class GroupDef : public DefinitionMutable, public Definition
};
-GroupDef *createGroupDef(const char *fileName,int line,const char *name,
- const char *title,const char *refFileName=0);
+GroupDef *createGroupDef(const QCString &fileName,int line,const QCString &name,
+ const QCString &title,const QCString &refFileName=QCString());
// --- Cast functions
@@ -126,6 +129,7 @@ class GroupList : public std::vector<const GroupDef *>
};
void addClassToGroups (const Entry *root,ClassDef *cd);
+void addConceptToGroups (const Entry *root,ConceptDef *cd);
void addNamespaceToGroups(const Entry *root,NamespaceDef *nd);
void addGroupToGroups (const Entry *root,GroupDef *subGroup);
void addMemberToGroups (const Entry *root,MemberDef *md);
diff --git a/src/growbuf.h b/src/growbuf.h
index bb26404..8c532ca 100644
--- a/src/growbuf.h
+++ b/src/growbuf.h
@@ -5,7 +5,7 @@
#include <string.h>
#include <string>
-#define GROW_AMOUNT 1024
+#define GROW_AMOUNT 1024*4
/** Class representing a string buffer optimised for growing. */
class GrowBuf
@@ -14,6 +14,37 @@ class GrowBuf
GrowBuf() : m_str(0), m_pos(0), m_len(0) {}
GrowBuf(uint initialSize) : m_pos(0), m_len(initialSize) { m_str=(char*)malloc(m_len); }
~GrowBuf() { free(m_str); }
+ GrowBuf(const GrowBuf &other)
+ {
+ m_len = other.m_len;
+ m_pos = other.m_pos;
+ m_str = (char*)malloc(m_len);
+ memcpy(m_str,other.m_str,m_len);
+ }
+ GrowBuf &operator=(const GrowBuf &other)
+ {
+ if (this!=&other)
+ {
+ m_len = other.m_len;
+ m_pos = other.m_pos;
+ m_str = (char*)malloc(m_len);
+ memcpy(m_str,other.m_str,m_len);
+ }
+ return *this;
+ }
+ GrowBuf(GrowBuf &&other)
+ {
+ m_len = std::move(other.m_len);
+ m_pos = std::move(other.m_pos);
+ m_str = std::move(other.m_str);
+ }
+ GrowBuf &operator=(GrowBuf &&other)
+ {
+ m_len = std::move(other.m_len);
+ m_pos = std::move(other.m_pos);
+ m_str = std::move(other.m_str);
+ return *this;
+ }
void reserve(uint size) { if (m_len<size) { m_len = size; m_str = (char*)realloc(m_str,m_len); } }
void clear() { m_pos=0; }
void addChar(char c) { if (m_pos>=m_len) { m_len+=GROW_AMOUNT; m_str = (char*)realloc(m_str,m_len); }
@@ -56,10 +87,12 @@ class GrowBuf
m_pos+=l;
}
}
- const char *get() { return m_str; }
+ char *get() { return m_str; }
+ const char *get() const { return m_str; }
uint getPos() const { return m_pos; }
void setPos(uint newPos) { m_pos = newPos; }
char at(uint i) const { return m_str[i]; }
+ bool empty() const { return m_pos==0; }
private:
char *m_str;
uint m_pos;
diff --git a/src/htags.cpp b/src/htags.cpp
index 6b5e5fd..cb7b99c 100644
--- a/src/htags.cpp
+++ b/src/htags.cpp
@@ -18,18 +18,16 @@
#include <unordered_map>
#include <string>
-#include <qdir.h>
-
#include "htags.h"
#include "util.h"
#include "message.h"
#include "config.h"
#include "portable.h"
-
+#include "fileinfo.h"
bool Htags::useHtags = FALSE;
-static QDir g_inputDir;
+static Dir g_inputDir;
static std::unordered_map<std::string,std::string> g_symbolMap;
/*! constructs command line of htags(1) and executes it.
@@ -45,14 +43,13 @@ bool Htags::execute(const QCString &htmldir)
QCString projectName = Config_getString(PROJECT_NAME);
QCString projectNumber = Config_getString(PROJECT_NUMBER);
- QCString cwd = QDir::currentDirPath().utf8();
if (inputSource.empty())
{
- g_inputDir.setPath(cwd);
+ g_inputDir.setPath(Dir::currentDirPath());
}
else if (inputSource.size()==1)
{
- g_inputDir.setPath(inputSource.back().c_str());
+ g_inputDir.setPath(inputSource.back());
if (!g_inputDir.exists())
err("Cannot find directory %s. "
"Check the value of the INPUT tag in the configuration file.\n",
@@ -88,9 +85,9 @@ bool Htags::execute(const QCString &htmldir)
commandLine += "\" ";
}
commandLine += " \"" + htmldir + "\"";
- QCString oldDir = QDir::currentDirPath().utf8();
- QDir::setCurrent(g_inputDir.absPath());
- //printf("CommandLine=[%s]\n",commandLine.data());
+ std::string oldDir = Dir::currentDirPath();
+ Dir::setCurrent(g_inputDir.absPath());
+ //printf("CommandLine=[%s]\n",qPrint(commandLine));
Portable::sysTimerStart();
bool result=Portable::system("htags",commandLine,FALSE)==0;
if (!result)
@@ -98,7 +95,7 @@ bool Htags::execute(const QCString &htmldir)
err("Problems running %s. Check your installation\n", "htags");
}
Portable::sysTimerStop();
- QDir::setCurrent(oldDir);
+ Dir::setCurrent(oldDir);
return result;
}
@@ -111,7 +108,7 @@ bool Htags::execute(const QCString &htmldir)
bool Htags::loadFilemap(const QCString &htmlDir)
{
QCString fileMapName = htmlDir+"/HTML/FILEMAP";
- QFileInfo fi(fileMapName);
+ FileInfo fi(fileMapName.str());
/*
* Construct FILEMAP dictionary.
*
@@ -125,17 +122,14 @@ bool Htags::loadFilemap(const QCString &htmlDir)
*/
if (fi.exists() && fi.isReadable())
{
- QFile f(fileMapName);
- const int maxlen = 8192;
- QCString line(maxlen+1);
- line.at(maxlen)='\0';
- if (f.open(IO_ReadOnly))
+ std::ifstream f(fileMapName.str(),std::ifstream::in);
+ if (f.is_open())
{
- int len;
- while ((len=f.readLine(line.rawData(),maxlen))>0)
+ std::string lineStr;
+ while (getline(f,lineStr))
{
- line.at(len)='\0';
- //printf("Read line: %s",line.data());
+ QCString line(lineStr);
+ //printf("Read line: %s",qPrint(line));
int sep = line.find('\t');
if (sep!=-1)
{
@@ -144,17 +138,17 @@ bool Htags::loadFilemap(const QCString &htmlDir)
int ext=value.findRev('.');
if (ext!=-1) value=value.left(ext); // strip extension
g_symbolMap.insert(std::make_pair(key.str(),value.str()));
- //printf("Key/Value=(%s,%s)\n",key.data(),value.data());
+ //printf("Key/Value=(%s,%s)\n",qPrint(key),qPrint(value));
}
}
- return TRUE;
+ return true;
}
else
{
- err("file %s cannot be opened\n",fileMapName.data());
+ err("file %s cannot be opened\n",qPrint(fileMapName));
}
}
- return FALSE;
+ return false;
}
/*! convert path name into the url in the hypertext generated by htags.
@@ -164,7 +158,7 @@ bool Htags::loadFilemap(const QCString &htmlDir)
QCString Htags::path2URL(const QCString &path)
{
QCString url,symName=path;
- QCString dir = g_inputDir.absPath().utf8();
+ QCString dir = g_inputDir.absPath();
int dl=dir.length();
if ((int)symName.length()>dl+1)
{
@@ -173,10 +167,10 @@ QCString Htags::path2URL(const QCString &path)
if (!symName.isEmpty())
{
auto it = g_symbolMap.find(symName.str());
- //printf("path2URL=%s symName=%s result=%p\n",path.data(),symName.data(),result);
+ //printf("path2URL=%s symName=%s result=%p\n",qPrint(path),qPrint(symName),result);
if (it!=g_symbolMap.end())
{
- url = QCString("HTML/") + it->second;
+ url = QCString("HTML/"+it->second);
}
}
return url;
diff --git a/src/htmlattrib.h b/src/htmlattrib.h
index 0a7673f..9e22520 100644
--- a/src/htmlattrib.h
+++ b/src/htmlattrib.h
@@ -16,7 +16,8 @@
#define _HTMLATTRIB_H
#include <vector>
-#include <qcstring.h>
+
+#include "qcstring.h"
/*! \brief Class representing a HTML attribute. */
struct HtmlAttrib
diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp
index 7c56cc1..a11d045 100644
--- a/src/htmldocvisitor.cpp
+++ b/src/htmldocvisitor.cpp
@@ -13,7 +13,6 @@
*
*/
-#include <qdir.h>
#include "htmldocvisitor.h"
#include "docparser.h"
#include "language.h"
@@ -34,6 +33,7 @@
#include "emoji.h"
#include "plantuml.h"
#include "formula.h"
+#include "fileinfo.h"
static const int NUM_HTML_LIST_TYPES = 4;
static const char types[][NUM_HTML_LIST_TYPES] = {"1", "a", "i", "A"};
@@ -264,7 +264,7 @@ static QCString htmlAttribsToString(const HtmlAttribList &attribs, QCString *pAl
//-------------------------------------------------------------------------
-HtmlDocVisitor::HtmlDocVisitor(FTextStream &t,CodeOutputInterface &ci,
+HtmlDocVisitor::HtmlDocVisitor(TextStream &t,CodeOutputInterface &ci,
const Definition *ctx)
: DocVisitor(DocVisitor_Html), m_t(t), m_ci(ci), m_insidePre(FALSE),
m_hide(FALSE), m_ctx(ctx)
@@ -278,7 +278,7 @@ HtmlDocVisitor::HtmlDocVisitor(FTextStream &t,CodeOutputInterface &ci,
void HtmlDocVisitor::visit(DocWord *w)
{
- //printf("word: %s\n",w->word().data());
+ //printf("word: %s\n",qPrint(w->word()));
if (m_hide) return;
filter(w->word());
}
@@ -286,7 +286,7 @@ void HtmlDocVisitor::visit(DocWord *w)
void HtmlDocVisitor::visit(DocLinkedWord *w)
{
if (m_hide) return;
- //printf("linked word: %s\n",w->word().data());
+ //printf("linked word: %s\n",qPrint(w->word()));
startLink(w->ref(),w->file(),w->relPath(),w->anchor(),w->tooltip());
filter(w->word());
endLink();
@@ -471,20 +471,20 @@ void HtmlDocVisitor::visit(DocStyleChange *s)
}
-static void visitPreCaption(FTextStream &t, DocVerbatim *s)
+static void visitPreCaption(TextStream &t, DocVerbatim *s)
{
if (s->hasCaption())
{
- t << "<div class=\"caption\">" << endl;
+ t << "<div class=\"caption\">\n";
}
}
-static void visitPostCaption(FTextStream &t, DocVerbatim *s)
+static void visitPostCaption(TextStream &t, DocVerbatim *s)
{
if (s->hasCaption())
{
- t << "</div>" << endl;
+ t << "</div>\n";
}
}
@@ -554,28 +554,29 @@ void HtmlDocVisitor::visit(DocVerbatim *s)
forceEndParagraph(s);
fileName.sprintf("%s%d%s",
- (Config_getString(HTML_OUTPUT)+"/inline_dotgraph_").data(),
+ qPrint(Config_getString(HTML_OUTPUT)+"/inline_dotgraph_"),
dotindex++,
".dot"
);
- QFile file(fileName);
- if (!file.open(IO_WriteOnly))
+ std::ofstream file(fileName.str(),std::ofstream::out | std::ofstream::binary);
+ if (!file.is_open())
{
- err("Could not open file %s for writing\n",fileName.data());
+ err("Could not open file %s for writing\n",qPrint(fileName));
}
else
{
- file.writeBlock( s->text(), s->text().length() );
+ QCString stext = s->text();
+ file.write( stext.data(), stext.length() );
file.close();
- m_t << "<div class=\"dotgraph\">" << endl;
+ m_t << "<div class=\"dotgraph\">\n";
writeDotFile(fileName,s->relPath(),s->context());
visitPreCaption(m_t, s);
visitCaption(this, s->children());
visitPostCaption(m_t, s);
- m_t << "</div>" << endl;
+ m_t << "</div>\n";
- if (Config_getBool(DOT_CLEANUP)) file.remove();
+ if (Config_getBool(DOT_CLEANUP)) Dir().remove(fileName.str());
}
forceStartParagraph(s);
}
@@ -588,13 +589,13 @@ void HtmlDocVisitor::visit(DocVerbatim *s)
QCString baseName(4096);
baseName.sprintf("%s%d",
- (Config_getString(HTML_OUTPUT)+"/inline_mscgraph_").data(),
+ qPrint(Config_getString(HTML_OUTPUT)+"/inline_mscgraph_"),
mscindex++
);
- QFile file(baseName+".msc");
- if (!file.open(IO_WriteOnly))
+ std::ofstream file(baseName.str()+".msc",std::ofstream::out | std::ofstream::binary);
+ if (!file.is_open())
{
- err("Could not open file %s.msc for writing\n",baseName.data());
+ err("Could not open file %s.msc for writing\n",qPrint(baseName));
}
else
{
@@ -602,17 +603,17 @@ void HtmlDocVisitor::visit(DocVerbatim *s)
text+=s->text();
text+="}";
- file.writeBlock( text, text.length() );
+ file.write( text.data(), text.length() );
file.close();
- m_t << "<div class=\"mscgraph\">" << endl;
+ m_t << "<div class=\"mscgraph\">\n";
writeMscFile(baseName+".msc",s->relPath(),s->context());
visitPreCaption(m_t, s);
visitCaption(this, s->children());
visitPostCaption(m_t, s);
- m_t << "</div>" << endl;
+ m_t << "</div>\n";
- if (Config_getBool(DOT_CLEANUP)) file.remove();
+ if (Config_getBool(DOT_CLEANUP)) Dir().remove(baseName.str()+".msc");
}
forceStartParagraph(s);
}
@@ -628,12 +629,12 @@ void HtmlDocVisitor::visit(DocVerbatim *s)
format = PlantumlManager::PUML_SVG;
}
QCString baseName = PlantumlManager::instance().writePlantUMLSource(htmlOutput,s->exampleFile(),s->text(),format);
- m_t << "<div class=\"plantumlgraph\">" << endl;
+ m_t << "<div class=\"plantumlgraph\">\n";
writePlantUMLFile(baseName,s->relPath(),s->context());
visitPreCaption(m_t, s);
visitCaption(this, s->children());
visitPostCaption(m_t, s);
- m_t << "</div>" << endl;
+ m_t << "</div>\n";
forceStartParagraph(s);
}
break;
@@ -676,8 +677,8 @@ void HtmlDocVisitor::visit(DocInclude *inc)
{
forceEndParagraph(inc);
m_ci.startCodeFragment("DoxyCode");
- QFileInfo cfi( inc->file() );
- FileDef *fd = createFileDef( cfi.dirPath().utf8(), cfi.fileName().utf8() );
+ FileInfo cfi( inc->file().str() );
+ FileDef *fd = createFileDef( cfi.dirPath(), cfi.fileName() );
getCodeParser(inc->extension()).parseCode(m_ci,
inc->context(),
inc->text(),
@@ -745,8 +746,8 @@ void HtmlDocVisitor::visit(DocInclude *inc)
{
forceEndParagraph(inc);
m_ci.startCodeFragment("DoxyCode");
- QFileInfo cfi( inc->file() );
- FileDef *fd = createFileDef( cfi.dirPath().utf8(), cfi.fileName().utf8() );
+ FileInfo cfi( inc->file().str() );
+ FileDef *fd = createFileDef( cfi.dirPath(), cfi.fileName() );
getCodeParser(inc->extension()).parseCode(m_ci,
inc->context(),
extractBlock(inc->text(),inc->blockId()),
@@ -777,7 +778,7 @@ void HtmlDocVisitor::visit(DocInclude *inc)
void HtmlDocVisitor::visit(DocIncOperator *op)
{
//printf("DocIncOperator: type=%d first=%d, last=%d text='%s'\n",
- // op->type(),op->isFirst(),op->isLast(),op->text().data());
+ // op->type(),op->isFirst(),op->isLast(),qPrint(op->text()));
if (op->isFirst())
{
forceEndParagraph(op);
@@ -796,8 +797,8 @@ void HtmlDocVisitor::visit(DocIncOperator *op)
FileDef *fd = 0;
if (!op->includeFileName().isEmpty())
{
- QFileInfo cfi( op->includeFileName() );
- fd = createFileDef( cfi.dirPath().utf8(), cfi.fileName().utf8() );
+ FileInfo cfi( op->includeFileName().str() );
+ fd = createFileDef( cfi.dirPath(), cfi.fileName() );
}
getCodeParser(locLangExt).parseCode(
m_ci,
@@ -827,7 +828,7 @@ void HtmlDocVisitor::visit(DocIncOperator *op)
}
else
{
- if (!m_hide) m_t << endl;
+ if (!m_hide) m_t << "\n";
}
}
@@ -838,7 +839,7 @@ void HtmlDocVisitor::visit(DocFormula *f)
if (bDisplay)
{
forceEndParagraph(f);
- m_t << "<p class=\"formulaDsp\">" << endl;
+ m_t << "<p class=\"formulaDsp\">\n";
}
if (Config_getBool(USE_MATHJAX))
@@ -887,7 +888,7 @@ void HtmlDocVisitor::visit(DocFormula *f)
}
if (bDisplay)
{
- m_t << endl << "</p>" << endl;
+ m_t << "\n</p>\n";
forceStartParagraph(f);
}
}
@@ -901,17 +902,17 @@ void HtmlDocVisitor::visit(DocIndexEntry *e)
}
m_t << "<a name=\"" << anchor << "\"></a>";
//printf("*** DocIndexEntry: word='%s' scope='%s' member='%s'\n",
- // e->entry().data(),
- // e->scope() ? e->scope()->name().data() : "<null>",
- // e->member() ? e->member()->name().data() : "<null>"
+ // qPrint(e->entry()),
+ // e->scope() ? qPrint(e->scope()->name()) : "<null>",
+ // e->member() ? qPrint(e->member()->name()) : "<null>"
// );
Doxygen::indexList->addIndexItem(e->scope(),e->member(),anchor,e->entry());
}
void HtmlDocVisitor::visit(DocSimpleSectSep *)
{
- m_t << "</dd>" << endl;
- m_t << "<dd>" << endl;
+ m_t << "</dd>\n";
+ m_t << "<dd>\n";
}
void HtmlDocVisitor::visit(DocCite *cite)
@@ -1436,8 +1437,8 @@ void HtmlDocVisitor::visitPre(DocSection *s)
forceEndParagraph(s);
m_t << "<h" << s->level() << ">";
m_t << "<a class=\"anchor\" id=\"" << s->anchor();
- m_t << "\"></a>" << endl;
- filter(convertCharEntitiesToUTF8(s->title().data()));
+ m_t << "\"></a>\n";
+ filter(convertCharEntitiesToUTF8(s->title()));
m_t << "</h" << s->level() << ">\n";
}
@@ -1607,7 +1608,7 @@ void HtmlDocVisitor::visitPre(DocInternal *)
{
if (m_hide) return;
//forceEndParagraph(i);
- //m_t << "<p><b>" << theTranslator->trForInternalUseOnly() << "</b></p>" << endl;
+ //m_t << "<p><b>" << theTranslator->trForInternalUseOnly() << "</b></p>\n";
}
void HtmlDocVisitor::visitPost(DocInternal *)
@@ -1670,7 +1671,7 @@ void HtmlDocVisitor::visitPre(DocImage *img)
{
baseName=baseName.right(baseName.length()-i-1);
}
- if (!inlineImage) m_t << "<div class=\"image\">" << endl;
+ if (!inlineImage) m_t << "<div class=\"image\">\n";
QCString sizeAttribs;
if (!img->width().isEmpty())
{
@@ -1712,7 +1713,7 @@ void HtmlDocVisitor::visitPre(DocImage *img)
}
else
{
- m_t << ">" << alt << "</object>" << endl;
+ m_t << ">" << alt << "</object>\n";
}
}
else
@@ -1735,7 +1736,7 @@ void HtmlDocVisitor::visitPre(DocImage *img)
}
else
{
- m_t << "<div class=\"caption\">" << endl;
+ m_t << "<div class=\"caption\">\n";
}
}
else if (inlineImage)
@@ -1769,7 +1770,7 @@ void HtmlDocVisitor::visitPost(DocImage *img)
}
if (!inlineImage) // end <div class="image">
{
- m_t << "</div>" << endl;
+ m_t << "</div>\n";
forceStartParagraph(img);
}
}
@@ -1782,11 +1783,11 @@ void HtmlDocVisitor::visitPost(DocImage *img)
void HtmlDocVisitor::visitPre(DocDotFile *df)
{
if (m_hide) return;
- m_t << "<div class=\"dotgraph\">" << endl;
+ m_t << "<div class=\"dotgraph\">\n";
writeDotFile(df->file(),df->relPath(),df->context());
if (df->hasCaption())
{
- m_t << "<div class=\"caption\">" << endl;
+ m_t << "<div class=\"caption\">\n";
}
}
@@ -1795,19 +1796,19 @@ void HtmlDocVisitor::visitPost(DocDotFile *df)
if (m_hide) return;
if (df->hasCaption())
{
- m_t << "</div>" << endl;
+ m_t << "</div>\n";
}
- m_t << "</div>" << endl;
+ m_t << "</div>\n";
}
void HtmlDocVisitor::visitPre(DocMscFile *df)
{
if (m_hide) return;
- m_t << "<div class=\"mscgraph\">" << endl;
+ m_t << "<div class=\"mscgraph\">\n";
writeMscFile(df->file(),df->relPath(),df->context());
if (df->hasCaption())
{
- m_t << "<div class=\"caption\">" << endl;
+ m_t << "<div class=\"caption\">\n";
}
}
void HtmlDocVisitor::visitPost(DocMscFile *df)
@@ -1815,19 +1816,19 @@ void HtmlDocVisitor::visitPost(DocMscFile *df)
if (m_hide) return;
if (df->hasCaption())
{
- m_t << "</div>" << endl;
+ m_t << "</div>\n";
}
- m_t << "</div>" << endl;
+ m_t << "</div>\n";
}
void HtmlDocVisitor::visitPre(DocDiaFile *df)
{
if (m_hide) return;
- m_t << "<div class=\"diagraph\">" << endl;
+ m_t << "<div class=\"diagraph\">\n";
writeDiaFile(df->file(),df->relPath(),df->context());
if (df->hasCaption())
{
- m_t << "<div class=\"caption\">" << endl;
+ m_t << "<div class=\"caption\">\n";
}
}
void HtmlDocVisitor::visitPost(DocDiaFile *df)
@@ -1835,9 +1836,9 @@ void HtmlDocVisitor::visitPost(DocDiaFile *df)
if (m_hide) return;
if (df->hasCaption())
{
- m_t << "</div>" << endl;
+ m_t << "</div>\n";
}
- m_t << "</div>" << endl;
+ m_t << "</div>\n";
}
void HtmlDocVisitor::visitPre(DocLink *lnk)
@@ -1889,15 +1890,15 @@ void HtmlDocVisitor::visitPre(DocSecRefList *s)
{
if (m_hide) return;
forceEndParagraph(s);
- m_t << "<div>" << endl;
- m_t << "<ul class=\"multicol\">" << endl;
+ m_t << "<div>\n";
+ m_t << "<ul class=\"multicol\">\n";
}
void HtmlDocVisitor::visitPost(DocSecRefList *s)
{
if (m_hide) return;
- m_t << "</ul>" << endl;
- m_t << "</div>" << endl;
+ m_t << "</ul>\n";
+ m_t << "</div>\n";
forceStartParagraph(s);
}
@@ -1930,16 +1931,16 @@ void HtmlDocVisitor::visitPre(DocParamSect *s)
}
m_t << "<dl class=\"" << className << "\"><dt>";
m_t << heading;
- m_t << "</dt><dd>" << endl;
- m_t << " <table class=\"" << className << "\">" << endl;
+ m_t << "</dt><dd>\n";
+ m_t << " <table class=\"" << className << "\">\n";
}
void HtmlDocVisitor::visitPost(DocParamSect *s)
{
if (m_hide) return;
- m_t << " </table>" << endl;
- m_t << " </dd>" << endl;
- m_t << "</dl>" << endl;
+ m_t << " </table>\n";
+ m_t << " </dd>\n";
+ m_t << "</dl>\n";
forceStartParagraph(s);
}
@@ -2016,7 +2017,7 @@ void HtmlDocVisitor::visitPost(DocParamList *)
{
//printf("DocParamList::visitPost\n");
if (m_hide) return;
- m_t << "</td></tr>" << endl;
+ m_t << "</td></tr>\n";
}
void HtmlDocVisitor::visitPre(DocXRefItem *x)
@@ -2046,14 +2047,14 @@ void HtmlDocVisitor::visitPost(DocXRefItem *x)
{
if (m_hide) return;
if (x->title().isEmpty()) return;
- m_t << "</dd></dl>" << endl;
+ m_t << "</dd></dl>\n";
forceStartParagraph(x);
}
void HtmlDocVisitor::visitPre(DocInternalRef *ref)
{
if (m_hide) return;
- startLink(0,ref->file(),ref->relPath(),ref->anchor());
+ startLink(QCString(),ref->file(),ref->relPath(),ref->anchor());
}
void HtmlDocVisitor::visitPost(DocInternalRef *)
@@ -2082,7 +2083,7 @@ void HtmlDocVisitor::visitPre(DocHtmlBlockQuote *b)
void HtmlDocVisitor::visitPost(DocHtmlBlockQuote *b)
{
if (m_hide) return;
- m_t << "</blockquote>" << endl;
+ m_t << "</blockquote>\n";
forceStartParagraph(b);
}
@@ -2096,9 +2097,9 @@ void HtmlDocVisitor::visitPre(DocVhdlFlow *vf)
m_t << "<p>";
m_t << "flowchart: " ; // TODO: translate me
m_t << "<a href=\"";
- m_t << fname.data();
+ m_t << fname;
m_t << ".svg\">";
- m_t << VhdlDocGen::getFlowMember()->name().data();
+ m_t << VhdlDocGen::getFlowMember()->name();
m_t << "</a>";
if (vf->hasCaption())
{
@@ -2129,10 +2130,10 @@ void HtmlDocVisitor::visitPost(DocParBlock *)
-void HtmlDocVisitor::filter(const char *str)
+void HtmlDocVisitor::filter(const QCString &str)
{
- if (str==0) return;
- const char *p=str;
+ if (str.isEmpty()) return;
+ const char *p=str.data();
char c;
while (*p)
{
@@ -2166,10 +2167,10 @@ void HtmlDocVisitor::filter(const char *str)
/// Escape basic entities to produce a valid CDATA attribute value,
/// assume that the outer quoting will be using the double quote &quot;
-void HtmlDocVisitor::filterQuotedCdataAttr(const char* str)
+void HtmlDocVisitor::filterQuotedCdataAttr(const QCString &str)
{
- if (str==0) return;
- const char *p=str;
+ if (str.isEmpty()) return;
+ const char *p=str.data();
char c;
while (*p)
{
@@ -2206,7 +2207,7 @@ void HtmlDocVisitor::startLink(const QCString &ref,const QCString &file,
const QCString &relPath,const QCString &anchor,
const QCString &tooltip)
{
- //printf("HtmlDocVisitor: file=%s anchor=%s\n",file.data(),anchor.data());
+ //printf("HtmlDocVisitor: file=%s anchor=%s\n",qPrint(file),qPrint(anchor));
if (!ref.isEmpty()) // link to entity imported via tag file
{
m_t << "<a class=\"elRef\" ";
@@ -2294,7 +2295,7 @@ void HtmlDocVisitor::writeDiaFile(const QCString &fileName,
QCString outDir = Config_getString(HTML_OUTPUT);
writeDiaGraphFromFile(fileName,outDir,baseName,DIA_BITMAP);
- m_t << "<img src=\"" << relPath << baseName << ".png" << "\" />" << endl;
+ m_t << "<img src=\"" << relPath << baseName << ".png" << "\" />\n";
}
void HtmlDocVisitor::writePlantUMLFile(const QCString &fileName,
@@ -2316,15 +2317,15 @@ void HtmlDocVisitor::writePlantUMLFile(const QCString &fileName,
if (imgExt=="svg")
{
PlantumlManager::instance().generatePlantUMLOutput(fileName,outDir,PlantumlManager::PUML_SVG);
- //m_t << "<iframe scrolling=\"no\" frameborder=\"0\" src=\"" << relPath << baseName << ".svg" << "\" />" << endl;
+ //m_t << "<iframe scrolling=\"no\" frameborder=\"0\" src=\"" << relPath << baseName << ".svg" << "\" />\n";
//m_t << "<p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p>";
- //m_t << "</iframe>" << endl;
- m_t << "<object type=\"image/svg+xml\" data=\"" << relPath << baseName << ".svg\"></object>" << endl;
+ //m_t << "</iframe>\n";
+ m_t << "<object type=\"image/svg+xml\" data=\"" << relPath << baseName << ".svg\"></object>\n";
}
else
{
PlantumlManager::instance().generatePlantUMLOutput(fileName,outDir,PlantumlManager::PUML_BITMAP);
- m_t << "<img src=\"" << relPath << baseName << ".png" << "\" />" << endl;
+ m_t << "<img src=\"" << relPath << baseName << ".png" << "\" />\n";
}
}
@@ -2377,7 +2378,7 @@ void HtmlDocVisitor::forceEndParagraph(DocNode *n)
const DocNodeList &children = para->children();
auto it = std::find_if(children.begin(),children.end(),[n](const auto &np) { return np.get()==n; });
if (it==children.end()) return;
- int nodeIndex = it - children.begin();
+ int nodeIndex = static_cast<int>(it - children.begin());
nodeIndex--;
if (nodeIndex<0) return; // first node in paragraph
while (nodeIndex>=0 && isInvisibleNode(children.at(nodeIndex).get()))
@@ -2413,7 +2414,7 @@ void HtmlDocVisitor::forceStartParagraph(DocNode *n)
const DocNodeList &children = para->children();
auto it = std::find_if(children.begin(),children.end(),[n](const auto &np) { return np.get()==n; });
if (it==children.end()) return;
- int nodeIndex = it - children.begin();
+ int nodeIndex = static_cast<int>(it - children.begin());
int numNodes = static_cast<int>(para->children().size());
bool styleOutsideParagraph=insideStyleChangeThatIsOutsideParagraph(para,nodeIndex);
if (styleOutsideParagraph) return;
diff --git a/src/htmldocvisitor.h b/src/htmldocvisitor.h
index 084482e..287088d 100644
--- a/src/htmldocvisitor.h
+++ b/src/htmldocvisitor.h
@@ -17,19 +17,19 @@
#define _HTMLDOCVISITOR_H
#include "docvisitor.h"
-#include <qcstring.h>
+#include "qcstring.h"
class Definition;
class MemberDef;
class DocNode;
-class FTextStream;
class CodeOutputInterface;
+class TextStream;
/*! @brief Concrete visitor implementation for HTML output. */
class HtmlDocVisitor : public DocVisitor
{
public:
- HtmlDocVisitor(FTextStream &t,CodeOutputInterface &ci,const Definition *ctx);
+ HtmlDocVisitor(TextStream &t,CodeOutputInterface &ci,const Definition *ctx);
//--------------------------------------
// visitor functions for leaf nodes
@@ -139,8 +139,8 @@ class HtmlDocVisitor : public DocVisitor
//--------------------------------------
void writeObfuscatedMailAddress(const QCString &url);
- void filter(const char *str);
- void filterQuotedCdataAttr(const char* str);
+ void filter(const QCString &str);
+ void filterQuotedCdataAttr(const QCString &str);
void startLink(const QCString &ref,const QCString &file,
const QCString &relPath,const QCString &anchor,
const QCString &tooltip = "");
@@ -157,7 +157,7 @@ class HtmlDocVisitor : public DocVisitor
// state variables
//--------------------------------------
- FTextStream &m_t;
+ TextStream &m_t;
CodeOutputInterface &m_ci;
bool m_insidePre;
bool m_hide;
diff --git a/src/htmlentity.cpp b/src/htmlentity.cpp
index 29ff6e3..8f2eb78 100644
--- a/src/htmlentity.cpp
+++ b/src/htmlentity.cpp
@@ -15,7 +15,7 @@
#include "htmlentity.h"
#include "message.h"
-#include "ftextstream.h"
+#include "textstream.h"
//! Number of doxygen commands mapped as if it were HTML entities
static const int g_numberHtmlMappedCmds = 11;
@@ -474,7 +474,7 @@ DocSymbol::SymType HtmlEntityMapper::name2sym(const QCString &symName) const
return it!=m_name2sym.end() ? it->second : DocSymbol::Sym_Unknown;
}
-void HtmlEntityMapper::writeXMLSchema(FTextStream &t)
+void HtmlEntityMapper::writeXMLSchema(TextStream &t)
{
for (int i=0;i<g_numHtmlEntities - g_numberHtmlMappedCmds;i++)
{
diff --git a/src/htmlentity.h b/src/htmlentity.h
index 5337280..cbdc0a1 100644
--- a/src/htmlentity.h
+++ b/src/htmlentity.h
@@ -20,7 +20,7 @@
#include "docparser.h"
-class FTextStream;
+class TextStream;
/** @brief Singleton helper class to map html entities to other formats */
class HtmlEntityMapper
@@ -37,7 +37,7 @@ class HtmlEntityMapper
const char *man(DocSymbol::SymType symb) const;
const char *rtf(DocSymbol::SymType symb) const;
const DocSymbol::PerlSymb *perl(DocSymbol::SymType symb) const;
- void writeXMLSchema(FTextStream &t);
+ void writeXMLSchema(TextStream &t);
private:
void validate();
HtmlEntityMapper();
diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp
index ebf7aea..ea20707 100644
--- a/src/htmlgen.cpp
+++ b/src/htmlgen.cpp
@@ -1,8 +1,6 @@
/******************************************************************************
*
- *
- *
- * Copyright (C) 1997-2015 by Dimitri van Heesch.
+ * Copyright (C) 1997-2021 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,8 +17,8 @@
#include <assert.h>
#include <mutex>
+#include <sstream>
-#include <qdir.h>
#include "message.h"
#include "htmlgen.h"
#include "config.h"
@@ -51,6 +49,10 @@
#include "resourcemgr.h"
#include "tooltip.h"
#include "growbuf.h"
+#include "fileinfo.h"
+#include "dir.h"
+#include "utf8.h"
+#include "textstream.h"
//#define DBG_HTML(x) x;
#define DBG_HTML(x)
@@ -63,7 +65,7 @@ static const char *hex="0123456789ABCDEF";
// note: this is only active if DISABLE_INDEX=YES, if DISABLE_INDEX is disabled, this
// part will be rendered inside menu.js
-static void writeClientSearchBox(FTextStream &t,const char *relPath)
+static void writeClientSearchBox(TextStream &t,const QCString &relPath)
{
t << " <div id=\"MSearchBox\" class=\"MSearchBoxInactive\">\n";
t << " <span class=\"left\">\n";
@@ -85,7 +87,7 @@ static void writeClientSearchBox(FTextStream &t,const char *relPath)
// note: this is only active if DISABLE_INDEX=YES. if DISABLE_INDEX is disabled, this
// part will be rendered inside menu.js
-static void writeServerSearchBox(FTextStream &t,const char *relPath,bool highlightSearch)
+static void writeServerSearchBox(TextStream &t,const QCString &relPath,bool highlightSearch)
{
bool externalSearch = Config_getBool(EXTERNAL_SEARCH);
t << " <div id=\"MSearchBox\" class=\"MSearchBoxInactive\">\n";
@@ -141,7 +143,7 @@ static QCString getConvertLatexMacro()
QCString macrofile = Config_getString(FORMULA_MACROFILE);
if (macrofile.isEmpty()) return "";
QCString s = fileToString(macrofile);
- macrofile = QFileInfo(macrofile).absFilePath().utf8();
+ macrofile = FileInfo(macrofile.str()).absFilePath();
int size = s.length();
GrowBuf out(size);
const char *data = s.data();
@@ -298,8 +300,7 @@ static QCString getConvertLatexMacro()
static QCString getSearchBox(bool serverSide, QCString relPath, bool highlightSearch)
{
- QGString result;
- FTextStream t(&result);
+ TextStream t;
if (serverSide)
{
writeServerSearchBox(t, relPath, highlightSearch);
@@ -308,7 +309,7 @@ static QCString getSearchBox(bool serverSide, QCString relPath, bool highlightSe
{
writeClientSearchBox(t, relPath);
}
- return QCString(result);
+ return t.str();
}
static QCString substituteHtmlKeywords(const QCString &str,
@@ -346,10 +347,10 @@ static QCString substituteHtmlKeywords(const QCString &str,
}
else
{
- QFileInfo cssfi(cssFile);
+ FileInfo cssfi(cssFile.str());
if (cssfi.exists())
{
- cssFile = cssfi.fileName().utf8();
+ cssFile = cssfi.fileName();
}
else
{
@@ -359,22 +360,22 @@ static QCString substituteHtmlKeywords(const QCString &str,
extraCssText = "";
const StringVector &extraCssFile = Config_getList(HTML_EXTRA_STYLESHEET);
- for (const auto &extraFile : extraCssFile)
+ for (const auto &fileName : extraCssFile)
{
- QCString fileName = extraFile.c_str();
- if (!fileName.isEmpty())
+ if (!fileName.empty())
{
- QFileInfo fi(fileName);
+ FileInfo fi(fileName);
if (fi.exists())
{
- extraCssText += "<link href=\"$relpath^"+stripPath(fileName)+"\" rel=\"stylesheet\" type=\"text/css\"/>\n";
+ extraCssText += "<link href=\"$relpath^"+stripPath(fileName.c_str())+"\" rel=\"stylesheet\" type=\"text/css\"/>\n";
}
}
}
if (timeStamp)
{
- generatedBy = theTranslator->trGeneratedAt(dateToString(TRUE), convertToHtml(Config_getString(PROJECT_NAME)));
+ generatedBy = theTranslator->trGeneratedAt(dateToString(TRUE),
+ convertToHtml(Config_getString(PROJECT_NAME)));
}
else
{
@@ -435,44 +436,109 @@ static QCString substituteHtmlKeywords(const QCString &str,
if (mathJax)
{
+ QCString mathJaxVersion = Config_getEnum(MATHJAX_VERSION);
QCString path = Config_getString(MATHJAX_RELPATH);
if (path.isEmpty() || path.left(2)=="..") // relative path
{
path.prepend(relPath);
}
- mathJaxJs = "<script type=\"text/x-mathjax-config\">\n"
- " MathJax.Hub.Config({\n"
- " extensions: [\"tex2jax.js\"";
- const StringVector &mathJaxExtensions = Config_getList(MATHJAX_EXTENSIONS);
- for (const auto &s : mathJaxExtensions)
- {
- mathJaxJs+= ", \""+QCString(s.c_str())+".js\"";
- }
- if (mathJaxFormat.isEmpty())
- {
- mathJaxFormat = "HTML-CSS";
- }
- mathJaxJs += "],\n"
- " jax: [\"input/TeX\",\"output/"+mathJaxFormat+"\"],\n"
- "});\n";
- if (!g_mathjax_code.isEmpty())
+
+ if (mathJaxVersion == "MathJax_3")
{
- mathJaxJs += g_mathjax_code;
- mathJaxJs += "\n";
+ mathJaxJs += "<script>\n"
+ " window.MathJax = {\n"
+ " options: {\n"
+ " ignoreHtmlClass: 'tex2jax_ignore',\n"
+ " processHtmlClass: 'tex2jax_process'\n"
+ " },\n";
+ const StringVector &mathJaxExtensions = Config_getList(MATHJAX_EXTENSIONS);
+ if (!mathJaxExtensions.empty() || !g_latex_macro.isEmpty())
+ {
+ mathJaxJs+= " tex: {\n"
+ " packages: ['base'";
+ if (!g_latex_macro.isEmpty())
+ {
+ mathJaxJs+= ",'newcommand'";
+ }
+ for (const auto &s : mathJaxExtensions)
+ {
+ mathJaxJs+= ",'"+QCString(s.c_str())+"'";
+ }
+ mathJaxJs += "]\n"
+ " },\n"
+ " tex: {\n"
+ " macros: {}\n"
+ " }\n";
+ }
+ mathJaxJs += " };\n";
+ mathJaxJs += "</script>\n";
+
+ if (!g_latex_macro.isEmpty())
+ {
+ mathJaxJs += "<script>\n"
+ " Object.assign(MathJax.tex.macros, {\n";
+ mathJaxJs += g_latex_macro;
+ mathJaxJs += "\n"
+ " });\n"
+ "</script>\n";
+ }
+
+ // MATHJAX_CODEFILE
+ if (!g_mathjax_code.isEmpty())
+ {
+ mathJaxJs += "<script>\n";
+ mathJaxJs += g_mathjax_code;
+ mathJaxJs += "\n";
+ mathJaxJs += "</script>\n";
+ }
+
+
+ mathJaxJs += "<script type=\"text/javascript\" id=\"MathJax-script\" async=\"async\" src=\"" + path;
+ if (mathJaxFormat == "chtml")
+ {
+ mathJaxJs += "es5/tex-chtml.js\"></script>\n" ;
+ }
+ else if (mathJaxFormat == "SVG")
+ {
+ mathJaxJs += "es5/tex-svg.js\"></script>\n" ;
+ }
}
- mathJaxJs += "</script>\n";
- if (!g_latex_macro.isEmpty())
+ else
{
- mathJaxJs += "<script type=\"text/x-mathjax-config\">\n"
- " MathJax.Hub.Config({\n"
- " TeX: { Macros: {\n";
- mathJaxJs += g_latex_macro;
- mathJaxJs += "\n"
- " } }\n"
- "});\n"
- "</script>\n";
+ mathJaxJs = "<script type=\"text/x-mathjax-config\">\n"
+ " MathJax.Hub.Config({\n"
+ " extensions: [\"tex2jax.js\"";
+ const StringVector &mathJaxExtensions = Config_getList(MATHJAX_EXTENSIONS);
+ for (const auto &s : mathJaxExtensions)
+ {
+ mathJaxJs+= ", \""+QCString(s.c_str())+".js\"";
+ }
+ if (mathJaxFormat.isEmpty())
+ {
+ mathJaxFormat = "HTML-CSS";
+ }
+ mathJaxJs += "],\n"
+ " jax: [\"input/TeX\",\"output/"+mathJaxFormat+"\"],\n"
+ "});\n";
+ if (!g_mathjax_code.isEmpty())
+ {
+ mathJaxJs += g_mathjax_code;
+ mathJaxJs += "\n";
+ }
+ mathJaxJs += "</script>\n";
+ if (!g_latex_macro.isEmpty())
+ {
+ mathJaxJs += "<script type=\"text/x-mathjax-config\">\n"
+ " MathJax.Hub.Config({\n"
+ " TeX: { Macros: {\n";
+ mathJaxJs += g_latex_macro;
+ mathJaxJs += "\n"
+ " } }\n"
+ "});\n"
+ "</script>\n";
+ }
+ mathJaxJs += "<script type=\"text/javascript\" async=\"async\" src=\"" + path + "MathJax.js\"></script>\n";
}
- mathJaxJs += "<script type=\"text/javascript\" async=\"async\" src=\"" + path + "MathJax.js\"></script>\n";
}
// first substitute generic keywords
@@ -510,20 +576,13 @@ static QCString substituteHtmlKeywords(const QCString &str,
//--------------------------------------------------------------------------
-HtmlCodeGenerator::HtmlCodeGenerator()
-{
-}
-
-HtmlCodeGenerator::HtmlCodeGenerator(FTextStream &t,const QCString &relPath)
- : m_relPath(relPath)
+HtmlCodeGenerator::HtmlCodeGenerator(TextStream &t) : m_t(t)
{
- setTextStream(t);
}
-void HtmlCodeGenerator::setTextStream(FTextStream &t)
+HtmlCodeGenerator::HtmlCodeGenerator(TextStream &t,const QCString &relPath)
+ : m_t(t), m_relPath(relPath)
{
- m_streamSet = t.device()!=0;
- m_t.setDevice(t.device());
}
void HtmlCodeGenerator::setRelativePath(const QCString &path)
@@ -531,12 +590,12 @@ void HtmlCodeGenerator::setRelativePath(const QCString &path)
m_relPath = path;
}
-void HtmlCodeGenerator::codify(const char *str)
+void HtmlCodeGenerator::codify(const QCString &str)
{
int tabSize = Config_getInt(TAB_SIZE);
- if (str && m_streamSet)
+ if (!str.isEmpty())
{
- const char *p=str;
+ const char *p=str.data();
char c;
int spacesToNextTabStop;
while (*p)
@@ -585,7 +644,7 @@ void HtmlCodeGenerator::codify(const char *str)
}
else
{
- p=writeUtf8Char(m_t,p-1);
+ p=writeUTF8Char(m_t,p-1);
m_col++;
}
}
@@ -595,13 +654,13 @@ void HtmlCodeGenerator::codify(const char *str)
}
}
-void HtmlCodeGenerator::docify(const char *str)
+void HtmlCodeGenerator::docify(const QCString &str)
{
//m_t << getHtmlDirEmbeddingChar(getTextDirByConfig(str));
- if (str && m_streamSet)
+ if (!str.isEmpty())
{
- const char *p=str;
+ const char *p=str.data();
char c;
while (*p)
{
@@ -642,10 +701,9 @@ void HtmlCodeGenerator::docify(const char *str)
}
}
-void HtmlCodeGenerator::writeLineNumber(const char *ref,const char *filename,
- const char *anchor,int l)
+void HtmlCodeGenerator::writeLineNumber(const QCString &ref,const QCString &filename,
+ const QCString &anchor,int l)
{
- if (!m_streamSet) return;
const int maxLineNrStr = 10;
char lineNumber[maxLineNrStr];
char lineAnchor[maxLineNrStr];
@@ -659,9 +717,9 @@ void HtmlCodeGenerator::writeLineNumber(const char *ref,const char *filename,
}
m_t << "<a name=\"" << lineAnchor << "\"></a><span class=\"lineno\">";
- if (filename)
+ if (!filename.isEmpty())
{
- _writeCodeLink("line",ref,filename,anchor,lineNumber,0);
+ _writeCodeLink("line",ref,filename,anchor,lineNumber,QCString());
}
else
{
@@ -672,21 +730,20 @@ void HtmlCodeGenerator::writeLineNumber(const char *ref,const char *filename,
m_col=0;
}
-void HtmlCodeGenerator::writeCodeLink(const char *ref,const char *f,
- const char *anchor, const char *name,
- const char *tooltip)
+void HtmlCodeGenerator::writeCodeLink(const QCString &ref,const QCString &f,
+ const QCString &anchor, const QCString &name,
+ const QCString &tooltip)
{
- if (!m_streamSet) return;
//printf("writeCodeLink(ref=%s,f=%s,anchor=%s,name=%s,tooltip=%s)\n",ref,f,anchor,name,tooltip);
_writeCodeLink("code",ref,f,anchor,name,tooltip);
}
-void HtmlCodeGenerator::_writeCodeLink(const char *className,
- const char *ref,const char *f,
- const char *anchor, const char *name,
- const char *tooltip)
+void HtmlCodeGenerator::_writeCodeLink(const QCString &className,
+ const QCString &ref,const QCString &f,
+ const QCString &anchor, const QCString &name,
+ const QCString &tooltip)
{
- if (ref)
+ if (!ref.isEmpty())
{
m_t << "<a class=\"" << className << "Ref\" ";
m_t << externalLinkTarget();
@@ -697,18 +754,18 @@ void HtmlCodeGenerator::_writeCodeLink(const char *className,
}
m_t << "href=\"";
m_t << externalRef(m_relPath,ref,TRUE);
- if (f) m_t << addHtmlExtensionIfMissing(f);
- if (anchor) m_t << "#" << anchor;
+ if (!f.isEmpty()) m_t << addHtmlExtensionIfMissing(f);
+ if (!anchor.isEmpty()) m_t << "#" << anchor;
m_t << "\"";
- if (tooltip) m_t << " title=\"" << convertToHtml(tooltip) << "\"";
+ if (!tooltip.isEmpty()) m_t << " title=\"" << convertToHtml(tooltip) << "\"";
m_t << ">";
docify(name);
m_t << "</a>";
- m_col+=qstrlen(name);
+ m_col+=name.length();
}
-void HtmlCodeGenerator::writeTooltip(const char *id, const DocLinkInfo &docInfo,
- const char *decl, const char *desc,
+void HtmlCodeGenerator::writeTooltip(const QCString &id, const DocLinkInfo &docInfo,
+ const QCString &decl, const QCString &desc,
const SourceLinkInfo &defInfo,
const SourceLinkInfo &declInfo)
{
@@ -731,13 +788,13 @@ void HtmlCodeGenerator::writeTooltip(const char *id, const DocLinkInfo &docInfo,
m_t << "</a>";
}
m_t << "</div>";
- if (decl)
+ if (!decl.isEmpty())
{
m_t << "<div class=\"ttdeci\">";
docify(decl);
m_t << "</div>";
}
- if (desc)
+ if (!desc.isEmpty())
{
m_t << "<div class=\"ttdoc\">";
docify(desc);
@@ -785,76 +842,70 @@ void HtmlCodeGenerator::writeTooltip(const char *id, const DocLinkInfo &docInfo,
}
m_t << "</div>";
}
- m_t << "</div>" << endl;
+ m_t << "</div>\n";
}
void HtmlCodeGenerator::startCodeLine(bool)
{
- if (m_streamSet)
+ m_col=0;
+ if (!m_lineOpen)
{
- m_col=0;
- if (!m_lineOpen)
- {
- m_t << "<div class=\"line\">";
- m_lineOpen = TRUE;
- }
+ m_t << "<div class=\"line\">";
+ m_lineOpen = TRUE;
}
}
void HtmlCodeGenerator::endCodeLine()
{
- if (m_streamSet)
+ if (m_col == 0)
{
- if (m_col == 0)
- {
- m_t << " ";
- m_col++;
- }
- if (m_lineOpen)
- {
- m_t << "</div>\n";
- m_lineOpen = FALSE;
- }
+ m_t << " ";
+ m_col++;
+ }
+ if (m_lineOpen)
+ {
+ m_t << "</div>\n";
+ m_lineOpen = FALSE;
}
}
-void HtmlCodeGenerator::startFontClass(const char *s)
+void HtmlCodeGenerator::startFontClass(const QCString &s)
{
- if (m_streamSet) m_t << "<span class=\"" << s << "\">";
+ m_t << "<span class=\"" << s << "\">";
}
void HtmlCodeGenerator::endFontClass()
{
- if (m_streamSet) m_t << "</span>";
+ m_t << "</span>";
}
-void HtmlCodeGenerator::writeCodeAnchor(const char *anchor)
+void HtmlCodeGenerator::writeCodeAnchor(const QCString &anchor)
{
- if (m_streamSet) m_t << "<a name=\"" << anchor << "\"></a>";
+ m_t << "<a name=\"" << anchor << "\"></a>";
}
-void HtmlCodeGenerator::startCodeFragment(const char *)
+void HtmlCodeGenerator::startCodeFragment(const QCString &)
{
- if (m_streamSet) m_t << "<div class=\"fragment\">";
+ m_t << "<div class=\"fragment\">";
}
-void HtmlCodeGenerator::endCodeFragment(const char *)
+void HtmlCodeGenerator::endCodeFragment(const QCString &)
{
//endCodeLine checks is there is still an open code line, if so closes it.
endCodeLine();
- if (m_streamSet) m_t << "</div><!-- fragment -->";
+ m_t << "</div><!-- fragment -->";
}
//--------------------------------------------------------------------------
-HtmlGenerator::HtmlGenerator() : OutputGenerator(Config_getString(HTML_OUTPUT))
+HtmlGenerator::HtmlGenerator() : OutputGenerator(Config_getString(HTML_OUTPUT)), m_codeGen(m_t)
{
}
-HtmlGenerator::HtmlGenerator(const HtmlGenerator &og) : OutputGenerator(og)
+HtmlGenerator::HtmlGenerator(const HtmlGenerator &og) : OutputGenerator(og), m_codeGen(og.m_codeGen)
{
}
@@ -878,16 +929,16 @@ HtmlGenerator::~HtmlGenerator()
void HtmlGenerator::init()
{
QCString dname = Config_getString(HTML_OUTPUT);
- QDir d(dname);
- if (!d.exists() && !d.mkdir(dname))
+ Dir d(dname.str());
+ if (!d.exists() && !d.mkdir(dname.str()))
{
- term("Could not create output directory %s\n",dname.data());
+ term("Could not create output directory %s\n",qPrint(dname));
}
//writeLogo(dname);
if (!Config_getString(HTML_HEADER).isEmpty())
{
g_header=fileToString(Config_getString(HTML_HEADER));
- //printf("g_header='%s'\n",g_header.data());
+ //printf("g_header='%s'\n",qPrint(g_header));
}
else
{
@@ -897,7 +948,7 @@ void HtmlGenerator::init()
if (!Config_getString(HTML_FOOTER).isEmpty())
{
g_footer=fileToString(Config_getString(HTML_FOOTER));
- //printf("g_footer='%s'\n",g_footer.data());
+ //printf("g_footer='%s'\n",qPrint(g_footer));
}
else
{
@@ -909,10 +960,10 @@ void HtmlGenerator::init()
if (!Config_getString(MATHJAX_CODEFILE).isEmpty())
{
g_mathjax_code=fileToString(Config_getString(MATHJAX_CODEFILE));
- //printf("g_mathjax_code='%s'\n",g_mathjax_code.data());
+ //printf("g_mathjax_code='%s'\n",qPrint(g_mathjax_code));
}
g_latex_macro=getConvertLatexMacro();
- //printf("converted g_latex_macro='%s'\n",g_latex_macro.data());
+ //printf("converted g_latex_macro='%s'\n",qPrint(g_latex_macro));
}
createSubDirs(d);
@@ -936,15 +987,15 @@ void HtmlGenerator::init()
}
{
- QFile f(dname+"/dynsections.js");
- if (f.open(IO_WriteOnly))
+ std::ofstream f(dname.str()+"/dynsections.js",std::ofstream::out | std::ofstream::binary);
+ if (f.is_open())
{
- FTextStream t(&f);
+ TextStream t(&f);
t << mgr.getAsString("dynsections.js");
if (Config_getBool(SOURCE_BROWSER) && Config_getBool(SOURCE_TOOLTIPS))
{
- t << endl <<
- "$(document).ready(function() {\n"
+ t <<
+ "\n$(document).ready(function() {\n"
" $('.code,.codeRef').each(function() {\n"
" $(this).data('powertip',$('#a'+$(this).attr('href').replace(/.*\\//,'').replace(/[^a-z_A-Z0-9]/g,'_')).html());\n"
" $(this).powerTip({ placement: 's', smartPlacement: true, mouseOnToPopup: true });\n"
@@ -985,7 +1036,7 @@ void HtmlGenerator::writeTabData()
mgr.copyResource("nav_g.png",dname);
}
-void HtmlGenerator::writeSearchData(const char *dname)
+void HtmlGenerator::writeSearchData(const QCString &dname)
{
bool serverBasedSearch = Config_getBool(SERVER_BASED_SEARCH);
//writeImgData(dname,serverBasedSearch ? search_server_data : search_client_data);
@@ -1011,10 +1062,10 @@ void HtmlGenerator::writeSearchData(const char *dname)
}
QCString searchDirName = dname;
- QFile f(searchDirName+"/search.css");
- if (f.open(IO_WriteOnly))
+ std::ofstream f(searchDirName.str()+"/search.css",std::ofstream::out | std::ofstream::binary);
+ if (f.is_open())
{
- FTextStream t(&f);
+ TextStream t(&f);
QCString searchCss;
if (Config_getBool(DISABLE_INDEX))
{
@@ -1034,39 +1085,35 @@ void HtmlGenerator::writeSearchData(const char *dname)
}
}
-void HtmlGenerator::writeStyleSheetFile(QFile &file)
+void HtmlGenerator::writeStyleSheetFile(TextStream &t)
{
- FTextStream t(&file);
t << replaceColorMarkers(substitute(ResourceMgr::instance().getAsString("doxygen.css"),"$doxygenversion",getDoxygenVersion()));
}
-void HtmlGenerator::writeHeaderFile(QFile &file, const char * /*cssname*/)
+void HtmlGenerator::writeHeaderFile(TextStream &t, const QCString & /*cssname*/)
{
- FTextStream t(&file);
- t << "<!-- HTML header for doxygen " << getDoxygenVersion() << "-->" << endl;
+ t << "<!-- HTML header for doxygen " << getDoxygenVersion() << "-->\n";
t << ResourceMgr::instance().getAsString("header.html");
}
-void HtmlGenerator::writeFooterFile(QFile &file)
+void HtmlGenerator::writeFooterFile(TextStream &t)
{
- FTextStream t(&file);
- t << "<!-- HTML footer for doxygen " << getDoxygenVersion() << "-->" << endl;
+ t << "<!-- HTML footer for doxygen " << getDoxygenVersion() << "-->\n";
t << ResourceMgr::instance().getAsString("footer.html");
}
static std::mutex g_indexLock;
-void HtmlGenerator::startFile(const char *name,const char *,
- const char *title,int id)
+void HtmlGenerator::startFile(const QCString &name,const QCString &,
+ const QCString &title,int id)
{
- //printf("HtmlGenerator::startFile(%s)\n",name);
+ //printf("HtmlGenerator::startFile(%s)\n",qPrint(name));
m_relPath = relativePathToRoot(name);
QCString fileName = addHtmlExtensionIfMissing(name);
m_lastTitle=title;
startPlainFile(fileName);
m_codeGen.setId(id);
- m_codeGen.setTextStream(t);
m_codeGen.setRelativePath(m_relPath);
{
std::lock_guard<std::mutex> lock(g_indexLock);
@@ -1074,26 +1121,26 @@ void HtmlGenerator::startFile(const char *name,const char *,
}
m_lastFile = fileName;
- t << substituteHtmlKeywords(g_header,convertToHtml(filterTitle(title?title:"")),m_relPath);
+ m_t << substituteHtmlKeywords(g_header,convertToHtml(filterTitle(title)),m_relPath);
- t << "<!-- " << theTranslator->trGeneratedBy() << " Doxygen "
- << getDoxygenVersion() << " -->" << endl;
+ m_t << "<!-- " << theTranslator->trGeneratedBy() << " Doxygen "
+ << getDoxygenVersion() << " -->\n";
//bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
bool searchEngine = Config_getBool(SEARCHENGINE);
if (searchEngine /*&& !generateTreeView*/)
{
- t << "<script type=\"text/javascript\">\n";
- t << "/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n";
- t << "var searchBox = new SearchBox(\"searchBox\", \""
- << m_relPath<< "search\",false,'" << theTranslator->trSearch() << "','" << Doxygen::htmlFileExtension << "');\n";
- t << "/* @license-end */\n";
- t << "</script>\n";
+ m_t << "<script type=\"text/javascript\">\n";
+ m_t << "/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n";
+ m_t << "var searchBox = new SearchBox(\"searchBox\", \""
+ << m_relPath<< "search\",false,'" << theTranslator->trSearch() << "','" << Doxygen::htmlFileExtension << "');\n";
+ m_t << "/* @license-end */\n";
+ m_t << "</script>\n";
}
//generateDynamicSections(t,relPath);
m_sectionCount=0;
}
-void HtmlGenerator::writeSearchInfo(FTextStream &t,const QCString &)
+void HtmlGenerator::writeSearchInfo(TextStream &t,const QCString &)
{
bool searchEngine = Config_getBool(SEARCHENGINE);
bool serverBasedSearch = Config_getBool(SERVER_BASED_SEARCH);
@@ -1118,11 +1165,11 @@ void HtmlGenerator::writeSearchInfo(FTextStream &t,const QCString &)
void HtmlGenerator::writeSearchInfo()
{
- writeSearchInfo(t,m_relPath);
+ writeSearchInfo(m_t,m_relPath);
}
-QCString HtmlGenerator::writeLogoAsString(const char *path)
+QCString HtmlGenerator::writeLogoAsString(const QCString &path)
{
bool timeStamp = Config_getBool(HTML_TIMESTAMP);
QCString result;
@@ -1148,18 +1195,18 @@ QCString HtmlGenerator::writeLogoAsString(const char *path)
void HtmlGenerator::writeLogo()
{
- t << writeLogoAsString(m_relPath);
+ m_t << writeLogoAsString(m_relPath);
}
-void HtmlGenerator::writePageFooter(FTextStream &t,const QCString &lastTitle,
+void HtmlGenerator::writePageFooter(TextStream &t,const QCString &lastTitle,
const QCString &relPath,const QCString &navPath)
{
t << substituteHtmlKeywords(g_footer,convertToHtml(lastTitle),relPath,navPath);
}
-void HtmlGenerator::writeFooter(const char *navPath)
+void HtmlGenerator::writeFooter(const QCString &navPath)
{
- writePageFooter(t,m_lastTitle,m_relPath,navPath);
+ writePageFooter(m_t,m_lastTitle,m_relPath,navPath);
}
void HtmlGenerator::endFile()
@@ -1169,12 +1216,12 @@ void HtmlGenerator::endFile()
void HtmlGenerator::startProjectNumber()
{
- t << "<h3 class=\"version\">";
+ m_t << "<h3 class=\"version\">";
}
void HtmlGenerator::endProjectNumber()
{
- t << "</h3>";
+ m_t << "</h3>";
}
void HtmlGenerator::writeStyleInfo(int part)
@@ -1188,42 +1235,41 @@ void HtmlGenerator::writeStyleInfo(int part)
startPlainFile("doxygen.css");
// alternative, cooler looking titles
- //t << "H1 { text-align: center; border-width: thin none thin none;" << endl;
- //t << " border-style : double; border-color : blue; padding-left : 1em; padding-right : 1em }" << endl;
+ //t << "H1 { text-align: center; border-width: thin none thin none;\n";
+ //t << " border-style : double; border-color : blue; padding-left : 1em; padding-right : 1em }\n";
- t << replaceColorMarkers(substitute(ResourceMgr::instance().getAsString("doxygen.css"),"$doxygenversion",getDoxygenVersion()));
+ m_t << replaceColorMarkers(substitute(ResourceMgr::instance().getAsString("doxygen.css"),"$doxygenversion",getDoxygenVersion()));
endPlainFile();
Doxygen::indexList->addStyleSheetFile("doxygen.css");
}
else // write user defined style sheet
{
QCString cssname=Config_getString(HTML_STYLESHEET);
- QFileInfo cssfi(cssname);
+ FileInfo cssfi(cssname.str());
if (!cssfi.exists() || !cssfi.isFile() || !cssfi.isReadable())
{
- err("style sheet %s does not exist or is not readable!", Config_getString(HTML_STYLESHEET).data());
+ err("style sheet %s does not exist or is not readable!", qPrint(Config_getString(HTML_STYLESHEET)));
}
else
{
// convert style sheet to string
QCString fileStr = fileToString(cssname);
// write the string into the output dir
- startPlainFile(cssfi.fileName().utf8());
- t << fileStr;
+ startPlainFile(cssfi.fileName().c_str());
+ m_t << fileStr;
endPlainFile();
}
- Doxygen::indexList->addStyleSheetFile(cssfi.fileName().utf8());
+ Doxygen::indexList->addStyleSheetFile(cssfi.fileName().c_str());
}
const StringVector &extraCssFiles = Config_getList(HTML_EXTRA_STYLESHEET);
- for (const auto &extraCss : extraCssFiles)
+ for (const auto &fileName : extraCssFiles)
{
- QCString fileName = extraCss.c_str();
- if (!fileName.isEmpty())
+ if (!fileName.empty())
{
- QFileInfo fi(fileName);
+ FileInfo fi(fileName);
if (fi.exists())
{
- Doxygen::indexList->addStyleSheetFile(fi.fileName().utf8());
+ Doxygen::indexList->addStyleSheetFile(fi.fileName().c_str());
}
}
}
@@ -1237,160 +1283,160 @@ void HtmlGenerator::writeStyleInfo(int part)
}
}
-void HtmlGenerator::startDoxyAnchor(const char *,const char *,
- const char *anchor, const char *,
- const char *)
+void HtmlGenerator::startDoxyAnchor(const QCString &,const QCString &,
+ const QCString &anchor, const QCString &,
+ const QCString &)
{
- t << "<a id=\"" << anchor << "\"></a>";
+ m_t << "<a id=\"" << anchor << "\"></a>";
}
-void HtmlGenerator::endDoxyAnchor(const char *,const char *)
+void HtmlGenerator::endDoxyAnchor(const QCString &,const QCString &)
{
}
//void HtmlGenerator::newParagraph()
//{
-// t << endl << "<p>" << endl;
+// t << "\n<p>\n";
//}
-void HtmlGenerator::startParagraph(const char *classDef)
+void HtmlGenerator::startParagraph(const QCString &classDef)
{
- if (classDef)
- t << endl << "<p class=\"" << classDef << "\">";
+ if (!classDef.isEmpty())
+ m_t << "\n<p class=\"" << classDef << "\">";
else
- t << endl << "<p>";
+ m_t << "\n<p>";
}
void HtmlGenerator::endParagraph()
{
- t << "</p>" << endl;
+ m_t << "</p>\n";
}
-void HtmlGenerator::writeString(const char *text)
+void HtmlGenerator::writeString(const QCString &text)
{
- t << text;
+ m_t << text;
}
void HtmlGenerator::startIndexListItem()
{
- t << "<li>";
+ m_t << "<li>";
}
void HtmlGenerator::endIndexListItem()
{
- t << "</li>" << endl;
+ m_t << "</li>\n";
}
-void HtmlGenerator::startIndexItem(const char *ref,const char *f)
+void HtmlGenerator::startIndexItem(const QCString &ref,const QCString &f)
{
//printf("HtmlGenerator::startIndexItem(%s,%s)\n",ref,f);
- if (ref || f)
+ if (!ref.isEmpty() || !f.isEmpty())
{
- if (ref)
+ if (!ref.isEmpty())
{
- t << "<a class=\"elRef\" ";
- t << externalLinkTarget();
+ m_t << "<a class=\"elRef\" ";
+ m_t << externalLinkTarget();
}
else
{
- t << "<a class=\"el\" ";
+ m_t << "<a class=\"el\" ";
}
- t << "href=\"";
- t << externalRef(m_relPath,ref,TRUE);
- if (f) t << addHtmlExtensionIfMissing(f);
- t << "\">";
+ m_t << "href=\"";
+ m_t << externalRef(m_relPath,ref,TRUE);
+ if (!f.isEmpty()) m_t << addHtmlExtensionIfMissing(f);
+ m_t << "\">";
}
else
{
- t << "<b>";
+ m_t << "<b>";
}
}
-void HtmlGenerator::endIndexItem(const char *ref,const char *f)
+void HtmlGenerator::endIndexItem(const QCString &ref,const QCString &f)
{
//printf("HtmlGenerator::endIndexItem(%s,%s,%s)\n",ref,f,name);
- if (ref || f)
+ if (!ref.isEmpty() || !f.isEmpty())
{
- t << "</a>";
+ m_t << "</a>";
}
else
{
- t << "</b>";
+ m_t << "</b>";
}
}
-void HtmlGenerator::writeStartAnnoItem(const char *,const char *f,
- const char *path,const char *name)
+void HtmlGenerator::writeStartAnnoItem(const QCString &,const QCString &f,
+ const QCString &path,const QCString &name)
{
- t << "<li>";
- if (path) docify(path);
- t << "<a class=\"el\" href=\"" << addHtmlExtensionIfMissing(f) << "\">";
+ m_t << "<li>";
+ if (!path.isEmpty()) docify(path);
+ m_t << "<a class=\"el\" href=\"" << addHtmlExtensionIfMissing(f) << "\">";
docify(name);
- t << "</a> ";
+ m_t << "</a> ";
}
-void HtmlGenerator::writeObjectLink(const char *ref,const char *f,
- const char *anchor, const char *name)
+void HtmlGenerator::writeObjectLink(const QCString &ref,const QCString &f,
+ const QCString &anchor, const QCString &name)
{
- if (ref)
+ if (!ref.isEmpty())
{
- t << "<a class=\"elRef\" ";
- t << externalLinkTarget();
+ m_t << "<a class=\"elRef\" ";
+ m_t << externalLinkTarget();
}
else
{
- t << "<a class=\"el\" ";
+ m_t << "<a class=\"el\" ";
}
- t << "href=\"";
- t << externalRef(m_relPath,ref,TRUE);
- if (f) t << addHtmlExtensionIfMissing(f);
- if (anchor) t << "#" << anchor;
- t << "\">";
+ m_t << "href=\"";
+ m_t << externalRef(m_relPath,ref,TRUE);
+ if (!f.isEmpty()) m_t << addHtmlExtensionIfMissing(f);
+ if (!anchor.isEmpty()) m_t << "#" << anchor;
+ m_t << "\">";
docify(name);
- t << "</a>";
+ m_t << "</a>";
}
-void HtmlGenerator::startTextLink(const char *f,const char *anchor)
+void HtmlGenerator::startTextLink(const QCString &f,const QCString &anchor)
{
- t << "<a href=\"";
- if (f) t << m_relPath << addHtmlExtensionIfMissing(f);
- if (anchor) t << "#" << anchor;
- t << "\">";
+ m_t << "<a href=\"";
+ if (!f.isEmpty()) m_t << m_relPath << addHtmlExtensionIfMissing(f);
+ if (!anchor.isEmpty()) m_t << "#" << anchor;
+ m_t << "\">";
}
void HtmlGenerator::endTextLink()
{
- t << "</a>";
+ m_t << "</a>";
}
-void HtmlGenerator::startHtmlLink(const char *url)
+void HtmlGenerator::startHtmlLink(const QCString &url)
{
bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
- t << "<a ";
- if (generateTreeView) t << "target=\"top\" ";
- t << "href=\"";
- if (url) t << url;
- t << "\">";
+ m_t << "<a ";
+ if (generateTreeView) m_t << "target=\"top\" ";
+ m_t << "href=\"";
+ if (!url.isEmpty()) m_t << url;
+ m_t << "\">";
}
void HtmlGenerator::endHtmlLink()
{
- t << "</a>";
+ m_t << "</a>";
}
void HtmlGenerator::startGroupHeader(int extraIndentLevel)
{
if (extraIndentLevel==2)
{
- t << "<h4 class=\"groupheader\">";
+ m_t << "<h4 class=\"groupheader\">";
}
else if (extraIndentLevel==1)
{
- t << "<h3 class=\"groupheader\">";
+ m_t << "<h3 class=\"groupheader\">";
}
else // extraIndentLevel==0
{
- t << "<h2 class=\"groupheader\">";
+ m_t << "<h2 class=\"groupheader\">";
}
}
@@ -1398,79 +1444,79 @@ void HtmlGenerator::endGroupHeader(int extraIndentLevel)
{
if (extraIndentLevel==2)
{
- t << "</h4>" << endl;
+ m_t << "</h4>\n";
}
else if (extraIndentLevel==1)
{
- t << "</h3>" << endl;
+ m_t << "</h3>\n";
}
else
{
- t << "</h2>" << endl;
+ m_t << "</h2>\n";
}
}
-void HtmlGenerator::startSection(const char *lab,const char *,SectionType type)
+void HtmlGenerator::startSection(const QCString &lab,const QCString &,SectionType type)
{
switch(type)
{
- case SectionType::Page: t << "\n\n<h1>"; break;
- case SectionType::Section: t << "\n\n<h2>"; break;
- case SectionType::Subsection: t << "\n\n<h3>"; break;
- case SectionType::Subsubsection: t << "\n\n<h4>"; break;
- case SectionType::Paragraph: t << "\n\n<h5>"; break;
+ case SectionType::Page: m_t << "\n\n<h1>"; break;
+ case SectionType::Section: m_t << "\n\n<h2>"; break;
+ case SectionType::Subsection: m_t << "\n\n<h3>"; break;
+ case SectionType::Subsubsection: m_t << "\n\n<h4>"; break;
+ case SectionType::Paragraph: m_t << "\n\n<h5>"; break;
default: ASSERT(0); break;
}
- t << "<a id=\"" << lab << "\"></a>";
+ m_t << "<a id=\"" << lab << "\"></a>";
}
-void HtmlGenerator::endSection(const char *,SectionType type)
+void HtmlGenerator::endSection(const QCString &,SectionType type)
{
switch(type)
{
- case SectionType::Page: t << "</h1>"; break;
- case SectionType::Section: t << "</h2>"; break;
- case SectionType::Subsection: t << "</h3>"; break;
- case SectionType::Subsubsection: t << "</h4>"; break;
- case SectionType::Paragraph: t << "</h5>"; break;
+ case SectionType::Page: m_t << "</h1>"; break;
+ case SectionType::Section: m_t << "</h2>"; break;
+ case SectionType::Subsection: m_t << "</h3>"; break;
+ case SectionType::Subsubsection: m_t << "</h4>"; break;
+ case SectionType::Paragraph: m_t << "</h5>"; break;
default: ASSERT(0); break;
}
}
-void HtmlGenerator::docify(const char *str)
+void HtmlGenerator::docify(const QCString &str)
{
docify(str,FALSE);
}
-void HtmlGenerator::docify(const char *str,bool inHtmlComment)
+void HtmlGenerator::docify(const QCString &str,bool inHtmlComment)
{
- if (str)
+ if (!str.isEmpty())
{
- const char *p=str;
+ const char *p=str.data();
char c;
while (*p)
{
c=*p++;
switch(c)
{
- case '<': t << "&lt;"; break;
- case '>': t << "&gt;"; break;
- case '&': t << "&amp;"; break;
- case '"': t << "&quot;"; break;
- case '-': if (inHtmlComment) t << "&#45;"; else t << "-"; break;
+ case '<': m_t << "&lt;"; break;
+ case '>': m_t << "&gt;"; break;
+ case '&': m_t << "&amp;"; break;
+ case '"': m_t << "&quot;"; break;
+ case '-': if (inHtmlComment) m_t << "&#45;"; else m_t << "-"; break;
case '\\':
if (*p=='<')
- { t << "&lt;"; p++; }
+ { m_t << "&lt;"; p++; }
else if (*p=='>')
- { t << "&gt;"; p++; }
+ { m_t << "&gt;"; p++; }
else if (*p=='(')
- { t << "\\&zwj;("; p++; }
+ { m_t << "\\&zwj;("; p++; }
else if (*p==')')
- { t << "\\&zwj;)"; p++; }
+ { m_t << "\\&zwj;)"; p++; }
else
- t << "\\";
+ m_t << "\\";
break;
- default: t << c;
+ default: m_t << c;
}
}
}
@@ -1486,7 +1532,7 @@ void HtmlGenerator::writeChar(char c)
//--- helper function for dynamic sections -------------------------
-static void startSectionHeader(FTextStream &t,
+static void startSectionHeader(TextStream &t,
const QCString &relPath,int sectionCount)
{
//t << "<!-- startSectionHeader -->";
@@ -1496,23 +1542,23 @@ static void startSectionHeader(FTextStream &t,
t << "<div id=\"dynsection-" << sectionCount << "\" "
"onclick=\"return toggleVisibility(this)\" "
"class=\"dynheader closed\" "
- "style=\"cursor:pointer;\">" << endl;
+ "style=\"cursor:pointer;\">\n";
t << " <img id=\"dynsection-" << sectionCount << "-trigger\" src=\""
<< relPath << "closed.png\" alt=\"+\"/> ";
}
else
{
- t << "<div class=\"dynheader\">" << endl;
+ t << "<div class=\"dynheader\">\n";
}
}
-static void endSectionHeader(FTextStream &t)
+static void endSectionHeader(TextStream &t)
{
//t << "<!-- endSectionHeader -->";
- t << "</div>" << endl;
+ t << "</div>\n";
}
-static void startSectionSummary(FTextStream &t,int sectionCount)
+static void startSectionSummary(TextStream &t,int sectionCount)
{
//t << "<!-- startSectionSummary -->";
bool dynamicSections = Config_getBool(HTML_DYNAMIC_SECTIONS);
@@ -1520,21 +1566,21 @@ static void startSectionSummary(FTextStream &t,int sectionCount)
{
t << "<div id=\"dynsection-" << sectionCount << "-summary\" "
"class=\"dynsummary\" "
- "style=\"display:block;\">" << endl;
+ "style=\"display:block;\">\n";
}
}
-static void endSectionSummary(FTextStream &t)
+static void endSectionSummary(TextStream &t)
{
//t << "<!-- endSectionSummary -->";
bool dynamicSections = Config_getBool(HTML_DYNAMIC_SECTIONS);
if (dynamicSections)
{
- t << "</div>" << endl;
+ t << "</div>\n";
}
}
-static void startSectionContent(FTextStream &t,int sectionCount)
+static void startSectionContent(TextStream &t,int sectionCount)
{
//t << "<!-- startSectionContent -->";
bool dynamicSections = Config_getBool(HTML_DYNAMIC_SECTIONS);
@@ -1542,163 +1588,169 @@ static void startSectionContent(FTextStream &t,int sectionCount)
{
t << "<div id=\"dynsection-" << sectionCount << "-content\" "
"class=\"dyncontent\" "
- "style=\"display:none;\">" << endl;
+ "style=\"display:none;\">\n";
}
else
{
- t << "<div class=\"dyncontent\">" << endl;
+ t << "<div class=\"dyncontent\">\n";
}
}
-static void endSectionContent(FTextStream &t)
+static void endSectionContent(TextStream &t)
{
//t << "<!-- endSectionContent -->";
- t << "</div>" << endl;
+ t << "</div>\n";
}
//----------------------------
void HtmlGenerator::startClassDiagram()
{
- startSectionHeader(t,m_relPath,m_sectionCount);
+ startSectionHeader(m_t,m_relPath,m_sectionCount);
}
void HtmlGenerator::endClassDiagram(const ClassDiagram &d,
- const char *fileName,const char *name)
+ const QCString &fileName,const QCString &name)
{
- QGString result;
- FTextStream tt(&result);
-
- endSectionHeader(t);
- startSectionSummary(t,m_sectionCount);
- endSectionSummary(t);
- startSectionContent(t,m_sectionCount);
+ endSectionHeader(m_t);
+ startSectionSummary(m_t,m_sectionCount);
+ endSectionSummary(m_t);
+ startSectionContent(m_t,m_sectionCount);
+ TextStream tt;
d.writeImage(tt,dir(),m_relPath,fileName);
- if (!result.isEmpty())
- {
- t << " <div class=\"center\">" << endl;
- t << " <img src=\"";
- t << m_relPath << fileName << ".png\" usemap=\"#" << convertToId(name);
- t << "_map\" alt=\"\"/>" << endl;
- t << " <map id=\"" << convertToId(name);
- t << "_map\" name=\"" << convertToId(name);
- t << "_map\">" << endl;
- t << result;
- t << " </map>" << endl;
- t << "</div>";
+ if (!tt.empty())
+ {
+ m_t << " <div class=\"center\">\n";
+ m_t << " <img src=\"";
+ m_t << m_relPath << fileName << ".png\" usemap=\"#" << convertToId(name);
+ m_t << "_map\" alt=\"\"/>\n";
+ m_t << " <map id=\"" << convertToId(name);
+ m_t << "_map\" name=\"" << convertToId(name);
+ m_t << "_map\">\n";
+ m_t << tt.str();
+ m_t << " </map>\n";
+ m_t << "</div>";
}
else
{
- t << " <div class=\"center\">" << endl;
- t << " <img src=\"";
- t << m_relPath << fileName << ".png\" alt=\"\"/>" << endl;
- t << " </div>";
+ m_t << " <div class=\"center\">\n";
+ m_t << " <img src=\"";
+ m_t << m_relPath << fileName << ".png\" alt=\"\"/>\n";
+ m_t << " </div>";
}
- endSectionContent(t);
+ endSectionContent(m_t);
m_sectionCount++;
}
void HtmlGenerator::startMemberList()
{
- DBG_HTML(t << "<!-- startMemberList -->" << endl)
+ DBG_HTML(m_t << "<!-- startMemberList -->\n")
}
void HtmlGenerator::endMemberList()
{
- DBG_HTML(t << "<!-- endMemberList -->" << endl)
+ DBG_HTML(m_t << "<!-- endMemberList -->\n")
}
// anonymous type:
// 0 = single column right aligned
// 1 = double column left aligned
// 2 = single column left aligned
-void HtmlGenerator::startMemberItem(const char *anchor,int annoType,const char *inheritId)
+void HtmlGenerator::startMemberItem(const QCString &anchor,int annoType,const QCString &inheritId)
{
- DBG_HTML(t << "<!-- startMemberItem() -->" << endl)
+ DBG_HTML(m_t << "<!-- startMemberItem() -->\n")
if (m_emptySection)
{
- t << "<table class=\"memberdecls\">" << endl;
+ m_t << "<table class=\"memberdecls\">\n";
m_emptySection=FALSE;
}
- t << "<tr class=\"memitem:" << anchor;
- if (inheritId)
+ m_t << "<tr class=\"memitem:" << anchor;
+ if (!inheritId.isEmpty())
{
- t << " inherit " << inheritId;
+ m_t << " inherit " << inheritId;
}
- t << "\">";
+ m_t << "\">";
insertMemberAlignLeft(annoType, true);
}
void HtmlGenerator::endMemberItem()
{
- t << "</td></tr>";
- t << endl;
+ m_t << "</td></tr>\n";
}
void HtmlGenerator::startMemberTemplateParams()
{
}
-void HtmlGenerator::endMemberTemplateParams(const char *anchor,const char *inheritId)
+void HtmlGenerator::endMemberTemplateParams(const QCString &anchor,const QCString &inheritId)
{
- t << "</td></tr>" << endl;
- t << "<tr class=\"memitem:" << anchor;
- if (inheritId)
+ m_t << "</td></tr>\n";
+ m_t << "<tr class=\"memitem:" << anchor;
+ if (!inheritId.isEmpty())
{
- t << " inherit " << inheritId;
+ m_t << " inherit " << inheritId;
}
- t << "\"><td class=\"memTemplItemLeft\" align=\"right\" valign=\"top\">";
+ m_t << "\"><td class=\"memTemplItemLeft\" align=\"right\" valign=\"top\">";
}
+void HtmlGenerator::startCompoundTemplateParams()
+{
+ m_t << "<div class=\"compoundTemplParams\">";
+}
+
+void HtmlGenerator::endCompoundTemplateParams()
+{
+ m_t << "</div>";
+}
void HtmlGenerator::insertMemberAlign(bool templ)
{
- DBG_HTML(t << "<!-- insertMemberAlign -->" << endl)
+ DBG_HTML(m_t << "<!-- insertMemberAlign -->\n")
QCString className = templ ? "memTemplItemRight" : "memItemRight";
- t << "&#160;</td><td class=\"" << className << "\" valign=\"bottom\">";
+ m_t << "&#160;</td><td class=\"" << className << "\" valign=\"bottom\">";
}
void HtmlGenerator::insertMemberAlignLeft(int annoType, bool initTag)
{
- if (!initTag) t << "&#160;</td>";
+ if (!initTag) m_t << "&#160;</td>";
switch(annoType)
{
- case 0: t << "<td class=\"memItemLeft\" align=\"right\" valign=\"top\">"; break;
- case 1: t << "<td class=\"memItemLeft\" >"; break;
- case 2: t << "<td class=\"memItemLeft\" valign=\"top\">"; break;
- default: t << "<td class=\"memTemplParams\" colspan=\"2\">"; break;
+ case 0: m_t << "<td class=\"memItemLeft\" align=\"right\" valign=\"top\">"; break;
+ case 1: m_t << "<td class=\"memItemLeft\" >"; break;
+ case 2: m_t << "<td class=\"memItemLeft\" valign=\"top\">"; break;
+ default: m_t << "<td class=\"memTemplParams\" colspan=\"2\">"; break;
}
}
-void HtmlGenerator::startMemberDescription(const char *anchor,const char *inheritId, bool typ)
+void HtmlGenerator::startMemberDescription(const QCString &anchor,const QCString &inheritId, bool typ)
{
- DBG_HTML(t << "<!-- startMemberDescription -->" << endl)
- if (m_emptySection)
- {
- t << "<table class=\"memberdecls\">" << endl;
- m_emptySection=FALSE;
- }
- t << "<tr class=\"memdesc:" << anchor;
- if (inheritId)
+ DBG_HTML(m_t << "<!-- startMemberDescription -->\n")
+ if (m_emptySection)
{
- t << " inherit " << inheritId;
+ m_t << "<table class=\"memberdecls\">\n";
+ m_emptySection=FALSE;
}
- t << "\">";
- t << "<td class=\"mdescLeft\">&#160;</td>";
- if (typ) t << "<td class=\"mdescLeft\">&#160;</td>";
- t << "<td class=\"mdescRight\">";;
+ m_t << "<tr class=\"memdesc:" << anchor;
+ if (!inheritId.isEmpty())
+ {
+ m_t << " inherit " << inheritId;
+ }
+ m_t << "\">";
+ m_t << "<td class=\"mdescLeft\">&#160;</td>";
+ if (typ) m_t << "<td class=\"mdescLeft\">&#160;</td>";
+ m_t << "<td class=\"mdescRight\">";;
}
void HtmlGenerator::endMemberDescription()
{
- DBG_HTML(t << "<!-- endMemberDescription -->" << endl)
- t << "<br /></td></tr>" << endl;
+ DBG_HTML(m_t << "<!-- endMemberDescription -->\n")
+ m_t << "<br /></td></tr>\n";
}
void HtmlGenerator::startMemberSections()
{
- DBG_HTML(t << "<!-- startMemberSections -->" << endl)
+ DBG_HTML(m_t << "<!-- startMemberSections -->\n")
m_emptySection=TRUE; // we postpone writing <table> until we actually
// write a row to prevent empty tables, which
// are not valid XHTML!
@@ -1706,365 +1758,362 @@ void HtmlGenerator::startMemberSections()
void HtmlGenerator::endMemberSections()
{
- DBG_HTML(t << "<!-- endMemberSections -->" << endl)
+ DBG_HTML(m_t << "<!-- endMemberSections -->\n")
if (!m_emptySection)
{
- t << "</table>" << endl;
+ m_t << "</table>\n";
}
}
-void HtmlGenerator::startMemberHeader(const char *anchor, int typ)
+void HtmlGenerator::startMemberHeader(const QCString &anchor, int typ)
{
- DBG_HTML(t << "<!-- startMemberHeader -->" << endl)
+ DBG_HTML(m_t << "<!-- startMemberHeader -->\n")
if (!m_emptySection)
{
- t << "</table>";
+ m_t << "</table>";
m_emptySection=TRUE;
}
if (m_emptySection)
{
- t << "<table class=\"memberdecls\">" << endl;
+ m_t << "<table class=\"memberdecls\">\n";
m_emptySection=FALSE;
}
- t << "<tr class=\"heading\"><td colspan=\"" << typ << "\"><h2 class=\"groupheader\">";
- if (anchor)
+ m_t << "<tr class=\"heading\"><td colspan=\"" << typ << "\"><h2 class=\"groupheader\">";
+ if (!anchor.isEmpty())
{
- t << "<a name=\"" << anchor << "\"></a>" << endl;
+ m_t << "<a name=\"" << anchor << "\"></a>\n";
}
}
void HtmlGenerator::endMemberHeader()
{
- DBG_HTML(t << "<!-- endMemberHeader -->" << endl)
- t << "</h2></td></tr>" << endl;
+ DBG_HTML(m_t << "<!-- endMemberHeader -->\n")
+ m_t << "</h2></td></tr>\n";
}
void HtmlGenerator::startMemberSubtitle()
{
- DBG_HTML(t << "<!-- startMemberSubtitle -->" << endl)
- t << "<tr><td class=\"ititle\" colspan=\"2\">";
+ DBG_HTML(m_t << "<!-- startMemberSubtitle -->\n")
+ m_t << "<tr><td class=\"ititle\" colspan=\"2\">";
}
void HtmlGenerator::endMemberSubtitle()
{
- DBG_HTML(t << "<!-- endMemberSubtitle -->" << endl)
- t << "</td></tr>" << endl;
+ DBG_HTML(m_t << "<!-- endMemberSubtitle -->\n")
+ m_t << "</td></tr>\n";
}
void HtmlGenerator::startIndexList()
{
- t << "<table>" << endl;
+ m_t << "<table>\n";
}
void HtmlGenerator::endIndexList()
{
- t << "</table>" << endl;
+ m_t << "</table>\n";
}
void HtmlGenerator::startIndexKey()
{
// inserted 'class = ...', 02 jan 2002, jh
- t << " <tr><td class=\"indexkey\">";
+ m_t << " <tr><td class=\"indexkey\">";
}
void HtmlGenerator::endIndexKey()
{
- t << "</td>";
+ m_t << "</td>";
}
void HtmlGenerator::startIndexValue(bool)
{
// inserted 'class = ...', 02 jan 2002, jh
- t << "<td class=\"indexvalue\">";
+ m_t << "<td class=\"indexvalue\">";
}
-void HtmlGenerator::endIndexValue(const char *,bool)
+void HtmlGenerator::endIndexValue(const QCString &,bool)
{
- t << "</td></tr>" << endl;
+ m_t << "</td></tr>\n";
}
void HtmlGenerator::startMemberDocList()
{
- DBG_HTML(t << "<!-- startMemberDocList -->" << endl;)
+ DBG_HTML(m_t << "<!-- startMemberDocList -->\n";)
}
void HtmlGenerator::endMemberDocList()
{
- DBG_HTML(t << "<!-- endMemberDocList -->" << endl;)
+ DBG_HTML(m_t << "<!-- endMemberDocList -->\n";)
}
-void HtmlGenerator::startMemberDoc( const char *clName, const char *memName,
- const char *anchor, const char *title,
+void HtmlGenerator::startMemberDoc( const QCString &clName, const QCString &memName,
+ const QCString &anchor, const QCString &title,
int memCount, int memTotal, bool showInline)
{
- DBG_HTML(t << "<!-- startMemberDoc -->" << endl;)
- t << "\n<h2 class=\"memtitle\">"
- << "<span class=\"permalink\"><a href=\"#" << anchor << "\">&#9670;&nbsp;</a></span>";
+ DBG_HTML(m_t << "<!-- startMemberDoc -->\n";)
+ m_t << "\n<h2 class=\"memtitle\">"
+ << "<span class=\"permalink\"><a href=\"#" << anchor << "\">&#9670;&nbsp;</a></span>";
docify(title);
if (memTotal>1)
{
- t << " <span class=\"overload\">[" << memCount << "/" << memTotal <<"]</span>";
+ m_t << " <span class=\"overload\">[" << memCount << "/" << memTotal <<"]</span>";
}
- t << "</h2>"
- << endl;
- t << "\n<div class=\"memitem\">" << endl;
- t << "<div class=\"memproto\">" << endl;
+ m_t << "</h2>\n";
+ m_t << "\n<div class=\"memitem\">\n";
+ m_t << "<div class=\"memproto\">\n";
}
void HtmlGenerator::startMemberDocPrefixItem()
{
- DBG_HTML(t << "<!-- startMemberDocPrefixItem -->" << endl;)
- t << "<div class=\"memtemplate\">" << endl;
+ DBG_HTML(m_t << "<!-- startMemberDocPrefixItem -->\n";)
+ m_t << "<div class=\"memtemplate\">\n";
}
void HtmlGenerator::endMemberDocPrefixItem()
{
- DBG_HTML(t << "<!-- endMemberDocPrefixItem -->" << endl;)
- t << "</div>" << endl;
+ DBG_HTML(m_t << "<!-- endMemberDocPrefixItem -->\n";)
+ m_t << "</div>\n";
}
void HtmlGenerator::startMemberDocName(bool /*align*/)
{
- DBG_HTML(t << "<!-- startMemberDocName -->" << endl;)
+ DBG_HTML(m_t << "<!-- startMemberDocName -->\n";)
- t << " <table class=\"memname\">" << endl;
+ m_t << " <table class=\"memname\">\n";
- t << " <tr>" << endl;
- t << " <td class=\"memname\">";
+ m_t << " <tr>\n";
+ m_t << " <td class=\"memname\">";
}
void HtmlGenerator::endMemberDocName()
{
- DBG_HTML(t << "<!-- endMemberDocName -->" << endl;)
- t << "</td>" << endl;
+ DBG_HTML(m_t << "<!-- endMemberDocName -->\n";)
+ m_t << "</td>\n";
}
void HtmlGenerator::startParameterList(bool openBracket)
{
- DBG_HTML(t << "<!-- startParameterList -->" << endl;)
- t << " <td>";
- if (openBracket) t << "(";
- t << "</td>" << endl;
+ DBG_HTML(m_t << "<!-- startParameterList -->\n";)
+ m_t << " <td>";
+ if (openBracket) m_t << "(";
+ m_t << "</td>\n";
}
-void HtmlGenerator::startParameterType(bool first,const char *key)
+void HtmlGenerator::startParameterType(bool first,const QCString &key)
{
if (first)
{
- DBG_HTML(t << "<!-- startFirstParameterType -->" << endl;)
- t << " <td class=\"paramtype\">";
+ DBG_HTML(m_t << "<!-- startFirstParameterType -->\n";)
+ m_t << " <td class=\"paramtype\">";
}
else
{
- DBG_HTML(t << "<!-- startParameterType -->" << endl;)
- t << " <tr>" << endl;
- t << " <td class=\"paramkey\">";
- if (key) t << key;
- t << "</td>" << endl;
- t << " <td></td>" << endl;
- t << " <td class=\"paramtype\">";
+ DBG_HTML(m_t << "<!-- startParameterType -->\n";)
+ m_t << " <tr>\n";
+ m_t << " <td class=\"paramkey\">" << key << "</td>\n";
+ m_t << " <td></td>\n";
+ m_t << " <td class=\"paramtype\">";
}
}
void HtmlGenerator::endParameterType()
{
- DBG_HTML(t << "<!-- endParameterType -->" << endl;)
- t << "&#160;</td>" << endl;
+ DBG_HTML(m_t << "<!-- endParameterType -->\n";)
+ m_t << "&#160;</td>\n";
}
void HtmlGenerator::startParameterName(bool /*oneArgOnly*/)
{
- DBG_HTML(t << "<!-- startParameterName -->" << endl;)
- t << " <td class=\"paramname\">";
+ DBG_HTML(m_t << "<!-- startParameterName -->\n";)
+ m_t << " <td class=\"paramname\">";
}
void HtmlGenerator::endParameterName(bool last,bool emptyList,bool closeBracket)
{
- DBG_HTML(t << "<!-- endParameterName -->" << endl;)
+ DBG_HTML(m_t << "<!-- endParameterName -->\n";)
if (last)
{
if (emptyList)
{
- if (closeBracket) t << "</td><td>)";
- t << "</td>" << endl;
- t << " <td>";
+ if (closeBracket) m_t << "</td><td>)";
+ m_t << "</td>\n";
+ m_t << " <td>";
}
else
{
- t << "&#160;</td>" << endl;
- t << " </tr>" << endl;
- t << " <tr>" << endl;
- t << " <td></td>" << endl;
- t << " <td>";
- if (closeBracket) t << ")";
- t << "</td>" << endl;
- t << " <td></td><td>";
+ m_t << "&#160;</td>\n";
+ m_t << " </tr>\n";
+ m_t << " <tr>\n";
+ m_t << " <td></td>\n";
+ m_t << " <td>";
+ if (closeBracket) m_t << ")";
+ m_t << "</td>\n";
+ m_t << " <td></td><td>";
}
}
else
{
- t << "</td>" << endl;
- t << " </tr>" << endl;
+ m_t << "</td>\n";
+ m_t << " </tr>\n";
}
}
void HtmlGenerator::endParameterList()
{
- DBG_HTML(t << "<!-- endParameterList -->" << endl;)
- t << "</td>" << endl;
- t << " </tr>" << endl;
+ DBG_HTML(m_t << "<!-- endParameterList -->\n";)
+ m_t << "</td>\n";
+ m_t << " </tr>\n";
}
-void HtmlGenerator::exceptionEntry(const char* prefix,bool closeBracket)
+void HtmlGenerator::exceptionEntry(const QCString &prefix,bool closeBracket)
{
- DBG_HTML(t << "<!-- exceptionEntry -->" << endl;)
- t << "</td>" << endl;
- t << " </tr>" << endl;
- t << " <tr>" << endl;
- t << " <td align=\"right\">";
+ DBG_HTML(m_t << "<!-- exceptionEntry -->\n";)
+ m_t << "</td>\n";
+ m_t << " </tr>\n";
+ m_t << " <tr>\n";
+ m_t << " <td align=\"right\">";
// colspan 2 so it gets both parameter type and parameter name columns
- if (prefix)
- t << prefix << "</td><td>(</td><td colspan=\"2\">";
+ if (!prefix.isEmpty())
+ m_t << prefix << "</td><td>(</td><td colspan=\"2\">";
else if (closeBracket)
- t << "</td><td>)</td><td></td><td>";
+ m_t << "</td><td>)</td><td></td><td>";
else
- t << "</td><td></td><td colspan=\"2\">";
+ m_t << "</td><td></td><td colspan=\"2\">";
}
void HtmlGenerator::endMemberDoc(bool hasArgs)
{
- DBG_HTML(t << "<!-- endMemberDoc -->" << endl;)
+ DBG_HTML(m_t << "<!-- endMemberDoc -->\n";)
if (!hasArgs)
{
- t << " </tr>" << endl;
+ m_t << " </tr>\n";
}
- t << " </table>" << endl;
- // t << "</div>" << endl;
+ m_t << " </table>\n";
+ // m_t << "</div>\n";
}
void HtmlGenerator::startDotGraph()
{
- startSectionHeader(t,m_relPath,m_sectionCount);
+ startSectionHeader(m_t,m_relPath,m_sectionCount);
}
void HtmlGenerator::endDotGraph(DotClassGraph &g)
{
bool generateLegend = Config_getBool(GENERATE_LEGEND);
bool umlLook = Config_getBool(UML_LOOK);
- endSectionHeader(t);
- startSectionSummary(t,m_sectionCount);
- endSectionSummary(t);
- startSectionContent(t,m_sectionCount);
+ endSectionHeader(m_t);
+ startSectionSummary(m_t,m_sectionCount);
+ endSectionSummary(m_t);
+ startSectionContent(m_t,m_sectionCount);
- g.writeGraph(t,GOF_BITMAP,EOF_Html,dir(),fileName(),m_relPath,TRUE,TRUE,m_sectionCount);
+ g.writeGraph(m_t,GOF_BITMAP,EOF_Html,dir(),fileName(),m_relPath,TRUE,TRUE,m_sectionCount);
if (generateLegend && !umlLook)
{
- t << "<center><span class=\"legend\">[";
- startHtmlLink(m_relPath+"graph_legend"+Doxygen::htmlFileExtension);
- t << theTranslator->trLegend();
+ m_t << "<center><span class=\"legend\">[";
+ startHtmlLink((m_relPath+"graph_legend"+Doxygen::htmlFileExtension));
+ m_t << theTranslator->trLegend();
endHtmlLink();
- t << "]</span></center>";
+ m_t << "]</span></center>";
}
- endSectionContent(t);
+ endSectionContent(m_t);
m_sectionCount++;
}
void HtmlGenerator::startInclDepGraph()
{
- startSectionHeader(t,m_relPath,m_sectionCount);
+ startSectionHeader(m_t,m_relPath,m_sectionCount);
}
void HtmlGenerator::endInclDepGraph(DotInclDepGraph &g)
{
- endSectionHeader(t);
- startSectionSummary(t,m_sectionCount);
- endSectionSummary(t);
- startSectionContent(t,m_sectionCount);
+ endSectionHeader(m_t);
+ startSectionSummary(m_t,m_sectionCount);
+ endSectionSummary(m_t);
+ startSectionContent(m_t,m_sectionCount);
- g.writeGraph(t,GOF_BITMAP,EOF_Html,dir(),fileName(),m_relPath,TRUE,m_sectionCount);
+ g.writeGraph(m_t,GOF_BITMAP,EOF_Html,dir(),fileName(),m_relPath,TRUE,m_sectionCount);
- endSectionContent(t);
+ endSectionContent(m_t);
m_sectionCount++;
}
void HtmlGenerator::startGroupCollaboration()
{
- startSectionHeader(t,m_relPath,m_sectionCount);
+ startSectionHeader(m_t,m_relPath,m_sectionCount);
}
void HtmlGenerator::endGroupCollaboration(DotGroupCollaboration &g)
{
- endSectionHeader(t);
- startSectionSummary(t,m_sectionCount);
- endSectionSummary(t);
- startSectionContent(t,m_sectionCount);
+ endSectionHeader(m_t);
+ startSectionSummary(m_t,m_sectionCount);
+ endSectionSummary(m_t);
+ startSectionContent(m_t,m_sectionCount);
- g.writeGraph(t,GOF_BITMAP,EOF_Html,dir(),fileName(),m_relPath,TRUE,m_sectionCount);
+ g.writeGraph(m_t,GOF_BITMAP,EOF_Html,dir(),fileName(),m_relPath,TRUE,m_sectionCount);
- endSectionContent(t);
+ endSectionContent(m_t);
m_sectionCount++;
}
void HtmlGenerator::startCallGraph()
{
- startSectionHeader(t,m_relPath,m_sectionCount);
+ startSectionHeader(m_t,m_relPath,m_sectionCount);
}
void HtmlGenerator::endCallGraph(DotCallGraph &g)
{
- endSectionHeader(t);
- startSectionSummary(t,m_sectionCount);
- endSectionSummary(t);
- startSectionContent(t,m_sectionCount);
+ endSectionHeader(m_t);
+ startSectionSummary(m_t,m_sectionCount);
+ endSectionSummary(m_t);
+ startSectionContent(m_t,m_sectionCount);
- g.writeGraph(t,GOF_BITMAP,EOF_Html,dir(),fileName(),m_relPath,TRUE,m_sectionCount);
+ g.writeGraph(m_t,GOF_BITMAP,EOF_Html,dir(),fileName(),m_relPath,TRUE,m_sectionCount);
- endSectionContent(t);
+ endSectionContent(m_t);
m_sectionCount++;
}
void HtmlGenerator::startDirDepGraph()
{
- startSectionHeader(t,m_relPath,m_sectionCount);
+ startSectionHeader(m_t,m_relPath,m_sectionCount);
}
void HtmlGenerator::endDirDepGraph(DotDirDeps &g)
{
- endSectionHeader(t);
- startSectionSummary(t,m_sectionCount);
- endSectionSummary(t);
- startSectionContent(t,m_sectionCount);
+ endSectionHeader(m_t);
+ startSectionSummary(m_t,m_sectionCount);
+ endSectionSummary(m_t);
+ startSectionContent(m_t,m_sectionCount);
- g.writeGraph(t,GOF_BITMAP,EOF_Html,dir(),fileName(),m_relPath,TRUE,m_sectionCount);
+ g.writeGraph(m_t,GOF_BITMAP,EOF_Html,dir(),fileName(),m_relPath,TRUE,m_sectionCount);
- endSectionContent(t);
+ endSectionContent(m_t);
m_sectionCount++;
}
void HtmlGenerator::writeGraphicalHierarchy(DotGfxHierarchyTable &g)
{
- g.writeGraph(t,dir(),fileName());
+ g.writeGraph(m_t,dir(),fileName());
}
void HtmlGenerator::startMemberGroupHeader(bool)
{
- t << "<tr><td colspan=\"2\"><div class=\"groupHeader\">";
+ m_t << "<tr><td colspan=\"2\"><div class=\"groupHeader\">";
}
void HtmlGenerator::endMemberGroupHeader()
{
- t << "</div></td></tr>" << endl;
+ m_t << "</div></td></tr>\n";
}
void HtmlGenerator::startMemberGroupDocs()
{
- t << "<tr><td colspan=\"2\"><div class=\"groupText\">";
+ m_t << "<tr><td colspan=\"2\"><div class=\"groupText\">";
}
void HtmlGenerator::endMemberGroupDocs()
{
- t << "</div></td></tr>" << endl;
+ m_t << "</div></td></tr>\n";
}
void HtmlGenerator::startMemberGroup()
@@ -2077,18 +2126,18 @@ void HtmlGenerator::endMemberGroup(bool)
void HtmlGenerator::startIndent()
{
- DBG_HTML(t << "<!-- startIndent -->" << endl;)
+ DBG_HTML(m_t << "<!-- startIndent -->\n";)
- t << "<div class=\"memdoc\">\n";
+ m_t << "<div class=\"memdoc\">\n";
}
void HtmlGenerator::endIndent()
{
- DBG_HTML(t << "<!-- endIndent -->" << endl;)
- t << endl << "</div>" << endl << "</div>" << endl;
+ DBG_HTML(m_t << "<!-- endIndent -->\n";)
+ m_t << "\n</div>\n" << "</div>\n";
}
-void HtmlGenerator::addIndexItem(const char *,const char *)
+void HtmlGenerator::addIndexItem(const QCString &,const QCString &)
{
}
@@ -2097,86 +2146,86 @@ void HtmlGenerator::writeNonBreakableSpace(int n)
int i;
for (i=0;i<n;i++)
{
- t << "&#160;";
+ m_t << "&#160;";
}
}
-void HtmlGenerator::startDescTable(const char *title)
+void HtmlGenerator::startDescTable(const QCString &title)
{
- t << "<table class=\"fieldtable\">" << endl
- << "<tr><th colspan=\"2\">" << title << "</th></tr>";
+ m_t << "<table class=\"fieldtable\">\n"
+ << "<tr><th colspan=\"2\">" << title << "</th></tr>";
}
void HtmlGenerator::endDescTable()
{
- t << "</table>" << endl;
+ m_t << "</table>\n";
}
void HtmlGenerator::startDescTableRow()
{
- t << "<tr>";
+ m_t << "<tr>";
}
void HtmlGenerator::endDescTableRow()
{
- t << "</tr>" << endl;
+ m_t << "</tr>\n";
}
void HtmlGenerator::startDescTableTitle()
{
- t << "<td class=\"fieldname\">";
+ m_t << "<td class=\"fieldname\">";
}
void HtmlGenerator::endDescTableTitle()
{
- t << "&#160;</td>";
+ m_t << "&#160;</td>";
}
void HtmlGenerator::startDescTableData()
{
- t << "<td class=\"fielddoc\">";
+ m_t << "<td class=\"fielddoc\">";
}
void HtmlGenerator::endDescTableData()
{
- t << "</td>";
+ m_t << "</td>";
}
void HtmlGenerator::startExamples()
{
- t << "<dl class=\"section examples\"><dt>";
+ m_t << "<dl class=\"section examples\"><dt>";
docify(theTranslator->trExamples());
- t << "</dt>";
+ m_t << "</dt>";
}
void HtmlGenerator::endExamples()
{
- t << "</dl>" << endl;
+ m_t << "</dl>\n";
}
void HtmlGenerator::startParamList(ParamListTypes,
- const char *title)
+ const QCString &title)
{
- t << "<dl><dt><b>";
+ m_t << "<dl><dt><b>";
docify(title);
- t << "</b></dt>";
+ m_t << "</b></dt>";
}
void HtmlGenerator::endParamList()
{
- t << "</dl>";
+ m_t << "</dl>";
}
void HtmlGenerator::writeDoc(DocNode *n,const Definition *ctx,const MemberDef *,int id)
{
m_codeGen.setId(id);
- HtmlDocVisitor *visitor = new HtmlDocVisitor(t,m_codeGen,ctx);
+ HtmlDocVisitor *visitor = new HtmlDocVisitor(m_t,m_codeGen,ctx);
n->accept(visitor);
delete visitor;
}
//---------------- helpers for index generation -----------------------------
-static void startQuickIndexList(FTextStream &t,bool compact,bool topLevel=TRUE)
+static void startQuickIndexList(TextStream &t,bool compact,bool topLevel=TRUE)
{
if (compact)
{
@@ -2196,7 +2245,7 @@ static void startQuickIndexList(FTextStream &t,bool compact,bool topLevel=TRUE)
}
}
-static void endQuickIndexList(FTextStream &t,bool compact)
+static void endQuickIndexList(TextStream &t,bool compact)
{
if (compact)
{
@@ -2209,7 +2258,7 @@ static void endQuickIndexList(FTextStream &t,bool compact)
}
}
-static void startQuickIndexItem(FTextStream &t,const char *l,
+static void startQuickIndexItem(TextStream &t,const QCString &l,
bool hl,bool /*compact*/,
const QCString &relPath)
{
@@ -2219,14 +2268,14 @@ static void startQuickIndexItem(FTextStream &t,const char *l,
t << " class=\"current\"";
}
t << ">";
- if (l) t << "<a href=\"" << correctURL(l,relPath) << "\">";
+ if (!l.isEmpty()) t << "<a href=\"" << correctURL(l,relPath) << "\">";
t << "<span>";
}
-static void endQuickIndexItem(FTextStream &t,const char *l)
+static void endQuickIndexItem(TextStream &t,const QCString &l)
{
t << "</span>";
- if (l) t << "</a>";
+ if (!l.isEmpty()) t << "</a>";
t << "</li>\n";
}
@@ -2244,6 +2293,7 @@ static bool quickLinkVisible(LayoutNavEntry::Kind kind)
case LayoutNavEntry::Namespaces: return documentedNamespaces>0 && showNamespaces;
case LayoutNavEntry::NamespaceList: return documentedNamespaces>0 && showNamespaces;
case LayoutNavEntry::NamespaceMembers: return documentedNamespaceMembers[NMHL_All]>0;
+ case LayoutNavEntry::Concepts: return documentedConcepts>0;
case LayoutNavEntry::Classes: return annotatedClasses>0;
case LayoutNavEntry::ClassList: return annotatedClasses>0;
case LayoutNavEntry::ClassIndex: return annotatedClasses>0;
@@ -2271,7 +2321,7 @@ static bool quickLinkVisible(LayoutNavEntry::Kind kind)
return FALSE;
}
-static void renderQuickLinksAsTree(FTextStream &t,const QCString &relPath,LayoutNavEntry *root)
+static void renderQuickLinksAsTree(TextStream &t,const QCString &relPath,LayoutNavEntry *root)
{
int count=0;
@@ -2300,7 +2350,7 @@ static void renderQuickLinksAsTree(FTextStream &t,const QCString &relPath,Layout
}
-static void renderQuickLinksAsTabs(FTextStream &t,const QCString &relPath,
+static void renderQuickLinksAsTabs(TextStream &t,const QCString &relPath,
LayoutNavEntry *hlEntry,LayoutNavEntry::Kind kind,
bool highlightParent,bool highlightSearch)
{
@@ -2369,9 +2419,9 @@ static void renderQuickLinksAsTabs(FTextStream &t,const QCString &relPath,
}
}
-static void writeDefaultQuickLinks(FTextStream &t,bool compact,
+static void writeDefaultQuickLinks(TextStream &t,bool compact,
HighlightedItem hli,
- const char *file,
+ const QCString &file,
const QCString &relPath)
{
bool serverBasedSearch = Config_getBool(SERVER_BASED_SEARCH);
@@ -2391,6 +2441,7 @@ static void writeDefaultQuickLinks(FTextStream &t,bool compact,
case HLI_InterfaceHierarchy: kind = LayoutNavEntry::InterfaceHierarchy; break;
case HLI_ExceptionHierarchy: kind = LayoutNavEntry::ExceptionHierarchy; break;
case HLI_Classes: kind = LayoutNavEntry::ClassIndex; altKind = LayoutNavEntry::Classes; break;
+ case HLI_Concepts: kind = LayoutNavEntry::Concepts; break;
case HLI_Interfaces: kind = LayoutNavEntry::InterfaceIndex; altKind = LayoutNavEntry::Interfaces; break;
case HLI_Structs: kind = LayoutNavEntry::StructIndex; altKind = LayoutNavEntry::Structs; break;
case HLI_Exceptions: kind = LayoutNavEntry::ExceptionIndex; altKind = LayoutNavEntry::Exceptions; break;
@@ -2407,6 +2458,8 @@ static void writeDefaultQuickLinks(FTextStream &t,bool compact,
case HLI_UserGroup: kind = LayoutNavEntry::UserGroup; break;
case HLI_ClassVisible: kind = LayoutNavEntry::ClassList; altKind = LayoutNavEntry::Classes;
highlightParent = TRUE; break;
+ case HLI_ConceptVisible: kind = LayoutNavEntry::Concepts;
+ highlightParent = TRUE; break;
case HLI_InterfaceVisible: kind = LayoutNavEntry::InterfaceList; altKind = LayoutNavEntry::Interfaces;
highlightParent = TRUE; break;
case HLI_StructVisible: kind = LayoutNavEntry::StructList; altKind = LayoutNavEntry::Structs;
@@ -2432,16 +2485,16 @@ static void writeDefaultQuickLinks(FTextStream &t,bool compact,
{
searchPage = "search.php";
}
- t << "<script type=\"text/javascript\" src=\"" << relPath << "menudata.js\"></script>" << endl;
- t << "<script type=\"text/javascript\" src=\"" << relPath << "menu.js\"></script>" << endl;
- t << "<script type=\"text/javascript\">" << endl;
+ t << "<script type=\"text/javascript\" src=\"" << relPath << "menudata.js\"></script>\n";
+ t << "<script type=\"text/javascript\" src=\"" << relPath << "menu.js\"></script>\n";
+ t << "<script type=\"text/javascript\">\n";
t << "/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n";
- t << "$(function() {" << endl;
+ t << "$(function() {\n";
t << " initMenu('" << relPath << "',"
<< (searchEngine?"true":"false") << ","
<< (serverBasedSearch?"true":"false") << ",'"
<< searchPage << "','"
- << theTranslator->trSearch() << "');" << endl;
+ << theTranslator->trSearch() << "');\n";
if (Config_getBool(SEARCHENGINE))
{
if (!serverBasedSearch)
@@ -2456,15 +2509,15 @@ static void writeDefaultQuickLinks(FTextStream &t,bool compact,
<< " });\n";
}
}
- t << "});" << endl;
+ t << "});\n";
t << "/* @license-end */";
- t << "</script>" << endl;
- t << "<div id=\"main-nav\"></div>" << endl;
+ t << "</script>\n";
+ t << "<div id=\"main-nav\"></div>\n";
}
else if (compact) // && !Config_getBool(HTML_DYNAMIC_MENUS)
{
// find highlighted index item
- LayoutNavEntry *hlEntry = root->find(kind,kind==LayoutNavEntry::UserGroup ? file : 0);
+ LayoutNavEntry *hlEntry = root->find(kind,kind==LayoutNavEntry::UserGroup ? file : QCString());
if (!hlEntry && altKind!=(LayoutNavEntry::Kind)-1) { hlEntry=root->find(altKind); kind=altKind; }
if (!hlEntry) // highlighted item not found in the index! -> just show the level 1 index...
{
@@ -2493,10 +2546,10 @@ static void writeDefaultQuickLinks(FTextStream &t,bool compact,
void HtmlGenerator::endQuickIndices()
{
- t << "</div><!-- top -->" << endl;
+ m_t << "</div><!-- top -->\n";
}
-QCString HtmlGenerator::writeSplitBarAsString(const char *name,const char *relpath)
+QCString HtmlGenerator::writeSplitBarAsString(const QCString &name,const QCString &relpath)
{
bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
QCString result;
@@ -2504,62 +2557,62 @@ QCString HtmlGenerator::writeSplitBarAsString(const char *name,const char *relpa
if (generateTreeView)
{
result = QCString(
- "<div id=\"side-nav\" class=\"ui-resizable side-nav-resizable\">\n"
- " <div id=\"nav-tree\">\n"
- " <div id=\"nav-tree-contents\">\n"
- " <div id=\"nav-sync\" class=\"sync\"></div>\n"
- " </div>\n"
- " </div>\n"
- " <div id=\"splitbar\" style=\"-moz-user-select:none;\" \n"
- " class=\"ui-resizable-handle\">\n"
- " </div>\n"
- "</div>\n"
- "<script type=\"text/javascript\">\n"
- "/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n"
- "$(document).ready(function(){initNavTree('") +
- QCString(addHtmlExtensionIfMissing(name)) +
- QCString("','") + relpath +
- QCString("'); initResizable(); });\n"
- "/* @license-end */\n"
- "</script>\n"
- "<div id=\"doc-content\">\n");
+ "<div id=\"side-nav\" class=\"ui-resizable side-nav-resizable\">\n"
+ " <div id=\"nav-tree\">\n"
+ " <div id=\"nav-tree-contents\">\n"
+ " <div id=\"nav-sync\" class=\"sync\"></div>\n"
+ " </div>\n"
+ " </div>\n"
+ " <div id=\"splitbar\" style=\"-moz-user-select:none;\" \n"
+ " class=\"ui-resizable-handle\">\n"
+ " </div>\n"
+ "</div>\n"
+ "<script type=\"text/javascript\">\n"
+ "/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n"
+ "$(document).ready(function(){initNavTree('") +
+ QCString(addHtmlExtensionIfMissing(name)) +
+ QCString("','") + relpath +
+ QCString("'); initResizable(); });\n"
+ "/* @license-end */\n"
+ "</script>\n"
+ "<div id=\"doc-content\">\n");
}
return result;
}
-void HtmlGenerator::writeSplitBar(const char *name)
+void HtmlGenerator::writeSplitBar(const QCString &name)
{
- t << writeSplitBarAsString(name,m_relPath);
+ m_t << writeSplitBarAsString(name,m_relPath);
}
-void HtmlGenerator::writeNavigationPath(const char *s)
+void HtmlGenerator::writeNavigationPath(const QCString &s)
{
- t << substitute(s,"$relpath^",m_relPath);
+ m_t << substitute(s,"$relpath^",m_relPath);
}
void HtmlGenerator::startContents()
{
- t << "<div class=\"contents\">" << endl;
+ m_t << "<div class=\"contents\">\n";
}
void HtmlGenerator::endContents()
{
- t << "</div><!-- contents -->" << endl;
+ m_t << "</div><!-- contents -->\n";
}
-void HtmlGenerator::startPageDoc(const char *pageTitle)
+void HtmlGenerator::startPageDoc(const QCString &pageTitle)
{
- t << "<div>";
+ m_t << "<div>";
}
void HtmlGenerator::endPageDoc()
{
- t << "</div><!-- PageDoc -->" << endl;
+ m_t << "</div><!-- PageDoc -->\n";
}
-void HtmlGenerator::writeQuickLinks(bool compact,HighlightedItem hli,const char *file)
+void HtmlGenerator::writeQuickLinks(bool compact,HighlightedItem hli,const QCString &file)
{
- writeDefaultQuickLinks(t,compact,hli,file,m_relPath);
+ writeDefaultQuickLinks(m_t,compact,hli,file,m_relPath);
}
// PHP based search script
@@ -2572,10 +2625,10 @@ void HtmlGenerator::writeSearchPage()
// OPENSEARCH_PROVIDER {
QCString configFileName = htmlOutput+"/search_config.php";
- QFile cf(configFileName);
- if (cf.open(IO_WriteOnly))
+ std::ofstream f(configFileName.str(),std::ofstream::out | std::ofstream::binary);
+ if (f.is_open())
{
- FTextStream t(&cf);
+ TextStream t(&f);
t << "<?php\n\n";
t << "$config = array(\n";
t << " 'PROJECT_NAME' => \"" << convertToHtml(projectName) << "\",\n";
@@ -2596,20 +2649,21 @@ void HtmlGenerator::writeSearchPage()
t << ");\n\n";
t << "?>\n";
}
+ f.close();
ResourceMgr::instance().copyResource("search_functions.php",htmlOutput);
ResourceMgr::instance().copyResource("search_opensearch.php",htmlOutput);
// OPENSEARCH_PROVIDER }
QCString fileName = htmlOutput+"/search.php";
- QFile f(fileName);
- if (f.open(IO_WriteOnly))
+ f.open(fileName.str(),std::ofstream::out | std::ofstream::binary);
+ if (f.is_open())
{
- FTextStream t(&f);
+ TextStream t(&f);
t << substituteHtmlKeywords(g_header,"Search","");
t << "<!-- " << theTranslator->trGeneratedBy() << " Doxygen "
- << getDoxygenVersion() << " -->" << endl;
+ << getDoxygenVersion() << " -->\n";
t << "<script type=\"text/javascript\">\n";
t << "/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n";
t << "var searchBox = new SearchBox(\"searchBox\", \""
@@ -2618,11 +2672,11 @@ void HtmlGenerator::writeSearchPage()
t << "</script>\n";
if (!Config_getBool(DISABLE_INDEX))
{
- writeDefaultQuickLinks(t,TRUE,HLI_Search,0,"");
+ writeDefaultQuickLinks(t,TRUE,HLI_Search,QCString(),QCString());
}
else
{
- t << "</div>" << endl;
+ t << "</div>\n";
}
t << "<?php\n";
@@ -2638,16 +2692,18 @@ void HtmlGenerator::writeSearchPage()
writePageFooter(t,"Search","","");
}
+ f.close();
+
QCString scriptName = htmlOutput+"/search/search.js";
- QFile sf(scriptName);
- if (sf.open(IO_WriteOnly))
+ f.open(scriptName.str(),std::ofstream::out | std::ofstream::binary);
+ if (f.is_open())
{
- FTextStream t(&sf);
+ TextStream t(&f);
t << ResourceMgr::instance().getAsString("extsearch.js");
}
else
{
- err("Failed to open file '%s' for writing...\n",scriptName.data());
+ err("Failed to open file '%s' for writing...\n",qPrint(scriptName));
}
}
@@ -2656,14 +2712,14 @@ void HtmlGenerator::writeExternalSearchPage()
bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
QCString dname = Config_getString(HTML_OUTPUT);
QCString fileName = dname+"/search"+Doxygen::htmlFileExtension;
- QFile f(fileName);
- if (f.open(IO_WriteOnly))
+ std::ofstream f(fileName.str(),std::ofstream::out | std::ofstream::binary);
+ if (f.is_open())
{
- FTextStream t(&f);
+ TextStream t(&f);
t << substituteHtmlKeywords(g_header,"Search","");
t << "<!-- " << theTranslator->trGeneratedBy() << " Doxygen "
- << getDoxygenVersion() << " -->" << endl;
+ << getDoxygenVersion() << " -->\n";
t << "<script type=\"text/javascript\">\n";
t << "/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n";
t << "var searchBox = new SearchBox(\"searchBox\", \""
@@ -2672,7 +2728,7 @@ void HtmlGenerator::writeExternalSearchPage()
t << "</script>\n";
if (!Config_getBool(DISABLE_INDEX))
{
- writeDefaultQuickLinks(t,TRUE,HLI_Search,0,"");
+ writeDefaultQuickLinks(t,TRUE,HLI_Search,QCString(),QCString());
t << " <input type=\"text\" id=\"MSearchField\" name=\"query\" value=\"\" size=\"20\" accesskey=\"S\" onfocus=\"searchBox.OnSearchFieldFocus(true)\" onblur=\"searchBox.OnSearchFieldFocus(false)\"/>\n";
t << " </form>\n";
t << " </div><div class=\"right\"></div>\n";
@@ -2684,38 +2740,40 @@ void HtmlGenerator::writeExternalSearchPage()
}
else
{
- t << "</div>" << endl;
+ t << "</div>\n";
}
t << writeSplitBarAsString("search","");
- t << "<div class=\"header\">" << endl;
- t << " <div class=\"headertitle\">" << endl;
- t << " <div class=\"title\">" << theTranslator->trSearchResultsTitle() << "</div>" << endl;
- t << " </div>" << endl;
- t << "</div>" << endl;
- t << "<div class=\"contents\">" << endl;
+ t << "<div class=\"header\">\n";
+ t << " <div class=\"headertitle\">\n";
+ t << " <div class=\"title\">" << theTranslator->trSearchResultsTitle() << "</div>\n";
+ t << " </div>\n";
+ t << "</div>\n";
+ t << "<div class=\"contents\">\n";
- t << "<div id=\"searchresults\"></div>" << endl;
- t << "</div>" << endl;
+ t << "<div id=\"searchresults\"></div>\n";
+ t << "</div>\n";
if (generateTreeView)
{
- t << "</div><!-- doc-content -->" << endl;
+ t << "</div><!-- doc-content -->\n";
}
writePageFooter(t,"Search","","");
}
+ f.close();
+
QCString scriptName = dname+"/search/search.js";
- QFile sf(scriptName);
- if (sf.open(IO_WriteOnly))
+ f.open(scriptName.str(),std::ofstream::out | std::ofstream::binary);
+ if (f.is_open())
{
- FTextStream t(&sf);
+ TextStream t(&f);
t << "var searchResultsText=["
<< "\"" << theTranslator->trSearchResults(0) << "\","
<< "\"" << theTranslator->trSearchResults(1) << "\","
- << "\"" << theTranslator->trSearchResults(2) << "\"];" << endl;
- t << "var serverUrl=\"" << Config_getString(SEARCHENGINE_URL) << "\";" << endl;
- t << "var tagMap = {" << endl;
+ << "\"" << theTranslator->trSearchResults(2) << "\"];\n";
+ t << "var serverUrl=\"" << Config_getString(SEARCHENGINE_URL) << "\";\n";
+ t << "var tagMap = {\n";
bool first=TRUE;
// add search mappings
const StringVector &extraSearchMappings = Config_getList(EXTRA_SEARCH_MAPPINGS);
@@ -2729,207 +2787,207 @@ void HtmlGenerator::writeExternalSearchPage()
QCString destName = mapLine.right(mapLine.length()-eqPos-1).stripWhiteSpace();
if (!tagName.isEmpty())
{
- if (!first) t << "," << endl;
+ if (!first) t << ",\n";
t << " \"" << tagName << "\": \"" << destName << "\"";
first=FALSE;
}
}
}
- if (!first) t << endl;
- t << "};" << endl << endl;
+ if (!first) t << "\n";
+ t << "};\n\n";
t << ResourceMgr::instance().getAsString("extsearch.js");
- t << endl;
- t << "$(document).ready(function() {" << endl;
- t << " var query = trim(getURLParameter('query'));" << endl;
- t << " if (query) {" << endl;
- t << " searchFor(query,0,20);" << endl;
- t << " } else {" << endl;
- t << " var results = $('#results');" << endl;
- t << " results.html('<p>" << theTranslator->trSearchResults(0) << "</p>');" << endl;
- t << " }" << endl;
- t << "});" << endl;
+ t << "\n";
+ t << "$(document).ready(function() {\n";
+ t << " var query = trim(getURLParameter('query'));\n";
+ t << " if (query) {\n";
+ t << " searchFor(query,0,20);\n";
+ t << " } else {\n";
+ t << " var results = $('#results');\n";
+ t << " results.html('<p>" << theTranslator->trSearchResults(0) << "</p>');\n";
+ t << " }\n";
+ t << "});\n";
}
else
{
- err("Failed to open file '%s' for writing...\n",scriptName.data());
+ err("Failed to open file '%s' for writing...\n",qPrint(scriptName));
}
}
-void HtmlGenerator::startConstraintList(const char *header)
+void HtmlGenerator::startConstraintList(const QCString &header)
{
- t << "<div class=\"typeconstraint\">" << endl;
- t << "<dl><dt><b>" << header << "</b></dt><dd>" << endl;
- t << "<table border=\"0\" cellspacing=\"2\" cellpadding=\"0\">" << endl;
+ m_t << "<div class=\"typeconstraint\">\n";
+ m_t << "<dl><dt><b>" << header << "</b></dt><dd>\n";
+ m_t << "<table border=\"0\" cellspacing=\"2\" cellpadding=\"0\">\n";
}
void HtmlGenerator::startConstraintParam()
{
- t << "<tr><td valign=\"top\"><em>";
+ m_t << "<tr><td valign=\"top\"><em>";
}
void HtmlGenerator::endConstraintParam()
{
- t << "</em></td>";
+ m_t << "</em></td>";
}
void HtmlGenerator::startConstraintType()
{
- t << "<td>&#160;:</td><td valign=\"top\"><em>";
+ m_t << "<td>&#160;:</td><td valign=\"top\"><em>";
}
void HtmlGenerator::endConstraintType()
{
- t << "</em></td>";
+ m_t << "</em></td>";
}
void HtmlGenerator::startConstraintDocs()
{
- t << "<td>&#160;";
+ m_t << "<td>&#160;";
}
void HtmlGenerator::endConstraintDocs()
{
- t << "</td></tr>" << endl;
+ m_t << "</td></tr>\n";
}
void HtmlGenerator::endConstraintList()
{
- t << "</table>" << endl;
- t << "</dd>" << endl;
- t << "</dl>" << endl;
- t << "</div>" << endl;
+ m_t << "</table>\n";
+ m_t << "</dd>\n";
+ m_t << "</dl>\n";
+ m_t << "</div>\n";
}
-void HtmlGenerator::lineBreak(const char *style)
+void HtmlGenerator::lineBreak(const QCString &style)
{
- if (style)
+ if (!style.isEmpty())
{
- t << "<br class=\"" << style << "\" />" << endl;
+ m_t << "<br class=\"" << style << "\" />\n";
}
else
{
- t << "<br />" << endl;
+ m_t << "<br />\n";
}
}
void HtmlGenerator::startHeaderSection()
{
- t << "<div class=\"header\">" << endl;
+ m_t << "<div class=\"header\">\n";
}
-void HtmlGenerator::startTitleHead(const char *)
+void HtmlGenerator::startTitleHead(const QCString &)
{
- t << " <div class=\"headertitle\">" << endl;
+ m_t << " <div class=\"headertitle\">\n";
startTitle();
}
-void HtmlGenerator::endTitleHead(const char *,const char *)
+void HtmlGenerator::endTitleHead(const QCString &,const QCString &)
{
endTitle();
- t << " </div>" << endl;
+ m_t << " </div>\n";
}
void HtmlGenerator::endHeaderSection()
{
- t << "</div><!--header-->" << endl;
+ m_t << "</div><!--header-->\n";
}
void HtmlGenerator::startInlineHeader()
{
if (m_emptySection)
{
- t << "<table class=\"memberdecls\">" << endl;
+ m_t << "<table class=\"memberdecls\">\n";
m_emptySection=FALSE;
}
- t << "<tr><td colspan=\"2\"><h3>";
+ m_t << "<tr><td colspan=\"2\"><h3>";
}
void HtmlGenerator::endInlineHeader()
{
- t << "</h3></td></tr>" << endl;
+ m_t << "</h3></td></tr>\n";
}
void HtmlGenerator::startMemberDocSimple(bool isEnum)
{
- DBG_HTML(t << "<!-- startMemberDocSimple -->" << endl;)
- t << "<table class=\"fieldtable\">" << endl;
- t << "<tr><th colspan=\"" << (isEnum?"2":"3") << "\">";
- t << (isEnum? theTranslator->trEnumerationValues() :
- theTranslator->trCompoundMembers()) << "</th></tr>" << endl;
+ DBG_HTML(m_t << "<!-- startMemberDocSimple -->\n";)
+ m_t << "<table class=\"fieldtable\">\n";
+ m_t << "<tr><th colspan=\"" << (isEnum?"2":"3") << "\">";
+ m_t << (isEnum? theTranslator->trEnumerationValues() :
+ theTranslator->trCompoundMembers()) << "</th></tr>\n";
}
void HtmlGenerator::endMemberDocSimple(bool)
{
- DBG_HTML(t << "<!-- endMemberDocSimple -->" << endl;)
- t << "</table>" << endl;
+ DBG_HTML(m_t << "<!-- endMemberDocSimple -->\n";)
+ m_t << "</table>\n";
}
void HtmlGenerator::startInlineMemberType()
{
- DBG_HTML(t << "<!-- startInlineMemberType -->" << endl;)
- t << "<tr><td class=\"fieldtype\">" << endl;
+ DBG_HTML(m_t << "<!-- startInlineMemberType -->\n";)
+ m_t << "<tr><td class=\"fieldtype\">\n";
}
void HtmlGenerator::endInlineMemberType()
{
- DBG_HTML(t << "<!-- endInlineMemberType -->" << endl;)
- t << "</td>" << endl;
+ DBG_HTML(m_t << "<!-- endInlineMemberType -->\n";)
+ m_t << "</td>\n";
}
void HtmlGenerator::startInlineMemberName()
{
- DBG_HTML(t << "<!-- startInlineMemberName -->" << endl;)
- t << "<td class=\"fieldname\">" << endl;
+ DBG_HTML(m_t << "<!-- startInlineMemberName -->\n";)
+ m_t << "<td class=\"fieldname\">\n";
}
void HtmlGenerator::endInlineMemberName()
{
- DBG_HTML(t << "<!-- endInlineMemberName -->" << endl;)
- t << "</td>" << endl;
+ DBG_HTML(m_t << "<!-- endInlineMemberName -->\n";)
+ m_t << "</td>\n";
}
void HtmlGenerator::startInlineMemberDoc()
{
- DBG_HTML(t << "<!-- startInlineMemberDoc -->" << endl;)
- t << "<td class=\"fielddoc\">" << endl;
+ DBG_HTML(m_t << "<!-- startInlineMemberDoc -->\n";)
+ m_t << "<td class=\"fielddoc\">\n";
}
void HtmlGenerator::endInlineMemberDoc()
{
- DBG_HTML(t << "<!-- endInlineMemberDoc -->" << endl;)
- t << "</td></tr>" << endl;
+ DBG_HTML(m_t << "<!-- endInlineMemberDoc -->\n";)
+ m_t << "</td></tr>\n";
}
void HtmlGenerator::startLabels()
{
- DBG_HTML(t << "<!-- startLabels -->" << endl;)
- t << "<span class=\"mlabels\">";
+ DBG_HTML(m_t << "<!-- startLabels -->\n";)
+ m_t << "<span class=\"mlabels\">";
}
-void HtmlGenerator::writeLabel(const char *l,bool /*isLast*/)
+void HtmlGenerator::writeLabel(const QCString &l,bool /*isLast*/)
{
- DBG_HTML(t << "<!-- writeLabel(" << l << ") -->" << endl;)
- //t << "<tt>[" << l << "]</tt>";
- //if (!isLast) t << ", ";
- t << "<span class=\"mlabel\">" << l << "</span>";
+ DBG_HTML(m_t << "<!-- writeLabel(" << l << ") -->\n";)
+ //m_t << "<tt>[" << l << "]</tt>";
+ //if (!isLast) m_t << ", ";
+ m_t << "<span class=\"mlabel\">" << l << "</span>";
}
void HtmlGenerator::endLabels()
{
- DBG_HTML(t << "<!-- endLabels -->" << endl;)
- t << "</span>";
+ DBG_HTML(m_t << "<!-- endLabels -->\n";)
+ m_t << "</span>";
}
void HtmlGenerator::writeInheritedSectionTitle(
- const char *id, const char *ref,
- const char *file, const char *anchor,
- const char *title, const char *name)
+ const QCString &id, const QCString &ref,
+ const QCString &file, const QCString &anchor,
+ const QCString &title, const QCString &name)
{
- DBG_HTML(t << "<!-- writeInheritedSectionTitle -->" << endl;)
+ DBG_HTML(m_t << "<!-- writeInheritedSectionTitle -->\n";)
QCString a = anchor;
if (!a.isEmpty()) a.prepend("#");
QCString classLink = QCString("<a class=\"el\" ");
- if (ref)
+ if (!ref.isEmpty())
{
classLink+= externalLinkTarget();
classLink += " href=\"";
@@ -2942,49 +3000,49 @@ void HtmlGenerator::writeInheritedSectionTitle(
}
classLink=classLink+addHtmlExtensionIfMissing(file)+a;
classLink+=QCString("\">")+convertToHtml(name,FALSE)+"</a>";
- t << "<tr class=\"inherit_header " << id << "\">"
+ m_t << "<tr class=\"inherit_header " << id << "\">"
<< "<td colspan=\"2\" onclick=\"javascript:toggleInherit('" << id << "')\">"
<< "<img src=\"" << m_relPath << "closed.png\" alt=\"-\"/>&#160;"
<< theTranslator->trInheritedFrom(convertToHtml(title,FALSE),classLink)
- << "</td></tr>" << endl;
+ << "</td></tr>\n";
}
-void HtmlGenerator::writeSummaryLink(const char *file,const char *anchor,const char *title,bool first)
+void HtmlGenerator::writeSummaryLink(const QCString &file,const QCString &anchor,const QCString &title,bool first)
{
if (first)
{
- t << " <div class=\"summary\">\n";
+ m_t << " <div class=\"summary\">\n";
}
else
{
- t << " &#124;\n";
+ m_t << " &#124;\n";
}
- t << "<a href=\"";
- if (file)
+ m_t << "<a href=\"";
+ if (!file.isEmpty())
{
- t << m_relPath << addHtmlExtensionIfMissing(file);
+ m_t << m_relPath << addHtmlExtensionIfMissing(file);
}
- else
+ else if (!anchor.isEmpty())
{
- t << "#";
- t << anchor;
+ m_t << "#";
+ m_t << anchor;
}
- t << "\">";
- t << title;
- t << "</a>";
+ m_t << "\">";
+ m_t << title;
+ m_t << "</a>";
}
-void HtmlGenerator::endMemberDeclaration(const char *anchor,const char *inheritId)
+void HtmlGenerator::endMemberDeclaration(const QCString &anchor,const QCString &inheritId)
{
- t << "<tr class=\"separator:" << anchor;
- if (inheritId)
+ m_t << "<tr class=\"separator:" << anchor;
+ if (!inheritId.isEmpty())
{
- t << " inherit " << inheritId;
+ m_t << " inherit " << inheritId;
}
- t << "\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n";
+ m_t << "\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n";
}
-void HtmlGenerator::setCurrentDoc(const Definition *context,const char *anchor,bool isSourceFile)
+void HtmlGenerator::setCurrentDoc(const Definition *context,const QCString &anchor,bool isSourceFile)
{
if (Doxygen::searchIndex)
{
@@ -2992,7 +3050,7 @@ void HtmlGenerator::setCurrentDoc(const Definition *context,const char *anchor,b
}
}
-void HtmlGenerator::addWord(const char *word,bool hiPriority)
+void HtmlGenerator::addWord(const QCString &word,bool hiPriority)
{
if (Doxygen::searchIndex)
{
diff --git a/src/htmlgen.h b/src/htmlgen.h
index 659a69e..845f259 100644
--- a/src/htmlgen.h
+++ b/src/htmlgen.h
@@ -17,49 +17,44 @@
#define HTMLGEN_H
#include "outputgen.h"
-#include "ftextstream.h"
-
-class QFile;
class HtmlCodeGenerator : public CodeOutputInterface
{
public:
- HtmlCodeGenerator(FTextStream &t,const QCString &relPath);
- HtmlCodeGenerator();
+ HtmlCodeGenerator(TextStream &t,const QCString &relPath);
+ HtmlCodeGenerator(TextStream &t);
int id() const { return m_id; }
void setId(int id) { m_id = id; }
- void setTextStream(FTextStream &t);
void setRelativePath(const QCString &path);
- void codify(const char *text);
- void writeCodeLink(const char *ref,const char *file,
- const char *anchor,const char *name,
- const char *tooltip);
- void writeTooltip(const char *id,
+ void codify(const QCString &text);
+ void writeCodeLink(const QCString &ref,const QCString &file,
+ const QCString &anchor,const QCString &name,
+ const QCString &tooltip);
+ void writeTooltip(const QCString &id,
const DocLinkInfo &docInfo,
- const char *decl,
- const char *desc,
+ const QCString &decl,
+ const QCString &desc,
const SourceLinkInfo &defInfo,
const SourceLinkInfo &declInfo
);
- void writeLineNumber(const char *,const char *,const char *,int);
+ void writeLineNumber(const QCString &,const QCString &,const QCString &,int);
void startCodeLine(bool);
void endCodeLine();
- void startFontClass(const char *s);
+ void startFontClass(const QCString &s);
void endFontClass();
- void writeCodeAnchor(const char *anchor);
- void setCurrentDoc(const Definition *,const char *,bool) {}
- void addWord(const char *,bool) {}
- void startCodeFragment(const char *style);
- void endCodeFragment(const char *);
+ void writeCodeAnchor(const QCString &anchor);
+ void setCurrentDoc(const Definition *,const QCString &,bool) {}
+ void addWord(const QCString &,bool) {}
+ void startCodeFragment(const QCString &style);
+ void endCodeFragment(const QCString &);
private:
- void _writeCodeLink(const char *className,
- const char *ref,const char *file,
- const char *anchor,const char *name,
- const char *tooltip);
- void docify(const char *str);
- bool m_streamSet = false;
- FTextStream m_t;
+ void _writeCodeLink(const QCString &className,
+ const QCString &ref,const QCString &file,
+ const QCString &anchor,const QCString &name,
+ const QCString &tooltip);
+ void docify(const QCString &str);
+ TextStream &m_t;
int m_col = 0;
QCString m_relPath;
bool m_lineOpen = false;
@@ -78,70 +73,70 @@ class HtmlGenerator : public OutputGenerator
virtual OutputType type() const { return Html; }
static void init();
- static void writeStyleSheetFile(QFile &f);
- static void writeHeaderFile(QFile &f, const char *cssname);
- static void writeFooterFile(QFile &f);
+ static void writeStyleSheetFile(TextStream &t);
+ static void writeHeaderFile(TextStream &t, const QCString &cssname);
+ static void writeFooterFile(TextStream &t);
static void writeTabData();
- static void writeSearchInfo(FTextStream &t,const QCString &relPath);
- static void writeSearchData(const char *dir);
+ static void writeSearchInfo(TextStream &t,const QCString &relPath);
+ static void writeSearchData(const QCString &dir);
static void writeSearchPage();
static void writeExternalSearchPage();
- static QCString writeLogoAsString(const char *path);
- static QCString writeSplitBarAsString(const char *name,const char *relpath);
+ static QCString writeLogoAsString(const QCString &path);
+ static QCString writeSplitBarAsString(const QCString &name,const QCString &relpath);
// ---- CodeOutputInterface
- void codify(const char *text)
+ void codify(const QCString &text)
{ m_codeGen.codify(text); }
- void writeCodeLink(const char *ref,const char *file,
- const char *anchor,const char *name,
- const char *tooltip)
+ void writeCodeLink(const QCString &ref,const QCString &file,
+ const QCString &anchor,const QCString &name,
+ const QCString &tooltip)
{ m_codeGen.writeCodeLink(ref,file,anchor,name,tooltip); }
- void writeLineNumber(const char *ref,const char *file,const char *anchor,int lineNumber)
+ void writeLineNumber(const QCString &ref,const QCString &file,const QCString &anchor,int lineNumber)
{ m_codeGen.writeLineNumber(ref,file,anchor,lineNumber); }
- void writeTooltip(const char *id, const DocLinkInfo &docInfo, const char *decl,
- const char *desc, const SourceLinkInfo &defInfo, const SourceLinkInfo &declInfo
+ void writeTooltip(const QCString &id, const DocLinkInfo &docInfo, const QCString &decl,
+ const QCString &desc, const SourceLinkInfo &defInfo, const SourceLinkInfo &declInfo
)
{ m_codeGen.writeTooltip(id,docInfo,decl,desc,defInfo,declInfo); }
void startCodeLine(bool hasLineNumbers)
{ m_codeGen.startCodeLine(hasLineNumbers); }
void endCodeLine()
{ m_codeGen.endCodeLine(); }
- void startFontClass(const char *s)
+ void startFontClass(const QCString &s)
{ m_codeGen.startFontClass(s); }
void endFontClass()
{ m_codeGen.endFontClass(); }
- void writeCodeAnchor(const char *anchor)
+ void writeCodeAnchor(const QCString &anchor)
{ m_codeGen.writeCodeAnchor(anchor); }
- void startCodeFragment(const char *style)
+ void startCodeFragment(const QCString &style)
{ m_codeGen.startCodeFragment(style); }
- void endCodeFragment(const char *style)
+ void endCodeFragment(const QCString &style)
{ m_codeGen.endCodeFragment(style); }
// ---------------------------
- void setCurrentDoc(const Definition *context,const char *anchor,bool isSourceFile);
- void addWord(const char *word,bool hiPriority);
+ void setCurrentDoc(const Definition *context,const QCString &anchor,bool isSourceFile);
+ void addWord(const QCString &word,bool hiPriority);
void writeDoc(DocNode *,const Definition *,const MemberDef *,int id);
- void startFile(const char *name,const char *manName,const char *title,int id);
- void writeFooter(const char *navPath);
+ void startFile(const QCString &name,const QCString &manName,const QCString &title,int id);
+ void writeFooter(const QCString &navPath);
void endFile();
void clearBuffer();
void writeSearchInfo();
void startIndexSection(IndexSections) {}
void endIndexSection(IndexSections) {}
- void writePageLink(const char *,bool) {}
+ void writePageLink(const QCString &,bool) {}
void startProjectNumber();
void endProjectNumber();
void writeStyleInfo(int part);
- void startTitleHead(const char *);
- void endTitleHead(const char *,const char *);
- void startTitle() { t << "<div class=\"title\">"; }
- void endTitle() { t << "</div>"; }
+ void startTitleHead(const QCString &);
+ void endTitleHead(const QCString &,const QCString &);
+ void startTitle() { m_t << "<div class=\"title\">"; }
+ void endTitle() { m_t << "</div>"; }
- void startParagraph(const char *classDef);
+ void startParagraph(const QCString &classDef);
void endParagraph();
- void writeString(const char *text);
+ void writeString(const QCString &text);
void startIndexListItem();
void endIndexListItem();
void startIndexList();
@@ -149,32 +144,32 @@ class HtmlGenerator : public OutputGenerator
void startIndexKey();
void endIndexKey();
void startIndexValue(bool);
- void endIndexValue(const char *,bool);
- void startItemList() { t << "<ul>" << endl; }
- void endItemList() { t << "</ul>" << endl; }
- void startIndexItem(const char *ref,const char *file);
- void endIndexItem(const char *ref,const char *file);
- void docify(const char *text);
+ void endIndexValue(const QCString &,bool);
+ void startItemList() { m_t << "<ul>\n"; }
+ void endItemList() { m_t << "</ul>\n"; }
+ void startIndexItem(const QCString &ref,const QCString &file);
+ void endIndexItem(const QCString &ref,const QCString &file);
+ void docify(const QCString &text);
- void writeObjectLink(const char *ref,const char *file,
- const char *anchor,const char *name);
+ void writeObjectLink(const QCString &ref,const QCString &file,
+ const QCString &anchor,const QCString &name);
- void startTextLink(const char *file,const char *anchor);
+ void startTextLink(const QCString &file,const QCString &anchor);
void endTextLink();
- void startHtmlLink(const char *url);
+ void startHtmlLink(const QCString &url);
void endHtmlLink();
- void startTypewriter() { t << "<code>"; }
- void endTypewriter() { t << "</code>"; }
+ void startTypewriter() { m_t << "<code>"; }
+ void endTypewriter() { m_t << "</code>"; }
void startGroupHeader(int);
void endGroupHeader(int);
- void startItemListItem() { t << "<li>"; }
- void endItemListItem() { t << "</li>\n"; }
+ void startItemListItem() { m_t << "<li>"; }
+ void endItemListItem() { m_t << "</li>\n"; }
void startMemberSections();
void endMemberSections();
void startHeaderSection();
void endHeaderSection();
- void startMemberHeader(const char *, int);
+ void startMemberHeader(const QCString &, int);
void endMemberHeader();
void startMemberSubtitle();
void endMemberSubtitle();
@@ -186,10 +181,12 @@ class HtmlGenerator : public OutputGenerator
void endInlineHeader();
void startAnonTypeScope(int) {}
void endAnonTypeScope(int) {}
- void startMemberItem(const char *anchor,int,const char *inheritId);
+ void startMemberItem(const QCString &anchor,int,const QCString &inheritId);
void endMemberItem();
void startMemberTemplateParams();
- void endMemberTemplateParams(const char *anchor,const char *inheritId);
+ void endMemberTemplateParams(const QCString &anchor,const QCString &inheritId);
+ void startCompoundTemplateParams();
+ void endCompoundTemplateParams();
void startMemberGroupHeader(bool);
void endMemberGroupHeader();
@@ -200,77 +197,77 @@ class HtmlGenerator : public OutputGenerator
void insertMemberAlign(bool);
void insertMemberAlignLeft(int,bool);
- void startMemberDescription(const char *anchor,const char *inheritId, bool typ);
+ void startMemberDescription(const QCString &anchor,const QCString &inheritId, bool typ);
void endMemberDescription();
void startMemberDeclaration() {}
- void endMemberDeclaration(const char *anchor,const char *inheritId);
- void writeInheritedSectionTitle(const char *id, const char *ref,
- const char *file, const char *anchor,
- const char *title,const char *name);
+ void endMemberDeclaration(const QCString &anchor,const QCString &inheritId);
+ void writeInheritedSectionTitle(const QCString &id, const QCString &ref,
+ const QCString &file, const QCString &anchor,
+ const QCString &title,const QCString &name);
- void writeRuler() { t << "<hr/>"; }
- void writeAnchor(const char *,const char *name)
- { t << "<a name=\"" << name <<"\" id=\"" << name << "\"></a>"; }
- void startEmphasis() { t << "<em>"; }
- void endEmphasis() { t << "</em>"; }
- void startBold() { t << "<b>"; }
- void endBold() { t << "</b>"; }
- void startDescription() { t << endl << "<dl>" << endl; }
- void endDescription() { t << endl << "</dl>\n" << endl; }
- void startDescItem() { t << "<dt>"; }
- void endDescItem() { t << "</dt>"; }
- void startDescForItem() { t << "<dd>"; }
- void endDescForItem() { t << "</dd>\n"; }
- void lineBreak(const char *style);
+ void writeRuler() { m_t << "<hr/>"; }
+ void writeAnchor(const QCString &,const QCString &name)
+ { m_t << "<a name=\"" << name <<"\" id=\"" << name << "\"></a>"; }
+ void startEmphasis() { m_t << "<em>"; }
+ void endEmphasis() { m_t << "</em>"; }
+ void startBold() { m_t << "<b>"; }
+ void endBold() { m_t << "</b>"; }
+ void startDescription() { m_t << "\n<dl>\n"; }
+ void endDescription() { m_t << "\n</dl>\n\n"; }
+ void startDescItem() { m_t << "<dt>"; }
+ void endDescItem() { m_t << "</dt>"; }
+ void startDescForItem() { m_t << "<dd>"; }
+ void endDescForItem() { m_t << "</dd>\n"; }
+ void lineBreak(const QCString &style);
void writeChar(char c);
- void startMemberDoc(const char *clName, const char *memName,
- const char *anchor, const char *title,
+ void startMemberDoc(const QCString &clName, const QCString &memName,
+ const QCString &anchor, const QCString &title,
int memCount, int memTotal, bool showInline);
void endMemberDoc(bool);
- void startDoxyAnchor(const char *fName,const char *manName,
- const char *anchor,const char *name,
- const char *args);
- void endDoxyAnchor(const char *fName,const char *anchor);
+ void startDoxyAnchor(const QCString &fName,const QCString &manName,
+ const QCString &anchor,const QCString &name,
+ const QCString &args);
+ void endDoxyAnchor(const QCString &fName,const QCString &anchor);
void writeLatexSpacing() {}
- void writeStartAnnoItem(const char *type,const char *file,
- const char *path,const char *name);
- void writeEndAnnoItem(const char *) { t << endl; }
- void startSubsection() { t << "<h2>"; }
- void endSubsection() { t << "</h2>" << endl; }
- void startSubsubsection() { t << "<h3>"; }
- void endSubsubsection() { t << "</h3>" << endl; }
- void startCenter() { t << "<center>" << endl; }
- void endCenter() { t << "</center>" << endl; }
- void startSmall() { t << "<small>" << endl; }
- void endSmall() { t << "</small>" << endl; }
+ void writeStartAnnoItem(const QCString &type,const QCString &file,
+ const QCString &path,const QCString &name);
+ void writeEndAnnoItem(const QCString &) { m_t << "\n"; }
+ void startSubsection() { m_t << "<h2>"; }
+ void endSubsection() { m_t << "</h2>\n"; }
+ void startSubsubsection() { m_t << "<h3>"; }
+ void endSubsubsection() { m_t << "</h3>\n"; }
+ void startCenter() { m_t << "<center>\n"; }
+ void endCenter() { m_t << "</center>\n"; }
+ void startSmall() { m_t << "<small>\n"; }
+ void endSmall() { m_t << "</small>\n"; }
void startExamples();
void endExamples();
- void startParamList(ParamListTypes,const char *);
+ void startParamList(ParamListTypes,const QCString &);
void endParamList();
- void startSection(const char *,const char *,SectionType);
- void endSection(const char *,SectionType);
- void addIndexItem(const char *,const char *);
+ void startSection(const QCString &,const QCString &,SectionType);
+ void endSection(const QCString &,SectionType);
+ void addIndexItem(const QCString &,const QCString &);
void startIndent();
void endIndent();
void writeSynopsis() {}
void startClassDiagram();
- void endClassDiagram(const ClassDiagram &,const char *,const char *);
+ void endClassDiagram(const ClassDiagram &,const QCString &,const QCString &);
void startPageRef() {}
- void endPageRef(const char *,const char *) {}
+ void endPageRef(const QCString &,const QCString &) {}
void startQuickIndices() {}
void endQuickIndices();
- void writeSplitBar(const char *name);
- void writeNavigationPath(const char *s);
+ void writeSplitBar(const QCString &name);
+ void writeNavigationPath(const QCString &s);
void writeLogo();
- void writeQuickLinks(bool compact,HighlightedItem hli,const char *file);
- void writeSummaryLink(const char *file,const char *anchor,const char *title,bool first);
+ void writeQuickLinks(bool compact,HighlightedItem hli,const QCString &file);
+ void writeSummaryLink(const QCString &file,const QCString &anchor,const QCString &title,bool first);
void startContents();
void endContents();
- void startPageDoc(const char *pageTitle);
+ void startPageDoc(const QCString &pageTitle);
void endPageDoc();
void writeNonBreakableSpace(int);
- void startDescTable(const char *title);
+ void startDescTable(const QCString &title);
void endDescTable();
void startDescTableRow();
void endDescTableRow();
@@ -292,24 +289,24 @@ class HtmlGenerator : public OutputGenerator
void writeGraphicalHierarchy(DotGfxHierarchyTable &g);
void startTextBlock(bool)
- { t << "<div class=\"textblock\">"; }
+ { m_t << "<div class=\"textblock\">"; }
void endTextBlock(bool)
- { t << "</div>"; }
+ { m_t << "</div>"; }
void lastIndexPage() {}
void startMemberDocPrefixItem();
void endMemberDocPrefixItem();
void startMemberDocName(bool);
void endMemberDocName();
- void startParameterType(bool first,const char *key);
+ void startParameterType(bool first,const QCString &key);
void endParameterType();
void startParameterName(bool);
void endParameterName(bool last,bool emptyList,bool closeBracket);
void startParameterList(bool);
void endParameterList();
- virtual void exceptionEntry(const char*,bool);
+ void exceptionEntry(const QCString &,bool);
- void startConstraintList(const char *);
+ void startConstraintList(const QCString &);
void startConstraintParam();
void endConstraintParam();
void startConstraintType();
@@ -328,15 +325,15 @@ class HtmlGenerator : public OutputGenerator
void endInlineMemberDoc();
void startLabels();
- void writeLabel(const char *l,bool isLast);
+ void writeLabel(const QCString &l,bool isLast);
void endLabels();
private:
- static void writePageFooter(FTextStream &t,const QCString &,const QCString &,const QCString &);
+ static void writePageFooter(TextStream &t,const QCString &,const QCString &,const QCString &);
QCString m_lastTitle;
QCString m_lastFile;
QCString m_relPath;
- void docify(const char *text,bool inHtmlComment);
+ void docify(const QCString &text,bool inHtmlComment);
int m_sectionCount = 0;
bool m_emptySection = false;
diff --git a/src/htmlhelp.cpp b/src/htmlhelp.cpp
index d34c8d3..9887616 100644
--- a/src/htmlhelp.cpp
+++ b/src/htmlhelp.cpp
@@ -19,8 +19,6 @@
#include <stdio.h>
#include <stdlib.h>
-#include <qfile.h>
-#include <qfileinfo.h>
#include "htmlhelp.h"
#include "config.h"
@@ -34,6 +32,7 @@
#include "util.h"
#include "linkedmap.h"
#include "regex.h"
+#include "fileinfo.h"
//----------------------------------------------------------------------------
@@ -50,12 +49,12 @@ class HtmlHelpRecoder
void initialize()
{
- const char *str = Config_getString(CHM_INDEX_ENCODING);
- if (!str) str = "CP1250"; // use safe and likely default
- m_fromUtf8 = portable_iconv_open(str,"UTF-8");
+ QCString str = Config_getString(CHM_INDEX_ENCODING);
+ if (str.isEmpty()) str = "CP1250"; // use safe and likely default
+ m_fromUtf8 = portable_iconv_open(str.data(),"UTF-8");
if (m_fromUtf8==m_iconv_null)
{
- term("unsupported character conversion for CHM_INDEX_ENCODING: '%s'->'UTF-8'\n", str);
+ term("unsupported character conversion for CHM_INDEX_ENCODING: '%s'->'UTF-8'\n", qPrint(str));
}
}
void finalize()
@@ -74,7 +73,7 @@ class HtmlHelpRecoder
QCString output(oSize);
size_t iLeft = iSize;
size_t oLeft = oSize;
- char *iPtr = s.rawData();
+ const char *iPtr = s.data();
char *oPtr = output.rawData();
if (!portable_iconv(m_fromUtf8,&iPtr,&iLeft,&oPtr,&oLeft))
{
@@ -99,7 +98,7 @@ class HtmlHelpRecoder
/** Class representing a field in the HTML help index. */
struct IndexField
{
- IndexField(const char *k,const char *n,const char *u,const char *a,bool l,bool r) :
+ IndexField(const QCString &k,const QCString &n,const QCString &u,const QCString &a,bool l,bool r) :
key(k), name(n), url(u), anchor(a), link(l), reversed(r) {}
QCString key;
QCString name;
@@ -117,10 +116,10 @@ class HtmlHelpIndex
public:
HtmlHelpIndex(HtmlHelpRecoder &recoder);
~HtmlHelpIndex();
- void addItem(const char *first,const char *second,
- const char *url, const char *anchor,
+ void addItem(const QCString &first,const QCString &second,
+ const QCString &url, const QCString &anchor,
bool hasLink,bool reversed);
- void writeFields(FTextStream &t);
+ void writeFields(std::ostream &t);
size_t size() const { return m_map.size(); }
private:
LinkedMap<IndexField> m_map;
@@ -150,21 +149,21 @@ HtmlHelpIndex::~HtmlHelpIndex()
* \param reversed TRUE if level1 is the member name and level2 the compound
* name.
*/
-void HtmlHelpIndex::addItem(const char *level1,const char *level2,
- const char *url,const char *anchor,bool hasLink,
+void HtmlHelpIndex::addItem(const QCString &level1,const QCString &level2,
+ const QCString &url,const QCString &anchor,bool hasLink,
bool reversed)
{
static const reg::Ex re(R"(@\d+)");
- std::string key = level1;
- if (level2) key+= std::string("?") + level2;
+ std::string key = level1.str();
+ if (!level2.isEmpty()) key+= std::string("?") + level2.str();
if (reg::search(key,re)) // skip anonymous stuff
{
return;
}
std::string key_anchor;
- if (anchor)
+ if (!anchor.isEmpty())
{
- key_anchor = key+anchor;
+ key_anchor = key+anchor.str();
}
else
{
@@ -210,7 +209,7 @@ static QCString field2URL(const IndexField *f,bool checkReversed)
* b1 -> link to url#anchor
* </pre>
*/
-void HtmlHelpIndex::writeFields(FTextStream &t)
+void HtmlHelpIndex::writeFields(std::ostream &t)
{
std::sort(std::begin(m_map),
std::end(m_map),
@@ -234,7 +233,7 @@ void HtmlHelpIndex::writeFields(FTextStream &t)
}
{ // finish old list at level 2
- if (level2Started) t << " </UL>" << endl;
+ if (level2Started) t << " </UL>\n";
level2Started=FALSE;
// <Antony>
@@ -287,12 +286,12 @@ void HtmlHelpIndex::writeFields(FTextStream &t)
}
if (!level2Started && !level2.isEmpty())
{ // start new list at level 2
- t << " <UL>" << endl;
+ t << " <UL>\n";
level2Started=TRUE;
}
else if (level2Started && level2.isEmpty())
{ // end list at level 2
- t << " </UL>" << endl;
+ t << " </UL>\n";
level2Started=FALSE;
}
if (level2Started)
@@ -304,7 +303,7 @@ void HtmlHelpIndex::writeFields(FTextStream &t)
"</OBJECT>\n";
}
}
- if (level2Started) t << " </UL>" << endl;
+ if (level2Started) t << " </UL>\n";
}
//----------------------------------------------------------------------------
@@ -314,9 +313,7 @@ class HtmlHelp::Private
public:
Private() : index(recoder) {}
void createProjectFile();
- QFile cf;
- QFile kf;
- FTextStream cts,kts;
+ std::ofstream cts,kts;
bool ctsItemPresent = false;
int dc = 0;
StringSet indexFiles;
@@ -447,13 +444,12 @@ void HtmlHelp::initialize()
/* open the contents file */
QCString fName = Config_getString(HTML_OUTPUT) + "/index.hhc";
- p->cf.setName(fName);
- if (!p->cf.open(IO_WriteOnly))
+ p->cts.open(fName.str(),std::ofstream::out | std::ofstream::binary);
+ if (!p->cts.is_open())
{
- term("Could not open file %s for writing\n",fName.data());
+ term("Could not open file %s for writing\n",qPrint(fName));
}
/* Write the header of the contents file */
- p->cts.setDevice(&p->cf);
p->cts << "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML//EN\">\n"
"<HTML><HEAD></HEAD><BODY>\n"
"<OBJECT type=\"text/site properties\">\n"
@@ -463,13 +459,12 @@ void HtmlHelp::initialize()
/* open the contents file */
fName = Config_getString(HTML_OUTPUT) + "/index.hhk";
- p->kf.setName(fName);
- if (!p->kf.open(IO_WriteOnly))
+ p->kts.open(fName.str(),std::ofstream::out | std::ofstream::binary);
+ if (!p->kts.is_open())
{
- term("Could not open file %s for writing\n",fName.data());
+ term("Could not open file %s for writing\n",qPrint(fName));
}
/* Write the header of the contents file */
- p->kts.setDevice(&p->kf);
p->kts << "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML//EN\">\n"
"<HTML><HEAD></HEAD><BODY>\n"
"<OBJECT type=\"text/site properties\">\n"
@@ -487,7 +482,7 @@ QCString HtmlHelp::getLanguageString()
auto it = s_languageDict.find(theTranslator->idLanguage().str());
if (it!=s_languageDict.end())
{
- return it->second;
+ return QCString(it->second);
}
}
// default language
@@ -500,11 +495,9 @@ void HtmlHelp::Private::createProjectFile()
{
/* Write the project file */
QCString fName = Config_getString(HTML_OUTPUT) + "/index.hhp";
- QFile f(fName);
- if (f.open(IO_WriteOnly))
+ std::ofstream t(fName.str(),std::ofstream::out | std::ofstream::binary);
+ if (t.is_open())
{
- FTextStream t(&f);
-
const char *hhcFile = "\"index.hhc\"";
const char *hhkFile = "\"index.hhk\"";
bool hhkPresent = index.size()>0;
@@ -523,12 +516,12 @@ void HtmlHelp::Private::createProjectFile()
t << "Default Window=main\n"
"Default topic=" << indexName << "\n";
if (hhkPresent) t << "Index file=index.hhk\n";
- t << "Language=" << getLanguageString() << endl;
+ t << "Language=" << getLanguageString() << "\n";
if (Config_getBool(BINARY_TOC)) t << "Binary TOC=YES\n";
if (Config_getBool(GENERATE_CHI)) t << "Create CHI file=YES\n";
- t << "Title=" << recoder.recode(Config_getString(PROJECT_NAME)) << endl << endl;
+ t << "Title=" << recoder.recode(Config_getString(PROJECT_NAME)) << "\n\n";
- t << "[WINDOWS]" << endl;
+ t << "[WINDOWS]\n";
// NOTE: the 0x10387e number is a set of bits specifying the buttons
// which should appear in the CHM viewer; that specific value
@@ -544,35 +537,35 @@ void HtmlHelp::Private::createProjectFile()
{
t << "main=\"" << recoder.recode(Config_getString(PROJECT_NAME)) << "\"," << hhcFile << ","
<< hhkFile << ",\"" << indexName << "\",\"" <<
- indexName << "\",,,,,0x23520,,0x70387e,,,,,,,,0" << endl << endl;
+ indexName << "\",,,,,0x23520,,0x70387e,,,,,,,,0\n\n";
}
else
{
t << "main=\"" << recoder.recode(Config_getString(PROJECT_NAME)) << "\"," << hhcFile << ","
<< hhkFile << ",\"" << indexName << "\",\"" <<
- indexName << "\",,,,,0x23520,,0x10387e,,,,,,,,0" << endl << endl;
+ indexName << "\",,,,,0x23520,,0x10387e,,,,,,,,0\n\n";
}
- t << "[FILES]" << endl;
+ t << "[FILES]\n";
for (auto &s : indexFiles)
{
- t << s.c_str() << endl;
+ t << s.c_str() << "\n";
}
for (auto &s : imageFiles)
{
- t << QFileInfo(s.c_str()).fileName().data() << endl;
+ t << FileInfo(s).fileName() << "\n";
}
- f.close();
+ t.close();
}
else
{
- err("Could not open file %s for writing\n",fName.data());
+ err("Could not open file %s for writing\n",qPrint(fName));
}
}
-void HtmlHelp::addIndexFile(const char *s)
+void HtmlHelp::addIndexFile(const QCString &s)
{
- p->indexFiles.insert(s);
+ p->indexFiles.insert(s.str());
}
/*! Finalizes the HTML help. This will finish and close the
@@ -585,8 +578,7 @@ void HtmlHelp::finalize()
p->cts << "</UL>\n";
p->cts << "</BODY>\n";
p->cts << "</HTML>\n";
- p->cts.unsetDevice();
- p->cf.close();
+ p->cts.close();
p->index.writeFields(p->kts);
@@ -594,8 +586,7 @@ void HtmlHelp::finalize()
p->kts << "</UL>\n";
p->kts << "</BODY>\n";
p->kts << "</HTML>\n";
- p->kts.unsetDevice();
- p->kf.close();
+ p->kts.close();
p->createProjectFile();
@@ -635,10 +626,10 @@ void HtmlHelp::decContentsDepth()
* \param def not used.
*/
void HtmlHelp::addContentsItem(bool isDir,
- const char *name,
- const char * /*ref*/,
- const char *file,
- const char *anchor,
+ const QCString &name,
+ const QCString & /*ref*/,
+ const QCString &file,
+ const QCString &anchor,
bool /* separateIndex */,
bool /* addToNavIndex */,
const Definition * /* def */)
@@ -656,9 +647,9 @@ void HtmlHelp::addContentsItem(bool isDir,
int i; for (i=0;i<p->dc;i++) p->cts << " ";
p->cts << "<LI><OBJECT type=\"text/sitemap\">";
p->cts << "<param name=\"Name\" value=\"" << convertToHtml(p->recoder.recode(name),TRUE) << "\">";
- if (file) // made file optional param - KPW
+ if (!file.isEmpty()) // made file optional param - KPW
{
- if (file && (file[0]=='!' || file[0]=='^')) // special markers for user defined URLs
+ if (file[0]=='!' || file[0]=='^') // special markers for user defined URLs
{
p->cts << "<param name=\"";
if (file[0]=='^') p->cts << "URL"; else p->cts << "Local";
@@ -669,7 +660,7 @@ void HtmlHelp::addContentsItem(bool isDir,
{
p->cts << "<param name=\"Local\" value=\"";
p->cts << file << Doxygen::htmlFileExtension;
- if (anchor) p->cts << "#" << anchor;
+ if (!anchor.isEmpty()) p->cts << "#" << anchor;
}
p->cts << "\">";
}
@@ -688,7 +679,7 @@ void HtmlHelp::addContentsItem(bool isDir,
void HtmlHelp::addIndexItem(const Definition *context,const MemberDef *md,
- const char *sectionAnchor,const char *word)
+ const QCString &sectionAnchor,const QCString &word)
{
if (md)
{
@@ -708,19 +699,19 @@ void HtmlHelp::addIndexItem(const Definition *context,const MemberDef *md,
QCString level2 = md->name();
QCString contRef = separateMemberPages ? cfname : cfiname;
QCString memRef = cfname;
- QCString anchor = sectionAnchor ? QCString(sectionAnchor) : md->anchor();
+ QCString anchor = !sectionAnchor.isEmpty() ? sectionAnchor : md->anchor();
p->index.addItem(level1,level2,contRef,anchor,TRUE,FALSE);
p->index.addItem(level2,level1,memRef,anchor,TRUE,TRUE);
}
else if (context)
{
- QCString level1 = word ? QCString(word) : context->name();
- p->index.addItem(level1,0,context->getOutputFileBase(),sectionAnchor,TRUE,FALSE);
+ QCString level1 = !word.isEmpty() ? word : context->name();
+ p->index.addItem(level1,QCString(),context->getOutputFileBase(),sectionAnchor,TRUE,FALSE);
}
}
-void HtmlHelp::addImageFile(const char *fileName)
+void HtmlHelp::addImageFile(const QCString &fileName)
{
- p->imageFiles.insert(fileName);
+ p->imageFiles.insert(fileName.str());
}
diff --git a/src/htmlhelp.h b/src/htmlhelp.h
index 421320e..9d8eea5 100644
--- a/src/htmlhelp.h
+++ b/src/htmlhelp.h
@@ -66,18 +66,18 @@ class HtmlHelp : public IndexIntf
void incContentsDepth();
void decContentsDepth();
void addContentsItem(bool isDir,
- const char *name,
- const char *ref,
- const char *file,
- const char *anchor,
+ const QCString &name,
+ const QCString &ref,
+ const QCString &file,
+ const QCString &anchor,
bool separateIndex,
bool addToNavIndex,
const Definition *def);
void addIndexItem(const Definition *context,const MemberDef *md,
- const char *sectionAnchor, const char *title);
- void addIndexFile(const char *name);
- void addImageFile(const char *);
- void addStyleSheetFile(const char *) {}
+ const QCString &sectionAnchor, const QCString &title);
+ void addIndexFile(const QCString &name);
+ void addImageFile(const QCString &);
+ void addStyleSheetFile(const QCString &) {}
static QCString getLanguageString();
private:
diff --git a/src/image.cpp b/src/image.cpp
index 2a8108b..0b353a9 100644
--- a/src/image.cpp
+++ b/src/image.cpp
@@ -1,13 +1,13 @@
/******************************************************************************
*
- *
+ *
*
*
* Copyright (C) 1997-2015 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
- * documentation under the terms of the GNU General Public License is hereby
- * granted. No representations are made about the suitability of this software
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
@@ -17,7 +17,6 @@
*/
#include "image.h"
-#include <qfile.h>
#include <math.h>
#include "lodepng.h"
#include "config.h"
@@ -37,10 +36,10 @@ const int charSetWidth=80;
const int charHeight=12;
const int numChars=96;
-unsigned short charPos[numChars] =
- {
- 0, 5, 8, 13, 20, 27, 38, 47,
- 50, 54, 58, 65, 72, 76, 83, 87,
+unsigned short charPos[numChars] =
+ {
+ 0, 5, 8, 13, 20, 27, 38, 47,
+ 50, 54, 58, 65, 72, 76, 83, 87,
91, 98,105,112,119,126,133,140,
147,154,161,164,167,174,181,188,
195,207,216,224,233,242,250,258,
@@ -53,7 +52,7 @@ unsigned short charPos[numChars] =
594,600,607,613,617,620,624,631
};
-unsigned char charWidth[numChars] =
+unsigned char charWidth[numChars] =
{
5, 3, 5, 7, 7,11, 9, 3,
4, 4, 7, 7, 4, 7, 4, 4,
@@ -67,7 +66,7 @@ unsigned char charWidth[numChars] =
3, 7, 7, 7, 7, 7, 4, 7,
7, 3, 3, 6, 3, 9, 7, 7,
7, 6, 5, 6, 3, 7, 7, 9,
- 6, 7, 6, 4, 3, 4, 7, 5
+ 6, 7, 6, 4, 3, 4, 7, 5
};
unsigned char fontRaw[charSetWidth*charHeight] = {
@@ -261,7 +260,7 @@ uchar Image::getPixel(uint x,uint y) const
return 0;
}
-void Image::writeChar(uint x,uint y,char c,uchar fg)
+void Image::writeChar(uint x,uint y,char c,uchar fg)
{
if (c>=' ')
{
@@ -279,8 +278,8 @@ void Image::writeChar(uint x,uint y,char c,uchar fg)
while (bitsLeft>0)
{
uint bits=8-bitOffset;
- if (bits>bitsLeft) bits=bitsLeft;
- bitPattern<<=bits;
+ if (bits>bitsLeft) bits=bitsLeft;
+ bitPattern<<=bits;
bitPattern|=((fontRaw[byteOffset]<<bitOffset)&0xff)>>(8-bits);
bitsLeft-=bits;
bitOffset=0;
@@ -295,15 +294,16 @@ void Image::writeChar(uint x,uint y,char c,uchar fg)
}
rowOffset+=charSetWidth;
}
- }
+ }
}
-void Image::writeString(uint x,uint y,const char *s,uchar fg)
+void Image::writeString(uint x,uint y,const QCString &s,uchar fg)
{
- if (s)
+ if (!s.isEmpty())
{
+ const char *p = s.data();
char c;
- while ((c=*s++))
+ while ((c=*p++))
{
writeChar(x,y,c,fg);
x+=charWidth[c-' '];
@@ -311,13 +311,14 @@ void Image::writeString(uint x,uint y,const char *s,uchar fg)
}
}
-uint Image::stringLength(const char *s)
+uint Image::stringLength(const QCString &s)
{
uint w=0;
- if (s)
+ if (!s.isEmpty())
{
+ const char *p = s.data();
char c;
- while ((c=*s++)) w+=charWidth[c-' '];
+ while ((c=*p++)) w+=charWidth[c-' '];
}
return w;
}
@@ -325,12 +326,12 @@ uint Image::stringLength(const char *s)
void Image::drawHorzLine(uint y,uint xs,uint xe,uchar colIndex,uint mask)
{
uint x,i=0,j=0;
- for (x=xs;x<=xe;x++,j++)
+ for (x=xs;x<=xe;x++,j++)
{
if (j&1) i++;
if (mask&(1<<(i&0x1f))) setPixel(x,y,colIndex);
}
-}
+}
void Image::drawHorzArrow(uint y,uint xs,uint xe,uchar colIndex,uint mask)
{
@@ -341,12 +342,12 @@ void Image::drawHorzArrow(uint y,uint xs,uint xe,uchar colIndex,uint mask)
uint h=i>>1;
drawVertLine(xe-i,y-h,y+h,colIndex,0xffffffff);
}
-}
+}
void Image::drawVertLine(uint x,uint ys,uint ye,uchar colIndex,uint mask)
{
uint y,i=0;
- for (y=ys;y<=ye;y++,i++)
+ for (y=ys;y<=ye;y++,i++)
{
if (mask&(1<<(i&0x1f))) setPixel(x,y,colIndex);
}
@@ -376,11 +377,11 @@ void Image::fillRect(uint x,uint y,uint width,uint height,uchar colIndex,uint ma
uint xp,yp,xi,yi;
for (yp=y,yi=0;yp<y+height;yp++,yi++)
for (xp=x,xi=0;xp<x+width;xp++,xi++)
- if (mask&(1<<((xi+yi)&0x1f)))
+ if (mask&(1<<((xi+yi)&0x1f)))
setPixel(xp,yp,colIndex);
}
-bool Image::save(const char *fileName,int mode)
+bool Image::save(const QCString &fileName,int mode)
{
static bool useTransparency = Config_getBool(FORMULA_TRANSPARENT);
uchar* buffer;
@@ -388,8 +389,8 @@ bool Image::save(const char *fileName,int mode)
LodePNG_Encoder encoder;
LodePNG_Encoder_init(&encoder);
uint numCols = mode==0 ? 8 : 16;
- Color *pPal = mode==0 ? palette :
- useTransparency ? palette2 :
+ Color *pPal = mode==0 ? palette :
+ useTransparency ? palette2 :
palette3 ;
uint i;
for (i=0;i<numCols;i++,pPal++)
@@ -397,10 +398,10 @@ bool Image::save(const char *fileName,int mode)
LodePNG_InfoColor_addPalette(&encoder.infoPng.color,
pPal->red,pPal->green,pPal->blue,pPal->alpha);
}
- encoder.infoPng.color.colorType = 3;
+ encoder.infoPng.color.colorType = 3;
encoder.infoRaw.color.colorType = 3;
LodePNG_encode(&encoder, &buffer, &bufferSize, m_data, m_width, m_height);
- LodePNG_saveFile(buffer, bufferSize, fileName);
+ LodePNG_saveFile(buffer, bufferSize, fileName.data());
free(buffer);
LodePNG_Encoder_cleanup(&encoder);
return TRUE;
@@ -505,7 +506,7 @@ ColoredImage::~ColoredImage()
free(m_data);
}
-bool ColoredImage::save(const char *fileName)
+bool ColoredImage::save(const QCString &fileName)
{
uchar *buffer;
size_t bufferSize;
@@ -514,7 +515,7 @@ bool ColoredImage::save(const char *fileName)
encoder.infoPng.color.colorType = m_hasAlpha ? 6 : 2; // 2=RGB 24 bit, 6=RGBA 32 bit
encoder.infoRaw.color.colorType = 6; // 6=RGBA 32 bit
LodePNG_encode(&encoder, &buffer, &bufferSize, m_data, m_width, m_height);
- LodePNG_saveFile(buffer, bufferSize, fileName);
+ LodePNG_saveFile(buffer, bufferSize, fileName.data());
LodePNG_Encoder_cleanup(&encoder);
free(buffer);
return TRUE;
diff --git a/src/image.h b/src/image.h
index 6eb2c21..cbeea87 100644
--- a/src/image.h
+++ b/src/image.h
@@ -20,6 +20,7 @@
#define _IMAGE_H
#include "types.h"
+#include "qcstring.h"
/** Class representing a bitmap image generated by doxygen. */
class Image
@@ -31,19 +32,19 @@ class Image
void setPixel(uint x,uint y,uchar val);
uchar getPixel(uint x,uint y) const;
void writeChar(uint x,uint y,char c,uchar fg);
- void writeString(uint x,uint y,const char *s,uchar fg);
+ void writeString(uint x,uint y,const QCString &s,uchar fg);
void drawHorzLine(uint y,uint xs,uint xe,uchar colIndex,uint mask);
void drawHorzArrow(uint y,uint xs,uint xe,uchar colIndex,uint mask);
void drawVertLine(uint x,uint ys,uint ye,uchar colIndex,uint mask);
void drawVertArrow(uint x,uint ys,uint ye,uchar colIndex,uint mask);
void drawRect(uint x,uint y,uint width,uint height,uchar colIndex,uint mask);
void fillRect(uint x,uint y,uint width,uint height,uchar colIndex,uint mask);
- bool save(const char *fileName,int mode=0);
- friend uint stringLength(const char *s);
+ bool save(const QCString &fileName,int mode=0);
+ friend uint stringLength(const QCString &s);
uint width() const { return m_width; }
uint height() const { return m_height; }
uchar *data() const { return m_data; }
- static uint stringLength(const char *s);
+ static uint stringLength(const QCString &s);
private:
uint m_width;
@@ -59,7 +60,7 @@ class ColoredImage
const uchar *greyLevels,const uchar *alphaLevels,
int saturation,int hue,int gamma);
~ColoredImage();
- bool save(const char *fileName);
+ bool save(const QCString &fileName);
static void hsl2rgb(double h,double s,double l,
double *pRed,double *pGreen,double *pBlue);
private:
diff --git a/src/index.cpp b/src/index.cpp
index 7a31f0f..99942f1 100644
--- a/src/index.cpp
+++ b/src/index.cpp
@@ -1,8 +1,6 @@
/******************************************************************************
*
- *
- *
- * Copyright (C) 1997-2015 by Dimitri van Heesch.
+ * Copyright (C) 1997-2021 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,12 +17,11 @@
* @brief This file contains functions for the various index pages.
*/
-#include <stdlib.h>
-
+#include <cstdlib>
+#include <sstream>
#include <array>
#include <assert.h>
-#include <qdir.h>
#include "message.h"
#include "index.h"
@@ -50,6 +47,7 @@
#include "namespacedef.h"
#include "filename.h"
#include "tooltip.h"
+#include "utf8.h"
#define MAX_ITEMS_BEFORE_MULTIPAGE_INDEX 200
#define MAX_ITEMS_BEFORE_QUICK_INDEX 30
@@ -69,6 +67,7 @@ int hierarchyExceptions;
int documentedFiles;
int documentedGroups;
int documentedNamespaces;
+int documentedConcepts;
int indexedPages;
int documentedClassMembers[CMHL_Total];
int documentedFileMembers[FMHL_Total];
@@ -82,6 +81,7 @@ static void countFiles(int &htmlFiles,int &files);
static int countGroups();
static int countDirs();
static int countNamespaces();
+static int countConcepts();
static int countAnnotatedClasses(int *cp,ClassDef::CompoundType ct);
static void countRelatedPages(int &docPages,int &indexPages);
@@ -104,6 +104,7 @@ void countDataStructures()
countRelatedPages(documentedPages,indexedPages); // "pages"
documentedGroups = countGroups(); // "modules"
documentedNamespaces = countNamespaces(); // "namespaces"
+ documentedConcepts = countConcepts(); // "concepts"
documentedDirs = countDirs(); // "dirs"
// "globals"
// "namespacemembers"
@@ -189,7 +190,7 @@ static void endQuickIndexList(OutputList &ol)
ol.writeString(" </div>\n");
}
-static void startQuickIndexItem(OutputList &ol,const char *l,
+static void startQuickIndexItem(OutputList &ol,const QCString &l,
bool hl,bool compact,bool &first)
{
first=FALSE;
@@ -216,7 +217,7 @@ QCString fixSpaces(const QCString &s)
return substitute(s," ","&#160;");
}
-void startTitle(OutputList &ol,const char *fileName,const DefinitionMutable *def)
+void startTitle(OutputList &ol,const QCString &fileName,const DefinitionMutable *def)
{
ol.startHeaderSection();
if (def) def->writeSummaryLinks(ol);
@@ -225,16 +226,16 @@ void startTitle(OutputList &ol,const char *fileName,const DefinitionMutable *def
ol.disable(OutputGenerator::Man);
}
-void endTitle(OutputList &ol,const char *fileName,const char *name)
+void endTitle(OutputList &ol,const QCString &fileName,const QCString &name)
{
ol.popGeneratorState();
ol.endTitleHead(fileName,name);
ol.endHeaderSection();
}
-void startFile(OutputList &ol,const char *name,const char *manName,
- const char *title,HighlightedItem hli,bool additionalIndices,
- const char *altSidebarName)
+void startFile(OutputList &ol,const QCString &name,const QCString &manName,
+ const QCString &title,HighlightedItem hli,bool additionalIndices,
+ const QCString &altSidebarName)
{
static bool disableIndex = Config_getBool(DISABLE_INDEX);
ol.startFile(name,manName,title);
@@ -247,7 +248,7 @@ void startFile(OutputList &ol,const char *name,const char *manName,
{
ol.endQuickIndices();
}
- ol.writeSplitBar(altSidebarName ? altSidebarName : name);
+ ol.writeSplitBar(!altSidebarName.isEmpty() ? altSidebarName : name);
ol.writeSearchInfo();
}
@@ -309,12 +310,12 @@ static void writeMemberToIndex(const Definition *def,const MemberDef *md,bool ad
if (md->getOuterScope()==def || md->getOuterScope()==Doxygen::globalScope)
{
Doxygen::indexList->addContentsItem(isDir,
- md->name(),md->getReference(),md->getOutputFileBase(),md->anchor(),FALSE,addToIndex);
+ md->name(),md->getReference(),md->getOutputFileBase(),md->anchor(),FALSE,addToIndex && md->getGroupDef()==nullptr);
}
else // inherited member
{
Doxygen::indexList->addContentsItem(isDir,
- md->name(),def->getReference(),def->getOutputFileBase(),md->anchor(),FALSE,addToIndex);
+ md->name(),def->getReference(),def->getOutputFileBase(),md->anchor(),FALSE,addToIndex && md->getGroupDef()==nullptr);
}
if (isDir)
{
@@ -349,7 +350,9 @@ static void writeMemberToIndex(const Definition *def,const MemberDef *md,bool ad
template<class T>
void addMembersToIndex(T *def,LayoutDocManager::LayoutPart part,
const QCString &name,const QCString &anchor,
- bool addToIndex=TRUE,bool preventSeparateIndex=FALSE)
+ bool addToIndex=TRUE,bool preventSeparateIndex=FALSE,
+ const ConceptLinkedRefMap *concepts = nullptr)
+
{
bool hasMembers = !def->getMemberLists().empty() || !def->getMemberGroups().empty();
Doxygen::indexList->addContentsItem(hasMembers,name,
@@ -362,13 +365,22 @@ void addMembersToIndex(T *def,LayoutDocManager::LayoutPart part,
{
if (cd->isLinkable()) numClasses++;
}
- //printf("addMembersToIndex(def=%s hasMembers=%d numClasses=%d)\n",def->name().data(),hasMembers,numClasses);
- if (hasMembers || numClasses>0)
+ int numConcepts=0;
+ if (concepts)
+ {
+ for (const auto &cd : *concepts)
+ {
+ if (cd->isLinkable()) numConcepts++;
+ }
+ }
+ //printf("addMembersToIndex(def=%s hasMembers=%d numClasses=%d)\n",qPrint(def->name()),hasMembers,numClasses);
+ if (hasMembers || numClasses>0 || numConcepts>0)
{
Doxygen::indexList->incContentsDepth();
for (const auto &lde : LayoutDocManager::instance().docEntries(part))
{
- if (lde->kind()==LayoutDocEntry::MemberDef)
+ auto kind = lde->kind();
+ if (kind==LayoutDocEntry::MemberDef)
{
const LayoutDocEntryMemberDef *lmd = (const LayoutDocEntryMemberDef*)lde.get();
MemberList *ml = def->getMemberList(lmd->type);
@@ -383,9 +395,9 @@ void addMembersToIndex(T *def,LayoutDocManager::LayoutPart part,
}
}
}
- else if (lde->kind()==LayoutDocEntry::NamespaceClasses ||
- lde->kind()==LayoutDocEntry::FileClasses ||
- lde->kind()==LayoutDocEntry::ClassNestedClasses
+ else if (kind==LayoutDocEntry::NamespaceClasses ||
+ kind==LayoutDocEntry::FileClasses ||
+ kind==LayoutDocEntry::ClassNestedClasses
)
{
for (const auto &cd : def->getClasses())
@@ -394,12 +406,26 @@ void addMembersToIndex(T *def,LayoutDocManager::LayoutPart part,
{
static bool inlineSimpleStructs = Config_getBool(INLINE_SIMPLE_STRUCTS);
bool isNestedClass = def->definitionType()==Definition::TypeClass;
- addMembersToIndex(cd,LayoutDocManager::Class,cd->displayName(FALSE),cd->anchor(),
+ addMembersToIndex(cd,LayoutDocManager::Class,cd->displayName(lde->kind()==LayoutDocEntry::FileClasses),cd->anchor(),
addToIndex && (isNestedClass || (cd->isSimple() && inlineSimpleStructs)),
preventSeparateIndex || cd->isEmbeddedInOuterScope());
}
}
}
+ else if (kind==LayoutDocEntry::FileConcepts && concepts)
+ {
+ for (const auto &cd : *concepts)
+ {
+ if (cd->isLinkable() && (cd->partOfGroups().empty() || def->definitionType()==Definition::TypeGroup))
+ {
+ Doxygen::indexList->addContentsItem(false,cd->displayName(),
+ cd->getReference(),cd->getOutputFileBase(),QCString(),
+ addToIndex,
+ false,
+ cd);
+ }
+ }
+ }
}
Doxygen::indexList->decContentsDepth();
@@ -451,10 +477,10 @@ static void writeClassTreeToOutput(OutputList &ol,const BaseClassList &bcl,int l
//printf("Passed...\n");
bool hasChildren = visitedClasses.find(cd)==visitedClasses.end() &&
classHasVisibleChildren(cd);
- //printf("tree4: Has children %s: %d\n",cd->name().data(),hasChildren);
+ //printf("tree4: Has children %s: %d\n",qPrint(cd->name()),hasChildren);
if (cd->isLinkable())
{
- //printf("Writing class %s\n",cd->displayName().data());
+ //printf("Writing class %s\n",qPrint(cd->displayName()));
ol.startIndexItem(cd->getReference(),cd->getOutputFileBase());
ol.parseText(cd->displayName());
ol.endIndexItem(cd->getReference(),cd->getOutputFileBase());
@@ -482,21 +508,21 @@ static void writeClassTreeToOutput(OutputList &ol,const BaseClassList &bcl,int l
}
else
{
- ol.startIndexItem(0,0);
+ ol.startIndexItem(QCString(),QCString());
ol.parseText(cd->name());
- ol.endIndexItem(0,0);
+ ol.endIndexItem(QCString(),QCString());
if (addToIndex)
{
- Doxygen::indexList->addContentsItem(hasChildren,cd->displayName(),0,0,0);
+ Doxygen::indexList->addContentsItem(hasChildren,cd->displayName(),QCString(),QCString(),QCString());
}
if (ftv)
{
- ftv->addContentsItem(hasChildren,cd->displayName(),0,0,0,FALSE,FALSE,cd);
+ ftv->addContentsItem(hasChildren,cd->displayName(),QCString(),QCString(),QCString(),FALSE,FALSE,cd);
}
}
if (hasChildren)
{
- //printf("Class %s at %p visited=%d\n",cd->name().data(),cd,cd->visited);
+ //printf("Class %s at %p visited=%d\n",qPrint(cd->name()),cd,cd->visited);
visitedClasses.insert(cd);
if (cd->getLanguage()==SrcLangExt_VHDL)
{
@@ -560,7 +586,7 @@ static void writeDirTreeNode(OutputList &ol, const DirDef *dd, int level, FTVHel
{
warn(dd->getDefFileName(),dd->getDefLine(),
"maximum nesting level exceeded for directory %s: "
- "check for possible recursive directory relation!\n",dd->name().data()
+ "check for possible recursive directory relation!\n",qPrint(dd->name())
);
return;
}
@@ -575,16 +601,16 @@ static void writeDirTreeNode(OutputList &ol, const DirDef *dd, int level, FTVHel
(tocExpand && // or toc expand and
!dd->getFiles().empty() // there are files
);
- //printf("gd='%s': pageDict=%d\n",gd->name().data(),gd->pageDict->count());
+ //printf("gd='%s': pageDict=%d\n",qPrint(gd->name()),gd->pageDict->count());
if (addToIndex)
{
- Doxygen::indexList->addContentsItem(isDir,dd->shortName(),dd->getReference(),dd->getOutputFileBase(),0,TRUE,TRUE);
+ Doxygen::indexList->addContentsItem(isDir,dd->shortName(),dd->getReference(),dd->getOutputFileBase(),QCString(),TRUE,TRUE);
Doxygen::indexList->incContentsDepth();
}
if (ftv)
{
ftv->addContentsItem(isDir,dd->shortName(),dd->getReference(),
- dd->getOutputFileBase(),0,FALSE,TRUE,dd);
+ dd->getOutputFileBase(),QCString(),FALSE,TRUE,dd);
ftv->incContentsDepth();
}
@@ -656,7 +682,7 @@ static void writeDirTreeNode(OutputList &ol, const DirDef *dd, int level, FTVHel
ftv->addContentsItem(FALSE,
fd->displayName(),
reference,outputBase,
- 0,FALSE,FALSE,fd);
+ QCString(),FALSE,FALSE,fd);
}
}
}
@@ -677,13 +703,14 @@ static void writeDirTreeNode(OutputList &ol, const DirDef *dd, int level, FTVHel
doc = fileVisibleInIndex(fd,src);
if (doc)
{
- addMembersToIndex(fd,LayoutDocManager::File,fd->displayName(),QCString(),TRUE);
+ addMembersToIndex(fd,LayoutDocManager::File,fd->displayName(),QCString(),
+ TRUE,FALSE,&fd->getConcepts());
}
else if (src)
{
Doxygen::indexList->addContentsItem(
- FALSE, fd->name(), 0,
- fd->getSourceFileBase(), 0, FALSE, TRUE, fd);
+ FALSE, fd->name(), QCString(),
+ fd->getSourceFileBase(), QCString(), FALSE, TRUE, fd);
}
}
}
@@ -738,20 +765,20 @@ static void writeDirHierarchy(OutputList &ol, FTVHelp* ftv,bool addToIndex)
if (doc || src)
{
ftv->addContentsItem(FALSE,fd->displayName(),
- reference, outputBase, 0,
+ reference, outputBase, QCString(),
FALSE,FALSE,fd.get());
}
if (addToIndex)
{
if (doc)
{
- addMembersToIndex(fd.get(),LayoutDocManager::File,fd->displayName(),QCString(),TRUE);
+ addMembersToIndex(fd.get(),LayoutDocManager::File,fd->displayName(),QCString(),TRUE,FALSE,&fd->getConcepts());
}
else if (src)
{
Doxygen::indexList->addContentsItem(
- FALSE, fd->name(), 0,
- fd->getSourceFileBase(), 0, FALSE, TRUE, fd.get());
+ FALSE, fd->name(), QCString(),
+ fd->getSourceFileBase(), QCString(), FALSE, TRUE, fd.get());
}
}
}
@@ -775,7 +802,7 @@ static void writeClassTreeForList(OutputList &ol,const ClassLinkedMap &cl,bool &
for (const auto &cd : cl)
{
//printf("class %s hasVisibleRoot=%d isVisibleInHierarchy=%d\n",
- // cd->name().data(),
+ // qPrint(cd->name()),
// hasVisibleRoot(cd->baseClasses()),
// cd->isVisibleInHierarchy()
// );
@@ -813,11 +840,11 @@ static void writeClassTreeForList(OutputList &ol,const ClassLinkedMap &cl,bool &
ol.startIndexListItem();
bool hasChildren = visitedClasses.find(cd.get())==visitedClasses.end() &&
classHasVisibleChildren(cd.get());
- //printf("list: Has children %s: %d\n",cd->name().data(),hasChildren);
+ //printf("list: Has children %s: %d\n",qPrint(cd->name()),hasChildren);
if (cd->isLinkable())
{
//printf("Writing class %s isLinkable()=%d isLinkableInProject()=%d cd->templateMaster()=%p\n",
- // cd->displayName().data(),cd->isLinkable(),cd->isLinkableInProject(),cd->templateMaster());
+ // qPrint(cd->displayName()),cd->isLinkable(),cd->isLinkableInProject(),cd->templateMaster());
ol.startIndexItem(cd->getReference(),cd->getOutputFileBase());
ol.parseText(cd->displayName());
ol.endIndexItem(cd->getReference(),cd->getOutputFileBase());
@@ -839,16 +866,16 @@ static void writeClassTreeForList(OutputList &ol,const ClassLinkedMap &cl,bool &
}
else
{
- ol.startIndexItem(0,0);
+ ol.startIndexItem(QCString(),QCString());
ol.parseText(cd->displayName());
- ol.endIndexItem(0,0);
+ ol.endIndexItem(QCString(),QCString());
if (addToIndex)
{
- Doxygen::indexList->addContentsItem(hasChildren,cd->displayName(),0,0,0,FALSE,FALSE);
+ Doxygen::indexList->addContentsItem(hasChildren,cd->displayName(),QCString(),QCString(),QCString(),FALSE,FALSE);
}
if (ftv)
{
- ftv->addContentsItem(hasChildren,cd->displayName(),0,0,0,FALSE,FALSE,cd.get());
+ ftv->addContentsItem(hasChildren,cd->displayName(),QCString(),QCString(),QCString(),FALSE,FALSE,cd.get());
}
}
if (cd->getLanguage()==SrcLangExt_VHDL && hasChildren)
@@ -940,10 +967,10 @@ static void writeHierarchicalIndex(OutputList &ol)
QCString title = lne ? lne->title() : theTranslator->trClassHierarchy();
bool addToIndex = lne==0 || lne->visible();
- startFile(ol,"hierarchy",0, title, HLI_ClassHierarchy);
- startTitle(ol,0);
+ startFile(ol,"hierarchy",QCString(), title, HLI_ClassHierarchy);
+ startTitle(ol,QCString());
ol.parseText(title);
- endTitle(ol,0,0);
+ endTitle(ol,QCString(),QCString());
ol.startContents();
ol.startTextBlock();
@@ -954,7 +981,7 @@ static void writeHierarchicalIndex(OutputList &ol)
ol.disable(OutputGenerator::RTF);
ol.disable(OutputGenerator::Docbook);
ol.startParagraph();
- ol.startTextLink("inherits",0);
+ ol.startTextLink("inherits",QCString());
ol.parseText(theTranslator->trGotoGraphicalHierarchy());
ol.endTextLink();
ol.endParagraph();
@@ -987,16 +1014,15 @@ static void writeHierarchicalIndex(OutputList &ol)
{
if (addToIndex)
{
- Doxygen::indexList->addContentsItem(TRUE,title,0,"hierarchy",0,TRUE,TRUE);
+ Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"hierarchy",QCString(),TRUE,TRUE);
}
FTVHelp* ftv = new FTVHelp(FALSE);
writeClassHierarchy(ol,ftv,addToIndex,ClassDef::Class);
- QGString outStr;
- FTextStream t(&outStr);
+ TextStream t;
ftv->generateTreeViewInline(t);
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
- ol.writeString(outStr);
+ ol.writeString(t.str().c_str());
ol.popGeneratorState();
delete ftv;
}
@@ -1017,14 +1043,14 @@ static void writeGraphicalClassHierarchy(OutputList &ol)
ol.disableAllBut(OutputGenerator::Html);
LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassHierarchy);
QCString title = lne ? lne->title() : theTranslator->trClassHierarchy();
- startFile(ol,"inherits",0,title,HLI_ClassHierarchy,FALSE,"hierarchy");
- startTitle(ol,0);
+ startFile(ol,"inherits",QCString(),title,HLI_ClassHierarchy,FALSE,"hierarchy");
+ startTitle(ol,QCString());
ol.parseText(title);
- endTitle(ol,0,0);
+ endTitle(ol,QCString(),QCString());
ol.startContents();
ol.startTextBlock();
ol.startParagraph();
- ol.startTextLink("hierarchy",0);
+ ol.startTextLink("hierarchy",QCString());
ol.parseText(theTranslator->trGotoTextualHierarchy());
ol.endTextLink();
ol.endParagraph();
@@ -1048,10 +1074,10 @@ static void writeHierarchicalInterfaceIndex(OutputList &ol)
QCString title = lne ? lne->title() : theTranslator->trInterfaceHierarchy();
bool addToIndex = lne==0 || lne->visible();
- startFile(ol,"interfacehierarchy",0, title, HLI_InterfaceHierarchy);
- startTitle(ol,0);
+ startFile(ol,"interfacehierarchy",QCString(), title, HLI_InterfaceHierarchy);
+ startTitle(ol,QCString());
ol.parseText(title);
- endTitle(ol,0,0);
+ endTitle(ol,QCString(),QCString());
ol.startContents();
ol.startTextBlock();
@@ -1060,7 +1086,7 @@ static void writeHierarchicalInterfaceIndex(OutputList &ol)
ol.disable(OutputGenerator::Latex);
ol.disable(OutputGenerator::RTF);
ol.startParagraph();
- ol.startTextLink("interfaceinherits",0);
+ ol.startTextLink("interfaceinherits",QCString());
ol.parseText(theTranslator->trGotoGraphicalHierarchy());
ol.endTextLink();
ol.endParagraph();
@@ -1094,16 +1120,15 @@ static void writeHierarchicalInterfaceIndex(OutputList &ol)
{
if (addToIndex)
{
- Doxygen::indexList->addContentsItem(TRUE,title,0,"interfacehierarchy",0,TRUE,TRUE);
+ Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"interfacehierarchy",QCString(),TRUE,TRUE);
}
FTVHelp* ftv = new FTVHelp(FALSE);
writeClassHierarchy(ol,ftv,addToIndex,ClassDef::Interface);
- QGString outStr;
- FTextStream t(&outStr);
+ TextStream t;
ftv->generateTreeViewInline(t);
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
- ol.writeString(outStr);
+ ol.writeString(t.str().c_str());
ol.popGeneratorState();
delete ftv;
}
@@ -1124,14 +1149,14 @@ static void writeGraphicalInterfaceHierarchy(OutputList &ol)
ol.disableAllBut(OutputGenerator::Html);
LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::InterfaceHierarchy);
QCString title = lne ? lne->title() : theTranslator->trInterfaceHierarchy();
- startFile(ol,"interfaceinherits",0,title,HLI_InterfaceHierarchy,FALSE,"interfacehierarchy");
- startTitle(ol,0);
+ startFile(ol,"interfaceinherits",QCString(),title,HLI_InterfaceHierarchy,FALSE,"interfacehierarchy");
+ startTitle(ol,QCString());
ol.parseText(title);
- endTitle(ol,0,0);
+ endTitle(ol,QCString(),QCString());
ol.startContents();
ol.startTextBlock();
ol.startParagraph();
- ol.startTextLink("interfacehierarchy",0);
+ ol.startTextLink("interfacehierarchy",QCString());
ol.parseText(theTranslator->trGotoTextualHierarchy());
ol.endTextLink();
ol.endParagraph();
@@ -1155,10 +1180,10 @@ static void writeHierarchicalExceptionIndex(OutputList &ol)
QCString title = lne ? lne->title() : theTranslator->trExceptionHierarchy();
bool addToIndex = lne==0 || lne->visible();
- startFile(ol,"exceptionhierarchy",0, title, HLI_ExceptionHierarchy);
- startTitle(ol,0);
+ startFile(ol,"exceptionhierarchy",QCString(), title, HLI_ExceptionHierarchy);
+ startTitle(ol,QCString());
ol.parseText(title);
- endTitle(ol,0,0);
+ endTitle(ol,QCString(),QCString());
ol.startContents();
ol.startTextBlock();
@@ -1167,7 +1192,7 @@ static void writeHierarchicalExceptionIndex(OutputList &ol)
ol.disable(OutputGenerator::Latex);
ol.disable(OutputGenerator::RTF);
ol.startParagraph();
- ol.startTextLink("exceptioninherits",0);
+ ol.startTextLink("exceptioninherits",QCString());
ol.parseText(theTranslator->trGotoGraphicalHierarchy());
ol.endTextLink();
ol.endParagraph();
@@ -1201,16 +1226,15 @@ static void writeHierarchicalExceptionIndex(OutputList &ol)
{
if (addToIndex)
{
- Doxygen::indexList->addContentsItem(TRUE,title,0,"exceptionhierarchy",0,TRUE,TRUE);
+ Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"exceptionhierarchy",QCString(),TRUE,TRUE);
}
FTVHelp* ftv = new FTVHelp(FALSE);
writeClassHierarchy(ol,ftv,addToIndex,ClassDef::Exception);
- QGString outStr;
- FTextStream t(&outStr);
+ TextStream t;
ftv->generateTreeViewInline(t);
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
- ol.writeString(outStr);
+ ol.writeString(t.str().c_str());
ol.popGeneratorState();
delete ftv;
}
@@ -1231,14 +1255,14 @@ static void writeGraphicalExceptionHierarchy(OutputList &ol)
ol.disableAllBut(OutputGenerator::Html);
LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ExceptionHierarchy);
QCString title = lne ? lne->title() : theTranslator->trExceptionHierarchy();
- startFile(ol,"exceptioninherits",0,title,HLI_ExceptionHierarchy,FALSE,"exceptionhierarchy");
- startTitle(ol,0);
+ startFile(ol,"exceptioninherits",QCString(),title,HLI_ExceptionHierarchy,FALSE,"exceptionhierarchy");
+ startTitle(ol,QCString());
ol.parseText(title);
- endTitle(ol,0,0);
+ endTitle(ol,QCString(),QCString());
ol.startContents();
ol.startTextBlock();
ol.startParagraph();
- ol.startTextLink("exceptionhierarchy",0);
+ ol.startTextLink("exceptionhierarchy",QCString());
ol.parseText(theTranslator->trGotoTextualHierarchy());
ol.endTextLink();
ol.endParagraph();
@@ -1275,7 +1299,7 @@ static void countFiles(int &htmlFiles,int &files)
static void writeSingleFileIndex(OutputList &ol,const FileDef *fd)
{
- //printf("Found filedef %s\n",fd->name().data());
+ //printf("Found filedef %s\n",qPrint(fd->name()));
bool doc = fd->isLinkableInProject();
bool src = fd->generateSourceFile();
bool nameOk = !fd->isDocumentationFile();
@@ -1284,7 +1308,7 @@ static void writeSingleFileIndex(OutputList &ol,const FileDef *fd)
QCString path;
if (Config_getBool(FULL_PATH_NAMES))
{
- path=stripFromPath(fd->getPath().copy());
+ path=stripFromPath(fd->getPath());
}
QCString fullName=fd->name();
if (!path.isEmpty())
@@ -1297,7 +1321,7 @@ static void writeSingleFileIndex(OutputList &ol,const FileDef *fd)
ol.docify(path);
if (doc)
{
- ol.writeObjectLink(0,fd->getOutputFileBase(),0,fd->name());
+ ol.writeObjectLink(QCString(),fd->getOutputFileBase(),QCString(),fd->name());
//if (addToIndex)
//{
// addMembersToIndex(fd,LayoutDocManager::File,fullName,QCString());
@@ -1310,7 +1334,7 @@ static void writeSingleFileIndex(OutputList &ol,const FileDef *fd)
ol.endBold();
//if (addToIndex)
//{
- // Doxygen::indexList->addContentsItem(FALSE,fullName,0,0,0);
+ // Doxygen::indexList->addContentsItem(FALSE,fullName,QCString(),QCString(),QCString());
//}
}
if (src)
@@ -1318,7 +1342,7 @@ static void writeSingleFileIndex(OutputList &ol,const FileDef *fd)
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
ol.docify(" ");
- ol.startTextLink(fd->includeName(),0);
+ ol.startTextLink(fd->includeName(),QCString());
ol.docify("[");
ol.parseText(theTranslator->trCode());
ol.docify("]");
@@ -1337,7 +1361,7 @@ static void writeSingleFileIndex(OutputList &ol,const FileDef *fd)
fd->briefDescription(TRUE),
FALSE, // index words
FALSE, // isExample
- 0, // example name
+ QCString(), // example name
TRUE, // single line
TRUE, // link from index
Config_getBool(MARKDOWN_SUPPORT)
@@ -1366,20 +1390,20 @@ static void writeFileIndex(OutputList &ol)
QCString title = lne ? lne->title() : theTranslator->trFileList();
bool addToIndex = lne==0 || lne->visible();
- startFile(ol,"files",0,title,HLI_Files);
- startTitle(ol,0);
+ startFile(ol,"files",QCString(),title,HLI_Files);
+ startTitle(ol,QCString());
//if (!Config_getString(PROJECT_NAME).isEmpty())
//{
// title.prepend(Config_getString(PROJECT_NAME)+" ");
//}
ol.parseText(title);
- endTitle(ol,0,0);
+ endTitle(ol,QCString(),QCString());
ol.startContents();
ol.startTextBlock();
if (addToIndex)
{
- Doxygen::indexList->addContentsItem(TRUE,title,0,"files",0,TRUE,TRUE);
+ Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"files",QCString(),TRUE,TRUE);
Doxygen::indexList->incContentsDepth();
}
@@ -1462,10 +1486,9 @@ static void writeFileIndex(OutputList &ol)
FTVHelp* ftv = new FTVHelp(FALSE);
writeDirHierarchy(ol,ftv,addToIndex);
- QGString outStr;
- FTextStream t(&outStr);
+ TextStream t;
ftv->generateTreeViewInline(t);
- ol.writeString(outStr);
+ ol.writeString(t.str().c_str());
delete ftv;
ol.popGeneratorState();
@@ -1492,6 +1515,18 @@ static int countNamespaces()
}
//----------------------------------------------------------------------------
+static int countConcepts()
+{
+ int count=0;
+ for (const auto &cd : *Doxygen::conceptLinkedMap)
+ {
+ if (cd->isLinkableInProject()) count++;
+ }
+ return count;
+}
+
+
+//----------------------------------------------------------------------------
template<typename Ptr> const ClassDef *get_pointer(const Ptr &p);
template<> const ClassDef *get_pointer(const ClassLinkedMap::Ptr &p) { return p.get(); }
template<> const ClassDef *get_pointer(const ClassLinkedRefMap::Ptr &p) { return p; }
@@ -1515,7 +1550,7 @@ static void writeClassTree(const ListType &cl,FTVHelp *ftv,bool addToIndex,bool
if ((VhdlDocGen::VhdlClasses)cd->protection()==VhdlDocGen::ARCHITECTURECLASS)
{
QCString n=cd->name();
- cdm->setClassName(n.data());
+ cdm->setClassName(n);
}
}
@@ -1541,7 +1576,8 @@ static void writeClassTree(const ListType &cl,FTVHelp *ftv,bool addToIndex,bool
{
ftv->addContentsItem(count>0,cd->displayName(FALSE),cd->getReference(),
cd->getOutputFileBase(),cd->anchor(),FALSE,TRUE,cd);
- if ((cd->getOuterScope()==0 ||
+ if (addToIndex &&
+ (cd->getOuterScope()==0 ||
cd->getOuterScope()->definitionType()!=Definition::TypeClass
)
)
@@ -1549,7 +1585,7 @@ static void writeClassTree(const ListType &cl,FTVHelp *ftv,bool addToIndex,bool
addMembersToIndex(cd,LayoutDocManager::Class,
cd->displayName(FALSE),
cd->anchor(),
- addToIndex && cd->partOfGroups().empty() && !cd->isSimple());
+ cd->partOfGroups().empty() && !cd->isSimple());
}
if (count>0)
{
@@ -1598,7 +1634,7 @@ static void writeNamespaceMembers(const NamespaceDef *nd,bool addToIndex)
{
for (const auto &md : *ml)
{
- //printf(" member %s visible=%d\n",md->name().data(),memberVisibleInIndex(md));
+ //printf(" member %s visible=%d\n",qPrint(md->name()),memberVisibleInIndex(md));
if (memberVisibleInIndex(md))
{
writeMemberToIndex(nd,md,addToIndex);
@@ -1609,6 +1645,7 @@ static void writeNamespaceMembers(const NamespaceDef *nd,bool addToIndex)
}
}
+static void writeConceptList(const ConceptLinkedRefMap &concepts, FTVHelp *ftv,bool addToIndex);
static void writeNamespaceTree(const NamespaceLinkedRefMap &nsLinkedMap,FTVHelp *ftv,
bool rootOnly,bool addToIndex);
@@ -1620,11 +1657,12 @@ static void writeNamespaceTreeElement(const NamespaceDef *nd,FTVHelp *ftv,
{
bool hasChildren = namespaceHasNestedNamespace(nd) ||
- namespaceHasNestedClass(nd,false,ClassDef::Class);
+ namespaceHasNestedClass(nd,false,ClassDef::Class) ||
+ namespaceHasNestedConcept(nd);
bool isLinkable = nd->isLinkableInProject();
int visibleMembers = countVisibleMembers(nd);
- //printf("namespace %s hasChildren=%d visibleMembers=%d\n",nd->name().data(),hasChildren,visibleMembers);
+ //printf("namespace %s hasChildren=%d visibleMembers=%d\n",qPrint(nd->name()),hasChildren,visibleMembers);
QCString ref;
QCString file;
@@ -1641,25 +1679,24 @@ static void writeNamespaceTreeElement(const NamespaceDef *nd,FTVHelp *ftv,
bool isDir = hasChildren || visibleMembers>0;
if ((isLinkable) || isDir)
{
- ftv->addContentsItem(hasChildren,nd->localName(),ref,file,0,FALSE,TRUE,nd);
+ ftv->addContentsItem(hasChildren,nd->localName(),ref,file,QCString(),FALSE,nd->partOfGroups().empty(),nd);
if (addToIndex)
{
Doxygen::indexList->addContentsItem(isDir,nd->localName(),ref,file,QCString(),
- hasChildren && !file.isEmpty(),addToIndex);
+ hasChildren && !file.isEmpty(),nd->partOfGroups().empty());
}
if (addToIndex && isDir)
{
Doxygen::indexList->incContentsDepth();
}
- //printf("*** writeNamespaceTree count=%d addToIndex=%d false=%d classCount=%d\n",
- // count,addToIndex,false,classCount);
if (isDir)
{
ftv->incContentsDepth();
writeNamespaceTree(nd->getNamespaces(),ftv,FALSE,addToIndex);
- writeClassTree(nd->getClasses(),ftv,FALSE,FALSE,ClassDef::Class);
+ writeClassTree(nd->getClasses(),ftv,addToIndex,FALSE,ClassDef::Class);
+ writeConceptList(nd->getConcepts(),ftv,addToIndex);
writeNamespaceMembers(nd,addToIndex);
ftv->decContentsDepth();
}
@@ -1702,7 +1739,7 @@ static void writeClassTreeInsideNamespaceElement(const NamespaceDef *nd,FTVHelp
bool isDir = namespaceHasNestedClass(nd,sliceOpt,ct);
bool isLinkable = nd->isLinkableInProject();
- //printf("namespace %s isDir=%d\n",nd->name().data(),isDir);
+ //printf("namespace %s isDir=%d\n",qPrint(nd->name()),isDir);
QCString ref;
QCString file;
@@ -1718,7 +1755,7 @@ static void writeClassTreeInsideNamespaceElement(const NamespaceDef *nd,FTVHelp
if (isDir)
{
- ftv->addContentsItem(isDir,nd->localName(),ref,file,0,FALSE,TRUE,nd);
+ ftv->addContentsItem(isDir,nd->localName(),ref,file,QCString(),FALSE,TRUE,nd);
if (addToIndex)
{
@@ -1792,10 +1829,10 @@ static void writeNamespaceIndex(OutputList &ol)
if (lne==0) lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Namespaces); // fall back
QCString title = lne ? lne->title() : theTranslator->trNamespaceList();
bool addToIndex = lne==0 || lne->visible();
- startFile(ol,"namespaces",0,title,HLI_Namespaces);
- startTitle(ol,0);
+ startFile(ol,"namespaces",QCString(),title,HLI_Namespaces);
+ startTitle(ol,QCString());
ol.parseText(title);
- endTitle(ol,0,0);
+ endTitle(ol,QCString(),QCString());
ol.startContents();
ol.startTextBlock();
ol.parseText(lne ? lne->intro() : theTranslator->trNamespaceListDescription(Config_getBool(EXTRACT_ALL)));
@@ -1822,11 +1859,11 @@ static void writeNamespaceIndex(OutputList &ol)
ol.startIndexKey();
if (nd->getLanguage()==SrcLangExt_VHDL)
{
- ol.writeObjectLink(0, nd->getOutputFileBase().replace(0,qstrlen("namespace"),"class"),0,nd->displayName());
+ ol.writeObjectLink(QCString(), nd->getOutputFileBase().replace(0,qstrlen("namespace"),"class"),QCString(),nd->displayName());
}
else
{
- ol.writeObjectLink(0,nd->getOutputFileBase(),0,nd->displayName());
+ ol.writeObjectLink(QCString(),nd->getOutputFileBase(),QCString(),nd->displayName());
}
ol.endIndexKey();
@@ -1841,7 +1878,7 @@ static void writeNamespaceIndex(OutputList &ol)
nd->briefDescription(TRUE),
FALSE, // index words
FALSE, // isExample
- 0, // example name
+ QCString(), // example name
TRUE, // single line
TRUE, // link from index
Config_getBool(MARKDOWN_SUPPORT)
@@ -1865,15 +1902,14 @@ static void writeNamespaceIndex(OutputList &ol)
{
if (addToIndex)
{
- Doxygen::indexList->addContentsItem(TRUE,title,0,"namespaces",0,TRUE,TRUE);
+ Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"namespaces",QCString(),TRUE,TRUE);
Doxygen::indexList->incContentsDepth();
}
FTVHelp* ftv = new FTVHelp(FALSE);
writeNamespaceTree(*Doxygen::namespaceLinkedMap,ftv,TRUE,addToIndex);
- QGString outStr;
- FTextStream t(&outStr);
+ TextStream t;
ftv->generateTreeViewInline(t);
- ol.writeString(outStr);
+ ol.writeString(t.str().c_str());
delete ftv;
if (addToIndex)
{
@@ -1956,10 +1992,10 @@ static void writeAnnotatedClassList(OutputList &ol,ClassDef::CompoundType ct)
if (cd->getLanguage()==SrcLangExt_VHDL)
{
QCString prot= VhdlDocGen::getProtectionName((VhdlDocGen::VhdlClasses)cd->protection());
- ol.docify(prot.data());
+ ol.docify(prot);
ol.writeString(" ");
}
- ol.writeObjectLink(0,cd->getOutputFileBase(),cd->anchor(),cd->displayName());
+ ol.writeObjectLink(QCString(),cd->getOutputFileBase(),cd->anchor(),cd->displayName());
ol.endIndexKey();
bool hasBrief = !cd->briefDescription().isEmpty();
ol.startIndexValue(hasBrief);
@@ -1971,7 +2007,7 @@ static void writeAnnotatedClassList(OutputList &ol,ClassDef::CompoundType ct)
cd->briefDescription(TRUE),
FALSE, // indexWords
FALSE, // isExample
- 0, // example name
+ QCString(), // example name
TRUE, // single line
TRUE, // link from index
Config_getBool(MARKDOWN_SUPPORT)
@@ -1994,10 +2030,10 @@ inline bool isId1(int c)
return (c<127 && c>31); // printable ASCII character
}
-static QCString letterToLabel(const char *startLetter)
+static QCString letterToLabel(const QCString &startLetter)
{
- const char *p = startLetter;
- if (startLetter==0 || *startLetter==0) return "";
+ if (startLetter.isEmpty()) return startLetter;
+ const char *p = startLetter.data();
char c = *p;
QCString result;
if (isId1(c))
@@ -2060,13 +2096,12 @@ static void writeAlphabeticalClassList(OutputList &ol, ClassDef::CompoundType ct
if (cd->getLanguage()==SrcLangExt_VHDL && !((VhdlDocGen::VhdlClasses)cd->protection()==VhdlDocGen::ENTITYCLASS ))// no architecture
continue;
+ // get the first UTF8 character (after the part that should be ignored)
int index = getPrefixIndex(cd->className());
- //printf("name=%s index=%d %d\n",cd->className().data(),index,cd->protection());
- char charStr[MAX_UTF8_CHAR_SIZE];
- if (getUtf8Char(cd->className().data()+index,charStr,CaseModifier::ToUpper)>0)
- // get the first UTF8 character (after the part that should be ignored)
+ std::string letter = getUTF8CharAt(cd->className().str(),index);
+ if (!letter.empty())
{
- indexLettersUsed.insert(charStr);
+ indexLettersUsed.insert(convertUTF8ToUpper(letter));
}
}
}
@@ -2079,9 +2114,9 @@ static void writeAlphabeticalClassList(OutputList &ol, ClassDef::CompoundType ct
if (!first) alphaLinks += "&#160;|&#160;";
first=false;
QCString li = letterToLabel(letter.c_str());
- alphaLinks += (QCString)"<a class=\"qindex\" href=\"#letter_" +
+ alphaLinks += "<a class=\"qindex\" href=\"#letter_" +
li + "\">" +
- letter + "</a>";
+ QCString(letter) + "</a>";
}
alphaLinks += "</div>\n";
ol.writeString(alphaLinks);
@@ -2100,12 +2135,13 @@ static void writeAlphabeticalClassList(OutputList &ol, ClassDef::CompoundType ct
if (cd->isLinkableInProject() && cd->templateMaster()==0)
{
- int index = getPrefixIndex(cd->className());
- char charStr[MAX_UTF8_CHAR_SIZE];
- if (getUtf8Char(cd->className().data()+index,charStr,CaseModifier::ToUpper)>0)
- // get the first UTF8 character (after the part that should be ignored)
+ QCString className = cd->className();
+ int index = getPrefixIndex(className);
+ std::string letter = getUTF8CharAt(className.str(),index);
+ if (!letter.empty())
{
- auto it = classesByLetter.find(charStr);
+ letter = convertUTF8ToUpper(letter);
+ auto it = classesByLetter.find(letter);
if (it!=classesByLetter.end()) // add class to the existing list
{
it->second.push_back(cd.get());
@@ -2113,8 +2149,7 @@ static void writeAlphabeticalClassList(OutputList &ol, ClassDef::CompoundType ct
else // new entry
{
classesByLetter.insert(
- std::make_pair(std::string(charStr),
- std::vector<const ClassDef*>({ cd.get() })));
+ std::make_pair(letter, std::vector<const ClassDef*>({ cd.get() })));
}
}
}
@@ -2180,7 +2215,7 @@ static void writeAlphabeticalClassList(OutputList &ol, ClassDef::CompoundType ct
if (nd && nd->isLinkable())
{
ol.writeObjectLink(nd->getReference(),
- nd->getOutputFileBase(),0,nsDispName);
+ nd->getOutputFileBase(),QCString(),nsDispName);
}
else
{
@@ -2208,15 +2243,15 @@ static void writeAlphabeticalIndex(OutputList &ol)
QCString title = lne ? lne->title() : theTranslator->trCompoundIndex();
bool addToIndex = lne==0 || lne->visible();
- startFile(ol,"classes",0,title,HLI_Classes);
+ startFile(ol,"classes",QCString(),title,HLI_Classes);
- startTitle(ol,0);
+ startTitle(ol,QCString());
ol.parseText(title);
- endTitle(ol,0,0);
+ endTitle(ol,QCString(),QCString());
if (addToIndex)
{
- Doxygen::indexList->addContentsItem(FALSE,title,0,"classes",0,FALSE,TRUE);
+ Doxygen::indexList->addContentsItem(FALSE,title,QCString(),"classes",QCString(),FALSE,TRUE);
}
ol.startContents();
@@ -2237,15 +2272,15 @@ static void writeAlphabeticalInterfaceIndex(OutputList &ol)
QCString title = lne ? lne->title() : theTranslator->trInterfaceIndex();
bool addToIndex = lne==0 || lne->visible();
- startFile(ol,"interfaces",0,title,HLI_Interfaces);
+ startFile(ol,"interfaces",QCString(),title,HLI_Interfaces);
- startTitle(ol,0);
+ startTitle(ol,QCString());
ol.parseText(title);
- endTitle(ol,0,0);
+ endTitle(ol,QCString(),QCString());
if (addToIndex)
{
- Doxygen::indexList->addContentsItem(FALSE,title,0,"interfaces",0,FALSE,TRUE);
+ Doxygen::indexList->addContentsItem(FALSE,title,QCString(),"interfaces",QCString(),FALSE,TRUE);
}
ol.startContents();
@@ -2266,15 +2301,15 @@ static void writeAlphabeticalStructIndex(OutputList &ol)
QCString title = lne ? lne->title() : theTranslator->trStructIndex();
bool addToIndex = lne==0 || lne->visible();
- startFile(ol,"structs",0,title,HLI_Structs);
+ startFile(ol,"structs",QCString(),title,HLI_Structs);
- startTitle(ol,0);
+ startTitle(ol,QCString());
ol.parseText(title);
- endTitle(ol,0,0);
+ endTitle(ol,QCString(),QCString());
if (addToIndex)
{
- Doxygen::indexList->addContentsItem(FALSE,title,0,"structs",0,FALSE,TRUE);
+ Doxygen::indexList->addContentsItem(FALSE,title,QCString(),"structs",QCString(),FALSE,TRUE);
}
ol.startContents();
@@ -2295,15 +2330,15 @@ static void writeAlphabeticalExceptionIndex(OutputList &ol)
QCString title = lne ? lne->title() : theTranslator->trExceptionIndex();
bool addToIndex = lne==0 || lne->visible();
- startFile(ol,"exceptions",0,title,HLI_Exceptions);
+ startFile(ol,"exceptions",QCString(),title,HLI_Exceptions);
- startTitle(ol,0);
+ startTitle(ol,QCString());
ol.parseText(title);
- endTitle(ol,0,0);
+ endTitle(ol,QCString(),QCString());
if (addToIndex)
{
- Doxygen::indexList->addContentsItem(FALSE,title,0,"exceptions",0,FALSE,TRUE);
+ Doxygen::indexList->addContentsItem(FALSE,title,QCString(),"exceptions",QCString(),FALSE,TRUE);
}
ol.startContents();
@@ -2358,11 +2393,11 @@ static void writeAnnotatedIndexGeneric(OutputList &ol,const AnnotatedIndexContex
QCString title = lne ? lne->title() : ctx.listDefaultTitleText;
bool addToIndex = lne==0 || lne->visible();
- startFile(ol,ctx.fileBaseName,0,title,ctx.hiItem);
+ startFile(ol,ctx.fileBaseName,QCString(),title,ctx.hiItem);
- startTitle(ol,0);
+ startTitle(ol,QCString());
ol.parseText(title);
- endTitle(ol,0,0);
+ endTitle(ol,QCString(),QCString());
ol.startContents();
@@ -2391,16 +2426,15 @@ static void writeAnnotatedIndexGeneric(OutputList &ol,const AnnotatedIndexContex
{
if (addToIndex)
{
- Doxygen::indexList->addContentsItem(TRUE,title,0,ctx.fileBaseName,0,TRUE,TRUE);
+ Doxygen::indexList->addContentsItem(TRUE,title,QCString(),ctx.fileBaseName,QCString(),TRUE,TRUE);
Doxygen::indexList->incContentsDepth();
}
FTVHelp ftv(false);
writeClassTreeInsideNamespace(*Doxygen::namespaceLinkedMap,&ftv,TRUE,addToIndex,ctx.compoundType);
writeClassTree(*Doxygen::classLinkedMap,&ftv,addToIndex,TRUE,ctx.compoundType);
- QGString outStr;
- FTextStream t(&outStr);
+ TextStream t;
ftv.generateTreeViewInline(t);
- ol.writeString(outStr);
+ ol.writeString(t.str().c_str());
if (addToIndex)
{
Doxygen::indexList->decContentsDepth();
@@ -2471,7 +2505,7 @@ static void writeAnnotatedExceptionIndex(OutputList &ol)
}
//----------------------------------------------------------------------------
-static void writeClassLinkForMember(OutputList &ol,const MemberDef *md,const char *separator,
+static void writeClassLinkForMember(OutputList &ol,const MemberDef *md,const QCString &separator,
QCString &prevClassName)
{
const ClassDef *cd=md->getClassDef();
@@ -2485,7 +2519,7 @@ static void writeClassLinkForMember(OutputList &ol,const MemberDef *md,const cha
}
}
-static void writeFileLinkForMember(OutputList &ol,const MemberDef *md,const char *separator,
+static void writeFileLinkForMember(OutputList &ol,const MemberDef *md,const QCString &separator,
QCString &prevFileName)
{
const FileDef *fd=md->getFileDef();
@@ -2499,7 +2533,7 @@ static void writeFileLinkForMember(OutputList &ol,const MemberDef *md,const char
}
}
-static void writeNamespaceLinkForMember(OutputList &ol,const MemberDef *md,const char *separator,
+static void writeNamespaceLinkForMember(OutputList &ol,const MemberDef *md,const QCString &separator,
QCString &prevNamespaceName)
{
const NamespaceDef *nd=md->getNamespaceDef();
@@ -2520,7 +2554,7 @@ static void writeMemberList(OutputList &ol,bool useSections,const std::string &p
int index = (int)type;
ASSERT(index<3);
- typedef void (*writeLinkForMember_t)(OutputList &ol,const MemberDef *md,const char *separator,
+ typedef void (*writeLinkForMember_t)(OutputList &ol,const MemberDef *md,const QCString &separator,
QCString &prevNamespaceName);
// each index tab has its own write function
@@ -2561,7 +2595,7 @@ static void writeMemberList(OutputList &ol,bool useSections,const std::string &p
(md->isFunction() || md->isSlot() || md->isSignal());
QCString name=md->name();
int startIndex = getPrefixIndex(name);
- if (QCString(name.data()+startIndex)!=prevName) // new entry
+ if (name.data()+startIndex!=prevName) // new entry
{
if ((prevName.isEmpty() ||
tolower(name.at(startIndex))!=tolower(prevName.at(0))) &&
@@ -2642,9 +2676,10 @@ void addClassMemberNameToIndex(const MemberDef *md)
{
QCString n = md->name();
int index = getPrefixIndex(n);
- char letter[MAX_UTF8_CHAR_SIZE];
- if (getUtf8Char(n.data()+index,letter,CaseModifier::ToLower)>0)
+ std::string letter = getUTF8CharAt(n.str(),index);
+ if (!letter.empty())
{
+ letter = convertUTF8ToLower(letter);
bool isFriendToHide = hideFriendCompounds &&
(QCString(md->typeString())=="friend class" ||
QCString(md->typeString())=="friend struct" ||
@@ -2720,9 +2755,10 @@ void addNamespaceMemberNameToIndex(const MemberDef *md)
{
QCString n = md->name();
int index = getPrefixIndex(n);
- char letter[MAX_UTF8_CHAR_SIZE];
- if (getUtf8Char(n.data()+index,letter,CaseModifier::ToLower)>0)
+ std::string letter = getUTF8CharAt(n.str(),index);
+ if (!letter.empty())
{
+ letter = convertUTF8ToLower(letter);
if (!md->isEnumValue() || (md->getEnumScope() && !md->getEnumScope()->isStrong()))
{
MemberIndexMap_add(g_namespaceIndexLetterUsed[NMHL_All],letter,md);
@@ -2787,9 +2823,10 @@ void addFileMemberNameToIndex(const MemberDef *md)
{
QCString n = md->name();
int index = getPrefixIndex(n);
- char letter[MAX_UTF8_CHAR_SIZE];
- if (getUtf8Char(n.data()+index,letter,CaseModifier::ToLower)>0)
+ std::string letter = getUTF8CharAt(n.str(),index);
+ if (!letter.empty())
{
+ letter = convertUTF8ToLower(letter);
if (!md->isEnumValue() || (md->getEnumScope() && !md->getEnumScope()->isStrong()))
{
MemberIndexMap_add(g_fileIndexLetterUsed[FMHL_All],letter,md);
@@ -2904,7 +2941,7 @@ static void writeQuickMemberIndex(OutputList &ol,
/** Helper class representing a class member in the navigation menu. */
struct CmhlInfo
{
- CmhlInfo(const char *fn,const char *t) : fname(fn), title(t) {}
+ CmhlInfo(const char *fn,const QCString &t) : fname(fn), title(t) {}
const char *fname;
QCString title;
};
@@ -2954,8 +2991,8 @@ static void writeClassMemberIndexFiltered(OutputList &ol, ClassMemberHighlight h
if (addToIndex)
{
- Doxygen::indexList->addContentsItem(multiPageIndex,getCmhlInfo(hl)->title,0,
- getCmhlInfo(hl)->fname,0,multiPageIndex,TRUE);
+ Doxygen::indexList->addContentsItem(multiPageIndex,getCmhlInfo(hl)->title,QCString(),
+ getCmhlInfo(hl)->fname,QCString(),multiPageIndex,TRUE);
if (multiPageIndex) Doxygen::indexList->incContentsDepth();
}
@@ -2966,23 +3003,23 @@ static void writeClassMemberIndexFiltered(OutputList &ol, ClassMemberHighlight h
QCString fileName = getCmhlInfo(hl)->fname;
if (multiPageIndex)
{
- QCString cs = page;
+ QCString cs(page);
if (!first)
{
fileName+="_"+letterToLabel(cs);
}
if (addToIndex)
{
- Doxygen::indexList->addContentsItem(FALSE,cs,0,fileName,0,FALSE,TRUE);
+ Doxygen::indexList->addContentsItem(FALSE,cs,QCString(),fileName,QCString(),FALSE,TRUE);
}
}
bool quickIndex = documentedClassMembers[hl]>maxItemsBeforeQuickIndex;
- ol.startFile(fileName+extension,0,title);
+ ol.startFile(fileName+extension,QCString(),title);
ol.startQuickIndices();
if (!disableIndex)
{
- ol.writeQuickLinks(TRUE,HLI_Functions,0);
+ ol.writeQuickLinks(TRUE,HLI_Functions,QCString());
if (!Config_getBool(HTML_DYNAMIC_MENUS))
{
@@ -3003,7 +3040,7 @@ static void writeClassMemberIndexFiltered(OutputList &ol, ClassMemberHighlight h
startQuickIndexItem(ol,getCmhlInfo(i)->fname+Doxygen::htmlFileExtension,hl==i,TRUE,first);
ol.writeString(fixSpaces(getCmhlInfo(i)->title));
//printf("multiPageIndex=%d first=%d fileName=%s file=%s title=%s\n",
- // multiPageIndex,first,fileName.data(),getCmhlInfo(i)->fname,getCmhlInfo(i)->title.data());
+ // multiPageIndex,first,qPrint(fileName),getCmhlInfo(i)->fname,qPrint(getCmhlInfo(i)->title));
endQuickIndexItem(ol);
}
}
@@ -3057,7 +3094,7 @@ static void writeClassMemberIndex(OutputList &ol)
if (documentedClassMembers[CMHL_All]>0 && addToIndex)
{
- Doxygen::indexList->addContentsItem(TRUE,lne ? lne->title() : theTranslator->trCompoundMembers(),0,"functions",0);
+ Doxygen::indexList->addContentsItem(TRUE,lne ? lne->title() : theTranslator->trCompoundMembers(),QCString(),"functions",QCString());
Doxygen::indexList->incContentsDepth();
}
writeClassMemberIndexFiltered(ol,CMHL_All);
@@ -3081,7 +3118,7 @@ static void writeClassMemberIndex(OutputList &ol)
/** Helper class representing a file member in the navigation menu. */
struct FmhlInfo
{
- FmhlInfo(const char *fn,const char *t) : fname(fn), title(t) {}
+ FmhlInfo(const char *fn,const QCString &t) : fname(fn), title(t) {}
const char *fname;
QCString title;
};
@@ -3131,8 +3168,8 @@ static void writeFileMemberIndexFiltered(OutputList &ol, FileMemberHighlight hl)
if (addToIndex)
{
- Doxygen::indexList->addContentsItem(multiPageIndex,getFmhlInfo(hl)->title,0,
- getFmhlInfo(hl)->fname,0,multiPageIndex,TRUE);
+ Doxygen::indexList->addContentsItem(multiPageIndex,getFmhlInfo(hl)->title,QCString(),
+ getFmhlInfo(hl)->fname,QCString(),multiPageIndex,TRUE);
if (multiPageIndex) Doxygen::indexList->incContentsDepth();
}
@@ -3143,23 +3180,23 @@ static void writeFileMemberIndexFiltered(OutputList &ol, FileMemberHighlight hl)
QCString fileName = getFmhlInfo(hl)->fname;
if (multiPageIndex)
{
- QCString cs = page;
+ QCString cs(page);
if (!first)
{
fileName+="_"+letterToLabel(cs);
}
if (addToIndex)
{
- Doxygen::indexList->addContentsItem(FALSE,cs,0,fileName,0,FALSE,TRUE);
+ Doxygen::indexList->addContentsItem(FALSE,cs,QCString(),fileName,QCString(),FALSE,TRUE);
}
}
bool quickIndex = documentedFileMembers[hl]>maxItemsBeforeQuickIndex;
- ol.startFile(fileName+extension,0,title);
+ ol.startFile(fileName+extension,QCString(),title);
ol.startQuickIndices();
if (!disableIndex)
{
- ol.writeQuickLinks(TRUE,HLI_Globals,0);
+ ol.writeQuickLinks(TRUE,HLI_Globals,QCString());
if (!Config_getBool(HTML_DYNAMIC_MENUS))
{
startQuickIndexList(ol);
@@ -3228,7 +3265,7 @@ static void writeFileMemberIndex(OutputList &ol)
bool addToIndex = lne==0 || lne->visible();
if (documentedFileMembers[FMHL_All]>0 && addToIndex)
{
- Doxygen::indexList->addContentsItem(FALSE,lne ? lne->title() : theTranslator->trFileMembers(),0,"globals",0);
+ Doxygen::indexList->addContentsItem(FALSE,lne ? lne->title() : theTranslator->trFileMembers(),QCString(),"globals",QCString());
Doxygen::indexList->incContentsDepth();
}
writeFileMemberIndexFiltered(ol,FMHL_All);
@@ -3252,7 +3289,7 @@ static void writeFileMemberIndex(OutputList &ol)
/** Helper class representing a namespace member in the navigation menu. */
struct NmhlInfo
{
- NmhlInfo(const char *fn,const char *t) : fname(fn), title(t) {}
+ NmhlInfo(const char *fn,const QCString &t) : fname(fn), title(t) {}
const char *fname;
QCString title;
};
@@ -3305,8 +3342,8 @@ static void writeNamespaceMemberIndexFiltered(OutputList &ol,
if (addToIndex)
{
- Doxygen::indexList->addContentsItem(multiPageIndex,getNmhlInfo(hl)->title,0,
- getNmhlInfo(hl)->fname,0,multiPageIndex,TRUE);
+ Doxygen::indexList->addContentsItem(multiPageIndex,getNmhlInfo(hl)->title,QCString(),
+ getNmhlInfo(hl)->fname,QCString(),multiPageIndex,TRUE);
if (multiPageIndex) Doxygen::indexList->incContentsDepth();
}
@@ -3317,23 +3354,23 @@ static void writeNamespaceMemberIndexFiltered(OutputList &ol,
QCString fileName = getNmhlInfo(hl)->fname;
if (multiPageIndex)
{
- QCString cs = page;
+ QCString cs(page);
if (!first)
{
fileName+="_"+letterToLabel(cs);
}
if (addToIndex)
{
- Doxygen::indexList->addContentsItem(FALSE,cs,0,fileName,0,FALSE,TRUE);
+ Doxygen::indexList->addContentsItem(FALSE,cs,QCString(),fileName,QCString(),FALSE,TRUE);
}
}
bool quickIndex = documentedNamespaceMembers[hl]>maxItemsBeforeQuickIndex;
- ol.startFile(fileName+extension,0,title);
+ ol.startFile(fileName+extension,QCString(),title);
ol.startQuickIndices();
if (!disableIndex)
{
- ol.writeQuickLinks(TRUE,HLI_NamespaceMembers,0);
+ ol.writeQuickLinks(TRUE,HLI_NamespaceMembers,QCString());
if (!Config_getBool(HTML_DYNAMIC_MENUS))
{
startQuickIndexList(ol);
@@ -3402,7 +3439,7 @@ static void writeNamespaceMemberIndex(OutputList &ol)
bool addToIndex = lne==0 || lne->visible();
if (documentedNamespaceMembers[NMHL_All]>0 && addToIndex)
{
- Doxygen::indexList->addContentsItem(FALSE,lne ? lne->title() : theTranslator->trNamespaceMembers(),0,"namespacemembers",0);
+ Doxygen::indexList->addContentsItem(FALSE,lne ? lne->title() : theTranslator->trNamespaceMembers(),QCString(),"namespacemembers",QCString());
Doxygen::indexList->incContentsDepth();
}
//bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
@@ -3435,17 +3472,17 @@ static void writeExampleIndex(OutputList &ol)
QCString title = lne ? lne->title() : theTranslator->trExamples();
bool addToIndex = lne==0 || lne->visible();
- startFile(ol,"examples",0,title,HLI_Examples);
+ startFile(ol,"examples",QCString(),title,HLI_Examples);
- startTitle(ol,0);
+ startTitle(ol,QCString());
ol.parseText(title);
- endTitle(ol,0,0);
+ endTitle(ol,QCString(),QCString());
ol.startContents();
if (addToIndex)
{
- Doxygen::indexList->addContentsItem(TRUE,title,0,"examples",0,TRUE,TRUE);
+ Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"examples",QCString(),TRUE,TRUE);
Doxygen::indexList->incContentsDepth();
}
@@ -3460,18 +3497,18 @@ static void writeExampleIndex(OutputList &ol)
QCString n=pd->getOutputFileBase();
if (!pd->title().isEmpty())
{
- ol.writeObjectLink(0,n,0,pd->title());
+ ol.writeObjectLink(QCString(),n,QCString(),pd->title());
if (addToIndex)
{
- Doxygen::indexList->addContentsItem(FALSE,filterTitle(pd->title().str()),pd->getReference(),n,0,FALSE,TRUE);
+ Doxygen::indexList->addContentsItem(FALSE,filterTitle(pd->title().str()),pd->getReference(),n,QCString(),FALSE,TRUE);
}
}
else
{
- ol.writeObjectLink(0,n,0,pd->name());
+ ol.writeObjectLink(QCString(),n,QCString(),pd->name());
if (addToIndex)
{
- Doxygen::indexList->addContentsItem(FALSE,pd->name(),pd->getReference(),n,0,FALSE,TRUE);
+ Doxygen::indexList->addContentsItem(FALSE,pd->name(),pd->getReference(),n,QCString(),FALSE,TRUE);
}
}
ol.endItemListItem();
@@ -3521,7 +3558,7 @@ static bool mainPageHasOwnTitle()
static void writePages(const PageDef *pd,FTVHelp *ftv)
{
- //printf("writePages()=%s pd=%p mainpage=%p\n",pd->name().data(),pd,Doxygen::mainPage);
+ //printf("writePages()=%s pd=%p mainpage=%p\n",qPrint(pd->name()),pd,Doxygen::mainPage);
LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Pages);
bool addToIndex = lne==0 || lne->visible();
if (!addToIndex) return;
@@ -3540,18 +3577,18 @@ static void writePages(const PageDef *pd,FTVHelp *ftv)
if (ftv)
{
- //printf("*** adding %s hasSubPages=%d hasSections=%d\n",pageTitle.data(),hasSubPages,hasSections);
+ //printf("*** adding %s hasSubPages=%d hasSections=%d\n",qPrint(pageTitle),hasSubPages,hasSections);
ftv->addContentsItem(
hasSubPages,pageTitle,
pd->getReference(),pd->getOutputFileBase(),
- 0,hasSubPages,TRUE,pd);
+ QCString(),hasSubPages,TRUE,pd);
}
if (addToIndex && pd!=Doxygen::mainPage.get())
{
Doxygen::indexList->addContentsItem(
hasSubPages || hasSections,pageTitle,
pd->getReference(),pd->getOutputFileBase(),
- 0,hasSubPages,TRUE);
+ QCString(),hasSubPages,TRUE);
}
}
if (hasSubPages && ftv) ftv->incContentsDepth();
@@ -3574,7 +3611,7 @@ static void writePages(const PageDef *pd,FTVHelp *ftv)
{
Doxygen::indexList->decContentsDepth();
}
- //printf("end writePages()=%s\n",pd->title().data());
+ //printf("end writePages()=%s\n",qPrint(pd->title()));
}
//----------------------------------------------------------------------------
@@ -3586,10 +3623,10 @@ static void writePageIndex(OutputList &ol)
ol.disableAllBut(OutputGenerator::Html);
LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Pages);
QCString title = lne ? lne->title() : theTranslator->trRelatedPages();
- startFile(ol,"pages",0,title,HLI_Pages);
- startTitle(ol,0);
+ startFile(ol,"pages",QCString(),title,HLI_Pages);
+ startTitle(ol,QCString());
ol.parseText(title);
- endTitle(ol,0,0);
+ endTitle(ol,QCString(),QCString());
ol.startContents();
ol.startTextBlock();
ol.parseText(lne ? lne->intro() : theTranslator->trRelatedPagesDescription());
@@ -3607,10 +3644,9 @@ static void writePageIndex(OutputList &ol)
writePages(pd.get(),ftv);
}
}
- QGString outStr;
- FTextStream t(&outStr);
+ TextStream t;
ftv->generateTreeViewInline(t);
- ol.writeString(outStr);
+ ol.writeString(t.str().c_str());
delete ftv;
}
@@ -3673,10 +3709,10 @@ void writeGraphInfo(OutputList &ol)
// temporarily disable create subdirs for linking to our example
createSubdirs = Config_updateBool(CREATE_SUBDIRS,FALSE);
- startFile(ol,"graph_legend",0,theTranslator->trLegendTitle().data());
- startTitle(ol,0);
+ startFile(ol,"graph_legend",QCString(),theTranslator->trLegendTitle());
+ startTitle(ol,QCString());
ol.parseText(theTranslator->trLegendTitle());
- endTitle(ol,0,0);
+ endTitle(ol,QCString(),QCString());
ol.startContents();
QCString legendDocs = theTranslator->trLegendDocs();
int s = legendDocs.find("<center>");
@@ -3685,11 +3721,11 @@ void writeGraphInfo(OutputList &ol)
if (imgExt=="svg" && s!=-1 && e!=-1)
{
legendDocs = legendDocs.left(s+8) + "[!-- SVG 0 --]\n" + legendDocs.mid(e);
- //printf("legendDocs=%s\n",legendDocs.data());
+ //printf("legendDocs=%s\n",qPrint(legendDocs));
}
FileDef *fd = createFileDef("","graph_legend.dox");
ol.generateDoc("graph_legend",1,fd,0,legendDocs,FALSE,FALSE,
- 0,FALSE,FALSE,FALSE);
+ QCString(),FALSE,FALSE,FALSE);
delete fd;
// restore config settings
@@ -3713,7 +3749,7 @@ static void writeGroupTreeNode(OutputList &ol, const GroupDef *gd, int level, FT
if (level>20)
{
warn(gd->getDefFileName(),gd->getDefLine(),
- "maximum nesting level exceeded for group %s: check for possible recursive group relation!\n",gd->name().data()
+ "maximum nesting level exceeded for group %s: check for possible recursive group relation!\n",qPrint(gd->name())
);
return;
}
@@ -3726,7 +3762,7 @@ static void writeGroupTreeNode(OutputList &ol, const GroupDef *gd, int level, FT
(!gd->isReference() || Config_getBool(EXTERNAL_GROUPS)) // hide external groups by default
)
{
- //printf("gd->name()=%s #members=%d\n",gd->name().data(),gd->countMembers());
+ //printf("gd->name()=%s #members=%d\n",qPrint(gd->name()),gd->countMembers());
// write group info
bool hasSubGroups = !gd->getSubGroups().empty();
bool hasSubPages = !gd->getPages().empty();
@@ -3743,21 +3779,22 @@ static void writeGroupTreeNode(OutputList &ol, const GroupDef *gd, int level, FT
numSubItems += gd->getNamespaces().size();
numSubItems += gd->getClasses().size();
numSubItems += gd->getFiles().size();
+ numSubItems += gd->getConcepts().size();
numSubItems += gd->getDirs().size();
numSubItems += gd->getPages().size();
}
bool isDir = hasSubGroups || hasSubPages || numSubItems>0;
- //printf("gd='%s': pageDict=%d\n",gd->name().data(),gd->pageDict->count());
+ //printf("gd='%s': pageDict=%d\n",qPrint(gd->name()),gd->pageDict->count());
if (addToIndex)
{
- Doxygen::indexList->addContentsItem(isDir,gd->groupTitle(),gd->getReference(),gd->getOutputFileBase(),0,isDir,TRUE);
+ Doxygen::indexList->addContentsItem(isDir,gd->groupTitle(),gd->getReference(),gd->getOutputFileBase(),QCString(),isDir,TRUE);
Doxygen::indexList->incContentsDepth();
}
if (ftv)
{
ftv->addContentsItem(hasSubGroups,gd->groupTitle(),
- gd->getReference(),gd->getOutputFileBase(),0,
+ gd->getReference(),gd->getOutputFileBase(),QCString(),
FALSE,FALSE,gd);
ftv->incContentsDepth();
}
@@ -3793,7 +3830,7 @@ static void writeGroupTreeNode(OutputList &ol, const GroupDef *gd, int level, FT
if (md->isVisible() && !md->isAnonymous())
{
Doxygen::indexList->addContentsItem(isDir,
- md->name(),md->getReference(),
+ md->qualifiedName(),md->getReference(),
md->getOutputFileBase(),md->anchor(),FALSE,addToIndex);
}
if (isDir)
@@ -3804,7 +3841,7 @@ static void writeGroupTreeNode(OutputList &ol, const GroupDef *gd, int level, FT
if (emd->isVisible())
{
Doxygen::indexList->addContentsItem(FALSE,
- emd->name(),emd->getReference(),emd->getOutputFileBase(),
+ emd->qualifiedName(),emd->getReference(),emd->getOutputFileBase(),
emd->anchor(),FALSE,addToIndex);
}
}
@@ -3820,21 +3857,15 @@ static void writeGroupTreeNode(OutputList &ol, const GroupDef *gd, int level, FT
//bool nestedClassInSameGroup =
// cd->getOuterScope() && cd->getOuterScope()->definitionType()==Definition::TypeClass &&
// cd->getOuterScope()->partOfGroups().empty() && cd->getOuterScope()->partOfGroups()->contains(gd);
- //printf("===== GroupClasses: %s visible=%d nestedClassInSameGroup=%d\n",cd->name().data(),cd->isVisible(),nestedClassInSameGroup);
+ //printf("===== GroupClasses: %s visible=%d nestedClassInSameGroup=%d\n",qPrint(cd->name()),cd->isVisible(),nestedClassInSameGroup);
if (cd->isVisible() /*&& !nestedClassInSameGroup*/)
{
- //if (cd->isEmbeddedInOuterScope())
- //{
- //printf("add class & members %d\n",addToIndex);
- addMembersToIndex(cd,LayoutDocManager::Class,cd->displayName(FALSE),cd->anchor(),addToIndex,TRUE);
- //}
- //else // only index the class, not its members
- //{
- // printf("%s: add class only\n",cd->name().data());
- // Doxygen::indexList->addContentsItem(FALSE,
- // cd->displayName(TRUE),cd->getReference(),
- // cd->getOutputFileBase(),cd->anchor(),addToIndex,TRUE);
- //}
+ addMembersToIndex(cd,
+ LayoutDocManager::Class,
+ cd->displayName(),
+ cd->anchor(),
+ addToIndex,
+ TRUE);
}
}
}
@@ -3845,8 +3876,20 @@ static void writeGroupTreeNode(OutputList &ol, const GroupDef *gd, int level, FT
if (nd->isVisible())
{
Doxygen::indexList->addContentsItem(FALSE,
- nd->localName(),nd->getReference(),
- nd->getOutputFileBase(),0,FALSE,FALSE);
+ nd->displayName(),nd->getReference(),
+ nd->getOutputFileBase(),QCString(),FALSE,addToIndex);
+ }
+ }
+ }
+ else if (lde->kind()==LayoutDocEntry::GroupConcepts && addToIndex)
+ {
+ for (const auto &cd : gd->getConcepts())
+ {
+ if (cd->isVisible())
+ {
+ Doxygen::indexList->addContentsItem(FALSE,
+ cd->displayName(),cd->getReference(),
+ cd->getOutputFileBase(),QCString(),FALSE,addToIndex);
}
}
}
@@ -3858,7 +3901,7 @@ static void writeGroupTreeNode(OutputList &ol, const GroupDef *gd, int level, FT
{
Doxygen::indexList->addContentsItem(FALSE,
fd->displayName(),fd->getReference(),
- fd->getOutputFileBase(),0,FALSE,FALSE);
+ fd->getOutputFileBase(),QCString(),FALSE,FALSE);
}
}
}
@@ -3870,7 +3913,7 @@ static void writeGroupTreeNode(OutputList &ol, const GroupDef *gd, int level, FT
{
Doxygen::indexList->addContentsItem(FALSE,
dd->shortName(),dd->getReference(),
- dd->getOutputFileBase(),0,FALSE,FALSE);
+ dd->getOutputFileBase(),QCString(),FALSE,FALSE);
}
}
}
@@ -3887,7 +3930,7 @@ static void writeGroupTreeNode(OutputList &ol, const GroupDef *gd, int level, FT
pd->title(),
gd->getReference(),
gd->getOutputFileBase(),
- si ? si->label().data() : 0,
+ si ? si->label() : QCString(),
hasSubPages || hasSections,
TRUE); // addToNavIndex
if (hasSections || hasSubPages)
@@ -3965,10 +4008,10 @@ static void writeGroupIndex(OutputList &ol)
QCString title = lne ? lne->title() : theTranslator->trModules();
bool addToIndex = lne==0 || lne->visible();
- startFile(ol,"modules",0,title,HLI_Modules);
- startTitle(ol,0);
+ startFile(ol,"modules",QCString(),title,HLI_Modules);
+ startTitle(ol,QCString());
ol.parseText(title);
- endTitle(ol,0,0);
+ endTitle(ol,QCString(),QCString());
ol.startContents();
ol.startTextBlock();
ol.parseText(lne ? lne->intro() : theTranslator->trModulesDescription());
@@ -3998,16 +4041,15 @@ static void writeGroupIndex(OutputList &ol)
{
if (addToIndex)
{
- Doxygen::indexList->addContentsItem(TRUE,title,0,"modules",0,TRUE,TRUE);
+ Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"modules",QCString(),TRUE,TRUE);
Doxygen::indexList->incContentsDepth();
}
FTVHelp* ftv = new FTVHelp(FALSE);
writeGroupHierarchy(ol,ftv,addToIndex);
- QGString outStr;
- FTextStream t(&outStr);
+ TextStream t;
ftv->generateTreeViewInline(t);
ol.disableAllBut(OutputGenerator::Html);
- ol.writeString(outStr);
+ ol.writeString(t.str().c_str());
delete ftv;
if (addToIndex)
{
@@ -4024,16 +4066,221 @@ static void writeGroupIndex(OutputList &ol)
//----------------------------------------------------------------------------
+static void writeConceptList(const ConceptLinkedRefMap &concepts, FTVHelp *ftv,bool addToIndex)
+{
+ for (const auto &cd : concepts)
+ {
+ ftv->addContentsItem(false,cd->displayName(FALSE),cd->getReference(),
+ cd->getOutputFileBase(),QCString(),false,cd->partOfGroups().empty(),cd);
+ if (addToIndex)
+ {
+ Doxygen::indexList->addContentsItem(false,cd->displayName(FALSE),cd->getReference(),
+ cd->getOutputFileBase(),QCString(),false,cd->partOfGroups().empty());
+ }
+ }
+}
+
+static void writeConceptTreeInsideNamespaceElement(const NamespaceDef *nd,FTVHelp *ftv,
+ bool rootOnly, bool addToIndex);
+
+static void writeConceptTreeInsideNamespace(const NamespaceLinkedRefMap &nsLinkedMap,FTVHelp *ftv,
+ bool rootOnly, bool addToIndex)
+{
+ for (const auto &nd : nsLinkedMap)
+ {
+ writeConceptTreeInsideNamespaceElement(nd,ftv,rootOnly,addToIndex);
+ }
+}
+
+
+static void writeConceptTreeInsideNamespaceElement(const NamespaceDef *nd,FTVHelp *ftv,
+ bool rootOnly, bool addToIndex)
+{
+ if (!nd->isAnonymous() &&
+ (!rootOnly || nd->getOuterScope()==Doxygen::globalScope))
+ {
+ bool isDir = namespaceHasNestedConcept(nd);
+ bool isLinkable = nd->isLinkableInProject();
+
+ //printf("namespace %s isDir=%d\n",qPrint(nd->name()),isDir);
+
+ QCString ref;
+ QCString file;
+ if (isLinkable)
+ {
+ ref = nd->getReference();
+ file = nd->getOutputFileBase();
+ }
+
+ if (isDir)
+ {
+ ftv->addContentsItem(isDir,nd->localName(),ref,file,QCString(),FALSE,TRUE,nd);
+
+ if (addToIndex)
+ {
+ // the namespace entry is already shown under the namespace list so don't
+ // add it to the nav index and don't create a separate index file for it otherwise
+ // it will overwrite the one written for the namespace list.
+ Doxygen::indexList->addContentsItem(isDir,nd->localName(),ref,file,QCString(),
+ false, // separateIndex
+ false // addToNavIndex
+ );
+ }
+ if (addToIndex)
+ {
+ Doxygen::indexList->incContentsDepth();
+ }
+
+ ftv->incContentsDepth();
+ writeConceptTreeInsideNamespace(nd->getNamespaces(),ftv,FALSE,addToIndex);
+ writeConceptList(nd->getConcepts(),ftv,addToIndex);
+ ftv->decContentsDepth();
+
+ if (addToIndex)
+ {
+ Doxygen::indexList->decContentsDepth();
+ }
+ }
+ }
+}
+
+static void writeConceptRootList(FTVHelp *ftv,bool addToIndex)
+{
+ for (const auto &cd : *Doxygen::conceptLinkedMap)
+ {
+ if (cd->getOuterScope()==0 ||
+ cd->getOuterScope()==Doxygen::globalScope)
+ {
+ //printf("*** adding %s hasSubPages=%d hasSections=%d\n",qPrint(pageTitle),hasSubPages,hasSections);
+ ftv->addContentsItem(
+ false,cd->localName(),cd->getReference(),cd->getOutputFileBase(),
+ QCString(),false,true,cd.get());
+ if (addToIndex)
+ {
+ Doxygen::indexList->addContentsItem(
+ false,cd->localName(),cd->getReference(),cd->getOutputFileBase(),
+ QCString(),false,true);
+ }
+ }
+ }
+}
+
+static void writeConceptIndex(OutputList &ol)
+{
+ if (documentedConcepts==0) return;
+ ol.pushGeneratorState();
+ // 1.{
+ ol.disable(OutputGenerator::Man);
+ ol.disable(OutputGenerator::Docbook);
+ LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Concepts);
+ QCString title = lne ? lne->title() : theTranslator->trConceptList();
+ bool addToIndex = lne==0 || lne->visible();
+
+ startFile(ol,"concepts",QCString(),title,HLI_Concepts);
+ startTitle(ol,QCString());
+ ol.parseText(title);
+ endTitle(ol,QCString(),QCString());
+ ol.startContents();
+ ol.startTextBlock();
+ ol.parseText(lne ? lne->intro() : theTranslator->trConceptListDescription(Config_getBool(EXTRACT_ALL)));
+ ol.endTextBlock();
+
+ // ---------------
+ // Normal group index for Latex/RTF
+ // ---------------
+ // 2.{
+ ol.pushGeneratorState();
+ ol.disable(OutputGenerator::Html);
+
+ bool first=TRUE;
+ for (const auto &cd : *Doxygen::conceptLinkedMap)
+ {
+ if (cd->isLinkableInProject())
+ {
+ if (first)
+ {
+ ol.startIndexList();
+ first=FALSE;
+ }
+ //ol.writeStartAnnoItem("namespace",nd->getOutputFileBase(),0,nd->name());
+ ol.startIndexKey();
+ ol.writeObjectLink(QCString(),cd->getOutputFileBase(),QCString(),cd->displayName());
+ ol.endIndexKey();
+
+ bool hasBrief = !cd->briefDescription().isEmpty();
+ ol.startIndexValue(hasBrief);
+ if (hasBrief)
+ {
+ //ol.docify(" (");
+ ol.generateDoc(
+ cd->briefFile(),cd->briefLine(),
+ cd.get(),0,
+ cd->briefDescription(TRUE),
+ FALSE, // index words
+ FALSE, // isExample
+ QCString(), // example name
+ TRUE, // single line
+ TRUE, // link from index
+ Config_getBool(MARKDOWN_SUPPORT)
+ );
+ //ol.docify(")");
+ }
+ ol.endIndexValue(cd->getOutputFileBase(),hasBrief);
+
+ }
+ }
+ if (!first) ol.endIndexList();
+
+ ol.popGeneratorState();
+ // 2.}
+
+ // ---------------
+ // interactive group index for HTML
+ // ---------------
+ // 2.{
+ ol.pushGeneratorState();
+ ol.disableAllBut(OutputGenerator::Html);
+
+ {
+ if (addToIndex)
+ {
+ Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"concepts",QCString(),TRUE,TRUE);
+ Doxygen::indexList->incContentsDepth();
+ }
+ FTVHelp ftv(false);
+ for (const auto &nd : *Doxygen::namespaceLinkedMap)
+ {
+ writeConceptTreeInsideNamespaceElement(nd.get(),&ftv,true,addToIndex);
+ }
+ writeConceptRootList(&ftv,addToIndex);
+ TextStream t;
+ ftv.generateTreeViewInline(t);
+ ol.writeString(t.str().c_str());
+ if (addToIndex)
+ {
+ Doxygen::indexList->decContentsDepth();
+ }
+ }
+ ol.popGeneratorState();
+ // 2.}
+
+ endFile(ol);
+ ol.popGeneratorState();
+ // 1.}
+}
+
+//----------------------------------------------------------------------------
+
static void writeUserGroupStubPage(OutputList &ol,LayoutNavEntry *lne)
{
if (lne->baseFile().left(9)=="usergroup")
{
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
- startFile(ol,lne->baseFile(),0,lne->title(),HLI_UserGroup);
- startTitle(ol,0);
+ startFile(ol,lne->baseFile(),QCString(),lne->title(),HLI_UserGroup);
+ startTitle(ol,QCString());
ol.parseText(lne->title());
- endTitle(ol,0,0);
+ endTitle(ol,QCString(),QCString());
ol.startContents();
int count=0;
for (const auto &entry: lne->children())
@@ -4081,7 +4328,7 @@ static void writeIndex(OutputList &ol)
ol.disableAllBut(OutputGenerator::Html);
QCString defFileName =
- Doxygen::mainPage ? Doxygen::mainPage->docFile().data() : "[generated]";
+ Doxygen::mainPage ? Doxygen::mainPage->docFile() : QCString("[generated]");
int defLine =
Doxygen::mainPage ? Doxygen::mainPage->docLine() : -1;
@@ -4096,7 +4343,7 @@ static void writeIndex(OutputList &ol)
}
QCString indexName="index";
- ol.startFile(indexName,0,title);
+ ol.startFile(indexName,QCString(),title);
if (Doxygen::mainPage)
{
@@ -4104,7 +4351,7 @@ static void writeIndex(OutputList &ol)
(!projectName.isEmpty() && mainPageHasTitle() && qstricmp(title,projectName)!=0)
) // to avoid duplicate entries in the treeview
{
- Doxygen::indexList->addContentsItem(Doxygen::mainPage->hasSubPages(),title,0,indexName,0,Doxygen::mainPage->hasSubPages(),TRUE);
+ Doxygen::indexList->addContentsItem(Doxygen::mainPage->hasSubPages(),title,QCString(),indexName,QCString(),Doxygen::mainPage->hasSubPages(),TRUE);
}
if (Doxygen::mainPage->hasSubPages() || Doxygen::mainPage->hasSections())
{
@@ -4115,7 +4362,7 @@ static void writeIndex(OutputList &ol)
ol.startQuickIndices();
if (!Config_getBool(DISABLE_INDEX))
{
- ol.writeQuickLinks(TRUE,HLI_Main,0);
+ ol.writeQuickLinks(TRUE,HLI_Main,QCString());
}
ol.endQuickIndices();
ol.writeSplitBar(indexName);
@@ -4138,10 +4385,10 @@ static void writeIndex(OutputList &ol)
if (Doxygen::mainPage->title().lower()!="notitle")
{
ol.startHeaderSection();
- ol.startTitleHead(0);
+ ol.startTitleHead(QCString());
ol.generateDoc(Doxygen::mainPage->docFile(),Doxygen::mainPage->getStartBodyLine(),
Doxygen::mainPage.get(),0,Doxygen::mainPage->title(),TRUE,FALSE,
- 0,TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
headerWritten = TRUE;
}
}
@@ -4150,21 +4397,21 @@ static void writeIndex(OutputList &ol)
if (!projectName.isEmpty())
{
ol.startHeaderSection();
- ol.startTitleHead(0);
+ ol.startTitleHead(QCString());
ol.parseText(projPrefix+theTranslator->trDocumentation());
headerWritten = TRUE;
}
}
if (headerWritten)
{
- ol.endTitleHead(0,0);
+ ol.endTitleHead(QCString(),QCString());
ol.endHeaderSection();
}
ol.startContents();
if (Config_getBool(DISABLE_INDEX) && Doxygen::mainPage==0)
{
- ol.writeQuickLinks(FALSE,HLI_Main,0);
+ ol.writeQuickLinks(FALSE,HLI_Main,QCString());
}
if (Doxygen::mainPage)
@@ -4178,7 +4425,7 @@ static void writeIndex(OutputList &ol)
ol.startTextBlock();
ol.generateDoc(defFileName,defLine,Doxygen::mainPage.get(),0,
Doxygen::mainPage->documentation(),TRUE,FALSE,
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
ol.endTextBlock();
ol.endPageDoc();
@@ -4195,7 +4442,7 @@ static void writeIndex(OutputList &ol)
ol.enable(OutputGenerator::Docbook);
ol.enable(OutputGenerator::RTF);
- ol.startFile("refman",0,0);
+ ol.startFile("refman",QCString(),QCString());
ol.startIndexSection(isTitlePageStart);
ol.disable(OutputGenerator::Latex);
ol.disable(OutputGenerator::Docbook);
@@ -4213,7 +4460,7 @@ static void writeIndex(OutputList &ol)
{
ol.startProjectNumber();
ol.generateDoc(defFileName,defLine,Doxygen::mainPage.get(),0,Config_getString(PROJECT_NUMBER),FALSE,FALSE,
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
ol.endProjectNumber();
}
ol.endIndexSection(isTitlePageStart);
@@ -4272,7 +4519,7 @@ static void writeIndex(OutputList &ol)
ol.endIndexSection(isPageDocumentation2);
ol.popGeneratorState();
- ol.writeAnchor(0,pd->getOutputFileBase());
+ ol.writeAnchor(QCString(),pd->getOutputFileBase());
ol.writePageLink(pd->getOutputFileBase(),first);
first=FALSE;
@@ -4306,6 +4553,12 @@ static void writeIndex(OutputList &ol)
ol.parseText(/*projPrefix+*/(fortranOpt?theTranslator->trModulesIndex():theTranslator->trNamespaceIndex()));
ol.endIndexSection(isNamespaceIndex);
}
+ if (documentedConcepts>0)
+ {
+ ol.startIndexSection(isConceptIndex);
+ ol.parseText(/*projPrefix+*/theTranslator->trConceptIndex());
+ ol.endIndexSection(isConceptIndex);
+ }
if (hierarchyInterfaces>0)
{
ol.startIndexSection(isClassHierarchyIndex);
@@ -4377,6 +4630,12 @@ static void writeIndex(OutputList &ol)
ol.parseText(/*projPrefix+*/(fortranOpt?theTranslator->trModuleDocumentation():theTranslator->trNamespaceDocumentation()));
ol.endIndexSection(isNamespaceDocumentation);
}
+ if (documentedConcepts>0)
+ {
+ ol.startIndexSection(isConceptDocumentation);
+ ol.parseText(/*projPrefix+*/theTranslator->trConceptDocumentation());
+ ol.endIndexSection(isConceptDocumentation);
+ }
if (annotatedInterfacesPrinted>0)
{
ol.startIndexSection(isClassDocumentation);
@@ -4420,12 +4679,12 @@ static void writeIndex(OutputList &ol)
{
Doxygen::insideMainPage=TRUE;
ol.disable(OutputGenerator::Man);
- startFile(ol,Doxygen::mainPage->name(),0,Doxygen::mainPage->title());
+ startFile(ol,Doxygen::mainPage->name(),QCString(),Doxygen::mainPage->title());
ol.startContents();
ol.startTextBlock();
ol.generateDoc(defFileName,defLine,Doxygen::mainPage.get(),0,
Doxygen::mainPage->documentation(),FALSE,FALSE,
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT)
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT)
);
ol.endTextBlock();
endFile(ol);
@@ -4436,7 +4695,7 @@ static void writeIndex(OutputList &ol)
ol.popGeneratorState();
}
-static QArray<bool> indexWritten;
+static std::vector<bool> indexWritten;
static void writeIndexHierarchyEntries(OutputList &ol,const LayoutNavEntryList &entries)
{
@@ -4447,13 +4706,13 @@ static void writeIndexHierarchyEntries(OutputList &ol,const LayoutNavEntryList &
uint index = (uint)kind;
if (index>=indexWritten.size())
{
- uint i;
- uint oldSize = indexWritten.size();
- uint newSize = index+1;
+ size_t i;
+ size_t oldSize = indexWritten.size();
+ size_t newSize = index+1;
indexWritten.resize(newSize);
for (i=oldSize;i<newSize;i++) indexWritten.at(i)=FALSE;
}
- //printf("starting %s kind=%d\n",lne->title().data(),lne->kind());
+ //printf("starting %s kind=%d\n",qPrint(lne->title()),lne->kind());
bool addToIndex=lne->visible();
bool needsClosing=FALSE;
if (!indexWritten.at(index))
@@ -4479,7 +4738,7 @@ static void writeIndexHierarchyEntries(OutputList &ol,const LayoutNavEntryList &
{
if (documentedNamespaces>0 && addToIndex)
{
- Doxygen::indexList->addContentsItem(TRUE,lne->title(),0,lne->baseFile(),0);
+ Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
Doxygen::indexList->incContentsDepth();
needsClosing=TRUE;
}
@@ -4508,7 +4767,7 @@ static void writeIndexHierarchyEntries(OutputList &ol,const LayoutNavEntryList &
case LayoutNavEntry::Classes:
if (annotatedClasses>0 && addToIndex)
{
- Doxygen::indexList->addContentsItem(TRUE,lne->title(),0,lne->baseFile(),0);
+ Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
Doxygen::indexList->incContentsDepth();
needsClosing=TRUE;
}
@@ -4518,6 +4777,10 @@ static void writeIndexHierarchyEntries(OutputList &ol,const LayoutNavEntryList &
writeAnnotatedIndex(ol);
}
break;
+ case LayoutNavEntry::Concepts:
+ msg("Generating concept index...\n");
+ writeConceptIndex(ol);
+ break;
case LayoutNavEntry::ClassList:
msg("Generating annotated compound index...\n");
writeAnnotatedIndex(ol);
@@ -4545,7 +4808,7 @@ static void writeIndexHierarchyEntries(OutputList &ol,const LayoutNavEntryList &
case LayoutNavEntry::Interfaces:
if (sliceOpt && annotatedInterfaces>0 && addToIndex)
{
- Doxygen::indexList->addContentsItem(TRUE,lne->title(),0,lne->baseFile(),0);
+ Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
Doxygen::indexList->incContentsDepth();
needsClosing=TRUE;
}
@@ -4579,7 +4842,7 @@ static void writeIndexHierarchyEntries(OutputList &ol,const LayoutNavEntryList &
case LayoutNavEntry::Structs:
if (sliceOpt && annotatedStructs>0 && addToIndex)
{
- Doxygen::indexList->addContentsItem(TRUE,lne->title(),0,lne->baseFile(),0);
+ Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
Doxygen::indexList->incContentsDepth();
needsClosing=TRUE;
}
@@ -4601,7 +4864,7 @@ static void writeIndexHierarchyEntries(OutputList &ol,const LayoutNavEntryList &
case LayoutNavEntry::Exceptions:
if (sliceOpt && annotatedExceptions>0 && addToIndex)
{
- Doxygen::indexList->addContentsItem(TRUE,lne->title(),0,lne->baseFile(),0);
+ Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
Doxygen::indexList->incContentsDepth();
needsClosing=TRUE;
}
@@ -4639,7 +4902,7 @@ static void writeIndexHierarchyEntries(OutputList &ol,const LayoutNavEntryList &
{
if (documentedHtmlFiles>0 && addToIndex)
{
- Doxygen::indexList->addContentsItem(TRUE,lne->title(),0,lne->baseFile(),0);
+ Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
Doxygen::indexList->incContentsDepth();
needsClosing=TRUE;
}
@@ -4679,7 +4942,7 @@ static void writeIndexHierarchyEntries(OutputList &ol,const LayoutNavEntryList &
url.prepend("^"); // prepend ^ to absolute URL
}
bool isRef = lne->baseFile().left(4)=="@ref" || lne->baseFile().left(4)=="\\ref";
- Doxygen::indexList->addContentsItem(TRUE,lne->title(),0,url,0,FALSE,isRef || isRelative);
+ Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),url,QCString(),FALSE,isRef || isRelative);
}
break;
case LayoutNavEntry::UserGroup:
@@ -4690,7 +4953,7 @@ static void writeIndexHierarchyEntries(OutputList &ol,const LayoutNavEntryList &
{
if (url=="![none]")
{
- Doxygen::indexList->addContentsItem(TRUE,lne->title(),0,0,0,FALSE,FALSE);
+ Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),QCString(),QCString(),FALSE,FALSE);
}
else
{
@@ -4700,12 +4963,12 @@ static void writeIndexHierarchyEntries(OutputList &ol,const LayoutNavEntryList &
url.prepend("^"); // prepend ^ to absolute URL
}
bool isRef = lne->baseFile().left(4)=="@ref" || lne->baseFile().left(4)=="\\ref";
- Doxygen::indexList->addContentsItem(TRUE,lne->title(),0,url,0,FALSE,isRef || isRelative);
+ Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),url,QCString(),FALSE,isRef || isRelative);
}
}
else
{
- Doxygen::indexList->addContentsItem(TRUE,lne->title(),0,lne->baseFile(),0,TRUE,TRUE);
+ Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString(),TRUE,TRUE);
}
Doxygen::indexList->incContentsDepth();
needsClosing=TRUE;
@@ -4736,7 +4999,7 @@ static void writeIndexHierarchyEntries(OutputList &ol,const LayoutNavEntryList &
break;
}
}
- //printf("ending %s kind=%d\n",lne->title().data(),lne->kind());
+ //printf("ending %s kind=%d\n",qPrint(lne->title()),lne->kind());
}
}
@@ -4755,6 +5018,7 @@ static bool quickLinkVisible(LayoutNavEntry::Kind kind)
case LayoutNavEntry::Namespaces: return documentedNamespaces>0 && showNamespaces;
case LayoutNavEntry::NamespaceList: return documentedNamespaces>0 && showNamespaces;
case LayoutNavEntry::NamespaceMembers: return documentedNamespaceMembers[NMHL_All]>0;
+ case LayoutNavEntry::Concepts: return documentedConcepts>0;
case LayoutNavEntry::Classes: return annotatedClasses>0;
case LayoutNavEntry::ClassList: return annotatedClasses>0;
case LayoutNavEntry::ClassIndex: return annotatedClasses>0;
@@ -4783,7 +5047,7 @@ static bool quickLinkVisible(LayoutNavEntry::Kind kind)
}
template<class T,std::size_t total>
-void renderMemberIndicesAsJs(FTextStream &t,
+void renderMemberIndicesAsJs(std::ostream &t,
const int *numDocumented,
const std::array<MemberIndexMap,total> &memberLists,
const T *(*getInfo)(size_t hl))
@@ -4800,7 +5064,7 @@ void renderMemberIndicesAsJs(FTextStream &t,
t << "children:[";
firstMember=FALSE;
}
- t << endl << "{text:\"" << convertToJSString(getInfo(i)->title) << "\",url:\""
+ t << "\n{text:\"" << convertToJSString(getInfo(i)->title) << "\",url:\""
<< convertToJSString(getInfo(i)->fname+Doxygen::htmlFileExtension) << "\"";
// Check if we have many members, then add sub entries per letter...
@@ -4813,14 +5077,14 @@ void renderMemberIndicesAsJs(FTextStream &t,
{
multiPageIndex=TRUE;
}
- t << ",children:[" << endl;
+ t << ",children:[\n";
bool firstLetter=TRUE;
for (const auto &kv : memberLists[i])
{
- if (!firstLetter) t << "," << endl;
+ if (!firstLetter) t << ",\n";
std::string letter = kv.first;
- QCString ci = letter;
- QCString is = letterToLabel(ci);
+ QCString ci(letter);
+ QCString is(letterToLabel(ci));
QCString anchor;
QCString extension=Doxygen::htmlFileExtension;
QCString fullName = getInfo(i)->fname;
@@ -4843,7 +5107,7 @@ void renderMemberIndicesAsJs(FTextStream &t,
}
}
-static bool renderQuickLinksAsJs(FTextStream &t,LayoutNavEntry *root,bool first)
+static bool renderQuickLinksAsJs(std::ostream &t,LayoutNavEntry *root,bool first)
{
int count=0;
for (const auto &entry : root->children())
@@ -4854,12 +5118,12 @@ static bool renderQuickLinksAsJs(FTextStream &t,LayoutNavEntry *root,bool first)
{
bool firstChild = TRUE;
if (!first) t << ",";
- t << "children:[" << endl;
+ t << "children:[\n";
for (const auto &entry : root->children())
{
if (entry->visible() && quickLinkVisible(entry->kind()))
{
- if (!firstChild) t << "," << endl;
+ if (!firstChild) t << ",\n";
firstChild=FALSE;
QCString url = entry->url();
t << "{text:\"" << convertToJSString(entry->title()) << "\",url:\""
@@ -4896,16 +5160,15 @@ static void writeMenuData()
{
if (!Config_getBool(GENERATE_HTML) || Config_getBool(DISABLE_INDEX)) return;
QCString outputDir = Config_getBool(HTML_OUTPUT);
- QFile f(outputDir+"/menudata.js");
LayoutNavEntry *root = LayoutDocManager::instance().rootNavEntry();
- if (f.open(IO_WriteOnly))
+ std::ofstream t(outputDir.str()+"/menudata.js",std::ofstream::out | std::ofstream::binary);
+ if (t.is_open())
{
- FTextStream t(&f);
t << JAVASCRIPT_LICENSE_TEXT;
t << "var menudata={";
bool hasChildren = renderQuickLinksAsJs(t,root,TRUE);
if (hasChildren) t << "]";
- t << "}" << endl;
+ t << "}\n";
}
}
diff --git a/src/index.h b/src/index.h
index e11304e..a10cbc9 100644
--- a/src/index.h
+++ b/src/index.h
@@ -20,13 +20,12 @@
#include <vector>
#include <memory>
-#include <qcstring.h>
+#include "qcstring.h"
class Definition;
class DefinitionMutable;
class MemberDef;
class OutputList;
-class FTextStream;
/** \brief Abstract interface for index generators. */
class IndexIntf
@@ -37,14 +36,14 @@ class IndexIntf
virtual void finalize() = 0;
virtual void incContentsDepth() = 0;
virtual void decContentsDepth() = 0;
- virtual void addContentsItem(bool isDir, const char *name, const char *ref,
- const char *file, const char *anchor, bool separateIndex,
+ virtual void addContentsItem(bool isDir, const QCString &name, const QCString &ref,
+ const QCString &file, const QCString &anchor, bool separateIndex,
bool addToNavIndex,const Definition *def) = 0;
virtual void addIndexItem(const Definition *context,const MemberDef *md,
- const char *sectionAnchor,const char *title) = 0;
- virtual void addIndexFile(const char *name) = 0;
- virtual void addImageFile(const char *name) = 0;
- virtual void addStyleSheetFile(const char *name) = 0;
+ const QCString &sectionAnchor,const QCString &title) = 0;
+ virtual void addIndexFile(const QCString &name) = 0;
+ virtual void addImageFile(const QCString &name) = 0;
+ virtual void addStyleSheetFile(const QCString &name) = 0;
};
/** \brief A list of index interfaces.
@@ -94,17 +93,17 @@ class IndexList : public IndexIntf
{ if (m_enabled) foreach(&IndexIntf::incContentsDepth); }
void decContentsDepth()
{ if (m_enabled) foreach(&IndexIntf::decContentsDepth); }
- void addContentsItem(bool isDir, const char *name, const char *ref,
- const char *file, const char *anchor,bool separateIndex=FALSE,bool addToNavIndex=FALSE,
+ void addContentsItem(bool isDir, const QCString &name, const QCString &ref,
+ const QCString &file, const QCString &anchor,bool separateIndex=FALSE,bool addToNavIndex=FALSE,
const Definition *def=0)
{ if (m_enabled) foreach(&IndexIntf::addContentsItem,isDir,name,ref,file,anchor,separateIndex,addToNavIndex,def); }
- void addIndexItem(const Definition *context,const MemberDef *md,const char *sectionAnchor=0,const char *title=0)
+ void addIndexItem(const Definition *context,const MemberDef *md,const QCString &sectionAnchor=QCString(),const QCString &title=QCString())
{ if (m_enabled) foreach(&IndexIntf::addIndexItem,context,md,sectionAnchor,title); }
- void addIndexFile(const char *name)
+ void addIndexFile(const QCString &name)
{ if (m_enabled) foreach(&IndexIntf::addIndexFile,name); }
- void addImageFile(const char *name)
+ void addImageFile(const QCString &name)
{ if (m_enabled) foreach(&IndexIntf::addImageFile,name); }
- void addStyleSheetFile(const char *name)
+ void addStyleSheetFile(const QCString &name)
{ if (m_enabled) foreach(&IndexIntf::addStyleSheetFile,name); }
private:
@@ -120,6 +119,7 @@ enum IndexSections
isModuleIndex,
isDirIndex,
isNamespaceIndex,
+ isConceptIndex,
isClassHierarchyIndex,
isCompoundIndex,
isFileIndex,
@@ -128,6 +128,7 @@ enum IndexSections
isDirDocumentation,
isNamespaceDocumentation,
isClassDocumentation,
+ isConceptDocumentation,
isFileDocumentation,
isExampleDocumentation,
isPageDocumentation,
@@ -146,6 +147,7 @@ enum HighlightedItem
HLI_InterfaceHierarchy,
HLI_ExceptionHierarchy,
HLI_Classes,
+ HLI_Concepts,
HLI_Interfaces,
HLI_Structs,
HLI_Exceptions,
@@ -163,6 +165,7 @@ enum HighlightedItem
HLI_UserGroup,
HLI_ClassVisible,
+ HLI_ConceptVisible,
HLI_InterfaceVisible,
HLI_StructVisible,
HLI_ExceptionVisible,
@@ -239,6 +242,7 @@ extern int hierarchyExceptions;
extern int documentedFiles;
extern int documentedGroups;
extern int documentedNamespaces;
+extern int documentedConcepts;
extern int indexedPages;
extern int documentedClassMembers[CMHL_Total];
extern int documentedFileMembers[FMHL_Total];
@@ -247,11 +251,11 @@ extern int documentedDirs;
extern int documentedHtmlFiles;
extern int documentedPages;
-void startTitle(OutputList &ol,const char *fileName,const DefinitionMutable *def=0);
-void endTitle(OutputList &ol,const char *fileName,const char *name);
-void startFile(OutputList &ol,const char *name,const char *manName,
- const char *title,HighlightedItem hli=HLI_None,
- bool additionalIndices=FALSE,const char *altSidebarName=0);
+void startTitle(OutputList &ol,const QCString &fileName,const DefinitionMutable *def=0);
+void endTitle(OutputList &ol,const QCString &fileName,const QCString &name);
+void startFile(OutputList &ol,const QCString &name,const QCString &manName,
+ const QCString &title,HighlightedItem hli=HLI_None,
+ bool additionalIndices=FALSE,const QCString &altSidebarName=QCString());
void endFile(OutputList &ol,bool skipNavIndex=FALSE,bool skipEndContents=FALSE,
const QCString &navPath=QCString());
void endFileWithNavPath(const Definition *d,OutputList &ol);
diff --git a/src/language.cpp b/src/language.cpp
index 299c452..af2ca3d 100644
--- a/src/language.cpp
+++ b/src/language.cpp
@@ -152,11 +152,11 @@
#endif
#endif // !ENGLISH_ONLY
-#define L_EQUAL(a) !qstricmp(langName,a)
+#define L_EQUAL(a) !qstricmp(langName.data(),a)
Translator *theTranslator=0;
-bool setTranslator(const char *langName)
+bool setTranslator(const QCString &langName)
{
if (L_EQUAL("english"))
{
@@ -417,6 +417,6 @@ bool setTranslator(const char *langName)
}
QCString msg = theTranslator->updateNeededMessage();
- if (!msg.isEmpty()) warn_uncond("%s", msg.data());
+ if (!msg.isEmpty()) warn_uncond("%s", qPrint(msg));
return TRUE;
}
diff --git a/src/language.h b/src/language.h
index 7c8eef9..8f38bfc 100644
--- a/src/language.h
+++ b/src/language.h
@@ -1,12 +1,12 @@
/******************************************************************************
*
- *
+ *
*
* Copyright (C) 1997-2015 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
- * documentation under the terms of the GNU General Public License is hereby
- * granted. No representations are made about the suitability of this software
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
@@ -21,6 +21,6 @@
#include "translator.h"
extern Translator *theTranslator;
-extern bool setTranslator(const char *languageName);
+extern bool setTranslator(const QCString &languageName);
#endif
diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp
index 019030d..5bb695a 100644
--- a/src/latexdocvisitor.cpp
+++ b/src/latexdocvisitor.cpp
@@ -15,8 +15,10 @@
* input used in their production; they are not affected by this license.
*
*/
+
+#include <algorithm>
+
#include "htmlattrib.h"
-#include <qfileinfo.h>
#include "latexdocvisitor.h"
#include "latexgen.h"
#include "docparser.h"
@@ -35,6 +37,7 @@
#include "htmlentity.h"
#include "emoji.h"
#include "plantuml.h"
+#include "fileinfo.h"
const int maxLevels=5;
static const char *secLabels[maxLevels] =
@@ -46,10 +49,10 @@ static const char *getSectionName(int level)
int l = level;
if (compactLatex) l++;
if (Doxygen::insideMainPage) l--;
- return secLabels[QMIN(maxLevels-1,l)];
+ return secLabels[std::min(maxLevels-1,l)];
}
-static void visitPreStart(FTextStream &t, bool hasCaption, QCString name, QCString width, QCString height, bool inlineImage = FALSE)
+static void visitPreStart(TextStream &t, bool hasCaption, QCString name, QCString width, QCString height, bool inlineImage = FALSE)
{
if (inlineImage)
{
@@ -119,7 +122,7 @@ static void visitPreStart(FTextStream &t, bool hasCaption, QCString name, QCStr
-static void visitPostEnd(FTextStream &t, bool hasCaption, bool inlineImage = FALSE)
+static void visitPostEnd(TextStream &t, bool hasCaption, bool inlineImage = FALSE)
{
if (inlineImage)
{
@@ -173,8 +176,8 @@ QCString LatexDocVisitor::escapeMakeIndexChars(const char *s)
}
-LatexDocVisitor::LatexDocVisitor(FTextStream &t,LatexCodeGenerator &ci,
- const char *langExt,bool insideTabbing)
+LatexDocVisitor::LatexDocVisitor(TextStream &t,LatexCodeGenerator &ci,
+ const QCString &langExt,bool insideTabbing)
: DocVisitor(DocVisitor_Latex), m_t(t), m_ci(ci), m_insidePre(FALSE),
m_insideItem(FALSE), m_hide(FALSE), m_hideCaption(FALSE), m_insideTabbing(insideTabbing),
m_langExt(langExt)
@@ -375,25 +378,25 @@ void LatexDocVisitor::visit(DocVerbatim *s)
QCString fileName(4096);
fileName.sprintf("%s%d%s",
- (Config_getString(LATEX_OUTPUT)+"/inline_dotgraph_").data(),
+ qPrint(Config_getString(LATEX_OUTPUT)+"/inline_dotgraph_"),
dotindex++,
".dot"
);
- QFile file(fileName);
- if (!file.open(IO_WriteOnly))
+ std::ofstream file(fileName.str(),std::ofstream::out | std::ofstream::binary);
+ if (!file.is_open())
{
- err("Could not open file %s for writing\n",fileName.data());
+ err("Could not open file %s for writing\n",qPrint(fileName));
}
else
{
- file.writeBlock( s->text(), s->text().length() );
+ file.write( s->text().data(), s->text().length() );
file.close();
startDotFile(fileName,s->width(),s->height(),s->hasCaption());
visitCaption(this, s->children());
endDotFile(s->hasCaption());
- if (Config_getBool(DOT_CLEANUP)) file.remove();
+ if (Config_getBool(DOT_CLEANUP)) Dir().remove(fileName.str());
}
}
break;
@@ -403,25 +406,26 @@ void LatexDocVisitor::visit(DocVerbatim *s)
QCString baseName(4096);
baseName.sprintf("%s%d",
- (Config_getString(LATEX_OUTPUT)+"/inline_mscgraph_").data(),
+ qPrint(Config_getString(LATEX_OUTPUT)+"/inline_mscgraph_"),
mscindex++
);
- QFile file(baseName+".msc");
- if (!file.open(IO_WriteOnly))
+ std::string fileName = baseName.str()+".msc";
+ std::ofstream file(fileName,std::ofstream::out | std::ofstream::binary);
+ if (!file.is_open())
{
- err("Could not open file %s.msc for writing\n",baseName.data());
+ err("Could not open file %s for writing\n",fileName.c_str());
}
else
{
QCString text = "msc {";
text+=s->text();
text+="}";
- file.writeBlock( text, text.length() );
+ file.write( text.data(), text.length() );
file.close();
writeMscFile(baseName, s);
- if (Config_getBool(DOT_CLEANUP)) file.remove();
+ if (Config_getBool(DOT_CLEANUP)) Dir().remove(fileName);
}
}
break;
@@ -439,11 +443,11 @@ void LatexDocVisitor::visit(DocVerbatim *s)
void LatexDocVisitor::visit(DocAnchor *anc)
{
if (m_hide) return;
- m_t << "\\label{" << stripPath(anc->file()) << "_" << anc->anchor() << "}%" << endl;
+ m_t << "\\label{" << stripPath(anc->file()) << "_" << anc->anchor() << "}%\n";
if (!anc->file().isEmpty() && Config_getBool(PDF_HYPERLINKS))
{
m_t << "\\Hypertarget{" << stripPath(anc->file()) << "_" << anc->anchor()
- << "}%" << endl;
+ << "}%\n";
}
}
@@ -456,8 +460,8 @@ void LatexDocVisitor::visit(DocInclude *inc)
case DocInclude::IncWithLines:
{
m_ci.startCodeFragment("DoxyCodeInclude");
- QFileInfo cfi( inc->file() );
- FileDef *fd = createFileDef( cfi.dirPath().utf8(), cfi.fileName().utf8() );
+ FileInfo cfi( inc->file().str() );
+ FileDef *fd = createFileDef( cfi.dirPath(), cfi.fileName() );
getCodeParser(inc->extension()).parseCode(m_ci,inc->context(),
inc->text(),
langExt,
@@ -521,8 +525,8 @@ void LatexDocVisitor::visit(DocInclude *inc)
break;
case DocInclude::SnipWithLines:
{
- QFileInfo cfi( inc->file() );
- FileDef *fd = createFileDef( cfi.dirPath().utf8(), cfi.fileName().utf8() );
+ FileInfo cfi( inc->file().str() );
+ FileDef *fd = createFileDef( cfi.dirPath(), cfi.fileName() );
m_ci.startCodeFragment("DoxyCodeInclude");
getCodeParser(inc->extension()).parseCode(m_ci,
inc->context(),
@@ -552,7 +556,7 @@ void LatexDocVisitor::visit(DocInclude *inc)
void LatexDocVisitor::visit(DocIncOperator *op)
{
//printf("DocIncOperator: type=%d first=%d, last=%d text='%s'\n",
- // op->type(),op->isFirst(),op->isLast(),op->text().data());
+ // op->type(),op->isFirst(),op->isLast(),qPrint(op->text()));
if (op->isFirst())
{
if (!m_hide) m_ci.startCodeFragment("DoxyCodeInclude");
@@ -570,8 +574,8 @@ void LatexDocVisitor::visit(DocIncOperator *op)
FileDef *fd = 0;
if (!op->includeFileName().isEmpty())
{
- QFileInfo cfi( op->includeFileName() );
- fd = createFileDef( cfi.dirPath().utf8(), cfi.fileName().utf8() );
+ FileInfo cfi( op->includeFileName().str() );
+ fd = createFileDef( cfi.dirPath(), cfi.fileName() );
}
getCodeParser(locLangExt).parseCode(m_ci,op->context(),op->text(),langExt,
@@ -595,7 +599,7 @@ void LatexDocVisitor::visit(DocIncOperator *op)
}
else
{
- if (!m_hide) m_t << endl;
+ if (!m_hide) m_t << "\n";
}
}
@@ -702,7 +706,7 @@ void LatexDocVisitor::visitPost(DocPara *p)
!(p->parent() && // and for parameter sections
p->parent()->kind()==DocNode::Kind_ParamSect
)
- ) m_t << endl << endl;
+ ) m_t << "\n\n";
}
void LatexDocVisitor::visitPre(DocRoot *)
@@ -873,13 +877,13 @@ void LatexDocVisitor::visitPost(DocTitle *)
void LatexDocVisitor::visitPre(DocSimpleList *)
{
if (m_hide) return;
- m_t << "\\begin{DoxyItemize}" << endl;
+ m_t << "\\begin{DoxyItemize}\n";
}
void LatexDocVisitor::visitPost(DocSimpleList *)
{
if (m_hide) return;
- m_t << "\\end{DoxyItemize}" << endl;
+ m_t << "\\end{DoxyItemize}\n";
}
void LatexDocVisitor::visitPre(DocSimpleListItem *)
@@ -900,8 +904,8 @@ void LatexDocVisitor::visitPre(DocSection *s)
m_t << "\\hypertarget{" << stripPath(s->file()) << "_" << s->anchor() << "}{}";
}
m_t << "\\" << getSectionName(s->level()) << "{";
- filter(convertCharEntitiesToUTF8(s->title().data()));
- m_t << "}\\label{" << stripPath(s->file()) << "_" << s->anchor() << "}" << endl;
+ filter(convertCharEntitiesToUTF8(s->title()));
+ m_t << "}\\label{" << stripPath(s->file()) << "_" << s->anchor() << "}\n";
}
void LatexDocVisitor::visitPost(DocSection *)
@@ -945,7 +949,7 @@ void LatexDocVisitor::visitPost(DocHtmlListItem *)
//void LatexDocVisitor::visitPost(DocHtmlPre *)
//{
// m_insidePre=FALSE;
-// m_t << "\\end{alltt}\\normalsize " << endl;
+// m_t << "\\end{alltt}\\normalsize \n";
//}
@@ -1041,7 +1045,7 @@ static bool tableIsNested(const DocNode *n)
return isNested;
}
-static void writeStartTableCommand(FTextStream &t,const DocNode *n,int cols)
+static void writeStartTableCommand(TextStream &t,const DocNode *n,int cols)
{
if (tableIsNested(n))
{
@@ -1054,7 +1058,7 @@ static void writeStartTableCommand(FTextStream &t,const DocNode *n,int cols)
//return isNested ? "TabularNC" : "TabularC";
}
-static void writeEndTableCommand(FTextStream &t,const DocNode *n)
+static void writeEndTableCommand(TextStream &t,const DocNode *n)
{
if (tableIsNested(n))
{
@@ -1080,7 +1084,7 @@ void LatexDocVisitor::visitPre(DocHtmlTable *t)
m_t << "\\hypertarget{" << stripPath(c->file()) << "_" << c->anchor()
<< "}{}";
}
- m_t << endl;
+ m_t << "\n";
}
writeStartTableCommand(m_t,t->parent(),(uint)t->numColumns());
@@ -1199,14 +1203,14 @@ void LatexDocVisitor::visitPost(DocHtmlRow *row)
{
if (firstRow())
{
- m_t << "\\endfirsthead" << endl;
- m_t << "\\hline" << endl;
- m_t << "\\endfoot" << endl;
- m_t << "\\hline" << endl;
+ m_t << "\\endfirsthead\n";
+ m_t << "\\hline\n";
+ m_t << "\\endfoot\n";
+ m_t << "\\hline\n";
}
else
{
- m_t << "\\endhead" << endl;
+ m_t << "\\endhead\n";
}
}
}
@@ -1328,7 +1332,7 @@ void LatexDocVisitor::visitPre(DocInternal *)
void LatexDocVisitor::visitPost(DocInternal *)
{
if (m_hide) return;
- //m_t << "\\end{DoxyInternal}" << endl;
+ //m_t << "\\end{DoxyInternal}\n";
}
void LatexDocVisitor::visitPre(DocHRef *href)
@@ -1446,7 +1450,7 @@ void LatexDocVisitor::visitPre(DocRef *ref)
// ref->anchor() for LaTeX/RTF
if (ref->isSubPage())
{
- startLink(ref->ref(),0,ref->anchor());
+ startLink(ref->ref(),QCString(),ref->anchor());
}
else
{
@@ -1460,7 +1464,7 @@ void LatexDocVisitor::visitPost(DocRef *ref)
if (m_hide) return;
if (ref->isSubPage())
{
- endLink(ref->ref(),0,ref->anchor());
+ endLink(ref->ref(),QCString(),ref->anchor());
}
else
{
@@ -1487,23 +1491,23 @@ void LatexDocVisitor::visitPost(DocSecRefItem *ref)
{
m_t << "}}";
}
- m_t << "}{\\ref{" << ref->file() << "_" << ref->anchor() << "}}{}" << endl;
+ m_t << "}{\\ref{" << ref->file() << "_" << ref->anchor() << "}}{}\n";
}
void LatexDocVisitor::visitPre(DocSecRefList *)
{
if (m_hide) return;
- m_t << "\\footnotesize" << endl;
- m_t << "\\begin{multicols}{2}" << endl;
- m_t << "\\begin{DoxyCompactList}" << endl;
+ m_t << "\\footnotesize\n";
+ m_t << "\\begin{multicols}{2}\n";
+ m_t << "\\begin{DoxyCompactList}\n";
}
void LatexDocVisitor::visitPost(DocSecRefList *)
{
if (m_hide) return;
- m_t << "\\end{DoxyCompactList}" << endl;
- m_t << "\\end{multicols}" << endl;
- m_t << "\\normalsize" << endl;
+ m_t << "\\end{DoxyCompactList}\n";
+ m_t << "\\end{multicols}\n";
+ m_t << "\\normalsize\n";
}
void LatexDocVisitor::visitPre(DocParamSect *s)
@@ -1661,8 +1665,8 @@ void LatexDocVisitor::visitPost(DocParamList *pl)
parentType==DocParamSect::TemplateParam;
if (useTable)
{
- m_t << "\\\\" << endl
- << "\\hline" << endl;
+ m_t << "\\\\\n"
+ << "\\hline\n";
}
}
@@ -1673,7 +1677,7 @@ void LatexDocVisitor::visitPre(DocXRefItem *x)
if (x->title().isEmpty()) return;
m_t << "\\begin{DoxyRefDesc}{";
filter(x->title());
- m_t << "}" << endl;
+ m_t << "}\n";
bool anonymousEnum = x->file()=="@";
m_t << "\\item[";
if (pdfHyperlinks && !anonymousEnum)
@@ -1698,19 +1702,19 @@ void LatexDocVisitor::visitPost(DocXRefItem *x)
{
if (m_hide) return;
if (x->title().isEmpty()) return;
- m_t << "\\end{DoxyRefDesc}" << endl;
+ m_t << "\\end{DoxyRefDesc}\n";
}
void LatexDocVisitor::visitPre(DocInternalRef *ref)
{
if (m_hide) return;
- startLink(0,ref->file(),ref->anchor());
+ startLink(QCString(),ref->file(),ref->anchor());
}
void LatexDocVisitor::visitPost(DocInternalRef *ref)
{
if (m_hide) return;
- endLink(0,ref->file(),ref->anchor());
+ endLink(QCString(),ref->file(),ref->anchor());
}
void LatexDocVisitor::visitPre(DocText *)
@@ -1724,13 +1728,13 @@ void LatexDocVisitor::visitPost(DocText *)
void LatexDocVisitor::visitPre(DocHtmlBlockQuote *)
{
if (m_hide) return;
- m_t << "\\begin{quote}" << endl;
+ m_t << "\\begin{quote}\n";
}
void LatexDocVisitor::visitPost(DocHtmlBlockQuote *)
{
if (m_hide) return;
- m_t << "\\end{quote}" << endl;
+ m_t << "\\end{quote}\n";
}
void LatexDocVisitor::visitPre(DocVhdlFlow *)
@@ -1753,7 +1757,7 @@ void LatexDocVisitor::visitPost(DocParBlock *)
if (m_hide) return;
}
-void LatexDocVisitor::filter(const char *str)
+void LatexDocVisitor::filter(const QCString &str)
{
filterLatexString(m_t,str,
m_insideTabbing,
diff --git a/src/latexdocvisitor.h b/src/latexdocvisitor.h
index cd6c442..696147f 100644
--- a/src/latexdocvisitor.h
+++ b/src/latexdocvisitor.h
@@ -18,18 +18,18 @@
#include <stack>
+#include "qcstring.h"
#include "docvisitor.h"
-#include <qcstring.h>
-class FTextStream;
class LatexCodeGenerator;
+class TextStream;
/*! @brief Concrete visitor implementation for LaTeX output. */
class LatexDocVisitor : public DocVisitor
{
public:
- LatexDocVisitor(FTextStream &t,LatexCodeGenerator &ci,
- const char *langExt,bool insideTabbing);
+ LatexDocVisitor(TextStream &t,LatexCodeGenerator &ci,
+ const QCString &langExt,bool insideTabbing);
//--------------------------------------
// visitor functions for leaf nodes
@@ -152,7 +152,7 @@ class LatexDocVisitor : public DocVisitor
// helper functions
//--------------------------------------
- void filter(const char *str);
+ void filter(const QCString &str);
void startLink(const QCString &ref,const QCString &file,
const QCString &anchor,bool refToTable=FALSE);
void endLink(const QCString &ref,const QCString &file,
@@ -177,7 +177,7 @@ class LatexDocVisitor : public DocVisitor
// state variables
//--------------------------------------
- FTextStream &m_t;
+ TextStream &m_t;
LatexCodeGenerator &m_ci;
bool m_insidePre;
bool m_insideItem;
diff --git a/src/latexgen.cpp b/src/latexgen.cpp
index e73f6b8..fdcb993 100644
--- a/src/latexgen.cpp
+++ b/src/latexgen.cpp
@@ -15,9 +15,9 @@
*
*/
-#include <stdlib.h>
+#include <cstdlib>
+#include <sstream>
-#include <qdir.h>
#include "latexgen.h"
#include "config.h"
#include "message.h"
@@ -43,28 +43,23 @@
#include "filename.h"
#include "resourcemgr.h"
#include "portable.h"
+#include "fileinfo.h"
+#include "utf8.h"
static QCString g_header;
static QCString g_footer;
-LatexCodeGenerator::LatexCodeGenerator(FTextStream &t,const QCString &relPath,const QCString &sourceFileName)
- : m_relPath(relPath), m_sourceFileName(sourceFileName)
+LatexCodeGenerator::LatexCodeGenerator(TextStream &t,const QCString &relPath,const QCString &sourceFileName)
+ : m_t(t), m_relPath(relPath), m_sourceFileName(sourceFileName)
{
m_prettyCode=Config_getBool(LATEX_SOURCE_CODE);
- setTextStream(t);
}
-LatexCodeGenerator::LatexCodeGenerator()
+LatexCodeGenerator::LatexCodeGenerator(TextStream &t) : m_t(t)
{
m_prettyCode=Config_getBool(LATEX_SOURCE_CODE);
}
-void LatexCodeGenerator::setTextStream(FTextStream &t)
-{
- m_streamSet = t.device()!=0;
- m_t.setDevice(t.device());
-}
-
void LatexCodeGenerator::setRelativePath(const QCString &path)
{
m_relPath = path;
@@ -75,11 +70,11 @@ void LatexCodeGenerator::setSourceFileName(const QCString &name)
m_sourceFileName = name;
}
-void LatexCodeGenerator::codify(const char *str)
+void LatexCodeGenerator::codify(const QCString &str)
{
- if (str)
+ if (!str.isEmpty())
{
- const signed char *p=(const signed char*)str;
+ const signed char *p=(const signed char*)str.data();
signed char c;
//char cs[5];
int spacesToNextTabStop;
@@ -117,26 +112,15 @@ void LatexCodeGenerator::codify(const char *str)
#undef COPYCHAR
// helper macro to copy a single utf8 character, dealing with multibyte chars.
#define COPYCHAR() do { \
- if (lresult < (i + 5)) \
+ int bytes = getUTF8CharNumBytes(c); \
+ if (lresult < (i + bytes + 1)) \
{ \
lresult += 512; \
result = (signed char *)realloc(result, lresult); \
} \
- result[i++]=c; p++; \
- if (c<0) /* multibyte utf-8 character */ \
+ for (int j=0; j<bytes && *p; j++) \
{ \
- /* 1xxx.xxxx: >=2 byte character */ \
result[i++]=*p++; \
- if (((uchar)c&0xE0)==0xE0) \
- { \
- /* 111x.xxxx: >=3 byte character */ \
- result[i++]=*p++; \
- } \
- if (((uchar)c&0xF0)==0xF0) \
- { \
- /* 1111.xxxx: 4 byte character */ \
- result[i++]=*p++; \
- } \
} \
m_col++; \
} while(0)
@@ -164,19 +148,19 @@ void LatexCodeGenerator::codify(const char *str)
}
-void LatexCodeGenerator::writeCodeLink(const char *ref,const char *f,
- const char *anchor,const char *name,
- const char *)
+void LatexCodeGenerator::writeCodeLink(const QCString &ref,const QCString &f,
+ const QCString &anchor,const QCString &name,
+ const QCString &)
{
bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
bool usePDFLatex = Config_getBool(USE_PDFLATEX);
- int l = qstrlen(name);
- if (!ref && usePDFLatex && pdfHyperlinks)
+ uint l = name.length();
+ if (ref.isEmpty() && usePDFLatex && pdfHyperlinks)
{
m_t << "\\mbox{\\hyperlink{";
- if (f) m_t << stripPath(f);
- if (f && anchor) m_t << "_";
- if (anchor) m_t << anchor;
+ if (!f.isEmpty()) m_t << stripPath(f);
+ if (!f.isEmpty() && !anchor.isEmpty()) m_t << "_";
+ if (!anchor.isEmpty()) m_t << anchor;
m_t << "}{";
codify(name);
m_t << "}}";
@@ -188,7 +172,7 @@ void LatexCodeGenerator::writeCodeLink(const char *ref,const char *f,
m_col+=l;
}
-void LatexCodeGenerator::writeLineNumber(const char *ref,const char *fileName,const char *anchor,int l)
+void LatexCodeGenerator::writeLineNumber(const QCString &ref,const QCString &fileName,const QCString &anchor,int l)
{
bool usePDFLatex = Config_getBool(USE_PDFLATEX);
bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
@@ -202,7 +186,7 @@ void LatexCodeGenerator::writeLineNumber(const char *ref,const char *fileName,co
QCString lineNumber;
lineNumber.sprintf("%05d",l);
- if (fileName && !m_sourceFileName.isEmpty())
+ if (!fileName.isEmpty() && !m_sourceFileName.isEmpty())
{
QCString lineAnchor;
lineAnchor.sprintf("_l%05d",l);
@@ -212,7 +196,7 @@ void LatexCodeGenerator::writeLineNumber(const char *ref,const char *fileName,co
{
m_t << "\\Hypertarget{" << stripPath(lineAnchor) << "}";
}
- writeCodeLink(ref,fileName,anchor,lineNumber,0);
+ writeCodeLink(ref,fileName,anchor,lineNumber,QCString());
}
else
{
@@ -248,7 +232,7 @@ void LatexCodeGenerator::endCodeLine()
codify("\n");
}
-void LatexCodeGenerator::startFontClass(const char *name)
+void LatexCodeGenerator::startFontClass(const QCString &name)
{
m_t << "\\textcolor{" << name << "}{";
}
@@ -258,12 +242,12 @@ void LatexCodeGenerator::endFontClass()
m_t << "}";
}
-void LatexCodeGenerator::startCodeFragment(const char *style)
+void LatexCodeGenerator::startCodeFragment(const QCString &style)
{
m_t << "\n\\begin{" << style << "}{" << m_usedTableLevel << "}\n";
}
-void LatexCodeGenerator::endCodeFragment(const char *style)
+void LatexCodeGenerator::endCodeFragment(const QCString &style)
{
//endCodeLine checks is there is still an open code line, if so closes it.
endCodeLine();
@@ -274,12 +258,12 @@ void LatexCodeGenerator::endCodeFragment(const char *style)
//-------------------------------
-LatexGenerator::LatexGenerator() : OutputGenerator(Config_getString(LATEX_OUTPUT))
+LatexGenerator::LatexGenerator() : OutputGenerator(Config_getString(LATEX_OUTPUT)), m_codeGen(m_t)
{
//printf("LatexGenerator::LatexGenerator() m_insideTabbing=FALSE\n");
}
-LatexGenerator::LatexGenerator(const LatexGenerator &og) : OutputGenerator(og)
+LatexGenerator::LatexGenerator(const LatexGenerator &og) : OutputGenerator(og), m_codeGen(og.m_codeGen)
{
}
@@ -302,94 +286,94 @@ static void writeLatexMakefile()
{
bool generateBib = !CitationManager::instance().isEmpty();
QCString fileName=Config_getString(LATEX_OUTPUT)+"/Makefile";
- QFile file(fileName);
- if (!file.open(IO_WriteOnly))
+ std::ofstream f(fileName.str(),std::ofstream::out | std::ofstream::binary);
+ if (!f.is_open())
{
- term("Could not open file %s for writing\n",fileName.data());
+ term("Could not open file %s for writing\n",qPrint(fileName));
}
+ TextStream t(&f);
// inserted by KONNO Akihisa <konno@researchers.jp> 2002-03-05
QCString latex_command = theTranslator->latexCommandName();
QCString mkidx_command = Config_getString(MAKEINDEX_CMD_NAME);
// end insertion by KONNO Akihisa <konno@researchers.jp> 2002-03-05
- FTextStream t(&file);
if (!Config_getBool(USE_PDFLATEX)) // use plain old latex
{
- t << "LATEX_CMD=" << latex_command << endl
- << endl
- << "all: refman.dvi" << endl
- << endl
- << "ps: refman.ps" << endl
- << endl
- << "pdf: refman.pdf" << endl
- << endl
- << "ps_2on1: refman_2on1.ps" << endl
- << endl
- << "pdf_2on1: refman_2on1.pdf" << endl
- << endl
- << "refman.ps: refman.dvi" << endl
- << "\tdvips -o refman.ps refman.dvi" << endl
- << endl;
- t << "refman.pdf: refman.ps" << endl;
- t << "\tps2pdf refman.ps refman.pdf" << endl << endl;
- t << "refman.dvi: clean refman.tex doxygen.sty" << endl
- << "\techo \"Running latex...\"" << endl
- << "\t$(LATEX_CMD) refman.tex" << endl
- << "\techo \"Running makeindex...\"" << endl
- << "\t" << mkidx_command << " refman.idx" << endl;
+ t << "LATEX_CMD=" << latex_command << "\n"
+ << "\n"
+ << "all: refman.dvi\n"
+ << "\n"
+ << "ps: refman.ps\n"
+ << "\n"
+ << "pdf: refman.pdf\n"
+ << "\n"
+ << "ps_2on1: refman_2on1.ps\n"
+ << "\n"
+ << "pdf_2on1: refman_2on1.pdf\n"
+ << "\n"
+ << "refman.ps: refman.dvi\n"
+ << "\tdvips -o refman.ps refman.dvi\n"
+ << "\n";
+ t << "refman.pdf: refman.ps\n";
+ t << "\tps2pdf refman.ps refman.pdf\n\n";
+ t << "refman.dvi: clean refman.tex doxygen.sty\n"
+ << "\techo \"Running latex...\"\n"
+ << "\t$(LATEX_CMD) refman.tex\n"
+ << "\techo \"Running makeindex...\"\n"
+ << "\t" << mkidx_command << " refman.idx\n";
if (generateBib)
{
- t << "\techo \"Running bibtex...\"" << endl;
- t << "\tbibtex refman" << endl;
- t << "\techo \"Rerunning latex....\"" << endl;
- t << "\t$(LATEX_CMD) refman.tex" << endl;
+ t << "\techo \"Running bibtex...\"\n";
+ t << "\tbibtex refman\n";
+ t << "\techo \"Rerunning latex....\"\n";
+ t << "\t$(LATEX_CMD) refman.tex\n";
}
- t << "\techo \"Rerunning latex....\"" << endl
- << "\t$(LATEX_CMD) refman.tex" << endl
- << "\tlatex_count=8 ; \\" << endl
- << "\twhile egrep -s 'Rerun (LaTeX|to get cross-references right)' refman.log && [ $$latex_count -gt 0 ] ;\\" << endl
- << "\t do \\" << endl
- << "\t echo \"Rerunning latex....\" ;\\" << endl
- << "\t $(LATEX_CMD) refman.tex ; \\" << endl
- << "\t latex_count=`expr $$latex_count - 1` ;\\" << endl
- << "\t done" << endl
- << "\t" << mkidx_command << " refman.idx" << endl
- << "\t$(LATEX_CMD) refman.tex" << endl << endl
- << "refman_2on1.ps: refman.ps" << endl
- << "\tpsnup -2 refman.ps >refman_2on1.ps" << endl
- << endl
- << "refman_2on1.pdf: refman_2on1.ps" << endl
- << "\tps2pdf refman_2on1.ps refman_2on1.pdf" << endl;
+ t << "\techo \"Rerunning latex....\"\n"
+ << "\t$(LATEX_CMD) refman.tex\n"
+ << "\tlatex_count=8 ; \\\n"
+ << "\twhile egrep -s 'Rerun (LaTeX|to get cross-references right)' refman.log && [ $$latex_count -gt 0 ] ;\\\n"
+ << "\t do \\\n"
+ << "\t echo \"Rerunning latex....\" ;\\\n"
+ << "\t $(LATEX_CMD) refman.tex ; \\\n"
+ << "\t latex_count=`expr $$latex_count - 1` ;\\\n"
+ << "\t done\n"
+ << "\t" << mkidx_command << " refman.idx\n"
+ << "\t$(LATEX_CMD) refman.tex\n\n"
+ << "refman_2on1.ps: refman.ps\n"
+ << "\tpsnup -2 refman.ps >refman_2on1.ps\n"
+ << "\n"
+ << "refman_2on1.pdf: refman_2on1.ps\n"
+ << "\tps2pdf refman_2on1.ps refman_2on1.pdf\n";
}
else // use pdflatex for higher quality output
{
- t << "LATEX_CMD=" << latex_command << endl
- << endl;
- t << "all: refman.pdf" << endl << endl
- << "pdf: refman.pdf" << endl << endl;
- t << "refman.pdf: clean refman.tex" << endl;
- t << "\t$(LATEX_CMD) refman" << endl;
- t << "\t" << mkidx_command << " refman.idx" << endl;
+ t << "LATEX_CMD=" << latex_command << "\n"
+ << "\n";
+ t << "all: refman.pdf\n\n"
+ << "pdf: refman.pdf\n\n";
+ t << "refman.pdf: clean refman.tex\n";
+ t << "\t$(LATEX_CMD) refman\n";
+ t << "\t" << mkidx_command << " refman.idx\n";
if (generateBib)
{
- t << "\tbibtex refman" << endl;
- t << "\t$(LATEX_CMD) refman" << endl;
+ t << "\tbibtex refman\n";
+ t << "\t$(LATEX_CMD) refman\n";
}
- t << "\t$(LATEX_CMD) refman" << endl
- << "\tlatex_count=8 ; \\" << endl
- << "\twhile egrep -s 'Rerun (LaTeX|to get cross-references right)' refman.log && [ $$latex_count -gt 0 ] ;\\" << endl
- << "\t do \\" << endl
- << "\t echo \"Rerunning latex....\" ;\\" << endl
- << "\t $(LATEX_CMD) refman ;\\" << endl
- << "\t latex_count=`expr $$latex_count - 1` ;\\" << endl
- << "\t done" << endl
- << "\t" << mkidx_command << " refman.idx" << endl
- << "\t$(LATEX_CMD) refman" << endl << endl;
- }
-
- t << endl
- << "clean:" << endl
+ t << "\t$(LATEX_CMD) refman\n"
+ << "\tlatex_count=8 ; \\\n"
+ << "\twhile egrep -s 'Rerun (LaTeX|to get cross-references right)' refman.log && [ $$latex_count -gt 0 ] ;\\\n"
+ << "\t do \\\n"
+ << "\t echo \"Rerunning latex....\" ;\\\n"
+ << "\t $(LATEX_CMD) refman ;\\\n"
+ << "\t latex_count=`expr $$latex_count - 1` ;\\\n"
+ << "\t done\n"
+ << "\t" << mkidx_command << " refman.idx\n"
+ << "\t$(LATEX_CMD) refman\n\n";
+ }
+
+ t << "\n"
+ << "clean:\n"
<< "\trm -f "
- << "*.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log *.out *.brf *.blg *.bbl refman.pdf" << endl;
+ << "*.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log *.out *.brf *.blg *.bbl refman.pdf\n";
}
static void writeMakeBat()
@@ -399,80 +383,79 @@ static void writeMakeBat()
QCString fileName=dir+"/make.bat";
QCString latex_command = theTranslator->latexCommandName();
QCString mkidx_command = Config_getString(MAKEINDEX_CMD_NAME);
- QFile file(fileName);
bool generateBib = !CitationManager::instance().isEmpty();
- if (!file.open(IO_WriteOnly))
+ std::ofstream t(fileName.str(),std::ofstream::out | std::ofstream::binary);
+ if (!t.is_open())
{
- term("Could not open file %s for writing\n",fileName.data());
+ term("Could not open file %s for writing\n",qPrint(fileName));
}
- FTextStream t(&file);
- t << "set Dir_Old=%cd%\n";
- t << "cd /D %~dp0\n\n";
- t << "del /s /f *.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log *.out *.brf *.blg *.bbl refman.pdf\n\n";
+ t << "set Dir_Old=%cd%\r\n";
+ t << "cd /D %~dp0\r\n\r\n";
+ t << "del /s /f *.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log *.out *.brf *.blg *.bbl refman.pdf\r\n\r\n";
if (!Config_getBool(USE_PDFLATEX)) // use plain old latex
{
- t << "set LATEX_CMD=" << latex_command << "\n";
- t << "%LATEX_CMD% refman.tex\n";
- t << "echo ----\n";
- t << mkidx_command << " refman.idx\n";
+ t << "set LATEX_CMD=" << latex_command << "\r\n";
+ t << "%LATEX_CMD% refman.tex\r\n";
+ t << "echo ----\r\n";
+ t << mkidx_command << " refman.idx\r\n";
if (generateBib)
{
- t << "bibtex refman\n";
- t << "echo ----\n";
- t << "\t%LATEX_CMD% refman.tex\n";
+ t << "bibtex refman\r\n";
+ t << "echo ----\r\n";
+ t << "\t%LATEX_CMD% refman.tex\r\n";
}
- t << "setlocal enabledelayedexpansion\n";
- t << "set count=8\n";
- t << ":repeat\n";
- t << "set content=X\n";
- t << "for /F \"tokens=*\" %%T in ( 'findstr /C:\"Rerun LaTeX\" refman.log' ) do set content=\"%%~T\"\n";
- t << "if !content! == X for /F \"tokens=*\" %%T in ( 'findstr /C:\"Rerun to get cross-references right\" refman.log' ) do set content=\"%%~T\"\n";
- t << "if !content! == X goto :skip\n";
- t << "set /a count-=1\n";
- t << "if !count! EQU 0 goto :skip\n\n";
- t << "echo ----\n";
- t << "%LATEX_CMD% refman.tex\n";
- t << "goto :repeat\n";
- t << ":skip\n";
- t << "endlocal\n";
- t << mkidx_command << " refman.idx\n";
- t << "%LATEX_CMD% refman.tex\n";
- t << "dvips -o refman.ps refman.dvi\n";
+ t << "setlocal enabledelayedexpansion\r\n";
+ t << "set count=8\r\n";
+ t << ":repeat\r\n";
+ t << "set content=X\r\n";
+ t << "for /F \"tokens=*\" %%T in ( 'findstr /C:\"Rerun LaTeX\" refman.log' ) do set content=\"%%~T\"\r\n";
+ t << "if !content! == X for /F \"tokens=*\" %%T in ( 'findstr /C:\"Rerun to get cross-references right\" refman.log' ) do set content=\"%%~T\"\r\n";
+ t << "if !content! == X goto :skip\r\n";
+ t << "set /a count-=1\r\n";
+ t << "if !count! EQU 0 goto :skip\r\n\r\n";
+ t << "echo ----\r\n";
+ t << "%LATEX_CMD% refman.tex\r\n";
+ t << "goto :repeat\r\n";
+ t << ":skip\r\n";
+ t << "endlocal\r\n";
+ t << mkidx_command << " refman.idx\r\n";
+ t << "%LATEX_CMD% refman.tex\r\n";
+ t << "dvips -o refman.ps refman.dvi\r\n";
t << Portable::ghostScriptCommand();
t << " -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite "
- "-sOutputFile=refman.pdf -c save pop -f refman.ps\n";
+ "-sOutputFile=refman.pdf -c save pop -f refman.ps\r\n";
}
else // use pdflatex
{
- t << "set LATEX_CMD=" << latex_command << "\n";
- t << "%LATEX_CMD% refman\n";
- t << "echo ----\n";
- t << mkidx_command << " refman.idx\n";
+ t << "set LATEX_CMD=" << latex_command << "\r\n";
+ t << "%LATEX_CMD% refman\r\n";
+ t << "echo ----\r\n";
+ t << mkidx_command << " refman.idx\r\n";
if (generateBib)
{
- t << "bibtex refman" << endl;
- t << "%LATEX_CMD% refman" << endl;
+ t << "bibtex refman\r\n";
+ t << "%LATEX_CMD% refman\r\n";
}
- t << "echo ----\n";
- t << "%LATEX_CMD% refman\n\n";
- t << "setlocal enabledelayedexpansion\n";
- t << "set count=8\n";
- t << ":repeat\n";
- t << "set content=X\n";
- t << "for /F \"tokens=*\" %%T in ( 'findstr /C:\"Rerun LaTeX\" refman.log' ) do set content=\"%%~T\"\n";
- t << "if !content! == X for /F \"tokens=*\" %%T in ( 'findstr /C:\"Rerun to get cross-references right\" refman.log' ) do set content=\"%%~T\"\n";
- t << "if !content! == X goto :skip\n";
- t << "set /a count-=1\n";
- t << "if !count! EQU 0 goto :skip\n\n";
- t << "echo ----\n";
- t << "%LATEX_CMD% refman\n";
- t << "goto :repeat\n";
- t << ":skip\n";
- t << "endlocal\n";
- t << mkidx_command << " refman.idx\n";
- t << "%LATEX_CMD% refman\n";
- t << "cd /D %Dir_Old%\n";
- t << "set Dir_Old=\n";
+ t << "echo ----\r\n";
+ t << "%LATEX_CMD% refman\r\n\r\n";
+ t << "setlocal enabledelayedexpansion\r\n";
+ t << "set count=8\r\n";
+ t << ":repeat\r\n";
+ t << "set content=X\r\n";
+ t << "for /F \"tokens=*\" %%T in ( 'findstr /C:\"Rerun LaTeX\" refman.log' ) do set content=\"%%~T\"\r\n";
+ t << "if !content! == X for /F \"tokens=*\" %%T in ( 'findstr /C:\"Rerun to get cross-references right\" refman.log' ) do set content=\"%%~T\"\r\n";
+ t << "if !content! == X goto :skip\r\n";
+ t << "set /a count-=1\r\n";
+ t << "if !count! EQU 0 goto :skip\r\n\r\n";
+ t << "echo ----\r\n";
+ t << "%LATEX_CMD% refman\r\n";
+ t << "goto :repeat\r\n";
+ t << ":skip\r\n";
+ t << "endlocal\r\n";
+ t << mkidx_command << " refman.idx\r\n";
+ t << "%LATEX_CMD% refman\r\n";
+ t << "cd /D %Dir_Old%\r\n";
+ t << "set Dir_Old=\r\n";
}
#endif
}
@@ -480,16 +463,16 @@ static void writeMakeBat()
void LatexGenerator::init()
{
QCString dname = Config_getString(LATEX_OUTPUT);
- QDir d(dname);
- if (!d.exists() && !d.mkdir(dname))
+ Dir d(dname.str());
+ if (!d.exists() && !d.mkdir(dname.str()))
{
- term("Could not create output directory %s\n",dname.data());
+ term("Could not create output directory %s\n",qPrint(dname));
}
if (!Config_getString(LATEX_HEADER).isEmpty())
{
g_header=fileToString(Config_getString(LATEX_HEADER));
- //printf("g_header='%s'\n",g_header.data());
+ //printf("g_header='%s'\n",qPrint(g_header));
}
else
{
@@ -498,7 +481,7 @@ void LatexGenerator::init()
if (!Config_getString(LATEX_FOOTER).isEmpty())
{
g_footer=fileToString(Config_getString(LATEX_FOOTER));
- //printf("g_footer='%s'\n",g_footer.data());
+ //printf("g_footer='%s'\n",qPrint(g_footer));
}
else
{
@@ -511,33 +494,30 @@ void LatexGenerator::init()
createSubDirs(d);
}
-static void writeDefaultStyleSheet(FTextStream &t)
+static void writeDefaultStyleSheet(TextStream &t)
{
t << ResourceMgr::instance().getAsString("doxygen.sty");
}
-void LatexGenerator::writeHeaderFile(QFile &f)
+void LatexGenerator::writeHeaderFile(TextStream &t)
{
- FTextStream t(&f);
- t << "% Latex header for doxygen " << getDoxygenVersion() << endl;
+ t << "% Latex header for doxygen " << getDoxygenVersion() << "\n";
t << ResourceMgr::instance().getAsString("header.tex");
}
-void LatexGenerator::writeFooterFile(QFile &f)
+void LatexGenerator::writeFooterFile(TextStream &t)
{
- FTextStream t(&f);
- t << "% Latex footer for doxygen " << getDoxygenVersion() << endl;
+ t << "% Latex footer for doxygen " << getDoxygenVersion() << "\n";
t << ResourceMgr::instance().getAsString("footer.tex");
}
-void LatexGenerator::writeStyleSheetFile(QFile &f)
+void LatexGenerator::writeStyleSheetFile(TextStream &t)
{
- FTextStream t(&f);
- t << "% stylesheet for doxygen " << getDoxygenVersion() << endl;
+ t << "% stylesheet for doxygen " << getDoxygenVersion() << "\n";
writeDefaultStyleSheet(t);
}
-void LatexGenerator::startFile(const char *name,const char *,const char *,int)
+void LatexGenerator::startFile(const QCString &name,const QCString &,const QCString &,int)
{
#if 0
setEncoding(Config_getString(LATEX_OUTPUT_ENCODING));
@@ -546,7 +526,6 @@ void LatexGenerator::startFile(const char *name,const char *,const char *,int)
m_relPath = relativePathToRoot(fileName);
if (fileName.right(4)!=".tex" && fileName.right(4)!=".sty") fileName+=".tex";
startPlainFile(fileName);
- m_codeGen.setTextStream(t);
m_codeGen.setRelativePath(m_relPath);
m_codeGen.setSourceFileName(stripPath(fileName));
}
@@ -564,30 +543,29 @@ void LatexGenerator::endFile()
void LatexGenerator::startProjectNumber()
{
- t << "\\\\[1ex]\\large ";
+ m_t << "\\\\[1ex]\\large ";
}
static QCString extraLatexStyleSheet()
{
QCString result;
const StringVector &extraLatexStyles = Config_getList(LATEX_EXTRA_STYLESHEET);
- for (const auto &extraStyle : extraLatexStyles)
+ for (const auto &fileName : extraLatexStyles)
{
- QCString fileName = extraStyle.c_str();
- if (!fileName.isEmpty())
+ if (!fileName.empty())
{
- QFileInfo fi(fileName);
+ FileInfo fi(fileName);
if (fi.exists())
{
result += "\\usepackage{";
- if (checkExtension(fi.fileName().data(), LATEX_STYLE_EXTENSION))
+ if (checkExtension(fi.fileName().c_str(), LATEX_STYLE_EXTENSION))
{
// strip the extension, it will be added by the usepackage in the tex conversion process
- result += stripExtensionGeneral(fi.fileName().data(), LATEX_STYLE_EXTENSION);
+ result += stripExtensionGeneral(fi.fileName().c_str(), LATEX_STYLE_EXTENSION);
}
else
{
- result += fi.fileName().utf8();
+ result += fi.fileName();
}
result += "}\n";
}
@@ -605,7 +583,7 @@ static QCString makeIndex()
if (latex_mkidx_command[0] == '\\')
result += latex_mkidx_command;
else
- result += '\\'+latex_mkidx_command;
+ result += "\\"+latex_mkidx_command;
}
else
{
@@ -629,13 +607,13 @@ static QCString substituteLatexKeywords(const QCString &str,
style="plain";
}
- QGString genString;
- FTextStream tg(&genString);
- QCString generatedBy;
+ TextStream tg;
bool timeStamp = Config_getBool(LATEX_TIMESTAMP);
+ QCString generatedBy;
if (timeStamp)
{
- generatedBy = theTranslator->trGeneratedAt(dateToString(TRUE), Config_getString(PROJECT_NAME));
+ generatedBy = theTranslator->trGeneratedAt(dateToString(TRUE).data(),
+ Config_getString(PROJECT_NAME).data());
}
else
{
@@ -648,7 +626,7 @@ static QCString substituteLatexKeywords(const QCString &str,
false, // insideTable
false // keepSpaces
);
- generatedBy = genString;
+ generatedBy = tg.str();
QCString latexFontenc = theTranslator->latexFontenc();
@@ -656,24 +634,20 @@ static QCString substituteLatexKeywords(const QCString &str,
if (latexEmojiDirectory.isEmpty()) latexEmojiDirectory = ".";
latexEmojiDirectory = substitute(latexEmojiDirectory,"\\","/");
- QGString genExtraLatexPackages;
- FTextStream tg1(&genExtraLatexPackages);
+ TextStream tg1;
writeExtraLatexPackages(tg1);
- QCString extraLatexPackages;
- extraLatexPackages = genExtraLatexPackages;
+ QCString extraLatexPackages = tg1.str();
- QGString genLatexSpecialFormulaChars;
- FTextStream tg2(&genLatexSpecialFormulaChars);
+ TextStream tg2;
writeLatexSpecialFormulaChars(tg2);
- QCString latexSpecialFormulaChars;
- latexSpecialFormulaChars = genLatexSpecialFormulaChars;
+ QCString latexSpecialFormulaChars = tg2.str();
QCString formulaMacrofile = Config_getString(FORMULA_MACROFILE);
if (!formulaMacrofile.isEmpty())
{
- QFileInfo fi(formulaMacrofile);
- formulaMacrofile=fi.absFilePath().utf8();
- QCString stripMacroFile = fi.fileName().data();
+ FileInfo fi(formulaMacrofile.str());
+ formulaMacrofile=fi.absFilePath();
+ QCString stripMacroFile = fi.fileName();
copyFile(formulaMacrofile,Config_getString(LATEX_OUTPUT) + "/" + stripMacroFile);
}
@@ -722,45 +696,49 @@ void LatexGenerator::startIndexSection(IndexSections is)
switch (is)
{
case isTitlePageStart:
- t << substituteLatexKeywords(g_header,convertToLaTeX(Config_getString(PROJECT_NAME)));
+ m_t << substituteLatexKeywords(g_header,convertToLaTeX(Config_getString(PROJECT_NAME)));
break;
case isTitlePageAuthor:
break;
case isMainPage:
- if (compactLatex) t << "\\doxysection"; else t << "\\chapter";
- t << "{"; //Introduction}\n"
+ if (compactLatex) m_t << "\\doxysection"; else m_t << "\\chapter";
+ m_t << "{"; //Introduction}\n"
break;
//case isPackageIndex:
- // if (compactLatex) t << "\\doxysection"; else t << "\\chapter";
- // t << "{"; //Package Index}\n"
+ // if (compactLatex) m_t << "\\doxysection"; else m_t << "\\chapter";
+ // m_t << "{"; //Package Index}\n"
// break;
case isModuleIndex:
- if (compactLatex) t << "\\doxysection"; else t << "\\chapter";
- t << "{"; //Module Index}\n"
+ if (compactLatex) m_t << "\\doxysection"; else m_t << "\\chapter";
+ m_t << "{"; //Module Index}\n"
break;
case isDirIndex:
- if (compactLatex) t << "\\doxysection"; else t << "\\chapter";
- t << "{"; //Directory Index}\n"
+ if (compactLatex) m_t << "\\doxysection"; else m_t << "\\chapter";
+ m_t << "{"; //Directory Index}\n"
break;
case isNamespaceIndex:
- if (compactLatex) t << "\\doxysection"; else t << "\\chapter";
- t << "{"; //Namespace Index}\n"
+ if (compactLatex) m_t << "\\doxysection"; else m_t << "\\chapter";
+ m_t << "{"; //Namespace Index}\n"
+ break;
+ case isConceptIndex:
+ if (compactLatex) m_t << "\\doxysection"; else m_t << "\\chapter";
+ m_t << "{"; //Concept Index}\n"
break;
case isClassHierarchyIndex:
- if (compactLatex) t << "\\doxysection"; else t << "\\chapter";
- t << "{"; //Hierarchical Index}\n"
+ if (compactLatex) m_t << "\\doxysection"; else m_t << "\\chapter";
+ m_t << "{"; //Hierarchical Index}\n"
break;
case isCompoundIndex:
- if (compactLatex) t << "\\doxysection"; else t << "\\chapter";
- t << "{"; //Annotated Compound Index}\n"
+ if (compactLatex) m_t << "\\doxysection"; else m_t << "\\chapter";
+ m_t << "{"; //Annotated Compound Index}\n"
break;
case isFileIndex:
- if (compactLatex) t << "\\doxysection"; else t << "\\chapter";
- t << "{"; //Annotated File Index}\n"
+ if (compactLatex) m_t << "\\doxysection"; else m_t << "\\chapter";
+ m_t << "{"; //Annotated File Index}\n"
break;
case isPageIndex:
- if (compactLatex) t << "\\doxysection"; else t << "\\chapter";
- t << "{"; //Annotated Page Index}\n"
+ if (compactLatex) m_t << "\\doxysection"; else m_t << "\\chapter";
+ m_t << "{"; //Annotated Page Index}\n"
break;
case isModuleDocumentation:
{
@@ -768,8 +746,8 @@ void LatexGenerator::startIndexSection(IndexSections is)
{
if (!gd->isReference())
{
- if (compactLatex) t << "\\doxysection"; else t << "\\chapter";
- t << "{"; //Module Documentation}\n";
+ if (compactLatex) m_t << "\\doxysection"; else m_t << "\\chapter";
+ m_t << "{"; //Module Documentation}\n";
break;
}
}
@@ -781,8 +759,8 @@ void LatexGenerator::startIndexSection(IndexSections is)
{
if (dd->isLinkableInProject())
{
- if (compactLatex) t << "\\doxysection"; else t << "\\chapter";
- t << "{"; //Module Documentation}\n";
+ if (compactLatex) m_t << "\\doxysection"; else m_t << "\\chapter";
+ m_t << "{"; //Module Documentation}\n";
break;
}
}
@@ -794,8 +772,21 @@ void LatexGenerator::startIndexSection(IndexSections is)
{
if (nd->isLinkableInProject() && !nd->isAlias())
{
- if (compactLatex) t << "\\doxysection"; else t << "\\chapter";
- t << "{"; // Namespace Documentation}\n":
+ if (compactLatex) m_t << "\\doxysection"; else m_t << "\\chapter";
+ m_t << "{"; // Namespace Documentation}\n":
+ break;
+ }
+ }
+ }
+ break;
+ case isConceptDocumentation:
+ {
+ for (const auto &cd : *Doxygen::conceptLinkedMap)
+ {
+ if (cd->isLinkableInProject() && !cd->isAlias())
+ {
+ if (compactLatex) m_t << "\\doxysection"; else m_t << "\\chapter";
+ m_t << "{"; // Concept Documentation}\n":
break;
}
}
@@ -811,8 +802,8 @@ void LatexGenerator::startIndexSection(IndexSections is)
!cd->isAlias()
)
{
- if (compactLatex) t << "\\doxysection"; else t << "\\chapter";
- t << "{"; //Compound Documentation}\n";
+ if (compactLatex) m_t << "\\doxysection"; else m_t << "\\chapter";
+ m_t << "{"; //Compound Documentation}\n";
break;
}
}
@@ -829,8 +820,8 @@ void LatexGenerator::startIndexSection(IndexSections is)
{
if (isFirst)
{
- if (compactLatex) t << "\\doxysection"; else t << "\\chapter";
- t << "{"; //File Documentation}\n";
+ if (compactLatex) m_t << "\\doxysection"; else m_t << "\\chapter";
+ m_t << "{"; //File Documentation}\n";
isFirst=FALSE;
break;
}
@@ -841,14 +832,14 @@ void LatexGenerator::startIndexSection(IndexSections is)
break;
case isExampleDocumentation:
{
- if (compactLatex) t << "\\doxysection"; else t << "\\chapter";
- t << "{"; //Example Documentation}\n";
+ if (compactLatex) m_t << "\\doxysection"; else m_t << "\\chapter";
+ m_t << "{"; //Example Documentation}\n";
}
break;
case isPageDocumentation:
{
- if (compactLatex) t << "\\doxysection"; else t << "\\chapter";
- t << "{"; //Page Documentation}\n";
+ if (compactLatex) m_t << "\\doxysection"; else m_t << "\\chapter";
+ m_t << "{"; //Page Documentation}\n";
}
break;
case isPageDocumentation2:
@@ -871,31 +862,34 @@ void LatexGenerator::endIndexSection(IndexSections is)
{
//QCString indexName=Config_getBool(GENERATE_TREEVIEW)?"main":"index";
QCString indexName="index";
- t << "}\n\\label{index}";
- if (Config_getBool(PDF_HYPERLINKS)) t << "\\hypertarget{index}{}";
- t << "\\input{" << indexName << "}\n";
+ m_t << "}\n\\label{index}";
+ if (Config_getBool(PDF_HYPERLINKS)) m_t << "\\hypertarget{index}{}";
+ m_t << "\\input{" << indexName << "}\n";
}
break;
case isModuleIndex:
- t << "}\n\\input{modules}\n";
+ m_t << "}\n\\input{modules}\n";
break;
case isDirIndex:
- t << "}\n\\input{dirs}\n";
+ m_t << "}\n\\input{dirs}\n";
break;
case isNamespaceIndex:
- t << "}\n\\input{namespaces}\n";
+ m_t << "}\n\\input{namespaces}\n";
+ break;
+ case isConceptIndex:
+ m_t << "}\n\\input{concepts}\n";
break;
case isClassHierarchyIndex:
- t << "}\n\\input{hierarchy}\n";
+ m_t << "}\n\\input{hierarchy}\n";
break;
case isCompoundIndex:
- t << "}\n\\input{annotated}\n";
+ m_t << "}\n\\input{annotated}\n";
break;
case isFileIndex:
- t << "}\n\\input{files}\n";
+ m_t << "}\n\\input{files}\n";
break;
case isPageIndex:
- t << "}\n\\input{pages}\n";
+ m_t << "}\n\\input{pages}\n";
break;
case isModuleDocumentation:
{
@@ -906,10 +900,10 @@ void LatexGenerator::endIndexSection(IndexSections is)
{
if (!found)
{
- t << "}\n";
+ m_t << "}\n";
found=TRUE;
}
- t << "\\input{" << gd->getOutputFileBase() << "}\n";
+ m_t << "\\input{" << gd->getOutputFileBase() << "}\n";
}
}
}
@@ -923,10 +917,10 @@ void LatexGenerator::endIndexSection(IndexSections is)
{
if (!found)
{
- t << "}\n";
+ m_t << "}\n";
found = TRUE;
}
- t << "\\input{" << dd->getOutputFileBase() << "}\n";
+ m_t << "\\input{" << dd->getOutputFileBase() << "}\n";
}
}
}
@@ -940,10 +934,27 @@ void LatexGenerator::endIndexSection(IndexSections is)
{
if (!found)
{
- t << "}\n";
+ m_t << "}\n";
found=true;
}
- t << "\\input{" << nd->getOutputFileBase() << "}\n";
+ m_t << "\\input{" << nd->getOutputFileBase() << "}\n";
+ }
+ }
+ }
+ break;
+ case isConceptDocumentation:
+ {
+ bool found=FALSE;
+ for (const auto &cd : *Doxygen::conceptLinkedMap)
+ {
+ if (cd->isLinkableInProject() && !cd->isAlias())
+ {
+ if (!found)
+ {
+ m_t << "}\n";
+ found=true;
+ }
+ m_t << "\\input{" << cd->getOutputFileBase() << "}\n";
}
}
}
@@ -961,10 +972,10 @@ void LatexGenerator::endIndexSection(IndexSections is)
{
if (!found)
{
- t << "}\n"; // end doxysection or chapter title
+ m_t << "}\n"; // end doxysection or chapter title
found=TRUE;
}
- t << "\\input{" << cd->getOutputFileBase() << "}\n";
+ m_t << "\\input{" << cd->getOutputFileBase() << "}\n";
}
}
}
@@ -980,14 +991,14 @@ void LatexGenerator::endIndexSection(IndexSections is)
{
if (isFirst)
{
- t << "}\n"; // end doxysection or chapter title
+ m_t << "}\n"; // end doxysection or chapter title
}
isFirst=FALSE;
- t << "\\input{" << fd->getOutputFileBase() << "}\n";
+ m_t << "\\input{" << fd->getOutputFileBase() << "}\n";
if (sourceBrowser && m_prettyCode && fd->generateSourceFile())
{
- //t << "\\include{" << fd->getSourceFileBase() << "}\n";
- t << "\\input{" << fd->getSourceFileBase() << "}\n";
+ //m_t << "\\include{" << fd->getSourceFileBase() << "}\n";
+ m_t << "\\input{" << fd->getSourceFileBase() << "}\n";
}
}
}
@@ -996,28 +1007,28 @@ void LatexGenerator::endIndexSection(IndexSections is)
break;
case isExampleDocumentation:
{
- t << "}\n";
+ m_t << "}\n";
for (const auto &pd : *Doxygen::exampleLinkedMap)
{
- t << "\\input{" << pd->getOutputFileBase() << "}\n";
+ m_t << "\\input{" << pd->getOutputFileBase() << "}\n";
}
}
break;
case isPageDocumentation:
{
- t << "}\n";
+ m_t << "}\n";
#if 0
bool first=TRUE;
for (const auto *pd : Doxygen::pageLinkedMap)
{
if (!pd->getGroupDef() && !pd->isReference())
{
- if (compactLatex) t << "\\doxysection"; else t << "\\chapter";
- t << "{" << pd->title();
- t << "}\n";
+ if (compactLatex) m_t << "\\doxysection"; else m_t << "\\chapter";
+ m_t << "{" << pd->title();
+ m_t << "}\n";
- if (compactLatex || first) t << "\\input" ; else t << "\\include";
- t << "{" << pd->getOutputFileBase() << "}\n";
+ if (compactLatex || first) m_t << "\\input" ; else m_t << "\\include";
+ m_t << "{" << pd->getOutputFileBase() << "}\n";
first=FALSE;
}
}
@@ -1027,18 +1038,18 @@ void LatexGenerator::endIndexSection(IndexSections is)
case isPageDocumentation2:
break;
case isEndIndex:
- t << substituteLatexKeywords(g_footer,convertToLaTeX(Config_getString(PROJECT_NAME)));
+ m_t << substituteLatexKeywords(g_footer,convertToLaTeX(Config_getString(PROJECT_NAME)));
break;
}
}
-void LatexGenerator::writePageLink(const char *name, bool /*first*/)
+void LatexGenerator::writePageLink(const QCString &name, bool /*first*/)
{
//bool &compactLatex = Config_getBool(COMPACT_LATEX);
// next is remove for bug615957
- //if (compactLatex || first) t << "\\input" ; else t << "\\include";
- t << "\\input" ;
- t << "{" << name << "}\n";
+ //if (compactLatex || first) m_t << "\\input" ; else m_t << "\\include";
+ m_t << "\\input" ;
+ m_t << "{" << name << "}\n";
}
@@ -1048,110 +1059,110 @@ void LatexGenerator::writeStyleInfo(int part)
return;
startPlainFile("doxygen.sty");
- writeDefaultStyleSheet(t);
+ writeDefaultStyleSheet(m_t);
endPlainFile();
// workaround for the problem caused by change in LaTeX in version 2019
// in the unmaintained tabu package
startPlainFile("tabu_doxygen.sty");
- t << ResourceMgr::instance().getAsString("tabu_doxygen.sty");
+ m_t << ResourceMgr::instance().getAsString("tabu_doxygen.sty");
endPlainFile();
startPlainFile("longtable_doxygen.sty");
- t << ResourceMgr::instance().getAsString("longtable_doxygen.sty");
+ m_t << ResourceMgr::instance().getAsString("longtable_doxygen.sty");
endPlainFile();
}
void LatexGenerator::newParagraph()
{
- t << endl << endl;
+ m_t << "\n" << "\n";
}
-void LatexGenerator::startParagraph(const char *)
+void LatexGenerator::startParagraph(const QCString &)
{
- t << endl << endl;
+ m_t << "\n" << "\n";
}
void LatexGenerator::endParagraph()
{
- t << endl << endl;
+ m_t << "\n" << "\n";
}
-void LatexGenerator::writeString(const char *text)
+void LatexGenerator::writeString(const QCString &text)
{
- t << text;
+ m_t << text;
}
-void LatexGenerator::startIndexItem(const char *ref,const char *fn)
+void LatexGenerator::startIndexItem(const QCString &ref,const QCString &fn)
{
- t << "\\item ";
- if (!ref && fn)
+ m_t << "\\item ";
+ if (ref.isEmpty() && !fn.isEmpty())
{
- t << "\\contentsline{section}{";
+ m_t << "\\contentsline{section}{";
}
}
-void LatexGenerator::endIndexItem(const char *ref,const char *fn)
+void LatexGenerator::endIndexItem(const QCString &ref,const QCString &fn)
{
- if (!ref && fn)
+ if (ref.isEmpty() && !fn.isEmpty())
{
- t << "}{\\pageref{" << stripPath(fn) << "}}{}" << endl;
+ m_t << "}{\\pageref{" << stripPath(fn) << "}}{}\n";
}
}
-//void LatexGenerator::writeIndexFileItem(const char *,const char *text)
+//void LatexGenerator::writeIndexFileItem(const QCString &,const QCString &text)
//{
-// t << "\\item\\contentsline{section}{";
+// m_t << "\\item\\contentsline{section}{";
// docify(text);
-// t << "}{\\pageref{" << stripPath(text) << "}}" << endl;
+// m_t << "}{\\pageref{" << stripPath(text) << "}}\n";
//}
-void LatexGenerator::startHtmlLink(const char *url)
+void LatexGenerator::startHtmlLink(const QCString &url)
{
if (Config_getBool(PDF_HYPERLINKS))
{
- t << "\\href{";
- t << latexFilterURL(url);
- t << "}";
+ m_t << "\\href{";
+ m_t << latexFilterURL(url);
+ m_t << "}";
}
- t << "{\\texttt{ ";
+ m_t << "{\\texttt{ ";
}
void LatexGenerator::endHtmlLink()
{
- t << "}}";
+ m_t << "}}";
}
-//void LatexGenerator::writeMailLink(const char *url)
+//void LatexGenerator::writeMailLink(const QCString &url)
//{
// if (Config_getBool(PDF_HYPERLINKS))
// {
-// t << "\\href{mailto:";
-// t << url;
-// t << "}";
+// m_t << "\\href{mailto:";
+// m_t << url;
+// m_t << "}";
// }
-// t << "\\texttt{ ";
+// m_t << "\\texttt{ ";
// docify(url);
-// t << "}";
+// m_t << "}";
//}
-void LatexGenerator::writeStartAnnoItem(const char *,const char *,
- const char *path,const char *name)
+void LatexGenerator::writeStartAnnoItem(const QCString &,const QCString &,
+ const QCString &path,const QCString &name)
{
- t << "\\item\\contentsline{section}\\textbf{ ";
- if (path) docify(path);
+ m_t << "\\item\\contentsline{section}\\textbf{ ";
+ if (!path.isEmpty()) docify(path);
docify(name);
- t << "} ";
+ m_t << "} ";
}
-void LatexGenerator::writeEndAnnoItem(const char *name)
+void LatexGenerator::writeEndAnnoItem(const QCString &name)
{
- t << "}{\\pageref{" << stripPath(name) << "}}{}" << endl;
+ m_t << "}{\\pageref{" << stripPath(name) << "}}{}\n";
}
void LatexGenerator::startIndexKey()
{
- t << "\\item\\contentsline{section}{";
+ m_t << "\\item\\contentsline{section}{";
}
void LatexGenerator::endIndexKey()
@@ -1160,37 +1171,37 @@ void LatexGenerator::endIndexKey()
void LatexGenerator::startIndexValue(bool hasBrief)
{
- t << " ";
- if (hasBrief) t << "\\\\*";
+ m_t << " ";
+ if (hasBrief) m_t << "\\\\*";
}
-void LatexGenerator::endIndexValue(const char *name,bool /*hasBrief*/)
+void LatexGenerator::endIndexValue(const QCString &name,bool /*hasBrief*/)
{
- //if (hasBrief) t << ")";
- t << "}{\\pageref{" << stripPath(name) << "}}{}" << endl;
+ //if (hasBrief) m_t << ")";
+ m_t << "}{\\pageref{" << stripPath(name) << "}}{}\n";
}
-//void LatexGenerator::writeClassLink(const char *,const char *,
-// const char *,const char *name)
+//void LatexGenerator::writeClassLink(const QCString &,const QCString &,
+// const QCString &,const QCString &name)
//{
-// t << "\\textbf{ ";
+// m_t << "\\textbf{ ";
// docify(name);
-// t << "}";
+// m_t << "}";
//}
-void LatexGenerator::startTextLink(const char *f,const char *anchor)
+void LatexGenerator::startTextLink(const QCString &f,const QCString &anchor)
{
bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
if (!m_disableLinks && pdfHyperlinks)
{
- t << "\\mbox{\\hyperlink{";
- if (f) t << stripPath(f);
- if (anchor) t << "_" << anchor;
- t << "}{";
+ m_t << "\\mbox{\\hyperlink{";
+ if (!f.isEmpty()) m_t << stripPath(f);
+ if (!anchor.isEmpty()) m_t << "_" << anchor;
+ m_t << "}{";
}
else
{
- t << "\\textbf{ ";
+ m_t << "\\textbf{ ";
}
}
@@ -1199,75 +1210,75 @@ void LatexGenerator::endTextLink()
bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
if (!m_disableLinks && pdfHyperlinks)
{
- t << "}";
+ m_t << "}";
}
- t << "}";
+ m_t << "}";
}
-void LatexGenerator::writeObjectLink(const char *ref, const char *f,
- const char *anchor, const char *text)
+void LatexGenerator::writeObjectLink(const QCString &ref, const QCString &f,
+ const QCString &anchor, const QCString &text)
{
bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
- if (!m_disableLinks && !ref && pdfHyperlinks)
+ if (!m_disableLinks && ref.isEmpty() && pdfHyperlinks)
{
- t << "\\mbox{\\hyperlink{";
- if (f) t << stripPath(f);
- if (f && anchor) t << "_";
- if (anchor) t << anchor;
- t << "}{";
+ m_t << "\\mbox{\\hyperlink{";
+ if (!f.isEmpty()) m_t << stripPath(f);
+ if (!f.isEmpty() && !anchor.isEmpty()) m_t << "_";
+ if (!anchor.isEmpty()) m_t << anchor;
+ m_t << "}{";
docify(text);
- t << "}}";
+ m_t << "}}";
}
else
{
- t << "\\textbf{ ";
+ m_t << "\\textbf{ ";
docify(text);
- t << "}";
+ m_t << "}";
}
}
void LatexGenerator::startPageRef()
{
- t << " \\doxyref{}{";
+ m_t << " \\doxyref{}{";
}
-void LatexGenerator::endPageRef(const char *clname, const char *anchor)
+void LatexGenerator::endPageRef(const QCString &clname, const QCString &anchor)
{
- t << "}{";
- if (clname) t << clname;
- if (anchor) t << "_" << anchor;
- t << "}";
+ m_t << "}{";
+ if (!clname.isEmpty()) m_t << clname;
+ if (!anchor.isEmpty()) m_t << "_" << anchor;
+ m_t << "}";
}
-void LatexGenerator::startTitleHead(const char *fileName)
+void LatexGenerator::startTitleHead(const QCString &fileName)
{
bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
bool usePDFLatex = Config_getBool(USE_PDFLATEX);
- if (usePDFLatex && pdfHyperlinks && fileName)
+ if (usePDFLatex && pdfHyperlinks && !fileName.isEmpty())
{
- t << "\\hypertarget{" << stripPath(fileName) << "}{}";
+ m_t << "\\hypertarget{" << stripPath(fileName) << "}{}";
}
if (Config_getBool(COMPACT_LATEX))
{
- t << "\\doxysubsection{";
+ m_t << "\\doxysubsection{";
}
else
{
- t << "\\doxysection{";
+ m_t << "\\doxysection{";
}
}
-void LatexGenerator::endTitleHead(const char *fileName,const char *name)
+void LatexGenerator::endTitleHead(const QCString &fileName,const QCString &name)
{
- t << "}" << endl;
- if (name)
+ m_t << "}\n";
+ if (!name.isEmpty())
{
- t << "\\label{" << stripPath(fileName) << "}\\index{";
- t << latexEscapeLabelName(name);
- t << "@{";
- t << latexEscapeIndexChars(name);
- t << "}}" << endl;
+ m_t << "\\label{" << stripPath(fileName) << "}\\index{";
+ m_t << latexEscapeLabelName(name);
+ m_t << "@{";
+ m_t << latexEscapeIndexChars(name);
+ m_t << "}}\n";
}
}
@@ -1275,11 +1286,11 @@ void LatexGenerator::startTitle()
{
if (Config_getBool(COMPACT_LATEX))
{
- t << "\\doxysubsection{";
+ m_t << "\\doxysubsection{";
}
else
{
- t << "\\doxysection{";
+ m_t << "\\doxysection{";
}
}
@@ -1292,19 +1303,19 @@ void LatexGenerator::startGroupHeader(int extraIndentLevel)
if (extraIndentLevel==3)
{
- t << "\\doxysubparagraph*{";
+ m_t << "\\doxysubparagraph*{";
}
else if (extraIndentLevel==2)
{
- t << "\\doxyparagraph{";
+ m_t << "\\doxyparagraph{";
}
else if (extraIndentLevel==1)
{
- t << "\\doxysubsubsection{";
+ m_t << "\\doxysubsubsection{";
}
else // extraIndentLevel==0
{
- t << "\\doxysubsection{";
+ m_t << "\\doxysubsection{";
}
m_disableLinks=TRUE;
}
@@ -1312,18 +1323,18 @@ void LatexGenerator::startGroupHeader(int extraIndentLevel)
void LatexGenerator::endGroupHeader(int)
{
m_disableLinks=FALSE;
- t << "}" << endl;
+ m_t << "}\n";
}
-void LatexGenerator::startMemberHeader(const char *,int)
+void LatexGenerator::startMemberHeader(const QCString &,int)
{
if (Config_getBool(COMPACT_LATEX))
{
- t << "\\doxysubsubsection*{";
+ m_t << "\\doxysubsubsection*{";
}
else
{
- t << "\\doxysubsection*{";
+ m_t << "\\doxysubsection*{";
}
m_disableLinks=TRUE;
}
@@ -1331,46 +1342,46 @@ void LatexGenerator::startMemberHeader(const char *,int)
void LatexGenerator::endMemberHeader()
{
m_disableLinks=FALSE;
- t << "}" << endl;
+ m_t << "}\n";
}
-void LatexGenerator::startMemberDoc(const char *clname,
- const char *memname,
- const char *,
- const char *title,
+void LatexGenerator::startMemberDoc(const QCString &clname,
+ const QCString &memname,
+ const QCString &,
+ const QCString &title,
int memCount,
int memTotal,
bool showInline)
{
- if (memname && memname[0]!='@')
+ if (!memname.isEmpty() && memname[0]!='@')
{
- t << "\\index{";
- if (clname)
+ m_t << "\\index{";
+ if (!clname.isEmpty())
{
- t << latexEscapeLabelName(clname);
- t << "@{";
- t << latexEscapeIndexChars(clname);
- t << "}!";
+ m_t << latexEscapeLabelName(clname);
+ m_t << "@{";
+ m_t << latexEscapeIndexChars(clname);
+ m_t << "}!";
}
- t << latexEscapeLabelName(memname);
- t << "@{";
- t << latexEscapeIndexChars(memname);
- t << "}}" << endl;
-
- t << "\\index{";
- t << latexEscapeLabelName(memname);
- t << "@{";
- t << latexEscapeIndexChars(memname);
- t << "}";
- if (clname)
+ m_t << latexEscapeLabelName(memname);
+ m_t << "@{";
+ m_t << latexEscapeIndexChars(memname);
+ m_t << "}}\n";
+
+ m_t << "\\index{";
+ m_t << latexEscapeLabelName(memname);
+ m_t << "@{";
+ m_t << latexEscapeIndexChars(memname);
+ m_t << "}";
+ if (!clname.isEmpty())
{
- t << "!";
- t << latexEscapeLabelName(clname);
- t << "@{";
- t << latexEscapeIndexChars(clname);
- t << "}";
+ m_t << "!";
+ m_t << latexEscapeLabelName(clname);
+ m_t << "@{";
+ m_t << latexEscapeIndexChars(clname);
+ m_t << "}";
}
- t << "}" << endl;
+ m_t << "}\n";
}
static const char *levelLab[] = { "doxysubsubsection","doxyparagraph","doxysubparagraph", "doxysubparagraph" };
bool compactLatex = Config_getBool(COMPACT_LATEX);
@@ -1378,151 +1389,151 @@ void LatexGenerator::startMemberDoc(const char *clname,
int level=0;
if (showInline) level+=2;
if (compactLatex) level++;
- t << "\\" << levelLab[level];
+ m_t << "\\" << levelLab[level];
- t << "{";
+ m_t << "{";
if (pdfHyperlinks)
{
- t << "\\texorpdfstring{";
+ m_t << "\\texorpdfstring{";
}
- t << latexEscapeIndexChars(title);
+ m_t << latexEscapeIndexChars(title);
if (pdfHyperlinks)
{
- t << "}{" << latexEscapePDFString(title) << "}";
+ m_t << "}{" << latexEscapePDFString(title) << "}";
}
if (memTotal>1)
{
- t << "\\hspace{0.1cm}{\\footnotesize\\ttfamily [" << memCount << "/" << memTotal << "]}";
+ m_t << "\\hspace{0.1cm}{\\footnotesize\\ttfamily [" << memCount << "/" << memTotal << "]}";
}
- t << "}";
- t << "\n{\\footnotesize\\ttfamily ";
+ m_t << "}";
+ m_t << "\n{\\footnotesize\\ttfamily ";
//m_disableLinks=TRUE;
}
void LatexGenerator::endMemberDoc(bool)
{
m_disableLinks=FALSE;
- t << "}\n\n";
- //if (Config_getBool(COMPACT_LATEX)) t << "\\hfill";
+ m_t << "}\n\n";
+ //if (Config_getBool(COMPACT_LATEX)) m_t << "\\hfill";
}
-void LatexGenerator::startDoxyAnchor(const char *fName,const char *,
- const char *anchor, const char *,
- const char *)
+void LatexGenerator::startDoxyAnchor(const QCString &fName,const QCString &,
+ const QCString &anchor, const QCString &,
+ const QCString &)
{
bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
bool usePDFLatex = Config_getBool(USE_PDFLATEX);
- t << "\\mbox{";
+ m_t << "\\mbox{";
if (usePDFLatex && pdfHyperlinks)
{
- t << "\\Hypertarget{";
- if (fName) t << stripPath(fName);
- if (anchor) t << "_" << anchor;
- t << "}";
+ m_t << "\\Hypertarget{";
+ if (!fName.isEmpty()) m_t << stripPath(fName);
+ if (!anchor.isEmpty()) m_t << "_" << anchor;
+ m_t << "}";
}
- t << "\\label{";
- if (fName) t << stripPath(fName);
- if (anchor) t << "_" << anchor;
- t << "}} " << endl;
+ m_t << "\\label{";
+ if (!fName.isEmpty()) m_t << stripPath(fName);
+ if (!anchor.isEmpty()) m_t << "_" << anchor;
+ m_t << "}} \n";
}
-void LatexGenerator::endDoxyAnchor(const char *fName,const char *anchor)
+void LatexGenerator::endDoxyAnchor(const QCString &fName,const QCString &anchor)
{
}
-void LatexGenerator::writeAnchor(const char *fName,const char *name)
+void LatexGenerator::writeAnchor(const QCString &fName,const QCString &name)
{
//printf("LatexGenerator::writeAnchor(%s,%s)\n",fName,name);
- t << "\\label{" << stripPath(name) << "}" << endl;
+ m_t << "\\label{" << stripPath(name) << "}\n";
bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
bool usePDFLatex = Config_getBool(USE_PDFLATEX);
if (usePDFLatex && pdfHyperlinks)
{
- if (fName)
+ if (!fName.isEmpty())
{
- t << "\\Hypertarget{" << stripPath(fName) << "_" << stripPath(name) << "}" << endl;
+ m_t << "\\Hypertarget{" << stripPath(fName) << "_" << stripPath(name) << "}\n";
}
else
{
- t << "\\Hypertarget{" << stripPath(name) << "}" << endl;
+ m_t << "\\Hypertarget{" << stripPath(name) << "}\n";
}
}
}
-//void LatexGenerator::writeLatexLabel(const char *clName,const char *anchor)
+//void LatexGenerator::writeLatexLabel(const QCString &clName,const QCString &anchor)
//{
// writeDoxyAnchor(0,clName,anchor,0);
//}
-void LatexGenerator::addIndexItem(const char *s1,const char *s2)
+void LatexGenerator::addIndexItem(const QCString &s1,const QCString &s2)
{
- if (s1)
+ if (!s1.isEmpty())
{
- t << "\\index{";
- t << latexEscapeLabelName(s1);
- t << "@{";
- t << latexEscapeIndexChars(s1);
- t << "}";
- if (s2)
+ m_t << "\\index{";
+ m_t << latexEscapeLabelName(s1);
+ m_t << "@{";
+ m_t << latexEscapeIndexChars(s1);
+ m_t << "}";
+ if (!s2.isEmpty())
{
- t << "!";
- t << latexEscapeLabelName(s2);
- t << "@{";
- t << latexEscapeIndexChars(s2);
- t << "}";
+ m_t << "!";
+ m_t << latexEscapeLabelName(s2);
+ m_t << "@{";
+ m_t << latexEscapeIndexChars(s2);
+ m_t << "}";
}
- t << "}";
+ m_t << "}";
}
}
-void LatexGenerator::startSection(const char *lab,const char *,SectionType type)
+void LatexGenerator::startSection(const QCString &lab,const QCString &,SectionType type)
{
bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
bool usePDFLatex = Config_getBool(USE_PDFLATEX);
if (usePDFLatex && pdfHyperlinks)
{
- t << "\\hypertarget{" << stripPath(lab) << "}{}";
+ m_t << "\\hypertarget{" << stripPath(lab) << "}{}";
}
- t << "\\";
+ m_t << "\\";
if (Config_getBool(COMPACT_LATEX))
{
switch(type)
{
- case SectionType::Page: t << "doxysubsection"; break;
- case SectionType::Section: t << "doxysubsubsection"; break;
- case SectionType::Subsection: t << "doxyparagraph"; break;
- case SectionType::Subsubsection: t << "doxysubparagraph"; break;
- case SectionType::Paragraph: t << "doxysubparagraph"; break;
+ case SectionType::Page: m_t << "doxysubsection"; break;
+ case SectionType::Section: m_t << "doxysubsubsection"; break;
+ case SectionType::Subsection: m_t << "doxyparagraph"; break;
+ case SectionType::Subsubsection: m_t << "doxysubparagraph"; break;
+ case SectionType::Paragraph: m_t << "doxysubparagraph"; break;
default: ASSERT(0); break;
}
- t << "{";
+ m_t << "{";
}
else
{
switch(type)
{
- case SectionType::Page: t << "doxysection"; break;
- case SectionType::Section: t << "doxysubsection"; break;
- case SectionType::Subsection: t << "doxysubsubsection"; break;
- case SectionType::Subsubsection: t << "doxyparagraph"; break;
- case SectionType::Paragraph: t << "doxysubparagraph"; break;
+ case SectionType::Page: m_t << "doxysection"; break;
+ case SectionType::Section: m_t << "doxysubsection"; break;
+ case SectionType::Subsection: m_t << "doxysubsubsection"; break;
+ case SectionType::Subsubsection: m_t << "doxyparagraph"; break;
+ case SectionType::Paragraph: m_t << "doxysubparagraph"; break;
default: ASSERT(0); break;
}
- t << "{";
+ m_t << "{";
}
}
-void LatexGenerator::endSection(const char *lab,SectionType)
+void LatexGenerator::endSection(const QCString &lab,SectionType)
{
- t << "}\\label{" << lab << "}" << endl;
+ m_t << "}\\label{" << lab << "}\n";
}
-void LatexGenerator::docify(const char *str)
+void LatexGenerator::docify(const QCString &str)
{
- filterLatexString(t,str,
+ filterLatexString(m_t,str,
m_insideTabbing, // insideTabbing
false, // insidePre
false, // insideItem
@@ -1541,14 +1552,14 @@ void LatexGenerator::writeChar(char c)
void LatexGenerator::startClassDiagram()
{
- //if (Config_getBool(COMPACT_LATEX)) t << "\\doxysubsubsection"; else t << "\\doxysubsection";
- //t << "{";
+ //if (Config_getBool(COMPACT_LATEX)) m_t << "\\doxysubsubsection"; else m_t << "\\doxysubsection";
+ //m_t << "{";
}
void LatexGenerator::endClassDiagram(const ClassDiagram &d,
- const char *fileName,const char *)
+ const QCString &fileName,const QCString &)
{
- d.writeFigure(t,dir(),fileName);
+ d.writeFigure(m_t,dir(),fileName);
}
@@ -1556,8 +1567,8 @@ void LatexGenerator::startAnonTypeScope(int indent)
{
if (indent==0)
{
- t << "\\begin{tabbing}" << endl;
- t << "xx\\=xx\\=xx\\=xx\\=xx\\=xx\\=xx\\=xx\\=xx\\=\\kill" << endl;
+ m_t << "\\begin{tabbing}\n";
+ m_t << "xx\\=xx\\=xx\\=xx\\=xx\\=xx\\=xx\\=xx\\=xx\\=\\kill\n";
m_insideTabbing=TRUE;
}
m_indent=indent;
@@ -1567,7 +1578,7 @@ void LatexGenerator::endAnonTypeScope(int indent)
{
if (indent==0)
{
- t << endl << "\\end{tabbing}";
+ m_t << "\n" << "\\end{tabbing}";
m_insideTabbing=FALSE;
}
m_indent=indent;
@@ -1577,24 +1588,24 @@ void LatexGenerator::startMemberTemplateParams()
{
if (templateMemberItem)
{
- t << "{\\footnotesize ";
+ m_t << "{\\footnotesize ";
}
}
-void LatexGenerator::endMemberTemplateParams(const char *,const char *)
+void LatexGenerator::endMemberTemplateParams(const QCString &,const QCString &)
{
if (templateMemberItem)
{
- t << "}\\\\";
+ m_t << "}\\\\";
}
}
-void LatexGenerator::startMemberItem(const char *,int annoType,const char *)
+void LatexGenerator::startMemberItem(const QCString &,int annoType,const QCString &)
{
//printf("LatexGenerator::startMemberItem(%d)\n",annType);
if (!m_insideTabbing)
{
- t << "\\item " << endl;
+ m_t << "\\item \n";
templateMemberItem = (annoType == 3);
}
}
@@ -1603,22 +1614,22 @@ void LatexGenerator::endMemberItem()
{
if (m_insideTabbing)
{
- t << "\\\\";
+ m_t << "\\\\";
}
templateMemberItem = FALSE;
- t << endl;
+ m_t << "\n";
}
-void LatexGenerator::startMemberDescription(const char *,const char *,bool)
+void LatexGenerator::startMemberDescription(const QCString &,const QCString &,bool)
{
if (!m_insideTabbing)
{
- t << "\\begin{DoxyCompactList}\\small\\item\\em ";
+ m_t << "\\begin{DoxyCompactList}\\small\\item\\em ";
}
else
{
- for (int i=0;i<m_indent+2;i++) t << "\\>";
- t << "{\\em ";
+ for (int i=0;i<m_indent+2;i++) m_t << "\\>";
+ m_t << "{\\em ";
}
}
@@ -1626,12 +1637,12 @@ void LatexGenerator::endMemberDescription()
{
if (!m_insideTabbing)
{
- //t << "\\item\\end{DoxyCompactList}";
- t << "\\end{DoxyCompactList}";
+ //m_t << "\\item\\end{DoxyCompactList}";
+ m_t << "\\end{DoxyCompactList}";
}
else
{
- t << "}\\\\\n";
+ m_t << "}\\\\\n";
}
}
@@ -1641,11 +1652,11 @@ void LatexGenerator::writeNonBreakableSpace(int)
//printf("writeNonBreakableSpace()\n");
if (m_insideTabbing)
{
- t << "\\>";
+ m_t << "\\>";
}
else
{
- t << "~";
+ m_t << "~";
}
}
@@ -1663,23 +1674,23 @@ void LatexGenerator::writeNonBreakableSpace(int)
// - endDescTableRow()
// endDescTable()
-void LatexGenerator::startDescTable(const char *title)
+void LatexGenerator::startDescTable(const QCString &title)
{
m_codeGen.incUsedTableLevel();
- t << "\\begin{DoxyEnumFields}{" << title << "}" << endl;
+ m_t << "\\begin{DoxyEnumFields}{" << title << "}\n";
}
void LatexGenerator::endDescTable()
{
m_codeGen.decUsedTableLevel();
- t << "\\end{DoxyEnumFields}" << endl;
+ m_t << "\\end{DoxyEnumFields}\n";
}
void LatexGenerator::startDescTableRow()
{
// this is needed to prevent the \hypertarget, \label, and \index commands from messing up
// the row height (based on http://tex.stackexchange.com/a/186102)
- t << "\\raisebox{\\heightof{T}}[0pt][0pt]{";
+ m_t << "\\raisebox{\\heightof{T}}[0pt][0pt]{";
}
void LatexGenerator::endDescTableRow()
@@ -1688,7 +1699,7 @@ void LatexGenerator::endDescTableRow()
void LatexGenerator::startDescTableTitle()
{
- t << "}";
+ m_t << "}";
}
void LatexGenerator::endDescTableTitle()
@@ -1697,12 +1708,12 @@ void LatexGenerator::endDescTableTitle()
void LatexGenerator::startDescTableData()
{
- t << "&";
+ m_t << "&";
}
void LatexGenerator::endDescTableData()
{
- t << "\\\\\n\\hline\n" << endl;
+ m_t << "\\\\\n\\hline\n\n";
}
void LatexGenerator::lastIndexPage()
@@ -1714,7 +1725,7 @@ void LatexGenerator::startMemberList()
{
if (!m_insideTabbing)
{
- t << "\\begin{DoxyCompactItemize}" << endl;
+ m_t << "\\begin{DoxyCompactItemize}\n";
}
}
@@ -1723,41 +1734,41 @@ void LatexGenerator::endMemberList()
//printf("LatexGenerator::endMemberList(%d)\n",m_insideTabbing);
if (!m_insideTabbing)
{
- t << "\\end{DoxyCompactItemize}" << endl;
+ m_t << "\\end{DoxyCompactItemize}\n";
}
}
void LatexGenerator::startMemberGroupHeader(bool hasHeader)
{
- if (hasHeader) t << "\\begin{Indent}";
- t << "\\textbf{ ";
+ if (hasHeader) m_t << "\\begin{Indent}";
+ m_t << "\\textbf{ ";
// changed back to rev 756 due to bug 660501
//if (Config_getBool(COMPACT_LATEX))
//{
- // t << "\\doxysubparagraph*{";
+ // m_t << "\\doxysubparagraph*{";
//}
//else
//{
- // t << "\\doxyparagraph*{";
+ // m_t << "\\doxyparagraph*{";
//}
}
void LatexGenerator::endMemberGroupHeader()
{
// changed back to rev 756 due to bug 660501
- t << "}\\par" << endl;
- //t << "}" << endl;
+ m_t << "}\\par\n";
+ //m_t << "}\n";
}
void LatexGenerator::startMemberGroupDocs()
{
- t << "{\\em ";
+ m_t << "{\\em ";
}
void LatexGenerator::endMemberGroupDocs()
{
- t << "}";
+ m_t << "}";
}
void LatexGenerator::startMemberGroup()
@@ -1766,8 +1777,8 @@ void LatexGenerator::startMemberGroup()
void LatexGenerator::endMemberGroup(bool hasHeader)
{
- if (hasHeader)t << "\\end{Indent}";
- t << endl;
+ if (hasHeader)m_t << "\\end{Indent}";
+ m_t << "\n";
}
void LatexGenerator::startDotGraph()
@@ -1777,7 +1788,7 @@ void LatexGenerator::startDotGraph()
void LatexGenerator::endDotGraph(DotClassGraph &g)
{
- g.writeGraph(t,GOF_EPS,EOF_LaTeX,dir(),fileName(),m_relPath);
+ g.writeGraph(m_t,GOF_EPS,EOF_LaTeX,dir(),fileName(),m_relPath);
}
void LatexGenerator::startInclDepGraph()
@@ -1786,7 +1797,7 @@ void LatexGenerator::startInclDepGraph()
void LatexGenerator::endInclDepGraph(DotInclDepGraph &g)
{
- g.writeGraph(t,GOF_EPS,EOF_LaTeX,dir(),fileName(),m_relPath);
+ g.writeGraph(m_t,GOF_EPS,EOF_LaTeX,dir(),fileName(),m_relPath);
}
void LatexGenerator::startGroupCollaboration()
@@ -1795,7 +1806,7 @@ void LatexGenerator::startGroupCollaboration()
void LatexGenerator::endGroupCollaboration(DotGroupCollaboration &g)
{
- g.writeGraph(t,GOF_EPS,EOF_LaTeX,dir(),fileName(),m_relPath);
+ g.writeGraph(m_t,GOF_EPS,EOF_LaTeX,dir(),fileName(),m_relPath);
}
void LatexGenerator::startCallGraph()
@@ -1804,7 +1815,7 @@ void LatexGenerator::startCallGraph()
void LatexGenerator::endCallGraph(DotCallGraph &g)
{
- g.writeGraph(t,GOF_EPS,EOF_LaTeX,dir(),fileName(),m_relPath);
+ g.writeGraph(m_t,GOF_EPS,EOF_LaTeX,dir(),fileName(),m_relPath);
}
void LatexGenerator::startDirDepGraph()
@@ -1813,31 +1824,31 @@ void LatexGenerator::startDirDepGraph()
void LatexGenerator::endDirDepGraph(DotDirDeps &g)
{
- g.writeGraph(t,GOF_EPS,EOF_LaTeX,dir(),fileName(),m_relPath);
+ g.writeGraph(m_t,GOF_EPS,EOF_LaTeX,dir(),fileName(),m_relPath);
}
void LatexGenerator::startDescription()
{
- t << "\\begin{description}" << endl;
+ m_t << "\\begin{description}\n";
}
void LatexGenerator::endDescription()
{
- t << "\\end{description}" << endl;
+ m_t << "\\end{description}\n";
m_firstDescItem=TRUE;
}
void LatexGenerator::startDescItem()
{
m_firstDescItem=TRUE;
- t << "\\item[";
+ m_t << "\\item[";
}
void LatexGenerator::endDescItem()
{
if (m_firstDescItem)
{
- t << "]" << endl;
+ m_t << "]\n";
m_firstDescItem=FALSE;
}
else
@@ -1848,93 +1859,97 @@ void LatexGenerator::endDescItem()
void LatexGenerator::startExamples()
{
- t << "\\begin{Desc}\n\\item[";
+ m_t << "\\begin{Desc}\n\\item[";
docify(theTranslator->trExamples());
- t << "]";
+ m_t << "]";
}
void LatexGenerator::endExamples()
{
- t << "\\end{Desc}" << endl;
+ m_t << "\\end{Desc}\n";
}
-void LatexGenerator::startParamList(ParamListTypes,const char *title)
+void LatexGenerator::startParamList(ParamListTypes,const QCString &title)
{
- t << "\\begin{Desc}\n\\item[";
+ m_t << "\\begin{Desc}\n\\item[";
docify(title);
- t << "]";
+ m_t << "]";
}
void LatexGenerator::endParamList()
{
- t << "\\end{Desc}" << endl;
+ m_t << "\\end{Desc}\n";
}
void LatexGenerator::startParameterList(bool openBracket)
{
/* start of ParameterType ParameterName list */
- if (openBracket) t << "(";
- t << "\\begin{DoxyParamCaption}";
+ if (openBracket) m_t << "(";
+ m_t << "\\begin{DoxyParamCaption}";
}
void LatexGenerator::endParameterList()
{
}
-void LatexGenerator::startParameterType(bool first,const char *key)
+void LatexGenerator::startParameterType(bool first,const QCString &key)
{
- t << "\\item[{";
- if (!first && key) docify(key);
+ m_t << "\\item[{";
+ if (!first && !key.isEmpty()) docify(key);
}
void LatexGenerator::endParameterType()
{
- t << "}]";
+ m_t << "}]";
}
void LatexGenerator::startParameterName(bool /*oneArgOnly*/)
{
- t << "{";
+ m_t << "{";
}
void LatexGenerator::endParameterName(bool last,bool /*emptyList*/,bool closeBracket)
{
- t << " }";
+ m_t << " }";
if (last)
{
- t << "\\end{DoxyParamCaption}";
- if (closeBracket) t << ")";
+ m_t << "\\end{DoxyParamCaption}";
+ if (closeBracket) m_t << ")";
}
}
-void LatexGenerator::exceptionEntry(const char* prefix,bool closeBracket)
+void LatexGenerator::exceptionEntry(const QCString &prefix,bool closeBracket)
{
- if (prefix)
- t << " " << prefix << "(";
+ if (!prefix.isEmpty())
+ {
+ m_t << " " << prefix << "(";
+ }
else if (closeBracket)
- t << ")";
- t << " ";
+ {
+ m_t << ")";
+ }
+ m_t << " ";
}
void LatexGenerator::writeDoc(DocNode *n,const Definition *ctx,const MemberDef *,int)
{
LatexDocVisitor *visitor =
- new LatexDocVisitor(t,m_codeGen,ctx?ctx->getDefFileExtension():QCString(""),m_insideTabbing);
+ new LatexDocVisitor(m_t,m_codeGen,ctx?ctx->getDefFileExtension():QCString(""),m_insideTabbing);
n->accept(visitor);
delete visitor;
}
-void LatexGenerator::startConstraintList(const char *header)
+void LatexGenerator::startConstraintList(const QCString &header)
{
- t << "\\begin{Desc}\n\\item[";
+ m_t << "\\begin{Desc}\n\\item[";
docify(header);
- t << "]";
- t << "\\begin{description}" << endl;
+ m_t << "]";
+ m_t << "\\begin{description}\n";
}
void LatexGenerator::startConstraintParam()
{
- t << "\\item[{\\em ";
+ m_t << "\\item[{\\em ";
}
void LatexGenerator::endConstraintParam()
@@ -1943,12 +1958,12 @@ void LatexGenerator::endConstraintParam()
void LatexGenerator::startConstraintType()
{
- t << "} : {\\em ";
+ m_t << "} : {\\em ";
}
void LatexGenerator::endConstraintType()
{
- t << "}]";
+ m_t << "}]";
}
void LatexGenerator::startConstraintDocs()
@@ -1961,36 +1976,36 @@ void LatexGenerator::endConstraintDocs()
void LatexGenerator::endConstraintList()
{
- t << "\\end{description}" << endl;
- t << "\\end{Desc}" << endl;
+ m_t << "\\end{description}\n";
+ m_t << "\\end{Desc}\n";
}
void LatexGenerator::startInlineHeader()
{
if (Config_getBool(COMPACT_LATEX))
{
- t << "\\doxyparagraph*{";
+ m_t << "\\doxyparagraph*{";
}
else
{
- t << "\\doxysubsubsection*{";
+ m_t << "\\doxysubsubsection*{";
}
}
void LatexGenerator::endInlineHeader()
{
- t << "}" << endl;
+ m_t << "}\n";
}
-void LatexGenerator::lineBreak(const char *)
+void LatexGenerator::lineBreak(const QCString &)
{
if (m_insideTabbing)
{
- t << "\\\\\n";
+ m_t << "\\\\\n";
}
else
{
- t << "\\newline\n";
+ m_t << "\\newline\n";
}
}
@@ -1999,15 +2014,15 @@ void LatexGenerator::startMemberDocSimple(bool isEnum)
m_codeGen.incUsedTableLevel();
if (isEnum)
{
- t << "\\begin{DoxyEnumFields}{";
+ m_t << "\\begin{DoxyEnumFields}{";
docify(theTranslator->trEnumerationValues());
}
else
{
- t << "\\begin{DoxyFields}{";
+ m_t << "\\begin{DoxyFields}{";
docify(theTranslator->trCompoundMembers());
}
- t << "}" << endl;
+ m_t << "}\n";
}
void LatexGenerator::endMemberDocSimple(bool isEnum)
@@ -2015,11 +2030,11 @@ void LatexGenerator::endMemberDocSimple(bool isEnum)
m_codeGen.decUsedTableLevel();
if (isEnum)
{
- t << "\\end{DoxyEnumFields}" << endl;
+ m_t << "\\end{DoxyEnumFields}\n";
}
else
{
- t << "\\end{DoxyFields}" << endl;
+ m_t << "\\end{DoxyFields}\n";
}
}
@@ -2030,7 +2045,7 @@ void LatexGenerator::startInlineMemberType()
void LatexGenerator::endInlineMemberType()
{
- t << "&" << endl;
+ m_t << "&\n";
m_insideTabbing = FALSE;
}
@@ -2041,7 +2056,7 @@ void LatexGenerator::startInlineMemberName()
void LatexGenerator::endInlineMemberName()
{
- t << "&" << endl;
+ m_t << "&\n";
m_insideTabbing = FALSE;
}
@@ -2051,18 +2066,18 @@ void LatexGenerator::startInlineMemberDoc()
void LatexGenerator::endInlineMemberDoc()
{
- t << "\\\\\n\\hline\n" << endl;
+ m_t << "\\\\\n\\hline\n\n";
}
void LatexGenerator::startLabels()
{
- t << "\\hspace{0.3cm}";
+ m_t << "\\hspace{0.3cm}";
}
-void LatexGenerator::writeLabel(const char *l,bool isLast)
+void LatexGenerator::writeLabel(const QCString &l,bool isLast)
{
- t << "{\\ttfamily [" << l << "]}";
- if (!isLast) t << ", ";
+ m_t << "{\\ttfamily [" << l << "]}";
+ if (!isLast) m_t << ", ";
}
void LatexGenerator::endLabels()
diff --git a/src/latexgen.h b/src/latexgen.h
index 6be5de7..f457d79 100644
--- a/src/latexgen.h
+++ b/src/latexgen.h
@@ -21,39 +21,38 @@
#include "config.h"
#include "outputgen.h"
-class QFile;
-
#define LATEX_STYLE_EXTENSION ".sty"
+class TextStream;
+
class LatexCodeGenerator : public CodeOutputInterface
{
public:
- LatexCodeGenerator(FTextStream &t,const QCString &relPath,const QCString &sourceFile);
- LatexCodeGenerator();
- void setTextStream(FTextStream &t);
+ LatexCodeGenerator(TextStream &t,const QCString &relPath,const QCString &sourceFile);
+ LatexCodeGenerator(TextStream &t);
void setRelativePath(const QCString &path);
void setSourceFileName(const QCString &sourceFileName);
- void codify(const char *text);
- void writeCodeLink(const char *ref,const char *file,
- const char *anchor,const char *name,
- const char *tooltip);
- void writeTooltip(const char *,
+ void codify(const QCString &text) override;
+ void writeCodeLink(const QCString &ref,const QCString &file,
+ const QCString &anchor,const QCString &name,
+ const QCString &tooltip) override;
+ void writeTooltip(const QCString &,
const DocLinkInfo &,
- const char *,
- const char *,
+ const QCString &,
+ const QCString &,
const SourceLinkInfo &,
const SourceLinkInfo &
- ) {}
- void writeLineNumber(const char *,const char *,const char *,int);
- void startCodeLine(bool);
- void endCodeLine();
- void startFontClass(const char *);
- void endFontClass();
- void writeCodeAnchor(const char *) {}
- void setCurrentDoc(const Definition *,const char *,bool) {}
- void addWord(const char *,bool) {}
- void startCodeFragment(const char *style);
- void endCodeFragment(const char *style);
+ ) override{}
+ void writeLineNumber(const QCString &,const QCString &,const QCString &,int) override;
+ void startCodeLine(bool) override;
+ void endCodeLine() override;
+ void startFontClass(const QCString &) override;
+ void endFontClass() override;
+ void writeCodeAnchor(const QCString &) override {}
+ void setCurrentDoc(const Definition *,const QCString &,bool) override {}
+ void addWord(const QCString &,bool) override {}
+ void startCodeFragment(const QCString &style) override;
+ void endCodeFragment(const QCString &style) override;
// extra methods not part of CodeOutputInterface
void incUsedTableLevel() { m_usedTableLevel++; }
@@ -61,13 +60,13 @@ class LatexCodeGenerator : public CodeOutputInterface
int usedTableLevel() const { return m_usedTableLevel; }
private:
- void _writeCodeLink(const char *className,
- const char *ref,const char *file,
- const char *anchor,const char *name,
- const char *tooltip);
- void docify(const char *str);
+ void _writeCodeLink(const QCString &className,
+ const QCString &ref,const QCString &file,
+ const QCString &anchor,const QCString &name,
+ const QCString &tooltip);
+ void docify(const QCString &str);
bool m_streamSet = false;
- FTextStream m_t;
+ TextStream &m_t;
QCString m_relPath;
QCString m_sourceFileName;
int m_col = 0;
@@ -87,97 +86,97 @@ class LatexGenerator : public OutputGenerator
virtual std::unique_ptr<OutputGenerator> clone() const;
static void init();
- static void writeStyleSheetFile(QFile &f);
- static void writeHeaderFile(QFile &f);
- static void writeFooterFile(QFile &f);
+ static void writeStyleSheetFile(TextStream &t);
+ static void writeHeaderFile(TextStream &t);
+ static void writeFooterFile(TextStream &t);
virtual OutputType type() const { return Latex; }
// --- CodeOutputInterface
- void codify(const char *text)
+ void codify(const QCString &text)
{ m_codeGen.codify(text); }
- void writeCodeLink(const char *ref, const char *file,
- const char *anchor,const char *name,
- const char *tooltip)
+ void writeCodeLink(const QCString &ref, const QCString &file,
+ const QCString &anchor,const QCString &name,
+ const QCString &tooltip)
{ m_codeGen.writeCodeLink(ref,file,anchor,name,tooltip); }
- void writeLineNumber(const char *ref,const char *file,const char *anchor,int lineNumber)
+ void writeLineNumber(const QCString &ref,const QCString &file,const QCString &anchor,int lineNumber)
{ m_codeGen.writeLineNumber(ref,file,anchor,lineNumber); }
- void writeTooltip(const char *id, const DocLinkInfo &docInfo, const char *decl,
- const char *desc, const SourceLinkInfo &defInfo, const SourceLinkInfo &declInfo
+ void writeTooltip(const QCString &id, const DocLinkInfo &docInfo, const QCString &decl,
+ const QCString &desc, const SourceLinkInfo &defInfo, const SourceLinkInfo &declInfo
)
{ m_codeGen.writeTooltip(id,docInfo,decl,desc,defInfo,declInfo); }
void startCodeLine(bool hasLineNumbers)
{ m_codeGen.startCodeLine(hasLineNumbers); }
void endCodeLine()
{ m_codeGen.endCodeLine(); }
- void startFontClass(const char *s)
+ void startFontClass(const QCString &s)
{ m_codeGen.startFontClass(s); }
void endFontClass()
{ m_codeGen.endFontClass(); }
- void writeCodeAnchor(const char *anchor)
+ void writeCodeAnchor(const QCString &anchor)
{ m_codeGen.writeCodeAnchor(anchor); }
- void startCodeFragment(const char *style)
+ void startCodeFragment(const QCString &style)
{ m_codeGen.startCodeFragment(style); }
- void endCodeFragment(const char *style)
+ void endCodeFragment(const QCString &style)
{ m_codeGen.endCodeFragment(style); }
// ---------------------------
void writeDoc(DocNode *,const Definition *ctx,const MemberDef *,int id);
- void startFile(const char *name,const char *manName,const char *title,int id);
+ void startFile(const QCString &name,const QCString &manName,const QCString &title,int id);
void writeSearchInfo() {}
- void writeFooter(const char *) {}
+ void writeFooter(const QCString &) {}
void endFile();
void clearBuffer();
void startIndexSection(IndexSections);
void endIndexSection(IndexSections);
- void writePageLink(const char *,bool);
+ void writePageLink(const QCString &,bool);
void startProjectNumber();
void endProjectNumber() {}
void writeStyleInfo(int part);
- void startTitleHead(const char *);
+ void startTitleHead(const QCString &);
void startTitle();
- void endTitleHead(const char *,const char *name);
- void endTitle() { t << "}"; }
+ void endTitleHead(const QCString &,const QCString &name);
+ void endTitle() { m_t << "}"; }
void newParagraph();
- void startParagraph(const char *classDef);
+ void startParagraph(const QCString &classDef);
void endParagraph();
- void writeString(const char *text);
+ void writeString(const QCString &text);
void startIndexListItem() {}
void endIndexListItem() {}
- void startIndexList() { t << "\\begin{DoxyCompactList}" << endl; }
- void endIndexList() { t << "\\end{DoxyCompactList}" << endl; }
+ void startIndexList() { m_t << "\\begin{DoxyCompactList}\n"; }
+ void endIndexList() { m_t << "\\end{DoxyCompactList}\n"; }
void startIndexKey();
void endIndexKey();
void startIndexValue(bool);
- void endIndexValue(const char *,bool);
- void startItemList() { t << "\\begin{DoxyCompactItemize}" << endl; }
- void endItemList() { t << "\\end{DoxyCompactItemize}" << endl; }
- void startIndexItem(const char *ref,const char *file);
- void endIndexItem(const char *ref,const char *file);
- void docify(const char *text);
- void writeObjectLink(const char *ref,const char *file,
- const char *anchor,const char *name);
-
- void startTextLink(const char *,const char *);
+ void endIndexValue(const QCString &,bool);
+ void startItemList() { m_t << "\\begin{DoxyCompactItemize}\n"; }
+ void endItemList() { m_t << "\\end{DoxyCompactItemize}\n"; }
+ void startIndexItem(const QCString &ref,const QCString &file);
+ void endIndexItem(const QCString &ref,const QCString &file);
+ void docify(const QCString &text);
+ void writeObjectLink(const QCString &ref,const QCString &file,
+ const QCString &anchor,const QCString &name);
+
+ void startTextLink(const QCString &,const QCString &);
void endTextLink();
- void startHtmlLink(const char *url);
+ void startHtmlLink(const QCString &url);
void endHtmlLink();
- void startTypewriter() { t << "{\\ttfamily "; }
- void endTypewriter() { t << "}"; }
+ void startTypewriter() { m_t << "{\\ttfamily "; }
+ void endTypewriter() { m_t << "}"; }
void startGroupHeader(int);
void endGroupHeader(int);
- void startItemListItem() { t << "\\item " << endl; }
+ void startItemListItem() { m_t << "\\item \n"; }
void endItemListItem() {}
void startMemberSections() {}
void endMemberSections() {}
void startHeaderSection() {}
void endHeaderSection() {}
- void startMemberHeader(const char *,int);
+ void startMemberHeader(const QCString &,int);
void endMemberHeader();
void startMemberSubtitle() {}
void endMemberSubtitle() {}
@@ -189,10 +188,12 @@ class LatexGenerator : public OutputGenerator
void endInlineHeader();
void startAnonTypeScope(int);
void endAnonTypeScope(int);
- void startMemberItem(const char *,int,const char *);
+ void startMemberItem(const QCString &,int,const QCString &);
void endMemberItem();
void startMemberTemplateParams();
- void endMemberTemplateParams(const char *,const char *);
+ void endMemberTemplateParams(const QCString &,const QCString &);
+ void startCompoundTemplateParams() { startSubsubsection(); }
+ void endCompoundTemplateParams() { endSubsubsection(); }
void startMemberGroupHeader(bool);
void endMemberGroupHeader();
@@ -204,70 +205,70 @@ class LatexGenerator : public OutputGenerator
void insertMemberAlign(bool) {}
void insertMemberAlignLeft(int,bool){}
- void writeRuler() { t << endl << endl; }
- void writeAnchor(const char *fileName,const char *name);
- void startEmphasis() { t << "{\\em "; }
- void endEmphasis() { t << "}"; }
- void startBold() { t << "{\\bfseries "; }
- void endBold() { t << "}"; }
+ void writeRuler() { m_t << "\n\n"; }
+ void writeAnchor(const QCString &fileName,const QCString &name);
+ void startEmphasis() { m_t << "{\\em "; }
+ void endEmphasis() { m_t << "}"; }
+ void startBold() { m_t << "{\\bfseries "; }
+ void endBold() { m_t << "}"; }
void startDescription();
void endDescription();
void startDescItem();
void endDescItem();
- void lineBreak(const char *style=0);
- void startMemberDoc(const char *,const char *,const char *,const char *,int,int,bool);
+ void lineBreak(const QCString &style=QCString());
+ void startMemberDoc(const QCString &,const QCString &,const QCString &,const QCString &,int,int,bool);
void endMemberDoc(bool);
- void startDoxyAnchor(const char *,const char *,const char *,const char *,const char *);
- void endDoxyAnchor(const char *,const char *);
+ void startDoxyAnchor(const QCString &,const QCString &,const QCString &,const QCString &,const QCString &);
+ void endDoxyAnchor(const QCString &,const QCString &);
void writeChar(char c);
- void writeLatexSpacing() { t << "\\hspace{0.3cm}"; }
- void writeStartAnnoItem(const char *type,const char *file,
- const char *path,const char *name);
- void writeEndAnnoItem(const char *name);
- void startSubsection() { t << "\\subsection*{"; }
- void endSubsection() { t << "}" << endl; }
- void startSubsubsection() { t << "\\subsubsection*{"; }
- void endSubsubsection() { t << "}" << endl; }
- void startCenter() { t << "\\begin{center}" << endl; }
- void endCenter() { t << "\\end{center}" << endl; }
- void startSmall() { t << "\\footnotesize "; }
- void endSmall() { t << "\\normalsize "; }
- void startMemberDescription(const char *,const char *,bool);
+ void writeLatexSpacing() { m_t << "\\hspace{0.3cm}"; }
+ void writeStartAnnoItem(const QCString &type,const QCString &file,
+ const QCString &path,const QCString &name);
+ void writeEndAnnoItem(const QCString &name);
+ void startSubsection() { m_t << "\\subsection*{"; }
+ void endSubsection() { m_t << "}\n"; }
+ void startSubsubsection() { m_t << "\\subsubsection*{"; }
+ void endSubsubsection() { m_t << "}\n"; }
+ void startCenter() { m_t << "\\begin{center}\n"; }
+ void endCenter() { m_t << "\\end{center}\n"; }
+ void startSmall() { m_t << "\\footnotesize "; }
+ void endSmall() { m_t << "\\normalsize "; }
+ void startMemberDescription(const QCString &,const QCString &,bool);
void endMemberDescription();
void startMemberDeclaration() {}
- void endMemberDeclaration(const char *,const char *) {}
- void writeInheritedSectionTitle(const char *,const char *,const char *,
- const char *,const char *,const char *) {}
- void startDescList(SectionTypes) { t << "\\begin{Desc}\n\\item["; }
- void endDescList() { t << "\\end{Desc}" << endl; }
+ void endMemberDeclaration(const QCString &,const QCString &) {}
+ void writeInheritedSectionTitle(const QCString &,const QCString &,const QCString &,
+ const QCString &,const QCString &,const QCString &) {}
+ void startDescList(SectionTypes) { m_t << "\\begin{Desc}\n\\item["; }
+ void endDescList() { m_t << "\\end{Desc}\n"; }
void startExamples();
void endExamples();
- void startParamList(ParamListTypes,const char *title);
+ void startParamList(ParamListTypes,const QCString &title);
void endParamList();
- void startDescForItem() { t << "\\par" << endl; }
+ void startDescForItem() { m_t << "\\par\n"; }
void endDescForItem() {}
- void startSection(const char *,const char *,SectionType);
- void endSection(const char *,SectionType);
- void addIndexItem(const char *,const char *);
+ void startSection(const QCString &,const QCString &,SectionType);
+ void endSection(const QCString &,SectionType);
+ void addIndexItem(const QCString &,const QCString &);
void startIndent() {}
void endIndent() {}
void writeSynopsis() {}
void startClassDiagram();
- void endClassDiagram(const ClassDiagram &,const char *,const char *);
+ void endClassDiagram(const ClassDiagram &,const QCString &,const QCString &);
void startPageRef();
- void endPageRef(const char *,const char *);
+ void endPageRef(const QCString &,const QCString &);
void startQuickIndices() {}
void endQuickIndices() {}
- void writeSplitBar(const char *) {}
- void writeNavigationPath(const char *) {}
+ void writeSplitBar(const QCString &) {}
+ void writeNavigationPath(const QCString &) {}
void writeLogo() {}
- void writeQuickLinks(bool,HighlightedItem,const char*) {}
- void writeSummaryLink(const char *,const char *,const char *,bool) {}
+ void writeQuickLinks(bool,HighlightedItem,const QCString &) {}
+ void writeSummaryLink(const QCString &,const QCString &,const QCString &,bool) {}
void startContents() {}
void endContents() {}
void writeNonBreakableSpace(int);
- void startDescTable(const char *title);
+ void startDescTable(const QCString &title);
void endDescTable();
void startDescTableRow();
void endDescTableRow();
@@ -293,18 +294,18 @@ class LatexGenerator : public OutputGenerator
void endTextBlock(bool) {}
void startMemberDocPrefixItem() {}
- void endMemberDocPrefixItem() { t << "\\\\" << endl; }
+ void endMemberDocPrefixItem() { m_t << "\\\\\n"; }
void startMemberDocName(bool) {}
void endMemberDocName() {}
- void startParameterType(bool,const char *);
+ void startParameterType(bool,const QCString &);
void endParameterType();
void startParameterName(bool);
void endParameterName(bool,bool,bool);
void startParameterList(bool);
void endParameterList();
- void exceptionEntry(const char*,bool);
+ void exceptionEntry(const QCString &,bool);
- void startConstraintList(const char *);
+ void startConstraintList(const QCString &);
void startConstraintParam();
void endConstraintParam();
void startConstraintType();
@@ -323,11 +324,11 @@ class LatexGenerator : public OutputGenerator
void endInlineMemberDoc();
void startLabels();
- void writeLabel(const char *l,bool isLast);
+ void writeLabel(const QCString &l,bool isLast);
void endLabels();
- void setCurrentDoc(const Definition *,const char *,bool) {}
- void addWord(const char *,bool) {}
+ void setCurrentDoc(const Definition *,const QCString &,bool) {}
+ void addWord(const QCString &,bool) {}
private:
diff --git a/src/layout.cpp b/src/layout.cpp
index b8984e0..7c368be 100644
--- a/src/layout.cpp
+++ b/src/layout.cpp
@@ -19,8 +19,6 @@
#include <array>
#include <assert.h>
-#include <qfile.h>
-#include <qfileinfo.h>
#include "layout.h"
#include "message.h"
@@ -94,7 +92,7 @@ static bool elemIsVisible(const XMLHandlers::Attributes &attrib,bool defVal=TRUE
else if (!opt)
{
err("found unsupported value %s for visible attribute in layout file\n",
- visible.data());
+ qPrint(visible));
}
}
return visible!="no" && visible!="0";
@@ -103,7 +101,7 @@ static bool elemIsVisible(const XMLHandlers::Attributes &attrib,bool defVal=TRUE
//---------------------------------------------------------------------------------
LayoutNavEntry *LayoutNavEntry::find(LayoutNavEntry::Kind kind,
- const char *file) const
+ const QCString &file) const
{
LayoutNavEntry *result=0;
for (const auto &entry : m_children)
@@ -112,7 +110,7 @@ LayoutNavEntry *LayoutNavEntry::find(LayoutNavEntry::Kind kind,
// root in case an entry is in the tree twice
result = entry->find(kind,file);
if (result) return result;
- if (entry->kind()==kind && (file==0 || entry->baseFile()==file))
+ if (entry->kind()==kind && (file==QCString() || entry->baseFile()==file))
{
return entry.get();
}
@@ -135,7 +133,7 @@ QCString LayoutNavEntry::url() const
const Definition *d = 0;
QCString anchor;
bool found=FALSE;
- if (resolveLink(0,url.mid(5).stripWhiteSpace(),TRUE,&d,anchor))
+ if (resolveLink(QCString(),url.mid(5).stripWhiteSpace(),TRUE,&d,anchor))
{
if (d && d->isLinkable())
{
@@ -152,7 +150,7 @@ QCString LayoutNavEntry::url() const
msg("explicit link request to '%s' in layout file '%s' could not be resolved\n",qPrint(url.mid(5)),qPrint(Config_getString(LAYOUT_FILE)));
}
}
- //printf("LayoutNavEntry::url()=%s\n",url.data());
+ //printf("LayoutNavEntry::url()=%s\n",qPrint(url));
return url;
}
@@ -197,7 +195,7 @@ class LayoutParser
bool isVisible = elemIsVisible(attrib);
QCString userTitle = XMLHandlers::value(attrib,"title");
//printf("startSectionEntry: title='%s' userTitle='%s'\n",
- // title.data(),userTitle.data());
+ // qPrint(title),qPrint(userTitle));
if (userTitle.isEmpty()) userTitle = title;
if (m_part!=-1 && isVisible)
{
@@ -216,7 +214,7 @@ class LayoutParser
QCString userSubscript = XMLHandlers::value(attrib,"subtitle");
if (userTitle.isEmpty()) userTitle = title;
if (userSubscript.isEmpty()) userSubscript = subscript;
- //printf("memberdecl: %s\n",userTitle.data());
+ //printf("memberdecl: %s\n",qPrint(userTitle));
if (m_part!=-1 /*&& isVisible*/)
{
LayoutDocManager::instance().addEntry((LayoutDocManager::LayoutPart)m_part,
@@ -229,7 +227,7 @@ class LayoutParser
{
QCString userTitle = XMLHandlers::value(attrib,"title");
if (userTitle.isEmpty()) userTitle = title;
- //printf("memberdef: %s\n",userTitle.data());
+ //printf("memberdef: %s\n",qPrint(userTitle));
if (m_part!=-1 /*&& isVisible*/)
{
LayoutDocManager::instance().addEntry((LayoutDocManager::LayoutPart)m_part,
@@ -321,6 +319,13 @@ class LayoutParser
fortranOpt || sliceOpt ? theTranslator->trModulesMemberDescription(extractAll) : theTranslator->trNamespaceMemberDescription(extractAll),
"namespacemembers"
},
+ { "concepts",
+ LayoutNavEntry::Concepts,
+ theTranslator->trConcept(true,false),
+ theTranslator->trConceptList(),
+ theTranslator->trConceptListDescription(extractAll),
+ "concepts"
+ },
{ "classindex",
LayoutNavEntry::ClassIndex,
fortranOpt ? theTranslator->trDataTypes() : vhdlOpt ? theTranslator->trDesignUnits() : theTranslator->trCompoundIndex(),
@@ -512,7 +517,7 @@ class LayoutParser
}
else
{
- ::warn(fileName.c_str(),m_locator->lineNr(),"the type '%s' is not supported for the entry tag within a navindex! Check your layout file!\n",type.data());
+ ::warn(fileName.c_str(),m_locator->lineNr(),"the type '%s' is not supported for the entry tag within a navindex! Check your layout file!\n",qPrint(type));
}
m_invalidEntry=TRUE;
return;
@@ -587,6 +592,19 @@ class LayoutParser
m_part = -1;
}
+ void startConcept(const XMLHandlers::Attributes &)
+ {
+ LayoutDocManager::instance().clear(LayoutDocManager::Concept);
+ m_scope="concept/";
+ m_part = (int)LayoutDocManager::Concept;
+ }
+
+ void endConcept()
+ {
+ m_scope="";
+ m_part = -1;
+ }
+
void startFile(const XMLHandlers::Attributes &)
{
LayoutDocManager::instance().clear(LayoutDocManager::File);
@@ -975,6 +993,31 @@ static const std::map< std::string, ElementCallbacks > g_elementHandlers =
endCb()
} },
+ // concept layout handlers
+ { "concept", { startCb(&LayoutParser::startConcept),
+ endCb(&LayoutParser::endConcept)
+ } },
+
+ { "concept/briefdescription", { startCb(&LayoutParser::startSimpleEntry, LayoutDocEntry::BriefDesc),
+ endCb()
+ } },
+ { "concept/definition", { startCb(&LayoutParser::startSectionEntry, LayoutDocEntry::ConceptDefinition,
+ []() { return compileOptions(theTranslator->trConceptDefinition()); }),
+ endCb()
+ } },
+ { "concept/includes", { startCb(&LayoutParser::startSimpleEntry, LayoutDocEntry::ClassIncludes),
+ endCb()
+ } },
+ { "concept/sourcelink", { startCb(&LayoutParser::startSimpleEntry, LayoutDocEntry::FileSourceLink),
+ endCb()
+ } },
+ { "concept/detaileddescription", { startCb(&LayoutParser::startSectionEntry,LayoutDocEntry::DetailedDesc,
+ []() { return compileOptions(theTranslator->trDetailedDescription()); }),
+ endCb()
+ } },
+ { "concept/authorsection", { startCb(&LayoutParser::startSimpleEntry, LayoutDocEntry::AuthorSection),
+ endCb()
+ } },
// namespace layout handlers
{ "namespace", { startCb(&LayoutParser::startNamespace),
endCb(&LayoutParser::endNamespace)
@@ -1018,6 +1061,10 @@ static const std::map< std::string, ElementCallbacks > g_elementHandlers =
SrcLangExt_Fortran,theTranslator->trDataTypes()); }),
endCb()
} },
+ { "namespace/memberdecl/concepts", { startCb(&LayoutParser::startSectionEntry, LayoutDocEntry::NamespaceConcepts,
+ []() { return compileOptions(theTranslator->trConcept(true,false)); }),
+ endCb()
+ } },
{ "namespace/memberdecl/structs", { startCb(&LayoutParser::startSectionEntry,LayoutDocEntry::NamespaceStructs,
[]() { return compileOptions(theTranslator->trStructs()); }),
endCb()
@@ -1137,6 +1184,10 @@ static const std::map< std::string, ElementCallbacks > g_elementHandlers =
SrcLangExt_Fortran,theTranslator->trDataTypes()); }),
endCb()
} },
+ { "file/memberdecl/concepts", { startCb(&LayoutParser::startSectionEntry, LayoutDocEntry::FileConcepts,
+ []() { return compileOptions(theTranslator->trConcept(true,false)); }),
+ endCb()
+ } },
{ "file/memberdecl/structs", { startCb(&LayoutParser::startSectionEntry,LayoutDocEntry::FileStructs,
[]() { return compileOptions(theTranslator->trStructs()); }),
endCb()
@@ -1257,6 +1308,10 @@ static const std::map< std::string, ElementCallbacks > g_elementHandlers =
[]() { return compileOptions(/* default */ theTranslator->trCompounds(),
SrcLangExt_VHDL, theTranslator->trVhdlType(VhdlDocGen::ENTITY,FALSE),
SrcLangExt_Fortran, theTranslator->trDataTypes()); }),
+ endCb()
+ } },
+ { "group/memberdecl/concepts", { startCb(&LayoutParser::startSectionEntry, LayoutDocEntry::GroupConcepts,
+ []() { return compileOptions(theTranslator->trConcept(true,false)); }),
endCb()
} },
{ "group/memberdecl/namespaces", { startCb(&LayoutParser::startSectionEntry, LayoutDocEntry::GroupNamespaces,
@@ -1442,7 +1497,7 @@ static const std::map< std::string, ElementCallbacks > g_elementHandlers =
void LayoutParser::startElement( const std::string &name, const XMLHandlers::Attributes& attrib )
{
- //printf("startElement [%s]::[%s]\n",m_scope.data(),name.data());
+ //printf("startElement [%s]::[%s]\n",qPrint(m_scope),qPrint(name));
auto it = g_elementHandlers.find(m_scope.str()+name);
if (it!=g_elementHandlers.end())
{
@@ -1452,13 +1507,13 @@ void LayoutParser::startElement( const std::string &name, const XMLHandlers::Att
{
std::string fileName = m_locator->fileName();
::warn(fileName.c_str(),m_locator->lineNr(),"Unexpected start tag '%s' found in scope='%s'!\n",
- name.data(),m_scope.data());
+ qPrint(name),qPrint(m_scope));
}
}
void LayoutParser::endElement( const std::string &name )
{
- //printf("endElement [%s]::[%s]\n",m_scope.data(),name.data());
+ //printf("endElement [%s]::[%s]\n",qPrint(m_scope),qPrint(name));
auto it=g_elementHandlers.end();
if (!m_scope.isEmpty() && m_scope.right(static_cast<uint>(name.length())+1)==name+"/")
@@ -1504,7 +1559,7 @@ void LayoutDocManager::init()
XMLParser parser(handlers);
layoutParser.setDocumentLocator(&parser);
QCString layout_default = ResourceMgr::instance().getAsString("layout_default.xml");
- parser.parse("layout_default.xml",layout_default,Debug::isFlagSet(Debug::Lex));
+ parser.parse("layout_default.xml",layout_default.data(),Debug::isFlagSet(Debug::Lex));
}
LayoutDocManager::~LayoutDocManager()
@@ -1538,7 +1593,7 @@ void LayoutDocManager::clear(LayoutDocManager::LayoutPart p)
d->docEntries[(int)p].clear();
}
-void LayoutDocManager::parse(const char *fileName)
+void LayoutDocManager::parse(const QCString &fileName)
{
LayoutParser &layoutParser = LayoutParser::instance();
XMLHandlers handlers;
@@ -1547,23 +1602,26 @@ void LayoutDocManager::parse(const char *fileName)
handlers.error = [&layoutParser](const std::string &fn,int lineNr,const std::string &msg) { layoutParser.error(fn,lineNr,msg); };
XMLParser parser(handlers);
layoutParser.setDocumentLocator(&parser);
- parser.parse(fileName,fileToString(fileName),Debug::isFlagSet(Debug::Lex));
+ parser.parse(fileName.data(),fileToString(fileName).data(),Debug::isFlagSet(Debug::Lex));
}
//---------------------------------------------------------------------------------
-void writeDefaultLayoutFile(const char *fileName)
+void writeDefaultLayoutFile(const QCString &fileName)
{
- QFile f(fileName);
- bool ok = openOutputFile(fileName,f);
- if (!ok)
+ std::ofstream f;
+ if (openOutputFile(fileName,f))
{
- err("Failed to open file %s for writing!\n",fileName);
+ TextStream t(&f);
+ QCString layout_default = ResourceMgr::instance().getAsString("layout_default.xml");
+ t << substitute(layout_default,"$doxygenversion",getDoxygenVersion());
+ }
+ else
+ {
+ err("Failed to open file %s for writing!\n",qPrint(fileName));
return;
}
- FTextStream t(&f);
- QCString layout_default = ResourceMgr::instance().getAsString("layout_default.xml");
- t << substitute(layout_default,"$doxygenversion",getDoxygenVersion());
+ f.close();
}
//----------------------------------------------------------------------------------
diff --git a/src/layout.h b/src/layout.h
index 851af22..04fdf52 100644
--- a/src/layout.h
+++ b/src/layout.h
@@ -45,19 +45,22 @@ struct LayoutDocEntry
ClassCollaborationGraph, ClassAllMembersLink,
ClassUsedFiles,
+ // Concept specific items
+ ConceptDefinition,
+
// Namespace specific items
NamespaceNestedNamespaces, NamespaceNestedConstantGroups,
- NamespaceClasses, NamespaceInterfaces, NamespaceStructs, NamespaceExceptions,
+ NamespaceClasses, NamespaceConcepts, NamespaceInterfaces, NamespaceStructs, NamespaceExceptions,
NamespaceInlineClasses,
// File specific items
- FileClasses, FileInterfaces, FileStructs, FileExceptions, FileConstantGroups, FileNamespaces,
+ FileClasses, FileConcepts, FileInterfaces, FileStructs, FileExceptions, FileConstantGroups, FileNamespaces,
FileIncludes, FileIncludeGraph,
FileIncludedByGraph, FileSourceLink,
FileInlineClasses,
// Group specific items
- GroupClasses, GroupInlineClasses, GroupNamespaces,
+ GroupClasses, GroupConcepts, GroupInlineClasses, GroupNamespaces,
GroupDirs, GroupNestedGroups, GroupFiles,
GroupGraph, GroupPageDocs,
@@ -130,6 +133,7 @@ struct LayoutNavEntry
Namespaces,
NamespaceList,
NamespaceMembers,
+ Concepts,
Classes,
ClassList,
ClassIndex,
@@ -173,7 +177,7 @@ struct LayoutNavEntry
void addChild(LayoutNavEntry *e) { m_children.push_back(std::unique_ptr<LayoutNavEntry>(e)); }
void prependChild(LayoutNavEntry *e) { m_children.insert(m_children.begin(),std::unique_ptr<LayoutNavEntry>(e)); }
const LayoutNavEntryList &children() const { return m_children; }
- LayoutNavEntry *find(LayoutNavEntry::Kind k,const char *file=0) const;
+ LayoutNavEntry *find(LayoutNavEntry::Kind k,const QCString &file=QCString()) const;
private:
LayoutNavEntry() : m_parent(0), m_kind(None), m_visible(FALSE) {}
@@ -196,7 +200,7 @@ class LayoutDocManager
public:
enum LayoutPart
{
- Class, Namespace, File, Group, Directory,
+ Class, Concept, Namespace, File, Group, Directory,
NrParts
};
/** Returns a reference to this singleton. */
@@ -209,7 +213,7 @@ class LayoutDocManager
LayoutNavEntry *rootNavEntry() const;
/** Parses a user provided layout */
- void parse(const char *fileName);
+ void parse(const QCString &fileName);
void init();
private:
void addEntry(LayoutPart p,LayoutDocEntry*e);
@@ -220,7 +224,7 @@ class LayoutDocManager
friend class LayoutParser;
};
-void writeDefaultLayoutFile(const char *fileName);
+void writeDefaultLayoutFile(const QCString &fileName);
#endif
diff --git a/src/lexcode.h b/src/lexcode.h
index 38aec50..b64b691 100644
--- a/src/lexcode.h
+++ b/src/lexcode.h
@@ -33,11 +33,11 @@ class LexCodeParser : public CodeParserInterface
LexCodeParser();
virtual ~LexCodeParser();
void parseCode(CodeOutputInterface &codeOutIntf,
- const char *scopeName,
+ const QCString &scopeName,
const QCString &input,
SrcLangExt,
bool isExampleBlock,
- const char *exampleName=0,
+ const QCString &exampleName=QCString(),
FileDef *fileDef=0,
int startLine=-1,
int endLine=-1,
diff --git a/src/lexcode.l b/src/lexcode.l
index a118703..4cfb636 100644
--- a/src/lexcode.l
+++ b/src/lexcode.l
@@ -66,7 +66,6 @@ struct lexcodeYY_state
QCString CCodeBuffer;
int startCCodeLine = -1;
int roundCount = 0;
- int squareCount = 0;
bool insideCode = FALSE;
QCString delimiter;
QCString docBlockName;
@@ -93,7 +92,7 @@ static void startCodeLine(yyscan_t yyscanner);
static void endFontClass(yyscan_t yyscanner);
static void endCodeLine(yyscan_t yyscanner);
static void nextCodeLine(yyscan_t yyscanner);
-static void codifyLines(yyscan_t yyscanner,const char *text);
+static void codifyLines(yyscan_t yyscanner,const QCString &text);
static void startFontClass(yyscan_t yyscanner,const char *s);
static int countLines(yyscan_t yyscanner);
static yy_size_t yyread(yyscan_t yyscanner,char *buf,yy_size_t max_size);
@@ -114,12 +113,13 @@ LiteralStart "%{"{nl}
LiteralEnd "%}"{nl}
RulesStart "%%"{nl}
RulesEnd "%%"{nl}
-RulesSharp "<"[^>]*">"
+RulesSharp "<"[^>\n]*">"
RulesCurly "{"[^{}\n]*"}"
StartSquare "["
StartDouble "\""
StartRound "("
-EscapeRulesCharOpen "\\["|"\\<"|"\\{"|"\\("|"\\\""|"\\{"|"\\ "
+StartRoundQuest "(?"
+EscapeRulesCharOpen "\\["|"\\<"|"\\{"|"\\("|"\\\""|"\\ "|"\\\\"
EscapeRulesCharClose "\\]"|"\\>"|"\\}"|"\\)"
EscapeRulesChar {EscapeRulesCharOpen}|{EscapeRulesCharClose}
@@ -134,14 +134,15 @@ CODE [cC][oO][dD][eE]
RAWBEGIN (u|U|L|u8)?R\"[^ \t\(\)\\]{0,16}"("
RAWEND ")"[^ \t\(\)\\]{0,16}\"
CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
+CHARCE "[:"[^:]*":]"
/* no comment start / end signs inside square brackets */
NCOMM [^/\*]
- // C start comment
+ // C start comment
CCS "/\*"
// C end comment
CCE "*\/"
- // Cpp comment
+ // Cpp comment
CPPC "/\/"
// doxygen start comment
DCOMM ("/\*!"|"/\**"|"/\/!"|"/\/\/")
@@ -160,6 +161,7 @@ NONLopt [^\n]*
%x RulesSquare
%x RulesRoundSquare
%x RulesRound
+%x RulesRoundQuest
%x UserSection
%x TopSection
@@ -326,28 +328,24 @@ NONLopt [^\n]*
yyextra->rulesPatternBuffer += yytext;
}
<RulesPattern>{StartSquare} {
- yyextra->squareCount++;
yyextra->rulesPatternBuffer += yytext;
yyextra->lastContext = YY_START;
BEGIN(RulesSquare);
}
-<RulesSquare,RulesRoundSquare>"\\[" |
-<RulesSquare,RulesRoundSquare>"\\]" {
+<RulesSquare,RulesRoundSquare>{CHARCE} {
yyextra->rulesPatternBuffer += yytext;
}
-<RulesSquare,RulesRoundSquare>"[" {
- yyextra->squareCount++;
+<RulesSquare,RulesRoundSquare>"\\[" |
+<RulesSquare,RulesRoundSquare>"\\]" {
yyextra->rulesPatternBuffer += yytext;
}
<RulesSquare>"]" {
- yyextra->squareCount--;
yyextra->rulesPatternBuffer += yytext;
- if (!yyextra->squareCount) BEGIN(RulesPattern) ;
+ BEGIN(RulesPattern) ;
}
<RulesRoundSquare>"]" {
- yyextra->squareCount--;
yyextra->rulesPatternBuffer += yytext;
- if (!yyextra->squareCount) BEGIN(RulesRound) ;
+ BEGIN(RulesRound) ;
}
<RulesSquare,RulesRoundSquare>"\\\\" {
yyextra->rulesPatternBuffer += yytext;
@@ -355,6 +353,28 @@ NONLopt [^\n]*
<RulesSquare,RulesRoundSquare>. {
yyextra->rulesPatternBuffer += yytext;
}
+<RulesPattern>{StartRoundQuest} {
+ yyextra->rulesPatternBuffer += yytext;
+ yyextra->lastContext = YY_START;
+ BEGIN(RulesRoundQuest);
+ }
+<RulesRoundQuest>{nl} {
+ yyextra->rulesPatternBuffer += yytext;
+ if (!yyextra->rulesPatternBuffer.isEmpty())
+ {
+ startFontClass(yyscanner,"stringliteral");
+ codifyLines(yyscanner,yyextra->rulesPatternBuffer.data());
+ yyextra->rulesPatternBuffer.resize(0);
+ endFontClass(yyscanner);
+ }
+ }
+<RulesRoundQuest>[^)] {
+ yyextra->rulesPatternBuffer += yytext;
+ }
+<RulesRoundQuest>")" {
+ yyextra->rulesPatternBuffer += yytext;
+ BEGIN(yyextra->lastContext);
+ }
<RulesPattern>{StartRound} {
yyextra->roundCount++;
yyextra->rulesPatternBuffer += yytext;
@@ -365,7 +385,6 @@ NONLopt [^\n]*
yyextra->rulesPatternBuffer += yytext;
}
<RulesRound>{StartSquare} {
- yyextra->squareCount++;
yyextra->rulesPatternBuffer += yytext;
BEGIN(RulesRoundSquare);
}
@@ -373,8 +392,7 @@ NONLopt [^\n]*
yyextra->rulesPatternBuffer += yytext;
BEGIN(RulesRoundDouble);
}
-<RulesRound>"\\(" |
-<RulesRound>"\\)" {
+<RulesRound>{EscapeRulesChar} {
yyextra->rulesPatternBuffer += yytext;
}
<RulesRound>"(" {
@@ -386,6 +404,13 @@ NONLopt [^\n]*
yyextra->rulesPatternBuffer += yytext;
if (!yyextra->roundCount) BEGIN( yyextra->lastContext ) ;
}
+<RulesRound>{nl} {
+ yyextra->rulesPatternBuffer += yytext;
+ yyextra->yyLineNr++;
+ }
+<RulesRound>{ws} {
+ yyextra->rulesPatternBuffer += yytext;
+ }
<RulesRound>. {
yyextra->rulesPatternBuffer += yytext;
}
@@ -393,7 +418,7 @@ NONLopt [^\n]*
if (!yyextra->rulesPatternBuffer.isEmpty())
{
startFontClass(yyscanner,"stringliteral");
- codifyLines(yyscanner,yyextra->rulesPatternBuffer.data());
+ codifyLines(yyscanner,yyextra->rulesPatternBuffer);
yyextra->rulesPatternBuffer.resize(0);
endFontClass(yyscanner);
}
@@ -413,7 +438,7 @@ NONLopt [^\n]*
if (!yyextra->rulesPatternBuffer.isEmpty())
{
startFontClass(yyscanner,"stringliteral");
- codifyLines(yyscanner,yyextra->rulesPatternBuffer.data());
+ codifyLines(yyscanner,yyextra->rulesPatternBuffer);
yyextra->rulesPatternBuffer.resize(0);
endFontClass(yyscanner);
}
@@ -428,7 +453,7 @@ NONLopt [^\n]*
if (!yyextra->rulesPatternBuffer.isEmpty())
{
startFontClass(yyscanner,"stringliteral");
- codifyLines(yyscanner,yyextra->rulesPatternBuffer.data());
+ codifyLines(yyscanner,yyextra->rulesPatternBuffer);
yyextra->rulesPatternBuffer.resize(0);
endFontClass(yyscanner);
}
@@ -500,7 +525,7 @@ NONLopt [^\n]*
}
<SkipCurly>{B}*{RAWBEGIN} {
QCString raw=QCString(yytext).stripWhiteSpace();
- yyextra->delimiter = raw.data()+2;
+ yyextra->delimiter = raw.mid(2);
yyextra->delimiter=yyextra->delimiter.left(yyextra->delimiter.length()-1);
yyextra->lastRawStringContext = YY_START;
yyextra->CCodeBuffer += yytext;
@@ -890,9 +915,10 @@ NONLopt [^\n]*
yyextra->CCodeBuffer += yytext;
yyextra->yyLineNr++;
}
- /*
+ /*
<*>. { fprintf(stderr,"Lex code scanner Def rule for %s: #%s#\n",stateToString(YY_START),yytext);}
- */
+<*>{nl} { fprintf(stderr,"Lex code scanner Def rule for newline %s: #%s#\n",stateToString(YY_START),yytext); yyextra->yyLineNr++;}
+ */
<*><<EOF>> {
handleCCode(yyscanner);
yyterminate();
@@ -930,7 +956,7 @@ static void startCodeLine(yyscan_t yyscanner)
{
yyextra->currentDefinition = d;
yyextra->currentMemberDef = yyextra->sourceFileDef->getSourceMember(yyextra->yyLineNr);
- yyextra->classScope = d->name().copy();
+ yyextra->classScope = d->name();
QCString lineAnchor;
lineAnchor.sprintf("l%05d",yyextra->yyLineNr);
if (yyextra->currentMemberDef)
@@ -944,13 +970,13 @@ static void startCodeLine(yyscan_t yyscanner)
{
yyextra->code->writeLineNumber(d->getReference(),
d->getOutputFileBase(),
- 0,yyextra->yyLineNr);
+ QCString(),yyextra->yyLineNr);
setCurrentDoc(yyscanner,lineAnchor);
}
}
else
{
- yyextra->code->writeLineNumber(0,0,0,yyextra->yyLineNr);
+ yyextra->code->writeLineNumber(QCString(),QCString(),QCString(),yyextra->yyLineNr);
}
}
@@ -991,10 +1017,11 @@ static void nextCodeLine(yyscan_t yyscanner)
}
}
-static void codifyLines(yyscan_t yyscanner,const char *text)
+static void codifyLines(yyscan_t yyscanner,const QCString &text)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
- const char *p=text,*sp=p;
+ if (text.isEmpty()) return;
+ const char *p=text.data(),*sp=p;
char c;
bool done=false;
while (!done)
@@ -1148,11 +1175,11 @@ void LexCodeParser::resetCodeParserState()
}
void LexCodeParser::parseCode(CodeOutputInterface &codeOutIntf,
- const char *scopeName,
+ const QCString &scopeName,
const QCString &input,
SrcLangExt,
bool isExampleBlock,
- const char *exampleName,
+ const QCString &exampleName,
FileDef *fileDef,
int startLine,
int endLine,
@@ -1168,10 +1195,10 @@ void LexCodeParser::parseCode(CodeOutputInterface &codeOutIntf,
if (input.isEmpty()) return;
- printlex(yy_flex_debug, true, __FILE__, fileDef ? fileDef->fileName().data(): NULL);
+ printlex(yy_flex_debug, true, __FILE__, fileDef ? qPrint(fileDef->fileName()): NULL);
yyextra->code = &codeOutIntf;
- yyextra->inputString = input;
+ yyextra->inputString = input.data();
yyextra->inputPosition = 0;
yyextra->currentFontClass = 0;
yyextra->needsTermination = false;
@@ -1202,7 +1229,7 @@ void LexCodeParser::parseCode(CodeOutputInterface &codeOutIntf,
if (isExampleBlock && fileDef==0)
{
// create a dummy filedef for the example
- yyextra->sourceFileDef = createFileDef("",(exampleName?exampleName:"generated"));
+ yyextra->sourceFileDef = createFileDef(QCString(),!exampleName.isEmpty() ? exampleName : QCString("generated"));
cleanupSourceDef = true;
}
@@ -1230,7 +1257,7 @@ void LexCodeParser::parseCode(CodeOutputInterface &codeOutIntf,
yyextra->sourceFileDef=0;
}
- printlex(yy_flex_debug, false, __FILE__, fileDef ? fileDef->fileName().data(): NULL);
+ printlex(yy_flex_debug, false, __FILE__, fileDef ? qPrint(fileDef->fileName()): NULL);
}
//---------------------------------------------------------------------------------
diff --git a/src/lexscanner.h b/src/lexscanner.h
index 8734c59..dbb1f56 100644
--- a/src/lexscanner.h
+++ b/src/lexscanner.h
@@ -29,12 +29,12 @@ class LexOutlineParser : public OutlineParserInterface
public:
LexOutlineParser();
~LexOutlineParser();
- void parseInput(const char *fileName,
+ void parseInput(const QCString &fileName,
const char *fileBuf,
const std::shared_ptr<Entry> &root,
ClangTUParser *clangParser);
bool needsPreprocessing(const QCString &extension) const { return TRUE; };
- void parsePrototype(const char *text){}
+ void parsePrototype(const QCString &text){}
private:
struct Private;
diff --git a/src/lexscanner.l b/src/lexscanner.l
index c3a6f25..cd06464 100644
--- a/src/lexscanner.l
+++ b/src/lexscanner.l
@@ -1,7 +1,5 @@
/*****************************************************************************
*
- *
- *
* Copyright (C) 1997-2021 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
@@ -77,9 +75,8 @@ struct lexscannerYY_state
bool reentrant = false;
bool bison_bridge = false;
bool bison_locations = false;
- QCString CCodeBuffer;
+ QCString cCodeBuffer;
int roundCount = 0;
- int squareCount = 0;
QCString yyFileName;
ClangTUParser *clangParser = 0;
@@ -114,12 +111,13 @@ LiteralEnd "%}"{nl}
Option "%option"
RulesStart "%%"{nl}
RulesEnd "%%"{nl}
-RulesSharp "<"[^>]*">"
+RulesSharp "<"[^>\n]*">"
RulesCurly "{"[^{}\n]*"}"
StartSquare "["
StartDouble "\""
StartRound "("
-EscapeRulesCharOpen "\\["|"\\<"|"\\{"|"\\("|"\\\""|"\\{"|"\\ "
+StartRoundQuest "(?"
+EscapeRulesCharOpen "\\["|"\\<"|"\\{"|"\\("|"\\\""|"\\ "|"\\\\"
EscapeRulesCharClose "\\]"|"\\>"|"\\}"|"\\)"
EscapeRulesChar {EscapeRulesCharOpen}|{EscapeRulesCharClose}
@@ -134,14 +132,14 @@ CODE [cC][oO][dD][eE]
RAWBEGIN (u|U|L|u8)?R\"[^ \t\(\)\\]{0,16}"("
RAWEND ")"[^ \t\(\)\\]{0,16}\"
CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
-
+CHARCE "[:"[^:]*":]"
/* no comment start / end signs inside square brackets */
NCOMM [^/\*]
- // C start comment
+ // C start comment
CCS "/\*"
// C end comment
CCE "*\/"
- // Cpp comment
+ // Cpp comment
CPPC "/\/"
// doxygen start comment
DCOMM ("/\*!"|"/\**"|"/\/!"|"/\/\/")
@@ -162,6 +160,7 @@ NONLopt [^\n]*
%x RulesSquare
%x RulesRoundSquare
%x RulesRound
+%x RulesRoundQuest
%x UserSection
%x TopSection
@@ -208,106 +207,106 @@ NONLopt [^\n]*
<Option>{nws}+
<Option>{ws}+
<Option>{nl} {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
BEGIN (DefSection);
}
<DefSection>^{RulesStart} {
{
bool fill = false;
- yyextra->CCodeBuffer += "int " + yyextra->prefix + "lex (";
+ yyextra->cCodeBuffer += "int " + yyextra->prefix + "lex (";
if (yyextra->bison_bridge )
{
- if (fill) yyextra->CCodeBuffer += ",";
- yyextra->CCodeBuffer += "YYSTYPE * yylval_param";
+ if (fill) yyextra->cCodeBuffer += ",";
+ yyextra->cCodeBuffer += "YYSTYPE * yylval_param";
fill = true;
}
if (yyextra->bison_locations)
{
- if (fill) yyextra->CCodeBuffer += ",";
- yyextra->CCodeBuffer += "YYLTYPE * yylloc_param";
+ if (fill) yyextra->cCodeBuffer += ",";
+ yyextra->cCodeBuffer += "YYLTYPE * yylloc_param";
fill = true;
}
if (yyextra->reentrant)
{
- if (fill) yyextra->CCodeBuffer += ",";
- yyextra->CCodeBuffer += "yyscan_t yyscanner";
+ if (fill) yyextra->cCodeBuffer += ",";
+ yyextra->cCodeBuffer += "yyscan_t yyscanner";
fill = true;
}
if (!yyextra->bison_bridge && !yyextra->bison_locations && !yyextra->reentrant)
{
- yyextra->CCodeBuffer += "void";
+ yyextra->cCodeBuffer += "void";
}
- yyextra->CCodeBuffer += ") {\n";
+ yyextra->cCodeBuffer += ") {\n";
}
BEGIN (RulesSectionInit);
}
<DefSection>^{TopStart} {
- yyextra->CCodeBuffer += "\n";
+ yyextra->cCodeBuffer += "\n";
yyextra->lastContext = YY_START;
BEGIN (TopSection);
}
<DefSection>^{LiteralStart} {
- yyextra->CCodeBuffer += "\n";
+ yyextra->cCodeBuffer += "\n";
yyextra->lastContext = YY_START;
BEGIN (LiteralSection);
}
<TopSection>^{TopEnd} {
- yyextra->CCodeBuffer += "\n";
+ yyextra->cCodeBuffer += "\n";
BEGIN( yyextra->lastContext ) ;
}
<TopSection>.*{nl} {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<LiteralSection>^{LiteralEnd} {
- yyextra->CCodeBuffer += "\n";
+ yyextra->cCodeBuffer += "\n";
BEGIN( yyextra->lastContext ) ;
}
<LiteralSection>.*{nl} {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<DefSection>^{nws} {
BEGIN(DefSectionLine);
}
<DefSection>{CPPC}.*{nl} {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<DefSection>^{ws}*{CCS} {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
yyextra->lastContext = YY_START;
BEGIN(COMMENT);
}
<COMMENT>{CCE}{ws}*{nl} {
- yyextra->CCodeBuffer+=yytext;
+ yyextra->cCodeBuffer+=yytext;
BEGIN(yyextra->lastContext);
}
<COMMENT>{CCE} {
- yyextra->CCodeBuffer+=yytext;
+ yyextra->cCodeBuffer+=yytext;
BEGIN(yyextra->lastContext);
}
<COMMENT>[^*\n]+ {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<COMMENT>{CPPC}|{CCS} {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<COMMENT>{nl} {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<COMMENT>. {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<DefSection>^{nl} {
- yyextra->CCodeBuffer += "\n";
+ yyextra->cCodeBuffer += "\n";
}
<DefSection>^{ws}.*{nl} {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<DefSectionLine>.*{nl} {
- yyextra->CCodeBuffer += "\n";
+ yyextra->cCodeBuffer += "\n";
BEGIN(DefSection);
}
<RulesSectionInit,RulesPattern>^{RulesEnd} {
- yyextra->CCodeBuffer += "}\n";
+ yyextra->cCodeBuffer += "}\n";
BEGIN (UserSection);
}
<RulesSectionInit>^{nws} {
@@ -315,116 +314,131 @@ NONLopt [^\n]*
BEGIN(RulesPattern);
}
<RulesSectionInit>^{ws}.*{nl} {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<RulesSectionInit>^{nl} {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<RulesPattern>"<<EOF>>" {
- yyextra->CCodeBuffer += repeatChar(' ', yyleng);
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
}
<RulesPattern>{EscapeRulesChar} {
- yyextra->CCodeBuffer += repeatChar(' ', yyleng);
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
}
<RulesPattern>{RulesSharp} {
- yyextra->CCodeBuffer += repeatChar(' ', yyleng);
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
}
<RulesPattern>{RulesCurly} {
- yyextra->CCodeBuffer += repeatChar(' ', yyleng);
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
}
<RulesPattern>{StartDouble} {
- yyextra->CCodeBuffer += repeatChar(' ', yyleng);
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
yyextra->lastContext = YY_START;
BEGIN(RulesDouble);
}
<RulesDouble,RulesRoundDouble>"\\\\" {
- yyextra->CCodeBuffer += repeatChar(' ', yyleng);
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
}
<RulesDouble,RulesRoundDouble>"\\\"" {
- yyextra->CCodeBuffer += repeatChar(' ', yyleng);
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
}
<RulesDouble>"\"" {
- yyextra->CCodeBuffer += repeatChar(' ', yyleng);
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
BEGIN( yyextra->lastContext ) ;
}
<RulesRoundDouble>"\"" {
- yyextra->CCodeBuffer += repeatChar(' ', yyleng);
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
BEGIN(RulesRound) ;
}
<RulesDouble,RulesRoundDouble>. {
- yyextra->CCodeBuffer += repeatChar(' ', yyleng);
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
}
<RulesPattern>{StartSquare} {
- yyextra->squareCount++;
- yyextra->CCodeBuffer += repeatChar(' ', yyleng);
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
yyextra->lastContext = YY_START;
BEGIN(RulesSquare);
}
+<RulesSquare,RulesRoundSquare>{CHARCE} {
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
+ }
<RulesSquare,RulesRoundSquare>"\\[" |
<RulesSquare,RulesRoundSquare>"\\]" {
- yyextra->CCodeBuffer += repeatChar(' ', yyleng);
- }
-<RulesSquare,RulesRoundSquare>"[" {
- yyextra->squareCount++;
- yyextra->CCodeBuffer += repeatChar(' ', yyleng);
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
}
<RulesSquare>"]" {
- yyextra->squareCount--;
- yyextra->CCodeBuffer += repeatChar(' ', yyleng);
- if (!yyextra->squareCount) BEGIN(RulesPattern);
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
+ BEGIN(RulesPattern);
}
<RulesRoundSquare>"]" {
- yyextra->squareCount--;
- yyextra->CCodeBuffer += repeatChar(' ', yyleng);
- if (!yyextra->squareCount) BEGIN(RulesRound) ;
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
+ BEGIN(RulesRound) ;
}
<RulesSquare,RulesRoundSquare>"\\\\" {
- yyextra->CCodeBuffer += repeatChar(' ', yyleng);
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
}
<RulesSquare,RulesRoundSquare>. {
- yyextra->CCodeBuffer += repeatChar(' ', yyleng);
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
}
+<RulesPattern>{StartRoundQuest} {
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
+ yyextra->lastContext = YY_START;
+ BEGIN(RulesRoundQuest);
+ }
+<RulesRoundQuest>{nl} {
+ yyextra->cCodeBuffer += "\n";
+ }
+<RulesRoundQuest>[^)] {
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
+ }
+<RulesRoundQuest>")" {
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
+ BEGIN(yyextra->lastContext);
+ }
<RulesPattern>{StartRound} {
yyextra->roundCount++;
- yyextra->CCodeBuffer += repeatChar(' ', yyleng);
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
yyextra->lastContext = YY_START;
BEGIN(RulesRound);
}
<RulesRound>{RulesCurly} {
- yyextra->CCodeBuffer += repeatChar(' ', yyleng);
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
}
<RulesRound>{StartSquare} {
- yyextra->squareCount++;
- yyextra->CCodeBuffer += repeatChar(' ', yyleng);
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
BEGIN(RulesRoundSquare);
}
<RulesRound>{StartDouble} {
- yyextra->CCodeBuffer += repeatChar(' ', yyleng);
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
BEGIN(RulesRoundDouble);
}
-<RulesRound>"\\(" |
-<RulesRound>"\\)" {
- yyextra->CCodeBuffer += repeatChar(' ', yyleng);
+<RulesRound>{EscapeRulesChar} {
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
}
<RulesRound>"(" {
yyextra->roundCount++;
- yyextra->CCodeBuffer += repeatChar(' ', yyleng);
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
}
<RulesRound>")" {
yyextra->roundCount--;
- yyextra->CCodeBuffer += repeatChar(' ', yyleng);
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
if (!yyextra->roundCount) BEGIN( yyextra->lastContext ) ;
}
+<RulesRound>{nl} {
+ yyextra->cCodeBuffer += "\n";
+ }
+<RulesRound>{ws} {
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
+ }
<RulesRound>. {
- yyextra->CCodeBuffer += repeatChar(' ', yyleng);
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
}
<RulesPattern>{ws}+"|" {
- yyextra->CCodeBuffer += repeatChar(' ', yyleng);
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
yyextra->curlyCount = 0;
BEGIN(SkipCurly);
}
<RulesPattern>^{ws}*{nl} {
- yyextra->CCodeBuffer += "\n";
+ yyextra->cCodeBuffer += "\n";
}
<RulesPattern>^{ws}+ {
}
@@ -435,45 +449,45 @@ NONLopt [^\n]*
BEGIN(SkipCurly);
}
<RulesPattern>"\\\\" {
- yyextra->CCodeBuffer += repeatChar(' ', yyleng);
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
}
-<RulesPattern>{CCS} {
- yyextra->CCodeBuffer += yytext;
+<RulesPattern>{CCS} {
+ yyextra->cCodeBuffer += yytext;
yyextra->lastContext = YY_START;
BEGIN(COMMENT);
}
<RulesPattern>. {
- yyextra->CCodeBuffer += repeatChar(' ', yyleng);
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
}
<SkipCurly>{B}*"#"{B}+[0-9]+{B}+/"\"" { /* line control directive */
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
yyextra->lastPreLineCtrlContext = YY_START;
BEGIN( PreLineCtrl );
}
<PreLineCtrl>"\""[^\n\"]*"\"" {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<PreLineCtrl>. {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<PreLineCtrl>\n {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
BEGIN( yyextra->lastPreLineCtrlContext );
}
<SkipCurly>"{" {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
++yyextra->curlyCount ;
}
<SkipCurly>"}"/{BN}*{DCOMM}"<!--" | /* see bug710917 */
<SkipCurly>"}" {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
if( yyextra->curlyCount )
{
--yyextra->curlyCount ;
}
}
<SkipCurly>"}"{BN}*{DCOMM}"<" {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
if ( yyextra->curlyCount )
{
--yyextra->curlyCount ;
@@ -492,53 +506,53 @@ NONLopt [^\n]*
}
}
<SkipCurly>\" {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
yyextra->lastStringContext=SkipCurly;
BEGIN( SkipString );
}
<SkipCurly>^{B}*"#" {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
yyextra->lastPreLineCtrlContext = YY_START;
BEGIN( PreLineCtrl );
}
<SkipCurly>{B}*{RAWBEGIN} {
QCString raw=QCString(yytext).stripWhiteSpace();
- yyextra->delimiter = raw.data()+2;
+ yyextra->delimiter = raw.mid(2);
yyextra->delimiter=yyextra->delimiter.left(yyextra->delimiter.length()-1);
yyextra->lastRawStringContext = YY_START;
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
BEGIN(RawString);
}
<SkipCurly>[^\n#"'@\\/{}<]+ {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<SkipCurly>{CCS} {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
yyextra->lastCContext = YY_START;
BEGIN(SkipComment);
}
<SkipCurly>{CPPC} {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
yyextra->lastCContext = YY_START;
BEGIN(SkipCxxComment);
}
<SkipCurly>{CHARLIT} {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<SkipCurly>\' {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<SkipCurly>. {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<SkipCurly>({CPPC}{B}*)?{CCS}"!" {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
yyextra->docBlockContext = YY_START;
BEGIN( DocBlock );
}
<SkipCurly>{CCS}"*"[*]+{BL} {
bool javadocBanner = Config_getBool(JAVADOC_BANNER);
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
if( javadocBanner )
{
yyextra->docBlockContext = YY_START;
@@ -550,88 +564,88 @@ NONLopt [^\n]*
}
}
<SkipCurly>({CPPC}{B}*)?{CCS}"*"/{NCOMM} {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
yyextra->docBlockContext = YY_START;
BEGIN( DocBlock );
}
<SkipCurly>{CPPC}"!" {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
yyextra->docBlockContext = YY_START;
BEGIN( DocLine );
}
<SkipCurly>{CPPC}"/"/[^/] {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
yyextra->docBlockContext = YY_START;
BEGIN( DocLine );
}
<SkipCurly>\n {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
if (yyextra->curlyCount<=0)
{
BEGIN(RulesPattern);
}
}
<SkipString>\\. {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<SkipString>\" {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
BEGIN( yyextra->lastStringContext );
}
<SkipString>{CCS}|{CCE}|{CPPC} {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<SkipString>\n {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<SkipString>. {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<SkipCxxComment>.*"\\\n" { // line continuation
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<SkipCxxComment>{ANYopt}/\n {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
BEGIN( yyextra->lastCContext ) ;
}
<Comment>{BN}+ {
- yyextra->CCodeBuffer += yytext ;
+ yyextra->cCodeBuffer += yytext ;
}
-<Comment>{CCS} { yyextra->CCodeBuffer += yytext ; }
-<Comment>{CPPC} { yyextra->CCodeBuffer += yytext ; }
+<Comment>{CCS} { yyextra->cCodeBuffer += yytext ; }
+<Comment>{CPPC} { yyextra->cCodeBuffer += yytext ; }
<Comment>{CMD}("code"|"verbatim") {
yyextra->insideCode=TRUE;
- yyextra->CCodeBuffer += yytext ;
+ yyextra->cCodeBuffer += yytext ;
}
<Comment>{CMD}("endcode"|"endverbatim") {
yyextra->insideCode=FALSE;
- yyextra->CCodeBuffer += yytext ;
+ yyextra->cCodeBuffer += yytext ;
}
-<Comment>[^ \.\t\r\n\/\*]+ { yyextra->CCodeBuffer += yytext ; }
-<Comment>{CCE} { yyextra->CCodeBuffer += yytext ;
+<Comment>[^ \.\t\r\n\/\*]+ { yyextra->cCodeBuffer += yytext ; }
+<Comment>{CCE} { yyextra->cCodeBuffer += yytext ;
if (!yyextra->insideCode) BEGIN( yyextra->lastContext ) ;
}
-<Comment>. { yyextra->CCodeBuffer += *yytext ; }
+<Comment>. { yyextra->cCodeBuffer += *yytext ; }
<SkipComment>{CPPC}|{CCS} {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<SkipComment>[^\*\n]+ {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<SkipComment>\n {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<SkipComment>{B}*{CCE} {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
BEGIN( yyextra->lastCContext );
}
<SkipComment>"*" {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<RawString>{RAWEND} {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
QCString delimiter = yytext+1;
delimiter=delimiter.left(delimiter.length()-1);
if (delimiter==yyextra->delimiter)
@@ -640,60 +654,60 @@ NONLopt [^\n]*
}
}
<RawString>[^)\n]+ {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<RawString>. {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<RawString>\n {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
/* ---- Single line comments ------ */
<DocLine>[^\n]*"\n"[ \t]*{CPPC}[/!][<]? { // continuation of multiline C++-style comment
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<DocLine>{B}*{CPPC}"/"[/]+{Bopt}/"\n" { // ignore marker line (see bug700345)
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
BEGIN( yyextra->docBlockContext );
}
<DocLine>{NONLopt}/"\n"{B}*{CPPC}[!/]{B}*{CMD}"}" { // next line is an end group marker, see bug 752712
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
BEGIN( yyextra->docBlockContext );
}
<DocLine>{NONLopt}/"\n" { // whole line
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
BEGIN( yyextra->docBlockContext );
}
/* ---- Comments blocks ------ */
<DocBlock>"*"*{CCE} { // end of comment block
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
BEGIN(yyextra->docBlockContext);
}
<DocBlock>^{B}*"*"+/[^/] {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<DocBlock>^{B}*({CPPC})?{B}*"*"+/[^/a-z_A-Z0-9*] { // start of a comment line
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<DocBlock>^{B}*({CPPC}){B}* { // strip embedded C++ comments if at the start of a line
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<DocBlock>{CPPC} { // slashes in the middle of a comment block
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<DocBlock>{CCS} { // start of a new comment in the
// middle of a comment block
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<DocBlock>({CMD}{CMD}){ID}/[^a-z_A-Z0-9] { // escaped command
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<DocBlock>{CMD}("f$"|"f["|"f{") {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
yyextra->docBlockName=&yytext[1];
if (yyextra->docBlockName.at(1)=='{')
{
@@ -704,21 +718,21 @@ NONLopt [^\n]*
BEGIN(DocCopyBlock);
}
<DocBlock>{B}*"<"{PRE}">" {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
yyextra->docBlockName="<pre>";
yyextra->fencedSize=0;
yyextra->nestedComment=FALSE;
BEGIN(DocCopyBlock);
}
<DocBlock>{CMD}("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"code")/[^a-z_A-Z0-9\-] { // verbatim command (which could contain nested comments!)
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
yyextra->docBlockName=&yytext[1];
yyextra->fencedSize=0;
yyextra->nestedComment=FALSE;
BEGIN(DocCopyBlock);
}
<DocBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
QCString pat = substitute(yytext,"*"," ");
yyextra->docBlockName="~~~";
yyextra->fencedSize=pat.stripWhiteSpace().length();
@@ -726,7 +740,7 @@ NONLopt [^\n]*
BEGIN(DocCopyBlock);
}
<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
QCString pat = substitute(yytext,"*"," ");
yyextra->docBlockName="```";
yyextra->fencedSize=pat.stripWhiteSpace().length();
@@ -737,43 +751,43 @@ NONLopt [^\n]*
REJECT;
}
<DocBlock>[^@*~\/\\\n]+ { // any character that isn't special
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<DocBlock>\n { // newline
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<DocBlock>. { // command block
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
/* ---- Copy verbatim sections ------ */
<DocCopyBlock>"</"{PRE}">" { // end of a <pre> block
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
if (yyextra->docBlockName=="<pre>")
{
BEGIN(DocBlock);
}
}
<DocCopyBlock>"</"{CODE}">" { // end of a <code> block
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
if (yyextra->docBlockName=="<code>")
{
BEGIN(DocBlock);
}
}
<DocCopyBlock>[\\@]("f$"|"f]"|"f}") {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
BEGIN(DocBlock);
}
<DocCopyBlock>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endcode")/[^a-z_A-Z0-9] { // end of verbatim block
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
if (&yytext[4]==yyextra->docBlockName)
{
BEGIN(DocBlock);
}
}
<DocCopyBlock>^{B}*"*"+/{BN}+ { // start of a comment line
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
if (yyextra->docBlockName=="verbatim")
{
REJECT;
@@ -784,13 +798,13 @@ NONLopt [^\n]*
}
else
{
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
}
<DocCopyBlock>^{B}*"*"+/{B}+"*"{BN}* { // start of a comment line with two *'s
if (yyextra->docBlockName=="code")
{
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
else
{
@@ -800,7 +814,7 @@ NONLopt [^\n]*
<DocCopyBlock>^{B}*"*"+/({ID}|"(") { // Assume *var or *(... is part of source code (see bug723516)
if (yyextra->docBlockName=="code")
{
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
else
{
@@ -812,11 +826,11 @@ NONLopt [^\n]*
{
if (yyextra->nestedComment) // keep * it is part of the code
{
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
else // remove * it is part of the comment block
{
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
}
else
@@ -825,7 +839,7 @@ NONLopt [^\n]*
}
}
<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
QCString pat = substitute(yytext,"*"," ");
if (yyextra->fencedSize==pat.stripWhiteSpace().length())
{
@@ -833,7 +847,7 @@ NONLopt [^\n]*
}
}
<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
QCString pat = substitute(yytext,"*"," ");
if (yyextra->fencedSize==pat.stripWhiteSpace().length())
{
@@ -841,7 +855,7 @@ NONLopt [^\n]*
}
}
<DocCopyBlock>[^\<@/\*\]~\$\\\n]+ { // any character that is not special
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<DocCopyBlock>{CCS}|{CCE}|{CPPC} {
if (yytext[1]=='*')
@@ -852,17 +866,17 @@ NONLopt [^\n]*
{
yyextra->nestedComment=FALSE;
}
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<DocCopyBlock>\n { // newline
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<DocCopyBlock>. { // any other character
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<SkipCurlyEndDoc>"}"{BN}*{DCOMM}"<" { // desc is followed by another one
yyextra->docBlockContext = SkipCurlyEndDoc;
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
if (yytext[yyleng-3]=='/')
{
BEGIN( DocLine );
@@ -873,17 +887,19 @@ NONLopt [^\n]*
}
}
<SkipCurlyEndDoc>"}" {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
BEGIN(SkipCurly);
}
<UserSection>.*{nl} {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
- /*
+
+ /*
<*>. { fprintf(stderr,"Lex scanner Def rule for %s: #%s#\n",stateToString(YY_START),yytext);}
- */
+<*>{nl} { fprintf(stderr,"Lex scanner Def rule for newline %s: #%s#\n",stateToString(YY_START),yytext);}
+ */
<*><<EOF>> {
handleCCode(yyscanner);
yyterminate();
@@ -907,7 +923,7 @@ static yy_size_t yyread(yyscan_t yyscanner,char *buf,yy_size_t max_size)
//-----------------------------------------------------------------------------
static void parseMain(yyscan_t yyscanner,
- const char *fileName,
+ const QCString &fileName,
const char *fileBuf,
const std::shared_ptr<Entry> &rt,
ClangTUParser *clangParser)
@@ -923,7 +939,7 @@ static void parseMain(yyscan_t yyscanner,
yyextra->clangParser = clangParser;
yyextra->language = getLanguageFromFileName(yyextra->yyFileName);
rt->lang = yyextra->language;
- msg("Parsing file %s...\n",yyextra->yyFileName.data());
+ msg("Parsing file %s...\n",qPrint(yyextra->yyFileName));
yyextra->current_root = rt;
yyextra->current = std::make_shared<Entry>();
@@ -939,7 +955,7 @@ static void parseMain(yyscan_t yyscanner,
lexscannerYYlex(yyscanner);
- rt->program.resize(0);
+ rt->program.str(std::string());
}
//----------------------------------------------------------------------------
@@ -949,13 +965,12 @@ static void handleCCode(yyscan_t yyscanner)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
- if (yyextra->CCodeBuffer.isEmpty()) return;
+ if (yyextra->cCodeBuffer.isEmpty()) return;
yyextra->cOutlineParser.parseInput(yyextra->yyFileName,
- yyextra->CCodeBuffer,
+ yyextra->cCodeBuffer.data(),
yyextra->current_root,
yyextra->clangParser);
- // SrcLangExt_Cpp,
- yyextra->CCodeBuffer.resize(0);
+ yyextra->cCodeBuffer.resize(0);
return;
}
//----------------------------------------------------------------------------
@@ -979,18 +994,18 @@ LexOutlineParser::~LexOutlineParser()
lexscannerYYlex_destroy(p->yyscanner);
}
-void LexOutlineParser::parseInput(const char *fileName,
+void LexOutlineParser::parseInput(const QCString &fileName,
const char *fileBuf,
const std::shared_ptr<Entry> &root,
ClangTUParser *clangParser)
{
struct yyguts_t *yyg = (struct yyguts_t*)p->yyscanner;
- printlex(yy_flex_debug, TRUE, __FILE__, fileName);
+ printlex(yy_flex_debug, TRUE, __FILE__, qPrint(fileName));
::parseMain(p->yyscanner,fileName,fileBuf,root,clangParser);
- printlex(yy_flex_debug, FALSE, __FILE__, fileName);
+ printlex(yy_flex_debug, FALSE, __FILE__, qPrint(fileName));
}
diff --git a/src/linkedmap.h b/src/linkedmap.h
index f09b6d8..db3f7b1 100644
--- a/src/linkedmap.h
+++ b/src/linkedmap.h
@@ -23,6 +23,8 @@
#include <algorithm>
#include <cctype>
+#include "qcstring.h"
+
//! @brief Container class representing a vector of objects with keys.
//! @details Objects can efficiently be looked up given the key.
//! Objects are owned by the container.
@@ -42,19 +44,45 @@ class LinkedMap
//! Find an object given the key.
//! Returns a pointer to the element if found or nullptr if it is not found.
- const T *find(const char *key_) const
+ const T *find(const std::string &key) const
{
- std::string key(key_ ? key_ : "");
auto it = m_lookup.find(key);
return it!=m_lookup.end() ? it->second : nullptr;
}
+ //! Find an object given the key.
+ //! Returns a pointer to the element if found or nullptr if it is not found.
+ const T *find(const QCString &key) const
+ {
+ auto it = m_lookup.find(key.str());
+ return it!=m_lookup.end() ? it->second : nullptr;
+ }
+
+ //! Find an object given the key.
+ //! Returns a pointer to the element if found or nullptr if it is not found.
+ const T *find(const char *key) const
+ {
+ return find(std::string(key ? key : ""));
+ }
+
//! A non-const wrapper for find() const
T* find(const char *key)
{
return const_cast<T*>(static_cast<const LinkedMap&>(*this).find(key));
}
+ //! A non-const wrapper for find() const
+ T* find(const QCString &key)
+ {
+ return const_cast<T*>(static_cast<const LinkedMap&>(*this).find(key));
+ }
+
+ //! A non-const wrapper for find() const
+ T* find(const std::string &key)
+ {
+ return const_cast<T*>(static_cast<const LinkedMap&>(*this).find(key));
+ }
+
//! Adds a new object to the ordered vector if it was not added already.
//! Return a non-owning pointer to the newly added object, or to the existing object if
//! it was already inserted before under the given key.
@@ -65,7 +93,22 @@ class LinkedMap
if (result==nullptr)
{
std::string key(k ? k : "");
- Ptr ptr = std::make_unique<T>(key.c_str(),std::forward<Args>(args)...);
+ Ptr ptr = std::make_unique<T>(QCString(k),std::forward<Args>(args)...);
+ result = ptr.get();
+ m_lookup.insert({key,result});
+ m_entries.push_back(std::move(ptr));
+ }
+ return result;
+ }
+
+ template<class...Args>
+ T *add(const QCString &k, Args&&... args)
+ {
+ std::string key = k.str();
+ T *result = find(key);
+ if (result==nullptr)
+ {
+ Ptr ptr = std::make_unique<T>(k,std::forward<Args>(args)...);
result = ptr.get();
m_lookup.insert({key,result});
m_entries.push_back(std::move(ptr));
@@ -90,6 +133,19 @@ class LinkedMap
return result;
}
+ T *add(const QCString &k, Ptr &&ptr)
+ {
+ std::string key = k.str();
+ T *result = find(key);
+ if (result==nullptr)
+ {
+ result = ptr.get();
+ m_lookup.insert({key,result});
+ m_entries.push_back(std::move(ptr));
+ }
+ return result;
+ }
+
//! Prepends a new object to the ordered vector if it was not added already.
//! Return a non-owning pointer to the newly added object, or to the existing object if
//! it was already inserted before under the given key.
@@ -108,12 +164,25 @@ class LinkedMap
return result;
}
+ template<class...Args>
+ T *prepend(const QCString &key, Args&&... args)
+ {
+ T *result = find(key);
+ if (result==nullptr)
+ {
+ Ptr ptr = std::make_unique<T>(key,std::forward<Args>(args)...);
+ result = ptr.get();
+ m_lookup.insert({key.str(),result});
+ m_entries.push_front(std::move(ptr));
+ }
+ return result;
+ }
+
//! Removes an object from the container and deletes it.
//! Returns true if the object was deleted or false it is was not found.
- bool del(const char *key_)
+ bool del(const QCString &key)
{
- std::string key(key_ ? key_ : "");
- auto it = m_lookup.find(key);
+ auto it = m_lookup.find(key.str());
if (it!=m_lookup.end())
{
auto vecit = std::find_if(m_entries.begin(),m_entries.end(),[obj=it->second](auto &el) { return el.get()==obj; });
@@ -171,19 +240,44 @@ class LinkedRefMap
//! find an object given the key.
//! Returns a pointer to the object if found or nullptr if it is not found.
- const T *find(const char *key_) const
+ const T *find(const std::string &key) const
{
- std::string key(key_ ? key_ : "");
auto it = m_lookup.find(key);
return it!=m_lookup.end() ? it->second : nullptr;
}
+ //! find an object given the key.
+ //! Returns a pointer to the object if found or nullptr if it is not found.
+ const T *find(const QCString &key) const
+ {
+ auto it = m_lookup.find(key.str());
+ return it!=m_lookup.end() ? it->second : nullptr;
+ }
+
+ //! find an object given the key.
+ //! Returns a pointer to the object if found or nullptr if it is not found.
+ const T *find(const char *key) const
+ {
+ return find(std::string(key ? key : ""));
+ }
+
//! non-const wrapper for find() const
T* find(const char *key)
{
return const_cast<T*>(static_cast<const LinkedRefMap&>(*this).find(key));
}
+ T* find(const QCString &key)
+ {
+ return const_cast<T*>(static_cast<const LinkedRefMap&>(*this).find(key));
+ }
+
+ //! non-const wrapper for find() const
+ T* find(const std::string &key)
+ {
+ return const_cast<T*>(static_cast<const LinkedRefMap&>(*this).find(key));
+ }
+
//! Adds an object reference to the ordered vector if it was not added already.
//! Return true if the reference was added, and false if an object with the same key
//! was already added before
@@ -202,6 +296,21 @@ class LinkedRefMap
}
}
+ bool add(const QCString &k, T* obj)
+ {
+ std::string key = k.str();
+ if (find(key)==nullptr) // new element
+ {
+ m_lookup.insert({key,obj});
+ m_entries.push_back(obj);
+ return true;
+ }
+ else // already existing, don't add
+ {
+ return false;
+ }
+ }
+
//! Prepends an object reference to the ordered vector if it was not added already.
//! Return true if the reference was added, and false if an object with the same key
//! was already added before
@@ -220,12 +329,25 @@ class LinkedRefMap
}
}
+ bool prepend(const QCString &key, T* obj)
+ {
+ if (find(key)==nullptr) // new element
+ {
+ m_lookup.insert({key.str(),obj});
+ m_entries.insert(m_entries.begin(),obj);
+ return true;
+ }
+ else // already existing, don't add
+ {
+ return false;
+ }
+ }
+
//! Removes an object from the container and deletes it.
//! Returns true if the object was deleted or false it is was not found.
- bool del(const char *key_)
+ bool del(const QCString &key)
{
- std::string key(key_ ? key_ : "");
- auto it = m_lookup.find(key);
+ auto it = m_lookup.find(key.str());
if (it!=m_lookup.end())
{
auto vecit = std::find_if(m_entries.begin(),m_entries.end(),[obj=it->second](auto &el) { return el.get()==obj; });
diff --git a/src/mandocvisitor.cpp b/src/mandocvisitor.cpp
index bc219cd..d565648 100644
--- a/src/mandocvisitor.cpp
+++ b/src/mandocvisitor.cpp
@@ -13,8 +13,6 @@
*
*/
-#include <qfileinfo.h>
-
#include "mandocvisitor.h"
#include "docparser.h"
#include "language.h"
@@ -28,9 +26,10 @@
#include "filedef.h"
#include "htmlentity.h"
#include "emoji.h"
+#include "fileinfo.h"
-ManDocVisitor::ManDocVisitor(FTextStream &t,CodeOutputInterface &ci,
- const char *langExt)
+ManDocVisitor::ManDocVisitor(TextStream &t,CodeOutputInterface &ci,
+ const QCString &langExt)
: DocVisitor(DocVisitor_Man), m_t(t), m_ci(ci), m_insidePre(FALSE), m_hide(FALSE), m_firstCol(FALSE),
m_indent(0), m_langExt(langExt)
{
@@ -112,15 +111,15 @@ void ManDocVisitor::visit(DocURL *u)
void ManDocVisitor::visit(DocLineBreak *)
{
if (m_hide) return;
- m_t << endl << ".br" << endl;
+ m_t << "\n.br\n";
m_firstCol=TRUE;
}
void ManDocVisitor::visit(DocHorRuler *)
{
if (m_hide) return;
- if (!m_firstCol) m_t << endl;
- m_t << ".PP" << endl;
+ if (!m_firstCol) m_t << "\n";
+ m_t << ".PP\n";
m_firstCol=TRUE;
}
@@ -168,17 +167,17 @@ void ManDocVisitor::visit(DocStyleChange *s)
case DocStyleChange::Preformatted:
if (s->enable())
{
- if (!m_firstCol) m_t << endl;
- m_t << ".PP" << endl;
- m_t << ".nf" << endl;
+ if (!m_firstCol) m_t << "\n";
+ m_t << ".PP\n";
+ m_t << ".nf\n";
m_insidePre=TRUE;
}
else
{
m_insidePre=FALSE;
- if (!m_firstCol) m_t << endl;
- m_t << ".fi" << endl;
- m_t << ".PP" << endl;
+ if (!m_firstCol) m_t << "\n";
+ m_t << ".fi\n";
+ m_t << ".PP\n";
m_firstCol=TRUE;
}
break;
@@ -199,25 +198,25 @@ void ManDocVisitor::visit(DocVerbatim *s)
switch (s->type())
{
case DocVerbatim::Code: // fall though
- if (!m_firstCol) m_t << endl;
- m_t << ".PP" << endl;
- m_t << ".nf" << endl;
+ if (!m_firstCol) m_t << "\n";
+ m_t << ".PP\n";
+ m_t << ".nf\n";
getCodeParser(lang).parseCode(m_ci,s->context(),s->text(),
langExt,
s->isExample(),s->exampleFile());
- if (!m_firstCol) m_t << endl;
- m_t << ".fi" << endl;
- m_t << ".PP" << endl;
+ if (!m_firstCol) m_t << "\n";
+ m_t << ".fi\n";
+ m_t << ".PP\n";
m_firstCol=TRUE;
break;
case DocVerbatim::Verbatim:
- if (!m_firstCol) m_t << endl;
- m_t << ".PP" << endl;
- m_t << ".nf" << endl;
+ if (!m_firstCol) m_t << "\n";
+ m_t << ".PP\n";
+ m_t << ".nf\n";
m_t << s->text();
- if (!m_firstCol) m_t << endl;
- m_t << ".fi" << endl;
- m_t << ".PP" << endl;
+ if (!m_firstCol) m_t << "\n";
+ m_t << ".fi\n";
+ m_t << ".PP\n";
m_firstCol=TRUE;
break;
case DocVerbatim::ManOnly:
@@ -249,11 +248,11 @@ void ManDocVisitor::visit(DocInclude *inc)
{
case DocInclude::IncWithLines:
{
- if (!m_firstCol) m_t << endl;
- m_t << ".PP" << endl;
- m_t << ".nf" << endl;
- QFileInfo cfi( inc->file() );
- FileDef *fd = createFileDef( cfi.dirPath().utf8(), cfi.fileName().utf8() );
+ if (!m_firstCol) m_t << "\n";
+ m_t << ".PP\n";
+ m_t << ".nf\n";
+ FileInfo cfi( inc->file().str() );
+ FileDef *fd = createFileDef( cfi.dirPath(), cfi.fileName() );
getCodeParser(inc->extension()).parseCode(m_ci,inc->context(),
inc->text(),
langExt,
@@ -267,16 +266,16 @@ void ManDocVisitor::visit(DocInclude *inc)
TRUE
);
delete fd;
- if (!m_firstCol) m_t << endl;
- m_t << ".fi" << endl;
- m_t << ".PP" << endl;
+ if (!m_firstCol) m_t << "\n";
+ m_t << ".fi\n";
+ m_t << ".PP\n";
m_firstCol=TRUE;
}
break;
case DocInclude::Include:
- if (!m_firstCol) m_t << endl;
- m_t << ".PP" << endl;
- m_t << ".nf" << endl;
+ if (!m_firstCol) m_t << "\n";
+ m_t << ".PP\n";
+ m_t << ".nf\n";
getCodeParser(inc->extension()).parseCode(m_ci,inc->context(),
inc->text(),
langExt,
@@ -289,9 +288,9 @@ void ManDocVisitor::visit(DocInclude *inc)
0, // memberDef
FALSE
);
- if (!m_firstCol) m_t << endl;
- m_t << ".fi" << endl;
- m_t << ".PP" << endl;
+ if (!m_firstCol) m_t << "\n";
+ m_t << ".fi\n";
+ m_t << ".PP\n";
m_firstCol=TRUE;
break;
case DocInclude::DontInclude:
@@ -306,19 +305,19 @@ void ManDocVisitor::visit(DocInclude *inc)
m_t << inc->text();
break;
case DocInclude::VerbInclude:
- if (!m_firstCol) m_t << endl;
- m_t << ".PP" << endl;
- m_t << ".nf" << endl;
+ if (!m_firstCol) m_t << "\n";
+ m_t << ".PP\n";
+ m_t << ".nf\n";
m_t << inc->text();
- if (!m_firstCol) m_t << endl;
- m_t << ".fi" << endl;
- m_t << ".PP" << endl;
+ if (!m_firstCol) m_t << "\n";
+ m_t << ".fi\n";
+ m_t << ".PP\n";
m_firstCol=TRUE;
break;
case DocInclude::Snippet:
- if (!m_firstCol) m_t << endl;
- m_t << ".PP" << endl;
- m_t << ".nf" << endl;
+ if (!m_firstCol) m_t << "\n";
+ m_t << ".PP\n";
+ m_t << ".nf\n";
getCodeParser(inc->extension()).parseCode(m_ci,
inc->context(),
extractBlock(inc->text(),inc->blockId()),
@@ -326,18 +325,18 @@ void ManDocVisitor::visit(DocInclude *inc)
inc->isExample(),
inc->exampleFile()
);
- if (!m_firstCol) m_t << endl;
- m_t << ".fi" << endl;
- m_t << ".PP" << endl;
+ if (!m_firstCol) m_t << "\n";
+ m_t << ".fi\n";
+ m_t << ".PP\n";
m_firstCol=TRUE;
break;
case DocInclude::SnipWithLines:
{
- if (!m_firstCol) m_t << endl;
- m_t << ".PP" << endl;
- m_t << ".nf" << endl;
- QFileInfo cfi( inc->file() );
- FileDef *fd = createFileDef( cfi.dirPath().utf8(), cfi.fileName().utf8() );
+ if (!m_firstCol) m_t << "\n";
+ m_t << ".PP\n";
+ m_t << ".nf\n";
+ FileInfo cfi( inc->file().str() );
+ FileDef *fd = createFileDef( cfi.dirPath(), cfi.fileName() );
getCodeParser(inc->extension()).parseCode(m_ci,
inc->context(),
extractBlock(inc->text(),inc->blockId()),
@@ -352,9 +351,9 @@ void ManDocVisitor::visit(DocInclude *inc)
TRUE // show line number
);
delete fd;
- if (!m_firstCol) m_t << endl;
- m_t << ".fi" << endl;
- m_t << ".PP" << endl;
+ if (!m_firstCol) m_t << "\n";
+ m_t << ".fi\n";
+ m_t << ".PP\n";
m_firstCol=TRUE;
}
break;
@@ -372,14 +371,14 @@ void ManDocVisitor::visit(DocIncOperator *op)
if (locLangExt.isEmpty()) locLangExt = m_langExt;
SrcLangExt langExt = getLanguageFromFileName(locLangExt);
//printf("DocIncOperator: type=%d first=%d, last=%d text='%s'\n",
- // op->type(),op->isFirst(),op->isLast(),op->text().data());
+ // op->type(),op->isFirst(),op->isLast(),qPrint(op->text()));
if (op->isFirst())
{
if (!m_hide)
{
- if (!m_firstCol) m_t << endl;
- m_t << ".PP" << endl;
- m_t << ".nf" << endl;
+ if (!m_firstCol) m_t << "\n";
+ m_t << ".PP\n";
+ m_t << ".nf\n";
}
pushHidden(m_hide);
m_hide = TRUE;
@@ -392,8 +391,8 @@ void ManDocVisitor::visit(DocIncOperator *op)
FileDef *fd = 0;
if (!op->includeFileName().isEmpty())
{
- QFileInfo cfi( op->includeFileName() );
- fd = createFileDef( cfi.dirPath().utf8(), cfi.fileName().utf8() );
+ FileInfo cfi( op->includeFileName().str() );
+ fd = createFileDef( cfi.dirPath(), cfi.fileName() );
}
getCodeParser(locLangExt).parseCode(m_ci,op->context(),op->text(),langExt,
@@ -415,15 +414,15 @@ void ManDocVisitor::visit(DocIncOperator *op)
m_hide = popHidden();
if (!m_hide)
{
- if (!m_firstCol) m_t << endl;
- m_t << ".fi" << endl;
- m_t << ".PP" << endl;
+ if (!m_firstCol) m_t << "\n";
+ m_t << ".fi\n";
+ m_t << ".PP\n";
m_firstCol=TRUE;
}
}
else
{
- if (!m_hide) m_t << endl;
+ if (!m_hide) m_t << "\n";
}
}
@@ -466,7 +465,7 @@ void ManDocVisitor::visitPost(DocAutoList *)
{
if (m_hide) return;
m_indent-=2;
- m_t << ".PP" << endl;
+ m_t << ".PP\n";
}
void ManDocVisitor::visitPre(DocAutoListItem *li)
@@ -474,7 +473,7 @@ void ManDocVisitor::visitPre(DocAutoListItem *li)
if (m_hide) return;
QCString ws;
ws.fill(' ',m_indent-2);
- if (!m_firstCol) m_t << endl;
+ if (!m_firstCol) m_t << "\n";
m_t << ".IP \"" << ws;
if (((DocAutoList *)li->parent())->isEnumList())
{
@@ -484,14 +483,14 @@ void ManDocVisitor::visitPre(DocAutoListItem *li)
{
m_t << "\\(bu\" " << m_indent;
}
- m_t << endl;
+ m_t << "\n";
m_firstCol=TRUE;
}
void ManDocVisitor::visitPost(DocAutoListItem *)
{
if (m_hide) return;
- m_t << endl;
+ m_t << "\n";
m_firstCol=TRUE;
}
@@ -508,8 +507,8 @@ void ManDocVisitor::visitPost(DocPara *p)
)
)
{
- if (!m_firstCol) m_t << endl;
- m_t << ".PP" << endl;
+ if (!m_firstCol) m_t << "\n";
+ m_t << ".PP\n";
m_firstCol=TRUE;
}
}
@@ -527,8 +526,8 @@ void ManDocVisitor::visitPre(DocSimpleSect *s)
if (m_hide) return;
if (!m_firstCol)
{
- m_t << endl;
- m_t << ".PP" << endl;
+ m_t << "\n";
+ m_t << ".PP\n";
}
m_t << "\\fB";
switch(s->type())
@@ -571,17 +570,17 @@ void ManDocVisitor::visitPre(DocSimpleSect *s)
// special case 1: user defined title
if (s->type()!=DocSimpleSect::User && s->type()!=DocSimpleSect::Rcs)
{
- m_t << "\\fP" << endl;
- m_t << ".RS 4" << endl;
+ m_t << "\\fP\n";
+ m_t << ".RS 4\n";
}
}
void ManDocVisitor::visitPost(DocSimpleSect *)
{
if (m_hide) return;
- if (!m_firstCol) m_t << endl;
- m_t << ".RE" << endl;
- m_t << ".PP" << endl;
+ if (!m_firstCol) m_t << "\n";
+ m_t << ".RE\n";
+ m_t << ".PP\n";
m_firstCol=TRUE;
}
@@ -592,23 +591,23 @@ void ManDocVisitor::visitPre(DocTitle *)
void ManDocVisitor::visitPost(DocTitle *)
{
if (m_hide) return;
- m_t << "\\fP" << endl;
- m_t << ".RS 4" << endl;
+ m_t << "\\fP\n";
+ m_t << ".RS 4\n";
}
void ManDocVisitor::visitPre(DocSimpleList *)
{
if (m_hide) return;
m_indent+=2;
- if (!m_firstCol) m_t << endl;
- m_t << ".PD 0" << endl;
+ if (!m_firstCol) m_t << "\n";
+ m_t << ".PD 0\n";
}
void ManDocVisitor::visitPost(DocSimpleList *)
{
if (m_hide) return;
m_indent-=2;
- m_t << ".PP" << endl;
+ m_t << ".PP\n";
}
void ManDocVisitor::visitPre(DocSimpleListItem *)
@@ -616,27 +615,27 @@ void ManDocVisitor::visitPre(DocSimpleListItem *)
if (m_hide) return;
QCString ws;
ws.fill(' ',m_indent-2);
- if (!m_firstCol) m_t << endl;
- m_t << ".IP \"" << ws << "\\(bu\" " << m_indent << endl;
+ if (!m_firstCol) m_t << "\n";
+ m_t << ".IP \"" << ws << "\\(bu\" " << m_indent << "\n";
m_firstCol=TRUE;
}
void ManDocVisitor::visitPost(DocSimpleListItem *)
{
if (m_hide) return;
- m_t << endl;
+ m_t << "\n";
m_firstCol=TRUE;
}
void ManDocVisitor::visitPre(DocSection *s)
{
if (m_hide) return;
- if (!m_firstCol) m_t << endl;
+ if (!m_firstCol) m_t << "\n";
if (s->level()==1) m_t << ".SH"; else m_t << ".SS";
m_t << " \"";
filter(s->title());
- m_t << "\"" << endl;
- if (s->level()==1) m_t << ".PP" << endl;
+ m_t << "\"\n";
+ if (s->level()==1) m_t << ".PP\n";
m_firstCol=TRUE;
}
@@ -648,16 +647,16 @@ void ManDocVisitor::visitPre(DocHtmlList *)
{
if (m_hide) return;
m_indent+=2;
- if (!m_firstCol) m_t << endl;
- m_t << ".PD 0" << endl;
+ if (!m_firstCol) m_t << "\n";
+ m_t << ".PD 0\n";
}
void ManDocVisitor::visitPost(DocHtmlList *)
{
if (m_hide) return;
m_indent-=2;
- if (!m_firstCol) m_t << endl;
- m_t << ".PP" << endl;
+ if (!m_firstCol) m_t << "\n";
+ m_t << ".PP\n";
}
void ManDocVisitor::visitPre(DocHtmlListItem *li)
@@ -665,7 +664,7 @@ void ManDocVisitor::visitPre(DocHtmlListItem *li)
if (m_hide) return;
QCString ws;
ws.fill(' ',m_indent-2);
- if (!m_firstCol) m_t << endl;
+ if (!m_firstCol) m_t << "\n";
m_t << ".IP \"" << ws;
if (((DocHtmlList *)li->parent())->type()==DocHtmlList::Ordered)
{
@@ -675,31 +674,31 @@ void ManDocVisitor::visitPre(DocHtmlListItem *li)
{
m_t << "\\(bu\" " << m_indent;
}
- m_t << endl;
+ m_t << "\n";
m_firstCol=TRUE;
}
void ManDocVisitor::visitPost(DocHtmlListItem *)
{
if (m_hide) return;
- m_t << endl;
+ m_t << "\n";
m_firstCol=TRUE;
}
//void ManDocVisitor::visitPre(DocHtmlPre *)
//{
-// if (!m_firstCol) m_t << endl;
-// m_t << ".PP" << endl;
-// m_t << ".nf" << endl;
+// if (!m_firstCol) m_t << "\n";
+// m_t << ".PP\n";
+// m_t << ".nf\n";
// m_insidePre=TRUE;
//}
//
//void ManDocVisitor::visitPost(DocHtmlPre *)
//{
// m_insidePre=FALSE;
-// if (!m_firstCol) m_t << endl;
-// m_t << ".fi" << endl;
-// m_t << ".PP" << endl;
+// if (!m_firstCol) m_t << "\n";
+// m_t << ".fi\n";
+// m_t << ".PP\n";
// m_firstCol=TRUE;
//}
@@ -710,15 +709,15 @@ void ManDocVisitor::visitPre(DocHtmlDescList *)
void ManDocVisitor::visitPost(DocHtmlDescList *)
{
if (m_hide) return;
- if (!m_firstCol) m_t << endl;
- m_t << ".PP" << endl;
+ if (!m_firstCol) m_t << "\n";
+ m_t << ".PP\n";
m_firstCol=TRUE;
}
void ManDocVisitor::visitPre(DocHtmlDescTitle *)
{
if (m_hide) return;
- if (!m_firstCol) m_t << endl;
+ if (!m_firstCol) m_t << "\n";
m_t << ".IP \"\\fB";
m_firstCol=FALSE;
}
@@ -726,7 +725,7 @@ void ManDocVisitor::visitPre(DocHtmlDescTitle *)
void ManDocVisitor::visitPost(DocHtmlDescTitle *)
{
if (m_hide) return;
- m_t << "\\fP\" 1c" << endl;
+ m_t << "\\fP\" 1c\n";
m_firstCol=TRUE;
}
@@ -773,18 +772,18 @@ void ManDocVisitor::visitPost(DocHtmlCell *)
void ManDocVisitor::visitPre(DocInternal *)
{
if (m_hide) return;
- //if (!m_firstCol) m_t << endl;
- //m_t << ".PP" << endl;
- //m_t << "\\fB" << theTranslator->trForInternalUseOnly() << "\\fP" << endl;
- //m_t << ".RS 4" << endl;
+ //if (!m_firstCol) m_t << "\n";
+ //m_t << ".PP\n";
+ //m_t << "\\fB" << theTranslator->trForInternalUseOnly() << "\\fP\n";
+ //m_t << ".RS 4\n";
}
void ManDocVisitor::visitPost(DocInternal *)
{
if (m_hide) return;
- //if (!m_firstCol) m_t << endl;
- //m_t << ".RE" << endl;
- //m_t << ".PP" << endl;
+ //if (!m_firstCol) m_t << "\n";
+ //m_t << ".RE\n";
+ //m_t << ".PP\n";
//m_firstCol=TRUE;
}
@@ -803,7 +802,7 @@ void ManDocVisitor::visitPost(DocHRef *)
void ManDocVisitor::visitPre(DocHtmlHeader *header)
{
if (m_hide) return;
- if (!m_firstCol) m_t << endl;
+ if (!m_firstCol) m_t << "\n";
if (header->level()==1) m_t << ".SH"; else m_t << ".SS";
m_t << " \"";
}
@@ -811,8 +810,8 @@ void ManDocVisitor::visitPre(DocHtmlHeader *header)
void ManDocVisitor::visitPost(DocHtmlHeader *header)
{
if (m_hide) return;
- m_t << "\"" << endl;
- if (header->level()==1) m_t << ".PP" << endl;
+ m_t << "\"\n";
+ if (header->level()==1) m_t << ".PP\n";
m_firstCol=TRUE;
}
@@ -877,15 +876,15 @@ void ManDocVisitor::visitPre(DocSecRefItem *)
if (m_hide) return;
QCString ws;
ws.fill(' ',m_indent-2);
- if (!m_firstCol) m_t << endl;
- m_t << ".IP \"" << ws << "\\(bu\" " << m_indent << endl;
+ if (!m_firstCol) m_t << "\n";
+ m_t << ".IP \"" << ws << "\\(bu\" " << m_indent << "\n";
m_firstCol=TRUE;
}
void ManDocVisitor::visitPost(DocSecRefItem *)
{
if (m_hide) return;
- m_t << endl;
+ m_t << "\n";
m_firstCol=TRUE;
}
@@ -899,8 +898,8 @@ void ManDocVisitor::visitPost(DocSecRefList *)
{
if (m_hide) return;
m_indent-=2;
- if (!m_firstCol) m_t << endl;
- m_t << ".PP" << endl;
+ if (!m_firstCol) m_t << "\n";
+ m_t << ".PP\n";
}
void ManDocVisitor::visitPre(DocParamSect *s)
@@ -908,8 +907,8 @@ void ManDocVisitor::visitPre(DocParamSect *s)
if (m_hide) return;
if (!m_firstCol)
{
- m_t << endl;
- m_t << ".PP" << endl;
+ m_t << "\n";
+ m_t << ".PP\n";
}
m_t << "\\fB";
switch(s->type())
@@ -925,16 +924,16 @@ void ManDocVisitor::visitPre(DocParamSect *s)
default:
ASSERT(0);
}
- m_t << "\\fP" << endl;
- m_t << ".RS 4" << endl;
+ m_t << "\\fP\n";
+ m_t << ".RS 4\n";
}
void ManDocVisitor::visitPost(DocParamSect *)
{
if (m_hide) return;
- if (!m_firstCol) m_t << endl;
- m_t << ".RE" << endl;
- m_t << ".PP" << endl;
+ if (!m_firstCol) m_t << "\n";
+ m_t << ".RE\n";
+ m_t << ".PP\n";
m_firstCol=TRUE;
}
@@ -963,8 +962,8 @@ void ManDocVisitor::visitPost(DocParamList *pl)
if (m_hide) return;
if (!pl->isLast())
{
- if (!m_firstCol) m_t << endl;
- m_t << ".br" << endl;
+ if (!m_firstCol) m_t << "\n";
+ m_t << ".br\n";
}
}
@@ -974,22 +973,22 @@ void ManDocVisitor::visitPre(DocXRefItem *x)
if (x->title().isEmpty()) return;
if (!m_firstCol)
{
- m_t << endl;
- m_t << ".PP" << endl;
+ m_t << "\n";
+ m_t << ".PP\n";
}
m_t << "\\fB";
filter(x->title());
- m_t << "\\fP" << endl;
- m_t << ".RS 4" << endl;
+ m_t << "\\fP\n";
+ m_t << ".RS 4\n";
}
void ManDocVisitor::visitPost(DocXRefItem *x)
{
if (m_hide) return;
if (x->title().isEmpty()) return;
- if (!m_firstCol) m_t << endl;
- m_t << ".RE" << endl;
- m_t << ".PP" << endl;
+ if (!m_firstCol) m_t << "\n";
+ m_t << ".RE\n";
+ m_t << ".PP\n";
m_firstCol=TRUE;
}
@@ -1018,18 +1017,18 @@ void ManDocVisitor::visitPre(DocHtmlBlockQuote *)
if (m_hide) return;
if (!m_firstCol)
{
- m_t << endl;
- m_t << ".PP" << endl;
+ m_t << "\n";
+ m_t << ".PP\n";
}
- m_t << ".RS 4" << endl; // TODO: add support for nested block quotes
+ m_t << ".RS 4\n"; // TODO: add support for nested block quotes
}
void ManDocVisitor::visitPost(DocHtmlBlockQuote *)
{
if (m_hide) return;
- if (!m_firstCol) m_t << endl;
- m_t << ".RE" << endl;
- m_t << ".PP" << endl;
+ if (!m_firstCol) m_t << "\n";
+ m_t << ".RE\n";
+ m_t << ".PP\n";
m_firstCol=TRUE;
}
@@ -1050,11 +1049,11 @@ void ManDocVisitor::visitPost(DocParBlock *)
}
-void ManDocVisitor::filter(const char *str)
+void ManDocVisitor::filter(const QCString &str)
{
- if (str)
+ if (!str.isEmpty())
{
- const char *p=str;
+ const char *p=str.data();
char c=0;
while ((c=*p++))
{
diff --git a/src/mandocvisitor.h b/src/mandocvisitor.h
index 7c5dc8d..341f37a 100644
--- a/src/mandocvisitor.h
+++ b/src/mandocvisitor.h
@@ -19,17 +19,19 @@
#ifndef _MANDOCVISITOR_H
#define _MANDOCVISITOR_H
+#include <iostream>
+
+#include "qcstring.h"
#include "docvisitor.h"
-#include <qcstring.h>
-class FTextStream;
class CodeOutputInterface;
+class TextStream;
/*! @brief Concrete visitor implementation for LaTeX output. */
class ManDocVisitor : public DocVisitor
{
public:
- ManDocVisitor(FTextStream &t,CodeOutputInterface &ci,const char *langExt);
+ ManDocVisitor(TextStream &t,CodeOutputInterface &ci,const QCString &langExt);
//--------------------------------------
// visitor functions for leaf nodes
@@ -142,13 +144,13 @@ class ManDocVisitor : public DocVisitor
// helper functions
//--------------------------------------
- void filter(const char *str);
+ void filter(const QCString &str);
//--------------------------------------
// state variables
//--------------------------------------
- FTextStream &m_t;
+ TextStream &m_t;
CodeOutputInterface &m_ci;
bool m_insidePre;
bool m_hide;
diff --git a/src/mangen.cpp b/src/mangen.cpp
index 9139aa8..05c5e77 100644
--- a/src/mangen.cpp
+++ b/src/mangen.cpp
@@ -20,7 +20,6 @@
#include <stdlib.h>
-#include <qdir.h>
#include "message.h"
#include "mangen.h"
#include "config.h"
@@ -30,6 +29,8 @@
#include "docparser.h"
#include "mandocvisitor.h"
#include "language.h"
+#include "dir.h"
+#include "utf8.h"
static QCString getExtension()
{
@@ -101,25 +102,25 @@ void ManGenerator::init()
{
QCString manOutput = Config_getString(MAN_OUTPUT);
- QDir d(manOutput);
- if (!d.exists() && !d.mkdir(manOutput))
+ Dir d(manOutput.str());
+ if (!d.exists() && !d.mkdir(manOutput.str()))
{
- term("Could not create output directory %s\n",manOutput.data());
+ term("Could not create output directory %s\n",qPrint(manOutput));
}
- d.setPath(manOutput + "/" + getSubdir());
- if (!d.exists() && !d.mkdir(manOutput + "/" + getSubdir()))
+ std::string manDir = manOutput.str()+"/"+getSubdir().str();
+ if (!d.exists(manDir) && !d.mkdir(manDir))
{
- term("Could not create output directory %s/%s\n",manOutput.data(), getSubdir().data());
+ term("Could not create output directory %s/%s\n",qPrint(manOutput), qPrint(getSubdir()));
}
createSubDirs(d);
}
-static QCString buildFileName(const char *name)
+static QCString buildFileName(const QCString &name)
{
QCString fileName;
- if (name==0) return "noname";
+ if (name.isEmpty()) return "noname";
- const char *p=name;
+ const char *p=name.data();
char c;
while ((c=*p++))
{
@@ -155,7 +156,7 @@ static QCString buildFileName(const char *name)
return fileName;
}
-void ManGenerator::startFile(const char *,const char *manName,const char *,int)
+void ManGenerator::startFile(const QCString &,const QCString &manName,const QCString &,int)
{
startPlainFile( buildFileName( manName ) );
m_firstCol=TRUE;
@@ -163,25 +164,25 @@ void ManGenerator::startFile(const char *,const char *manName,const char *,int)
void ManGenerator::endFile()
{
- t << endl;
+ m_t << "\n";
endPlainFile();
}
-void ManGenerator::endTitleHead(const char *,const char *name)
+void ManGenerator::endTitleHead(const QCString &,const QCString &name)
{
- t << ".TH \"" << name << "\" " << getExtension() << " \""
+ m_t << ".TH \"" << name << "\" " << getExtension() << " \""
<< dateToString(FALSE) << "\" \"";
if (!Config_getString(PROJECT_NUMBER).isEmpty())
- t << "Version " << Config_getString(PROJECT_NUMBER) << "\" \"";
+ m_t << "Version " << Config_getString(PROJECT_NUMBER) << "\" \"";
if (Config_getString(PROJECT_NAME).isEmpty())
- t << "Doxygen";
+ m_t << "Doxygen";
else
- t << Config_getString(PROJECT_NAME);
- t << "\" \\\" -*- nroff -*-" << endl;
- t << ".ad l" << endl;
- t << ".nh" << endl;
- t << ".SH NAME" << endl;
- t << name;
+ m_t << Config_getString(PROJECT_NAME);
+ m_t << "\" \\\" -*- nroff -*-\n";
+ m_t << ".ad l\n";
+ m_t << ".nh\n";
+ m_t << ".SH NAME\n";
+ m_t << name;
m_firstCol=FALSE;
m_paragraph=TRUE;
m_inHeader=TRUE;
@@ -191,19 +192,19 @@ void ManGenerator::newParagraph()
{
if (!m_paragraph)
{
- if (!m_firstCol) t << endl;
- t << ".PP" << endl;
+ if (!m_firstCol) m_t << "\n";
+ m_t << ".PP\n";
m_firstCol=TRUE;
}
m_paragraph=TRUE;
}
-void ManGenerator::startParagraph(const char *)
+void ManGenerator::startParagraph(const QCString &)
{
if (!m_paragraph)
{
- if (!m_firstCol) t << endl;
- t << ".PP" << endl;
+ if (!m_firstCol) m_t << "\n";
+ m_t << ".PP\n";
m_firstCol=TRUE;
}
m_paragraph=TRUE;
@@ -213,38 +214,38 @@ void ManGenerator::endParagraph()
{
}
-void ManGenerator::writeString(const char *text)
+void ManGenerator::writeString(const QCString &text)
{
docify(text);
}
-void ManGenerator::startIndexItem(const char *,const char *)
+void ManGenerator::startIndexItem(const QCString &,const QCString &)
{
}
-void ManGenerator::endIndexItem(const char *,const char *)
+void ManGenerator::endIndexItem(const QCString &,const QCString &)
{
}
-void ManGenerator::writeStartAnnoItem(const char *,const char *,
- const char *,const char *)
+void ManGenerator::writeStartAnnoItem(const QCString &,const QCString &,
+ const QCString &,const QCString &)
{
}
-void ManGenerator::writeObjectLink(const char *,const char *,
- const char *, const char *name)
+void ManGenerator::writeObjectLink(const QCString &,const QCString &,
+ const QCString &, const QCString &name)
{
startBold(); docify(name); endBold();
}
-void ManGenerator::writeCodeLink(const char *,const char *,
- const char *, const char *name,
- const char *)
+void ManGenerator::writeCodeLink(const QCString &,const QCString &,
+ const QCString &, const QCString &name,
+ const QCString &)
{
docify(name);
}
-void ManGenerator::startHtmlLink(const char *)
+void ManGenerator::startHtmlLink(const QCString &)
{
}
@@ -252,56 +253,56 @@ void ManGenerator::endHtmlLink()
{
}
-//void ManGenerator::writeMailLink(const char *url)
+//void ManGenerator::writeMailLink(const QCString &url)
//{
// docify(url);
//}
void ManGenerator::startGroupHeader(int)
{
- if (!m_firstCol) t << endl;
- t << ".SH \"";
+ if (!m_firstCol) m_t << "\n";
+ m_t << ".SH \"";
m_upperCase=TRUE;
m_firstCol=FALSE;
}
void ManGenerator::endGroupHeader(int)
{
- t << "\"\n.PP " << endl;
+ m_t << "\"\n.PP \n";
m_firstCol=TRUE;
m_paragraph=TRUE;
m_upperCase=FALSE;
}
-void ManGenerator::startMemberHeader(const char *,int)
+void ManGenerator::startMemberHeader(const QCString &,int)
{
- if (!m_firstCol) t << endl;
- t << ".SS \"";
+ if (!m_firstCol) m_t << "\n";
+ m_t << ".SS \"";
}
void ManGenerator::endMemberHeader()
{
- t << "\"\n";
+ m_t << "\"\n";
m_firstCol=TRUE;
m_paragraph=FALSE;
}
-void ManGenerator::docify(const char *str)
+void ManGenerator::docify(const QCString &str)
{
- if (str)
+ if (!str.isEmpty())
{
- const char *p=str;
+ const char *p=str.data();
char c=0;
while ((c=*p++))
{
switch(c)
{
- case '-': t << "\\-"; break; // see bug747780
- case '.': t << "\\&."; break; // see bug652277
- case '\\': t << "\\\\"; m_col++; break;
- case '\n': t << "\n"; m_col=0; break;
+ case '-': m_t << "\\-"; break; // see bug747780
+ case '.': m_t << "\\&."; break; // see bug652277
+ case '\\': m_t << "\\\\"; m_col++; break;
+ case '\n': m_t << "\n"; m_col=0; break;
case '\"': c = '\''; // no break!
- default: t << c; m_col++; break;
+ default: m_t << c; m_col++; break;
}
}
m_firstCol=(c=='\n');
@@ -310,12 +311,12 @@ void ManGenerator::docify(const char *str)
m_paragraph=FALSE;
}
-void ManGenerator::codify(const char *str)
+void ManGenerator::codify(const QCString &str)
{
//static char spaces[]=" ";
- if (str)
+ if (!str.isEmpty())
{
- const char *p=str;
+ const char *p=str.data();
char c;
int spacesToNextTabStop;
while (*p)
@@ -323,16 +324,16 @@ void ManGenerator::codify(const char *str)
c=*p++;
switch(c)
{
- case '.': t << "\\&."; break; // see bug652277
+ case '.': m_t << "\\&."; break; // see bug652277
case '\t': spacesToNextTabStop =
Config_getInt(TAB_SIZE) - (m_col%Config_getInt(TAB_SIZE));
- t << Doxygen::spaces.left(spacesToNextTabStop);
+ m_t << Doxygen::spaces.left(spacesToNextTabStop);
m_col+=spacesToNextTabStop;
break;
- case '\n': t << "\n"; m_firstCol=TRUE; m_col=0; break;
- case '\\': t << "\\"; m_col++; break;
+ case '\n': m_t << "\n"; m_firstCol=TRUE; m_col=0; break;
+ case '\\': m_t << "\\"; m_col++; break;
case '\"': // no break!
- default: p=writeUtf8Char(t,p-1); m_firstCol=FALSE; m_col++; break;
+ default: p=writeUTF8Char(m_t,p-1); m_firstCol=FALSE; m_col++; break;
}
}
//printf("%s",str);fflush(stdout);
@@ -346,9 +347,9 @@ void ManGenerator::writeChar(char c)
if (m_firstCol) m_col=0; else m_col++;
switch (c)
{
- case '\\': t << "\\\\"; break;
+ case '\\': m_t << "\\\\"; break;
case '\"': c = '\''; // no break!
- default: t << c; break;
+ default: m_t << c; break;
}
//printf("%c",c);fflush(stdout);
m_paragraph=FALSE;
@@ -357,7 +358,7 @@ void ManGenerator::writeChar(char c)
void ManGenerator::startDescList(SectionTypes)
{
if (!m_firstCol)
- { t << endl << ".PP" << endl;
+ { m_t << "\n" << ".PP\n";
m_firstCol=TRUE; m_paragraph=TRUE;
m_col=0;
}
@@ -367,21 +368,21 @@ void ManGenerator::startDescList(SectionTypes)
void ManGenerator::startTitle()
{
- if (!m_firstCol) t << endl;
- t << ".SH \"";
+ if (!m_firstCol) m_t << "\n";
+ m_t << ".SH \"";
m_firstCol=FALSE;
m_paragraph=FALSE;
}
void ManGenerator::endTitle()
{
- t << "\"";
+ m_t << "\"";
}
void ManGenerator::startItemListItem()
{
- if (!m_firstCol) t << endl;
- t << ".TP" << endl;
+ if (!m_firstCol) m_t << "\n";
+ m_t << ".TP\n";
m_firstCol=TRUE;
m_paragraph=FALSE;
m_col=0;
@@ -391,34 +392,34 @@ void ManGenerator::endItemListItem()
{
}
-void ManGenerator::startCodeFragment(const char *)
+void ManGenerator::startCodeFragment(const QCString &)
{
newParagraph();
- t << ".nf" << endl;
+ m_t << ".nf\n";
m_firstCol=TRUE;
m_paragraph=FALSE;
}
-void ManGenerator::endCodeFragment(const char *)
+void ManGenerator::endCodeFragment(const QCString &)
{
- if (!m_firstCol) t << endl;
- t << ".fi" << endl;
+ if (!m_firstCol) m_t << "\n";
+ m_t << ".fi\n";
m_firstCol=TRUE;
m_paragraph=FALSE;
m_col=0;
}
-void ManGenerator::startMemberDoc(const char *,const char *,const char *,const char *,int,int,bool)
+void ManGenerator::startMemberDoc(const QCString &,const QCString &,const QCString &,const QCString &,int,int,bool)
{
- if (!m_firstCol) t << endl;
- t << ".SS \"";
+ if (!m_firstCol) m_t << "\n";
+ m_t << ".SS \"";
m_firstCol=FALSE;
m_paragraph=FALSE;
}
-void ManGenerator::startDoxyAnchor(const char *,const char *manName,
- const char *, const char *name,
- const char *)
+void ManGenerator::startDoxyAnchor(const QCString &,const QCString &manName,
+ const QCString &, const QCString &name,
+ const QCString &)
{
// something to be done?
if( !Config_getBool(MAN_LINKS) )
@@ -433,68 +434,65 @@ void ManGenerator::startDoxyAnchor(const char *,const char *manName,
if (i!=-1) baseName=baseName.right(baseName.length()-i-2);
//printf("Converting man link '%s'->'%s'->'%s'\n",
- // name,baseName.data(),buildFileName(baseName).data());
+ // name,qPrint(baseName),qPrint(buildFileName(baseName)));
// - remove dangerous characters and append suffix, then add dir prefix
QCString fileName=dir()+"/"+buildFileName( baseName );
- QFile linkfile( fileName );
- // - only create file if it doesn't exist already
- if ( !linkfile.open( IO_ReadOnly ) )
+ FileInfo fi(fileName.str());
+ if (!fi.exists())
{
- if ( linkfile.open( IO_WriteOnly ) )
- {
- FTextStream linkstream;
- linkstream.setDevice(&linkfile);
- linkstream << ".so " << getSubdir() << "/" << buildFileName( manName ) << endl;
- }
+ std::ofstream linkStream(fileName.str(),std::ofstream::out | std::ofstream::binary);
+ if (linkStream.is_open())
+ {
+ linkStream << ".so " << getSubdir() << "/" << buildFileName( manName ) << "\n";
+ }
}
- linkfile.close();
}
void ManGenerator::endMemberDoc(bool)
{
- t << "\"\n";
+ m_t << "\"\n";
}
void ManGenerator::startSubsection()
{
- if (!m_firstCol) t << endl;
- t << ".SS \"";
+ if (!m_firstCol) m_t << "\n";
+ m_t << ".SS \"";
m_firstCol=FALSE;
m_paragraph=FALSE;
}
void ManGenerator::endSubsection()
{
- t << "\"";
+ m_t << "\"";
}
void ManGenerator::startSubsubsection()
{
- if (!m_firstCol) t << endl;
- t << "\n.SS \"";
+ if (!m_firstCol) m_t << "\n";
+ m_t << "\n.SS \"";
m_firstCol=FALSE;
m_paragraph=FALSE;
}
void ManGenerator::endSubsubsection()
{
- t << "\"";
+ m_t << "\"";
}
void ManGenerator::writeSynopsis()
{
- if (!m_firstCol) t << endl;
- t << ".SH SYNOPSIS\n.br\n.PP\n";
+ if (!m_firstCol) m_t << "\n";
+ m_t << ".SH SYNOPSIS\n.br\n.PP\n";
m_firstCol=TRUE;
m_paragraph=FALSE;
}
void ManGenerator::startDescItem()
{
- if (!m_firstCol) t << endl;
- t << ".IP \"";
+ if (!m_firstCol) m_t << "\n";
+ m_t << ".IP \"";
m_firstCol=FALSE;
}
@@ -506,9 +504,9 @@ void ManGenerator::startDescItem()
void ManGenerator::startDescForItem()
{
- if (!m_firstCol) t << endl;
- if (!m_paragraph) t << ".in -1c" << endl;
- t << ".in +1c" << endl;
+ if (!m_firstCol) m_t << "\n";
+ if (!m_paragraph) m_t << ".in -1c\n";
+ m_t << ".in +1c\n";
m_firstCol=TRUE;
m_paragraph=FALSE;
m_col=0;
@@ -520,7 +518,7 @@ void ManGenerator::endDescForItem()
void ManGenerator::endDescItem()
{
- t << "\" 1c" << endl;
+ m_t << "\" 1c\n";
m_firstCol=TRUE;
}
@@ -541,23 +539,23 @@ void ManGenerator::endAnonTypeScope(int indentLevel)
}
-void ManGenerator::startMemberItem(const char *,int,const char *)
+void ManGenerator::startMemberItem(const QCString &,int,const QCString &)
{
- if (m_firstCol && !m_insideTabbing) t << ".in +1c\n";
- t << "\n.ti -1c\n.RI \"";
+ if (m_firstCol && !m_insideTabbing) m_t << ".in +1c\n";
+ m_t << "\n.ti -1c\n.RI \"";
m_firstCol=FALSE;
}
void ManGenerator::endMemberItem()
{
- t << "\"\n.br";
+ m_t << "\"\n.br";
}
void ManGenerator::startMemberList()
{
if (!m_insideTabbing)
{
- t << "\n.in +1c"; m_firstCol=FALSE;
+ m_t << "\n.in +1c"; m_firstCol=FALSE;
}
}
@@ -565,18 +563,18 @@ void ManGenerator::endMemberList()
{
if (!m_insideTabbing)
{
- t << "\n.in -1c"; m_firstCol=FALSE;
+ m_t << "\n.in -1c"; m_firstCol=FALSE;
}
}
void ManGenerator::startMemberGroupHeader(bool)
{
- t << "\n.PP\n.RI \"\\fB";
+ m_t << "\n.PP\n.RI \"\\fB";
}
void ManGenerator::endMemberGroupHeader()
{
- t << "\\fP\"\n.br\n";
+ m_t << "\\fP\"\n.br\n";
m_firstCol=TRUE;
}
@@ -586,21 +584,21 @@ void ManGenerator::startMemberGroupDocs()
void ManGenerator::endMemberGroupDocs()
{
- t << "\n.PP";
+ m_t << "\n.PP";
}
void ManGenerator::startMemberGroup()
{
- t << "\n.in +1c";
+ m_t << "\n.in +1c";
}
void ManGenerator::endMemberGroup(bool)
{
- t << "\n.in -1c";
+ m_t << "\n.in -1c";
m_firstCol=FALSE;
}
-void ManGenerator::startSection(const char *,const char *,SectionType type)
+void ManGenerator::startSection(const QCString &,const QCString &,SectionType type)
{
if( !m_inHeader )
{
@@ -608,15 +606,15 @@ void ManGenerator::startSection(const char *,const char *,SectionType type)
{
case SectionType::Page: startGroupHeader(FALSE); break;
case SectionType::Section: startGroupHeader(FALSE); break;
- case SectionType::Subsection: startMemberHeader(0, -1); break;
- case SectionType::Subsubsection: startMemberHeader(0, -1); break;
- case SectionType::Paragraph: startMemberHeader(0, -1); break;
+ case SectionType::Subsection: startMemberHeader(QCString(), -1); break;
+ case SectionType::Subsubsection: startMemberHeader(QCString(), -1); break;
+ case SectionType::Paragraph: startMemberHeader(QCString(), -1); break;
default: ASSERT(0); break;
}
}
}
-void ManGenerator::endSection(const char *,SectionType type)
+void ManGenerator::endSection(const QCString &,SectionType type)
{
if( !m_inHeader )
{
@@ -632,7 +630,7 @@ void ManGenerator::endSection(const char *,SectionType type)
}
else
{
- t << "\n";
+ m_t << "\n";
m_firstCol=TRUE;
m_paragraph=FALSE;
m_inHeader=FALSE;
@@ -642,7 +640,7 @@ void ManGenerator::endSection(const char *,SectionType type)
void ManGenerator::startExamples()
{
if (!m_firstCol)
- { t << endl << ".PP" << endl;
+ { m_t << "\n" << ".PP\n";
m_firstCol=TRUE; m_paragraph=TRUE;
m_col=0;
}
@@ -657,10 +655,10 @@ void ManGenerator::endExamples()
{
}
-void ManGenerator::startDescTable(const char *title)
+void ManGenerator::startDescTable(const QCString &title)
{
if (!m_firstCol)
- { t << endl << ".PP" << endl;
+ { m_t << "\n.PP\n";
m_firstCol=TRUE; m_paragraph=TRUE;
m_col=0;
}
@@ -677,10 +675,10 @@ void ManGenerator::endDescTable()
endDescForItem();
}
-void ManGenerator::startParamList(ParamListTypes,const char *title)
+void ManGenerator::startParamList(ParamListTypes,const QCString &title)
{
if (!m_firstCol)
- { t << endl << ".PP" << endl;
+ { m_t << "\n.PP\n";
m_firstCol=TRUE; m_paragraph=TRUE;
m_col=0;
}
@@ -697,17 +695,17 @@ void ManGenerator::endParamList()
void ManGenerator::writeDoc(DocNode *n,const Definition *ctx,const MemberDef *,int)
{
- ManDocVisitor *visitor = new ManDocVisitor(t,*this,ctx?ctx->getDefFileExtension():QCString(""));
+ ManDocVisitor *visitor = new ManDocVisitor(m_t,*this,ctx?ctx->getDefFileExtension():QCString(""));
n->accept(visitor);
delete visitor;
m_firstCol=FALSE;
m_paragraph = FALSE;
}
-void ManGenerator::startConstraintList(const char *header)
+void ManGenerator::startConstraintList(const QCString &header)
{
if (!m_firstCol)
- { t << endl << ".PP" << endl;
+ { m_t << "\n.PP\n";
m_firstCol=TRUE; m_paragraph=TRUE;
m_col=0;
}
@@ -728,7 +726,7 @@ void ManGenerator::endConstraintParam()
{
endEmphasis();
endItemListItem();
- t << " : ";
+ m_t << " : ";
}
void ManGenerator::startConstraintType()
@@ -747,7 +745,7 @@ void ManGenerator::startConstraintDocs()
void ManGenerator::endConstraintDocs()
{
- t << endl; m_firstCol=TRUE;
+ m_t << "\n"; m_firstCol=TRUE;
}
void ManGenerator::endConstraintList()
@@ -759,14 +757,14 @@ void ManGenerator::startInlineHeader()
{
if (!m_firstCol)
{
- t << endl << ".PP" << endl << ".in -1c" << endl;
+ m_t << "\n.PP\n" << ".in -1c\n";
}
- t << ".RI \"\\fB";
+ m_t << ".RI \"\\fB";
}
void ManGenerator::endInlineHeader()
{
- t << "\\fP\"" << endl << ".in +1c" << endl;
+ m_t << "\\fP\"\n" << ".in +1c\n";
m_firstCol = FALSE;
}
@@ -774,9 +772,9 @@ void ManGenerator::startMemberDocSimple(bool isEnum)
{
if (!m_firstCol)
{
- t << endl << ".PP" << endl;
+ m_t << "\n.PP\n";
}
- t << "\\fB";
+ m_t << "\\fB";
if (isEnum)
{
docify(theTranslator->trEnumerationValues());
@@ -785,15 +783,15 @@ void ManGenerator::startMemberDocSimple(bool isEnum)
{
docify(theTranslator->trCompoundMembers());
}
- t << ":\\fP" << endl;
- t << ".RS 4" << endl;
+ m_t << ":\\fP\n";
+ m_t << ".RS 4\n";
}
void ManGenerator::endMemberDocSimple(bool)
{
- if (!m_firstCol) t << endl;
- t << ".RE" << endl;
- t << ".PP" << endl;
+ if (!m_firstCol) m_t << "\n";
+ m_t << ".RE\n";
+ m_t << ".PP\n";
m_firstCol=TRUE;
}
@@ -803,17 +801,17 @@ void ManGenerator::startInlineMemberType()
void ManGenerator::endInlineMemberType()
{
- t << " ";
+ m_t << " ";
}
void ManGenerator::startInlineMemberName()
{
- t << "\\fI";
+ m_t << "\\fI";
}
void ManGenerator::endInlineMemberName()
{
- t << "\\fP ";
+ m_t << "\\fP ";
}
void ManGenerator::startInlineMemberDoc()
@@ -822,9 +820,9 @@ void ManGenerator::startInlineMemberDoc()
void ManGenerator::endInlineMemberDoc()
{
- if (!m_firstCol) t << endl;
- t << ".br" << endl;
- t << ".PP" << endl;
+ if (!m_firstCol) m_t << "\n";
+ m_t << ".br\n";
+ m_t << ".PP\n";
m_firstCol=TRUE;
}
@@ -832,10 +830,10 @@ void ManGenerator::startLabels()
{
}
-void ManGenerator::writeLabel(const char *l,bool isLast)
+void ManGenerator::writeLabel(const QCString &l,bool isLast)
{
- t << "\\fC [" << l << "]\\fP";
- if (!isLast) t << ", ";
+ m_t << "\\fC [" << l << "]\\fP";
+ if (!isLast) m_t << ", ";
}
void ManGenerator::endLabels()
diff --git a/src/mangen.h b/src/mangen.h
index 052c5ee..c552580 100644
--- a/src/mangen.h
+++ b/src/mangen.h
@@ -20,8 +20,6 @@
#include "outputgen.h"
-class QFile;
-
/** Generator for Man page output. */
class ManGenerator : public OutputGenerator
{
@@ -37,27 +35,27 @@ class ManGenerator : public OutputGenerator
void writeDoc(DocNode *,const Definition *,const MemberDef *,int);
static void init();
- void startFile(const char *name,const char *manName,const char *title,int);
+ void startFile(const QCString &name,const QCString &manName,const QCString &title,int);
void writeSearchInfo() {}
- void writeFooter(const char *) {}
+ void writeFooter(const QCString &) {}
void endFile();
void clearBuffer();
void startIndexSection(IndexSections) {}
void endIndexSection(IndexSections) {}
- void writePageLink(const char *,bool) {}
+ void writePageLink(const QCString &,bool) {}
void startProjectNumber() {}
void endProjectNumber() {}
void writeStyleInfo(int) {}
- void startTitleHead(const char *) {}
- void endTitleHead(const char *,const char *);
+ void startTitleHead(const QCString &) {}
+ void endTitleHead(const QCString &,const QCString &);
void startTitle();
void endTitle();
void newParagraph();
- void startParagraph(const char *classDef);
+ void startParagraph(const QCString &classDef);
void endParagraph();
- void writeString(const char *text);
+ void writeString(const QCString &text);
void startIndexListItem() {}
void endIndexListItem() {}
void startIndexList() {}
@@ -65,34 +63,34 @@ class ManGenerator : public OutputGenerator
void startIndexKey() {}
void endIndexKey() {}
void startIndexValue(bool) {}
- void endIndexValue(const char *,bool) {}
+ void endIndexValue(const QCString &,bool) {}
void startItemList() {}
void endItemList() { newParagraph(); }
- void startIndexItem(const char *ref,const char *file);
- void endIndexItem(const char *ref,const char *file);
- void docify(const char *text);
- void codify(const char *text);
- void writeObjectLink(const char *ref,const char *file,
- const char *anchor,const char *name);
- void writeCodeLink(const char *ref,const char *file,
- const char *anchor,const char *name,
- const char *tooltip);
- void writeTooltip(const char *, const DocLinkInfo &, const char *,
- const char *, const SourceLinkInfo &, const SourceLinkInfo &
+ void startIndexItem(const QCString &ref,const QCString &file);
+ void endIndexItem(const QCString &ref,const QCString &file);
+ void docify(const QCString &text);
+ void codify(const QCString &text);
+ void writeObjectLink(const QCString &ref,const QCString &file,
+ const QCString &anchor,const QCString &name);
+ void writeCodeLink(const QCString &ref,const QCString &file,
+ const QCString &anchor,const QCString &name,
+ const QCString &tooltip);
+ void writeTooltip(const QCString &, const DocLinkInfo &, const QCString &,
+ const QCString &, const SourceLinkInfo &, const SourceLinkInfo &
) {}
- void startTextLink(const char *,const char *) {}
+ void startTextLink(const QCString &,const QCString &) {}
void endTextLink() {}
- void startHtmlLink(const char *url);
+ void startHtmlLink(const QCString &url);
void endHtmlLink();
- void startTypewriter() { t << "\\fC"; m_firstCol=FALSE; }
- void endTypewriter() { t << "\\fP"; m_firstCol=FALSE; }
+ void startTypewriter() { m_t << "\\fC"; m_firstCol=FALSE; }
+ void endTypewriter() { m_t << "\\fP"; m_firstCol=FALSE; }
void startGroupHeader(int);
void endGroupHeader(int);
void startMemberSections() {}
void endMemberSections() {}
void startHeaderSection() {}
void endHeaderSection();
- void startMemberHeader(const char *,int);
+ void startMemberHeader(const QCString &,int);
void endMemberHeader();
void insertMemberAlign(bool) {}
void insertMemberAlignLeft(int,bool){}
@@ -109,10 +107,12 @@ class ManGenerator : public OutputGenerator
void endInlineHeader();
void startAnonTypeScope(int);
void endAnonTypeScope(int);
- void startMemberItem(const char *,int,const char *);
+ void startMemberItem(const QCString &,int,const QCString &);
void endMemberItem();
void startMemberTemplateParams() {}
- void endMemberTemplateParams(const char *,const char *) {}
+ void endMemberTemplateParams(const QCString &,const QCString &) {}
+ void startCompoundTemplateParams() { startSubsubsection(); }
+ void endCompoundTemplateParams() { endSubsubsection(); }
void startMemberGroupHeader(bool);
void endMemberGroupHeader();
@@ -122,30 +122,30 @@ class ManGenerator : public OutputGenerator
void endMemberGroup(bool);
void writeRuler() {}
- void writeAnchor(const char *,const char *) {}
- void startCodeFragment(const char *);
- void endCodeFragment(const char *);
- void writeLineNumber(const char *,const char *,const char *,int l) { t << l << " "; m_col=0; }
+ void writeAnchor(const QCString &,const QCString &) {}
+ void startCodeFragment(const QCString &);
+ void endCodeFragment(const QCString &);
+ void writeLineNumber(const QCString &,const QCString &,const QCString &,int l) { m_t << l << " "; m_col=0; }
void startCodeLine(bool) {}
void endCodeLine() { codify("\n"); m_col=0; }
- void startEmphasis() { t << "\\fI"; m_firstCol=FALSE; }
- void endEmphasis() { t << "\\fP"; m_firstCol=FALSE; }
- void startBold() { t << "\\fB"; m_firstCol=FALSE; }
- void endBold() { t << "\\fP"; m_firstCol=FALSE; }
+ void startEmphasis() { m_t << "\\fI"; m_firstCol=FALSE; }
+ void endEmphasis() { m_t << "\\fP"; m_firstCol=FALSE; }
+ void startBold() { m_t << "\\fB"; m_firstCol=FALSE; }
+ void endBold() { m_t << "\\fP"; m_firstCol=FALSE; }
void startDescription() {}
void endDescription() {}
void startDescItem();
void endDescItem();
- void lineBreak(const char *) { t << "\n.br" << endl; }
+ void lineBreak(const QCString &) { m_t << "\n.br\n"; }
void writeChar(char c);
- void startMemberDoc(const char *,const char *,const char *,const char *,int,int,bool);
+ void startMemberDoc(const QCString &,const QCString &,const QCString &,const QCString &,int,int,bool);
void endMemberDoc(bool);
- void startDoxyAnchor(const char *,const char *,const char *,const char *,const char *);
- void endDoxyAnchor(const char *,const char *) {}
+ void startDoxyAnchor(const QCString &,const QCString &,const QCString &,const QCString &,const QCString &);
+ void endDoxyAnchor(const QCString &,const QCString &) {}
void writeLatexSpacing() {}
- void writeStartAnnoItem(const char *type,const char *file,
- const char *path,const char *name);
- void writeEndAnnoItem(const char *) { t << endl; m_firstCol=TRUE; }
+ void writeStartAnnoItem(const QCString &type,const QCString &file,
+ const QCString &path,const QCString &name);
+ void writeEndAnnoItem(const QCString &) { m_t << "\n"; m_firstCol=TRUE; }
void startSubsection();
void endSubsection();
void startSubsubsection();
@@ -154,49 +154,49 @@ class ManGenerator : public OutputGenerator
void endCenter() {}
void startSmall() {}
void endSmall() {}
- void startMemberDescription(const char *,const char *,bool) { t << "\n.RI \""; m_firstCol=FALSE; }
- void endMemberDescription() { t << "\""; m_firstCol=FALSE; }
+ void startMemberDescription(const QCString &,const QCString &,bool) { m_t << "\n.RI \""; m_firstCol=FALSE; }
+ void endMemberDescription() { m_t << "\""; m_firstCol=FALSE; }
void startMemberDeclaration() {}
- void endMemberDeclaration(const char *,const char *) {}
- void writeInheritedSectionTitle(const char *,const char *,const char *,
- const char *,const char *,const char *) {}
+ void endMemberDeclaration(const QCString &,const QCString &) {}
+ void writeInheritedSectionTitle(const QCString &,const QCString &,const QCString &,
+ const QCString &,const QCString &,const QCString &) {}
void startDescList(SectionTypes);
void endDescList() {}
void startExamples();
void endExamples();
- void startParamList(ParamListTypes,const char *title);
+ void startParamList(ParamListTypes,const QCString &title);
void endParamList();
//void writeDescItem();
void startDescForItem();
void endDescForItem();
- void startSection(const char *,const char *,SectionType);
- void endSection(const char *,SectionType);
- void addIndexItem(const char *,const char *) {}
+ void startSection(const QCString &,const QCString &,SectionType);
+ void endSection(const QCString &,SectionType);
+ void addIndexItem(const QCString &,const QCString &) {}
void startIndent() {}
void endIndent() {}
void writeSynopsis();
void startClassDiagram() {}
- void endClassDiagram(const ClassDiagram &,const char *,const char *) {}
+ void endClassDiagram(const ClassDiagram &,const QCString &,const QCString &) {}
void startPageRef() {}
- void endPageRef(const char *,const char *) {}
+ void endPageRef(const QCString &,const QCString &) {}
void startQuickIndices() {}
void endQuickIndices() {}
- void writeSplitBar(const char *) {}
- void writeNavigationPath(const char *) {}
+ void writeSplitBar(const QCString &) {}
+ void writeNavigationPath(const QCString &) {}
void writeLogo() {}
- void writeQuickLinks(bool,HighlightedItem,const char *) {}
- void writeSummaryLink(const char *,const char *,const char *,bool) {}
+ void writeQuickLinks(bool,HighlightedItem,const QCString &) {}
+ void writeSummaryLink(const QCString &,const QCString &,const QCString &,bool) {}
void startContents() {}
void endContents() {}
- void writeNonBreakableSpace(int n) { int i; for (i=0;i<n;i++) t << " "; }
+ void writeNonBreakableSpace(int n) { int i; for (i=0;i<n;i++) m_t << " "; }
- void startDescTable(const char *t);
+ void startDescTable(const QCString &t);
void endDescTable();
void startDescTableRow() {}
void endDescTableRow() {}
void startDescTableTitle() { startItemListItem(); startBold(); startEmphasis(); endItemListItem(); }
void endDescTableTitle() { endEmphasis(); endBold(); }
- void startDescTableData() { t << endl; m_firstCol=TRUE; }
+ void startDescTableData() { m_t << "\n"; m_firstCol=TRUE; }
void endDescTableData() {}
void startDotGraph() {}
@@ -219,18 +219,18 @@ class ManGenerator : public OutputGenerator
void endMemberDocPrefixItem() {}
void startMemberDocName(bool) {}
void endMemberDocName() {}
- void startParameterType(bool,const char *) {}
+ void startParameterType(bool,const QCString &) {}
void endParameterType() {}
void startParameterName(bool) {}
void endParameterName(bool,bool,bool) {}
void startParameterList(bool) {}
void endParameterList() {}
- void exceptionEntry(const char*,bool) {}
+ void exceptionEntry(const QCString &,bool) {}
- void startFontClass(const char *) {}
+ void startFontClass(const QCString &) {}
void endFontClass() {}
- void startConstraintList(const char *);
+ void startConstraintList(const QCString &);
void startConstraintParam();
void endConstraintParam();
void startConstraintType();
@@ -249,12 +249,12 @@ class ManGenerator : public OutputGenerator
void endInlineMemberDoc();
void startLabels();
- void writeLabel(const char *l,bool isLast);
+ void writeLabel(const QCString &l,bool isLast);
void endLabels();
- void writeCodeAnchor(const char *) {}
- void setCurrentDoc(const Definition *,const char *,bool) {}
- void addWord(const char *,bool) {}
+ void writeCodeAnchor(const QCString &) {}
+ void setCurrentDoc(const Definition *,const QCString &,bool) {}
+ void addWord(const QCString &,bool) {}
private:
bool m_firstCol = true;
diff --git a/src/markdown.cpp b/src/markdown.cpp
index eaa9ef7..4627e73 100644
--- a/src/markdown.cpp
+++ b/src/markdown.cpp
@@ -32,10 +32,10 @@
*/
#include <stdio.h>
-#include <qfileinfo.h>
#include <unordered_map>
#include <functional>
+#include <atomic>
#include "markdown.h"
#include "growbuf.h"
@@ -50,6 +50,8 @@
#include "message.h"
#include "portable.h"
#include "regex.h"
+#include "fileinfo.h"
+#include "utf8.h"
#if !defined(NDEBUG)
#define ENABLE_TRACING
@@ -67,22 +69,22 @@
class Trace
{
public:
- Trace(const char *func) : m_func(func)
+ Trace(const QCString &func) : m_func(func)
{
if (Debug::isFlagSet(Debug::Markdown))
{
- fprintf(IOSTREAM,"> %s\n",func);
+ fprintf(IOSTREAM,"> %s\n",qPrint(func));
s_indent++;
}
}
- Trace(const char *func,const char *data) : m_func(func)
+ Trace(const QCString &func,const QCString &data) : m_func(func)
{
if (Debug::isFlagSet(Debug::Markdown))
{
indent();
char data_s[DATA_BUFSIZE*2+1] = ""; // worst case each input char outputs 2 chars + 0 terminator.
int j=0;
- if (data)
+ if (!data.isEmpty())
{
for (int i=0;i<DATA_BUFSIZE;i++)
{
@@ -96,7 +98,7 @@ class Trace
}
}
data_s[j++]=0;
- fprintf(IOSTREAM,"> %s data=[%s…]\n",func,data_s);
+ fprintf(IOSTREAM,"> %s data=[%s…]\n",qPrint(func),data_s);
s_indent++;
}
}
@@ -106,7 +108,7 @@ class Trace
{
s_indent--;
indent();
- fprintf(IOSTREAM,"< %s\n",m_func);
+ fprintf(IOSTREAM,"< %s\n",qPrint(m_func));
}
}
void trace(const char *fmt,...)
@@ -114,7 +116,7 @@ class Trace
if (Debug::isFlagSet(Debug::Markdown))
{
indent();
- fprintf(IOSTREAM,": %s: ",m_func);
+ fprintf(IOSTREAM,": %s: ",qPrint(m_func));
va_list args;
va_start(args,fmt);
vfprintf(IOSTREAM, fmt, args);
@@ -123,7 +125,7 @@ class Trace
}
private:
void indent() { for (int i=0;i<s_indent;i++) fputs(" ",IOSTREAM); }
- const char *m_func;
+ QCString m_func;
static int s_indent;
};
@@ -171,7 +173,7 @@ struct TableCell
bool colSpan;
};
-Markdown::Markdown(const char *fileName,int lineNr,int indentLevel)
+Markdown::Markdown(const QCString &fileName,int lineNr,int indentLevel)
: m_fileName(fileName), m_lineNr(lineNr), m_indentLevel(indentLevel)
{
using namespace std::placeholders;
@@ -215,10 +217,10 @@ inline int isNewline(const char *data)
// escape double quotes in string
static QCString escapeDoubleQuotes(const QCString &s)
{
- TRACE(s.data());
- if (s.isEmpty()) return "";
+ TRACE(s);
+ if (s.isEmpty()) return s;
GrowBuf growBuf;
- const char *p=s;
+ const char *p=s.data();
char c,pc='\0';
while ((c=*p++))
{
@@ -235,11 +237,11 @@ static QCString escapeDoubleQuotes(const QCString &s)
// escape characters that have a special meaning later on.
static QCString escapeSpecialChars(const QCString &s)
{
- TRACE(s.data());
- if (s.isEmpty()) return "";
+ TRACE(s);
+ if (s.isEmpty()) return s;
bool insideQuote=FALSE;
GrowBuf growBuf;
- const char *p=s;
+ const char *p=s.data();
char c,pc='\0';
while ((c=*p++))
{
@@ -261,11 +263,9 @@ static QCString escapeSpecialChars(const QCString &s)
static void convertStringFragment(QCString &result,const char *data,int size)
{
- TRACE(result.data());
+ TRACE(result);
if (size<0) size=0;
- result.resize(size+1);
- memcpy(result.rawData(),data,size);
- result.at(size)='\0';
+ result = QCString(data,(uint)size);
}
/** helper function to convert presence of left and/or right alignment markers
@@ -433,7 +433,7 @@ int Markdown::findEmphasisChar(const char *data, int size, char c, int c_size)
if ((data[i]=='\\' || data[i]=='@') && // command
data[i-1]!='\\' && data[i-1]!='@') // not escaped
{
- if (qstrncmp(&data[i+1],endBlockName,l)==0)
+ if (qstrncmp(&data[i+1],endBlockName.data(),l)==0)
{
break;
}
@@ -695,13 +695,13 @@ int Markdown::processHtmlTagWrite(const char *data,int offset,int size,bool doWr
{
if (data[i]=='/' && i<size-1 && data[i+1]=='>') // <bla/>
{
- //printf("Found htmlTag={%s}\n",QCString(data).left(i+2).data());
+ //printf("Found htmlTag={%s}\n",qPrint(QCString(data).left(i+2)));
if (doWrite) m_out.addStr(data,i+2);
return i+2;
}
else if (data[i]=='>') // <bla>
{
- //printf("Found htmlTag={%s}\n",QCString(data).left(i+1).data());
+ //printf("Found htmlTag={%s}\n",qPrint(QCString(data).left(i+1)));
if (doWrite) m_out.addStr(data,i+1);
return i+1;
}
@@ -721,7 +721,7 @@ int Markdown::processHtmlTagWrite(const char *data,int offset,int size,bool doWr
}
else if (!insideAttr && data[i]=='>') // found end of tag
{
- //printf("Found htmlTag={%s}\n",QCString(data).left(i+1).data());
+ //printf("Found htmlTag={%s}\n",qPrint(QCString(data).left(i+1)));
if (doWrite) m_out.addStr(data,i+1);
return i+1;
}
@@ -860,7 +860,7 @@ int Markdown::processLink(const char *data,int,int size)
if (i>=size) return 0; // premature end of comment -> no link
contentEnd=i;
convertStringFragment(content,data+contentStart,contentEnd-contentStart);
- //printf("processLink: content={%s}\n",content.data());
+ //printf("processLink: content={%s}\n",qPrint(content));
if (!isImageLink && content.isEmpty()) return 0; // no link text
i++; // skip over ]
@@ -909,7 +909,7 @@ int Markdown::processLink(const char *data,int,int size)
if (i>=size || data[i]=='\n') return 0;
convertStringFragment(link,data+linkStart,i-linkStart);
link = link.stripWhiteSpace();
- //printf("processLink: link={%s}\n",link.data());
+ //printf("processLink: link={%s}\n",qPrint(link));
if (link.isEmpty()) return 0;
if (link.at(link.length()-1)=='>') link=link.left(link.length()-1);
@@ -939,7 +939,7 @@ int Markdown::processLink(const char *data,int,int size)
if (data[titleEnd]==c) // found it
{
convertStringFragment(title,data+titleStart,titleEnd-titleStart);
- //printf("processLink: title={%s}\n",title.data());
+ //printf("processLink: title={%s}\n",qPrint(title));
}
else
{
@@ -966,7 +966,7 @@ int Markdown::processLink(const char *data,int,int size)
if (i>=size) return 0;
// extract link
convertStringFragment(link,data+linkStart,i-linkStart);
- //printf("processLink: link={%s}\n",link.data());
+ //printf("processLink: link={%s}\n",qPrint(link));
link = link.stripWhiteSpace();
if (link.isEmpty()) // shortcut link
{
@@ -979,11 +979,11 @@ int Markdown::processLink(const char *data,int,int size)
{
link = lr_it->second.link;
title = lr_it->second.title;
- //printf("processLink: ref: link={%s} title={%s}\n",link.data(),title.data());
+ //printf("processLink: ref: link={%s} title={%s}\n",qPrint(link),qPrint(title));
}
else // reference not found!
{
- //printf("processLink: ref {%s} do not exist\n",link.lower().data());
+ //printf("processLink: ref {%s} do not exist\n",link.qPrint(lower()));
return 0;
}
i++;
@@ -992,7 +992,7 @@ int Markdown::processLink(const char *data,int,int size)
{
QCString content_lower = content.lower();
auto lr_it = m_linkRefs.find(content_lower.str());
- //printf("processLink: minimal link {%s} lr=%p",content.data(),lr);
+ //printf("processLink: minimal link {%s} lr=%p",qPrint(content),lr);
if (lr_it!=m_linkRefs.end()) // found it
{
link = lr_it->second.link;
@@ -1068,16 +1068,16 @@ int Markdown::processLink(const char *data,int,int size)
m_out.addStr("@ref ");
if (!(Portable::isAbsolutePath(link) || isURL(link)))
{
- QFileInfo forg(link);
+ FileInfo forg(link.str());
if (forg.exists() && forg.isReadable())
{
- link = forg.absFilePath().data();
+ link = forg.absFilePath();
}
else if (!(forg.exists() && forg.isReadable()))
{
- QFileInfo fi(m_fileName);
- QCString mdFile = m_fileName.left(m_fileName.length()-fi.fileName().length()) + link;
- QFileInfo fmd(mdFile);
+ FileInfo fi(m_fileName.str());
+ QCString mdFile = m_fileName.left(m_fileName.length()-(uint)fi.fileName().length()) + link;
+ FileInfo fmd(mdFile.str());
if (fmd.exists() && fmd.isReadable())
{
link = fmd.absFilePath().data();
@@ -1111,12 +1111,12 @@ int Markdown::processLink(const char *data,int,int size)
}
m_out.addStr(">");
content = content.simplifyWhiteSpace();
- processInline(content,content.length());
+ processInline(content.data(),content.length());
m_out.addStr("</a>");
}
else // avoid link to e.g. F[x](y)
{
- //printf("no link for '%s'\n",link.data());
+ //printf("no link for '%s'\n",qPrint(link));
return 0;
}
}
@@ -1184,7 +1184,7 @@ int Markdown::processCodeSpan(const char *data, int /*offset*/, int size)
f_end--;
}
- //printf("found code span '%s'\n",QCString(data+f_begin).left(f_end-f_begin).data());
+ //printf("found code span '%s'\n",qPrint(QCString(data+f_begin).left(f_end-f_begin)));
/* real code span */
if (f_begin < f_end)
@@ -1226,7 +1226,7 @@ int Markdown::processSpecialCommand(const char *data, int offset, int size)
if ((data[i]=='\\' || data[i]=='@') && // command
data[i-1]!='\\' && data[i-1]!='@') // not escaped
{
- if (qstrncmp(&data[i+1],endBlockName,l)==0)
+ if (qstrncmp(&data[i+1],endBlockName.data(),l)==0)
{
//printf("found end at %d\n",i);
addStrEscapeUtf8Nbsp(data,i+1+l);
@@ -1363,7 +1363,7 @@ static int isLinkRef(const char *data,int size,
if (i>=size || data[i]!=']') return 0;
convertStringFragment(refid,data+refIdStart,i-refIdStart);
if (refid.isEmpty()) return 0;
- //printf(" isLinkRef: found refid='%s'\n",refid.data());
+ //printf(" isLinkRef: found refid='%s'\n",qPrint(refid));
i++;
if (i>=size || data[i]!=':') return 0;
i++;
@@ -1384,7 +1384,7 @@ static int isLinkRef(const char *data,int size,
if (i<size && data[i]=='>') i++;
if (linkStart==linkEnd) return 0; // empty link
convertStringFragment(link,data+linkStart,linkEnd-linkStart);
- //printf(" isLinkRef: found link='%s'\n",link.data());
+ //printf(" isLinkRef: found link='%s'\n",qPrint(link));
if (link=="@ref" || link=="\\ref")
{
int argStart=i;
@@ -1429,7 +1429,7 @@ static int isLinkRef(const char *data,int size,
{
convertStringFragment(title,data+titleStart,end-titleStart);
}
- //printf(" title found: '%s'\n",title.data());
+ //printf(" title found: '%s'\n",qPrint(title));
}
while (i<size && data[i]==' ') i++;
//printf("end of isLinkRef: i=%d size=%d data[i]='%c' eol=%d\n",
@@ -1469,7 +1469,7 @@ static int isHRuler(const char *data,int size)
static QCString extractTitleId(QCString &title, int level)
{
- TRACE(title.data());
+ TRACE(title);
// match e.g. '{#id-b11} ' and capture 'id-b11'
static const reg::Ex r2(R"({#(\a[\w-]*)}\s*$)");
reg::Match match;
@@ -1478,7 +1478,7 @@ static QCString extractTitleId(QCString &title, int level)
{
std::string id = match[1].str();
title = title.left((int)match.position());
- //printf("found match id='%s' title=%s\n",id.c_str(),title.data());
+ //printf("found match id='%s' title=%s\n",id.c_str(),qPrint(title));
return id;
}
if ((level > 0) && (level <= Config_getInt(TOC_INCLUDE_HEADINGS)))
@@ -1486,10 +1486,10 @@ static QCString extractTitleId(QCString &title, int level)
static AtomicInt autoId { 0 };
QCString id;
id.sprintf("autotoc_md%d",autoId++);
- //printf("auto-generated id='%s' title='%s'\n",id.data(),title.data());
+ //printf("auto-generated id='%s' title='%s'\n",qPrint(id),qPrint(title));
return id;
}
- //printf("no id found in title '%s'\n",title.data());
+ //printf("no id found in title '%s'\n",qPrint(title));
return "";
}
@@ -1639,7 +1639,7 @@ static int computeIndentExcludingListMarkers(const char *data,int size)
}
indent++,i++;
}
- //printf("{%s}->%d\n",QCString(data).left(size).data(),indent);
+ //printf("{%s}->%d\n",QCString(data).qPrint(left(size)),indent);
return indent;
}
@@ -1729,8 +1729,8 @@ static bool isCodeBlock(const char *data,int offset,int size,int &indent)
{
//printf(" positions: nl_pos=[%d,%d,%d] line[-2]='%s' line[-1]='%s'\n",
// nl_pos[0],nl_pos[1],nl_pos[2],
- // QCString(data+nl_pos[1]).left(nl_pos[0]-nl_pos[1]-1).data(),
- // QCString(data+nl_pos[2]).left(nl_pos[1]-nl_pos[2]-1).data());
+ // qPrint(QCString(data+nl_pos[1]).left(nl_pos[0]-nl_pos[1]-1)),
+ // qPrint(QCString(data+nl_pos[2]).left(nl_pos[1]-nl_pos[2]-1)));
// check that line -1 is empty
if (!isEmptyLine(data+nl_pos[1],nl_pos[0]-nl_pos[1]-1))
@@ -2175,7 +2175,7 @@ int Markdown::writeCodeBlock(const char *data,int size,int refIndent)
{
TRACE(data);
int i=0,end;
- //printf("writeCodeBlock: data={%s}\n",QCString(data).left(size).data());
+ //printf("writeCodeBlock: data={%s}\n",qPrint(QCString(data).left(size)));
// no need for \ilinebr here as the previous line was empty and was skipped
m_out.addStr("@verbatim\n");
int emptyLines=0;
@@ -2188,7 +2188,7 @@ int Markdown::writeCodeBlock(const char *data,int size,int refIndent)
int indent=0;
while (j<end && data[j]==' ') j++,indent++;
//printf("j=%d end=%d indent=%d refIndent=%d tabSize=%d data={%s}\n",
- // j,end,indent,refIndent,Config_getInt(TAB_SIZE),QCString(data+i).left(end-i-1).data());
+ // j,end,indent,refIndent,Config_getInt(TAB_SIZE),qPrint(QCString(data+i).left(end-i-1)));
if (j==end-1) // empty line
{
emptyLines++;
@@ -2252,10 +2252,10 @@ void Markdown::findEndOfLine(const char *data,int size,
data[end-1]!='\\' && data[end-1]!='@'
)
{
- if (qstrncmp(&data[end+1],endBlockName,l)==0)
+ if (qstrncmp(&data[end+1],endBlockName.data(),l)==0)
{
// found end marker, skip over this block
- //printf("feol.block m_out={%s}\n",QCString(data+i).left(end+l+1-i).data());
+ //printf("feol.block m_out={%s}\n",qPrint(QCString(data+i).left(end+l+1-i)));
end = end + l + 2;
break;
}
@@ -2295,7 +2295,7 @@ void Markdown::findEndOfLine(const char *data,int size,
}
}
if (j>0) end+=j-1;
- //printf("findEndOfLine pi=%d i=%d end=%d {%s}\n",pi,i,end,QCString(data+i).left(end-i).data());
+ //printf("findEndOfLine pi=%d i=%d end=%d {%s}\n",pi,i,end,qPrint(QCString(data+i).left(end-i)));
}
void Markdown::writeFencedCodeBlock(const char *data,const char *lng,
@@ -2315,7 +2315,7 @@ void Markdown::writeFencedCodeBlock(const char *data,const char *lng,
QCString Markdown::processQuotations(const QCString &s,int refIndent)
{
- TRACE(s.data());
+ TRACE(s);
m_out.clear();
const char *data = s.data();
int size = s.length();
@@ -2331,7 +2331,7 @@ QCString Markdown::processQuotations(const QCString &s,int refIndent)
{
if (isFencedCodeBlock(data+pi,size-pi,refIndent,lang,blockStart,blockEnd,blockOffset))
{
- writeFencedCodeBlock(data+pi,lang,blockStart,blockEnd);
+ writeFencedCodeBlock(data+pi,lang.data(),blockStart,blockEnd);
i=pi+blockOffset;
pi=-1;
end=i+1;
@@ -2367,14 +2367,14 @@ QCString Markdown::processQuotations(const QCString &s,int refIndent)
m_out.addChar(0);
//printf("Process quotations\n---- input ----\n%s\n---- output ----\n%s\n------------\n",
- // s.data(),m_out.get());
+ // qPrint(s),m_out.get());
return m_out.get();
}
QCString Markdown::processBlocks(const QCString &s,int indent)
{
- TRACE(s.data());
+ TRACE(s);
m_out.clear();
const char *data = s.data();
int size = s.length();
@@ -2439,7 +2439,7 @@ QCString Markdown::processBlocks(const QCString &s,int indent)
if ((data[i]=='\\' || data[i]=='@') && // command
data[i-1]!='\\' && data[i-1]!='@') // not escaped
{
- if (qstrncmp(&data[i+1],endBlockName,l)==0)
+ if (qstrncmp(&data[i+1],endBlockName.data(),l)==0)
{
m_out.addChar(data[i]);
m_out.addStr(endBlockName);
@@ -2459,7 +2459,7 @@ QCString Markdown::processBlocks(const QCString &s,int indent)
QCString header;
convertStringFragment(header,data+pi,i-pi-1);
id = extractTitleId(header, level);
- //printf("header='%s' is='%s'\n",header.data(),id.data());
+ //printf("header='%s' is='%s'\n",qPrint(header),qPrint(id));
if (!header.isEmpty())
{
if (!id.isEmpty())
@@ -2489,7 +2489,7 @@ QCString Markdown::processBlocks(const QCString &s,int indent)
else if ((ref=isLinkRef(data+pi,size-pi,id,link,title)))
{
//printf("found link ref: id='%s' link='%s' title='%s'\n",
- // id.data(),link.data(),title.data());
+ // qPrint(id),qPrint(link),qPrint(title));
m_linkRefs.insert({id.lower().str(),LinkRef(link,title)});
i=ref+pi;
pi=-1;
@@ -2498,8 +2498,8 @@ QCString Markdown::processBlocks(const QCString &s,int indent)
else if (isFencedCodeBlock(data+pi,size-pi,indent,lang,blockStart,blockEnd,blockOffset))
{
//printf("Found FencedCodeBlock lang='%s' start=%d end=%d code={%s}\n",
- // lang.data(),blockStart,blockEnd,QCString(data+pi+blockStart).left(blockEnd-blockStart).data());
- writeFencedCodeBlock(data+pi,lang,blockStart,blockEnd);
+ // qPrint(lang),blockStart,blockEnd,QCString(data+pi+blockStart).left(blockEnd-blockStart).data());
+ writeFencedCodeBlock(data+pi,lang.data(),blockStart,blockEnd);
i=pi+blockOffset;
pi=-1;
end=i+1;
@@ -2534,7 +2534,7 @@ QCString Markdown::processBlocks(const QCString &s,int indent)
if (isLinkRef(data+pi,size-pi,id,link,title))
{
//printf("found link ref: id='%s' link='%s' title='%s'\n",
- // id.data(),link.data(),title.data());
+ // qPrint(id),qPrint(link),qPrint(title));
m_linkRefs.insert({id.lower().str(),LinkRef(link,title)});
}
else
@@ -2550,7 +2550,7 @@ QCString Markdown::processBlocks(const QCString &s,int indent)
/** returns TRUE if input string docs starts with \@page or \@mainpage command */
static bool isExplicitPage(const QCString &docs)
{
- TRACE(docs.data());
+ TRACE(docs);
int i=0;
const char *data = docs.data();
if (data)
@@ -2573,7 +2573,7 @@ static bool isExplicitPage(const QCString &docs)
QCString Markdown::extractPageTitle(QCString &docs,QCString &id, int &prepend)
{
- TRACE(docs.data());
+ TRACE(docs);
// first first non-empty line
prepend = 0;
QCString title;
@@ -2616,13 +2616,13 @@ QCString Markdown::extractPageTitle(QCString &docs,QCString &id, int &prepend)
docs=docs_org;
id = extractTitleId(title, 0);
}
- //printf("extractPageTitle(title='%s' docs='%s' id='%s')\n",title.data(),docs.data(),id.data());
+ //printf("extractPageTitle(title='%s' docs='%s' id='%s')\n",qPrint(title),qPrint(docs),qPrint(id));
return title;
}
QCString Markdown::detab(const QCString &s,int &refIndent)
{
- TRACE(s.data());
+ TRACE(s);
int tabSize = Config_getInt(TAB_SIZE);
int size = s.length();
m_out.clear();
@@ -2657,23 +2657,21 @@ QCString Markdown::detab(const QCString &s,int &refIndent)
if (c<0 && i<size) // multibyte sequence
{
// special handling of the UTF-8 nbsp character 0xC2 0xA0
- if ((uchar)c == 0xC2 && (uchar)(data[i]) == 0xA0)
+ int nb = isUTF8NonBreakableSpace(data);
+ if (nb>0)
{
m_out.addStr(g_doxy_nsbp);
- i++;
+ i+=nb-1;
}
else
{
- m_out.addChar(c);
- m_out.addChar(data[i++]); // >= 2 bytes
- if (((uchar)c&0xE0)==0xE0 && i<size)
- {
- m_out.addChar(data[i++]); // 3 bytes
- }
- if (((uchar)c&0xF0)==0xF0 && i<size)
+ int bytes = getUTF8CharNumBytes(c);
+ for (int j=0;j<bytes-1 && c;j++)
{
- m_out.addChar(data[i++]); // 4 byres
+ m_out.addChar(c);
+ c = data[i++];
}
+ m_out.addChar(c);
}
}
else
@@ -2701,19 +2699,19 @@ QCString Markdown::process(const QCString &input, int &startNewlines)
QCString s = input;
if (s.at(s.length()-1)!='\n') s += "\n"; // see PR #6766
s = detab(s,refIndent);
- //printf("======== DeTab =========\n---- output -----\n%s\n---------\n",s.data());
+ //printf("======== DeTab =========\n---- output -----\n%s\n---------\n",qPrint(s));
// then process quotation blocks (as these may contain other blocks)
s = processQuotations(s,refIndent);
- //printf("======== Quotations =========\n---- output -----\n%s\n---------\n",s.data());
+ //printf("======== Quotations =========\n---- output -----\n%s\n---------\n",qPrint(s));
// then process block items (headers, rules, and code blocks, references)
s = processBlocks(s,refIndent);
- //printf("======== Blocks =========\n---- output -----\n%s\n---------\n",s.data());
+ //printf("======== Blocks =========\n---- output -----\n%s\n---------\n",qPrint(s));
// finally process the inline markup (links, emphasis and code spans)
m_out.clear();
- processInline(s,s.length());
+ processInline(s.data(),s.length());
m_out.addChar(0);
Debug::print(Debug::Markdown,0,"======== Markdown =========\n---- input ------- \n%s\n---- output -----\n%s\n=========\n",qPrint(input),qPrint(m_out.get()));
@@ -2729,7 +2727,7 @@ QCString Markdown::process(const QCString &input, int &startNewlines)
if (p>result.data())
{
// strip part of the input
- result = result.mid(p-result.data());
+ result = result.mid(static_cast<int>(p-result.data()));
}
return result;
}
@@ -2738,8 +2736,9 @@ QCString Markdown::process(const QCString &input, int &startNewlines)
QCString markdownFileNameToId(const QCString &fileName)
{
- TRACE(fileName.data());
- QCString baseFn = stripFromPath(QFileInfo(fileName).absFilePath().utf8());
+ TRACE(fileName);
+ std::string absFileName = FileInfo(fileName.str()).absFilePath();
+ QCString baseFn = stripFromPath(absFileName.c_str());
int i = baseFn.findRev('.');
if (i!=-1) baseFn = baseFn.left(i);
QCString baseName = baseFn;
@@ -2769,7 +2768,7 @@ MarkdownOutlineParser::~MarkdownOutlineParser()
{
}
-void MarkdownOutlineParser::parseInput(const char *fileName,
+void MarkdownOutlineParser::parseInput(const QCString &fileName,
const char *fileBuf,
const std::shared_ptr<Entry> &root,
ClangTUParser* /*clangParser*/)
@@ -2787,7 +2786,7 @@ void MarkdownOutlineParser::parseInput(const char *fileName,
if (id.startsWith("autotoc_md")) id = "";
int indentLevel=title.isEmpty() ? 0 : -1;
markdown.setIndentLevel(indentLevel);
- QCString fn = QFileInfo(fileName).fileName().utf8();
+ QCString fn = FileInfo(fileName.str()).fileName();
QCString titleFn = stripExtensionGeneral(fn,getFileNameExtension(fn));
QCString mdfileAsMainPage = Config_getString(USE_MDFILE_AS_MAINPAGE);
bool wasEmpty = id.isEmpty();
@@ -2796,8 +2795,8 @@ void MarkdownOutlineParser::parseInput(const char *fileName,
{
if (!mdfileAsMainPage.isEmpty() &&
(fn==mdfileAsMainPage || // name reference
- QFileInfo(fileName).absFilePath()==
- QFileInfo(mdfileAsMainPage).absFilePath()) // file reference with path
+ FileInfo(fileName.str()).absFilePath()==
+ FileInfo(mdfileAsMainPage.str()).absFilePath()) // file reference with path
)
{
docs.prepend("@anchor " + id + "\\ilinebr ");
@@ -2854,7 +2853,7 @@ void MarkdownOutlineParser::parseInput(const char *fileName,
p->commentScanner.leaveFile(fileName,lineNr);
}
-void MarkdownOutlineParser::parsePrototype(const char *text)
+void MarkdownOutlineParser::parsePrototype(const QCString &text)
{
Doxygen::parserManager->getOutlineParser("*.cpp")->parsePrototype(text);
}
diff --git a/src/markdown.h b/src/markdown.h
index dd4ff73..afed003 100644
--- a/src/markdown.h
+++ b/src/markdown.h
@@ -18,7 +18,7 @@
#include <functional>
-#include <qcstring.h>
+#include "qcstring.h"
#include "parserintf.h"
#include "growbuf.h"
@@ -32,7 +32,7 @@ QCString markdownFileNameToId(const QCString &fileName);
class Markdown
{
public:
- Markdown(const char *fileName,int lineNr,int indentLevel=0);
+ Markdown(const QCString &fileName,int lineNr,int indentLevel=0);
QCString process(const QCString &input, int &startNewlines);
QCString extractPageTitle(QCString &docs,QCString &id,int &prepend);
void setIndentLevel(int level) { m_indentLevel = level; }
@@ -73,7 +73,7 @@ class Markdown
private:
struct LinkRef
{
- LinkRef(const char *l,const char *t) : link(l), title(t) {}
+ LinkRef(const QCString &l,const QCString &t) : link(l), title(t) {}
QCString link;
QCString title;
};
@@ -93,12 +93,12 @@ class MarkdownOutlineParser : public OutlineParserInterface
public:
MarkdownOutlineParser();
virtual ~MarkdownOutlineParser();
- void parseInput(const char *fileName,
+ void parseInput(const QCString &fileName,
const char *fileBuf,
const std::shared_ptr<Entry> &root,
ClangTUParser *clangParser);
bool needsPreprocessing(const QCString &) const { return FALSE; }
- void parsePrototype(const char *text);
+ void parsePrototype(const QCString &text);
private:
struct Private;
std::unique_ptr<Private> p;
diff --git a/src/memberdef.cpp b/src/memberdef.cpp
index 81520a2..dc5d095 100644
--- a/src/memberdef.cpp
+++ b/src/memberdef.cpp
@@ -50,11 +50,11 @@
class MemberDefImpl : public DefinitionMixin<MemberDefMutable>
{
public:
- MemberDefImpl(const char *defFileName,int defLine,int defColumn,
- const char *type,const char *name,const char *args,
- const char *excp,Protection prot,Specifier virt,bool stat,
+ MemberDefImpl(const QCString &defFileName,int defLine,int defColumn,
+ const QCString &type,const QCString &name,const QCString &args,
+ const QCString &excp,Protection prot,Specifier virt,bool stat,
Relationship related,MemberType t,const ArgumentList &tal,
- const ArgumentList &al,const char *metaData);
+ const ArgumentList &al,const QCString &metaData);
virtual ~MemberDefImpl();
virtual DefType definitionType() const { return TypeMember; }
@@ -65,13 +65,13 @@ class MemberDefImpl : public DefinitionMixin<MemberDefMutable>
virtual QCString getOutputFileBase() const;
virtual QCString getReference() const;
virtual QCString anchor() const;
- virtual const char *declaration() const;
- virtual const char *definition() const;
- virtual const char *typeString() const;
- virtual const char *argsString() const;
- virtual const char *excpString() const;
- virtual const char *bitfieldString() const;
- virtual const char *extraTypeChars() const;
+ virtual QCString declaration() const;
+ virtual QCString definition() const;
+ virtual QCString typeString() const;
+ virtual QCString argsString() const;
+ virtual QCString excpString() const;
+ virtual QCString bitfieldString() const;
+ virtual QCString extraTypeChars() const;
virtual const QCString &initializer() const;
virtual int initializerLines() const;
virtual uint64 getMemberSpecifiers() const;
@@ -82,10 +82,10 @@ class MemberDefImpl : public DefinitionMixin<MemberDefMutable>
virtual const NamespaceDef* getNamespaceDef() const;
virtual const GroupDef *getGroupDef() const;
virtual ClassDef *accessorClass() const;
- virtual const char *getReadAccessor() const;
- virtual const char *getWriteAccessor() const;
+ virtual QCString getReadAccessor() const;
+ virtual QCString getWriteAccessor() const;
virtual Grouping::GroupPri_t getGroupPri() const;
- virtual const char *getGroupFileName() const;
+ virtual QCString getGroupFileName() const;
virtual int getGroupStartLine() const;
virtual bool getGroupHasDocs() const;
virtual QCString qualifiedName() const;
@@ -93,7 +93,7 @@ class MemberDefImpl : public DefinitionMixin<MemberDefMutable>
virtual Protection protection() const;
virtual Specifier virtualness(int count=0) const;
virtual MemberType memberType() const;
- virtual QCString memberTypeName() const;
+ virtual QCString memberTypeName() const;
virtual bool isSignal() const;
virtual bool isSlot() const;
virtual bool isVariable() const;
@@ -227,8 +227,9 @@ class MemberDefImpl : public DefinitionMixin<MemberDefMutable>
virtual const MemberDef *categoryRelation() const;
virtual QCString displayName(bool=TRUE) const;
virtual QCString getDeclType() const;
- virtual void getLabels(QStrList &sl,const Definition *container) const;
+ virtual StringVector getLabels(const Definition *container) const;
virtual const ArgumentList &typeConstraints() const;
+ virtual QCString requiresClause() const;
virtual QCString documentation() const;
virtual QCString briefDescription(bool abbr=FALSE) const;
virtual QCString fieldType() const;
@@ -237,28 +238,28 @@ class MemberDefImpl : public DefinitionMixin<MemberDefMutable>
virtual int getDeclLine() const;
virtual int getDeclColumn() const;
virtual void setMemberType(MemberType t);
- virtual void setDefinition(const char *d);
+ virtual void setDefinition(const QCString &d);
virtual void setFileDef(const FileDef *fd);
virtual void setAnchor();
virtual void setProtection(Protection p);
virtual void setMemberSpecifiers(uint64 s);
virtual void mergeMemberSpecifiers(uint64 s);
- virtual void setInitializer(const char *i);
- virtual void setBitfields(const char *s);
+ virtual void setInitializer(const QCString &i);
+ virtual void setBitfields(const QCString &s);
virtual void setMaxInitLines(int lines);
virtual void setMemberClass(const ClassDef *cd);
virtual void setSectionList(const Definition *container,const MemberList *sl);
virtual void setGroupDef(const GroupDef *gd,Grouping::GroupPri_t pri,
const QCString &fileName,int startLine,bool hasDocs,
MemberDef *member=0);
- virtual void setReadAccessor(const char *r);
- virtual void setWriteAccessor(const char *w);
+ virtual void setReadAccessor(const QCString &r);
+ virtual void setWriteAccessor(const QCString &w);
virtual void setTemplateSpecialization(bool b);
virtual void makeRelated();
virtual void makeForeign();
virtual void setInheritsDocsFrom(const MemberDef *md);
virtual void setTagInfo(const TagInfo *i);
- virtual void setArgsString(const char *as);
+ virtual void setArgsString(const QCString &as);
virtual void setReimplements(const MemberDef *md);
virtual void insertReimplementedBy(const MemberDef *md);
virtual void setRelatedAlso(ClassDef *cd);
@@ -267,7 +268,7 @@ class MemberDefImpl : public DefinitionMixin<MemberDefMutable>
virtual void setEnumClassScope(const ClassDef *cd);
virtual void setDocumentedEnumValues(bool value);
virtual void setAnonymousEnumType(const MemberDef *md);
- virtual bool addExample(const char *anchor,const char *name,const char *file);
+ virtual bool addExample(const QCString &anchor,const QCString &name,const QCString &file);
virtual void setPrototype(bool p,const QCString &df,int line, int column);
virtual void setExplicitExternal(bool b,const QCString &df,int line,int column);
virtual void setDeclFile(const QCString &df,int line,int column);
@@ -275,8 +276,8 @@ class MemberDefImpl : public DefinitionMixin<MemberDefMutable>
virtual void moveDeclArgumentList(std::unique_ptr<ArgumentList> al);
virtual void setDefinitionTemplateParameterLists(const ArgumentLists &lists);
virtual void setTypeConstraints(const ArgumentList &al);
- virtual void setType(const char *t);
- virtual void setAccessorType(ClassDef *cd,const char *t);
+ virtual void setType(const QCString &t);
+ virtual void setAccessorType(ClassDef *cd,const QCString &t);
virtual void setNamespace(const NamespaceDef *nd);
virtual void setMemberGroup(MemberGroup *grp);
virtual void setMemberGroupId(int id);
@@ -300,22 +301,23 @@ class MemberDefImpl : public DefinitionMixin<MemberDefMutable>
virtual void copyArgumentNames(const MemberDef *bmd);
virtual void setCategory(ClassDef *);
virtual void setCategoryRelation(const MemberDef *);
- virtual void setDocumentation(const char *d,const char *docFile,int docLine,bool stripWhiteSpace=TRUE);
- virtual void setBriefDescription(const char *b,const char *briefFile,int briefLine);
- virtual void setInbodyDocumentation(const char *d,const char *inbodyFile,int inbodyLine);
+ virtual void setDocumentation(const QCString &d,const QCString &docFile,int docLine,bool stripWhiteSpace=TRUE);
+ virtual void setBriefDescription(const QCString &b,const QCString &briefFile,int briefLine);
+ virtual void setInbodyDocumentation(const QCString &d,const QCString &inbodyFile,int inbodyLine);
virtual void setHidden(bool b);
+ virtual void setRequiresClause(const QCString &req);
virtual void incrementFlowKeyWordCount();
virtual void writeDeclaration(OutputList &ol,
const ClassDef *cd,const NamespaceDef *nd,const FileDef *fd,const GroupDef *gd,
- bool inGroup, const ClassDef *inheritFrom=0,const char *inheritId=0) const;
+ bool inGroup, const ClassDef *inheritFrom=0,const QCString &inheritId=QCString()) const;
virtual void writeDocumentation(const MemberList *ml,int memCount,int memTotal,OutputList &ol,
- const char *scopeName,const Definition *container,
+ const QCString &scopeName,const Definition *container,
bool inGroup,bool showEnumValues=FALSE,bool
showInline=FALSE) const;
virtual void writeMemberDocSimple(OutputList &ol,const Definition *container) const;
virtual void writeEnumDeclaration(OutputList &typeDecl,
const ClassDef *cd,const NamespaceDef *nd,const FileDef *fd,const GroupDef *gd) const;
- virtual void writeTagFile(FTextStream &) const;
+ virtual void writeTagFile(TextStream &) const;
virtual void warnIfUndocumented() const;
virtual void warnIfUndocumentedParams() const;
virtual void detectUndocumentedParams(bool hasParamCommand,bool hasReturnCommand) const;
@@ -344,6 +346,8 @@ class MemberDefImpl : public DefinitionMixin<MemberDefMutable>
const QCString &cname) const;
void _writeCategoryRelation(OutputList &ol) const;
void _writeTagData(const DefType) const;
+ void _writeTemplatePrefix(OutputList &ol, const Definition *def,
+ const ArgumentList &al, bool writeReqClause=true) const;
static int s_indentLevel;
@@ -360,11 +364,11 @@ class MemberDefImpl : public DefinitionMixin<MemberDefMutable>
uchar m_isDestructorCached; // 1 = not cached, 1=FALSE, 2=TRUE
};
-MemberDefMutable *createMemberDef(const char *defFileName,int defLine,int defColumn,
- const char *type,const char *name,const char *args,
- const char *excp,Protection prot,Specifier virt,bool stat,
+MemberDefMutable *createMemberDef(const QCString &defFileName,int defLine,int defColumn,
+ const QCString &type,const QCString &name,const QCString &args,
+ const QCString &excp,Protection prot,Specifier virt,bool stat,
Relationship related,MemberType t,const ArgumentList &tal,
- const ArgumentList &al,const char *metaData)
+ const ArgumentList &al,const QCString &metaData)
{
return new MemberDefImpl(defFileName,defLine,defColumn,type,name,args,excp,prot,virt,
stat,related,t,tal,al,metaData);
@@ -397,19 +401,19 @@ class MemberDefAliasImpl : public DefinitionAliasMixin<MemberDef>
{ return getMdAlias()->getReference(); }
virtual QCString anchor() const
{ return getMdAlias()->anchor(); }
- virtual const char *declaration() const
+ virtual QCString declaration() const
{ return getMdAlias()->declaration(); }
- virtual const char *definition() const
+ virtual QCString definition() const
{ return getMdAlias()->definition(); }
- virtual const char *typeString() const
+ virtual QCString typeString() const
{ return getMdAlias()->typeString(); }
- virtual const char *argsString() const
+ virtual QCString argsString() const
{ return getMdAlias()->argsString(); }
- virtual const char *excpString() const
+ virtual QCString excpString() const
{ return getMdAlias()->excpString(); }
- virtual const char *bitfieldString() const
+ virtual QCString bitfieldString() const
{ return getMdAlias()->bitfieldString(); }
- virtual const char *extraTypeChars() const
+ virtual QCString extraTypeChars() const
{ return getMdAlias()->extraTypeChars(); }
virtual const QCString &initializer() const
{ return getMdAlias()->initializer(); }
@@ -429,15 +433,15 @@ class MemberDefAliasImpl : public DefinitionAliasMixin<MemberDef>
{ return getMdAlias()->getNamespaceDef(); }
virtual const ClassDef *accessorClass() const
{ return getMdAlias()->accessorClass(); }
- virtual const char *getReadAccessor() const
+ virtual QCString getReadAccessor() const
{ return getMdAlias()->getReadAccessor(); }
- virtual const char *getWriteAccessor() const
+ virtual QCString getWriteAccessor() const
{ return getMdAlias()->getWriteAccessor(); }
virtual const GroupDef *getGroupDef() const
{ return getMdAlias()->getGroupDef(); }
virtual Grouping::GroupPri_t getGroupPri() const
{ return getMdAlias()->getGroupPri(); }
- virtual const char *getGroupFileName() const
+ virtual QCString getGroupFileName() const
{ return getMdAlias()->getGroupFileName(); }
virtual int getGroupStartLine() const
{ return getMdAlias()->getGroupStartLine(); }
@@ -717,8 +721,8 @@ class MemberDefAliasImpl : public DefinitionAliasMixin<MemberDef>
{ return getMdAlias()->displayName(b); }
virtual QCString getDeclType() const
{ return getMdAlias()->getDeclType(); }
- virtual void getLabels(QStrList &sl,const Definition *container) const
- { return getMdAlias()->getLabels(sl,container); }
+ virtual StringVector getLabels(const Definition *container) const
+ { return getMdAlias()->getLabels(container); }
virtual const ArgumentList &typeConstraints() const
{ return getMdAlias()->typeConstraints(); }
virtual QCString documentation() const
@@ -735,6 +739,8 @@ class MemberDefAliasImpl : public DefinitionAliasMixin<MemberDef>
{ return getMdAlias()->getDeclLine(); }
virtual int getDeclColumn() const
{ return getMdAlias()->getDeclColumn(); }
+ virtual QCString requiresClause() const
+ { return getMdAlias()->requiresClause(); }
virtual void warnIfUndocumented() const {}
virtual void warnIfUndocumentedParams() const {}
@@ -746,7 +752,7 @@ class MemberDefAliasImpl : public DefinitionAliasMixin<MemberDef>
virtual void writeDeclaration(OutputList &ol,
const ClassDef *cd,const NamespaceDef *nd,const FileDef *fd,const GroupDef *gd,
- bool inGroup, const ClassDef *inheritFrom=0,const char *inheritId=0) const
+ bool inGroup, const ClassDef *inheritFrom=0,const QCString &inheritId=QCString()) const
{
getMdAlias()->writeDeclaration(ol,cd,nd,fd,gd,inGroup,inheritFrom,inheritId);
}
@@ -763,7 +769,7 @@ class MemberDefAliasImpl : public DefinitionAliasMixin<MemberDef>
MemberDef *createMemberDefAlias(const Definition *newScope,const MemberDef *aliasMd)
{
MemberDef *amd = new MemberDefAliasImpl(newScope,aliasMd);
- //printf("amd: name=%s displayName=%s\n",amd->name().data(),amd->displayName().data());
+ //printf("amd: name=%s displayName=%s\n",qPrint(amd->name()),qPrint(amd->displayName()));
return amd;
}
@@ -792,18 +798,18 @@ static QCString addTemplateNames(const QCString &s,const QCString &n,const QCStr
uint j=clRealName.length()+i;
if (s.length()==j || (s.at(j)!='<' && !isId(s.at(j))))
{ // add template names
- //printf("Adding %s+%s\n",clRealName.data(),t.data());
+ //printf("Adding %s+%s\n",qPrint(clRealName),qPrint(t));
result+=clRealName+t;
}
else
{ // template names already present
- //printf("Adding %s\n",clRealName.data());
+ //printf("Adding %s\n",qPrint(clRealName));
result+=clRealName;
}
p=i+clRealName.length();
}
result+=s.right(s.length()-p);
- //printf("addTemplateNames(%s,%s,%s)=%s\n",s.data(),n.data(),t.data(),result.data());
+ //printf("addTemplateNames(%s,%s,%s)=%s\n",qPrint(s),qPrint(n),qPrint(t),qPrint(result));
return result;
}
@@ -844,7 +850,7 @@ static bool writeDefArgumentList(OutputList &ol,const Definition *scope,const Me
{
const ArgumentList &defArgList=(md->isDocsForDefinition()) ?
md->argumentList() : md->declArgumentList();
- //printf("writeDefArgumentList '%s' isDocsForDefinition()=%d\n",md->name().data(),md->isDocsForDefinition());
+ //printf("writeDefArgumentList '%s' isDocsForDefinition()=%d\n",qPrint(md->name()),md->isDocsForDefinition());
if (!defArgList.hasParameters() || md->isProperty() || md->isTypedef())
{
return FALSE; // member has no function like argument list
@@ -877,7 +883,7 @@ static bool writeDefArgumentList(OutputList &ol,const Definition *scope,const Me
ol.endMemberDocName();
}
ol.popGeneratorState();
- //printf("===> name=%s isDefine=%d\n",md->name().data(),md->isDefine());
+ //printf("===> name=%s isDefine=%d\n",qPrint(md->name()),md->isDefine());
QCString cName;
if (scope)
@@ -888,20 +894,20 @@ static bool writeDefArgumentList(OutputList &ol,const Definition *scope,const Me
if (il!=-1 && ir!=-1 && ir>il)
{
cName=cName.mid(il,ir-il+1);
- //printf("1. cName=%s\n",cName.data());
+ //printf("1. cName=%s\n",qPrint(cName));
}
else if (scope->definitionType()==Definition::TypeClass)
{
cName=tempArgListToString((toClassDef(scope))->templateArguments(),
scope->getLanguage());
- //printf("2. cName=%s\n",cName.data());
+ //printf("2. cName=%s\n",qPrint(cName));
}
else // no template specifier
{
cName.resize(0);
}
}
- //printf("~~~ %s cName=%s\n",md->name().data(),cName.data());
+ //printf("~~~ %s cName=%s\n",qPrint(md->name()),qPrint(cName));
bool first=TRUE;
bool paramTypeStarted=FALSE;
@@ -912,7 +918,7 @@ static bool writeDefArgumentList(OutputList &ol,const Definition *scope,const Me
Argument a = *alIt;
if (isDefine || first)
{
- ol.startParameterType(first,0);
+ ol.startParameterType(first,QCString());
paramTypeStarted=TRUE;
if (isDefine)
{
@@ -991,7 +997,7 @@ static bool writeDefArgumentList(OutputList &ol,const Definition *scope,const Me
QCString key;
if (md->isObjCMethod() && a.attrib.length()>=2)
{
- //printf("Found parameter keyword %s\n",a.attrib.data());
+ //printf("Found parameter keyword %s\n",a.qPrint(attrib));
// strip [ and ]
key=a.attrib.mid(1,a.attrib.length()-2);
if (key!=",") key+=":"; // for normal keywords add colon
@@ -1023,7 +1029,7 @@ static bool writeDefArgumentList(OutputList &ol,const Definition *scope,const Me
if (first) ol.startParameterName(defArgList.size()<2);
ol.endParameterName(TRUE,defArgList.size()<2,!md->isObjCMethod());
ol.popGeneratorState();
- if (md->extraTypeChars())
+ if (!md->extraTypeChars().isEmpty())
{
ol.docify(md->extraTypeChars());
}
@@ -1061,7 +1067,7 @@ static void writeExceptionListImpl(
OutputList &ol, const ClassDef *cd, const MemberDef *md, QCString const& exception)
{
// this is ordinary exception spec - there must be a '('
- //printf("exception='%s'\n",exception.data());
+ //printf("exception='%s'\n",qPrint(exception));
int index = exception.find('(');
if (index!=-1)
{
@@ -1072,7 +1078,7 @@ static void writeExceptionListImpl(
++comma; // include comma
linkifyText(TextGeneratorOLImpl(ol),cd,md->getBodyDef(),md,
exception.mid(index,comma-index));
- ol.exceptionEntry(0,false);
+ ol.exceptionEntry(QCString(),false);
index=comma;
comma = exception.find(',', index);
}
@@ -1081,7 +1087,7 @@ static void writeExceptionListImpl(
{
QCString type=removeRedundantWhiteSpace(exception.mid(index,close-index));
linkifyText(TextGeneratorOLImpl(ol),cd,md->getBodyDef(),md,type);
- ol.exceptionEntry(0,true);
+ ol.exceptionEntry(QCString(),true);
}
else
{
@@ -1119,26 +1125,6 @@ static void writeExceptionList(OutputList &ol, const ClassDef *cd, const MemberD
}
}
-static void writeTemplatePrefix(OutputList &ol,const ArgumentList &al)
-{
- ol.docify("template<");
- for (auto it = al.begin(); it!=al.end();)
- {
- Argument a = *it;
- ol.docify(a.type);
- ol.docify(" ");
- ol.docify(a.name);
- if (a.defval.length()!=0)
- {
- ol.docify(" = ");
- ol.docify(a.defval);
- }
- ++it;
- if (it!=al.end()) ol.docify(", ");
- }
- ol.docify("> ");
-}
-
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
@@ -1148,10 +1134,10 @@ class MemberDefImpl::IMPL
public:
IMPL();
~IMPL();
- void init(Definition *def,const char *t,const char *a,const char *e,
+ void init(Definition *def,const QCString &t,const QCString &a,const QCString &e,
Protection p,Specifier v,bool s,Relationship r,
MemberType mt,const ArgumentList &tal,
- const ArgumentList &al,const char *meta
+ const ArgumentList &al,const QCString &meta
);
const ClassDef *classDef = 0; // member of or related to
@@ -1189,6 +1175,7 @@ class MemberDefImpl::IMPL
QCString initializer; // initializer
QCString extraTypeChars; // extra type info found after the argument list
QCString enumBaseType; // base type of the enum (C++11)
+ QCString requiresClause; // requires clause (C++20)
int initLines = 0; // number of lines in the initializer
uint64 memSpec = 0; // The specifiers present for this member
@@ -1280,10 +1267,10 @@ MemberDefImpl::IMPL::~IMPL()
}
void MemberDefImpl::IMPL::init(Definition *d,
- const char *t,const char *a,const char *e,
+ const QCString &t,const QCString &a,const QCString &e,
Protection p,Specifier v,bool s,Relationship r,
MemberType mt,const ArgumentList &tal,
- const ArgumentList &al,const char *meta
+ const ArgumentList &al,const QCString &meta
)
{
classDef=0;
@@ -1342,8 +1329,8 @@ void MemberDefImpl::IMPL::init(Definition *d,
if (!args.isEmpty())
{
declArgList = *stringToArgumentList(d->getLanguage(),args,&extraTypeChars);
- //printf("setDeclArgList %s to %s const=%d\n",args.data(),
- // argListToString(declArgList).data(),declArgList->constSpecifier);
+ //printf("setDeclArgList %s to %s const=%d\n",qPrint(args),
+ // qPrint(argListToString(declArgList)),declArgList->constSpecifier);
}
metaData = meta;
templateMaster = 0;
@@ -1387,10 +1374,10 @@ void MemberDefImpl::IMPL::init(Definition *d,
* \param meta Slice metadata.
*/
-MemberDefImpl::MemberDefImpl(const char *df,int dl,int dc,
- const char *t,const char *na,const char *a,const char *e,
+MemberDefImpl::MemberDefImpl(const QCString &df,int dl,int dc,
+ const QCString &t,const QCString &na,const QCString &a,const QCString &e,
Protection p,Specifier v,bool s,Relationship r,MemberType mt,
- const ArgumentList &tal,const ArgumentList &al,const char *meta
+ const ArgumentList &tal,const ArgumentList &al,const QCString &meta
) : DefinitionMixin(df,dl,dc,removeRedundantWhiteSpace(na))
{
//printf("MemberDefImpl::MemberDef(%s)\n",na);
@@ -1506,9 +1493,9 @@ void MemberDefImpl::insertEnumField(const MemberDef *md)
m_impl->enumFields.push_back(md);
}
-bool MemberDefImpl::addExample(const char *anchor,const char *nameStr, const char *file)
+bool MemberDefImpl::addExample(const QCString &anchor,const QCString &nameStr, const QCString &file)
{
- //printf("%s::addExample(%s,%s,%s)\n",name().data(),anchor,nameStr,file);
+ //printf("%s::addExample(%s,%s,%s)\n",qPrint(name()),anchor,nameStr,file);
return m_impl->examples.inSort(Example(anchor,nameStr,file));
}
@@ -1524,7 +1511,7 @@ QCString MemberDefImpl::getOutputFileBase() const
QCString baseName;
//printf("Member: %s: templateMaster=%p group=%p classDef=%p nspace=%p fileDef=%p\n",
- // name().data(),m_impl->templateMaster,m_impl->group,m_impl->classDef,
+ // qPrint(name()),m_impl->templateMaster,m_impl->group,m_impl->classDef,
// m_impl->nspace,m_impl->fileDef);
const NamespaceDef *nspace = getNamespaceDef();
const FileDef *fileDef = getFileDef();
@@ -1643,7 +1630,7 @@ void MemberDefImpl::_computeLinkableInProject()
static bool extractStatic = Config_getBool(EXTRACT_STATIC);
static bool extractPrivateVirtual = Config_getBool(EXTRACT_PRIV_VIRTUAL);
m_isLinkableCached = 2; // linkable
- //printf("MemberDefImpl::isLinkableInProject(name=%s)\n",name().data());
+ //printf("MemberDefImpl::isLinkableInProject(name=%s)\n",qPrint(name()));
if (isHidden())
{
//printf("is hidden\n");
@@ -1716,19 +1703,19 @@ void MemberDefImpl::_computeLinkableInProject()
return; // linkable!
}
-void MemberDefImpl::setDocumentation(const char *d,const char *docFile,int docLine,bool stripWhiteSpace)
+void MemberDefImpl::setDocumentation(const QCString &d,const QCString &docFile,int docLine,bool stripWhiteSpace)
{
DefinitionMixin::setDocumentation(d,docFile,docLine,stripWhiteSpace);
m_isLinkableCached = 0;
}
-void MemberDefImpl::setBriefDescription(const char *b,const char *briefFile,int briefLine)
+void MemberDefImpl::setBriefDescription(const QCString &b,const QCString &briefFile,int briefLine)
{
DefinitionMixin::setBriefDescription(b,briefFile,briefLine);
m_isLinkableCached = 0;
}
-void MemberDefImpl::setInbodyDocumentation(const char *d,const char *inbodyFile,int inbodyLine)
+void MemberDefImpl::setInbodyDocumentation(const QCString &d,const QCString &inbodyFile,int inbodyLine)
{
DefinitionMixin::setInbodyDocumentation(d,inbodyFile,inbodyLine);
m_isLinkableCached = 0;
@@ -1827,8 +1814,8 @@ void MemberDefImpl::writeLink(OutputList &ol,
*/
ClassDef *MemberDefImpl::getClassDefOfAnonymousType() const
{
- //printf("%s:getClassDefOfAnonymousType() cache=%s\n",name().data(),
- // m_impl->cachedAnonymousType?m_impl->cachedAnonymousType->name().data():"<empty>");
+ //printf("%s:getClassDefOfAnonymousType() cache=%s\n",qPrint(name()),
+ // m_impl->cachedAnonymousType?qPrint(m_impl->cachedAnonymousType->name()):"<empty>");
if (m_impl->cachedAnonymousType) return m_impl->cachedAnonymousType;
QCString cname;
@@ -1888,9 +1875,9 @@ bool MemberDefImpl::isBriefSectionVisible() const
static bool hideFriendCompounds = Config_getBool(HIDE_FRIEND_COMPOUNDS);
//printf("Member %s grpId=%d docs=%s file=%s args=%s\n",
- // name().data(),
+ // qPrint(name()),
// 0,"", //grpId,grpId==-1?"<none>":Doxygen::memberDocDict[grpId]->data(),
- // "", //getFileDef()->name().data(),
+ // "", //qPrint(getFileDef()->name()),
// argsString());
auto it = Doxygen::memberGroupInfoMap.find(m_impl->grpId);
@@ -1898,7 +1885,7 @@ bool MemberDefImpl::isBriefSectionVisible() const
if (it!=Doxygen::memberGroupInfoMap.end())
{
auto &info = it->second;
- //printf("name=%s m_impl->grpId=%d info=%p\n",name().data(),m_impl->grpId,info);
+ //printf("name=%s m_impl->grpId=%d info=%p\n",qPrint(name()),m_impl->grpId,info);
//QCString *pMemGrp = Doxygen::memberDocDict[grpId];
hasDocs = hasDocs ||
// part of a documented member group
@@ -2008,11 +1995,51 @@ QCString MemberDefImpl::getDeclType() const
return ltype;
}
+void MemberDefImpl::_writeTemplatePrefix(OutputList &ol, const Definition *def,
+ const ArgumentList &al, bool writeReqClause) const
+{
+ ol.docify("template<");
+ for (auto it = al.begin(); it!=al.end();)
+ {
+ Argument a = *it;
+ linkifyText(TextGeneratorOLImpl(ol), // out
+ def, // scope
+ getFileDef(), // fileScope
+ this, // self
+ a.type, // text
+ FALSE // autoBreak
+ );
+ ol.docify(" ");
+ ol.docify(a.name);
+ if (a.defval.length()!=0)
+ {
+ ol.docify(" = ");
+ ol.docify(a.defval);
+ }
+ ++it;
+ if (it!=al.end()) ol.docify(", ");
+ }
+ ol.docify("> ");
+ if (writeReqClause && !m_impl->requiresClause.isEmpty())
+ {
+ ol.lineBreak();
+ ol.docify("requires ");
+ linkifyText(TextGeneratorOLImpl(ol), // out
+ def, // scope
+ getFileDef(), // fileScope
+ this, // self
+ m_impl->requiresClause, // text
+ FALSE // autoBreak
+ );
+ }
+}
+
+
void MemberDefImpl::writeDeclaration(OutputList &ol,
const ClassDef *cd,const NamespaceDef *nd,const FileDef *fd,const GroupDef *gd,
- bool inGroup, const ClassDef *inheritedFrom,const char *inheritId) const
+ bool inGroup, const ClassDef *inheritedFrom,const QCString &inheritId) const
{
- //printf("%s MemberDefImpl::writeDeclaration() inGroup=%d\n",qualifiedName().data(),inGroup);
+ //printf("%s MemberDefImpl::writeDeclaration() inGroup=%d\n",qPrint(qualifiedName()),inGroup);
// hide enum value, since they appear already as part of the enum, unless they
// are explicitly grouped.
@@ -2042,7 +2069,7 @@ void MemberDefImpl::writeDeclaration(OutputList &ol,
// start a new member declaration
bool isAnonType = annoClassDef || m_impl->annMemb || m_impl->annEnumType;
- ///printf("startMemberItem for %s\n",name().data());
+ ///printf("startMemberItem for %s\n",qPrint(name()));
ol.startMemberItem(anchor(),
isAnonType ? 1 : !m_impl->tArgList.empty() ? 3 : 0,
inheritId
@@ -2086,10 +2113,11 @@ void MemberDefImpl::writeDeclaration(OutputList &ol,
if (m_impl->tArgList.hasParameters() && getLanguage()==SrcLangExt_Cpp)
{
if (!isAnonType) ol.startMemberTemplateParams();
- writeTemplatePrefix(ol,m_impl->tArgList);
+ _writeTemplatePrefix(ol,d,m_impl->tArgList);
if (!isAnonType) ol.endMemberTemplateParams(anchor(),inheritId);
}
+
// *** write type
QCString ltype(m_impl->type);
if (isTypedef() && getLanguage() != SrcLangExt_Slice)
@@ -2111,7 +2139,7 @@ void MemberDefImpl::writeDeclaration(OutputList &ol,
int i = (int)match.position();
int l = (int)match.length();
//printf("annoClassDef=%p annMemb=%p scopeName='%s' anonymous='%s'\n",
- // annoClassDef,annMemb,cname.data(),ltype.mid(i,l).data());
+ // annoClassDef,annMemb,qPrint(cname),qPrint(ltype.mid(i,l)));
if (annoClassDef) // type is an anonymous compound
{
@@ -2127,7 +2155,7 @@ void MemberDefImpl::writeDeclaration(OutputList &ol,
ol.writeNonBreakableSpace(3);
}
QCString varName=ltype.right(ltype.length()-ir).stripWhiteSpace();
- //printf(">>>>>> ltype='%s' varName='%s'\n",ltype.data(),varName.data());
+ //printf(">>>>>> ltype='%s' varName='%s'\n",qPrint(ltype),qPrint(varName));
ol.docify("}");
if (varName.isEmpty() && isAnonymous())
{
@@ -2217,7 +2245,7 @@ void MemberDefImpl::writeDeclaration(OutputList &ol,
static bool extractPrivateVirtual = Config_getBool(EXTRACT_PRIV_VIRTUAL);
static bool extractStatic = Config_getBool(EXTRACT_STATIC);
MemberDefMutable *annMemb = toMemberDefMutable(m_impl->annMemb);
- //printf("Member name=`%s gd=%p md->groupDef=%p inGroup=%d isLinkable()=%d hasDocumentation=%d\n",name().data(),gd,getGroupDef(),inGroup,isLinkable(),hasDocumentation());
+ //printf("Member name=`%s gd=%p md->groupDef=%p inGroup=%d isLinkable()=%d hasDocumentation=%d\n",qPrint(name()),gd,getGroupDef(),inGroup,isLinkable(),hasDocumentation());
if (!name().isEmpty() && // name valid
(hasDocumentation() || isReference()) && // has docs
!(m_impl->prot==Private && !extractPrivate && (m_impl->virt==Normal || !extractPrivateVirtual) && m_impl->mtype!=MemberType_Friend) && // hidden due to protection
@@ -2237,7 +2265,7 @@ void MemberDefImpl::writeDeclaration(OutputList &ol,
}
else
{
- //printf("writeLink %s->%d\n",name.data(),hasDocumentation());
+ //printf("writeLink %s->%d\n",qPrint(name),hasDocumentation());
const ClassDef *rcd = cd;
if (isReference() && getClassDef()) rcd = getClassDef();
writeLink(ol,rcd,nd,fd,gd);
@@ -2285,7 +2313,7 @@ void MemberDefImpl::writeDeclaration(OutputList &ol,
}
// *** write arguments
- if (argsString() && !isObjCMethod())
+ if (!argsString().isEmpty() && !isObjCMethod())
{
if (!isDefine() && !isTypedef()) ol.writeString(" ");
linkifyText(TextGeneratorOLImpl(ol), // out
@@ -2293,9 +2321,9 @@ void MemberDefImpl::writeDeclaration(OutputList &ol,
getBodyDef(), // fileScope
this, // self
isDefine() ?
- (const char*)substitute(argsString(),",",", ") :
+ substitute(argsString(),",",", ") :
isTypedef() ?
- (const char*)substitute(argsString(),")(",") (") :
+ substitute(argsString(),")(",") (") :
argsString(), // text
m_impl->annMemb, // autoBreak
TRUE, // external
@@ -2304,7 +2332,7 @@ void MemberDefImpl::writeDeclaration(OutputList &ol,
);
}
// *** write exceptions
- if (excpString())
+ if (!excpString().isEmpty())
{
ol.writeString(" ");
ol.docify(excpString());
@@ -2355,23 +2383,26 @@ void MemberDefImpl::writeDeclaration(OutputList &ol,
ol.writeLatexSpacing();
ol.startTypewriter();
ol.docify(" [");
- QStrList sl;
+ StringVector sl;
- if (isGettable()) sl.append("get");
- if (isProtectedGettable()) sl.append("protected get");
- if (isSettable()) sl.append("set");
- if (isProtectedSettable()) sl.append("protected set");
+ if (isGettable()) sl.push_back("get");
+ if (isProtectedGettable()) sl.push_back("protected get");
+ if (isSettable()) sl.push_back("set");
+ if (isProtectedSettable()) sl.push_back("protected set");
if (extractPrivate)
{
- if (isPrivateGettable()) sl.append("private get");
- if (isPrivateSettable()) sl.append("private set");
+ if (isPrivateGettable()) sl.push_back("private get");
+ if (isPrivateSettable()) sl.push_back("private set");
}
- const char *s=sl.first();
- while (s)
+ bool first=true;
+ for (const auto &s : sl)
{
- ol.docify(s);
- s=sl.next();
- if (s) ol.docify(", ");
+ if (!first)
+ {
+ ol.docify(", ");
+ first=false;
+ }
+ ol.docify(s.c_str());
}
ol.docify("]");
ol.endTypewriter();
@@ -2382,16 +2413,19 @@ void MemberDefImpl::writeDeclaration(OutputList &ol,
ol.writeLatexSpacing();
ol.startTypewriter();
ol.docify(" [");
- QStrList sl;
- if (isAddable()) sl.append("add");
- if (isRemovable()) sl.append("remove");
- if (isRaisable()) sl.append("raise");
- const char *s=sl.first();
- while (s)
+ StringVector sl;
+ if (isAddable()) sl.push_back("add");
+ if (isRemovable()) sl.push_back("remove");
+ if (isRaisable()) sl.push_back("raise");
+ bool first=true;
+ for (const auto &s : sl)
{
- ol.docify(s);
- s=sl.next();
- if (s) ol.docify(", ");
+ if (!first)
+ {
+ ol.docify(", ");
+ first=false;
+ }
+ ol.docify(s.c_str());
}
ol.docify("]");
ol.endTypewriter();
@@ -2403,7 +2437,7 @@ void MemberDefImpl::writeDeclaration(OutputList &ol,
}
//printf("endMember %s annoClassDef=%p annEnumType=%p\n",
- // name().data(),annoClassDef,annEnumType);
+ // qPrint(name()),annoClassDef,annEnumType);
ol.endMemberItem();
if (endAnonScopeNeeded)
{
@@ -2418,7 +2452,7 @@ void MemberDefImpl::writeDeclaration(OutputList &ol,
{
DocRoot *rootNode = validatingParseDoc(briefFile(),briefLine(),
getOuterScope()?getOuterScope():d,this,briefDescription(),TRUE,FALSE,
- 0,TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
if (rootNode && !rootNode->isEmpty())
{
@@ -2530,12 +2564,13 @@ bool MemberDefImpl::isDetailedSectionVisible(bool inGroup,bool inFile) const
!isReference();
bool result = visible || simpleFilter;
//printf("%s::isDetailedSectionVisible: %d groupFilter=%d fileFilter=%d\n",
- // name().data(),result,groupFilter,fileFilter);
+ // qPrint(name()),result,groupFilter,fileFilter);
return result;
}
-void MemberDefImpl::getLabels(QStrList &sl,const Definition *container) const
+StringVector MemberDefImpl::getLabels(const Definition *container) const
{
+ StringVector sl;
static bool inlineInfo = Config_getBool(INLINE_INFO);
Specifier lvirt=virtualness();
@@ -2559,82 +2594,82 @@ void MemberDefImpl::getLabels(QStrList &sl,const Definition *container) const
static bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
if (optVhdl)
{
- sl.append(theTranslator->trVhdlType(getMemberSpecifiers(),TRUE));
+ sl.push_back(theTranslator->trVhdlType(getMemberSpecifiers(),TRUE).str());
}
else
{
- if (isFriend()) sl.append("friend");
- else if (isRelated()) sl.append("related");
+ if (isFriend()) sl.push_back("friend");
+ else if (isRelated()) sl.push_back("related");
else
{
- if (isExternal()) sl.append("extern");
- if (inlineInfo && isInline()) sl.append("inline");
- if (isExplicit()) sl.append("explicit");
- if (isMutable()) sl.append("mutable");
- if (isStatic()) sl.append("static");
- if (isGettable()) sl.append("get");
- if (isProtectedGettable()) sl.append("protected get");
- if (isSettable()) sl.append("set");
- if (isProtectedSettable()) sl.append("protected set");
+ if (isExternal()) sl.push_back("extern");
+ if (inlineInfo && isInline()) sl.push_back("inline");
+ if (isExplicit()) sl.push_back("explicit");
+ if (isMutable()) sl.push_back("mutable");
+ if (isStatic()) sl.push_back("static");
+ if (isGettable()) sl.push_back("get");
+ if (isProtectedGettable()) sl.push_back("protected get");
+ if (isSettable()) sl.push_back("set");
+ if (isProtectedSettable()) sl.push_back("protected set");
if (extractPrivate)
{
- if (isPrivateGettable()) sl.append("private get");
- if (isPrivateSettable()) sl.append("private set");
+ if (isPrivateGettable()) sl.push_back("private get");
+ if (isPrivateSettable()) sl.push_back("private set");
}
- if (isConstExpr()) sl.append("constexpr");
- if (isAddable()) sl.append("add");
- if (!isUNOProperty() && isRemovable()) sl.append("remove");
- if (isRaisable()) sl.append("raise");
- if (isReadable()) sl.append("read");
- if (isWritable()) sl.append("write");
- if (isFinal()) sl.append("final");
- if (isAbstract()) sl.append("abstract");
- if (isOverride()) sl.append("override");
- if (isInitonly()) sl.append("initonly");
- if (isSealed()) sl.append("sealed");
- if (isNew()) sl.append("new");
- if (isOptional()) sl.append("optional");
- if (isRequired()) sl.append("required");
-
- if (isNonAtomic()) sl.append("nonatomic");
- else if (isObjCProperty()) sl.append("atomic");
+ if (isConstExpr()) sl.push_back("constexpr");
+ if (isAddable()) sl.push_back("add");
+ if (!isUNOProperty() && isRemovable()) sl.push_back("remove");
+ if (isRaisable()) sl.push_back("raise");
+ if (isReadable()) sl.push_back("read");
+ if (isWritable()) sl.push_back("write");
+ if (isFinal()) sl.push_back("final");
+ if (isAbstract()) sl.push_back("abstract");
+ if (isOverride()) sl.push_back("override");
+ if (isInitonly()) sl.push_back("initonly");
+ if (isSealed()) sl.push_back("sealed");
+ if (isNew()) sl.push_back("new");
+ if (isOptional()) sl.push_back("optional");
+ if (isRequired()) sl.push_back("required");
+
+ if (isNonAtomic()) sl.push_back("nonatomic");
+ else if (isObjCProperty()) sl.push_back("atomic");
// mutual exclusive Objective 2.0 property attributes
- if (isAssign()) sl.append("assign");
- else if (isCopy()) sl.append("copy");
- else if (isRetain()) sl.append("retain");
- else if (isWeak()) sl.append("weak");
- else if (isStrong()) sl.append("strong");
- else if (isUnretained()) sl.append("unsafe_unretained");
+ if (isAssign()) sl.push_back("assign");
+ else if (isCopy()) sl.push_back("copy");
+ else if (isRetain()) sl.push_back("retain");
+ else if (isWeak()) sl.push_back("weak");
+ else if (isStrong()) sl.push_back("strong");
+ else if (isUnretained()) sl.push_back("unsafe_unretained");
if (!isObjCMethod())
{
- if (protection()==Protected) sl.append("protected");
- else if (protection()==Private) sl.append("private");
- 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 (isSlot()) sl.append("slot");
- if (isDefault()) sl.append("default");
- if (isDelete()) sl.append("delete");
- if (isNoExcept()) sl.append("noexcept");
- if (isAttribute()) sl.append("attribute");
- if (isUNOProperty()) sl.append("property");
- if (isReadonly()) sl.append("readonly");
- if (isBound()) sl.append("bound");
- if (isUNOProperty() && isRemovable()) sl.append("removable");
- if (isConstrained()) sl.append("constrained");
- if (isTransient()) sl.append("transient");
- if (isMaybeVoid()) sl.append("maybevoid");
- if (isMaybeDefault()) sl.append("maybedefault");
- if (isMaybeAmbiguous()) sl.append("maybeambiguous");
- if (isPublished()) sl.append("published"); // enum
+ if (protection()==Protected) sl.push_back("protected");
+ else if (protection()==Private) sl.push_back("private");
+ else if (protection()==Package) sl.push_back("package");
+
+ if (lvirt==Virtual) sl.push_back("virtual");
+ else if (lvirt==Pure) sl.push_back("pure virtual");
+ if (isSignal()) sl.push_back("signal");
+ if (isSlot()) sl.push_back("slot");
+ if (isDefault()) sl.push_back("default");
+ if (isDelete()) sl.push_back("delete");
+ if (isNoExcept()) sl.push_back("noexcept");
+ if (isAttribute()) sl.push_back("attribute");
+ if (isUNOProperty()) sl.push_back("property");
+ if (isReadonly()) sl.push_back("readonly");
+ if (isBound()) sl.push_back("bound");
+ if (isUNOProperty() && isRemovable()) sl.push_back("removable");
+ if (isConstrained()) sl.push_back("constrained");
+ if (isTransient()) sl.push_back("transient");
+ if (isMaybeVoid()) sl.push_back("maybevoid");
+ if (isMaybeDefault()) sl.push_back("maybedefault");
+ if (isMaybeAmbiguous()) sl.push_back("maybeambiguous");
+ if (isPublished()) sl.push_back("published"); // enum
}
if (isObjCProperty() && isImplementation())
{
- sl.append("implementation");
+ sl.push_back("implementation");
}
}
if (getClassDef() &&
@@ -2643,14 +2678,15 @@ void MemberDefImpl::getLabels(QStrList &sl,const Definition *container) const
!isRelated()
)
{
- sl.append("inherited");
+ sl.push_back("inherited");
}
}
}
else if (isObjCMethod() && isImplementation())
{
- sl.append("implementation");
+ sl.push_back("implementation");
}
+ return sl;
}
void MemberDefImpl::_writeCallGraph(OutputList &ol) const
@@ -2742,7 +2778,7 @@ void MemberDefImpl::_writeReimplements(OutputList &ol) const
else
{
ol.writeObjectLink(bcd->getReference(),bcd->getOutputFileBase(),
- 0,bcd->displayName());
+ QCString(),bcd->displayName());
if (bcd->isLinkableInProject()/* && !Config_getBool(PDF_HYPERLINKS)*/ )
{
writePageRef(ol,bcd->getOutputFileBase(),bcd->anchor());
@@ -2835,11 +2871,11 @@ void MemberDefImpl::_writeCategoryRelation(OutputList &ol) const
if (getClassDef()) // this should be a member of a class/category
{
//printf("%s: category %s relation %s class=%s categoryOf=%s\n",
- // name().data(),
- // m_impl->category ? m_impl->category->name().data() : "<none>",
- // m_impl->categoryRelation ? m_impl->categoryRelation->name().data() : "<none>",
- // m_impl->classDef->name().data(),
- // m_impl->classDef->categoryOf() ? m_impl->classDef->categoryOf()->name().data() : "<none>"
+ // qPrint(name()),
+ // m_impl->category ? qPrint(m_impl->category->name()) : "<none>",
+ // m_impl->categoryRelation ? qPrint(m_impl->categoryRelation->name()) : "<none>",
+ // qPrint(m_impl->classDef->name()),
+ // m_impl->classDef->categoryOf() ? qPrint(m_impl->classDef->categoryOf()->name()) : "<none>"
// );
QCString text;
QCString ref;
@@ -2912,7 +2948,7 @@ void MemberDefImpl::_writeEnumValues(OutputList &ol,const Definition *container,
if (isEnumerate())
{
bool first=TRUE;
- //printf("** %s: enum values=%zu\n",name().data(),enumFieldList().size());
+ //printf("** %s: enum values=%zu\n",qPrint(name()),enumFieldList().size());
for (const auto &fmd : enumFieldList())
{
//printf("Enum %p: isLinkable()=%d\n",fmd,fmd->isLinkable());
@@ -2948,7 +2984,7 @@ void MemberDefImpl::_writeEnumValues(OutputList &ol,const Definition *container,
ol.generateDoc(fmd->briefFile(),fmd->briefLine(),
getOuterScope()?getOuterScope():container,
fmd,fmd->briefDescription(),TRUE,FALSE,
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
}
// FIXME:PARA
//if (!fmd->briefDescription().isEmpty() &&
@@ -2961,7 +2997,7 @@ void MemberDefImpl::_writeEnumValues(OutputList &ol,const Definition *container,
ol.generateDoc(fmd->docFile(),fmd->docLine(),
getOuterScope()?getOuterScope():container,
fmd,fmd->documentation()+"\n",TRUE,FALSE,
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
}
ol.endDescTableData();
ol.endDescTableRow();
@@ -3035,7 +3071,7 @@ QCString MemberDefImpl::displayDefinition() const
ldef=ldef.left(dp+1);
}
int l=ldef.length();
- //printf("start >%s<\n",ldef.data());
+ //printf("start >%s<\n",qPrint(ldef));
int i=l-1;
while (i>=0 && (isId(ldef.at(i)) || ldef.at(i)==':')) i--;
while (i>=0 && isspace((uchar)ldef.at(i))) i--;
@@ -3045,7 +3081,7 @@ QCString MemberDefImpl::displayDefinition() const
QCString tmp("("+ldef.left(i+1)+")"+ldef.mid(i+1));
ldef=tmp;
}
- //printf("end >%s< i=%d\n",ldef.data(),i);
+ //printf("end >%s< i=%d\n",qPrint(ldef),i);
if (isStatic()) ldef.prepend("+ "); else ldef.prepend("- ");
}
SrcLangExt lang = getLanguage();
@@ -3100,7 +3136,7 @@ void MemberDefImpl::_writeGroupInclude(OutputList &ol,bool inGroup) const
void MemberDefImpl::writeDocumentation(const MemberList *ml,
int memCount,int memTotal,
OutputList &ol,
- const char *scName,
+ const QCString &scName,
const Definition *container,
bool inGroup,
bool showEnumValues,
@@ -3111,13 +3147,13 @@ void MemberDefImpl::writeDocumentation(const MemberList *ml,
bool hasParameterList = FALSE;
//printf("MemberDefImpl::writeDocumentation(): name='%s' hasDocs='%d' containerType=%d inGroup=%d sectionLinkable=%d\n",
- // name().data(),hasDocs,container->definitionType(),inGroup,isDetailedSectionLinkable());
+ // qPrint(name()),hasDocs,container->definitionType(),inGroup,isDetailedSectionLinkable());
//if ( !hasDocs ) return;
//if (isEnumValue() && !showEnumValues) return;
SrcLangExt lang = getLanguage();
- //printf("member=%s lang=%d\n",name().data(),lang);
+ //printf("member=%s lang=%d\n",qPrint(name()),lang);
bool optVhdl = lang==SrcLangExt_VHDL;
QCString sep = getLanguageSpecificSeparator(lang,TRUE);
@@ -3152,7 +3188,7 @@ void MemberDefImpl::writeDocumentation(const MemberList *ml,
QCString ldef = definition();
QCString title = name();
- //printf("member '%s' def='%s'\n",name().data(),ldef.data());
+ //printf("member '%s' def='%s'\n",qPrint(name()),qPrint(ldef));
if (isEnumerate())
{
if (title.at(0)=='@')
@@ -3199,8 +3235,7 @@ void MemberDefImpl::writeDocumentation(const MemberList *ml,
ol.pushGeneratorState();
bool htmlEndLabelTable=FALSE;
- QStrList sl;
- getLabels(sl,scopedContainer);
+ StringVector sl = getLabels(scopedContainer);
static const reg::Ex r(R"(@\d+)");
reg::Match match;
@@ -3227,7 +3262,7 @@ void MemberDefImpl::writeDocumentation(const MemberList *ml,
}
if (!found) // anonymous compound
{
- //printf("Anonymous compound '%s'\n",cname.data());
+ //printf("Anonymous compound '%s'\n",qPrint(cname));
ol.startDoxyAnchor(cfname,cname,memAnchor,doxyName,doxyArgs);
ol.startMemberDoc(ciname,name(),memAnchor,"",memCount,memTotal,showInline);
// search for the last anonymous compound name in the definition
@@ -3273,7 +3308,7 @@ void MemberDefImpl::writeDocumentation(const MemberList *ml,
{
if (!first) ol.docify(" ");
ol.startMemberDocPrefixItem();
- writeTemplatePrefix(ol,tal);
+ _writeTemplatePrefix(ol,scopedContainer,tal);
ol.endMemberDocPrefixItem();
}
}
@@ -3289,7 +3324,7 @@ void MemberDefImpl::writeDocumentation(const MemberList *ml,
{
if (!first) ol.docify(" ");
ol.startMemberDocPrefixItem();
- writeTemplatePrefix(ol,tal);
+ _writeTemplatePrefix(ol,scopedContainer,tal,false);
ol.endMemberDocPrefixItem();
}
}
@@ -3297,13 +3332,13 @@ void MemberDefImpl::writeDocumentation(const MemberList *ml,
if (m_impl->tArgList.hasParameters() && lang==SrcLangExt_Cpp) // function template prefix
{
ol.startMemberDocPrefixItem();
- writeTemplatePrefix(ol,m_impl->tArgList);
+ _writeTemplatePrefix(ol,scopedContainer,m_impl->tArgList);
ol.endMemberDocPrefixItem();
}
}
}
- if (sl.count()>0)
+ if (!sl.empty())
{
ol.pushGeneratorState();
ol.disableAll();
@@ -3337,7 +3372,7 @@ void MemberDefImpl::writeDocumentation(const MemberList *ml,
ldef=ldef.left(dp+1);
}
int dl=ldef.length();
- //printf("start >%s<\n",ldef.data());
+ //printf("start >%s<\n",qPrint(ldef));
int i=dl-1;
while (i>=0 && (isId(ldef.at(i)) || ldef.at(i)==':')) i--;
while (i>=0 && isspace((uchar)ldef.at(i))) i--;
@@ -3347,7 +3382,7 @@ void MemberDefImpl::writeDocumentation(const MemberList *ml,
QCString tmp("("+ldef.left(i+1)+")"+ldef.mid(i+1));
ldef=tmp;
}
- //printf("end >%s< i=%d\n",ldef.data(),i);
+ //printf("end >%s< i=%d\n",qPrint(ldef),i);
if (isStatic()) ldef.prepend("+ "); else ldef.prepend("- ");
}
@@ -3398,7 +3433,7 @@ void MemberDefImpl::writeDocumentation(const MemberList *ml,
linkifyText(TextGeneratorOLImpl(ol),scopedContainer,getBodyDef(),this,m_impl->initializer);
}
}
- if (excpString()) // add exception list
+ if (!excpString().isEmpty()) // add exception list
{
writeExceptionList(ol,cd,this);
hasParameterList=true; // call endParameterList below
@@ -3407,15 +3442,14 @@ void MemberDefImpl::writeDocumentation(const MemberList *ml,
ol.pushGeneratorState();
ol.disable(OutputGenerator::Html);
- if (sl.count()>0)
+ if (!sl.empty())
{
ol.startLabels();
- const char *s=sl.first();
- while (s)
+ size_t count=0;
+ for (const auto &s : sl)
{
- const char *ns = sl.next();
- ol.writeLabel(s,ns==0);
- s=ns;
+ count++;
+ ol.writeLabel(s.c_str(),count==sl.size());
}
ol.endLabels();
}
@@ -3441,12 +3475,11 @@ void MemberDefImpl::writeDocumentation(const MemberList *ml,
ol.writeString(" </td>\n");
ol.writeString(" <td class=\"mlabels-right\">\n");
ol.startLabels();
- const char *s=sl.first();
- while (s)
+ size_t count=0;
+ for (const auto &s : sl)
{
- const char *ns = sl.next();
- ol.writeLabel(s,ns==0);
- s=ns;
+ count++;
+ ol.writeLabel(s.c_str(),count==sl.size());
}
ol.endLabels();
ol.writeString(" </td>\n");
@@ -3469,7 +3502,7 @@ void MemberDefImpl::writeDocumentation(const MemberList *ml,
// )
)
{
- //printf("md=%s initLines=%d init='%s'\n",name().data(),initLines,init.data());
+ //printf("md=%s initLines=%d init='%s'\n",qPrint(name()),initLines,qPrint(init));
ol.startBold();
if (m_impl->mtype==MemberType_Define)
ol.parseText(theTranslator->trDefineValue());
@@ -3486,7 +3519,7 @@ void MemberDefImpl::writeDocumentation(const MemberList *ml,
auto intf = Doxygen::parserManager->getCodeParser(langCorrected);
intf->resetCodeParserState();
ol.startCodeFragment("DoxyCode");
- intf->parseCode(ol,scopeName,m_impl->initializer,srcLangExt,FALSE,0,const_cast<FileDef*>(getFileDef()),
+ intf->parseCode(ol,scopeName,m_impl->initializer,srcLangExt,FALSE,QCString(),const_cast<FileDef*>(getFileDef()),
-1,-1,TRUE,this,FALSE,this);
ol.endCodeFragment("DoxyCode");
}
@@ -3512,7 +3545,7 @@ void MemberDefImpl::writeDocumentation(const MemberList *ml,
ol.generateDoc(briefFile(),briefLine(),
scopedContainer,this,
brief,FALSE,FALSE,
- 0,TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
ol.endParagraph();
}
@@ -3529,7 +3562,7 @@ void MemberDefImpl::writeDocumentation(const MemberList *ml,
else
{
ol.generateDoc(docFile(),docLine(),scopedContainer,this,detailed+"\n",TRUE,FALSE,
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
}
if (!inbodyDocumentation().isEmpty())
@@ -3537,7 +3570,7 @@ void MemberDefImpl::writeDocumentation(const MemberList *ml,
ol.generateDoc(inbodyFile(),inbodyLine(),
scopedContainer,this,
inbodyDocumentation()+"\n",TRUE,FALSE,
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
}
}
else if (!brief.isEmpty() && (Config_getBool(REPEAT_BRIEF) ||
@@ -3546,7 +3579,7 @@ void MemberDefImpl::writeDocumentation(const MemberList *ml,
if (!inbodyDocumentation().isEmpty())
{
ol.generateDoc(inbodyFile(),inbodyLine(),scopedContainer,this,inbodyDocumentation()+"\n",TRUE,FALSE,
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
}
}
@@ -3574,7 +3607,7 @@ void MemberDefImpl::writeDocumentation(const MemberList *ml,
paramDocs, // docStr
TRUE, // indexWords
FALSE, // isExample
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT)
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT)
);
}
@@ -3626,7 +3659,7 @@ static QCString simplifyTypeForTable(const QCString &s)
{
ts = match[1].str(); // take the identifier after the last ::
}
- //printf("simplifyTypeForTable(%s)->%s\n",s.data(),ts.data());
+ //printf("simplifyTypeForTable(%s)->%s\n",qPrint(s),qPrint(ts));
return ts;
}
@@ -3657,7 +3690,7 @@ void MemberDefImpl::writeMemberDocSimple(OutputList &ol, const Definition *conta
}
ClassDef *cd = m_impl->accessorClass;
- //printf("===> %s::anonymous: %s\n",name().data(),cd?cd->name().data():"<none>");
+ //printf("===> %s::anonymous: %s\n",qPrint(name()),cd?qPrint(cd->name()):"<none>");
if (container && container->definitionType()==Definition::TypeClass &&
!(toClassDef(container))->isJavaEnum())
@@ -3702,7 +3735,7 @@ void MemberDefImpl::writeMemberDocSimple(OutputList &ol, const Definition *conta
ol.startInlineMemberName();
ol.docify(doxyName);
- if (isVariable() && argsString() && !isObjCMethod())
+ if (isVariable() && !argsString().isEmpty() && !isObjCMethod())
{
linkifyText(TextGeneratorOLImpl(ol),getOuterScope(),getBodyDef(),this,argsString());
}
@@ -3723,7 +3756,7 @@ void MemberDefImpl::writeMemberDocSimple(OutputList &ol, const Definition *conta
ol.generateDoc(briefFile(),briefLine(),
getOuterScope()?getOuterScope():container,this,
brief,FALSE,FALSE,
- 0,TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
}
/* write detailed description */
@@ -3732,7 +3765,7 @@ void MemberDefImpl::writeMemberDocSimple(OutputList &ol, const Definition *conta
ol.generateDoc(docFile(),docLine(),
getOuterScope()?getOuterScope():container,this,
detailed+"\n",FALSE,FALSE,
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
}
@@ -3789,7 +3822,7 @@ void MemberDefImpl::warnIfUndocumented() const
static bool extractAll = Config_getBool(EXTRACT_ALL);
//printf("%s:warnIfUndoc: hasUserDocs=%d isFriendClass=%d protection=%d isRef=%d isDel=%d\n",
- // name().data(),
+ // qPrint(name()),
// hasUserDocumentation(),isFriendClass(),protectionLevelVisible(m_impl->prot),isReference(),isDeleted());
if ((!hasUserDocumentation() && !extractAll) &&
!isFriendClass() &&
@@ -3806,7 +3839,7 @@ void MemberDefImpl::warnIfUndocumented() const
warnIfUndocumentedParams();
}
}
-static QCString stripTrailingReturn(const QCString trailRet)
+static QCString stripTrailingReturn(const QCString &trailRet)
{
QCString ret = trailRet;
@@ -3840,7 +3873,7 @@ void MemberDefImpl::detectUndocumentedParams(bool hasParamCommand,bool hasReturn
if (!m_impl->hasDocumentedParams && hasParamCommand)
{
- //printf("%s:hasDocumentedParams=TRUE;\n",name().data());
+ //printf("%s:hasDocumentedParams=TRUE;\n",qPrint(name()));
m_impl->hasDocumentedParams = TRUE;
}
else if (!m_impl->hasDocumentedParams)
@@ -3863,7 +3896,7 @@ void MemberDefImpl::detectUndocumentedParams(bool hasParamCommand,bool hasReturn
allDoc = !a.docs.isEmpty();
}
//printf("a->type=%s a->name=%s doc=%s\n",
- // a->type.data(),a->name.data(),a->docs.data());
+ // qPrint(a->type),qPrint(a->name),qPrint(a->docs));
}
if (!allDoc && declAl.empty()) // try declaration arguments as well
{
@@ -3877,19 +3910,19 @@ void MemberDefImpl::detectUndocumentedParams(bool hasParamCommand,bool hasReturn
{
allDoc = !a.docs.isEmpty();
}
- //printf("a->name=%s doc=%s\n",a->name.data(),a->docs.data());
+ //printf("a->name=%s doc=%s\n",qPrint(a->name),qPrint(a->docs));
}
}
}
if (allDoc)
{
- //printf("%s:hasDocumentedParams=TRUE;\n",name().data());
+ //printf("%s:hasDocumentedParams=TRUE;\n",qPrint(name()));
m_impl->hasDocumentedParams = TRUE;
}
}
//printf("Member %s hasDocumentedReturnType=%d hasReturnCommand=%d\n",
- // name().data(),m_impl->hasDocumentedReturnType,hasReturnCommand);
+ // qPrint(name()),m_impl->hasDocumentedReturnType,hasReturnCommand);
if (!m_impl->hasDocumentedReturnType && // docs not yet found
hasReturnCommand)
{
@@ -3906,7 +3939,7 @@ void MemberDefImpl::detectUndocumentedParams(bool hasParamCommand,bool hasReturn
)
{
warn_doc_error(getDefFileName(),getDefLine(),"documented empty return type of %s",
- qualifiedName().data());
+ qPrint(qualifiedName()));
}
else if ( // see if return needs to documented
m_impl->hasDocumentedReturnType ||
@@ -4041,20 +4074,24 @@ void MemberDefImpl::setAnchor()
buf[19]='\0';
memAnchor.prepend(buf);
}
+ if (!m_impl->requiresClause.isEmpty())
+ {
+ memAnchor+=" "+m_impl->requiresClause;
+ }
// convert to md5 hash
uchar md5_sig[16];
- QCString sigStr(33);
+ char sigStr[33];
MD5Buffer((const unsigned char *)memAnchor.data(),memAnchor.length(),md5_sig);
- MD5SigToString(md5_sig,sigStr.rawData(),33);
- m_impl->anc = "a"+sigStr;
+ MD5SigToString(md5_sig,sigStr);
+ m_impl->anc = QCString("a")+sigStr;
}
void MemberDefImpl::setGroupDef(const GroupDef *gd,Grouping::GroupPri_t pri,
const QCString &fileName,int startLine,
bool hasDocs,MemberDef *member)
{
- //printf("%s MemberDefImpl::setGroupDef(%s)\n",name().data(),gd->name().data());
+ //printf("%s MemberDefImpl::setGroupDef(%s)\n",qPrint(name()),qPrint(gd->name()));
m_impl->group=gd;
m_impl->grouppri=pri;
m_impl->groupFileName=fileName;
@@ -4096,36 +4133,36 @@ void MemberDefImpl::setNamespace(const NamespaceDef *nd)
MemberDefMutable *MemberDefImpl::createTemplateInstanceMember(
const ArgumentList &formalArgs,const std::unique_ptr<ArgumentList> &actualArgs) const
{
- //printf(" Member %s %s %s\n",typeString(),name().data(),argsString());
+ //printf(" Member %s %s %s\n",typeString(),qPrint(name()),argsString());
std::unique_ptr<ArgumentList> actualArgList = std::make_unique<ArgumentList>(m_impl->defArgList);
if (!m_impl->defArgList.empty())
{
// replace formal arguments with actuals
for (Argument &arg : *actualArgList)
{
- arg.type = substituteTemplateArgumentsInString(arg.type.str(),formalArgs,actualArgs);
+ arg.type = substituteTemplateArgumentsInString(arg.type,formalArgs,actualArgs);
}
actualArgList->setTrailingReturnType(
- substituteTemplateArgumentsInString(actualArgList->trailingReturnType().str(),formalArgs,actualArgs));
+ substituteTemplateArgumentsInString(actualArgList->trailingReturnType(),formalArgs,actualArgs));
}
QCString methodName=name();
if (methodName.left(9)=="operator ") // conversion operator
{
- methodName=substituteTemplateArgumentsInString(methodName.str(),formalArgs,actualArgs);
+ methodName=substituteTemplateArgumentsInString(methodName,formalArgs,actualArgs);
}
MemberDefMutable *imd = createMemberDef(
getDefFileName(),getDefLine(),getDefColumn(),
- substituteTemplateArgumentsInString(m_impl->type.str(),formalArgs,actualArgs),
+ substituteTemplateArgumentsInString(m_impl->type,formalArgs,actualArgs),
methodName,
- substituteTemplateArgumentsInString(m_impl->args.str(),formalArgs,actualArgs),
+ substituteTemplateArgumentsInString(m_impl->args,formalArgs,actualArgs),
m_impl->exception, m_impl->prot,
m_impl->virt, m_impl->stat, m_impl->related, m_impl->mtype,
ArgumentList(), ArgumentList(), ""
);
imd->moveArgumentList(std::move(actualArgList));
- imd->setDefinition(substituteTemplateArgumentsInString(m_impl->def.str(),formalArgs,actualArgs));
+ imd->setDefinition(substituteTemplateArgumentsInString(m_impl->def,formalArgs,actualArgs));
imd->setBodyDef(getBodyDef());
imd->setBodySegment(getDefLine(),getStartBodyLine(),getEndBodyLine());
//imd->setBodyMember(this);
@@ -4138,7 +4175,7 @@ MemberDefMutable *MemberDefImpl::createTemplateInstanceMember(
bool MemberDefImpl::hasOneLineInitializer() const
{
//printf("%s: init=%s, initLines=%d maxInitLines=%d userInitLines=%d\n",
- // name().data(),m_impl->initializer.data(),m_impl->initLines,
+ // qPrint(name()),qPrint(m_impl->initializer),m_impl->initLines,
// m_impl->maxInitLines,m_impl->userInitLines);
return !m_impl->initializer.isEmpty() && m_impl->initLines==0 && // one line initializer
((m_impl->maxInitLines>0 && m_impl->userInitLines==-1) || m_impl->userInitLines>0); // enabled by default or explicitly
@@ -4154,7 +4191,7 @@ bool MemberDefImpl::hasMultiLineInitializer() const
);
}
-void MemberDefImpl::setInitializer(const char *initializer)
+void MemberDefImpl::setInitializer(const QCString &initializer)
{
m_impl->initializer=initializer;
int l=m_impl->initializer.length();
@@ -4162,7 +4199,7 @@ void MemberDefImpl::setInitializer(const char *initializer)
while (p>=0 && isspace((uchar)m_impl->initializer.at(p))) p--;
m_impl->initializer=m_impl->initializer.left(p+1);
m_impl->initLines=m_impl->initializer.contains('\n');
- //printf("%s::setInitializer(%s)\n",name().data(),m_impl->initializer.data());
+ //printf("%s::setInitializer(%s)\n",qPrint(name()),qPrint(m_impl->initializer));
}
void MemberDefImpl::addListReference(Definition *)
@@ -4229,7 +4266,7 @@ const MemberList *MemberDefImpl::getSectionList(const Definition *container) con
void MemberDefImpl::setSectionList(const Definition *container,const MemberList *sl)
{
- //printf("MemberDefImpl::setSectionList(%s,%p) name=%s\n",d->name().data(),sl,name().data());
+ //printf("MemberDefImpl::setSectionList(%s,%p) name=%s\n",qPrint(d->name()),sl,qPrint(name()));
m_impl->sectionMap.insert(std::make_pair(container,sl));
}
@@ -4253,7 +4290,7 @@ Specifier MemberDefImpl::virtualness(int count) const
return v;
}
-void MemberDefImpl::writeTagFile(FTextStream &tagFile) const
+void MemberDefImpl::writeTagFile(TextStream &tagFile) const
{
if (!isLinkableInProject()) return;
tagFile << " <member kind=\"";
@@ -4293,20 +4330,20 @@ void MemberDefImpl::writeTagFile(FTextStream &tagFile) const
{
tagFile << "\" static=\"yes";
}
- tagFile << "\">" << endl;
+ tagFile << "\">\n";
if (typeString()!=QCString("@"))
{
- tagFile << " <type>" << convertToXML(typeString()) << "</type>" << endl;
+ tagFile << " <type>" << convertToXML(typeString()) << "</type>\n";
}
- tagFile << " <name>" << convertToXML(name()) << "</name>" << endl;
- tagFile << " <anchorfile>" << convertToXML(getOutputFileBase()) << Doxygen::htmlFileExtension << "</anchorfile>" << endl;
- tagFile << " <anchor>" << convertToXML(anchor()) << "</anchor>" << endl;
+ tagFile << " <name>" << convertToXML(name()) << "</name>\n";
+ tagFile << " <anchorfile>" << convertToXML(getOutputFileBase()) << Doxygen::htmlFileExtension << "</anchorfile>\n";
+ tagFile << " <anchor>" << convertToXML(anchor()) << "</anchor>\n";
QCString idStr = id();
if (!idStr.isEmpty())
{
- tagFile << " <clangid>" << convertToXML(idStr) << "</clangid>" << endl;
+ tagFile << " <clangid>" << convertToXML(idStr) << "</clangid>\n";
}
- tagFile << " <arglist>" << convertToXML(argsString()) << "</arglist>" << endl;
+ tagFile << " <arglist>" << convertToXML(argsString()) << "</arglist>\n";
if (isStrong())
{
for (const auto &fmd : m_impl->enumFields)
@@ -4320,12 +4357,12 @@ void MemberDefImpl::writeTagFile(FTextStream &tagFile) const
{
tagFile << "\" clangid=\"" << convertToXML(idStr);
}
- tagFile << "\">" << convertToXML(fmd->name()) << "</enumvalue>" << endl;
+ tagFile << "\">" << convertToXML(fmd->name()) << "</enumvalue>\n";
}
}
}
writeDocAnchorsToTagFile(tagFile);
- tagFile << " </member>" << endl;
+ tagFile << " </member>\n";
}
void MemberDefImpl::_computeIsConstructor()
@@ -4557,12 +4594,12 @@ void MemberDefImpl::setTypeConstraints(const ArgumentList &al)
m_impl->typeConstraints = al;
}
-void MemberDefImpl::setType(const char *t)
+void MemberDefImpl::setType(const QCString &t)
{
m_impl->type = t;
}
-void MemberDefImpl::setAccessorType(ClassDef *cd,const char *t)
+void MemberDefImpl::setAccessorType(ClassDef *cd,const QCString &t)
{
m_impl->accessorClass = cd;
m_impl->accessorType = t;
@@ -4614,8 +4651,8 @@ bool MemberDefImpl::protectionVisible() const
#endif
#if 0
-void MemberDefImpl::setInbodyDocumentation(const char *docs,
- const char *docFile,int docLine)
+void MemberDefImpl::setInbodyDocumentation(const QCString &docs,
+ const QCString &docFile,int docLine)
{
m_impl->inbodyDocs = docs;
m_impl->inbodyDocs = m_impl->inbodyDocs.stripWhiteSpace();
@@ -4664,7 +4701,7 @@ void MemberDefImpl::setTagInfo(const TagInfo *ti)
{
if (ti)
{
- //printf("%s: Setting tag name=%s anchor=%s\n",name().data(),ti->tagName.data(),ti->anchor.data());
+ //printf("%s: Setting tag name=%s anchor=%s\n",qPrint(name()),qPrint(ti->tagName),qPrint(ti->anchor));
m_impl->anc=ti->anchor;
setReference(ti->tagName);
m_impl->explicitOutputFileBase = stripExtension(ti->fileName);
@@ -4688,37 +4725,37 @@ QCString MemberDefImpl::objCMethodName(bool localLink,bool showStatic) const
return qm;
}
-const char *MemberDefImpl::declaration() const
+QCString MemberDefImpl::declaration() const
{
return m_impl->decl;
}
-const char *MemberDefImpl::definition() const
+QCString MemberDefImpl::definition() const
{
return m_impl->def;
}
-const char *MemberDefImpl::extraTypeChars() const
+QCString MemberDefImpl::extraTypeChars() const
{
return m_impl->extraTypeChars;
}
-const char *MemberDefImpl::typeString() const
+QCString MemberDefImpl::typeString() const
{
return m_impl->type;
}
-const char *MemberDefImpl::argsString() const
+QCString MemberDefImpl::argsString() const
{
return m_impl->args;
}
-const char *MemberDefImpl::excpString() const
+QCString MemberDefImpl::excpString() const
{
return m_impl->exception;
}
-const char *MemberDefImpl::bitfieldString() const
+QCString MemberDefImpl::bitfieldString() const
{
return m_impl->bitfields;
}
@@ -4753,12 +4790,12 @@ const NamespaceDef* MemberDefImpl::getNamespaceDef() const
return m_impl->nspace;
}
-const char *MemberDefImpl::getReadAccessor() const
+QCString MemberDefImpl::getReadAccessor() const
{
return m_impl->read;
}
-const char *MemberDefImpl::getWriteAccessor() const
+QCString MemberDefImpl::getWriteAccessor() const
{
return m_impl->write;
}
@@ -4773,7 +4810,7 @@ Grouping::GroupPri_t MemberDefImpl::getGroupPri() const
return m_impl->grouppri;
}
-const char *MemberDefImpl::getGroupFileName() const
+QCString MemberDefImpl::getGroupFileName() const
{
return m_impl->groupFileName;
}
@@ -5330,7 +5367,7 @@ QCString MemberDefImpl::getCachedTypedefTemplSpec() const
QCString MemberDefImpl::getCachedResolvedTypedef() const
{
- //printf("MemberDefImpl::getCachedResolvedTypedef()=%s m_impl=%p\n",m_impl->cachedResolvedType.data(),m_impl);
+ //printf("MemberDefImpl::getCachedResolvedTypedef()=%s m_impl=%p\n",qPrint(m_impl->cachedResolvedType),m_impl);
return m_impl->cachedResolvedType;
}
@@ -5378,7 +5415,7 @@ void MemberDefImpl::setMemberType(MemberType t)
m_isLinkableCached = 0;
}
-void MemberDefImpl::setDefinition(const char *d)
+void MemberDefImpl::setDefinition(const QCString &d)
{
m_impl->def=d;
}
@@ -5407,7 +5444,7 @@ void MemberDefImpl::mergeMemberSpecifiers(uint64 s)
m_impl->memSpec|=s;
}
-void MemberDefImpl::setBitfields(const char *s)
+void MemberDefImpl::setBitfields(const QCString &s)
{
m_impl->bitfields = QCString(s).simplifyWhiteSpace();
}
@@ -5420,12 +5457,12 @@ void MemberDefImpl::setMaxInitLines(int lines)
}
}
-void MemberDefImpl::setReadAccessor(const char *r)
+void MemberDefImpl::setReadAccessor(const QCString &r)
{
m_impl->read=r;
}
-void MemberDefImpl::setWriteAccessor(const char *w)
+void MemberDefImpl::setWriteAccessor(const QCString &w)
{
m_impl->write=w;
}
@@ -5452,7 +5489,7 @@ void MemberDefImpl::setInheritsDocsFrom(const MemberDef *md)
m_impl->docProvider = md;
}
-void MemberDefImpl::setArgsString(const char *as)
+void MemberDefImpl::setArgsString(const QCString &as)
{
m_impl->args = as;
}
@@ -5599,6 +5636,15 @@ QCString MemberDefImpl::enumBaseType() const
return m_impl->enumBaseType;
}
+void MemberDefImpl::setRequiresClause(const QCString &req)
+{
+ m_impl->requiresClause = req;
+}
+
+QCString MemberDefImpl::requiresClause() const
+{
+ return m_impl->requiresClause;
+}
void MemberDefImpl::cacheTypedefVal(const ClassDef*val, const QCString & templSpec, const QCString &resolvedType)
{
@@ -5606,7 +5652,7 @@ void MemberDefImpl::cacheTypedefVal(const ClassDef*val, const QCString & templSp
m_impl->cachedTypedefValue=val;
m_impl->cachedTypedefTemplSpec=templSpec;
m_impl->cachedResolvedType=resolvedType;
- //printf("MemberDefImpl::cacheTypedefVal=%s m_impl=%p\n",m_impl->cachedResolvedType.data(),m_impl);
+ //printf("MemberDefImpl::cacheTypedefVal=%s m_impl=%p\n",qPrint(m_impl->cachedResolvedType),m_impl);
}
void MemberDefImpl::copyArgumentNames(const MemberDef *bmd)
@@ -5735,15 +5781,15 @@ static void transferArgumentDocumentation(ArgumentList &decAl,ArgumentList &defA
void combineDeclarationAndDefinition(MemberDefMutable *mdec,MemberDefMutable *mdef)
{
- //printf("mdec=%s isPrototype()=%d\n",mdec->name().data(),mdec->isPrototype());
+ //printf("mdec=%s isPrototype()=%d\n",qPrint(mdec->name()),mdec->isPrototype());
if (
(mdef->isFunction() && !mdef->isStatic() && !mdef->isPrototype()) ||
(mdef->isVariable() && !mdef->isExternal() && !mdef->isStatic())
)
{
//printf("mdef=(%p,%s) mdec=(%p,%s)\n",
- // mdef, mdef ? mdef->name().data() : "",
- // mdec, mdec ? mdec->name().data() : "");
+ // mdef, mdef ? qPrint(mdef->name()) : "",
+ // mdec, mdec ? qPrint(mdec->name()) : "");
ArgumentList &mdefAl = const_cast<ArgumentList&>(mdef->argumentList());
ArgumentList &mdecAl = const_cast<ArgumentList&>(mdec->argumentList());
@@ -5755,8 +5801,8 @@ void combineDeclarationAndDefinition(MemberDefMutable *mdec,MemberDefMutable *md
{
//printf("Found member %s: definition in %s (doc='%s') and declaration in %s (doc='%s')\n",
// mn->memberName(),
- // mdef->getFileDef()->name().data(),mdef->documentation().data(),
- // mdec->getFileDef()->name().data(),mdec->documentation().data()
+ // qPrint(mdef->getFileDef()->name()),qPrint(mdef->documentation()),
+ // qPrint(mdec->getFileDef()->name()),qPrint(mdec->documentation())
// );
if (Config_getBool(RESOLVE_UNNAMED_PARAMS))
@@ -5941,7 +5987,7 @@ bool MemberDefImpl::isReference() const
void addDocCrossReference(MemberDefMutable *src,MemberDefMutable *dst)
{
if (src==0 || dst==0) return;
- //printf("--> addDocCrossReference src=%s,dst=%s\n",src->name().data(),dst->name().data());
+ //printf("--> addDocCrossReference src=%s,dst=%s\n",qPrint(src->name()),qPrint(dst->name()));
if (dst->isTypedef() || dst->isEnumerate()) return; // don't add types
if ((dst->hasReferencedByRelation() || dst->hasCallerGraph()) &&
src->showInCallGraph()
diff --git a/src/memberdef.h b/src/memberdef.h
index abaf3ff..91b0c6d 100644
--- a/src/memberdef.h
+++ b/src/memberdef.h
@@ -36,7 +36,6 @@ class MemberGroup;
class ExampleList;
class OutputList;
class GroupDef;
-class QStrList;
struct TagInfo;
class MemberDefMutable;
class MemberGroupList;
@@ -65,13 +64,13 @@ class MemberDef : public Definition
virtual QCString getReference() const = 0;
virtual QCString anchor() const = 0;
- virtual const char *declaration() const = 0;
- virtual const char *definition() const = 0;
- virtual const char *typeString() const = 0;
- virtual const char *argsString() const = 0;
- virtual const char *excpString() const = 0;
- virtual const char *bitfieldString() const = 0;
- virtual const char *extraTypeChars() const = 0;
+ virtual QCString declaration() const = 0;
+ virtual QCString definition() const = 0;
+ virtual QCString typeString() const = 0;
+ virtual QCString argsString() const = 0;
+ virtual QCString excpString() const = 0;
+ virtual QCString bitfieldString() const = 0;
+ virtual QCString extraTypeChars() const = 0;
virtual const QCString &initializer() const = 0;
virtual int initializerLines() const = 0;
virtual uint64 getMemberSpecifiers() const = 0;
@@ -85,15 +84,16 @@ class MemberDef : public Definition
virtual const ClassDef *accessorClass() const = 0;
// grabbing the property read/write accessor names
- virtual const char *getReadAccessor() const = 0;
- virtual const char *getWriteAccessor() const = 0;
+ virtual QCString getReadAccessor() const = 0;
+ virtual QCString getWriteAccessor() const = 0;
// querying the grouping definition
virtual const GroupDef *getGroupDef() const = 0;
virtual Grouping::GroupPri_t getGroupPri() const = 0;
- virtual const char *getGroupFileName() const = 0;
+ virtual QCString getGroupFileName() const = 0;
virtual int getGroupStartLine() const = 0;
virtual bool getGroupHasDocs() const = 0;
+
virtual QCString qualifiedName() const = 0;
virtual QCString objCMethodName(bool localLink,bool showStatic) const = 0;
@@ -258,10 +258,12 @@ class MemberDef : public Definition
virtual QCString displayName(bool=TRUE) const = 0;
virtual QCString getDeclType() const = 0;
- virtual void getLabels(QStrList &sl,const Definition *container) const = 0;
+ virtual StringVector getLabels(const Definition *container) const = 0;
virtual const ArgumentList &typeConstraints() const = 0;
+ virtual QCString requiresClause() const = 0;
+
// overrules
virtual QCString documentation() const = 0;
virtual QCString briefDescription(bool abbr=FALSE) const = 0;
@@ -276,7 +278,7 @@ class MemberDef : public Definition
const std::unique_ptr<ArgumentList> &actualArgs) const = 0;
virtual void writeDeclaration(OutputList &ol,
const ClassDef *cd,const NamespaceDef *nd,const FileDef *fd,const GroupDef *gd,
- bool inGroup, const ClassDef *inheritFrom=0,const char *inheritId=0) const = 0;
+ bool inGroup, const ClassDef *inheritFrom=0,const QCString &inheritId=QCString()) const = 0;
virtual void writeEnumDeclaration(OutputList &typeDecl, const ClassDef *cd,
const NamespaceDef *nd,const FileDef *fd,const GroupDef *gd) const = 0;
virtual void detectUndocumentedParams(bool hasParamCommand,bool hasReturnCommand) const = 0;
@@ -297,29 +299,29 @@ class MemberDefMutable : public DefinitionMutable, public MemberDef
// set functions
virtual void setMemberType(MemberType t) = 0;
- virtual void setDefinition(const char *d) = 0;
+ virtual void setDefinition(const QCString &d) = 0;
virtual void setFileDef(const FileDef *fd) = 0;
virtual void setAnchor() = 0;
virtual void setProtection(Protection p) = 0;
virtual void setMemberSpecifiers(uint64 s) = 0;
virtual void mergeMemberSpecifiers(uint64 s) = 0;
- virtual void setInitializer(const char *i) = 0;
- virtual void setBitfields(const char *s) = 0;
+ virtual void setInitializer(const QCString &i) = 0;
+ virtual void setBitfields(const QCString &s) = 0;
virtual void setMaxInitLines(int lines) = 0;
virtual void setMemberClass(const ClassDef *cd) = 0;
virtual void setSectionList(const Definition *container,const MemberList *sl) = 0;
virtual void setGroupDef(const GroupDef *gd,Grouping::GroupPri_t pri,
const QCString &fileName,int startLine,bool hasDocs,
MemberDef *member=0) = 0;
- virtual void setReadAccessor(const char *r) = 0;
- virtual void setWriteAccessor(const char *w) = 0;
+ virtual void setReadAccessor(const QCString &r) = 0;
+ virtual void setWriteAccessor(const QCString &w) = 0;
virtual void setTemplateSpecialization(bool b) = 0;
virtual void makeRelated() = 0;
virtual void makeForeign() = 0;
virtual void setInheritsDocsFrom(const MemberDef *md) = 0;
virtual void setTagInfo(const TagInfo *i) = 0;
- virtual void setArgsString(const char *as) = 0;
+ virtual void setArgsString(const QCString &as) = 0;
virtual void incrementFlowKeyWordCount() = 0;
virtual void setEnumBaseType(const QCString &type) = 0;
@@ -337,7 +339,7 @@ class MemberDefMutable : public DefinitionMutable, public MemberDef
virtual void setAnonymousEnumType(const MemberDef *md) = 0;
// example related members
- virtual bool addExample(const char *anchor,const char *name,const char *file) = 0;
+ virtual bool addExample(const QCString &anchor,const QCString &name,const QCString &file) = 0;
// prototype related members
virtual void setPrototype(bool p,const QCString &df,int line, int column) = 0;
@@ -350,8 +352,8 @@ class MemberDefMutable : public DefinitionMutable, public MemberDef
virtual void resolveUnnamedParameters(const MemberDef *md) = 0;
virtual void setDefinitionTemplateParameterLists(const ArgumentLists &lists) = 0;
virtual void setTypeConstraints(const ArgumentList &al) = 0;
- virtual void setType(const char *t) = 0;
- virtual void setAccessorType(ClassDef *cd,const char *t) = 0;
+ virtual void setType(const QCString &t) = 0;
+ virtual void setAccessorType(ClassDef *cd,const QCString &t) = 0;
// namespace related members
virtual void setNamespace(const NamespaceDef *nd) = 0;
@@ -388,12 +390,14 @@ class MemberDefMutable : public DefinitionMutable, public MemberDef
virtual void setCategory(ClassDef *) = 0;
virtual void setCategoryRelation(const MemberDef *) = 0;
- virtual void setDocumentation(const char *d,const char *docFile,int docLine,bool stripWhiteSpace=TRUE) = 0;
- virtual void setBriefDescription(const char *b,const char *briefFile,int briefLine) = 0;
- virtual void setInbodyDocumentation(const char *d,const char *inbodyFile,int inbodyLine) = 0;
+ virtual void setDocumentation(const QCString &d,const QCString &docFile,int docLine,bool stripWhiteSpace=TRUE) = 0;
+ virtual void setBriefDescription(const QCString &b,const QCString &briefFile,int briefLine) = 0;
+ virtual void setInbodyDocumentation(const QCString &d,const QCString &inbodyFile,int inbodyLine) = 0;
virtual void setHidden(bool b) = 0;
+ virtual void setRequiresClause(const QCString &req) = 0;
+
//-----------------------------------------------------------------------------------
// --- actions ----
//-----------------------------------------------------------------------------------
@@ -406,11 +410,11 @@ class MemberDefMutable : public DefinitionMutable, public MemberDef
//-----------------------------------------------------------------------------------
virtual void writeDocumentation(const MemberList *ml,int memCount,int memTotal,OutputList &ol,
- const char *scopeName,const Definition *container,
+ const QCString &scopeName,const Definition *container,
bool inGroup,bool showEnumValues=FALSE,bool
showInline=FALSE) const = 0;
virtual void writeMemberDocSimple(OutputList &ol,const Definition *container) const = 0;
- virtual void writeTagFile(FTextStream &) const = 0;
+ virtual void writeTagFile(TextStream &) const = 0;
virtual void writeLink(OutputList &ol,
const ClassDef *cd,const NamespaceDef *nd,const FileDef *fd,const GroupDef *gd,
bool onlyText=FALSE) const = 0;
@@ -438,11 +442,11 @@ MemberDefMutable *toMemberDefMutable(const Definition *d);
/** Factory method to create a new instance of a MemberDef */
-MemberDefMutable *createMemberDef(const char *defFileName,int defLine,int defColumn,
- const char *type,const char *name,const char *args,
- const char *excp,Protection prot,Specifier virt,bool stat,
+MemberDefMutable *createMemberDef(const QCString &defFileName,int defLine,int defColumn,
+ const QCString &type,const QCString &name,const QCString &args,
+ const QCString &excp,Protection prot,Specifier virt,bool stat,
Relationship related,MemberType t,const ArgumentList &tal,
- const ArgumentList &al,const char *metaData);
+ const ArgumentList &al,const QCString &metaData);
MemberDef *createMemberDefAlias(const Definition *newScope,const MemberDef *aliasMd);
diff --git a/src/membergroup.cpp b/src/membergroup.cpp
index 77f5842..641a317 100644
--- a/src/membergroup.cpp
+++ b/src/membergroup.cpp
@@ -29,14 +29,14 @@
#include "entry.h"
#include "md5.h"
-MemberGroup::MemberGroup(const Definition *container,int id,const char *hdr,const char *d,const char *docFile,int docLine)
+MemberGroup::MemberGroup(const Definition *container,int id,const QCString &hdr,const QCString &d,const QCString &docFile,int docLine)
: m_container(container),
memberList(std::make_unique<MemberList>(MemberListType_memberGroup)),
grpId(id), grpHeader(hdr), doc(d), m_docFile(docFile), m_docLine(docLine)
{
//printf("New member group id=%d header=%s desc=%s\n",id,hdr,d);
memberList->setNeedsSorting(Config_getBool(SORT_BRIEF_DOCS)); // detailed sections are already sorted elsewhere.
- //printf("Member group docs='%s'\n",doc.data());
+ //printf("Member group docs='%s'\n",qPrint(doc));
}
MemberGroup::~MemberGroup()
@@ -50,7 +50,7 @@ void MemberGroup::insertMember(const MemberDef *md)
// memberList->first() ? memberList->first()->getSectionList() : 0,
// memberList->count(),
// md->getSectionList(),
- // md,md->name().data());
+ // md,qPrint(md->name()));
const MemberDef *firstMd = memberList->empty() ? 0 : memberList->front();
if (inSameSection && firstMd &&
@@ -91,7 +91,7 @@ void MemberGroup::writeDeclarations(OutputList &ol,
const ClassDef *cd,const NamespaceDef *nd,const FileDef *fd,const GroupDef *gd,
bool showInline) const
{
- //printf("MemberGroup::writeDeclarations() %s\n",grpHeader.data());
+ //printf("MemberGroup::writeDeclarations() %s\n",qPrint(grpHeader));
QCString ldoc = doc;
if (!ldoc.isEmpty()) ldoc.prepend("<a name=\""+anchor()+"\" id=\""+anchor()+"\"></a>");
memberList->writeDeclarations(ol,cd,nd,fd,gd,grpHeader,ldoc,FALSE,showInline);
@@ -99,21 +99,21 @@ void MemberGroup::writeDeclarations(OutputList &ol,
void MemberGroup::writePlainDeclarations(OutputList &ol,
const ClassDef *cd,const NamespaceDef *nd,const FileDef *fd,const GroupDef *gd,
- const ClassDef *inheritedFrom,const char *inheritId
+ const ClassDef *inheritedFrom,const QCString &inheritId
) const
{
//printf("MemberGroup::writePlainDeclarations() memberList->count()=%d\n",memberList->count());
memberList->writePlainDeclarations(ol,cd,nd,fd,gd,inheritedFrom,inheritId);
}
-void MemberGroup::writeDocumentation(OutputList &ol,const char *scopeName,
+void MemberGroup::writeDocumentation(OutputList &ol,const QCString &scopeName,
const Definition *container,bool showEnumValues,bool showInline) const
{
- //printf("MemberGroup::writeDocumentation() %s\n",grpHeader.data());
- memberList->writeDocumentation(ol,scopeName,container,0,showEnumValues,showInline);
+ //printf("MemberGroup::writeDocumentation() %s\n",qPrint(grpHeader));
+ memberList->writeDocumentation(ol,scopeName,container,QCString(),showEnumValues,showInline);
}
-void MemberGroup::writeDocumentationPage(OutputList &ol,const char *scopeName,
+void MemberGroup::writeDocumentationPage(OutputList &ol,const QCString &scopeName,
const DefinitionMutable *container) const
{
memberList->writeDocumentationPage(ol,scopeName,container);
@@ -196,11 +196,11 @@ int MemberGroup::countInheritableMembers(const ClassDef *inheritedFrom) const
void MemberGroup::distributeMemberGroupDocumentation()
{
- //printf("MemberGroup::distributeMemberGroupDocumentation() %s\n",grpHeader.data());
+ //printf("MemberGroup::distributeMemberGroupDocumentation() %s\n",qPrint(grpHeader));
const MemberDef *md = 0;
for (const auto &smd : *memberList)
{
- //printf("checking md=%s\n",md->name().data());
+ //printf("checking md=%s\n",qPrint(md->name()));
// find the first member of the group with documentation
if (!smd->documentation().isEmpty() ||
!smd->briefDescription().isEmpty() ||
@@ -214,7 +214,7 @@ void MemberGroup::distributeMemberGroupDocumentation()
}
if (md) // distribute docs of md to other members of the list
{
- //printf("Member %s has documentation!\n",md->name().data());
+ //printf("Member %s has documentation!\n",qPrint(md->name()));
for (const auto &iomd : *memberList)
{
MemberDefMutable *omd = toMemberDefMutable(iomd);
@@ -223,7 +223,7 @@ void MemberGroup::distributeMemberGroupDocumentation()
omd->inbodyDocumentation().isEmpty()
)
{
- //printf("Copying documentation to member %s\n",omd->name().data());
+ //printf("Copying documentation to member %s\n",qPrint(omd->name()));
omd->setBriefDescription(md->briefDescription(),md->briefFile(),md->briefLine());
omd->setDocumentation(md->documentation(),md->docFile(),md->docLine());
omd->setInbodyDocumentation(md->inbodyDocumentation(),md->inbodyFile(),md->inbodyLine());
@@ -262,12 +262,12 @@ void MemberGroup::setInGroup(bool b)
QCString MemberGroup::anchor() const
{
uchar md5_sig[16];
- QCString sigStr(33);
+ char sigStr[33];
QCString locHeader = grpHeader;
if (locHeader.isEmpty()) locHeader="[NOHEADER]";
MD5Buffer((const unsigned char *)locHeader.data(),locHeader.length(),md5_sig);
- MD5SigToString(md5_sig,sigStr.rawData(),33);
- return "amgrp"+sigStr;
+ MD5SigToString(md5_sig,sigStr);
+ return QCString("amgrp")+sigStr;
}
void MemberGroup::addListReferences(Definition *def)
@@ -280,7 +280,7 @@ void MemberGroup::addListReferences(Definition *def)
name,
theTranslator->trGroup(TRUE,TRUE),
name,
- grpHeader,0,def);
+ grpHeader,QCString(),def);
}
}
@@ -295,7 +295,7 @@ void MemberGroup::setRefItems(const RefItemVector &sli)
m_xrefListItems.insert(m_xrefListItems.end(), sli.cbegin(), sli.cend());
}
-void MemberGroup::writeTagFile(FTextStream &tagFile)
+void MemberGroup::writeTagFile(TextStream &tagFile)
{
memberList->writeTagFile(tagFile);
}
diff --git a/src/membergroup.h b/src/membergroup.h
index b258a04..31705c0 100644
--- a/src/membergroup.h
+++ b/src/membergroup.h
@@ -36,16 +36,16 @@ class GroupDef;
class OutputList;
class Definition;
class DefinitionMutable;
-class FTextStream;
class RefItem;
+class TextStream;
/** A class representing a group of members. */
class MemberGroup
{
public:
//MemberGroup();
- MemberGroup(const Definition *container,int id,const char *header,
- const char *docs,const char *docFile,int docLine);
+ MemberGroup(const Definition *container,int id,const QCString &header,
+ const QCString &docs,const QCString &docFile,int docLine);
~MemberGroup();
QCString header() const { return grpHeader; }
int groupId() const { return grpId; }
@@ -53,15 +53,15 @@ class MemberGroup
void setAnchors();
void writePlainDeclarations(OutputList &ol,
const ClassDef *cd,const NamespaceDef *nd,const FileDef *fd,const GroupDef *gd,
- const ClassDef *inheritedFrom,const char *inheritId) const;
+ const ClassDef *inheritedFrom,const QCString &inheritId) const;
void writeDeclarations(OutputList &ol,
const ClassDef *cd,const NamespaceDef *nd,const FileDef *fd,const GroupDef *gd,
bool showInline=FALSE) const;
- void writeDocumentation(OutputList &ol,const char *scopeName,
+ void writeDocumentation(OutputList &ol,const QCString &scopeName,
const Definition *container,bool showEnumValues,bool showInline) const;
- void writeDocumentationPage(OutputList &ol,const char *scopeName,
+ void writeDocumentationPage(OutputList &ol,const QCString &scopeName,
const DefinitionMutable *container) const;
- void writeTagFile(FTextStream &);
+ void writeTagFile(TextStream &);
void addGroupedInheritedMembers(OutputList &ol,const ClassDef *cd,
MemberListType lt,
const ClassDef *inheritedFrom,const QCString &inheritId) const;
diff --git a/src/memberlist.cpp b/src/memberlist.cpp
index 8d07ae4..bd89739 100644
--- a/src/memberlist.cpp
+++ b/src/memberlist.cpp
@@ -73,7 +73,7 @@ int genericCompareMembers(const MemberDef *c1,const MemberDef *c2)
// sort on name
int cmp = qstricmp(c1->name(),c2->name());
// then on argument list
- if (cmp==0 && c1->argsString() && c2->argsString())
+ if (cmp==0 && !c1->argsString().isEmpty() && !c2->argsString().isEmpty())
{
cmp = qstricmp(c1->argsString(),c2->argsString());
}
@@ -100,8 +100,8 @@ int MemberList::countInheritableMembers(const ClassDef *inheritedFrom) const
if (md->memberType()!=MemberType_Friend &&
md->memberType()!=MemberType_EnumValue)
{
- //printf("member %s: isReimplementedBy(%s)=%d\n",md->name().data(),
- // inheritedFrom->name().data(),
+ //printf("member %s: isReimplementedBy(%s)=%d\n",qPrint(md->name()),
+ // qPrint(inheritedFrom->name()),
// md->isReimplementedBy(inheritedFrom));
if (md->memberType()==MemberType_Function)
{
@@ -119,8 +119,8 @@ int MemberList::countInheritableMembers(const ClassDef *inheritedFrom) const
count+=mg->countInheritableMembers(inheritedFrom);
}
//printf("%s::countInheritableMembers(%s)=%d\n",
- // listTypeAsString().data(),
- // inheritedFrom->name().data(),count);
+ // qPrint(listTypeAsString()),
+ // qPrint(inheritedFrom->name()),count);
return count;
}
@@ -139,7 +139,7 @@ void MemberList::countDecMembers()
m_numDecMembers=0;
for (const auto &md : m_members)
{
- //printf("MemberList::countDecMembers(md=%s,%d)\n",md->name().data(),md->isBriefSectionVisible());
+ //printf("MemberList::countDecMembers(md=%s,%d)\n",qPrint(md->name()),md->isBriefSectionVisible());
if (md->isBriefSectionVisible())
{
switch(md->memberType())
@@ -176,7 +176,7 @@ void MemberList::countDecMembers()
break;
//case MemberType_Prototype: m_protoCnt++,m_numDecMembers++; break;
case MemberType_Define: if (Config_getBool(EXTRACT_ALL) ||
- md->argsString() ||
+ !md->argsString().isEmpty() ||
!md->initializer().isEmpty() ||
md->hasDocumentation()
) /*m_defCnt++,*/ m_numDecMembers++;
@@ -185,7 +185,7 @@ void MemberList::countDecMembers()
m_numDecMembers++;
break;
default:
- err("Unknown member type found for member '%s'\n!",md->name().data());
+ err("Unknown member type found for member '%s'\n!",qPrint(md->name()));
}
}
}
@@ -340,7 +340,7 @@ bool MemberList::declVisible() const
void MemberList::writePlainDeclarations(OutputList &ol,
const ClassDef *cd,const NamespaceDef *nd,const FileDef *fd,
- const GroupDef *gd,const ClassDef *inheritedFrom,const char *inheritId
+ const GroupDef *gd,const ClassDef *inheritedFrom,const QCString &inheritId
) const
{
//printf("----- writePlainDeclaration() ----\n");
@@ -363,7 +363,7 @@ void MemberList::writePlainDeclarations(OutputList &ol,
for (const auto &md : m_members)
{
//printf(">>> Member '%s' type=%d visible=%d\n",
- // md->name().data(),md->memberType(),md->isBriefSectionVisible());
+ // qPrint(md->name()),md->memberType(),md->isBriefSectionVisible());
if ((inheritedFrom==0 || !md->isReimplementedBy(inheritedFrom)) &&
md->isBriefSectionVisible())
{
@@ -406,7 +406,7 @@ void MemberList::writePlainDeclarations(OutputList &ol,
bool detailsLinkable = md->isDetailedSectionLinkable();
if (!detailsLinkable)
{
- ol.startDoxyAnchor(md->getOutputFileBase(),0,md->anchor(),md->name(),QCString());
+ ol.startDoxyAnchor(md->getOutputFileBase(),QCString(),md->anchor(),md->name(),QCString());
}
if (md->isSliceLocal())
{
@@ -431,7 +431,7 @@ void MemberList::writePlainDeclarations(OutputList &ol,
cd,md,
md->briefDescription(),
TRUE,FALSE,
- 0,TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT)
+ QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT)
);
if (rootNode && !rootNode->isEmpty())
{
@@ -532,7 +532,7 @@ void MemberList::writePlainDeclarations(OutputList &ol,
*/
void MemberList::writeDeclarations(OutputList &ol,
const ClassDef *cd,const NamespaceDef *nd,const FileDef *fd,const GroupDef *gd,
- const char *title,const char *subtitle, bool showEnumValues,
+ const QCString &title,const QCString &subtitle, bool showEnumValues,
bool showInline,const ClassDef *inheritedFrom,MemberListType lt) const
{
(void)showEnumValues; // unused
@@ -561,7 +561,7 @@ void MemberList::writeDeclarations(OutputList &ol,
ol.disableAllBut(OutputGenerator::Html);
inheritId = substitute(listTypeAsString(lt),"-","_")+"_"+
stripPath(cd->getOutputFileBase());
- if (title)
+ if (!title.isEmpty())
{
ol.writeInheritedSectionTitle(inheritId,cd->getReference(),
cd->getOutputFileBase(),
@@ -572,7 +572,7 @@ void MemberList::writeDeclarations(OutputList &ol,
}
else if (num>numEnumValues)
{
- if (title)
+ if (!title.isEmpty())
{
if (showInline)
{
@@ -592,17 +592,12 @@ void MemberList::writeDeclarations(OutputList &ol,
ol.endMemberHeader();
}
}
- if (subtitle)
+ if (!subtitle.stripWhiteSpace().isEmpty())
{
- QCString st=subtitle;
- st = st.stripWhiteSpace();
- if (!st.isEmpty())
- {
- ol.startMemberSubtitle();
- ol.generateDoc("[generated]",-1,ctx,0,subtitle,FALSE,FALSE,
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
- ol.endMemberSubtitle();
- }
+ ol.startMemberSubtitle();
+ ol.generateDoc("[generated]",-1,ctx,0,subtitle,FALSE,FALSE,
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ ol.endMemberSubtitle();
}
}
if (num>numEnumValues)
@@ -628,7 +623,7 @@ void MemberList::writeDeclarations(OutputList &ol,
bool hasHeader=!mg->header().isEmpty() && mg->header()!="[NOHEADER]";
if (inheritId.isEmpty())
{
- //printf("mg->header=%s hasHeader=%d\n",mg->header().data(),hasHeader);
+ //printf("mg->header=%s hasHeader=%d\n",qPrint(mg->header()),hasHeader);
ol.startMemberGroupHeader(hasHeader);
if (hasHeader)
{
@@ -640,7 +635,7 @@ void MemberList::writeDeclarations(OutputList &ol,
//printf("Member group has docs!\n");
ol.startMemberGroupDocs();
ol.generateDoc(mg->docFile(),mg->docLine(),ctx,0,mg->documentation()+"\n",FALSE,FALSE,
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
ol.endMemberGroupDocs();
}
ol.startMemberGroup();
@@ -667,8 +662,8 @@ void MemberList::writeDeclarations(OutputList &ol,
}
void MemberList::writeDocumentation(OutputList &ol,
- const char *scopeName, const Definition *container,
- const char *title,bool showEnumValues,bool showInline) const
+ const QCString &scopeName, const Definition *container,
+ const QCString &title,bool showEnumValues,bool showInline) const
{
if (numDocMembers()==-1)
{
@@ -679,7 +674,7 @@ void MemberList::writeDocumentation(OutputList &ol,
if (numDocMembers()==0) return;
if (!showEnumValues && numDocMembers()<=numDocEnumValues()) return;
- if (title)
+ if (!title.isEmpty())
{
ol.pushGeneratorState();
ol.disable(OutputGenerator::Html);
@@ -703,7 +698,7 @@ void MemberList::writeDocumentation(OutputList &ol,
if (md->isDetailedSectionVisible(m_inGroup,container->definitionType()==Definition::TypeFile) &&
!(md->isEnumValue() && !showInline))
{
- auto it = overloadInfo.insert(std::make_pair(md->name(),OverloadInfo())).first;
+ auto it = overloadInfo.insert(std::make_pair(md->name().str(),OverloadInfo())).first;
it->second.total++;
}
}
@@ -758,7 +753,7 @@ void MemberList::writeSimpleDocumentation(OutputList &ol,
// separate member pages
void MemberList::writeDocumentationPage(OutputList &ol,
- const char *scopeName, const DefinitionMutable *container) const
+ const QCString &scopeName, const DefinitionMutable *container) const
{
static bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
@@ -774,9 +769,9 @@ void MemberList::writeDocumentationPage(OutputList &ol,
{
MemberDefMutable *md = toMemberDefMutable(imd);
- if (md->isDetailedSectionLinkable())
+ if (md && md->isDetailedSectionLinkable())
{
- auto it = overloadInfo.insert(std::make_pair(md->name(),OverloadInfo())).first;
+ auto it = overloadInfo.insert(std::make_pair(md->name().str(),OverloadInfo())).first;
it->second.total++;
}
}
@@ -785,7 +780,7 @@ void MemberList::writeDocumentationPage(OutputList &ol,
{
Definition *container_d = toDefinition(const_cast<DefinitionMutable*>(container));
MemberDefMutable *md = toMemberDefMutable(imd);
- if (md->isDetailedSectionLinkable())
+ if (md && md->isDetailedSectionLinkable())
{
auto it = overloadInfo.find(md->name().str());
uint overloadCount = it->second.total;
@@ -856,7 +851,7 @@ void MemberList::addListReferences(Definition *def)
MemberDefMutable *vmdm = toMemberDefMutable(vmd);
if (vmdm)
{
- //printf(" adding %s\n",vmd->name().data());
+ //printf(" adding %s\n",qPrint(vmd->name()));
vmdm->addListReference(def);
}
}
@@ -948,7 +943,7 @@ QCString MemberList::listTypeAsString(MemberListType type)
return "";
}
-void MemberList::writeTagFile(FTextStream &tagFile)
+void MemberList::writeTagFile(TextStream &tagFile)
{
for (const auto &imd : m_members)
{
diff --git a/src/memberlist.h b/src/memberlist.h
index aef227a..33920d5 100644
--- a/src/memberlist.h
+++ b/src/memberlist.h
@@ -88,19 +88,19 @@ class MemberList
int countInheritableMembers(const ClassDef *inheritedFrom) const;
void writePlainDeclarations(OutputList &ol,
const ClassDef *cd,const NamespaceDef *nd,const FileDef *fd, const GroupDef *gd,
- const ClassDef *inheritedFrom,const char *inheritId) const;
+ const ClassDef *inheritedFrom,const QCString &inheritId) const;
void writeDeclarations(OutputList &ol,
const ClassDef *cd,const NamespaceDef *nd,const FileDef *fd,const GroupDef *gd,
- const char *title,const char *subtitle,
+ const QCString &title,const QCString &subtitle,
bool showEnumValues=FALSE,bool showInline=FALSE,
const ClassDef *inheritedFrom=0,MemberListType lt=MemberListType_pubMethods) const;
- void writeDocumentation(OutputList &ol,const char *scopeName,
- const Definition *container,const char *title,
+ void writeDocumentation(OutputList &ol,const QCString &scopeName,
+ const Definition *container,const QCString &title,
bool showEnumValues=FALSE,bool showInline=FALSE) const;
void writeSimpleDocumentation(OutputList &ol,const Definition *container) const;
void writeDocumentationPage(OutputList &ol,
- const char *scopeName, const DefinitionMutable *container) const;
- void writeTagFile(FTextStream &);
+ const QCString &scopeName, const DefinitionMutable *container) const;
+ void writeTagFile(TextStream &);
bool declVisible() const;
void addMemberGroup(MemberGroup *mg);
void setInGroup(bool inGroup) { m_inGroup=inGroup; }
diff --git a/src/membername.h b/src/membername.h
index 2141d22..f600c8b 100644
--- a/src/membername.h
+++ b/src/membername.h
@@ -31,8 +31,8 @@ class MemberName
using reverse_iterator = typename Vec::reverse_iterator;
using const_reverse_iterator = typename Vec::const_reverse_iterator;
- MemberName(const char *name) : m_name(name) {}
- const char *memberName() const { return m_name; }
+ MemberName(const QCString &name) : m_name(name) {}
+ QCString memberName() const { return m_name; }
iterator begin() { return m_members.begin(); }
iterator end() { return m_members.end(); }
@@ -103,8 +103,8 @@ class MemberNameInfo
using iterator = typename Vec::iterator;
using const_iterator = typename Vec::const_iterator;
- MemberNameInfo(const char *name) : m_name(name) {}
- const char *memberName() const { return m_name; }
+ MemberNameInfo(const QCString &name) : m_name(name) {}
+ QCString memberName() const { return m_name; }
iterator begin() { return m_members.begin(); }
iterator end() { return m_members.end(); }
diff --git a/src/message.cpp b/src/message.cpp
index 6c7c8ac..c973de6 100644
--- a/src/message.cpp
+++ b/src/message.cpp
@@ -45,7 +45,7 @@ void initWarningFormat()
if (!Config_getString(WARN_LOGFILE).isEmpty())
{
- warnFile = Portable::fopen(Config_getString(WARN_LOGFILE),"w");
+ warnFile = Portable::fopen(Config_getString(WARN_LOGFILE).data(),"w");
}
if (!warnFile) // point it to something valid, because warn() relies on it
{
@@ -79,9 +79,9 @@ void msg(const char *fmt, ...)
}
}
-static void format_warn(const char *file,int line,const char *text)
+static void format_warn(const QCString &file,int line,const QCString &text)
{
- QCString fileSubst = file==0 ? "<unknown>" : file;
+ QCString fileSubst = file.isEmpty() ? "<unknown>" : file;
QCString lineSubst; lineSubst.setNum(line);
QCString textSubst = text;
QCString versionSubst;
@@ -122,15 +122,17 @@ static void handle_warn_as_error()
{
if (warnBehavior == WARN_YES)
{
- std::unique_lock<std::mutex> lock(g_mutex);
- QCString msgText = " (warning treated as error, aborting now)\n";
- fwrite(msgText.data(),1,msgText.length(),warnFile);
+ {
+ std::unique_lock<std::mutex> lock(g_mutex);
+ QCString msgText = " (warning treated as error, aborting now)\n";
+ fwrite(msgText.data(),1,msgText.length(),warnFile);
+ }
exit(1);
}
warnStat = true;
}
-static void do_warn(bool enabled, const char *file, int line, const char *prefix, const char *fmt, va_list args)
+static void do_warn(bool enabled, const QCString &file, int line, const char *prefix, const char *fmt, va_list args)
{
if (!enabled) return; // warning type disabled
@@ -147,18 +149,17 @@ static void do_warn(bool enabled, const char *file, int line, const char *prefix
// prefix
// 1 position for `\0`
int bufSize = vsnprintf(NULL, 0, fmt, args) + l + 1;
- char *text = (char *)malloc(sizeof(char) * bufSize);
+ QCString text(bufSize);
if (prefix)
{
- qstrncpy(text,prefix,bufSize);
+ qstrncpy(text.rawData(),prefix,bufSize);
}
- vsnprintf(text+l, bufSize-l, fmt, argsCopy);
+ vsnprintf(text.rawData()+l, bufSize-l, fmt, argsCopy);
text[bufSize-1]='\0';
format_warn(file,line,text);
- free(text);
}
-void warn(const char *file,int line,const char *fmt, ...)
+void warn(const QCString &file,int line,const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
@@ -166,18 +167,18 @@ void warn(const char *file,int line,const char *fmt, ...)
va_end(args);
}
-void va_warn(const char *file,int line,const char *fmt,va_list args)
+void va_warn(const QCString &file,int line,const char *fmt,va_list args)
{
do_warn(Config_getBool(WARNINGS), file, line, warning_str, fmt, args);
}
-void warn_simple(const char *file,int line,const char *text)
+void warn_simple(const QCString &file,int line,const char *text)
{
if (!Config_getBool(WARNINGS)) return; // warning type disabled
format_warn(file,line,QCString(warning_str) + text);
}
-void warn_undoc(const char *file,int line,const char *fmt, ...)
+void warn_undoc(const QCString &file,int line,const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
@@ -185,7 +186,7 @@ void warn_undoc(const char *file,int line,const char *fmt, ...)
va_end(args);
}
-void warn_incomplete_doc(const char *file,int line,const char *fmt, ...)
+void warn_incomplete_doc(const QCString &file,int line,const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
@@ -193,7 +194,7 @@ void warn_incomplete_doc(const char *file,int line,const char *fmt, ...)
va_end(args);
}
-void warn_doc_error(const char *file,int line,const char *fmt, ...)
+void warn_doc_error(const QCString &file,int line,const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
@@ -219,7 +220,7 @@ void err(const char *fmt, ...)
handle_warn_as_error();
}
-extern void err_full(const char *file,int line,const char *fmt, ...)
+extern void err_full(const QCString &file,int line,const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
diff --git a/src/message.h b/src/message.h
index aa63ecb..3c3ccd9 100644
--- a/src/message.h
+++ b/src/message.h
@@ -17,6 +17,7 @@
#define MESSAGE_H
#include <cstdarg>
+#include "qcstring.h"
#ifdef __GNUC__
#define PRINTFLIKE(FORMAT, PARAM ) __attribute__((format(printf, FORMAT, PARAM)))
@@ -25,15 +26,15 @@
#endif
extern void msg(const char *fmt, ...) PRINTFLIKE(1,2);
-extern void warn(const char *file,int line,const char *fmt, ...) PRINTFLIKE(3, 4);
-extern void va_warn(const char* file, int line, const char* fmt, va_list args);
-extern void warn_simple(const char *file,int line,const char *text);
-extern void warn_undoc(const char *file,int line,const char *fmt, ...) PRINTFLIKE(3, 4);
-extern void warn_incomplete_doc(const char *file,int line,const char *fmt, ...) PRINTFLIKE(3, 4);
-extern void warn_doc_error(const char *file,int line,const char *fmt, ...) PRINTFLIKE(3, 4);
+extern void warn(const QCString &file,int line,const char *fmt, ...) PRINTFLIKE(3, 4);
+extern void va_warn(const QCString &file, int line, const char* fmt, va_list args);
+extern void warn_simple(const QCString &file,int line,const char *text);
+extern void warn_undoc(const QCString &file,int line,const char *fmt, ...) PRINTFLIKE(3, 4);
+extern void warn_incomplete_doc(const QCString &file,int line,const char *fmt, ...) PRINTFLIKE(3, 4);
+extern void warn_doc_error(const QCString &file,int line,const char *fmt, ...) PRINTFLIKE(3, 4);
extern void warn_uncond(const char *fmt, ...) PRINTFLIKE(1, 2);
extern void err(const char *fmt, ...) PRINTFLIKE(1, 2);
-extern void err_full(const char *file,int line,const char *fmt, ...) PRINTFLIKE(3, 4);
+extern void err_full(const QCString &file,int line,const char *fmt, ...) PRINTFLIKE(3, 4);
extern void term(const char *fmt, ...) PRINTFLIKE(1, 2);
void initWarningFormat();
void warn_flush();
diff --git a/src/msc.cpp b/src/msc.cpp
index 29c9334..b486389 100644
--- a/src/msc.cpp
+++ b/src/msc.cpp
@@ -1,12 +1,10 @@
/******************************************************************************
*
- *
- *
- * Copyright (C) 1997-2015 by Dimitri van Heesch.
+ * Copyright (C) 1997-2021 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
- * documentation under the terms of the GNU General Public License is hereby
- * granted. No representations are made about the suitability of this software
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
@@ -15,6 +13,8 @@
*
*/
+#include <sstream>
+
#include "msc.h"
#include "portable.h"
#include "config.h"
@@ -23,44 +23,41 @@
#include "doxygen.h"
#include "index.h"
#include "util.h"
-#include "ftextstream.h"
#include "mscgen_api.h"
-
-#include <qdir.h>
+#include "dir.h"
+#include "textstream.h"
static const int maxCmdLine = 40960;
-static bool convertMapFile(FTextStream &t,const char *mapName,const QCString relPath,
+static bool convertMapFile(TextStream &t,const QCString &mapName,const QCString &relPath,
const QCString &context)
{
- QFile f(mapName);
- if (!f.open(IO_ReadOnly))
+ std::ifstream f(mapName.str(),std::ifstream::in);
+ if (!f.is_open())
{
err("failed to open map file %s for inclusion in the docs!\n"
"If you installed Graphviz/dot after a previous failing run, \n"
- "try deleting the output directory and rerun doxygen.\n",mapName);
- return FALSE;
+ "try deleting the output directory and rerun doxygen.\n",qPrint(mapName));
+ return false;
}
const int maxLineLen=1024;
- char buf[maxLineLen];
char url[maxLineLen];
char ref[maxLineLen];
int x1,y1,x2,y2;
- while (!f.atEnd())
+ std::string line;
+ while (getline(f,line))
{
- bool isRef = FALSE;
- int numBytes = f.readLine(buf,maxLineLen);
- buf[numBytes-1]='\0';
- //printf("ReadLine '%s'\n",buf);
- if (qstrncmp(buf,"rect",4)==0)
+ bool isRef = false;
+ //printf("ReadLine '%s'\n",line.c_str());
+ if (qstrncmp(line.c_str(),"rect",4)==0)
{
// obtain the url and the coordinates in the order used by graphviz-1.5
- sscanf(buf,"rect %s %d,%d %d,%d",url,&x1,&y1,&x2,&y2);
+ sscanf(line.c_str(),"rect %s %d,%d %d,%d",url,&x1,&y1,&x2,&y2);
if (qstrcmp(url,"\\ref")==0 || qstrcmp(url,"@ref")==0)
{
- isRef = TRUE;
- sscanf(buf,"rect %s %s %d,%d %d,%d",ref,url,&x1,&y1,&x2,&y2);
+ isRef = true;
+ sscanf(line.c_str(),"rect %s %s %d,%d %d,%d",ref,url,&x1,&y1,&x2,&y2);
}
// sanity checks
@@ -84,15 +81,15 @@ static bool convertMapFile(FTextStream &t,const char *mapName,const QCString rel
}
t << "\" shape=\"rect\" coords=\""
<< x1 << "," << y1 << "," << x2 << "," << y2 << "\""
- << " alt=\"\"/>" << endl;
+ << " alt=\"\"/>\n";
}
}
- return TRUE;
+ return true;
}
-void writeMscGraphFromFile(const char *inFile,const char *outDir,
- const char *outFile,MscOutputFormat format)
+void writeMscGraphFromFile(const QCString &inFile,const QCString &outDir,
+ const QCString &outFile,MscOutputFormat format)
{
QCString absOutFile = outDir;
absOutFile+=Portable::pathSeparator();
@@ -118,10 +115,10 @@ void writeMscGraphFromFile(const char *inFile,const char *outDir,
return;
}
int code;
- if ((code=mscgen_generate(inFile,imgName,msc_format))!=0)
+ if ((code=mscgen_generate(inFile.data(),imgName.data(),msc_format))!=0)
{
err("Problems generating msc output (error=%s). Look for typos in you msc file %s\n",
- mscgen_error2str(code),inFile);
+ mscgen_error2str(code),qPrint(inFile));
return;
}
@@ -129,7 +126,7 @@ void writeMscGraphFromFile(const char *inFile,const char *outDir,
{
QCString epstopdfArgs(maxCmdLine);
epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"",
- absOutFile.data(),absOutFile.data());
+ qPrint(absOutFile),qPrint(absOutFile));
Portable::sysTimerStart();
if (Portable::system("epstopdf",epstopdfArgs)!=0)
{
@@ -149,23 +146,23 @@ static QCString getMscImageMapFromFile(const QCString& inFile, const QCString& o
QCString outFile = inFile + ".map";
int code;
- if ((code=mscgen_generate(inFile,outFile,
+ if ((code=mscgen_generate(inFile.data(),outFile.data(),
writeSVGMap ? mscgen_format_svgmap : mscgen_format_pngmap))!=0)
{
err("Problems generating msc output (error=%s). Look for typos in you msc file %s\n",
- mscgen_error2str(code),inFile.data());
+ mscgen_error2str(code),qPrint(inFile));
return "";
}
- QGString result;
- FTextStream tmpout(&result);
- convertMapFile(tmpout, outFile, relPath, context);
- QDir().remove(outFile);
+ TextStream t;
+ convertMapFile(t, outFile, relPath, context);
+
+ Dir().remove(outFile.str());
- return result.data();
+ return t.str();
}
-void writeMscImageMapFromFile(FTextStream &t,const QCString &inFile,
+void writeMscImageMapFromFile(TextStream &t,const QCString &inFile,
const QCString &outDir,
const QCString &relPath,
const QCString &baseName,
@@ -193,12 +190,12 @@ void writeMscImageMapFromFile(FTextStream &t,const QCString &inFile,
if (!imap.isEmpty())
{
t << "\" alt=\""
- << baseName << "\" border=\"0\" usemap=\"#" << mapName << "\"/>" << endl;
- t << "<map name=\"" << mapName << "\" id=\"" << mapName << "\">" << imap << "</map>" << endl;
+ << baseName << "\" border=\"0\" usemap=\"#" << mapName << "\"/>\n";
+ t << "<map name=\"" << mapName << "\" id=\"" << mapName << "\">" << imap << "</map>\n";
}
else
{
- t << "\" alt=\"" << baseName << "\" border=\"0\"/>" << endl;
+ t << "\" alt=\"" << baseName << "\" border=\"0\"/>\n";
}
}
diff --git a/src/msc.h b/src/msc.h
index 58fada5..2e8e111 100644
--- a/src/msc.h
+++ b/src/msc.h
@@ -1,12 +1,10 @@
/******************************************************************************
*
- *
- *
- * Copyright (C) 1997-2015 by Dimitri van Heesch.
+ * Copyright (C) 1997-2021 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
- * documentation under the terms of the GNU General Public License is hereby
- * granted. No representations are made about the suitability of this software
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
@@ -19,17 +17,17 @@
#define _MSC_H
class QCString;
-class FTextStream;
+class TextStream;
enum MscOutputFormat { MSC_BITMAP , MSC_EPS, MSC_SVG };
-void writeMscGraphFromFile(const char *inFile,const char *outDir,
- const char *outFile,MscOutputFormat format);
+void writeMscGraphFromFile(const QCString &inFile,const QCString &outDir,
+ const QCString &outFile,MscOutputFormat format);
QCString getMscImageMapFromFile(const QCString& inFile, const QCString& outDir,
const QCString& relPath,const QCString& context);
-void writeMscImageMapFromFile(FTextStream &t,const QCString &inFile,
+void writeMscImageMapFromFile(TextStream &t,const QCString &inFile,
const QCString &outDir, const QCString &relPath,
const QCString &baseName, const QCString &context,
MscOutputFormat format
diff --git a/src/namespacedef.cpp b/src/namespacedef.cpp
index 7acd463..db855ba 100644
--- a/src/namespacedef.cpp
+++ b/src/namespacedef.cpp
@@ -32,6 +32,7 @@
#include "config.h"
#include "definitionimpl.h"
#include "membername.h"
+#include "conceptdef.h"
//------------------------------------------------------------------
static QCString makeDisplayName(const NamespaceDef *nd,bool includeScope)
@@ -43,7 +44,7 @@ static QCString makeDisplayName(const NamespaceDef *nd,bool includeScope)
{
result = substitute(result,"::",sep);
}
- //printf("makeDisplayName() %s->%s lang=%d\n",name().data(),result.data(),lang);
+ //printf("makeDisplayName() %s->%s lang=%d\n",qPrint(name()),qPrint(result),lang);
return result;
}
//------------------------------------------------------------------
@@ -51,9 +52,9 @@ static QCString makeDisplayName(const NamespaceDef *nd,bool includeScope)
class NamespaceDefImpl : public DefinitionMixin<NamespaceDefMutable>
{
public:
- NamespaceDefImpl(const char *defFileName,int defLine,int defColumn,
- const char *name,const char *ref=0,
- const char *refFile=0,const char*type=0,
+ NamespaceDefImpl(const QCString &defFileName,int defLine,int defColumn,
+ const QCString &name,const QCString &ref=QCString(),
+ const QCString &refFile=QCString(),const QCString &type=QCString(),
bool isPublished=false);
virtual ~NamespaceDefImpl();
virtual DefType definitionType() const { return TypeNamespace; }
@@ -63,8 +64,9 @@ class NamespaceDefImpl : public DefinitionMixin<NamespaceDefMutable>
virtual void writeDocumentation(OutputList &ol);
virtual void writeMemberPages(OutputList &ol);
virtual void writeQuickMemberLinks(OutputList &ol,const MemberDef *currentMd) const;
- virtual void writeTagFile(FTextStream &);
+ virtual void writeTagFile(TextStream &);
virtual void insertClass(const ClassDef *cd);
+ virtual void insertConcept(const ConceptDef *cd);
virtual void insertNamespace(const NamespaceDef *nd);
virtual void insertMember(MemberDef *md);
virtual void computeAnchors();
@@ -89,7 +91,7 @@ class NamespaceDefImpl : public DefinitionMixin<NamespaceDefMutable>
virtual void distributeMemberGroupDocumentation();
virtual void findSectionsInDocumentation();
virtual void sortMemberLists();
- virtual const Definition *findInnerCompound(const char *name) const;
+ virtual const Definition *findInnerCompound(const QCString &name) const;
virtual void addInnerCompound(const Definition *d);
virtual void addListReferences();
virtual void setFileName(const QCString &fn);
@@ -103,6 +105,7 @@ class NamespaceDefImpl : public DefinitionMixin<NamespaceDefMutable>
virtual ClassLinkedRefMap getStructs() const { return structs; }
virtual ClassLinkedRefMap getExceptions() const { return exceptions; }
virtual NamespaceLinkedRefMap getNamespaces() const { return namespaces; }
+ virtual ConceptLinkedRefMap getConcepts() const { return m_concepts; }
virtual QCString title() const;
virtual QCString compoundTypeString() const;
@@ -118,6 +121,7 @@ class NamespaceDefImpl : public DefinitionMixin<NamespaceDefMutable>
void startMemberDeclarations(OutputList &ol);
void endMemberDeclarations(OutputList &ol);
void writeClassDeclarations(OutputList &ol,const QCString &title,const ClassLinkedRefMap &d);
+ void writeConcepts(OutputList &ol,const QCString &title);
void writeInlineClasses(OutputList &ol);
void writeMemberGroups(OutputList &ol);
void writeAuthorSection(OutputList &ol);
@@ -125,7 +129,8 @@ class NamespaceDefImpl : public DefinitionMixin<NamespaceDefMutable>
void endMemberDocumentation(OutputList &ol);
void writeSummaryLinks(OutputList &ol) const;
void addNamespaceAttributes(OutputList &ol);
- void writeClassesToTagFile(FTextStream &,const ClassLinkedRefMap &d);
+ void writeClassesToTagFile(TextStream &,const ClassLinkedRefMap &d);
+ void writeConceptsToTagFile(TextStream &);
void writeNamespaceDeclarations(OutputList &ol,const QCString &title,
bool isConstantGroup=false);
@@ -144,6 +149,7 @@ class NamespaceDefImpl : public DefinitionMixin<NamespaceDefMutable>
ClassLinkedRefMap interfaces;
ClassLinkedRefMap structs;
ClassLinkedRefMap exceptions;
+ ConceptLinkedRefMap m_concepts;
NamespaceLinkedRefMap namespaces;
bool m_subGrouping = false;
enum { NAMESPACE, MODULE, CONSTANT_GROUP, LIBRARY } m_type;
@@ -152,9 +158,9 @@ class NamespaceDefImpl : public DefinitionMixin<NamespaceDefMutable>
bool m_inline = false;
};
-NamespaceDefMutable *createNamespaceDef(const char *defFileName,int defLine,int defColumn,
- const char *name,const char *ref,
- const char *refFile,const char*type,
+NamespaceDefMutable *createNamespaceDef(const QCString &defFileName,int defLine,int defColumn,
+ const QCString &name,const QCString &ref,
+ const QCString &refFile,const QCString &type,
bool isPublished)
{
return new NamespaceDefImpl(defFileName,defLine,defColumn,name,ref,refFile,type,isPublished);
@@ -201,7 +207,7 @@ class NamespaceDefAliasImpl : public DefinitionAliasMixin<NamespaceDef>
{ return getNSAlias()->isLinkable(); }
virtual bool hasDetailedDescription() const
{ return getNSAlias()->hasDetailedDescription(); }
- virtual const Definition *findInnerCompound(const char *name) const
+ virtual const Definition *findInnerCompound(const QCString &name) const
{ return getNSAlias()->findInnerCompound(name); }
virtual bool subGrouping() const
{ return getNSAlias()->subGrouping(); }
@@ -223,6 +229,8 @@ class NamespaceDefAliasImpl : public DefinitionAliasMixin<NamespaceDef>
{ return getNSAlias()->getExceptions(); }
virtual NamespaceLinkedRefMap getNamespaces() const
{ return getNSAlias()->getNamespaces(); }
+ virtual ConceptLinkedRefMap getConcepts() const
+ { return getNSAlias()->getConcepts(); }
virtual QCString title() const
{ return getNSAlias()->title(); }
virtual QCString compoundTypeString() const
@@ -233,23 +241,23 @@ NamespaceDef *createNamespaceDefAlias(const Definition *newScope,const Namespace
{
NamespaceDef *alnd = new NamespaceDefAliasImpl(newScope,nd);
//printf("alnd name=%s localName=%s qualifiedName=%s displayName()=%s\n",
- // alnd->name().data(),alnd->localName().data(),alnd->qualifiedName().data(),
- // alnd->displayName().data());
+ // qPrint(alnd->name()),qPrint(alnd->localName()),qPrint(alnd->qualifiedName()),
+ // qPrint(alnd->displayName()));
return alnd;
}
//------------------------------------------------------------------
-NamespaceDefImpl::NamespaceDefImpl(const char *df,int dl,int dc,
- const char *name,const char *lref,
- const char *fName, const char*type,
+NamespaceDefImpl::NamespaceDefImpl(const QCString &df,int dl,int dc,
+ const QCString &name,const QCString &lref,
+ const QCString &fName, const QCString &type,
bool isPublished) :
DefinitionMixin(df,dl,dc,name)
,m_isPublished(isPublished)
{
- if (fName)
+ if (!fName.isEmpty())
{
- if (lref)
+ if (!lref.isEmpty())
{
fileName = stripExtension(fName);
}
@@ -265,15 +273,15 @@ NamespaceDefImpl::NamespaceDefImpl(const char *df,int dl,int dc,
setReference(lref);
m_inline=FALSE;
m_subGrouping=Config_getBool(SUBGROUPING);
- if (type && !strcmp("module", type))
+ if (type=="module")
{
m_type = MODULE;
}
- else if (type && !strcmp("constants", type))
+ else if (type=="constants")
{
m_type = CONSTANT_GROUP;
}
- else if (type && !strcmp("library", type))
+ else if (type=="library")
{
m_type = LIBRARY;
}
@@ -345,6 +353,10 @@ void NamespaceDefImpl::addInnerCompound(const Definition *d)
{
insertClass(toClassDef(d));
}
+ else if (d->definitionType()==Definition::TypeConcept)
+ {
+ insertConcept(toConceptDef(d));
+ }
}
void NamespaceDefImpl::insertClass(const ClassDef *cd)
@@ -370,6 +382,11 @@ void NamespaceDefImpl::insertClass(const ClassDef *cd)
d.add(cd->name(),cd);
}
+void NamespaceDefImpl::insertConcept(const ConceptDef *cd)
+{
+ m_concepts.add(cd->name(),cd);
+}
+
void NamespaceDefImpl::insertNamespace(const NamespaceDef *nd)
{
namespaces.add(nd->name(),nd);
@@ -391,7 +408,7 @@ void NamespaceDefImpl::addMembersToMemberGroup()
{
if (mg->allMembersInSameSection() && m_subGrouping)
{
- //printf("----> addToDeclarationSection(%s)\n",mg->header().data());
+ //printf("----> addToDeclarationSection(%s)\n",qPrint(mg->header()));
mg->addToDeclarationSection();
}
}
@@ -444,7 +461,7 @@ void NamespaceDefImpl::insertMember(MemberDef *md)
allMemberList = m_memberLists.back().get();
}
allMemberList->push_back(md);
- //printf("%s::m_allMembersDict->append(%s)\n",name().data(),md->localName().data());
+ //printf("%s::m_allMembersDict->append(%s)\n",qPrint(name()),qPrint(md->localName()));
m_allMembers.add(md->localName(),md);
//::addNamespaceMemberNameToIndex(md);
//static bool sortBriefDocs=Config_getBool(SORT_BRIEF_DOCS);
@@ -483,9 +500,9 @@ void NamespaceDefImpl::insertMember(MemberDef *md)
default:
err("NamespaceDefImpl::insertMembers(): "
"member '%s' with class scope '%s' inserted in namespace scope '%s'!\n",
- md->name().data(),
- md->getClassDef() ? md->getClassDef()->name().data() : "",
- name().data());
+ qPrint(md->name()),
+ md->getClassDef() ? qPrint(md->getClassDef()->name()) : "",
+ qPrint(name()));
}
// if this is an inline namespace, then insert an alias of this member in the outer scope.
if (isInline())
@@ -533,15 +550,15 @@ bool NamespaceDefImpl::hasDetailedDescription() const
!documentation().isEmpty());
}
-void NamespaceDefImpl::writeTagFile(FTextStream &tagFile)
+void NamespaceDefImpl::writeTagFile(TextStream &tagFile)
{
- tagFile << " <compound kind=\"namespace\">" << endl;
- tagFile << " <name>" << convertToXML(name()) << "</name>" << endl;
- tagFile << " <filename>" << convertToXML(getOutputFileBase()) << Doxygen::htmlFileExtension << "</filename>" << endl;
+ tagFile << " <compound kind=\"namespace\">\n";
+ tagFile << " <name>" << convertToXML(name()) << "</name>\n";
+ tagFile << " <filename>" << convertToXML(getOutputFileBase()) << Doxygen::htmlFileExtension << "</filename>\n";
QCString idStr = id();
if (!idStr.isEmpty())
{
- tagFile << " <clangid>" << convertToXML(idStr) << "</clangid>" << endl;
+ tagFile << " <clangid>" << convertToXML(idStr) << "</clangid>\n";
}
for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Namespace))
{
@@ -553,7 +570,7 @@ void NamespaceDefImpl::writeTagFile(FTextStream &tagFile)
{
if (nd->isLinkableInProject())
{
- tagFile << " <namespace>" << convertToXML(nd->name()) << "</namespace>" << endl;
+ tagFile << " <namespace>" << convertToXML(nd->name()) << "</namespace>\n";
}
}
}
@@ -578,6 +595,11 @@ void NamespaceDefImpl::writeTagFile(FTextStream &tagFile)
writeClassesToTagFile(tagFile, exceptions);
}
break;
+ case LayoutDocEntry::NamespaceConcepts:
+ {
+ writeConceptsToTagFile(tagFile);
+ }
+ break;
case LayoutDocEntry::MemberDecl:
{
const LayoutDocEntryMemberDecl *lmd = (const LayoutDocEntryMemberDecl*)lde.get();
@@ -601,7 +623,7 @@ void NamespaceDefImpl::writeTagFile(FTextStream &tagFile)
}
}
writeDocAnchorsToTagFile(tagFile);
- tagFile << " </compound>" << endl;
+ tagFile << " </compound>\n";
}
void NamespaceDefImpl::writeDetailedDescription(OutputList &ol,const QCString &title)
@@ -614,7 +636,7 @@ void NamespaceDefImpl::writeDetailedDescription(OutputList &ol,const QCString &t
ol.popGeneratorState();
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
- ol.writeAnchor(0,"details");
+ ol.writeAnchor(QCString(),"details");
ol.popGeneratorState();
ol.startGroupHeader();
ol.parseText(title);
@@ -624,7 +646,7 @@ void NamespaceDefImpl::writeDetailedDescription(OutputList &ol,const QCString &t
if (!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF))
{
ol.generateDoc(briefFile(),briefLine(),this,0,briefDescription(),FALSE,FALSE,
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
}
if (!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF) &&
!documentation().isEmpty())
@@ -642,7 +664,7 @@ void NamespaceDefImpl::writeDetailedDescription(OutputList &ol,const QCString &t
if (!documentation().isEmpty())
{
ol.generateDoc(docFile(),docLine(),this,0,documentation()+"\n",TRUE,FALSE,
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
}
ol.endTextBlock();
}
@@ -654,7 +676,7 @@ void NamespaceDefImpl::writeBriefDescription(OutputList &ol)
{
DocRoot *rootNode = validatingParseDoc(briefFile(),briefLine(),this,0,
briefDescription(),TRUE,FALSE,
- 0,TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
if (rootNode && !rootNode->isEmpty())
{
ol.startParagraph();
@@ -740,6 +762,11 @@ void NamespaceDefImpl::writeClassDeclarations(OutputList &ol,const QCString &tit
d.writeDeclaration(ol,0,title,TRUE);
}
+void NamespaceDefImpl::writeConcepts(OutputList &ol,const QCString &title)
+{
+ m_concepts.writeDeclaration(ol,title,TRUE);
+}
+
void NamespaceDefImpl::writeInlineClasses(OutputList &ol)
{
classes.writeDocumentation(ol,this);
@@ -788,35 +815,42 @@ void NamespaceDefImpl::writeSummaryLinks(OutputList &ol) const
{
const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
QCString label = "nested-classes";
- ol.writeSummaryLink(0,label,ls->title(lang),first);
+ ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
first=FALSE;
}
else if (lde->kind()==LayoutDocEntry::NamespaceInterfaces && interfaces.declVisible())
{
const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
QCString label = "interfaces";
- ol.writeSummaryLink(0,label,ls->title(lang),first);
+ ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
first=FALSE;
}
else if (lde->kind()==LayoutDocEntry::NamespaceStructs && structs.declVisible())
{
const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
QCString label = "structs";
- ol.writeSummaryLink(0,label,ls->title(lang),first);
+ ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
first=FALSE;
}
else if (lde->kind()==LayoutDocEntry::NamespaceExceptions && exceptions.declVisible())
{
const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
QCString label = "exceptions";
- ol.writeSummaryLink(0,label,ls->title(lang),first);
+ ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
first=FALSE;
}
else if (lde->kind()==LayoutDocEntry::NamespaceNestedNamespaces && namespaces.declVisible())
{
const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
QCString label = "namespaces";
- ol.writeSummaryLink(0,label,ls->title(lang),first);
+ ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
+ first=FALSE;
+ }
+ else if (lde->kind()==LayoutDocEntry::NamespaceConcepts && m_concepts.declVisible())
+ {
+ const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
+ QCString label = "concepts";
+ ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
first=FALSE;
}
else if (lde->kind()== LayoutDocEntry::MemberDecl)
@@ -825,7 +859,7 @@ void NamespaceDefImpl::writeSummaryLinks(OutputList &ol) const
MemberList * ml = getMemberList(lmd->type);
if (ml && ml->declVisible())
{
- ol.writeSummaryLink(0,MemberList::listTypeAsString(ml->listType()),lmd->title(lang),first);
+ ol.writeSummaryLink(QCString(),MemberList::listTypeAsString(ml->listType()),lmd->title(lang),first);
first=FALSE;
}
}
@@ -851,14 +885,25 @@ void NamespaceDefImpl::addNamespaceAttributes(OutputList &ol)
}
}
-void NamespaceDefImpl::writeClassesToTagFile(FTextStream &tagFile,const ClassLinkedRefMap &list)
+void NamespaceDefImpl::writeClassesToTagFile(TextStream &tagFile,const ClassLinkedRefMap &list)
{
for (const auto &cd : list)
{
if (cd->isLinkableInProject())
{
tagFile << " <class kind=\"" << cd->compoundTypeString()
- << "\">" << convertToXML(cd->name()) << "</class>" << endl;
+ << "\">" << convertToXML(cd->name()) << "</class>\n";
+ }
+ }
+}
+
+void NamespaceDefImpl::writeConceptsToTagFile(TextStream &tagFile)
+{
+ for (const auto &cd : m_concepts)
+ {
+ if (cd->isLinkableInProject())
+ {
+ tagFile << " <concept>" << convertToXML(cd->name()) << "</concept>\n";
}
}
}
@@ -933,6 +978,12 @@ void NamespaceDefImpl::writeDocumentation(OutputList &ol)
writeClassDeclarations(ol,ls->title(lang),exceptions);
}
break;
+ case LayoutDocEntry::NamespaceConcepts:
+ {
+ const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
+ writeConcepts(ol,ls->title(lang));
+ }
+ break;
case LayoutDocEntry::NamespaceNestedNamespaces:
{
const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
@@ -988,7 +1039,9 @@ void NamespaceDefImpl::writeDocumentation(OutputList &ol)
case LayoutDocEntry::ClassAllMembersLink:
case LayoutDocEntry::ClassUsedFiles:
case LayoutDocEntry::ClassInlineClasses:
+ case LayoutDocEntry::ConceptDefinition:
case LayoutDocEntry::FileClasses:
+ case LayoutDocEntry::FileConcepts:
case LayoutDocEntry::FileInterfaces:
case LayoutDocEntry::FileStructs:
case LayoutDocEntry::FileExceptions:
@@ -1000,6 +1053,7 @@ void NamespaceDefImpl::writeDocumentation(OutputList &ol)
case LayoutDocEntry::FileSourceLink:
case LayoutDocEntry::FileInlineClasses:
case LayoutDocEntry::GroupClasses:
+ case LayoutDocEntry::GroupConcepts:
case LayoutDocEntry::GroupInlineClasses:
case LayoutDocEntry::GroupNamespaces:
case LayoutDocEntry::GroupDirs:
@@ -1109,7 +1163,7 @@ int NamespaceDefImpl::numDocMembers() const
void NamespaceDefImpl::addUsingDirective(const NamespaceDef *nd)
{
m_usingDirList.add(nd->qualifiedName(),nd);
- //printf("%p: NamespaceDefImpl::addUsingDirective: %s:%d\n",this,name().data(),m_usingDirList->count());
+ //printf("%p: NamespaceDefImpl::addUsingDirective: %s:%d\n",this,qPrint(name()),m_usingDirList->count());
}
void NamespaceDefImpl::addUsingDeclaration(const ClassDef *cd)
@@ -1122,7 +1176,7 @@ QCString NamespaceDefImpl::getOutputFileBase() const
return fileName;
}
-const Definition *NamespaceDefImpl::findInnerCompound(const char *n) const
+const Definition *NamespaceDefImpl::findInnerCompound(const QCString &n) const
{
if (n==0) return 0;
const Definition *d = m_innerCompounds.find(n);
@@ -1151,7 +1205,7 @@ void NamespaceDefImpl::addListReferences()
theTranslator->trModule(TRUE,TRUE) :
theTranslator->trNamespace(TRUE,TRUE),
getOutputFileBase(),displayName(),
- 0,
+ QCString(),
this
);
}
@@ -1228,7 +1282,7 @@ bool NamespaceLinkedRefMap::declVisible() const
return FALSE;
}
-void NamespaceLinkedRefMap::writeDeclaration(OutputList &ol,const char *title,
+void NamespaceLinkedRefMap::writeDeclaration(OutputList &ol,const QCString &title,
bool const isConstantGroup,bool localName)
{
@@ -1293,16 +1347,16 @@ void NamespaceLinkedRefMap::writeDeclaration(OutputList &ol,const char *title,
{
name = nd->displayName();
}
- ol.writeObjectLink(nd->getReference(),nd->getOutputFileBase(),0,name);
+ ol.writeObjectLink(nd->getReference(),nd->getOutputFileBase(),QCString(),name);
ol.endMemberItem();
if (!nd->briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC))
{
ol.startMemberDescription(nd->getOutputFileBase());
ol.generateDoc(nd->briefFile(),nd->briefLine(),nd,0,nd->briefDescription(),FALSE,FALSE,
- 0,TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
ol.endMemberDescription();
}
- ol.endMemberDeclaration(0,0);
+ ol.endMemberDeclaration(QCString(),QCString());
}
}
ol.endMemberList();
@@ -1337,23 +1391,19 @@ void NamespaceDefImpl::sortMemberLists()
if (ml->needsSorting()) { ml->sort(); ml->setNeedsSorting(FALSE); }
}
- if (Config_getBool(SORT_BRIEF_DOCS))
+ auto classComp = [](const ClassLinkedRefMap::Ptr &c1,const ClassLinkedRefMap::Ptr &c2)
{
- auto classComp = [](const ClassLinkedRefMap::Ptr &c1,const ClassLinkedRefMap::Ptr &c2)
- {
- return Config_getBool(SORT_BY_SCOPE_NAME) ?
- qstricmp(c1->name(), c2->name())<0 :
- qstricmp(c1->className(), c2->className())<0;
- };
+ return Config_getBool(SORT_BY_SCOPE_NAME) ?
+ qstricmp(c1->name(), c2->name())<0 :
+ qstricmp(c1->className(), c2->className())<0;
+ };
- std::sort(classes.begin(), classes.end(), classComp);
- std::sort(interfaces.begin(),interfaces.end(),classComp);
- std::sort(structs.begin(), structs.end(), classComp);
- std::sort(exceptions.begin(),exceptions.end(),classComp);
+ std::sort(classes.begin(), classes.end(), classComp);
+ std::sort(interfaces.begin(),interfaces.end(),classComp);
+ std::sort(structs.begin(), structs.end(), classComp);
+ std::sort(exceptions.begin(),exceptions.end(),classComp);
- }
- // TODO: inconsistent: should be only done when SORT_BRIEF_DOCS is enabled...
auto namespaceComp = [](const NamespaceLinkedRefMap::Ptr &n1,const NamespaceLinkedRefMap::Ptr &n2)
{
return qstricmp(n1->name(),n2->name())<0;
@@ -1377,7 +1427,7 @@ MemberList *NamespaceDefImpl::getMemberList(MemberListType lt) const
void NamespaceDefImpl::writeMemberDeclarations(OutputList &ol,MemberListType lt,const QCString &title)
{
MemberList * ml = getMemberList(lt);
- if (ml) ml->writeDeclarations(ol,0,this,0,0,title,0);
+ if (ml) ml->writeDeclarations(ol,0,this,0,0,title,QCString());
}
void NamespaceDefImpl::writeMemberDocumentation(OutputList &ol,MemberListType lt,const QCString &title)
@@ -1449,7 +1499,7 @@ QCString NamespaceDefImpl::compoundTypeString() const
}
else if(lang==SrcLangExt_CSharp)
{
- return "namespace";
+ return "namespace";
}
else if (lang==SrcLangExt_Fortran)
{
@@ -1474,7 +1524,7 @@ QCString NamespaceDefImpl::compoundTypeString() const
err_full(getDefFileName(),getDefLine(),"Internal inconsistency: namespace in IDL not module, library or constant group");
}
}
- return "";
+ return "namespace";
}
void NamespaceDefImpl::setMetaData(const QCString &m)
diff --git a/src/namespacedef.h b/src/namespacedef.h
index d41cc20..93fff75 100644
--- a/src/namespacedef.h
+++ b/src/namespacedef.h
@@ -25,11 +25,12 @@
class MemberList;
class ClassDef;
+class ConceptDef;
class OutputList;
class ClassLinkedRefMap;
+class ConceptLinkedRefMap;
class MemberDef;
class NamespaceDef;
-class FTextStream;
class NamespaceDef;
class NamespaceDefMutable;
@@ -44,7 +45,7 @@ class NamespaceLinkedMap : public LinkedMap<NamespaceDef>
class NamespaceLinkedRefMap : public LinkedRefMap<const NamespaceDef>
{
public:
- void writeDeclaration(OutputList &ol,const char *title,
+ void writeDeclaration(OutputList &ol,const QCString &title,
bool isConstantGroup=false, bool localName=FALSE);
bool declVisible() const;
};
@@ -71,7 +72,7 @@ class NamespaceDef : public Definition
virtual bool isLinkableInProject() const = 0;
virtual bool isLinkable() const = 0;
virtual bool hasDetailedDescription() const = 0;
- virtual const Definition *findInnerCompound(const char *name) const = 0;
+ virtual const Definition *findInnerCompound(const QCString &name) const = 0;
virtual bool subGrouping() const = 0;
virtual MemberList *getMemberList(MemberListType lt) const = 0;
virtual const MemberLists &getMemberLists() const = 0;
@@ -95,6 +96,9 @@ class NamespaceDef : public Definition
/*! Returns the namespaces contained in this namespace */
virtual NamespaceLinkedRefMap getNamespaces() const = 0;
+ /*! Returns the concepts contained in this namespace */
+ virtual ConceptLinkedRefMap getConcepts() const = 0;
+
virtual QCString title() const = 0;
virtual QCString compoundTypeString() const = 0;
};
@@ -109,8 +113,9 @@ class NamespaceDefMutable : public DefinitionMutable, public NamespaceDef
virtual void writeDocumentation(OutputList &ol) = 0;
virtual void writeMemberPages(OutputList &ol) = 0;
virtual void writeQuickMemberLinks(OutputList &ol,const MemberDef *currentMd) const = 0;
- virtual void writeTagFile(FTextStream &) = 0;
+ virtual void writeTagFile(TextStream &) = 0;
virtual void insertClass(const ClassDef *cd) = 0;
+ virtual void insertConcept(const ConceptDef *cd) = 0;
virtual void insertNamespace(const NamespaceDef *nd) = 0;
virtual void insertMember(MemberDef *md) = 0; // md cannot be const, since setSectionList is called on it
virtual void computeAnchors() = 0;
@@ -129,9 +134,9 @@ class NamespaceDefMutable : public DefinitionMutable, public NamespaceDef
};
/** Factory method to create new NamespaceDef instance */
-NamespaceDefMutable *createNamespaceDef(const char *defFileName,int defLine,int defColumn,
- const char *name,const char *ref=0,
- const char *refFile=0,const char*type=0,
+NamespaceDefMutable *createNamespaceDef(const QCString &defFileName,int defLine,int defColumn,
+ const QCString &name,const QCString &ref=QCString(),
+ const QCString &refFile=QCString(),const QCString &type=QCString(),
bool isPublished=false);
/** Factory method to create an alias of an existing namespace. Used for inline namespaces. */
diff --git a/src/outputgen.cpp b/src/outputgen.cpp
index 5be6817..709d000 100644
--- a/src/outputgen.cpp
+++ b/src/outputgen.cpp
@@ -19,14 +19,12 @@
#include <stdlib.h>
-#include <qfile.h>
-
#include "doxygen.h"
#include "outputgen.h"
#include "message.h"
#include "portable.h"
-OutputGenerator::OutputGenerator(const char *dir) : m_dir(dir)
+OutputGenerator::OutputGenerator(const QCString &dir) : m_t(nullptr), m_dir(dir)
{
//printf("OutputGenerator::OutputGenerator()\n");
}
@@ -36,12 +34,12 @@ OutputGenerator::~OutputGenerator()
//printf("OutputGenerator::~OutputGenerator()\n");
}
-OutputGenerator::OutputGenerator(const OutputGenerator &og)
+OutputGenerator::OutputGenerator(const OutputGenerator &og) : m_t(nullptr)
{
m_dir = og.m_dir;
// we don't copy the other fields.
// after copying startPlainFile() should be called
- if (og.t.device()!=nullptr)
+ if (og.m_t.stream()!=nullptr)
{
throw std::runtime_error("OutputGenerator copy constructor called while a file is processing");
}
@@ -52,29 +50,30 @@ OutputGenerator &OutputGenerator::operator=(const OutputGenerator &og)
m_dir = og.m_dir;
// we don't copy the other fields.
// after assignment startPlainFile() should be called
- if (og.t.device()!=nullptr)
+ if (og.m_t.stream()!=nullptr)
{
throw std::runtime_error("OutputGenerator assignment operator called while a file is processing");
}
return *this;
}
-void OutputGenerator::startPlainFile(const char *name)
+void OutputGenerator::startPlainFile(const QCString &name)
{
- //printf("startPlainFile(%s)\n",name);
+ //printf("startPlainFile(%s)\n",qPrint(name));
m_fileName=m_dir+"/"+name;
- m_file.setName(m_fileName);
- if (!m_file.open(IO_WriteOnly))
+ m_file = Portable::fopen(m_fileName.data(),"wb");
+ if (m_file==0)
{
- term("Could not open file %s for writing\n",m_fileName.data());
+ term("Could not open file %s for writing\n",qPrint(m_fileName));
}
- t.setDevice(&m_file);
+ m_t.setFile(m_file);
}
void OutputGenerator::endPlainFile()
{
- t.unsetDevice();
- m_file.close();
+ m_t.flush();
+ m_t.setStream(nullptr);
+ Portable::fclose(m_file);
m_fileName.resize(0);
}
diff --git a/src/outputgen.h b/src/outputgen.h
index 0d64833..53972d4 100644
--- a/src/outputgen.h
+++ b/src/outputgen.h
@@ -20,12 +20,12 @@
#include <memory>
#include <stack>
-
-#include <qfile.h>
+#include <iostream>
+#include <fstream>
#include "index.h"
#include "section.h"
-#include "ftextstream.h"
+#include "textstream.h"
class ClassDiagram;
class DotClassGraph;
@@ -69,7 +69,7 @@ class CodeOutputInterface
* spaces visible, should break lines at a newline and should convert
* tabs to the right number of spaces.
*/
- virtual void codify(const char *s) = 0;
+ virtual void codify(const QCString &s) = 0;
/*! Writes a link to an object in a code fragment.
* \param ref If this is non-zero, the object is to be found in
@@ -80,9 +80,9 @@ class CodeOutputInterface
* \param name The text to display as a placeholder for the link.
* \param tooltip The tooltip to display when the mouse is on the link.
*/
- virtual void writeCodeLink(const char *ref,const char *file,
- const char *anchor,const char *name,
- const char *tooltip) = 0;
+ virtual void writeCodeLink(const QCString &ref,const QCString &file,
+ const QCString &anchor,const QCString &name,
+ const QCString &tooltip) = 0;
/*! Writes the line number of a source listing
* \param ref External reference (when imported from a tag file)
@@ -90,8 +90,8 @@ class CodeOutputInterface
* \param anchor The anchor part of the URL pointing to the docs.
* \param lineNumber The line number to write
*/
- virtual void writeLineNumber(const char *ref,const char *file,
- const char *anchor,int lineNumber) = 0;
+ virtual void writeLineNumber(const QCString &ref,const QCString &file,
+ const QCString &anchor,int lineNumber) = 0;
/*! Writes a tool tip definition
* \param id unique identifier for the tooltip
@@ -101,10 +101,10 @@ class CodeOutputInterface
* \param defInfo Info about the symbol's definition in the source code
* \param declInfo Info about the symbol's declaration in the source code
*/
- virtual void writeTooltip(const char *id,
+ virtual void writeTooltip(const QCString &id,
const DocLinkInfo &docInfo,
- const char *decl,
- const char *desc,
+ const QCString &decl,
+ const QCString &desc,
const SourceLinkInfo &defInfo,
const SourceLinkInfo &declInfo
) = 0;
@@ -118,7 +118,7 @@ class CodeOutputInterface
* which elements of the same type are rendered using the same 'font class'.
* \param clsName The category name.
*/
- virtual void startFontClass(const char *clsName) = 0;
+ virtual void startFontClass(const QCString &clsName) = 0;
/*! Ends a block started with startFontClass() */
virtual void endFontClass() = 0;
@@ -126,10 +126,10 @@ class CodeOutputInterface
/*! Write an anchor to a source listing.
* \param name The name of the anchor.
*/
- virtual void writeCodeAnchor(const char *name) = 0;
+ virtual void writeCodeAnchor(const QCString &name) = 0;
- virtual void setCurrentDoc(const Definition *context,const char *anchor,bool isSourceFile) = 0;
- virtual void addWord(const char *word,bool hiPriority) = 0;
+ virtual void setCurrentDoc(const Definition *context,const QCString &anchor,bool isSourceFile) = 0;
+ virtual void addWord(const QCString &word,bool hiPriority) = 0;
/*! Starts a source code fragment. The fragment will be
* fed to the code parser (see code.h) for syntax highlighting
@@ -137,9 +137,9 @@ class CodeOutputInterface
* endCodeFragment()
* @param style The kind of code fragment.
*/
- virtual void startCodeFragment(const char *style) = 0;
+ virtual void startCodeFragment(const QCString &style) = 0;
/*! Ends a block of code */
- virtual void endCodeFragment(const char *style) = 0;
+ virtual void endCodeFragment(const QCString &style) = 0;
};
/** Base Interface used for generating output outside of the
@@ -187,7 +187,7 @@ class BaseOutputDocInterface : public CodeOutputInterface
/*! Writes an ASCII string to the output. Converts characters that have
* A special meaning, like \c & in html.
*/
- virtual void docify(const char *s) = 0;
+ virtual void docify(const QCString &s) = 0;
/*! Writes a single ASCII character to the output. Converts characters
* that have a special meaning.
@@ -197,13 +197,13 @@ class BaseOutputDocInterface : public CodeOutputInterface
/*! Writes an ASCII string to the output, \e without converting
* special characters.
*/
- virtual void writeString(const char *text) = 0;
+ virtual void writeString(const QCString &text) = 0;
/*! Starts a new paragraph */
//virtual void newParagraph() = 0;
/*! Starts a new paragraph */
- virtual void startParagraph(const char *classDef) = 0;
+ virtual void startParagraph(const QCString &classDef) = 0;
/*! Ends a paragraph */
virtual void endParagraph() = 0;
@@ -215,14 +215,14 @@ class BaseOutputDocInterface : public CodeOutputInterface
* the file.
* \param name The text to display as a placeholder for the link.
*/
- virtual void writeObjectLink(const char *ref,const char *file,
- const char *anchor, const char *name) = 0;
+ virtual void writeObjectLink(const QCString &ref,const QCString &file,
+ const QCString &anchor, const QCString &name) = 0;
/*! Starts a (link to an) URL found in the documentation.
* \param url The URL to link to.
*/
- virtual void startHtmlLink(const char *url) = 0;
+ virtual void startHtmlLink(const QCString &url) = 0;
/*! Ends a link started by startHtmlLink().
*/
@@ -282,22 +282,22 @@ class BaseOutputDocInterface : public CodeOutputInterface
virtual void startExamples() = 0;
virtual void endExamples() = 0;
- virtual void startParamList(ParamListTypes t,const char *title) = 0;
+ virtual void startParamList(ParamListTypes t,const QCString &title) = 0;
virtual void endParamList() = 0;
//virtual void writeDescItem() = 0;
virtual void startTitle() = 0;
virtual void endTitle() = 0;
- virtual void writeAnchor(const char *fileName,const char *name) = 0;
- virtual void startSection(const char *,const char *,SectionType) = 0;
- virtual void endSection(const char *,SectionType) = 0;
+ virtual void writeAnchor(const QCString &fileName,const QCString &name) = 0;
+ virtual void startSection(const QCString &,const QCString &,SectionType) = 0;
+ virtual void endSection(const QCString &,SectionType) = 0;
- virtual void lineBreak(const char *style) = 0;
- virtual void addIndexItem(const char *s1,const char *s2) = 0;
+ virtual void lineBreak(const QCString &style) = 0;
+ virtual void addIndexItem(const QCString &s1,const QCString &s2) = 0;
virtual void writeNonBreakableSpace(int) = 0;
- virtual void startDescTable(const char *title) = 0;
+ virtual void startDescTable(const QCString &title) = 0;
virtual void endDescTable() = 0;
virtual void startDescTableRow() = 0;
virtual void endDescTableRow() = 0;
@@ -305,10 +305,10 @@ class BaseOutputDocInterface : public CodeOutputInterface
virtual void endDescTableTitle() = 0;
virtual void startDescTableData() = 0;
virtual void endDescTableData() = 0;
- virtual void startTextLink(const char *file,const char *anchor) = 0;
+ virtual void startTextLink(const QCString &file,const QCString &anchor) = 0;
virtual void endTextLink() = 0;
virtual void startPageRef() = 0;
- virtual void endPageRef(const char *,const char *) = 0;
+ virtual void endPageRef(const QCString &,const QCString &) = 0;
virtual void startSubsection() = 0;
virtual void endSubsection() = 0;
virtual void startSubsubsection() = 0;
@@ -324,7 +324,7 @@ class OutputGenerator : public BaseOutputDocInterface
public:
enum OutputType { Html, Latex, Man, RTF, XML, DEF, Perl , Docbook};
- OutputGenerator(const char *dir);
+ OutputGenerator(const QCString &dir);
OutputGenerator(const OutputGenerator &o);
OutputGenerator &operator=(const OutputGenerator &o);
virtual ~OutputGenerator();
@@ -345,7 +345,7 @@ class OutputGenerator : public BaseOutputDocInterface
QCString dir() const;
QCString fileName() const;
- void startPlainFile(const char *name);
+ void startPlainFile(const QCString &name);
void endPlainFile();
//QCString getContents() const;
bool isEnabled() const { return m_active; }
@@ -359,19 +359,19 @@ class OutputGenerator : public BaseOutputDocInterface
///////////////////////////////////////////////////////////////
// structural output interface
///////////////////////////////////////////////////////////////
- virtual void startFile(const char *name,const char *manName,
- const char *title,int id=0) = 0;
+ virtual void startFile(const QCString &name,const QCString &manName,
+ const QCString &title,int id=0) = 0;
virtual void writeSearchInfo() = 0;
- virtual void writeFooter(const char *navPath) = 0;
+ virtual void writeFooter(const QCString &navPath) = 0;
virtual void endFile() = 0;
virtual void startIndexSection(IndexSections) = 0;
virtual void endIndexSection(IndexSections) = 0;
- virtual void writePageLink(const char *,bool) = 0;
+ virtual void writePageLink(const QCString &,bool) = 0;
virtual void startProjectNumber() = 0;
virtual void endProjectNumber() = 0;
virtual void writeStyleInfo(int part) = 0;
- virtual void startTitleHead(const char *) = 0;
- virtual void endTitleHead(const char *fileName,const char *name) = 0;
+ virtual void startTitleHead(const QCString &) = 0;
+ virtual void endTitleHead(const QCString &fileName,const QCString &name) = 0;
virtual void startIndexListItem() = 0;
virtual void endIndexListItem() = 0;
virtual void startIndexList() = 0;
@@ -379,16 +379,16 @@ class OutputGenerator : public BaseOutputDocInterface
virtual void startIndexKey() = 0;
virtual void endIndexKey() = 0;
virtual void startIndexValue(bool) = 0;
- virtual void endIndexValue(const char *,bool) = 0;
- virtual void startIndexItem(const char *ref,const char *file) = 0;
- virtual void endIndexItem(const char *ref,const char *file) = 0;
+ virtual void endIndexValue(const QCString &,bool) = 0;
+ virtual void startIndexItem(const QCString &ref,const QCString &file) = 0;
+ virtual void endIndexItem(const QCString &ref,const QCString &file) = 0;
virtual void startGroupHeader(int) = 0;
virtual void endGroupHeader(int) = 0;
virtual void startMemberSections() = 0;
virtual void endMemberSections() = 0;
virtual void startHeaderSection() = 0;
virtual void endHeaderSection() = 0;
- virtual void startMemberHeader(const char *anchor, int typ) = 0;
+ virtual void startMemberHeader(const QCString &anchor, int typ) = 0;
virtual void endMemberHeader() = 0;
virtual void startMemberSubtitle() = 0;
virtual void endMemberSubtitle() = 0;
@@ -400,10 +400,12 @@ class OutputGenerator : public BaseOutputDocInterface
virtual void endInlineHeader() = 0;
virtual void startAnonTypeScope(int) = 0;
virtual void endAnonTypeScope(int) = 0;
- virtual void startMemberItem(const char *,int,const char *) = 0;
+ virtual void startMemberItem(const QCString &,int,const QCString &) = 0;
virtual void endMemberItem() = 0;
virtual void startMemberTemplateParams() = 0;
- virtual void endMemberTemplateParams(const char *,const char *) = 0;
+ virtual void endMemberTemplateParams(const QCString &,const QCString &) = 0;
+ virtual void startCompoundTemplateParams() = 0;
+ virtual void endCompoundTemplateParams() = 0;
virtual void startMemberGroupHeader(bool) = 0;
virtual void endMemberGroupHeader() = 0;
virtual void startMemberGroupDocs() = 0;
@@ -412,29 +414,29 @@ class OutputGenerator : public BaseOutputDocInterface
virtual void endMemberGroup(bool) = 0;
virtual void insertMemberAlign(bool) = 0;
virtual void insertMemberAlignLeft(int,bool) = 0;
- virtual void startMemberDoc(const char *,const char *,
- const char *,const char *,int,int,bool) = 0;
+ virtual void startMemberDoc(const QCString &,const QCString &,
+ const QCString &,const QCString &,int,int,bool) = 0;
virtual void endMemberDoc(bool) = 0;
- virtual void startDoxyAnchor(const char *fName,const char *manName,
- const char *anchor,const char *name,
- const char *args) = 0;
- virtual void endDoxyAnchor(const char *fileName,const char *anchor) = 0;
+ virtual void startDoxyAnchor(const QCString &fName,const QCString &manName,
+ const QCString &anchor,const QCString &name,
+ const QCString &args) = 0;
+ virtual void endDoxyAnchor(const QCString &fileName,const QCString &anchor) = 0;
virtual void writeLatexSpacing() = 0;
- virtual void writeStartAnnoItem(const char *type,const char *file,
- const char *path,const char *name) = 0;
- virtual void writeEndAnnoItem(const char *name) = 0;
- virtual void startMemberDescription(const char *anchor,const char *inheritId, bool typ) = 0;
+ virtual void writeStartAnnoItem(const QCString &type,const QCString &file,
+ const QCString &path,const QCString &name) = 0;
+ virtual void writeEndAnnoItem(const QCString &name) = 0;
+ virtual void startMemberDescription(const QCString &anchor,const QCString &inheritId, bool typ) = 0;
virtual void endMemberDescription() = 0;
virtual void startMemberDeclaration() = 0;
- virtual void endMemberDeclaration(const char *anchor,const char *inheritId) = 0;
- virtual void writeInheritedSectionTitle(const char *id,const char *ref,
- const char *file,const char *anchor,
- const char *title,const char *name) = 0;
+ virtual void endMemberDeclaration(const QCString &anchor,const QCString &inheritId) = 0;
+ virtual void writeInheritedSectionTitle(const QCString &id,const QCString &ref,
+ const QCString &file,const QCString &anchor,
+ const QCString &title,const QCString &name) = 0;
virtual void startIndent() = 0;
virtual void endIndent() = 0;
virtual void writeSynopsis() = 0;
virtual void startClassDiagram() = 0;
- virtual void endClassDiagram(const ClassDiagram &,const char *,const char *) = 0;
+ virtual void endClassDiagram(const ClassDiagram &,const QCString &,const QCString &) = 0;
virtual void startDotGraph() = 0;
virtual void endDotGraph(DotClassGraph &g) = 0;
virtual void startInclDepGraph() = 0;
@@ -448,14 +450,14 @@ class OutputGenerator : public BaseOutputDocInterface
virtual void writeGraphicalHierarchy(DotGfxHierarchyTable &g) = 0;
virtual void startQuickIndices() = 0;
virtual void endQuickIndices() = 0;
- virtual void writeSplitBar(const char *) = 0;
- virtual void writeNavigationPath(const char *) = 0;
+ virtual void writeSplitBar(const QCString &) = 0;
+ virtual void writeNavigationPath(const QCString &) = 0;
virtual void writeLogo() = 0;
- virtual void writeQuickLinks(bool compact,HighlightedItem hli,const char *file) = 0;
- virtual void writeSummaryLink(const char *file,const char *anchor,const char *title,bool first) = 0;
+ virtual void writeQuickLinks(bool compact,HighlightedItem hli,const QCString &file) = 0;
+ virtual void writeSummaryLink(const QCString &file,const QCString &anchor,const QCString &title,bool first) = 0;
virtual void startContents() = 0;
virtual void endContents() = 0;
- virtual void startPageDoc(const char *) {}
+ virtual void startPageDoc(const QCString &) {}
virtual void endPageDoc() {}
virtual void startTextBlock(bool) = 0;
virtual void endTextBlock(bool) = 0;
@@ -464,15 +466,15 @@ class OutputGenerator : public BaseOutputDocInterface
virtual void endMemberDocPrefixItem() = 0;
virtual void startMemberDocName(bool) = 0;
virtual void endMemberDocName() = 0;
- virtual void startParameterType(bool,const char *key) = 0;
+ virtual void startParameterType(bool,const QCString &key) = 0;
virtual void endParameterType() = 0;
virtual void startParameterName(bool) = 0;
virtual void endParameterName(bool,bool,bool) = 0;
virtual void startParameterList(bool) = 0;
virtual void endParameterList() = 0;
- virtual void exceptionEntry(const char*,bool) = 0;
+ virtual void exceptionEntry(const QCString &,bool) = 0;
- virtual void startConstraintList(const char *) = 0;
+ virtual void startConstraintList(const QCString &) = 0;
virtual void startConstraintParam() = 0;
virtual void endConstraintParam() = 0;
virtual void startConstraintType() = 0;
@@ -492,15 +494,15 @@ class OutputGenerator : public BaseOutputDocInterface
virtual void startLabels() = 0;
- virtual void writeLabel(const char *,bool) = 0;
+ virtual void writeLabel(const QCString &,bool) = 0;
virtual void endLabels() = 0;
protected:
- FTextStream t;
+ TextStream m_t;
private:
QCString m_dir;
QCString m_fileName;
- QFile m_file;
+ FILE *m_file;
bool m_active = true;
std::stack<bool> m_genStack;
};
diff --git a/src/outputlist.cpp b/src/outputlist.cpp
index f968c8b..e4f0fe2 100644
--- a/src/outputlist.cpp
+++ b/src/outputlist.cpp
@@ -22,6 +22,8 @@
* the call to all output generators.
*/
+#include <atomic>
+
#include "outputlist.h"
#include "outputgen.h"
#include "config.h"
@@ -137,10 +139,10 @@ void OutputList::popGeneratorState()
}
}
-void OutputList::generateDoc(const char *fileName,int startLine,
+void OutputList::generateDoc(const QCString &fileName,int startLine,
const Definition *ctx,const MemberDef * md,
const QCString &docStr,bool indexWords,
- bool isExample,const char *exampleName,
+ bool isExample,const QCString &exampleName,
bool singleLine,bool linkFromIndex,
bool markdownSupport)
{
@@ -169,7 +171,7 @@ void OutputList::writeDoc(DocRoot *root,const Definition *ctx,const MemberDef *m
for (const auto &og : m_outputs)
{
//printf("og->printDoc(extension=%s)\n",
- // ctx?ctx->getDefFileExtension().data():"<null>");
+ // ctx?qPrint(ctx->getDefFileExtension()):"<null>");
if (og->isEnabled()) og->writeDoc(root,ctx,md,m_id);
}
VhdlDocGen::setFlowMember(0);
diff --git a/src/outputlist.h b/src/outputlist.h
index 7baef7a..eadf85f 100644
--- a/src/outputlist.h
+++ b/src/outputlist.h
@@ -65,9 +65,9 @@ class OutputList : public OutputDocInterface
// OutputDocInterface implementation
//////////////////////////////////////////////////
- void generateDoc(const char *fileName,int startLine,
+ void generateDoc(const QCString &fileName,int startLine,
const Definition *ctx,const MemberDef *md,const QCString &docStr,
- bool indexWords,bool isExample,const char *exampleName /*=0*/,
+ bool indexWords,bool isExample,const QCString &exampleName /*=0*/,
bool singleLine /*=FALSE*/,bool linkFromIndex /*=FALSE*/,
bool markdownSupport /*=FALSE*/);
void writeDoc(DocRoot *root,const Definition *ctx,const MemberDef *md,int id=0);
@@ -77,7 +77,7 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::startIndexSection,is); }
void endIndexSection(IndexSections is)
{ forall(&OutputGenerator::endIndexSection,is); }
- void writePageLink(const char *name,bool first)
+ void writePageLink(const QCString &name,bool first)
{ forall(&OutputGenerator::writePageLink,name,first); }
void startProjectNumber()
{ forall(&OutputGenerator::startProjectNumber); }
@@ -85,30 +85,30 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::endProjectNumber); }
void writeStyleInfo(int part)
{ forall(&OutputGenerator::writeStyleInfo,part); }
- void startFile(const char *name,const char *manName,const char *title)
+ void startFile(const QCString &name,const QCString &manName,const QCString &title)
{
newId();
forall(&OutputGenerator::startFile,name,manName,title,m_id);
}
void writeSearchInfo()
{ forall(&OutputGenerator::writeSearchInfo); }
- void writeFooter(const char *navPath)
+ void writeFooter(const QCString &navPath)
{ forall(&OutputGenerator::writeFooter,navPath); }
void endFile()
{ forall(&OutputGenerator::endFile); }
- void startTitleHead(const char *fileName)
+ void startTitleHead(const QCString &fileName)
{ forall(&OutputGenerator::startTitleHead,fileName); }
- void endTitleHead(const char *fileName,const char *name)
+ void endTitleHead(const QCString &fileName,const QCString &name)
{ forall(&OutputGenerator::endTitleHead,fileName,name); }
void startTitle()
{ forall(&OutputGenerator::startTitle); }
void endTitle()
{ forall(&OutputGenerator::endTitle); }
- void startParagraph(const char *classDef=0)
+ void startParagraph(const QCString &classDef=QCString())
{ forall(&OutputGenerator::startParagraph,classDef); }
void endParagraph()
{ forall(&OutputGenerator::endParagraph); }
- void writeString(const char *text)
+ void writeString(const QCString &text)
{ forall(&OutputGenerator::writeString,text); }
void startIndexListItem()
{ forall(&OutputGenerator::startIndexListItem); }
@@ -124,42 +124,42 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::endIndexKey); }
void startIndexValue(bool b)
{ forall(&OutputGenerator::startIndexValue,b); }
- void endIndexValue(const char *name,bool b)
+ void endIndexValue(const QCString &name,bool b)
{ forall(&OutputGenerator::endIndexValue,name,b); }
void startItemList()
{ forall(&OutputGenerator::startItemList); }
void endItemList()
{ forall(&OutputGenerator::endItemList); }
- void startIndexItem(const char *ref,const char *file)
+ void startIndexItem(const QCString &ref,const QCString &file)
{ forall(&OutputGenerator::startIndexItem,ref,file); }
- void endIndexItem(const char *ref,const char *file)
+ void endIndexItem(const QCString &ref,const QCString &file)
{ forall(&OutputGenerator::endIndexItem,ref,file); }
- void docify(const char *s)
+ void docify(const QCString &s)
{ forall(&OutputGenerator::docify,s); }
- void codify(const char *s)
+ void codify(const QCString &s)
{ forall(&OutputGenerator::codify,s); }
- void writeObjectLink(const char *ref,const char *file,
- const char *anchor, const char *name)
+ void writeObjectLink(const QCString &ref,const QCString &file,
+ const QCString &anchor, const QCString &name)
{ forall(&OutputGenerator::writeObjectLink,ref,file,anchor,name); }
- void writeCodeLink(const char *ref,const char *file,
- const char *anchor,const char *name,
- const char *tooltip)
+ void writeCodeLink(const QCString &ref,const QCString &file,
+ const QCString &anchor,const QCString &name,
+ const QCString &tooltip)
{ forall(&OutputGenerator::writeCodeLink,ref,file,anchor,name,tooltip); }
- void writeTooltip(const char *id, const DocLinkInfo &docInfo, const char *decl,
- const char *desc, const SourceLinkInfo &defInfo, const SourceLinkInfo &declInfo)
+ void writeTooltip(const QCString &id, const DocLinkInfo &docInfo, const QCString &decl,
+ const QCString &desc, const SourceLinkInfo &defInfo, const SourceLinkInfo &declInfo)
{ forall(&OutputGenerator::writeTooltip,id,docInfo,decl,desc,defInfo,declInfo); }
- void startTextLink(const char *file,const char *anchor)
+ void startTextLink(const QCString &file,const QCString &anchor)
{ forall(&OutputGenerator::startTextLink,file,anchor); }
void endTextLink()
{ forall(&OutputGenerator::endTextLink); }
- void startHtmlLink(const char *url)
+ void startHtmlLink(const QCString &url)
{ forall(&OutputGenerator::startHtmlLink,url); }
void endHtmlLink()
{ forall(&OutputGenerator::endHtmlLink); }
- void writeStartAnnoItem(const char *type,const char *file,
- const char *path,const char *name)
+ void writeStartAnnoItem(const QCString &type,const QCString &file,
+ const QCString &path,const QCString &name)
{ forall(&OutputGenerator::writeStartAnnoItem,type,file,path,name); }
- void writeEndAnnoItem(const char *name)
+ void writeEndAnnoItem(const QCString &name)
{ forall(&OutputGenerator::writeEndAnnoItem,name); }
void startTypewriter()
{ forall(&OutputGenerator::startTypewriter); }
@@ -181,7 +181,7 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::startHeaderSection); }
void endHeaderSection()
{ forall(&OutputGenerator::endHeaderSection); }
- void startMemberHeader(const char *anchor, int typ = 2)
+ void startMemberHeader(const QCString &anchor, int typ = 2)
{ forall(&OutputGenerator::startMemberHeader,anchor,typ); }
void endMemberHeader()
{ forall(&OutputGenerator::endMemberHeader); }
@@ -205,14 +205,18 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::startAnonTypeScope,i1); }
void endAnonTypeScope(int i1)
{ forall(&OutputGenerator::endAnonTypeScope,i1); }
- void startMemberItem(const char *anchor,int i1,const char *id=0)
+ void startMemberItem(const QCString &anchor,int i1,const QCString &id=QCString())
{ forall(&OutputGenerator::startMemberItem,anchor,i1,id); }
void endMemberItem()
{ forall(&OutputGenerator::endMemberItem); }
void startMemberTemplateParams()
{ forall(&OutputGenerator::startMemberTemplateParams); }
- void endMemberTemplateParams(const char *anchor,const char *inheritId)
+ void endMemberTemplateParams(const QCString &anchor,const QCString &inheritId)
{ forall(&OutputGenerator::endMemberTemplateParams,anchor,inheritId); }
+ void startCompoundTemplateParams()
+ { forall(&OutputGenerator::startCompoundTemplateParams); }
+ void endCompoundTemplateParams()
+ { forall(&OutputGenerator::endCompoundTemplateParams); }
void startMemberGroupHeader(bool b)
{ forall(&OutputGenerator::startMemberGroupHeader,b); }
void endMemberGroupHeader()
@@ -231,17 +235,17 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::insertMemberAlignLeft,typ,templ); }
void writeRuler()
{ forall(&OutputGenerator::writeRuler); }
- void writeAnchor(const char *fileName,const char *name)
+ void writeAnchor(const QCString &fileName,const QCString &name)
{ forall(&OutputGenerator::writeAnchor,fileName,name); }
- void startCodeFragment(const char *style)
+ void startCodeFragment(const QCString &style)
{ forall(&OutputGenerator::startCodeFragment,style); }
- void endCodeFragment(const char *style)
+ void endCodeFragment(const QCString &style)
{ forall(&OutputGenerator::endCodeFragment,style); }
void startCodeLine(bool hasLineNumbers)
{ forall(&OutputGenerator::startCodeLine,hasLineNumbers); }
void endCodeLine()
{ forall(&OutputGenerator::endCodeLine); }
- void writeLineNumber(const char *ref,const char *file,const char *anchor,
+ void writeLineNumber(const QCString &ref,const QCString &file,const QCString &anchor,
int lineNumber)
{ forall(&OutputGenerator::writeLineNumber,ref,file,anchor,lineNumber); }
void startEmphasis()
@@ -250,17 +254,17 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::endEmphasis); }
void writeChar(char c)
{ forall(&OutputGenerator::writeChar,c); }
- void startMemberDoc(const char *clName,const char *memName,
- const char *anchor,const char *title,
+ void startMemberDoc(const QCString &clName,const QCString &memName,
+ const QCString &anchor,const QCString &title,
int memCount,int memTotal,bool showInline)
{ forall(&OutputGenerator::startMemberDoc,clName,memName,anchor,title,memCount,memTotal,showInline); }
void endMemberDoc(bool hasArgs)
{ forall(&OutputGenerator::endMemberDoc,hasArgs); }
- void startDoxyAnchor(const char *fName,const char *manName,
- const char *anchor, const char *name,
- const char *args)
+ void startDoxyAnchor(const QCString &fName,const QCString &manName,
+ const QCString &anchor, const QCString &name,
+ const QCString &args)
{ forall(&OutputGenerator::startDoxyAnchor,fName,manName,anchor,name,args); }
- void endDoxyAnchor(const char *fn,const char *anchor)
+ void endDoxyAnchor(const QCString &fn,const QCString &anchor)
{ forall(&OutputGenerator::endDoxyAnchor,fn,anchor); }
void writeLatexSpacing()
{ forall(&OutputGenerator::writeLatexSpacing); }
@@ -292,30 +296,30 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::startSmall); }
void endSmall()
{ forall(&OutputGenerator::endSmall); }
- void lineBreak(const char *style=0)
+ void lineBreak(const QCString &style=QCString())
{ forall(&OutputGenerator::lineBreak,style); }
void startBold()
{ forall(&OutputGenerator::startBold); }
void endBold()
{ forall(&OutputGenerator::endBold); }
- void startMemberDescription(const char *anchor,const char *inheritId=0, bool typ = false)
+ void startMemberDescription(const QCString &anchor,const QCString &inheritId=QCString(), bool typ = false)
{ forall(&OutputGenerator::startMemberDescription,anchor,inheritId, typ); }
void endMemberDescription()
{ forall(&OutputGenerator::endMemberDescription); }
void startMemberDeclaration()
{ forall(&OutputGenerator::startMemberDeclaration); }
- void endMemberDeclaration(const char *anchor,const char *inheritId)
+ void endMemberDeclaration(const QCString &anchor,const QCString &inheritId)
{ forall(&OutputGenerator::endMemberDeclaration,anchor,inheritId); }
- void writeInheritedSectionTitle(const char *id, const char *ref,
- const char *file, const char *anchor,
- const char *title,const char *name)
+ void writeInheritedSectionTitle(const QCString &id, const QCString &ref,
+ const QCString &file, const QCString &anchor,
+ const QCString &title,const QCString &name)
{ forall(&OutputGenerator::writeInheritedSectionTitle,id,ref,
file,anchor,title,name); }
void startExamples()
{ forall(&OutputGenerator::startExamples); }
void endExamples()
{ forall(&OutputGenerator::endExamples); }
- void startParamList(ParamListTypes t,const char *title)
+ void startParamList(ParamListTypes t,const QCString &title)
{ forall(&OutputGenerator::startParamList,t,title); }
void endParamList()
{ forall(&OutputGenerator::endParamList); }
@@ -323,47 +327,47 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::startIndent); }
void endIndent()
{ forall(&OutputGenerator::endIndent); }
- void startSection(const char *lab,const char *title,SectionType t)
+ void startSection(const QCString &lab,const QCString &title,SectionType t)
{ forall(&OutputGenerator::startSection,lab,title,t); }
- void endSection(const char *lab,SectionType t)
+ void endSection(const QCString &lab,SectionType t)
{ forall(&OutputGenerator::endSection,lab,t); }
- void addIndexItem(const char *s1,const char *s2)
+ void addIndexItem(const QCString &s1,const QCString &s2)
{ forall(&OutputGenerator::addIndexItem,s1,s2); }
void writeSynopsis()
{ forall(&OutputGenerator::writeSynopsis); }
void startClassDiagram()
{ forall(&OutputGenerator::startClassDiagram); }
- void endClassDiagram(const ClassDiagram &d,const char *f,const char *n)
+ void endClassDiagram(const ClassDiagram &d,const QCString &f,const QCString &n)
{ forall(&OutputGenerator::endClassDiagram,d,f,n); }
void startPageRef()
{ forall(&OutputGenerator::startPageRef); }
- void endPageRef(const char *c,const char *a)
+ void endPageRef(const QCString &c,const QCString &a)
{ forall(&OutputGenerator::endPageRef,c,a); }
void startQuickIndices()
{ forall(&OutputGenerator::startQuickIndices); }
void endQuickIndices()
{ forall(&OutputGenerator::endQuickIndices); }
- void writeSplitBar(const char *name)
+ void writeSplitBar(const QCString &name)
{ forall(&OutputGenerator::writeSplitBar,name); }
- void writeNavigationPath(const char *s)
+ void writeNavigationPath(const QCString &s)
{ forall(&OutputGenerator::writeNavigationPath,s); }
void writeLogo()
{ forall(&OutputGenerator::writeLogo); }
- void writeQuickLinks(bool compact,HighlightedItem hli,const char *file)
+ void writeQuickLinks(bool compact,HighlightedItem hli,const QCString &file)
{ forall(&OutputGenerator::writeQuickLinks,compact,hli,file); }
- void writeSummaryLink(const char *file,const char *anchor,const char *title,bool first)
+ void writeSummaryLink(const QCString &file,const QCString &anchor,const QCString &title,bool first)
{ forall(&OutputGenerator::writeSummaryLink,file,anchor,title,first); }
void startContents()
{ forall(&OutputGenerator::startContents); }
void endContents()
{ forall(&OutputGenerator::endContents); }
- void startPageDoc(const char *pageTitle)
+ void startPageDoc(const QCString &pageTitle)
{ forall(&OutputGenerator::startPageDoc, pageTitle); }
void endPageDoc()
{ forall(&OutputGenerator::endPageDoc); }
void writeNonBreakableSpace(int num)
{ forall(&OutputGenerator::writeNonBreakableSpace,num); }
- void startDescTable(const char *title)
+ void startDescTable(const QCString &title)
{ forall(&OutputGenerator::startDescTable,title); }
void endDescTable()
{ forall(&OutputGenerator::endDescTable); }
@@ -415,7 +419,7 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::startMemberDocName,align); }
void endMemberDocName()
{ forall(&OutputGenerator::endMemberDocName); }
- void startParameterType(bool first,const char *key)
+ void startParameterType(bool first,const QCString &key)
{ forall(&OutputGenerator::startParameterType,first,key); }
void endParameterType()
{ forall(&OutputGenerator::endParameterType); }
@@ -427,10 +431,10 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::startParameterList,openBracket); }
void endParameterList()
{ forall(&OutputGenerator::endParameterList); }
- void exceptionEntry(const char* prefix,bool closeBracket)
+ void exceptionEntry(const QCString &prefix,bool closeBracket)
{ forall(&OutputGenerator::exceptionEntry,prefix,closeBracket); }
- void startConstraintList(const char *header)
+ void startConstraintList(const QCString &header)
{ forall(&OutputGenerator::startConstraintList,header); }
void startConstraintParam()
{ forall(&OutputGenerator::startConstraintParam); }
@@ -466,23 +470,23 @@ class OutputList : public OutputDocInterface
void startLabels()
{ forall(&OutputGenerator::startLabels); }
- void writeLabel(const char *l,bool isLast)
+ void writeLabel(const QCString &l,bool isLast)
{ forall(&OutputGenerator::writeLabel,l,isLast); }
void endLabels()
{ forall(&OutputGenerator::endLabels); }
- void startFontClass(const char *c)
+ void startFontClass(const QCString &c)
{ forall(&OutputGenerator::startFontClass,c); }
void endFontClass()
{ forall(&OutputGenerator::endFontClass); }
- void writeCodeAnchor(const char *name)
+ void writeCodeAnchor(const QCString &name)
{ forall(&OutputGenerator::writeCodeAnchor,name); }
- void setCurrentDoc(const Definition *context,const char *anchor,bool isSourceFile)
+ void setCurrentDoc(const Definition *context,const QCString &anchor,bool isSourceFile)
{ forall(&OutputGenerator::setCurrentDoc,context,anchor,isSourceFile); }
- void addWord(const char *word,bool hiPriority)
+ void addWord(const QCString &word,bool hiPriority)
{ forall(&OutputGenerator::addWord,word,hiPriority); }
- void startPlainFile(const char *name)
+ void startPlainFile(const QCString &name)
{ forall(&OutputGenerator::startPlainFile,name); }
void endPlainFile()
{ forall(&OutputGenerator::endPlainFile); }
diff --git a/src/pagedef.cpp b/src/pagedef.cpp
index 4634be7..07a1f9e 100644
--- a/src/pagedef.cpp
+++ b/src/pagedef.cpp
@@ -30,10 +30,10 @@
class PageDefImpl : public DefinitionMixin<PageDef>
{
public:
- PageDefImpl(const char *f,int l,const char *n,const char *d,const char *t);
+ PageDefImpl(const QCString &f,int l,const QCString &n,const QCString &d,const QCString &t);
virtual ~PageDefImpl();
- virtual void setFileName(const char *name);
+ virtual void setFileName(const QCString &name);
virtual void setLocalToc(const LocalToc &tl);
virtual void setShowLineNo(bool);
virtual DefType definitionType() const { return TypePage; }
@@ -57,7 +57,7 @@ class PageDefImpl : public DefinitionMixin<PageDef>
virtual QCString displayName(bool=TRUE) const { return hasTitle() ? m_title : DefinitionMixin::name(); }
virtual bool showLineNo() const;
virtual void writeDocumentation(OutputList &ol);
- virtual void writeTagFile(FTextStream &);
+ virtual void writeTagFile(TextStream &);
virtual void setNestingLevel(int l);
virtual void writePageDocumentation(OutputList &ol) const;
@@ -71,16 +71,16 @@ class PageDefImpl : public DefinitionMixin<PageDef>
bool m_showLineNo;
};
-PageDef *createPageDef(const char *f,int l,const char *n,const char *d,const char *t)
+PageDef *createPageDef(const QCString &f,int l,const QCString &n,const QCString &d,const QCString &t)
{
return new PageDefImpl(f,l,n,d,t);
}
//------------------------------------------------------------------------------------------
-PageDefImpl::PageDefImpl(const char *f,int l,const char *n,
- const char *d,const char *t)
- : DefinitionMixin(f,l,1,n), m_title(t?t:n)
+PageDefImpl::PageDefImpl(const QCString &f,int l,const QCString &n,
+ const QCString &d,const QCString &t)
+ : DefinitionMixin(f,l,1,n), m_title(!t.isEmpty() ? t : n)
{
setDocumentation(d,f,l);
m_pageScope = 0;
@@ -112,7 +112,7 @@ QCString PageDefImpl::getOutputFileBase() const
return m_fileName;
}
-void PageDefImpl::setFileName(const char *name)
+void PageDefImpl::setFileName(const QCString &name)
{
m_fileName = name;
}
@@ -144,7 +144,7 @@ bool PageDefImpl::hasParentPage() const
getOuterScope()->definitionType()==Definition::TypePage;
}
-void PageDefImpl::writeTagFile(FTextStream &tagFile)
+void PageDefImpl::writeTagFile(TextStream &tagFile)
{
bool found = name()=="citelist";
for (RefListManager::Ptr &rl : RefListManager::instance())
@@ -157,12 +157,12 @@ void PageDefImpl::writeTagFile(FTextStream &tagFile)
}
if (!found) // not one of the generated related pages
{
- tagFile << " <compound kind=\"page\">" << endl;
- tagFile << " <name>" << name() << "</name>" << endl;
- tagFile << " <title>" << convertToXML(title()) << "</title>" << endl;
- tagFile << " <filename>" << convertToXML(getOutputFileBase())<< Doxygen::htmlFileExtension << "</filename>" << endl;
+ tagFile << " <compound kind=\"page\">\n";
+ tagFile << " <name>" << name() << "</name>\n";
+ tagFile << " <title>" << convertToXML(title()) << "</title>\n";
+ tagFile << " <filename>" << convertToXML(getOutputFileBase())<< Doxygen::htmlFileExtension << "</filename>\n";
writeDocAnchorsToTagFile(tagFile);
- tagFile << " </compound>" << endl;
+ tagFile << " </compound>\n";
}
}
@@ -232,7 +232,7 @@ void PageDefImpl::writeDocumentation(OutputList &ol)
if (si->title() != manPageName)
{
ol.generateDoc(docFile(),getStartBodyLine(),this,0,si->title(),TRUE,FALSE,
- 0,TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
ol.endSection(si->label(),si->type());
}
}
@@ -252,7 +252,7 @@ void PageDefImpl::writeDocumentation(OutputList &ol)
//ol.startSection(si->label,si->title,si->type);
startTitle(ol,getOutputFileBase(),this);
ol.generateDoc(docFile(),getStartBodyLine(),this,0,si->title(),TRUE,FALSE,
- 0,TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
//stringToSearchIndex(getOutputFileBase(),
// theTranslator->trPage(TRUE,TRUE)+" "+si->title,
// si->title);
@@ -286,7 +286,7 @@ void PageDefImpl::writeDocumentation(OutputList &ol)
ol.popGeneratorState();
//1.}
- Doxygen::indexList->addIndexItem(this,0,0,filterTitle(title().str()));
+ Doxygen::indexList->addIndexItem(this,0,QCString(),filterTitle(title().str()));
}
void PageDefImpl::writePageDocumentation(OutputList &ol) const
@@ -308,7 +308,7 @@ void PageDefImpl::writePageDocumentation(OutputList &ol) const
docStr, // docStr
TRUE, // index words
FALSE, // not an example
- 0, // exampleName
+ QCString(), // exampleName
FALSE, // singleLine
FALSE, // linkFromIndex
TRUE // markdown support
diff --git a/src/pagedef.h b/src/pagedef.h
index dba30dc..1a7b301 100644
--- a/src/pagedef.h
+++ b/src/pagedef.h
@@ -20,7 +20,6 @@
class PageLinkedRefMap;
class OutputList;
-class FTextStream;
/** @brief A model of a page symbol. */
class PageDef : public DefinitionMutable, public Definition
@@ -29,7 +28,7 @@ class PageDef : public DefinitionMutable, public Definition
virtual ~PageDef() {}
// setters
- virtual void setFileName(const char *name) = 0;
+ virtual void setFileName(const QCString &name) = 0;
virtual void setLocalToc(const LocalToc &tl) = 0;
virtual void setShowLineNo(bool) = 0;
@@ -56,13 +55,13 @@ class PageDef : public DefinitionMutable, public Definition
virtual bool showLineNo() const = 0;
virtual void writeDocumentation(OutputList &) = 0;
- virtual void writeTagFile(FTextStream &) = 0;
+ virtual void writeTagFile(TextStream &) = 0;
virtual void setNestingLevel(int) = 0;
virtual void writePageDocumentation(OutputList &) const = 0;
};
-PageDef *createPageDef(const char *f,int l,const char *n,const char *d,const char *t);
+PageDef *createPageDef(const QCString &f,int l,const QCString &n,const QCString &d,const QCString &t);
// --- Cast functions
diff --git a/src/parserintf.h b/src/parserintf.h
index 05b3adf..ccb4359 100644
--- a/src/parserintf.h
+++ b/src/parserintf.h
@@ -52,7 +52,7 @@ class OutlineParserInterface
* @param[in] clangParser The clang translation unit parser object
* or nullptr if disabled.
*/
- virtual void parseInput(const char *fileName,
+ virtual void parseInput(const QCString &fileName,
const char *fileBuf,
const std::shared_ptr<Entry> &root,
ClangTUParser *clangParser) = 0;
@@ -70,7 +70,7 @@ class OutlineParserInterface
* in the Entry node that corresponds with the node for which the
* comment block parser was invoked.
*/
- virtual void parsePrototype(const char *text) = 0;
+ virtual void parsePrototype(const QCString &text) = 0;
};
@@ -88,9 +88,9 @@ class CodeParserInterface
/** Parses a source file or fragment with the goal to produce
* highlighted and cross-referenced output.
* @param[in] codeOutIntf Abstract interface for writing the result.
- * @param[in] lang The programming language of the code fragment.
* @param[in] scopeName Name of scope to which the code belongs.
* @param[in] input Actual code in the form of a string
+ * @param[in] lang The programming language of the code fragment.
* @param[in] isExampleBlock TRUE iff the code is part of an example.
* @param[in] exampleName Name of the example.
* @param[in] fileDef File definition to which the code
@@ -108,11 +108,11 @@ class CodeParserInterface
* @param[in] collectXRefs collect cross-reference relations.
*/
virtual void parseCode(CodeOutputInterface &codeOutIntf,
- const char *scopeName,
+ const QCString &scopeName,
const QCString &input,
SrcLangExt lang,
bool isExampleBlock,
- const char *exampleName=0,
+ const QCString &exampleName=QCString(),
FileDef *fileDef=0,
int startLine=-1,
int endLine=-1,
@@ -147,7 +147,7 @@ class ParserManager
struct ParserPair
{
- ParserPair(OutlineParserFactory opf, CodeParserFactory cpf, const QCString pn)
+ ParserPair(OutlineParserFactory opf, CodeParserFactory cpf, const QCString &pn)
: outlineParserFactory(opf), codeParserFactory(cpf), parserName(pn)
{
}
@@ -164,7 +164,7 @@ class ParserManager
*/
ParserManager(OutlineParserFactory outlineParserFactory,
CodeParserFactory codeParserFactory)
- : m_defaultParsers(outlineParserFactory,codeParserFactory, "")
+ : m_defaultParsers(outlineParserFactory,codeParserFactory, QCString())
{
}
@@ -176,28 +176,28 @@ class ParserManager
* @param[in] codeParserFactory A factory method to create a code parser that is to be used
* for the given name.
*/
- void registerParser(const char *name,OutlineParserFactory outlineParserFactory,
+ void registerParser(const QCString &name,OutlineParserFactory outlineParserFactory,
CodeParserFactory codeParserFactory)
{
- m_parsers.emplace(std::string(name),ParserPair(outlineParserFactory,codeParserFactory,name));
+ m_parsers.emplace(name.str(),ParserPair(outlineParserFactory,codeParserFactory,name));
}
/** Registers a file \a extension with a parser with name \a parserName.
* Returns TRUE if the extension was successfully registered.
*/
- bool registerExtension(const char *extension, const char *parserName)
+ bool registerExtension(const QCString &extension, const QCString &parserName)
{
- if (parserName==0 || extension==0) return FALSE;
+ if (parserName.isEmpty() || extension.isEmpty()) return FALSE;
- const auto &parserIt = m_parsers.find(parserName);
+ const auto &parserIt = m_parsers.find(parserName.str());
if (parserIt == m_parsers.end()) return FALSE;
- auto extensionIt = m_extensions.find(extension);
+ auto extensionIt = m_extensions.find(extension.str());
if (extensionIt != m_extensions.end()) // extension already exists
{
m_extensions.erase(extensionIt); // remove it (e.g. user specified extension overrules built in one)
}
- m_extensions.emplace(std::string(extension),parserIt->second); // add new mapping
+ m_extensions.emplace(extension.str(),parserIt->second); // add new mapping
return TRUE;
}
@@ -205,7 +205,7 @@ class ParserManager
* If there is no parser explicitly registered for the supplied extension,
* the interface to the default parser will be returned.
*/
- std::unique_ptr<OutlineParserInterface> getOutlineParser(const char *extension)
+ std::unique_ptr<OutlineParserInterface> getOutlineParser(const QCString &extension)
{
return getParsers(extension).outlineParserFactory();
}
@@ -214,14 +214,14 @@ class ParserManager
* If there is no parser explicitly registered for the supplied extension,
* the interface to the default parser will be returned.
*/
- std::unique_ptr<CodeParserInterface> getCodeParser(const char *extension)
+ std::unique_ptr<CodeParserInterface> getCodeParser(const QCString &extension)
{
auto factory = getCodeParserFactory(extension);
return factory();
}
/** Get the factory for create code parser objects with a given \a extension. */
- CodeParserFactory &getCodeParserFactory(const char *extension)
+ CodeParserFactory &getCodeParserFactory(const QCString &extension)
{
return getParsers(extension).codeParserFactory;
}
@@ -230,15 +230,15 @@ class ParserManager
* If there is no parser explicitly registered for the supplied extension,
* te empty string will be reurned.
*/
- QCString getParserName(const char *extension)
+ QCString getParserName(const QCString &extension)
{
return getParsers(extension).parserName;
}
private:
- ParserPair &getParsers(const char *extension)
+ ParserPair &getParsers(const QCString &extension)
{
- QCString ext = QCString(extension).lower().data();
+ QCString ext = extension.lower();
if (ext.isEmpty()) ext=".no_extension";
auto it = m_extensions.find(ext.data());
if (it==m_extensions.end() && ext.length()>4)
diff --git a/src/perlmodgen.cpp b/src/perlmodgen.cpp
index 4cf0d4a..b86f9aa 100644
--- a/src/perlmodgen.cpp
+++ b/src/perlmodgen.cpp
@@ -20,8 +20,8 @@
#include <stdlib.h>
#include <stack>
-#include <qdir.h>
-#include <qfile.h>
+#include <fstream>
+#include <iostream>
#include "perlmodgen.h"
#include "docparser.h"
@@ -29,7 +29,6 @@
#include "doxygen.h"
#include "pagedef.h"
#include "memberlist.h"
-#include "ftextstream.h"
#include "arguments.h"
#include "config.h"
#include "groupdef.h"
@@ -43,63 +42,58 @@
#include "util.h"
#include "htmlentity.h"
#include "emoji.h"
+#include "dir.h"
#define PERLOUTPUT_MAX_INDENTATION 40
class PerlModOutputStream
{
-public:
-
- QCString m_s;
- FTextStream *m_t;
+ public:
+ //QCString m_s;
+ std::ostream &m_t;
- PerlModOutputStream(FTextStream *t = 0) : m_t(t) { }
+ PerlModOutputStream(std::ostream &t) : m_t(t) { }
- void add(char c);
- void add(const char *s);
- void add(QCString &s);
- void add(int n);
- void add(unsigned int n);
+ void add(char c);
+ void add(const QCString &s);
+ void add(int n);
+ void add(unsigned int n);
};
void PerlModOutputStream::add(char c)
{
- if (m_t != 0)
- (*m_t) << c;
- else
- m_s += c;
+ m_t << c;
+ //if (m_t != 0)
+ // (*m_t) << c;
+ //else
+ // m_s += c;
}
-void PerlModOutputStream::add(const char *s)
+void PerlModOutputStream::add(const QCString &s)
{
- if (m_t != 0)
- (*m_t) << s;
- else
- m_s += s;
-}
-
-void PerlModOutputStream::add(QCString &s)
-{
- if (m_t != 0)
- (*m_t) << s;
- else
- m_s += s;
+ m_t << s;
+ //if (m_t != 0)
+ // (*m_t) << s;
+ //else
+ // m_s += s;
}
void PerlModOutputStream::add(int n)
{
- if (m_t != 0)
- (*m_t) << n;
- else
- m_s += QCString().setNum(n);
+ m_t << n;
+ //if (m_t != 0)
+ // (*m_t) << n;
+ //else
+ // m_s += QCString().setNum(n);
}
void PerlModOutputStream::add(unsigned int n)
{
- if (m_t != 0)
- (*m_t) << n;
- else
- m_s += QCString().setNum(n);
+ m_t << n;
+ //if (m_t != 0)
+ // (*m_t) << n;
+ //else
+ // m_s += QCString().setNum(n);
}
class PerlModOutput
@@ -118,8 +112,8 @@ public:
inline void setPerlModOutputStream(PerlModOutputStream *os) { m_stream = os; }
- inline PerlModOutput &openSave() { iopenSave(); return *this; }
- inline PerlModOutput &closeSave(QCString &s) { icloseSave(s); return *this; }
+ //inline PerlModOutput &openSave() { iopenSave(); return *this; }
+ //inline PerlModOutput &closeSave(QCString &s) { icloseSave(s); return *this; }
inline PerlModOutput &continueBlock()
{
@@ -132,12 +126,12 @@ public:
}
inline PerlModOutput &add(char c) { m_stream->add(c); return *this; }
- inline PerlModOutput &add(const char *s) { m_stream->add(s); return *this; }
+ inline PerlModOutput &add(const QCString &s) { m_stream->add(s); return *this; }
inline PerlModOutput &add(QCString &s) { m_stream->add(s); return *this; }
inline PerlModOutput &add(int n) { m_stream->add(n); return *this; }
inline PerlModOutput &add(unsigned int n) { m_stream->add(n); return *this; }
- PerlModOutput &addQuoted(const char *s) { iaddQuoted(s); return *this; }
+ PerlModOutput &addQuoted(const QCString &s) { iaddQuoted(s); return *this; }
inline PerlModOutput &indent()
{
@@ -148,41 +142,41 @@ public:
return *this;
}
- inline PerlModOutput &open(char c, const char *s = 0) { iopen(c, s); return *this; }
+ inline PerlModOutput &open(char c, const QCString &s = QCString()) { iopen(c, s); return *this; }
inline PerlModOutput &close(char c = 0) { iclose(c); return *this; }
- inline PerlModOutput &addField(const char *s) { iaddField(s); return *this; }
- inline PerlModOutput &addFieldQuotedChar(const char *field, char content)
+ inline PerlModOutput &addField(const QCString &s) { iaddField(s); return *this; }
+ inline PerlModOutput &addFieldQuotedChar(const QCString &field, char content)
{
iaddFieldQuotedChar(field, content); return *this;
}
- inline PerlModOutput &addFieldQuotedString(const char *field, const char *content)
+ inline PerlModOutput &addFieldQuotedString(const QCString &field, const QCString &content)
{
iaddFieldQuotedString(field, content); return *this;
}
- inline PerlModOutput &addFieldBoolean(const char *field, bool content)
+ inline PerlModOutput &addFieldBoolean(const QCString &field, bool content)
{
return addFieldQuotedString(field, content ? "yes" : "no");
}
- inline PerlModOutput &openList(const char *s = 0) { open('[', s); return *this; }
+ inline PerlModOutput &openList(const QCString &s = QCString()) { open('[', s); return *this; }
inline PerlModOutput &closeList() { close(']'); return *this; }
- inline PerlModOutput &openHash(const char *s = 0 ) { open('{', s); return *this; }
+ inline PerlModOutput &openHash(const QCString &s = QCString() ) { open('{', s); return *this; }
inline PerlModOutput &closeHash() { close('}'); return *this; }
protected:
- void iopenSave();
- void icloseSave(QCString &);
+ //void iopenSave();
+ //void icloseSave(QCString &);
void incIndent();
void decIndent();
- void iaddQuoted(const char *);
- void iaddFieldQuotedChar(const char *, char);
- void iaddFieldQuotedString(const char *, const char *);
- void iaddField(const char *);
+ void iaddQuoted(const QCString &);
+ void iaddFieldQuotedChar(const QCString &, char);
+ void iaddFieldQuotedString(const QCString &, const QCString &);
+ void iaddField(const QCString &);
- void iopen(char, const char *);
+ void iopen(char, const QCString &);
void iclose(char);
private:
@@ -191,23 +185,23 @@ private:
int m_indentation;
bool m_blockstart;
- std::stack<PerlModOutputStream*> m_saved;
+ //std::stack<PerlModOutputStream*> m_saved;
char m_spaces[PERLOUTPUT_MAX_INDENTATION * 2 + 2];
};
-void PerlModOutput::iopenSave()
-{
- m_saved.push(m_stream);
- m_stream = new PerlModOutputStream();
-}
+//void PerlModOutput::iopenSave()
+//{
+// m_saved.push(m_stream);
+// m_stream = new PerlModOutputStream();
+//}
-void PerlModOutput::icloseSave(QCString &s)
-{
- s = m_stream->m_s;
- delete m_stream;
- m_stream = m_saved.top();
- m_saved.pop();
-}
+//void PerlModOutput::icloseSave(QCString &s)
+//{
+// s = m_stream->m_s;
+// delete m_stream;
+// m_stream = m_saved.top();
+// m_saved.pop();
+//}
void PerlModOutput::incIndent()
{
@@ -226,24 +220,29 @@ void PerlModOutput::decIndent()
m_spaces[m_indentation * 2] = 0;
}
-void PerlModOutput::iaddQuoted(const char *s)
+void PerlModOutput::iaddQuoted(const QCString &str)
{
+ if (str.isEmpty()) return;
+ const char *s = str.data();
char c;
- while ((c = *s++) != 0) {
+ while ((c = *s++) != 0)
+ {
if ((c == '\'') || (c == '\\'))
+ {
m_stream->add('\\');
+ }
m_stream->add(c);
}
}
-void PerlModOutput::iaddField(const char *s)
+void PerlModOutput::iaddField(const QCString &s)
{
continueBlock();
m_stream->add(s);
m_stream->add(m_pretty ? " => " : "=>");
}
-void PerlModOutput::iaddFieldQuotedChar(const char *field, char content)
+void PerlModOutput::iaddFieldQuotedChar(const QCString &field, char content)
{
iaddField(field);
m_stream->add('\'');
@@ -253,7 +252,7 @@ void PerlModOutput::iaddFieldQuotedChar(const char *field, char content)
m_stream->add('\'');
}
-void PerlModOutput::iaddFieldQuotedString(const char *field, const char *content)
+void PerlModOutput::iaddFieldQuotedString(const QCString &field, const QCString &content)
{
if (content == 0)
return;
@@ -263,7 +262,7 @@ void PerlModOutput::iaddFieldQuotedString(const char *field, const char *content
m_stream->add('\'');
}
-void PerlModOutput::iopen(char c, const char *s)
+void PerlModOutput::iopen(char c, const QCString &s)
{
if (s != 0)
iaddField(s);
@@ -409,13 +408,13 @@ private:
void enterText();
void leaveText();
- void openItem(const char *);
+ void openItem(const QCString &);
void closeItem();
- void singleItem(const char *);
- void openSubBlock(const char * = 0);
+ void singleItem(const QCString &);
+ void openSubBlock(const QCString & = QCString());
void closeSubBlock();
- void openOther();
- void closeOther();
+ //void openOther();
+ //void closeOther();
//--------------------------------------
// state variables
@@ -448,7 +447,7 @@ void PerlModDocVisitor::addLink(const QCString &,const QCString &file,const QCSt
m_output.addFieldQuotedString("link", link);
}
-void PerlModDocVisitor::openItem(const char *name)
+void PerlModDocVisitor::openItem(const QCString &name)
{
leaveText();
m_output.openHash().addFieldQuotedString("type", name);
@@ -479,13 +478,13 @@ void PerlModDocVisitor::leaveText()
.closeHash();
}
-void PerlModDocVisitor::singleItem(const char *name)
+void PerlModDocVisitor::singleItem(const QCString &name)
{
openItem(name);
closeItem();
}
-void PerlModDocVisitor::openSubBlock(const char *s)
+void PerlModDocVisitor::openSubBlock(const QCString &s)
{
leaveText();
m_output.openList(s);
@@ -498,18 +497,18 @@ void PerlModDocVisitor::closeSubBlock()
m_output.closeList();
}
-void PerlModDocVisitor::openOther()
-{
+//void PerlModDocVisitor::openOther()
+//{
// Using a secondary text stream will corrupt the perl file. Instead of
// printing doc => [ data => [] ], it will print doc => [] data => [].
/*
leaveText();
m_output.openSave();
*/
-}
+//}
-void PerlModDocVisitor::closeOther()
-{
+//void PerlModDocVisitor::closeOther()
+//{
// Using a secondary text stream will corrupt the perl file. Instead of
// printing doc => [ data => [] ], it will print doc => [] data => [].
/*
@@ -518,7 +517,7 @@ void PerlModDocVisitor::closeOther()
m_output.closeSave(other);
m_other += other;
*/
-}
+//}
void PerlModDocVisitor::visit(DocWord *w)
{
@@ -709,23 +708,8 @@ void PerlModDocVisitor::visit(DocInclude *inc)
switch(inc->type())
{
case DocInclude::IncWithLines:
- #if 0
- {
- m_t << "<div class=\"fragment\"><pre>";
- QFileInfo cfi( inc->file() );
- FileDef fd( cfi.dirPath(), cfi.fileName() );
- parseCode(m_ci,inc->context(),inc->text().latin1(),inc->isExample(),inc->exampleFile(), &fd);
- m_t << "</pre></div>";
- }
- break;
- #endif
return;
case DocInclude::Include:
-#if 0
- m_output.add("<programlisting>");
- parseCode(m_ci,inc->context(),inc->text(),FALSE,0);
- m_output.add("</programlisting>");
-#endif
return;
case DocInclude::DontInclude: return;
case DocInclude::DontIncWithLines: return;
@@ -889,14 +873,14 @@ void PerlModDocVisitor::visitPre(DocSimpleSect *s)
}
leaveText();
m_output.openHash();
- openOther();
+ //openOther();
openSubBlock(type);
}
void PerlModDocVisitor::visitPost(DocSimpleSect *)
{
closeSubBlock();
- closeOther();
+ //closeOther();
m_output.closeHash();
}
@@ -1276,14 +1260,14 @@ void PerlModDocVisitor::visitPre(DocParamSect *s)
break;
}
m_output.openHash();
- openOther();
+ //openOther();
openSubBlock(type);
}
void PerlModDocVisitor::visitPost(DocParamSect *)
{
closeSubBlock();
- closeOther();
+ //closeOther();
m_output.closeHash();
}
@@ -1374,7 +1358,7 @@ void PerlModDocVisitor::visitPost(DocXRefItem *x)
void PerlModDocVisitor::visitPre(DocInternalRef *ref)
{
openItem("ref");
- addLink(0,ref->file(),ref->anchor());
+ addLink(QCString(),ref->file(),ref->anchor());
openSubBlock("content");
}
@@ -1421,7 +1405,7 @@ void PerlModDocVisitor::visitPost(DocParBlock *)
}
-static void addTemplateArgumentList(const ArgumentList &al,PerlModOutput &output,const char *)
+static void addTemplateArgumentList(const ArgumentList &al,PerlModOutput &output,const QCString &)
{
if (!al.hasParameters()) return;
output.openList("template_parameters");
@@ -1445,8 +1429,13 @@ static void addTemplateList(const ClassDef *cd,PerlModOutput &output)
addTemplateArgumentList(cd->templateArguments(),output,cd->name());
}
+static void addTemplateList(const ConceptDef *cd,PerlModOutput &output)
+{
+ addTemplateArgumentList(cd->getTemplateParameterList(),output,cd->name());
+}
+
static void addPerlModDocBlock(PerlModOutput &output,
- const char *name,
+ const QCString &name,
const QCString &fileName,
int lineNr,
const Definition *scope,
@@ -1458,7 +1447,7 @@ static void addPerlModDocBlock(PerlModOutput &output,
output.addField(name).add("{}");
else {
DocNode *root = validatingParseDoc(fileName,lineNr,scope,md,stext,FALSE,FALSE,
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
output.openHash(name);
PerlModDocVisitor *visitor = new PerlModDocVisitor(output);
root->accept(visitor);
@@ -1498,7 +1487,7 @@ static QCString pathDoxyExec;
void setPerlModDoxyfile(const QCString &qs)
{
pathDoxyfile = qs;
- pathDoxyExec = QDir::currentDirPath().utf8();
+ pathDoxyExec = Dir::currentDirPath();
}
class PerlModGenerator
@@ -1525,16 +1514,18 @@ public:
void generatePerlModForMember(const MemberDef *md, const Definition *);
void generatePerlUserDefinedSection(const Definition *d, const MemberGroupList &mgl);
void generatePerlModSection(const Definition *d, MemberList *ml,
- const char *name, const char *header=0);
+ const QCString &name, const QCString &header=QCString());
void addListOfAllMembers(const ClassDef *cd);
+ void addIncludeInfo(const IncludeInfo *ii);
void generatePerlModForClass(const ClassDef *cd);
+ void generatePerlModForConcept(const ConceptDef *cd);
void generatePerlModForNamespace(const NamespaceDef *nd);
void generatePerlModForFile(const FileDef *fd);
void generatePerlModForGroup(const GroupDef *gd);
void generatePerlModForPage(PageDef *pi);
- bool createOutputFile(QFile &f, const char *s);
- bool createOutputDir(QDir &perlModDir);
+ bool createOutputFile(std::ofstream &f, const QCString &s);
+ bool createOutputDir(Dir &perlModDir);
bool generateDoxyLatexTex();
bool generateDoxyFormatTex();
bool generateDoxyStructurePM();
@@ -1665,7 +1656,7 @@ void PerlModGenerator::generatePerlModForMember(const MemberDef *md,const Defini
if (!md->initializer().isEmpty())
m_output.addFieldQuotedString("initializer", md->initializer());
- if (md->excpString())
+ if (!md->excpString().isEmpty())
m_output.addFieldQuotedString("exceptions", md->excpString());
if (md->memberType()==MemberType_Enumeration) // enum
@@ -1692,7 +1683,7 @@ void PerlModGenerator::generatePerlModForMember(const MemberDef *md,const Defini
}
}
- if (md->memberType() == MemberType_Variable && md->bitfieldString())
+ if (md->memberType() == MemberType_Variable && !md->bitfieldString().isEmpty())
{
QCString bitfield = md->bitfieldString();
if (bitfield.at(0) == ':') bitfield = bitfield.mid(1);
@@ -1720,13 +1711,13 @@ void PerlModGenerator::generatePerlModForMember(const MemberDef *md,const Defini
}
void PerlModGenerator::generatePerlModSection(const Definition *d,
- MemberList *ml,const char *name,const char *header)
+ MemberList *ml,const QCString &name,const QCString &header)
{
if (ml==0) return; // empty list
m_output.openHash(name);
- if (header)
+ if (!header.isEmpty())
m_output.addFieldQuotedString("header", header);
m_output.openList("members");
@@ -1773,8 +1764,10 @@ void PerlModGenerator::generatePerlUserDefinedSection(const Definition *d, const
for (const auto &mg : mgl)
{
m_output.openHash();
- if (mg->header())
+ if (!mg->header().isEmpty())
+ {
m_output.addFieldQuotedString("header", mg->header());
+ }
if (!mg->members().empty())
{
@@ -1791,6 +1784,22 @@ void PerlModGenerator::generatePerlUserDefinedSection(const Definition *d, const
}
}
+void PerlModGenerator::addIncludeInfo(const IncludeInfo *ii)
+{
+ if (ii)
+ {
+ QCString nm = ii->includeName;
+ if (nm.isEmpty() && ii->fileDef) nm = ii->fileDef->docName();
+ if (!nm.isEmpty())
+ {
+ m_output.openHash("includes");
+ m_output.addFieldBoolean("local", ii->local)
+ .addFieldQuotedString("name", nm)
+ .closeHash();
+ }
+ }
+}
+
void PerlModGenerator::generatePerlModForClass(const ClassDef *cd)
{
// + brief description
@@ -1855,23 +1864,7 @@ void PerlModGenerator::generatePerlModForClass(const ClassDef *cd)
m_output.closeList();
}
- const IncludeInfo *ii=cd->includeInfo();
- if (ii)
- {
- QCString nm = ii->includeName;
- if (nm.isEmpty() && ii->fileDef) nm = ii->fileDef->docName();
- if (!nm.isEmpty())
- {
- m_output.openHash("includes");
-#if 0
- if (ii->fileDef && !ii->fileDef->isReference()) // TODO: support external references
- t << " id=\"" << ii->fileDef->getOutputFileBase() << "\"";
-#endif
- m_output.addFieldBoolean("local", ii->local)
- .addFieldQuotedString("name", nm)
- .closeHash();
- }
- }
+ addIncludeInfo(cd->includeInfo());
addTemplateList(cd,m_output);
addListOfAllMembers(cd);
@@ -1933,6 +1926,22 @@ void PerlModGenerator::generatePerlModForClass(const ClassDef *cd)
m_output.closeHash();
}
+void PerlModGenerator::generatePerlModForConcept(const ConceptDef *cd)
+{
+ if (cd->isReference()) return; // skip external references
+
+ m_output.openHash()
+ .addFieldQuotedString("name", cd->name());
+
+ addIncludeInfo(cd->includeInfo());
+ addTemplateList(cd,m_output);
+ m_output.addFieldQuotedString("initializer", cd->initializer());
+ addPerlModDocBlock(m_output,"brief",cd->getDefFileName(),cd->getDefLine(),0,0,cd->briefDescription());
+ addPerlModDocBlock(m_output,"detailed",cd->getDefFileName(),cd->getDefLine(),0,0,cd->documentation());
+
+ m_output.closeHash();
+}
+
void PerlModGenerator::generatePerlModForNamespace(const NamespaceDef *nd)
{
// + contained class definitions
@@ -2152,12 +2161,11 @@ void PerlModGenerator::generatePerlModForPage(PageDef *pd)
bool PerlModGenerator::generatePerlModOutput()
{
- QFile outputFile;
- if (!createOutputFile(outputFile, pathDoxyDocsPM))
+ std::ofstream outputFileStream;
+ if (!createOutputFile(outputFileStream, pathDoxyDocsPM))
return false;
- FTextStream outputTextStream(&outputFile);
- PerlModOutputStream outputStream(&outputTextStream);
+ PerlModOutputStream outputStream(outputFileStream);
m_output.setPerlModOutputStream(&outputStream);
m_output.add("$doxydocs=").openHash();
@@ -2166,6 +2174,11 @@ bool PerlModGenerator::generatePerlModOutput()
generatePerlModForClass(cd.get());
m_output.closeList();
+ m_output.openList("concepts");
+ for (const auto &cd : *Doxygen::conceptLinkedMap)
+ generatePerlModForConcept(cd.get());
+ m_output.closeList();
+
m_output.openList("namespaces");
for (const auto &nd : *Doxygen::namespaceLinkedMap)
generatePerlModForNamespace(nd.get());
@@ -2203,56 +2216,20 @@ bool PerlModGenerator::generatePerlModOutput()
return true;
}
-bool PerlModGenerator::createOutputFile(QFile &f, const char *s)
+bool PerlModGenerator::createOutputFile(std::ofstream &f, const QCString &s)
{
- f.setName(s);
- if (!f.open(IO_WriteOnly))
+ f.open(s.str(),std::ofstream::out | std::ofstream::binary);
+ if (!f.is_open())
{
- err("Cannot open file %s for writing!\n", s);
+ err("Cannot open file %s for writing!\n", qPrint(s));
return false;
}
return true;
}
-bool PerlModGenerator::createOutputDir(QDir &perlModDir)
+bool PerlModGenerator::createOutputDir(Dir &perlModDir)
{
- QCString outputDirectory = Config_getString(OUTPUT_DIRECTORY);
- if (outputDirectory.isEmpty())
- {
- outputDirectory=QDir::currentDirPath().utf8();
- }
- else
- {
- QDir dir(outputDirectory);
- if (!dir.exists())
- {
- dir.setPath(QDir::currentDirPath());
- if (!dir.mkdir(outputDirectory))
- {
- term("tag OUTPUT_DIRECTORY: Output directory '%s' does not "
- "exist and cannot be created\n",outputDirectory.data());
- }
- else
- {
- msg("Notice: Output directory '%s' does not exist. "
- "I have created it for you.\n", outputDirectory.data());
- }
- dir.cd(outputDirectory);
- }
- outputDirectory=dir.absPath().utf8();
- }
-
- QDir dir(outputDirectory);
- if (!dir.exists())
- {
- dir.setPath(QDir::currentDirPath());
- if (!dir.mkdir(outputDirectory))
- {
- err("Cannot create directory %s\n",outputDirectory.data());
- return false;
- }
- }
-
+ std::string outputDirectory = Config_getString(OUTPUT_DIRECTORY).str();
perlModDir.setPath(outputDirectory+"/perlmod");
if (!perlModDir.exists() && !perlModDir.mkdir(outputDirectory+"/perlmod"))
{
@@ -2264,11 +2241,10 @@ bool PerlModGenerator::createOutputDir(QDir &perlModDir)
bool PerlModGenerator::generateDoxyStructurePM()
{
- QFile doxyModelPM;
- if (!createOutputFile(doxyModelPM, pathDoxyStructurePM))
+ std::ofstream doxyModelPMStream;
+ if (!createOutputFile(doxyModelPMStream, pathDoxyStructurePM))
return false;
- FTextStream doxyModelPMStream(&doxyModelPM);
doxyModelPMStream <<
"sub memberlist($) {\n"
" my $prefix = $_[0];\n"
@@ -2448,14 +2424,13 @@ bool PerlModGenerator::generateDoxyStructurePM()
bool PerlModGenerator::generateDoxyRules()
{
- QFile doxyRules;
- if (!createOutputFile(doxyRules, pathDoxyRules))
+ std::ofstream doxyRulesStream;
+ if (!createOutputFile(doxyRulesStream, pathDoxyRules))
return false;
bool perlmodLatex = Config_getBool(PERLMOD_LATEX);
QCString prefix = Config_getString(PERLMOD_MAKEVAR_PREFIX);
- FTextStream doxyRulesStream(&doxyRules);
doxyRulesStream <<
prefix << "DOXY_EXEC_PATH = " << pathDoxyExec << "\n" <<
prefix << "DOXYFILE = " << pathDoxyfile << "\n" <<
@@ -2545,14 +2520,13 @@ bool PerlModGenerator::generateDoxyRules()
bool PerlModGenerator::generateMakefile()
{
- QFile makefile;
- if (!createOutputFile(makefile, pathMakefile))
+ std::ofstream makefileStream;
+ if (!createOutputFile(makefileStream, pathMakefile))
return false;
bool perlmodLatex = Config_getBool(PERLMOD_LATEX);
QCString prefix = Config_getString(PERLMOD_MAKEVAR_PREFIX);
- FTextStream makefileStream(&makefile);
makefileStream <<
".PHONY: default clean" << (perlmodLatex ? " pdf" : "") << "\n"
"default: " << (perlmodLatex ? "pdf" : "clean") << "\n"
@@ -2572,11 +2546,10 @@ bool PerlModGenerator::generateMakefile()
bool PerlModGenerator::generateDoxyLatexStructurePL()
{
- QFile doxyLatexStructurePL;
- if (!createOutputFile(doxyLatexStructurePL, pathDoxyLatexStructurePL))
+ std::ofstream doxyLatexStructurePLStream;
+ if (!createOutputFile(doxyLatexStructurePLStream, pathDoxyLatexStructurePL))
return false;
- FTextStream doxyLatexStructurePLStream(&doxyLatexStructurePL);
doxyLatexStructurePLStream <<
"use DoxyStructure;\n"
"\n"
@@ -2606,11 +2579,10 @@ bool PerlModGenerator::generateDoxyLatexStructurePL()
bool PerlModGenerator::generateDoxyLatexPL()
{
- QFile doxyLatexPL;
- if (!createOutputFile(doxyLatexPL, pathDoxyLatexPL))
+ std::ofstream doxyLatexPLStream;
+ if (!createOutputFile(doxyLatexPLStream, pathDoxyLatexPL))
return false;
- FTextStream doxyLatexPLStream(&doxyLatexPL);
doxyLatexPLStream <<
"use DoxyStructure;\n"
"use DoxyDocs;\n"
@@ -2729,11 +2701,10 @@ bool PerlModGenerator::generateDoxyLatexPL()
bool PerlModGenerator::generateDoxyFormatTex()
{
- QFile doxyFormatTex;
- if (!createOutputFile(doxyFormatTex, pathDoxyFormatTex))
+ std::ofstream doxyFormatTexStream;
+ if (!createOutputFile(doxyFormatTexStream, pathDoxyFormatTex))
return false;
- FTextStream doxyFormatTexStream(&doxyFormatTex);
doxyFormatTexStream <<
"\\def\\Defcs#1{\\long\\expandafter\\def\\csname#1\\endcsname}\n"
"\\Defcs{Empty}{}\n"
@@ -2892,11 +2863,10 @@ bool PerlModGenerator::generateDoxyFormatTex()
bool PerlModGenerator::generateDoxyLatexTex()
{
- QFile doxyLatexTex;
- if (!createOutputFile(doxyLatexTex, pathDoxyLatexTex))
+ std::ofstream doxyLatexTexStream;
+ if (!createOutputFile(doxyLatexTexStream, pathDoxyLatexTex))
return false;
- FTextStream doxyLatexTexStream(&doxyLatexTex);
doxyLatexTexStream <<
"\\documentclass[a4paper,12pt]{article}\n"
"\\usepackage[latin1]{inputenc}\n"
@@ -2926,13 +2896,13 @@ void PerlModGenerator::generate()
// + related pages
// - examples
- QDir perlModDir;
+ Dir perlModDir;
if (!createOutputDir(perlModDir))
return;
bool perlmodLatex = Config_getBool(PERLMOD_LATEX);
- QCString perlModAbsPath = perlModDir.absPath().utf8();
+ QCString perlModAbsPath = perlModDir.absPath();
pathDoxyDocsPM = perlModAbsPath + "/DoxyDocs.pm";
pathDoxyStructurePM = perlModAbsPath + "/DoxyStructure.pm";
pathMakefile = perlModAbsPath + "/Makefile";
diff --git a/src/plantuml.cpp b/src/plantuml.cpp
index 51debca..81f7df8 100644
--- a/src/plantuml.cpp
+++ b/src/plantuml.cpp
@@ -20,8 +20,7 @@
#include "doxygen.h"
#include "message.h"
#include "debug.h"
-
-#include <qfileinfo.h>
+#include "fileinfo.h"
QCString PlantumlManager::writePlantUMLSource(const QCString &outDirArg,const QCString &fileName,const QCString &content,OutputFormat format)
{
@@ -86,7 +85,7 @@ QCString PlantumlManager::writePlantUMLSource(const QCString &outDirArg,const QC
return baseName;
}
-void PlantumlManager::generatePlantUMLOutput(const char *baseName,const char *outDir,OutputFormat format)
+void PlantumlManager::generatePlantUMLOutput(const QCString &baseName,const QCString &outDir,OutputFormat format)
{
QCString plantumlJarPath = Config_getString(PLANTUML_JAR_PATH);
QCString plantumlConfigFile = Config_getString(PLANTUML_CFG_FILE);
@@ -128,7 +127,7 @@ PlantumlManager &PlantumlManager::instance()
PlantumlManager::PlantumlManager()
{
QCString outputFilename = Config_getString(OUTPUT_DIRECTORY) + "/" + CACHE_FILENAME;
- QFileInfo fi(outputFilename);
+ FileInfo fi(outputFilename.str());
if (fi.exists())
{
m_cachedPlantumlAllContent = fileToString(outputFilename);
@@ -230,17 +229,17 @@ static void runPlantumlContent(const PlantumlManager::FilesMap &plantumlFiles,
pumlArguments+=puFileName;
pumlArguments+="\" ";
- QFile file(puFileName);
- if (!file.open(IO_WriteOnly))
+ std::ofstream file(puFileName.str(),std::ofstream::out | std::ofstream::binary);
+ if (!file.is_open())
{
err("Could not open file %s for writing\n",puFileName.data());
}
- file.writeBlock( nb.content, nb.content.length() );
+ file.write( nb.content.data(), nb.content.length() );
file.close();
Debug::print(Debug::Plantuml,0,"*** %s Running Plantuml arguments:%s\n","PlantumlManager::runPlantumlContent",qPrint(pumlArguments));
Portable::sysTimerStart();
- if ((exitCode=Portable::system(pumlExe,pumlArguments,TRUE))!=0)
+ if ((exitCode=Portable::system(pumlExe.data(),pumlArguments.data(),TRUE))!=0)
{
err("Problems running PlantUML. Verify that the command 'java -jar \"%splantuml.jar\" -h' works from the command line. Exit code: %d\n",
plantumlJarPath.data(),exitCode);
@@ -248,7 +247,7 @@ static void runPlantumlContent(const PlantumlManager::FilesMap &plantumlFiles,
else if (Config_getBool(DOT_CLEANUP))
{
Debug::print(Debug::Plantuml,0,"*** %s Remove %s file\n","PlantumlManager::runPlantumlContent",qPrint(puFileName));
- file.remove();
+ Dir().remove(puFileName.str());
}
Portable::sysTimerStop();
@@ -265,7 +264,7 @@ static void runPlantumlContent(const PlantumlManager::FilesMap &plantumlFiles,
epstopdfArgs.sprintf("\"%s%s.eps\" --outfile=\"%s%s.pdf\"",
pumlOutDir.data(),str.c_str(), pumlOutDir.data(),str.c_str());
Portable::sysTimerStart();
- if ((exitCode=Portable::system("epstopdf",epstopdfArgs))!=0)
+ if ((exitCode=Portable::system("epstopdf",epstopdfArgs.data()))!=0)
{
err("Problems running epstopdf. Check your TeX installation! Exit code: %d\n",exitCode);
}
@@ -285,12 +284,12 @@ void PlantumlManager::run()
runPlantumlContent(m_svgPlantumlFiles, m_svgPlantumlContent, PUML_SVG);
runPlantumlContent(m_epsPlantumlFiles, m_epsPlantumlContent, PUML_EPS);
QCString outputFilename = Config_getString(OUTPUT_DIRECTORY) + "/" + CACHE_FILENAME;
- QFile file(outputFilename);
- if (!file.open(IO_WriteOnly))
+ std::ofstream file(outputFilename.str(),std::ofstream::out | std::ofstream::binary);
+ if (!file.is_open())
{
err("Could not open file %s for writing\n",CACHE_FILENAME);
}
- file.writeBlock( m_currentPlantumlAllContent, m_currentPlantumlAllContent.length() );
+ file.write( m_currentPlantumlAllContent.data(), m_currentPlantumlAllContent.length() );
file.close();
}
diff --git a/src/plantuml.h b/src/plantuml.h
index b553fa8..6b439f4 100644
--- a/src/plantuml.h
+++ b/src/plantuml.h
@@ -18,8 +18,9 @@
#include <map>
#include <string>
+
#include "containers.h"
-#include <qcstring.h>
+#include "qcstring.h"
#define CACHE_FILENAME "inline_umlgraph_cache_all.pu"
#define DIVIDE_COUNT 4
@@ -28,14 +29,10 @@
class QCString;
struct PlantumlContent
{
- QCString outDir;
+ PlantumlContent(const QCString &content_, const QCString &outDir_)
+ : content(content_), outDir(outDir_) {}
QCString content;
- PlantumlContent(const QCString Content, const QCString OutDir)
- {
- outDir = OutDir;
- content = Content;
- };
- ~PlantumlContent(){};
+ QCString outDir;
};
/** Singleton that manages plantuml relation actions */
@@ -64,7 +61,7 @@ class PlantumlManager
* @param[in] outDir the directory to write the resulting image into.
* @param[in] format the image format to generate.
*/
- void generatePlantUMLOutput(const char *baseName,const char *outDir,OutputFormat format);
+ void generatePlantUMLOutput(const QCString &baseName,const QCString &outDir,OutputFormat format);
using FilesMap = std::map< std::string, StringVector >;
using ContentMap = std::map< std::string, PlantumlContent >;
diff --git a/src/portable.cpp b/src/portable.cpp
index 4cf3244..60c5189 100644
--- a/src/portable.cpp
+++ b/src/portable.cpp
@@ -1,4 +1,5 @@
#include "portable.h"
+#include "qcstring.h"
#include <stdlib.h>
#include <stdio.h>
@@ -16,12 +17,15 @@
extern char **environ;
#endif
+#include <assert.h>
#include <ctype.h>
-#include <qdir.h>
#include <map>
#include <string>
+#include "fileinfo.h"
+
#include "util.h"
+#include "dir.h"
#ifndef NODEBUG
#include "debug.h"
#endif
@@ -35,10 +39,10 @@ static double g_sysElapsedTime;
static std::chrono::steady_clock::time_point g_startTime;
-int Portable::system(const char *command,const char *args,bool commandHasConsole)
+int Portable::system(const QCString &command,const QCString &args,bool commandHasConsole)
{
- if (command==0) return 1;
+ if (command.isEmpty()) return 1;
#if defined(_WIN32) && !defined(__CYGWIN__)
QCString commandCorrectedPath = substitute(command,'/','\\');
@@ -132,7 +136,7 @@ int Portable::system(const char *command,const char *args,bool commandHasConsole
#else // Win32 specific
if (commandHasConsole)
{
- return ::system(fullCmd);
+ return ::system(fullCmd.data());
}
else
{
@@ -144,8 +148,10 @@ int Portable::system(const char *command,const char *args,bool commandHasConsole
// For that case COM is initialized as follows
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE);
- QString commandw = QString::fromUtf8( commandCorrectedPath );
- QString argsw = QString::fromUtf8( args );
+ uint16_t *commandw = NULL;
+ recodeUtf8StringToW( commandCorrectedPath, &commandw );
+ uint16_t *argsw = NULL;
+ recodeUtf8StringToW( args, &argsw );
// gswin32 is a GUI api which will pop up a window and run
// asynchronously. To prevent both, we use ShellExecuteEx and
@@ -159,8 +165,8 @@ int Portable::system(const char *command,const char *args,bool commandHasConsole
*/
NULL, /* window handle */
NULL, /* action to perform: open */
- (LPCWSTR)commandw.ucs2(), /* file to execute */
- (LPCWSTR)argsw.ucs2(), /* argument list */
+ (LPCWSTR)commandw, /* file to execute */
+ (LPCWSTR)argsw, /* argument list */
NULL, /* use current working dir */
SW_HIDE, /* minimize on start-up */
0, /* application instance handle */
@@ -174,6 +180,8 @@ int Portable::system(const char *command,const char *args,bool commandHasConsole
if (!ShellExecuteExW(&sInfo))
{
+ delete[] commandw;
+ delete[] argsw;
return -1;
}
else if (sInfo.hProcess) /* executable was launched, wait for it to finish */
@@ -186,6 +194,8 @@ int Portable::system(const char *command,const char *args,bool commandHasConsole
exitCode = -1;
}
CloseHandle(sInfo.hProcess);
+ delete[] commandw;
+ delete[] argsw;
return exitCode;
}
}
@@ -233,56 +243,56 @@ void loadEnvironment()
}
#endif
-void Portable::setenv(const char *name,const char *value)
+void Portable::setenv(const QCString &name,const QCString &value)
{
- if (value==0) value="";
#if defined(_WIN32) && !defined(__CYGWIN__)
- SetEnvironmentVariable(name,value);
+ SetEnvironmentVariable(name.data(),!value.isEmpty() ? value.data() : "");
#else
if(!environmentLoaded) // if the environment variables are not loaded already...
{ // ...call loadEnvironment to store them in class
loadEnvironment();
}
- proc_env[name] = std::string(value); // create or replace existing value
+ proc_env[name.str()] = value.str(); // create or replace existing value
#endif
}
-void Portable::unsetenv(const char *variable)
+void Portable::unsetenv(const QCString &variable)
{
#if defined(_WIN32) && !defined(__CYGWIN__)
- SetEnvironmentVariable(variable,0);
+ SetEnvironmentVariable(variable.data(),0);
#else
/* Some systems don't have unsetenv(), so we do it ourselves */
- if (variable == NULL || *variable == '\0' || strchr (variable, '=') != NULL)
+ if (variable.isEmpty() || variable.find('=')!=-1)
{
return; // not properly formatted
}
- if(proc_env.find(variable) != proc_env.end())
+ auto it = proc_env.find(variable.str());
+ if (it != proc_env.end())
{
- proc_env[variable].erase();
+ proc_env.erase(it);
}
#endif
}
-const char *Portable::getenv(const char *variable)
+QCString Portable::getenv(const QCString &variable)
{
#if defined(_WIN32) && !defined(__CYGWIN__)
- return ::getenv(variable);
+ return ::getenv(variable.data());
#else
if(!environmentLoaded) // if the environment variables are not loaded already...
- { // ...call loadEnvironment to store them in class
+ { // ...call loadEnvironment to store them in class
loadEnvironment();
}
- if(proc_env.find(variable) != proc_env.end())
+ if (proc_env.find(variable.str()) != proc_env.end())
{
- return proc_env[variable].c_str();
+ return QCString(proc_env[variable.str()]);
}
else
{
- return NULL;
+ return QCString();
}
#endif
}
@@ -309,44 +319,57 @@ portable_off_t Portable::ftell(FILE *f)
#endif
}
-FILE *Portable::fopen(const char *fileName,const char *mode)
+FILE *Portable::fopen(const QCString &fileName,const QCString &mode)
{
#if defined(_WIN32) && !defined(__CYGWIN__)
- QString fn(fileName);
- QString m(mode);
- return _wfopen((wchar_t*)fn.ucs2(),(wchar_t*)m.ucs2());
+ uint16_t *fn = 0;
+ size_t fn_len = recodeUtf8StringToW(fileName,&fn);
+ uint16_t *m = 0;
+ size_t m_len = recodeUtf8StringToW(mode,&m);
+ FILE *result = 0;
+ if (fn_len!=(size_t)-1 && m_len!=(size_t)-1)
+ {
+ result = _wfopen((wchar_t*)fn,(wchar_t*)m);
+ }
+ delete[] fn;
+ delete[] m;
+ return result;
#else
- return ::fopen(fileName,mode);
+ return ::fopen(fileName.data(),mode.data());
#endif
}
-char Portable::pathSeparator()
+int Portable::fclose(FILE *f)
+{
+ return ::fclose(f);
+}
+
+QCString Portable::pathSeparator()
{
#if defined(_WIN32) && !defined(__CYGWIN__)
- return '\\';
+ return "\\";
#else
- return '/';
+ return "/";
#endif
}
-char Portable::pathListSeparator()
+QCString Portable::pathListSeparator()
{
#if defined(_WIN32) && !defined(__CYGWIN__)
- return ';';
+ return ";";
#else
- return ':';
+ return ":";
#endif
}
-static bool ExistsOnPath(const char *fileName)
+static bool ExistsOnPath(const QCString &fileName)
{
- QFileInfo fi1(fileName);
+ FileInfo fi1(fileName.str());
if (fi1.exists()) return true;
- const char *p = Portable::getenv("PATH");
- char listSep = Portable::pathListSeparator();
- char pathSep = Portable::pathSeparator();
- QCString paths(p);
+ QCString paths = Portable::getenv("PATH");
+ char listSep = Portable::pathListSeparator()[0];
+ char pathSep = Portable::pathSeparator()[0];
int strt = 0;
int idx;
while ((idx = paths.find(listSep,strt)) != -1)
@@ -354,7 +377,7 @@ static bool ExistsOnPath(const char *fileName)
QCString locFile(paths.mid(strt,idx-strt));
locFile += pathSep;
locFile += fileName;
- QFileInfo fi(locFile);
+ FileInfo fi(locFile.str());
if (fi.exists()) return true;
strt = idx + 1;
}
@@ -364,19 +387,19 @@ static bool ExistsOnPath(const char *fileName)
{
locFile += pathSep;
locFile += fileName;
- QFileInfo fi(locFile);
+ FileInfo fi(locFile.str());
if (fi.exists()) return true;
}
return false;
}
-bool Portable::checkForExecutable(const char *fileName)
+bool Portable::checkForExecutable(const QCString &fileName)
{
#if defined(_WIN32) && !defined(__CYGWIN__)
char *extensions[] = {".bat",".com",".exe"};
for (int i = 0; i < sizeof(extensions) / sizeof(*extensions); i++)
{
- if (ExistsOnPath(QCString(fileName) + extensions[i])) return true;
+ if (ExistsOnPath(fileName + extensions[i])) return true;
}
return false;
#else
@@ -426,12 +449,12 @@ bool Portable::fileSystemIsCaseSensitive()
#endif
}
-FILE * Portable::popen(const char *name,const char *type)
+FILE * Portable::popen(const QCString &name,const QCString &type)
{
#if defined(_MSC_VER) || defined(__BORLANDC__)
- return ::_popen(name,type);
+ return ::_popen(name.data(),type.data());
#else
- return ::popen(name,type);
+ return ::popen(name.data(),type.data());
#endif
}
@@ -470,19 +493,16 @@ void Portable::sleep(int ms)
#endif
}
-bool Portable::isAbsolutePath(const char *fileName)
+bool Portable::isAbsolutePath(const QCString &fileName)
{
+ const char *fn = fileName.data();
# ifdef _WIN32
- if (isalpha (fileName [0]) && fileName[1] == ':')
- fileName += 2;
+ if (fileName.length()>1 && isalpha(fileName[0]) && fileName[1]==':') fn+=2;
# endif
- char const fst = fileName [0];
- if (fst == '/') {
- return true;
- }
+ char const fst = fn[0];
+ if (fst == '/') return true;
# ifdef _WIN32
- if (fst == '\\')
- return true;
+ if (fst == '\\') return true;
# endif
return false;
}
@@ -495,19 +515,19 @@ bool Portable::isAbsolutePath(const char *fileName)
void Portable::correct_path()
{
#if defined(_WIN32) && !defined(__CYGWIN__)
- const char *p = Portable::getenv("PATH");
- if (!p) return; // no path nothing to correct
- QCString result = substitute(p,'/','\\');
+ QCString p = Portable::getenv("PATH");
+ if (p.isEmpty()) return; // no path nothing to correct
+ QCString result = substitute(p,"/","\\");
if (result!=p) Portable::setenv("PATH",result.data());
#endif
}
-void Portable::unlink(const char *fileName)
+void Portable::unlink(const QCString &fileName)
{
#if defined(_WIN32) && !defined(__CYGWIN__)
- _unlink(fileName);
+ _unlink(fileName.data());
#else
- ::unlink(fileName);
+ ::unlink(fileName.data());
#endif
}
@@ -517,14 +537,14 @@ void Portable::setShortDir()
long length = 0;
TCHAR* buffer = NULL;
// First obtain the size needed by passing NULL and 0.
- length = GetShortPathName(QDir::currentDirPath().data(), NULL, 0);
+ length = GetShortPathName(Dir::currentDirPath().c_str(), NULL, 0);
// Dynamically allocate the correct size
// (terminating null char was included in length)
buffer = new TCHAR[length];
// Now simply call again using same (long) path.
- length = GetShortPathName(QDir::currentDirPath().data(), buffer, length);
+ length = GetShortPathName(Dir::currentDirPath().c_str(), buffer, length);
// Set the correct directory (short name)
- QDir::setCurrent(buffer);
+ Dir::setCurrent(buffer);
delete [] buffer;
#endif
}
@@ -580,3 +600,22 @@ const char *Portable::devNull()
return "/dev/null";
#endif
}
+
+size_t Portable::recodeUtf8StringToW(const QCString &inputStr,uint16_t **outBuf)
+{
+ if (inputStr.isEmpty() || outBuf==0) return 0; // empty input or invalid output
+ void *handle = portable_iconv_open("UTF-16LE","UTF-8");
+ if (handle==(void *)(-1)) return 0; // invalid encoding
+ size_t len = inputStr.length();
+ uint16_t *buf = new uint16_t[len+1];
+ *outBuf = buf;
+ size_t inRemains = len;
+ size_t outRemains = len*sizeof(uint16_t)+2; // chars + \0
+ const char *p = inputStr.data();
+ portable_iconv(handle,&p,&inRemains,(char**)&buf,&outRemains);
+ *buf=0;
+ portable_iconv_close(handle);
+ return len;
+}
+
+
diff --git a/src/portable.h b/src/portable.h
index d2b3036..86b1bed 100644
--- a/src/portable.h
+++ b/src/portable.h
@@ -3,9 +3,11 @@
#include <stdio.h>
#include <sys/types.h>
+#include <stdint.h>
+#include "qcstring.h"
-
+class Buf;
#if defined(_WIN32)
typedef __int64 portable_off_t;
@@ -19,38 +21,40 @@ typedef off_t portable_off_t;
namespace Portable
{
- int system(const char *command,const char *args,bool commandHasConsole=true);
+ int system(const QCString &command,const QCString &args,bool commandHasConsole=true);
unsigned int pid();
- const char * getenv(const char *variable);
- void setenv(const char *variable,const char *value);
- void unsetenv(const char *variable);
+ QCString getenv(const QCString &variable);
+ void setenv(const QCString &variable,const QCString &value);
+ void unsetenv(const QCString &variable);
portable_off_t fseek(FILE *f,portable_off_t offset, int whence);
portable_off_t ftell(FILE *f);
- FILE * fopen(const char *fileName,const char *mode);
- void unlink(const char *fileName);
- char pathSeparator();
- char pathListSeparator();
+ FILE * fopen(const QCString &fileName,const QCString &mode);
+ int fclose(FILE *f);
+ void unlink(const QCString &fileName);
+ QCString pathSeparator();
+ QCString pathListSeparator();
const char * ghostScriptCommand();
const char * commandExtension();
bool fileSystemIsCaseSensitive();
- FILE * popen(const char *name,const char *type);
+ FILE * popen(const QCString &name,const QCString &type);
int pclose(FILE *stream);
void sysTimerStart();
void sysTimerStop();
double getSysElapsedTime();
void sleep(int ms);
- bool isAbsolutePath(const char *fileName);
+ bool isAbsolutePath(const QCString &fileName);
void correct_path();
void setShortDir();
const char * strnstr(const char *haystack, const char *needle, size_t haystack_len);
const char * devNull();
- bool checkForExecutable(const char *fileName);
+ bool checkForExecutable(const QCString &fileName);
+ size_t recodeUtf8StringToW(const QCString &inputStr,uint16_t **buf);
}
extern "C" {
- void * portable_iconv_open(const char* tocode, const char* fromcode);
- size_t portable_iconv (void *cd, char** inbuf, size_t *inbytesleft,
+ 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);
}
diff --git a/src/portable_c.c b/src/portable_c.c
index 3a79741..fe81844 100644
--- a/src/portable_c.c
+++ b/src/portable_c.c
@@ -13,7 +13,7 @@
// These functions are implemented in a C file, because there are different
// versions of the iconv() prototype, some with a const pointer and some
// without. In C this is just a warning, but in C++ breaks the compilation.
-// Looking at the LIBICONV_VERSION is not enough, since for MACOSX the
+// Looking at the LIBICONV_VERSION is not enough, since for MACOSX the
// const and non-const version exist with the same version of the file.
void * portable_iconv_open(const char* tocode, const char* fromcode)
@@ -21,10 +21,10 @@ void * portable_iconv_open(const char* tocode, const char* fromcode)
return iconv_open(tocode,fromcode);
}
-size_t portable_iconv (void *cd, char** inbuf, size_t *inbytesleft,
+size_t portable_iconv (void *cd, const char** inbuf, size_t *inbytesleft,
char** outbuf, size_t *outbytesleft)
{
- return iconv((iconv_t)cd,inbuf,inbytesleft,outbuf,outbytesleft);
+ return iconv((iconv_t)cd,(char**)inbuf,inbytesleft,outbuf,outbytesleft);
}
int portable_iconv_close (void *cd)
diff --git a/src/pre.h b/src/pre.h
index 47f6652..fcf511e 100644
--- a/src/pre.h
+++ b/src/pre.h
@@ -1,12 +1,12 @@
/******************************************************************************
*
- *
+ *
*
* Copyright (C) 1997-2015 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
- * documentation under the terms of the GNU General Public License is hereby
- * granted. No representations are made about the suitability of this software
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
@@ -21,14 +21,15 @@
#include <memory>
class BufStr;
+class QCString;
class Preprocessor
{
public:
Preprocessor();
~Preprocessor();
- void processFile(const char *fileName,BufStr &input,BufStr &output);
- void addSearchDir(const char *dir);
+ void processFile(const QCString &fileName,BufStr &input,BufStr &output);
+ void addSearchDir(const QCString &dir);
private:
struct Private;
std::unique_ptr<Private> p;
diff --git a/src/pre.l b/src/pre.l
index b153942..580b553 100644
--- a/src/pre.l
+++ b/src/pre.l
@@ -34,15 +34,14 @@
#include <utility>
#include <mutex>
#include <thread>
+#include <algorithm>
#include <stdio.h>
#include <assert.h>
#include <ctype.h>
#include <errno.h>
-#include <qcstring.h>
-#include <qfileinfo.h>
-
+#include "qcstring.h"
#include "containers.h"
#include "pre.h"
#include "constexp.h"
@@ -60,6 +59,7 @@
#include "config.h"
#include "filedef.h"
#include "regex.h"
+#include "fileinfo.h"
#define YY_NO_UNISTD_H 1
@@ -96,7 +96,7 @@ struct FileState
struct PreIncludeInfo
{
- PreIncludeInfo(const char *fn,FileDef *srcFd, FileDef *dstFd,const char *iName,bool loc, bool imp)
+ PreIncludeInfo(const QCString &fn,FileDef *srcFd, FileDef *dstFd,const QCString &iName,bool loc, bool imp)
: fileName(fn), fromFileDef(srcFd), toFileDef(dstFd), includeName(iName), local(loc), imported(imp)
{
}
@@ -154,7 +154,7 @@ class DefineManager
{
includeStack.insert(incFile);
dpf->retrieveRec(toMap,includeStack);
- //printf(" retrieveRec: processing include %s: #toMap=%zu\n",incFile.data(),toMap.size());
+ //printf(" retrieveRec: processing include %s: #toMap=%zu\n",qPrint(incFile),toMap.size());
}
}
for (auto &kv : m_defines)
@@ -307,12 +307,13 @@ struct preYY_state
};
// stateless functions
-static QCString escapeAt(const char *text);
-static QCString extractTrailingComment(const char *s);
+static QCString escapeAt(const QCString &text);
+static QCString extractTrailingComment(const QCString &s);
static char resolveTrigraph(char c);
// statefull functions
-static inline void outputArray(yyscan_t yyscanner,const char *a,int len);
+static inline void outputArray(yyscan_t yyscanner,const char *a,yy_size_t len);
+static inline void outputString(yyscan_t yyscanner,const QCString &s);
static inline void outputChar(yyscan_t yyscanner,char c);
static QCString expandMacro(yyscan_t yyscanner,const QCString &name);
static void readIncludeFile(yyscan_t yyscanner,const QCString &inc);
@@ -321,13 +322,13 @@ static void decrLevel(yyscan_t yyscanner);
static void setCaseDone(yyscan_t yyscanner,bool value);
static bool otherCaseDone(yyscan_t yyscanner);
static bool computeExpression(yyscan_t yyscanner,const QCString &expr);
-static void startCondSection(yyscan_t yyscanner,const char *sectId);
+static void startCondSection(yyscan_t yyscanner,const QCString &sectId);
static void endCondSection(yyscan_t yyscanner);
static void addMacroDefinition(yyscan_t yyscanner);
static void addDefine(yyscan_t yyscanner);
-static void setFileName(yyscan_t yyscanner,const char *name);
+static void setFileName(yyscan_t yyscanner,const QCString &name);
static yy_size_t yyread(yyscan_t yyscanner,char *buf,yy_size_t max_size);
-static Define * isDefined(yyscan_t yyscanner,const char *name);
+static Define * isDefined(yyscan_t yyscanner,const QCString &name);
/* ----------------------------------------------------------------- */
@@ -411,11 +412,11 @@ WSopt [ \t\r]*
<Start>^{B}*"#" { BEGIN(Command); yyextra->yyColNr+=(int)yyleng; yyextra->yyMLines=0;}
<Start>^("%top{"|"%{") {
if (getLanguageFromFileName(yyextra->yyFileName)!=SrcLangExt_Lex) REJECT
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
BEGIN(LexCopyLine);
}
<Start>^{Bopt}/[^#] {
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
BEGIN(CopyLine);
}
<Start>^{B}*[a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF]+{B}*"("[^\)\n]*")"/{BN}{1,10}*[:{] { // constructors?
@@ -460,12 +461,12 @@ WSopt [ \t\r]*
<CopyLine,LexCopyLine>"extern"{BN}{0,80}"\"C\""*{BN}{0,80}"{" {
QCString text=yytext;
yyextra->yyLineNr+=text.contains('\n');
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
}
<CopyLine,LexCopyLine>{RAWBEGIN} {
yyextra->delimiter = yytext+2;
yyextra->delimiter=yyextra->delimiter.left(yyextra->delimiter.length()-1);
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
BEGIN(CopyRawString);
}
<CopyLine,LexCopyLine>"{" { // count brackets inside the main file
@@ -476,7 +477,7 @@ WSopt [ \t\r]*
outputChar(yyscanner,*yytext);
}
<LexCopyLine>^"%}" {
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
}
<CopyLine,LexCopyLine>"}" { // count brackets inside the main file
if (yyextra->includeStack.empty() && yyextra->curlyCount>0)
@@ -486,17 +487,17 @@ WSopt [ \t\r]*
outputChar(yyscanner,*yytext);
}
<CopyLine,LexCopyLine>"'"\\[0-7]{1,3}"'" {
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
}
<CopyLine,LexCopyLine>"'"\\."'" {
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
}
<CopyLine,LexCopyLine>"'"."'" {
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
}
<CopyLine,LexCopyLine>@\" {
if (getLanguageFromFileName(yyextra->yyFileName)!=SrcLangExt_CSharp) REJECT;
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
BEGIN( CopyStringCs );
}
<CopyLine,LexCopyLine>\" {
@@ -516,40 +517,40 @@ WSopt [ \t\r]*
BEGIN( CopyStringFtn );
}
<CopyString>[^\"\\\r\n]+ {
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
}
<CopyStringCs>[^\"\r\n]+ {
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
}
<CopyString>\\. {
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
}
<CopyString,CopyStringCs>\" {
outputChar(yyscanner,*yytext);
BEGIN( CopyLine );
}
<CopyStringFtnDouble>[^\"\\\r\n]+ {
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
}
<CopyStringFtnDouble>\\. {
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
}
<CopyStringFtnDouble>\" {
outputChar(yyscanner,*yytext);
BEGIN( CopyLine );
}
<CopyStringFtn>[^\'\\\r\n]+ {
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
}
<CopyStringFtn>\\. {
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
}
<CopyStringFtn>\' {
outputChar(yyscanner,*yytext);
BEGIN( CopyLine );
}
<CopyRawString>{RAWEND} {
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
QCString delimiter = yytext+1;
delimiter=delimiter.left(delimiter.length()-1);
if (delimiter==yyextra->delimiter)
@@ -558,7 +559,7 @@ WSopt [ \t\r]*
}
}
<CopyRawString>[^)]+ {
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
}
<CopyRawString>. {
outputChar(yyscanner,*yytext);
@@ -587,7 +588,7 @@ WSopt [ \t\r]*
if (def->nargs==-1) // no function macro
{
QCString result = def->isPredefined ? def->definition : expandMacro(yyscanner,yyextra->defArgsStr);
- outputArray(yyscanner,result,result.length());
+ outputString(yyscanner,result);
}
else // zero or more arguments
{
@@ -597,7 +598,7 @@ WSopt [ \t\r]*
}
else
{
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
}
}
<CopyLine,LexCopyLine>{ID} {
@@ -611,11 +612,11 @@ WSopt [ \t\r]*
)
{
QCString result=def->isPredefined ? def->definition : expandMacro(yyscanner,yytext);
- outputArray(yyscanner,result,result.length());
+ outputString(yyscanner,result);
}
else
{
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
}
}
<CopyLine,LexCopyLine>"\\"\r?/\n { // strip line continuation characters
@@ -640,10 +641,10 @@ WSopt [ \t\r]*
if (yyextra->roundCount==0)
{
QCString result=expandMacro(yyscanner,yyextra->defArgsStr);
- //printf("yyextra->defArgsStr='%s'->'%s'\n",yyextra->defArgsStr.data(),result.data());
+ //printf("yyextra->defArgsStr='%s'->'%s'\n",qPrint(yyextra->defArgsStr),qPrint(result));
if (yyextra->findDefArgContext==CopyLine)
{
- outputArray(yyscanner,result,result.length());
+ outputString(yyscanner,result);
BEGIN(yyextra->findDefArgContext);
}
else // yyextra->findDefArgContext==IncludeID
@@ -848,7 +849,7 @@ WSopt [ \t\r]*
<Guard>\n {
unput(*yytext);
//printf("Guard: '%s'\n",
- // yyextra->guardExpr.data());
+ // qPrint(yyextra->guardExpr));
bool guard=computeExpression(yyscanner,yyextra->guardExpr);
setCaseDone(yyscanner,guard);
if (guard)
@@ -1020,11 +1021,11 @@ WSopt [ \t\r]*
yyextra->defName = yyextra->defName.left(yyextra->defName.length()-1).stripWhiteSpace();
yyextra->defVarArgs = FALSE;
//printf("Guard check: %s!=%s || %d\n",
- // yyextra->defName.data(),yyextra->lastGuardName.data(),yyextra->expectGuard);
+ // qPrint(yyextra->defName),qPrint(yyextra->lastGuardName),yyextra->expectGuard);
if (yyextra->curlyCount>0 || yyextra->defName!=yyextra->lastGuardName || !yyextra->expectGuard)
{ // define may appear in the output
QCString tmp=(QCString)"#define "+yyextra->defName;
- outputArray(yyscanner,tmp.data(),tmp.length());
+ outputString(yyscanner,tmp);
yyextra->quoteArg=FALSE;
yyextra->insideComment=FALSE;
yyextra->lastGuardName.resize(0);
@@ -1050,11 +1051,11 @@ WSopt [ \t\r]*
yyextra->defLitText.resize(0);
yyextra->defVarArgs = FALSE;
//printf("Guard check: %s!=%s || %d\n",
- // yyextra->defName.data(),yyextra->lastGuardName.data(),yyextra->expectGuard);
+ // qPrint(yyextra->defName),qPrint(yyextra->lastGuardName),yyextra->expectGuard);
if (yyextra->curlyCount>0 || yyextra->defName!=yyextra->lastGuardName || !yyextra->expectGuard)
{ // define may appear in the output
QCString tmp=(QCString)"#define "+yyextra->defName;
- outputArray(yyscanner,tmp.data(),tmp.length());
+ outputString(yyscanner,tmp);
yyextra->quoteArg=FALSE;
yyextra->insideComment=FALSE;
if (yyextra->insideCS) yyextra->defText="1"; // for C#, use "1" as define text
@@ -1079,7 +1080,7 @@ WSopt [ \t\r]*
yyextra->defName = yytext;
yyextra->defVarArgs = FALSE;
QCString tmp=(QCString)"#define "+yyextra->defName+yyextra->defArgsStr;
- outputArray(yyscanner,tmp.data(),tmp.length());
+ outputString(yyscanner,tmp);
yyextra->quoteArg=FALSE;
yyextra->insideComment=FALSE;
BEGIN(DefineText);
@@ -1093,7 +1094,7 @@ WSopt [ \t\r]*
<DefineArg>{B}*")"{B}* {
yyextra->defArgsStr+=yytext;
QCString tmp=(QCString)"#define "+yyextra->defName+yyextra->defArgsStr+yyextra->defExtraSpacing;
- outputArray(yyscanner,tmp.data(),tmp.length());
+ outputString(yyscanner,tmp);
yyextra->quoteArg=FALSE;
yyextra->insideComment=FALSE;
BEGIN(DefineText);
@@ -1137,7 +1138,7 @@ WSopt [ \t\r]*
BEGIN(CopyCComment);
}
<DefineText>{CPPC}[!/]? {
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
yyextra->lastCPPContext=YY_START;
yyextra->defLitText+=' ';
BEGIN(SkipCPPComment);
@@ -1157,14 +1158,14 @@ WSopt [ \t\r]*
}
}
<SkipCComment>{CPPC}("/")* {
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
}
<SkipCComment>{CCS} {
outputChar(yyscanner,'/');outputChar(yyscanner,'*');
//yyextra->commentCount++;
}
<SkipCComment>[\\@][\\@]("f{"|"f$"|"f[") {
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
}
<SkipCComment>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
bool markdownSupport = Config_getBool(MARKDOWN_SUPPORT);
@@ -1174,7 +1175,7 @@ WSopt [ \t\r]*
}
else
{
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
yyextra->fenceSize=(int)yyleng;
BEGIN(SkipVerbatim);
}
@@ -1187,17 +1188,17 @@ WSopt [ \t\r]*
}
else
{
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
yyextra->fenceSize=(int)yyleng;
BEGIN(SkipVerbatim);
}
}
<SkipCComment>[\\@][\\@]("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"docbookonly"|"rtfonly"|"manonly"|"dot"|"code"("{"[^}]*"}")?){BN}+ {
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
yyextra->yyLineNr+=QCString(yytext).contains('\n');
}
<SkipCComment>[\\@]("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"docbookonly"|"rtfonly"|"manonly"|"dot"|"code"("{"[^}]*"}")?){BN}+ {
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
yyextra->yyLineNr+=QCString(yytext).contains('\n');
yyextra->fenceSize=0;
if (yytext[1]=='f')
@@ -1214,7 +1215,7 @@ WSopt [ \t\r]*
BEGIN(SkipVerbatim);
}
<SkipCComment,SkipCPPComment>[\\@][\\@]"cond"[ \t]+ { // escaped @cond
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
}
<SkipCPPComment>[\\@]"cond"[ \t]+ { // conditional section
yyextra->ccomment=TRUE;
@@ -1292,7 +1293,7 @@ WSopt [ \t\r]*
<SkipCond,SkipCComment,SkipCPPComment>[\\@][\\@]"endcond"/[^a-z_A-Z0-9\x80-\xFF] {
if (!yyextra->skip)
{
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
}
}
<SkipCond>[\\@]"endcond"/[^a-z_A-Z0-9\x80-\xFF] {
@@ -1316,7 +1317,7 @@ WSopt [ \t\r]*
}
}
<SkipVerbatim>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endrtfonly"|"endmanonly"|"enddot"|"endcode"|"f$"|"f]"|"f}") { /* end of verbatim block */
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
if (yytext[1]=='f' && yyextra->blockName=="f")
{
BEGIN(SkipCComment);
@@ -1327,24 +1328,24 @@ WSopt [ \t\r]*
}
}
<SkipVerbatim>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
if (yyextra->fenceSize==(yy_size_t)yyleng)
{
BEGIN(SkipCComment);
}
}
<SkipVerbatim>^({B}*"*"+)?{B}{0,3}"```"[`]* {
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
if (yyextra->fenceSize==(yy_size_t)yyleng)
{
BEGIN(SkipCComment);
}
}
<SkipVerbatim>{CCE}|{CCS} {
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
}
<SkipCComment,SkipVerbatim>[^*\\@\x06~`\n\/]+ {
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
}
<SkipCComment,SkipVerbatim>\n {
yyextra->yyLineNr++;
@@ -1390,7 +1391,7 @@ WSopt [ \t\r]*
<RemoveCComment>\n { yyextra->yyLineNr++; outputChar(yyscanner,'\n'); }
<RemoveCComment>.
<SkipCPPComment>[^\n\/\\@]+ {
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
}
<SkipCPPComment,RemoveCPPComment>\n {
unput(*yytext);
@@ -1403,7 +1404,7 @@ WSopt [ \t\r]*
outputChar(yyscanner,'/');outputChar(yyscanner,'/');
}
<SkipCPPComment>[^\x06\@\\\n]+ {
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
}
<SkipCPPComment>. {
outputChar(yyscanner,*yytext);
@@ -1462,12 +1463,12 @@ WSopt [ \t\r]*
yyextra->defLitText+=yytext;
if (!comment.isEmpty())
{
- outputArray(yyscanner,comment,comment.length());
+ outputString(yyscanner,comment);
yyextra->defLitText=yyextra->defLitText.left(yyextra->defLitText.length()-comment.length()-1);
}
outputChar(yyscanner,'\n');
Define *def=0;
- //printf("Define name='%s' text='%s' litTexti='%s'\n",yyextra->defName.data(),yyextra->defText.data(),yyextra->defLitText.data());
+ //printf("Define name='%s' text='%s' litTexti='%s'\n",qPrint(yyextra->defName),qPrint(yyextra->defText),qPrint(yyextra->defLitText));
if (yyextra->includeStack.empty() || yyextra->curlyCount>0)
{
addMacroDefinition(yyscanner);
@@ -1475,7 +1476,7 @@ WSopt [ \t\r]*
def=isDefined(yyscanner,yyextra->defName);
if (def==0) // new define
{
- //printf("new define '%s'!\n",yyextra->defName.data());
+ //printf("new define '%s'!\n",qPrint(yyextra->defName));
addDefine(yyscanner);
}
else if (def /*&& macroIsAccessible(def)*/)
@@ -1489,13 +1490,13 @@ WSopt [ \t\r]*
def->name = yyextra->defName;
def->definition = yyextra->defText.stripWhiteSpace();
def->nargs = yyextra->defArgs;
- def->fileName = yyextra->yyFileName.copy();
+ def->fileName = yyextra->yyFileName;
def->lineNr = yyextra->yyLineNr-yyextra->yyMLines;
def->columnNr = yyextra->yyColNr;
}
else
{
- //printf("error: define %s is defined more than once!\n",yyextra->defName.data());
+ //printf("error: define %s is defined more than once!\n",qPrint(yyextra->defName));
}
}
yyextra->argMap.clear();
@@ -1560,13 +1561,13 @@ WSopt [ \t\r]*
yyextra->inputBufPos = fs->oldFileBufPos;
yyextra->curlyCount = fs->curlyCount;
setFileName(yyscanner,fs->fileName);
- DBG_CTX((stderr,"######## FileName %s\n",yyextra->yyFileName.data()));
+ DBG_CTX((stderr,"######## FileName %s\n",qPrint(yyextra->yyFileName)));
// Deal with file changes due to
// #include's within { .. } blocks
QCString lineStr(15+yyextra->yyFileName.length());
- lineStr.sprintf("# %d \"%s\" 2",yyextra->yyLineNr,yyextra->yyFileName.data());
- outputArray(yyscanner,lineStr.data(),lineStr.length());
+ lineStr.sprintf("# %d \"%s\" 2",yyextra->yyLineNr,qPrint(yyextra->yyFileName));
+ outputString(yyscanner,lineStr);
yyextra->includeStack.pop_back();
@@ -1611,7 +1612,7 @@ WSopt [ \t\r]*
}
else
{
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
yyextra->lastCContext=YY_START;
yyextra->commentCount=1;
if (yyleng==3)
@@ -1633,7 +1634,7 @@ WSopt [ \t\r]*
}
else
{
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
yyextra->lastCPPContext=YY_START;
if (yyleng==3)
{
@@ -1664,18 +1665,18 @@ static yy_size_t yyread(yyscan_t yyscanner,char *buf,yy_size_t max_size)
{
YY_EXTRA_TYPE state = preYYget_extra(yyscanner);
yy_size_t bytesInBuf = state->inputBuf->curPos()-state->inputBufPos;
- yy_size_t bytesToCopy = QMIN(max_size,bytesInBuf);
+ yy_size_t bytesToCopy = std::min(max_size,bytesInBuf);
memcpy(buf,state->inputBuf->data()+state->inputBufPos,bytesToCopy);
state->inputBufPos+=bytesToCopy;
return bytesToCopy;
}
-static void setFileName(yyscan_t yyscanner,const char *name)
+static void setFileName(yyscan_t yyscanner,const QCString &name)
{
YY_EXTRA_TYPE state = preYYget_extra(yyscanner);
bool ambig;
- QFileInfo fi(name);
- state->yyFileName=fi.absFilePath().utf8();
+ FileInfo fi(name.str());
+ state->yyFileName=fi.absFilePath();
state->yyFileDef=findFileDef(Doxygen::inputNameLinkedMap,state->yyFileName,ambig);
if (state->yyFileDef==0) // if this is not an input file check if it is an
// include file
@@ -1683,7 +1684,7 @@ static void setFileName(yyscan_t yyscanner,const char *name)
state->yyFileDef=findFileDef(Doxygen::includeNameLinkedMap,state->yyFileName,ambig);
}
//printf("setFileName(%s) state->yyFileName=%s state->yyFileDef=%p\n",
- // name,state->yyFileName.data(),state->yyFileDef);
+ // name,qPrint(state->yyFileName),state->yyFileDef);
if (state->yyFileDef && state->yyFileDef->isReference()) state->yyFileDef=0;
state->insideCS = getLanguageFromFileName(state->yyFileName)==SrcLangExt_CSharp;
state->insideFtn = getLanguageFromFileName(state->yyFileName)==SrcLangExt_Fortran;
@@ -1694,13 +1695,13 @@ static void incrLevel(yyscan_t yyscanner)
{
YY_EXTRA_TYPE state = preYYget_extra(yyscanner);
state->levelGuard.push(false);
- //printf("%s line %d: incrLevel %d\n",yyextra->yyFileName.data(),yyextra->yyLineNr,yyextra->levelGuard.size());
+ //printf("%s line %d: incrLevel %d\n",qPrint(yyextra->yyFileName),yyextra->yyLineNr,yyextra->levelGuard.size());
}
static void decrLevel(yyscan_t yyscanner)
{
YY_EXTRA_TYPE state = preYYget_extra(yyscanner);
- //printf("%s line %d: decrLevel %d\n",state->yyFileName.data(),state->yyLineNr,state->levelGuard.size());
+ //printf("%s line %d: decrLevel %d\n",qPrint(state->yyFileName),state->yyLineNr,state->levelGuard.size());
if (!state->levelGuard.empty())
{
state->levelGuard.pop();
@@ -1737,14 +1738,14 @@ static FileState *checkAndOpenFile(yyscan_t yyscanner,const QCString &fileName,b
YY_EXTRA_TYPE state = preYYget_extra(yyscanner);
alreadyProcessed = FALSE;
FileState *fs = 0;
- //printf("checkAndOpenFile(%s)\n",fileName.data());
- QFileInfo fi(fileName);
+ //printf("checkAndOpenFile(%s)\n",qPrint(fileName));
+ FileInfo fi(fileName.str());
if (fi.exists() && fi.isFile())
{
const StringVector &exclPatterns = Config_getList(EXCLUDE_PATTERNS);
if (patternMatch(fi,exclPatterns)) return 0;
- QCString absName = fi.absFilePath().utf8();
+ QCString absName = fi.absFilePath();
// global guard
if (state->curlyCount==0) // not #include inside { ... }
@@ -1771,7 +1772,7 @@ static FileState *checkAndOpenFile(yyscan_t yyscanner,const QCString &fileName,b
//printf(" already included 2\n");
return 0;
}
- //printf("#include %s\n",absName.data());
+ //printf("#include %s\n",qPrint(absName));
fs = new FileState(fi.size()+4096);
if (!readInputFile(absName,fs->fileBuf))
@@ -1789,10 +1790,10 @@ static FileState *checkAndOpenFile(yyscan_t yyscanner,const QCString &fileName,b
return fs;
}
-static FileState *findFile(yyscan_t yyscanner, const char *fileName,bool localInclude,bool &alreadyProcessed)
+static FileState *findFile(yyscan_t yyscanner, const QCString &fileName,bool localInclude,bool &alreadyProcessed)
{
YY_EXTRA_TYPE state = preYYget_extra(yyscanner);
- //printf("** findFile(%s,%d) state->yyFileName=%s\n",fileName,localInclude,state->yyFileName.data());
+ //printf("** findFile(%s,%d) state->yyFileName=%s\n",qPrint(fileName),localInclude,qPrint(state->yyFileName));
if (Portable::isAbsolutePath(fileName))
{
FileState *fs = checkAndOpenFile(yyscanner,fileName,alreadyProcessed);
@@ -1809,10 +1810,10 @@ static FileState *findFile(yyscan_t yyscanner, const char *fileName,bool localIn
}
if (localInclude && !state->yyFileName.isEmpty())
{
- QFileInfo fi(state->yyFileName);
+ FileInfo fi(state->yyFileName.str());
if (fi.exists())
{
- QCString absName = QCString(fi.dirPath(TRUE).data())+"/"+fileName;
+ QCString absName = QCString(fi.dirPath(TRUE))+"/"+fileName;
FileState *fs = checkAndOpenFile(yyscanner,absName,alreadyProcessed);
if (fs)
{
@@ -1832,7 +1833,7 @@ static FileState *findFile(yyscan_t yyscanner, const char *fileName,bool localIn
}
for (auto path : state->pathList)
{
- std::string absName = path+"/"+fileName;
+ std::string absName = (path+"/"+fileName).str();
//printf(" Looking for %s in %s\n",fileName,path.c_str());
FileState *fs = checkAndOpenFile(yyscanner,absName.c_str(),alreadyProcessed);
if (fs)
@@ -1850,10 +1851,10 @@ static FileState *findFile(yyscan_t yyscanner, const char *fileName,bool localIn
return 0;
}
-static QCString extractTrailingComment(const char *s)
+static QCString extractTrailingComment(const QCString &s)
{
- if (s==0) return "";
- int i=(int)strlen(s)-1;
+ if (s.isEmpty()) return "";
+ int i=(int)s.length()-1;
while (i>=0)
{
char c=s[i];
@@ -1969,7 +1970,7 @@ static QCString stringize(const QCString &s)
}
}
}
- //printf("stringize '%s'->'%s'\n",s.data(),result.data());
+ //printf("stringize '%s'->'%s'\n",qPrint(s),qPrint(result));
return result;
}
@@ -1981,7 +1982,7 @@ static QCString stringize(const QCString &s)
static void processConcatOperators(QCString &expr)
{
if (expr.isEmpty()) return;
- //printf("processConcatOperators: in='%s'\n",expr.data());
+ //printf("processConcatOperators: in='%s'\n",qPrint(expr));
std::string e = expr.str();
static const reg::Ex r(R"(\s*##\s*)");
reg::Iterator end;
@@ -1995,13 +1996,13 @@ static void processConcatOperators(QCString &expr)
const auto &match = *it;
size_t n = match.position();
size_t l = match.length();
- //printf("Match: '%s'\n",expr.data()+i);
+ //printf("Match: '%s'\n",qPrint(expr.mid(i)));
if (n+l+1<e.length() && e[static_cast<int>(n+l)]=='@' && expr[static_cast<int>(n+l+1)]=='-')
{
// remove no-rescan marker after ID
l+=2;
}
- //printf("found '%s'\n",expr.mid(n,l).data());
+ //printf("found '%s'\n",qPrint(expr.mid(n,l)));
// remove the ## operator and the surrounding whitespace
e=e.substr(0,n)+e.substr(n+l);
int k=static_cast<int>(n)-1;
@@ -2022,7 +2023,7 @@ static void processConcatOperators(QCString &expr)
expr = e;
- //printf("processConcatOperators: out='%s'\n",expr.data());
+ //printf("processConcatOperators: out='%s'\n",qPrint(expr));
}
static void returnCharToStream(yyscan_t yyscanner,char c)
@@ -2053,7 +2054,7 @@ static inline void addTillEndOfString(yyscan_t yyscanner,const QCString &expr,QC
static bool replaceFunctionMacro(yyscan_t yyscanner,const QCString &expr,QCString *rest,int pos,int &len,const Define *def,QCString &result,int level)
{
YY_EXTRA_TYPE state = preYYget_extra(yyscanner);
- //printf(">replaceFunctionMacro(expr='%s',rest='%s',pos=%d,def='%s') level=%d\n",expr.data(),rest ? rest->data() : 0,pos,def->name.data(),state->levelGuard.size());
+ //printf(">replaceFunctionMacro(expr='%s',rest='%s',pos=%d,def='%s') level=%d\n",qPrint(expr),rest ? qPrint(*rest) : 0,pos,qPrint(def->name),state->levelGuard.size());
uint j=pos;
len=0;
result.resize(0);
@@ -2065,7 +2066,7 @@ static bool replaceFunctionMacro(yyscan_t yyscanner,const QCString &expr,QCStrin
}
if (cc!='(')
{
- unputChar(yyscanner,expr,rest,j,(char)cc);
+ unputChar(yyscanner,expr,rest,j,' ');
return FALSE;
}
getNextChar(yyscanner,expr,rest,j); // eat the '(' character
@@ -2206,7 +2207,7 @@ static bool replaceFunctionMacro(yyscan_t yyscanner,const QCString &expr,QCStrin
// substitution of all formal arguments
QCString resExpr;
const QCString d=def->definition.stripWhiteSpace();
- //printf("Macro definition: '%s'\n",d.data());
+ //printf("Macro definition: '%s'\n",qPrint(d));
bool inString=FALSE;
while (k<d.length())
{
@@ -2242,12 +2243,12 @@ static bool replaceFunctionMacro(yyscan_t yyscanner,const QCString &expr,QCStrin
while (l<(int)d.length() && d.at(l)==' ') l++;
if (l<(int)d.length()-1 && d.at(l)=='#' && d.at(l+1)=='#') hash=TRUE;
}
- //printf("request key %s result %s\n",key.data(),argTable[key]->data());
- auto it = argTable.find(key.data());
+ //printf("request key %s result %s\n",qPrint(key),argTable[key]->data());
+ auto it = argTable.find(key.str());
if (it!=argTable.end())
{
QCString substArg = it->second.c_str();
- //printf("substArg='%s'\n",substArg.data());
+ //printf("substArg='%s'\n",qPrint(substArg));
// only if no ## operator is before or after the argument
// marker we do macro expansion.
if (!hash)
@@ -2256,7 +2257,7 @@ static bool replaceFunctionMacro(yyscan_t yyscanner,const QCString &expr,QCStrin
}
if (inString)
{
- //printf("'%s'=stringize('%s')\n",stringize(*subst).data(),subst->data());
+ //printf("'%s'=stringize('%s')\n",qPrint(stringize(*subst)),subst->data());
// if the marker is inside a string (because a # was put
// before the macro name) we must escape " and \ characters
@@ -2295,10 +2296,10 @@ static bool replaceFunctionMacro(yyscan_t yyscanner,const QCString &expr,QCStrin
}
len=j-pos;
result=resExpr;
- //printf("<replaceFunctionMacro(expr='%s',rest='%s',pos=%d,def='%s',result='%s') level=%d return=TRUE\n",expr.data(),rest ? rest->data() : 0,pos,def->name.data(),result.data(),state->levelGuard.size());
+ //printf("<replaceFunctionMacro(expr='%s',rest='%s',pos=%d,def='%s',result='%s') level=%d return=TRUE\n",qPrint(expr),rest ? qPrint(*rest) : 0,pos,qPrint(def->name),qPrint(result),state->levelGuard.size());
return TRUE;
}
- //printf("<replaceFunctionMacro(expr='%s',rest='%s',pos=%d,def='%s',result='%s') level=%d return=FALSE\n",expr.data(),rest ? rest->data() : 0,pos,def->name.data(),result.data(),state->levelGuard.size());
+ //printf("<replaceFunctionMacro(expr='%s',rest='%s',pos=%d,def='%s',result='%s') level=%d return=FALSE\n",qPrint(expr),rest ? qPrint(*rest) : 0,pos,qPrint(def->name),qPrint(result),state->levelGuard.size());
return FALSE;
}
@@ -2370,21 +2371,21 @@ static int getNextId(const QCString &expr,int p,int *l)
static bool expandExpression(yyscan_t yyscanner,QCString &expr,QCString *rest,int pos,int level)
{
YY_EXTRA_TYPE state = preYYget_extra(yyscanner);
- //printf(">expandExpression(expr='%s',rest='%s',pos=%d,level=%d)\n",expr.data(),rest ? rest->data() : "", pos, level);
+ //printf(">expandExpression(expr='%s',rest='%s',pos=%d,level=%d)\n",qPrint(expr),rest ? qPrint(*rest) : "", pos, level);
if (expr.isEmpty())
{
//printf("<expandExpression: empty\n");
return TRUE;
}
- if (state->expanded.find(expr.data())!=state->expanded.end() &&
+ if (state->expanded.find(expr.str())!=state->expanded.end() &&
level>MAX_EXPANSION_DEPTH) // check for too deep recursive expansions
{
- //printf("<expandExpression: already expanded expr='%s'\n",expr.data());
+ //printf("<expandExpression: already expanded expr='%s'\n",qPrint(expr));
return FALSE;
}
else
{
- state->expanded.insert(expr.data());
+ state->expanded.insert(expr.str());
}
QCString macroName;
QCString expMacro;
@@ -2396,15 +2397,15 @@ static bool expandExpression(yyscan_t yyscanner,QCString &expr,QCString *rest,in
{
bool replaced=FALSE;
macroName=expr.mid(p,l);
- //printf(" p=%d macroName=%s\n",p,macroName.data());
+ //printf(" p=%d macroName=%s\n",p,qPrint(macroName));
if (p<2 || !(expr.at(p-2)=='@' && expr.at(p-1)=='-')) // no-rescan marker?
{
- if (state->expandedDict.find(macroName.data())==state->expandedDict.end()) // expand macro
+ if (state->expandedDict.find(macroName.str())==state->expandedDict.end()) // expand macro
{
Define *def=isDefined(yyscanner,macroName);
if (macroName=="defined")
{
- //printf("found defined inside macro definition '%s'\n",expr.right(expr.length()-p).data());
+ //printf("found defined inside macro definition '%s'\n",qPrint(expr.right(expr.length()-p)));
definedTest=TRUE;
}
else if (definedTest) // macro name was found after defined
@@ -2417,7 +2418,7 @@ static bool expandExpression(yyscan_t yyscanner,QCString &expr,QCString *rest,in
else if (def && def->nargs==-1) // simple macro
{
// substitute the definition of the macro
- //printf("macro '%s'->'%s'\n",macroName.data(),def->definition.data());
+ //printf("macro '%s'->'%s'\n",qPrint(macroName),qPrint(def->definition));
if (state->nospaces)
{
expMacro=def->definition.stripWhiteSpace();
@@ -2429,7 +2430,7 @@ static bool expandExpression(yyscan_t yyscanner,QCString &expr,QCString *rest,in
//expMacro=def->definition.stripWhiteSpace();
replaced=TRUE;
len=l;
- //printf("simple macro expansion='%s'->'%s'\n",macroName.data(),expMacro.data());
+ //printf("simple macro expansion='%s'->'%s'\n",qPrint(macroName),qPrint(expMacro));
}
else if (def && def->nargs>=0) // function macro
{
@@ -2438,15 +2439,15 @@ static bool expandExpression(yyscan_t yyscanner,QCString &expr,QCString *rest,in
//printf(" <<<< call replaceFunctionMacro: replaced=%d\n",replaced);
len+=l;
}
- //printf(" macroName='%s' expMacro='%s' replaced=%d\n",macroName.data(),expMacro.data(),replaced);
+ //printf(" macroName='%s' expMacro='%s' replaced=%d\n",qPrint(macroName),qPrint(expMacro),replaced);
if (replaced) // expand the macro and rescan the expression
{
- //printf(" replacing '%s'->'%s'\n",expr.mid(p,len).data(),expMacro.data());
+ //printf(" replacing '%s'->'%s'\n",expr.mid(p,qPrint(len)),qPrint(expMacro));
QCString resultExpr=expMacro;
QCString restExpr=expr.right(expr.length()-len-p);
processConcatOperators(resultExpr);
- //printf(" macroName=%s restExpr='%s' def->nonRecursive=%d\n",macroName.data(),restExpr.data(),def->nonRecursive);
+ //printf(" macroName=%s restExpr='%s' def->nonRecursive=%d\n",qPrint(macroName),qPrint(restExpr),def->nonRecursive);
bool expanded=false;
if (def && !def->nonRecursive)
{
@@ -2461,7 +2462,7 @@ static bool expandExpression(yyscan_t yyscanner,QCString &expr,QCString *rest,in
if (expanded)
{
expr=expr.left(p)+resultExpr+restExpr;
- //printf(" new expression: '%s' old i=%d new i=%d\n",expr.data(),i,p);
+ //printf(" new expression: '%s' old i=%d new i=%d\n",qPrint(expr),i,p);
i=p;
}
else
@@ -2479,7 +2480,7 @@ static bool expandExpression(yyscan_t yyscanner,QCString &expr,QCString *rest,in
else // move to the next macro name
{
expr=expr.left(p)+"@-"+expr.right(expr.length()-p);
- //printf("macro already expanded, moving to the next macro expr=%s\n",expr.data());
+ //printf("macro already expanded, moving to the next macro expr=%s\n",qPrint(expr));
i=p+l+2;
//i=p+l;
}
@@ -2504,7 +2505,7 @@ static bool expandExpression(yyscan_t yyscanner,QCString &expr,QCString *rest,in
i=p+l;
}
}
- //printf("<expandExpression(expr='%s',rest='%s',pos=%d,level=%d)\n",expr.data(),rest ? rest->data() : 0, pos,level);
+ //printf("<expandExpression(expr='%s',rest='%s',pos=%d,level=%d)\n",qPrint(expr),rest ? qPrint(*rest) : "", pos,level);
return TRUE;
}
@@ -2550,10 +2551,11 @@ static const char *processUntilMatchingTerminator(const char *inputStr,QCString
* and removes all occurrences of @@E.
* All identifiers found are replaced by 0L
*/
-static QCString removeIdsAndMarkers(const char *s)
+static QCString removeIdsAndMarkers(const QCString &s)
{
//printf("removeIdsAndMarkers(%s)\n",s);
- const char *p=s;
+ if (s.isEmpty()) return s;
+ const char *p=s.data();
char c;
bool inNum=FALSE;
QCString result;
@@ -2661,7 +2663,7 @@ nextChar:
}
}
}
- //printf("removeIdsAndMarkers(%s)=%s\n",s,result.data());
+ //printf("removeIdsAndMarkers(%s)=%s\n",s,qPrint(result));
return result;
}
@@ -2669,9 +2671,10 @@ nextChar:
* \par assumption:
* \a s only contains pairs of @@'s
*/
-static QCString removeMarkers(const char *s)
+static QCString removeMarkers(const QCString &s)
{
- const char *p=s;
+ if (s.isEmpty()) return s;
+ const char *p=s.data();
char c;
QCString result;
if (p)
@@ -2722,7 +2725,7 @@ static QCString removeMarkers(const char *s)
}
}
}
- //printf("RemoveMarkers(%s)=%s\n",s,result.data());
+ //printf("RemoveMarkers(%s)=%s\n",s,qPrint(result));
return result;
}
@@ -2736,11 +2739,11 @@ static bool computeExpression(yyscan_t yyscanner,const QCString &expr)
QCString e=expr;
state->expanded.clear();
expandExpression(yyscanner,e,0,0,0);
- //printf("after expansion '%s'\n",e.data());
+ //printf("after expansion '%s'\n",qPrint(e));
e = removeIdsAndMarkers(e);
if (e.isEmpty()) return FALSE;
- //printf("parsing '%s'\n",e.data());
- return state->constExpParser.parse(state->yyFileName,state->yyLineNr,e.str());
+ //printf("parsing '%s'\n",qPrint(e));
+ return state->constExpParser.parse(state->yyFileName.data(),state->yyLineNr,e.str());
}
/*! expands the macro definition in \a name
@@ -2754,7 +2757,7 @@ static QCString expandMacro(yyscan_t yyscanner,const QCString &name)
state->expanded.clear();
expandExpression(yyscanner,n,0,0,0);
n=removeMarkers(n);
- //printf("expandMacro '%s'->'%s'\n",name.data(),n.data());
+ //printf("expandMacro '%s'->'%s'\n",qPrint(name),qPrint(n));
return n;
}
@@ -2770,9 +2773,9 @@ static void addDefine(yyscan_t yyscanner)
def.lineNr = state->yyLineNr-state->yyMLines;
def.columnNr = state->yyColNr;
def.varArgs = state->defVarArgs;
- //printf("newDefine: %s %s file: %s\n",def.name.data(),def.definition.data(),
- // def.fileDef ? def.fileDef->name().data() : def.fileName.data());
- //printf("newDefine: '%s'->'%s'\n",def.name.data(),def.definition.data());
+ //printf("newDefine: %s %s file: %s\n",qPrint(def.name),qPrint(def.definition),
+ // def.fileDef ? qPrint(def.fileDef->name()) : qPrint(def.fileName));
+ //printf("newDefine: '%s'->'%s'\n",qPrint(def.name),qPrint(def.definition));
if (!def.name.isEmpty() &&
Doxygen::expandAsDefinedSet.find(def.name.str())!=Doxygen::expandAsDefinedSet.end())
{
@@ -2836,46 +2839,52 @@ static inline void outputChar(yyscan_t yyscanner,char c)
if (state->includeStack.empty() || state->curlyCount>0) state->outputBuf->addChar(c);
}
-static inline void outputArray(yyscan_t yyscanner,const char *a,int len)
+static inline void outputArray(yyscan_t yyscanner,const char *a,yy_size_t len)
{
YY_EXTRA_TYPE state = preYYget_extra(yyscanner);
if (state->includeStack.empty() || state->curlyCount>0) state->outputBuf->addArray(a,len);
}
+static inline void outputString(yyscan_t yyscanner,const QCString &a)
+{
+ YY_EXTRA_TYPE state = preYYget_extra(yyscanner);
+ if (state->includeStack.empty() || state->curlyCount>0) state->outputBuf->addArray(a.data(),a.length());
+}
+
static QCString determineAbsoluteIncludeName(const QCString &curFile,const QCString &incFileName)
{
bool searchIncludes = Config_getBool(SEARCH_INCLUDES);
QCString absIncFileName = incFileName;
- QFileInfo fi(curFile);
+ FileInfo fi(curFile.str());
if (fi.exists())
{
- QCString absName = QCString(fi.dirPath(TRUE).data())+"/"+incFileName;
- QFileInfo fi2(absName);
+ QCString absName = QCString(fi.dirPath(TRUE))+"/"+incFileName;
+ FileInfo fi2(absName.str());
if (fi2.exists())
{
- absIncFileName=fi2.absFilePath().utf8();
+ absIncFileName=fi2.absFilePath();
}
else if (searchIncludes) // search in INCLUDE_PATH as well
{
const StringVector &includePath = Config_getList(INCLUDE_PATH);
for (const auto &incPath : includePath)
{
- QFileInfo fi3(incPath.c_str());
+ FileInfo fi3(incPath);
if (fi3.exists() && fi3.isDir())
{
- absName = QCString(fi3.absFilePath().utf8())+"/"+incFileName;
- //printf("trying absName=%s\n",absName.data());
- QFileInfo fi4(absName);
+ absName = QCString(fi3.absFilePath())+"/"+incFileName;
+ //printf("trying absName=%s\n",qPrint(absName));
+ FileInfo fi4(absName.str());
if (fi4.exists())
{
- absIncFileName=fi4.absFilePath().utf8();
+ absIncFileName=fi4.absFilePath();
break;
}
- //printf( "absIncFileName = %s\n", absIncFileName.data() );
+ //printf( "absIncFileName = %s\n", qPrint(absIncFileName) );
}
}
}
- //printf( "absIncFileName = %s\n", absIncFileName.data() );
+ //printf( "absIncFileName = %s\n", qPrint(absIncFileName) );
}
return absIncFileName;
}
@@ -2912,14 +2921,14 @@ static void readIncludeFile(yyscan_t yyscanner,const QCString &inc)
QCString oldFileName = state->yyFileName;
FileDef *oldFileDef = state->yyFileDef;
int oldLineNr = state->yyLineNr;
- //printf("Searching for '%s'\n",incFileName.data());
+ //printf("Searching for '%s'\n",qPrint(incFileName));
QCString absIncFileName = determineAbsoluteIncludeName(state->yyFileName,incFileName);
// findFile will overwrite state->yyFileDef if found
FileState *fs;
bool alreadyProcessed = FALSE;
- //printf("calling findFile(%s)\n",incFileName.data());
+ //printf("calling findFile(%s)\n",qPrint(incFileName));
if ((fs=findFile(yyscanner,incFileName,localInclude,alreadyProcessed))) // see if the include file can be found
{
{
@@ -2934,7 +2943,7 @@ static void readIncludeFile(yyscan_t yyscanner,const QCString &inc)
{
Debug::print(Debug::Preprocessor,0," ");
}
- Debug::print(Debug::Preprocessor,0,"#include %s: parsing...\n",incFileName.data());
+ Debug::print(Debug::Preprocessor,0,"#include %s: parsing...\n",qPrint(incFileName));
}
if (state->includeStack.empty() && oldFileDef)
@@ -2968,10 +2977,10 @@ static void readIncludeFile(yyscan_t yyscanner,const QCString &inc)
// Deal with file changes due to
// #include's within { .. } blocks
QCString lineStr(state->yyFileName.length()+20);
- lineStr.sprintf("# 1 \"%s\" 1\n",state->yyFileName.data());
- outputArray(yyscanner,lineStr.data(),lineStr.length());
+ lineStr.sprintf("# 1 \"%s\" 1\n",qPrint(state->yyFileName));
+ outputString(yyscanner,lineStr);
- DBG_CTX((stderr,"Switching to include file %s\n",incFileName.data()));
+ DBG_CTX((stderr,"Switching to include file %s\n",qPrint(incFileName)));
state->expectGuard=TRUE;
state->inputBuf = &fs->fileBuf;
state->inputBufPos=0;
@@ -3022,7 +3031,7 @@ static void readIncludeFile(yyscan_t yyscanner,const QCString &inc)
}
if (state->curlyCount>0 && !alreadyProcessed) // failed to find #include inside { ... }
{
- warn(state->yyFileName,state->yyLineNr,"include file %s not found, perhaps you forgot to add its directory to INCLUDE_PATH?",incFileName.data());
+ warn(state->yyFileName,state->yyLineNr,"include file %s not found, perhaps you forgot to add its directory to INCLUDE_PATH?",qPrint(incFileName));
}
}
}
@@ -3030,12 +3039,12 @@ static void readIncludeFile(yyscan_t yyscanner,const QCString &inc)
/* ----------------------------------------------------------------- */
-static void startCondSection(yyscan_t yyscanner,const char *sectId)
+static void startCondSection(yyscan_t yyscanner,const QCString &sectId)
{
YY_EXTRA_TYPE state = preYYget_extra(yyscanner);
//printf("startCondSection: skip=%d stack=%d\n",state->skip,state->condStack.size());
CondParser prs;
- bool expResult = prs.parse(state->yyFileName,state->yyLineNr,sectId);
+ bool expResult = prs.parse(state->yyFileName.data(),state->yyLineNr,sectId.data());
state->condStack.emplace(std::make_unique<CondCtx>(state->yyLineNr,sectId,state->skip));
if (!expResult)
{
@@ -3070,13 +3079,13 @@ static void forceEndCondSection(yyscan_t yyscanner)
state->skip=FALSE;
}
-static QCString escapeAt(const char *text)
+static QCString escapeAt(const QCString &text)
{
QCString result;
- if (text)
+ if (!text.isEmpty())
{
char c;
- const char *p=text;
+ const char *p=text.data();
while ((c=*p++))
{
if (c=='@') result+="@@"; else result+=c;
@@ -3107,7 +3116,7 @@ static char resolveTrigraph(char c)
static int getNextChar(yyscan_t yyscanner,const QCString &expr,QCString *rest,uint &pos)
{
- //printf("getNextChar(%s,%s,%d)\n",expr.data(),rest ? rest->data() : 0,pos);
+ //printf("getNextChar(%s,%s,%d)\n",qPrint(expr),rest ? rest->data() : 0,pos);
if (pos<expr.length())
{
//printf("%c=expr()\n",expr.at(pos));
@@ -3130,7 +3139,7 @@ static int getNextChar(yyscan_t yyscanner,const QCString &expr,QCString *rest,ui
static int getCurrentChar(yyscan_t yyscanner,const QCString &expr,QCString *rest,uint pos)
{
- //printf("getCurrentChar(%s,%s,%d)\n",expr.data(),rest ? rest->data() : 0,pos);
+ //printf("getCurrentChar(%s,%s,%d)\n",qPrint(expr),rest ? rest->data() : 0,pos);
if (pos<expr.length())
{
//printf("%c=expr()\n",expr.at(pos));
@@ -3153,7 +3162,7 @@ static int getCurrentChar(yyscan_t yyscanner,const QCString &expr,QCString *rest
static void unputChar(yyscan_t yyscanner,const QCString &expr,QCString *rest,uint &pos,char c)
{
- //printf("unputChar(%s,%s,%d,%c)\n",expr.data(),rest ? rest->data() : 0,pos,c);
+ //printf("unputChar(%s,%s,%d,%c)\n",qPrint(expr),rest ? rest->data() : 0,pos,c);
if (pos<expr.length())
{
pos++;
@@ -3169,13 +3178,13 @@ static void unputChar(yyscan_t yyscanner,const QCString &expr,QCString *rest,uin
//unput(c);
returnCharToStream(yyscanner,c);
}
- //printf("result: unputChar(%s,%s,%d,%c)\n",expr.data(),rest ? rest->data() : 0,pos,c);
+ //printf("result: unputChar(%s,%s,%d,%c)\n",qPrint(expr),rest ? rest->data() : 0,pos,c);
}
/** Returns a reference to a Define object given its name or 0 if the Define does
* not exist.
*/
-static Define *isDefined(yyscan_t yyscanner,const char *name)
+static Define *isDefined(yyscan_t yyscanner,const QCString &name)
{
YY_EXTRA_TYPE state = preYYget_extra(yyscanner);
@@ -3183,7 +3192,7 @@ static Define *isDefined(yyscan_t yyscanner,const char *name)
auto findDefine = [&undef,&name](DefineMap &map)
{
Define *d=0;
- auto it = map.find(name);
+ auto it = map.find(name.str());
if (it!=map.end())
{
d = &it->second;
@@ -3204,7 +3213,7 @@ static Define *isDefined(yyscan_t yyscanner,const char *name)
return def;
}
-static void initPredefined(yyscan_t yyscanner,const char *fileName)
+static void initPredefined(yyscan_t yyscanner,const QCString &fileName)
{
YY_EXTRA_TYPE state = preYYget_extra(yyscanner);
@@ -3282,7 +3291,7 @@ static void initPredefined(yyscan_t yyscanner,const char *fileName)
int argIndex = it->second;
QCString marker;
marker.sprintf(" @%d ",argIndex);
- definition+=marker;
+ definition+=marker.str();
}
else
{
@@ -3308,7 +3317,7 @@ static void initPredefined(yyscan_t yyscanner,const char *fileName)
state->contextDefines.insert(std::make_pair(def.name.str(),def));
//printf("#define '%s' '%s' #nargs=%d\n",
- // def->name.data(),def->definition.data(),def->nargs);
+ // qPrint(def->name),qPrint(def->definition),def->nargs);
}
}
else if (!ds.empty()) // predefined non-function macro definition
@@ -3347,11 +3356,11 @@ struct Preprocessor::Private
preYY_state state;
};
-void Preprocessor::addSearchDir(const char *dir)
+void Preprocessor::addSearchDir(const QCString &dir)
{
YY_EXTRA_TYPE state = preYYget_extra(p->yyscanner);
- QFileInfo fi(dir);
- if (fi.isDir()) state->pathList.push_back(fi.absFilePath().utf8().data());
+ FileInfo fi(dir.str());
+ if (fi.isDir()) state->pathList.push_back(fi.absFilePath());
}
Preprocessor::Preprocessor() : p(std::make_unique<Private>())
@@ -3365,7 +3374,7 @@ Preprocessor::~Preprocessor()
preYYlex_destroy(p->yyscanner);
}
-void Preprocessor::processFile(const char *fileName,BufStr &input,BufStr &output)
+void Preprocessor::processFile(const QCString &fileName,BufStr &input,BufStr &output)
{
// printf("Preprocessor::processFile(%s)\n",fileName);
yyscan_t yyscanner = p->yyscanner;
@@ -3376,10 +3385,10 @@ void Preprocessor::processFile(const char *fileName,BufStr &input,BufStr &output
preYYset_debug(1,yyscanner);
#endif
- printlex(yy_flex_debug, TRUE, __FILE__, fileName);
+ printlex(yy_flex_debug, TRUE, __FILE__, qPrint(fileName));
uint orgOffset=output.curPos();
//printf("##########################\n%s\n####################\n",
- // input.data());
+ // qPrint(input));
state->macroExpansion = Config_getBool(MACRO_EXPANSION);
state->expandOnlyPredef = Config_getBool(EXPAND_ONLY_PREDEF);
@@ -3418,9 +3427,9 @@ void Preprocessor::processFile(const char *fileName,BufStr &input,BufStr &output
{
const std::unique_ptr<CondCtx> &ctx = state->condStack.top();
QCString sectionInfo = " ";
- if (ctx->sectionId!=" ") sectionInfo.sprintf(" with label '%s' ",ctx->sectionId.stripWhiteSpace().data());
+ if (ctx->sectionId!=" ") sectionInfo.sprintf(" with label '%s' ",qPrint(ctx->sectionId.stripWhiteSpace()));
warn(fileName,ctx->lineNr,"Conditional section%sdoes not have "
- "a corresponding \\endcond command within this file.",sectionInfo.data());
+ "a corresponding \\endcond command within this file.",qPrint(sectionInfo));
state->condStack.pop();
}
// make sure we don't extend a \cond with missing \endcond over multiple files (see bug 624829)
@@ -3431,7 +3440,7 @@ void Preprocessor::processFile(const char *fileName,BufStr &input,BufStr &output
std::lock_guard<std::mutex> lock(g_debugMutex);
char *orgPos=output.data()+orgOffset;
char *newPos=output.data()+output.curPos();
- Debug::print(Debug::Preprocessor,0,"Preprocessor output of %s (size: %d bytes):\n",fileName,newPos-orgPos);
+ Debug::print(Debug::Preprocessor,0,"Preprocessor output of %s (size: %d bytes):\n",qPrint(fileName),newPos-orgPos);
int line=1;
Debug::print(Debug::Preprocessor,0,"---------\n");
if (!Debug::isFlagSet(Debug::NoLineNo)) Debug::print(Debug::Preprocessor,0,"00001 ");
@@ -3444,7 +3453,7 @@ void Preprocessor::processFile(const char *fileName,BufStr &input,BufStr &output
Debug::print(Debug::Preprocessor,0,"\n---------\n");
if (yyextra->contextDefines.size()>0)
{
- Debug::print(Debug::Preprocessor,0,"Macros accessible in this file (%s):\n", fileName);
+ Debug::print(Debug::Preprocessor,0,"Macros accessible in this file (%s):\n", qPrint(fileName));
Debug::print(Debug::Preprocessor,0,"---------\n");
for (auto &kv : yyextra->contextDefines)
{
@@ -3458,7 +3467,7 @@ void Preprocessor::processFile(const char *fileName,BufStr &input,BufStr &output
}
else
{
- Debug::print(Debug::Preprocessor,0,"No macros accessible in this file (%s).\n", fileName);
+ Debug::print(Debug::Preprocessor,0,"No macros accessible in this file (%s).\n", qPrint(fileName));
}
}
@@ -3480,7 +3489,7 @@ void Preprocessor::processFile(const char *fileName,BufStr &input,BufStr &output
}
//yyextra->defineManager.endContext();
- printlex(yy_flex_debug, FALSE, __FILE__, fileName);
+ printlex(yy_flex_debug, FALSE, __FILE__, qPrint(fileName));
// printf("Preprocessor::processFile(%s) finished\n",fileName);
}
diff --git a/src/printdocvisitor.h b/src/printdocvisitor.h
index 2992717..5ad0205 100644
--- a/src/printdocvisitor.h
+++ b/src/printdocvisitor.h
@@ -36,19 +36,19 @@ class PrintDocVisitor : public DocVisitor
void visit(DocWord *w)
{
indent_leaf();
- printf("%s",w->word().data());
+ printf("%s",qPrint(w->word()));
}
void visit(DocLinkedWord *w)
{
indent_leaf();
- printf("%s",w->word().data());
+ printf("%s",qPrint(w->word()));
}
void visit(DocWhiteSpace *w)
{
indent_leaf();
if (m_insidePre)
{
- printf("%s",w->chars().data());
+ printf("%s",qPrint(w->chars()));
}
else
{
@@ -84,7 +84,7 @@ class PrintDocVisitor : public DocVisitor
void visit(DocURL *u)
{
indent_leaf();
- printf("%s",u->url().data());
+ printf("%s",qPrint(u->url()));
}
void visit(DocLineBreak *)
{
@@ -165,7 +165,7 @@ class PrintDocVisitor : public DocVisitor
case DocVerbatim::Msc: printf("<msc>"); break;
case DocVerbatim::PlantUML: printf("<plantuml>"); break;
}
- printf("%s",s->text().data());
+ printf("%s",qPrint(s->text()));
switch(s->type())
{
case DocVerbatim::Code: printf("</code>"); break;
@@ -184,12 +184,12 @@ class PrintDocVisitor : public DocVisitor
void visit(DocAnchor *a)
{
indent_leaf();
- printf("<anchor name=\"%s\"/>",a->anchor().data());
+ printf("<anchor name=\"%s\"/>",qPrint(a->anchor()));
}
void visit(DocInclude *inc)
{
indent_leaf();
- printf("<include file=\"%s\" type=\"",inc->file().data());
+ printf("<include file=\"%s\" type=\"",qPrint(inc->file()));
switch(inc->type())
{
case DocInclude::Include: printf("include"); break;
@@ -219,7 +219,7 @@ class PrintDocVisitor : public DocVisitor
void visit(DocIncOperator *op)
{
indent_leaf();
- printf("<incoperator pattern=\"%s\" type=\"",op->pattern().data());
+ printf("<incoperator pattern=\"%s\" type=\"",qPrint(op->pattern()));
switch(op->type())
{
case DocIncOperator::Line: printf("line"); break;
@@ -232,12 +232,12 @@ class PrintDocVisitor : public DocVisitor
void visit(DocFormula *f)
{
indent_leaf();
- printf("<formula name=%s text=%s/>",f->name().data(),f->text().data());
+ printf("<formula name=%s text=%s/>",qPrint(f->name()),qPrint(f->text()));
}
void visit(DocIndexEntry *i)
{
indent_leaf();
- printf("<indexentry>%s</indexentry\n",i->entry().data());
+ printf("<indexentry>%s</indexentry\n",qPrint(i->entry()));
}
void visit(DocSimpleSectSep *)
{
@@ -250,8 +250,8 @@ class PrintDocVisitor : public DocVisitor
printf("<cite ref=\"%s\" file=\"%s\" "
"anchor=\"%s\" text=\"%s\""
"/>\n",
- cite->ref().data(),cite->file().data(),cite->anchor().data(),
- cite->text().data());
+ qPrint(cite->ref()),qPrint(cite->file()),qPrint(cite->anchor()),
+ qPrint(cite->text()));
}
//--------------------------------------
@@ -498,7 +498,7 @@ class PrintDocVisitor : public DocVisitor
void visitPre(DocHRef *href)
{
indent_pre();
- printf("<a url=\"%s\">\n",href->url().data());
+ printf("<a url=\"%s\">\n",qPrint(href->url()));
}
void visitPost(DocHRef *)
{
@@ -518,7 +518,7 @@ class PrintDocVisitor : public DocVisitor
void visitPre(DocImage *img)
{
indent_pre();
- printf("<image src=\"%s\" type=\"",img->name().data());
+ printf("<image src=\"%s\" type=\"",qPrint(img->name()));
switch(img->type())
{
case DocImage::Html: printf("html"); break;
@@ -526,7 +526,7 @@ class PrintDocVisitor : public DocVisitor
case DocImage::Rtf: printf("rtf"); break;
case DocImage::DocBook: printf("docbook"); break;
}
- printf("\" %s %s inline=\"%s\">\n",img->width().data(),img->height().data(),img->isInlineImage() ? "yes" : "no");
+ printf("\" %s %s inline=\"%s\">\n",qPrint(img->width()),qPrint(img->height()),img->isInlineImage() ? "yes" : "no");
}
void visitPost(DocImage *)
{
@@ -536,7 +536,7 @@ class PrintDocVisitor : public DocVisitor
void visitPre(DocDotFile *df)
{
indent_pre();
- printf("<dotfile src=\"%s\">\n",df->name().data());
+ printf("<dotfile src=\"%s\">\n",qPrint(df->name()));
}
void visitPost(DocDotFile *)
{
@@ -546,7 +546,7 @@ class PrintDocVisitor : public DocVisitor
void visitPre(DocMscFile *df)
{
indent_pre();
- printf("<mscfile src=\"%s\">\n",df->name().data());
+ printf("<mscfile src=\"%s\">\n",qPrint(df->name()));
}
void visitPost(DocMscFile *)
{
@@ -556,7 +556,7 @@ class PrintDocVisitor : public DocVisitor
void visitPre(DocDiaFile *df)
{
indent_pre();
- printf("<diafile src=\"%s\">\n",df->name().data());
+ printf("<diafile src=\"%s\">\n",qPrint(df->name()));
}
void visitPost(DocDiaFile *)
{
@@ -567,7 +567,7 @@ class PrintDocVisitor : public DocVisitor
{
indent_pre();
printf("<link ref=\"%s\" file=\"%s\" anchor=\"%s\">\n",
- lnk->ref().data(),lnk->file().data(),lnk->anchor().data());
+ qPrint(lnk->ref()),qPrint(lnk->file()),qPrint(lnk->anchor()));
}
void visitPost(DocLink *)
{
@@ -580,8 +580,8 @@ class PrintDocVisitor : public DocVisitor
printf("<ref ref=\"%s\" file=\"%s\" "
"anchor=\"%s\" targetTitle=\"%s\""
" hasLinkText=\"%s\" refToAnchor=\"%s\" refToSection=\"%s\" refToTable=\"%s\">\n",
- ref->ref().data(),ref->file().data(),ref->anchor().data(),
- ref->targetTitle().data(),ref->hasLinkText()?"yes":"no",
+ qPrint(ref->ref()),qPrint(ref->file()),qPrint(ref->anchor()),
+ qPrint(ref->targetTitle()),ref->hasLinkText()?"yes":"no",
ref->refToAnchor()?"yes":"no", ref->refToSection()?"yes":"no",
ref->refToTable()?"yes":"no");
}
@@ -593,7 +593,7 @@ class PrintDocVisitor : public DocVisitor
void visitPre(DocSecRefItem *ref)
{
indent_pre();
- printf("<secrefitem target=\"%s\">\n",ref->target().data());
+ printf("<secrefitem target=\"%s\">\n",qPrint(ref->target()));
}
void visitPost(DocSecRefItem *)
{
@@ -613,7 +613,7 @@ class PrintDocVisitor : public DocVisitor
//void visitPre(DocLanguage *l)
//{
// indent_pre();
- // printf("<language id=%s>\n",l->id().data());
+ // printf("<language id=%s>\n",qPrint(l->id()));
//}
//void visitPost(DocLanguage *)
//{
@@ -675,7 +675,7 @@ class PrintDocVisitor : public DocVisitor
{
indent_pre();
printf("<xrefitem file=\"%s\" anchor=\"%s\" title=\"%s\">\n",
- x->file().data(),x->anchor().data(),x->title().data());
+ qPrint(x->file()),qPrint(x->anchor()),qPrint(x->title()));
}
void visitPost(DocXRefItem *)
{
@@ -685,7 +685,7 @@ class PrintDocVisitor : public DocVisitor
void visitPre(DocInternalRef *r)
{
indent_pre();
- printf("<internalref file=%s anchor=%s>\n",r->file().data(),r->anchor().data());
+ printf("<internalref file=%s anchor=%s>\n",qPrint(r->file()),qPrint(r->anchor()));
}
void visitPost(DocInternalRef *)
{
diff --git a/src/pycode.h b/src/pycode.h
index 8bce2a9..43179da 100644
--- a/src/pycode.h
+++ b/src/pycode.h
@@ -37,11 +37,11 @@ class PythonCodeParser : public CodeParserInterface
PythonCodeParser();
virtual ~PythonCodeParser();
void parseCode(CodeOutputInterface &codeOutIntf,
- const char *scopeName,
+ const QCString &scopeName,
const QCString &input,
SrcLangExt lang,
bool isExampleBlock,
- const char *exampleName=0,
+ const QCString &exampleName=QCString(),
FileDef *fileDef=0,
int startLine=-1,
int endLine=-1,
diff --git a/src/pycode.l b/src/pycode.l
index 107d855..6625300 100644
--- a/src/pycode.l
+++ b/src/pycode.l
@@ -118,27 +118,27 @@ static const char *stateToString(int state);
static void startCodeLine(yyscan_t yyscanner);
static int countLines(yyscan_t yyscanner);
static void setCurrentDoc(yyscan_t yyscanner, const QCString &anchor);
-static void addToSearchIndex(yyscan_t yyscanner, const char *text);
-static const ClassDef *stripClassName(yyscan_t yyscanner,const char *s,Definition *d);
-static void codify(yyscan_t yyscanner,const char* text);
+static void addToSearchIndex(yyscan_t yyscanner, const QCString &text);
+static const ClassDef *stripClassName(yyscan_t yyscanner,const QCString &s,Definition *d);
+static void codify(yyscan_t yyscanner,const QCString &text);
static void endCodeLine(yyscan_t yyscanner);
static void nextCodeLine(yyscan_t yyscanner);
-static void writeMultiLineCodeLink(yyscan_t yyscanner, CodeOutputInterface &ol, const Definition *d, const char *text);
+static void writeMultiLineCodeLink(yyscan_t yyscanner, CodeOutputInterface &ol, const Definition *d, const QCString &text);
static void startFontClass(yyscan_t yyscanner,const char *s);
static void endFontClass(yyscan_t yyscanner);
-static void codifyLines(yyscan_t yyscanner,const char *text);
+static void codifyLines(yyscan_t yyscanner,const QCString &text);
static bool getLinkInScope(yyscan_t yyscanner, const QCString &c, const QCString &m,
- const char *memberText, CodeOutputInterface &ol, const char *text);
-static bool getLink(yyscan_t yyscanner, const char *className, const char *memberName,
- CodeOutputInterface &ol, const char *text=0);
+ const QCString &memberText, CodeOutputInterface &ol, const QCString &text);
+static bool getLink(yyscan_t yyscanner, const QCString &className, const QCString &memberName,
+ CodeOutputInterface &ol, const QCString &text=QCString());
static void generateClassOrGlobalLink(yyscan_t yyscanner, CodeOutputInterface &ol,
- const char *clName, bool typeOnly=FALSE);
+ const QCString &clName, bool typeOnly=FALSE);
static void generateFunctionLink(yyscan_t yyscanner, CodeOutputInterface &ol,
- const char *funcName);
+ const QCString &funcName);
static bool findMemberLink(yyscan_t yyscanner, CodeOutputInterface &ol,
- Definition *sym, const char *symName);
+ Definition *sym, const QCString &symName);
static void findMemberLink(yyscan_t yyscanner, CodeOutputInterface &ol,
- const char *symName);
+ const QCString &symName);
static void adjustScopesAndSuites(yyscan_t yyscanner,unsigned indentLength);
static yy_size_t yyread(yyscan_t yyscanner,char *buf,yy_size_t max_size);
@@ -172,7 +172,7 @@ NONEMPTYEXP [^ \t\n:]
PARAMNONEMPTY [^ \t\n():]
IDENTIFIER ({LETTER}|"_")({LETTER}|{DIGIT}|"_")*
SCOPE {IDENTIFIER}("."{IDENTIFIER})*
-CALLANY "("[^)]*")"
+CALLANY "("[^)\n]*")"
BORDER ([^A-Za-z0-9])
POUNDCOMMENT "##"
@@ -395,7 +395,7 @@ TARGET ({IDENTIFIER}|"("{TARGET_LIST}")"|"["{TARGET_LIST}"]"|{ATTRIBU
// Push a class scope
- std::unique_ptr<ClassDef> classDefToAdd { createClassDef("<code>",1,1,yyextra->curClassName,ClassDef::Class,0,0,FALSE) };
+ std::unique_ptr<ClassDef> classDefToAdd { createClassDef("<code>",1,1,yyextra->curClassName,ClassDef::Class,QCString(),QCString(),FALSE) };
ScopedTypeVariant var(yyextra->curClassName);
for (const auto &s : yyextra->curClassBases)
{
@@ -829,7 +829,7 @@ TARGET ({IDENTIFIER}|"("{TARGET_LIST}")"|"["{TARGET_LIST}"]"|{ATTRIBU
static void addVariable(yyscan_t yyscanner, QCString type, QCString name)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
- //printf("PyVariableContext::addVariable(%s,%s)\n",type.data(),name.data());
+ //printf("PyVariableContext::addVariable(%s,%s)\n",qPrint(type),qPrint(name));
QCString ltype = type.simplifyWhiteSpace();
QCString lname = name.simplifyWhiteSpace();
@@ -951,7 +951,7 @@ static void setCurrentDoc(yyscan_t yyscanner, const QCString &anchor)
//-------------------------------------------------------------------------------
-static void addToSearchIndex(yyscan_t yyscanner, const char *text)
+static void addToSearchIndex(yyscan_t yyscanner, const QCString &text)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
if (Doxygen::searchIndex)
@@ -963,7 +963,7 @@ static void addToSearchIndex(yyscan_t yyscanner, const char *text)
//-------------------------------------------------------------------------------
-static const ClassDef *stripClassName(yyscan_t yyscanner,const char *s,Definition *d)
+static const ClassDef *stripClassName(yyscan_t yyscanner,const QCString &s,Definition *d)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
int pos=0;
@@ -1018,9 +1018,9 @@ static void startCodeLine(yyscan_t yyscanner)
//yyextra->insideBody = FALSE;
yyextra->endComment = FALSE;
yyextra->searchingForBody = TRUE;
- yyextra->realScope = d->name().copy();
- yyextra->classScope = d->name().copy();
- //printf("Real scope: '%s'\n",yyextra->realScope.data());
+ yyextra->realScope = d->name();
+ yyextra->classScope = d->name();
+ //printf("Real scope: '%s'\n",qPrint(yyextra->realScope));
yyextra->bodyCurlyCount = 0;
QCString lineAnchor;
lineAnchor.sprintf("l%05d",yyextra->yyLineNr);
@@ -1035,14 +1035,14 @@ static void startCodeLine(yyscan_t yyscanner)
{
yyextra->code->writeLineNumber(d->getReference(),
d->getOutputFileBase(),
- 0,yyextra->yyLineNr);
+ QCString(),yyextra->yyLineNr);
setCurrentDoc(yyscanner,lineAnchor);
}
}
else
{
//yyextra->code->codify(lineNumber);
- yyextra->code->writeLineNumber(0,0,0,yyextra->yyLineNr);
+ yyextra->code->writeLineNumber(QCString(),QCString(),QCString(),yyextra->yyLineNr);
}
//yyextra->code->endLineNumber();
}
@@ -1055,7 +1055,7 @@ static void startCodeLine(yyscan_t yyscanner)
//-------------------------------------------------------------------------------
-static void codify(yyscan_t yyscanner,const char* text)
+static void codify(yyscan_t yyscanner,const QCString &text)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
yyextra->code->codify(text);
@@ -1093,9 +1093,10 @@ static void nextCodeLine(yyscan_t yyscanner)
static void writeMultiLineCodeLink(yyscan_t yyscanner,
CodeOutputInterface &ol,
const Definition *d,
- const char *text)
+ const QCString &text)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ if (text.isEmpty()) return;
bool sourceTooltips = Config_getBool(SOURCE_TOOLTIPS);
TooltipManager::instance().addTooltip(ol,d);
QCString ref = d->getReference();
@@ -1107,18 +1108,17 @@ static void writeMultiLineCodeLink(yyscan_t yyscanner,
tooltip = d->briefDescriptionAsTooltip();
}
bool done=FALSE;
- char *p=(char *)text;
+ const char *p=text.data();
while (!done)
{
- char *sp=p;
+ const char *sp=p;
char c;
while ((c=*p++) && c!='\n') { }
if (c=='\n')
{
yyextra->yyLineNr++;
- *(p-1)='\0';
//printf("writeCodeLink(%s,%s,%s,%s)\n",ref,file,anchor,sp);
- ol.writeCodeLink(ref,file,anchor,sp,tooltip);
+ ol.writeCodeLink(ref,file,anchor,QCString(sp,p-sp-1),tooltip);
nextCodeLine(yyscanner);
}
else
@@ -1159,11 +1159,12 @@ static void endFontClass(yyscan_t yyscanner)
//-------------------------------------------------------------------------------
-static void codifyLines(yyscan_t yyscanner,const char *text)
+static void codifyLines(yyscan_t yyscanner,const QCString &text)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ if (text.isEmpty()) return;
//printf("codifyLines(%d,\"%s\")\n",yyextra->yyLineNr,text);
- const char *p=text,*sp=p;
+ const char *p=text.data(),*sp=p;
char c;
bool done=FALSE;
while (!done)
@@ -1194,9 +1195,9 @@ static void codifyLines(yyscan_t yyscanner,const char *text)
static bool getLinkInScope(yyscan_t yyscanner,
const QCString &c, // scope
const QCString &m, // member
- const char *memberText, // exact text
+ const QCString &memberText, // exact text
CodeOutputInterface &ol,
- const char *text
+ const QCString &text
)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
@@ -1205,7 +1206,7 @@ static bool getLinkInScope(yyscan_t yyscanner,
const FileDef *fd = 0;
const NamespaceDef *nd = 0;
const GroupDef *gd = 0;
- //printf("Trying '%s'::'%s'\n",c.data(),m.data());
+ //printf("Trying '%s'::'%s'\n",qPrint(c),qPrint(m));
if (getDefs(c,m,"()",md,cd,fd,nd,gd,FALSE,yyextra->sourceFileDef) &&
md->isLinkable())
{
@@ -1214,7 +1215,7 @@ static bool getLinkInScope(yyscan_t yyscanner,
const Definition *d = md->getOuterScope()==Doxygen::globalScope ?
md->getBodyDef() : md->getOuterScope();
- //printf("Found! d=%s\n",d?d->name().data():"<none>");
+ //printf("Found! d=%s\n",d?qPrint(d->name()):"<none>");
if (md->getGroupDef()) d = md->getGroupDef();
if (d && d->isLinkable())
{
@@ -1228,10 +1229,10 @@ static bool getLinkInScope(yyscan_t yyscanner,
std::lock_guard<std::mutex> lock(g_docCrossReferenceMutex);
addDocCrossReference(toMemberDefMutable(yyextra->currentMemberDef),toMemberDefMutable(md));
}
- //printf("d->getReference()='%s' d->getOutputBase()='%s' name='%s' member name='%s'\n",d->getReference().data(),d->getOutputFileBase().data(),d->name().data(),md->name().data());
+ //printf("d->getReference()='%s' d->getOutputBase()='%s' name='%s' member name='%s'\n",qPrint(d->getReference()),qPrint(d->getOutputFileBase()),qPrint(d->name()),qPrint(md->name()));
- writeMultiLineCodeLink(yyscanner,ol,md, text ? text : memberText);
- addToSearchIndex(yyscanner,text ? text : memberText);
+ writeMultiLineCodeLink(yyscanner,ol,md, !text.isEmpty() ? text : memberText);
+ addToSearchIndex(yyscanner,!text.isEmpty() ? text : memberText);
return TRUE;
}
}
@@ -1241,10 +1242,10 @@ static bool getLinkInScope(yyscan_t yyscanner,
//-------------------------------------------------------------------------------
static bool getLink(yyscan_t yyscanner,
- const char *className,
- const char *memberName,
+ const QCString &className,
+ const QCString &memberName,
CodeOutputInterface &ol,
- const char *text)
+ const QCString &text)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
QCString m=removeRedundantWhiteSpace(memberName);
@@ -1270,7 +1271,7 @@ static bool getLink(yyscan_t yyscanner,
*/
static void generateClassOrGlobalLink(yyscan_t yyscanner,
CodeOutputInterface &ol,
- const char *clName,
+ const QCString &clName,
bool typeOnly)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
@@ -1279,7 +1280,7 @@ static void generateClassOrGlobalLink(yyscan_t yyscanner,
// Don't do anything for empty text
if (className.isEmpty()) return;
- DBG_CTX((stderr,"generateClassOrGlobalLink(className=%s)\n",className.data()));
+ DBG_CTX((stderr,"generateClassOrGlobalLink(className=%s)\n",qPrint(className)));
const ScopedTypeVariant *lcd = 0;
const ClassDef *cd=0; // Class def that we may find
@@ -1295,9 +1296,9 @@ static void generateClassOrGlobalLink(yyscan_t yyscanner,
md = yyextra->symbolResolver.getTypedef();
DBG_CTX((stderr,"d=%s yyextra->sourceFileDef=%s\n",
- d?d->displayName().data():"<null>",
- yyextra->currentDefinition?yyextra->currentDefinition->displayName().data():"<null>"));
- DBG_CTX((stderr,"is found as a type %s\n",cd?cd->name().data():"<null>"));
+ d?qPrint(d->displayName()):"<null>",
+ yyextra->currentDefinition?qPrint(yyextra->currentDefinition->displayName()):"<null>"));
+ DBG_CTX((stderr,"is found as a type %s\n",cd?qPrint(cd->name()):"<null>"));
if (cd==0 && md==0) // also see if it is variable or enum or enum value
{
@@ -1349,7 +1350,7 @@ static void generateClassOrGlobalLink(yyscan_t yyscanner,
QCString scope = substitute(className.left(scopeEnd),".","::");
QCString locName = className.right(className.length()-scopeEnd-1);
ClassDef *mcd = getClass(scope);
- DBG_CTX((stderr,"scope=%s locName=%s mcd=%p\n",scope.data(),locName.data(),mcd));
+ DBG_CTX((stderr,"scope=%s locName=%s mcd=%p\n",qPrint(scope),qPrint(locName),mcd));
if (mcd)
{
const MemberDef *mmd = mcd->getMemberByName(locName);
@@ -1378,7 +1379,7 @@ static void generateClassOrGlobalLink(yyscan_t yyscanner,
const MemberDef *mmd=mnd->getMemberByName(locName);
if (mmd)
{
- //printf("name=%s scope=%s\n",locName.data(),scope.data());
+ //printf("name=%s scope=%s\n",qPrint(locName),qPrint(scope));
yyextra->theCallContext.setScope(ScopedTypeVariant(stripClassName(yyscanner,mmd->typeString(),mmd->getOuterScope())));
writeMultiLineCodeLink(yyscanner,ol,mmd,clName);
addToSearchIndex(yyscanner,className);
@@ -1414,26 +1415,26 @@ static void generateClassOrGlobalLink(yyscan_t yyscanner,
*/
static void generateFunctionLink(yyscan_t yyscanner,
CodeOutputInterface &ol,
- const char *funcName)
+ const QCString &funcName)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
QCString locScope=yyextra->classScope;
QCString locFunc=removeRedundantWhiteSpace(funcName);
- DBG_CTX((stdout,"*** locScope=%s locFunc=%s\n",locScope.data(),locFunc.data()));
+ DBG_CTX((stdout,"*** locScope=%s locFunc=%s\n",qPrint(locScope),qPrint(locFunc)));
int i=locFunc.findRev("::");
if (i>0)
{
locScope=locFunc.left(i);
locFunc=locFunc.right(locFunc.length()-i-2).stripWhiteSpace();
}
- //printf("generateFunctionLink(%s) classScope='%s'\n",locFunc.data(),locScope.data());
+ //printf("generateFunctionLink(%s) classScope='%s'\n",qPrint(locFunc),qPrint(locScope));
if (!locScope.isEmpty())
{
auto it = yyextra->codeClassMap.find(locScope.str());
if (it!=yyextra->codeClassMap.end())
{
ScopedTypeVariant ccd = it->second;
- //printf("using classScope %s\n",yyextra->classScope.data());
+ //printf("using classScope %s\n",qPrint(yyextra->classScope));
if (ccd.localDef() && !ccd.localDef()->baseClasses().empty())
{
for (const auto &bcName : ccd.localDef()->baseClasses())
@@ -1458,11 +1459,11 @@ static void generateFunctionLink(yyscan_t yyscanner,
static bool findMemberLink(yyscan_t yyscanner,
CodeOutputInterface &ol,
Definition *sym,
- const char *symName)
+ const QCString &symName)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
//printf("sym %s outerScope=%s equal=%d\n",
- // sym->name().data(),sym->getOuterScope()->name().data(),
+ // qPrint(sym->name()),qPrint(sym->getOuterScope()->name()),
// sym->getOuterScope()==yyextra->currentDefinition);
if (sym->getOuterScope() &&
@@ -1479,7 +1480,7 @@ static bool findMemberLink(yyscan_t yyscanner,
addDocCrossReference(toMemberDefMutable(yyextra->currentMemberDef),toMemberDefMutable(toMemberDef(sym)));
}
}
- DBG_CTX((stderr,"cd=%s thisCd=%s\n",cd?cd->name().data():"<none>",thisCd?thisCd->name().data():"<none>"));
+ DBG_CTX((stderr,"cd=%s thisCd=%s\n",cd?qPrint(cd->name()):"<none>",thisCd?qPrint(thisCd->name()):"<none>"));
// TODO: find the nearest base class in case cd is a base class of
// thisCd
@@ -1496,13 +1497,13 @@ static bool findMemberLink(yyscan_t yyscanner,
static void findMemberLink(yyscan_t yyscanner,
CodeOutputInterface &ol,
- const char *symName)
+ const QCString &symName)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
//printf("Member reference: %s scope=%s member=%s\n",
// yytext,
- // yyextra->currentDefinition?yyextra->currentDefinition->name().data():"<none>",
- // yyextra->currentMemberDef?yyextra->currentMemberDef->name().data():"<none>"
+ // yyextra->currentDefinition?qPrint(yyextra->currentDefinition->name()):"<none>",
+ // yyextra->currentMemberDef?qPrint(yyextra->currentMemberDef->name()):"<none>"
// );
if (yyextra->currentDefinition)
{
@@ -1552,11 +1553,11 @@ void PythonCodeParser::resetCodeParserState()
}
void PythonCodeParser::parseCode(CodeOutputInterface &codeOutIntf,
- const char *scopeName,
+ const QCString &scopeName,
const QCString &input,
SrcLangExt /*lang*/,
bool isExampleBlock,
- const char *exampleName,
+ const QCString &exampleName,
FileDef *fileDef,
int startLine,
int endLine,
@@ -1573,9 +1574,9 @@ void PythonCodeParser::parseCode(CodeOutputInterface &codeOutIntf,
//printf("***parseCode()\n");
if (input.isEmpty()) return;
- printlex(yy_flex_debug, TRUE, __FILE__, fileDef ? fileDef->fileName().data(): NULL);
+ printlex(yy_flex_debug, TRUE, __FILE__, fileDef ? qPrint(fileDef->fileName()): NULL);
yyextra->code = &codeOutIntf;
- yyextra->inputString = input;
+ yyextra->inputString = input.data();
yyextra->inputPosition = 0;
yyextra->currentFontClass = 0;
yyextra->needsTermination = FALSE;
@@ -1600,7 +1601,7 @@ void PythonCodeParser::parseCode(CodeOutputInterface &codeOutIntf,
if (yyextra->exampleBlock && fileDef==0)
{
// create a dummy filedef for the example
- yyextra->sourceFileDef = createFileDef("",(exampleName?exampleName:"generated"));
+ yyextra->sourceFileDef = createFileDef("",(!exampleName.isEmpty()?qPrint(exampleName):"generated"));
cleanupSourceDef = TRUE;
}
if (yyextra->sourceFileDef)
@@ -1633,7 +1634,7 @@ void PythonCodeParser::parseCode(CodeOutputInterface &codeOutIntf,
}
// write the tooltips
TooltipManager::instance().writeTooltips(codeOutIntf);
- printlex(yy_flex_debug, FALSE, __FILE__, fileDef ? fileDef->fileName().data(): NULL);
+ printlex(yy_flex_debug, FALSE, __FILE__, fileDef ? qPrint(fileDef->fileName()): NULL);
}
#if USE_STATE2STRING
diff --git a/src/pyscanner.h b/src/pyscanner.h
index 4f0ae38..dc7ea1c 100644
--- a/src/pyscanner.h
+++ b/src/pyscanner.h
@@ -36,12 +36,12 @@ class PythonOutlineParser : public OutlineParserInterface
public:
PythonOutlineParser();
virtual ~PythonOutlineParser();
- void parseInput(const char * fileName,
+ void parseInput(const QCString &fileName,
const char *fileBuf,
const std::shared_ptr<Entry> &root,
ClangTUParser *clangParser);
bool needsPreprocessing(const QCString &extension) const;
- void parsePrototype(const char *text);
+ void parsePrototype(const QCString &text);
private:
struct Private;
std::unique_ptr<Private> p;
diff --git a/src/pyscanner.l b/src/pyscanner.l
index 403b400..47e00a3 100644
--- a/src/pyscanner.l
+++ b/src/pyscanner.l
@@ -37,8 +37,6 @@
#include <assert.h>
#include <ctype.h>
-#include <qfileinfo.h>
-
#include "pyscanner.h"
#include "entry.h"
#include "message.h"
@@ -50,6 +48,7 @@
#include "commentscan.h"
#include "arguments.h"
#include "markdown.h"
+#include "fileinfo.h"
// Toggle for some debugging info
//#define DBG_CTX(x) fprintf x
@@ -87,7 +86,7 @@ struct pyscannerYY_state
bool doubleQuote = FALSE;
bool specialBlock = FALSE;
int stringContext = 0;
- QGString * copyString = 0;
+ TextStream * copyString = 0;
int indent = 0;
int curIndent = 0;
int commentIndent = 0;
@@ -98,7 +97,7 @@ struct pyscannerYY_state
int atomCount = 0;
QCString moduleScope;
QCString packageName;
- QGString defVal;
+ TextStream defVal;
int braceCount = 0;
bool lexInit = FALSE;
bool packageCommentAllowed = FALSE;
@@ -107,6 +106,7 @@ struct pyscannerYY_state
QCString argType;
bool funcParamsEnd = FALSE;
std::vector<QCString> decorators;
+ QCString programStr;
};
//-----------------------------------------------------------------------------
@@ -134,7 +134,7 @@ static void initTriSingleQuoteBlock(yyscan_t yyscanner);
static void initSpecialBlock(yyscan_t yyscanner);
static void searchFoundDef(yyscan_t yyscanner);
static void searchFoundClass(yyscan_t yyscanner);
-static QCString findPackageScope(yyscan_t yyscanner,const char *fileName);
+static QCString findPackageScope(yyscan_t yyscanner,const QCString &fileName);
static yy_size_t yyread(yyscan_t yyscanner,char *buf,yy_size_t max_size);
@@ -331,6 +331,7 @@ STARTDOCSYMS "##"
yyextra->stat=TRUE;
}
"@"{SCOPE}{CALL}? { // decorator
+ lineCount(yyscanner);
}
{SCRIPTCOMMENT} { // Unix type script comment
if (yyextra->yyLineNr != 1) REJECT;
@@ -448,7 +449,7 @@ STARTDOCSYMS "##"
{IDENTIFIER}({B}"."{B}{IDENTIFIER})* {
yyextra->current->name=removeRedundantWhiteSpace(substitute(yytext,".","::"));
yyextra->current->fileName = yyextra->yyFileName;
- //printf("Adding using declaration: found:%s:%d name=%s\n",yyextra->yyFileName.data(),yyextra->yyLineNr,yyextra->current->name.data());
+ //printf("Adding using declaration: found:%s:%d name=%s\n",qPrint(yyextra->yyFileName),yyextra->yyLineNr,qPrint(yyextra->current->name));
yyextra->current->section=Entry::USINGDECL_SEC;
yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
initEntry(yyscanner);
@@ -468,7 +469,7 @@ STARTDOCSYMS "##"
<SearchMemVars>{
"self."{IDENTIFIER}/{B}"=" {
- DBG_CTX((stderr,"Found instance method variable %s in %s at %d\n",&yytext[5],yyextra->current_root->name.data(),yyextra->yyLineNr));
+ DBG_CTX((stderr,"Found instance method variable %s in %s at %d\n",&yytext[5],qPrint(yyextra->current_root->name.data(),yyextra->yyLineNr)));
yyextra->current->name=&yytext[5];
yyextra->current->section=Entry::VARIABLE_SEC;
yyextra->current->fileName = yyextra->yyFileName;
@@ -482,7 +483,7 @@ STARTDOCSYMS "##"
newEntry(yyscanner);
}
"cls."{IDENTIFIER}/{B}"=" {
- DBG_CTX((stderr,"Found class method variable %s in %s at %d\n",&yytext[4],yyextra->current_root->name.data(),yyextra->yyLineNr));
+ DBG_CTX((stderr,"Found class method variable %s in %s at %d\n",&yytext[4],qPrint(yyextra->current_root->name),yyextra->yyLineNr));
yyextra->current->name=&yytext[4];
yyextra->current->section=Entry::VARIABLE_SEC;
yyextra->current->fileName = yyextra->yyFileName;
@@ -544,7 +545,7 @@ STARTDOCSYMS "##"
else
{
incLineNr(yyscanner);
- yyextra->current->program+=yytext;
+ yyextra->current->program << yytext;
}
}
\n{B}/"##" {
@@ -562,7 +563,7 @@ STARTDOCSYMS "##"
else
{
incLineNr(yyscanner);
- yyextra->current->program+=yytext;
+ yyextra->current->program << yytext;
}
}
<<EOF>> {
@@ -570,10 +571,10 @@ STARTDOCSYMS "##"
yyterminate();
}
^{BB}/\n { // skip empty line
- yyextra->current->program+=yytext;
+ yyextra->current->program << yytext;
}
^{BB} { // something at indent >0
- yyextra->current->program+=yytext;
+ yyextra->current->program << yytext;
yyextra->curIndent = computeIndent(yytext);
if (yyextra->curIndent<=yyextra->indent)
// jumped out of the function
@@ -583,46 +584,46 @@ STARTDOCSYMS "##"
}
}
"'" { // start of a single quoted string
- yyextra->current->program+=yytext;
+ yyextra->current->program << yytext;
yyextra->stringContext=YY_START;
yyextra->specialBlock = FALSE;
yyextra->copyString=&yyextra->current->program;
BEGIN( SingleQuoteString );
}
"\"" { // start of a double quoted string
- yyextra->current->program+=yytext;
+ yyextra->current->program << yytext;
yyextra->stringContext=YY_START;
yyextra->specialBlock = FALSE;
yyextra->copyString=&yyextra->current->program;
BEGIN( DoubleQuoteString );
}
[^ \t\n#'".]+ { // non-special stuff
- yyextra->current->program+=yytext;
+ yyextra->current->program << yytext;
yyextra->specialBlock = FALSE;
}
^{POUNDCOMMENT} { // normal comment
- yyextra->current->program+=yytext;
+ yyextra->current->program << yytext;
}
"#".* { // comment half way
- yyextra->current->program+=yytext;
+ yyextra->current->program << yytext;
}
{NEWLINE} {
incLineNr(yyscanner);
- yyextra->current->program+=yytext;
+ yyextra->current->program << yytext;
}
. { // any character
- yyextra->current->program+=*yytext;
+ yyextra->current->program << *yytext;
yyextra->specialBlock = FALSE;
}
{TRIDOUBLEQUOTE} { // start of a comment block
- yyextra->current->program+=yytext;
+ yyextra->current->program << yytext;
initTriDoubleQuoteBlock(yyscanner);
BEGIN(TripleComment);
}
{TRISINGLEQUOTE} { // start of a comment block
- yyextra->current->program+=yytext;
+ yyextra->current->program << yytext;
initTriSingleQuoteBlock(yyscanner);
BEGIN(TripleComment);
}
@@ -653,7 +654,7 @@ STARTDOCSYMS "##"
}
"->" {
- yyextra->defVal.resize(0);
+ yyextra->defVal.str(std::string());
yyextra->braceCount = 0;
BEGIN(FunctionTypeAnnotation);
}
@@ -690,7 +691,7 @@ STARTDOCSYMS "##"
"=" { // default value
// TODO: this rule is too simple, need to be able to
// match things like =")" as well!
- yyextra->defVal.resize(0);
+ yyextra->defVal.str(std::string());
yyextra->braceCount = 0;
BEGIN(FunctionParamDefVal);
}
@@ -699,7 +700,7 @@ STARTDOCSYMS "##"
BEGIN(FunctionDec);
}
":"{B} {
- yyextra->defVal.resize(0);
+ yyextra->defVal.str(std::string());
yyextra->braceCount = 0;
BEGIN(FunctionAnnotation);
}
@@ -715,42 +716,42 @@ STARTDOCSYMS "##"
"[" |
"(" {
++yyextra->braceCount;
- yyextra->defVal+=*yytext;
+ yyextra->defVal << *yytext;
}
"}" |
"]" |
")" {
--yyextra->braceCount;
- yyextra->defVal+=*yytext;
+ yyextra->defVal << *yytext;
}
":" {
if (yyextra->braceCount == 0)
{
- yyextra->current->type = yyextra->defVal.data();
+ yyextra->current->type = yyextra->defVal.str();
unput(*yytext);
BEGIN(FunctionDec);
}
else
- yyextra->defVal+=*yytext;
+ yyextra->defVal << *yytext;
}
"'" {
- yyextra->defVal+=*yytext;
+ yyextra->defVal << *yytext;
yyextra->copyString=&yyextra->defVal;
yyextra->stringContext=FunctionTypeAnnotation;
BEGIN(SingleQuoteString);
}
"\"" {
- yyextra->defVal+=*yytext;
+ yyextra->defVal << *yytext;
yyextra->copyString=&yyextra->defVal;
yyextra->stringContext=FunctionTypeAnnotation;
BEGIN(DoubleQuoteString);
}
\n {
- yyextra->defVal+=*yytext;
+ yyextra->defVal << *yytext;
incLineNr(yyscanner);
}
. {
- yyextra->defVal+=*yytext;
+ yyextra->defVal << *yytext;
}
}
@@ -759,12 +760,12 @@ STARTDOCSYMS "##"
"[" |
"(" {
++yyextra->braceCount;
- yyextra->defVal+=*yytext;
+ yyextra->defVal << *yytext;
}
"}" |
"]" {
--yyextra->braceCount;
- yyextra->defVal+=*yytext;
+ yyextra->defVal << *yytext;
}
")" |
"=" |
@@ -772,7 +773,7 @@ STARTDOCSYMS "##"
if (yyextra->braceCount == 0)
{
if (!yyextra->current->argList.empty())
- yyextra->current->argList.back().type += yyextra->defVal;
+ yyextra->current->argList.back().type += yyextra->defVal.str();
if (*yytext != ',')
unput(*yytext);
BEGIN(FunctionParams);
@@ -781,27 +782,27 @@ STARTDOCSYMS "##"
{
if (*yytext == ')')
--yyextra->braceCount;
- yyextra->defVal += *yytext;
+ yyextra->defVal << *yytext;
}
}
"'" {
- yyextra->defVal+=*yytext;
+ yyextra->defVal << *yytext;
yyextra->copyString=&yyextra->defVal;
yyextra->stringContext=FunctionAnnotation;
BEGIN(SingleQuoteString);
}
"\"" {
- yyextra->defVal+=*yytext;
+ yyextra->defVal << *yytext;
yyextra->copyString=&yyextra->defVal;
yyextra->stringContext=FunctionAnnotation;
BEGIN(DoubleQuoteString);
}
\n {
- yyextra->defVal+=*yytext;
+ yyextra->defVal << *yytext;
incLineNr(yyscanner);
}
. {
- yyextra->defVal+=*yytext;
+ yyextra->defVal << *yytext;
}
}
@@ -810,19 +811,19 @@ STARTDOCSYMS "##"
"[" |
"(" { // internal opening brace, assumption is that we have correct code so braces do match
++yyextra->braceCount;
- yyextra->defVal+=*yytext;
+ yyextra->defVal << *yytext;
}
"}" |
"]" {
--yyextra->braceCount;
- yyextra->defVal+=*yytext;
+ yyextra->defVal << *yytext;
}
")" |
"," {
if (yyextra->braceCount == 0)
{
if (!yyextra->current->argList.empty())
- yyextra->current->argList.back().defval=QCString(yyextra->defVal).stripWhiteSpace();
+ yyextra->current->argList.back().defval=QCString(yyextra->defVal.str()).stripWhiteSpace();
if (*yytext == ')')
unput(*yytext);
BEGIN(FunctionParams);
@@ -831,28 +832,28 @@ STARTDOCSYMS "##"
{
if (*yytext == ')')
--yyextra->braceCount;
- yyextra->defVal += *yytext;
+ yyextra->defVal << *yytext;
}
}
"'" {
- yyextra->defVal+=*yytext;
+ yyextra->defVal << *yytext;
yyextra->copyString=&yyextra->defVal;
yyextra->stringContext=FunctionParamDefVal;
BEGIN( SingleQuoteString );
}
"\"" {
- yyextra->defVal+=*yytext;
+ yyextra->defVal << *yytext;
yyextra->copyString=&yyextra->defVal;
yyextra->stringContext=FunctionParamDefVal;
BEGIN( DoubleQuoteString );
}
\n {
- yyextra->defVal+=*yytext;
+ yyextra->defVal << *yytext;
incLineNr(yyscanner);
}
. {
- yyextra->defVal+=*yytext;
+ yyextra->defVal << *yytext;
}
}
@@ -873,7 +874,7 @@ STARTDOCSYMS "##"
BEGIN(Search);
}
^{BB}/\n { // skip empty line
- yyextra->current->program+=yytext;
+ yyextra->current->program << yytext;
}
<<EOF>> {
endOfDef(yyscanner);
@@ -894,49 +895,49 @@ STARTDOCSYMS "##"
}
else
{
- yyextra->current->program+=yytext;
+ yyextra->current->program << yytext;
}
}
"'" { // start of a single quoted string
- yyextra->current->program+=*yytext;
+ yyextra->current->program << *yytext;
yyextra->stringContext=YY_START;
yyextra->specialBlock = FALSE;
yyextra->copyString=&yyextra->current->program;
BEGIN( SingleQuoteString );
}
"\"" { // start of a double quoted string
- yyextra->current->program+=*yytext;
+ yyextra->current->program << *yytext;
yyextra->stringContext=YY_START;
yyextra->specialBlock = FALSE;
yyextra->copyString=&yyextra->current->program;
BEGIN( DoubleQuoteString );
}
[^ \t\n#'"]+ { // non-special stuff
- yyextra->current->program+=yytext;
+ yyextra->current->program << yytext;
yyextra->specialBlock = FALSE;
//yyextra->hideClassDocs = FALSE;
}
{NEWLINE} {
- yyextra->current->program+=*yytext;
+ yyextra->current->program << *yytext;
incLineNr(yyscanner);
}
{POUNDCOMMENT} { // normal comment
- yyextra->current->program+=yytext;
+ yyextra->current->program << yytext;
}
. { // any character
yyextra->specialBlock = FALSE;
- yyextra->current->program+=*yytext;
+ yyextra->current->program << *yytext;
}
{TRIDOUBLEQUOTE} { // start of a comment block
//if (!yyextra->hideClassDocs)
- yyextra->current->program+=yytext;
+ yyextra->current->program << yytext;
initTriDoubleQuoteBlock(yyscanner);
BEGIN(TripleComment);
}
{TRISINGLEQUOTE} { // start of a comment block
//if (!yyextra->hideClassDocs)
- yyextra->current->program+=yytext;
+ yyextra->current->program << yytext;
initTriSingleQuoteBlock(yyscanner);
BEGIN(TripleComment);
}
@@ -954,7 +955,7 @@ STARTDOCSYMS "##"
// prepend scope in case of nested classes
if (yyextra->current_root->section&Entry::SCOPE_MASK)
{
- //printf("*** Prepending scope %s to class %s\n",yyextra->current_root->name.data(),yyextra->current->name.data());
+ //printf("*** Prepending scope %s to class %s\n",qPrint(yyextra->current_root->name),qPrint(yyextra->current->name));
yyextra->current->name.prepend(yyextra->current_root->name+"::");
}
@@ -975,7 +976,7 @@ STARTDOCSYMS "##"
":" { // begin of the class definition
yyextra->specialBlock = TRUE; // expecting a docstring
yyextra->current->bodyLine = yyextra->yyLineNr;
- yyextra->current->program.resize(0);
+ yyextra->current->program.str(std::string());
BEGIN(ClassCaptureIndent);
}
@@ -1012,17 +1013,17 @@ STARTDOCSYMS "##"
"\n"|({BB}"\n") {
// Blankline - ignore, keep looking for indentation.
lineCount(yyscanner);
- yyextra->current->program+=yytext;
+ yyextra->current->program << yytext;
}
{TRIDOUBLEQUOTE} { // start of a comment block
initTriDoubleQuoteBlock(yyscanner);
- yyextra->current->program+=yytext;
+ yyextra->current->program << yytext;
BEGIN(TripleComment);
}
{TRISINGLEQUOTE} { // start of a comment block
initTriSingleQuoteBlock(yyscanner);
- yyextra->current->program+=yytext;
+ yyextra->current->program << yytext;
BEGIN(TripleComment);
}
{STARTDOCSYMS}[#]* { // start of a special comment
@@ -1032,12 +1033,12 @@ STARTDOCSYMS "##"
{POUNDCOMMENT} { // ignore comment with just one #
}
^{BB} {
- yyextra->current->program+=yytext;
+ yyextra->current->program << yytext;
//yyextra->current->startLine = yyextra->yyLineNr;
yyextra->curIndent=computeIndent(yytext);
yyextra->bodyEntry = yyextra->current;
DBG_CTX((stderr,"setting indent %d\n",yyextra->curIndent));
- //printf("yyextra->current->program=[%s]\n",yyextra->current->program.data());
+ //printf("yyextra->current->program=[%s]\n",qPrint(yyextra->current->program));
//yyextra->hideClassDocs = TRUE;
BEGIN(ClassBody);
}
@@ -1046,7 +1047,7 @@ STARTDOCSYMS "##"
// Just pushback an empty class, and
// resume parsing the body.
newEntry(yyscanner);
- yyextra->current->program+=yytext;
+ yyextra->current->program << yytext;
// printf("Failed to find indent - skipping!");
BEGIN( Search );
@@ -1058,41 +1059,41 @@ STARTDOCSYMS "##"
"=" { // the assignment operator
//printf("====== VariableDec at line %d\n",yyextra->yyLineNr);
yyextra->start_init = TRUE;
- yyextra->current->initializer = yytext;
- yyextra->current->initializer += " ";
+ yyextra->current->initializer.str(yytext);
+ yyextra->current->initializer << " ";
}
{B} { // spaces
- yyextra->current->initializer += yytext;
+ yyextra->current->initializer << yytext;
}
{INTNUMBER} { // integer value
if (yyextra->current-> type.isEmpty()) yyextra->current->type = "int";
- yyextra->current->initializer += yytext;
+ yyextra->current->initializer << yytext;
}
{FLOATNUMBER} { // floating point value
if (yyextra->current->type.isEmpty()) yyextra->current->type = "float";
- yyextra->current->initializer += yytext;
+ yyextra->current->initializer << yytext;
}
{BOOL} { // boolean value
if (yyextra->current->type.isEmpty()) yyextra->current->type = "bool";
- yyextra->current->initializer += yytext;
+ yyextra->current->initializer << yytext;
}
{STRINGPREFIX}?"'" { // string
if (yyextra->current->type.isEmpty()) yyextra->current->type = "string";
- yyextra->current->initializer += yytext;
+ yyextra->current->initializer << yytext;
yyextra->copyString=&yyextra->current->initializer;
yyextra->stringContext=VariableDec;
BEGIN( SingleQuoteString );
}
{STRINGPREFIX}?"\"" { // string
if (yyextra->current->type.isEmpty()) yyextra->current->type = "string";
- yyextra->current->initializer += yytext;
+ yyextra->current->initializer << yytext;
yyextra->copyString=&yyextra->current->initializer;
yyextra->stringContext=VariableDec;
BEGIN( DoubleQuoteString );
}
{TRIDOUBLEQUOTE} { // start of a comment block
if (yyextra->current->type.isEmpty()) yyextra->current->type = "string";
- yyextra->current->initializer += yytext;
+ yyextra->current->initializer << yytext;
yyextra->doubleQuote=TRUE;
yyextra->copyString=&yyextra->current->initializer;
yyextra->stringContext=VariableDec;
@@ -1101,7 +1102,7 @@ STARTDOCSYMS "##"
{TRISINGLEQUOTE} { // start of a comment block
if (yyextra->current->type.isEmpty()) yyextra->current->type = "string";
- yyextra->current->initializer += yytext;
+ yyextra->current->initializer << yytext;
yyextra->doubleQuote=FALSE;
yyextra->copyString=&yyextra->current->initializer;
yyextra->stringContext=VariableDec;
@@ -1112,7 +1113,7 @@ STARTDOCSYMS "##"
{
yyextra->current->type = "tuple";
}
- yyextra->current->initializer+=*yytext;
+ yyextra->current->initializer << *yytext;
yyextra->atomStart='(';
yyextra->atomEnd=')';
yyextra->atomCount=1;
@@ -1120,7 +1121,7 @@ STARTDOCSYMS "##"
}
"[" { // list
if (yyextra->start_init) yyextra->current->type = "list";
- yyextra->current->initializer+=*yytext;
+ yyextra->current->initializer << *yytext;
yyextra->atomStart='[';
yyextra->atomEnd=']';
yyextra->atomCount=1;
@@ -1128,7 +1129,7 @@ STARTDOCSYMS "##"
}
"{" { // dictionary
if (yyextra->start_init) yyextra->current->type = "dictionary";
- yyextra->current->initializer+=*yytext;
+ yyextra->current->initializer << *yytext;
yyextra->atomStart='{';
yyextra->atomEnd='}';
yyextra->atomCount=1;
@@ -1151,11 +1152,11 @@ STARTDOCSYMS "##"
}
}
yyextra->start_init = FALSE;
- yyextra->current->initializer+=yytext;
+ yyextra->current->initializer << yytext;
}
. {
yyextra->start_init = FALSE;
- yyextra->current->initializer+=*yytext;
+ yyextra->current->initializer << *yytext;
}
\n {
unput('\n');
@@ -1165,14 +1166,14 @@ STARTDOCSYMS "##"
<VariableAtom>{
[\(\[\{] {
- yyextra->current->initializer+=*yytext;
+ yyextra->current->initializer << *yytext;
if (yyextra->atomStart==*yytext)
{
yyextra->atomCount++;
}
}
[\)\]\}] {
- yyextra->current->initializer+=*yytext;
+ yyextra->current->initializer << *yytext;
if (yyextra->atomEnd==*yytext)
{
yyextra->atomCount--;
@@ -1185,37 +1186,37 @@ STARTDOCSYMS "##"
}
{TRIDOUBLEQUOTE} { // start of a comment block
yyextra->specialBlock = FALSE;
- yyextra->current->program+=yytext;
+ yyextra->current->program << yytext;
initTriDoubleQuoteBlock(yyscanner);
BEGIN(TripleComment);
}
{TRISINGLEQUOTE} { // start of a comment block
yyextra->specialBlock = FALSE;
- yyextra->current->program+=yytext;
+ yyextra->current->program << yytext;
initTriSingleQuoteBlock(yyscanner);
BEGIN(TripleComment);
}
"'" {
yyextra->stringContext=YY_START;
- yyextra->current->initializer+="'";
+ yyextra->current->initializer << "'";
yyextra->copyString=&yyextra->current->initializer;
BEGIN( SingleQuoteString );
}
"\"" {
yyextra->stringContext=YY_START;
- yyextra->current->initializer+="\"";
+ yyextra->current->initializer << "\"";
yyextra->copyString=&yyextra->current->initializer;
BEGIN( DoubleQuoteString );
}
{IDENTIFIER} {
- yyextra->current->initializer+=yytext;
+ yyextra->current->initializer << yytext;
}
. {
- yyextra->current->initializer+=*yytext;
+ yyextra->current->initializer << *yytext;
}
\n {
- yyextra->current->initializer+=*yytext;
+ yyextra->current->initializer << *yytext;
incLineNr(yyscanner);
}
@@ -1275,8 +1276,8 @@ STARTDOCSYMS "##"
if ((yyextra->docBlockContext==ClassBody /*&& !yyextra->hideClassDocs*/) ||
yyextra->docBlockContext==FunctionBody)
{
- yyextra->current->program+=yyextra->docBlock;
- yyextra->current->program+=yytext;
+ yyextra->current->program << yyextra->docBlock;
+ yyextra->current->program << yytext;
}
//if (yyextra->hideClassDocs)
//{
@@ -1381,7 +1382,7 @@ STARTDOCSYMS "##"
<TripleString>{
{ENDTRIDOUBLEQUOTE} |
{ENDTRISINGLEQUOTE} {
- *yyextra->copyString += yytext;
+ *yyextra->copyString << yytext;
if (yyextra->doubleQuote==(yytext[0]=='"'))
{
BEGIN(yyextra->stringContext);
@@ -1391,14 +1392,14 @@ STARTDOCSYMS "##"
({LONGSTRINGBLOCK}) {
lineCount(yyscanner);
- *yyextra->copyString += yytext;
+ *yyextra->copyString << yytext;
}
\n {
incLineNr(yyscanner);
- *yyextra->copyString += yytext;
+ *yyextra->copyString << yytext;
}
. {
- *yyextra->copyString += *yytext;
+ *yyextra->copyString << *yytext;
}
}
@@ -1526,9 +1527,9 @@ static QCString findPackageScopeFromPath(yyscan_t yyscanner,const QCString &path
auto it = yyextra->packageNameCache.find(path.str());
if (it!=yyextra->packageNameCache.end())
{
- return it->second;
+ return QCString(it->second);
}
- QFileInfo pf(path+"/__init__.py"); // found package initialization file
+ FileInfo pf(path.str()+"/__init__.py"); // found package initialization file
if (pf.exists())
{
int i=path.findRev('/');
@@ -1546,12 +1547,12 @@ static QCString findPackageScopeFromPath(yyscan_t yyscanner,const QCString &path
}
return "";
}
-
-static QCString findPackageScope(yyscan_t yyscanner,const char *fileName)
+
+static QCString findPackageScope(yyscan_t yyscanner,const QCString &fileName)
{
- if (fileName==0) return "";
- QFileInfo fi(fileName);
- return findPackageScopeFromPath(yyscanner,fi.dirPath(TRUE).data());
+ if (fileName.isEmpty()) return fileName;
+ FileInfo fi(fileName.str());
+ return findPackageScopeFromPath(yyscanner,fi.dirPath(true).c_str());
}
static void addFrom(yyscan_t yyscanner,bool all)
@@ -1560,7 +1561,7 @@ static void addFrom(yyscan_t yyscanner,bool all)
QCString item=all ? yyextra->packageName : yyextra->packageName+"."+yytext;
yyextra->current->name=removeRedundantWhiteSpace(substitute(item,".","::"));
yyextra->current->fileName = yyextra->yyFileName;
- //printf("Adding using declaration: found:%s:%d name=%s\n",yyextra->yyFileName.data(),yyextra->yyLineNr,yyextra->current->name.data());
+ //printf("Adding using declaration: found:%s:%d name=%s\n",qPrint(yyextra->yyFileName),yyextra->yyLineNr,qPrint(yyextra->current->name));
yyextra->current->section=all ? Entry::USINGDIR_SEC : Entry::USINGDECL_SEC;
yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
initEntry(yyscanner);
@@ -1604,7 +1605,7 @@ static void handleCommentBlock(yyscan_t yyscanner,const QCString &doc,bool brief
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
//printf("handleCommentBlock(doc=[%s] brief=%d yyextra->docBlockInBody=%d yyextra->docBlockJavaStyle=%d\n",
- // doc.data(),brief,yyextra->docBlockInBody,yyextra->docBlockJavaStyle);
+ // qPrint(doc),brief,yyextra->docBlockInBody,yyextra->docBlockJavaStyle);
// TODO: Fix me
yyextra->docBlockInBody=FALSE;
@@ -1666,7 +1667,7 @@ static void endOfDef(yyscan_t yyscanner,int correction)
static inline void addToString(yyscan_t yyscanner,const char *s)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
- if (yyextra->copyString) (*yyextra->copyString)+=s;
+ if (yyextra->copyString) (*yyextra->copyString) << s;
}
static void initTriDoubleQuoteBlock(yyscan_t yyscanner)
@@ -1744,16 +1745,17 @@ static void searchFoundClass(yyscan_t yyscanner)
static void parseCompounds(yyscan_t yyscanner,std::shared_ptr<Entry> rt)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
- //printf("parseCompounds(%s)\n",rt->name.data());
+ //printf("parseCompounds(%s)\n",qPrint(rt->name));
for (size_t i=0; i<rt->children().size(); ++i)
{
std::shared_ptr<Entry> ce = rt->children()[i];
- if (!ce->program.isEmpty())
+ if (!ce->program.empty())
{
//fprintf(stderr,"parseCompounds: -- %s (line %d) ---------\n%s\n---------------\n",
- // ce->name.data(), ce->bodyLine, ce->program.data());
+ // qPrint(ce->name), ce->bodyLine, qPrint(ce->program));
// init scanner state
- yyextra->inputString = ce->program;
+ yyextra->programStr = ce->program.str();
+ yyextra->inputString = yyextra->programStr.data();
yyextra->inputPosition = 0;
pyscannerYYrestart( 0, yyscanner );
if (ce->section&Entry::COMPOUND_MASK)
@@ -1765,7 +1767,7 @@ static void parseCompounds(yyscan_t yyscanner,std::shared_ptr<Entry> rt)
{
yyextra->current_root = rt;
//printf("Searching for member variables in %s parent=%s\n",
- // ce->name.data(),ce->parent->name.data());
+ // qPrint(ce->name),qPrint(ce->parent->name));
BEGIN( SearchMemVars );
}
yyextra->yyFileName = ce->fileName;
@@ -1778,7 +1780,9 @@ static void parseCompounds(yyscan_t yyscanner,std::shared_ptr<Entry> rt)
pyscannerYYlex(yyscanner) ;
yyextra->lexInit=TRUE;
- ce->program.resize(0);
+
+ yyextra->programStr.resize(0);
+ ce->program.str(std::string());
yyextra->commentScanner.leaveCompound(yyextra->yyFileName,yyextra->yyLineNr,name);
@@ -1790,11 +1794,13 @@ static void parseCompounds(yyscan_t yyscanner,std::shared_ptr<Entry> rt)
//----------------------------------------------------------------------------
-static void parseMain(yyscan_t yyscanner, const char *fileName,const char *fileBuf,const std::shared_ptr<Entry> &rt)
+static void parseMain(yyscan_t yyscanner, const QCString &fileName,const char *fileBuf,const std::shared_ptr<Entry> &rt)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
initParser(yyscanner);
+ if (fileBuf==0 || fileBuf[0]=='\0') return;
+
yyextra->inputString = fileBuf;
yyextra->inputPosition = 0;
@@ -1805,15 +1811,14 @@ static void parseMain(yyscan_t yyscanner, const char *fileName,const char *fileB
yyextra->current_root = rt;
yyextra->specialBlock = FALSE;
-
yyextra->yyLineNr= 1 ;
yyextra->yyFileName = fileName;
//setContext();
- msg("Parsing file %s...\n",yyextra->yyFileName.data());
+ msg("Parsing file %s...\n",qPrint(yyextra->yyFileName));
- QFileInfo fi(fileName);
+ FileInfo fi(fileName.str());
yyextra->moduleScope = findPackageScope(yyscanner,fileName);
- QCString baseName=fi.baseName().utf8();
+ QCString baseName=fi.baseName();
if (baseName!="__init__") // package initializer file is not a package itself
{
if (!yyextra->moduleScope.isEmpty())
@@ -1849,7 +1854,8 @@ static void parseMain(yyscan_t yyscanner, const char *fileName,const char *fileB
yyextra->commentScanner.leaveFile(yyextra->yyFileName,yyextra->yyLineNr);
- yyextra->current_root->program.resize(0);
+ yyextra->programStr.resize(0);
+ yyextra->current_root->program.str(std::string());
parseCompounds(yyscanner, yyextra->current_root);
}
@@ -1859,7 +1865,7 @@ static void parseMain(yyscan_t yyscanner, const char *fileName,const char *fileB
static void parsePrototype(yyscan_t yyscanner,const QCString &text)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
- //printf("**** parsePrototype(%s) begin\n",text.data());
+ //printf("**** parsePrototype(%s) begin\n",qPrint(text));
if (text.isEmpty())
{
warn(yyextra->yyFileName,yyextra->yyLineNr,"Empty prototype found!");
@@ -1880,7 +1886,7 @@ static void parsePrototype(yyscan_t yyscanner,const QCString &text)
orgInputPosition = yyextra->inputPosition;
// set new string
- yyextra->inputString = text;
+ yyextra->inputString = text.data();
yyextra->inputPosition = 0;
pyscannerYYrestart( 0, yyscanner );
@@ -1927,16 +1933,16 @@ PythonOutlineParser::~PythonOutlineParser()
}
-void PythonOutlineParser::parseInput(const char *fileName,
- const char *fileBuf,
- const std::shared_ptr<Entry> &root,
- ClangTUParser * /*clangParser*/)
+void PythonOutlineParser::parseInput(const QCString &fileName,
+ const char *fileBuf,
+ const std::shared_ptr<Entry> &root,
+ ClangTUParser * /*clangParser*/)
{
struct yyguts_t *yyg = (struct yyguts_t*)p->yyscanner;
yyextra->thisParser = this;
- printlex(yy_flex_debug, TRUE, __FILE__, fileName);
+ printlex(yy_flex_debug, TRUE, __FILE__, qPrint(fileName));
::parseMain(p->yyscanner, fileName,fileBuf,root);
- printlex(yy_flex_debug, FALSE, __FILE__, fileName);
+ printlex(yy_flex_debug, FALSE, __FILE__, qPrint(fileName));
// May print the AST for debugging purposes
// printAST(global_root);
@@ -1947,10 +1953,9 @@ bool PythonOutlineParser::needsPreprocessing(const QCString &) const
return FALSE;
}
-void PythonOutlineParser::parsePrototype(const char *text)
+void PythonOutlineParser::parsePrototype(const QCString &text)
{
::parsePrototype(p->yyscanner,text);
-
}
//----------------------------------------------------------------------------
diff --git a/qtools/qcstring.cpp b/src/qcstring.cpp
index 7e496fd..d95687d 100644
--- a/qtools/qcstring.cpp
+++ b/src/qcstring.cpp
@@ -14,16 +14,12 @@
*/
#include "qcstring.h"
-#include "qgstring.h"
-#include <qstring.h>
#include <limits.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#include <ctype.h>
-//#include <qregexp.h>
-#include <qdatastream.h>
QCString &QCString::sprintf( const char *format, ... )
{
@@ -50,7 +46,7 @@ int QCString::find( char c, int index, bool cs ) const
else
{
pos = data()+index;
- c = tolower((unsigned char)c);
+ c = (char)tolower((unsigned char)c);
while (*pos && tolower((unsigned char)*pos)!=c) pos++;
if (!*pos && c) pos=0; // not found
}
@@ -87,15 +83,6 @@ int QCString::find( const QCString &str, int index, bool cs ) const
return find(str.data(),index,cs);
}
-#if 0
-int QCString::find( const QRegExp &rx, int index ) const
-{
- if ( index < 0 )
- index += length();
- return rx.match( data(), index );
-}
-#endif
-
int QCString::findRev( char c, int index, bool cs) const
{
const char *b = data();
@@ -122,7 +109,7 @@ int QCString::findRev( char c, int index, bool cs) const
}
else
{
- c = tolower((unsigned char)c);
+ c = (char)tolower((unsigned char)c);
while ( pos>=b && tolower((unsigned char)*pos)!=c) pos--;
}
return pos>=b ? (int)(pos - b) : -1;
@@ -148,22 +135,6 @@ int QCString::findRev( const char *str, int index, bool cs) const
return -1;
}
-#if 0
-int QCString::findRev( const QRegExp &rx, int index ) const
-{
- if ( index < 0 ) // neg index ==> start from end
- index += length();
- if ( (uint)index > length() ) // bad index
- return -1;
- while( index >= 0 ) {
- if ( rx.match( data(), index ) == index )
- return index;
- index--;
- }
- return -1;
-}
-#endif
-
int QCString::contains( char c, bool cs ) const
{
if (length()==0) return 0;
@@ -175,7 +146,7 @@ int QCString::contains( char c, bool cs ) const
}
else
{
- c = tolower((unsigned char)c);
+ c = (char)tolower((unsigned char)c);
while (*pos)
{
if (tolower((unsigned char)*pos)==c) count++;
@@ -206,25 +177,6 @@ int QCString::contains( const char *str, bool cs ) const
return count;
}
-#if 0
-int QCString::contains( const QRegExp &rx ) const
-{
- if ( isEmpty() )
- return rx.match( data() ) < 0 ? 0 : 1;
- int count = 0;
- int index = -1;
- int len = length();
- while ( index < len-1 ) { // count overlapping matches
- index = rx.match( data(), index+1 );
- if ( index < 0 )
- break;
- count++;
- }
- return count;
-}
-#endif
-
-
QCString QCString::simplifyWhiteSpace() const
{
if ( isEmpty() ) // nothing to do
@@ -236,9 +188,9 @@ QCString QCString::simplifyWhiteSpace() const
char *first = to;
while ( TRUE )
{
- while ( *from && isspace((uchar) *from) )
+ while ( *from && qisspace(*from) )
from++;
- while ( *from && !isspace((uchar)*from) )
+ while ( *from && !qisspace(*from) )
*to++ = *from++;
if ( *from )
*to++ = 0x20; // ' '
@@ -259,29 +211,6 @@ QCString &QCString::replace( uint index, uint len, const char *s)
return *this;
}
-#if 0
-QCString &QCString::replace( const QRegExp &rx, const char *str )
-{
- if ( isEmpty() )
- return *this;
- int index = 0;
- int slen = qstrlen(str);
- int len;
- while ( index < (int)length() ) {
- index = rx.match( data(), index, &len, FALSE );
- if ( index >= 0 ) {
- replace( index, len, str );
- index += slen;
- if ( !len )
- break; // Avoid infinite loop on 0-length matches, e.g. [a-z]*
- }
- else
- break;
- }
- return *this;
-}
-#endif
-
static bool ok_in_base( char c, int base )
{
if ( base <= 10 )
@@ -333,7 +262,7 @@ long QCString::toLong(bool *ok,int base) const
int neg = 0;
if ( !p )
goto bye;
- while ( l && isspace(*p) ) // skip leading space
+ while ( l && qisspace(*p) ) // skip leading space
l--,p++;
if ( l && *p == '-' ) {
l--;
@@ -365,7 +294,7 @@ long QCString::toLong(bool *ok,int base) const
}
if ( neg )
val = -val;
- while ( l && isspace(*p) ) // skip trailing space
+ while ( l && qisspace(*p) ) // skip trailing space
l--,p++;
if ( !l )
is_ok = TRUE;
@@ -384,7 +313,7 @@ ulong QCString::toULong(bool *ok,int base) const
bool is_ok = FALSE;
if ( !p )
goto bye;
- while ( l && isspace(*p) ) // skip leading space
+ while ( l && qisspace(*p) ) // skip leading space
l--,p++;
if ( *p == '+' )
l--,p++;
@@ -409,7 +338,7 @@ ulong QCString::toULong(bool *ok,int base) const
p++;
}
- while ( l && isspace(*p) ) // skip trailing space
+ while ( l && qisspace(*p) ) // skip trailing space
l--,p++;
if ( !l )
is_ok = TRUE;
@@ -428,7 +357,7 @@ uint64 QCString::toUInt64(bool *ok,int base) const
bool is_ok = FALSE;
if ( !p )
goto bye;
- while ( l && isspace(*p) ) // skip leading space
+ while ( l && qisspace(*p) ) // skip leading space
l--,p++;
if ( *p == '+' )
l--,p++;
@@ -453,7 +382,7 @@ uint64 QCString::toUInt64(bool *ok,int base) const
p++;
}
- while ( l && isspace(*p) ) // skip trailing space
+ while ( l && qisspace(*p) ) // skip trailing space
l--,p++;
if ( !l )
is_ok = TRUE;
@@ -488,7 +417,6 @@ char *qstrdup( const char *str )
if ( !str )
return 0;
char *dst = new char[qstrlen(str)+1];
- CHECK_PTR( dst );
return strcpy( dst, str );
}
@@ -510,7 +438,7 @@ int qstricmp( const char *str1, const char *str2 )
uchar c;
if ( !s1 || !s2 )
return s1 == s2 ? 0 : (int)(s2 - s1);
- for ( ; !(res = (c=tolower(*s1)) - tolower(*s2)); s1++, s2++ )
+ for ( ; !(res = (c=(char)tolower(*s1)) - tolower(*s2)); s1++, s2++ )
if ( !c ) // strings are equal
break;
return res;
@@ -525,7 +453,7 @@ int qstrnicmp( const char *str1, const char *str2, uint len )
if ( !s1 || !s2 )
return (int)(s2 - s1);
for ( ; len--; s1++, s2++ ) {
- if ( (res = (c=tolower(*s1)) - tolower(*s2)) )
+ if ( (res = (c=(char)tolower(*s1)) - tolower(*s2)) )
return res;
if ( !c ) // strings are equal
break;
@@ -533,68 +461,6 @@ int qstrnicmp( const char *str1, const char *str2, uint len )
return 0;
}
-#ifndef QT_NO_DATASTREAM
-
-QDataStream &operator<<( QDataStream &s, const QByteArray &a )
-{
- return s.writeBytes( a.data(), a.size() );
-}
-
-QDataStream &operator>>( QDataStream &s, QByteArray &a )
-{
- Q_UINT32 len;
- s >> len; // read size of array
- if ( len == 0 || s.eof() ) { // end of file reached
- a.resize( 0 );
- return s;
- }
- if ( !a.resize( (uint)len ) ) { // resize array
-#if defined(CHECK_NULL)
- qWarning( "QDataStream: Not enough memory to read QByteArray" );
-#endif
- len = 0;
- }
- if ( len > 0 ) // not null array
- s.readRawBytes( a.data(), (uint)len );
- return s;
-}
-
-QDataStream &operator<<( QDataStream &s, const QCString &str )
-{
- return s.writeBytes( str.data(), str.size() );
-}
-
-QDataStream &operator>>( QDataStream &s, QCString &str )
-{
- Q_UINT32 len;
- s >> len; // read size of string
- if ( len == 0 || s.eof() ) { // end of file reached
- str.resize( 0 );
- return s;
- }
- if ( !str.resize( (uint)len )) {// resize string
-#if defined(CHECK_NULL)
- qWarning( "QDataStream: Not enough memory to read QCString" );
-#endif
- len = 0;
- }
- if ( len > 0 ) // not null array
- s.readRawBytes( str.rawData(), (uint)len );
- return s;
-}
-
-#endif //QT_NO_DATASTREAM
-
-inline QCString operator+( const QCString &s1, const QGString &s2 )
-{
- return s1.str()+s2.data();
-}
-
-inline QCString operator+( const QGString &s1, const QCString &s2 )
-{
- return s1.data()+s2.str();
-}
-
/// substitute all occurrences of \a src in \a s by \a dst
QCString substitute(const QCString &s,const QCString &src,const QCString &dst)
{
@@ -606,7 +472,7 @@ QCString substitute(const QCString &s,const QCString &src,const QCString &dst)
if (srcLen!=dstLen)
{
int count;
- for (count=0, p=s.data(); (q=strstr(p,src))!=0; p=q+srcLen) count++;
+ for (count=0, p=s.data(); (q=strstr(p,src.data()))!=0; p=q+srcLen) count++;
resLen = s.length()+count*(dstLen-srcLen);
}
else // result has same size as s
@@ -615,13 +481,13 @@ QCString substitute(const QCString &s,const QCString &src,const QCString &dst)
}
QCString result(resLen+1);
char *r;
- for (r=result.rawData(), p=s; (q=strstr(p,src))!=0; p=q+srcLen)
+ for (r=result.rawData(), p=s.data(); (q=strstr(p,src.data()))!=0; p=q+srcLen)
{
int l = (int)(q-p);
memcpy(r,p,l);
r+=l;
- if (dst) memcpy(r,dst,dstLen);
+ if (dstLen>0) memcpy(r,dst.data(),dstLen);
r+=dstLen;
}
if (r)
@@ -647,7 +513,7 @@ QCString substitute(const QCString &s,const QCString &src,const QCString &dst,in
if (srcLen!=dstLen)
{
int count;
- for (count=0, p=s.data(); (q=strstr(p,src))!=0; p=q+srcLen) count++;
+ for (count=0, p=s.data(); (q=strstr(p,src.data()))!=0; p=q+srcLen) count++;
resLen = s.length()+count*(dstLen-srcLen);
}
else // result has same size as s
@@ -656,13 +522,13 @@ QCString substitute(const QCString &s,const QCString &src,const QCString &dst,in
}
QCString result(resLen+1);
char *r;
- for (r=result.rawData(), p=s; (q=strstr(p,src))!=0; p=q+srcLen)
+ for (r=result.rawData(), p=s.data(); (q=strstr(p,src.data()))!=0; p=q+srcLen)
{
// search a consecutive sequence of src
int seq = 0, skip = 0;
if (skip_seq)
{
- for (const char *n=q+srcLen; qstrncmp(n,src,srcLen)==0; seq=1+skip, n+=srcLen)
+ for (const char *n=q+srcLen; qstrncmp(n,src.data(),srcLen)==0; seq=1+skip, n+=srcLen)
++skip; // number of consecutive src after the current one
// verify the allowed number of consecutive src to skip
@@ -683,7 +549,7 @@ QCString substitute(const QCString &s,const QCString &src,const QCString &dst,in
continue;
}
- if (dst) memcpy(r,dst,dstLen);
+ if (dstLen>0) memcpy(r,dst.data(),dstLen);
r+=dstLen;
}
qstrcpy(r,p);
diff --git a/qtools/qcstring.h b/src/qcstring.h
index bdd99f0..f7cccb7 100644
--- a/qtools/qcstring.h
+++ b/src/qcstring.h
@@ -17,10 +17,6 @@
#ifndef QCSTRING_H
#define QCSTRING_H
-#ifndef QT_H
-#include "qarray.h"
-#endif // QT_H
-
#include <string>
#include <algorithm>
@@ -29,8 +25,25 @@
#include <cstdio>
#include <cstdlib>
#include <cstdint>
+#include <ostream>
+
+#include "utf8.h"
+
+#ifndef FALSE
+#define FALSE false
+#endif
+#ifndef TRUE
+#define TRUE true
+#endif
+typedef unsigned char uchar;
+typedef unsigned short ushort;
+typedef unsigned uint;
+typedef unsigned long ulong;
+typedef int64_t int64;
+typedef uint64_t uint64;
+#define ASSERT(x) if ( !(x) )\
+ fprintf(stderr,"ASSERT: \"%s\" in %s (%d)",#x,__FILE__,__LINE__)
-class QGString;
/*****************************************************************************
Safe and portable C string functions; extensions to standard string.h
@@ -63,38 +76,31 @@ char * qstrncpy(char *dst,const char *src, uint len);
inline int cstrcmp( const char *str1, const char *str2 )
{ return strcmp(str1,str2); }
+inline bool qisempty( const char *s)
+{ return s==0 || *s==0; }
+
inline int qstrcmp( const char *str1, const char *str2 )
-{ return (str1 && str2) ? strcmp(str1,str2) : (int)((intptr_t)str2 - (intptr_t)str1); }
+{ return (str1 && str2) ? strcmp(str1,str2) : // both non-empty
+ (qisempty(str1) && qisempty(str2)) ? 0 : // both empty
+ qisempty(str1) ? -1 : 1; // one empty, other non-empty
+}
inline int cstrncmp( const char *str1, const char *str2, uint len )
{ return strncmp(str1,str2,len); }
inline int qstrncmp( const char *str1, const char *str2, uint len )
-{ return (str1 && str2) ? strncmp(str1,str2,len) :
- (int)((intptr_t)str2 - (intptr_t)str1); }
+{ return (str1 && str2) ? strncmp(str1,str2,len) : // both non-empty
+ (qisempty(str1) && qisempty(str2)) ? 0 : // both empty
+ qisempty(str1) ? -1 : 1; // one empty other non-empty
+}
+
+inline bool qisspace(char c)
+{ return c==' ' || c=='\t' || c=='\n' || c=='\r'; }
int qstricmp( const char *str1, const char *str2 );
int qstrnicmp( const char *str1, const char *str2, uint len );
-/*****************************************************************************
- QByteArray class
- *****************************************************************************/
-
-#if defined(Q_TEMPLATEDLL)
-template class QArray<char>;
-#endif
-typedef QArray<char> QByteArray;
-
-/*****************************************************************************
- QByteArray stream functions
- *****************************************************************************/
-#ifndef QT_NO_DATASTREAM
-QDataStream &operator<<( QDataStream &, const QByteArray & );
-QDataStream &operator>>( QDataStream &, QByteArray & );
-#endif
-
-//class QRegExp;
/** This is an alternative implementation of QCString. It provides basically
* the same functions but uses std::string as the underlying string type
@@ -109,7 +115,9 @@ class QCString
QCString( QCString &&s ) = default;
QCString &operator=( QCString &&s ) = default;
- QCString( const std::string &s ) : m_rep(s) {}
+ explicit QCString( const std::string &s ) : m_rep(s) {}
+
+ QCString( std::string &&s) { m_rep = std::move(s); }
/** creates a string with room for size characters
* @param[in] size the number of character to allocate (also counting the 0-terminator!)
@@ -124,11 +132,11 @@ class QCString
/** creates a string from \a str and copies over the first \a maxlen characters. */
QCString( const char *str, uint maxlen ) : m_rep(str?str:"") { m_rep.resize(maxlen); }
- /** replaces the contents by that of string \a s. */
-
/** replaces the contents by that of C string \a str. */
QCString &operator=( const char *str) { m_rep = str?str:""; return *this; }
+ QCString &operator=( const std::string &s) { m_rep = s; return *this; }
+
/** Returns TRUE iff the string is empty. Equivalent to isEmpty(). */
bool isNull() const { return m_rep.empty(); }
@@ -142,13 +150,11 @@ class QCString
uint size() const { return (uint)m_rep.size(); }
/** Returns a pointer to the contents of the string in the form of a 0-terminated C string */
- const char *data() const { return m_rep.empty() ? 0 : m_rep.c_str(); }
+ const char *data() const { return m_rep.c_str(); }
/** Returns a writable pointer to the data.
- * @warning if the string is shared it will modifying the string directly and
- * this will overwrite all copies as well!
*/
- char *rawData() const { return m_rep.empty() ? 0 : const_cast<char*>(&m_rep[0]); }
+ char *rawData() { return &m_rep[0]; }
/** Resizes the string to hold \a newlen characters
* (this value should also count the 0-terminator).
@@ -173,9 +179,6 @@ class QCString
return TRUE;
}
- /** Returns a deep copy of the string. */
- QCString copy() const { return *this; }
-
QCString &sprintf( const char *format, ... );
int find( char c, int index=0, bool cs=TRUE ) const;
@@ -191,16 +194,20 @@ class QCString
int contains( const char *str, bool cs=TRUE ) const;
//int contains( const QRegExp &rx ) const;
- bool stripPrefix(const char *prefix)
+ bool stripPrefix(const QCString &prefix)
{
- if (prefix==0 || m_rep.empty()) return FALSE;
- if (m_rep.rfind(prefix,0)==0) // string starts with prefix
+ if (prefix.isEmpty() || m_rep.empty()) return FALSE;
+ if (m_rep.rfind(prefix.data(),0)==0) // string starts with prefix
{
- m_rep.erase(0,qstrlen(prefix));
+ m_rep.erase(0,prefix.length());
return TRUE;
}
return FALSE;
}
+ bool stripPrefix(const char *prefix)
+ {
+ return stripPrefix(QCString(prefix));
+ }
QCString left( uint len ) const
{
@@ -224,33 +231,45 @@ class QCString
QCString lower() const
{
- std::string s = m_rep;
- std::transform(s.begin(),s.end(),s.begin(),
- [](unsigned char c){ return (unsigned char)std::tolower(c); });
- return s;
+ return QCString(convertUTF8ToLower(m_rep));
}
QCString upper() const
{
- std::string s = m_rep;
- std::transform(s.begin(),s.end(),s.begin(),
- [](unsigned char c){ return (unsigned char)std::toupper(c); });
- return s;
+ return QCString(convertUTF8ToUpper(m_rep));
}
QCString stripWhiteSpace() const
{
int sl = (uint)m_rep.size();
- if (sl==0 || (!std::isspace(m_rep[0]) && !std::isspace(m_rep[sl-1]))) return *this;
+ if (sl==0 || (!qisspace(m_rep[0]) && !qisspace(m_rep[sl-1]))) return *this;
int start=0,end=sl-1;
- while (start<sl && std::isspace(m_rep[start])) start++;
+ while (start<sl && qisspace(m_rep[start])) start++;
if (start==sl) return QCString(); // only whitespace
- while (end>start && std::isspace(m_rep[end])) end--;
+ while (end>start && qisspace(m_rep[end])) end--;
return QCString(m_rep.substr(start,1+end-start));
}
QCString simplifyWhiteSpace() const;
+ QCString &insert( uint index, const QCString &s )
+ {
+ if (s.length()>0)
+ {
+ uint ol = (uint)m_rep.size();
+ if (index>ol) // insert beyond end of string and fill gap with spaces
+ {
+ m_rep.resize(index+s.length());
+ std::memset(&m_rep[ol],' ',index-ol);
+ std::memcpy(&m_rep[index],s.data(),s.length()+1);
+ }
+ else // insert inside the string
+ {
+ m_rep.insert(index,s.str());
+ }
+ }
+ return *this;
+ }
QCString &insert( uint index, const char *s )
{
uint len = s ? qstrlen(s) : 0;
@@ -277,16 +296,42 @@ class QCString
return insert(index,s);
}
+ QCString &append( char c)
+ {
+ m_rep+=c;
+ return *this;
+ }
+
QCString &append( const char *s )
{
return operator+=(s);
}
+ QCString &append( const QCString &s )
+ {
+ return operator+=(s);
+ }
+
+ QCString &append( const std::string &s )
+ {
+ return operator+=(s);
+ }
+
QCString &prepend( const char *s )
{
return insert(0,s);
}
+ QCString &prepend( const QCString &s )
+ {
+ return insert(0,s.data());
+ }
+
+ QCString &prepend( const std::string &s )
+ {
+ return insert(0,s.c_str());
+ }
+
QCString &remove( uint index, uint len )
{
uint ol = (uint)m_rep.size();
@@ -347,47 +392,69 @@ class QCString
return m_rep.rfind(s,0)==0; // looking "backward" starting and ending at index 0
}
+#define HAS_IMPLICIT_CAST_TO_PLAIN_C_STRING 0
+#if HAS_IMPLICIT_CAST_TO_PLAIN_C_STRING
/** Converts the string to a plain C string */
operator const char *() const
{
return data();
}
+#endif
std::string str() const
{
return m_rep;
}
- QCString &operator+=( const std::string &str)
+ QCString &operator+=( const QCString &s)
+ {
+ m_rep+=s.str();
+ return *this;
+ }
+
+ QCString &operator+=( const std::string &s)
{
- m_rep+=str;
+ m_rep+=s;
return *this;
}
/** Appends string \a str to this string and returns a reference to the result. */
- QCString &operator+=( const char *str )
+ QCString &operator+=( const char *s )
{
- if (str) m_rep+=str;
+ if (s) m_rep+=s;
return *this;
}
+#define HAS_CHARACTER_APPEND_OPERATOR 1
+#if HAS_CHARACTER_APPEND_OPERATOR
/** Appends character \a c to this string and returns a reference to the result. */
QCString &operator+=( char c )
{
m_rep+=c;
return *this;
}
+#endif
/** Returns a reference to the character at index \a i. */
- char &at( uint i) const
+ char &at( uint i)
{
- return const_cast<char&>(m_rep[i]);
+ return m_rep[i];
+ }
+
+ const char &at( uint i) const
+ {
+ return m_rep[i];
}
/** Indexing operator. Equivalent to at(). */
- char &operator[]( int i ) const
+ char &operator[]( int i )
+ {
+ return m_rep[i];
+ }
+
+ const char &operator[]( int i ) const
{
- return const_cast<char&>(m_rep[i]);
+ return m_rep[i];
}
private:
@@ -395,14 +462,6 @@ class QCString
};
/*****************************************************************************
- QCString stream functions
- *****************************************************************************/
-#ifndef QT_NO_DATASTREAM
-QDataStream &operator<<( QDataStream &, const QCString & );
-QDataStream &operator>>( QDataStream &, QCString & );
-#endif
-
-/*****************************************************************************
QCString non-member operators
*****************************************************************************/
@@ -457,38 +516,37 @@ inline QCString operator+( const QCString &s1, const QCString &s2 )
}
-inline QCString operator+( const QCString &s1, const QGString &s2 );
-inline QCString operator+( const QGString &s1, const QCString &s2 );
-
-
inline QCString operator+( const QCString &s1, const char *s2 )
{
QCString tmp(s1);
- tmp += s2;
+ tmp.append(s2);
return tmp;
}
inline QCString operator+( const char *s1, const QCString &s2 )
{
QCString tmp(s1);
- tmp += s2;
+ tmp.append(s2);
return tmp;
}
+#define HAD_PLUS_OPERATOR_FOR_CHAR 0
+#if HAS_PLUS_OPERATOR_FOR_CHAR
inline QCString operator+( const QCString &s1, char c2 )
{
QCString tmp( s1.data() );
- tmp += c2;
+ tmp.append(c2);
return tmp;
}
inline QCString operator+( char c1, const QCString &s2 )
{
QCString tmp;
- tmp += c1;
- tmp += s2;
+ tmp.append(c1);
+ tmp.append(s2);
return tmp;
}
+#endif
inline const char *qPrint(const char *s)
{
@@ -510,15 +568,57 @@ inline std::string toStdString(const QCString &s)
return s.str();
}
+//---- overloads
+
+inline int qstricmp( const QCString &str1, const char *str2 )
+{
+ return qstricmp(str1.data(),str2);
+}
+
+inline int qstricmp( const char *str1, const QCString &str2 )
+{
+ return qstricmp(str1,str2.data());
+}
+
+inline int qstricmp( const QCString &str1, const QCString &str2 )
+{
+ return qstricmp(str1.data(),str2.data());
+}
+
+inline int qstrnicmp( const QCString &str1, const char *str2, uint len )
+{
+ return qstrnicmp(str1.data(),str2,len);
+}
+
+inline int qstrnicmp( const char *str1, const QCString &str2, uint len )
+{
+ return qstrnicmp(str1,str2.data(),len);
+}
+
+inline int qstrnicmp( const QCString &str1, const QCString &str2, uint len )
+{
+ return qstrnicmp(str1.data(),str2.data(),len);
+}
+
// helper functions
QCString substitute(const QCString &str,const QCString &find,const QCString &replace);
+inline QCString substitute(const QCString &str,const char *find,const char *replace)
+{
+ return substitute(str,QCString(find),QCString(replace));
+}
QCString substitute(const QCString &s,const QCString &src,const QCString &dst,int skip_seq);
inline QCString substitute(const QCString &s,char srcChar,char dstChar)
{
std::string ss = s.str();
std::replace(ss.begin(),ss.end(),srcChar,dstChar);
- return ss;
+ return QCString(ss);
+}
+
+inline std::ostream& operator<<(std::ostream& os, const QCString& s)
+{
+ os << s.str();
+ return os;
}
#endif // QCSTRING_H
diff --git a/src/qhp.cpp b/src/qhp.cpp
index 50f43ff..fc2f215 100644
--- a/src/qhp.cpp
+++ b/src/qhp.cpp
@@ -3,8 +3,8 @@
* Copyright (C) 2008 Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
- * documentation under the terms of the GNU General Public License is hereby
- * granted. No representations are made about the suitability of this software
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
@@ -22,12 +22,12 @@
#include "groupdef.h"
#include "doxygen.h"
#include "filedef.h"
+#include "util.h"
-#include <qcstringlist.h>
+#include <fstream>
#include <string.h>
-#include <qfile.h>
-static QCString makeFileName(const char * withoutExtension)
+static QCString makeFileName(const QCString & withoutExtension)
{
QCString result=withoutExtension;
if (!result.isEmpty())
@@ -44,12 +44,12 @@ static QCString makeFileName(const char * withoutExtension)
return result;
}
-static QCString makeRef(const char * withoutExtension, const char * anchor)
+static QCString makeRef(const QCString & withoutExtension, const QCString & anchor)
{
//printf("QHP::makeRef(%s,%s)\n",withoutExtension,anchor);
- if (!withoutExtension) return QCString();
+ if (withoutExtension.isEmpty()) return QCString();
QCString result = makeFileName(withoutExtension);
- if (!anchor) return result;
+ if (anchor.isEmpty()) return result;
return result+"#"+anchor;
}
@@ -97,14 +97,15 @@ void Qhp::initialize()
QCString filterName = Config_getString(QHP_CUST_FILTER_NAME);
if (!filterName.isEmpty())
{
- const char * tagAttributes[] =
- { "name", filterName, 0 };
+ const char * tagAttributes[] =
+ { "name", filterName.data(), 0 };
m_doc.open("customFilter", tagAttributes);
- QCStringList customFilterAttributes = QCStringList::split(' ', Config_getString(QHP_CUST_FILTER_ATTRS));
- for (int i = 0; i < (int)customFilterAttributes.count(); i++)
+ StringVector customFilterAttributes =
+ split(Config_getString(QHP_CUST_FILTER_ATTRS).str(), " ");
+ for (const auto &attr : customFilterAttributes)
{
- m_doc.openCloseContent("filterAttribute", customFilterAttributes[i]);
+ m_doc.openCloseContent("filterAttribute", attr.c_str());
}
m_doc.close("customFilter");
}
@@ -112,15 +113,16 @@ void Qhp::initialize()
m_doc.open("filterSection");
// Add section attributes
- QCStringList sectionFilterAttributes = QCStringList::split(' ',
- Config_getString(QHP_SECT_FILTER_ATTRS));
- if (!sectionFilterAttributes.contains("doxygen"))
+ StringVector sectionFilterAttributes =
+ split(Config_getString(QHP_SECT_FILTER_ATTRS).str(), " ");
+ if (std::find(sectionFilterAttributes.begin(), sectionFilterAttributes.end(), "doxygen") ==
+ sectionFilterAttributes.end())
{
- sectionFilterAttributes << "doxygen";
+ sectionFilterAttributes.push_back("doxygen");
}
- for (int i = 0; i < (int)sectionFilterAttributes.count(); i++)
+ for (const auto &attr : sectionFilterAttributes)
{
- m_doc.openCloseContent("filterAttribute", sectionFilterAttributes[i]);
+ m_doc.openCloseContent("filterAttribute", attr.c_str());
}
m_toc.open("toc");
@@ -129,8 +131,8 @@ void Qhp::initialize()
QCString fullProjectname = getFullProjectName();
QCString indexFile = "index"+Doxygen::htmlFileExtension;
const char * const attributes[] =
- { "title", fullProjectname,
- "ref", indexFile,
+ { "title", fullProjectname.data(),
+ "ref", indexFile.data(),
NULL
};
m_toc.open("section", attributes);
@@ -165,12 +167,13 @@ void Qhp::finalize()
m_doc.close("QtHelpProject");
QCString fileName = Config_getString(HTML_OUTPUT) + "/" + getQhpFileName();
- QFile file(fileName);
- if (!file.open(IO_WriteOnly))
+ std::ofstream file(fileName.str(),std::ofstream::out | std::ofstream::binary);
+ if (!file.is_open())
{
term("Could not open file %s for writing\n", fileName.data());
}
- m_doc.dumpTo(file);
+ TextStream t(&file);
+ m_doc.dumpTo(t);
}
void Qhp::incContentsDepth()
@@ -188,9 +191,9 @@ void Qhp::decContentsDepth()
m_sectionLevel--;
}
-void Qhp::addContentsItem(bool /*isDir*/, const char * name,
- const char * /*ref*/, const char * file,
- const char *anchor, bool /* separateIndex */,
+void Qhp::addContentsItem(bool /*isDir*/, const QCString & name,
+ const QCString & /*ref*/, const QCString & file,
+ const QCString &anchor, bool /* separateIndex */,
bool /* addToNavIndex */,
const Definition * /*def*/)
{
@@ -214,7 +217,7 @@ void Qhp::addContentsItem(bool /*isDir*/, const char * name,
}
void Qhp::addIndexItem(const Definition *context,const MemberDef *md,
- const char *sectionAnchor,const char *word)
+ const QCString &sectionAnchor,const QCString &word)
{
(void)word;
//printf("addIndexItem(%s %s %s\n",
@@ -236,9 +239,9 @@ void Qhp::addIndexItem(const Definition *context,const MemberDef *md,
QCString cfname = md->getOutputFileBase();
QCString cfiname = context->getOutputFileBase();
QCString level1 = context->name();
- QCString level2 = word ? QCString(word) : md->name();
+ QCString level2 = !word.isEmpty() ? word : md->name();
QCString contRef = separateMemberPages ? cfname : cfiname;
- QCString anchor = sectionAnchor ? QCString(sectionAnchor) : md->anchor();
+ QCString anchor = !sectionAnchor.isEmpty() ? sectionAnchor : md->anchor();
QCString ref;
@@ -247,9 +250,9 @@ void Qhp::addIndexItem(const Definition *context,const MemberDef *md,
QCString id = level1+"::"+level2;
const char * attributes[] =
{
- "name", level2,
- "id", id,
- "ref", ref,
+ "name", level2.data(),
+ "id", id.data(),
+ "ref", ref.data(),
0
};
m_index.openClose("keyword", attributes);
@@ -258,20 +261,20 @@ void Qhp::addIndexItem(const Definition *context,const MemberDef *md,
{
// <keyword name="Foo" id="Foo" ref="doc.html#Foo"/>
QCString contRef = context->getOutputFileBase();
- QCString level1 = word ? QCString(word) : context->name();
+ QCString level1 = !word.isEmpty() ? word : context->name();
QCString ref = makeRef(contRef,sectionAnchor);
const char * attributes[] =
{
- "name", level1,
- "id", level1,
- "ref", ref,
+ "name", level1.data(),
+ "id", level1.data(),
+ "ref", ref.data(),
0
};
m_index.openClose("keyword", attributes);
}
}
-void Qhp::addIndexFile(const char * name)
+void Qhp::addIndexFile(const QCString & name)
{
addFile(name);
}
@@ -314,8 +317,8 @@ void Qhp::handlePrevSection()
QCString finalRef = makeRef(m_prevSectionBaseName, m_prevSectionAnchor);
const char * const attributes[] =
- { "title", m_prevSectionTitle,
- "ref", finalRef,
+ { "title", m_prevSectionTitle.data(),
+ "ref", finalRef.data(),
NULL
};
@@ -338,7 +341,7 @@ void Qhp::handlePrevSection()
clearPrevSection();
}
-void Qhp::setPrevSection(const char * title, const char * basename, const char * anchor, int level)
+void Qhp::setPrevSection(const QCString & title, const QCString & basename, const QCString & anchor, int level)
{
m_prevSectionTitle = title;
m_prevSectionBaseName = basename;
@@ -353,17 +356,17 @@ void Qhp::clearPrevSection()
m_prevSectionAnchor.resize(0);
}
-void Qhp::addFile(const char * fileName)
+void Qhp::addFile(const QCString & fileName)
{
m_files.openCloseContent("file", fileName);
}
-void Qhp::addImageFile(const char *fileName)
+void Qhp::addImageFile(const QCString &fileName)
{
addFile(fileName);
}
-void Qhp::addStyleSheetFile(const char *fileName)
+void Qhp::addStyleSheetFile(const QCString &fileName)
{
addFile(fileName);
}
diff --git a/src/qhp.h b/src/qhp.h
index eba7db5..d1fc335 100644
--- a/src/qhp.h
+++ b/src/qhp.h
@@ -3,8 +3,8 @@
* Copyright (C) 2008 Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
- * documentation under the terms of the GNU General Public License is hereby
- * granted. No representations are made about the suitability of this software
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
@@ -31,15 +31,15 @@ class Qhp : public IndexIntf
void finalize();
void incContentsDepth();
void decContentsDepth();
- void addContentsItem(bool isDir, const char * name, const char * ref,
- const char * file, const char * anchor,
+ void addContentsItem(bool isDir, const QCString & name, const QCString & ref,
+ const QCString & file, const QCString & anchor,
bool separateIndex,bool addToNavIndex,
const Definition *def);
void addIndexItem(const Definition *context, const MemberDef *md,
- const char *sectionAnchor, const char *title);
- void addIndexFile(const char * name);
- void addImageFile(const char * name);
- void addStyleSheetFile(const char * name);
+ const QCString &sectionAnchor, const QCString &title);
+ void addIndexFile(const QCString & name);
+ void addImageFile(const QCString & name);
+ void addStyleSheetFile(const QCString & name);
// END IndexIntf
static QCString getQhpFileName();
@@ -47,8 +47,8 @@ class Qhp : public IndexIntf
private:
void handlePrevSection();
void clearPrevSection();
- void setPrevSection(const char * title, const char * basename, const char * anchor, int level);
- void addFile(const char * fileName);
+ void setPrevSection(const QCString & title, const QCString & basename, const QCString & anchor, int level);
+ void addFile(const QCString & fileName);
static QCString getFullProjectName();
diff --git a/src/qhpxmlwriter.cpp b/src/qhpxmlwriter.cpp
index edf9ae0..b3ab95a 100644
--- a/src/qhpxmlwriter.cpp
+++ b/src/qhpxmlwriter.cpp
@@ -3,8 +3,8 @@
* Copyright (C) 2008 Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
- * documentation under the terms of the GNU General Public License is hereby
- * granted. No representations are made about the suitability of this software
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
@@ -16,12 +16,10 @@
#include "qhpxmlwriter.h"
#include "util.h"
+#include "qcstring.h"
-#include <qfile.h>
-
-QhpXmlWriter::QhpXmlWriter()
- : m_out(&m_backend), m_indentLevel(0),
- m_curLineIndented(false), m_compress(false)
+QhpXmlWriter::QhpXmlWriter()
+ : m_indentLevel(0), m_curLineIndented(false), m_compress(false)
{
}
@@ -41,16 +39,16 @@ void QhpXmlWriter::setCompressionEnabled(bool enabled)
void QhpXmlWriter::insert(QhpXmlWriter const & source)
{
- m_out << source.m_backend.data();
+ m_backend << source.m_backend.str();
}
-void QhpXmlWriter::dumpTo(QFile & file)
+void QhpXmlWriter::dumpTo(TextStream & file)
{
- file.writeBlock(m_backend.data(), m_backend.length());
+ file << m_backend.str();
}
-void QhpXmlWriter::open(char const * elementName,
- char const * const * attributes)
+void QhpXmlWriter::open(const QCString &elementName,
+ const char * const attributes[])
{
indent();
openPure(elementName, attributes);
@@ -58,25 +56,25 @@ void QhpXmlWriter::open(char const * elementName,
m_indentLevel++;
}
-void QhpXmlWriter::openClose(char const * elementName,
- char const * const * attributes)
+void QhpXmlWriter::openClose(const QCString &elementName,
+ const char * const attributes[])
{
indent();
openClosePure(elementName, attributes);
newLine();
}
-void QhpXmlWriter::openCloseContent(char const * elementName,
- char const * content)
+void QhpXmlWriter::openCloseContent(const QCString &elementName,
+ const QCString &content)
{
indent();
openPure(elementName);
- m_out << convertToXML(content);
+ m_backend << convertToXML(content);
closePure(elementName);
newLine();
}
-void QhpXmlWriter::close(char const * elementName)
+void QhpXmlWriter::close(const QCString &elementName)
{
m_indentLevel--;
indent();
@@ -84,9 +82,9 @@ void QhpXmlWriter::close(char const * elementName)
newLine();
}
-void QhpXmlWriter::declaration(char const * version, char const * encoding)
+void QhpXmlWriter::declaration(const QCString &version, const QCString &encoding)
{
- m_out << "<?xml version=\"" << version << "\" encoding=\"" << encoding << "\"?>";
+ m_backend << "<?xml version=\"" << version << "\" encoding=\"" << encoding << "\"?>";
newLine();
}
@@ -96,9 +94,9 @@ void QhpXmlWriter::indent()
{
return;
}
- for (int i = 0; i < m_indentLevel; i++)
+ for (int i = 0; i < m_indentLevel; i++)
{
- m_out << " ";
+ m_backend << " ";
}
m_curLineIndented = true;
}
@@ -107,51 +105,51 @@ void QhpXmlWriter::newLine()
{
if (!m_compress)
{
- m_out << "\n";
+ m_backend << "\n";
m_curLineIndented = false;
}
}
-void QhpXmlWriter::openPureHelper(char const * elementName,
- char const * const * attributes, bool close)
+void QhpXmlWriter::openPureHelper(const QCString &elementName,
+ const char * const attributes[], bool close)
{
- m_out << "<" << elementName;
+ m_backend << "<" << elementName;
if (attributes)
{
- for (char const * const * walker = attributes;
+ for (const char * const * walker = attributes;
walker[0]; walker += 2)
{
- char const * const key = walker[0];
- char const * const value = walker[1];
+ const char *const key = walker[0];
+ const char *const value = walker[1];
if (!value)
{
- continue;
+ continue;
}
- m_out << " " << key << "=\"" << convertToXML(value) << "\"";
+ m_backend << " " << key << "=\"" << convertToXML(value) << "\"";
}
}
if (close)
{
- m_out << " /";
+ m_backend << " /";
}
- m_out << ">";
+ m_backend << ">";
}
-void QhpXmlWriter::openPure(char const * elementName,
- char const * const * attributes)
+void QhpXmlWriter::openPure(const QCString &elementName,
+ const char * const attributes[])
{
openPureHelper(elementName, attributes, false);
}
-void QhpXmlWriter::openClosePure(char const * elementName,
- char const * const * attributes)
+void QhpXmlWriter::openClosePure(const QCString &elementName,
+ const char * const attributes[])
{
openPureHelper(elementName, attributes, true);
}
-void QhpXmlWriter::closePure(char const * elementName)
+void QhpXmlWriter::closePure(const QCString &elementName)
{
- m_out << "</" << elementName << ">";
+ m_backend << "</" << elementName << ">";
}
diff --git a/src/qhpxmlwriter.h b/src/qhpxmlwriter.h
index 5541edd..7b591eb 100644
--- a/src/qhpxmlwriter.h
+++ b/src/qhpxmlwriter.h
@@ -17,9 +17,8 @@
#ifndef QHPXMLWRITER_H
#define QHPXMLWRITER_H
-#include "ftextstream.h"
-
-class QFile;
+#include <sstream>
+#include "textstream.h"
class QhpXmlWriter
{
@@ -30,30 +29,27 @@ class QhpXmlWriter
void setIndentLevel(int level);
void setCompressionEnabled(bool enabled);
void insert(QhpXmlWriter const & source);
- void dumpTo(QFile & file);
- void open(char const * elementName,
- char const * const * attributes = 0);
- void openClose(char const * elementName,
- char const * const * attributes = 0);
- void openCloseContent(char const * elementName, char const * content);
- void close(char const * elementName);
- void declaration(char const * version, char const * encoding);
-
- static char * dupEscaped(const char * source);
+ void dumpTo(TextStream & file);
+ void open(const QCString &elementName,
+ const char * const attributes[] = 0);
+ void openClose(const QCString &elementName,
+ const char * const attributes[] = 0);
+ void openCloseContent(const QCString &elementName, const QCString &content);
+ void close(const QCString &elementName);
+ void declaration(const QCString &version, const QCString &encoding);
private:
void indent();
void newLine();
- void openPureHelper(char const * elementName,
- char const * const * attributes, bool close);
- void openPure(char const * elementName,
- char const * const * attributes = 0);
- void openClosePure(char const * elementName,
- char const * const * attributes = 0);
- void closePure(char const * elementName);
-
- QGString m_backend;
- FTextStream m_out;
+ void openPureHelper(const QCString &elementName,
+ const char * const attributes[], bool close);
+ void openPure(const QCString &elementName,
+ const char * const attributes[] = 0);
+ void openClosePure(const QCString &elementName,
+ const char * const attributes[] = 0);
+ void closePure(const QCString &elementName);
+
+ TextStream m_backend;
int m_indentLevel;
bool m_curLineIndented;
bool m_compress;
diff --git a/src/reflist.cpp b/src/reflist.cpp
index 39987f9..9a32449 100644
--- a/src/reflist.cpp
+++ b/src/reflist.cpp
@@ -14,15 +14,14 @@
*/
#include <algorithm>
-
#include <stdio.h>
+
#include "reflist.h"
#include "util.h"
-#include "ftextstream.h"
#include "definition.h"
#include "config.h"
-RefList::RefList(const char *listName, const char *pageTitle, const char *secTitle) :
+RefList::RefList(const QCString &listName, const QCString &pageTitle, const QCString &secTitle) :
m_listName(listName), m_fileName(convertNameToFile(listName,FALSE,TRUE)),
m_pageTitle(pageTitle), m_secTitle(secTitle)
{
@@ -68,7 +67,7 @@ void RefList::generatePage()
bool first=true;
for (const std::unique_ptr<RefItem> &item : m_entries)
{
- if (!item->name()) continue;
+ if (item->name().isEmpty()) continue;
cnt++;
bool startNewGroup = item->group()!=lastGroup;
if (startNewGroup)
diff --git a/src/reflist.h b/src/reflist.h
index 7f4473c..6ab360b 100644
--- a/src/reflist.h
+++ b/src/reflist.h
@@ -20,7 +20,7 @@
#include <unordered_map>
#include <memory>
-#include <qcstring.h>
+#include "qcstring.h"
#include "linkedmap.h"
class Definition;
@@ -32,13 +32,13 @@ class RefItem
public:
RefItem(int id,RefList *list) : m_id(id), m_list(list) {}
- void setText (const char *text) { m_text = text; }
- void setAnchor(const char *anchor) { m_anchor = anchor; }
- void setPrefix(const char *prefix) { m_prefix = prefix; }
- void setName (const char *name) { m_name = name; }
- void setTitle (const char *title) { m_title = title; }
- void setArgs (const char *args) { m_args = args; }
- void setGroup (const char *group) { m_group = group; }
+ void setText (const QCString &text) { m_text = text; }
+ void setAnchor(const QCString &anchor) { m_anchor = anchor; }
+ void setPrefix(const QCString &prefix) { m_prefix = prefix; }
+ void setName (const QCString &name) { m_name = name; }
+ void setTitle (const QCString &title) { m_title = title; }
+ void setArgs (const QCString &args) { m_args = args; }
+ void setGroup (const QCString &group) { m_group = group; }
void setScope (const Definition *scope) { m_scope = scope; }
QCString text() const { return m_text; }
@@ -83,7 +83,7 @@ class RefList
* @param pageTitle String representing the title of the list page.
* @param secTitle String representing the title of the section.
*/
- RefList(const char *listName, const char *pageTitle, const char *secTitle);
+ RefList(const QCString &listName, const QCString &pageTitle, const QCString &secTitle);
bool isEnabled() const;
/*! Adds a new item to the list.
diff --git a/src/regex.cpp b/src/regex.cpp
index 62678b7..2a39f63 100644
--- a/src/regex.cpp
+++ b/src/regex.cpp
@@ -30,6 +30,27 @@
namespace reg
{
+static inline bool isspace(char c)
+{
+ return c==' ' || c=='\t' || c=='\n' || c=='\r';
+}
+
+static inline bool isalpha(char c)
+{
+ return static_cast<unsigned char>(c)>=128 || (c>='a' && c<='z') || (c>='A' && c<='Z');
+}
+
+static inline bool isdigit(char c)
+{
+ return c>='0' && c<='9';
+}
+
+static inline bool isalnum(char c)
+{
+ return isalpha(c) || isdigit(c);
+}
+
+
/** Class representing a token in the compiled regular expression token stream.
* A token has a kind and an optional value whose meaning depends on the kind.
* It is also possible to store a (from,to) character range in a token.
@@ -417,8 +438,8 @@ void Ex::Private::dump()
bool Ex::Private::matchAt(size_t tokenPos,const std::string &str,Match &match,const size_t pos,int level) const
{
DBG("%d:matchAt(tokenPos=%zu, str='%s', pos=%zu)\n",level,tokenPos,str.c_str(),pos);
- auto isStartIdChar = [](char c) { return std::isalpha(c) || c=='_' || c<0; };
- auto isIdChar = [](char c) { return std::isalnum(c) || c=='_' || c<0; };
+ auto isStartIdChar = [](char c) { return isalpha(c) || c=='_'; };
+ auto isIdChar = [](char c) { return isalnum(c) || c=='_'; };
auto matchCharClass = [this,isStartIdChar,isIdChar](size_t tp,char c) -> bool
{
PToken tok = data[tp];
@@ -431,8 +452,8 @@ bool Ex::Private::matchAt(size_t tokenPos,const std::string &str,Match &match,co
// first check for built-in ranges
if ((tok.kind()==PToken::Kind::Alpha && isStartIdChar(c)) ||
(tok.kind()==PToken::Kind::AlphaNum && isIdChar(c)) ||
- (tok.kind()==PToken::Kind::WhiteSpace && std::isspace(c)) ||
- (tok.kind()==PToken::Kind::Digit && std::isdigit(c))
+ (tok.kind()==PToken::Kind::WhiteSpace && isspace(c)) ||
+ (tok.kind()==PToken::Kind::Digit && isdigit(c))
)
{
found=true;
@@ -481,12 +502,12 @@ bool Ex::Private::matchAt(size_t tokenPos,const std::string &str,Match &match,co
}
else if (tok.kind()==PToken::Kind::WhiteSpace) // '\s*' -> eat spaces
{
- while (index<=str.length() && std::isspace(str[index])) { index++; if (type==Optional) break; }
+ while (index<=str.length() && isspace(str[index])) { index++; if (type==Optional) break; }
tokenPos++;
}
else if (tok.kind()==PToken::Kind::Digit) // '\d*' -> eat digits
{
- while (index<=str.length() && std::isdigit(str[index])) { index++; if (type==Optional) break; }
+ while (index<=str.length() && isdigit(str[index])) { index++; if (type==Optional) break; }
tokenPos++;
}
else if (tok.kind()==PToken::Kind::Any) // '.*' -> eat all
@@ -537,11 +558,11 @@ bool Ex::Private::matchAt(size_t tokenPos,const std::string &str,Match &match,co
index++;
break;
case PToken::Kind::WhiteSpace:
- if (index>=str.length() || !std::isspace(str[index])) return false;
+ if (index>=str.length() || !isspace(str[index])) return false;
index++;
break;
case PToken::Kind::Digit:
- if (index>=str.length() || !std::isdigit(str[index])) return false;
+ if (index>=str.length() || !isdigit(str[index])) return false;
index++;
break;
case PToken::Kind::BeginOfLine:
diff --git a/src/resourcemgr.cpp b/src/resourcemgr.cpp
index b0361f0..161e480 100644
--- a/src/resourcemgr.cpp
+++ b/src/resourcemgr.cpp
@@ -14,14 +14,12 @@
*/
#include <map>
-#include <qfile.h>
-#include <qcstring.h>
#include <string.h>
+#include <fstream>
#include "resourcemgr.h"
#include "util.h"
#include "version.h"
-#include "ftextstream.h"
#include "message.h"
#include "config.h"
@@ -53,18 +51,24 @@ void ResourceMgr::registerResources(std::initializer_list<Resource> resources)
}
}
-bool ResourceMgr::writeCategory(const char *categoryName,const char *targetDir) const
+bool ResourceMgr::writeCategory(const QCString &categoryName,const QCString &targetDir) const
{
for (auto &kv : p->resources)
{
Resource &res = kv.second;
- if (qstrcmp(res.category,categoryName)==0)
+ if (res.category==categoryName)
{
- QCString pathName = QCString(targetDir)+"/"+res.name;
- QFile f(pathName);
- if (!f.open(IO_WriteOnly) || f.writeBlock((const char *)res.data,res.size)!=res.size)
+ std::string pathName = targetDir.str()+"/"+res.name;
+ std::ofstream f(pathName,std::ofstream::out | std::ofstream::binary);
+ bool ok=false;
+ if (f.is_open())
{
- err("Failed to write resource '%s' to directory '%s'\n",res.name,targetDir);
+ f.write(reinterpret_cast<const char *>(res.data),res.size);
+ ok = !f.fail();
+ }
+ if (!ok)
+ {
+ err("Failed to write resource '%s' to directory '%s'\n",res.name,qPrint(targetDir));
return FALSE;
}
}
@@ -72,9 +76,9 @@ bool ResourceMgr::writeCategory(const char *categoryName,const char *targetDir)
return TRUE;
}
-bool ResourceMgr::copyResourceAs(const char *name,const char *targetDir,const char *targetName) const
+bool ResourceMgr::copyResourceAs(const QCString &name,const QCString &targetDir,const QCString &targetName) const
{
- QCString pathName = QCString(targetDir)+"/"+targetName;
+ std::string pathName = targetDir.str()+"/"+targetName.str();
const Resource *res = get(name);
if (res)
{
@@ -82,8 +86,14 @@ bool ResourceMgr::copyResourceAs(const char *name,const char *targetDir,const ch
{
case Resource::Verbatim:
{
- QFile f(pathName);
- if (f.open(IO_WriteOnly) && f.writeBlock((const char *)res->data,res->size)==res->size)
+ std::ofstream f(pathName,std::ofstream::out | std::ofstream::binary);
+ bool ok=false;
+ if (f.is_open())
+ {
+ f.write(reinterpret_cast<const char *>(res->data),res->size);
+ ok = !f.fail();
+ }
+ if (ok)
{
return TRUE;
}
@@ -97,7 +107,7 @@ bool ResourceMgr::copyResourceAs(const char *name,const char *targetDir,const ch
ushort width = (data[0]<<8)+data[1];
ushort height = (data[2]<<8)+data[3];
ColoredImgDataItem images[2];
- images[0].name = n;
+ images[0].name = n.data();
images[0].width = width;
images[0].height = height;
images[0].content = &data[4];
@@ -115,7 +125,7 @@ bool ResourceMgr::copyResourceAs(const char *name,const char *targetDir,const ch
ushort width = (data[0]<<8)+data[1];
ushort height = (data[2]<<8)+data[3];
ColoredImgDataItem images[2];
- images[0].name = n;
+ images[0].name = n.data();
images[0].width = width;
images[0].height = height;
images[0].content = &data[4];
@@ -127,14 +137,13 @@ bool ResourceMgr::copyResourceAs(const char *name,const char *targetDir,const ch
break;
case Resource::CSS:
{
- QFile f(pathName);
- if (f.open(IO_WriteOnly))
+ std::ofstream t(pathName,std::ofstream::out | std::ofstream::binary);
+ if (t.is_open())
{
QCString buf(res->size+1);
memcpy(buf.rawData(),res->data,res->size);
- FTextStream t(&f);
buf = replaceColorMarkers(buf);
- if (qstrcmp(name,"navtree.css")==0)
+ if (name=="navtree.css")
{
t << substitute(buf,"$width",QCString().setNum(Config_getInt(TREEVIEW_WIDTH))+"px");
}
@@ -148,12 +157,11 @@ bool ResourceMgr::copyResourceAs(const char *name,const char *targetDir,const ch
break;
case Resource::SVG:
{
- QFile f(pathName);
- if (f.open(IO_WriteOnly))
+ std::ofstream t(pathName,std::ostream::out | std::ofstream::binary);
+ if (t.is_open())
{
QCString buf(res->size+1);
memcpy(buf.rawData(),res->data,res->size);
- FTextStream t(&f);
t << replaceColorMarkers(buf);
return TRUE;
}
@@ -162,24 +170,24 @@ bool ResourceMgr::copyResourceAs(const char *name,const char *targetDir,const ch
}
else
{
- err("requested resource '%s' not compiled in!\n",name);
+ err("requested resource '%s' not compiled in!\n",qPrint(name));
}
return FALSE;
}
-bool ResourceMgr::copyResource(const char *name,const char *targetDir) const
+bool ResourceMgr::copyResource(const QCString &name,const QCString &targetDir) const
{
return copyResourceAs(name,targetDir,name);
}
-const Resource *ResourceMgr::get(const char *name) const
+const Resource *ResourceMgr::get(const QCString &name) const
{
- auto it = p->resources.find(name);
+ auto it = p->resources.find(name.str());
if (it!=p->resources.end()) return &it->second;
return 0;
}
-QCString ResourceMgr::getAsString(const char *name) const
+QCString ResourceMgr::getAsString(const QCString &name) const
{
const Resource *res = get(name);
if (res)
diff --git a/src/resourcemgr.h b/src/resourcemgr.h
index 2d7ad9b..7978e09 100644
--- a/src/resourcemgr.h
+++ b/src/resourcemgr.h
@@ -18,7 +18,7 @@
#include <memory>
#include <initializer_list>
-#include <qcstring.h>
+#include "qcstring.h"
/** @brief Compiled resource */
struct Resource
@@ -42,20 +42,20 @@ class ResourceMgr
void registerResources(std::initializer_list<Resource> resources);
/** Writes all resource belonging to a given category to a given target directory */
- bool writeCategory(const char *categoryName,const char *targetDir) const;
+ bool writeCategory(const QCString &categoryName,const QCString &targetDir) const;
/** Copies a registered resource to a given target directory */
- bool copyResource(const char *name,const char *targetDir) const;
+ bool copyResource(const QCString &name,const QCString &targetDir) const;
/** Copies a registered resource to a given target directory under a given target name */
- bool copyResourceAs(const char *name,const char *targetDir,const char *targetName) const;
+ bool copyResourceAs(const QCString &name,const QCString &targetDir,const QCString &targetName) const;
/** Gets the resource data as a C string */
- QCString getAsString(const char *name) const;
+ QCString getAsString(const QCString &name) const;
private:
/** Returns a pointer to the resource object with the given name. */
- const Resource *get(const char *name) const;
+ const Resource *get(const QCString &name) const;
ResourceMgr();
~ResourceMgr();
diff --git a/src/rtfdocvisitor.cpp b/src/rtfdocvisitor.cpp
index 797e3a2..0d571dc 100644
--- a/src/rtfdocvisitor.cpp
+++ b/src/rtfdocvisitor.cpp
@@ -16,7 +16,7 @@
*
*/
-#include <qfileinfo.h>
+#include <algorithm>
#include "rtfdocvisitor.h"
#include "docparser.h"
@@ -36,6 +36,7 @@
#include "htmlentity.h"
#include "emoji.h"
#include "plantuml.h"
+#include "fileinfo.h"
//#define DBG_RTF(x) m_t << x
#define DBG_RTF(x) do {} while(0)
@@ -54,17 +55,16 @@ static QCString align(DocHtmlCell *cell)
return "";
}
-RTFDocVisitor::RTFDocVisitor(FTextStream &t,CodeOutputInterface &ci,
- const char *langExt)
+RTFDocVisitor::RTFDocVisitor(TextStream &t,CodeOutputInterface &ci,
+ const QCString &langExt)
: DocVisitor(DocVisitor_RTF), m_t(t), m_ci(ci), m_insidePre(FALSE),
m_hide(FALSE), m_indentLevel(0), m_lastIsPara(FALSE), m_langExt(langExt)
{
}
-QCString RTFDocVisitor::getStyle(const char *name)
+QCString RTFDocVisitor::getStyle(const QCString &name)
{
- QCString n;
- n.sprintf("%s%d",name,m_indentLevel);
+ QCString n = name + QCString().setNum(m_indentLevel);
StyleData &sd = rtf_Style[n.str()];
return sd.reference();
}
@@ -193,7 +193,7 @@ void RTFDocVisitor::visit(DocURL *u)
filter(u->url());
m_t << "}"
"}"
- "}" << endl;
+ "}\n";
}
else
{
@@ -208,7 +208,7 @@ void RTFDocVisitor::visit(DocLineBreak *)
{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visit(DocLineBreak)}\n");
- m_t << "\\par" << endl;
+ m_t << "\\par\n";
m_lastIsPara=TRUE;
}
@@ -216,7 +216,7 @@ void RTFDocVisitor::visit(DocHorRuler *)
{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visit(DocHorRuler)}\n");
- m_t << "{\\pard\\widctlpar\\brdrb\\brdrs\\brdrw5\\brsp20 \\adjustright \\par}" << endl;
+ m_t << "{\\pard\\widctlpar\\brdrb\\brdrs\\brdrw5\\brsp20 \\adjustright \\par}\n";
m_lastIsPara=TRUE;
}
@@ -260,8 +260,8 @@ void RTFDocVisitor::visit(DocStyleChange *s)
case DocStyleChange::Preformatted:
if (s->enable())
{
- m_t << "{" << endl;
- m_t << "\\par" << endl;
+ m_t << "{\n";
+ m_t << "\\par\n";
m_t << rtf_Style_Reset << getStyle("CodeExample");
m_insidePre=TRUE;
}
@@ -269,7 +269,7 @@ void RTFDocVisitor::visit(DocStyleChange *s)
{
m_insidePre=FALSE;
m_t << "\\par";
- m_t << "}" << endl;
+ m_t << "}\n";
}
m_lastIsPara=TRUE;
break;
@@ -296,21 +296,21 @@ void RTFDocVisitor::visit(DocVerbatim *s)
switch(s->type())
{
case DocVerbatim::Code: // fall though
- m_t << "{" << endl;
- m_t << "\\par" << endl;
+ m_t << "{\n";
+ m_t << "\\par\n";
m_t << rtf_Style_Reset << getStyle("CodeExample");
getCodeParser(lang).parseCode(m_ci,s->context(),s->text(),langExt,
s->isExample(),s->exampleFile());
- //m_t << "\\par" << endl;
- m_t << "}" << endl;
+ //m_t << "\\par\n";
+ m_t << "}\n";
break;
case DocVerbatim::Verbatim:
- m_t << "{" << endl;
- m_t << "\\par" << endl;
+ m_t << "{\n";
+ m_t << "\\par\n";
m_t << rtf_Style_Reset << getStyle("CodeExample");
filter(s->text(),TRUE);
- //m_t << "\\par" << endl;
- m_t << "}" << endl;
+ //m_t << "\\par\n";
+ m_t << "}\n";
break;
case DocVerbatim::RtfOnly:
m_t << s->text();
@@ -328,23 +328,27 @@ void RTFDocVisitor::visit(DocVerbatim *s)
QCString fileName(4096);
fileName.sprintf("%s%d%s",
- (Config_getString(RTF_OUTPUT)+"/inline_dotgraph_").data(),
+ qPrint(Config_getString(RTF_OUTPUT)+"/inline_dotgraph_"),
dotindex++,
".dot"
);
- QFile file(fileName);
- if (!file.open(IO_WriteOnly))
+ std::ofstream file(fileName.str(),std::ofstream::out | std::ofstream::binary);
+ if (!file.is_open())
{
- err("Could not open file %s for writing\n",fileName.data());
+ err("Could not open file %s for writing\n",qPrint(fileName));
+ }
+ else
+ {
+ QCString stext = s->text();
+ file.write( stext.data(), stext.length() );
+ file.close();
}
- file.writeBlock( s->text(), s->text().length() );
- file.close();
writeDotFile(fileName, s->hasCaption());
visitCaption(this, s->children());
includePicturePostRTF(true, s->hasCaption());
- if (Config_getBool(DOT_CLEANUP)) file.remove();
+ if (Config_getBool(DOT_CLEANUP)) Dir().remove(fileName.str());
}
break;
case DocVerbatim::Msc:
@@ -353,26 +357,26 @@ void RTFDocVisitor::visit(DocVerbatim *s)
QCString baseName(4096);
baseName.sprintf("%s%d%s",
- (Config_getString(RTF_OUTPUT)+"/inline_mscgraph_").data(),
+ qPrint(Config_getString(RTF_OUTPUT)+"/inline_mscgraph_"),
mscindex++,
".msc"
);
- QFile file(baseName);
- if (!file.open(IO_WriteOnly))
+ std::ofstream file(baseName.str(),std::ofstream::out | std::ofstream::binary);
+ if (!file.is_open())
{
- err("Could not open file %s for writing\n",baseName.data());
+ err("Could not open file %s for writing\n",qPrint(baseName));
}
QCString text = "msc {";
text+=s->text();
text+="}";
- file.writeBlock( text, text.length() );
+ file.write( text.data(), text.length() );
file.close();
writeMscFile(baseName, s->hasCaption());
visitCaption(this, s->children());
includePicturePostRTF(true, s->hasCaption());
- if (Config_getBool(DOT_CLEANUP)) file.remove();
+ if (Config_getBool(DOT_CLEANUP)) Dir().remove(baseName.str());
}
break;
case DocVerbatim::PlantUML:
@@ -406,8 +410,8 @@ void RTFDocVisitor::visit(DocAnchor *anc)
{
anchor+=anc->anchor();
}
- m_t << "{\\bkmkstart " << rtfFormatBmkStr(anchor) << "}" << endl;
- m_t << "{\\bkmkend " << rtfFormatBmkStr(anchor) << "}" << endl;
+ m_t << "{\\bkmkstart " << rtfFormatBmkStr(anchor) << "}\n";
+ m_t << "{\\bkmkend " << rtfFormatBmkStr(anchor) << "}\n";
m_lastIsPara=FALSE;
}
@@ -420,11 +424,11 @@ void RTFDocVisitor::visit(DocInclude *inc)
{
case DocInclude::IncWithLines:
{
- m_t << "{" << endl;
- m_t << "\\par" << endl;
+ m_t << "{\n";
+ m_t << "\\par\n";
m_t << rtf_Style_Reset << getStyle("CodeExample");
- QFileInfo cfi( inc->file() );
- FileDef *fd = createFileDef( cfi.dirPath().utf8(), cfi.fileName().utf8() );
+ FileInfo cfi( inc->file().str() );
+ FileDef *fd = createFileDef( cfi.dirPath(), cfi.fileName() );
getCodeParser(inc->extension()).parseCode(m_ci,inc->context(),
inc->text(),
langExt,
@@ -439,12 +443,12 @@ void RTFDocVisitor::visit(DocInclude *inc)
);
delete fd;
m_t << "\\par";
- m_t << "}" << endl;
+ m_t << "}\n";
}
break;
case DocInclude::Include:
- m_t << "{" << endl;
- m_t << "\\par" << endl;
+ m_t << "{\n";
+ m_t << "\\par\n";
m_t << rtf_Style_Reset << getStyle("CodeExample");
getCodeParser(inc->extension()).parseCode(m_ci,inc->context(),
inc->text(),langExt,inc->isExample(),
@@ -457,7 +461,7 @@ void RTFDocVisitor::visit(DocInclude *inc)
FALSE // show line numbers
);
m_t << "\\par";
- m_t << "}" << endl;
+ m_t << "}\n";
break;
case DocInclude::DontInclude:
case DocInclude::DontIncWithLines:
@@ -471,16 +475,16 @@ void RTFDocVisitor::visit(DocInclude *inc)
m_t << inc->text();
break;
case DocInclude::VerbInclude:
- m_t << "{" << endl;
- m_t << "\\par" << endl;
+ m_t << "{\n";
+ m_t << "\\par\n";
m_t << rtf_Style_Reset << getStyle("CodeExample");
filter(inc->text());
m_t << "\\par";
- m_t << "}" << endl;
+ m_t << "}\n";
break;
case DocInclude::Snippet:
- m_t << "{" << endl;
- if (!m_lastIsPara) m_t << "\\par" << endl;
+ m_t << "{\n";
+ if (!m_lastIsPara) m_t << "\\par\n";
m_t << rtf_Style_Reset << getStyle("CodeExample");
getCodeParser(inc->extension()).parseCode(m_ci,
inc->context(),
@@ -493,10 +497,10 @@ void RTFDocVisitor::visit(DocInclude *inc)
break;
case DocInclude::SnipWithLines:
{
- QFileInfo cfi( inc->file() );
- FileDef *fd = createFileDef( cfi.dirPath().utf8(), cfi.fileName().utf8() );
- m_t << "{" << endl;
- if (!m_lastIsPara) m_t << "\\par" << endl;
+ FileInfo cfi( inc->file().str() );
+ FileDef *fd = createFileDef( cfi.dirPath(), cfi.fileName() );
+ m_t << "{\n";
+ if (!m_lastIsPara) m_t << "\\par\n";
m_t << rtf_Style_Reset << getStyle("CodeExample");
getCodeParser(inc->extension()).parseCode(m_ci,
inc->context(),
@@ -527,7 +531,7 @@ void RTFDocVisitor::visit(DocInclude *inc)
void RTFDocVisitor::visit(DocIncOperator *op)
{
//printf("DocIncOperator: type=%d first=%d, last=%d text='%s'\n",
- // op->type(),op->isFirst(),op->isLast(),op->text().data());
+ // op->type(),op->isFirst(),op->isLast(),qPrint(op->text()));
DBG_RTF("{\\comment RTFDocVisitor::visit(DocIncOperator)}\n");
QCString locLangExt = getFileNameExtension(op->includeFileName());
if (locLangExt.isEmpty()) locLangExt = m_langExt;
@@ -536,8 +540,8 @@ void RTFDocVisitor::visit(DocIncOperator *op)
{
if (!m_hide)
{
- m_t << "{" << endl;
- m_t << "\\par" << endl;
+ m_t << "{\n";
+ m_t << "\\par\n";
m_t << rtf_Style_Reset << getStyle("CodeExample");
}
pushHidden(m_hide);
@@ -551,8 +555,8 @@ void RTFDocVisitor::visit(DocIncOperator *op)
FileDef *fd = 0;
if (!op->includeFileName().isEmpty())
{
- QFileInfo cfi( op->includeFileName() );
- fd = createFileDef( cfi.dirPath().utf8(), cfi.fileName().utf8() );
+ FileInfo cfi( op->includeFileName().str() );
+ fd = createFileDef( cfi.dirPath(), cfi.fileName() );
}
getCodeParser(locLangExt).parseCode(m_ci,op->context(),op->text(),langExt,
@@ -575,13 +579,13 @@ void RTFDocVisitor::visit(DocIncOperator *op)
if (!m_hide)
{
m_t << "\\par";
- m_t << "}" << endl;
+ m_t << "}\n";
}
m_lastIsPara=TRUE;
}
else
{
- if (!m_hide) m_t << endl;
+ if (!m_hide) m_t << "\n";
m_lastIsPara=FALSE;
}
}
@@ -611,7 +615,7 @@ void RTFDocVisitor::visit(DocIndexEntry *i)
{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visit(DocIndexEntry)}\n");
- m_t << "{\\xe \\v " << i->entry() << "}" << endl;
+ m_t << "{\\xe \\v " << i->entry() << "}\n";
m_lastIsPara=FALSE;
}
@@ -651,7 +655,7 @@ void RTFDocVisitor::visitPre(DocAutoList *l)
{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocAutoList)}\n");
- m_t << "{" << endl;
+ m_t << "{\n";
rtf_listItemInfo[m_indentLevel].isEnum = l->isEnumList();
rtf_listItemInfo[m_indentLevel].number = 1;
m_lastIsPara=FALSE;
@@ -662,26 +666,26 @@ void RTFDocVisitor::visitPost(DocAutoList *)
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocAutoList)}\n");
if (!m_lastIsPara) m_t << "\\par";
- m_t << "}" << endl;
+ m_t << "}\n";
m_lastIsPara=TRUE;
- if (!m_indentLevel) m_t << "\\par" << endl;
+ if (!m_indentLevel) m_t << "\\par\n";
}
void RTFDocVisitor::visitPre(DocAutoListItem *)
{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocAutoListItem)}\n");
- if (!m_lastIsPara) m_t << "\\par" << endl;
+ if (!m_lastIsPara) m_t << "\\par\n";
m_t << rtf_Style_Reset;
if (rtf_listItemInfo[m_indentLevel].isEnum)
{
- m_t << getStyle("ListEnum") << endl;
+ m_t << getStyle("ListEnum") << "\n";
m_t << rtf_listItemInfo[m_indentLevel].number << ".\\tab ";
rtf_listItemInfo[m_indentLevel].number++;
}
else
{
- m_t << getStyle("ListBullet") << endl;
+ m_t << getStyle("ListBullet") << "\n";
}
incIndentLevel();
m_lastIsPara=FALSE;
@@ -709,7 +713,7 @@ void RTFDocVisitor::visitPost(DocPara *p)
)
)
{
- m_t << "\\par" << endl;
+ m_t << "\\par\n";
m_lastIsPara=TRUE;
}
}
@@ -719,14 +723,14 @@ void RTFDocVisitor::visitPre(DocRoot *r)
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocRoot)}\n");
if (r->indent()) incIndentLevel();
- m_t << "{" << rtf_Style["BodyText"].reference() << endl;
+ m_t << "{" << rtf_Style["BodyText"].reference() << "\n";
}
void RTFDocVisitor::visitPost(DocRoot *r)
{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocRoot)}\n");
- if (!m_lastIsPara && !r->singleLine()) m_t << "\\par" << endl;
+ if (!m_lastIsPara && !r->singleLine()) m_t << "\\par\n";
m_t << "}";
m_lastIsPara=TRUE;
if (r->indent()) decIndentLevel();
@@ -736,10 +740,10 @@ void RTFDocVisitor::visitPre(DocSimpleSect *s)
{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocSimpleSect)}\n");
- if (!m_lastIsPara) m_t << "\\par" << endl;
+ if (!m_lastIsPara) m_t << "\\par\n";
m_t << "{"; // start desc
//m_t << "{\\b "; // start bold
- m_t << "{" << rtf_Style["Heading5"].reference() << endl;
+ m_t << "{" << rtf_Style["Heading5"].reference() << "\n";
switch(s->type())
{
case DocSimpleSect::See:
@@ -793,7 +797,7 @@ void RTFDocVisitor::visitPost(DocSimpleSect *s)
{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocSimpleSect)}\n");
- if (!m_lastIsPara) m_t << "\\par" << endl;
+ if (!m_lastIsPara) m_t << "\\par\n";
decIndentLevel();
if (s->type()!=DocSimpleSect::User && s->type()!=DocSimpleSect::Rcs) m_t << "}";
m_t << "}"; // end desc
@@ -809,7 +813,7 @@ void RTFDocVisitor::visitPost(DocTitle *)
{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocTitle)}\n");
- m_t << "\\par" << endl;
+ m_t << "\\par\n";
m_t << "}"; // end bold
incIndentLevel();
m_t << rtf_Style_Reset << getStyle("DescContinue");
@@ -820,7 +824,7 @@ void RTFDocVisitor::visitPre(DocSimpleList *)
{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocSimpleSect)}\n");
- m_t << "{" << endl;
+ m_t << "{\n";
rtf_listItemInfo[m_indentLevel].isEnum = FALSE;
m_lastIsPara=FALSE;
}
@@ -829,8 +833,8 @@ void RTFDocVisitor::visitPost(DocSimpleList *)
{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocSimpleSect)}\n");
- if (!m_lastIsPara) m_t << "\\par" << endl;
- m_t << "}" << endl;
+ if (!m_lastIsPara) m_t << "\\par\n";
+ m_t << "}\n";
m_lastIsPara=TRUE;
}
@@ -838,7 +842,7 @@ void RTFDocVisitor::visitPre(DocSimpleListItem *)
{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocSimpleListItem)}\n");
- m_t << "\\par" << rtf_Style_Reset << getStyle("ListBullet") << endl;
+ m_t << "\\par" << rtf_Style_Reset << getStyle("ListBullet") << "\n";
m_lastIsPara=FALSE;
incIndentLevel();
}
@@ -853,22 +857,22 @@ void RTFDocVisitor::visitPre(DocSection *s)
{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocSection)}\n");
- if (!m_lastIsPara) m_t << "\\par" << endl;
- m_t << "{\\bkmkstart " << rtfFormatBmkStr(s->file()+"_"+s->anchor()) << "}" << endl;
- m_t << "{\\bkmkend " << rtfFormatBmkStr(s->file()+"_"+s->anchor()) << "}" << endl;
+ if (!m_lastIsPara) m_t << "\\par\n";
+ m_t << "{\\bkmkstart " << rtfFormatBmkStr(s->file()+"_"+s->anchor()) << "}\n";
+ m_t << "{\\bkmkend " << rtfFormatBmkStr(s->file()+"_"+s->anchor()) << "}\n";
m_t << "{{" // start section
<< rtf_Style_Reset;
QCString heading;
- int level = QMIN(s->level()+1,4);
+ int level = std::min(s->level()+1,4);
heading.sprintf("Heading%d",level);
// set style
- m_t << rtf_Style[heading.str()].reference() << endl;
+ m_t << rtf_Style[heading.str()].reference() << "\n";
// make table of contents entry
filter(s->title());
- m_t << endl << "\\par" << "}" << endl;
+ m_t << "\n\\par" << "}\n";
m_t << "{\\tc\\tcl" << level << " \\v ";
filter(s->title());
- m_t << "}" << endl;
+ m_t << "}\n";
m_lastIsPara=TRUE;
}
@@ -876,7 +880,7 @@ void RTFDocVisitor::visitPost(DocSection *)
{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocSection)}\n");
- m_t << "\\par}" << endl; // end section
+ m_t << "\\par}\n"; // end section
m_lastIsPara=TRUE;
}
@@ -884,7 +888,7 @@ void RTFDocVisitor::visitPre(DocHtmlList *l)
{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlList)}\n");
- m_t << "{" << endl;
+ m_t << "{\n";
rtf_listItemInfo[m_indentLevel].isEnum = l->type()==DocHtmlList::Ordered;
rtf_listItemInfo[m_indentLevel].number = 1;
m_lastIsPara=FALSE;
@@ -894,7 +898,7 @@ void RTFDocVisitor::visitPost(DocHtmlList *)
{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlList)}\n");
- m_t << "\\par" << "}" << endl;
+ m_t << "\\par" << "}\n";
m_lastIsPara=TRUE;
}
@@ -902,17 +906,17 @@ void RTFDocVisitor::visitPre(DocHtmlListItem *)
{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlListItem)}\n");
- m_t << "\\par" << endl;
+ m_t << "\\par\n";
m_t << rtf_Style_Reset;
if (rtf_listItemInfo[m_indentLevel].isEnum)
{
- m_t << getStyle("ListEnum") << endl;
+ m_t << getStyle("ListEnum") << "\n";
m_t << rtf_listItemInfo[m_indentLevel].number << ".\\tab ";
rtf_listItemInfo[m_indentLevel].number++;
}
else
{
- m_t << getStyle("ListBullet") << endl;
+ m_t << getStyle("ListBullet") << "\n";
}
incIndentLevel();
m_lastIsPara=FALSE;
@@ -928,7 +932,7 @@ void RTFDocVisitor::visitPre(DocHtmlDescList *)
{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlDescList)}\n");
- //m_t << "{" << endl;
+ //m_t << "{\n";
//m_t << rtf_Style_Reset << getStyle("ListContinue");
//m_lastIsPara=FALSE;
}
@@ -937,8 +941,8 @@ void RTFDocVisitor::visitPost(DocHtmlDescList *)
{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlDescList)}\n");
- //m_t << "}" << endl;
- //m_t << "\\par" << endl;
+ //m_t << "}\n";
+ //m_t << "\\par\n";
//m_lastIsPara=TRUE;
}
@@ -946,9 +950,9 @@ void RTFDocVisitor::visitPre(DocHtmlDescTitle *)
{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlDescTitle)}\n");
- //m_t << "\\par" << endl;
+ //m_t << "\\par\n";
//m_t << "{\\b ";
- m_t << "{" << rtf_Style["Heading5"].reference() << endl;
+ m_t << "{" << rtf_Style["Heading5"].reference() << "\n";
m_lastIsPara=FALSE;
}
@@ -956,8 +960,8 @@ void RTFDocVisitor::visitPost(DocHtmlDescTitle *)
{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlDescTitle)}\n");
- m_t << "\\par" << endl;
- m_t << "}" << endl;
+ m_t << "\\par\n";
+ m_t << "}\n";
m_lastIsPara=TRUE;
}
@@ -974,7 +978,7 @@ void RTFDocVisitor::visitPost(DocHtmlDescData *)
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlDescData)}\n");
m_t << "\\par";
- m_t << "}" << endl;
+ m_t << "}\n";
decIndentLevel();
m_lastIsPara=TRUE;
}
@@ -983,7 +987,7 @@ void RTFDocVisitor::visitPre(DocHtmlTable *)
{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlTable)}\n");
- if (!m_lastIsPara) m_t << "\\par" << endl;
+ if (!m_lastIsPara) m_t << "\\par\n";
m_lastIsPara=TRUE;
}
@@ -991,8 +995,8 @@ void RTFDocVisitor::visitPost(DocHtmlTable *)
{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlTable)}\n");
- m_t << "\\pard\\plain" << endl;
- m_t << "\\par" << endl;
+ m_t << "\\pard\\plain\n";
+ m_t << "\\par\n";
m_lastIsPara=TRUE;
}
@@ -1006,7 +1010,7 @@ void RTFDocVisitor::visitPre(DocHtmlCaption *)
void RTFDocVisitor::visitPost(DocHtmlCaption *)
{
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlCaption)}\n");
- m_t << "}\n\\par" << endl;
+ m_t << "}\n\\par\n";
}
void RTFDocVisitor::visitPre(DocHtmlRow *r)
@@ -1020,7 +1024,7 @@ void RTFDocVisitor::visitPre(DocHtmlRow *r)
"\\trbrdrb\\brdrs\\brdrw10 "
"\\trbrdrr\\brdrs\\brdrw10 "
"\\trbrdrh\\brdrs\\brdrw10 "
- "\\trbrdrv\\brdrs\\brdrw10 "<< endl;
+ "\\trbrdrv\\brdrs\\brdrw10 \n";
for (i=0;i<r->numCells();i++)
{
if (r->isHeading())
@@ -1032,9 +1036,9 @@ void RTFDocVisitor::visitPre(DocHtmlRow *r)
"\\clbrdrb\\brdrs\\brdrw10 "
"\\clbrdrr \\brdrs\\brdrw10 "
"\\cltxlrtb "
- "\\cellx" << ((i+1)*columnWidth) << endl;
+ "\\cellx" << ((i+1)*columnWidth) << "\n";
}
- m_t << "\\pard \\widctlpar\\intbl\\adjustright" << endl;
+ m_t << "\\pard \\widctlpar\\intbl\\adjustright\n";
m_lastIsPara=FALSE;
}
@@ -1042,9 +1046,9 @@ void RTFDocVisitor::visitPost(DocHtmlRow *)
{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlRow)}\n");
- m_t << endl;
- m_t << "\\pard \\widctlpar\\intbl\\adjustright" << endl;
- m_t << "{\\row }" << endl;
+ m_t << "\n";
+ m_t << "\\pard \\widctlpar\\intbl\\adjustright\n";
+ m_t << "{\\row }\n";
m_lastIsPara=FALSE;
}
@@ -1072,7 +1076,7 @@ void RTFDocVisitor::visitPre(DocInternal *)
//m_t << "{\\b "; // start bold
//m_t << theTranslator->trForInternalUseOnly();
//m_t << "}"; // end bold
- //m_t << "\\par" << endl;
+ //m_t << "\\par\n";
//incIndentLevel();
//m_t << rtf_Style_Reset << getStyle("DescContinue");
//m_lastIsPara=FALSE;
@@ -1150,7 +1154,7 @@ void RTFDocVisitor::visitPre(DocHtmlHeader *header)
m_t << "{" // start section
<< rtf_Style_Reset;
QCString heading;
- int level = QMIN(header->level(),5);
+ int level = std::min(header->level(),5);
heading.sprintf("Heading%d",level);
// set style
m_t << rtf_Style[heading.str()].reference();
@@ -1165,7 +1169,7 @@ void RTFDocVisitor::visitPost(DocHtmlHeader *)
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlHeader)}\n");
// close open table of contents entry
m_t << "} \\par";
- m_t << "}" << endl; // end section
+ m_t << "}\n"; // end section
m_lastIsPara=TRUE;
}
@@ -1174,24 +1178,24 @@ void RTFDocVisitor::visitPre(DocImage *img)
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocImage)}\n");
includePicturePreRTF(img->name(), img->type()==DocImage::Rtf, img->hasCaption(), img->isInlineImage());
}
-void RTFDocVisitor::includePicturePreRTF(const QCString name, bool isTypeRTF, bool hasCaption, bool inlineImage)
+void RTFDocVisitor::includePicturePreRTF(const QCString &name, bool isTypeRTF, bool hasCaption, bool inlineImage)
{
if (isTypeRTF)
{
if (!inlineImage)
{
- m_t << "\\par" << endl;
- m_t << "{" << endl;
- m_t << rtf_Style_Reset << endl;
- if (hasCaption || m_lastIsPara) m_t << "\\par" << endl;
+ m_t << "\\par\n";
+ m_t << "{\n";
+ m_t << rtf_Style_Reset << "\n";
+ if (hasCaption || m_lastIsPara) m_t << "\\par\n";
m_t << "\\pard \\qc ";
}
m_t << "{ \\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"";
m_t << name;
- m_t << "\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt Image}}" << endl;
+ m_t << "\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt Image}}\n";
if (!inlineImage)
{
- m_t << "\\par" << endl;
+ m_t << "\\par\n";
if (hasCaption)
{
m_t << "\\pard \\qc \\b";
@@ -1230,12 +1234,12 @@ void RTFDocVisitor::includePicturePostRTF(bool isTypeRTF, bool hasCaption, bool
{
if (hasCaption)
{
- m_t << "}" <<endl;
- m_t << "\\par}" <<endl;
+ m_t << "}\n";
+ m_t << "\\par}\n";
}
else
{
- m_t << "}" <<endl;
+ m_t << "}\n";
}
}
}
@@ -1302,7 +1306,7 @@ void RTFDocVisitor::visitPre(DocRef *ref)
// ref->anchor() for LaTeX/RTF
if (ref->isSubPage())
{
- startLink(ref->ref(),0,ref->anchor());
+ startLink(ref->ref(),QCString(),ref->anchor());
}
else
{
@@ -1334,10 +1338,10 @@ void RTFDocVisitor::visitPre(DocSecRefList *)
{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocSecRefList)}\n");
- m_t << "{" << endl;
+ m_t << "{\n";
incIndentLevel();
- m_t << rtf_Style_Reset << getStyle("LatexTOC") << endl;
- m_t << "\\par" << endl;
+ m_t << rtf_Style_Reset << getStyle("LatexTOC") << "\n";
+ m_t << "\\par\n";
m_lastIsPara=TRUE;
}
@@ -1347,7 +1351,7 @@ void RTFDocVisitor::visitPost(DocSecRefList *)
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocSecRefList)}\n");
decIndentLevel();
m_t << "\\par";
- m_t << "}" << endl;
+ m_t << "}\n";
m_lastIsPara=TRUE;
}
@@ -1356,9 +1360,9 @@ void RTFDocVisitor::visitPre(DocParamSect *s)
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocParamSect)}\n");
m_t << "{"; // start param list
- if (!m_lastIsPara) m_t << "\\par" << endl;
+ if (!m_lastIsPara) m_t << "\\par\n";
//m_t << "{\\b "; // start bold
- m_t << "{" << rtf_Style["Heading5"].reference() << endl;
+ m_t << "{" << rtf_Style["Heading5"].reference() << "\n";
switch(s->type())
{
case DocParamSect::Param:
@@ -1373,7 +1377,7 @@ void RTFDocVisitor::visitPre(DocParamSect *s)
ASSERT(0);
}
m_t << "\\par";
- m_t << "}" << endl;
+ m_t << "}\n";
bool useTable = s->type()==DocParamSect::Param ||
s->type()==DocParamSect::RetVal ||
s->type()==DocParamSect::Exception ||
@@ -1390,7 +1394,7 @@ void RTFDocVisitor::visitPost(DocParamSect *s)
{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocParamSect)}\n");
- //m_t << "\\par" << endl;
+ //m_t << "\\par\n";
bool useTable = s->type()==DocParamSect::Param ||
s->type()==DocParamSect::RetVal ||
s->type()==DocParamSect::Exception ||
@@ -1399,7 +1403,7 @@ void RTFDocVisitor::visitPost(DocParamSect *s)
{
decIndentLevel();
}
- m_t << "}" << endl;
+ m_t << "}\n";
}
void RTFDocVisitor::visitPre(DocParamList *pl)
@@ -1436,7 +1440,7 @@ void RTFDocVisitor::visitPre(DocParamList *pl)
"\\trbrdrb\\brdrs\\brdrw10\\brdrcf15 "
"\\trbrdrr\\brdrs\\brdrw10\\brdrcf15 "
"\\trbrdrh\\brdrs\\brdrw10\\brdrcf15 "
- "\\trbrdrv\\brdrs\\brdrw10\\brdrcf15 "<< endl;
+ "\\trbrdrv\\brdrs\\brdrw10\\brdrcf15 "<< "\n";
for (i=0;i<columnPos[config][0];i++)
{
m_t << "\\clvertalt\\clbrdrt\\brdrs\\brdrw10\\brdrcf15 "
@@ -1444,9 +1448,9 @@ void RTFDocVisitor::visitPre(DocParamList *pl)
"\\clbrdrb\\brdrs\\brdrw10\\brdrcf15 "
"\\clbrdrr \\brdrs\\brdrw10\\brdrcf15 "
"\\cltxlrtb "
- "\\cellx" << (rtf_pageWidth*columnPos[config][i+1]/100) << endl;
+ "\\cellx" << (rtf_pageWidth*columnPos[config][i+1]/100) << "\n";
}
- m_t << "\\pard \\widctlpar\\intbl\\adjustright" << endl;
+ m_t << "\\pard \\widctlpar\\intbl\\adjustright\n";
}
if (sect && sect->hasInOutSpecifier())
@@ -1553,13 +1557,13 @@ void RTFDocVisitor::visitPost(DocParamList *pl)
parentType==DocParamSect::TemplateParam;
if (useTable)
{
- m_t << "\\cell }" << endl;
- //m_t << "\\pard \\widctlpar\\intbl\\adjustright" << endl;
- m_t << "{\\row }" << endl;
+ m_t << "\\cell }\n";
+ //m_t << "\\pard \\widctlpar\\intbl\\adjustright\n";
+ m_t << "{\\row }\n";
}
else
{
- m_t << "\\par" << endl;
+ m_t << "\\par\n";
}
m_lastIsPara=TRUE;
@@ -1573,12 +1577,12 @@ void RTFDocVisitor::visitPre(DocXRefItem *x)
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocXRefItem)}\n");
if (!m_lastIsPara)
{
- m_t << "\\par" << endl;
+ m_t << "\\par\n";
m_lastIsPara=TRUE;
}
m_t << "{"; // start param list
//m_t << "{\\b "; // start bold
- m_t << "{" << rtf_Style["Heading5"].reference() << endl;
+ m_t << "{" << rtf_Style["Heading5"].reference() << "\n";
if (Config_getBool(RTF_HYPERLINKS) && !anonymousEnum)
{
QCString refName;
@@ -1624,9 +1628,9 @@ void RTFDocVisitor::visitPost(DocXRefItem *x)
if (m_hide) return;
if (x->title().isEmpty()) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocXRefItem)}\n");
- m_t << "\\par" << endl;
+ m_t << "\\par\n";
decIndentLevel();
- m_t << "}" << endl; // end xref item
+ m_t << "}\n"; // end xref item
m_lastIsPara=TRUE;
}
@@ -1661,7 +1665,7 @@ void RTFDocVisitor::visitPre(DocHtmlBlockQuote *)
{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlBlockQuote)}\n");
- if (!m_lastIsPara) m_t << "\\par" << endl;
+ if (!m_lastIsPara) m_t << "\\par\n";
m_t << "{"; // start desc
incIndentLevel();
m_t << rtf_Style_Reset << getStyle("DescContinue");
@@ -1671,7 +1675,7 @@ void RTFDocVisitor::visitPost(DocHtmlBlockQuote *)
{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlBlockQuote)}\n");
- if (!m_lastIsPara) m_t << "\\par" << endl;
+ if (!m_lastIsPara) m_t << "\\par\n";
decIndentLevel();
m_t << "}"; // end desc
m_lastIsPara=TRUE;
@@ -1705,11 +1709,11 @@ void RTFDocVisitor::visitPost(DocParBlock *)
// return s;
//}
-void RTFDocVisitor::filter(const char *str,bool verbatim)
+void RTFDocVisitor::filter(const QCString &str,bool verbatim)
{
- if (str)
+ if (!str.isEmpty())
{
- const unsigned char *p=(const unsigned char *)str;
+ const unsigned char *p=(const unsigned char *)str.data();
unsigned char c;
//unsigned char pc='\0';
while (*p)
@@ -1737,7 +1741,7 @@ void RTFDocVisitor::filter(const char *str,bool verbatim)
case '\\': m_t << "\\\\"; break;
case '\n': if (verbatim)
{
- m_t << "\\par" << endl;
+ m_t << "\\par\n";
}
else
{
@@ -1760,11 +1764,11 @@ void RTFDocVisitor::startLink(const QCString &ref,const QCString &file,const QCS
{
refName+=file;
}
- if (!file.isEmpty() && anchor)
+ if (!file.isEmpty() && !anchor.isEmpty())
{
refName+='_';
}
- if (anchor)
+ if (!anchor.isEmpty())
{
refName+=anchor;
}
diff --git a/src/rtfdocvisitor.h b/src/rtfdocvisitor.h
index 5cb5de3..01be1aa 100644
--- a/src/rtfdocvisitor.h
+++ b/src/rtfdocvisitor.h
@@ -19,17 +19,19 @@
#ifndef _RTFDOCVISITOR_H
#define _RTFDOCVISITOR_H
+#include <iostream>
+
#include "docvisitor.h"
-#include <qcstring.h>
+#include "qcstring.h"
-class FTextStream;
class CodeOutputInterface;
+class TextStream;
/*! @brief Concrete visitor implementation for RTF output. */
class RTFDocVisitor : public DocVisitor
{
public:
- RTFDocVisitor(FTextStream &t,CodeOutputInterface &ci,const char *langExt);
+ RTFDocVisitor(TextStream &t,CodeOutputInterface &ci,const QCString &langExt);
//--------------------------------------
// visitor functions for leaf nodes
@@ -140,15 +142,15 @@ class RTFDocVisitor : public DocVisitor
// helper functions
//--------------------------------------
- void filter(const char *str,bool verbatim=FALSE);
+ void filter(const QCString &str,bool verbatim=FALSE);
void startLink(const QCString &ref,const QCString &file,
const QCString &anchor);
void endLink(const QCString &ref);
- QCString getStyle(const char *name);
+ QCString getStyle(const QCString &name);
void incIndentLevel();
void decIndentLevel();
- void includePicturePreRTF(const QCString name, bool isTypeRTF, bool hasCaption, bool inlineImage = FALSE);
+ void includePicturePreRTF(const QCString &name, bool isTypeRTF, bool hasCaption, bool inlineImage = FALSE);
void includePicturePostRTF(bool isTypeRTF, bool hasCaption, bool inlineImage = FALSE);
void writeDotFile(const QCString &fileName, bool hasCaption);
void writeDotFile(DocDotFile *);
@@ -161,7 +163,7 @@ class RTFDocVisitor : public DocVisitor
// state variables
//--------------------------------------
- FTextStream &m_t;
+ TextStream &m_t;
CodeOutputInterface &m_ci;
bool m_insidePre;
bool m_hide;
diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp
index debda5c..0fac0b4 100644
--- a/src/rtfgen.cpp
+++ b/src/rtfgen.cpp
@@ -21,8 +21,6 @@
#include <ctime>
#include <stdlib.h>
-#include <qdir.h>
-
#include "rtfgen.h"
#include "config.h"
#include "message.h"
@@ -47,6 +45,8 @@
#include "classlist.h"
#include "filename.h"
#include "namespacedef.h"
+#include "dir.h"
+#include "utf8.h"
//#define DBG_RTF(x) x;
@@ -98,9 +98,8 @@ void RTFGenerator::setSourceFileName(const QCString &name)
m_sourceFileName = name;
}
-void RTFGenerator::writeStyleSheetFile(QFile &file)
+void RTFGenerator::writeStyleSheetFile(TextStream &t)
{
- FTextStream t(&file);
t << "# Generated by doxygen " << getDoxygenVersion() << "\n\n";
t << "# This file describes styles used for generating RTF output.\n";
t << "# All text after a hash (#) is considered a comment and will be ignored.\n";
@@ -111,13 +110,12 @@ void RTFGenerator::writeStyleSheetFile(QFile &file)
{
t << "# " << rtf_Style_Default[i].name << " = "
<< rtf_Style_Default[i].reference
- << rtf_Style_Default[i].definition << endl;
+ << rtf_Style_Default[i].definition << "\n";
}
}
-void RTFGenerator::writeExtensionsFile(QFile &file)
+void RTFGenerator::writeExtensionsFile(TextStream &t)
{
- FTextStream t(&file);
t << "# Generated by doxygen " << getDoxygenVersion() << "\n\n";
t << "# This file describes extensions used for generating RTF output.\n";
t << "# All text after a hash (#) is considered a comment and will be ignored.\n";
@@ -171,10 +169,10 @@ void RTFGenerator::writeExtensionsFile(QFile &file)
void RTFGenerator::init()
{
QCString dir=Config_getString(RTF_OUTPUT);
- QDir d(dir);
- if (!d.exists() && !d.mkdir(dir))
+ Dir d(dir.str());
+ if (!d.exists() && !d.mkdir(dir.str()))
{
- term("Could not create output directory %s\n",dir.data());
+ term("Could not create output directory %s\n",qPrint(dir));
}
// first duplicate strings of rtf_Style_Default
@@ -209,7 +207,7 @@ void RTFGenerator::init()
createSubDirs(d);
}
-static QCString makeIndexName(const char *s,int i)
+static QCString makeIndexName(const QCString &s,int i)
{
QCString result=s;
result+=(char)(i+'0');
@@ -221,77 +219,77 @@ void RTFGenerator::beginRTFDocument()
/* all the included RTF files should begin with the
* same header
*/
- t <<"{\\rtf1\\ansi\\ansicpg" << theTranslator->trRTFansicp();
- t <<"\\uc1 \\deff0\\deflang1033\\deflangfe1033\n";
-
- DBG_RTF(t <<"{\\comment Beginning font list}\n")
- t <<"{\\fonttbl ";
- t <<"{\\f0\\froman\\fcharset" << theTranslator->trRTFCharSet();
- t <<"\\fprq2{\\*\\panose 02020603050405020304}Times New Roman;}\n";
- t <<"{\\f1\\fswiss\\fcharset" << theTranslator->trRTFCharSet();
- t <<"\\fprq2{\\*\\panose 020b0604020202020204}Arial;}\n";
- t <<"{\\f2\\fmodern\\fcharset" << theTranslator->trRTFCharSet();
- t <<"\\fprq1{\\*\\panose 02070309020205020404}Courier New;}\n";
- t <<"{\\f3\\froman\\fcharset2\\fprq2{\\*\\panose 05050102010706020507}Symbol;}\n";
- t <<"}\n";
- DBG_RTF(t <<"{\\comment begin colors}\n")
- t <<"{\\colortbl;";
- t <<"\\red0\\green0\\blue0;";
- t <<"\\red0\\green0\\blue255;";
- t <<"\\red0\\green255\\blue255;";
- t <<"\\red0\\green255\\blue0;";
- t <<"\\red255\\green0\\blue255;";
- t <<"\\red255\\green0\\blue0;";
- t <<"\\red255\\green255\\blue0;";
- t <<"\\red255\\green255\\blue255;";
- t <<"\\red0\\green0\\blue128;";
- t <<"\\red0\\green128\\blue128;";
- t <<"\\red0\\green128\\blue0;";
- t <<"\\red128\\green0\\blue128;";
- t <<"\\red128\\green0\\blue0;";
- t <<"\\red128\\green128\\blue0;";
- t <<"\\red128\\green128\\blue128;";
- t <<"\\red192\\green192\\blue192;";
+ m_t << "{\\rtf1\\ansi\\ansicpg" << theTranslator->trRTFansicp();
+ m_t << "\\uc1 \\deff0\\deflang1033\\deflangfe1033\n";
+
+ DBG_RTF(m_t << "{\\comment Beginning font list}\n")
+ m_t << "{\\fonttbl ";
+ m_t << "{\\f0\\froman\\fcharset" << theTranslator->trRTFCharSet();
+ m_t << "\\fprq2{\\*\\panose 02020603050405020304}Times New Roman;}\n";
+ m_t << "{\\f1\\fswiss\\fcharset" << theTranslator->trRTFCharSet();
+ m_t << "\\fprq2{\\*\\panose 020b0604020202020204}Arial;}\n";
+ m_t << "{\\f2\\fmodern\\fcharset" << theTranslator->trRTFCharSet();
+ m_t << "\\fprq1{\\*\\panose 02070309020205020404}Courier New;}\n";
+ m_t << "{\\f3\\froman\\fcharset2\\fprq2{\\*\\panose 05050102010706020507}Symbol;}\n";
+ m_t << "}\n";
+ DBG_RTF(m_t << "{\\comment begin colors}\n")
+ m_t << "{\\colortbl;";
+ m_t << "\\red0\\green0\\blue0;";
+ m_t << "\\red0\\green0\\blue255;";
+ m_t << "\\red0\\green255\\blue255;";
+ m_t << "\\red0\\green255\\blue0;";
+ m_t << "\\red255\\green0\\blue255;";
+ m_t << "\\red255\\green0\\blue0;";
+ m_t << "\\red255\\green255\\blue0;";
+ m_t << "\\red255\\green255\\blue255;";
+ m_t << "\\red0\\green0\\blue128;";
+ m_t << "\\red0\\green128\\blue128;";
+ m_t << "\\red0\\green128\\blue0;";
+ m_t << "\\red128\\green0\\blue128;";
+ m_t << "\\red128\\green0\\blue0;";
+ m_t << "\\red128\\green128\\blue0;";
+ m_t << "\\red128\\green128\\blue128;";
+ m_t << "\\red192\\green192\\blue192;";
// code highlighting colors. Note order is important see also RTFGenerator::startFontClass
- t <<"\\red0\\green128\\blue0;"; // keyword = index 17
- t <<"\\red96\\green64\\blue32;"; // keywordtype
- t <<"\\rede0\\green128\\blue0;"; // keywordflow
- t <<"\\red128\\green0\\blue0;"; // comment
- t <<"\\red128\\green96\\blue32;"; // preprocessor
- t <<"\\red0\\green32\\blue128;"; // stringliteral
- t <<"\\red0\\green128\\blue128;"; // charliteral
- t <<"\\red255\\green0\\blue255;"; // vhdldigit
- t <<"\\red0\\green0\\blue0;"; // vhdlchar
- t <<"\\red112\\green0\\blue112;"; // vhdlkeyword
- t <<"\\red255\\green0\\blue0;"; // vhdllogic
-
- t <<"}\n";
-
- DBG_RTF(t <<"{\\comment Beginning style list}\n")
- t <<"{\\stylesheet\n";
- t <<"{\\widctlpar\\adjustright \\fs20\\cgrid \\snext0 Normal;}\n";
+ m_t << "\\red0\\green128\\blue0;"; // keyword = index 17
+ m_t << "\\red96\\green64\\blue32;"; // keywordtype
+ m_t << "\\rede0\\green128\\blue0;"; // keywordflow
+ m_t << "\\red128\\green0\\blue0;"; // comment
+ m_t << "\\red128\\green96\\blue32;"; // preprocessor
+ m_t << "\\red0\\green32\\blue128;"; // stringliteral
+ m_t << "\\red0\\green128\\blue128;"; // charliteral
+ m_t << "\\red255\\green0\\blue255;"; // vhdldigit
+ m_t << "\\red0\\green0\\blue0;"; // vhdlchar
+ m_t << "\\red112\\green0\\blue112;"; // vhdlkeyword
+ m_t << "\\red255\\green0\\blue0;"; // vhdllogic
+
+ m_t << "}\n";
+
+ DBG_RTF(m_t << "{\\comment Beginning style list}\n")
+ m_t << "{\\stylesheet\n";
+ m_t << "{\\widctlpar\\adjustright \\fs20\\cgrid \\snext0 Normal;}\n";
// set the paper dimensions according to PAPER_TYPE
QCString paperName = Config_getEnum(PAPER_TYPE);
- t << "{";
+ m_t << "{";
if (paperName=="a4")
{
- t << "\\paperw11900\\paperh16840"; // width & height values are inches * 1440
+ m_t << "\\paperw11900\\paperh16840"; // width & height values are inches * 1440
}
else if (paperName=="letter")
{
- t << "\\paperw12240\\paperh15840";
+ m_t << "\\paperw12240\\paperh15840";
}
else if (paperName=="legal")
{
- t << "\\paperw12240\\paperh20160";
+ m_t << "\\paperw12240\\paperh20160";
}
else if (paperName=="executive")
{
- t << "\\paperw10440\\paperh15120";
+ m_t << "\\paperw10440\\paperh15120";
}
- t << "\\margl1800\\margr1800\\margt1440\\margb1440\\gutter0\\ltrsect}\n";
+ m_t << "\\margl1800\\margr1800\\margt1440\\margb1440\\gutter0\\ltrsect}\n";
// sort styles ascending by \s-number via an intermediate QArray
unsigned maxIndex = 0;
@@ -320,57 +318,57 @@ void RTFGenerator::beginRTFDocument()
const StyleData *pStyle = array[i];
if (pStyle)
{
- t <<"{" << pStyle->reference() << pStyle->definition() << ";}\n";
+ m_t << "{" << pStyle->reference() << pStyle->definition() << ";}\n";
}
}
- t <<"}" << endl;
+ m_t << "}\n";
// this comment is needed for postprocessing!
- t <<"{\\comment begin body}" << endl;
+ m_t << "{\\comment begin body}\n";
}
void RTFGenerator::beginRTFChapter()
{
- t <<"\n";
- DBG_RTF(t << "{\\comment BeginRTFChapter}\n")
- t << rtf_Style_Reset;
+ m_t << "\n";
+ DBG_RTF(m_t << "{\\comment BeginRTFChapter}\n")
+ m_t << rtf_Style_Reset;
// if we are compact, no extra page breaks...
if (Config_getBool(COMPACT_RTF))
{
- // t <<"\\sect\\sectd\\sbknone\n";
- t <<"\\sect\\sbknone\n";
+ // m_t << "\\sect\\sectd\\sbknone\n";
+ m_t << "\\sect\\sbknone\n";
rtfwriteRuler_thick();
}
else
- t <<"\\sect\\sbkpage\n";
- //t <<"\\sect\\sectd\\sbkpage\n";
+ m_t << "\\sect\\sbkpage\n";
+ //m_t << "\\sect\\sectd\\sbkpage\n";
- t << rtf_Style["Heading1"].reference() << "\n";
+ m_t << rtf_Style["Heading1"].reference() << "\n";
}
void RTFGenerator::beginRTFSection()
{
- t <<"\n";
- DBG_RTF(t << "{\\comment BeginRTFSection}\n")
- t << rtf_Style_Reset;
+ m_t << "\n";
+ DBG_RTF(m_t << "{\\comment BeginRTFSection}\n")
+ m_t << rtf_Style_Reset;
// if we are compact, no extra page breaks...
if (Config_getBool(COMPACT_RTF))
{
- t <<"\\sect\\sbknone\n";
+ m_t << "\\sect\\sbknone\n";
rtfwriteRuler_emboss();
}
else
{
- t <<"\\sect\\sbkpage\n";
+ m_t << "\\sect\\sbkpage\n";
}
- t << rtf_Style["Heading2"].reference() << "\n";
+ m_t << rtf_Style["Heading2"].reference() << "\n";
}
-void RTFGenerator::startFile(const char *name,const char *,const char *,int)
+void RTFGenerator::startFile(const QCString &name,const QCString &,const QCString &,int)
{
//setEncoding(QCString().sprintf("CP%s",theTranslator->trRTFansicp()));
QCString fileName=name;
@@ -385,8 +383,8 @@ void RTFGenerator::startFile(const char *name,const char *,const char *,int)
void RTFGenerator::endFile()
{
- DBG_RTF(t << "{\\comment endFile}\n")
- t << "}";
+ DBG_RTF(m_t << "{\\comment endFile}\n")
+ m_t << "}";
endPlainFile();
setSourceFileName("");
@@ -394,13 +392,13 @@ void RTFGenerator::endFile()
void RTFGenerator::startProjectNumber()
{
- DBG_RTF(t <<"{\\comment startProjectNumber }" << endl)
- t << " ";
+ DBG_RTF(m_t << "{\\comment startProjectNumber }\n")
+ m_t << " ";
}
void RTFGenerator::endProjectNumber()
{
- DBG_RTF(t <<"{\\comment endProjectNumber }" << endl)
+ DBG_RTF(m_t << "{\\comment endProjectNumber }\n")
}
void RTFGenerator::startIndexSection(IndexSections is)
@@ -415,19 +413,19 @@ void RTFGenerator::startIndexSection(IndexSections is)
// basic RTFstart
// get readyfor author etc
- t << "{\\info \n";
- t << "{\\title {\\comment ";
+ m_t << "{\\info \n";
+ m_t << "{\\title {\\comment ";
break;
case isTitlePageAuthor:
- t << "}\n";
- if (rtf_subject) t << "{\\subject " << rtf_subject << "}\n";
- if (rtf_comments) t << "{\\comment " << rtf_comments << "}\n";
- if (rtf_company) t << "{\\company " << rtf_company << "}\n";
- if (rtf_author) t << "{\\author " << rtf_author << "}\n";
- if (rtf_manager) t << "{\\manager " << rtf_manager << "}\n";
- if (rtf_documentType) t << "{\\category " << rtf_documentType << "}\n";
- if (rtf_keywords) t << "{\\keywords " << rtf_keywords << "}\n";
- t << "{\\comment ";
+ m_t << "}\n";
+ if (!rtf_subject.isEmpty()) m_t << "{\\subject " << rtf_subject << "}\n";
+ if (!rtf_comments.isEmpty()) m_t << "{\\comment " << rtf_comments << "}\n";
+ if (!rtf_company.isEmpty()) m_t << "{\\company " << rtf_company << "}\n";
+ if (!rtf_author.isEmpty()) m_t << "{\\author " << rtf_author << "}\n";
+ if (!rtf_manager.isEmpty()) m_t << "{\\manager " << rtf_manager << "}\n";
+ if (!rtf_documentType.isEmpty()) m_t << "{\\category " << rtf_documentType << "}\n";
+ if (!rtf_keywords.isEmpty()) m_t << "{\\keywords " << rtf_keywords << "}\n";
+ m_t << "{\\comment ";
break;
case isMainPage:
//Introduction
@@ -449,9 +447,13 @@ void RTFGenerator::startIndexSection(IndexSections is)
//Namespace Index
beginRTFChapter();
break;
+ case isConceptIndex:
+ //Concept Index
+ beginRTFChapter();
+ break;
case isClassHierarchyIndex:
//Hierarchical Index
- DBG_RTF(t << "{\\comment start classhierarchy}\n")
+ DBG_RTF(m_t << "{\\comment start classhierarchy}\n")
beginRTFChapter();
break;
case isCompoundIndex:
@@ -505,6 +507,19 @@ void RTFGenerator::startIndexSection(IndexSections is)
}
}
break;
+ case isConceptDocumentation:
+ {
+ // Concept Documentation
+ for (const auto &cd : *Doxygen::conceptLinkedMap)
+ {
+ if (cd->isLinkableInProject())
+ {
+ beginRTFChapter();
+ break;
+ }
+ }
+ }
+ break;
case isClassDocumentation:
{
//Compound Documentation
@@ -561,7 +576,7 @@ void RTFGenerator::startIndexSection(IndexSections is)
break;
case isPageDocumentation2:
{
- t << "{\\tc \\v ";
+ m_t << "{\\tc \\v ";
}
break;
case isEndIndex:
@@ -579,177 +594,187 @@ void RTFGenerator::endIndexSection(IndexSections is)
switch (is)
{
case isTitlePageStart:
- if (rtf_title)
+ if (!rtf_title.isEmpty())
// User has overridden document title in extensions file
- t << "}" << rtf_title;
+ m_t << "}" << rtf_title;
else
- t << "}" << projectName;
+ m_t << "}" << projectName;
break;
case isTitlePageAuthor:
{
- t << " doxygen" << getDoxygenVersion() << ".}\n";
- t << "{\\creatim " << dateToRTFDateString() << "}\n}";
- DBG_RTF(t << "{\\comment end of infoblock}\n");
+ m_t << " doxygen" << getDoxygenVersion() << ".}\n";
+ m_t << "{\\creatim " << dateToRTFDateString() << "}\n}";
+ DBG_RTF(m_t << "{\\comment end of infoblock}\n");
// setup for this section
- t << rtf_Style_Reset <<"\n";
- t <<"\\sectd\\pgnlcrm\n";
- t <<"{\\footer "<<rtf_Style["Footer"].reference() << "{\\chpgn}}\n";
+ m_t << rtf_Style_Reset <<"\n";
+ m_t << "\\sectd\\pgnlcrm\n";
+ m_t << "{\\footer "<<rtf_Style["Footer"].reference() << "{\\chpgn}}\n";
// the title entry
- DBG_RTF(t << "{\\comment begin title page}\n")
+ DBG_RTF(m_t << "{\\comment begin title page}\n")
- t << rtf_Style_Reset << rtf_Style["SubTitle"].reference() << endl; // set to title style
+ m_t << rtf_Style_Reset << rtf_Style["SubTitle"].reference() << "\n"; // set to title style
- t << "\\vertalc\\qc\\par\\par\\par\\par\\par\\par\\par\n";
- if (rtf_logoFilename)
+ m_t << "\\vertalc\\qc\\par\\par\\par\\par\\par\\par\\par\n";
+ if (!rtf_logoFilename.isEmpty())
{
- t << "{\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"" << rtf_logoFilename;
- t << "\" \\\\d \\\\*MERGEFORMAT} {\\fldrslt IMAGE }}\\par\\par\n";
+ m_t << "{\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"" << rtf_logoFilename;
+ m_t << "\" \\\\d \\\\*MERGEFORMAT} {\\fldrslt IMAGE }}\\par\\par\n";
}
- if (rtf_company)
+ if (!rtf_company.isEmpty())
{
- t << rtf_company << "\\par\\par\n";
+ m_t << rtf_company << "\\par\\par\n";
}
- t << rtf_Style_Reset << rtf_Style["Title"].reference() << endl; // set to title style
- if (rtf_title)
+ m_t << rtf_Style_Reset << rtf_Style["Title"].reference() << "\n"; // set to title style
+ if (!rtf_title.isEmpty())
+ {
// User has overridden document title in extensions file
- t << "{\\field\\fldedit {\\*\\fldinst TITLE \\\\*MERGEFORMAT}{\\fldrslt " << rtf_title << "}}\\par" << endl;
+ m_t << "{\\field\\fldedit {\\*\\fldinst TITLE \\\\*MERGEFORMAT}{\\fldrslt " << rtf_title << "}}\\par\n";
+ }
else
{
DocText *root = validatingParseText(projectName);
- t << "{\\field\\fldedit {\\*\\fldinst TITLE \\\\*MERGEFORMAT}{\\fldrslt ";
+ m_t << "{\\field\\fldedit {\\*\\fldinst TITLE \\\\*MERGEFORMAT}{\\fldrslt ";
writeDoc(root,0,0,0);
- t << "}}\\par" << endl;
-
+ m_t << "}}\\par\n";
}
- t << rtf_Style_Reset << rtf_Style["SubTitle"].reference() << endl; // set to title style
- t << "\\par\n";
- if (rtf_documentType)
+ m_t << rtf_Style_Reset << rtf_Style["SubTitle"].reference() << "\n"; // set to title style
+ m_t << "\\par\n";
+ if (!rtf_documentType.isEmpty())
{
- t << rtf_documentType << "\\par\n";
+ m_t << rtf_documentType << "\\par\n";
}
- if (rtf_documentId)
+ if (!rtf_documentId.isEmpty())
{
- t << rtf_documentId << "\\par\n";
+ m_t << rtf_documentId << "\\par\n";
}
- t << "\\par\\par\\par\\par\\par\\par\\par\\par\\par\\par\\par\\par\n";
+ m_t << "\\par\\par\\par\\par\\par\\par\\par\\par\\par\\par\\par\\par\n";
- t << rtf_Style_Reset << rtf_Style["SubTitle"].reference() << endl; // set to subtitle style
- if (rtf_author)
- t << "{\\field\\fldedit {\\*\\fldinst AUTHOR \\\\*MERGEFORMAT}{\\fldrslt "<< rtf_author << " }}\\par" << endl;
+ m_t << rtf_Style_Reset << rtf_Style["SubTitle"].reference() << "\n"; // set to subtitle style
+ if (!rtf_author.isEmpty())
+ {
+ m_t << "{\\field\\fldedit {\\*\\fldinst AUTHOR \\\\*MERGEFORMAT}{\\fldrslt "<< rtf_author << " }}\\par\n";
+ }
else
- t << "{\\field\\fldedit {\\*\\fldinst AUTHOR \\\\*MERGEFORMAT}{\\fldrslt AUTHOR}}\\par" << endl;
+ {
+ m_t << "{\\field\\fldedit {\\*\\fldinst AUTHOR \\\\*MERGEFORMAT}{\\fldrslt AUTHOR}}\\par\n";
+ }
- t << theTranslator->trVersion() << " " << Config_getString(PROJECT_NUMBER) << "\\par";
- t << "{\\field\\fldedit {\\*\\fldinst CREATEDATE \\\\*MERGEFORMAT}"
- "{\\fldrslt "<< dateToString(FALSE) << " }}\\par"<<endl;
- t << "\\page\\page";
- DBG_RTF(t << "{\\comment End title page}" << endl)
+ m_t << theTranslator->trVersion() << " " << Config_getString(PROJECT_NUMBER) << "\\par";
+ m_t << "{\\field\\fldedit {\\*\\fldinst CREATEDATE \\\\*MERGEFORMAT}"
+ "{\\fldrslt "<< dateToString(FALSE) << " }}\\par\n";
+ m_t << "\\page\\page";
+ DBG_RTF(m_t << "{\\comment End title page}\n")
// table of contents section
- DBG_RTF(t << "{\\comment Table of contents}\n")
- t << "\\vertalt\n";
- t << rtf_Style_Reset << endl;
- t << rtf_Style["Heading1"].reference();
- t << theTranslator->trRTFTableOfContents() << "\\par"<< endl;
- t << rtf_Style_Reset << "\\par" << endl;
- t << "{\\field\\fldedit {\\*\\fldinst TOC \\\\f \\\\*MERGEFORMAT}{\\fldrslt Table of contents}}\\par\n";
- t << rtf_Style_Reset << endl;
+ DBG_RTF(m_t << "{\\comment Table of contents}\n")
+ m_t << "\\vertalt\n";
+ m_t << rtf_Style_Reset << "\n";
+ m_t << rtf_Style["Heading1"].reference();
+ m_t << theTranslator->trRTFTableOfContents() << "\\par\n";
+ m_t << rtf_Style_Reset << "\\par\n";
+ m_t << "{\\field\\fldedit {\\*\\fldinst TOC \\\\f \\\\*MERGEFORMAT}{\\fldrslt Table of contents}}\\par\n";
+ m_t << rtf_Style_Reset << "\n";
}
break;
case isMainPage:
- t << "\\par " << rtf_Style_Reset << endl;
+ m_t << "\\par " << rtf_Style_Reset << "\n";
if (!mainPageHasTitle())
{
- t << "{\\tc \\v " << theTranslator->trMainPage() << "}"<< endl;
+ m_t << "{\\tc \\v " << theTranslator->trMainPage() << "}\n";
}
else
{
- t << "{\\tc \\v " << substitute(Doxygen::mainPage->title(),"%","") << "}"<< endl;
+ m_t << "{\\tc \\v " << substitute(Doxygen::mainPage->title(),"%","") << "}\n";
}
- t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
- //if (Config_getBool(GENERATE_TREEVIEW)) t << "main"; else t << "index";
- t << "index";
- t << ".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
+ m_t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
+ //if (Config_getBool(GENERATE_TREEVIEW)) m_t << "main"; else m_t << "index";
+ m_t << "index";
+ m_t << ".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
break;
//case isPackageIndex:
- // t << "\\par " << rtf_Style_Reset << endl;
- // t << "{\\tc \\v " << theTranslator->trPackageList() << "}"<< endl;
- // t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"packages.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
+ // m_t << "\\par " << rtf_Style_Reset << "\n";
+ // m_t << "{\\tc \\v " << theTranslator->trPackageList() << "}\n";
+ // m_t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"packages.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
// break;
case isModuleIndex:
- t << "\\par " << rtf_Style_Reset << endl;
- t << "{\\tc \\v " << theTranslator->trModuleIndex() << "}"<< endl;
- t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"modules.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
+ m_t << "\\par " << rtf_Style_Reset << "\n";
+ m_t << "{\\tc \\v " << theTranslator->trModuleIndex() << "}\n";
+ m_t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"modules.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
break;
case isDirIndex:
- t << "\\par " << rtf_Style_Reset << endl;
- t << "{\\tc \\v " << theTranslator->trDirIndex() << "}"<< endl;
- t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"dirs.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
+ m_t << "\\par " << rtf_Style_Reset << "\n";
+ m_t << "{\\tc \\v " << theTranslator->trDirIndex() << "}\n";
+ m_t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"dirs.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
break;
case isNamespaceIndex:
- t << "\\par " << rtf_Style_Reset << endl;
+ m_t << "\\par " << rtf_Style_Reset << "\n";
if (fortranOpt)
{
- t << "{\\tc \\v " << theTranslator->trModulesIndex() << "}" << endl;
+ m_t << "{\\tc \\v " << theTranslator->trModulesIndex() << "}\n";
}
else
{
- t << "{\\tc \\v " << theTranslator->trNamespaceIndex() << "}" << endl;
+ m_t << "{\\tc \\v " << theTranslator->trNamespaceIndex() << "}\n";
}
- t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"namespaces.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
+ m_t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"namespaces.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
+ break;
+ case isConceptIndex:
+ m_t << "\\par " << rtf_Style_Reset << "\n";
+ m_t << "{\\tc \\v " << theTranslator->trConceptIndex() << "}\n";
+ m_t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"concepts.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
break;
case isClassHierarchyIndex:
- t << "\\par " << rtf_Style_Reset << endl;
- t << "{\\tc \\v " << theTranslator->trHierarchicalIndex() << "}"<< endl;
- t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"hierarchy.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
+ m_t << "\\par " << rtf_Style_Reset << "\n";
+ m_t << "{\\tc \\v " << theTranslator->trHierarchicalIndex() << "}\n";
+ m_t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"hierarchy.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
break;
case isCompoundIndex:
- t << "\\par " << rtf_Style_Reset << endl;
+ m_t << "\\par " << rtf_Style_Reset << "\n";
if (fortranOpt)
{
- t << "{\\tc \\v " << theTranslator->trCompoundIndexFortran() << "}"<< endl;
+ m_t << "{\\tc \\v " << theTranslator->trCompoundIndexFortran() << "}\n";
}
else if (vhdlOpt)
{
- t << "{\\tc \\v " << theTranslator->trDesignUnitIndex() << "}"<< endl;
+ m_t << "{\\tc \\v " << theTranslator->trDesignUnitIndex() << "}\n";
}
else
{
- t << "{\\tc \\v " << theTranslator->trCompoundIndex() << "}"<< endl;
+ m_t << "{\\tc \\v " << theTranslator->trCompoundIndex() << "}\n";
}
- t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"annotated.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
+ m_t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"annotated.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
break;
case isFileIndex:
- t << "\\par " << rtf_Style_Reset << endl;
- t << "{\\tc \\v " << theTranslator->trFileIndex() << "}"<< endl;
- t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"files.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
+ m_t << "\\par " << rtf_Style_Reset << "\n";
+ m_t << "{\\tc \\v " << theTranslator->trFileIndex() << "}\n";
+ m_t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"files.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
break;
case isPageIndex:
- t << "\\par " << rtf_Style_Reset << endl;
- t << "{\\tc \\v " << theTranslator->trPageIndex() << "}"<< endl;
- t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"pages.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
+ m_t << "\\par " << rtf_Style_Reset << "\n";
+ m_t << "{\\tc \\v " << theTranslator->trPageIndex() << "}\n";
+ m_t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"pages.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
break;
case isModuleDocumentation:
{
bool first=true;
- t << "{\\tc \\v " << theTranslator->trModuleDocumentation() << "}"<< endl;
+ m_t << "{\\tc \\v " << theTranslator->trModuleDocumentation() << "}\n";
for (const auto &gd : *Doxygen::groupLinkedMap)
{
if (!gd->isReference())
{
- t << "\\par " << rtf_Style_Reset << endl;
+ m_t << "\\par " << rtf_Style_Reset << "\n";
if (!first)
{
beginRTFSection();
}
first=false;
- t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
- t << gd->getOutputFileBase();
- t << ".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
+ m_t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
+ m_t << gd->getOutputFileBase();
+ m_t << ".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
}
}
}
@@ -757,20 +782,20 @@ void RTFGenerator::endIndexSection(IndexSections is)
case isDirDocumentation:
{
bool first=true;
- t << "{\\tc \\v " << theTranslator->trDirDocumentation() << "}"<< endl;
+ m_t << "{\\tc \\v " << theTranslator->trDirDocumentation() << "}\n";
for (const auto &dd : *Doxygen::dirLinkedMap)
{
if (dd->isLinkableInProject())
{
- t << "\\par " << rtf_Style_Reset << endl;
+ m_t << "\\par " << rtf_Style_Reset << "\n";
if (!first)
{
beginRTFSection();
}
first=false;
- t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
- t << dd->getOutputFileBase();
- t << ".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
+ m_t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
+ m_t << dd->getOutputFileBase();
+ m_t << ".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
}
}
}
@@ -782,15 +807,35 @@ void RTFGenerator::endIndexSection(IndexSections is)
{
if (nd->isLinkableInProject() && !nd->isAlias())
{
- t << "\\par " << rtf_Style_Reset << endl;
+ m_t << "\\par " << rtf_Style_Reset << "\n";
if (!first)
{
beginRTFSection();
}
first=false;
- t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
- t << nd->getOutputFileBase();
- t << ".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
+ m_t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
+ m_t << nd->getOutputFileBase();
+ m_t << ".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
+ }
+ }
+ }
+ break;
+ case isConceptDocumentation:
+ {
+ bool first=true;
+ for (const auto &cd : *Doxygen::conceptLinkedMap)
+ {
+ if (cd->isLinkableInProject() && !cd->isAlias())
+ {
+ m_t << "\\par " << rtf_Style_Reset << "\n";
+ if (!first)
+ {
+ beginRTFSection();
+ }
+ first=false;
+ m_t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
+ m_t << cd->getOutputFileBase();
+ m_t << ".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
}
}
}
@@ -800,11 +845,11 @@ void RTFGenerator::endIndexSection(IndexSections is)
bool first=true;
if (fortranOpt)
{
- t << "{\\tc \\v " << theTranslator->trTypeDocumentation() << "}"<< endl;
+ m_t << "{\\tc \\v " << theTranslator->trTypeDocumentation() << "}\n";
}
else
{
- t << "{\\tc \\v " << theTranslator->trClassDocumentation() << "}"<< endl;
+ m_t << "{\\tc \\v " << theTranslator->trClassDocumentation() << "}\n";
}
for (const auto &cd : *Doxygen::classLinkedMap)
{
@@ -814,15 +859,15 @@ void RTFGenerator::endIndexSection(IndexSections is)
!cd->isAlias()
)
{
- t << "\\par " << rtf_Style_Reset << endl;
+ m_t << "\\par " << rtf_Style_Reset << "\n";
if (!first)
{
beginRTFSection();
}
first=false;
- t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
- t << cd->getOutputFileBase();
- t << ".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
+ m_t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
+ m_t << cd->getOutputFileBase();
+ m_t << ".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
}
}
}
@@ -831,26 +876,26 @@ void RTFGenerator::endIndexSection(IndexSections is)
{
bool isFirst=TRUE;
- t << "{\\tc \\v " << theTranslator->trFileDocumentation() << "}"<< endl;
+ m_t << "{\\tc \\v " << theTranslator->trFileDocumentation() << "}\n";
for (const auto &fn : *Doxygen::inputNameLinkedMap)
{
for (const auto &fd : *fn)
{
if (fd->isLinkableInProject())
{
- t << "\\par " << rtf_Style_Reset << endl;
+ m_t << "\\par " << rtf_Style_Reset << "\n";
if (!isFirst)
{
beginRTFSection();
}
isFirst=FALSE;
- t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
- t << fd->getOutputFileBase();
- t << ".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
+ m_t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
+ m_t << fd->getOutputFileBase();
+ m_t << ".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
if (sourceBrowser && m_prettyCode && fd->generateSourceFile())
{
- t << "\\par " << rtf_Style_Reset << endl;
- t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"" << fd->getSourceFileBase() << ".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
+ m_t << "\\par " << rtf_Style_Reset << "\n";
+ m_t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"" << fd->getSourceFileBase() << ".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
}
}
}
@@ -859,37 +904,37 @@ void RTFGenerator::endIndexSection(IndexSections is)
break;
case isExampleDocumentation:
{
- //t << "}\n";
+ //m_t << "}\n";
bool isFirst=true;
- t << "{\\tc \\v " << theTranslator->trExampleDocumentation() << "}"<< endl;
+ m_t << "{\\tc \\v " << theTranslator->trExampleDocumentation() << "}\n";
for (const auto &pd : *Doxygen::exampleLinkedMap)
{
- t << "\\par " << rtf_Style_Reset << endl;
+ m_t << "\\par " << rtf_Style_Reset << "\n";
if (!isFirst)
{
beginRTFSection();
}
isFirst=false;
- t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
- t << pd->getOutputFileBase();
- t << ".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
+ m_t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
+ m_t << pd->getOutputFileBase();
+ m_t << ".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
}
}
break;
case isPageDocumentation:
{
//#error "fix me in the same way as the latex index..."
- //t << "{\\tc \\v " << theTranslator->trPageDocumentation() << "}"<< endl;
- //t << "}"<< endl;
+ //m_t << "{\\tc \\v " << theTranslator->trPageDocumentation() << "}\n";
+ //m_t << "}\n";
//bool first=TRUE;
//for (const auto *pd : Doxygen::pageLinkedMap)
//{
// if (!pd->getGroupDef() && !pd->isReference())
// {
- // if (first) t << "\\par " << rtf_Style_Reset << endl;
- // t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
- // t << pd->getOutputFileBase();
- // t << ".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
+ // if (first) m_t << "\\par " << rtf_Style_Reset << "\n";
+ // m_t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
+ // m_t << pd->getOutputFileBase();
+ // m_t << ".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
// first=FALSE;
// }
//}
@@ -897,39 +942,39 @@ void RTFGenerator::endIndexSection(IndexSections is)
break;
case isPageDocumentation2:
{
- t << "}";
- t << "\\par " << rtf_Style_Reset << endl;
+ m_t << "}";
+ m_t << "\\par " << rtf_Style_Reset << "\n";
}
break;
case isEndIndex:
beginRTFChapter();
- t << rtf_Style["Heading1"].reference();
- t << theTranslator->trRTFGeneralIndex() << "\\par "<< endl;
- t << rtf_Style_Reset << endl;
- t << "{\\tc \\v " << theTranslator->trRTFGeneralIndex() << "}" << endl;
- t << "{\\field\\fldedit {\\*\\fldinst INDEX \\\\c2 \\\\*MERGEFORMAT}{\\fldrslt INDEX}}\n";
+ m_t << rtf_Style["Heading1"].reference();
+ m_t << theTranslator->trRTFGeneralIndex() << "\\par \n";
+ m_t << rtf_Style_Reset << "\n";
+ m_t << "{\\tc \\v " << theTranslator->trRTFGeneralIndex() << "}\n";
+ m_t << "{\\field\\fldedit {\\*\\fldinst INDEX \\\\c2 \\\\*MERGEFORMAT}{\\fldrslt INDEX}}\n";
break;
}
}
-void RTFGenerator::writePageLink(const char *name,bool first)
+void RTFGenerator::writePageLink(const QCString &name,bool first)
{
- if (first) t << "\\par " << rtf_Style_Reset << endl;
- t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
- t << name;
- t << ".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
+ if (first) m_t << "\\par " << rtf_Style_Reset << "\n";
+ m_t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
+ m_t << name;
+ m_t << ".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
}
void RTFGenerator::lastIndexPage()
{
- DBG_RTF(t <<"{\\comment Beginning Body of RTF Document}\n")
+ DBG_RTF(m_t << "{\\comment Beginning Body of RTF Document}\n")
// end page and setup for rest of document
- t <<"\\sect \\sbkpage \\pgndec \\pgnrestart\n";
- t <<"\\sect \\sectd \\sbknone\n";
+ m_t << "\\sect \\sbkpage \\pgndec \\pgnrestart\n";
+ m_t << "\\sect \\sectd \\sbknone\n";
// set new footer with arabic numbers
- t <<"{\\footer "<< rtf_Style["Footer"].reference() << "{\\chpgn}}\n";
+ m_t << "{\\footer "<< rtf_Style["Footer"].reference() << "{\\chpgn}}\n";
}
@@ -937,37 +982,37 @@ void RTFGenerator::writeStyleInfo(int)
{
}
-void RTFGenerator::lineBreak(const char *)
+void RTFGenerator::lineBreak(const QCString &)
{
- DBG_RTF(t << "{\\comment (lineBreak)}" << endl)
- t << "\\par" << endl;
+ DBG_RTF(m_t << "{\\comment (lineBreak)}" << "\n")
+ m_t << "\\par\n";
m_omitParagraph = TRUE;
}
-void RTFGenerator::writeString(const char *text)
+void RTFGenerator::writeString(const QCString &text)
{
- t << text;
+ m_t << text;
}
void RTFGenerator::startIndexList()
{
- DBG_RTF(t << "{\\comment (startIndexList)}" << endl)
- t << "{" << endl;
- t << "\\par" << endl;
+ DBG_RTF(m_t << "{\\comment (startIndexList)}\n")
+ m_t << "{\n";
+ m_t << "\\par\n";
incrementIndentLevel();
- t << rtf_Style_Reset << rtf_LCList_DepthStyle() << endl;
+ m_t << rtf_Style_Reset << rtf_LCList_DepthStyle() << "\n";
m_omitParagraph = TRUE;
}
void RTFGenerator::endIndexList()
{
- DBG_RTF(t << "{\\comment (endIndexList)}" << endl)
+ DBG_RTF(m_t << "{\\comment (endIndexList)}\n")
if (!m_omitParagraph)
{
- t << "\\par";
+ m_t << "\\par";
m_omitParagraph = TRUE;
}
- t << "}";
+ m_t << "}";
decrementIndentLevel();
}
@@ -975,8 +1020,8 @@ void RTFGenerator::endIndexList()
void RTFGenerator::startItemList()
{
newParagraph();
- DBG_RTF(t << "{\\comment (startItemList level=" << m_listLevel << ") }" << endl)
- t << "{";
+ DBG_RTF(m_t << "{\\comment (startItemList level=" << m_listLevel << ") }\n")
+ m_t << "{";
incrementIndentLevel();
rtf_listItemInfo[m_listLevel].isEnum = FALSE;
}
@@ -985,8 +1030,8 @@ void RTFGenerator::startItemList()
void RTFGenerator::endItemList()
{
newParagraph();
- DBG_RTF(t << "{\\comment (endItemList level=" << m_listLevel << ")}" << endl)
- t << "}";
+ DBG_RTF(m_t << "{\\comment (endItemList level=" << m_listLevel << ")}\n")
+ m_t << "}";
decrementIndentLevel();
m_omitParagraph = TRUE;
}
@@ -994,8 +1039,8 @@ void RTFGenerator::endItemList()
///*! start enumeration list */
//void RTFGenerator::startEnumList() // starts an enumeration list
//{
-// DBG_RTF(t << "{\\comment (startEnumList)}" << endl)
-// t << "{" << endl;
+// DBG_RTF(m_t << "{\\comment (startEnumList)}\n")
+// m_t << "{\n";
// incrementIndentLevel();
// rtf_listItemInfo[m_listLevel].isEnum = TRUE;
// rtf_listItemInfo[m_listLevel].number = 1;
@@ -1005,8 +1050,8 @@ void RTFGenerator::endItemList()
//void RTFGenerator::endEnumList()
//{
// newParagraph();
-// DBG_RTF(t << "{\\comment (endEnumList)}" << endl)
-// t << "}";
+// DBG_RTF(m_t << "{\\comment (endEnumList)}\n")
+// m_t << "}";
// decrementIndentLevel();
// m_omitParagraph = TRUE;
//}
@@ -1014,70 +1059,70 @@ void RTFGenerator::endItemList()
/*! write bullet or enum item */
void RTFGenerator::startItemListItem()
{
- DBG_RTF(t << "{\\comment (startItemListItem)}" << endl)
+ DBG_RTF(m_t << "{\\comment (startItemListItem)}\n")
newParagraph();
- t << rtf_Style_Reset;
+ m_t << rtf_Style_Reset;
if (rtf_listItemInfo[m_listLevel].isEnum)
{
- t << rtf_EList_DepthStyle() << endl;
- t << rtf_listItemInfo[m_listLevel].number << ".\\tab ";
+ m_t << rtf_EList_DepthStyle() << "\n";
+ m_t << rtf_listItemInfo[m_listLevel].number << ".\\tab ";
rtf_listItemInfo[m_listLevel].number++;
}
else
{
- t << rtf_BList_DepthStyle() << endl;
+ m_t << rtf_BList_DepthStyle() << "\n";
}
m_omitParagraph = TRUE;
}
void RTFGenerator::endItemListItem()
{
- DBG_RTF(t << "{\\comment (endItemListItem)}" << endl)
+ DBG_RTF(m_t << "{\\comment (endItemListItem)}\n")
}
-void RTFGenerator::startIndexItem(const char *,const char *)
+void RTFGenerator::startIndexItem(const QCString &,const QCString &)
{
- DBG_RTF(t << "{\\comment (startIndexItem)}" << endl)
+ DBG_RTF(m_t << "{\\comment (startIndexItem)}\n")
if (!m_omitParagraph)
{
- t << "\\par" << endl;
+ m_t << "\\par\n";
m_omitParagraph = TRUE;
}
}
-void RTFGenerator::endIndexItem(const char *ref,const char *fn)
+void RTFGenerator::endIndexItem(const QCString &ref,const QCString &fn)
{
- DBG_RTF(t << "{\\comment (endIndexItem)}" << endl)
- if (!ref && fn)
+ DBG_RTF(m_t << "{\\comment (endIndexItem)}\n")
+ if (ref.isEmpty() && !fn.isEmpty())
{
- t << "\\tab ";
+ m_t << "\\tab ";
writeRTFReference(fn);
- t << endl;
+ m_t << "\n";
}
else
{
- t << endl;
+ m_t << "\n";
}
m_omitParagraph = TRUE;
}
-//void RTFGenerator::writeIndexFileItem(const char *,const char *text)
+//void RTFGenerator::writeIndexFileItem(const QCString &,const QCString &text)
//{
-// t << "\\item\\contentsline{section}{";
+// m_t << "\\item\\contentsline{section}{";
// docify(text);
-// t << "}{\\pageref{" << text << "}}" << endl;
+// m_t << "}{\\pageref{" << texm_t << "}}\n";
//}
-void RTFGenerator::startHtmlLink(const char *url)
+void RTFGenerator::startHtmlLink(const QCString &url)
{
if (Config_getBool(RTF_HYPERLINKS))
{
- t << "{\\field {\\*\\fldinst { HYPERLINK \"";
- t << url;
- t << "\" }{}";
- t << "}{\\fldrslt {\\cs37\\ul\\cf2 ";
+ m_t << "{\\field {\\*\\fldinst { HYPERLINK \"";
+ m_t << url;
+ m_t << "\" }{}";
+ m_t << "}{\\fldrslt {\\cs37\\ul\\cf2 ";
}
else
{
@@ -1089,7 +1134,7 @@ void RTFGenerator::endHtmlLink()
{
if (Config_getBool(RTF_HYPERLINKS))
{
- t << "}}}" << endl;
+ m_t << "}}}\n";
}
else
{
@@ -1097,85 +1142,85 @@ void RTFGenerator::endHtmlLink()
}
}
-//void RTFGenerator::writeMailLink(const char *url)
+//void RTFGenerator::writeMailLink(const QCString &url)
//{
// startTypewriter();
// docify(url);
// endTypewriter();
//}
-void RTFGenerator::writeStartAnnoItem(const char *,const char *f,
- const char *path,const char *name)
+void RTFGenerator::writeStartAnnoItem(const QCString &,const QCString &f,
+ const QCString &path,const QCString &name)
{
- DBG_RTF(t << "{\\comment (writeStartAnnoItem)}" << endl)
- t << "{\\b ";
- if (path) docify(path);
- if (f && Config_getBool(RTF_HYPERLINKS))
+ DBG_RTF(m_t << "{\\comment (writeStartAnnoItem)}\n")
+ m_t << "{\\b ";
+ if (!path.isEmpty()) docify(path);
+ if (!f.isEmpty() && Config_getBool(RTF_HYPERLINKS))
{
- t << "{\\field {\\*\\fldinst { HYPERLINK \\\\l \"";
- t << rtfFormatBmkStr(f);
- t << "\" }{}";
- t << "}{\\fldrslt {\\cs37\\ul\\cf2 ";
+ m_t << "{\\field {\\*\\fldinst { HYPERLINK \\\\l \"";
+ m_t << rtfFormatBmkStr(f);
+ m_t << "\" }{}";
+ m_t << "}{\\fldrslt {\\cs37\\ul\\cf2 ";
docify(name);
- t << "}}}" << endl;
+ m_t << "}}}\n";
}
else
{
docify(name);
}
- t << "} ";
+ m_t << "} ";
}
-void RTFGenerator::writeEndAnnoItem(const char *name)
+void RTFGenerator::writeEndAnnoItem(const QCString &name)
{
- DBG_RTF(t << "{\\comment (writeEndAnnoItem)}" << endl)
- if (name)
+ DBG_RTF(m_t << "{\\comment (writeEndAnnoItem)}\n")
+ if (!name.isEmpty())
{
- t << "\\tab ";
+ m_t << "\\tab ";
writeRTFReference(name);
- t << endl;
+ m_t << "\n";
}
else
{
- t << endl;
+ m_t << "\n";
}
newParagraph();
}
void RTFGenerator::startIndexKey()
{
- DBG_RTF(t << "{\\comment (startIndexKey)}" << endl)
- t << "{\\b ";
+ DBG_RTF(m_t << "{\\comment (startIndexKey)}\n")
+ m_t << "{\\b ";
}
void RTFGenerator::endIndexKey()
{
- DBG_RTF(t << "{\\comment (endIndexKey)}" << endl)
+ DBG_RTF(m_t << "{\\comment (endIndexKey)}\n")
}
void RTFGenerator::startIndexValue(bool hasBrief)
{
- DBG_RTF(t << "{\\comment (startIndexValue)}" << endl)
- t << " ";
- if (hasBrief) t << "(";
+ DBG_RTF(m_t << "{\\comment (startIndexValue)}\n")
+ m_t << " ";
+ if (hasBrief) m_t << "(";
}
-void RTFGenerator::endIndexValue(const char *name,bool hasBrief)
+void RTFGenerator::endIndexValue(const QCString &name,bool hasBrief)
{
- DBG_RTF(t << "{\\comment (endIndexValue)}" << endl)
- if (hasBrief) t << ")";
- t << "} ";
- if (name)
+ DBG_RTF(m_t << "{\\comment (endIndexValue)}\n")
+ if (hasBrief) m_t << ")";
+ m_t << "} ";
+ if (!name.isEmpty())
{
- t << "\\tab ";
+ m_t << "\\tab ";
writeRTFReference(name);
- t << endl;
+ m_t << "\n";
}
else
{
- t << endl;
+ m_t << "\n";
}
m_omitParagraph=FALSE;
newParagraph();
@@ -1184,128 +1229,128 @@ void RTFGenerator::endIndexValue(const char *name,bool hasBrief)
void RTFGenerator::startSubsection()
{
//beginRTFSubSection();
- t <<"\n";
- DBG_RTF(t << "{\\comment Begin SubSection}\n")
- t << rtf_Style_Reset;
- t << rtf_Style["Heading3"].reference() << "\n";
+ m_t << "\n";
+ DBG_RTF(m_t << "{\\comment Begin SubSection}\n")
+ m_t << rtf_Style_Reset;
+ m_t << rtf_Style["Heading3"].reference() << "\n";
}
void RTFGenerator::endSubsection()
{
newParagraph();
- t << rtf_Style_Reset << endl;
+ m_t << rtf_Style_Reset << "\n";
}
void RTFGenerator::startSubsubsection()
{
//beginRTFSubSubSection();
- t << "\n";
- DBG_RTF(t << "{\\comment Begin SubSubSection}\n")
- t << "{" << endl;
- t << rtf_Style_Reset << rtf_Style["Heading4"].reference() << "\n";
+ m_t << "\n";
+ DBG_RTF(m_t << "{\\comment Begin SubSubSection}\n")
+ m_t << "{\n";
+ m_t << rtf_Style_Reset << rtf_Style["Heading4"].reference() << "\n";
}
void RTFGenerator::endSubsubsection()
{
newParagraph();
- t << "}" << endl;
+ m_t << "}\n";
}
-//void RTFGenerator::writeClassLink(const char *,const char *,
-// const char *,const char *name)
+//void RTFGenerator::writeClassLink(const QCString &,const QCString &,
+// const QCString &,const QCString &name)
//{
-// t << "{\\bf ";
+// m_t << "{\\bf ";
// docify(name);
-// t << "}";
+// m_t << "}";
//}
//void RTFGenerator::startTable(bool,int colNumbers)
//{
-// DBG_RTF(t << "{\\comment startTable}\n";)
+// DBG_RTF(m_t << "{\\comment startTable}\n";)
// m_numCols=colNumbers;
-// t << "\\par\n";
+// m_t << "\\par\n";
//}
//
//void RTFGenerator::endTable(bool hasCaption)
//{
-// DBG_RTF(t << "{\\comment endTable}\n";)
+// DBG_RTF(m_t << "{\\comment endTable}\n";)
// if (!hasCaption)
-// t << "\n\\pard \\widctlpar\\intbl\\adjustright\n{\\row }\n";
-// t << "\\pard\n" << endl;
+// m_t << "\n\\pard \\widctlpar\\intbl\\adjustright\n{\\row }\n";
+// m_t << "\\pard\n\n";
//}
//
//void RTFGenerator::startCaption()
//{
-// DBG_RTF(t << "{\\comment startCaption}\n";)
+// DBG_RTF(m_t << "{\\comment startCaption}\n";)
// endTableRow();
-// t << "\\trowd \\trgaph108\\trleft-108\\trbrdrt\\brdrs\\brdrw10 \\trbrdrl\\brdrs\\brdrw10 \\trbrdrb\\brdrs\\brdrw10 \\trbrdrr\\brdrs\\brdrw10 \\trbrdrh\\brdrs\\brdrw10 \\trbrdrv\\brdrs\\brdrw10" << endl;
-// t << "\\clvertalt\\clbrdrt\\brdrs\\brdrw10 \\clbrdrl\\brdrs\\brdrw10 \\clbrdrb\\brdrs\\brdrw10 \\clbrdrr \\brdrs\\brdrw10 \\cltxlrtb \\cellx"<<rtf_pageWidth<<"\\pard \\qc\\nowidctlpar\\widctlpar\\intbl\\adjustright " << endl;
+// m_t << "\\trowd \\trgaph108\\trleft-108\\trbrdrt\\brdrs\\brdrw10 \\trbrdrl\\brdrs\\brdrw10 \\trbrdrb\\brdrs\\brdrw10 \\trbrdrr\\brdrs\\brdrw10 \\trbrdrh\\brdrs\\brdrw10 \\trbrdrv\\brdrs\\brdrw10\n";
+// m_t << "\\clvertalt\\clbrdrt\\brdrs\\brdrw10 \\clbrdrl\\brdrs\\brdrw10 \\clbrdrb\\brdrs\\brdrw10 \\clbrdrr \\brdrs\\brdrw10 \\cltxlrtb \\cellx"<<rtf_pageWidth<<"\\pard \\qc\\nowidctlpar\\widctlpar\\intbl\\adjustright \n";
// nextTableColumn();
//}
//
//void RTFGenerator::endCaption()
//{
-// DBG_RTF(t << "{\\comment endCaption}\n";)
+// DBG_RTF(m_t << "{\\comment endCaption}\n";)
// endTableColumn();
// endTableRow();
//}
//
//void RTFGenerator::nextTableRow()
//{
-// DBG_RTF(t << "{\\comment nextTableRow}\n";)
+// DBG_RTF(m_t << "{\\comment nextTableRow}\n";)
// ASSERT(m_numCols>0 && m_numCols<25);
// uint columnWidth=rtf_pageWidth/m_numCols;
-// t << "\\trowd \\trgaph108\\trleft-108\\trbrdrt\\brdrs\\brdrw10 "
+// m_t << "\\trowd \\trgaph108\\trleft-108\\trbrdrt\\brdrs\\brdrw10 "
// "\\trbrdrl\\brdrs\\brdrw10 \\trbrdrb\\brdrs\\brdrw10 "
// "\\trbrdrr\\brdrs\\brdrw10 \\trbrdrh\\brdrs\\brdrw10 "
-// "\\trbrdrv\\brdrs\\brdrw10 "<<endl;
+// "\\trbrdrv\\brdrs\\brdrw10 \n";
// for (int i=0;i<m_numCols;i++)
// {
-// t << "\\clvertalt\\clbrdrt\\brdrs\\brdrw10 \\clbrdrl\\brdrs\\brdrw10 "
+// m_t << "\\clvertalt\\clbrdrt\\brdrs\\brdrw10 \\clbrdrl\\brdrs\\brdrw10 "
// "\\clbrdrb\\brdrs\\brdrw10 \\clbrdrr \\brdrs\\brdrw10 \\cltxlrtb "
-// "\\cellx" << (i*columnWidth) << endl;
+// "\\cellx" << (i*columnWidth) << "\n";
// }
-// t << "\\pard \\widctlpar\\intbl\\adjustright\n{";
+// m_t << "\\pard \\widctlpar\\intbl\\adjustright\n{";
//}
//
//void RTFGenerator::endTableRow()
//{
-// DBG_RTF(t << "{\\comment endTableRow}\n";)
-// t << "\n\\pard \\widctlpar\\intbl\\adjustright\n{\\row }\n";
+// DBG_RTF(m_t << "{\\comment endTableRow}\n";)
+// m_t << "\n\\pard \\widctlpar\\intbl\\adjustright\n{\\row }\n";
//}
//
//void RTFGenerator::nextTableColumn()
//{
-// DBG_RTF(t << "{\\comment nextTableColumn}\n";)
-// t << "{ ";
+// DBG_RTF(m_t << "{\\comment nextTableColumn}\n";)
+// m_t << "{ ";
//}
//
//void RTFGenerator::endTableColumn()
//{
-// DBG_RTF(t << "{\\comment endTableColumn}\n";)
-// t << " \\cell }";
+// DBG_RTF(m_t << "{\\comment endTableColumn}\n";)
+// m_t << " \\cell }";
//}
//
-void RTFGenerator::startTextLink(const char *f,const char *anchor)
+void RTFGenerator::startTextLink(const QCString &f,const QCString &anchor)
{
if (Config_getBool(RTF_HYPERLINKS))
{
QCString ref;
- if (f)
+ if (!f.isEmpty())
{
ref+=f;
}
- if (anchor)
+ if (!anchor.isEmpty())
{
ref+='_';
ref+=anchor;
}
- t << "{\\field {\\*\\fldinst { HYPERLINK \\\\l \"";
- t << rtfFormatBmkStr(ref);
- t << "\" }{}";
- t << "}{\\fldrslt {\\cs37\\ul\\cf2 ";
+ m_t << "{\\field {\\*\\fldinst { HYPERLINK \\\\l \"";
+ m_t << rtfFormatBmkStr(ref);
+ m_t << "\" }{}";
+ m_t << "}{\\fldrslt {\\cs37\\ul\\cf2 ";
}
}
@@ -1313,34 +1358,34 @@ void RTFGenerator::endTextLink()
{
if (Config_getBool(RTF_HYPERLINKS))
{
- t << "}}}" << endl;
+ m_t << "}}}\n";
}
}
-void RTFGenerator::writeObjectLink(const char *ref, const char *f,
- const char *anchor, const char *text)
+void RTFGenerator::writeObjectLink(const QCString &ref, const QCString &f,
+ const QCString &anchor, const QCString &text)
{
- if (!ref && Config_getBool(RTF_HYPERLINKS))
+ if (ref.isEmpty() && Config_getBool(RTF_HYPERLINKS))
{
QCString refName;
- if (f)
+ if (!f.isEmpty())
{
refName+=f;
}
- if (anchor)
+ if (!anchor.isEmpty())
{
refName+='_';
refName+=anchor;
}
- t << "{\\field {\\*\\fldinst { HYPERLINK \\\\l \"";
- t << rtfFormatBmkStr(refName);
- t << "\" }{}";
- t << "}{\\fldrslt {\\cs37\\ul\\cf2 ";
+ m_t << "{\\field {\\*\\fldinst { HYPERLINK \\\\l \"";
+ m_t << rtfFormatBmkStr(refName);
+ m_t << "\" }{}";
+ m_t << "}{\\fldrslt {\\cs37\\ul\\cf2 ";
docify(text);
- t << "}}}" << endl;
+ m_t << "}}}\n";
}
else
{
@@ -1352,52 +1397,52 @@ void RTFGenerator::writeObjectLink(const char *ref, const char *f,
void RTFGenerator::startPageRef()
{
- t << " (";
+ m_t << " (";
startEmphasis();
}
-void RTFGenerator::endPageRef(const char *clname, const char *anchor)
+void RTFGenerator::endPageRef(const QCString &clname, const QCString &anchor)
{
QCString ref;
- if (clname)
+ if (!clname.isEmpty())
{
ref+=clname;
}
- if (anchor)
+ if (!anchor.isEmpty())
{
ref+='_';
ref+=anchor;
}
writeRTFReference(ref);
endEmphasis();
- t << ")";
+ m_t << ")";
}
-void RTFGenerator::writeCodeLink(const char *ref,const char *f,
- const char *anchor,const char *name,
- const char *)
+void RTFGenerator::writeCodeLink(const QCString &ref,const QCString &f,
+ const QCString &anchor,const QCString &name,
+ const QCString &)
{
- if (!ref && Config_getBool(RTF_HYPERLINKS))
+ if (ref.isEmpty() && Config_getBool(RTF_HYPERLINKS))
{
QCString refName;
- if (f)
+ if (!f.isEmpty())
{
refName+=f;
}
- if (anchor)
+ if (!anchor.isEmpty())
{
refName+='_';
refName+=anchor;
}
- t << "{\\field {\\*\\fldinst { HYPERLINK \\\\l \"";
- t << rtfFormatBmkStr(refName);
- t << "\" }{}";
- t << "}{\\fldrslt {\\cs37\\ul\\cf2 ";
+ m_t << "{\\field {\\*\\fldinst { HYPERLINK \\\\l \"";
+ m_t << rtfFormatBmkStr(refName);
+ m_t << "\" }{}";
+ m_t << "}{\\fldrslt {\\cs37\\ul\\cf2 ";
codify(name);
- t << "}}}" << endl;
+ m_t << "}}}\n";
}
else
{
@@ -1405,27 +1450,27 @@ void RTFGenerator::writeCodeLink(const char *ref,const char *f,
}
}
-void RTFGenerator::startTitleHead(const char *)
+void RTFGenerator::startTitleHead(const QCString &)
{
- DBG_RTF(t <<"{\\comment startTitleHead}" << endl)
+ DBG_RTF(m_t << "{\\comment startTitleHead}\n")
// beginRTFSection();
- t << rtf_Style_Reset << rtf_Style["Heading2"].reference() << endl;
+ m_t << rtf_Style_Reset << rtf_Style["Heading2"].reference() << "\n";
}
-void RTFGenerator::endTitleHead(const char *fileName,const char *name)
+void RTFGenerator::endTitleHead(const QCString &fileName,const QCString &name)
{
- DBG_RTF(t <<"{\\comment endTitleHead}" << endl)
- t << "\\par " << rtf_Style_Reset << endl;
- if (name)
+ DBG_RTF(m_t << "{\\comment endTitleHead}\n")
+ m_t << "\\par " << rtf_Style_Reset << "\n";
+ if (!name.isEmpty())
{
// make table of contents entry
- t << "{\\tc\\tcl2 \\v ";
+ m_t << "{\\tc\\tcl2 \\v ";
docify(name);
- t << "}" << endl;
+ m_t << "}\n";
// make an index entry
- addIndexItem(name,0);
+ addIndexItem(name,QCString());
//if (name)
//{
@@ -1434,14 +1479,14 @@ void RTFGenerator::endTitleHead(const char *fileName,const char *name)
//
//if (Config_getBool(RTF_HYPERLINKS) && fileName)
//{
- writeAnchor(fileName,0);
+ writeAnchor(fileName,QCString());
//}
}
}
void RTFGenerator::startTitle()
{
- DBG_RTF(t <<"{\\comment startTitle}" << endl)
+ DBG_RTF(m_t << "{\\comment startTitle}\n")
if (Config_getBool(COMPACT_RTF))
beginRTFSection();
else
@@ -1450,222 +1495,222 @@ void RTFGenerator::startTitle()
void RTFGenerator::startGroupHeader(int extraIndent)
{
- DBG_RTF(t <<"{\\comment startGroupHeader}" << endl)
+ DBG_RTF(m_t << "{\\comment startGroupHeader}\n")
//newParagraph();
- t << rtf_Style_Reset;
+ m_t << rtf_Style_Reset;
if (extraIndent==2)
{
- t << rtf_Style["Heading5"].reference();
+ m_t << rtf_Style["Heading5"].reference();
}
else if (extraIndent==1)
{
- t << rtf_Style["Heading4"].reference();
+ m_t << rtf_Style["Heading4"].reference();
}
else // extraIndent==0
{
- t << rtf_Style["Heading3"].reference();
+ m_t << rtf_Style["Heading3"].reference();
}
- t << endl;
+ m_t << "\n";
}
void RTFGenerator::endGroupHeader(int)
{
- DBG_RTF(t <<"{\\comment endGroupHeader}" << endl)
- t << "\\par" << endl;
- t << rtf_Style_Reset << endl;
+ DBG_RTF(m_t << "{\\comment endGroupHeader}\n")
+ m_t << "\\par\n";
+ m_t << rtf_Style_Reset << "\n";
}
-void RTFGenerator::startMemberDoc(const char *clname,
- const char *memname,
- const char *,
- const char *,
+void RTFGenerator::startMemberDoc(const QCString &clname,
+ const QCString &memname,
+ const QCString &,
+ const QCString &,
int,
int,
bool showInline)
{
- DBG_RTF(t << "{\\comment startMemberDoc}" << endl)
- if (memname && memname[0]!='@')
+ DBG_RTF(m_t << "{\\comment startMemberDoc}\n")
+ if (!memname.isEmpty() && memname[0]!='@')
{
addIndexItem(memname,clname);
addIndexItem(clname,memname);
}
- t << rtf_Style_Reset << rtf_Style[showInline ? "Heading5" : "Heading4"].reference();
+ m_t << rtf_Style_Reset << rtf_Style[showInline ? "Heading5" : "Heading4"].reference();
//styleStack.push(rtf_Style_Heading4);
- t << "{" << endl;
+ m_t << "{\n";
//printf("RTFGenerator::startMemberDoc() '%s'\n",rtf_Style["Heading4"].reference());
startBold();
- t << endl;
+ m_t << "\n";
}
void RTFGenerator::endMemberDoc(bool)
{
- DBG_RTF(t << "{\\comment endMemberDoc}" << endl)
- //const char *style = styleStack.pop();
+ DBG_RTF(m_t << "{\\comment endMemberDoc}\n")
+ //const QCString &style = styleStack.pop();
//printf("RTFGenerator::endMemberDoc() '%s'\n",style);
//ASSERT(style==rtf_Style["Heading4"].reference());
endBold();
- t << "}" << endl;
+ m_t << "}\n";
newParagraph();
}
-void RTFGenerator::startDoxyAnchor(const char *,const char *,
- const char *,const char *,
- const char *
+void RTFGenerator::startDoxyAnchor(const QCString &,const QCString &,
+ const QCString &,const QCString &,
+ const QCString &
)
{
- DBG_RTF(t << "{\\comment startDoxyAnchor}" << endl)
+ DBG_RTF(m_t << "{\\comment startDoxyAnchor}\n")
}
-void RTFGenerator::endDoxyAnchor(const char *fName,const char *anchor)
+void RTFGenerator::endDoxyAnchor(const QCString &fName,const QCString &anchor)
{
QCString ref;
- if (fName)
+ if (!fName.isEmpty())
{
ref+=fName;
}
- if (anchor)
+ if (!anchor.isEmpty())
{
ref+='_';
ref+=anchor;
}
- DBG_RTF(t << "{\\comment endDoxyAnchor}" << endl)
- t << "{\\bkmkstart ";
- t << rtfFormatBmkStr(ref);
- t << "}" << endl;
- t << "{\\bkmkend ";
- t << rtfFormatBmkStr(ref);
- t << "}" << endl;
+ DBG_RTF(m_t << "{\\comment endDoxyAnchor}\n")
+ m_t << "{\\bkmkstart ";
+ m_t << rtfFormatBmkStr(ref);
+ m_t << "}\n";
+ m_t << "{\\bkmkend ";
+ m_t << rtfFormatBmkStr(ref);
+ m_t << "}\n";
}
-//void RTFGenerator::writeLatexLabel(const char *clName,const char *anchor)
+//void RTFGenerator::writeLatexLabel(const QCString &clName,const QCString &anchor)
//{
// writeDoxyAnchor(0,clName,anchor,0);
//}
-void RTFGenerator::addIndexItem(const char *s1,const char *s2)
+void RTFGenerator::addIndexItem(const QCString &s1,const QCString &s2)
{
- if (s1)
+ if (!s1.isEmpty())
{
- t << "{\\xe \\v ";
+ m_t << "{\\xe \\v ";
docify(s1);
- if (s2)
+ if (!s2.isEmpty())
{
- t << "\\:";
+ m_t << "\\:";
docify(s2);
}
- t << "}" << endl;
+ m_t << "}\n";
}
}
void RTFGenerator::startIndent()
{
incrementIndentLevel();
- DBG_RTF(t << "{\\comment (startIndent) }" << endl)
- t << "{" << endl;
- t << rtf_Style_Reset << rtf_CList_DepthStyle() << endl;
+ DBG_RTF(m_t << "{\\comment (startIndent) }\n")
+ m_t << "{\n";
+ m_t << rtf_Style_Reset << rtf_CList_DepthStyle() << "\n";
}
void RTFGenerator::endIndent()
{
- t << "}" << endl;
+ m_t << "}\n";
decrementIndentLevel();
}
void RTFGenerator::startDescription()
{
- DBG_RTF(t << "{\\comment (startDescription)}" << endl)
- t << "{" << endl;
- t << rtf_Style_Reset << rtf_DList_DepthStyle();
+ DBG_RTF(m_t << "{\\comment (startDescription)}" << "\n")
+ m_t << "{\n";
+ m_t << rtf_Style_Reset << rtf_DList_DepthStyle();
}
void RTFGenerator::endDescription()
{
- DBG_RTF(t << "{\\comment (endDescription)}" << endl)
+ DBG_RTF(m_t << "{\\comment (endDescription)}" << "\n")
newParagraph();
- t << "}";
+ m_t << "}";
}
void RTFGenerator::startDescItem()
{
newParagraph();
- DBG_RTF(t << "{\\comment (startDescItem)}" << endl)
- t << "{\\b ";
+ DBG_RTF(m_t << "{\\comment (startDescItem)}\n")
+ m_t << "{\\b ";
}
void RTFGenerator::endDescItem()
{
- DBG_RTF(t << "{\\comment (endDescItem)}" << endl)
- t << "}" << endl;
+ DBG_RTF(m_t << "{\\comment (endDescItem)}\n")
+ m_t << "}\n";
newParagraph();
}
-void RTFGenerator::startMemberDescription(const char *,const char *,bool)
+void RTFGenerator::startMemberDescription(const QCString &,const QCString &,bool)
{
- DBG_RTF(t << "{\\comment (startMemberDescription)}" << endl)
- t << "{" << endl;
+ DBG_RTF(m_t << "{\\comment (startMemberDescription)}\n")
+ m_t << "{\n";
incrementIndentLevel();
- t << rtf_Style_Reset << rtf_CList_DepthStyle();
+ m_t << rtf_Style_Reset << rtf_CList_DepthStyle();
startEmphasis();
}
void RTFGenerator::endMemberDescription()
{
- DBG_RTF(t << "{\\comment (endMemberDescription)}" << endl)
+ DBG_RTF(m_t << "{\\comment (endMemberDescription)}\n")
endEmphasis();
//newParagraph();
decrementIndentLevel();
- t << "\\par";
- t << "}" << endl;
+ m_t << "\\par";
+ m_t << "}\n";
m_omitParagraph = TRUE;
}
void RTFGenerator::startDescList(SectionTypes)
{
- DBG_RTF(t << "{\\comment (startDescList)}" << endl)
- t << "{"; // ends at endDescList
- t << "{"; // ends at endDescTitle
+ DBG_RTF(m_t << "{\\comment (startDescList)}\n")
+ m_t << "{"; // ends at endDescList
+ m_t << "{"; // ends at endDescTitle
startBold();
newParagraph();
}
//void RTFGenerator::endDescTitle()
//{
-// DBG_RTF(t << "{\\comment (endDescTitle) }" << endl)
+// DBG_RTF(m_t << "{\\comment (endDescTitle) }\n")
// endBold();
-// t << "}";
+// m_t << "}";
// newParagraph();
// incrementIndentLevel();
-// t << rtf_Style_Reset << rtf_DList_DepthStyle();
+// m_t << rtf_Style_Reset << rtf_DList_DepthStyle();
//}
void RTFGenerator::startDescForItem()
{
- DBG_RTF(t << "{\\comment (startDescForItem) }" << endl)
+ DBG_RTF(m_t << "{\\comment (startDescForItem) }\n")
}
void RTFGenerator::endDescForItem()
{
- DBG_RTF(t << "{\\comment (endDescForItem) }" << endl)
+ DBG_RTF(m_t << "{\\comment (endDescForItem) }\n")
}
//void RTFGenerator::endDescList()
//{
-// DBG_RTF(t << "{\\comment (endDescList)}" << endl)
+// DBG_RTF(m_t << "{\\comment (endDescList)}\n")
// newParagraph();
// decrementIndentLevel();
// m_omitParagraph = TRUE;
-// t << "}";
+// m_t << "}";
//}
-void RTFGenerator::startSection(const char *,const char *title,SectionType type)
+void RTFGenerator::startSection(const QCString &,const QCString &title,SectionType type)
{
- DBG_RTF(t << "{\\comment (startSection)}" << endl)
- t << "{";
- t<< rtf_Style_Reset;
+ DBG_RTF(m_t << "{\\comment (startSection)}\n")
+ m_t << "{";
+ m_t << rtf_Style_Reset;
int num=4;
switch(type)
{
@@ -1679,25 +1724,25 @@ void RTFGenerator::startSection(const char *,const char *title,SectionType type)
QCString heading;
heading.sprintf("Heading%d",num);
// set style
- t << rtf_Style[heading.str()].reference();
+ m_t << rtf_Style[heading.str()].reference();
// make table of contents entry
- t << "{\\tc\\tcl" << num << " \\v ";
+ m_t << "{\\tc\\tcl" << num << " \\v ";
docify(title);
- t << "}" << endl;
+ m_t << "}\n";
}
-void RTFGenerator::endSection(const char *lab,SectionType)
+void RTFGenerator::endSection(const QCString &lab,SectionType)
{
- DBG_RTF(t << "{\\comment (endSection)}" << endl)
+ DBG_RTF(m_t << "{\\comment (endSection)}\n")
// make bookmark
m_omitParagraph=FALSE;
newParagraph();
- writeAnchor(0,lab);
- t << "}";
+ writeAnchor(QCString(),lab);
+ m_t << "}";
}
-//void RTFGenerator::writeSectionRef(const char *ref,const char *,
-// const char *lab,const char *title)
+//void RTFGenerator::writeSectionRef(const QCString &ref,const QCString &,
+// const QCString &lab,const QCString &title)
//{
// if (ref)
// {
@@ -1708,24 +1753,24 @@ void RTFGenerator::endSection(const char *lab,SectionType)
// startBold();
// docify(title);
// endBold();
-// t << " (";
+// m_t << " (";
// docify(theTranslator->trPageAbbreviation());
// writeRTFReference(lab);
-// t << ")" << endl;
+// m_t << ")\n";
// }
//}
//
-//void RTFGenerator::writeSectionRefItem(const char *,const char *lab,
-// const char *title)
+//void RTFGenerator::writeSectionRefItem(const QCString &,const QCString &lab,
+// const QCString &title)
//{
// docify(title);
-// t << "\\tab";
+// m_t << "\\tab";
// writeRTFReference(lab);
-// t << endl;
+// m_t << "\n";
//}
//
-//void RTFGenerator::writeSectionRefAnchor(const char *name,const char *lab,
-// const char *title)
+//void RTFGenerator::writeSectionRefAnchor(const QCString &name,const QCString &lab,
+// const QCString &title)
//{
// writeSectionRef(name,lab,title);
//}
@@ -1738,11 +1783,11 @@ void RTFGenerator::endSection(const char *lab,SectionType)
// return s;
//}
-void RTFGenerator::docify(const char *str)
+void RTFGenerator::docify(const QCString &str)
{
- if (str)
+ if (!str.isEmpty())
{
- const unsigned char *p=(const unsigned char *)str;
+ const unsigned char *p=(const unsigned char *)str.data();
unsigned char c;
//unsigned char pc='\0';
while (*p)
@@ -1753,28 +1798,28 @@ void RTFGenerator::docify(const char *str)
#if 0
if ( MultiByte )
{
- t << getMultiByte( c );
+ m_t << getMultiByte( c );
MultiByte = FALSE;
continue;
}
if ( c >= 0x80 )
{
MultiByte = TRUE;
- t << getMultiByte( c );
+ m_t << getMultiByte( c );
continue;
}
#endif
switch (c)
{
- case '{': t << "\\{"; break;
- case '}': t << "\\}"; break;
- case '\\': t << "\\\\"; break;
+ case '{': m_t << "\\{"; break;
+ case '}': m_t << "\\}"; break;
+ case '\\': m_t << "\\\\"; break;
default:
{
// see if we can insert an hyphenation hint
- //if (isupper(c) && islower(pc) && !insideTabbing) t << "\\-";
- t << (char)c;
+ //if (isupper(c) && islower(pc) && !insideTabbing) m_t << "\\-";
+ m_t << (char)c;
}
}
//pc = c;
@@ -1783,14 +1828,14 @@ void RTFGenerator::docify(const char *str)
}
}
-void RTFGenerator::codify(const char *str)
+void RTFGenerator::codify(const QCString &str)
{
// note that RTF does not have a "verbatim", so "\n" means
// nothing... add a "newParagraph()";
//static char spaces[]=" ";
- if (str)
+ if (!str.isEmpty())
{
- const unsigned char *p=(const unsigned char *)str;
+ const unsigned char *p=(const unsigned char *)str.data();
unsigned char c;
int spacesToNextTabStop;
@@ -1803,16 +1848,16 @@ void RTFGenerator::codify(const char *str)
switch(c)
{
case '\t': spacesToNextTabStop = Config_getInt(TAB_SIZE) - (m_col%Config_getInt(TAB_SIZE));
- t << Doxygen::spaces.left(spacesToNextTabStop);
+ m_t << Doxygen::spaces.left(spacesToNextTabStop);
m_col+=spacesToNextTabStop;
break;
case '\n': newParagraph();
- t << '\n'; m_col=0;
+ m_t << '\n'; m_col=0;
break;
- case '{': t << "\\{"; m_col++; break;
- case '}': t << "\\}"; m_col++; break;
- case '\\': t << "\\\\"; m_col++; break;
- default: p=(const unsigned char *)writeUtf8Char(t,(const char *)p-1); m_col++; break;
+ case '{': m_t << "\\{"; m_col++; break;
+ case '}': m_t << "\\}"; m_col++; break;
+ case '\\': m_t << "\\\\"; m_col++; break;
+ default: p=(const unsigned char *)writeUTF8Char(m_t,(const char *)p-1); m_col++; break;
}
}
}
@@ -1828,123 +1873,123 @@ void RTFGenerator::writeChar(char c)
void RTFGenerator::startClassDiagram()
{
- DBG_RTF(t <<"{\\comment startClassDiagram }" << endl)
+ DBG_RTF(m_t << "{\\comment startClassDiagram }\n")
}
void RTFGenerator::endClassDiagram(const ClassDiagram &d,
- const char *fileName,const char *)
+ const QCString &fileName,const QCString &)
{
newParagraph();
// create a png file
- d.writeImage(t,dir(),m_relPath,fileName,FALSE);
+ d.writeImage(m_t,dir(),m_relPath,fileName,FALSE);
// display the file
- t << "{" << endl;
- t << rtf_Style_Reset << endl;
- t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"";
- t << fileName << ".png\"";
- t << " \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl;
- t << "}" << endl;
+ m_t << "{\n";
+ m_t << rtf_Style_Reset << "\n";
+ m_t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"";
+ m_t << fileName << ".png\"";
+ m_t << " \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par\n";
+ m_t << "}\n";
}
-//void RTFGenerator::writeFormula(const char *,const char *text)
+//void RTFGenerator::writeFormula(const QCString &,const QCString &text)
//{
-// t << text;
+// m_t << text;
//}
-void RTFGenerator::startMemberItem(const char *,int,const char *)
+void RTFGenerator::startMemberItem(const QCString &,int,const QCString &)
{
- DBG_RTF(t <<"{\\comment startMemberItem }" << endl)
- t << rtf_Style_Reset << rtf_BList_DepthStyle() << endl; // set style to appropriate depth
+ DBG_RTF(m_t << "{\\comment startMemberItem }\n")
+ m_t << rtf_Style_Reset << rtf_BList_DepthStyle() << "\n"; // set style to appropriate depth
}
void RTFGenerator::endMemberItem()
{
- DBG_RTF(t <<"{\\comment endMemberItem }" << endl)
+ DBG_RTF(m_t << "{\\comment endMemberItem }\n")
newParagraph();
}
-void RTFGenerator::writeAnchor(const char *fileName,const char *name)
+void RTFGenerator::writeAnchor(const QCString &fileName,const QCString &name)
{
QCString anchor;
- if (fileName)
+ if (!fileName.isEmpty())
{
anchor+=fileName;
}
- if (fileName && name)
+ if (!fileName.isEmpty() && !name.isEmpty())
{
anchor+='_';
}
- if (name)
+ if (!name.isEmpty())
{
anchor+=name;
}
- DBG_RTF(t <<"{\\comment writeAnchor (" << anchor << ")}" << endl)
- t << "{\\bkmkstart " << rtfFormatBmkStr(anchor) << "}" << endl;
- t << "{\\bkmkend " << rtfFormatBmkStr(anchor) << "}" << endl;
+ DBG_RTF(m_t << "{\\comment writeAnchor (" << anchor << ")}\n")
+ m_t << "{\\bkmkstart " << rtfFormatBmkStr(anchor) << "}\n";
+ m_t << "{\\bkmkend " << rtfFormatBmkStr(anchor) << "}\n";
}
-void RTFGenerator::writeRTFReference(const char *label)
+void RTFGenerator::writeRTFReference(const QCString &label)
{
- t << "{\\field\\fldedit {\\*\\fldinst PAGEREF ";
- t << rtfFormatBmkStr(label);
- t << " \\\\*MERGEFORMAT}{\\fldrslt pagenum}}";
+ m_t << "{\\field\\fldedit {\\*\\fldinst PAGEREF ";
+ m_t << rtfFormatBmkStr(label);
+ m_t << " \\\\*MERGEFORMAT}{\\fldrslt pagenum}}";
}
-void RTFGenerator::startCodeFragment(const char *)
+void RTFGenerator::startCodeFragment(const QCString &)
{
- DBG_RTF(t << "{\\comment (startCodeFragment) }" << endl)
- t << "{" << endl;
- t << rtf_Style_Reset << rtf_Code_DepthStyle();
+ DBG_RTF(m_t << "{\\comment (startCodeFragment) }\n")
+ m_t << "{\n";
+ m_t << rtf_Style_Reset << rtf_Code_DepthStyle();
}
-void RTFGenerator::endCodeFragment(const char *)
+void RTFGenerator::endCodeFragment(const QCString &)
{
endCodeLine();
- DBG_RTF(t << "{\\comment (endCodeFragment) }" << endl)
- t << "}" << endl;
+ DBG_RTF(m_t << "{\\comment (endCodeFragment) }\n")
+ m_t << "}\n";
m_omitParagraph = TRUE;
}
void RTFGenerator::writeNonBreakableSpace(int)
{
- t << "\\~ ";
+ m_t << "\\~ ";
}
void RTFGenerator::startMemberList()
{
- t << endl;
- DBG_RTF(t << "{\\comment (startMemberList) }" << endl)
- t << "{" << endl;
+ m_t << "\n";
+ DBG_RTF(m_t << "{\\comment (startMemberList) }\n")
+ m_t << "{\n";
#ifdef DELETEDCODE
if (!insideTabbing)
- t << "\\begin{CompactItemize}" << endl;
+ m_t << "\\begin{CompactItemize}\n";
#endif
}
void RTFGenerator::endMemberList()
{
- DBG_RTF(t << "{\\comment (endMemberList) }" << endl)
- t << "}" << endl;
+ DBG_RTF(m_t << "{\\comment (endMemberList) }\n")
+ m_t << "}\n";
#ifdef DELETEDCODE
if (!insideTabbing)
- t << "\\end{CompactItemize}" << endl;
+ m_t << "\\end{CompactItemize}\n";
#endif
}
-//void RTFGenerator::startImage(const char *name,const char *,bool)
+//void RTFGenerator::startImage(const QCString &name,const QCString &,bool)
//{
// newParagraph();
-// t << "{" << endl;
-// t << rtf_Style_Reset << endl;
-// t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE ";
-// t << name;
-// t << " \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl;
-// t << "}" << endl;
+// m_t << "{\n";
+// m_t << rtf_Style_Reset << "\n";
+// m_t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE ";
+// m_t << name;
+// m_t << " \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par\n";
+// m_t << "}\n";
//}
//
//void RTFGenerator::endImage(bool)
@@ -1952,7 +1997,7 @@ void RTFGenerator::endMemberList()
// // not yet implemented
//}
//
-//void RTFGenerator::startDotFile(const char *name,bool)
+//void RTFGenerator::startDotFile(const QCString &name,bool)
//{
// QCString baseName=name;
// int i;
@@ -1963,12 +2008,12 @@ void RTFGenerator::endMemberList()
// QCString outDir = Config_getString(RTF_OUTPUT);
// writeDotGraphFromFile(name,outDir,baseName,BITMAP);
// newParagraph();
-// t << "{" << endl;
-// t << rtf_Style_Reset << endl;
-// t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE ";
-// t << outDir << "\\" << baseName;
-// t << " \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl;
-// t << "}" << endl;
+// m_t << "{\n";
+// m_t << rtf_Style_Reset << "\n";
+// m_t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE ";
+// m_t << outDir << "\\" << baseName;
+// m_t << " \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par\n";
+// m_t << "}\n";
//}
//
//void RTFGenerator::endDotFile(bool)
@@ -1976,38 +2021,38 @@ void RTFGenerator::endMemberList()
// // not yet implemented
//}
//
-void RTFGenerator::startDescTable(const char *title)
+void RTFGenerator::startDescTable(const QCString &title)
{
- DBG_RTF(t << "{\\comment (startDescTable) }" << endl)
- t << "{\\par" << endl;
- t << "{" << rtf_Style["Heading5"].reference() << endl;
+ DBG_RTF(m_t << "{\\comment (startDescTable) }\n")
+ m_t << "{\\par\n";
+ m_t << "{" << rtf_Style["Heading5"].reference() << "\n";
docify(title);
- t << ":\\par}" << endl;
- t << rtf_Style_Reset << rtf_DList_DepthStyle();
- t << "\\trowd \\trgaph108\\trleft426\\tblind426"
+ m_t << ":\\par}\n";
+ m_t << rtf_Style_Reset << rtf_DList_DepthStyle();
+ m_t << "\\trowd \\trgaph108\\trleft426\\tblind426"
"\\trbrdrt\\brdrs\\brdrw10\\brdrcf15 "
"\\trbrdrl\\brdrs\\brdrw10\\brdrcf15 "
"\\trbrdrb\\brdrs\\brdrw10\\brdrcf15 "
"\\trbrdrr\\brdrs\\brdrw10\\brdrcf15 "
"\\trbrdrh\\brdrs\\brdrw10\\brdrcf15 "
- "\\trbrdrv\\brdrs\\brdrw10\\brdrcf15 "<< endl;
+ "\\trbrdrv\\brdrs\\brdrw10\\brdrcf15 \n";
int i,columnPos[2] = { 25, 100 };
for (i=0;i<2;i++)
{
- t << "\\clvertalt\\clbrdrt\\brdrs\\brdrw10\\brdrcf15 "
+ m_t << "\\clvertalt\\clbrdrt\\brdrs\\brdrw10\\brdrcf15 "
"\\clbrdrl\\brdrs\\brdrw10\\brdrcf15 "
"\\clbrdrb\\brdrs\\brdrw10\\brdrcf15 "
"\\clbrdrr \\brdrs\\brdrw10\\brdrcf15 "
"\\cltxlrtb "
- "\\cellx" << (rtf_pageWidth*columnPos[i]/100) << endl;
+ "\\cellx" << (rtf_pageWidth*columnPos[i]/100) << "\n";
}
- t << "\\pard \\widctlpar\\intbl\\adjustright" << endl;
+ m_t << "\\pard \\widctlpar\\intbl\\adjustright\n";
}
void RTFGenerator::endDescTable()
{
- DBG_RTF(t << "{\\comment (endDescTable)}" << endl)
- t << "}" << endl;
+ DBG_RTF(m_t << "{\\comment (endDescTable)}\n")
+ m_t << "}\n";
}
void RTFGenerator::startDescTableRow()
@@ -2020,26 +2065,26 @@ void RTFGenerator::endDescTableRow()
void RTFGenerator::startDescTableTitle()
{
- DBG_RTF(t << "{\\comment (startDescTableTitle) }" << endl)
- t << "{\\qr ";
+ DBG_RTF(m_t << "{\\comment (startDescTableTitle) }\n")
+ m_t << "{\\qr ";
}
void RTFGenerator::endDescTableTitle()
{
- DBG_RTF(t << "{\\comment (endDescTableTitle) }" << endl)
- t << "\\cell }";
+ DBG_RTF(m_t << "{\\comment (endDescTableTitle) }\n")
+ m_t << "\\cell }";
}
void RTFGenerator::startDescTableData()
{
- DBG_RTF(t << "{\\comment (startDescTableData) }" << endl)
- t << "{";
+ DBG_RTF(m_t << "{\\comment (startDescTableData) }\n")
+ m_t << "{";
}
void RTFGenerator::endDescTableData()
{
- DBG_RTF(t << "{\\comment (endDescTableData) }" << endl)
- t << "\\cell }{\\row }" << endl;
+ DBG_RTF(m_t << "{\\comment (endDescTableData) }\n")
+ m_t << "\\cell }{\\row }\n";
}
// a style for list formatted as a "bulleted list"
@@ -2065,40 +2110,40 @@ void RTFGenerator::decrementIndentLevel()
}
// a style for list formatted with "list continue" style
-const char * RTFGenerator::rtf_CList_DepthStyle()
+QCString RTFGenerator::rtf_CList_DepthStyle()
{
QCString n=makeIndexName("ListContinue",m_listLevel);
return rtf_Style[n.str()].reference();
}
// a style for list formatted as a "latext style" table of contents
-const char * RTFGenerator::rtf_LCList_DepthStyle()
+QCString RTFGenerator::rtf_LCList_DepthStyle()
{
QCString n=makeIndexName("LatexTOC",m_listLevel);
return rtf_Style[n.str()].reference();
}
// a style for list formatted as a "bullet" style
-const char * RTFGenerator::rtf_BList_DepthStyle()
+QCString RTFGenerator::rtf_BList_DepthStyle()
{
QCString n=makeIndexName("ListBullet",m_listLevel);
return rtf_Style[n.str()].reference();
}
// a style for list formatted as a "enumeration" style
-const char * RTFGenerator::rtf_EList_DepthStyle()
+QCString RTFGenerator::rtf_EList_DepthStyle()
{
QCString n=makeIndexName("ListEnum",m_listLevel);
return rtf_Style[n.str()].reference();
}
-const char * RTFGenerator::rtf_DList_DepthStyle()
+QCString RTFGenerator::rtf_DList_DepthStyle()
{
QCString n=makeIndexName("DescContinue",m_listLevel);
return rtf_Style[n.str()].reference();
}
-const char * RTFGenerator::rtf_Code_DepthStyle()
+QCString RTFGenerator::rtf_Code_DepthStyle()
{
QCString n=makeIndexName("CodeExample",m_listLevel);
return rtf_Style[n.str()].reference();
@@ -2106,24 +2151,24 @@ const char * RTFGenerator::rtf_Code_DepthStyle()
void RTFGenerator::startTextBlock(bool dense)
{
- DBG_RTF(t << "{\\comment startTextBlock}" << endl)
- t << "{" << endl;
- t << rtf_Style_Reset;
+ DBG_RTF(m_t << "{\\comment startTextBlock}\n")
+ m_t << "{\n";
+ m_t << rtf_Style_Reset;
if (dense) // no spacing between "paragraphs"
{
- t << rtf_Style["DenseText"].reference();
+ m_t << rtf_Style["DenseText"].reference();
}
else // some spacing
{
- t << rtf_Style["BodyText"].reference();
+ m_t << rtf_Style["BodyText"].reference();
}
}
void RTFGenerator::endTextBlock(bool /*paraBreak*/)
{
newParagraph();
- DBG_RTF(t << "{\\comment endTextBlock}" << endl)
- t << "}" << endl;
+ DBG_RTF(m_t << "{\\comment endTextBlock}\n")
+ m_t << "}\n";
//m_omitParagraph = TRUE;
}
@@ -2131,58 +2176,58 @@ void RTFGenerator::newParagraph()
{
if (!m_omitParagraph)
{
- DBG_RTF(t << "{\\comment (newParagraph)}" << endl)
- t << "\\par" << endl;
+ DBG_RTF(m_t << "{\\comment (newParagraph)}\n")
+ m_t << "\\par\n";
}
m_omitParagraph = FALSE;
}
-void RTFGenerator::startParagraph(const char *txt)
+void RTFGenerator::startParagraph(const QCString &txt)
{
- DBG_RTF(t << "{\\comment startParagraph}" << endl)
+ DBG_RTF(m_t << "{\\comment startParagraph}\n")
newParagraph();
- t << "{" << endl;
- if (QCString(txt) == "reference") t << "\\ql" << endl;
+ m_t << "{\n";
+ if (QCString(txt) == "reference") m_t << "\\ql\n";
}
void RTFGenerator::endParagraph()
{
- DBG_RTF(t << "{\\comment endParagraph}" << endl)
- t << "}\\par" << endl;
+ DBG_RTF(m_t << "{\\comment endParagraph}\n")
+ m_t << "}\\par\n";
m_omitParagraph = TRUE;
}
void RTFGenerator::startMemberSubtitle()
{
- DBG_RTF(t << "{\\comment startMemberSubtitle}" << endl)
- t << "{" << endl;
- t << rtf_Style_Reset << rtf_CList_DepthStyle() << endl;
+ DBG_RTF(m_t << "{\\comment startMemberSubtitle}\n")
+ m_t << "{\n";
+ m_t << rtf_Style_Reset << rtf_CList_DepthStyle() << "\n";
}
void RTFGenerator::endMemberSubtitle()
{
- DBG_RTF(t << "{\\comment endMemberSubtitle}" << endl)
+ DBG_RTF(m_t << "{\\comment endMemberSubtitle}\n")
newParagraph();
- t << "}" << endl;
+ m_t << "}\n";
}
//void RTFGenerator::writeUmlaut(char c)
//{
// switch(c)
// {
-// case 'A' : t << '\304'; break;
-// case 'E' : t << '\313'; break;
-// case 'I' : t << '\317'; break;
-// case 'O' : t << '\326'; break;
-// case 'U' : t << '\334'; break;
-// case 'Y' : t << 'Y'; break;
-// case 'a' : t << '\344'; break;
-// case 'e' : t << '\353'; break;
-// case 'i' : t << '\357'; break;
-// case 'o' : t << '\366'; break;
-// case 'u' : t << '\374'; break;
-// case 'y' : t << '\377'; break;
-// default: t << '?'; break;
+// case 'A' : m_t << '\304'; break;
+// case 'E' : m_t << '\313'; break;
+// case 'I' : m_t << '\317'; break;
+// case 'O' : m_t << '\326'; break;
+// case 'U' : m_t << '\334'; break;
+// case 'Y' : m_t << 'Y'; break;
+// case 'a' : m_t << '\344'; break;
+// case 'e' : m_t << '\353'; break;
+// case 'i' : m_t << '\357'; break;
+// case 'o' : m_t << '\366'; break;
+// case 'u' : m_t << '\374'; break;
+// case 'y' : m_t << '\377'; break;
+// default: m_t << '?'; break;
// }
//}
//
@@ -2190,19 +2235,19 @@ void RTFGenerator::endMemberSubtitle()
//{
// switch(c)
// {
-// case 'A' : t << '\301'; break;
-// case 'E' : t << '\311'; break;
-// case 'I' : t << '\315'; break;
-// case 'O' : t << '\323'; break;
-// case 'U' : t << '\332'; break;
-// case 'Y' : t << '\335'; break;
-// case 'a' : t << '\341'; break;
-// case 'e' : t << '\351'; break;
-// case 'i' : t << '\355'; break;
-// case 'o' : t << '\363'; break;
-// case 'u' : t << '\372'; break;
-// case 'y' : t << '\375'; break;
-// default: t << '?'; break;
+// case 'A' : m_t << '\301'; break;
+// case 'E' : m_t << '\311'; break;
+// case 'I' : m_t << '\315'; break;
+// case 'O' : m_t << '\323'; break;
+// case 'U' : m_t << '\332'; break;
+// case 'Y' : m_t << '\335'; break;
+// case 'a' : m_t << '\341'; break;
+// case 'e' : m_t << '\351'; break;
+// case 'i' : m_t << '\355'; break;
+// case 'o' : m_t << '\363'; break;
+// case 'u' : m_t << '\372'; break;
+// case 'y' : m_t << '\375'; break;
+// default: m_t << '?'; break;
// }
//}
//
@@ -2210,17 +2255,17 @@ void RTFGenerator::endMemberSubtitle()
//{
// switch(c)
// {
-// case 'A' : t << '\300'; break;
-// case 'E' : t << '\310'; break;
-// case 'I' : t << '\314'; break;
-// case 'O' : t << '\322'; break;
-// case 'U' : t << '\331'; break;
-// case 'a' : t << '\340'; break;
-// case 'e' : t << '\350'; break;
-// case 'i' : t << '\354'; break;
-// case 'o' : t << '\362'; break;
-// case 'u' : t << '\371'; break;
-// default: t << '?'; break;
+// case 'A' : m_t << '\300'; break;
+// case 'E' : m_t << '\310'; break;
+// case 'I' : m_t << '\314'; break;
+// case 'O' : m_t << '\322'; break;
+// case 'U' : m_t << '\331'; break;
+// case 'a' : m_t << '\340'; break;
+// case 'e' : m_t << '\350'; break;
+// case 'i' : m_t << '\354'; break;
+// case 'o' : m_t << '\362'; break;
+// case 'u' : m_t << '\371'; break;
+// default: m_t << '?'; break;
// }
//}
//
@@ -2228,17 +2273,17 @@ void RTFGenerator::endMemberSubtitle()
//{
// switch(c)
// {
-// case 'A' : t << '\302'; break;
-// case 'E' : t << '\312'; break;
-// case 'I' : t << '\316'; break;
-// case 'O' : t << '\324'; break;
-// case 'U' : t << '\333'; break;
-// case 'a' : t << '\342'; break;
-// case 'e' : t << '\352'; break;
-// case 'i' : t << '\356'; break;
-// case 'o' : t << '\364'; break;
-// case 'u' : t << '\373'; break;
-// default: t << '?'; break;
+// case 'A' : m_t << '\302'; break;
+// case 'E' : m_t << '\312'; break;
+// case 'I' : m_t << '\316'; break;
+// case 'O' : m_t << '\324'; break;
+// case 'U' : m_t << '\333'; break;
+// case 'a' : m_t << '\342'; break;
+// case 'e' : m_t << '\352'; break;
+// case 'i' : m_t << '\356'; break;
+// case 'o' : m_t << '\364'; break;
+// case 'u' : m_t << '\373'; break;
+// default: m_t << '?'; break;
// }
//}
//
@@ -2246,13 +2291,13 @@ void RTFGenerator::endMemberSubtitle()
//{
// switch(c)
// {
-// case 'A' : t << '\303'; break;
-// case 'N' : t << '\321'; break;
-// case 'O' : t << '\325'; break;
-// case 'a' : t << '\343'; break;
-// case 'n' : t << '\361'; break;
-// case 'o' : t << '\365'; break;
-// default: t << '?'; break;
+// case 'A' : m_t << '\303'; break;
+// case 'N' : m_t << '\321'; break;
+// case 'O' : m_t << '\325'; break;
+// case 'a' : m_t << '\343'; break;
+// case 'n' : m_t << '\361'; break;
+// case 'o' : m_t << '\365'; break;
+// default: m_t << '?'; break;
// }
//}
//
@@ -2260,9 +2305,9 @@ void RTFGenerator::endMemberSubtitle()
//{
// switch(c)
// {
-// case 'A' : t << '\305'; break;
-// case 'a' : t << '\345'; break;
-// default: t << '?'; break;
+// case 'A' : m_t << '\305'; break;
+// case 'a' : m_t << '\345'; break;
+// default: m_t << '?'; break;
// }
//}
//
@@ -2270,9 +2315,9 @@ void RTFGenerator::endMemberSubtitle()
//{
// switch(c)
// {
-// case 'C' : t << '\307'; break;
-// case 'c' : t << '\347'; break;
-// default: t << '?'; break;
+// case 'C' : m_t << '\307'; break;
+// case 'c' : m_t << '\347'; break;
+// default: m_t << '?'; break;
// }
//}
//
@@ -2309,25 +2354,25 @@ bool isLeadBytes(int c)
// note: function is not reentrant!
-static void encodeForOutput(FTextStream &t,const char *s)
+static void encodeForOutput(TextStream &t,const QCString &s)
{
if (s==0) return;
QCString encoding;
bool converted=FALSE;
- int l = qstrlen(s);
- static QByteArray enc;
+ int l = (int)s.length();
+ static std::vector<char> enc;
if (l*4>(int)enc.size()) enc.resize(l*4); // worst case
- encoding.sprintf("CP%s",theTranslator->trRTFansicp().data());
+ encoding.sprintf("CP%s",qPrint(theTranslator->trRTFansicp()));
if (!encoding.isEmpty())
{
// convert from UTF-8 back to the output encoding
- void *cd = portable_iconv_open(encoding,"UTF-8");
+ void *cd = portable_iconv_open(encoding.data(),"UTF-8");
if (cd!=(void *)(-1))
{
size_t iLeft=l;
size_t oLeft=enc.size();
- char *inputPtr = (char*)s;
- char *outputPtr = enc.data();
+ const char *inputPtr = s.data();
+ char *outputPtr = &enc[0];
if (!portable_iconv(cd, &inputPtr, &iLeft, &outputPtr, &oLeft))
{
enc.resize(enc.size()-(unsigned int)oLeft);
@@ -2338,7 +2383,7 @@ static void encodeForOutput(FTextStream &t,const char *s)
}
if (!converted) // if we did not convert anything, copy as is.
{
- memcpy(enc.data(),s,l);
+ memcpy(enc.data(),s.data(),l);
enc.resize(l);
}
uint i;
@@ -2374,13 +2419,13 @@ static void encodeForOutput(FTextStream &t,const char *s)
* VERY brittle routine inline RTF's included by other RTF's.
* it is recursive and ugly.
*/
-static bool preProcessFile(QDir &d,QCString &infName, FTextStream &t, bool bIncludeHeader=TRUE)
+static bool preProcessFile(Dir &d,const QCString &infName, TextStream &t, bool bIncludeHeader=TRUE)
{
- QFile f(infName);
- if (!f.open(IO_ReadOnly))
+ std::ifstream f(infName.str(),std::ifstream::in);
+ if (!f.is_open())
{
err("problems opening rtf file %s for reading\n",infName.data());
- return FALSE;
+ return false;
}
const int maxLineLength = 10240;
@@ -2390,67 +2435,59 @@ static bool preProcessFile(QDir &d,QCString &infName, FTextStream &t, bool bIncl
// this is EXTREEEEEEEMLY brittle. It works on OUR rtf
// files because the first line before the body
// ALWAYS contains "{\comment begin body}"
- int len;
- for(;;)
+ std::string line;
+ while (getline(f,line))
{
- lineBuf.resize(maxLineLength);
- if ((len=f.readLine(lineBuf.rawData(),maxLineLength))==-1)
- {
- err("read error in %s before end of RTF header!\n",infName.data());
- return FALSE;
- }
- lineBuf.resize(len+1);
- if (lineBuf.find("\\comment begin body")!=-1) break;
- if (bIncludeHeader) encodeForOutput(t,lineBuf.data());
+ line+='\n';
+ if (line.find("\\comment begin body")!=std::string::npos) break;
+ if (bIncludeHeader) encodeForOutput(t,line.c_str());
}
-
- lineBuf.resize(maxLineLength);
- while ((len=f.readLine(lineBuf.rawData(),maxLineLength))!=-1)
+ std::string prevLine;
+ bool first=true;
+ while (getline(f,line))
{
- lineBuf.resize(len+1);
- int pos;
- if ((pos=lineBuf.find("INCLUDETEXT"))!=-1)
+ line+='\n';
+ size_t pos;
+ if ((pos=prevLine.find("INCLUDETEXT"))!=std::string::npos)
{
- int startNamePos = lineBuf.find('"',pos)+1;
- int endNamePos = lineBuf.find('"',startNamePos);
- QCString fileName = lineBuf.mid(startNamePos,endNamePos-startNamePos);
- DBG_RTF(t << "{\\comment begin include " << fileName << "}" << endl)
- if (!preProcessFile(d,fileName,t,FALSE)) return FALSE;
- DBG_RTF(t << "{\\comment end include " << fileName << "}" << endl)
+ size_t startNamePos = prevLine.find('"',pos)+1;
+ size_t endNamePos = prevLine.find('"',startNamePos);
+ std::string fileName = prevLine.substr(startNamePos,endNamePos-startNamePos);
+ DBG_RTF(m_t << "{\\comment begin include " << fileName << "}\n")
+ if (!preProcessFile(d,fileName.c_str(),t,FALSE)) return FALSE;
+ DBG_RTF(m_t << "{\\comment end include " << fileName << "}\n")
}
- else // no INCLUDETEXT on this line
+ else if (!first) // no INCLUDETEXT on this line
{
- // elaborate hoopla to skip the final "}" if we didn't include the
- // headers
- if (!f.atEnd() || bIncludeHeader)
- {
- encodeForOutput(t,lineBuf);
- }
- else // last line of included file
- {
- // null terminate at the last '}'
- //char *str = strrchr(buffer,'}');
- pos = lineBuf.findRev('}');
-
- if (pos != -1)
- lineBuf.at(pos) = '\0';
- else
- err("Strange, the last char was not a '}'\n");
- encodeForOutput(t,lineBuf);
- }
+ encodeForOutput(t,prevLine.c_str());
}
- lineBuf.resize(maxLineLength);
+ prevLine = line;
+ first=false;
+ }
+ if (!bIncludeHeader) // skip final '}' in case we don't include headers
+ {
+ size_t pos = line.rfind('}');
+ if (pos==std::string::npos)
+ {
+ err("Strange, the last char was not a '}'\n");
+ pos = line.length();
+ }
+ encodeForOutput(t,line.substr(0,pos).c_str());
+ }
+ else
+ {
+ encodeForOutput(t,line.c_str());
}
f.close();
// remove temporary file
- d.remove(infName);
+ d.remove(infName.str());
return TRUE;
}
void RTFGenerator::startDotGraph()
{
- DBG_RTF(t << "{\\comment (startDotGraph)}" << endl)
+ DBG_RTF(m_t << "{\\comment (startDotGraph)}\n")
}
void RTFGenerator::endDotGraph(DotClassGraph &g)
@@ -2458,40 +2495,40 @@ void RTFGenerator::endDotGraph(DotClassGraph &g)
newParagraph();
QCString fn =
- g.writeGraph(t,GOF_BITMAP,EOF_Rtf,dir(),fileName(),m_relPath,TRUE,FALSE);
+ g.writeGraph(m_t,GOF_BITMAP,EOF_Rtf,dir(),fileName(),m_relPath,TRUE,FALSE);
// display the file
- t << "{" << endl;
- t << rtf_Style_Reset << endl;
- t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"";
+ m_t << "{\n";
+ m_t << rtf_Style_Reset << "\n";
+ m_t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"";
QCString imgExt = getDotImageExtension();
- t << fn << "." << imgExt;
- t << "\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl;
- t << "}" << endl;
+ m_t << fn << "." << imgExt;
+ m_t << "\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par\n";
+ m_t << "}\n";
newParagraph();
- DBG_RTF(t << "{\\comment (endDotGraph)}" << endl)
+ DBG_RTF(m_t << "{\\comment (endDotGraph)}\n")
}
void RTFGenerator::startInclDepGraph()
{
- DBG_RTF(t << "{\\comment (startInclDepGraph)}" << endl)
+ DBG_RTF(m_t << "{\\comment (startInclDepGraph)}\n")
}
void RTFGenerator::endInclDepGraph(DotInclDepGraph &g)
{
newParagraph();
- QCString fn = g.writeGraph(t,GOF_BITMAP,EOF_Rtf,dir(),fileName(),m_relPath,FALSE);
+ QCString fn = g.writeGraph(m_t,GOF_BITMAP,EOF_Rtf,dir(),fileName(),m_relPath,FALSE);
// display the file
- t << "{" << endl;
- t << rtf_Style_Reset << endl;
- t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"";
+ m_t << "{\n";
+ m_t << rtf_Style_Reset << "\n";
+ m_t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"";
QCString imgExt = getDotImageExtension();
- t << fn << "." << imgExt;
- t << "\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl;
- t << "}" << endl;
- DBG_RTF(t << "{\\comment (endInclDepGraph)}" << endl)
+ m_t << fn << "." << imgExt;
+ m_t << "\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par\n";
+ m_t << "}\n";
+ DBG_RTF(m_t << "{\\comment (endInclDepGraph)}\n")
}
void RTFGenerator::startGroupCollaboration()
@@ -2504,64 +2541,64 @@ void RTFGenerator::endGroupCollaboration(DotGroupCollaboration &)
void RTFGenerator::startCallGraph()
{
- DBG_RTF(t << "{\\comment (startCallGraph)}" << endl)
+ DBG_RTF(m_t << "{\\comment (startCallGraph)}\n")
}
void RTFGenerator::endCallGraph(DotCallGraph &g)
{
newParagraph();
- QCString fn = g.writeGraph(t,GOF_BITMAP,EOF_Rtf,dir(),fileName(),m_relPath,FALSE);
+ QCString fn = g.writeGraph(m_t,GOF_BITMAP,EOF_Rtf,dir(),fileName(),m_relPath,FALSE);
// display the file
- t << "{" << endl;
- t << rtf_Style_Reset << endl;
- t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"";
+ m_t << "{\n";
+ m_t << rtf_Style_Reset << "\n";
+ m_t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"";
QCString imgExt = getDotImageExtension();
- t << fn << "." << imgExt;
- t << "\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl;
- t << "}" << endl;
- DBG_RTF(t << "{\\comment (endCallGraph)}" << endl)
+ m_t << fn << "." << imgExt;
+ m_t << "\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par\n";
+ m_t << "}\n";
+ DBG_RTF(m_t << "{\\comment (endCallGraph)}\n")
}
void RTFGenerator::startDirDepGraph()
{
- DBG_RTF(t << "{\\comment (startDirDepGraph)}" << endl)
+ DBG_RTF(m_t << "{\\comment (startDirDepGraph)}\n")
}
void RTFGenerator::endDirDepGraph(DotDirDeps &g)
{
newParagraph();
- QCString fn = g.writeGraph(t,GOF_BITMAP,EOF_Rtf,dir(),fileName(),m_relPath,FALSE);
+ QCString fn = g.writeGraph(m_t,GOF_BITMAP,EOF_Rtf,dir(),fileName(),m_relPath,FALSE);
// display the file
- t << "{" << endl;
- t << rtf_Style_Reset << endl;
- t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"";
+ m_t << "{\n";
+ m_t << rtf_Style_Reset << "\n";
+ m_t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"";
QCString imgExt = getDotImageExtension();
- t << fn << "." << imgExt;
- t << "\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl;
- t << "}" << endl;
- DBG_RTF(t << "{\\comment (endDirDepGraph)}" << endl)
+ m_t << fn << "." << imgExt;
+ m_t << "\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par\n";
+ m_t << "}\n";
+ DBG_RTF(m_t << "{\\comment (endDirDepGraph)}\n")
}
/** Tests the integrity of the result by counting brackets.
*
*/
-void testRTFOutput(const char *name)
+void testRTFOutput(const QCString &name)
{
int bcount=0;
int line=1;
int c;
- QFile f(name);
- if (f.open(IO_ReadOnly))
+ std::ifstream f(name.data(),std::ifstream::in);
+ if (f.is_open())
{
- while ((c=f.getch())!=-1)
+ while ((c=f.get())!=-1)
{
if (c=='\\') // escape char
{
- c=f.getch();
+ c=f.get();
if (c==-1) break;
}
else if (c=='{') // open bracket
@@ -2587,178 +2624,184 @@ void testRTFOutput(const char *name)
err:
err("RTF integrity test failed at line %d of %s due to a bracket mismatch.\n"
" Please try to create a small code example that produces this error \n"
- " and send that to doxygen@gmail.com.\n",line,name);
+ " and send that to doxygen@gmail.com.\n",line,qPrint(name));
}
/**
* This is an API to a VERY brittle RTF preprocessor that combines nested
* RTF files. This version replaces the infile with the new file
*/
-bool RTFGenerator::preProcessFileInplace(const char *path,const char *name)
+bool RTFGenerator::preProcessFileInplace(const QCString &path,const QCString &name)
{
- QDir d(path);
+ Dir d(path.str());
// store the original directory
if (!d.exists())
{
- err("Output dir %s does not exist!\n",path);
+ err("Output dir %s does not exist!\n",qPrint(path));
return FALSE;
}
- QCString oldDir = QDir::currentDirPath().utf8();
+ std::string oldDir = Dir::currentDirPath();
// go to the html output directory (i.e. path)
- QDir::setCurrent(d.absPath());
- QDir thisDir;
+ Dir::setCurrent(d.absPath());
+ Dir thisDir;
- QCString combinedName = (QCString)path+"/combined.rtf";
- QCString mainRTFName = (QCString)path+"/"+name;
+ QCString combinedName = path+"/combined.rtf";
+ QCString mainRTFName = path+"/"+name;
- QFile outf(combinedName);
- if (!outf.open(IO_WriteOnly))
+ std::ofstream f(combinedName.str(),std::ofstream::out | std::ofstream::binary);
+ if (!f.is_open())
{
err("Failed to open %s for writing!\n",combinedName.data());
- QDir::setCurrent(oldDir);
+ Dir::setCurrent(oldDir);
return FALSE;
}
- FTextStream outt(&outf);
+ TextStream outt(&f);
if (!preProcessFile(thisDir,mainRTFName,outt))
{
// it failed, remove the temp file
- outf.close();
- thisDir.remove(combinedName);
- QDir::setCurrent(oldDir);
+ outt.flush();
+ f.close();
+ thisDir.remove(combinedName.str());
+ Dir::setCurrent(oldDir);
return FALSE;
}
// everything worked, move the files
- outf.close();
- thisDir.remove(mainRTFName);
- thisDir.rename(combinedName,mainRTFName);
+ outt.flush();
+ f.close();
+ thisDir.remove(mainRTFName.str());
+ thisDir.rename(combinedName.str(),mainRTFName.str());
testRTFOutput(mainRTFName);
- QDir::setCurrent(oldDir);
+ Dir::setCurrent(oldDir);
return TRUE;
}
void RTFGenerator::startMemberGroupHeader(bool hasHeader)
{
- DBG_RTF(t << "{\\comment startMemberGroupHeader}" << endl)
- t << "{" << endl;
+ DBG_RTF(m_t << "{\\comment startMemberGroupHeader}\n")
+ m_t << "{\n";
if (hasHeader) incrementIndentLevel();
- t << rtf_Style_Reset << rtf_Style["GroupHeader"].reference();
+ m_t << rtf_Style_Reset << rtf_Style["GroupHeader"].reference();
}
void RTFGenerator::endMemberGroupHeader()
{
- DBG_RTF(t << "{\\comment endMemberGroupHeader}" << endl)
+ DBG_RTF(m_t << "{\\comment endMemberGroupHeader}\n")
newParagraph();
- t << rtf_Style_Reset << rtf_CList_DepthStyle();
+ m_t << rtf_Style_Reset << rtf_CList_DepthStyle();
}
void RTFGenerator::startMemberGroupDocs()
{
- DBG_RTF(t << "{\\comment startMemberGroupDocs}" << endl)
+ DBG_RTF(m_t << "{\\comment startMemberGroupDocs}\n")
startEmphasis();
}
void RTFGenerator::endMemberGroupDocs()
{
- DBG_RTF(t << "{\\comment endMemberGroupDocs}" << endl)
+ DBG_RTF(m_t << "{\\comment endMemberGroupDocs}\n")
endEmphasis();
newParagraph();
}
void RTFGenerator::startMemberGroup()
{
- DBG_RTF(t << "{\\comment startMemberGroup}" << endl)
- t << rtf_Style_Reset << rtf_BList_DepthStyle() << endl;
+ DBG_RTF(m_t << "{\\comment startMemberGroup}\n")
+ m_t << rtf_Style_Reset << rtf_BList_DepthStyle() << "\n";
}
void RTFGenerator::endMemberGroup(bool hasHeader)
{
- DBG_RTF(t << "{\\comment endMemberGroup}" << endl)
+ DBG_RTF(m_t << "{\\comment endMemberGroup}\n")
if (hasHeader) decrementIndentLevel();
- t << "}";
+ m_t << "}";
}
void RTFGenerator::startExamples()
{
- DBG_RTF(t << "{\\comment (startExamples)}" << endl)
- t << "{"; // ends at endDescList
- t << "{"; // ends at endDescTitle
+ DBG_RTF(m_t << "{\\comment (startExamples)}\n")
+ m_t << "{"; // ends at endDescList
+ m_t << "{"; // ends at endDescTitle
startBold();
newParagraph();
docify(theTranslator->trExamples());
endBold();
- t << "}";
+ m_t << "}";
newParagraph();
incrementIndentLevel();
- t << rtf_Style_Reset << rtf_DList_DepthStyle();
+ m_t << rtf_Style_Reset << rtf_DList_DepthStyle();
}
void RTFGenerator::endExamples()
{
- DBG_RTF(t << "{\\comment (endExamples)}" << endl)
+ DBG_RTF(m_t << "{\\comment (endExamples)}\n")
m_omitParagraph = FALSE;
newParagraph();
decrementIndentLevel();
m_omitParagraph = TRUE;
- t << "}";
+ m_t << "}";
}
-void RTFGenerator::startParamList(ParamListTypes,const char *title)
+void RTFGenerator::startParamList(ParamListTypes,const QCString &title)
{
- DBG_RTF(t << "{\\comment (startParamList)}" << endl)
- t << "{"; // ends at endParamList
- t << "{"; // ends at endDescTitle
+ DBG_RTF(m_t << "{\\comment (startParamList)}\n")
+ m_t << "{"; // ends at endParamList
+ m_t << "{"; // ends at endDescTitle
startBold();
newParagraph();
docify(title);
endBold();
- t << "}";
+ m_t << "}";
newParagraph();
incrementIndentLevel();
- t << rtf_Style_Reset << rtf_DList_DepthStyle();
+ m_t << rtf_Style_Reset << rtf_DList_DepthStyle();
}
void RTFGenerator::endParamList()
{
- DBG_RTF(t << "{\\comment (endParamList)}" << endl)
+ DBG_RTF(m_t << "{\\comment (endParamList)}\n")
newParagraph();
decrementIndentLevel();
m_omitParagraph = TRUE;
- t << "}";
+ m_t << "}";
}
-void RTFGenerator::startParameterType(bool first,const char *key)
+void RTFGenerator::startParameterType(bool first,const QCString &key)
{
- DBG_RTF(t << "{\\comment (startParameterType)}" << endl)
- if (!first && key)
+ DBG_RTF(m_t << "{\\comment (startParameterType)}\n")
+ if (!first && !key.isEmpty())
{
- t << " " << key << " ";
+ m_t << " " << key << " ";
}
}
void RTFGenerator::endParameterType()
{
- DBG_RTF(t << "{\\comment (endParameterType)}" << endl)
- t << " ";
+ DBG_RTF(m_t << "{\\comment (endParameterType)}\n")
+ m_t << " ";
}
-void RTFGenerator::exceptionEntry(const char* prefix,bool closeBracket)
+void RTFGenerator::exceptionEntry(const QCString &prefix,bool closeBracket)
{
- DBG_RTF(t << "{\\comment (exceptionEntry)}" << endl)
- if (prefix)
- t << " " << prefix << "(";
+ DBG_RTF(m_t << "{\\comment (exceptionEntry)}\n")
+ if (!prefix.isEmpty())
+ {
+ m_t << " " << prefix << "(";
+ }
else if (closeBracket)
- t << ")";
- t << " ";
+ {
+ m_t << ")";
+ }
+ m_t << " ";
}
void RTFGenerator::writeDoc(DocNode *n,const Definition *ctx,const MemberDef *,int)
{
- RTFDocVisitor *visitor = new RTFDocVisitor(t,*this,ctx?ctx->getDefFileExtension():QCString(""));
+ RTFDocVisitor *visitor = new RTFDocVisitor(m_t,*this,ctx?ctx->getDefFileExtension():QCString(""));
n->accept(visitor);
delete visitor;
m_omitParagraph = TRUE;
@@ -2766,26 +2809,26 @@ void RTFGenerator::writeDoc(DocNode *n,const Definition *ctx,const MemberDef *,i
void RTFGenerator::rtfwriteRuler_doubleline()
{
- DBG_RTF(t << "{\\comment (rtfwriteRuler_doubleline)}" << endl)
- t << "{\\pard\\widctlpar\\brdrb\\brdrdb\\brdrw15\\brsp20 \\adjustright \\par}" << endl;
+ DBG_RTF(m_t << "{\\comment (rtfwriteRuler_doubleline)}\n")
+ m_t << "{\\pard\\widctlpar\\brdrb\\brdrdb\\brdrw15\\brsp20 \\adjustright \\par}\n";
}
void RTFGenerator::rtfwriteRuler_emboss()
{
- DBG_RTF(t << "{\\comment (rtfwriteRuler_emboss)}" << endl)
- t << "{\\pard\\widctlpar\\brdrb\\brdremboss\\brdrw15\\brsp20 \\adjustright \\par}" << endl;
+ DBG_RTF(m_t << "{\\comment (rtfwriteRuler_emboss)}\n")
+ m_t << "{\\pard\\widctlpar\\brdrb\\brdremboss\\brdrw15\\brsp20 \\adjustright \\par}\n";
}
void RTFGenerator::rtfwriteRuler_thick()
{
- DBG_RTF(t << "{\\comment (rtfwriteRuler_thick)}" << endl)
- t << "{\\pard\\widctlpar\\brdrb\\brdrs\\brdrw75\\brsp20 \\adjustright \\par}" << endl;
+ DBG_RTF(m_t << "{\\comment (rtfwriteRuler_thick)}\n")
+ m_t << "{\\pard\\widctlpar\\brdrb\\brdrs\\brdrw75\\brsp20 \\adjustright \\par}\n";
}
void RTFGenerator::rtfwriteRuler_thin()
{
- DBG_RTF(t << "{\\comment (rtfwriteRuler_thin)}" << endl)
- t << "{\\pard\\widctlpar\\brdrb\\brdrs\\brdrw5\\brsp20 \\adjustright \\par}" << endl;
+ DBG_RTF(m_t << "{\\comment (rtfwriteRuler_thin)}\n")
+ m_t << "{\\pard\\widctlpar\\brdrb\\brdrs\\brdrw5\\brsp20 \\adjustright \\par}\n";
}
#if 0
@@ -2819,116 +2862,116 @@ void RTFGenerator::postProcess(QByteArray &a)
}
#endif
-void RTFGenerator::startConstraintList(const char *header)
+void RTFGenerator::startConstraintList(const QCString &header)
{
- DBG_RTF(t << "{\\comment (startConstraintList)}" << endl)
- t << "{"; // ends at endConstraintList
- t << "{";
+ DBG_RTF(m_t << "{\\comment (startConstraintList)}\n")
+ m_t << "{"; // ends at endConstraintList
+ m_t << "{";
startBold();
newParagraph();
docify(header);
endBold();
- t << "}";
+ m_t << "}";
newParagraph();
incrementIndentLevel();
- t << rtf_Style_Reset << rtf_DList_DepthStyle();
+ m_t << rtf_Style_Reset << rtf_DList_DepthStyle();
}
void RTFGenerator::startConstraintParam()
{
- DBG_RTF(t << "{\\comment (startConstraintParam)}" << endl)
+ DBG_RTF(m_t << "{\\comment (startConstraintParam)}\n")
startEmphasis();
}
void RTFGenerator::endConstraintParam()
{
- DBG_RTF(t << "{\\comment (endConstraintParam)}" << endl)
+ DBG_RTF(m_t << "{\\comment (endConstraintParam)}\n")
endEmphasis();
- t << " : ";
+ m_t << " : ";
}
void RTFGenerator::startConstraintType()
{
- DBG_RTF(t << "{\\comment (startConstraintType)}" << endl)
+ DBG_RTF(m_t << "{\\comment (startConstraintType)}\n")
startEmphasis();
}
void RTFGenerator::endConstraintType()
{
- DBG_RTF(t << "{\\comment (endConstraintType)}" << endl)
+ DBG_RTF(m_t << "{\\comment (endConstraintType)}\n")
endEmphasis();
- t << " ";
+ m_t << " ";
}
void RTFGenerator::startConstraintDocs()
{
- DBG_RTF(t << "{\\comment (startConstraintDocs)}" << endl)
+ DBG_RTF(m_t << "{\\comment (startConstraintDocs)}\n")
}
void RTFGenerator::endConstraintDocs()
{
- DBG_RTF(t << "{\\comment (endConstraintDocs)}" << endl)
+ DBG_RTF(m_t << "{\\comment (endConstraintDocs)}\n")
newParagraph();
}
void RTFGenerator::endConstraintList()
{
- DBG_RTF(t << "{\\comment (endConstraintList)}" << endl)
+ DBG_RTF(m_t << "{\\comment (endConstraintList)}\n")
newParagraph();
decrementIndentLevel();
m_omitParagraph = TRUE;
- t << "}";
+ m_t << "}";
}
void RTFGenerator::startIndexListItem()
{
- DBG_RTF(t << "{\\comment (startIndexListItem)}" << endl)
+ DBG_RTF(m_t << "{\\comment (startIndexListItem)}\n")
}
void RTFGenerator::endIndexListItem()
{
- DBG_RTF(t << "{\\comment (endIndexListItem)}" << endl)
- t << "\\par" << endl;
+ DBG_RTF(m_t << "{\\comment (endIndexListItem)}\n")
+ m_t << "\\par\n";
}
void RTFGenerator::startInlineHeader()
{
- DBG_RTF(t << "{\\comment (startInlineHeader)}" << endl)
- t << "{" << endl;
- t << rtf_Style_Reset << rtf_Style["Heading5"].reference();
+ DBG_RTF(m_t << "{\\comment (startInlineHeader)}\n")
+ m_t << "{\n";
+ m_t << rtf_Style_Reset << rtf_Style["Heading5"].reference();
startBold();
}
void RTFGenerator::endInlineHeader()
{
- DBG_RTF(t << "{\\comment (endInlineHeader)}" << endl)
+ DBG_RTF(m_t << "{\\comment (endInlineHeader)}\n")
endBold();
- t << "\\par";
- t << "}" << endl;
+ m_t << "\\par";
+ m_t << "}\n";
}
void RTFGenerator::startMemberDocSimple(bool isEnum)
{
- DBG_RTF(t << "{\\comment (startMemberDocSimple)}" << endl)
- t << "{\\par" << endl;
- t << "{" << rtf_Style["Heading5"].reference() << endl;
+ DBG_RTF(m_t << "{\\comment (startMemberDocSimple)}\n")
+ m_t << "{\\par\n";
+ m_t << "{" << rtf_Style["Heading5"].reference() << "\n";
if (isEnum)
{
- t << theTranslator->trEnumerationValues();
+ m_t << theTranslator->trEnumerationValues();
}
else
{
- t << theTranslator->trCompoundMembers();
+ m_t << theTranslator->trCompoundMembers();
}
- t << ":\\par}" << endl;
- t << rtf_Style_Reset << rtf_DList_DepthStyle();
- t << "\\trowd \\trgaph108\\trleft426\\tblind426"
+ m_t << ":\\par}\n";
+ m_t << rtf_Style_Reset << rtf_DList_DepthStyle();
+ m_t << "\\trowd \\trgaph108\\trleft426\\tblind426"
"\\trbrdrt\\brdrs\\brdrw10\\brdrcf15 "
"\\trbrdrl\\brdrs\\brdrw10\\brdrcf15 "
"\\trbrdrb\\brdrs\\brdrw10\\brdrcf15 "
"\\trbrdrr\\brdrs\\brdrw10\\brdrcf15 "
"\\trbrdrh\\brdrs\\brdrw10\\brdrcf15 "
- "\\trbrdrv\\brdrs\\brdrw10\\brdrcf15 "<< endl;
+ "\\trbrdrv\\brdrs\\brdrw10\\brdrcf15 \n";
int i,n=3,columnPos[3] = { 25, 50, 100 };
if (isEnum)
{
@@ -2938,59 +2981,59 @@ void RTFGenerator::startMemberDocSimple(bool isEnum)
}
for (i=0;i<n;i++)
{
- t << "\\clvertalt\\clbrdrt\\brdrs\\brdrw10\\brdrcf15 "
+ m_t << "\\clvertalt\\clbrdrt\\brdrs\\brdrw10\\brdrcf15 "
"\\clbrdrl\\brdrs\\brdrw10\\brdrcf15 "
"\\clbrdrb\\brdrs\\brdrw10\\brdrcf15 "
"\\clbrdrr \\brdrs\\brdrw10\\brdrcf15 "
"\\cltxlrtb "
- "\\cellx" << (rtf_pageWidth*columnPos[i]/100) << endl;
+ "\\cellx" << (rtf_pageWidth*columnPos[i]/100) << "\n";
}
- t << "\\pard \\widctlpar\\intbl\\adjustright" << endl;
+ m_t << "\\pard \\widctlpar\\intbl\\adjustright\n";
}
void RTFGenerator::endMemberDocSimple(bool)
{
- DBG_RTF(t << "{\\comment (endMemberDocSimple)}" << endl)
- t << "}" << endl;
+ DBG_RTF(m_t << "{\\comment (endMemberDocSimple)}\n")
+ m_t << "}\n";
}
void RTFGenerator::startInlineMemberType()
{
- DBG_RTF(t << "{\\comment (startInlineMemberType)}" << endl)
- t << "{\\qr ";
+ DBG_RTF(m_t << "{\\comment (startInlineMemberType)}\n")
+ m_t << "{\\qr ";
}
void RTFGenerator::endInlineMemberType()
{
- DBG_RTF(t << "{\\comment (endInlineMemberType)}" << endl)
- t << "\\cell }";
+ DBG_RTF(m_t << "{\\comment (endInlineMemberType)}\n")
+ m_t << "\\cell }";
}
void RTFGenerator::startInlineMemberName()
{
- DBG_RTF(t << "{\\comment (startInlineMemberName)}" << endl)
- t << "{";
+ DBG_RTF(m_t << "{\\comment (startInlineMemberName)}\n")
+ m_t << "{";
}
void RTFGenerator::endInlineMemberName()
{
- DBG_RTF(t << "{\\comment (endInlineMemberName)}" << endl)
- t << "\\cell }";
+ DBG_RTF(m_t << "{\\comment (endInlineMemberName)}\n")
+ m_t << "\\cell }";
}
void RTFGenerator::startInlineMemberDoc()
{
- DBG_RTF(t << "{\\comment (startInlineMemberDoc)}" << endl)
- t << "{";
+ DBG_RTF(m_t << "{\\comment (startInlineMemberDoc)}\n")
+ m_t << "{";
}
void RTFGenerator::endInlineMemberDoc()
{
- DBG_RTF(t << "{\\comment (endInlineMemberDoc)}" << endl)
- t << "\\cell }{\\row }" << endl;
+ DBG_RTF(m_t << "{\\comment (endInlineMemberDoc)}\n")
+ m_t << "\\cell }{\\row }\n";
}
-void RTFGenerator::writeLineNumber(const char *ref,const char *fileName,const char *anchor,int l)
+void RTFGenerator::writeLineNumber(const QCString &ref,const QCString &fileName,const QCString &anchor,int l)
{
bool rtfHyperlinks = Config_getBool(RTF_HYPERLINKS);
@@ -2999,23 +3042,23 @@ void RTFGenerator::writeLineNumber(const char *ref,const char *fileName,const ch
lineNumber.sprintf("%05d",l);
if (m_prettyCode)
{
- if (fileName && !m_sourceFileName.isEmpty() && rtfHyperlinks)
+ if (!fileName.isEmpty() && !m_sourceFileName.isEmpty() && rtfHyperlinks)
{
QCString lineAnchor;
lineAnchor.sprintf("_l%05d",l);
lineAnchor.prepend(stripExtensionGeneral(m_sourceFileName, ".rtf"));
- t << "{\\bkmkstart ";
- t << rtfFormatBmkStr(lineAnchor);
- t << "}";
- t << "{\\bkmkend ";
- t << rtfFormatBmkStr(lineAnchor);
- t << "}" << endl;
+ m_t << "{\\bkmkstart ";
+ m_t << rtfFormatBmkStr(lineAnchor);
+ m_t << "}";
+ m_t << "{\\bkmkend ";
+ m_t << rtfFormatBmkStr(lineAnchor);
+ m_t << "}\n";
}
- t << lineNumber << " ";
+ m_t << lineNumber << " ";
}
else
{
- t << l << " ";
+ m_t << l << " ";
}
m_col=0;
}
@@ -3034,17 +3077,17 @@ void RTFGenerator::startLabels()
{
}
-void RTFGenerator::writeLabel(const char *l,bool isLast)
+void RTFGenerator::writeLabel(const QCString &l,bool isLast)
{
- t << "{\\f2 [" << l << "]}";
- if (!isLast) t << ", ";
+ m_t << "{\\f2 [" << l << "]}";
+ if (!isLast) m_t << ", ";
}
void RTFGenerator::endLabels()
{
}
-void RTFGenerator::startFontClass(const char *name)
+void RTFGenerator::startFontClass(const QCString &name)
{
int cod = 2;
QCString qname(name);
@@ -3059,10 +3102,10 @@ void RTFGenerator::startFontClass(const char *name)
else if (qname == "vhdlchar") cod = 25;
else if (qname == "vhdlkeyword") cod = 26;
else if (qname == "vhdllogic") cod = 27;
- t << "{\\cf" << cod << " ";
+ m_t << "{\\cf" << cod << " ";
}
void RTFGenerator::endFontClass()
{
- t << "}";
+ m_t << "}";
}
diff --git a/src/rtfgen.h b/src/rtfgen.h
index 0aebd15..c9a069e 100644
--- a/src/rtfgen.h
+++ b/src/rtfgen.h
@@ -21,8 +21,6 @@
#include "config.h"
#include "outputgen.h"
-class QFile;
-
/** Generator for RTF output. */
class RTFGenerator : public OutputGenerator
{
@@ -34,8 +32,8 @@ class RTFGenerator : public OutputGenerator
virtual std::unique_ptr<OutputGenerator> clone() const;
static void init();
- static void writeStyleSheetFile(QFile &f);
- static void writeExtensionsFile(QFile &file);
+ static void writeStyleSheetFile(TextStream &t);
+ static void writeExtensionsFile(TextStream &t);
OutputType type() const { return RTF; }
void setRelativePath(const QCString &path);
@@ -43,28 +41,28 @@ class RTFGenerator : public OutputGenerator
void writeDoc(DocNode *,const Definition *,const MemberDef *,int);
- void startFile(const char *name,const char *manName,const char *title,int id);
+ void startFile(const QCString &name,const QCString &manName,const QCString &title,int id);
void writeSearchInfo() {}
- void writeFooter(const char *) {}
+ void writeFooter(const QCString &) {}
void endFile();
void clearBuffer();
//void postProcess(QByteArray &);
void startIndexSection(IndexSections);
void endIndexSection(IndexSections);
- void writePageLink(const char *,bool);
+ void writePageLink(const QCString &,bool);
void startProjectNumber();
void endProjectNumber();
void writeStyleInfo(int part);
- void startTitleHead(const char *);
+ void startTitleHead(const QCString &);
void startTitle();
- void endTitleHead(const char *,const char *name);
+ void endTitleHead(const QCString &,const QCString &name);
void endTitle() {}
void newParagraph();
- void startParagraph(const char *classDef);
+ void startParagraph(const QCString &classDef);
void endParagraph();
- void writeString(const char *text);
+ void writeString(const QCString &text);
void startIndexListItem();
void endIndexListItem();
void startIndexList();
@@ -72,27 +70,27 @@ class RTFGenerator : public OutputGenerator
void startIndexKey();
void endIndexKey();
void startIndexValue(bool);
- void endIndexValue(const char *,bool);
+ void endIndexValue(const QCString &,bool);
void startItemList();
void endItemList();
- void startIndexItem(const char *ref,const char *file);
- void endIndexItem(const char *ref,const char *file);
- void docify(const char *text);
- void codify(const char *text);
- void writeObjectLink(const char *ref,const char *file,
- const char *anchor,const char *name);
- void writeCodeLink(const char *ref, const char *file,
- const char *anchor,const char *name,
- const char *tooltip);
- void writeTooltip(const char *, const DocLinkInfo &, const char *,
- const char *, const SourceLinkInfo &, const SourceLinkInfo &
+ void startIndexItem(const QCString &ref,const QCString &file);
+ void endIndexItem(const QCString &ref,const QCString &file);
+ void docify(const QCString &text);
+ void codify(const QCString &text);
+ void writeObjectLink(const QCString &ref,const QCString &file,
+ const QCString &anchor,const QCString &name);
+ void writeCodeLink(const QCString &ref, const QCString &file,
+ const QCString &anchor,const QCString &name,
+ const QCString &tooltip);
+ void writeTooltip(const QCString &, const DocLinkInfo &, const QCString &,
+ const QCString &, const SourceLinkInfo &, const SourceLinkInfo &
) {}
- void startTextLink(const char *f,const char *anchor);
+ void startTextLink(const QCString &f,const QCString &anchor);
void endTextLink();
- void startHtmlLink(const char *url);
+ void startHtmlLink(const QCString &url);
void endHtmlLink();
- void startTypewriter() { t << "{\\f2 "; }
- void endTypewriter() { t << "}"; }
+ void startTypewriter() { m_t << "{\\f2 "; }
+ void endTypewriter() { m_t << "}"; }
void startGroupHeader(int);
void endGroupHeader(int);
//void writeListItem();
@@ -103,7 +101,7 @@ class RTFGenerator : public OutputGenerator
void endMemberSections() {}
void startHeaderSection() {}
void endHeaderSection() {}
- void startMemberHeader(const char *,int) { startGroupHeader(FALSE); }
+ void startMemberHeader(const QCString &,int) { startGroupHeader(FALSE); }
void endMemberHeader() { endGroupHeader(FALSE); }
void startMemberSubtitle();
void endMemberSubtitle();
@@ -115,84 +113,86 @@ class RTFGenerator : public OutputGenerator
void endInlineHeader();
void startAnonTypeScope(int) {}
void endAnonTypeScope(int) {}
- void startMemberItem(const char *,int,const char *);
+ void startMemberItem(const QCString &,int,const QCString &);
void endMemberItem();
void startMemberTemplateParams() {}
- void endMemberTemplateParams(const char *,const char *) {}
+ void endMemberTemplateParams(const QCString &,const QCString &) {}
+ void startCompoundTemplateParams() { startSubsubsection(); }
+ void endCompoundTemplateParams() { endSubsubsection(); }
void insertMemberAlign(bool) {}
void insertMemberAlignLeft(int,bool){}
void writeRuler() { rtfwriteRuler_thin(); }
- void writeAnchor(const char *fileName,const char *name);
- void startCodeFragment(const char *style);
- void endCodeFragment(const char *style);
- void writeLineNumber(const char *,const char *,const char *,int l);
+ void writeAnchor(const QCString &fileName,const QCString &name);
+ void startCodeFragment(const QCString &style);
+ void endCodeFragment(const QCString &style);
+ void writeLineNumber(const QCString &,const QCString &,const QCString &,int l);
void startCodeLine(bool);
void endCodeLine();
- void startEmphasis() { t << "{\\i "; }
- void endEmphasis() { t << "}"; }
- void startBold() { t << "{\\b "; }
- void endBold() { t << "}"; }
+ void startEmphasis() { m_t << "{\\i "; }
+ void endEmphasis() { m_t << "}"; }
+ void startBold() { m_t << "{\\b "; }
+ void endBold() { m_t << "}"; }
void startDescription();
void endDescription();
void startDescItem();
void endDescItem();
- void lineBreak(const char *style=0);
- void startMemberDoc(const char *,const char *,const char *,const char *,int,int,bool);
+ void lineBreak(const QCString &style=QCString());
+ void startMemberDoc(const QCString &,const QCString &,const QCString &,const QCString &,int,int,bool);
void endMemberDoc(bool);
- void startDoxyAnchor(const char *,const char *,const char *,const char *,const char *);
- void endDoxyAnchor(const char *,const char *);
+ void startDoxyAnchor(const QCString &,const QCString &,const QCString &,const QCString &,const QCString &);
+ void endDoxyAnchor(const QCString &,const QCString &);
void writeChar(char c);
- void writeLatexSpacing() {};//{ t << "\\hspace{0.3cm}"; }
- void writeStartAnnoItem(const char *type,const char *file,
- const char *path,const char *name);
- void writeEndAnnoItem(const char *name);
+ void writeLatexSpacing() {};//{ m_t << "\\hspace{0.3cm}"; }
+ void writeStartAnnoItem(const QCString &type,const QCString &file,
+ const QCString &path,const QCString &name);
+ void writeEndAnnoItem(const QCString &name);
void startSubsection();
void endSubsection();
void startSubsubsection();
void endSubsubsection();
- void startCenter() { t << "{\\qc" << endl; }
- void endCenter() { t << "}"; }
- void startSmall() { t << "{\\sub "; }
- void endSmall() { t << "}"; }
+ void startCenter() { m_t << "{\\qc\n"; }
+ void endCenter() { m_t << "}"; }
+ void startSmall() { m_t << "{\\sub "; }
+ void endSmall() { m_t << "}"; }
- void startMemberDescription(const char *,const char *,bool);
+ void startMemberDescription(const QCString &,const QCString &,bool);
void endMemberDescription();
void startMemberDeclaration() {}
- void endMemberDeclaration(const char *,const char *) {}
- void writeInheritedSectionTitle(const char *,const char *,const char *,
- const char *,const char *,const char *) {}
+ void endMemberDeclaration(const QCString &,const QCString &) {}
+ void writeInheritedSectionTitle(const QCString &,const QCString &,const QCString &,
+ const QCString &,const QCString &,const QCString &) {}
void startDescList(SectionTypes);
void startExamples();
void endExamples();
- void startParamList(ParamListTypes,const char *);
+ void startParamList(ParamListTypes,const QCString &);
void endParamList();
//void writeDescItem();
void startDescForItem();
void endDescForItem();
- void startSection(const char *,const char *,SectionType);
- void endSection(const char *,SectionType);
- void addIndexItem(const char *,const char *);
+ void startSection(const QCString &,const QCString &,SectionType);
+ void endSection(const QCString &,SectionType);
+ void addIndexItem(const QCString &,const QCString &);
void startIndent();
void endIndent();
void writeSynopsis() {}
void startClassDiagram();
- void endClassDiagram(const ClassDiagram &,const char *filename,const char *name);
+ void endClassDiagram(const ClassDiagram &,const QCString &filename,const QCString &name);
void startPageRef();
- void endPageRef(const char *,const char *);
+ void endPageRef(const QCString &,const QCString &);
void startQuickIndices() {}
void endQuickIndices() {}
- void writeSplitBar(const char *) {}
- void writeNavigationPath(const char *) {}
+ void writeSplitBar(const QCString &) {}
+ void writeNavigationPath(const QCString &) {}
void writeLogo() {}
- void writeQuickLinks(bool,HighlightedItem,const char *) {}
- void writeSummaryLink(const char *,const char *,const char *,bool) {}
+ void writeQuickLinks(bool,HighlightedItem,const QCString &) {}
+ void writeSummaryLink(const QCString &,const QCString &,const QCString &,bool) {}
void startContents() {}
void endContents() {}
void writeNonBreakableSpace(int);
- void startDescTable(const char *title);
+ void startDescTable(const QCString &title);
void endDescTable();
void startDescTableRow();
void endDescTableRow();
@@ -228,15 +228,15 @@ class RTFGenerator : public OutputGenerator
void endMemberDocPrefixItem() {}
void startMemberDocName(bool) {}
void endMemberDocName() {}
- void startParameterType(bool,const char *);
+ void startParameterType(bool,const QCString &);
void endParameterType();
void startParameterName(bool) {}
void endParameterName(bool,bool,bool) {}
void startParameterList(bool) {}
void endParameterList() {}
- void exceptionEntry(const char*,bool);
+ void exceptionEntry(const QCString &,bool);
- void startConstraintList(const char *);
+ void startConstraintList(const QCString &);
void startConstraintParam();
void endConstraintParam();
void startConstraintType();
@@ -255,25 +255,25 @@ class RTFGenerator : public OutputGenerator
void endInlineMemberDoc();
void startLabels();
- void writeLabel(const char *l,bool isLast);
+ void writeLabel(const QCString &l,bool isLast);
void endLabels();
- void startFontClass(const char *);
+ void startFontClass(const QCString &);
void endFontClass();
- void writeCodeAnchor(const char *) {}
- void setCurrentDoc(const Definition *,const char *,bool) {}
- void addWord(const char *,bool) {}
+ void writeCodeAnchor(const QCString &) {}
+ void setCurrentDoc(const Definition *,const QCString &,bool) {}
+ void addWord(const QCString &,bool) {}
- static bool preProcessFileInplace(const char *path,const char *name);
+ static bool preProcessFileInplace(const QCString &path,const QCString &name);
private:
- const char *rtf_BList_DepthStyle();
- const char *rtf_CList_DepthStyle();
- const char *rtf_EList_DepthStyle();
- const char *rtf_LCList_DepthStyle();
- const char *rtf_DList_DepthStyle();
- const char *rtf_Code_DepthStyle();
+ QCString rtf_BList_DepthStyle();
+ QCString rtf_CList_DepthStyle();
+ QCString rtf_EList_DepthStyle();
+ QCString rtf_LCList_DepthStyle();
+ QCString rtf_DList_DepthStyle();
+ QCString rtf_Code_DepthStyle();
void incrementIndentLevel();
void decrementIndentLevel();
void beginRTFDocument();
@@ -283,7 +283,7 @@ class RTFGenerator : public OutputGenerator
void rtfwriteRuler_emboss();
void rtfwriteRuler_thick();
void rtfwriteRuler_thin();
- void writeRTFReference(const char *label);
+ void writeRTFReference(const QCString &label);
QCString m_sourceFileName;
int m_col = 0;
diff --git a/src/rtfstyle.cpp b/src/rtfstyle.cpp
index d279eab..07bc3dd 100644
--- a/src/rtfstyle.cpp
+++ b/src/rtfstyle.cpp
@@ -272,15 +272,15 @@ bool StyleData::setStyle(const std::string &command, const std::string &styleNam
}
-void loadStylesheet(const char *name, StyleDataMap& map)
+void loadStylesheet(const QCString &name, StyleDataMap& map)
{
- std::ifstream file(name);
+ std::ifstream file(name.str());
if (!file.is_open())
{
- err("Can't open RTF style sheet file %s. Using defaults.",name);
+ err("Can't open RTF style sheet file %s. Using defaults.",qPrint(name));
return;
}
- msg("Loading RTF style sheet %s...\n",name);
+ msg("Loading RTF style sheet %s...\n",qPrint(name));
uint lineNr=1;
@@ -314,15 +314,15 @@ void loadStylesheet(const char *name, StyleDataMap& map)
StyleDataMap rtf_Style;
-void loadExtensions(const char *name)
+void loadExtensions(const QCString &name)
{
- std::ifstream file(name);
+ std::ifstream file(name.str());
if (!file.is_open())
{
- err("Can't open RTF extensions file %s. Using defaults.",name);
+ err("Can't open RTF extensions file %s. Using defaults.",qPrint(name));
return;
}
- msg("Loading RTF extensions %s...\n",name);
+ msg("Loading RTF extensions %s...\n",qPrint(name));
uint lineNr=1;
diff --git a/src/rtfstyle.h b/src/rtfstyle.h
index 140d31f..8f7e3f3 100644
--- a/src/rtfstyle.h
+++ b/src/rtfstyle.h
@@ -18,7 +18,8 @@
#include <map>
#include <string>
-#include <qcstring.h>
+
+#include "qcstring.h"
// used for table column width calculation
const int rtf_pageWidth = 8748;
@@ -79,7 +80,7 @@ using StyleDataMap = std::map<std::string,StyleData>;
extern StyleDataMap rtf_Style;
-void loadExtensions(const char *name);
-void loadStylesheet(const char *name, StyleDataMap& map);
+void loadExtensions(const QCString &name);
+void loadStylesheet(const QCString &name, StyleDataMap& map);
#endif
diff --git a/src/scanner.h b/src/scanner.h
index cefc934..57b54e6 100644
--- a/src/scanner.h
+++ b/src/scanner.h
@@ -31,12 +31,12 @@ class COutlineParser : public OutlineParserInterface
public:
COutlineParser();
virtual ~COutlineParser();
- void parseInput(const char *fileName,
+ void parseInput(const QCString &fileName,
const char *fileBuf,
const std::shared_ptr<Entry> &root,
ClangTUParser *clangParser);
bool needsPreprocessing(const QCString &extension) const;
- void parsePrototype(const char *text);
+ void parsePrototype(const QCString &text);
private:
struct Private;
std::unique_ptr<Private> p;
diff --git a/src/scanner.l b/src/scanner.l
index 6b4cda3..f03304a 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -29,14 +29,13 @@
#include <algorithm>
#include <vector>
#include <utility>
+#include <atomic>
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <ctype.h>
-#include <qfile.h>
-
#include "scanner.h"
#include "entry.h"
#include "message.h"
@@ -75,6 +74,7 @@ struct scannerYY_state
int lastStringContext = 0;
int lastCurlyContext = 0;
int lastRoundContext = 0;
+ int lastSharpContext = 0;
int lastSquareContext = 0;
int lastInitializerContext = 0;
int lastClassTemplSpecContext = 0;
@@ -140,6 +140,7 @@ struct scannerYY_state
int currentArgumentContext = 0;
int lastCopyArgStringContext = 0;
int lastCopyArgContext = 0;
+ int requiresContext = 0;
QCString *copyArgString = 0;
QCString fullArgString;
QCString dummyRawString;
@@ -147,17 +148,18 @@ struct scannerYY_state
ArgumentList *currentArgumentList = 0;
char lastCopyArgChar = '\0';
- QCString *pCopyQuotedString = 0;
- QCString *pCopyRoundString = 0;
- QCString *pCopyCurlyString = 0;
- QCString *pCopyRawString = 0;
- QGString *pCopyCurlyGString = 0;
- QGString *pCopyRoundGString = 0;
- QGString *pCopySquareGString = 0;
- QGString *pCopyQuotedGString = 0;
- QGString *pCopyHereDocGString = 0;
- QGString *pCopyRawGString = 0;
- QGString *pSkipVerbString = 0;
+ QCString *pCopyQuotedString = 0;
+ QCString *pCopyRoundString = 0;
+ QCString *pCopyCurlyString = 0;
+ QCString *pCopySharpString = 0;
+ QCString *pCopyRawString = 0;
+ TextStream *pCopyCurlyGString = 0;
+ TextStream *pCopyRoundGString = 0;
+ TextStream *pCopySquareGString = 0;
+ TextStream *pCopyQuotedGString = 0;
+ TextStream *pCopyHereDocGString = 0;
+ TextStream *pCopyRawGString = 0;
+ TextStream *pSkipVerbString = 0;
bool insideFormula = false;
bool insideTryBlock = false;
@@ -171,7 +173,7 @@ struct scannerYY_state
QCString briefBackup;
int docBlockContext = 0;
- QGString docBlock;
+ TextStream docBlock;
QCString docBlockName;
bool docBlockInBody = false;
bool docBlockAutoBrief = false;
@@ -191,6 +193,7 @@ struct scannerYY_state
uint fencedSize = 0;
bool nestedComment = false;
std::vector< std::pair<Entry*,std::shared_ptr<Entry> > > outerScopeEntries;
+ QCString programStr;
ClangTUParser * clangParser = 0;
};
@@ -383,6 +386,7 @@ NONLopt [^\n]*
%x CopyGString
%x CopyPHPGString
%x CopyRound
+%x CopySharp
%x CopyCurly
%x GCopyRound
%x GCopySquare
@@ -438,6 +442,12 @@ NONLopt [^\n]*
%x DocBlock
%x DocCopyBlock
+ /** C++20 concepts */
+
+%x RequiresClause
+%x RequiresExpression
+%x ConceptName
+
%%
<NextSemi>"{" {
@@ -686,7 +696,7 @@ NONLopt [^\n]*
}
<CliPropertyType>"{" {
yyextra->curlyCount=0;
- //printf("event: '%s' '%s'\n",yyextra->current->type.data(),yyextra->current->name.data());
+ //printf("event: '%s' '%s'\n",qPrint(yyextra->current->type),qPrint(yyextra->current->name));
BEGIN( CSAccessorDecl );
}
<CliPropertyType>";" {
@@ -872,14 +882,14 @@ NONLopt [^\n]*
yyextra->current->argList.setNoParameters(TRUE);
}
yyextra->current->args = argListToString(yyextra->current->argList);
- //printf("argList=%s\n",yyextra->current->args.data());
+ //printf("argList=%s\n",qPrint(yyextra->current->args));
unput(';');
BEGIN( Function );
}
<ObjCMethod,ObjCParams>(";"{BN}+)?"{" { // start of a method body
lineCount(yyscanner);
//printf("Type=%s Name=%s args=%s\n",
- // yyextra->current->type.data(),yyextra->current->name.data(),argListToString(yyextra->current->argList).data()
+ // qPrint(yyextra->current->type),qPrint(yyextra->current->name),qPrint(argListToString(yyextra->current->argList))
// );
if (!yyextra->current->argList.empty() && yyextra->current->argList.back().type.isEmpty())
{
@@ -1614,6 +1624,19 @@ NONLopt [^\n]*
if (yytext[yyleng-1]=='{') unput('{');
BEGIN( CompoundName ) ;
}
+<FindMembers>{B}*"concept"{BN}+ { // C++20 concept
+ yyextra->isTypedef=FALSE;
+ yyextra->current->section = Entry::CONCEPT_SEC;
+ addType(yyscanner);
+ yyextra->current->type += " concept";
+ yyextra->current->fileName = yyextra->yyFileName;
+ yyextra->current->startLine = yyextra->yyLineNr;
+ yyextra->current->startColumn = yyextra->yyColNr;
+ yyextra->current->bodyLine = yyextra->yyLineNr;
+ yyextra->current->bodyColumn = yyextra->yyColNr;
+ lineCount(yyscanner) ;
+ BEGIN( ConceptName ) ;
+ }
<Operator>"("{BN}*")"({BN}*"<"[^>]*">"){BNopt}/"(" { // A::operator()<int>(int arg)
lineCount(yyscanner);
yyextra->current->name += "()";
@@ -1660,10 +1683,10 @@ NONLopt [^\n]*
BEGIN( NSAliasArg );
}
<NSAliasArg>({ID}"::")*{ID} {
- //printf("Inserting namespace alias %s::%s->%s\n",yyextra->current_root->name.data(),yyextra->aliasName.data(),yytext);
+ //printf("Inserting namespace alias %s::%s->%s\n",qPrint(yyextra->current_root->name),qPrint(yyextra->aliasName),yytext);
// TODO: namespace aliases are now treated as global entities
// while they should be aware of the scope they are in
- Doxygen::namespaceAliasMap.insert({yyextra->aliasName.data(),std::string(yytext)});
+ Doxygen::namespaceAliasMap.insert({yyextra->aliasName.str(),std::string(yytext)});
}
<NSAliasArg>";" {
BEGIN( FindMembers );
@@ -1676,7 +1699,7 @@ NONLopt [^\n]*
<PHPUse>({ID}{BN}*"\\"{BN}*)*{ID} {
lineCount(yyscanner);
yyextra->current->name=removeRedundantWhiteSpace(substitute(yytext,"\\","::"));
- //printf("PHP: adding use relation: %s\n",yyextra->current->name.data());
+ //printf("PHP: adding use relation: %s\n",qPrint(yyextra->current->name));
yyextra->current->fileName = yyextra->yyFileName;
// add a using declaration
yyextra->current->section=Entry::USINGDECL_SEC;
@@ -1693,12 +1716,12 @@ NONLopt [^\n]*
<PHPUseAs>{PHPUSEKW} {
}
<PHPUseAs>{ID} {
- //printf("PHP: adding use as relation: %s->%s\n",yytext,yyextra->aliasName.data());
+ //printf("PHP: adding use as relation: %s->%s\n",yytext,qPrint(yyextra->aliasName));
if (!yyextra->aliasName.isEmpty())
{
Doxygen::namespaceAliasMap.insert({yytext,
std::string(removeRedundantWhiteSpace(
- substitute(yyextra->aliasName,"\\","::")).data())});
+ substitute(yyextra->aliasName,"\\","::")).str())});
}
yyextra->aliasName.resize(0);
}
@@ -1733,7 +1756,7 @@ NONLopt [^\n]*
}
else
{
- //printf("import name = %s -> %s\n",yytext,yyextra->current->name.data());
+ //printf("import name = %s -> %s\n",yytext,qPrint(yyextra->current->name));
yyextra->current->section=Entry::USINGDECL_SEC;
}
yyextra->previous = yyextra->current;
@@ -1793,7 +1816,7 @@ NONLopt [^\n]*
( yytext[yyleng-2]=='!' && Config_getBool(QT_AUTOBRIEF) );
QCString indent;
indent.fill(' ',computeIndent(yytext,yyextra->column));
- yyextra->docBlock=indent;
+ yyextra->docBlock.str(indent.str());
lineCount(yyscanner);
yyextra->docBlockTerm = ';';
@@ -1906,7 +1929,7 @@ NONLopt [^\n]*
// *yyextra->currentTemplateSpec+='>';
if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
{
- //printf("Found %s\n",yyextra->current->name.data());
+ //printf("Found %s\n",qPrint(yyextra->current->name));
BEGIN(FindMembers);
}
}
@@ -1914,17 +1937,23 @@ NONLopt [^\n]*
lineCount(yyscanner);
yyextra->current->name+='>';
// *yyextra->currentTemplateSpec+='>';
- if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
+ --yyextra->sharpCount;
+ if (yyextra->roundCount==0 && yyextra->sharpCount<=0)
{
yyextra->current->bodyLine = yyextra->yyLineNr;
yyextra->current->bodyColumn = yyextra->yyColNr;
yyextra->current->args = "(";
yyextra->currentArgumentContext = FuncQual;
- yyextra->fullArgString = yyextra->current->args.copy();
+ yyextra->fullArgString = yyextra->current->args;
yyextra->copyArgString = &yyextra->current->args;
- //printf("Found %s\n",yyextra->current->name.data());
+ //printf("Found %s\n",qPrint(yyextra->current->name));
BEGIN( ReadFuncArgType ) ;
}
+ else if (yyextra->sharpCount<=0)
+ {
+ yyextra->current->name+="(";
+ yyextra->roundCount++;
+ }
}
<EndTemplate>">"{BNopt}/"("({BN}*{ID}{BN}*"::")*({BN}*"*"{BN}*)+ { // function pointer returning a template instance
lineCount(yyscanner);
@@ -1965,12 +1994,12 @@ NONLopt [^\n]*
}
<CopyHereDoc>{ID} { // PHP heredoc
yyextra->delimiter = yytext;
- *yyextra->pCopyHereDocGString += yytext;
+ *yyextra->pCopyHereDocGString << yytext;
BEGIN(CopyHereDocEnd);
}
<CopyHereDoc>"'"{ID}/"'" { // PHP nowdoc
yyextra->delimiter = &yytext[1];
- *yyextra->pCopyHereDocGString += yytext;
+ *yyextra->pCopyHereDocGString << yytext;
BEGIN(CopyHereDocEnd);
}
<HereDoc>{ID} { // PHP heredoc
@@ -1989,7 +2018,7 @@ NONLopt [^\n]*
}
<HereDocEnd>. { }
<CopyHereDocEnd>^{ID} { // id at start of the line could mark the end of the block
- *yyextra->pCopyHereDocGString += yytext;
+ *yyextra->pCopyHereDocGString << yytext;
if (yyextra->delimiter==yytext) // it is the end marker
{
BEGIN(yyextra->lastHereDocContext);
@@ -1997,13 +2026,13 @@ NONLopt [^\n]*
}
<CopyHereDocEnd>\n {
lineCount(yyscanner);
- *yyextra->pCopyHereDocGString += yytext;
+ *yyextra->pCopyHereDocGString << yytext;
}
<CopyHereDocEnd>{ID} {
- *yyextra->pCopyHereDocGString += yytext;
+ *yyextra->pCopyHereDocGString << yytext;
}
<CopyHereDocEnd>. {
- *yyextra->pCopyHereDocGString += yytext;
+ *yyextra->pCopyHereDocGString << yytext;
}
<FindMembers>"Q_OBJECT" { // Qt object macro
}
@@ -2061,10 +2090,81 @@ NONLopt [^\n]*
}
<FindMembers>"friend"{BN}+("class"|"union"|"struct"){BN}+ {
yyextra->current->name=yytext;
+ lineCount(yyscanner) ;
BEGIN(FindMembers);
}
+<FindMembers>"requires" { // C++20 requires clause
+ yyextra->current->req.resize(0);
+ yyextra->requiresContext = YY_START;
+ BEGIN(RequiresClause);
+ }
+<RequiresClause>"requires"{BN}*"(" { // requires requires(T x) { ... }
+ lineCount(yyscanner) ;
+ yyextra->current->req+=yytext;
+ yyextra->lastRoundContext=RequiresExpression;
+ yyextra->pCopyRoundString=&yyextra->current->req;
+ yyextra->roundCount=0;
+ BEGIN( CopyRound ) ;
+ }
+<RequiresExpression>"{" {
+ yyextra->current->req+=yytext;
+ yyextra->lastCurlyContext=RequiresClause;
+ yyextra->pCopyCurlyString=&yyextra->current->req;
+ yyextra->curlyCount=0;
+ BEGIN( CopyCurly ) ;
+ }
+<RequiresExpression>\n {
+ yyextra->current->req+=' ';
+ lineCount(yyextra);
+ }
+<RequiresExpression>. {
+ yyextra->current->req+=yytext;
+ }
+<RequiresClause>"(" { // requires "(A && B)"
+ yyextra->current->req+=yytext;
+ yyextra->lastRoundContext=RequiresClause;
+ yyextra->pCopyRoundString=&yyextra->current->req;
+ yyextra->roundCount=0;
+ BEGIN( CopyRound ) ;
+ }
+<RequiresClause>{ID} { // something like "requires true"
+ if (yyextra->current->req.stripWhiteSpace().isEmpty())
+ {
+ yyextra->current->req=yytext;
+ BEGIN(yyextra->requiresContext);
+ }
+ else
+ {
+ REJECT;
+ }
+ }
+<RequiresClause>{SCOPENAME}{BNopt}"(" { // "requires func(x)"
+ yyextra->current->req+=yytext;
+ yyextra->lastRoundContext=RequiresClause;
+ yyextra->pCopyRoundString=&yyextra->current->req;
+ yyextra->roundCount=0;
+ BEGIN( CopyRound );
+ }
+<RequiresClause>{SCOPENAME}{BNopt}"<" { // "requires C<S,T>"
+ yyextra->current->req+=yytext;
+ yyextra->lastSharpContext=RequiresClause;
+ yyextra->pCopySharpString=&yyextra->current->req;
+ yyextra->sharpCount=0;
+ BEGIN( CopySharp );
+ }
+<RequiresClause>"||"|"&&" { // "requires A || B" or "requires A && B"
+ yyextra->current->req+=yytext;
+ }
+<RequiresClause>{BN}+ {
+ yyextra->current->req+=' ';
+ lineCount(yyscanner) ;
+ }
+<RequiresClause>. {
+ unput(*yytext);
+ yyextra->current->req=yyextra->current->req.simplifyWhiteSpace();
+ BEGIN(yyextra->requiresContext);
+ }
<FindMembers,FindMemberName>{SCOPENAME} {
-
if (yyextra->clangParser && (yyextra->insideCpp || yyextra->insideObjC))
{
yyextra->current->id = yyextra->clangParser->lookup(yyextra->yyLineNr,yytext);
@@ -2309,7 +2409,7 @@ NONLopt [^\n]*
YY_START==ReadNSBody ||
YY_START==ReadBodyIntf)
{
- yyextra->current->program+=yytext;
+ yyextra->current->program << yytext;
}
BEGIN( PreLineCtrl );
}
@@ -2319,7 +2419,7 @@ NONLopt [^\n]*
yyextra->lastPreLineCtrlContext==ReadNSBody ||
yyextra->lastPreLineCtrlContext==ReadBodyIntf)
{
- yyextra->current->program+=yytext;
+ yyextra->current->program << yytext;
}
}
<PreLineCtrl>. {
@@ -2327,7 +2427,7 @@ NONLopt [^\n]*
yyextra->lastPreLineCtrlContext==ReadNSBody ||
yyextra->lastPreLineCtrlContext==ReadBodyIntf)
{
- yyextra->current->program+=yytext;
+ yyextra->current->program << yytext;
}
}
<PreLineCtrl>\n {
@@ -2335,7 +2435,7 @@ NONLopt [^\n]*
yyextra->lastPreLineCtrlContext==ReadNSBody ||
yyextra->lastPreLineCtrlContext==ReadBodyIntf)
{
- yyextra->current->program+=yytext;
+ yyextra->current->program << yytext;
}
lineCount(yyscanner);
BEGIN( yyextra->lastPreLineCtrlContext );
@@ -2352,7 +2452,7 @@ NONLopt [^\n]*
yyextra->current->bodyLine = yyextra->yyLineNr;
yyextra->current->bodyColumn = yyextra->yyColNr;
yyextra->currentArgumentContext = DefineEnd;
- yyextra->fullArgString=yyextra->current->args.copy();
+ yyextra->fullArgString=yyextra->current->args;
yyextra->copyArgString=&yyextra->current->args;
BEGIN( ReadFuncArgType ) ;
}
@@ -2378,7 +2478,7 @@ NONLopt [^\n]*
BEGIN(DefineEnd);
}
<DefineEnd>\n {
- //printf("End define: doc=%s docFile=%s docLine=%d\n",yyextra->current->doc.data(),yyextra->current->docFile.data(),yyextra->current->docLine);
+ //printf("End define: doc=%s docFile=%s docLine=%d\n",qPrint(yyextra->current->doc),qPrint(yyextra->current->docFile),yyextra->current->docLine);
yyextra->current->fileName = yyextra->yyFileName;
yyextra->current->startLine = yyextra->yyLineNr;
yyextra->current->startColumn = yyextra->yyColNr;
@@ -2398,10 +2498,10 @@ NONLopt [^\n]*
yyextra->current->startColumn = yyextra->yyColNr;
yyextra->current->type.resize(0);
yyextra->current->type = "const";
- QCString init = yyextra->current->initializer.data();
+ QCString init = yyextra->current->initializer.str();
init = init.simplifyWhiteSpace();
init = init.left(init.length()-1);
- yyextra->current->initializer = init;
+ yyextra->current->initializer.str(init.str());
yyextra->current->name = yyextra->current->name.stripWhiteSpace();
yyextra->current->section = Entry::VARIABLE_SEC;
yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
@@ -2465,7 +2565,7 @@ NONLopt [^\n]*
QCString indent;
indent.fill(' ',computeIndent(yytext,yyextra->column));
- yyextra->docBlock=indent;
+ yyextra->docBlock.str(indent.str());
//printf("indent=%d\n",computeIndent(yytext+1,yyextra->column));
lineCount(yyscanner);
@@ -2495,7 +2595,7 @@ NONLopt [^\n]*
QCString indent;
indent.fill(' ',computeIndent(yytext,yyextra->column));
- yyextra->docBlock=indent;
+ yyextra->docBlock.str(indent.str());
lineCount(yyscanner);
yyextra->docBlockTerm = ',';
@@ -2528,7 +2628,7 @@ NONLopt [^\n]*
( yytext[yyleng-2]=='!' && Config_getBool(QT_AUTOBRIEF) );
QCString indent;
indent.fill(' ',computeIndent(yytext,yyextra->column));
- yyextra->docBlock=indent;
+ yyextra->docBlock.str(indent.str());
lineCount(yyscanner);
yyextra->docBlockTerm = 0;
@@ -2565,7 +2665,7 @@ NONLopt [^\n]*
yyextra->docBlockContext = YY_START;
yyextra->docBlockInBody = FALSE;
yyextra->docBlockAutoBrief = FALSE;
- yyextra->docBlock.resize(0);
+ yyextra->docBlock.str(std::string());
yyextra->docBlockTerm = 0;
startCommentBlock(yyscanner,TRUE);
BEGIN(DocLine);
@@ -2582,7 +2682,7 @@ NONLopt [^\n]*
{
yyextra->docBlockContext = YY_START;
yyextra->docBlockInBody = FALSE;
- yyextra->docBlock.resize(0);
+ yyextra->docBlock.str(std::string());
yyextra->docBlockAutoBrief = ( yytext[yyleng-2]=='*' && Config_getBool(JAVADOC_AUTOBRIEF) ) ||
( yytext[yyleng-2]=='!' && Config_getBool(QT_AUTOBRIEF) );
yyextra->docBlockTerm = 0;
@@ -2605,7 +2705,7 @@ NONLopt [^\n]*
if (!yyextra->insideCS) REJECT;
yyextra->current->bodyLine = yyextra->yyLineNr;
yyextra->current->bodyColumn = yyextra->yyColNr;
- yyextra->current->initializer = yytext;
+ yyextra->current->initializer.str(yytext);
yyextra->lastInitializerContext = YY_START;
yyextra->initBracketCount=0;
yyextra->current->mtype = yyextra->mtype = Property;
@@ -2615,7 +2715,7 @@ NONLopt [^\n]*
<FindMembers>"=" { // in PHP code this could also be due to "<?="
yyextra->current->bodyLine = yyextra->yyLineNr;
yyextra->current->bodyColumn = yyextra->yyColNr;
- yyextra->current->initializer = yytext;
+ yyextra->current->initializer.str(yytext);
yyextra->lastInitializerContext = YY_START;
yyextra->initBracketCount=0;
BEGIN(ReadInitializer);
@@ -2634,7 +2734,7 @@ NONLopt [^\n]*
yyextra->lastRoundContext=YY_START;
yyextra->pCopyRoundGString=&yyextra->current->initializer;
yyextra->roundCount=0;
- yyextra->current->initializer+=*yytext;
+ yyextra->current->initializer << *yytext;
BEGIN(GCopyRound);
}
<ReadInitializer,ReadInitializerPtr>"[" {
@@ -2642,18 +2742,18 @@ NONLopt [^\n]*
yyextra->lastSquareContext=YY_START;
yyextra->pCopySquareGString=&yyextra->current->initializer;
yyextra->squareCount=0;
- yyextra->current->initializer+=*yytext;
+ yyextra->current->initializer << *yytext;
BEGIN(GCopySquare);
}
<ReadInitializer,ReadInitializerPtr>"{" {
yyextra->lastCurlyContext=YY_START;
yyextra->pCopyCurlyGString=&yyextra->current->initializer;
yyextra->curlyCount=0;
- yyextra->current->initializer+=*yytext;
+ yyextra->current->initializer << *yytext;
BEGIN(GCopyCurly);
}
<ReadInitializer,ReadInitializerPtr>[;,] {
- //printf(">> initializer '%s' <<\n",yyextra->current->initializer.data());
+ //printf(">> initializer '%s' <<\n",qPrint(yyextra->current->initializer));
if (*yytext==';' && (yyextra->current_root->spec&Entry::Enum))
{
yyextra->current->fileName = yyextra->yyFileName;
@@ -2669,18 +2769,18 @@ NONLopt [^\n]*
else if (*yytext==';' || (yyextra->lastInitializerContext==FindFields && yyextra->initBracketCount==0)) // yyextra->initBracketCount==0 was added for bug 665778
{
unput(*yytext);
- if (YY_START == ReadInitializerPtr) yyextra->current->initializer.resize(0);
+ if (YY_START == ReadInitializerPtr) yyextra->current->initializer.str(std::string());
BEGIN(yyextra->lastInitializerContext);
}
else if (*yytext==',' && yyextra->initBracketCount==0) // for "int a=0,b=0"
{
unput(*yytext);
- if (YY_START == ReadInitializerPtr) yyextra->current->initializer.resize(0);
+ if (YY_START == ReadInitializerPtr) yyextra->current->initializer.str(std::string());
BEGIN(yyextra->lastInitializerContext);
}
else
{
- yyextra->current->initializer+=*yytext;
+ yyextra->current->initializer << *yytext;
}
}
<ReadInitializer,ReadInitializerPtr>{RAWBEGIN} { // C++11 raw string
@@ -2691,18 +2791,18 @@ NONLopt [^\n]*
else
{
QCString text=yytext;
- yyextra->current->initializer+=text;
+ yyextra->current->initializer << text;
int i=text.find('"');
yyextra->delimiter = yytext+i+1;
yyextra->delimiter=yyextra->delimiter.left(yyextra->delimiter.length()-1);
yyextra->lastRawStringContext = YY_START;
yyextra->pCopyRawGString = &yyextra->current->initializer;
BEGIN(RawGString);
- //printf("RawGString delimiter='%s'\n",delimiter.data());
+ //printf("RawGString delimiter='%s'\n",qPrint(delimiter));
}
}
<RawGString>{RAWEND} {
- *yyextra->pCopyRawGString+=yytext;
+ *yyextra->pCopyRawGString << yytext;
QCString delimiter = yytext+1;
delimiter=delimiter.left(delimiter.length()-1);
if (delimiter==yyextra->delimiter)
@@ -2711,13 +2811,13 @@ NONLopt [^\n]*
}
}
<RawGString>[^)\n]+ {
- *yyextra->pCopyRawGString+=yytext;
+ *yyextra->pCopyRawGString << yytext;
}
<RawGString>. {
- *yyextra->pCopyRawGString+=yytext;
+ *yyextra->pCopyRawGString << yytext;
}
<RawGString>\n {
- *yyextra->pCopyRawGString+=yytext;
+ *yyextra->pCopyRawGString << yytext;
lineCount(yyscanner);
}
<RawString>{RAWEND} {
@@ -2731,15 +2831,15 @@ NONLopt [^\n]*
}
}
<RawString>[^)]+ {
- *yyextra->pCopyRawString+=yytext;
+ *yyextra->pCopyRawString += yytext;
yyextra->fullArgString+=yytext;
}
<RawString>. {
- *yyextra->pCopyRawString+=yytext;
+ *yyextra->pCopyRawString += yytext;
yyextra->fullArgString+=yytext;
}
<RawString>\n {
- *yyextra->pCopyRawString+=yytext;
+ *yyextra->pCopyRawString += yytext;
yyextra->fullArgString+=yytext;
lineCount(yyscanner);
}
@@ -2751,39 +2851,39 @@ NONLopt [^\n]*
else
{
yyextra->lastStringContext=YY_START;
- yyextra->current->initializer+=yytext;
+ yyextra->current->initializer << yytext;
yyextra->pCopyQuotedGString=&yyextra->current->initializer;
BEGIN(CopyGString);
}
}
<ReadInitializer,ReadInitializerPtr>"->" {
- yyextra->current->initializer+=yytext;
+ yyextra->current->initializer << yytext;
}
<ReadInitializer,ReadInitializerPtr>"<<" {
- yyextra->current->initializer+=yytext;
+ yyextra->current->initializer << yytext;
}
<ReadInitializer,ReadInitializerPtr>">>" {
- yyextra->current->initializer+=yytext;
+ yyextra->current->initializer << yytext;
}
<ReadInitializer,ReadInitializerPtr>[<\[{(] {
yyextra->initBracketCount++;
- yyextra->current->initializer+=*yytext;
+ yyextra->current->initializer << *yytext;
}
<ReadInitializer,ReadInitializerPtr>[>\]})] {
yyextra->initBracketCount--;
- yyextra->current->initializer+=*yytext;
+ yyextra->current->initializer << *yytext;
}
<ReadInitializer,ReadInitializerPtr>\' {
if (yyextra->insidePHP)
{
- yyextra->current->initializer+=yytext;
+ yyextra->current->initializer << yytext;
yyextra->pCopyQuotedGString = &yyextra->current->initializer;
yyextra->lastStringContext=YY_START;
BEGIN(CopyPHPGString);
}
else
{
- yyextra->current->initializer+=yytext;
+ yyextra->current->initializer << yytext;
}
}
<ReadInitializer,ReadInitializerPtr>{CHARLIT} {
@@ -2793,16 +2893,16 @@ NONLopt [^\n]*
}
else
{
- yyextra->current->initializer+=yytext;
+ yyextra->current->initializer << yytext;
}
}
<ReadInitializer,ReadInitializerPtr>\n {
- yyextra->current->initializer+=*yytext;
+ yyextra->current->initializer << *yytext;
lineCount(yyscanner);
}
<ReadInitializer,ReadInitializerPtr>"@\"" {
//printf("yyextra->insideCS=%d\n",yyextra->insideCS);
- yyextra->current->initializer+=yytext;
+ yyextra->current->initializer << yytext;
if (!yyextra->insideCS && !yyextra->insideObjC)
{
REJECT;
@@ -2816,30 +2916,30 @@ NONLopt [^\n]*
}
}
<SkipVerbString>[^\n"]+ {
- *yyextra->pSkipVerbString+=yytext;
+ *yyextra->pSkipVerbString << yytext;
}
<SkipVerbString>"\"\"" { // quote escape
- *yyextra->pSkipVerbString+=yytext;
+ *yyextra->pSkipVerbString << yytext;
}
<SkipVerbString>"\"" {
- *yyextra->pSkipVerbString+=*yytext;
+ *yyextra->pSkipVerbString << *yytext;
BEGIN(yyextra->lastSkipVerbStringContext);
}
<SkipVerbString>\n {
- *yyextra->pSkipVerbString+=*yytext;
+ *yyextra->pSkipVerbString << *yytext;
lineCount(yyscanner);
}
<SkipVerbString>. {
- *yyextra->pSkipVerbString+=*yytext;
+ *yyextra->pSkipVerbString << *yytext;
}
<ReadInitializer,ReadInitializerPtr>"?>" {
if (yyextra->insidePHP)
BEGIN( FindMembersPHP );
else
- yyextra->current->initializer+=yytext;
+ yyextra->current->initializer << yytext;
}
<ReadInitializer,ReadInitializerPtr>. {
- yyextra->current->initializer+=*yytext;
+ yyextra->current->initializer << *yytext;
}
/* generic quoted string copy rules */
@@ -2867,62 +2967,62 @@ NONLopt [^\n]*
/* generic quoted growable string copy rules */
<CopyGString,CopyPHPGString>\\. {
- *yyextra->pCopyQuotedGString+=yytext;
+ *yyextra->pCopyQuotedGString << yytext;
}
<CopyGString>\" {
- *yyextra->pCopyQuotedGString+=*yytext;
+ *yyextra->pCopyQuotedGString << *yytext;
BEGIN( yyextra->lastStringContext );
}
<CopyPHPGString>\' {
- *yyextra->pCopyQuotedGString+=*yytext;
+ *yyextra->pCopyQuotedGString << *yytext;
BEGIN( yyextra->lastStringContext );
}
<CopyGString,CopyPHPGString>"<?php" { // we had an odd number of quotes.
- *yyextra->pCopyQuotedGString += yytext;
+ *yyextra->pCopyQuotedGString << yytext;
BEGIN( yyextra->lastStringContext );
}
<CopyGString,CopyPHPGString>{CCS}|{CCE}|{CPPC} {
- *yyextra->pCopyQuotedGString+=yytext;
+ *yyextra->pCopyQuotedGString << yytext;
}
<CopyGString,CopyPHPGString>\n {
- *yyextra->pCopyQuotedGString+=*yytext;
+ *yyextra->pCopyQuotedGString << *yytext;
lineCount(yyscanner);
}
<CopyGString,CopyPHPGString>. {
- *yyextra->pCopyQuotedGString+=*yytext;
+ *yyextra->pCopyQuotedGString << *yytext;
}
/* generic round bracket list copy rules */
<CopyRound>\" {
- *yyextra->pCopyRoundString+=*yytext;
+ *yyextra->pCopyRoundString += *yytext;
yyextra->pCopyQuotedString=yyextra->pCopyRoundString;
yyextra->lastStringContext=YY_START;
BEGIN(CopyString);
}
<CopyRound>"(" {
- *yyextra->pCopyRoundString+=*yytext;
+ *yyextra->pCopyRoundString += *yytext;
yyextra->roundCount++;
}
<CopyRound>")" {
- *yyextra->pCopyRoundString+=*yytext;
+ *yyextra->pCopyRoundString += *yytext;
if (--yyextra->roundCount<0)
BEGIN(yyextra->lastRoundContext);
}
<CopyRound>\n {
lineCount(yyscanner);
- *yyextra->pCopyRoundString+=*yytext;
+ *yyextra->pCopyRoundString += *yytext;
}
<CopyRound>\' {
if (yyextra->insidePHP)
{
- yyextra->current->initializer+=yytext;
+ yyextra->current->initializer << yytext;
yyextra->pCopyQuotedString = yyextra->pCopyRoundString;
yyextra->lastStringContext=YY_START;
BEGIN(CopyPHPString);
}
else
{
- *yyextra->pCopyRoundString+=yytext;
+ *yyextra->pCopyRoundString += yytext;
}
}
<CopyRound>{CHARLIT} {
@@ -2942,37 +3042,90 @@ NONLopt [^\n]*
*yyextra->pCopyRoundString+=*yytext;
}
+ /* generic sharp bracket list copy rules */
+<CopySharp>\" {
+ *yyextra->pCopySharpString += *yytext;
+ yyextra->pCopyQuotedString=yyextra->pCopySharpString;
+ yyextra->lastStringContext=YY_START;
+ BEGIN(CopyString);
+ }
+<CopySharp>"<" {
+ *yyextra->pCopySharpString += *yytext;
+ yyextra->sharpCount++;
+ }
+<CopySharp>">" {
+ *yyextra->pCopySharpString += *yytext;
+ if (--yyextra->sharpCount<0)
+ {
+ BEGIN(yyextra->lastSharpContext);
+ }
+ }
+<CopySharp>\n {
+ lineCount(yyscanner);
+ *yyextra->pCopySharpString += *yytext;
+ }
+<CopySharp>\' {
+ if (yyextra->insidePHP)
+ {
+ yyextra->current->initializer << yytext;
+ yyextra->pCopyQuotedString = yyextra->pCopySharpString;
+ yyextra->lastStringContext=YY_START;
+ BEGIN(CopyPHPString);
+ }
+ else
+ {
+ *yyextra->pCopySharpString += yytext;
+ }
+ }
+<CopySharp>{CHARLIT} {
+ if (yyextra->insidePHP)
+ {
+ REJECT;
+ }
+ else
+ {
+ *yyextra->pCopySharpString+=yytext;
+ }
+ }
+<CopySharp>[^"'<>\n,]+ {
+ *yyextra->pCopySharpString+=yytext;
+ }
+<CopySharp>. {
+ *yyextra->pCopySharpString+=*yytext;
+ }
+
+
/* generic round bracket list copy rules for growable strings */
<GCopyRound>\" {
- *yyextra->pCopyRoundGString+=*yytext;
+ *yyextra->pCopyRoundGString << *yytext;
yyextra->pCopyQuotedGString=yyextra->pCopyRoundGString;
yyextra->lastStringContext=YY_START;
BEGIN(CopyGString);
}
<GCopyRound>"(" {
- *yyextra->pCopyRoundGString+=*yytext;
+ *yyextra->pCopyRoundGString << *yytext;
yyextra->roundCount++;
}
<GCopyRound>")" {
- *yyextra->pCopyRoundGString+=*yytext;
+ *yyextra->pCopyRoundGString << *yytext;
if (--yyextra->roundCount<0)
BEGIN(yyextra->lastRoundContext);
}
<GCopyRound>\n {
lineCount(yyscanner);
- *yyextra->pCopyRoundGString+=*yytext;
+ *yyextra->pCopyRoundGString << *yytext;
}
<GCopyRound>\' {
if (yyextra->insidePHP)
{
- yyextra->current->initializer+=yytext;
+ yyextra->current->initializer << yytext;
yyextra->pCopyQuotedGString = yyextra->pCopyRoundGString;
yyextra->lastStringContext=YY_START;
BEGIN(CopyPHPGString);
}
else
{
- *yyextra->pCopyRoundGString+=yytext;
+ *yyextra->pCopyRoundGString << yytext;
}
}
<GCopyRound>{CHARLIT} {
@@ -2982,47 +3135,47 @@ NONLopt [^\n]*
}
else
{
- *yyextra->pCopyRoundGString+=yytext;
+ *yyextra->pCopyRoundGString << yytext;
}
}
<GCopyRound>[^"'()\n\/,]+ {
- *yyextra->pCopyRoundGString+=yytext;
+ *yyextra->pCopyRoundGString << yytext;
}
<GCopyRound>. {
- *yyextra->pCopyRoundGString+=*yytext;
+ *yyextra->pCopyRoundGString << *yytext;
}
/* generic square bracket list copy rules for growable strings, we should only enter here in case of php, left the test part as in GCopyRound to keep it compatible with the round bracket version */
<GCopySquare>\" {
- *yyextra->pCopySquareGString+=*yytext;
+ *yyextra->pCopySquareGString << *yytext;
yyextra->pCopyQuotedGString=yyextra->pCopySquareGString;
yyextra->lastStringContext=YY_START;
BEGIN(CopyGString);
}
<GCopySquare>"[" {
- *yyextra->pCopySquareGString+=*yytext;
+ *yyextra->pCopySquareGString << *yytext;
yyextra->squareCount++;
}
<GCopySquare>"]" {
- *yyextra->pCopySquareGString+=*yytext;
+ *yyextra->pCopySquareGString << *yytext;
if (--yyextra->squareCount<0)
BEGIN(yyextra->lastSquareContext);
}
<GCopySquare>\n {
lineCount(yyscanner);
- *yyextra->pCopySquareGString+=*yytext;
+ *yyextra->pCopySquareGString << *yytext;
}
<GCopySquare>\' {
if (yyextra->insidePHP)
{
- yyextra->current->initializer+=yytext;
+ yyextra->current->initializer << yytext;
yyextra->pCopyQuotedGString = yyextra->pCopySquareGString;
yyextra->lastStringContext=YY_START;
BEGIN(CopyPHPGString);
}
else
{
- *yyextra->pCopySquareGString+=yytext;
+ *yyextra->pCopySquareGString << yytext;
}
}
<GCopySquare>{CHARLIT} {
@@ -3032,25 +3185,25 @@ NONLopt [^\n]*
}
else
{
- *yyextra->pCopySquareGString+=yytext;
+ *yyextra->pCopySquareGString << yytext;
}
}
<GCopySquare>[^"\[\]\n\/,]+ {
- *yyextra->pCopySquareGString+=yytext;
+ *yyextra->pCopySquareGString << yytext;
}
<GCopySquare>. {
- *yyextra->pCopySquareGString+=*yytext;
+ *yyextra->pCopySquareGString << *yytext;
}
/* generic curly bracket list copy rules */
<CopyCurly>\" {
- *yyextra->pCopyCurlyString+=*yytext;
+ *yyextra->pCopyCurlyString += *yytext;
yyextra->pCopyQuotedString=yyextra->pCopyCurlyString;
yyextra->lastStringContext=YY_START;
BEGIN(CopyString);
}
<CopyCurly>\' {
- *yyextra->pCopyCurlyString+=*yytext;
+ *yyextra->pCopyCurlyString += *yytext;
if (yyextra->insidePHP)
{
yyextra->pCopyQuotedString=yyextra->pCopyCurlyString;
@@ -3059,11 +3212,11 @@ NONLopt [^\n]*
}
}
<CopyCurly>"{" {
- *yyextra->pCopyCurlyString+=*yytext;
+ *yyextra->pCopyCurlyString += *yytext;
yyextra->curlyCount++;
}
<CopyCurly>"}" {
- *yyextra->pCopyCurlyString+=*yytext;
+ *yyextra->pCopyCurlyString += *yytext;
if (--yyextra->curlyCount<0)
BEGIN(yyextra->lastCurlyContext);
}
@@ -3073,19 +3226,19 @@ NONLopt [^\n]*
}
else
{
- *yyextra->pCopyCurlyString+=yytext;
+ *yyextra->pCopyCurlyString += yytext;
}
}
<CopyCurly>[^"'{}\/\n,]+ {
- *yyextra->pCopyCurlyString+=yytext;
+ *yyextra->pCopyCurlyString += yytext;
}
-<CopyCurly>"/" { *yyextra->pCopyCurlyString+=yytext; }
+<CopyCurly>"/" { *yyextra->pCopyCurlyString += yytext; }
<CopyCurly>\n {
lineCount(yyscanner);
- *yyextra->pCopyCurlyString+=*yytext;
+ *yyextra->pCopyCurlyString += *yytext;
}
<CopyCurly>. {
- *yyextra->pCopyCurlyString+=*yytext;
+ *yyextra->pCopyCurlyString += *yytext;
}
/* generic curly bracket list copy rules for growable strings */
@@ -3103,13 +3256,13 @@ NONLopt [^\n]*
}
}
<GCopyCurly>\" {
- *yyextra->pCopyCurlyGString+=*yytext;
+ *yyextra->pCopyCurlyGString << *yytext;
yyextra->pCopyQuotedGString=yyextra->pCopyCurlyGString;
yyextra->lastStringContext=YY_START;
BEGIN(CopyGString);
}
<GCopyCurly>\' {
- *yyextra->pCopyCurlyGString+=*yytext;
+ *yyextra->pCopyCurlyGString << *yytext;
if (yyextra->insidePHP)
{
yyextra->pCopyQuotedGString=yyextra->pCopyCurlyGString;
@@ -3118,11 +3271,11 @@ NONLopt [^\n]*
}
}
<GCopyCurly>"{" {
- *yyextra->pCopyCurlyGString+=*yytext;
+ *yyextra->pCopyCurlyGString << *yytext;
yyextra->curlyCount++;
}
<GCopyCurly>"}" {
- *yyextra->pCopyCurlyGString+=*yytext;
+ *yyextra->pCopyCurlyGString << *yytext;
if (--yyextra->curlyCount<0)
BEGIN(yyextra->lastCurlyContext);
}
@@ -3132,22 +3285,22 @@ NONLopt [^\n]*
}
else
{
- *yyextra->pCopyCurlyGString+=yytext;
+ *yyextra->pCopyCurlyGString << yytext;
}
}
<GCopyCurly>[^"'{}\/\n,]+ {
- *yyextra->pCopyCurlyGString+=yytext;
+ *yyextra->pCopyCurlyGString << yytext;
}
<GCopyCurly>[,]+ {
- *yyextra->pCopyCurlyGString+=yytext;
+ *yyextra->pCopyCurlyGString << yytext;
}
-<GCopyCurly>"/" { *yyextra->pCopyCurlyGString+=yytext; }
+<GCopyCurly>"/" { *yyextra->pCopyCurlyGString << yytext; }
<GCopyCurly>\n {
lineCount(yyscanner);
- *yyextra->pCopyCurlyGString+=*yytext;
+ *yyextra->pCopyCurlyGString << *yytext;
}
<GCopyCurly>. {
- *yyextra->pCopyCurlyGString+=*yytext;
+ *yyextra->pCopyCurlyGString << *yytext;
}
/* ---------------------- */
@@ -3199,7 +3352,12 @@ NONLopt [^\n]*
yyextra->current->type.prepend("typedef ");
}
bool stat = yyextra->current->stat;
- if (!yyextra->current->name.isEmpty() && yyextra->current->section!=Entry::ENUM_SEC)
+ if (yyextra->current->section==Entry::CONCEPT_SEC) // C++20 concept
+ {
+ yyextra->current_root->moveToSubEntryAndRefresh( yyextra->current ) ;
+ initEntry(yyscanner);
+ }
+ else if (!yyextra->current->name.isEmpty() && yyextra->current->section!=Entry::ENUM_SEC)
{
yyextra->current->type=yyextra->current->type.simplifyWhiteSpace();
yyextra->current->args=removeRedundantWhiteSpace(yyextra->current->args);
@@ -3222,7 +3380,7 @@ NONLopt [^\n]*
yyextra->current->args.resize(0);
yyextra->current->brief.resize(0);
yyextra->current->doc.resize(0);
- yyextra->current->initializer.resize(0);
+ yyextra->current->initializer.str(std::string());
yyextra->current->bitfields.resize(0);
int i=oldType.length();
while (i>0 && (oldType[i-1]=='*' || oldType[i-1]=='&' || oldType[i-1]==' ')) i--;
@@ -3425,7 +3583,7 @@ NONLopt [^\n]*
yyextra->idlProp = yytext;
}
<IDLProp>{BN}*{ID}{BN}*"," { // Rare: Another parameter ([propput] HRESULT Item(int index, [in] Type theRealProperty);)
- if (!yyextra->current->args)
+ if (yyextra->current->args.isEmpty())
yyextra->current->args = "(";
else
yyextra->current->args += ", ";
@@ -3446,7 +3604,7 @@ NONLopt [^\n]*
yyextra->current->fileName = yyextra->yyFileName;
yyextra->current->type = yyextra->idlProp;
yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
- if (yyextra->current->args)
+ if (!yyextra->current->args.isEmpty())
yyextra->current->args += ")";
yyextra->current->name = yyextra->current->name.stripWhiteSpace();
yyextra->current->section = Entry::VARIABLE_SEC;
@@ -3509,13 +3667,13 @@ NONLopt [^\n]*
unput('(');
yyextra->lastInitializerContext = YY_START;
yyextra->initBracketCount=0;
- yyextra->current->initializer = "=";
+ yyextra->current->initializer.str("=");
BEGIN(ReadInitializer);
}
<FindFields>"=" {
yyextra->lastInitializerContext = YY_START;
yyextra->initBracketCount=0;
- yyextra->current->initializer = yytext;
+ yyextra->current->initializer.str(yytext);
BEGIN(ReadInitializer);
}
<FindFields>";" {
@@ -3550,8 +3708,8 @@ NONLopt [^\n]*
<SkipRemainder>[^\n]*
<FindFields>"," {
//printf("adding '%s' '%s' '%s' to enum '%s' (mGrpId=%d)\n",
- // yyextra->current->type.data(), yyextra->current->name.data(),
- // yyextra->current->args.data(), yyextra->current_root->name.data(),yyextra->current->mGrpId);
+ // qPrint(yyextra->current->type), qPrint(yyextra->current->name),
+ // qPrint(yyextra->current->args), qPrint(yyextra->current_root->name),yyextra->current->mGrpId);
if (!yyextra->current->name.isEmpty())
{
yyextra->current->fileName = yyextra->yyFileName;
@@ -3572,7 +3730,7 @@ NONLopt [^\n]*
{
// add to the scope surrounding the enum (copy!)
// we cannot during it directly as that would invalidate the iterator in parseCompounds.
- //printf("*** adding outer scope entry for %s\n",yyextra->current->name.data());
+ //printf("*** adding outer scope entry for %s\n",qPrint(yyextra->current->name));
yyextra->outerScopeEntries.emplace_back(yyextra->current_root->parent(), std::make_shared<Entry>(*yyextra->current));
}
yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
@@ -3592,21 +3750,21 @@ NONLopt [^\n]*
/*
<FindFieldArg>"," { unput(*yytext); BEGIN(FindFields); }
*/
-<ReadBody,ReadNSBody,ReadBodyIntf>[^\r\n\#{}"@'/<]* { yyextra->current->program += yytext ; }
-<ReadBody,ReadNSBody,ReadBodyIntf>{CPPC}.* { yyextra->current->program += yytext ; }
+<ReadBody,ReadNSBody,ReadBodyIntf>[^\r\n\#{}"@'/<]* { yyextra->current->program << yytext ; }
+<ReadBody,ReadNSBody,ReadBodyIntf>{CPPC}.* { yyextra->current->program << yytext ; }
<ReadBody,ReadNSBody,ReadBodyIntf>"#".* { if (!yyextra->insidePHP)
REJECT;
// append PHP comment.
- yyextra->current->program += yytext ;
+ yyextra->current->program << yytext ;
}
-<ReadBody,ReadNSBody,ReadBodyIntf>@\" { yyextra->current->program += yytext ;
+<ReadBody,ReadNSBody,ReadBodyIntf>@\" { yyextra->current->program << yytext ;
yyextra->pSkipVerbString = &yyextra->current->program;
yyextra->lastSkipVerbStringContext=YY_START;
BEGIN( SkipVerbString );
}
<ReadBody,ReadNSBody,ReadBodyIntf>"<<<" { if (yyextra->insidePHP)
{
- yyextra->current->program += yytext ;
+ yyextra->current->program << yytext ;
yyextra->pCopyHereDocGString = &yyextra->current->program;
yyextra->lastHereDocContext=YY_START;
BEGIN( CopyHereDoc );
@@ -3616,16 +3774,16 @@ NONLopt [^\n]*
REJECT;
}
}
-<ReadBody,ReadNSBody,ReadBodyIntf>\" { yyextra->current->program += yytext ;
+<ReadBody,ReadNSBody,ReadBodyIntf>\" { yyextra->current->program << yytext ;
yyextra->pCopyQuotedGString = &yyextra->current->program;
yyextra->lastStringContext=YY_START;
BEGIN( CopyGString );
}
-<ReadBody,ReadNSBody,ReadBodyIntf>{CCS}{B}* { yyextra->current->program += yytext ;
+<ReadBody,ReadNSBody,ReadBodyIntf>{CCS}{B}* { yyextra->current->program << yytext ;
yyextra->lastContext = YY_START ;
BEGIN( Comment ) ;
}
-<ReadBody,ReadNSBody,ReadBodyIntf>{CCS}{BL} { yyextra->current->program += yytext ;
+<ReadBody,ReadNSBody,ReadBodyIntf>{CCS}{BL} { yyextra->current->program << yytext ;
++yyextra->yyLineNr ;
yyextra->lastContext = YY_START ;
BEGIN( Comment ) ;
@@ -3633,11 +3791,11 @@ NONLopt [^\n]*
<ReadBody,ReadNSBody,ReadBodyIntf>"'" {
if (!yyextra->insidePHP)
{
- yyextra->current->program += yytext;
+ yyextra->current->program << yytext;
}
else
{ // begin of single quoted string
- yyextra->current->program += yytext;
+ yyextra->current->program << yytext;
yyextra->pCopyQuotedGString = &yyextra->current->program;
yyextra->lastStringContext=YY_START;
BEGIN(CopyPHPGString);
@@ -3651,20 +3809,20 @@ NONLopt [^\n]*
}
else
{
- yyextra->current->program += yytext;
+ yyextra->current->program << yytext;
}
}
-<ReadBody,ReadNSBody,ReadBodyIntf>"{" { yyextra->current->program += yytext ;
+<ReadBody,ReadNSBody,ReadBodyIntf>"{" { yyextra->current->program << yytext ;
++yyextra->curlyCount ;
}
<ReadBodyIntf>"}" {
- yyextra->current->program += yytext ;
+ yyextra->current->program << yytext ;
--yyextra->curlyCount ;
}
<ReadBody,ReadNSBody>"}" { //err("ReadBody count=%d\n",yyextra->curlyCount);
if ( yyextra->curlyCount>0 )
{
- yyextra->current->program += yytext ;
+ yyextra->current->program << yytext ;
--yyextra->curlyCount ;
}
else
@@ -3691,7 +3849,7 @@ NONLopt [^\n]*
while ((split_point = yyextra->current->name.find("::")) != -1)
{
std::shared_ptr<Entry> new_current = std::make_shared<Entry>(*yyextra->current);
- yyextra->current->program = "";
+ yyextra->current->program.str(std::string());
new_current->name = yyextra->current->name.mid(split_point + 2);
yyextra->current->name = yyextra->current->name.left(split_point);
if (!yyextra->current_root->name.isEmpty()) yyextra->current->name.prepend(yyextra->current_root->name+"::");
@@ -3709,8 +3867,8 @@ NONLopt [^\n]*
yyextra->current->briefFile = briefFile;
}
QCString &cn = yyextra->current->name;
- QCString rn = yyextra->current_root->name.copy();
- //printf("cn='%s' rn='%s' yyextra->isTypedef=%d\n",cn.data(),rn.data(),yyextra->isTypedef);
+ QCString rn = yyextra->current_root->name;
+ //printf("cn='%s' rn='%s' yyextra->isTypedef=%d\n",qPrint(cn),qPrint(rn),yyextra->isTypedef);
if (!cn.isEmpty() && !rn.isEmpty())
{
prependScope(yyscanner);
@@ -3724,14 +3882,14 @@ NONLopt [^\n]*
{
if ((yyextra->current->section == Entry::ENUM_SEC) || (yyextra->current->spec&Entry::Enum))
{
- yyextra->current->program+=','; // add field terminator
+ yyextra->current->program << ','; // add field terminator
}
// add compound definition to the tree
yyextra->current->args=removeRedundantWhiteSpace(yyextra->current->args);
// was: yyextra->current->args.simplifyWhiteSpace();
yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
yyextra->current->name = yyextra->current->name.stripWhiteSpace();
- //printf("adding '%s' '%s' '%s' brief=%s yyextra->insideObjC=%d %x\n",yyextra->current->type.data(),yyextra->current->name.data(),yyextra->current->args.data(),yyextra->current->brief.data(),yyextra->insideObjC,yyextra->current->section);
+ //printf("adding '%s' '%s' '%s' brief=%s yyextra->insideObjC=%d %x\n",qPrint(yyextra->current->type),qPrint(yyextra->current->name),qPrint(yyextra->current->args),qPrint(yyextra->current->brief),yyextra->insideObjC,yyextra->current->section);
if (yyextra->insideObjC &&
((yyextra->current->spec&Entry::Interface) || (yyextra->current->spec==Entry::Category))
) // method definition follows
@@ -3775,7 +3933,7 @@ NONLopt [^\n]*
lineCount(yyscanner);
if ( yyextra->curlyCount>0 )
{
- yyextra->current->program += yytext ;
+ yyextra->current->program << yytext ;
--yyextra->curlyCount ;
}
else
@@ -3783,7 +3941,7 @@ NONLopt [^\n]*
yyextra->isTypedef = TRUE;
yyextra->current->endBodyLine = yyextra->yyLineNr;
QCString &cn = yyextra->current->name;
- QCString rn = yyextra->current_root->name.copy();
+ QCString rn = yyextra->current_root->name;
if (!cn.isEmpty() && !rn.isEmpty())
{
prependScope(yyscanner);
@@ -3798,13 +3956,13 @@ NONLopt [^\n]*
<TypedefName>{ID} {
if ((yyextra->current->section == Entry::ENUM_SEC) || (yyextra->current->spec&Entry::Enum))
{
- yyextra->current->program+=","; // add field terminator
+ yyextra->current->program << ","; // add field terminator
}
yyextra->current->name=yytext;
prependScope(yyscanner);
yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
- //printf("Adding compound %s %s %s\n",yyextra->current->type.data(),yyextra->current->name.data(),yyextra->current->args.data());
+ //printf("Adding compound %s %s %s\n",qPrint(yyextra->current->type),qPrint(yyextra->current->name),qPrint(yyextra->current->args));
if (!yyextra->firstTypedefEntry)
{
yyextra->firstTypedefEntry = yyextra->current;
@@ -3818,7 +3976,7 @@ NONLopt [^\n]*
yyextra->current->name.sprintf("@%d",anonCount++);
if ((yyextra->current->section == Entry::ENUM_SEC) || (yyextra->current->spec&Entry::Enum))
{
- yyextra->current->program+=','; // add field terminator
+ yyextra->current->program << ','; // add field terminator
}
// add compound definition to the tree
yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
@@ -3883,13 +4041,13 @@ NONLopt [^\n]*
// only look for class scopes, not namespace scopes
if ((p->section & Entry::COMPOUND_MASK) && !p->name.isEmpty())
{
- //printf("Trying scope '%s'\n",p->name.data());
+ //printf("Trying scope '%s'\n",qPrint(p->name));
int i=p->name.findRev("::");
int pi = (i==-1) ? 0 : i+2;
if (p->name.at(pi)=='@')
{
// anonymous compound yyextra->inside -> insert dummy variable name
- //printf("Adding anonymous variable for scope %s\n",p->name.data());
+ //printf("Adding anonymous variable for scope %s\n",qPrint(p->name));
yyextra->msName.sprintf("@%d",anonCount++);
break;
}
@@ -3898,7 +4056,7 @@ NONLopt [^\n]*
if (p==yyextra->current.get()) p=yyextra->current_root.get(); else p=p->parent();
}
}
- //printf("yyextra->msName=%s yyextra->current->name=%s\n",yyextra->msName.data(),yyextra->current->name.data());
+ //printf("yyextra->msName=%s yyextra->current->name=%s\n",qPrint(yyextra->msName),qPrint(yyextra->current->name));
if (!yyextra->msName.isEmpty()
/*&& yyextra->msName!=yyextra->current->name*/) // skip typedef T {} T;, removed due to bug608493
{
@@ -3929,7 +4087,7 @@ NONLopt [^\n]*
if (yyextra->isTypedef)
{
varEntry->type.prepend("typedef ");
- // //printf("yyextra->current->name = %s %s\n",yyextra->current->name.data(),yyextra->msName.data());
+ // //printf("yyextra->current->name = %s %s\n",qPrint(yyextra->current->name),qPrint(yyextra->msName));
}
if (typedefHidesStruct &&
yyextra->isTypedef &&
@@ -3946,16 +4104,16 @@ NONLopt [^\n]*
varEntry->fileName = yyextra->yyFileName;
varEntry->startLine = yyextra->yyLineNr;
varEntry->startColumn = yyextra->yyColNr;
- varEntry->doc = yyextra->current->doc.copy();
- varEntry->brief = yyextra->current->brief.copy();
+ varEntry->doc = yyextra->current->doc;
+ varEntry->brief = yyextra->current->brief;
varEntry->mGrpId = yyextra->current->mGrpId;
- varEntry->initializer = yyextra->current->initializer;
+ varEntry->initializer.str(yyextra->current->initializer.str());
varEntry->groups = yyextra->current->groups;
varEntry->sli = yyextra->current->sli;
//printf("Add: type='%s',name='%s',args='%s' brief=%s doc=%s\n",
- // varEntry->type.data(),varEntry->name.data(),
- // varEntry->args.data(),varEntry->brief.data(),varEntry->doc.data());
+ // qPrint(varEntry->type),qPrint(varEntry->name),
+ // qPrint(varEntry->args),qPrint(varEntry->brief),qPrint(varEntry->doc));
yyextra->current_root->moveToSubEntryAndKeep(varEntry);
}
}
@@ -3992,7 +4150,7 @@ NONLopt [^\n]*
<MemberSpec>"=" {
yyextra->lastInitializerContext=YY_START;
yyextra->initBracketCount=0;
- yyextra->current->initializer = yytext;
+ yyextra->current->initializer.str(yytext);
BEGIN(ReadInitializer);
/* BEGIN(MemberSpecSkip); */
}
@@ -4006,7 +4164,7 @@ NONLopt [^\n]*
*/
<MemberSpecSkip>"," { BEGIN(MemberSpec); }
<MemberSpecSkip>";" { unput(';'); BEGIN(MemberSpec); }
-<ReadBody,ReadNSBody,ReadBodyIntf>{BN}{1,80} { yyextra->current->program += yytext ;
+<ReadBody,ReadNSBody,ReadBodyIntf>{BN}{1,80} { yyextra->current->program << yytext ;
lineCount(yyscanner) ;
}
<ReadBodyIntf>"@end"/[^a-z_A-Z0-9] { // end of Objective C block
@@ -4016,7 +4174,7 @@ NONLopt [^\n]*
yyextra->insideObjC=FALSE;
BEGIN( FindMembers );
}
-<ReadBody,ReadNSBody,ReadBodyIntf>. { yyextra->current->program += yytext ; }
+<ReadBody,ReadNSBody,ReadBodyIntf>. { yyextra->current->program << yytext ; }
<FindMembers>"("/{BN}*"::"*{BN}*({TSCOPE}{BN}*"::")*{TSCOPE}{BN}*")"{BN}*"(" | /* typedef void (A<int>::func_t)(args...) */
<FindMembers>("("({BN}*"::"*{BN}*{TSCOPE}{BN}*"::")*({BN}*[*&\^]{BN}*)+)+ { /* typedef void (A::*ptr_t)(args...) or int (*func(int))[], the ^ is for Obj-C blocks */
@@ -4075,7 +4233,7 @@ NONLopt [^\n]*
}
<EndFuncPtr>")"{BNopt}/";" { // a variable with extra braces
lineCount(yyscanner);
- yyextra->current->type+=yyextra->funcPtrType.data()+1;
+ yyextra->current->type+=yyextra->funcPtrType.mid(1);
BEGIN(FindMembers);
}
<EndFuncPtr>")"{BNopt}/"(" { // a function pointer
@@ -4085,7 +4243,7 @@ NONLopt [^\n]*
}
<EndFuncPtr>")"{BNopt}/"[" { // an array of variables
lineCount(yyscanner);
- yyextra->current->type+=yyextra->funcPtrType.data();
+ yyextra->current->type+=yyextra->funcPtrType;
yyextra->current->args += ")";
BEGIN(FindMembers);
}
@@ -4097,7 +4255,7 @@ NONLopt [^\n]*
yyextra->current->bodyLine = yyextra->yyLineNr;
yyextra->current->bodyColumn = yyextra->yyColNr;
yyextra->currentArgumentContext = FuncFuncEnd;
- yyextra->fullArgString=yyextra->current->args.copy();
+ yyextra->fullArgString=yyextra->current->args;
yyextra->copyArgString=&yyextra->current->args;
BEGIN( ReadFuncArgType ) ;
}
@@ -4127,7 +4285,7 @@ NONLopt [^\n]*
}
<FuncFuncEnd>")"{BNopt}/[;{] {
lineCount(yyscanner);
- yyextra->current->type+=yyextra->funcPtrType.data()+1;
+ yyextra->current->type+=yyextra->funcPtrType.mid(1);
BEGIN(Function);
}
<FuncFuncEnd>")"{BNopt}/"[" { // function returning a pointer to an array
@@ -4169,7 +4327,7 @@ NONLopt [^\n]*
yyextra->current->bodyLine = yyextra->yyLineNr;
yyextra->current->bodyColumn = yyextra->yyColNr;
yyextra->currentArgumentContext = FuncQual;
- yyextra->fullArgString=yyextra->current->args.copy();
+ yyextra->fullArgString=yyextra->current->args;
yyextra->copyArgString=&yyextra->current->args;
BEGIN( ReadFuncArgType ) ;
//printf(">>> Read function arguments!\n");
@@ -4190,7 +4348,7 @@ NONLopt [^\n]*
yyextra->current->bodyLine = yyextra->yyLineNr;
yyextra->current->bodyColumn = yyextra->yyColNr;
yyextra->currentArgumentContext = FuncQual;
- yyextra->fullArgString=yyextra->current->args.copy();
+ yyextra->fullArgString=yyextra->current->args;
yyextra->copyArgString=&yyextra->current->args;
BEGIN( ReadFuncArgType ) ;
//printf(">>> Read function arguments yyextra->current->argList.size()=%d\n",yyextra->current->argList.size());
@@ -4406,7 +4564,7 @@ NONLopt [^\n]*
<ReadTempArgs>">" {
*yyextra->copyArgString+=*yytext;
yyextra->fullArgString+=*yytext;
- //printf("end template list '%s'\n",yyextra->copyArgString->data());
+ //printf("end template list '%s'\n",qPrint(*yyextra->copyArgString));
*yyextra->currentArgumentList = *stringToArgumentList(yyextra->language, yyextra->fullArgString);
BEGIN( yyextra->currentArgumentContext );
}
@@ -4621,6 +4779,11 @@ NONLopt [^\n]*
unput(*yytext);
BEGIN(FuncQual);
}
+<TrailingReturn>"requires"{BN}+ {
+ yyextra->requiresContext = FuncQual;
+ yyextra->current->req+=' ';
+ BEGIN(RequiresClause);
+ }
<TrailingReturn>"(" {
yyextra->roundCount++;
yyextra->current->argList.setTrailingReturnType(yyextra->current->argList.trailingReturnType()+yytext);
@@ -4635,7 +4798,7 @@ NONLopt [^\n]*
{
warn(yyextra->yyFileName,yyextra->yyLineNr,
"Found ')' without opening '(' for trailing return type '%s)...'",
- yyextra->current->argList.trailingReturnType().data());
+ qPrint(yyextra->current->argList.trailingReturnType()));
}
yyextra->current->argList.setTrailingReturnType(yyextra->current->argList.trailingReturnType()+yytext);
yyextra->current->args+=yytext;
@@ -4674,7 +4837,7 @@ NONLopt [^\n]*
// typically an initialized function pointer
yyextra->lastInitializerContext=YY_START;
yyextra->initBracketCount=0;
- yyextra->current->initializer = yytext;
+ yyextra->current->initializer.str(yytext);
BEGIN(ReadInitializer);
}
}
@@ -4728,8 +4891,15 @@ NONLopt [^\n]*
yyextra->current->args += *yytext;
lineCount(yyscanner);
}
-<FuncQual>{ID} { // typically a K&R style C function
- if (yyextra->insideCS && qstrcmp(yytext,"where")==0)
+<FuncQual>{ID} {
+ if (yyextra->insideCpp && qstrcmp(yytext,"requires")==0)
+ {
+ // c++20 trailing requires clause
+ yyextra->requiresContext = YY_START;
+ yyextra->current->req+=' ';
+ BEGIN(RequiresClause);
+ }
+ else if (yyextra->insideCS && qstrcmp(yytext,"where")==0)
{
// type constraint for a method
yyextra->current->typeConstr.clear();
@@ -4737,7 +4907,7 @@ NONLopt [^\n]*
yyextra->lastCSConstraint = YY_START;
BEGIN( CSConstraintName );
}
- else if (checkForKnRstyleC(yyscanner))
+ else if (checkForKnRstyleC(yyscanner)) // K&R style C function
{
yyextra->current->args = yytext;
yyextra->oldStyleArgType.resize(0);
@@ -4755,12 +4925,12 @@ NONLopt [^\n]*
QCString doc,brief;
if (yyextra->current->doc!=yyextra->docBackup)
{
- doc=yyextra->current->doc.copy();
+ doc=yyextra->current->doc;
yyextra->current->doc=yyextra->docBackup;
}
if (yyextra->current->brief!=yyextra->briefBackup)
{
- brief=yyextra->current->brief.copy();
+ brief=yyextra->current->brief;
yyextra->current->brief=yyextra->briefBackup;
}
addKnRArgInfo(yyscanner,yyextra->oldStyleArgType+oldStyleArgPtr,
@@ -4867,7 +5037,7 @@ NONLopt [^\n]*
(!isFunction || yyextra->current->type.left(8)=="typedef "));
//printf("type=%s ts=%d te=%d ti=%d isFunction=%d\n",
- // yyextra->current->type.data(),ts,te,ti,isFunction);
+ // qPrint(yyextra->current->type),ts,te,ti,isFunction);
if (*yytext!=';' || (yyextra->current_root->section&Entry::COMPOUND_MASK) )
{
@@ -4876,7 +5046,7 @@ NONLopt [^\n]*
if (tempArg==-1) tempName=yyextra->current->name; else tempName=yyextra->current->name.left(tempArg);
if (isVariable)
{
- //printf("Scanner.l: found in class variable: '%s' '%s' '%s'\n", yyextra->current->type.data(),yyextra->current->name.data(),yyextra->current->args.data());
+ //printf("Scanner.l: found in class variable: '%s' '%s' '%s'\n", qPrint(yyextra->current->type),qPrint(yyextra->current->name),qPrint(yyextra->current->args));
if (yyextra->isTypedef && yyextra->current->type.left(8)!="typedef ")
{
yyextra->current->type.prepend("typedef ");
@@ -4885,14 +5055,14 @@ NONLopt [^\n]*
}
else
{
- //printf("Scanner.l: found in class function: '%s' '%s' '%s'\n", yyextra->current->type.data(),yyextra->current->name.data(),yyextra->current->args.data());
+ //printf("Scanner.l: found in class function: '%s' '%s' '%s'\n", qPrint(yyextra->current->type),qPrint(yyextra->current->name),qPrint(yyextra->current->args));
yyextra->current->section = Entry::FUNCTION_SEC ;
yyextra->current->proto = *yytext==';';
}
}
else // a global function prototype or function variable
{
- //printf("Scanner.l: prototype? type='%s' name='%s' args='%s'\n",yyextra->current->type.data(),yyextra->current->name.data(),yyextra->current->args.data());
+ //printf("Scanner.l: prototype? type='%s' name='%s' args='%s'\n",qPrint(yyextra->current->type),qPrint(yyextra->current->name),qPrint(yyextra->current->args));
if (isVariable)
{
if (yyextra->isTypedef && yyextra->current->type.left(8)!="typedef ")
@@ -4909,7 +5079,7 @@ NONLopt [^\n]*
yyextra->current->proto = TRUE;
}
}
- //printf("Adding entry '%s'\n",yyextra->current->name.data());
+ //printf("Adding entry '%s'\n",qPrint(yyextra->current->name));
if ( yyextra->insidePHP)
{
if (findAndRemoveWord(yyextra->current->type,"final"))
@@ -5041,7 +5211,7 @@ NONLopt [^\n]*
yyextra->docBlockInBody = FALSE;
yyextra->docBlockAutoBrief = ( yytext[yyleng-2]=='*' && Config_getBool(JAVADOC_AUTOBRIEF) ) ||
( yytext[yyleng-2]=='!' && Config_getBool(QT_AUTOBRIEF) );
- yyextra->docBlock.resize(0);
+ yyextra->docBlock.str(std::string());
yyextra->docBlockTerm = '}';
if (yytext[yyleng-3]=='/')
{
@@ -5060,7 +5230,7 @@ NONLopt [^\n]*
yyextra->docBlockInBody = FALSE;
yyextra->docBlockAutoBrief = ( yytext[yyleng-2]=='*' && Config_getBool(JAVADOC_AUTOBRIEF) ) ||
( yytext[yyleng-2]=='!' && Config_getBool(QT_AUTOBRIEF) );
- yyextra->docBlock.resize(0);
+ yyextra->docBlock.str(std::string());
yyextra->docBlockTerm = '}';
if (yytext[yyleng-3]=='/')
{
@@ -5110,12 +5280,12 @@ NONLopt [^\n]*
}
<SkipCurly,SkipCurlyCpp>{B}*{RAWBEGIN} {
QCString raw=QCString(yytext).stripWhiteSpace();
- yyextra->delimiter = raw.data()+2;
+ yyextra->delimiter = raw.mid(2);
yyextra->delimiter=yyextra->delimiter.left(yyextra->delimiter.length()-1);
yyextra->lastRawStringContext = YY_START;
yyextra->dummyRawString.resize(0);
yyextra->pCopyRawString = &yyextra->dummyRawString;
- *yyextra->pCopyRawString+=yytext;
+ *yyextra->pCopyRawString += yytext;
BEGIN(RawString);
}
<SkipCurly,SkipCurlyCpp>[^\n#"'@\\/{}<]+ {
@@ -5311,9 +5481,9 @@ NONLopt [^\n]*
// a purpose of its own
yyextra->current->name = yytext;
yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
- //printf("template class declaration for %s!\n",yyextra->current->name.data());
- QCString rn = yyextra->current_root->name.copy();
- //printf("cn='%s' rn='%s' yyextra->isTypedef=%d\n",cn.data(),rn.data(),yyextra->isTypedef);
+ //printf("template class declaration for %s!\n",qPrint(yyextra->current->name));
+ QCString rn = yyextra->current_root->name;
+ //printf("cn='%s' rn='%s' yyextra->isTypedef=%d\n",qPrint(cn),qPrint(rn),yyextra->isTypedef);
if (!yyextra->current->name.isEmpty() && !rn.isEmpty())
{
prependScope(yyscanner);
@@ -5387,6 +5557,17 @@ NONLopt [^\n]*
}
<AlignAsEnd>\n { lineCount(yyscanner); }
<AlignAsEnd>.
+<ConceptName>{ID} {
+ yyextra->current->name = yytext ;
+ }
+<ConceptName>"=" {
+ yyextra->current->bodyLine = yyextra->yyLineNr;
+ yyextra->current->bodyColumn = yyextra->yyColNr;
+ yyextra->current->initializer.str(std::string());
+ yyextra->lastInitializerContext = FindMembers;
+ yyextra->initBracketCount=0;
+ BEGIN(ReadInitializer);
+ }
<CompoundName>{SCOPENAME}/{BN}*"," { // multiple forward declarations on one line
// e.g. @protocol A,B;
yyextra->current->reset();
@@ -5659,7 +5840,7 @@ NONLopt [^\n]*
else
{
lineCount(yyscanner);
- yyextra->current->program+=yytext;
+ yyextra->current->program << yytext;
yyextra->current->fileName = yyextra->yyFileName ;
yyextra->current->startLine = yyextra->yyLineNr ;
yyextra->current->startColumn = yyextra->yyColNr;
@@ -5678,7 +5859,7 @@ NONLopt [^\n]*
else
{
lineCount(yyscanner);
- yyextra->current->program+=yytext;
+ yyextra->current->program << yytext;
yyextra->current->fileName = yyextra->yyFileName ;
yyextra->current->startLine = yyextra->yyLineNr ;
yyextra->current->startColumn = yyextra->yyColNr;
@@ -5687,7 +5868,7 @@ NONLopt [^\n]*
}
}
<CompoundName,ClassVar>{B}*"{"{B}* {
- yyextra->current->program.resize(0);
+ yyextra->current->program.str(std::string());
yyextra->current->fileName = yyextra->yyFileName ;
yyextra->current->bodyLine = yyextra->yyLineNr;
yyextra->current->bodyColumn = yyextra->yyColNr;
@@ -5940,7 +6121,7 @@ NONLopt [^\n]*
}
}
<Bases>{B}*"{"{B}* {
- yyextra->current->program.resize(0);
+ yyextra->current->program.str(std::string());
yyextra->current->fileName = yyextra->yyFileName ;
yyextra->current->bodyLine = yyextra->yyLineNr;
yyextra->current->bodyColumn = yyextra->yyColNr;
@@ -5970,24 +6151,24 @@ NONLopt [^\n]*
}
<SkipUnionSwitch>\n { lineCount(yyscanner); }
<SkipUnionSwitch>.
-<Comment>{BN}+ { yyextra->current->program += yytext ;
+<Comment>{BN}+ { yyextra->current->program << yytext ;
lineCount(yyscanner) ;
}
-<Comment>{CCS} { yyextra->current->program += yytext ; }
-<Comment>{CPPC} { yyextra->current->program += yytext ; }
+<Comment>{CCS} { yyextra->current->program << yytext ; }
+<Comment>{CPPC} { yyextra->current->program << yytext ; }
<Comment>{CMD}("code"|"verbatim") {
yyextra->insideCode=TRUE;
- yyextra->current->program += yytext ;
+ yyextra->current->program << yytext ;
}
<Comment>{CMD}("endcode"|"endverbatim") {
yyextra->insideCode=FALSE;
- yyextra->current->program += yytext ;
+ yyextra->current->program << yytext ;
}
-<Comment>[^ \.\t\r\n\/\*]+ { yyextra->current->program += yytext ; }
-<Comment>{CCE} { yyextra->current->program += yytext ;
+<Comment>[^ \.\t\r\n\/\*]+ { yyextra->current->program << yytext ; }
+<Comment>{CCE} { yyextra->current->program << yytext ;
if (!yyextra->insideCode) BEGIN( yyextra->lastContext ) ;
}
-<Comment>. { yyextra->current->program += *yytext ; }
+<Comment>. { yyextra->current->program << *yytext ; }
<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,SkipC11Inits,SkipC11Attribute,Bases,OldStyleArgs>({CPPC}{B}*)?{CCS}"!" {
//printf("Start doc block at %d\n",yyextra->yyLineNr);
@@ -6012,7 +6193,7 @@ NONLopt [^\n]*
QCString indent;
indent.fill(' ',computeIndent(yytext,yyextra->column));
- yyextra->docBlock=indent;
+ yyextra->docBlock.str(indent.str());
if (yyextra->docBlockAutoBrief)
{
@@ -6044,7 +6225,7 @@ NONLopt [^\n]*
QCString indent;
indent.fill(' ',computeIndent(yytext,yyextra->column));
- yyextra->docBlock=indent;
+ yyextra->docBlock.str(indent.str());
if (yyextra->docBlockAutoBrief)
{
@@ -6056,7 +6237,7 @@ NONLopt [^\n]*
}
else
{
- yyextra->current->program += yytext ;
+ yyextra->current->program << yytext ;
yyextra->lastContext = YY_START ;
BEGIN( Comment ) ;
}
@@ -6078,7 +6259,7 @@ NONLopt [^\n]*
QCString indent;
indent.fill(' ',computeIndent(yytext,yyextra->column));
- yyextra->docBlock=indent;
+ yyextra->docBlock.str(indent.str());
if (yyextra->docBlockAutoBrief)
{
@@ -6100,7 +6281,7 @@ NONLopt [^\n]*
QCString indent;
indent.fill(' ',computeIndent(yytext,yyextra->column));
- yyextra->docBlock=indent;
+ yyextra->docBlock.str(indent.str());
startCommentBlock(yyscanner,yyextra->current->brief.isEmpty());
BEGIN( DocLine );
@@ -6116,7 +6297,7 @@ NONLopt [^\n]*
yyextra->docBlockAutoBrief = FALSE;
QCString indent;
indent.fill(' ',computeIndent(yytext,yyextra->column));
- yyextra->docBlock=indent;
+ yyextra->docBlock.str(indent.str());
startCommentBlock(yyscanner,yyextra->current->brief.isEmpty());
BEGIN( DocLine );
}
@@ -6187,7 +6368,7 @@ NONLopt [^\n]*
// C++11 style initializer list
yyextra->current->bodyLine = yyextra->yyLineNr;
yyextra->current->bodyColumn = yyextra->yyColNr;
- yyextra->current->initializer = yytext;
+ yyextra->current->initializer.str(yytext);
yyextra->lastInitializerContext = YY_START;
yyextra->initBracketCount=1;
BEGIN(ReadInitializer);
@@ -6198,7 +6379,7 @@ NONLopt [^\n]*
<CSAccessorDecl>"}"{B}*"=" {
// fall back to next rule if it's not the right bracket
if (yyextra->curlyCount != 0) REJECT;
- yyextra->current->initializer = "=";
+ yyextra->current->initializer.str("=");
yyextra->current->endBodyLine=yyextra->yyLineNr;
yyextra->lastInitializerContext = FindMembers;
BEGIN(ReadInitializer);
@@ -6302,57 +6483,56 @@ NONLopt [^\n]*
/* ---- Single line comments ------ */
<DocLine>[^\n]*"\n"[ \t]*{CPPC}[/!][<]? { // continuation of multiline C++-style comment
- yyextra->docBlock+=yytext;
int markerLen = yytext[yyleng-1]=='<' ? 4 : 3;
- yyextra->docBlock.resize(yyextra->docBlock.length() - markerLen);
+ yyextra->docBlock << std::string(yytext).substr(0,yyleng-markerLen);
lineCount(yyscanner);
}
<DocLine>{B}*{CPPC}"/"[/]+{Bopt}/"\n" { // ignore marker line (see bug700345)
- handleCommentBlock(yyscanner,yyextra->docBlock.data(),yyextra->current->brief.isEmpty());
+ handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.isEmpty());
BEGIN( yyextra->docBlockContext );
}
<DocLine>{NONLopt}/"\n"{B}*{CPPC}[!/]{B}*{CMD}"}" { // next line is an end group marker, see bug 752712
- yyextra->docBlock+=yytext;
- handleCommentBlock(yyscanner,yyextra->docBlock.data(),yyextra->current->brief.isEmpty());
+ yyextra->docBlock << yytext;
+ handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.isEmpty());
BEGIN( yyextra->docBlockContext );
}
<DocLine>{NONLopt}/"\n" { // whole line
- yyextra->docBlock+=yytext;
- handleCommentBlock(yyscanner,yyextra->docBlock.data(),yyextra->current->brief.isEmpty());
+ yyextra->docBlock << yytext;
+ handleCommentBlock(yyscanner,yyextra->docBlock.str(),yyextra->current->brief.isEmpty());
BEGIN( yyextra->docBlockContext );
}
/* ---- Comments blocks ------ */
<DocBlock>"*"*{CCE} { // end of comment block
- handleCommentBlock(yyscanner,yyextra->docBlock.data(),FALSE);
+ handleCommentBlock(yyscanner,yyextra->docBlock.str(),FALSE);
BEGIN(yyextra->docBlockContext);
}
<DocBlock>^{B}*"*"+/[^/] {
QCString indent;
indent.fill(' ',computeIndent(yytext,yyextra->column));
- yyextra->docBlock+=indent;
+ yyextra->docBlock << indent;
}
<DocBlock>^{B}*({CPPC})?{B}*"*"+/[^/a-z_A-Z0-9*] { // start of a comment line
QCString indent;
indent.fill(' ',computeIndent(yytext,yyextra->column));
- yyextra->docBlock+=indent;
+ yyextra->docBlock << indent;
}
<DocBlock>^{B}*({CPPC}){B}* { // strip embedded C++ comments if at the start of a line
}
<DocBlock>{CPPC} { // slashes in the middle of a comment block
- yyextra->docBlock+=yytext;
+ yyextra->docBlock << yytext;
}
<DocBlock>{CCS} { // start of a new comment in the
// middle of a comment block
- yyextra->docBlock+=yytext;
+ yyextra->docBlock << yytext;
}
<DocBlock>({CMD}{CMD}){ID}/[^a-z_A-Z0-9] { // escaped command
- yyextra->docBlock+=yytext;
+ yyextra->docBlock << yytext;
}
<DocBlock>{CMD}("f$"|"f["|"f{") {
- yyextra->docBlock+=yytext;
+ yyextra->docBlock << yytext;
yyextra->docBlockName=&yytext[1];
if (yyextra->docBlockName.at(1)=='{')
{
@@ -6363,14 +6543,14 @@ NONLopt [^\n]*
BEGIN(DocCopyBlock);
}
<DocBlock>{B}*"<"{PRE}">" {
- yyextra->docBlock+=yytext;
+ yyextra->docBlock << yytext;
yyextra->docBlockName="<pre>";
yyextra->fencedSize=0;
yyextra->nestedComment=FALSE;
BEGIN(DocCopyBlock);
}
<DocBlock>{CMD}("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"code")/[^a-z_A-Z0-9\-] { // verbatim command (which could contain nested comments!)
- yyextra->docBlock+=yytext;
+ yyextra->docBlock << yytext;
yyextra->docBlockName=&yytext[1];
yyextra->fencedSize=0;
yyextra->nestedComment=FALSE;
@@ -6379,7 +6559,7 @@ NONLopt [^\n]*
<DocBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
QCString pat = substitute(yytext,"*"," ");
- yyextra->docBlock+=pat;
+ yyextra->docBlock << pat;
yyextra->docBlockName="~~~";
yyextra->fencedSize=pat.stripWhiteSpace().length();
yyextra->nestedComment=FALSE;
@@ -6387,7 +6567,7 @@ NONLopt [^\n]*
}
<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
QCString pat = substitute(yytext,"*"," ");
- yyextra->docBlock+=pat;
+ yyextra->docBlock << pat;
yyextra->docBlockName="```";
yyextra->fencedSize=pat.stripWhiteSpace().length();
yyextra->nestedComment=FALSE;
@@ -6396,7 +6576,7 @@ NONLopt [^\n]*
<DocBlock>{B}*"<code>" {
if (yyextra->insideCS)
{
- yyextra->docBlock+=yytext;
+ yyextra->docBlock << yytext;
yyextra->docBlockName="<code>";
yyextra->nestedComment=FALSE;
BEGIN(DocCopyBlock);
@@ -6407,38 +6587,38 @@ NONLopt [^\n]*
}
}
<DocBlock>[^@*~\/\\\n]+ { // any character that isn't special
- yyextra->docBlock+=yytext;
+ yyextra->docBlock << yytext;
}
<DocBlock>\n { // newline
lineCount(yyscanner);
- yyextra->docBlock+=*yytext;
+ yyextra->docBlock << *yytext;
}
<DocBlock>. { // command block
- yyextra->docBlock+=*yytext;
+ yyextra->docBlock << *yytext;
}
/* ---- Copy verbatim sections ------ */
<DocCopyBlock>"</"{PRE}">" { // end of a <pre> block
- yyextra->docBlock+=yytext;
+ yyextra->docBlock << yytext;
if (yyextra->docBlockName=="<pre>")
{
BEGIN(DocBlock);
}
}
<DocCopyBlock>"</"{CODE}">" { // end of a <code> block
- yyextra->docBlock+=yytext;
+ yyextra->docBlock << yytext;
if (yyextra->docBlockName=="<code>")
{
BEGIN(DocBlock);
}
}
<DocCopyBlock>[\\@]("f$"|"f]"|"f}") {
- yyextra->docBlock+=yytext;
+ yyextra->docBlock << yytext;
BEGIN(DocBlock);
}
<DocCopyBlock>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endcode")/[^a-z_A-Z0-9] { // end of verbatim block
- yyextra->docBlock+=yytext;
+ yyextra->docBlock << yytext;
if (&yytext[4]==yyextra->docBlockName)
{
BEGIN(DocBlock);
@@ -6457,7 +6637,7 @@ NONLopt [^\n]*
{
QCString indent;
indent.fill(' ',computeIndent(yytext,0));
- yyextra->docBlock+=indent;
+ yyextra->docBlock << indent;
}
}
<DocCopyBlock>^{B}*"*"+/{B}+"*"{BN}* { // start of a comment line with two *'s
@@ -6465,7 +6645,7 @@ NONLopt [^\n]*
{
QCString indent;
indent.fill(' ',computeIndent(yytext,0));
- yyextra->docBlock+=indent;
+ yyextra->docBlock << indent;
}
else
{
@@ -6477,7 +6657,7 @@ NONLopt [^\n]*
{
QCString indent;
indent.fill(' ',computeIndent(yytext,-1));
- yyextra->docBlock+=indent+"*";
+ yyextra->docBlock << indent+"*";
}
else
{
@@ -6491,12 +6671,12 @@ NONLopt [^\n]*
if (yyextra->nestedComment) // keep * it is part of the code
{
indent.fill(' ',computeIndent(yytext,-1));
- yyextra->docBlock+=indent+"*";
+ yyextra->docBlock << indent+"*";
}
else // remove * it is part of the comment block
{
indent.fill(' ',computeIndent(yytext,0));
- yyextra->docBlock+=indent;
+ yyextra->docBlock << indent;
}
}
else
@@ -6506,7 +6686,7 @@ NONLopt [^\n]*
}
<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
QCString pat = substitute(yytext,"*"," ");
- yyextra->docBlock+=pat;
+ yyextra->docBlock << pat;
if (yyextra->fencedSize==pat.stripWhiteSpace().length())
{
BEGIN(DocBlock);
@@ -6514,14 +6694,14 @@ NONLopt [^\n]*
}
<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
QCString pat = substitute(yytext,"*"," ");
- yyextra->docBlock+=pat;
+ yyextra->docBlock << pat;
if (yyextra->fencedSize==pat.stripWhiteSpace().length())
{
BEGIN(DocBlock);
}
}
<DocCopyBlock>[^\<@/\*\]~\$\\\n]+ { // any character that is not special
- yyextra->docBlock+=yytext;
+ yyextra->docBlock << yytext;
}
<DocCopyBlock>{CCS}|{CCE}|{CPPC} {
if (yytext[1]=='*')
@@ -6532,20 +6712,20 @@ NONLopt [^\n]*
{
yyextra->nestedComment=FALSE;
}
- yyextra->docBlock+=yytext;
+ yyextra->docBlock << yytext;
}
<DocCopyBlock>\n { // newline
- yyextra->docBlock+=*yytext;
+ yyextra->docBlock << *yytext;
lineCount(yyscanner);
}
<DocCopyBlock>. { // any other character
- yyextra->docBlock+=*yytext;
+ yyextra->docBlock << *yytext;
}
<DocCopyBlock><<EOF>> {
warn(yyextra->yyFileName,yyextra->yyLineNr,
"reached end of file while inside a '%s' block!\n"
"The command that should end the block seems to be missing!\n",
- yyextra->docBlockName.data());
+ qPrint(yyextra->docBlockName));
yyterminate();
}
@@ -6558,7 +6738,7 @@ NONLopt [^\n]*
<Prototype>"(" {
yyextra->current->args+=*yytext;
yyextra->currentArgumentContext = PrototypeQual;
- yyextra->fullArgString = yyextra->current->args.copy();
+ yyextra->fullArgString = yyextra->current->args;
yyextra->copyArgString = &yyextra->current->args;
BEGIN( ReadFuncArgType ) ;
}
@@ -6580,7 +6760,7 @@ NONLopt [^\n]*
<PrototypePtr>"(" {
yyextra->current->args+=*yytext;
yyextra->currentArgumentContext = PrototypeQual;
- yyextra->fullArgString = yyextra->current->args.copy();
+ yyextra->fullArgString = yyextra->current->args;
yyextra->copyArgString = &yyextra->current->args;
BEGIN( ReadFuncArgType ) ;
}
@@ -6868,7 +7048,7 @@ static void setContext(yyscan_t yyscanner)
yyextra->language==SrcLangExt_Lex);
//printf("setContext(%s) yyextra->insideIDL=%d yyextra->insideJava=%d yyextra->insideCS=%d "
// "yyextra->insideD=%d yyextra->insidePHP=%d yyextra->insideObjC=%d\n",
- // yyextra->yyFileName.data(),yyextra->insideIDL,yyextra->insideJava,yyextra->insideCS,yyextra->insideD,yyextra->insidePHP,yyextra->insideObjC
+ // qPrint(yyextra->yyFileName),yyextra->insideIDL,yyextra->insideJava,yyextra->insideCS,yyextra->insideD,yyextra->insidePHP,yyextra->insideObjC
// );
}
@@ -6879,7 +7059,7 @@ static void prependScope(yyscan_t yyscanner)
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
if (yyextra->current_root->section & Entry::SCOPE_MASK)
{
- //printf("--- prependScope %s to %s\n",yyextra->current_root->name.data(),yyextra->current->name.data());
+ //printf("--- prependScope %s to %s\n",qPrint(yyextra->current_root->name),qPrint(yyextra->current->name));
yyextra->current->name.prepend(yyextra->current_root->name+"::");
//printf("prependScope #=%d #yyextra->current=%d\n",yyextra->current_root->tArgLists->count(),yyextra->current->tArgLists->count());
for (const ArgumentList &srcAl : yyextra->current_root->tArgLists)
@@ -6970,7 +7150,7 @@ static void splitKnRArg(yyscan_t yyscanner,QCString &oldStyleArgPtr,QCString &ol
}
else
{
- oldStyleArgName=yyextra->current->args.copy().stripWhiteSpace();
+ oldStyleArgName=yyextra->current->args.stripWhiteSpace();
}
}
}
@@ -6986,7 +7166,7 @@ static void splitKnRArg(yyscan_t yyscanner,QCString &oldStyleArgPtr,QCString &ol
}
else
{
- oldStyleArgName=yyextra->current->args.copy().stripWhiteSpace();
+ oldStyleArgName=yyextra->current->args.stripWhiteSpace();
}
}
}
@@ -7085,7 +7265,7 @@ static void handleCommentBlock(yyscan_t yyscanner,const QCString &doc,bool brief
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
bool hideInBodyDocs = Config_getBool(HIDE_IN_BODY_DOCS);
if (yyextra->docBlockInBody && hideInBodyDocs) return;
- //printf("parseCommentBlock [%s] brief=%d\n",doc.data(),brief);
+ //printf("parseCommentBlock [%s] brief=%d\n",qPrint(doc),brief);
int lineNr = brief ? yyextra->current->briefLine : yyextra->current->docLine; // line of block start
// fill in inbodyFile && inbodyLine the first time, see bug 633891
@@ -7117,7 +7297,7 @@ static void handleCommentBlock(yyscan_t yyscanner,const QCString &doc,bool brief
)
)
{
- //printf("parseCommentBlock position=%d [%s]\n",position,doc.data()+position);
+ //printf("parseCommentBlock position=%d [%s]\n",position,qPrint(doc)+position);
if (needsEntry)
{
QCString docFile = yyextra->current->docFile;
@@ -7144,10 +7324,10 @@ static void handleParametersCommentBlocks(yyscan_t yyscanner,ArgumentList &al)
//printf(">>>>>>> handleParametersCommentBlocks()\n");
for (Argument &a : al)
{
- //printf(" Param %s docs=%s\n",a->name.data(),a->docs.data());
+ //printf(" Param %s docs=%s\n",qPrint(a->name),qPrint(a->docs));
if (!a.docs.isEmpty())
{
- if (!a.name && a.type == "...") a.name= "...";
+ if (a.name.isEmpty() && a.type == "...") a.name= "...";
int position=0;
bool needsEntry;
@@ -7160,7 +7340,7 @@ static void handleParametersCommentBlocks(yyscan_t yyscanner,ArgumentList &al)
yyextra->current->doc.resize(0);
yyextra->current->brief.resize(0);
- //printf("handleParametersCommentBlock [%s]\n",doc.data());
+ //printf("handleParametersCommentBlock [%s]\n",qPrint(doc));
while (yyextra->commentScanner.parseCommentBlock(
yyextra->thisParser,
yyextra->current.get(),
@@ -7177,7 +7357,7 @@ static void handleParametersCommentBlocks(yyscan_t yyscanner,ArgumentList &al)
)
)
{
- //printf("handleParametersCommentBlock position=%d [%s]\n",position,doc.data()+position);
+ //printf("handleParametersCommentBlock position=%d [%s]\n",position,qPrint(doc)+position);
if (needsEntry) newEntry(yyscanner);
}
if (needsEntry)
@@ -7201,18 +7381,19 @@ static void handleParametersCommentBlocks(yyscan_t yyscanner,ArgumentList &al)
static void parseCompounds(yyscan_t yyscanner,const std::shared_ptr<Entry> &rt)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
- //printf("parseCompounds(%s)\n",rt->name.data());
+ //printf("parseCompounds(%s)\n",qPrint(rt->name));
for (const auto &ce : rt->children())
{
- if (!ce->program.isEmpty())
+ if (!ce->program.empty())
{
//printf("-- %s ---------\n%s\n---------------\n",
- // ce->name.data(),ce->program.data());
+ // qPrint(ce->name),qPrint(ce->program));
// init scanner state
yyextra->padCount=0;
//depthIf = 0;
yyextra->column=0;
- yyextra->inputString = ce->program;
+ yyextra->programStr = ce->program.str();
+ yyextra->inputString = yyextra->programStr.data();
yyextra->inputPosition = 0;
if (ce->section==Entry::ENUM_SEC || (ce->spec&Entry::Enum))
BEGIN( FindFields ) ;
@@ -7282,7 +7463,7 @@ static void parseCompounds(yyscan_t yyscanner,const std::shared_ptr<Entry> &rt)
}
yyextra->mtype = Method;
yyextra->virt = Normal;
- //printf("name=%s yyextra->current->stat=%d yyextra->stat=%d\n",ce->name.data(),yyextra->current->stat,yyextra->stat);
+ //printf("name=%s yyextra->current->stat=%d yyextra->stat=%d\n",qPrint(ce->name),yyextra->current->stat,yyextra->stat);
//memberGroupId = DOX_NOGROUP;
//memberGroupRelates.resize(0);
@@ -7296,7 +7477,8 @@ static void parseCompounds(yyscan_t yyscanner,const std::shared_ptr<Entry> &rt)
yyextra->commentScanner.leaveCompound(yyextra->yyFileName,yyextra->yyLineNr,name);
- ce->program.resize(0);
+ yyextra->programStr.resize(0);
+ ce->program.str(std::string());
//if (depthIf>0)
@@ -7311,7 +7493,7 @@ static void parseCompounds(yyscan_t yyscanner,const std::shared_ptr<Entry> &rt)
//----------------------------------------------------------------------------
static void parseMain(yyscan_t yyscanner,
- const char *fileName,
+ const QCString &fileName,
const char *fileBuf,
const std::shared_ptr<Entry> &rt,
ClangTUParser *clangParser)
@@ -7337,7 +7519,7 @@ static void parseMain(yyscan_t yyscanner,
yyextra->clangParser = clangParser;
setContext(yyscanner);
rt->lang = yyextra->language;
- msg("Parsing file %s...\n",yyextra->yyFileName.data());
+ msg("Parsing file %s...\n",qPrint(yyextra->yyFileName));
yyextra->current_root = rt;
initParser(yyscanner);
@@ -7373,7 +7555,8 @@ static void parseMain(yyscan_t yyscanner,
//forceEndGroup();
yyextra->commentScanner.leaveFile(yyextra->yyFileName,yyextra->yyLineNr);
- rt->program.resize(0);
+ yyextra->programStr.resize(0);
+ rt->program.str(std::string());
parseCompounds(yyscanner,rt);
@@ -7382,7 +7565,7 @@ static void parseMain(yyscan_t yyscanner,
// add additional entries that were created during processing
for (auto &kv: yyextra->outerScopeEntries)
{
- //printf(">>> adding '%s' to scope '%s'\n",kv.second->name.data(),kv.first->name.data());
+ //printf(">>> adding '%s' to scope '%s'\n",qPrint(kv.second->name),qPrint(kv.first->name));
kv.first->moveToSubEntryAndKeep(kv.second);
}
yyextra->outerScopeEntries.clear();
@@ -7394,7 +7577,7 @@ static void parseMain(yyscan_t yyscanner,
static void parsePrototype(yyscan_t yyscanner,const QCString &text)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
- //printf("**** parsePrototype(%s) begin\n",text.data());
+ //printf("**** parsePrototype(%s) begin\n",qPrint(text));
if (text.isEmpty())
{
warn(yyextra->yyFileName,yyextra->yyLineNr,"Empty prototype found!");
@@ -7416,7 +7599,7 @@ static void parsePrototype(yyscan_t yyscanner,const QCString &text)
orgInputPosition = yyextra->inputPosition;
// set new string
- yyextra->inputString = text;
+ yyextra->inputString = text.data();
yyextra->inputPosition = 0;
yyextra->column = 0;
scannerYYrestart(0, yyscanner);
@@ -7472,19 +7655,19 @@ COutlineParser::~COutlineParser()
scannerYYlex_destroy(p->yyscanner);
}
-void COutlineParser::parseInput(const char *fileName,
- const char *fileBuf,
- const std::shared_ptr<Entry> &root,
- ClangTUParser *clangParser)
+void COutlineParser::parseInput(const QCString &fileName,
+ const char *fileBuf,
+ const std::shared_ptr<Entry> &root,
+ ClangTUParser *clangParser)
{
struct yyguts_t *yyg = (struct yyguts_t*)p->yyscanner;
yyextra->thisParser = this;
- printlex(yy_flex_debug, TRUE, __FILE__, fileName);
+ printlex(yy_flex_debug, TRUE, __FILE__, qPrint(fileName));
::parseMain(p->yyscanner,fileName,fileBuf,root,clangParser);
- printlex(yy_flex_debug, FALSE, __FILE__, fileName);
+ printlex(yy_flex_debug, FALSE, __FILE__, qPrint(fileName));
}
@@ -7498,7 +7681,7 @@ bool COutlineParser::needsPreprocessing(const QCString &extension) const
);
}
-void COutlineParser::parsePrototype(const char *text)
+void COutlineParser::parsePrototype(const QCString &text)
{
::parsePrototype(p->yyscanner,text);
}
diff --git a/src/scopedtypevariant.h b/src/scopedtypevariant.h
index d544434..a1bece7 100644
--- a/src/scopedtypevariant.h
+++ b/src/scopedtypevariant.h
@@ -18,7 +18,8 @@
#include <utility>
#include <vector>
-#include <qcstring.h>
+
+#include "qcstring.h"
#include "definition.h"
//! Class representing a local class definition found while
@@ -277,7 +278,7 @@ class CallContext
void clear()
{
m_stvList.clear();
- m_stvList.push_back(Ctx("",""));
+ m_stvList.push_back(Ctx(QCString(),QCString()));
}
const ScopedTypeVariant getScope() const
{
diff --git a/src/searchindex.cpp b/src/searchindex.cpp
index 61d2d6c..cf09e67 100644
--- a/src/searchindex.cpp
+++ b/src/searchindex.cpp
@@ -16,8 +16,7 @@
#include <ctype.h>
#include <assert.h>
-
-#include <qfile.h>
+#include <sstream>
#include "searchindex.h"
#include "config.h"
@@ -36,6 +35,8 @@
#include "resourcemgr.h"
#include "namespacedef.h"
#include "classdef.h"
+#include "utf8.h"
+#include "classlist.h"
//---------------------------------------------------------------------------------------------
// the following part is for the server based search engine
@@ -81,7 +82,7 @@ SearchIndex::SearchIndex() : SearchIndexIntf(Internal)
m_index.resize(numIndexEntries);
}
-void SearchIndex::setCurrentDoc(const Definition *ctx,const char *anchor,bool isSourceFile)
+void SearchIndex::setCurrentDoc(const Definition *ctx,const QCString &anchor,bool isSourceFile)
{
if (ctx==0) return;
assert(!isSourceFile || ctx->definitionType()==Definition::TypeFile);
@@ -89,7 +90,7 @@ void SearchIndex::setCurrentDoc(const Definition *ctx,const char *anchor,bool is
QCString url=isSourceFile ? (toFileDef(ctx))->getSourceFileBase() : ctx->getOutputFileBase();
url+=Config_getString(HTML_FILE_EXTENSION);
QCString baseUrl = url;
- if (anchor) url+=QCString("#")+anchor;
+ if (!anchor.isEmpty()) url+=QCString("#")+anchor;
if (!isSourceFile) baseUrl=url;
QCString name=ctx->qualifiedName();
if (ctx->definitionType()==Definition::TypeMember)
@@ -147,7 +148,7 @@ void SearchIndex::setCurrentDoc(const Definition *ctx,const char *anchor,bool is
case Definition::TypeGroup:
{
const GroupDef *gd = toGroupDef(ctx);
- if (gd->groupTitle())
+ if (!gd->groupTitle().isEmpty())
{
name = theTranslator->trGroup(TRUE,TRUE)+" "+gd->groupTitle();
}
@@ -175,9 +176,9 @@ void SearchIndex::setCurrentDoc(const Definition *ctx,const char *anchor,bool is
}
}
-static int charsToIndex(const char *word)
+static int charsToIndex(const QCString &word)
{
- if (word==0) return -1;
+ if (word.length()<2) return -1;
// Fast string hashing algorithm
//register ushort h=0;
@@ -190,18 +191,16 @@ static int charsToIndex(const char *word)
//return h;
// Simple hashing that allows for substring searching
- uint c1=((uchar *)word)[0];
- if (c1==0) return -1;
- uint c2=((uchar *)word)[1];
- if (c2==0) return -1;
+ uint c1=(uchar)word[0];
+ uint c2=(uchar)word[1];
return c1*256+c2;
}
-void SearchIndex::addWord(const char *word,bool hiPriority,bool recurse)
+void SearchIndex::addWord(const QCString &word,bool hiPriority,bool recurse)
{
- if (word==0 || word[0]=='\0') return;
+ if (word.isEmpty()) return;
QCString wStr = QCString(word).lower();
- //printf("SearchIndex::addWord(%s,%d) wStr=%s\n",word,hiPriority,wStr.data());
+ //printf("SearchIndex::addWord(%s,%d) wStr=%s\n",word,hiPriority,qPrint(wStr));
int idx=charsToIndex(wStr);
if (idx<0 || idx>=static_cast<int>(m_index.size())) return;
auto it = m_words.find(wStr.str());
@@ -219,7 +218,7 @@ void SearchIndex::addWord(const char *word,bool hiPriority,bool recurse)
i=getPrefixIndex(word);
if (i>0)
{
- addWord(word+i,hiPriority,TRUE);
+ addWord(word.data()+i,hiPriority,TRUE);
found=TRUE;
}
}
@@ -234,32 +233,32 @@ void SearchIndex::addWord(const char *word,bool hiPriority,bool recurse)
}
if (word[i]!=0 && i>=1)
{
- addWord(word+i+1,hiPriority,TRUE);
+ addWord(word.data()+i+1,hiPriority,TRUE);
}
}
}
-void SearchIndex::addWord(const char *word,bool hiPriority)
+void SearchIndex::addWord(const QCString &word,bool hiPriority)
{
addWord(word,hiPriority,FALSE);
}
-static void writeInt(QFile &f,size_t index)
+static void writeInt(std::ostream &f,size_t index)
{
- f.putch(static_cast<int>(index>>24));
- f.putch(static_cast<int>((index>>16)&0xff));
- f.putch(static_cast<int>((index>>8)&0xff));
- f.putch(static_cast<int>(index&0xff));
+ f.put(static_cast<int>(index>>24));
+ f.put(static_cast<int>((index>>16)&0xff));
+ f.put(static_cast<int>((index>>8)&0xff));
+ f.put(static_cast<int>(index&0xff));
}
-static void writeString(QFile &f,const char *s)
+static void writeString(std::ostream &f,const QCString &s)
{
- const char *p = s;
- while (*p) f.putch(*p++);
- f.putch(0);
+ uint l = s.length();
+ for (uint i=0;i<l;i++) f.put(s[i]);
+ f.put(0);
}
-void SearchIndex::write(const char *fileName)
+void SearchIndex::write(const QCString &fileName)
{
size_t i;
size_t size=4; // for the header
@@ -332,11 +331,11 @@ void SearchIndex::write(const char *fileName)
}
//printf("Total size %x bytes (word=%x stats=%x urls=%x)\n",size,wordsOffset,statsOffset,urlsOffset);
- QFile f(fileName);
- if (f.open(IO_WriteOnly))
+ std::ofstream f(fileName.str(),std::ofstream::out | std::ofstream::binary);
+ if (f.is_open())
{
// write header
- f.putch('D'); f.putch('O'); f.putch('X'); f.putch('S');
+ f.put('D'); f.put('O'); f.put('X'); f.put('S');
// write index
for (i=0;i<numIndexEntries;i++)
{
@@ -354,11 +353,11 @@ void SearchIndex::write(const char *fileName)
writeString(f,iw.word());
writeInt(f,wordStatOffsets[count++]);
}
- f.putch(0);
+ f.put(0);
}
}
// write extra padding bytes
- for (i=0;i<padding;i++) f.putch(0);
+ for (i=0;i<padding;i++) f.put(0);
// write word statistics
for (i=0;i<numIndexEntries;i++)
{
@@ -452,6 +451,8 @@ static QCString definitionToName(const Definition *ctx)
return "file";
case Definition::TypeNamespace:
return "namespace";
+ case Definition::TypeConcept:
+ return "concept";
case Definition::TypeGroup:
return "group";
case Definition::TypePackage:
@@ -467,12 +468,12 @@ static QCString definitionToName(const Definition *ctx)
return "unknown";
}
-void SearchIndexExternal::setCurrentDoc(const Definition *ctx,const char *anchor,bool isSourceFile)
+void SearchIndexExternal::setCurrentDoc(const Definition *ctx,const QCString &anchor,bool isSourceFile)
{
static QCString extId = stripPath(Config_getString(EXTERNAL_SEARCH_ID));
QCString baseName = isSourceFile ? (toFileDef(ctx))->getSourceFileBase() : ctx->getOutputFileBase();
QCString url = baseName + Doxygen::htmlFileExtension;
- if (anchor) url+=QCString("#")+anchor;
+ if (!anchor.isEmpty()) url+=QCString("#")+anchor;
QCString key = extId+";"+url;
auto it = p->docEntries.find(key.str());
@@ -488,54 +489,53 @@ void SearchIndexExternal::setCurrentDoc(const Definition *ctx,const char *anchor
e.extId = extId;
e.url = url;
it = p->docEntries.insert({key.str(),e}).first;
- //printf("searchIndexExt %s : %s\n",e->name.data(),e->url.data());
+ //printf("searchIndexExt %s : %s\n",qPrint(e->name),qPrint(e->url));
}
p->current = &it->second;
}
-void SearchIndexExternal::addWord(const char *word,bool hiPriority)
+void SearchIndexExternal::addWord(const QCString &word,bool hiPriority)
{
- if (word==0 || !isId(*word) || p->current==0) return;
+ if (word.isEmpty() || !isId(word[0]) || p->current==0) return;
GrowBuf *pText = hiPriority ? &p->current->importantText : &p->current->normalText;
if (pText->getPos()>0) pText->addChar(' ');
pText->addStr(word);
//printf("addWord %s\n",word);
}
-void SearchIndexExternal::write(const char *fileName)
+void SearchIndexExternal::write(const QCString &fileName)
{
- QFile f(fileName);
- if (f.open(IO_WriteOnly))
+ std::ofstream t(fileName.str(),std::ofstream::out | std::ofstream::binary);
+ if (t.is_open())
{
- FTextStream t(&f);
- t << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl;
- t << "<add>" << endl;
+ t << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
+ t << "<add>\n";
for (auto &kv : p->docEntries)
{
SearchDocEntry &doc = kv.second;
doc.normalText.addChar(0); // make sure buffer ends with a 0 terminator
doc.importantText.addChar(0); // make sure buffer ends with a 0 terminator
- t << " <doc>" << endl;
- t << " <field name=\"type\">" << doc.type << "</field>" << endl;
- t << " <field name=\"name\">" << convertToXML(doc.name) << "</field>" << endl;
+ t << " <doc>\n";
+ t << " <field name=\"type\">" << doc.type << "</field>\n";
+ t << " <field name=\"name\">" << convertToXML(doc.name) << "</field>\n";
if (!doc.args.isEmpty())
{
- t << " <field name=\"args\">" << convertToXML(doc.args) << "</field>" << endl;
+ t << " <field name=\"args\">" << convertToXML(doc.args) << "</field>\n";
}
if (!doc.extId.isEmpty())
{
- t << " <field name=\"tag\">" << convertToXML(doc.extId) << "</field>" << endl;
+ t << " <field name=\"tag\">" << convertToXML(doc.extId) << "</field>\n";
}
- t << " <field name=\"url\">" << convertToXML(doc.url) << "</field>" << endl;
- t << " <field name=\"keywords\">" << convertToXML(doc.importantText.get()) << "</field>" << endl;
- t << " <field name=\"text\">" << convertToXML(doc.normalText.get()) << "</field>" << endl;
- t << " </doc>" << endl;
+ t << " <field name=\"url\">" << convertToXML(doc.url) << "</field>\n";
+ t << " <field name=\"keywords\">" << convertToXML(doc.importantText.get()) << "</field>\n";
+ t << " <field name=\"text\">" << convertToXML(doc.normalText.get()) << "</field>\n";
+ t << " </doc>\n";
}
- t << "</add>" << endl;
+ t << "</add>\n";
}
else
{
- err("Failed to open file %s for writing!\n",fileName);
+ err("Failed to open file %s for writing!\n",qPrint(fileName));
}
}
@@ -552,29 +552,25 @@ QCString searchName(const Definition *d)
QCString searchId(const Definition *d)
{
- QCString s = searchName(d);
- int c;
- uint i;
- QCString result;
- for (i=0;i<s.length();i++)
+ std::string s = searchName(d).str();
+ TextStream t;
+ for (size_t i=0;i<s.length();i++)
{
- c=s.at(i);
- if (c>0x7f || c<0) // part of multibyte character
- {
- result+=(char)c;
- }
- else if (isalnum(c)) // simply alpha numerical character
+ if (isIdJS(s[i]))
{
- result+=(char)tolower(c);
+ t << s[i];
}
- else // other 'unprintable' characters
+ else // escape non-identifier characters
{
- char val[4];
- sprintf(val,"_%02x",(uchar)c);
- result+=val;
+ static const char *hex = "0123456789ABCDEF";
+ unsigned char uc = static_cast<unsigned char>(s[i]);
+ t << '_';
+ t << hex[uc>>4];
+ t << hex[uc&0xF];
}
}
- return result;
+
+ return convertUTF8ToLower(t.str());
}
@@ -598,6 +594,7 @@ QCString searchId(const Definition *d)
#define SEARCH_INDEX_DEFINES 17
#define SEARCH_INDEX_GROUPS 18
#define SEARCH_INDEX_PAGES 19
+#define SEARCH_INDEX_CONCEPTS 20
static std::array<SearchIndexInfo,NUM_SEARCH_INDICES> g_searchIndexInfo =
{ {
@@ -627,7 +624,8 @@ static std::array<SearchIndexInfo,NUM_SEARCH_INDICES> g_searchIndexInfo =
{ /* SEARCH_INDEX_RELATED */ "related" , []() { return theTranslator->trFriends(); }, {} },
{ /* SEARCH_INDEX_DEFINES */ "defines" , []() { return theTranslator->trDefines(); }, {} },
{ /* SEARCH_INDEX_GROUPS */ "groups" , []() { return theTranslator->trGroup(TRUE,FALSE); }, {} },
- { /* SEARCH_INDEX_PAGES */ "pages" , []() { return theTranslator->trPage(TRUE,FALSE); }, {} }
+ { /* SEARCH_INDEX_PAGES */ "pages" , []() { return theTranslator->trPage(TRUE,FALSE); }, {} },
+ { /* SEARCH_INDEX_CONCEPTS */ "concepts" , []() { return theTranslator->trConcept(true,false); }, {} }
} };
static void addMemberToSearchIndex(const MemberDef *md)
@@ -645,11 +643,10 @@ static void addMemberToSearchIndex(const MemberDef *md)
)
)
{
- QCString n = md->name();
- if (!n.isEmpty())
+ std::string n = md->name().str();
+ if (!n.empty())
{
- char letter[MAX_UTF8_CHAR_SIZE];
- getUtf8Char(n,letter,CaseModifier::ToLower);
+ std::string letter = convertUTF8ToLower(getUTF8CharAt(n,0));
bool isFriendToHide = hideFriendCompounds &&
(QCString(md->typeString())=="friend class" ||
QCString(md->typeString())=="friend struct" ||
@@ -707,11 +704,10 @@ static void addMemberToSearchIndex(const MemberDef *md)
)
)
{
- QCString n = md->name();
- if (!n.isEmpty())
+ std::string n = md->name().str();
+ if (!n.empty())
{
- char letter[MAX_UTF8_CHAR_SIZE];
- getUtf8Char(n,letter,CaseModifier::ToLower);
+ std::string letter = convertUTF8ToLower(getUTF8CharAt(n,0));
g_searchIndexInfo[SEARCH_INDEX_ALL].add(letter,md);
if (md->isFunction())
@@ -757,8 +753,7 @@ void createJavaScriptSearchIndex()
// index classes
for (const auto &cd : *Doxygen::classLinkedMap)
{
- char letter[MAX_UTF8_CHAR_SIZE];
- getUtf8Char(cd->localName(),letter,CaseModifier::ToLower);
+ std::string letter = convertUTF8ToLower(getUTF8CharAt(cd->localName().str(),0));
if (cd->isLinkable())
{
g_searchIndexInfo[SEARCH_INDEX_ALL].add(letter,cd.get());
@@ -791,8 +786,7 @@ void createJavaScriptSearchIndex()
// index namespaces
for (const auto &nd : *Doxygen::namespaceLinkedMap)
{
- char letter[MAX_UTF8_CHAR_SIZE];
- getUtf8Char(nd->name(),letter,CaseModifier::ToLower);
+ std::string letter = convertUTF8ToLower(getUTF8CharAt(nd->name().str(),0));
if (nd->isLinkable())
{
g_searchIndexInfo[SEARCH_INDEX_ALL].add(letter,nd.get());
@@ -800,13 +794,23 @@ void createJavaScriptSearchIndex()
}
}
+ // index concepts
+ for (const auto &cd : *Doxygen::conceptLinkedMap)
+ {
+ std::string letter = convertUTF8ToLower(getUTF8CharAt(cd->name().str(),0));
+ if (cd->isLinkable())
+ {
+ g_searchIndexInfo[SEARCH_INDEX_ALL].add(letter,cd.get());
+ g_searchIndexInfo[SEARCH_INDEX_CONCEPTS].add(letter,cd.get());
+ }
+ }
+
// index files
for (const auto &fn : *Doxygen::inputNameLinkedMap)
{
for (const auto &fd : *fn)
{
- char letter[MAX_UTF8_CHAR_SIZE];
- getUtf8Char(fd->name(),letter,CaseModifier::ToLower);
+ std::string letter = convertUTF8ToLower(getUTF8CharAt(fd->name().str(),0));
if (fd->isLinkable())
{
g_searchIndexInfo[SEARCH_INDEX_ALL].add(letter,fd.get());
@@ -846,11 +850,10 @@ void createJavaScriptSearchIndex()
{
if (gd->isLinkable())
{
- QCString title = gd->groupTitle();
- if (!title.isEmpty()) // TODO: able searching for all word in the title
+ std::string title = gd->groupTitle().str();
+ if (!title.empty()) // TODO: able searching for all word in the title
{
- char letter[MAX_UTF8_CHAR_SIZE];
- getUtf8Char(title,letter,CaseModifier::ToLower);
+ std::string letter = convertUTF8ToLower(getUTF8CharAt(title,0));
g_searchIndexInfo[SEARCH_INDEX_ALL].add(letter,gd.get());
g_searchIndexInfo[SEARCH_INDEX_GROUPS].add(letter,gd.get());
}
@@ -862,11 +865,10 @@ void createJavaScriptSearchIndex()
{
if (pd->isLinkable())
{
- QCString title = pd->title();
- if (!title.isEmpty())
+ std::string title = pd->title().str();
+ if (!title.empty())
{
- char letter[MAX_UTF8_CHAR_SIZE];
- getUtf8Char(title,letter,CaseModifier::ToLower);
+ std::string letter = convertUTF8ToLower(getUTF8CharAt(title,0));
g_searchIndexInfo[SEARCH_INDEX_ALL].add(letter,pd.get());
g_searchIndexInfo[SEARCH_INDEX_PAGES].add(letter,pd.get());
}
@@ -874,11 +876,10 @@ void createJavaScriptSearchIndex()
}
if (Doxygen::mainPage)
{
- QCString title = Doxygen::mainPage->title();
- if (!title.isEmpty())
+ std::string title = Doxygen::mainPage->title().str();
+ if (!title.empty())
{
- char letter[MAX_UTF8_CHAR_SIZE];
- getUtf8Char(title,letter,CaseModifier::ToLower);
+ std::string letter = convertUTF8ToLower(getUTF8CharAt(title,0));
g_searchIndexInfo[SEARCH_INDEX_ALL].add(letter,Doxygen::mainPage.get());
g_searchIndexInfo[SEARCH_INDEX_PAGES].add(letter,Doxygen::mainPage.get());
}
@@ -918,58 +919,55 @@ void writeJavaScriptSearchIndex()
QCString fileName = searchDirName + "/"+baseName+Doxygen::htmlFileExtension;
QCString dataFileName = searchDirName + "/"+baseName+".js";
- QFile outFile(fileName);
- QFile dataOutFile(dataFileName);
- if (outFile.open(IO_WriteOnly) && dataOutFile.open(IO_WriteOnly))
+ std::ofstream t(fileName.str(), std::ofstream::out | std::ofstream::binary);
+ std::ofstream ti(dataFileName.str(), std::ofstream::out | std::ofstream::binary);
+ if (t.is_open() && ti.is_open())
{
{
- FTextStream t(&outFile);
-
t << "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\""
- " \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">" << endl;
- t << "<html xmlns=\"http://www.w3.org/1999/xhtml\">" << endl;
- t << "<head><title></title>" << endl;
- t << "<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>" << endl;
- t << "<meta name=\"generator\" content=\"Doxygen " << getDoxygenVersion() << "\"/>" << endl;
- t << "<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>" << endl;
- t << "<script type=\"text/javascript\" src=\"" << baseName << ".js\"></script>" << endl;
- t << "<script type=\"text/javascript\" src=\"search.js\"></script>" << endl;
- t << "</head>" << endl;
- t << "<body class=\"SRPage\">" << endl;
- t << "<div id=\"SRIndex\">" << endl;
- t << "<div class=\"SRStatus\" id=\"Loading\">" << theTranslator->trLoading() << "</div>" << endl;
- t << "<div id=\"SRResults\"></div>" << endl; // here the results will be inserted
- t << "<script type=\"text/javascript\">" << endl;
+ " \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
+ t << "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n";
+ t << "<head><title></title>\n";
+ t << "<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n";
+ t << "<meta name=\"generator\" content=\"Doxygen " << getDoxygenVersion() << "\"/>\n";
+ t << "<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n";
+ t << "<script type=\"text/javascript\" src=\"" << baseName << ".js\"></script>\n";
+ t << "<script type=\"text/javascript\" src=\"search.js\"></script>\n";
+ t << "</head>\n";
+ t << "<body class=\"SRPage\">\n";
+ t << "<div id=\"SRIndex\">\n";
+ t << "<div class=\"SRStatus\" id=\"Loading\">" << theTranslator->trLoading() << "</div>\n";
+ t << "<div id=\"SRResults\"></div>\n"; // here the results will be inserted
+ t << "<script type=\"text/javascript\">\n";
t << "/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n";
- t << "createResults();" << endl; // this function will insert the results
+ t << "createResults();\n"; // this function will insert the results
t << "/* @license-end */\n";
- t << "</script>" << endl;
+ t << "</script>\n";
t << "<div class=\"SRStatus\" id=\"Searching\">"
- << theTranslator->trSearching() << "</div>" << endl;
+ << theTranslator->trSearching() << "</div>\n";
t << "<div class=\"SRStatus\" id=\"NoMatches\">"
- << theTranslator->trNoMatches() << "</div>" << endl;
+ << theTranslator->trNoMatches() << "</div>\n";
- t << "<script type=\"text/javascript\">" << endl;
+ t << "<script type=\"text/javascript\">\n";
t << "/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n";
- t << "document.getElementById(\"Loading\").style.display=\"none\";" << endl;
- t << "document.getElementById(\"NoMatches\").style.display=\"none\";" << endl;
- t << "var searchResults = new SearchResults(\"searchResults\");" << endl;
- t << "searchResults.Search();" << endl;
- t << "window.addEventListener(\"message\", function(event) {" << endl;
- t << " if (event.data == \"take_focus\") {" << endl;
- t << " var elem = searchResults.NavNext(0);" << endl;
- t << " if (elem) elem.focus();" << endl;
- t << " }" << endl;
- t << "});" << endl;
+ t << "document.getElementById(\"Loading\").style.display=\"none\";\n";
+ t << "document.getElementById(\"NoMatches\").style.display=\"none\";\n";
+ t << "var searchResults = new SearchResults(\"searchResults\");\n";
+ t << "searchResults.Search();\n";
+ t << "window.addEventListener(\"message\", function(event) {\n";
+ t << " if (event.data == \"take_focus\") {\n";
+ t << " var elem = searchResults.NavNext(0);\n";
+ t << " if (elem) elem.focus();\n";
+ t << " }\n";
+ t << "});\n";
t << "/* @license-end */\n";
- t << "</script>" << endl;
- t << "</div>" << endl; // SRIndex
- t << "</body>" << endl;
- t << "</html>" << endl;
+ t << "</script>\n";
+ t << "</div>\n"; // SRIndex
+ t << "</body>\n";
+ t << "</html>\n";
}
- FTextStream ti(&dataOutFile);
- ti << "var searchData=" << endl;
+ ti << "var searchData=\n";
// format
// searchData[] = array of items
// searchData[x][0] = id
@@ -980,7 +978,7 @@ void writeJavaScriptSearchIndex()
// searchData[x][1][y+1][1] = 1 => target="_parent"
// searchData[x][1][y+1][2] = scope
- ti << "[" << endl;
+ ti << "[\n";
bool firstEntry=TRUE;
int childCount=0;
@@ -997,7 +995,7 @@ void writeJavaScriptSearchIndex()
if (!firstEntry)
{
ti << "]]]";
- ti << "," << endl;
+ ti << ",\n";
}
firstEntry=FALSE;
@@ -1124,96 +1122,96 @@ void writeJavaScriptSearchIndex()
}
if (!firstEntry)
{
- ti << "]]]" << endl;
+ ti << "]]]\n";
}
- ti << "];" << endl;
+ ti << "];\n";
}
else
{
- err("Failed to open file '%s' for writing...\n",fileName.data());
+ err("Failed to open file '%s' for writing...\n",qPrint(fileName));
}
p++;
}
}
{
- QFile f(searchDirName+"/searchdata.js");
- if (f.open(IO_WriteOnly))
+ std::ofstream t(searchDirName.str()+"/searchdata.js",
+ std::ofstream::out | std::ofstream::binary);
+ if (t.is_open())
{
- FTextStream t(&f);
- t << "var indexSectionsWithContent =" << endl;
- t << "{" << endl;
+ t << "var indexSectionsWithContent =\n";
+ t << "{\n";
int j=0;
for (const auto &sii : g_searchIndexInfo)
{
if (!sii.symbolMap.empty())
{
- if (j>0) t << "," << endl;
+ if (j>0) t << ",\n";
t << " " << j << ": \"";
for (const auto &kv : sii.symbolMap)
{
if ( kv.first == "\"" ) t << "\\";
- t << kv.first.c_str();
+ t << kv.first;
}
t << "\"";
j++;
}
}
if (j>0) t << "\n";
- t << "};" << endl << endl;
- t << "var indexSectionNames =" << endl;
- t << "{" << endl;
+ t << "};\n\n";
+ t << "var indexSectionNames =\n";
+ t << "{\n";
j=0;
for (const auto &sii : g_searchIndexInfo)
{
if (!sii.symbolMap.empty())
{
- if (j>0) t << "," << endl;
+ if (j>0) t << ",\n";
t << " " << j << ": \"" << sii.name << "\"";
j++;
}
}
if (j>0) t << "\n";
- t << "};" << endl << endl;
- t << "var indexSectionLabels =" << endl;
- t << "{" << endl;
+ t << "};\n\n";
+ t << "var indexSectionLabels =\n";
+ t << "{\n";
j=0;
for (const auto &sii : g_searchIndexInfo)
{
if (!sii.symbolMap.empty())
{
- if (j>0) t << "," << endl;
+ if (j>0) t << ",\n";
t << " " << j << ": \"" << convertToXML(sii.getText()) << "\"";
j++;
}
}
if (j>0) t << "\n";
- t << "};" << endl << endl;
+ t << "};\n\n";
}
ResourceMgr::instance().copyResource("search.js",searchDirName);
}
{
- QFile f(searchDirName+"/nomatches"+Doxygen::htmlFileExtension);
- if (f.open(IO_WriteOnly))
+ QCString noMatchesFileName =searchDirName+"/nomatches"+Doxygen::htmlFileExtension;
+ std::ofstream t(noMatchesFileName.str(), std::ofstream::out | std::ofstream::binary);
+ if (t.is_open())
{
- FTextStream t(&f);
t << "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" "
- "\"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">" << endl;
- t << "<html xmlns=\"http://www.w3.org/1999/xhtml\">" << endl;
- t << "<head><title></title>" << endl;
- t << "<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>" << endl;
- t << "<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>" << endl;
- t << "<script type=\"text/javascript\" src=\"search.js\"></script>" << endl;
- t << "</head>" << endl;
- t << "<body class=\"SRPage\">" << endl;
- t << "<div id=\"SRIndex\">" << endl;
+ "\"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
+ t << "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n";
+ t << "<head><title></title>\n";
+ t << "<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n";
+ t << "<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n";
+ t << "<script type=\"text/javascript\" src=\"search.js\"></script>\n";
+ t << "</head>\n";
+ t << "<body class=\"SRPage\">\n";
+ t << "<div id=\"SRIndex\">\n";
t << "<div class=\"SRStatus\" id=\"NoMatches\">"
- << theTranslator->trNoMatches() << "</div>" << endl;
- t << "</div>" << endl;
- t << "</body>" << endl;
- t << "</html>" << endl;
+ << theTranslator->trNoMatches() << "</div>\n";
+ t << "</div>\n";
+ t << "</body>\n";
+ t << "</html>\n";
}
}
Doxygen::indexList->addStyleSheetFile("search/search.js");
@@ -1221,7 +1219,7 @@ void writeJavaScriptSearchIndex()
void SearchIndexInfo::add(const std::string &letter,const Definition *def)
{
- //printf("%p: %s->%s (full=%s)\n",this,letter.data(),searchName(def).data(),def->name().data());
+ //printf("%p: %s->%s (full=%s)\n",this,qPrint(letter),qPrint(searchName(def)),qPrint(def->name()));
auto it = symbolMap.find(letter);
if (it!=symbolMap.end())
{
diff --git a/src/searchindex.h b/src/searchindex.h
index 9039f00..893440e 100644
--- a/src/searchindex.h
+++ b/src/searchindex.h
@@ -24,7 +24,7 @@
#include <array>
#include <functional>
-#include <qcstring.h>
+#include "qcstring.h"
class Definition;
@@ -70,9 +70,9 @@ class SearchIndexIntf
enum Kind { Internal, External };
SearchIndexIntf(Kind k) : m_kind(k) {}
virtual ~SearchIndexIntf() {}
- virtual void setCurrentDoc(const Definition *ctx,const char *anchor,bool isSourceFile) = 0;
- virtual void addWord(const char *word,bool hiPriority) = 0;
- virtual void write(const char *file) = 0;
+ virtual void setCurrentDoc(const Definition *ctx,const QCString &anchor,bool isSourceFile) = 0;
+ virtual void addWord(const QCString &word,bool hiPriority) = 0;
+ virtual void write(const QCString &file) = 0;
Kind kind() const { return m_kind; }
private:
Kind m_kind;
@@ -82,11 +82,11 @@ class SearchIndex : public SearchIndexIntf
{
public:
SearchIndex();
- void setCurrentDoc(const Definition *ctx,const char *anchor,bool isSourceFile) override;
- void addWord(const char *word,bool hiPriority) override;
- void write(const char *file) override;
+ void setCurrentDoc(const Definition *ctx,const QCString &anchor,bool isSourceFile) override;
+ void addWord(const QCString &word,bool hiPriority) override;
+ void write(const QCString &file) override;
private:
- void addWord(const char *word,bool hiPrio,bool recurse);
+ void addWord(const QCString &word,bool hiPrio,bool recurse);
std::unordered_map<std::string,int> m_words;
std::vector< std::vector< IndexWord> > m_index;
std::unordered_map<std::string,int> m_url2IdMap;
@@ -100,16 +100,16 @@ class SearchIndexExternal : public SearchIndexIntf
struct Private;
public:
SearchIndexExternal();
- void setCurrentDoc(const Definition *ctx,const char *anchor,bool isSourceFile);
- void addWord(const char *word,bool hiPriority);
- void write(const char *file);
+ void setCurrentDoc(const Definition *ctx,const QCString &anchor,bool isSourceFile);
+ void addWord(const QCString &word,bool hiPriority);
+ void write(const QCString &file);
private:
std::unique_ptr<Private> p;
};
//------- client side search index ----------------------
-#define NUM_SEARCH_INDICES 20
+#define NUM_SEARCH_INDICES 21
QCString searchId(const Definition *d);
QCString searchName(const Definition *d);
diff --git a/src/section.h b/src/section.h
index 74eb04b..e5bbfc5 100644
--- a/src/section.h
+++ b/src/section.h
@@ -19,8 +19,7 @@
#include <string>
#include <unordered_map>
-#include <qcstring.h>
-
+#include "qcstring.h"
#include "linkedmap.h"
class Definition;
@@ -50,8 +49,8 @@ inline constexpr bool isSection(SectionType type)
class SectionInfo
{
public:
- SectionInfo(const char *label, const char *fileName, int lineNr,
- const char *title, SectionType type, int level,const char *ref) :
+ SectionInfo(const QCString &label, const QCString &fileName, int lineNr,
+ const QCString &title, SectionType type, int level,const QCString &ref) :
m_label(label), m_title(title), m_type(type), m_ref(ref),
m_lineNr(lineNr), m_fileName(fileName), m_level(level)
{
@@ -74,10 +73,10 @@ class SectionInfo
Definition *definition() const { return m_definition; }
// setters
- void setFileName(const char *fn) { m_fileName = fn; }
- void setType(SectionType t) { m_type = t; }
- void setGenerated(bool b) { m_generated = b; }
- void setDefinition(Definition *d) { m_definition = d; }
+ void setFileName(const QCString &fn) { m_fileName = fn; }
+ void setType(SectionType t) { m_type = t; }
+ void setGenerated(bool b) { m_generated = b; }
+ void setDefinition(Definition *d) { m_definition = d; }
private:
QCString m_label;
@@ -100,9 +99,9 @@ class SectionRefs
//! Returns a constant pointer to the section info given a section label or nullptr
//! if no section with the given label can be found.
- const SectionInfo *find(const char *label) const
+ const SectionInfo *find(const QCString &label) const
{
- auto it = m_lookup.find(label);
+ auto it = m_lookup.find(label.str());
return it!=m_lookup.end() ? it->second : nullptr;
}
@@ -131,15 +130,16 @@ class SectionManager : public LinkedMap<SectionInfo>
//! Returns a non-owning pointer to the newly added section.
SectionInfo *add(const SectionInfo &si)
{
- return LinkedMap<SectionInfo>::add(si.label(),si.fileName(),si.lineNr(),si.title(),si.type(),si.level(),si.ref());
+ return LinkedMap<SectionInfo>::add(si.label(),si.fileName(),
+ si.lineNr(),si.title(),si.type(),si.level(),si.ref());
}
//! Add a new section
//! Return a non-owning pointer to the newly added section
- SectionInfo *add(const char *label, const char *fileName, int lineNr,
- const char *title, SectionType type, int level,const char *ref=0)
+ SectionInfo *add(const QCString &label, const QCString &fileName, int lineNr,
+ const QCString &title, SectionType type, int level,const QCString &ref=QCString())
{
- return LinkedMap<SectionInfo>::add(label,fileName,lineNr,title,type,level,ref);
+ return LinkedMap<SectionInfo>::add(label.data(),fileName,lineNr,title,type,level,ref);
}
//! returns a reference to the singleton
diff --git a/src/sqlcode.h b/src/sqlcode.h
index aa465d7..64d7d06 100644
--- a/src/sqlcode.h
+++ b/src/sqlcode.h
@@ -33,11 +33,11 @@ class SQLCodeParser : public CodeParserInterface
SQLCodeParser();
virtual ~SQLCodeParser();
void parseCode(CodeOutputInterface &codeOutIntf,
- const char *scopeName,
+ const QCString &scopeName,
const QCString &input,
SrcLangExt,
bool isExampleBlock,
- const char *exampleName=0,
+ const QCString &exampleName=QCString(),
FileDef *fileDef=0,
int startLine=-1,
int endLine=-1,
diff --git a/src/sqlcode.l b/src/sqlcode.l
index b3a71d9..ffa8eaa 100644
--- a/src/sqlcode.l
+++ b/src/sqlcode.l
@@ -231,7 +231,7 @@ static void startCodeLine(yyscan_t yyscanner)
{
yyextra->currentDefinition = d;
yyextra->currentMemberDef = yyextra->sourceFileDef->getSourceMember(yyextra->yyLineNr);
- yyextra->classScope = d->name().copy();
+ yyextra->classScope = d->name();
QCString lineAnchor;
lineAnchor.sprintf("l%05d",yyextra->yyLineNr);
if (yyextra->currentMemberDef)
@@ -245,13 +245,13 @@ static void startCodeLine(yyscan_t yyscanner)
{
yyextra->code->writeLineNumber(d->getReference(),
d->getOutputFileBase(),
- 0,yyextra->yyLineNr);
+ QCString(),yyextra->yyLineNr);
setCurrentDoc(yyscanner,lineAnchor);
}
}
else
{
- yyextra->code->writeLineNumber(0,0,0,yyextra->yyLineNr);
+ yyextra->code->writeLineNumber(QCString(),QCString(),QCString(),yyextra->yyLineNr);
}
}
@@ -396,11 +396,11 @@ void SQLCodeParser::resetCodeParserState()
}
void SQLCodeParser::parseCode(CodeOutputInterface &codeOutIntf,
- const char *scopeName,
+ const QCString &scopeName,
const QCString &input,
SrcLangExt,
bool isExampleBlock,
- const char *exampleName,
+ const QCString &exampleName,
FileDef *fileDef,
int startLine,
int endLine,
@@ -416,10 +416,10 @@ void SQLCodeParser::parseCode(CodeOutputInterface &codeOutIntf,
if (input.isEmpty()) return;
- printlex(yy_flex_debug, true, __FILE__, fileDef ? fileDef->fileName().data(): NULL);
+ printlex(yy_flex_debug, true, __FILE__, fileDef ? qPrint(fileDef->fileName()): NULL);
yyextra->code = &codeOutIntf;
- yyextra->inputString = input;
+ yyextra->inputString = input.data();
yyextra->inputPosition = 0;
yyextra->currentFontClass = 0;
yyextra->needsTermination = false;
@@ -444,7 +444,7 @@ void SQLCodeParser::parseCode(CodeOutputInterface &codeOutIntf,
if (isExampleBlock && fileDef==0)
{
// create a dummy filedef for the example
- yyextra->sourceFileDef = createFileDef("",(exampleName?exampleName:"generated"));
+ yyextra->sourceFileDef = createFileDef(QCString(),!exampleName.isEmpty() ? exampleName : QCString("generated"));
cleanupSourceDef = true;
}
@@ -472,7 +472,7 @@ void SQLCodeParser::parseCode(CodeOutputInterface &codeOutIntf,
yyextra->sourceFileDef=0;
}
- printlex(yy_flex_debug, false, __FILE__, fileDef ? fileDef->fileName().data(): NULL);
+ printlex(yy_flex_debug, false, __FILE__, fileDef ? qPrint(fileDef->fileName()): NULL);
}
//---------------------------------------------------------------------------------
diff --git a/src/sqlite3gen.cpp b/src/sqlite3gen.cpp
index 222b076..7824fca 100644
--- a/src/sqlite3gen.cpp
+++ b/src/sqlite3gen.cpp
@@ -15,12 +15,13 @@
#include <stdlib.h>
#include <stdio.h>
+#include <sstream>
+
#include "settings.h"
#include "message.h"
#if USE_SQLITE3
-#include "qtbc.h"
#include "sqlite3gen.h"
#include "doxygen.h"
#include "xmlgen.h"
@@ -44,9 +45,10 @@
#include "pagedef.h"
#include "dirdef.h"
#include "section.h"
+#include "fileinfo.h"
+#include "dir.h"
#include <sys/stat.h>
-#include <qdir.h>
#include <string.h>
#include <sqlite3.h>
@@ -827,22 +829,22 @@ class TextGeneratorSqlite3Impl : public TextGeneratorIntf
{
public:
TextGeneratorSqlite3Impl(StringVector &l) : m_list(l) { }
- void writeString(const char * /*s*/,bool /*keepSpaces*/) const
+ void writeString(const QCString & /*s*/,bool /*keepSpaces*/) const
{
}
void writeBreak(int) const
{
DBG_CTX(("writeBreak\n"));
}
- void writeLink(const char * /*extRef*/,const char *file,
- const char *anchor,const char * /*text*/
+ void writeLink(const QCString & /*extRef*/,const QCString &file,
+ const QCString &anchor,const QCString & /*text*/
) const
{
- std::string rs = file;
- if (anchor)
+ std::string rs = file.str();
+ if (!anchor.isEmpty())
{
rs+="_1";
- rs+=anchor;
+ rs+=anchor.str();
}
m_list.push_back(rs);
}
@@ -852,14 +854,14 @@ class TextGeneratorSqlite3Impl : public TextGeneratorIntf
};
-static bool bindTextParameter(SqlStmt &s,const char *name,const char *value, bool _static=FALSE)
+static bool bindTextParameter(SqlStmt &s,const char *name,const QCString &value, bool _static=FALSE)
{
int idx = sqlite3_bind_parameter_index(s.stmt, name);
if (idx==0) {
err("sqlite3_bind_parameter_index(%s)[%s] failed: %s\n", name, s.query, sqlite3_errmsg(s.db));
return false;
}
- int rv = sqlite3_bind_text(s.stmt, idx, value, -1, _static==TRUE?SQLITE_STATIC:SQLITE_TRANSIENT);
+ int rv = sqlite3_bind_text(s.stmt, idx, value.data(), -1, _static==TRUE?SQLITE_STATIC:SQLITE_TRANSIENT);
if (rv!=SQLITE_OK) {
err("sqlite3_bind_text(%s)[%s] failed: %s\n", name, s.query, sqlite3_errmsg(s.db));
return false;
@@ -934,17 +936,17 @@ static void recordMetadata()
struct Refid {
int rowid;
- const char *refid;
+ QCString refid;
bool created;
};
-struct Refid insertRefid(const char *refid)
+struct Refid insertRefid(const QCString &refid)
{
- struct Refid ret;
+ Refid ret;
ret.rowid=-1;
ret.refid=refid;
ret.created = FALSE;
- if (refid==0) return ret;
+ if (refid.isEmpty()) return ret;
bindTextParameter(refid_select,":refid",refid);
ret.rowid=step(refid_select,TRUE,TRUE);
@@ -1370,9 +1372,15 @@ static void writeMemberTemplateLists(const MemberDef *md)
{
writeTemplateArgumentList(md->templateArguments(),md->getClassDef(),md->getFileDef());
}
+
static void writeTemplateList(const ClassDef *cd)
{
- writeTemplateArgumentList(cd->templateArguments(),cd,0);
+ writeTemplateArgumentList(cd->templateArguments(),cd,cd->getFileDef());
+}
+
+static void writeTemplateList(const ConceptDef *cd)
+{
+ writeTemplateArgumentList(cd->getTemplateParameterList(),cd,cd->getFileDef());
}
QCString getSQLDocBlock(const Definition *scope,
@@ -1381,9 +1389,9 @@ QCString getSQLDocBlock(const Definition *scope,
const QCString &fileName,
int lineNr)
{
- QGString s;
- if (doc.isEmpty()) return s.data();
- FTextStream t(&s);
+ if (doc.isEmpty()) return "";
+
+ TextStream t;
DocNode *root = validatingParseDoc(
fileName,
lineNr,
@@ -1399,15 +1407,15 @@ QCString getSQLDocBlock(const Definition *scope,
);
XMLCodeGenerator codeGen(t);
// create a parse tree visitor for XML
- XmlDocVisitor *visitor = new XmlDocVisitor(t,codeGen,scope?scope->getDefFileExtension():QCString(""));
+ XmlDocVisitor *visitor = new XmlDocVisitor(t,codeGen,
+ scope ? scope->getDefFileExtension() : QCString(""));
root->accept(visitor);
delete visitor;
delete root;
- QCString result = convertCharEntitiesToUTF8(s.data());
- return result.data();
+ return convertCharEntitiesToUTF8(t.str().c_str());
}
-static void getSQLDesc(SqlStmt &s,const char *col,const char *value,const Definition *def)
+static void getSQLDesc(SqlStmt &s,const char *col,const QCString &value,const Definition *def)
{
bindTextParameter(
s,
@@ -1650,7 +1658,7 @@ static void generateSqlite3ForMember(const MemberDef *md, struct Refid scope_ref
bindIntParameter(memberdef_insert,":maybevoid",md->isMaybeVoid());
bindIntParameter(memberdef_insert,":maybedefault",md->isMaybeDefault());
bindIntParameter(memberdef_insert,":maybeambiguous",md->isMaybeAmbiguous());
- if (md->bitfieldString())
+ if (!md->bitfieldString().isEmpty())
{
QCString bitfield = md->bitfieldString();
if (bitfield.at(0)==':') bitfield=bitfield.mid(1);
@@ -1715,17 +1723,17 @@ static void generateSqlite3ForMember(const MemberDef *md, struct Refid scope_ref
stripQualifiers(typeStr);
StringVector list;
linkifyText(TextGeneratorSqlite3Impl(list), def, md->getBodyDef(),md,typeStr);
- if (typeStr)
+ if (!typeStr.isEmpty())
{
bindTextParameter(memberdef_insert,":type",typeStr);
}
- if (md->definition())
+ if (!md->definition().isEmpty())
{
bindTextParameter(memberdef_insert,":definition",md->definition());
}
- if (md->argsString())
+ if (!md->argsString().isEmpty())
{
bindTextParameter(memberdef_insert,":argsstring",md->argsString());
}
@@ -1745,9 +1753,9 @@ static void generateSqlite3ForMember(const MemberDef *md, struct Refid scope_ref
if (md->getBodyDef())
{
DBG_CTX(("initializer:%s %s %s %d\n",
- md->anchor().data(),
+ qPrint(md->anchor()),
s.c_str(),
- md->getBodyDef()->getDefFileName().data(),
+ qPrint(md->getBodyDef()->getDefFileName()),
md->getStartBodyLine()));
QCString qsrc_refid = md->getOutputFileBase() + "_1" + md->anchor();
struct Refid src_refid = insertRefid(qsrc_refid);
@@ -1757,7 +1765,7 @@ static void generateSqlite3ForMember(const MemberDef *md, struct Refid scope_ref
}
}
- if ( md->getScopeString() )
+ if ( !md->getScopeString().isEmpty() )
{
bindTextParameter(memberdef_insert,":scope",md->getScopeString());
}
@@ -1802,7 +1810,7 @@ static void generateSqlite3ForMember(const MemberDef *md, struct Refid scope_ref
insertMemberFunctionParams(memberdef_id,md,def);
}
else if (md->memberType()==MemberType_Define &&
- md->argsString())
+ !md->argsString().isEmpty())
{
insertMemberDefineParams(memberdef_id,md,def);
}
@@ -1825,8 +1833,8 @@ static void generateSqlite3Section( const Definition *d,
const MemberList *ml,
struct Refid scope_refid,
const char * /*kind*/,
- const char * /*header*/=0,
- const char * /*documentation*/=0)
+ const QCString & /*header*/=QCString(),
+ const QCString & /*documentation*/=QCString())
{
if (ml==0) return;
for (const auto &md : *ml)
@@ -1933,10 +1941,10 @@ static void generateSqlite3ForClass(const ClassDef *cd)
{
insertPath(ii->fileDef->absFilePath(),!ii->fileDef->isReference());
}
- DBG_CTX(("-----> ClassDef includeInfo for %s\n", nm.data()));
+ DBG_CTX(("-----> ClassDef includeInfo for %s\n", qPrint(nm)));
DBG_CTX((" local : %d\n", ii->local));
DBG_CTX((" imported : %d\n", ii->imported));
- DBG_CTX(("header: %s\n", ii->fileDef->absFilePath().data()));
+ DBG_CTX(("header: %s\n", qPrint(ii->fileDef->absFilePath())));
DBG_CTX((" file_id : %d\n", file_id));
DBG_CTX((" header_id: %d\n", header_id));
@@ -2002,6 +2010,30 @@ static void generateSqlite3ForClass(const ClassDef *cd)
associateAllClassMembers(cd, refid);
}
+static void generateSqlite3ForConcept(const ConceptDef *cd)
+{
+ if (cd->isReference() || cd->isHidden()) return; // skip external references
+
+ struct Refid refid = insertRefid(cd->getOutputFileBase());
+ if(!refid.created && compounddefExists(refid)){return;}
+ bindIntParameter(compounddef_insert,":rowid", refid.rowid);
+ bindTextParameter(compounddef_insert,":name",cd->name());
+ bindTextParameter(compounddef_insert,":kind","concept");
+
+ int file_id = insertPath(cd->getDefFileName());
+ bindIntParameter(compounddef_insert,":file_id",file_id);
+ bindIntParameter(compounddef_insert,":line",cd->getDefLine());
+ bindIntParameter(compounddef_insert,":column",cd->getDefColumn());
+
+ getSQLDesc(compounddef_insert,":briefdescription",cd->briefDescription(),cd);
+ getSQLDesc(compounddef_insert,":detaileddescription",cd->documentation(),cd);
+
+ step(compounddef_insert);
+
+ // + template argument list(s)
+ writeTemplateList(cd);
+}
+
// kinds: constants library module namespace package
static void generateSqlite3ForNamespace(const NamespaceDef *nd)
{
@@ -2106,7 +2138,7 @@ static void generateSqlite3ForFile(const FileDef *fd)
{
// strip tagfile from path
QCString tagfile = ii.fileDef->getReference();
- dst_path = ii.fileDef->absFilePath().copy();
+ dst_path = ii.fileDef->absFilePath();
dst_path.stripPrefix(tagfile+":");
}
else
@@ -2120,12 +2152,12 @@ static void generateSqlite3ForFile(const FileDef *fd)
dst_id = insertPath(ii.includeName,ii.local,FALSE);
}
- DBG_CTX(("-----> FileDef includeInfo for %s\n", ii.includeName.data()));
+ DBG_CTX(("-----> FileDef includeInfo for %s\n", qPrint(ii.includeName)));
DBG_CTX((" local: %d\n", ii.local));
DBG_CTX((" imported: %d\n", ii.imported));
if(ii.fileDef)
{
- DBG_CTX(("include: %s\n", ii.fileDef->absFilePath().data()));
+ DBG_CTX(("include: %s\n", qPrint(ii.fileDef->absFilePath())));
}
DBG_CTX((" src_id : %d\n", src_id));
DBG_CTX((" dst_id: %d\n", dst_id));
@@ -2154,7 +2186,7 @@ static void generateSqlite3ForFile(const FileDef *fd)
{
// strip tagfile from path
QCString tagfile = ii.fileDef->getReference();
- src_path = ii.fileDef->absFilePath().copy();
+ src_path = ii.fileDef->absFilePath();
src_path.stripPrefix(tagfile+":");
}
else
@@ -2348,7 +2380,7 @@ static void generateSqlite3ForPage(const PageDef *pd,bool isExample)
{
if (mainPageHasTitle())
{
- title = filterTitle(convertCharEntitiesToUTF8(Doxygen::mainPage->title()).str());
+ title = filterTitle(convertCharEntitiesToUTF8(Doxygen::mainPage->title()));
}
else
{
@@ -2362,8 +2394,10 @@ static void generateSqlite3ForPage(const PageDef *pd,bool isExample)
{
title = si->title();
}
-
- if(!title){title = pd->title();}
+ if (title.isEmpty())
+ {
+ title = pd->title();
+ }
}
// + title
@@ -2392,7 +2426,6 @@ static sqlite3* openDbConnection()
{
QCString outputDirectory = Config_getString(SQLITE3_OUTPUT);
- QDir sqlite3Dir(outputDirectory);
sqlite3 *db;
int rc;
@@ -2403,14 +2436,14 @@ static sqlite3* openDbConnection()
return NULL;
}
- QCString dbFileName = "doxygen_sqlite3.db";
- QFileInfo fi(outputDirectory+"/"+dbFileName);
+ std::string dbFileName = "doxygen_sqlite3.db";
+ FileInfo fi(outputDirectory.str()+"/"+dbFileName);
if (fi.exists())
{
if (Config_getBool(SQLITE3_RECREATE_DB))
{
- QDir().remove(fi.absFilePath());
+ Dir().remove(fi.absFilePath());
}
else
{
@@ -2420,7 +2453,7 @@ static sqlite3* openDbConnection()
}
rc = sqlite3_open_v2(
- fi.absFilePath().utf8(),
+ fi.absFilePath().c_str(),
&db,
SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE,
0
@@ -2473,14 +2506,21 @@ void generateSqlite3()
// + classes
for (const auto &cd : *Doxygen::classLinkedMap)
{
- msg("Generating Sqlite3 output for class %s\n",cd->name().data());
+ msg("Generating Sqlite3 output for class %s\n",qPrint(cd->name()));
generateSqlite3ForClass(cd.get());
}
+ // + concepts
+ for (const auto &cd : *Doxygen::conceptLinkedMap)
+ {
+ msg("Generating Sqlite3 output for concept %s\n",qPrint(cd->name()));
+ generateSqlite3ForConcept(cd.get());
+ }
+
// + namespaces
for (const auto &nd : *Doxygen::namespaceLinkedMap)
{
- msg("Generating Sqlite3 output for namespace %s\n",nd->name().data());
+ msg("Generating Sqlite3 output for namespace %s\n",qPrint(nd->name()));
generateSqlite3ForNamespace(nd.get());
}
@@ -2489,7 +2529,7 @@ void generateSqlite3()
{
for (const auto &fd : *fn)
{
- msg("Generating Sqlite3 output for file %s\n",fd->name().data());
+ msg("Generating Sqlite3 output for file %s\n",qPrint(fd->name()));
generateSqlite3ForFile(fd.get());
}
}
@@ -2497,28 +2537,28 @@ void generateSqlite3()
// + groups
for (const auto &gd : *Doxygen::groupLinkedMap)
{
- msg("Generating Sqlite3 output for group %s\n",gd->name().data());
+ msg("Generating Sqlite3 output for group %s\n",qPrint(gd->name()));
generateSqlite3ForGroup(gd.get());
}
// + page
for (const auto &pd : *Doxygen::pageLinkedMap)
{
- msg("Generating Sqlite3 output for page %s\n",pd->name().data());
+ msg("Generating Sqlite3 output for page %s\n",qPrint(pd->name()));
generateSqlite3ForPage(pd.get(),FALSE);
}
// + dirs
for (const auto &dd : *Doxygen::dirLinkedMap)
{
- msg("Generating Sqlite3 output for dir %s\n",dd->name().data());
+ msg("Generating Sqlite3 output for dir %s\n",qPrint(dd->name()));
generateSqlite3ForDir(dd.get());
}
// + examples
for (const auto &pd : *Doxygen::exampleLinkedMap)
{
- msg("Generating Sqlite3 output for example %s\n",pd->name().data());
+ msg("Generating Sqlite3 output for example %s\n",qPrint(pd->name()));
generateSqlite3ForPage(pd.get(),TRUE);
}
diff --git a/src/stlsupport.cpp b/src/stlsupport.cpp
index 096291a..569314a 100644
--- a/src/stlsupport.cpp
+++ b/src/stlsupport.cpp
@@ -149,7 +149,7 @@ static void addSTLMember(const std::shared_ptr<Entry> &root,const char *type,con
root->moveToSubEntryAndKeep(memEntry);
}
-static void addSTLIterator(const std::shared_ptr<Entry> &classEntry,const char *name)
+static void addSTLIterator(const std::shared_ptr<Entry> &classEntry,const QCString &name)
{
std::shared_ptr<Entry> iteratorClassEntry = std::make_shared<Entry>();
iteratorClassEntry->fileName = "[STL]";
diff --git a/src/symbolmap.h b/src/symbolmap.h
index 0f837d4..a277846 100644
--- a/src/symbolmap.h
+++ b/src/symbolmap.h
@@ -36,15 +36,15 @@ class SymbolMap
using const_iterator = typename Map::const_iterator;
//! Add a symbol \a def into the map under key \a name
- void add(const char *name,Ptr def)
+ void add(const QCString &name,Ptr def)
{
- m_map.insert({std::string(name),def});
+ m_map.insert({name.str(),def});
}
//! Remove a symbol \a def from the map that was stored under key \a name
- void remove(const char *name,Ptr def)
+ void remove(const QCString &name,Ptr def)
{
- auto range = find(name);
+ auto range = find(name.str());
for (auto it=range.first; it!=range.second; )
{
if (it->second==def) it = m_map.erase(it); else ++it;
@@ -53,16 +53,16 @@ class SymbolMap
//! Find the list of symbols stored under key \a name
//! Returns a pair of iterators pointing to the start and end of the range of matching symbols
- std::pair<const_iterator,const_iterator> find(const char *name) const
+ std::pair<const_iterator,const_iterator> find(const QCString &name) const
{
- return m_map.equal_range(name ? name : "");
+ return m_map.equal_range(name.str());
}
//! Find the list of symbols stored under key \a name
//! Returns a pair of iterators pointing to the start and end of the range of matching symbols
- std::pair<iterator,iterator> find(const char *name)
+ std::pair<iterator,iterator> find(const QCString &name)
{
- return m_map.equal_range(name ? name : "");
+ return m_map.equal_range(name.str());
}
iterator begin() { return m_map.begin(); }
diff --git a/src/symbolresolver.cpp b/src/symbolresolver.cpp
index dd9e0f7..f509c7d 100644
--- a/src/symbolresolver.cpp
+++ b/src/symbolresolver.cpp
@@ -104,7 +104,7 @@ struct SymbolResolver::Private
const ClassDef *getResolvedClassRec(
const Definition *scope, // in
- const char *n, // in
+ const QCString &n, // in
const MemberDef **pTypeDef, // out
QCString *pTemplSpec, // out
QCString *pResolvedType); // out
@@ -164,14 +164,14 @@ struct SymbolResolver::Private
const ClassDef *SymbolResolver::Private::getResolvedClassRec(
const Definition *scope,
- const char *n,
+ const QCString &n,
const MemberDef **pTypeDef,
QCString *pTemplSpec,
QCString *pResolvedType)
{
- if (n==0 || *n=='\0') return 0;
+ if (n.isEmpty()) return 0;
//static int level=0;
- //fprintf(stderr,"%d [getResolvedClassRec(%s,%s)\n",level++,scope?scope->name().data():"<global>",n);
+ //fprintf(stderr,"%d [getResolvedClassRec(%s,%s)\n",level++,scope?qPrint(scope->name()):"<global>",n);
QCString name;
QCString explicitScopePart;
QCString strippedTemplateParams;
@@ -185,7 +185,7 @@ const ClassDef *SymbolResolver::Private::getResolvedClassRec(
}
int qualifierIndex = computeQualifiedIndex(name);
- //printf("name=%s qualifierIndex=%d\n",name.data(),qualifierIndex);
+ //printf("name=%s qualifierIndex=%d\n",qPrint(name),qualifierIndex);
if (qualifierIndex!=-1) // qualified name
{
// split off the explicit scope part
@@ -201,7 +201,7 @@ const ClassDef *SymbolResolver::Private::getResolvedClassRec(
return 0; // empty name
}
- //printf("Looking for symbol %s\n",name.data());
+ //printf("Looking for symbol %s\n",qPrint(name));
auto range = Doxygen::symbolMap.find(name);
// the -g (for C# generics) and -p (for ObjC protocols) are now already
// stripped from the key used in the symbolMap, so that is not needed here.
@@ -236,11 +236,11 @@ const ClassDef *SymbolResolver::Private::getResolvedClassRec(
// QCString key=scope->name()+"+"+name+"+"+explicitScopePart;
QCString key(scopeNameLen+nameLen+explicitPartLen+fileScopeLen+1);
char *pk=key.rawData();
- qstrcpy(pk,scope->name()); *(pk+scopeNameLen-1)='+';
+ qstrcpy(pk,scope->name().data()); *(pk+scopeNameLen-1)='+';
pk+=scopeNameLen;
- qstrcpy(pk,name); *(pk+nameLen-1)='+';
+ qstrcpy(pk,name.data()); *(pk+nameLen-1)='+';
pk+=nameLen;
- qstrcpy(pk,explicitScopePart);
+ qstrcpy(pk,explicitScopePart.data());
pk+=explicitPartLen;
// if a file scope is given and it contains using statements we should
@@ -252,7 +252,7 @@ const ClassDef *SymbolResolver::Private::getResolvedClassRec(
// below is a more efficient coding of
// key+="+"+m_fileScope->name();
*pk++='+';
- qstrcpy(pk,m_fileScope->absFilePath());
+ qstrcpy(pk,m_fileScope->absFilePath().data());
pk+=fileScopeLen-1;
}
*pk='\0';
@@ -261,17 +261,17 @@ const ClassDef *SymbolResolver::Private::getResolvedClassRec(
{
std::lock_guard<std::mutex> lock(g_cacheMutex);
pval=Doxygen::lookupCache->find(key.str());
- //printf("Searching for %s result=%p\n",key.data(),pval);
+ //printf("Searching for %s result=%p\n",qPrint(key),pval);
if (pval)
{
//printf("LookupInfo %p %p '%s' %p\n",
- // pval->classDef, pval->typeDef, pval->templSpec.data(),
- // pval->resolvedType.data());
+ // pval->classDef, pval->typeDef, qPrint(pval->templSpec),
+ // qPrint(pval->resolvedType));
if (pTemplSpec) *pTemplSpec=pval->templSpec;
if (pTypeDef) *pTypeDef=pval->typeDef;
if (pResolvedType) *pResolvedType=pval->resolvedType;
//fprintf(stderr,"%d ] cachedMatch=%s\n",--level,
- // pval->classDef?pval->classDef->name().data():"<none>");
+ // pval->classDef?qPrint(pval->classDef->name()):"<none>");
//if (pTemplSpec)
// printf("templSpec=%s\n",pTemplSpec->data());
return pval->classDef;
@@ -310,7 +310,7 @@ const ClassDef *SymbolResolver::Private::getResolvedClassRec(
}
//printf("getResolvedClassRec: bestMatch=%p pval->resolvedType=%s\n",
- // bestMatch,bestResolvedType.data());
+ // bestMatch,qPrint(bestResolvedType));
if (pval)
{
@@ -321,7 +321,7 @@ const ClassDef *SymbolResolver::Private::getResolvedClassRec(
pval->resolvedType = bestResolvedType;
}
//fprintf(stderr,"%d ] bestMatch=%s distance=%d\n",--level,
- // bestMatch?bestMatch->name().data():"<none>",minDistance);
+ // bestMatch?qPrint(bestMatch->name()):"<none>",minDistance);
//if (pTemplSpec)
// printf("templSpec=%s\n",pTemplSpec->data());
return bestMatch;
@@ -339,7 +339,7 @@ void SymbolResolver::Private::getResolvedSymbol(
QCString &bestResolvedType // out
)
{
- //fprintf(stderr,"getResolvedSymbol(%s,%s)\n",scope->name().data(),d->qualifiedName().data());
+ //fprintf(stderr,"getResolvedSymbol(%s,%s)\n",qPrint(scope->name()),qPrint(d->qualifiedName()));
// only look at classes and members that are enums or typedefs
if (d->definitionType()==Definition::TypeClass ||
(d->definitionType()==Definition::TypeMember &&
@@ -352,14 +352,14 @@ void SymbolResolver::Private::getResolvedSymbol(
AccessStack accessStack;
// test accessibility of definition within scope.
int distance = isAccessibleFromWithExpScope(visitedNamespaces,accessStack,scope,d,explicitScopePart);
- //fprintf(stderr," %s; distance %s (%p) is %d\n",scope->name().data(),d->name().data(),d,distance);
+ //fprintf(stderr," %s; distance %s (%p) is %d\n",qPrint(scope->name()),qPrint(d->name()),d,distance);
if (distance!=-1) // definition is accessible
{
// see if we are dealing with a class or a typedef
if (d->definitionType()==Definition::TypeClass) // d is a class
{
const ClassDef *cd = toClassDef(d);
- //printf("cd=%s\n",cd->name().data());
+ //printf("cd=%s\n",qPrint(cd->name()));
if (!cd->isTemplateArgument()) // skip classes that
// are only there to
// represent a template
@@ -425,7 +425,7 @@ void SymbolResolver::Private::getResolvedSymbol(
const ClassDef *cd = newResolveTypedef(scope,md,&enumType,&spec,&type,actTemplParams);
if (cd) // type resolves to a class
{
- //printf(" bestTypeDef=%p spec=%s type=%s\n",md,spec.data(),type.data());
+ //printf(" bestTypeDef=%p spec=%s type=%s\n",md,qPrint(spec),qPrint(type));
bestMatch = cd;
bestTypedef = md;
bestTemplSpec = spec;
@@ -483,7 +483,7 @@ void SymbolResolver::Private::getResolvedSymbol(
//printf(" Not accessible!\n");
}
} // if definition is a class or member
- //printf(" bestMatch=%p bestResolvedType=%s\n",bestMatch,bestResolvedType.data());
+ //printf(" bestMatch=%p bestResolvedType=%s\n",bestMatch,qPrint(bestResolvedType));
}
const ClassDef *SymbolResolver::Private::newResolveTypedef(
@@ -499,9 +499,9 @@ const ClassDef *SymbolResolver::Private::newResolveTypedef(
if (isCached)
{
//printf("Already cached %s->%s [%s]\n",
- // md->name().data(),
- // md->getCachedTypedefVal()?md->getCachedTypedefVal()->name().data():"<none>",
- // md->getCachedResolvedTypedef()?md->getCachedResolvedTypedef().data():"<none>");
+ // qPrint(md->name()),
+ // md->getCachedTypedefVal()?qPrint(md->getCachedTypedefVal()->name()):"<none>",
+ // md->getCachedResolvedTypedef()?qPrint(md->getCachedResolvedTypedef()):"<none>");
if (pTemplSpec) *pTemplSpec = md->getCachedTypedefTemplSpec();
if (pResolvedType) *pResolvedType = md->getCachedResolvedTypedef();
@@ -521,7 +521,7 @@ const ClassDef *SymbolResolver::Private::newResolveTypedef(
if (typeClass && typeClass->isTemplate() &&
actTemplParams && !actTemplParams->empty())
{
- type = substituteTemplateArgumentsInString(type.str(),
+ type = substituteTemplateArgumentsInString(type,
typeClass->templateArguments(),actTemplParams);
}
QCString typedefValue = type;
@@ -552,7 +552,7 @@ const ClassDef *SymbolResolver::Private::newResolveTypedef(
*pMemType = memTypeDef;
}
- //printf("type=%s result=%p\n",type.data(),result);
+ //printf("type=%s result=%p\n",qPrint(type),result);
if (result==0)
{
// try unspecialized version if type is template
@@ -605,7 +605,7 @@ done:
// introduced while parsing code fragments are being cached here.
{
//printf("setting cached typedef %p in result %p\n",md,result);
- //printf("==> %s (%s,%d)\n",result->name().data(),result->getDefFileName().data(),result->getDefLine());
+ //printf("==> %s (%s,%d)\n",qPrint(result->name()),qPrint(result->getDefFileName()),result->getDefLine());
//printf("*pResolvedType=%s\n",pResolvedType?pResolvedType->data():"<none>");
MemberDefMutable *mdm = toMemberDefMutable(md);
if (mdm)
@@ -642,19 +642,19 @@ int SymbolResolver::Private::isAccessibleFromWithExpScope(
accessStack.push(scope,m_fileScope,item,explicitScopePart);
- //printf(" <isAccessibleFromWithExpScope(%s,%s,%s)\n",scope?scope->name().data():"<global>",
- // item?item->name().data():"<none>",
- // explicitScopePart.data());
+ //printf(" <isAccessibleFromWithExpScope(%s,%s,%s)\n",scope?qPrint(scope->name()):"<global>",
+ // item?qPrint(item->name()):"<none>",
+ // qPrint(explicitScopePart));
int result=0; // assume we found it
const Definition *newScope = followPath(scope,explicitScopePart);
if (newScope) // explicitScope is inside scope => newScope is the result
{
Definition *itemScope = item->getOuterScope();
- //printf(" scope traversal successful %s<->%s!\n",itemScope->name().data(),newScope->name().data());
+ //printf(" scope traversal successful %s<->%s!\n",qPrint(itemScope->name()),qPrint(newScope->name()));
//if (newScope && newScope->definitionType()==Definition::TypeClass)
//{
// ClassDef *cd = (ClassDef *)newScope;
- // printf("---> Class %s: bases=%p\n",cd->name().data(),cd->baseClasses());
+ // printf("---> Class %s: bases=%p\n",qPrint(cd->name()),cd->baseClasses());
//}
if (itemScope==newScope) // exact match of scopes => distance==0
{
@@ -676,7 +676,7 @@ int SymbolResolver::Private::isAccessibleFromWithExpScope(
result=1;
//printf("scope(%s) is base class of newScope(%s)\n",
- // scope->name().data(),newScope->name().data());
+ // qPrint(scope->name()),qPrint(newScope->name()));
}
else
{
@@ -687,11 +687,11 @@ int SymbolResolver::Private::isAccessibleFromWithExpScope(
// this part deals with the case where item is a class
// A::B::C but is explicit referenced as A::C, where B is imported
// in A via a using directive.
- //printf("newScope is a namespace: %s!\n",newScope->name().data());
+ //printf("newScope is a namespace: %s!\n",qPrint(newScope->name()));
const NamespaceDef *nscope = toNamespaceDef(newScope);
for (const auto &cd : nscope->getUsedClasses())
{
- //printf("Trying for class %s\n",cd->name().data());
+ //printf("Trying for class %s\n",qPrint(cd->name()));
if (cd==item)
{
goto done;
@@ -701,7 +701,7 @@ int SymbolResolver::Private::isAccessibleFromWithExpScope(
{
if (visitedNamespaces.find(nd->name().str())==visitedNamespaces.end())
{
- //printf("Trying for namespace %s\n",nd->name().data());
+ //printf("Trying for namespace %s\n",qPrint(nd->name()));
i = isAccessibleFromWithExpScope(visitedNamespaces,accessStack,scope,item,nd->name());
if (i!=-1)
{
@@ -722,7 +722,7 @@ int SymbolResolver::Private::isAccessibleFromWithExpScope(
}
else // failed to resolve explicitScope
{
- //printf(" failed to resolve: scope=%s\n",scope->name().data());
+ //printf(" failed to resolve: scope=%s\n",qPrint(scope->name()));
if (scope->definitionType()==Definition::TypeNamespace)
{
const NamespaceDef *nscope = toNamespaceDef(scope);
@@ -767,28 +767,28 @@ const Definition *SymbolResolver::Private::followPath(const Definition *start,co
int l;
const Definition *current=start;
ps=0;
- //printf("followPath: start='%s' path='%s'\n",start?start->name().data():"<none>",path.data());
+ //printf("followPath: start='%s' path='%s'\n",start?qPrint(start->name()):"<none>",qPrint(path));
// for each part of the explicit scope
while ((is=getScopeFragment(path,ps,&l))!=-1)
{
// try to resolve the part if it is a typedef
const MemberDef *memTypeDef=0;
QCString qualScopePart = substTypedef(current,path.mid(is,l),&memTypeDef);
- //printf(" qualScopePart=%s\n",qualScopePart.data());
+ //printf(" qualScopePart=%s\n",qPrint(qualScopePart));
if (memTypeDef)
{
const ClassDef *type = newResolveTypedef(m_fileScope,memTypeDef,0,0,0);
if (type)
{
- //printf("Found type %s\n",type->name().data());
+ //printf("Found type %s\n",qPrint(type->name()));
return type;
}
}
const Definition *next = current->findInnerCompound(qualScopePart);
//printf("++ Looking for %s inside %s result %s\n",
- // qualScopePart.data(),
- // current->name().data(),
- // next?next->name().data():"<null>");
+ // qPrint(qualScopePart),
+ // qPrint(current->name()),
+ // next?qPrint(next->name()):"<null>");
if (next==0) // failed to follow the path
{
//printf("==> next==0!\n");
@@ -813,7 +813,7 @@ const Definition *SymbolResolver::Private::followPath(const Definition *start,co
ps=is+l;
}
//printf("followPath(start=%s,path=%s) result=%s\n",
- // start->name().data(),path.data(),current?current->name().data():"<null>");
+ // qPrint(start->name()),qPrint(path),current?qPrint(current->name()):"<null>");
return current; // path could be followed
}
@@ -836,7 +836,7 @@ bool SymbolResolver::Private::accessibleViaUsingNamespace(StringUnorderedSet &vi
{
for (const auto &und : nl) // check used namespaces for the class
{
- //printf("[Trying via used namespace %s: count=%d/%d\n",und->name().data(),
+ //printf("[Trying via used namespace %s: count=%d/%d\n",qPrint(und->name()),
// count,nl->count());
const Definition *sc = explicitScopePart.isEmpty() ? und : followPath(und,explicitScopePart);
if (sc && item->getOuterScope()==sc)
@@ -872,7 +872,7 @@ bool SymbolResolver::Private::accessibleViaUsingClass(const LinkedRefMap<const C
{
for (const auto &ucd : cl)
{
- //printf("Trying via used class %s\n",ucd->name().data());
+ //printf("Trying via used class %s\n",qPrint(ucd->name()));
const Definition *sc = explicitScopePart.isEmpty() ? ucd : followPath(ucd,explicitScopePart);
if (sc && sc==item) return true;
//printf("Try via used class done\n");
@@ -885,7 +885,7 @@ int SymbolResolver::Private::isAccessibleFrom(AccessStack &accessStack,
const Definition *item)
{
//printf("<isAccessibleFrom(scope=%s,item=%s itemScope=%s)\n",
- // scope->name().data(),item->name().data(),item->getOuterScope()->name().data());
+ // qPrint(scope->name()),qPrint(item->name()),qPrint(item->getOuterScope()->name()));
if (accessStack.find(scope,m_fileScope,item))
{
@@ -942,7 +942,7 @@ int SymbolResolver::Private::isAccessibleFrom(AccessStack &accessStack,
if (scope->definitionType()==Definition::TypeNamespace)
{
const NamespaceDef *nscope = toNamespaceDef(scope);
- //printf(" %s is namespace with %d used classes\n",nscope->name().data(),nscope->getUsedClasses());
+ //printf(" %s is namespace with %d used classes\n",qPrint(nscope->name()),nscope->getUsedClasses());
if (accessibleViaUsingClass(nscope->getUsedClasses(),item))
{
//printf("> found via used class\n");
@@ -1009,8 +1009,8 @@ QCString SymbolResolver::Private::substTypedef(
if (pTypeDef) *pTypeDef=bestMatch;
}
- //printf("substTypedef(%s,%s)=%s\n",scope?scope->name().data():"<global>",
- // name.data(),result.data());
+ //printf("substTypedef(%s,%s)=%s\n",scope?qPrint(scope->name()):"<global>",
+ // qPrint(name),qPrint(result));
return result;
}
@@ -1028,7 +1028,7 @@ SymbolResolver::~SymbolResolver()
const ClassDef *SymbolResolver::resolveClass(const Definition *scope,
- const char *name,
+ const QCString &name,
bool mayBeUnlinkable,
bool mayBeHidden)
{
@@ -1044,7 +1044,7 @@ const ClassDef *SymbolResolver::resolveClass(const Definition *scope,
scope=Doxygen::globalScope;
}
//fprintf(stderr,"------------ resolveClass(scope=%s,name=%s,mayUnlinkable=%d)\n",
- // scope?scope->name().data():"<global>",
+ // scope?qPrint(scope->name()):"<global>",
// name,
// mayBeUnlinkable
// );
@@ -1067,12 +1067,12 @@ const ClassDef *SymbolResolver::resolveClass(const Definition *scope,
{
if (!mayBeHidden || !result->isHidden())
{
- //printf("result was %s\n",result?result->name().data():"<none>");
+ //printf("result was %s\n",result?qPrint(result->name()):"<none>");
result=0; // don't link to artificial/hidden classes unless explicitly allowed
}
}
- //fprintf(stderr,"ResolvedClass(%s,%s)=%s\n",scope?scope->name().data():"<global>",
- // name,result?result->name().data():"<none>");
+ //fprintf(stderr,"ResolvedClass(%s,%s)=%s\n",scope?qPrint(scope->name()):"<global>",
+ // name,result?qPrint(result->name()):"<none>");
return result;
}
diff --git a/src/symbolresolver.h b/src/symbolresolver.h
index 5536c1e..89c3e6d 100644
--- a/src/symbolresolver.h
+++ b/src/symbolresolver.h
@@ -17,6 +17,7 @@
#define SYMBOLRESOLVER_H
#include <memory>
+
#include "qcstring.h"
#include "classdef.h"
@@ -44,7 +45,7 @@ class SymbolResolver
* getTemplateSpec(), and getResolvedType() are set as well.
*/
const ClassDef *resolveClass(const Definition *scope,
- const char *name,
+ const QCString &name,
bool maybeUnlinkable=false,
bool mayBeHidden=false);
@@ -52,7 +53,7 @@ class SymbolResolver
* the class object or a nullptr if the symbol is immutable.
*/
ClassDefMutable *resolveClassMutable(const Definition *scope,
- const char *name,
+ const QCString &name,
bool mayBeUnlinkable=false,
bool mayBeHidden=false)
{
diff --git a/src/tagreader.cpp b/src/tagreader.cpp
index 0a7c8f1..4aa59d8 100644
--- a/src/tagreader.cpp
+++ b/src/tagreader.cpp
@@ -44,32 +44,32 @@
class TagAnchorInfo
{
public:
- TagAnchorInfo(const std::string &f,
- const std::string &l,
- const std::string &t=std::string())
+ TagAnchorInfo(const QCString &f,
+ const QCString &l,
+ const QCString &t=QCString())
: label(l), fileName(f), title(t) {}
- std::string label;
- std::string fileName;
- std::string title;
+ QCString label;
+ QCString fileName;
+ QCString title;
};
/** Container for enum values that are scoped within an enum */
class TagEnumValueInfo
{
public:
- std::string name;
- std::string file;
- std::string anchor;
- std::string clangid;
+ QCString name;
+ QCString file;
+ QCString anchor;
+ QCString clangid;
};
/** Container for include info that can be read from a tagfile */
class TagIncludeInfo
{
public:
- std::string id;
- std::string name;
- std::string text;
+ QCString id;
+ QCString name;
+ QCString text;
bool isLocal;
bool isImported;
};
@@ -78,13 +78,13 @@ class TagIncludeInfo
class TagMemberInfo
{
public:
- std::string type;
- std::string name;
- std::string anchorFile;
- std::string anchor;
- std::string arglist;
- std::string kind;
- std::string clangId;
+ QCString type;
+ QCString name;
+ QCString anchorFile;
+ QCString anchor;
+ QCString arglist;
+ QCString kind;
+ QCString clangId;
std::vector<TagAnchorInfo> docAnchors;
Protection prot = Public;
Specifier virt = Normal;
@@ -96,13 +96,13 @@ class TagMemberInfo
class TagCompoundInfo
{
public:
- enum class CompoundType { Class, Namespace, Package, File, Group, Page, Dir };
+ enum class CompoundType { Class, Concept, Namespace, Package, File, Group, Page, Dir };
explicit TagCompoundInfo(CompoundType type) : m_type(type) {}
virtual ~TagCompoundInfo() {}
CompoundType compoundType() const { return m_type; }
std::vector<TagMemberInfo> members;
- std::string name;
- std::string filename;
+ QCString name;
+ QCString filename;
std::vector<TagAnchorInfo> docAnchors;
private:
CompoundType m_type;
@@ -114,8 +114,8 @@ class TagClassInfo : public TagCompoundInfo
public:
enum class Kind { None=-1, Class, Struct, Union, Interface, Exception, Protocol, Category, Enum, Service, Singleton };
TagClassInfo(Kind k) : TagCompoundInfo(CompoundType::Class), kind(k) {}
- std::string clangId;
- std::string anchor;
+ QCString clangId;
+ QCString anchor;
std::vector<BaseInfo> bases;
StringVector templateArguments;
StringVector classList;
@@ -131,13 +131,30 @@ class TagClassInfo : public TagCompoundInfo
}
};
+/** Container for concept specific info that can be read from a tagfile */
+class TagConceptInfo : public TagCompoundInfo
+{
+ public:
+ TagConceptInfo() :TagCompoundInfo(CompoundType::Concept) {}
+ QCString clangId;
+ static TagConceptInfo *get(std::unique_ptr<TagCompoundInfo> &t)
+ {
+ return dynamic_cast<TagConceptInfo*>(t.get());
+ }
+ static const TagConceptInfo *get(const std::unique_ptr<TagCompoundInfo> &t)
+ {
+ return dynamic_cast<const TagConceptInfo*>(t.get());
+ }
+};
+
/** Container for namespace specific info that can be read from a tagfile */
class TagNamespaceInfo : public TagCompoundInfo
{
public:
TagNamespaceInfo() :TagCompoundInfo(CompoundType::Namespace) {}
- std::string clangId;
+ QCString clangId;
StringVector classList;
+ StringVector conceptList;
StringVector namespaceList;
static TagNamespaceInfo *get(std::unique_ptr<TagCompoundInfo> &t)
{
@@ -170,8 +187,9 @@ class TagFileInfo : public TagCompoundInfo
{
public:
TagFileInfo() : TagCompoundInfo(CompoundType::File) { }
- std::string path;
+ QCString path;
StringVector classList;
+ StringVector conceptList;
StringVector namespaceList;
std::vector<TagIncludeInfo> includes;
static TagFileInfo *get(std::unique_ptr<TagCompoundInfo> &t)
@@ -189,9 +207,10 @@ class TagGroupInfo : public TagCompoundInfo
{
public:
TagGroupInfo() : TagCompoundInfo(CompoundType::Group) { }
- std::string title;
+ QCString title;
StringVector subgroupList;
StringVector classList;
+ StringVector conceptList;
StringVector namespaceList;
StringVector fileList;
StringVector pageList;
@@ -211,7 +230,7 @@ class TagPageInfo : public TagCompoundInfo
{
public:
TagPageInfo() : TagCompoundInfo(CompoundType::Page) {}
- std::string title;
+ QCString title;
static TagPageInfo *get(std::unique_ptr<TagCompoundInfo> &t)
{
return dynamic_cast<TagPageInfo*>(t.get());
@@ -227,7 +246,7 @@ class TagDirInfo : public TagCompoundInfo
{
public:
TagDirInfo() : TagCompoundInfo(CompoundType::Dir) {}
- std::string path;
+ QCString path;
StringVector subdirList;
StringVector fileList;
static TagDirInfo *get(std::unique_ptr<TagCompoundInfo> &t)
@@ -261,12 +280,12 @@ class TagFileParser
m_state = Invalid;
}
- void startElement( const std::string &name, const XMLHandlers::Attributes& attrib );
- void endElement( const std::string &name );
- void characters ( const std::string & ch ) { m_curString+=ch; }
- void error( const std::string &fileName,int lineNr,const std::string &msg)
+ void startElement( const QCString &name, const XMLHandlers::Attributes& attrib );
+ void endElement( const QCString &name );
+ void characters ( const QCString & ch ) { m_curString+=ch; }
+ void error( const QCString &fileName,int lineNr,const QCString &msg)
{
- ::warn(fileName.c_str(),lineNr,"%s",msg.c_str());
+ ::warn(fileName,lineNr,"%s",qPrint(msg));
}
void dump();
@@ -279,6 +298,7 @@ class TagFileParser
switch (m_state)
{
case InClass:
+ case InConcept:
case InFile:
case InNamespace:
case InGroup:
@@ -297,9 +317,9 @@ class TagFileParser
{
m_curMember = TagMemberInfo();
m_curMember.kind = XMLHandlers::value(attrib,"kind");
- std::string protStr = XMLHandlers::value(attrib,"protection");
- std::string virtStr = XMLHandlers::value(attrib,"virtualness");
- std::string staticStr = XMLHandlers::value(attrib,"static");
+ QCString protStr = XMLHandlers::value(attrib,"protection");
+ QCString virtStr = XMLHandlers::value(attrib,"virtualness");
+ QCString staticStr = XMLHandlers::value(attrib,"static");
if (protStr=="protected")
{
m_curMember.prot = Protected;
@@ -363,7 +383,7 @@ class TagFileParser
void endEnumValue()
{
- m_curEnumValue.name = QCString(m_curString).stripWhiteSpace();
+ m_curEnumValue.name = QCString(m_curString).stripWhiteSpace().str();
m_state = m_stateStack.top();
m_stateStack.pop();
if (m_state==InMember)
@@ -379,6 +399,7 @@ class TagFileParser
switch(m_state)
{
case InClass:
+ case InConcept:
case InFile:
case InNamespace:
case InGroup:
@@ -386,7 +407,7 @@ class TagFileParser
case InMember:
case InPackage:
case InDir:
- if (m_curString.rfind("autotoc_md",0)==0) return;
+ if (m_curString.right(10)=="autotoc_md") return;
break;
default:
warn("Unexpected tag 'docanchor' found");
@@ -395,6 +416,7 @@ class TagFileParser
switch(m_state)
{
case InClass:
+ case InConcept:
case InFile:
case InNamespace:
case InGroup:
@@ -415,19 +437,19 @@ class TagFileParser
switch(m_state)
{
case InClass:
- TagClassInfo::get(m_curCompound)->classList.push_back(m_curString);
+ TagClassInfo::get(m_curCompound)->classList.push_back(m_curString.str());
break;
case InFile:
- TagFileInfo::get(m_curCompound)->classList.push_back(m_curString);
+ TagFileInfo::get(m_curCompound)->classList.push_back(m_curString.str());
break;
case InNamespace:
- TagNamespaceInfo::get(m_curCompound)->classList.push_back(m_curString);
+ TagNamespaceInfo::get(m_curCompound)->classList.push_back(m_curString.str());
break;
case InGroup:
- TagGroupInfo::get(m_curCompound)->classList.push_back(m_curString);
+ TagGroupInfo::get(m_curCompound)->classList.push_back(m_curString.str());
break;
case InPackage:
- TagPackageInfo::get(m_curCompound)->classList.push_back(m_curString);
+ TagPackageInfo::get(m_curCompound)->classList.push_back(m_curString.str());
break;
default:
warn("Unexpected tag 'class' found");
@@ -435,18 +457,37 @@ class TagFileParser
}
}
+ void endConcept()
+ {
+ switch(m_state)
+ {
+ case InNamespace:
+ TagNamespaceInfo::get(m_curCompound)->conceptList.push_back(m_curString.str());
+ break;
+ case InFile:
+ TagFileInfo::get(m_curCompound)->conceptList.push_back(m_curString.str());
+ break;
+ case InGroup:
+ TagGroupInfo::get(m_curCompound)->conceptList.push_back(m_curString.str());
+ break;
+ default:
+ warn("Unexpected tag 'concept' found");
+ break;
+ }
+ }
+
void endNamespace()
{
switch(m_state)
{
case InNamespace:
- TagNamespaceInfo::get(m_curCompound)->namespaceList.push_back(m_curString);
+ TagNamespaceInfo::get(m_curCompound)->namespaceList.push_back(m_curString.str());
break;
case InFile:
- TagFileInfo::get(m_curCompound)->namespaceList.push_back(m_curString);
+ TagFileInfo::get(m_curCompound)->namespaceList.push_back(m_curString.str());
break;
case InGroup:
- TagGroupInfo::get(m_curCompound)->namespaceList.push_back(m_curString);
+ TagGroupInfo::get(m_curCompound)->namespaceList.push_back(m_curString.str());
break;
default:
warn("Unexpected tag 'namespace' found");
@@ -459,10 +500,10 @@ class TagFileParser
switch(m_state)
{
case InGroup:
- TagGroupInfo::get(m_curCompound)->fileList.push_back(m_curString);
+ TagGroupInfo::get(m_curCompound)->fileList.push_back(m_curString.str());
break;
case InDir:
- TagDirInfo::get(m_curCompound)->fileList.push_back(m_curString);
+ TagDirInfo::get(m_curCompound)->fileList.push_back(m_curString.str());
break;
default:
warn("Unexpected tag 'file' found");
@@ -475,7 +516,7 @@ class TagFileParser
switch(m_state)
{
case InGroup:
- TagGroupInfo::get(m_curCompound)->fileList.push_back(m_curString);
+ TagGroupInfo::get(m_curCompound)->fileList.push_back(m_curString.str());
break;
default:
warn("Unexpected tag 'page' found");
@@ -488,7 +529,7 @@ class TagFileParser
switch(m_state)
{
case InDir:
- TagDirInfo::get(m_curCompound)->subdirList.push_back(m_curString);
+ TagDirInfo::get(m_curCompound)->subdirList.push_back(m_curString.str());
break;
default:
warn("Unexpected tag 'dir' found");
@@ -525,6 +566,7 @@ class TagFileParser
switch (m_state)
{
case InClass:
+ case InConcept:
case InFile:
case InNamespace:
case InGroup:
@@ -547,8 +589,8 @@ class TagFileParser
m_curString="";
if (m_state==InClass && m_curCompound)
{
- std::string protStr = XMLHandlers::value(attrib,"protection");
- std::string virtStr = XMLHandlers::value(attrib,"virtualness");
+ QCString protStr = XMLHandlers::value(attrib,"protection");
+ QCString virtStr = XMLHandlers::value(attrib,"virtualness");
Protection prot = Public;
Specifier virt = Normal;
if (protStr=="protected")
@@ -563,7 +605,7 @@ class TagFileParser
{
virt = Virtual;
}
- TagClassInfo::get(m_curCompound)->bases.push_back(BaseInfo(m_curString.c_str(),prot,virt));
+ TagClassInfo::get(m_curCompound)->bases.push_back(BaseInfo(m_curString,prot,virt));
}
else
{
@@ -610,7 +652,7 @@ class TagFileParser
{
if (m_state==InClass && m_curCompound)
{
- TagClassInfo::get(m_curCompound)->templateArguments.push_back(m_curString);
+ TagClassInfo::get(m_curCompound)->templateArguments.push_back(m_curString.str());
}
else
{
@@ -623,6 +665,7 @@ class TagFileParser
switch (m_state)
{
case InClass:
+ case InConcept:
case InNamespace:
case InFile:
case InGroup:
@@ -735,7 +778,7 @@ class TagFileParser
{
if (m_state==InGroup)
{
- TagGroupInfo::get(m_curCompound)->subgroupList.push_back(m_curString);
+ TagGroupInfo::get(m_curCompound)->subgroupList.push_back(m_curString.str());
}
else
{
@@ -757,6 +800,7 @@ class TagFileParser
enum State { Invalid,
InClass,
+ InConcept,
InFile,
InNamespace,
InGroup,
@@ -771,14 +815,14 @@ class TagFileParser
void warn(const char *fmt)
{
- std::string fileName = m_locator->fileName();
- ::warn(fileName.c_str(),m_locator->lineNr(),"%s", fmt);
+ QCString fileName = m_locator->fileName();
+ ::warn(fileName,m_locator->lineNr(),"%s", fmt);
}
void warn(const char *fmt,const char *s)
{
- std::string fileName = m_locator->fileName();
- ::warn(fileName.c_str(),m_locator->lineNr(),fmt,s);
+ QCString fileName = m_locator->fileName();
+ ::warn(fileName,m_locator->lineNr(),fmt,s);
}
@@ -791,10 +835,10 @@ class TagFileParser
TagEnumValueInfo m_curEnumValue;
TagIncludeInfo m_curIncludes;
- std::string m_curString;
- std::string m_tagName;
- std::string m_fileName;
- std::string m_title;
+ QCString m_curString;
+ QCString m_tagName;
+ QCString m_fileName;
+ QCString m_title;
State m_state = Invalid;
std::stack<State> m_stateStack;
const XMLLocator *m_locator = nullptr;
@@ -839,6 +883,7 @@ static const std::map< std::string, ElementCallbacks > g_elementHandlers =
{ "title", { startCb(&TagFileParser::startStringValue ), endCb(&TagFileParser::endTitle ) } },
{ "subgroup", { startCb(&TagFileParser::startStringValue ), endCb(&TagFileParser::endSubgroup ) } },
{ "class", { startCb(&TagFileParser::startStringValue ), endCb(&TagFileParser::endClass ) } },
+ { "concept", { startCb(&TagFileParser::startStringValue ), endCb(&TagFileParser::endConcept ) } },
{ "namespace", { startCb(&TagFileParser::startStringValue ), endCb(&TagFileParser::endNamespace ) } },
{ "file", { startCb(&TagFileParser::startStringValue ), endCb(&TagFileParser::endFile ) } },
{ "dir", { startCb(&TagFileParser::startStringValue ), endCb(&TagFileParser::endDir ) } },
@@ -874,6 +919,7 @@ static const std::map< std::string, CompoundFactory > g_compoundFactory =
{ "singleton", { TagFileParser::InClass, []() { return std::make_unique<TagClassInfo>(TagClassInfo::Kind::Singleton); } } },
{ "file", { TagFileParser::InFile, []() { return std::make_unique<TagFileInfo>(); } } },
{ "namespace", { TagFileParser::InNamespace, []() { return std::make_unique<TagNamespaceInfo>(); } } },
+ { "concept", { TagFileParser::InConcept, []() { return std::make_unique<TagConceptInfo>(); } } },
{ "group", { TagFileParser::InGroup, []() { return std::make_unique<TagGroupInfo>(); } } },
{ "page", { TagFileParser::InPage, []() { return std::make_unique<TagPageInfo>(); } } },
{ "package", { TagFileParser::InPackage, []() { return std::make_unique<TagPackageInfo>(); } } },
@@ -882,31 +928,31 @@ static const std::map< std::string, CompoundFactory > g_compoundFactory =
//---------------------------------------------------------------------------------------------------------------
-void TagFileParser::startElement( const std::string &name, const XMLHandlers::Attributes& attrib )
+void TagFileParser::startElement( const QCString &name, const XMLHandlers::Attributes& attrib )
{
- //printf("startElement '%s'\n",name.data());
- auto it = g_elementHandlers.find(name);
+ //printf("startElement '%s'\n",qPrint(name));
+ auto it = g_elementHandlers.find(name.str());
if (it!=std::end(g_elementHandlers))
{
it->second.startCb(*this,attrib);
}
else
{
- warn("Unknown start tag '%s' found!",name.data());
+ warn("Unknown start tag '%s' found!",qPrint(name));
}
}
-void TagFileParser::endElement( const std::string &name )
+void TagFileParser::endElement( const QCString &name )
{
- //printf("endElement '%s'\n",name.data());
- auto it = g_elementHandlers.find(name);
+ //printf("endElement '%s'\n",qPrint(name));
+ auto it = g_elementHandlers.find(name.str());
if (it!=std::end(g_elementHandlers))
{
it->second.endCb(*this);
}
else
{
- warn("Unknown end tag '%s' found!",name.data());
+ warn("Unknown end tag '%s' found!",qPrint(name));
}
}
@@ -945,23 +991,34 @@ void TagFileParser::dump()
if (comp->compoundType()==TagCompoundInfo::CompoundType::Class)
{
const TagClassInfo *cd = TagClassInfo::get(comp);
- msg("class '%s'\n",cd->name.data());
- msg(" filename '%s'\n",cd->filename.data());
+ msg("class '%s'\n",qPrint(cd->name));
+ msg(" filename '%s'\n",qPrint(cd->filename));
for (const BaseInfo &bi : cd->bases)
{
- msg( " base: %s \n", bi.name.data() );
+ msg( " base: %s \n", bi.name.isEmpty() ? "" : qPrint(bi.name) );
}
for (const auto &md : cd->members)
{
msg(" member:\n");
- msg(" kind: '%s'\n",md.kind.data());
- msg(" name: '%s'\n",md.name.data());
- msg(" anchor: '%s'\n",md.anchor.data());
- msg(" arglist: '%s'\n",md.arglist.data());
+ msg(" kind: '%s'\n",qPrint(md.kind));
+ msg(" name: '%s'\n",qPrint(md.name));
+ msg(" anchor: '%s'\n",qPrint(md.anchor));
+ msg(" arglist: '%s'\n",qPrint(md.arglist));
}
}
}
+ //============== CONCEPTS
+ for (const auto &comp : m_tagFileCompounds)
+ {
+ if (comp->compoundType()==TagCompoundInfo::CompoundType::Concept)
+ {
+ const TagConceptInfo *cd = TagConceptInfo::get(comp);
+
+ msg("concept '%s'\n",qPrint(cd->name));
+ msg(" filename '%s'\n",qPrint(cd->filename));
+ }
+ }
//============== NAMESPACES
for (const auto &comp : m_tagFileCompounds)
{
@@ -969,8 +1026,8 @@ void TagFileParser::dump()
{
const TagNamespaceInfo *nd = TagNamespaceInfo::get(comp);
- msg("namespace '%s'\n",nd->name.data());
- msg(" filename '%s'\n",nd->filename.data());
+ msg("namespace '%s'\n",qPrint(nd->name));
+ msg(" filename '%s'\n",qPrint(nd->filename));
for (const auto &cls : nd->classList)
{
msg( " class: %s \n", cls.c_str() );
@@ -979,10 +1036,10 @@ void TagFileParser::dump()
for (const auto &md : nd->members)
{
msg(" member:\n");
- msg(" kind: '%s'\n",md.kind.data());
- msg(" name: '%s'\n",md.name.data());
- msg(" anchor: '%s'\n",md.anchor.data());
- msg(" arglist: '%s'\n",md.arglist.data());
+ msg(" kind: '%s'\n",qPrint(md.kind));
+ msg(" name: '%s'\n",qPrint(md.name));
+ msg(" anchor: '%s'\n",qPrint(md.anchor));
+ msg(" arglist: '%s'\n",qPrint(md.arglist));
}
}
}
@@ -994,8 +1051,8 @@ void TagFileParser::dump()
{
const TagFileInfo *fd = TagFileInfo::get(comp);
- msg("file '%s'\n",fd->name.data());
- msg(" filename '%s'\n",fd->filename.data());
+ msg("file '%s'\n",qPrint(fd->name));
+ msg(" filename '%s'\n",qPrint(fd->filename));
for (const auto &ns : fd->namespaceList)
{
msg( " namespace: %s \n", ns.c_str() );
@@ -1008,15 +1065,15 @@ void TagFileParser::dump()
for (const auto &md : fd->members)
{
msg(" member:\n");
- msg(" kind: '%s'\n",md.kind.data());
- msg(" name: '%s'\n",md.name.data());
- msg(" anchor: '%s'\n",md.anchor.data());
- msg(" arglist: '%s'\n",md.arglist.data());
+ msg(" kind: '%s'\n",qPrint(md.kind));
+ msg(" name: '%s'\n",qPrint(md.name));
+ msg(" anchor: '%s'\n",qPrint(md.anchor));
+ msg(" arglist: '%s'\n",qPrint(md.arglist));
}
for (const auto &ii : fd->includes)
{
- msg(" includes id: %s name: %s\n",ii.id.data(),ii.name.data());
+ msg(" includes id: %s name: %s\n",qPrint(ii.id),qPrint(ii.name));
}
}
}
@@ -1027,8 +1084,8 @@ void TagFileParser::dump()
if (comp->compoundType()==TagCompoundInfo::CompoundType::Group)
{
const TagGroupInfo *gd = TagGroupInfo::get(comp);
- msg("group '%s'\n",gd->name.data());
- msg(" filename '%s'\n",gd->filename.data());
+ msg("group '%s'\n",qPrint(gd->name));
+ msg(" filename '%s'\n",qPrint(gd->filename));
for (const auto &ns : gd->namespaceList)
{
@@ -1054,10 +1111,10 @@ void TagFileParser::dump()
for (const auto &md : gd->members)
{
msg(" member:\n");
- msg(" kind: '%s'\n",md.kind.data());
- msg(" name: '%s'\n",md.name.data());
- msg(" anchor: '%s'\n",md.anchor.data());
- msg(" arglist: '%s'\n",md.arglist.data());
+ msg(" kind: '%s'\n",qPrint(md.kind));
+ msg(" name: '%s'\n",qPrint(md.name));
+ msg(" anchor: '%s'\n",qPrint(md.anchor));
+ msg(" arglist: '%s'\n",qPrint(md.arglist));
}
}
}
@@ -1068,9 +1125,9 @@ void TagFileParser::dump()
if (comp->compoundType()==TagCompoundInfo::CompoundType::Page)
{
const TagPageInfo *pd = TagPageInfo::get(comp);
- msg("page '%s'\n",pd->name.data());
- msg(" title '%s'\n",pd->title.data());
- msg(" filename '%s'\n",pd->filename.data());
+ msg("page '%s'\n",qPrint(pd->name));
+ msg(" title '%s'\n",qPrint(pd->title));
+ msg(" filename '%s'\n",qPrint(pd->filename));
}
}
@@ -1081,8 +1138,8 @@ void TagFileParser::dump()
{
const TagDirInfo *dd = TagDirInfo::get(comp);
{
- msg("dir '%s'\n",dd->name.data());
- msg(" path '%s'\n",dd->path.data());
+ msg("dir '%s'\n",qPrint(dd->name));
+ msg(" path '%s'\n",qPrint(dd->path));
for (const auto &fi : dd->fileList)
{
msg( " file: %s \n", fi.c_str() );
@@ -1100,18 +1157,18 @@ void TagFileParser::addDocAnchors(const std::shared_ptr<Entry> &e,const std::vec
{
for (const auto &ta : l)
{
- if (SectionManager::instance().find(ta.label.c_str())==0)
+ if (SectionManager::instance().find(QCString(ta.label))==0)
{
//printf("New sectionInfo file=%s anchor=%s\n",
- // ta->fileName.data(),ta->label.data());
+ // qPrint(ta->fileName),qPrint(ta->label));
SectionInfo *si=SectionManager::instance().add(
- ta.label.c_str(),ta.fileName.c_str(),-1,ta.title.c_str(),
- SectionType::Anchor,0,m_tagName.c_str());
+ ta.label,ta.fileName,-1,ta.title,
+ SectionType::Anchor,0,m_tagName);
e->anchors.push_back(si);
}
else
{
- warn("Duplicate anchor %s found",ta.label.data());
+ warn("Duplicate anchor %s found",qPrint(ta.label));
}
}
}
@@ -1230,19 +1287,6 @@ void TagFileParser::buildMemberList(const std::shared_ptr<Entry> &ce,const std::
}
}
-static QCString stripPath(const QCString &s)
-{
- int i=s.findRev('/');
- if (i!=-1)
- {
- return s.right(s.length()-i-1);
- }
- else
- {
- return s;
- }
-}
-
/*! Injects the info gathered by the XML parser into the Entry tree.
* This tree contains the information extracted from the input in a
* "unrelated" form.
@@ -1313,28 +1357,28 @@ void TagFileParser::buildLists(const std::shared_ptr<Entry> &root)
const TagFileInfo *tfi = TagFileInfo::get(comp);
std::shared_ptr<Entry> fe = std::make_shared<Entry>();
- fe->section = guessSection(tfi->name.c_str());
- fe->name = tfi->name.c_str();
+ fe->section = guessSection(tfi->name);
+ fe->name = tfi->name;
addDocAnchors(fe,tfi->docAnchors);
fe->tagInfoData.tagName = m_tagName;
fe->tagInfoData.fileName = tfi->filename;
fe->hasTagInfo = TRUE;
- std::string fullName = m_tagName+":"+tfi->path+stripPath(tfi->name).str();
+ QCString fullName = m_tagName+":"+tfi->path+stripPath(tfi->name);
fe->fileName = fullName;
- //printf("createFileDef() filename=%s\n",tfi->filename.data());
- std::string tagid = m_tagName+":"+tfi->path;
- std::unique_ptr<FileDef> fd { createFileDef(tagid.c_str(),
- tfi->name.c_str(),m_tagName.c_str(),
- tfi->filename.c_str()) };
+ //printf("createFileDef() filename=%s\n",qPrint(tfi->filename));
+ QCString tagid = m_tagName+":"+tfi->path;
+ std::unique_ptr<FileDef> fd { createFileDef(tagid,
+ tfi->name,m_tagName,
+ tfi->filename) };
FileName *mn;
- if ((mn=Doxygen::inputNameLinkedMap->find(tfi->name.c_str())))
+ if ((mn=Doxygen::inputNameLinkedMap->find(tfi->name)))
{
mn->push_back(std::move(fd));
}
else
{
- mn = Doxygen::inputNameLinkedMap->add(tfi->name.c_str(),fullName.c_str());
+ mn = Doxygen::inputNameLinkedMap->add(tfi->name,fullName);
mn->push_back(std::move(fd));
}
buildMemberList(fe,tfi->members);
@@ -1342,6 +1386,26 @@ void TagFileParser::buildLists(const std::shared_ptr<Entry> &root)
}
}
+ // build concept list
+ for (const auto &comp : m_tagFileCompounds)
+ {
+ if (comp->compoundType()==TagCompoundInfo::CompoundType::Concept)
+ {
+ const TagConceptInfo *tci = TagConceptInfo::get(comp);
+
+ std::shared_ptr<Entry> ce = std::make_shared<Entry>();
+ ce->section = Entry::CONCEPT_SEC;
+ ce->name = tci->name;
+ addDocAnchors(ce,tci->docAnchors);
+ ce->tagInfoData.tagName = m_tagName;
+ ce->tagInfoData.fileName = tci->filename;
+ ce->hasTagInfo = TRUE;
+ ce->id = tci->clangId;
+
+ root->moveToSubEntryAndKeep(ce);
+ }
+ }
+
// build namespace list
for (const auto &comp : m_tagFileCompounds)
{
@@ -1418,7 +1482,7 @@ void TagFileParser::buildLists(const std::shared_ptr<Entry> &root)
[&](const std::shared_ptr<Entry> &e) { return e->name == sg.c_str(); });
if (i!=children.end())
{
- (*i)->groups.push_back(Grouping(tgi->name.c_str(),Grouping::GROUPING_INGROUP));
+ (*i)->groups.push_back(Grouping(tgi->name,Grouping::GROUPING_INGROUP));
}
}
}
@@ -1432,7 +1496,7 @@ void TagFileParser::buildLists(const std::shared_ptr<Entry> &root)
const TagPageInfo *tpi = TagPageInfo::get(comp);
std::shared_ptr<Entry> pe = std::make_shared<Entry>();
- bool isIndex = (stripExtensionGeneral(tpi->filename.c_str(),getFileNameExtension(tpi->filename.c_str()))=="index");
+ bool isIndex = (stripExtensionGeneral(tpi->filename,getFileNameExtension(tpi->filename))=="index");
pe->section = isIndex ? Entry::MAINPAGEDOC_SEC : Entry::PAGEDOC_SEC;
pe->name = tpi->name;
pe->args = tpi->title;
@@ -1452,30 +1516,30 @@ void TagFileParser::addIncludes()
if (comp->compoundType()==TagCompoundInfo::CompoundType::File)
{
const TagFileInfo *tfi = TagFileInfo::get(comp);
- //printf("tag file tagName=%s path=%s name=%s\n",m_tagName.data(),tfi->path.data(),tfi->name.data());
- FileName *fn = Doxygen::inputNameLinkedMap->find(tfi->name.c_str());
+ //printf("tag file tagName=%s path=%s name=%s\n",qPrint(m_tagName),qPrint(tfi->path),qPrint(tfi->name));
+ FileName *fn = Doxygen::inputNameLinkedMap->find(tfi->name);
if (fn)
{
for (const auto &fd : *fn)
{
- //printf("input file path=%s name=%s\n",fd->getPath().data(),fd->name().data());
+ //printf("input file path=%s name=%s\n",qPrint(fd->getPath()),qPrint(fd->name()));
if (fd->getPath()==QCString(m_tagName+":"+tfi->path))
{
//printf("found\n");
for (const auto &ii : tfi->includes)
{
- //printf("ii->name='%s'\n",ii->name.data());
- FileName *ifn = Doxygen::inputNameLinkedMap->find(ii.name.c_str());
+ //printf("ii->name='%s'\n",qPrint(ii->name));
+ FileName *ifn = Doxygen::inputNameLinkedMap->find(ii.name);
ASSERT(ifn!=0);
if (ifn)
{
for (const auto &ifd : *ifn)
{
//printf("ifd->getOutputFileBase()=%s ii->id=%s\n",
- // ifd->getOutputFileBase().data(),ii->id.data());
+ // qPrint(ifd->getOutputFileBase()),qPrint(ii->id));
if (ifd->getOutputFileBase()==QCString(ii.id))
{
- fd->addIncludeDependency(ifd.get(),ii.text.c_str(),ii.isLocal,ii.isImported);
+ fd->addIncludeDependency(ifd.get(),ii.text,ii.isLocal,ii.isImported);
}
}
}
@@ -1494,13 +1558,13 @@ void parseTagFile(const std::shared_ptr<Entry> &root,const char *fullName)
XMLHandlers handlers;
// connect the generic events handlers of the XML parser to the specific handlers of the tagFileParser object
handlers.startDocument = [&tagFileParser]() { tagFileParser.startDocument(); };
- handlers.startElement = [&tagFileParser](const std::string &name,const XMLHandlers::Attributes &attrs) { tagFileParser.startElement(name,attrs); };
- handlers.endElement = [&tagFileParser](const std::string &name) { tagFileParser.endElement(name); };
- handlers.characters = [&tagFileParser](const std::string &chars) { tagFileParser.characters(chars); };
- handlers.error = [&tagFileParser](const std::string &fileName,int lineNr,const std::string &msg) { tagFileParser.error(fileName,lineNr,msg); };
+ handlers.startElement = [&tagFileParser](const std::string &name,const XMLHandlers::Attributes &attrs) { tagFileParser.startElement(QCString(name),attrs); };
+ handlers.endElement = [&tagFileParser](const std::string &name) { tagFileParser.endElement(QCString(name)); };
+ handlers.characters = [&tagFileParser](const std::string &chars) { tagFileParser.characters(QCString(chars)); };
+ handlers.error = [&tagFileParser](const std::string &fileName,int lineNr,const std::string &msg) { tagFileParser.error(QCString(fileName),lineNr,QCString(msg)); };
XMLParser parser(handlers);
tagFileParser.setDocumentLocator(&parser);
- parser.parse(fullName,inputStr,Debug::isFlagSet(Debug::Lex));
+ parser.parse(fullName,inputStr.data(),Debug::isFlagSet(Debug::Lex));
tagFileParser.buildLists(root);
tagFileParser.addIncludes();
//tagFileParser.dump();
diff --git a/src/template.cpp b/src/template.cpp
index 9f1eb92..82b35f7 100644..100755
--- a/src/template.cpp
+++ b/src/template.cpp
@@ -20,16 +20,17 @@
#include <unordered_map>
#include <deque>
#include <cstdio>
+#include <fstream>
+#include <sstream>
-#include <qfile.h>
-#include <qdir.h>
-
-#include "ftextstream.h"
#include "message.h"
#include "util.h"
#include "resourcemgr.h"
#include "portable.h"
#include "regex.h"
+#include "fileinfo.h"
+#include "dir.h"
+#include "utf8.h"
#define ENABLE_TRACING 0
@@ -97,10 +98,11 @@ static std::vector<QCString> split(const QCString &str,const QCString &sep,
/** Strips spaces surrounding `=` from string \a in, so
* `foo = 10 bar=5 baz= 'hello'` will become `foo=10 bar=5 baz='hello'`
*/
-static QCString removeSpacesAroundEquals(const char *s)
+static QCString removeSpacesAroundEquals(const QCString &s)
{
+ if (s.isEmpty()) return s;
QCString result(s);
- const char *p=result.data();
+ const char *p=s.data();
char *q = result.rawData();
char c;
while ((c=*p++))
@@ -118,14 +120,14 @@ static QCString removeSpacesAroundEquals(const char *s)
}
*q++=c;
}
- if (q<p) result.resize(q-result.data()+1);
+ if (q<p) result.resize(static_cast<uint>(q-result.data())+1);
return result;
}
//----------------------------------------------------------------------------
#if ENABLE_TRACING
-static QCString replace(const char *s,char csrc,char cdst)
+static QCString replace(const QCString &s,char csrc,char cdst)
{
QCString result = s;
for (char *p=result.data();*p;p++)
@@ -267,22 +269,22 @@ int TemplateStruct::release()
return count;
}
-void TemplateStruct::set(const char *name,const TemplateVariant &v)
+void TemplateStruct::set(const QCString &name,const TemplateVariant &v)
{
- auto it = p->fields.find(name);
+ auto it = p->fields.find(name.str());
if (it!=p->fields.end()) // change existing field
{
it->second = v;
}
else // insert new field
{
- p->fields.insert(std::make_pair(name,v));
+ p->fields.insert(std::make_pair(name.str(),v));
}
}
-TemplateVariant TemplateStruct::get(const char *name) const
+TemplateVariant TemplateStruct::get(const QCString &name) const
{
- auto it = p->fields.find(name);
+ auto it = p->fields.find(name.str());
return it!=p->fields.end() ? it->second : TemplateVariant();
}
@@ -511,7 +513,7 @@ class TemplateContextImpl : public TemplateContext
// TemplateContext methods
void push();
void pop();
- void set(const char *name,const TemplateVariant &v);
+ void set(const QCString &name,const TemplateVariant &v);
TemplateVariant get(const QCString &name) const;
const TemplateVariant *getRef(const QCString &name) const;
void setOutputDirectory(const QCString &dir)
@@ -551,7 +553,7 @@ class TemplateContextImpl : public TemplateContext
QCString encoding() const { return m_encoding; }
void setEncoding(const QCString &file,int line,const QCString &enc);
QCString recode(const QCString &s);
- void warn(const char *fileName,int line,const char *fmt,...) const;
+ void warn(const QCString &fileName,int line,const char *fmt,...) const;
// index related functions
void openSubIndex(const QCString &indexName);
@@ -627,12 +629,12 @@ class FilterGet
if (v.isValid() && v.type()==TemplateVariant::Struct && arg.type()==TemplateVariant::String)
{
TemplateVariant result = v.toStruct()->get(arg.toString());
- //printf("\nok[%s]=%d\n",arg.toString().data(),result.type());
+ //printf("\nok[%s]=%d\n",qPrint(arg.toString()),result.type());
return result;
}
else
{
- //printf("\nnok[%s]\n",arg.toString().data());
+ //printf("\nnok[%s]\n",qPrint(arg.toString()));
return FALSE;
}
}
@@ -873,7 +875,7 @@ class FilterListSort
{
if (v.type()==TemplateVariant::List && args.type()==TemplateVariant::String)
{
- //printf("FilterListSort::apply: v=%s args=%s\n",v.toString().data(),args.toString().data());
+ //printf("FilterListSort::apply: v=%s args=%s\n",qPrint(v.toString()),qPrint(args.toString()));
TemplateListIntf::ConstIterator *it = v.toList()->createIterator();
TemplateVariant item;
@@ -890,7 +892,7 @@ class FilterListSort
{
QCString sortKey = determineSortKey(s,args.toString());
sortList.emplace_back(sortKey,item);
- //printf("sortKey=%s\n",sortKey.data());
+ //printf("sortKey=%s\n",qPrint(sortKey));
}
}
delete it;
@@ -898,7 +900,7 @@ class FilterListSort
// sort the list
std::sort(sortList.begin(),
sortList.end(),
- [](const auto &lhs,const auto &rhs) { return qstrcmp(lhs.key,rhs.key)<0; });
+ [](const auto &lhs,const auto &rhs) { return lhs.key < rhs.key; });
// add sorted items to the result list
for (const auto &elem : sortList)
@@ -923,7 +925,7 @@ class FilterListSort
{
QCString var = arg.mid(i+2,j-i-2);
TemplateVariant val=s->get(var);
- //printf("found argument %s value=%s\n",var.data(),val.toString().data());
+ //printf("found argument %s value=%s\n",qPrint(var),qPrint(val.toString()));
result+=val.toString();
p=j+2;
}
@@ -953,7 +955,7 @@ class FilterGroupBy
{
if (v.type()==TemplateVariant::List && args.type()==TemplateVariant::String)
{
- //printf("FilterListSort::apply: v=%s args=%s\n",v.toString().data(),args.toString().data());
+ //printf("FilterListSort::apply: v=%s args=%s\n",qPrint(v.toString()),qPrint(args.toString()));
TemplateListIntf::ConstIterator *it = v.toList()->createIterator();
TemplateVariant item;
@@ -970,7 +972,7 @@ class FilterGroupBy
{
QCString sortKey = determineSortKey(s,args.toString());
sortList.emplace_back(sortKey,item);
- //printf("sortKey=%s\n",sortKey.data());
+ //printf("sortKey=%s\n",qPrint(sortKey));
}
}
delete it;
@@ -978,7 +980,7 @@ class FilterGroupBy
// sort the list
std::sort(sortList.begin(),
sortList.end(),
- [](const auto &lhs,const auto &rhs) { return qstrcmp(lhs.key,rhs.key)<0; });
+ [](const auto &lhs,const auto &rhs) { return lhs.key < rhs.key; });
// add sorted items to the result list
TemplateList *groupList=0;
@@ -1080,10 +1082,10 @@ class FilterAlphaIndex
QCString key;
TemplateVariant value;
};
- static QCString keyToLabel(const char *startLetter)
+ static QCString keyToLabel(const QCString &startLetter)
{
- const char *p = startLetter;
- if (startLetter==0 || *startLetter==0) return "";
+ if (startLetter.isEmpty()) return startLetter;
+ const char *p = startLetter.data();
char c = *p;
QCString result;
if (c<127 && c>31) // printable ASCII character
@@ -1106,7 +1108,10 @@ class FilterAlphaIndex
{
TemplateVariant v = s->get(attribName);
int index = getPrefixIndex(v.toString());
- return getUtf8CodeToUpper(v.toString(),index);
+ return getUnicodeForUTF8CharAt(
+ convertUTF8ToUpper(
+ getUTF8CharAt(v.toString().str(),index)
+ ),0);
}
public:
@@ -1114,7 +1119,7 @@ class FilterAlphaIndex
{
if (v.type()==TemplateVariant::List && args.type()==TemplateVariant::String)
{
- //printf("FilterListSort::apply: v=%s args=%s\n",v.toString().data(),args.toString().data());
+ //printf("FilterListSort::apply: v=%s args=%s\n",qPrint(v.toString()),qPrint(args.toString()));
TemplateListIntf::ConstIterator *it = v.toList()->createIterator();
TemplateVariant item;
@@ -1131,7 +1136,7 @@ class FilterAlphaIndex
{
uint sortKey = determineSortKey(s,args.toString());
sortList.emplace_back(sortKey,item);
- //printf("sortKey=%s\n",sortKey.data());
+ //printf("sortKey=%s\n",qPrint(sortKey));
}
}
delete it;
@@ -1139,7 +1144,7 @@ class FilterAlphaIndex
// sort the list
std::sort(sortList.begin(),
sortList.end(),
- [](const auto &lhs,const auto &rhs) { return qstrcmp(lhs.key,rhs.key)<0; });
+ [](const auto &lhs,const auto &rhs) { return lhs.key < rhs.key; });
// create an index from the sorted list
QCString letter;
@@ -1403,7 +1408,7 @@ class ExprAstNumber : public ExprAst
class ExprAstVariable : public ExprAst
{
public:
- ExprAstVariable(const char *name) : m_name(name)
+ ExprAstVariable(const QCString &name) : m_name(name)
{ TRACE(("ExprAstVariable(%s)\n",name)); }
const QCString &name() const { return m_name; }
virtual TemplateVariant resolve(TemplateContext *c)
@@ -1412,7 +1417,7 @@ class ExprAstVariable : public ExprAst
TemplateContextImpl *ci = dynamic_cast<TemplateContextImpl*>(c);
if (!v.isValid())
{
- if (ci) ci->warn(ci->templateName(),ci->line(),"undefined variable '%s' in expression",m_name.data());
+ if (ci) ci->warn(ci->templateName(),ci->line(),"undefined variable '%s' in expression",qPrint(m_name));
}
return v;
}
@@ -1455,7 +1460,7 @@ class ExprAstFunctionVariable : public ExprAst
class ExprAstFilter : public ExprAst
{
public:
- ExprAstFilter(const char *name,ExprAst *arg) : m_name(name), m_arg(arg)
+ ExprAstFilter(const QCString &name,ExprAst *arg) : m_name(name), m_arg(arg)
{ TRACE(("ExprAstFilter(%s)\n",name)); }
~ExprAstFilter() { delete m_arg; }
const QCString &name() const { return m_name; }
@@ -1463,14 +1468,14 @@ class ExprAstFilter : public ExprAst
{
TemplateContextImpl *ci = dynamic_cast<TemplateContextImpl*>(c);
if (ci==0) return v; // should not happen
- TRACE(("Applying filter '%s' to '%s' (type=%d)\n",m_name.data(),v.toString().data(),v.type()));
+ TRACE(("Applying filter '%s' to '%s' (type=%d)\n",qPrint(m_name),qPrint(v.toString()),v.type()));
TemplateVariant arg;
if (m_arg) arg = m_arg->resolve(c);
bool ok;
TemplateVariant result = TemplateFilterFactory::instance()->apply(m_name,v,arg,ok);
if (!ok)
{
- ci->warn(ci->templateName(),ci->line(),"unknown filter '%s'",m_name.data());
+ ci->warn(ci->templateName(),ci->line(),"unknown filter '%s'",qPrint(m_name));
}
return result;
}
@@ -1500,7 +1505,7 @@ class ExprAstFilterAppl : public ExprAst
class ExprAstLiteral : public ExprAst
{
public:
- ExprAstLiteral(const char *lit) : m_literal(lit)
+ ExprAstLiteral(const QCString &lit) : m_literal(lit)
{ TRACE(("ExprAstLiteral(%s)\n",lit)); }
const QCString &literal() const { return m_literal; }
virtual TemplateVariant resolve(TemplateContext *) { return TemplateVariant(m_literal); }
@@ -1660,7 +1665,7 @@ class TemplateNode
TemplateNode(TemplateNode *parent) : m_parent(parent) {}
virtual ~TemplateNode() {}
- virtual void render(FTextStream &ts, TemplateContext *c) = 0;
+ virtual void render(TextStream &ts, TemplateContext *c) = 0;
TemplateNode *parent() { return m_parent; }
@@ -1675,7 +1680,7 @@ class TemplateToken
{
public:
enum Type { Text, Variable, Block };
- TemplateToken(Type t,const char *d,int l) : type(t), data(d), line(l) {}
+ TemplateToken(Type t,const QCString &d,int l) : type(t), data(d), line(l) {}
Type type = Text;
QCString data;
int line = 0;
@@ -1690,7 +1695,7 @@ using TemplateTokenStream = std::deque< TemplateTokenPtr >;
class TemplateNodeList : public std::vector< std::unique_ptr<TemplateNode> >
{
public:
- void render(FTextStream &ts,TemplateContext *c)
+ void render(TextStream &ts,TemplateContext *c)
{
TRACE(("{TemplateNodeList::render\n"));
for (const auto &tn : *this)
@@ -1718,7 +1723,7 @@ class TemplateParser
void prependToken(TemplateTokenPtr &&token);
const TemplateToken *currentToken() const;
QCString templateName() const { return m_templateName; }
- void warn(const char *fileName,int line,const char *fmt,...) const;
+ void warn(const QCString &fileName,int line,const char *fmt,...) const;
private:
const TemplateEngine *m_engine = 0;
QCString m_templateName;
@@ -1740,10 +1745,10 @@ class ExpressionParser
{
}
- ExprAst *parse(const char *expr)
+ ExprAst *parse(const QCString &expr)
{
- if (expr==0) return 0;
- m_tokenStream = expr;
+ if (expr.isEmpty()) return 0;
+ m_tokenStream = expr.data();
getNextToken();
return parseExpression();
}
@@ -1984,7 +1989,7 @@ class ExpressionParser
ExprAst *parseIdentifier()
{
- TRACE(("{parseIdentifier(%s)\n",m_curToken.id.data()));
+ TRACE(("{parseIdentifier(%s)\n",qPrint(m_curToken.id)));
ExprAst *id = new ExprAstVariable(m_curToken.id);
getNextToken();
TRACE(("}parseIdentifier()\n"));
@@ -1993,7 +1998,7 @@ class ExpressionParser
ExprAst *parseLiteral()
{
- TRACE(("{parseLiteral(%s)\n",m_curToken.id.data()));
+ TRACE(("{parseLiteral(%s)\n",qPrint(m_curToken.id)));
ExprAst *expr = new ExprAstLiteral(m_curToken.id);
getNextToken();
TRACE(("}parseLiteral()\n"));
@@ -2002,7 +2007,7 @@ class ExpressionParser
ExprAst *parseIdentifierOptionalArgs()
{
- TRACE(("{parseIdentifierOptionalArgs(%s)\n",m_curToken.id.data()));
+ TRACE(("{parseIdentifierOptionalArgs(%s)\n",qPrint(m_curToken.id)));
ExprAst *expr = parseIdentifier();
if (expr)
{
@@ -2046,7 +2051,7 @@ class ExpressionParser
ExprAstFilter *parseFilter()
{
- TRACE(("{parseFilter(%s)\n",m_curToken.id.data()));
+ TRACE(("{parseFilter(%s)\n",qPrint(m_curToken.id)));
QCString filterName = m_curToken.id;
getNextToken();
ExprAst *argExpr=0;
@@ -2257,7 +2262,7 @@ class ExpressionParser
p++;
}
//TRACE(("token type=%d op=%d num=%d id=%s\n",
- // m_curToken.type,m_curToken.op,m_curToken.num,m_curToken.id.data()));
+ // m_curToken.type,m_curToken.op,m_curToken.num,qPrint(m_curToken.id)));
m_tokenStream = p;
return TRUE;
@@ -2278,7 +2283,7 @@ class TemplateImpl : public TemplateNode, public Template
TemplateImpl(TemplateEngine *e,const QCString &name,const QCString &data,
const QCString &extension);
~TemplateImpl();
- void render(FTextStream &ts, TemplateContext *c);
+ void render(TextStream &ts, TemplateContext *c);
TemplateEngine *engine() const { return m_engine; }
TemplateBlockContext *blockContext() { return &m_blockContext; }
@@ -2299,7 +2304,7 @@ class TemplateStructWeakRef : public TemplateStructIntf
{
public:
TemplateStructWeakRef(TemplateStructIntf *ref) : m_ref(ref), m_refCount(0) {}
- virtual TemplateVariant get(const char *name) const { return m_ref->get(name); }
+ virtual TemplateVariant get(const QCString &name) const { return m_ref->get(name); }
virtual int addRef() { return ++m_refCount; }
virtual int release() { int count=--m_refCount; if (count<=0) { delete this; } return count; }
private:
@@ -2334,24 +2339,24 @@ void TemplateContextImpl::setEncoding(const QCString &templateName,int line,cons
m_encoding=enc;
if (!enc.isEmpty())
{
- m_fromUtf8 = portable_iconv_open(enc,"UTF-8");
+ m_fromUtf8 = portable_iconv_open(enc.data(),"UTF-8");
if (m_fromUtf8==(void*)(-1))
{
- warn(templateName,line,"unsupported character conversion: '%s'->'UTF-8'\n", enc.data());
+ warn(templateName,line,"unsupported character conversion: '%s'->'UTF-8'\n", qPrint(enc));
}
}
- //printf("TemplateContextImpl::setEncoding(%s)\n",enc.data());
+ //printf("TemplateContextImpl::setEncoding(%s)\n",qPrint(enc));
}
QCString TemplateContextImpl::recode(const QCString &s)
{
- //printf("TemplateContextImpl::recode(%s)\n",s.data());
+ //printf("TemplateContextImpl::recode(%s)\n",qPrint(s));
int iSize = s.length();
int oSize = iSize*4+1;
QCString output(oSize);
size_t iLeft = iSize;
size_t oLeft = oSize;
- char *iPtr = s.rawData();
+ const char *iPtr = s.data();
char *oPtr = output.rawData();
if (!portable_iconv(m_fromUtf8,&iPtr,&iLeft,&oPtr,&oLeft))
{
@@ -2366,15 +2371,15 @@ QCString TemplateContextImpl::recode(const QCString &s)
}
}
-void TemplateContextImpl::set(const char *name,const TemplateVariant &v)
+void TemplateContextImpl::set(const QCString &name,const TemplateVariant &v)
{
auto &ctx = m_contextStack.front();
- auto it = ctx.find(name);
+ auto it = ctx.find(name.str());
if (it!=ctx.end())
{
ctx.erase(it);
}
- ctx.insert(std::make_pair(name,v));
+ ctx.insert(std::make_pair(name.str(),v));
}
TemplateVariant TemplateContextImpl::get(const QCString &name) const
@@ -2391,7 +2396,7 @@ TemplateVariant TemplateContextImpl::get(const QCString &name) const
QCString propName = name.mid(i+1);
while (!propName.isEmpty())
{
- //printf("getPrimary(%s) type=%d:%s\n",objName.data(),v.type(),v.toString().data());
+ //printf("getPrimary(%s) type=%d:%s\n",qPrint(objName),v.type(),qPrint(v.toString()));
if (v.type()==TemplateVariant::Struct)
{
i = propName.find(".");
@@ -2399,7 +2404,7 @@ TemplateVariant TemplateContextImpl::get(const QCString &name) const
v = v.toStruct()->get(propName.left(l));
if (!v.isValid())
{
- warn(m_templateName,m_line,"requesting non-existing property '%s' for object '%s'",propName.left(l).data(),objName.data());
+ warn(m_templateName,m_line,"requesting non-existing property '%s' for object '%s'",qPrint(propName.left(l)),qPrint(objName));
}
if (i!=-1)
{
@@ -2423,7 +2428,7 @@ TemplateVariant TemplateContextImpl::get(const QCString &name) const
}
else
{
- warn(m_templateName,m_line,"list index '%s' is not valid",propName.data());
+ warn(m_templateName,m_line,"list index '%s' is not valid",qPrint(propName));
break;
}
if (i!=-1)
@@ -2437,7 +2442,7 @@ TemplateVariant TemplateContextImpl::get(const QCString &name) const
}
else
{
- warn(m_templateName,m_line,"using . on an object '%s' is not an struct or list",objName.data());
+ warn(m_templateName,m_line,"using . on an object '%s' is not an struct or list",qPrint(objName));
return TemplateVariant();
}
}
@@ -2486,7 +2491,7 @@ TemplateBlockContext *TemplateContextImpl::blockContext()
return &m_blockContext;
}
-void TemplateContextImpl::warn(const char *fileName,int line,const char *fmt,...) const
+void TemplateContextImpl::warn(const QCString &fileName,int line,const char *fmt,...) const
{
va_list args;
va_start(args,fmt);
@@ -2497,11 +2502,11 @@ void TemplateContextImpl::warn(const char *fileName,int line,const char *fmt,...
void TemplateContextImpl::openSubIndex(const QCString &indexName)
{
- //printf("TemplateContextImpl::openSubIndex(%s)\n",indexName.data());
+ //printf("TemplateContextImpl::openSubIndex(%s)\n",qPrint(indexName));
auto kv = m_indexStacks.find(indexName.str());
if (kv==m_indexStacks.end() || kv->second.empty() || kv->second.top().type()==TemplateVariant::List) // error: no stack yet or no entry
{
- warn(m_templateName,m_line,"opensubindex for index %s without preceding indexentry",indexName.data());
+ warn(m_templateName,m_line,"opensubindex for index %s without preceding indexentry",qPrint(indexName));
return;
}
// get the parent entry to add the list to
@@ -2519,11 +2524,11 @@ void TemplateContextImpl::openSubIndex(const QCString &indexName)
void TemplateContextImpl::closeSubIndex(const QCString &indexName)
{
- //printf("TemplateContextImpl::closeSubIndex(%s)\n",indexName.data());
+ //printf("TemplateContextImpl::closeSubIndex(%s)\n",qPrint(indexName));
auto kv = m_indexStacks.find(indexName.str());
if (kv==m_indexStacks.end() || kv->second.size()<3)
{
- warn(m_templateName,m_line,"closesubindex for index %s without matching open",indexName.data());
+ warn(m_templateName,m_line,"closesubindex for index %s without matching open",qPrint(indexName));
}
else
{
@@ -2543,7 +2548,7 @@ void TemplateContextImpl::closeSubIndex(const QCString &indexName)
}
}
}
- //fprintf(stderr,"TemplateContextImpl::closeSubIndex(%s) end g_count=%d\n\n",indexName.data(),g_count);
+ //fprintf(stderr,"TemplateContextImpl::closeSubIndex(%s) end g_count=%d\n\n",qPrint(indexName),g_count);
}
static void getPathListFunc(TemplateStructIntf *entry,TemplateList *list)
@@ -2567,7 +2572,7 @@ static TemplateVariant getPathFunc(const void *ctx, const std::vector<TemplateVa
void TemplateContextImpl::addIndexEntry(const QCString &indexName,const std::vector<TemplateKeyValue> &arguments)
{
auto it = arguments.begin();
- //printf("TemplateContextImpl::addIndexEntry(%s)\n",indexName.data());
+ //printf("TemplateContextImpl::addIndexEntry(%s)\n",qPrint(indexName));
//while (it!=arguments.end())
//{
// printf(" key=%s value=%s\n",(*it).key.data(),(*it).value.toString().data());
@@ -2647,11 +2652,11 @@ class TemplateNodeText : public TemplateNode
TRACE(("TemplateNodeText('%s')\n",replace(data,'\n',' ').data()));
}
- void render(FTextStream &ts, TemplateContext *c)
+ void render(TextStream &ts, TemplateContext *c)
{
TemplateContextImpl* ci = dynamic_cast<TemplateContextImpl*>(c);
if (ci==0) return; // should not happen
- //printf("TemplateNodeText::render(%s) needsRecoding=%d ci=%p\n",m_data.data(),ci->needsRecoding(),ci);
+ //printf("TemplateNodeText::render(%s) needsRecoding=%d ci=%p\n",qPrint(m_data),ci->needsRecoding(),ci);
if (ci->spacelessEnabled())
{
if (ci->needsRecoding())
@@ -2688,12 +2693,12 @@ class TemplateNodeVariable : public TemplateNode
TemplateNodeVariable(TemplateParser *parser,TemplateNode *parent,int line,const QCString &var)
: TemplateNode(parent), m_templateName(parser->templateName()), m_line(line)
{
- TRACE(("TemplateNodeVariable(%s)\n",var.data()));
+ TRACE(("TemplateNodeVariable(%s)\n",qPrint(var)));
ExpressionParser expParser(parser,line);
m_var = expParser.parse(var);
if (m_var==0)
{
- parser->warn(m_templateName,line,"invalid expression '%s' for variable",var.data());
+ parser->warn(m_templateName,line,"invalid expression '%s' for variable",qPrint(var));
}
}
~TemplateNodeVariable()
@@ -2701,7 +2706,7 @@ class TemplateNodeVariable : public TemplateNode
delete m_var;
}
- void render(FTextStream &ts, TemplateContext *c)
+ void render(TextStream &ts, TemplateContext *c)
{
TemplateContextImpl* ci = dynamic_cast<TemplateContextImpl*>(c);
if (ci==0) return; // should not happen
@@ -2771,36 +2776,35 @@ template<class T> class TemplateNodeCreator : public TemplateNode
return dynamic_cast<TemplateImpl*>(root);
}
protected:
- void mkpath(TemplateContextImpl *ci,const QCString &fileName)
+ void mkpath(TemplateContextImpl *ci,const std::string &fileName)
{
- int i=fileName.find('/');
- QCString outputDir = ci->outputDirectory();
- QDir d(outputDir);
+ size_t i=fileName.find('/');
+ std::string outputDir = ci->outputDirectory().str();
+ Dir d(outputDir);
if (!d.exists())
{
- QDir rootDir;
- rootDir.setPath(QDir::currentDirPath());
+ Dir rootDir;
if (!rootDir.mkdir(outputDir))
{
err("tag OUTPUT_DIRECTORY: Output directory '%s' does not "
- "exist and cannot be created\n",outputDir.data());
+ "exist and cannot be created\n",outputDir.c_str());
return;
}
d.setPath(outputDir);
}
- int j=0;
- while (i!=-1) // fileName contains path part
+ size_t j=0;
+ while (i!=std::string::npos) // fileName contains path part
{
if (d.exists())
{
- bool ok = d.mkdir(fileName.mid(j,i-j));
+ bool ok = d.mkdir(fileName.substr(j,i-j));
if (!ok)
{
- err("Failed to create directory '%s'\n",(fileName.mid(j,i-j)).data());
+ err("Failed to create directory '%s'\n",(fileName.substr(j,i-j)).c_str());
break;
}
- QCString dirName = outputDir+'/'+fileName.left(i);
- d = QDir(dirName);
+ std::string dirName = outputDir+'/'+fileName.substr(0,i);
+ d = Dir(dirName);
j = i+1;
}
i=fileName.find('/',i+1);
@@ -2819,7 +2823,7 @@ class TemplateNodeIf : public TemplateNodeCreator<TemplateNodeIf>
TemplateNodeIf(TemplateParser *parser,TemplateNode *parent,int line,const QCString &data) :
TemplateNodeCreator<TemplateNodeIf>(parser,parent,line)
{
- TRACE(("{TemplateNodeIf(%s)\n",data.data()));
+ TRACE(("{TemplateNodeIf(%s)\n",qPrint(data)));
if (data.isEmpty())
{
parser->warn(m_templateName,line,"missing argument for if tag");
@@ -2858,13 +2862,13 @@ class TemplateNodeIf : public TemplateNodeCreator<TemplateNodeIf>
parser->parse(this,line,stopAt,m_falseNodes);
parser->removeNextToken(); // skip over endif
}
- TRACE(("}TemplateNodeIf(%s)\n",data.data()));
+ TRACE(("}TemplateNodeIf(%s)\n",qPrint(data)));
}
~TemplateNodeIf()
{
}
- void render(FTextStream &ts, TemplateContext *c)
+ void render(TextStream &ts, TemplateContext *c)
{
TemplateContextImpl* ci = dynamic_cast<TemplateContextImpl*>(c);
if (ci==0) return; // should not happen
@@ -2915,19 +2919,19 @@ class TemplateNodeRepeat : public TemplateNodeCreator<TemplateNodeRepeat>
TemplateNodeRepeat(TemplateParser *parser,TemplateNode *parent,int line,const QCString &data)
: TemplateNodeCreator<TemplateNodeRepeat>(parser,parent,line)
{
- TRACE(("{TemplateNodeRepeat(%s)\n",data.data()));
+ TRACE(("{TemplateNodeRepeat(%s)\n",qPrint(data)));
ExpressionParser expParser(parser,line);
m_expr = expParser.parse(data);
StringVector stopAt = { "endrepeat" };
parser->parse(this,line,stopAt,m_repeatNodes);
parser->removeNextToken(); // skip over endrepeat
- TRACE(("}TemplateNodeRepeat(%s)\n",data.data()));
+ TRACE(("}TemplateNodeRepeat(%s)\n",qPrint(data)));
}
~TemplateNodeRepeat()
{
delete m_expr;
}
- void render(FTextStream &ts, TemplateContext *c)
+ void render(TextStream &ts, TemplateContext *c)
{
TemplateContextImpl* ci = dynamic_cast<TemplateContextImpl*>(c);
if (ci==0) return; // should not happen
@@ -2969,7 +2973,7 @@ class TemplateNodeRange : public TemplateNodeCreator<TemplateNodeRange>
TemplateNodeRange(TemplateParser *parser,TemplateNode *parent,int line,const QCString &data)
: TemplateNodeCreator<TemplateNodeRange>(parser,parent,line), m_down(FALSE)
{
- TRACE(("{TemplateNodeRange(%s)\n",data.data()));
+ TRACE(("{TemplateNodeRange(%s)\n",qPrint(data)));
QCString start,end;
int i1 = data.find(" from ");
int i2 = data.find(" to ");
@@ -3030,7 +3034,7 @@ class TemplateNodeRange : public TemplateNodeCreator<TemplateNodeRange>
StringVector stopAt = { "endrange" };
parser->parse(this,line,stopAt,m_loopNodes);
parser->removeNextToken(); // skip over endrange
- TRACE(("}TemplateNodeRange(%s)\n",data.data()));
+ TRACE(("}TemplateNodeRange(%s)\n",qPrint(data)));
}
~TemplateNodeRange()
@@ -3039,7 +3043,7 @@ class TemplateNodeRange : public TemplateNodeCreator<TemplateNodeRange>
delete m_endExpr;
}
- void render(FTextStream &ts, TemplateContext *c)
+ void render(TextStream &ts, TemplateContext *c)
{
TemplateContextImpl* ci = dynamic_cast<TemplateContextImpl*>(c);
if (ci==0) return; // should not happen
@@ -3138,7 +3142,7 @@ class TemplateNodeFor : public TemplateNodeCreator<TemplateNodeFor>
TemplateNodeFor(TemplateParser *parser,TemplateNode *parent,int line,const QCString &data)
: TemplateNodeCreator<TemplateNodeFor>(parser,parent,line), m_reversed(FALSE)
{
- TRACE(("{TemplateNodeFor(%s)\n",data.data()));
+ TRACE(("{TemplateNodeFor(%s)\n",qPrint(data)));
QCString exprStr;
int i = data.find(" in ");
if (i==-1)
@@ -3189,7 +3193,7 @@ class TemplateNodeFor : public TemplateNodeCreator<TemplateNodeFor>
parser->parse(this,line,stopAt,m_emptyNodes);
parser->removeNextToken(); // skip over endfor
}
- TRACE(("}TemplateNodeFor(%s)\n",data.data()));
+ TRACE(("}TemplateNodeFor(%s)\n",qPrint(data)));
}
~TemplateNodeFor()
@@ -3197,7 +3201,7 @@ class TemplateNodeFor : public TemplateNodeCreator<TemplateNodeFor>
delete m_expr;
}
- void render(FTextStream &ts, TemplateContext *c)
+ void render(TextStream &ts, TemplateContext *c)
{
TemplateContextImpl* ci = dynamic_cast<TemplateContextImpl*>(c);
if (ci==0) return; // should not happen
@@ -3271,7 +3275,7 @@ class TemplateNodeFor : public TemplateNodeCreator<TemplateNodeFor>
}
else // simple type...
{
- ci->warn(m_templateName,m_line,"for requires a variable of list type, got type '%s'!",v.typeAsString().data());
+ ci->warn(m_templateName,m_line,"for requires a variable of list type, got type '%s'!",qPrint(v.typeAsString()));
}
}
}
@@ -3299,7 +3303,7 @@ class TemplateNodeMsg : public TemplateNodeCreator<TemplateNodeMsg>
parser->removeNextToken(); // skip over endmsg
TRACE(("}TemplateNodeMsg()\n"));
}
- void render(FTextStream &, TemplateContext *c)
+ void render(TextStream &, TemplateContext *c)
{
TemplateContextImpl* ci = dynamic_cast<TemplateContextImpl*>(c);
if (ci==0) return; // should not happen
@@ -3308,9 +3312,10 @@ class TemplateNodeMsg : public TemplateNodeCreator<TemplateNodeMsg>
ci->setActiveEscapeIntf(0); // avoid escaping things we send to standard out
bool enable = ci->spacelessEnabled();
ci->enableSpaceless(FALSE);
- FTextStream ts(stdout);
- m_nodes.render(ts,c);
- ts << endl;
+ TextStream t(&std::cout);
+ m_nodes.render(t,c);
+ t.flush();
+ std::cout << "\n";
ci->setActiveEscapeIntf(escIntf);
ci->enableSpaceless(enable);
}
@@ -3328,7 +3333,7 @@ class TemplateNodeBlock : public TemplateNodeCreator<TemplateNodeBlock>
TemplateNodeBlock(TemplateParser *parser,TemplateNode *parent,int line,const QCString &data)
: TemplateNodeCreator<TemplateNodeBlock>(parser,parent,line)
{
- TRACE(("{TemplateNodeBlock(%s)\n",data.data()));
+ TRACE(("{TemplateNodeBlock(%s)\n",qPrint(data)));
m_blockName = data;
if (m_blockName.isEmpty())
{
@@ -3337,10 +3342,10 @@ class TemplateNodeBlock : public TemplateNodeCreator<TemplateNodeBlock>
StringVector stopAt = { "endblock" };
parser->parse(this,line,stopAt,m_nodes);
parser->removeNextToken(); // skip over endblock
- TRACE(("}TemplateNodeBlock(%s)\n",data.data()));
+ TRACE(("}TemplateNodeBlock(%s)\n",qPrint(data)));
}
- void render(FTextStream &ts, TemplateContext *c)
+ void render(TextStream &ts, TemplateContext *c)
{
TemplateContextImpl *ci = dynamic_cast<TemplateContextImpl*>(c);
if (ci==0) return; // should not happen
@@ -3353,8 +3358,7 @@ class TemplateNodeBlock : public TemplateNodeCreator<TemplateNodeBlock>
if (nb) // block is overruled
{
ci->push();
- QGString super;
- FTextStream ss(&super);
+ TextStream ss;
// get super block of block nb
TemplateNodeBlock *sb = ci->blockContext()->get(m_blockName);
if (sb && sb!=nb && sb!=this) // nb and sb both overrule this block
@@ -3365,6 +3369,7 @@ class TemplateNodeBlock : public TemplateNodeCreator<TemplateNodeBlock>
{
m_nodes.render(ss,c); // render parent of nb to string
}
+ QCString super = ss.str();
// add 'block.super' variable to allow access to parent block content
TemplateAutoRef<TemplateStruct> superBlock(TemplateStruct::alloc());
superBlock->set("super",TemplateVariant(super.data(),TRUE));
@@ -3405,7 +3410,7 @@ class TemplateNodeExtend : public TemplateNodeCreator<TemplateNodeExtend>
TemplateNodeExtend(TemplateParser *parser,TemplateNode *parent,int line,const QCString &data)
: TemplateNodeCreator<TemplateNodeExtend>(parser,parent,line)
{
- TRACE(("{TemplateNodeExtend(%s)\n",data.data()));
+ TRACE(("{TemplateNodeExtend(%s)\n",qPrint(data)));
ExpressionParser ep(parser,line);
if (data.isEmpty())
{
@@ -3414,14 +3419,14 @@ class TemplateNodeExtend : public TemplateNodeCreator<TemplateNodeExtend>
m_extendExpr = ep.parse(data);
StringVector stopAt;
parser->parse(this,line,stopAt,m_nodes);
- TRACE(("}TemplateNodeExtend(%s)\n",data.data()));
+ TRACE(("}TemplateNodeExtend(%s)\n",qPrint(data)));
}
~TemplateNodeExtend()
{
delete m_extendExpr;
}
- void render(FTextStream &ts, TemplateContext *c)
+ void render(TextStream &ts, TemplateContext *c)
{
TemplateContextImpl* ci = dynamic_cast<TemplateContextImpl*>(c);
if (ci==0) return; // should not happen
@@ -3469,7 +3474,7 @@ class TemplateNodeExtend : public TemplateNodeCreator<TemplateNodeExtend>
}
else
{
- ci->warn(m_templateName,m_line,"failed to load template %s for extend",extendFile.data());
+ ci->warn(m_templateName,m_line,"failed to load template %s for extend",qPrint(extendFile));
}
}
}
@@ -3486,7 +3491,7 @@ class TemplateNodeInclude : public TemplateNodeCreator<TemplateNodeInclude>
TemplateNodeInclude(TemplateParser *parser,TemplateNode *parent,int line,const QCString &data)
: TemplateNodeCreator<TemplateNodeInclude>(parser,parent,line)
{
- TRACE(("TemplateNodeInclude(%s)\n",data.data()));
+ TRACE(("TemplateNodeInclude(%s)\n",qPrint(data)));
ExpressionParser ep(parser,line);
if (data.isEmpty())
{
@@ -3498,7 +3503,7 @@ class TemplateNodeInclude : public TemplateNodeCreator<TemplateNodeInclude>
{
delete m_includeExpr;
}
- void render(FTextStream &ts, TemplateContext *c)
+ void render(TextStream &ts, TemplateContext *c)
{
TemplateContextImpl* ci = dynamic_cast<TemplateContextImpl*>(c);
if (ci==0) return; // should not happen
@@ -3524,7 +3529,7 @@ class TemplateNodeInclude : public TemplateNodeCreator<TemplateNodeInclude>
}
else
{
- ci->warn(m_templateName,m_line,"failed to load template '%s' for include",includeFile.data()?includeFile.data():"");
+ ci->warn(m_templateName,m_line,"failed to load template '%s' for include",qPrint(includeFile));
}
}
}
@@ -3537,12 +3542,12 @@ class TemplateNodeInclude : public TemplateNodeCreator<TemplateNodeInclude>
//----------------------------------------------------------
-static void stripLeadingWhiteSpace(QGString &s)
+static void stripLeadingWhiteSpace(QCString &s)
{
const char *src = s.data();
if (src)
{
- char *dst = s.data();
+ char *dst = s.rawData();
char c;
bool skipSpaces=TRUE;
while ((c=*src++))
@@ -3552,6 +3557,7 @@ static void stripLeadingWhiteSpace(QGString &s)
else { *dst++=c; skipSpaces=FALSE; }
}
*dst='\0';
+ s.resize( (int)(dst - src) + 1 );
}
}
@@ -3562,7 +3568,7 @@ class TemplateNodeCreate : public TemplateNodeCreator<TemplateNodeCreate>
TemplateNodeCreate(TemplateParser *parser,TemplateNode *parent,int line,const QCString &data)
: TemplateNodeCreator<TemplateNodeCreate>(parser,parent,line), m_templateExpr(0), m_fileExpr(0)
{
- TRACE(("TemplateNodeCreate(%s)\n",data.data()));
+ TRACE(("TemplateNodeCreate(%s)\n",qPrint(data)));
if (data.isEmpty())
{
parser->warn(m_templateName,line,"create tag is missing arguments");
@@ -3595,7 +3601,7 @@ class TemplateNodeCreate : public TemplateNodeCreator<TemplateNodeCreate>
delete m_templateExpr;
delete m_fileExpr;
}
- void render(FTextStream &, TemplateContext *c)
+ void render(TextStream &, TemplateContext *c)
{
TemplateContextImpl* ci = dynamic_cast<TemplateContextImpl*>(c);
if (ci==0) return; // should not happen
@@ -3628,21 +3634,21 @@ class TemplateNodeCreate : public TemplateNodeCreator<TemplateNodeCreate>
TemplateImpl *createTemplate = ct ? dynamic_cast<TemplateImpl*>(ct) : 0;
if (createTemplate)
{
- mkpath(ci,outputFile);
+ mkpath(ci,outputFile.str());
if (!ci->outputDirectory().isEmpty())
{
outputFile.prepend(ci->outputDirectory()+"/");
}
- //printf("NoteCreate(%s)\n",outputFile.data());
- QFile f(outputFile);
- if (f.open(IO_WriteOnly))
+ //printf("NoteCreate(%s)\n",qPrint(outputFile));
+ std::ofstream f(outputFile.str(),std::ofstream::out | std::ofstream::binary);
+ if (f.is_open())
{
+ TextStream ts(&f);
TemplateEscapeIntf *escIntf = ci->escapeIntf();
ci->selectEscapeIntf(extension);
- FTextStream ts(&f);
- QGString out;
- FTextStream os(&out);
+ TextStream os;
createTemplate->render(os,c);
+ QCString out = os.str();
stripLeadingWhiteSpace(out);
ts << out;
t->engine()->unload(t);
@@ -3650,12 +3656,12 @@ class TemplateNodeCreate : public TemplateNodeCreator<TemplateNodeCreate>
}
else
{
- ci->warn(m_templateName,m_line,"failed to open output file '%s' for create command",outputFile.data());
+ ci->warn(m_templateName,m_line,"failed to open output file '%s' for create command",qPrint(outputFile));
}
}
else
{
- ci->warn(m_templateName,m_line,"failed to load template '%s' for include",templateFile.data());
+ ci->warn(m_templateName,m_line,"failed to load template '%s' for include",qPrint(templateFile));
}
t->engine()->setOutputExtension("");
}
@@ -3685,7 +3691,7 @@ class TemplateNodeTree : public TemplateNodeCreator<TemplateNodeTree>
TemplateNodeTree(TemplateParser *parser,TemplateNode *parent,int line,const QCString &data)
: TemplateNodeCreator<TemplateNodeTree>(parser,parent,line)
{
- TRACE(("{TemplateNodeTree(%s)\n",data.data()));
+ TRACE(("{TemplateNodeTree(%s)\n",qPrint(data)));
ExpressionParser ep(parser,line);
if (data.isEmpty())
{
@@ -3695,7 +3701,7 @@ class TemplateNodeTree : public TemplateNodeCreator<TemplateNodeTree>
StringVector stopAt = { "endrecursetree" };
parser->parse(this,line,stopAt,m_treeNodes);
parser->removeNextToken(); // skip over endrecursetree
- TRACE(("}TemplateNodeTree(%s)\n",data.data()));
+ TRACE(("}TemplateNodeTree(%s)\n",qPrint(data)));
}
~TemplateNodeTree()
{
@@ -3713,8 +3719,7 @@ class TemplateNodeTree : public TemplateNodeCreator<TemplateNodeTree>
TemplateContext *c = ctx->templateCtx;
TemplateContextImpl* ci = dynamic_cast<TemplateContextImpl*>(c);
if (ci==0) return QCString(); // should not happen
- QGString result;
- FTextStream ss(&result);
+ TextStream ss;
c->push();
TemplateVariant node;
TemplateListIntf::ConstIterator *it = ctx->list->createIterator();
@@ -3740,7 +3745,7 @@ class TemplateNodeTree : public TemplateNodeCreator<TemplateNodeTree>
}
else if (list==0)
{
- ci->warn(m_templateName,m_line,"recursetree: children attribute has type '%s' instead of list\n",v.typeAsString().data());
+ ci->warn(m_templateName,m_line,"recursetree: children attribute has type '%s' instead of list\n",qPrint(v.typeAsString()));
}
}
//else
@@ -3756,9 +3761,9 @@ class TemplateNodeTree : public TemplateNodeCreator<TemplateNodeTree>
}
c->pop();
delete it;
- return result.data();
+ return ss.str();
}
- void render(FTextStream &ts, TemplateContext *c)
+ void render(TextStream &ts, TemplateContext *c)
{
//printf("TemplateNodeTree::render()\n");
TemplateContextImpl* ci = dynamic_cast<TemplateContextImpl*>(c);
@@ -3797,7 +3802,7 @@ class TemplateNodeIndexEntry : public TemplateNodeCreator<TemplateNodeIndexEntry
TemplateNodeIndexEntry(TemplateParser *parser,TemplateNode *parent,int line,const QCString &data)
: TemplateNodeCreator<TemplateNodeIndexEntry>(parser,parent,line)
{
- TRACE(("{TemplateNodeIndexEntry(%s)\n",data.data()));
+ TRACE(("{TemplateNodeIndexEntry(%s)\n",qPrint(data)));
ExpressionParser expParser(parser,line);
std::vector<QCString> args = split(data," ");
auto it = args.begin();
@@ -3823,14 +3828,14 @@ class TemplateNodeIndexEntry : public TemplateNodeCreator<TemplateNodeIndexEntry
}
else
{
- parser->warn(parser->templateName(),line,"invalid argument '%s' for indexentry tag",arg.data());
+ parser->warn(parser->templateName(),line,"invalid argument '%s' for indexentry tag",qPrint(arg));
}
++it;
}
}
- TRACE(("}TemplateNodeIndexEntry(%s)\n",data.data()));
+ TRACE(("}TemplateNodeIndexEntry(%s)\n",qPrint(data)));
}
- void render(FTextStream &, TemplateContext *c)
+ void render(TextStream &, TemplateContext *c)
{
TemplateContextImpl *ci = dynamic_cast<TemplateContextImpl*>(c);
if (ci==0) return; // should not happen
@@ -3859,7 +3864,7 @@ class TemplateNodeOpenSubIndex : public TemplateNodeCreator<TemplateNodeOpenSubI
TemplateNodeOpenSubIndex(TemplateParser *parser,TemplateNode *parent,int line,const QCString &data)
: TemplateNodeCreator<TemplateNodeOpenSubIndex>(parser,parent,line)
{
- TRACE(("{TemplateNodeOpenSubIndex(%s)\n",data.data()));
+ TRACE(("{TemplateNodeOpenSubIndex(%s)\n",qPrint(data)));
m_name = data.stripWhiteSpace();
if (m_name.isEmpty())
{
@@ -3867,12 +3872,12 @@ class TemplateNodeOpenSubIndex : public TemplateNodeCreator<TemplateNodeOpenSubI
}
else if (m_name.find(' ')!=-1)
{
- parser->warn(parser->templateName(),line,"Expected single argument for opensubindex tag got '%s'",data.data());
+ parser->warn(parser->templateName(),line,"Expected single argument for opensubindex tag got '%s'",qPrint(data));
m_name="";
}
- TRACE(("}TemplateNodeOpenSubIndex(%s)\n",data.data()));
+ TRACE(("}TemplateNodeOpenSubIndex(%s)\n",qPrint(data)));
}
- void render(FTextStream &, TemplateContext *c)
+ void render(TextStream &, TemplateContext *c)
{
TemplateContextImpl *ci = dynamic_cast<TemplateContextImpl*>(c);
if (ci==0) return; // should not happen
@@ -3895,7 +3900,7 @@ class TemplateNodeCloseSubIndex : public TemplateNodeCreator<TemplateNodeCloseSu
TemplateNodeCloseSubIndex(TemplateParser *parser,TemplateNode *parent,int line,const QCString &data)
: TemplateNodeCreator<TemplateNodeCloseSubIndex>(parser,parent,line)
{
- TRACE(("{TemplateNodeCloseSubIndex(%s)\n",data.data()));
+ TRACE(("{TemplateNodeCloseSubIndex(%s)\n",qPrint(data)));
m_name = data.stripWhiteSpace();
if (m_name.isEmpty())
{
@@ -3903,12 +3908,12 @@ class TemplateNodeCloseSubIndex : public TemplateNodeCreator<TemplateNodeCloseSu
}
else if (m_name.find(' ')!=-1 || m_name.isEmpty())
{
- parser->warn(parser->templateName(),line,"Expected single argument for closesubindex tag got '%s'",data.data());
+ parser->warn(parser->templateName(),line,"Expected single argument for closesubindex tag got '%s'",qPrint(data));
m_name="";
}
- TRACE(("}TemplateNodeCloseSubIndex(%s)\n",data.data()));
+ TRACE(("}TemplateNodeCloseSubIndex(%s)\n",qPrint(data)));
}
- void render(FTextStream &, TemplateContext *c)
+ void render(TextStream &, TemplateContext *c)
{
TemplateContextImpl *ci = dynamic_cast<TemplateContextImpl*>(c);
if (ci==0) return; // should not happen
@@ -3938,7 +3943,7 @@ class TemplateNodeWith : public TemplateNodeCreator<TemplateNodeWith>
TemplateNodeWith(TemplateParser *parser,TemplateNode *parent,int line,const QCString &data)
: TemplateNodeCreator<TemplateNodeWith>(parser,parent,line)
{
- TRACE(("{TemplateNodeWith(%s)\n",data.data()));
+ TRACE(("{TemplateNodeWith(%s)\n",qPrint(data)));
ExpressionParser expParser(parser,line);
QCString filteredData = removeSpacesAroundEquals(data);
std::vector<QCString> args = split(filteredData," ");
@@ -3957,19 +3962,19 @@ class TemplateNodeWith : public TemplateNodeCreator<TemplateNodeWith>
}
else
{
- parser->warn(parser->templateName(),line,"invalid argument '%s' for 'with' tag",arg.data());
+ parser->warn(parser->templateName(),line,"invalid argument '%s' for 'with' tag",qPrint(arg));
}
++it;
}
StringVector stopAt = { "endwith" };
parser->parse(this,line,stopAt,m_nodes);
parser->removeNextToken(); // skip over endwith
- TRACE(("}TemplateNodeWith(%s)\n",data.data()));
+ TRACE(("}TemplateNodeWith(%s)\n",qPrint(data)));
}
~TemplateNodeWith()
{
}
- void render(FTextStream &ts, TemplateContext *c)
+ void render(TextStream &ts, TemplateContext *c)
{
TemplateContextImpl *ci = dynamic_cast<TemplateContextImpl*>(c);
if (ci==0) return; // should not happen
@@ -3997,7 +4002,7 @@ class TemplateNodeCycle : public TemplateNodeCreator<TemplateNodeCycle>
TemplateNodeCycle(TemplateParser *parser,TemplateNode *parent,int line,const QCString &data)
: TemplateNodeCreator<TemplateNodeCycle>(parser,parent,line)
{
- TRACE(("{TemplateNodeCycle(%s)\n",data.data()));
+ TRACE(("{TemplateNodeCycle(%s)\n",qPrint(data)));
m_index=0;
ExpressionParser expParser(parser,line);
std::vector<QCString> args = split(data," ");
@@ -4015,11 +4020,12 @@ class TemplateNodeCycle : public TemplateNodeCreator<TemplateNodeCycle>
{
parser->warn(parser->templateName(),line,"expected at least two arguments for cycle command, got %zu",m_args.size());
}
- TRACE(("}TemplateNodeCycle(%s)\n",data.data()));
+ TRACE(("}TemplateNodeCycle(%s)\n",qPrint(data)));
}
- void render(FTextStream &ts, TemplateContext *c)
+ void render(TextStream &ts, TemplateContext *c)
{
TemplateContextImpl *ci = dynamic_cast<TemplateContextImpl*>(c);
+ if (ci==0) return; // should not happen
ci->setLocation(m_templateName,m_line);
if (m_index<m_args.size())
{
@@ -4077,7 +4083,7 @@ class TemplateNodeSet : public TemplateNodeCreator<TemplateNodeSet>
TemplateNodeSet(TemplateParser *parser,TemplateNode *parent,int line,const QCString &data)
: TemplateNodeCreator<TemplateNodeSet>(parser,parent,line)
{
- TRACE(("{TemplateNodeSet(%s)\n",data.data()));
+ TRACE(("{TemplateNodeSet(%s)\n",qPrint(data)));
ExpressionParser expParser(parser,line);
// data format: name=expression
int j=data.find('=');
@@ -4086,12 +4092,12 @@ class TemplateNodeSet : public TemplateNodeCreator<TemplateNodeSet>
{
m_mapping = std::make_unique<Mapping>(data.left(j),expr);
}
- TRACE(("}TemplateNodeSet(%s)\n",data.data()));
+ TRACE(("}TemplateNodeSet(%s)\n",qPrint(data)));
}
~TemplateNodeSet()
{
}
- void render(FTextStream &, TemplateContext *c)
+ void render(TextStream &, TemplateContext *c)
{
TemplateContextImpl *ci = dynamic_cast<TemplateContextImpl*>(c);
if (ci==0) return; // should not happen
@@ -4121,7 +4127,7 @@ class TemplateNodeSpaceless : public TemplateNodeCreator<TemplateNodeSpaceless>
parser->removeNextToken(); // skip over endwith
TRACE(("}TemplateNodeSpaceless()\n"));
}
- void render(FTextStream &ts, TemplateContext *c)
+ void render(TextStream &ts, TemplateContext *c)
{
TemplateContextImpl *ci = dynamic_cast<TemplateContextImpl*>(c);
if (ci==0) return; // should not happen
@@ -4144,7 +4150,7 @@ class TemplateNodeMarkers : public TemplateNodeCreator<TemplateNodeMarkers>
TemplateNodeMarkers(TemplateParser *parser,TemplateNode *parent,int line,const QCString &data)
: TemplateNodeCreator<TemplateNodeMarkers>(parser,parent,line), m_listExpr(0), m_patternExpr(0)
{
- TRACE(("{TemplateNodeMarkers(%s)\n",data.data()));
+ TRACE(("{TemplateNodeMarkers(%s)\n",qPrint(data)));
int i = data.find(" in ");
int w = data.find(" with ");
if (i==-1 || w==-1 || w<i)
@@ -4161,14 +4167,14 @@ class TemplateNodeMarkers : public TemplateNodeCreator<TemplateNodeMarkers>
StringVector stopAt = { "endmarkers" };
parser->parse(this,line,stopAt,m_nodes);
parser->removeNextToken(); // skip over endmarkers
- TRACE(("}TemplateNodeMarkers(%s)\n",data.data()));
+ TRACE(("}TemplateNodeMarkers(%s)\n",qPrint(data)));
}
~TemplateNodeMarkers()
{
delete m_listExpr;
delete m_patternExpr;
}
- void render(FTextStream &ts, TemplateContext *c)
+ void render(TextStream &ts, TemplateContext *c)
{
TemplateContextImpl *ci = dynamic_cast<TemplateContextImpl*>(c);
if (ci==0) return; // should not happen
@@ -4198,7 +4204,7 @@ class TemplateNodeMarkers : public TemplateNodeCreator<TemplateNodeMarkers>
std::string part = str.substr(index,newIndex-index);
if (ci->needsRecoding())
{
- ts << ci->recode(part); // write text before marker
+ ts << ci->recode(QCString(part)); // write text before marker
}
else
{
@@ -4270,7 +4276,7 @@ class TemplateNodeTabbing : public TemplateNodeCreator<TemplateNodeTabbing>
parser->removeNextToken(); // skip over endtabbing
TRACE(("}TemplateNodeTabbing()\n"));
}
- void render(FTextStream &ts, TemplateContext *c)
+ void render(TextStream &ts, TemplateContext *c)
{
TemplateContextImpl *ci = dynamic_cast<TemplateContextImpl*>(c);
if (ci==0) return; // should not happen
@@ -4293,7 +4299,7 @@ class TemplateNodeResource : public TemplateNodeCreator<TemplateNodeResource>
TemplateNodeResource(TemplateParser *parser,TemplateNode *parent,int line,const QCString &data)
: TemplateNodeCreator<TemplateNodeResource>(parser,parent,line)
{
- TRACE(("{TemplateNodeResource(%s)\n",data.data()));
+ TRACE(("{TemplateNodeResource(%s)\n",qPrint(data)));
ExpressionParser ep(parser,line);
int i;
if (data.isEmpty())
@@ -4312,14 +4318,14 @@ class TemplateNodeResource : public TemplateNodeCreator<TemplateNodeResource>
m_resExpr = ep.parse(data);
m_asExpr = 0;
}
- TRACE(("}TemplateNodeResource(%s)\n",data.data()));
+ TRACE(("}TemplateNodeResource(%s)\n",qPrint(data)));
}
~TemplateNodeResource()
{
delete m_resExpr;
delete m_asExpr;
}
- void render(FTextStream &, TemplateContext *c)
+ void render(TextStream &, TemplateContext *c)
{
TemplateContextImpl *ci = dynamic_cast<TemplateContextImpl*>(c);
if (ci==0) return; // should not happen
@@ -4337,7 +4343,7 @@ class TemplateNodeResource : public TemplateNodeCreator<TemplateNodeResource>
if (m_asExpr)
{
QCString targetFile = m_asExpr->resolve(c).toString();
- mkpath(ci,targetFile);
+ mkpath(ci,targetFile.str());
if (targetFile.isEmpty())
{ ci->warn(m_templateName,m_line,"invalid parameter at right side of 'as' for resource command\n");
}
@@ -4367,7 +4373,7 @@ class TemplateNodeEncoding : public TemplateNodeCreator<TemplateNodeEncoding>
TemplateNodeEncoding(TemplateParser *parser,TemplateNode *parent,int line,const QCString &data)
: TemplateNodeCreator<TemplateNodeEncoding>(parser,parent,line)
{
- TRACE(("{TemplateNodeEncoding(%s)\n",data.data()));
+ TRACE(("{TemplateNodeEncoding(%s)\n",qPrint(data)));
ExpressionParser ep(parser,line);
if (data.isEmpty())
{
@@ -4381,13 +4387,13 @@ class TemplateNodeEncoding : public TemplateNodeCreator<TemplateNodeEncoding>
StringVector stopAt = { "endencoding" };
parser->parse(this,line,stopAt,m_nodes);
parser->removeNextToken(); // skip over endencoding
- TRACE(("}TemplateNodeEncoding(%s)\n",data.data()));
+ TRACE(("}TemplateNodeEncoding(%s)\n",qPrint(data)));
}
~TemplateNodeEncoding()
{
delete m_encExpr;
}
- void render(FTextStream &ts, TemplateContext *c)
+ void render(TextStream &ts, TemplateContext *c)
{
TemplateContextImpl *ci = dynamic_cast<TemplateContextImpl*>(c);
if (ci==0) return; // should not happen
@@ -4564,7 +4570,7 @@ class TemplateLexer
{ m_openChar=openChar; m_closeChar=closeChar; }
private:
void addToken(TemplateTokenStream &tokens,
- const char *data,int line,int startPos,int endPos,
+ const QCString &data,int line,int startPos,int endPos,
TemplateToken::Type type);
void reset();
const TemplateEngine *m_engine = 0;
@@ -4596,8 +4602,8 @@ void TemplateLexer::tokenize(TemplateTokenStream &tokens)
StateEndVariable
};
+ if (m_data.isEmpty()) return;
const char *p=m_data.data();
- if (p==0) return;
int state=StateText;
int pos=0;
int lastTokenPos=0;
@@ -4664,10 +4670,10 @@ void TemplateLexer::tokenize(TemplateTokenStream &tokens)
{
// found tag!
state=StateText;
- addToken(tokens,m_data.data(),line,lastTokenPos,
+ addToken(tokens,m_data,line,lastTokenPos,
emptyOutputLine ? startLinePos : markStartPos,
TemplateToken::Text);
- addToken(tokens,m_data.data(),line,markStartPos+2,
+ addToken(tokens,m_data,line,markStartPos+2,
pos-1,TemplateToken::Block);
lastTokenPos = pos+1;
}
@@ -4697,7 +4703,7 @@ void TemplateLexer::tokenize(TemplateTokenStream &tokens)
{
// found comment tag!
state=StateText;
- addToken(tokens,m_data.data(),line,lastTokenPos,
+ addToken(tokens,m_data,line,lastTokenPos,
emptyOutputLine ? startLinePos : markStartPos,
TemplateToken::Text);
lastTokenPos = pos+1;
@@ -4745,10 +4751,10 @@ void TemplateLexer::tokenize(TemplateTokenStream &tokens)
{
// found variable tag!
state=StateText;
- addToken(tokens,m_data.data(),line,lastTokenPos,
+ addToken(tokens,m_data,line,lastTokenPos,
emptyOutputLine ? startLinePos : markStartPos,
TemplateToken::Text);
- addToken(tokens,m_data.data(),line,markStartPos+2,
+ addToken(tokens,m_data,line,markStartPos+2,
pos-1,TemplateToken::Variable);
lastTokenPos = pos+1;
}
@@ -4778,22 +4784,21 @@ void TemplateLexer::tokenize(TemplateTokenStream &tokens)
}
if (lastTokenPos<pos)
{
- addToken(tokens,m_data.data(),line,
+ addToken(tokens,m_data,line,
lastTokenPos,pos,
TemplateToken::Text);
}
}
void TemplateLexer::addToken(TemplateTokenStream &tokens,
- const char *data,int line,
+ const QCString &data,int line,
int startPos,int endPos,
TemplateToken::Type type)
{
if (startPos<endPos)
{
int len = endPos-startPos+1;
- QCString text(len);
- qstrncpy(text.rawData(),data+startPos,len);
+ QCString text = data.mid(startPos,len);
if (type!=TemplateToken::Text) text = text.stripWhiteSpace();
tokens.push_back(std::make_unique<TemplateToken>(type,text,line));
}
@@ -4818,7 +4823,7 @@ void TemplateParser::parse(
{
auto tok = takeNextToken();
//printf("%p:Token type=%d data='%s' line=%d\n",
- // parent,tok->type,tok->data.data(),tok->line);
+ // parent,tok->type,qPrint(tok->data),tok->line);
switch(tok->type)
{
case TemplateToken::Text:
@@ -4836,7 +4841,7 @@ void TemplateParser::parse(
command=command.left(sep);
}
TemplateToken *tok_ptr = tok.get();
- if (std::find(stopAt.begin(),stopAt.end(),command)!=stopAt.end())
+ if (std::find(stopAt.begin(),stopAt.end(),command.str())!=stopAt.end())
{
prependToken(std::move(tok));
TRACE(("}TemplateParser::parse: stop\n"));
@@ -4862,11 +4867,11 @@ void TemplateParser::parse(
command=="endrange" || command=="endtabbing" ||
command=="endencoding")
{
- warn(m_templateName,tok_ptr->line,"Found tag '%s' without matching start tag",command.data());
+ warn(m_templateName,tok_ptr->line,"Found tag '%s' without matching start tag",qPrint(command));
}
else
{
- warn(m_templateName,tok_ptr->line,"Unknown tag '%s'",command.data());
+ warn(m_templateName,tok_ptr->line,"Unknown tag '%s'",qPrint(command));
}
}
break;
@@ -4881,7 +4886,7 @@ void TemplateParser::parse(
options+=s.c_str();
}
warn(m_templateName,line,"Unclosed tag in template, expected one of: %s",
- options.data());
+ qPrint(options));
}
TRACE(("}TemplateParser::parse: last token\n"));
}
@@ -4914,7 +4919,7 @@ void TemplateParser::prependToken(TemplateTokenPtr &&token)
m_tokens.push_front(std::move(token));
}
-void TemplateParser::warn(const char *fileName,int line,const char *fmt,...) const
+void TemplateParser::warn(const QCString &fileName,int line,const char *fmt,...) const
{
va_list args;
va_start(args,fmt);
@@ -4947,10 +4952,10 @@ TemplateImpl::TemplateImpl(TemplateEngine *engine,const QCString &name,const QCS
TemplateImpl::~TemplateImpl()
{
- //printf("deleting template %s\n",m_name.data());
+ //printf("deleting template %s\n",qPrint(m_name));
}
-void TemplateImpl::render(FTextStream &ts, TemplateContext *c)
+void TemplateImpl::render(TextStream &ts, TemplateContext *c)
{
TemplateContextImpl *ci = dynamic_cast<TemplateContextImpl*>(c);
if (ci==0) return; // should not happen
@@ -5003,19 +5008,20 @@ class TemplateEngine::Private
{
//for (int i=0;i<m_indent;i++) printf(" ");
//m_indent++;
- //printf("loadByName(%s,%d) {\n",fileName.data(),line);
+ //printf("loadByName(%s,%d) {\n",qPrint(fileName),line);
m_includeStack.emplace_back(IncludeEntry::Template,fileName,QCString(),line);
auto kv = m_templateCache.find(fileName.str());
if (kv==m_templateCache.end()) // first time template is referenced
{
QCString filePath = m_templateDirName+"/"+fileName;
- QFile f(filePath);
- if (f.open(IO_ReadOnly)) // read template from disk
+ std::ifstream f(filePath.str(),std::ifstream::in | std::ifstream::binary);
+ if (f.is_open()) // read template from disk
{
- QFileInfo fi(filePath);
- int size=fi.size();
+ FileInfo fi(filePath.str());
+ int size=(int)fi.size();
QCString data(size+1);
- if (f.readBlock(data.rawData(),size)==size)
+ f.read(data.rawData(),size);
+ if (!f.fail())
{
kv = m_templateCache.insert(
std::make_pair(fileName.str(),
@@ -5033,7 +5039,7 @@ class TemplateEngine::Private
}
else
{
- err("Could not open template file %s\n",fileName.data());
+ err("Could not open template file %s\n",qPrint(fileName));
}
}
}
@@ -5053,7 +5059,7 @@ class TemplateEngine::Private
{
//for (int i=0;i<m_indent;i++) printf(" ");
//m_indent++;
- //printf("enterBlock(%s,%s,%d) {\n",fileName.data(),blockName.data(),line);
+ //printf("enterBlock(%s,%s,%d) {\n",qPrint(fileName),qPrint(blockName),line);
m_includeStack.emplace_back(IncludeEntry::Block,fileName,blockName,line);
}
@@ -5065,7 +5071,7 @@ class TemplateEngine::Private
m_includeStack.pop_back();
}
- void printIncludeContext(const char *fileName,int line) const
+ void printIncludeContext(const QCString &fileName,int line) const
{
auto it = m_includeStack.rbegin();
while (it!=m_includeStack.rend())
@@ -5077,18 +5083,18 @@ class TemplateEngine::Private
{
if (next)
{
- warn(fileName,line," inside template '%s' included from template '%s' at line %d",ie.fileName().data(),next->fileName().data(),ie.line());
+ warn(fileName,line," inside template '%s' included from template '%s' at line %d",qPrint(ie.fileName()),qPrint(next->fileName()),ie.line());
}
}
else // ie.type()==IncludeEntry::Block
{
- warn(fileName,line," included by block '%s' inside template '%s' at line %d",ie.blockName().data(),
- ie.fileName().data(),ie.line());
+ warn(fileName,line," included by block '%s' inside template '%s' at line %d",qPrint(ie.blockName()),
+ qPrint(ie.fileName()),ie.line());
}
}
}
- void setOutputExtension(const char *extension)
+ void setOutputExtension(const QCString &extension)
{
m_extension = extension;
}
@@ -5098,7 +5104,7 @@ class TemplateEngine::Private
return m_extension;
}
- void setTemplateDir(const char *dirName)
+ void setTemplateDir(const QCString &dirName)
{
m_templateDirName = dirName;
}
@@ -5152,12 +5158,12 @@ void TemplateEngine::leaveBlock()
p->leaveBlock();
}
-void TemplateEngine::printIncludeContext(const char *fileName,int line) const
+void TemplateEngine::printIncludeContext(const QCString &fileName,int line) const
{
p->printIncludeContext(fileName,line);
}
-void TemplateEngine::setOutputExtension(const char *extension)
+void TemplateEngine::setOutputExtension(const QCString &extension)
{
p->setOutputExtension(extension);
}
@@ -5167,7 +5173,7 @@ QCString TemplateEngine::outputExtension() const
return p->outputExtension();
}
-void TemplateEngine::setTemplateDir(const char *dirName)
+void TemplateEngine::setTemplateDir(const QCString &dirName)
{
p->setTemplateDir(dirName);
}
diff --git a/src/template.h b/src/template.h
index c9e9041..dee063d 100644
--- a/src/template.h
+++ b/src/template.h
@@ -16,14 +16,14 @@
#ifndef TEMPLATE_H
#define TEMPLATE_H
-#include <qcstring.h>
#include <vector>
-class FTextStream;
+#include "qcstring.h"
class TemplateListIntf;
class TemplateStructIntf;
class TemplateEngine;
+class TextStream;
/** @defgroup template_api Template API
*
@@ -412,7 +412,7 @@ class TemplateStructIntf
/** Gets the value for a field name.
* @param[in] name The name of the field.
*/
- virtual TemplateVariant get(const char *name) const = 0;
+ virtual TemplateVariant get(const QCString &name) const = 0;
/** Increase object's reference count */
virtual int addRef() = 0;
@@ -427,7 +427,7 @@ class TemplateStruct : public TemplateStructIntf
{
public:
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef();
virtual int release();
@@ -438,7 +438,7 @@ class TemplateStruct : public TemplateStructIntf
* @param[in] name The name of the field.
* @param[in] v The value to set.
*/
- virtual void set(const char *name,const TemplateVariant &v);
+ virtual void set(const QCString &name,const TemplateVariant &v);
private:
@@ -505,7 +505,7 @@ class TemplateContext
* @note When a given key is already present,
* its value will be replaced by \a v
*/
- virtual void set(const char *name,const TemplateVariant &v) = 0;
+ virtual void set(const QCString &name,const TemplateVariant &v) = 0;
/** Gets the value for a given key
* @param[in] name The name of key.
@@ -552,7 +552,7 @@ class Template
* @param[in] c The context containing data that can be used
* when instantiating the template.
*/
- virtual void render(FTextStream &ts,TemplateContext *c) = 0;
+ virtual void render(TextStream &ts,TemplateContext *c) = 0;
};
//------------------------------------------------------------------------
@@ -590,10 +590,10 @@ class TemplateEngine
void unload(Template *t);
/** Prints the current template file include stack */
- void printIncludeContext(const char *fileName,int line) const;
+ void printIncludeContext(const QCString &fileName,int line) const;
/** Sets the search directory where to look for template files */
- void setTemplateDir(const char *dirName);
+ void setTemplateDir(const QCString &dirName);
private:
friend class TemplateNodeBlock;
@@ -605,7 +605,7 @@ class TemplateEngine
/** Sets the extension of the output file. This is used to control the
* format of 'special' tags in the template
*/
- void setOutputExtension(const char *extension);
+ void setOutputExtension(const QCString &extension);
/** Returns the output extension, set via setOutputExtension() */
QCString outputExtension() const;
diff --git a/src/textdocvisitor.cpp b/src/textdocvisitor.cpp
index b6c90e3..47cd56e 100644
--- a/src/textdocvisitor.cpp
+++ b/src/textdocvisitor.cpp
@@ -1,13 +1,13 @@
/******************************************************************************
*
- *
+ *
*
*
* Copyright (C) 1997-2015 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
- * documentation under the terms of the GNU General Public License is hereby
- * granted. No representations are made about the suitability of this software
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
@@ -16,7 +16,6 @@
*
*/
-#include <qdir.h>
#include "textdocvisitor.h"
#include "message.h"
#include "util.h"
@@ -51,11 +50,11 @@ void TextDocVisitor::visit(DocEmoji *s)
}
}
-void TextDocVisitor::filter(const char *str)
-{
- if (str==0) return;
+void TextDocVisitor::filter(const QCString &str)
+{
+ if (str.isEmpty()) return;
//printf("TextDocVisitor::filter(%s)\n",str);
- const char *p=str;
+ const char *p=str.data();
char c;
while (*p)
{
diff --git a/src/textdocvisitor.h b/src/textdocvisitor.h
index e424529..7439b6b 100644
--- a/src/textdocvisitor.h
+++ b/src/textdocvisitor.h
@@ -19,17 +19,16 @@
#ifndef _TEXTDOCVISITOR_H
#define _TEXTDOCVISITOR_H
+#include "qcstring.h"
#include "docvisitor.h"
#include "docparser.h"
-#include <qcstring.h>
-#include "ftextstream.h"
-
+#include "textstream.h"
/*! @brief Concrete visitor implementation for TEXT output. */
class TextDocVisitor : public DocVisitor
{
public:
- TextDocVisitor(FTextStream &t) : DocVisitor(DocVisitor_Text), m_t(t) {}
+ TextDocVisitor(TextStream &t) : DocVisitor(DocVisitor_Text), m_t(t) {}
//--------------------------------------
// visitor functions for leaf nodes
@@ -135,9 +134,9 @@ class TextDocVisitor : public DocVisitor
private:
- void filter(const char *str);
+ void filter(const QCString &str);
- FTextStream &m_t;
+ TextStream &m_t;
};
#endif
diff --git a/src/textstream.h b/src/textstream.h
new file mode 100644
index 0000000..a9c4a31
--- /dev/null
+++ b/src/textstream.h
@@ -0,0 +1,251 @@
+/******************************************************************************
+ *
+ * Copyright (C) 1997-2021 by Dimitri van Heesch.
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
+ * for any purpose. It is provided "as is" without express or implied warranty.
+ * See the GNU General Public License for more details.
+ *
+ * Documents produced by Doxygen are derivative works derived from the
+ * input used in their production; they are not affected by this license.
+ *
+ */
+
+#ifndef TEXTSTREAM_H
+#define TEXTSTREAM_H
+
+#include <string>
+#include <iostream>
+#include <sstream>
+#include <cstdint>
+#include <cstdio>
+#include <fstream>
+
+#include "qcstring.h"
+
+/** @brief Text streaming class that buffers data.
+ *
+ * Simpler version of std::ostringstream that has much better
+ * performance.
+ */
+class TextStream final
+{
+ static const int INITIAL_CAPACITY = 4096;
+ public:
+ /** Creates an empty stream object.
+ */
+ TextStream()
+ {
+ m_buffer.reserve(INITIAL_CAPACITY);
+ }
+ /** Create a text stream object for writing to a std::ostream.
+ * @note data is buffered until flush() is called or the object is destroyed.
+ */
+ TextStream(std::ostream *s) : m_s(s)
+ {
+ m_buffer.reserve(INITIAL_CAPACITY);
+ }
+ /** Create a text stream, initializing the buffer with string \a s
+ */
+ TextStream(const std::string &s) : m_buffer(s)
+ {
+ m_buffer.reserve(s.length()+INITIAL_CAPACITY);
+ }
+
+ /** Writes any data that is buffered to the attached std::ostream */
+ ~TextStream() { flush(); }
+
+ TextStream(const TextStream &) = delete;
+ TextStream &operator=(const TextStream &) = delete;
+
+ /** Sets or changes the std::ostream to write to.
+ * @note Any data already buffered will be flushed.
+ */
+ void setStream(std::ostream *s)
+ {
+ flush();
+ m_s = s;
+ }
+
+ void setFile(FILE *f)
+ {
+ flush();
+ m_f = f;
+ }
+
+ /** Returns the attached std::ostream object.
+ * @see setStream()
+ */
+ std::ostream *stream() const
+ {
+ return m_s;
+ }
+
+ FILE *file() const
+ {
+ return m_f;
+ }
+
+ /** Adds a character to the stream */
+ TextStream &operator<<( char c)
+ {
+ m_buffer+=c;
+ return static_cast<TextStream&>(*this);
+ }
+
+ /** Adds a C-style string to the stream */
+ TextStream &operator<<( const char *s)
+ {
+ if (s) m_buffer+=s;
+ return static_cast<TextStream&>(*this);
+ }
+
+ /** Adds a QCString to the stream */
+ TextStream &operator<<( const QCString &s )
+ {
+ m_buffer+=s.str();
+ return static_cast<TextStream&>(*this);
+ }
+
+ /** Adds a std::string to the stream */
+ TextStream &operator<<( const std::string &s )
+ {
+ m_buffer+=s;
+ return static_cast<TextStream&>(*this);
+ }
+
+ /** Adds a signed short integer to the stream */
+ TextStream &operator<<( signed short i)
+ {
+ output_int32(i,i<0);
+ return static_cast<TextStream&>(*this);
+ }
+
+ /** Adds a unsigned short integer to the stream */
+ TextStream &operator<<( unsigned short i)
+ {
+ output_int32(i,false);
+ return static_cast<TextStream&>(*this);
+ }
+
+ /** Adds a signed integer to the stream */
+ TextStream &operator<<( signed int i)
+ {
+ output_int32(i,i<0);
+ return static_cast<TextStream&>(*this);
+ }
+
+ /** Adds a unsigned integer to the stream */
+ TextStream &operator<<( unsigned int i)
+ {
+ output_int32(i,false);
+ return static_cast<TextStream&>(*this);
+ }
+
+ /** Adds a float to the stream */
+ TextStream &operator<<( float f)
+ {
+ output_double((double)f);
+ return static_cast<TextStream&>(*this);
+ }
+
+ /** Adds a double to the stream */
+ TextStream &operator<<( double d)
+ {
+ output_double(d);
+ return static_cast<TextStream&>(*this);
+ }
+
+ /** Adds a array of character to the stream
+ * @param buf the character buffer
+ * @param len the number of characters in the buffer to write
+ */
+ void write(const char *buf,size_t len)
+ {
+ m_buffer.append(buf,len);
+ }
+
+ /** Flushes the buffer. If a std::ostream is attached, the buffer's
+ * contents will be written to the stream.
+ */
+ void flush()
+ {
+ if (m_s)
+ {
+ m_s->write(m_buffer.c_str(),m_buffer.length());
+ }
+ else if (m_f)
+ {
+ fwrite(m_buffer.c_str(),1,m_buffer.length(),m_f);
+ }
+ m_buffer.clear();
+ }
+
+ /** Clears any buffered data */
+ void clear()
+ {
+ m_buffer.clear();
+ }
+
+ /** Return the contents of the buffer as a std::string object */
+ std::string str() const
+ {
+ return m_buffer;
+ }
+
+ /** Sets the buffer's contents to string \a s.
+ * Any data already in the buffer will be flushed.
+ */
+ void str(const std::string &s)
+ {
+ flush();
+ m_buffer=s;
+ }
+
+ /** Sets the buffer's contents to string \a s
+ * Any data already in the buffer will be flushed.
+ */
+ void str(const char *s)
+ {
+ flush();
+ if (s) m_buffer=s;
+ }
+
+ /** Returns true iff the buffer is empty */
+ bool empty() const
+ {
+ return m_buffer.empty();
+ }
+
+ private:
+ /** Writes a string representation of an integer to the buffer
+ * @param n the absolute value of the integer
+ * @param neg indicates if the integer is negative
+ */
+ void output_int32( uint32_t n, bool neg )
+ {
+ char buf[20];
+ char *p = &buf[19];
+ *p = '\0';
+ if ( neg )
+ {
+ n = (uint32_t)(-(int32_t)n);
+ }
+ do { *--p = ((int32_t)(n%10)) + '0'; n /= 10; } while ( n );
+ if ( neg ) *--p = '-';
+ m_buffer+=p;
+ }
+ void output_double( double d)
+ {
+ char buf[64];
+ snprintf(buf,64,"%f",d);
+ m_buffer+=buf;
+ }
+ std::string m_buffer;
+ std::ostream *m_s = nullptr;
+ FILE *m_f = nullptr;
+};
+
+#endif
diff --git a/src/tooltip.cpp b/src/tooltip.cpp
index f8222d7..5768b0a 100644
--- a/src/tooltip.cpp
+++ b/src/tooltip.cpp
@@ -56,15 +56,10 @@ TooltipManager::~TooltipManager()
{
}
-static QCString escapeId(const char *s)
+static QCString escapeId(const QCString &s)
{
QCString res=s;
- char *p=res.rawData();
- while (*p)
- {
- if (!isId(*p)) *p='_';
- p++;
- }
+ for (uint i=0;i<res.length();i++) if (!isId(res[i])) res[i]='_';
return res;
}
diff --git a/src/translator.h b/src/translator.h
index bcc70ff..02f2ccf 100644
--- a/src/translator.h
+++ b/src/translator.h
@@ -31,7 +31,7 @@ class Translator
* if the user chooses a language whose translation is not up to date.
* It is implemented by the adapter classes.
*/
- virtual QCString updateNeededMessage() { return ""; }
+ virtual QCString updateNeededMessage() { return QCString(); }
virtual ~Translator() {}
// Please, have a look at comments inside the translator_en.h file
@@ -49,22 +49,22 @@ class Translator
* this routine. In case no font encoding is required the empty string
* can be returned.
*/
- virtual QCString latexFontenc() { return "T1"; }
+ virtual QCString latexFontenc() { return QCString("T1"); }
virtual QCString latexFont() {
- return "\\usepackage[scaled=.90]{helvet}\n"
+ return QCString("\\usepackage[scaled=.90]{helvet}\n"
"\\usepackage{courier}\n"
- "\\renewcommand{\\familydefault}{\\sfdefault}\n";
+ "\\renewcommand{\\familydefault}{\\sfdefault}\n");
}
/*!
* Sets the commands to be inserted directly after the `\\begin{document}`
* in the LaTeX document.
*/
- virtual QCString latexDocumentPre() { return ""; }
+ virtual QCString latexDocumentPre() { return QCString(""); }
/*!
* Sets the commands to be inserted directly before the `\\end{document}`
* in the LaTeX document.
*/
- virtual QCString latexDocumentPost() { return ""; }
+ virtual QCString latexDocumentPost() { return QCString(""); }
/*!
* Set the name to be used as latex command.
*/
@@ -94,7 +94,7 @@ class Translator
virtual QCString trMemberList() = 0;
virtual QCString trThisIsTheListOfAllMembers() = 0;
virtual QCString trIncludingInheritedMembers() = 0;
- virtual QCString trGeneratedAutomatically(const char *s) = 0;
+ virtual QCString trGeneratedAutomatically(const QCString &s) = 0;
virtual QCString trEnumName() = 0;
virtual QCString trEnumValue() = 0;
virtual QCString trDefinedIn() = 0;
@@ -149,9 +149,9 @@ class Translator
virtual QCString trFunctionDocumentation() = 0;
virtual QCString trVariableDocumentation() = 0;
virtual QCString trCompounds() = 0;
- virtual QCString trGeneratedAt(const char *date,const char *projName) = 0;
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName) = 0;
//virtual QCString trWrittenBy() = 0;
- virtual QCString trClassDiagram(const char *clName) = 0;
+ virtual QCString trClassDiagram(const QCString &clName) = 0;
virtual QCString trForInternalUseOnly() = 0;
//virtual QCString trReimplementedForInternalReasons() = 0;
virtual QCString trWarning() = 0;
@@ -182,12 +182,12 @@ class Translator
// new since 0.49-990425
//////////////////////////////////////////////////////////////////////////
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate) = 0;
- virtual QCString trFileReference(const char *fileName) = 0;
- virtual QCString trNamespaceReference(const char *namespaceName) = 0;
+ virtual QCString trFileReference(const QCString &fileName) = 0;
+ virtual QCString trNamespaceReference(const QCString &namespaceName) = 0;
virtual QCString trPublicMembers() = 0;
virtual QCString trPublicSlots() = 0;
@@ -249,8 +249,8 @@ class Translator
// new since 1.0.0
//////////////////////////////////////////////////////////////////////////
- virtual QCString trCollaborationDiagram(const char *clName) = 0;
- virtual QCString trInclDepGraph(const char *fName) = 0;
+ virtual QCString trCollaborationDiagram(const QCString &clName) = 0;
+ virtual QCString trInclDepGraph(const QCString &fName) = 0;
virtual QCString trConstructorDocumentation() = 0;
virtual QCString trGotoSourceCode() = 0;
virtual QCString trGotoDocumentation() = 0;
@@ -331,7 +331,7 @@ class Translator
//virtual QCString trInterfaces() = 0;
virtual QCString trClasses() = 0;
- virtual QCString trPackage(const char *name) = 0;
+ virtual QCString trPackage(const QCString &name) = 0;
virtual QCString trPackageList() = 0;
virtual QCString trPackageListDescription() = 0;
virtual QCString trPackages() = 0;
@@ -497,7 +497,7 @@ class Translator
virtual QCString trDirDocumentation() = 0;
virtual QCString trDirectories() = 0;
virtual QCString trDirDescription() = 0;
- virtual QCString trDirReference(const char *dirName) = 0;
+ virtual QCString trDirReference(const QCString &dirName) = 0;
virtual QCString trDir(bool first_capital, bool singular) = 0;
//////////////////////////////////////////////////////////////////////////
@@ -529,10 +529,10 @@ class Translator
virtual QCString trDataTypes() = 0;
virtual QCString trModulesList() = 0;
virtual QCString trModulesListDescription(bool extractAll) = 0;
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate) = 0;
- virtual QCString trModuleReference(const char *namespaceName) = 0;
+ virtual QCString trModuleReference(const QCString &namespaceName) = 0;
virtual QCString trModulesMembers() = 0;
virtual QCString trModulesMemberDescription(bool extractAll) = 0;
virtual QCString trModulesIndex() = 0;
@@ -547,7 +547,7 @@ class Translator
// new since 1.6.0
//////////////////////////////////////////////////////////////////////////
- virtual QCString trDirRelation(const char *name) = 0;
+ virtual QCString trDirRelation(const QCString &name) = 0;
virtual QCString trLoading() = 0;
virtual QCString trGlobalNamespace() = 0;
virtual QCString trSearching() = 0;
@@ -557,9 +557,9 @@ class Translator
// new since 1.6.3
//////////////////////////////////////////////////////////////////////////
- //virtual QCString trDirDependency(const char *name) = 0;
- virtual QCString trFileIn(const char *name) = 0;
- virtual QCString trIncludesFileIn(const char *name) = 0;
+ //virtual QCString trDirDependency(const QCString &name) = 0;
+ virtual QCString trFileIn(const QCString &name) = 0;
+ virtual QCString trIncludesFileIn(const QCString &name) = 0;
virtual QCString trDateTime(int year,int month,int day,int dayOfWeek,
int hour,int minutes,int seconds,
bool includeTime) = 0;
@@ -570,7 +570,7 @@ class Translator
virtual QCString trCiteReferences() = 0;
virtual QCString trCopyright() = 0;
- virtual QCString trDirDepGraph(const char *name) = 0;
+ virtual QCString trDirDepGraph(const QCString &name) = 0;
//////////////////////////////////////////////////////////////////////////
// new since 1.8.0
@@ -580,8 +580,8 @@ class Translator
virtual QCString trTemplateParameters() = 0;
virtual QCString trAndMore(const QCString &number) = 0;
virtual QCString trEnumGeneratedFromFiles(bool single) = 0;
- virtual QCString trEnumReference(const char *name) = 0;
- virtual QCString trInheritedFrom(const char *members,const char *what) = 0;
+ virtual QCString trEnumReference(const QCString &name) = 0;
+ virtual QCString trInheritedFrom(const QCString &members,const QCString &what) = 0;
virtual QCString trAdditionalInheritedMembers() = 0;
//////////////////////////////////////////////////////////////////////////
@@ -602,9 +602,9 @@ class Translator
virtual QCString trInterfaces() = 0;
virtual QCString trServices() = 0;
virtual QCString trConstantGroups() = 0;
- virtual QCString trConstantGroupReference(const char *namespaceName) = 0;
- virtual QCString trServiceReference(const char *sName) = 0;
- virtual QCString trSingletonReference(const char *sName) = 0;
+ virtual QCString trConstantGroupReference(const QCString &namespaceName) = 0;
+ virtual QCString trServiceReference(const QCString &sName) = 0;
+ virtual QCString trSingletonReference(const QCString &sName) = 0;
virtual QCString trServiceGeneratedFromFiles(bool single) = 0;
virtual QCString trSingletonGeneratedFromFiles(bool single) = 0;
@@ -620,7 +620,7 @@ class Translator
virtual QCString trDesignUnits() = 0;
virtual QCString trFunctionAndProc() = 0;
virtual QCString trVhdlType(uint64 type,bool single) = 0;
- virtual QCString trCustomReference(const char *name) = 0;
+ virtual QCString trCustomReference(const QCString &name) = 0;
virtual QCString trConstants() = 0;
virtual QCString trConstantDocumentation() = 0;
@@ -646,7 +646,7 @@ class Translator
virtual QCString trExceptionHierarchy() = 0;
virtual QCString trExceptionHierarchyDescription() = 0;
virtual QCString trExceptionDocumentation() = 0;
- virtual QCString trCompoundReferenceSlice(const char *clName, ClassDef::CompoundType compType, bool isLocal) = 0;
+ virtual QCString trCompoundReferenceSlice(const QCString &clName, ClassDef::CompoundType compType, bool isLocal) = 0;
virtual QCString trOperations() = 0;
virtual QCString trOperationDocumentation() = 0;
virtual QCString trDataMembers() = 0;
@@ -657,6 +657,18 @@ class Translator
//////////////////////////////////////////////////////////////////////////
virtual QCString trDesignUnitDocumentation() = 0;
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.9.2
+//////////////////////////////////////////////////////////////////////////
+
+ virtual QCString trConcept(bool first_capital, bool singular) = 0;
+ virtual QCString trConceptReference(const QCString &conceptName) = 0;
+ virtual QCString trConceptList() = 0;
+ virtual QCString trConceptIndex() = 0;
+ virtual QCString trConceptDocumentation() = 0;
+ virtual QCString trConceptListDescription(bool extractAll) = 0;
+ virtual QCString trConceptDefinition() = 0;
};
#endif
diff --git a/src/translator_adapter.h b/src/translator_adapter.h
index 388304c..54a0a35 100644
--- a/src/translator_adapter.h
+++ b/src/translator_adapter.h
@@ -41,7 +41,35 @@ class TranslatorAdapterBase : public Translator
};
-class TranslatorAdapter_1_8_19 : public TranslatorAdapterBase
+class TranslatorAdapter_1_9_2 : public TranslatorAdapterBase
+{
+ public:
+ virtual QCString updateNeededMessage()
+ { return createUpdateNeededMessage(idLanguage(),"release 1.9.2"); }
+
+ virtual QCString trConcept(bool first_capital,bool singular)
+ { return english.trConcept(first_capital,singular); }
+
+ virtual QCString trConceptReference(const QCString &conceptName)
+ { return english.trConceptReference(conceptName); }
+
+ virtual QCString trConceptList()
+ { return english.trConceptList(); }
+
+ virtual QCString trConceptIndex()
+ { return english.trConceptIndex(); }
+
+ virtual QCString trConceptDocumentation()
+ { return english.trConceptDocumentation(); }
+
+ virtual QCString trConceptListDescription(bool extractAll)
+ { return english.trConceptListDescription(extractAll); }
+
+ virtual QCString trConceptDefinition()
+ { return english.trConceptDefinition(); }
+};
+
+class TranslatorAdapter_1_8_19 : public TranslatorAdapter_1_9_2
{
public:
virtual QCString updateNeededMessage()
@@ -81,7 +109,7 @@ class TranslatorAdapter_1_8_15 : public TranslatorAdapter_1_8_19
virtual QCString trVhdlType(uint64 type,bool single)
{ return english.trVhdlType(type,single); }
- virtual QCString trCustomReference(const char *name)
+ virtual QCString trCustomReference(const QCString &name)
{ return english.trCustomReference(name); }
virtual QCString trConstants()
@@ -156,7 +184,7 @@ class TranslatorAdapter_1_8_15 : public TranslatorAdapter_1_8_19
virtual QCString trExceptionDocumentation()
{ return english.trExceptionDocumentation(); }
- virtual QCString trCompoundReferenceSlice(const char *clName, ClassDef::CompoundType compType, bool isLocal)
+ virtual QCString trCompoundReferenceSlice(const QCString &clName, ClassDef::CompoundType compType, bool isLocal)
{ return english.trCompoundReferenceSlice(clName,compType,isLocal); }
virtual QCString trOperations()
@@ -187,13 +215,13 @@ class TranslatorAdapter_1_8_4 : public TranslatorAdapter_1_8_15
virtual QCString trConstantGroups()
{ return english.trConstantGroups(); }
- virtual QCString trConstantGroupReference(const char *namespaceName)
+ virtual QCString trConstantGroupReference(const QCString &namespaceName)
{ return english.trConstantGroupReference(namespaceName); }
- virtual QCString trServiceReference(const char *sName)
+ virtual QCString trServiceReference(const QCString &sName)
{ return english.trServiceReference(sName); }
- virtual QCString trSingletonReference(const char *sName)
+ virtual QCString trSingletonReference(const QCString &sName)
{ return english.trSingletonReference(sName); }
virtual QCString trServiceGeneratedFromFiles(bool single)
@@ -250,10 +278,10 @@ class TranslatorAdapter_1_8_0 : public TranslatorAdapter_1_8_2
virtual QCString trEnumGeneratedFromFiles(bool single)
{ return english.trEnumGeneratedFromFiles(single); }
- virtual QCString trEnumReference(const char *name)
+ virtual QCString trEnumReference(const QCString &name)
{ return english.trEnumReference(name); }
- virtual QCString trInheritedFrom(const char *members,const char *what)
+ virtual QCString trInheritedFrom(const QCString &members,const QCString &what)
{ return english.trInheritedFrom(members,what); }
virtual QCString trAdditionalInheritedMembers()
@@ -276,12 +304,12 @@ class TranslatorAdapter_1_7_5 : public TranslatorAdapter_1_8_0
virtual QCString trCopyright()
{ return english.trCopyright(); }
- virtual QCString trDirDepGraph(const char *name)
+ virtual QCString trDirDepGraph(const QCString &name)
{ return english.trDirDepGraph(name); }
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{ return english.trFileIn(name); }
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{ return english.trIncludesFileIn(name); }
virtual QCString trDateTime(int year,int month,int day,int dayOfWeek,
int hour,int minutes,int seconds,
@@ -298,7 +326,7 @@ class TranslatorAdapter_1_6_0 : public TranslatorAdapter_1_7_5
virtual QCString updateNeededMessage()
{ return createUpdateNeededMessage(idLanguage(),"release 1.6.0"); }
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{ return english.trDirRelation(name); }
virtual QCString trLoading()
@@ -349,12 +377,12 @@ class TranslatorAdapter_1_6_0 : public TranslatorAdapter_1_7_5
virtual QCString trModulesListDescription(bool extractAll)
{ return english.trModulesListDescription(extractAll); }
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{ return english.trCompoundReferenceFortran(clName,compType,isTemplate); }
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{ return english.trModuleReference(namespaceName); }
virtual QCString trModulesMembers()
diff --git a/src/translator_am.h b/src/translator_am.h
index 812d8fb..6e7a9a8 100644
--- a/src/translator_am.h
+++ b/src/translator_am.h
@@ -108,9 +108,9 @@ class TranslatorArmenian : public TranslatorAdapter_1_8_0
/*! this is put at the author sections at the bottom of man pages.
* parameter s is name of the project name.
*/
- virtual QCString trGeneratedAutomatically(const char *s)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Ավտոմատ ստեղծված է ելքային կոդից, Doxygen-ի միջոցով, ";
- if (s) result+=s+(QCString)" համար:";
+ if (!s.isEmpty()) result+=s+(QCString)" համար:";
return result;
}
@@ -457,16 +457,16 @@ class TranslatorArmenian : public TranslatorAdapter_1_8_0
/*! This is used in the standard footer of each page and indicates when
* the page was generated
*/
- virtual QCString trGeneratedAt(const char *date,const char *projName)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"Ստեղծվել է "+date;
- if (projName) result+=projName+QCString(" -ի համար,");
+ if (!projName.isEmpty()) result+=projName+QCString(" -ի համար,");
result+=(QCString)" հետևյալ համակարգով.";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return clName+QCString(" -ի ժառանգման գծագիրը.");
}
@@ -545,7 +545,7 @@ class TranslatorArmenian : public TranslatorAdapter_1_8_0
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -583,13 +583,13 @@ class TranslatorArmenian : public TranslatorAdapter_1_8_0
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
return fileName+QCString(" ֆայլեր");
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" անունների տարածություններ";
@@ -787,12 +787,12 @@ class TranslatorArmenian : public TranslatorAdapter_1_8_0
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)clName+"-ի համագործակցությունների գծագիր.";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)fName+"-ի ներառումների կախվածությունների գծագիր.";
}
@@ -1074,7 +1074,7 @@ class TranslatorArmenian : public TranslatorAdapter_1_8_0
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Փաթեթ "+name;
}
@@ -1446,7 +1446,7 @@ class TranslatorArmenian : public TranslatorAdapter_1_8_0
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result=dirName; result+=" Ֆայլադարան"; return result; }
/*! This returns the word directory with or without starting capital
@@ -1572,7 +1572,7 @@ class TranslatorArmenian : public TranslatorAdapter_1_8_0
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1609,7 +1609,7 @@ class TranslatorArmenian : public TranslatorAdapter_1_8_0
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
return QCString("Մոդուլ ") + namespaceName;
}
@@ -1705,7 +1705,7 @@ class TranslatorArmenian : public TranslatorAdapter_1_8_0
//////////////////////////////////////////////////////////////////////////
/*! directory relation for \a name */
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
return QCString(name)+" Կապ";
}
@@ -1742,7 +1742,7 @@ class TranslatorArmenian : public TranslatorAdapter_1_8_0
* table is shown. The heading for the first column mentions the
* source file that has a relation to another file.
*/
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return (QCString)"Ֆայլը " + name + " ում";
}
@@ -1751,7 +1751,7 @@ class TranslatorArmenian : public TranslatorAdapter_1_8_0
* table is shown. The heading for the second column mentions the
* destination file that is included.
*/
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return (QCString)"Ներառում է ֆայլը " + name + " ում";
}
@@ -1798,7 +1798,7 @@ class TranslatorArmenian : public TranslatorAdapter_1_8_0
{ return "Հեղինակային իրավունք"; }
/*! Header for the graph showing the directory dependencies */
- virtual QCString trDirDepGraph(const char *name)
+ virtual QCString trDirDepGraph(const QCString &name)
{ return name + QCString("-ի ֆայլադարանների կախվածությունների գծագիր:"); }
};
diff --git a/src/translator_ar.h b/src/translator_ar.h
index 0989249..f847f5b 100644
--- a/src/translator_ar.h
+++ b/src/translator_ar.h
@@ -133,9 +133,9 @@ class TranslatorArabic : public TranslatorAdapter_1_4_6
/*! this is put at the author sections at the bottom of man pages.
* parameter s is name of the project name.
*/
- virtual QCString trGeneratedAutomatically(const char *s)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="تم تكوينها آليا بواسطة Doxygen";
- if (s) result+=(QCString)" لـ "+s;
+ if (!s.isEmpty()) result+=(QCString)" لـ "+s;
result+=" من ملفات المصدر.";
return result;
}
@@ -513,16 +513,16 @@ class TranslatorArabic : public TranslatorAdapter_1_4_6
/*! This is used in the standard footer of each page and indicates when
* the page was generated
*/
- virtual QCString trGeneratedAt(const char *date,const char *projName)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"Generated on "+date;
- if (projName) result+=(QCString)" for "+projName;
+ if (!projName.isEmpty()) result+=(QCString)" for "+projName;
result+=(QCString)" by";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return (QCString)"Inheritance diagram for "+clName+":";
}
@@ -609,7 +609,7 @@ class TranslatorArabic : public TranslatorAdapter_1_4_6
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -631,7 +631,7 @@ class TranslatorArabic : public TranslatorAdapter_1_4_6
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result=fileName;
result+=" File Reference";
@@ -639,7 +639,7 @@ class TranslatorArabic : public TranslatorAdapter_1_4_6
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" Namespace Reference";
@@ -840,12 +840,12 @@ class TranslatorArabic : public TranslatorAdapter_1_4_6
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"رسم التعاون لـ "+clName+":";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"رسم اعتمادية التضمين لـ "+fName+":";
}
@@ -1131,7 +1131,7 @@ class TranslatorArabic : public TranslatorAdapter_1_4_6
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"حزمة "+name;
}
@@ -1541,7 +1541,7 @@ class TranslatorArabic : public TranslatorAdapter_1_4_6
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result=" مرجع الدليل"; result+=dirName; return result; }
/*! This returns the word directory with or without starting capital
diff --git a/src/translator_br.h b/src/translator_br.h
index e180f62..baa4710 100644
--- a/src/translator_br.h
+++ b/src/translator_br.h
@@ -52,7 +52,7 @@
#ifndef TRANSLATOR_BR_H
#define TRANSLATOR_BR_H
-class TranslatorBrazilian : public Translator
+class TranslatorBrazilian : public TranslatorAdapter_1_9_2
{
public:
@@ -164,9 +164,9 @@ class TranslatorBrazilian : public Translator
/*! this is put at the author sections at the bottom of man pages.
* parameter s is name of the project name.
*/
- virtual QCString trGeneratedAutomatically(const char *s)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Gerado automaticamente por Doxygen";
- if (s) result+=(QCString)" para "+s;
+ if (!s.isEmpty()) result+=(QCString)" para "+s;
result+=" a partir do código-fonte.";
return result;
}
@@ -530,16 +530,16 @@ class TranslatorBrazilian : public Translator
/*! This is used in the standard footer of each page and indicates when
* the page was generated
*/
- virtual QCString trGeneratedAt(const char *date,const char *projName)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"Gerado em "+date;
- if (projName) result+=(QCString)" para "+projName;
+ if (!projName.isEmpty()) result+=(QCString)" para "+projName;
result+=(QCString)" por";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return (QCString)"Diagrama de hierarquia para "+clName+":";
}
@@ -618,7 +618,7 @@ class TranslatorBrazilian : public Translator
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -648,7 +648,7 @@ class TranslatorBrazilian : public Translator
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result = "Referência do Arquivo ";
result += fileName;
@@ -656,7 +656,7 @@ class TranslatorBrazilian : public Translator
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result ="Refência do Namespace ";
result += namespaceName;
@@ -882,12 +882,12 @@ class TranslatorBrazilian : public Translator
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Diagrama de colaboração para "+clName+":";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Gráfico de dependência de inclusões para "+fName+":";
}
@@ -1170,7 +1170,7 @@ class TranslatorBrazilian : public Translator
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Pacote "+name;
}
@@ -1566,7 +1566,7 @@ class TranslatorBrazilian : public Translator
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{
QCString result = "Referência do diretório ";
result += dirName;
@@ -1695,7 +1695,7 @@ class TranslatorBrazilian : public Translator
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1719,7 +1719,7 @@ class TranslatorBrazilian : public Translator
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result = "Referência do Módulo ";
result += namespaceName;
@@ -1826,7 +1826,7 @@ class TranslatorBrazilian : public Translator
//////////////////////////////////////////////////////////////////////////
/*! directory relation for \a name */
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
return "Relação " + QCString(name);
}
@@ -1863,7 +1863,7 @@ class TranslatorBrazilian : public Translator
* table is shown. The heading for the first column mentions the
* source file that has a relation to another file.
*/
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return (QCString)"Arquivo em "+name;
}
@@ -1872,7 +1872,7 @@ class TranslatorBrazilian : public Translator
* table is shown. The heading for the second column mentions the
* destination file that is included.
*/
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return (QCString)"Inclui arquivo em "+name;
}
@@ -1921,7 +1921,7 @@ class TranslatorBrazilian : public Translator
}
/*! Header for the graph showing the directory dependencies */
- virtual QCString trDirDepGraph(const char *name)
+ virtual QCString trDirDepGraph(const QCString &name)
{ return QCString("Grafo de dependências do diretório ")+name+":"; }
//////////////////////////////////////////////////////////////////////////
@@ -1952,14 +1952,14 @@ class TranslatorBrazilian : public Translator
}
/*! Header of a Java enum page (Java enums are represented as classes). */
- virtual QCString trEnumReference(const char *name)
+ virtual QCString trEnumReference(const QCString &name)
{
QCString result = "Referência da enumeração ";
return result + name;
}
/*! Used for a section containing inherited members */
- virtual QCString trInheritedFrom(const char *members,const char *what)
+ virtual QCString trInheritedFrom(const QCString &members,const QCString &what)
{ return QCString(members)+" herdados de "+what; }
/*! Header of the sections with inherited members specific for the
@@ -2040,21 +2040,21 @@ class TranslatorBrazilian : public Translator
{ return "Grupos de Constantes"; }
/** UNO IDL constant groups */
- virtual QCString trConstantGroupReference(const char *namespaceName)
+ virtual QCString trConstantGroupReference(const QCString &namespaceName)
{
QCString result = "Referência do grupo de constantes ";
result += namespaceName;
return result;
}
/** UNO IDL service page title */
- virtual QCString trServiceReference(const char *sName)
+ virtual QCString trServiceReference(const QCString &sName)
{
QCString result = "Referência do serviço ";
result += sName;
return result;
}
/** UNO IDL singleton page title */
- virtual QCString trSingletonReference(const char *sName)
+ virtual QCString trSingletonReference(const QCString &sName)
{
// TODO: Emerson Ferreira proposes to add emphasis around the word
// Singleton but I'm not sure if this will work for non HTML generators.
@@ -2203,7 +2203,7 @@ class TranslatorBrazilian : public Translator
return "Classe";
}
}
- virtual QCString trCustomReference(const char *name)
+ virtual QCString trCustomReference(const QCString &name)
{ return "Referência de " + QCString(name); }
/* Slice */
@@ -2303,7 +2303,7 @@ class TranslatorBrazilian : public Translator
{
return "Exceções";
}
- virtual QCString trCompoundReferenceSlice(const char *clName, ClassDef::CompoundType compType, bool isLocal)
+ virtual QCString trCompoundReferenceSlice(const QCString &clName, ClassDef::CompoundType compType, bool isLocal)
{
QCString result=(QCString)"Referência ";
switch(compType)
@@ -2341,13 +2341,13 @@ class TranslatorBrazilian : public Translator
//////////////////////////////////////////////////////////////////////////
// new since 1.8.19
//////////////////////////////////////////////////////////////////////////
-
+
/** VHDL design unit documentation */
virtual QCString trDesignUnitDocumentation()
- {
- return "Documentação da Unidade de Projeto";
+ {
+ return "Documentação da Unidade de Projeto";
}
-
+
};
#endif
diff --git a/src/translator_ca.h b/src/translator_ca.h
index 7a7e79a..98f2ece 100644
--- a/src/translator_ca.h
+++ b/src/translator_ca.h
@@ -142,9 +142,9 @@ class TranslatorCatalan : public TranslatorAdapter_1_8_0
/*! this is put at the author sections at the bottom of man pages.
* parameter s is name of the project name.
*/
- virtual QCString trGeneratedAutomatically(const char *s)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Generat automàticament per Doxygen";
- if (s) result+=(QCString)" per a "+s;
+ if (!s.isEmpty()) result+=(QCString)" per a "+s;
result+=" a partir del codi font.";
return result;
}
@@ -504,16 +504,16 @@ class TranslatorCatalan : public TranslatorAdapter_1_8_0
/*! This is used in the standard footer of each page and indicates when
* the page was generated
*/
- virtual QCString trGeneratedAt(const char *date,const char *projName)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"Generat a "+date;
- if (projName) result+=(QCString)" per a "+projName;
+ if (!projName.isEmpty()) result+=(QCString)" per a "+projName;
result+=(QCString)" per";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return (QCString)"Diagrama d'Herència per a "+clName+":";
}
@@ -592,7 +592,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_8_0
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -614,7 +614,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_8_0
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result="Referència del Fitxer ";
result+=fileName;
@@ -622,7 +622,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_8_0
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result="Referència de l'Espai de Noms ";
result+=namespaceName;
@@ -823,12 +823,12 @@ class TranslatorCatalan : public TranslatorAdapter_1_8_0
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Diagrama de col·laboració per a "+clName+":";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Inclou el graf de dependències per a "+fName+":";
}
@@ -1102,7 +1102,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_8_0
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Paquet "+name;
}
@@ -1496,7 +1496,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_8_0
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result="Referència del Directori "; result+=dirName; return result; }
/*! This returns the word directory with or without starting capital
@@ -1623,7 +1623,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_8_0
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1645,7 +1645,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_8_0
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result="Referència del Mòdul ";
result+=namespaceName;
@@ -1753,7 +1753,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_8_0
//////////////////////////////////////////////////////////////////////////
/*! directory relation for \a name */
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
return QCString(name)+" Relació";
}
@@ -1790,7 +1790,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_8_0
* table is shown. The heading for the first column mentions the
* source file that has a relation to another file.
*/
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return (QCString)"Fitxer a "+name;
}
@@ -1799,7 +1799,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_8_0
* table is shown. The heading for the second column mentions the
* destination file that is included.
*/
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return (QCString)"Inclou fitxer a "+name;
}
@@ -1844,7 +1844,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_8_0
{ return "Copyright"; }
/*! Header for the graph showing the directory dependencies */
- virtual QCString trDirDepGraph(const char *name)
+ virtual QCString trDirDepGraph(const QCString &name)
{ return QCString("Graf de dependència de directoris per a ")+name+":"; }
diff --git a/src/translator_cn.h b/src/translator_cn.h
index a3b5803..8d3aa5e 100644
--- a/src/translator_cn.h
+++ b/src/translator_cn.h
@@ -135,10 +135,10 @@ class TranslatorChinese : public TranslatorAdapter_1_8_15
/*! this is put at the author sections at the bottom of man pages.
* parameter s is name of the project name.
*/
- virtual QCString trGeneratedAutomatically(const char *s)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result;
result = "由" CN_SPC "Doyxgen" CN_SPC "通过分析" CN_SPC;
- if (s) result += ((QCString)s+CN_SPC "的" CN_SPC);
+ if (!s.isEmpty()) result += ((QCString)s+CN_SPC "的" CN_SPC);
result+= "源代码自动生成.";
return result;
}
@@ -391,14 +391,14 @@ class TranslatorChinese : public TranslatorAdapter_1_8_15
}
}
- virtual QCString trGeneratedAt(const char *date,const char *projName)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{ QCString result=(QCString)"生成于" CN_SPC+date;
- if (projName) result+=(QCString)CN_SPC ", 为" CN_SPC+projName;
+ if (!projName.isEmpty()) result+=(QCString)CN_SPC ", 为" CN_SPC+projName;
result+=(QCString)"使用" CN_SPC;
return result;
}
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return (QCString)"类" CN_SPC+clName+CN_SPC "继承关系图:";
}
@@ -459,7 +459,7 @@ class TranslatorChinese : public TranslatorAdapter_1_8_15
// new since 0.49-990425
//////////////////////////////////////////////////////////////////////////
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
// used as the title of the HTML page of a class/struct/union
@@ -482,7 +482,7 @@ class TranslatorChinese : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result=fileName;
result+=CN_SPC "文件参考";
@@ -490,7 +490,7 @@ class TranslatorChinese : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{ QCString result=namespaceName;
result+=CN_SPC "命名空间参考";
return result;
@@ -697,13 +697,13 @@ class TranslatorChinese : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)clName+CN_SPC "的协作图:";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)fName+CN_SPC "的引用(Include)关系图:";
}
@@ -1005,7 +1005,7 @@ class TranslatorChinese : public TranslatorAdapter_1_8_15
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"包" CN_SPC+name;
}
@@ -1441,7 +1441,7 @@ class TranslatorChinese : public TranslatorAdapter_1_8_15
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{
QCString result=dirName;
result+=CN_SPC "目录参考";
@@ -1574,7 +1574,7 @@ class TranslatorChinese : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1596,7 +1596,7 @@ class TranslatorChinese : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result += CN_SPC "模块参考手册";
@@ -1696,7 +1696,7 @@ class TranslatorChinese : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
// new since 1.6.0
//////////////////////////////////////////////////////////////////////////
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
// return QCString(name)+" Relation";
// unsure
@@ -1727,12 +1727,12 @@ class TranslatorChinese : public TranslatorAdapter_1_8_15
// new since 1.6.3
//////////////////////////////////////////////////////////////////////////
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return (QCString)"文件在"+CN_SPC+name;
}
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return (QCString)"在" CN_SPC+name+CN_SPC "中引用";
}
@@ -1770,7 +1770,7 @@ class TranslatorChinese : public TranslatorAdapter_1_8_15
{ return "版权所有"; }
/*! Header for the graph showing the directory dependencies */
- virtual QCString trDirDepGraph(const char *name)
+ virtual QCString trDirDepGraph(const QCString &name)
{
return QCString(name)+CN_SPC "的目录依赖关系图";
}
@@ -1796,11 +1796,11 @@ class TranslatorChinese : public TranslatorAdapter_1_8_15
{ return "枚举说明文档从下列文件生成:"; }
/*! Header of a Java enum page (Java enums are represented as classes). */
- virtual QCString trEnumReference(const char *name)
+ virtual QCString trEnumReference(const QCString &name)
{ return QCString(name)+CN_SPC "枚举类型参考"; }
/*! Used for a section containing inherited members */
- virtual QCString trInheritedFrom(const char *members,const char *what)
+ virtual QCString trInheritedFrom(const QCString &members,const QCString &what)
{ return QCString(members)+CN_SPC "继承自" CN_SPC+what; }
/*! Header of the sections with inherited members specific for the
@@ -1883,21 +1883,21 @@ class TranslatorChinese : public TranslatorAdapter_1_8_15
{ return "常量组"; }
/** UNO IDL constant groups */
- virtual QCString trConstantGroupReference(const char *namespaceName)
+ virtual QCString trConstantGroupReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+= CN_SPC "常量组参考";
return result;
}
/** UNO IDL service page title */
- virtual QCString trServiceReference(const char *sName)
+ virtual QCString trServiceReference(const QCString &sName)
{
QCString result=(QCString)sName;
result+= CN_SPC "服务参考";
return result;
}
/** UNO IDL singleton page title */
- virtual QCString trSingletonReference(const char *sName)
+ virtual QCString trSingletonReference(const QCString &sName)
{
QCString result=(QCString)sName;
result+= CN_SPC "单例参考";
diff --git a/src/translator_cz.h b/src/translator_cz.h
index 4fb3bc2..1ce249e 100644
--- a/src/translator_cz.h
+++ b/src/translator_cz.h
@@ -172,10 +172,10 @@ class TranslatorCzech : public TranslatorAdapter_1_8_15
/*! this is put at the author sections at the bottom of man pages.
* parameter s is name of the project name.
*/
- virtual QCString trGeneratedAutomatically(const char *s)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result("Generováno automaticky programem Doxygen "
"ze zdrojových textů");
- if (s) result += QCString(" projektu ") + s;
+ if (!s.isEmpty()) result += QCString(" projektu ") + s;
result += ".";
return result;
}
@@ -542,18 +542,17 @@ class TranslatorCzech : public TranslatorAdapter_1_8_15
/*! This is used in the standard footer of each page and indicates when
* the page was generated
*/
- virtual QCString trGeneratedAt(const char *date,const char *projName)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result("Generováno ");
result += date;
- if (projName)
- result += QCString(" pro projekt ") + projName;
+ if (!projName.isEmpty()) result += QCString(" pro projekt ") + projName;
result += " programem";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return QCString("Diagram dědičnosti pro třídu ") + clName;
}
@@ -630,7 +629,7 @@ class TranslatorCzech : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -652,7 +651,7 @@ class TranslatorCzech : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result("Dokumentace souboru ");
result+=fileName;
@@ -660,7 +659,7 @@ class TranslatorCzech : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result("Dokumentace prostoru jmen ");
result+=namespaceName;
@@ -872,12 +871,12 @@ class TranslatorCzech : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Diagram tříd pro "+clName+":";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Graf závislostí na vkládaných souborech "
"pro "+fName+":";
@@ -1162,7 +1161,7 @@ class TranslatorCzech : public TranslatorAdapter_1_8_15
return "Třídy";
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return QCString("Balík ") + name;
}
@@ -1535,7 +1534,7 @@ class TranslatorCzech : public TranslatorAdapter_1_8_15
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{
QCString result = "Reference k adresáři ";
result += dirName;
@@ -1671,7 +1670,7 @@ class TranslatorCzech : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1693,7 +1692,7 @@ class TranslatorCzech : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result="Dokumentace modulu ";
result += namespaceName;
@@ -1793,7 +1792,7 @@ class TranslatorCzech : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! directory relation for \a name */
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
return "Relace " + QCString(name);
}
@@ -1830,7 +1829,7 @@ class TranslatorCzech : public TranslatorAdapter_1_8_15
* table is shown. The heading for the first column mentions the
* source file that has a relation to another file.
*/
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return (QCString)"Soubor v "+name;
}
@@ -1839,7 +1838,7 @@ class TranslatorCzech : public TranslatorAdapter_1_8_15
* table is shown. The heading for the second column mentions the
* destination file that is included.
*/
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return (QCString)"Vkládá (include) soubor z "+name;
}
@@ -1884,7 +1883,7 @@ class TranslatorCzech : public TranslatorAdapter_1_8_15
{ return "Copyright"; }
/*! Header for the graph showing the directory dependencies */
- virtual QCString trDirDepGraph(const char *name)
+ virtual QCString trDirDepGraph(const QCString &name)
{ return QCString("Graf závislosti na adresářích pro ")+name+":"; }
//////////////////////////////////////////////////////////////////////////
@@ -1914,11 +1913,11 @@ class TranslatorCzech : public TranslatorAdapter_1_8_15
}
/*! Header of a Java enum page (Java enums are represented as classes). */
- virtual QCString trEnumReference(const char *name)
+ virtual QCString trEnumReference(const QCString &name)
{ return "Reference k výčtu "+QCString(name); }
/*! Used for a section containing inherited members */
- virtual QCString trInheritedFrom(const char *members,const char *what)
+ virtual QCString trInheritedFrom(const QCString &members,const QCString &what)
{ return QCString(members)+" dědí se z "+what; }
/*! Header of the sections with inherited members specific for the
@@ -1999,21 +1998,21 @@ class TranslatorCzech : public TranslatorAdapter_1_8_15
{ return "Konstantní skupiny"; }
/** UNO IDL constant groups */
- virtual QCString trConstantGroupReference(const char *namespaceName)
+ virtual QCString trConstantGroupReference(const QCString &namespaceName)
{
QCString result="Konstantní skupiny z ";
result += namespaceName;
return result;
}
/** UNO IDL service page title */
- virtual QCString trServiceReference(const char *sName)
+ virtual QCString trServiceReference(const QCString &sName)
{
QCString result="Popis služby ";
result += sName;
return result;
}
/** UNO IDL singleton page title */
- virtual QCString trSingletonReference(const char *sName)
+ virtual QCString trSingletonReference(const QCString &sName)
{
QCString result="Popis singletonu ";
result += sName;
diff --git a/src/translator_de.h b/src/translator_de.h
index be51653..ff7b704 100644
--- a/src/translator_de.h
+++ b/src/translator_de.h
@@ -233,9 +233,9 @@ class TranslatorGerman : public TranslatorAdapter_1_8_15
/*! this is put at the author sections at the bottom of man pages.
* parameter s is name of the project name.
*/
- virtual QCString trGeneratedAutomatically(const char *s)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Automatisch erzeugt von Doxygen";
- if (s) result+=(QCString)" für "+s;
+ if (!s.isEmpty()) result+=(QCString)" für "+s;
result+=" aus dem Quellcode.";
return result;
}
@@ -603,16 +603,16 @@ class TranslatorGerman : public TranslatorAdapter_1_8_15
/*! This is used in the standard footer of each page and indicates when
* the page was generated
*/
- virtual QCString trGeneratedAt(const char *date,const char *projName)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"Erzeugt am "+date;
- if (projName) result+=(QCString)" für "+projName;
+ if (!projName.isEmpty()) result+=(QCString)" für "+projName;
result+=(QCString)" von";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return (QCString)"Klassendiagramm für "+clName+":";
}
@@ -691,7 +691,7 @@ class TranslatorGerman : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -713,7 +713,7 @@ class TranslatorGerman : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result=fileName;
result+="-Dateireferenz";
@@ -721,7 +721,7 @@ class TranslatorGerman : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+="-Namensbereichsreferenz";
@@ -928,13 +928,13 @@ class TranslatorGerman : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Zusammengehörigkeiten von "+clName+":";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Include-Abhängigkeitsdiagramm für "+fName+":";
}
@@ -1253,7 +1253,7 @@ class TranslatorGerman : public TranslatorAdapter_1_8_15
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Paket "+name;
}
@@ -1637,7 +1637,7 @@ class TranslatorGerman : public TranslatorAdapter_1_8_15
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result=dirName; result+="-Verzeichnisreferenz"; return result; }
/*! This returns the word directory with or without starting capital
@@ -1765,7 +1765,7 @@ class TranslatorGerman : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1787,7 +1787,7 @@ class TranslatorGerman : public TranslatorAdapter_1_8_15
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+="-Modul-Referenz";
@@ -1891,7 +1891,7 @@ class TranslatorGerman : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! directory relation for \a name */
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
return "Bezug " + QCString(name);
}
@@ -1928,7 +1928,7 @@ class TranslatorGerman : public TranslatorAdapter_1_8_15
* table is shown. The heading for the first column mentions the
* source file that has a relation to another file.
*/
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return (QCString)"Datei in "+name;
}
@@ -1937,7 +1937,7 @@ class TranslatorGerman : public TranslatorAdapter_1_8_15
* table is shown. The heading for the second column mentions the
* destination file that is included.
*/
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return (QCString)"Include-Dateien in "+name;
}
@@ -1982,7 +1982,7 @@ class TranslatorGerman : public TranslatorAdapter_1_8_15
{ return "Copyright"; }
/*! Header for the graph showing the directory dependencies */
- virtual QCString trDirDepGraph(const char *name)
+ virtual QCString trDirDepGraph(const QCString &name)
{ return QCString("Diagramm der Verzeichnisabhängigkeiten für ")+name+":"; }
//////////////////////////////////////////////////////////////////////////
@@ -2013,11 +2013,11 @@ class TranslatorGerman : public TranslatorAdapter_1_8_15
}
/*! Header of a Java enum page (Java enums are represented as classes). */
- virtual QCString trEnumReference(const char *name)
+ virtual QCString trEnumReference(const QCString &name)
{ return QCString(name)+" Enum-Referenz"; }
/*! Used for a section containing inherited members */
- virtual QCString trInheritedFrom(const char *members,const char *what)
+ virtual QCString trInheritedFrom(const QCString &members,const QCString &what)
{ return QCString(members)+" geerbt von "+what; }
/*! Header of the sections with inherited members specific for the
@@ -2098,7 +2098,7 @@ class TranslatorGerman : public TranslatorAdapter_1_8_15
{ return "Konstante Gruppen"; }
/** UNO IDL constant groups */
- virtual QCString trConstantGroupReference(const char *namespaceName)
+ virtual QCString trConstantGroupReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" Konstantengruppen-Referenz";
@@ -2106,7 +2106,7 @@ class TranslatorGerman : public TranslatorAdapter_1_8_15
}
/** UNO IDL service page title */
- virtual QCString trServiceReference(const char *sName)
+ virtual QCString trServiceReference(const QCString &sName)
{
QCString result=(QCString)sName;
result+=" Dienstreferenz";
@@ -2114,7 +2114,7 @@ class TranslatorGerman : public TranslatorAdapter_1_8_15
}
/** UNO IDL singleton page title */
- virtual QCString trSingletonReference(const char *sName)
+ virtual QCString trSingletonReference(const QCString &sName)
{
QCString result=(QCString)sName;
result+=" Singleton-Referenz";
@@ -2252,7 +2252,7 @@ class TranslatorGerman : public TranslatorAdapter_1_8_15
return "Klasse";
}
}
- virtual QCString trCustomReference(const char *name)
+ virtual QCString trCustomReference(const QCString &name)
{ return QCString(name)+"-Referenz"; }
//////////////////////////////////////////////////////////////////////////
diff --git a/src/translator_dk.h b/src/translator_dk.h
index fa1db9a..1d01f32 100644
--- a/src/translator_dk.h
+++ b/src/translator_dk.h
@@ -185,9 +185,9 @@ class TranslatorDanish : public TranslatorAdapter_1_8_0
/*! this is put at the author sections at the bottom of man pages.
* parameter s is name of the project name.
*/
- virtual QCString trGeneratedAutomatically(const char *s)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Automatisk genereret af Doxygen";
- if (s) result+=(QCString)" for "+s;
+ if (!s.isEmpty()) result+=(QCString)" for "+s;
result+=" ud fra kildekoden.";
return result;
}
@@ -514,16 +514,16 @@ class TranslatorDanish : public TranslatorAdapter_1_8_0
/*! This is used in the standard footer of each page and indicates when
* the page was generated
*/
- virtual QCString trGeneratedAt(const char *date,const char *projName)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"Genereret "+date;
- if (projName) result+=(QCString)" for "+projName;
+ if (!projName.isEmpty()) result+=(QCString)" for "+projName;
result+=(QCString)" af";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return (QCString)"Stamtræ for "+clName+":";
}
@@ -602,7 +602,7 @@ class TranslatorDanish : public TranslatorAdapter_1_8_0
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -624,7 +624,7 @@ class TranslatorDanish : public TranslatorAdapter_1_8_0
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result=fileName;
result+=" filreference";
@@ -632,7 +632,7 @@ class TranslatorDanish : public TranslatorAdapter_1_8_0
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" namespace-reference";
@@ -829,12 +829,12 @@ class TranslatorDanish : public TranslatorAdapter_1_8_0
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Samarbejdsdiagram for "+clName+":";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Inklusions-afhængighedsgraf for "+fName+":";
}
@@ -1080,7 +1080,7 @@ class TranslatorDanish : public TranslatorAdapter_1_8_0
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Pakke "+name;
}
@@ -1418,7 +1418,7 @@ class TranslatorDanish : public TranslatorAdapter_1_8_0
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result="Indhold af kataloget "; result+=dirName; return result;}
/*! This returns the word directory with or without starting capital
@@ -1551,7 +1551,7 @@ class TranslatorDanish : public TranslatorAdapter_1_8_0
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1573,7 +1573,7 @@ class TranslatorDanish : public TranslatorAdapter_1_8_0
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" Modulreference"; // " Module Reference"
@@ -1675,7 +1675,7 @@ class TranslatorDanish : public TranslatorAdapter_1_8_0
//////////////////////////////////////////////////////////////////////////
/*! directory relation for \a name */
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
return QCString(name)+" Relation"; // " Relation"
}
@@ -1712,7 +1712,7 @@ class TranslatorDanish : public TranslatorAdapter_1_8_0
* table is shown. The heading for the first column mentions the
* source file that has a relation to another file.
*/
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return (QCString)"File i "+name; // "File in "
}
@@ -1721,7 +1721,7 @@ class TranslatorDanish : public TranslatorAdapter_1_8_0
* table is shown. The heading for the second column mentions the
* destination file that is included.
*/
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return (QCString)"Inkluderer file i "+name; // "Includes file in "
}
@@ -1767,7 +1767,7 @@ class TranslatorDanish : public TranslatorAdapter_1_8_0
return "Copyright";
}
- virtual QCString trDirDepGraph(const char *name)
+ virtual QCString trDirDepGraph(const QCString &name)
{
return QCString("Afhængighedsgraf for katalog ")+name+":";
}
diff --git a/src/translator_en.h b/src/translator_en.h
index ba26bc7..3e456cc 100644
--- a/src/translator_en.h
+++ b/src/translator_en.h
@@ -141,9 +141,9 @@ class TranslatorEnglish : public Translator
/*! this is put at the author sections at the bottom of man pages.
* parameter s is name of the project name.
*/
- virtual QCString trGeneratedAutomatically(const char *s)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Generated automatically by Doxygen";
- if (s) result+=(QCString)" for "+s;
+ if (!s.isEmpty()) result+=(QCString)" for "+s;
result+=" from the source code.";
return result;
}
@@ -515,16 +515,16 @@ class TranslatorEnglish : public Translator
/*! This is used in the standard footer of each page and indicates when
* the page was generated
*/
- virtual QCString trGeneratedAt(const char *date,const char *projName)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"Generated on "+date;
- if (projName) result+=(QCString)" for "+projName;
+ if (!projName.isEmpty()) result+=(QCString)" for "+projName;
result+=(QCString)" by";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return (QCString)"Inheritance diagram for "+clName+":";
}
@@ -603,7 +603,7 @@ class TranslatorEnglish : public Translator
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -625,7 +625,7 @@ class TranslatorEnglish : public Translator
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result=fileName;
result+=" File Reference";
@@ -633,7 +633,7 @@ class TranslatorEnglish : public Translator
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" Namespace Reference";
@@ -829,12 +829,12 @@ class TranslatorEnglish : public Translator
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Collaboration diagram for "+clName+":";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Include dependency graph for "+fName+":";
}
@@ -1117,7 +1117,7 @@ class TranslatorEnglish : public Translator
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Package "+name;
}
@@ -1511,7 +1511,7 @@ class TranslatorEnglish : public Translator
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result=dirName; result+=" Directory Reference"; return result; }
/*! This returns the word directory with or without starting capital
@@ -1639,7 +1639,7 @@ class TranslatorEnglish : public Translator
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1660,7 +1660,7 @@ class TranslatorEnglish : public Translator
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" Module Reference";
@@ -1762,7 +1762,7 @@ class TranslatorEnglish : public Translator
//////////////////////////////////////////////////////////////////////////
/*! directory relation for \a name */
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
return QCString(name)+" Relation";
}
@@ -1799,7 +1799,7 @@ class TranslatorEnglish : public Translator
* table is shown. The heading for the first column mentions the
* source file that has a relation to another file.
*/
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return (QCString)"File in "+name;
}
@@ -1808,7 +1808,7 @@ class TranslatorEnglish : public Translator
* table is shown. The heading for the second column mentions the
* destination file that is included.
*/
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return (QCString)"Includes file in "+name;
}
@@ -1853,7 +1853,7 @@ class TranslatorEnglish : public Translator
{ return "Copyright"; }
/*! Header for the graph showing the directory dependencies */
- virtual QCString trDirDepGraph(const char *name)
+ virtual QCString trDirDepGraph(const QCString &name)
{ return QCString("Directory dependency graph for ")+name+":"; }
//////////////////////////////////////////////////////////////////////////
@@ -1881,11 +1881,11 @@ class TranslatorEnglish : public Translator
}
/*! Header of a Java enum page (Java enums are represented as classes). */
- virtual QCString trEnumReference(const char *name)
+ virtual QCString trEnumReference(const QCString &name)
{ return QCString(name)+" Enum Reference"; }
/*! Used for a section containing inherited members */
- virtual QCString trInheritedFrom(const char *members,const char *what)
+ virtual QCString trInheritedFrom(const QCString &members,const QCString &what)
{ return QCString(members)+" inherited from "+what; }
/*! Header of the sections with inherited members specific for the
@@ -1966,21 +1966,21 @@ class TranslatorEnglish : public Translator
{ return "Constant Groups"; }
/** UNO IDL constant groups */
- virtual QCString trConstantGroupReference(const char *namespaceName)
+ virtual QCString trConstantGroupReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" Constant Group Reference";
return result;
}
/** UNO IDL service page title */
- virtual QCString trServiceReference(const char *sName)
+ virtual QCString trServiceReference(const QCString &sName)
{
QCString result=(QCString)sName;
result+=" Service Reference";
return result;
}
/** UNO IDL singleton page title */
- virtual QCString trSingletonReference(const char *sName)
+ virtual QCString trSingletonReference(const QCString &sName)
{
QCString result=(QCString)sName;
result+=" Singleton Reference";
@@ -2119,7 +2119,7 @@ class TranslatorEnglish : public Translator
return "Class";
}
}
- virtual QCString trCustomReference(const char *name)
+ virtual QCString trCustomReference(const QCString &name)
{ return QCString(name)+" Reference"; }
/* Slice */
@@ -2219,7 +2219,7 @@ class TranslatorEnglish : public Translator
{
return "Exception Documentation";
}
- virtual QCString trCompoundReferenceSlice(const char *clName, ClassDef::CompoundType compType, bool isLocal)
+ virtual QCString trCompoundReferenceSlice(const QCString &clName, ClassDef::CompoundType compType, bool isLocal)
{
QCString result=(QCString)clName;
if (isLocal) result+=" Local";
@@ -2262,6 +2262,51 @@ class TranslatorEnglish : public Translator
virtual QCString trDesignUnitDocumentation()
{ return "Design Unit Documentation"; }
+//////////////////////////////////////////////////////////////////////////
+// new since 1.9.2
+//////////////////////////////////////////////////////////////////////////
+
+ /** C++20 concept */
+ virtual QCString trConcept(bool first_capital, bool singular)
+ {
+ QCString result((first_capital ? "Concept" : "concept"));
+ if (!singular) result+="s";
+ return result;
+ }
+ /*! used as the title of the HTML page of a C++20 concept page */
+ virtual QCString trConceptReference(const QCString &conceptName)
+ {
+ QCString result=conceptName;
+ result+=" Concept Reference";
+ return result;
+ }
+
+ /*! used as the title of page containing all the index of all concepts. */
+ virtual QCString trConceptList()
+ { return "Concept List"; }
+
+ /*! used as the title of chapter containing the index listing all concepts. */
+ virtual QCString trConceptIndex()
+ { return "Concept Index"; }
+
+ /*! used as the title of chapter containing all information about concepts. */
+ virtual QCString trConceptDocumentation()
+ { return "Concept Documentation"; }
+
+ /*! used as an introduction to the concept list */
+ virtual QCString trConceptListDescription(bool extractAll)
+ {
+ QCString result="Here is a list of all ";
+ if (!extractAll) result+="documented ";
+ result+="concepts with brief descriptions:";
+ return result;
+ }
+
+ /*! used to introduce the definition of the C++20 concept */
+ virtual QCString trConceptDefinition()
+ {
+ return "Concept definition";
+ }
};
#endif
diff --git a/src/translator_eo.h b/src/translator_eo.h
index 4ae6ee9..8482b39 100644
--- a/src/translator_eo.h
+++ b/src/translator_eo.h
@@ -143,9 +143,9 @@ class TranslatorEsperanto : public TranslatorAdapter_1_8_4
/*! this is put at the author sections at the bottom of man pages.
* parameter s is name of the project name.
*/
- virtual QCString trGeneratedAutomatically(const char *s)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Generita aŭtomate de Doxygen";
- if (s) result+=(QCString)" por "+s;
+ if (!s.isEmpty()) result+=(QCString)" por "+s;
result+=" el la fontkodo.";
return result;
}
@@ -505,16 +505,16 @@ class TranslatorEsperanto : public TranslatorAdapter_1_8_4
/*! This is used in the standard footer of each page and indicates when
* the page was generated
*/
- virtual QCString trGeneratedAt(const char *date,const char *projName)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"Generita la "+date;
- if (projName) result+=(QCString)" por "+projName;
+ if (!projName.isEmpty()) result+=(QCString)" por "+projName;
result+=(QCString)" de";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return (QCString)"Heredada diagramo por "+clName+":";
}
@@ -593,7 +593,7 @@ class TranslatorEsperanto : public TranslatorAdapter_1_8_4
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -615,7 +615,7 @@ class TranslatorEsperanto : public TranslatorAdapter_1_8_4
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result=fileName;
result+=" Dosiera referenco";
@@ -623,7 +623,7 @@ class TranslatorEsperanto : public TranslatorAdapter_1_8_4
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" Nomspaca referenco";
@@ -820,12 +820,12 @@ class TranslatorEsperanto : public TranslatorAdapter_1_8_4
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Kunlaborada diagramo por "+clName+":";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Inkluzivaĵa dependeca diagramo por "+fName+":";
}
@@ -1105,7 +1105,7 @@ class TranslatorEsperanto : public TranslatorAdapter_1_8_4
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Pakaĵo "+name;
}
@@ -1499,7 +1499,7 @@ class TranslatorEsperanto : public TranslatorAdapter_1_8_4
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result=dirName; result+=" Dosieruja Referenco"; return result; }
/*! This returns the word directory with or without starting capital
@@ -1627,7 +1627,7 @@ class TranslatorEsperanto : public TranslatorAdapter_1_8_4
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1648,7 +1648,7 @@ class TranslatorEsperanto : public TranslatorAdapter_1_8_4
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" Modula Referenco";
@@ -1747,7 +1747,7 @@ class TranslatorEsperanto : public TranslatorAdapter_1_8_4
//////////////////////////////////////////////////////////////////////////
/*! directory relation for \a name */
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
return QCString(name)+" Rilato";
}
@@ -1784,7 +1784,7 @@ class TranslatorEsperanto : public TranslatorAdapter_1_8_4
* table is shown. The heading for the first column mentions the
* source file that has a relation to another file.
*/
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return (QCString)"Dosiero en "+name;
}
@@ -1793,7 +1793,7 @@ class TranslatorEsperanto : public TranslatorAdapter_1_8_4
* table is shown. The heading for the second column mentions the
* destination file that is included.
*/
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return (QCString)"Inkluzivas dosieron en "+name;
}
@@ -1846,7 +1846,7 @@ class TranslatorEsperanto : public TranslatorAdapter_1_8_4
{ return "Kopirajto"; }
/*! Header for the graph showing the directory dependencies */
- virtual QCString trDirDepGraph(const char *name)
+ virtual QCString trDirDepGraph(const QCString &name)
{ return QCString("Dosieruja dependa diagramo por ")+name+":"; }
//////////////////////////////////////////////////////////////////////////
@@ -1874,11 +1874,11 @@ class TranslatorEsperanto : public TranslatorAdapter_1_8_4
}
/*! Header of a Java enum page (Java enums are represented as classes). */
- virtual QCString trEnumReference(const char *name)
+ virtual QCString trEnumReference(const QCString &name)
{ return QCString(name)+" Enum Referenco"; }
/*! Used for a section containing inherited members */
- virtual QCString trInheritedFrom(const char *members,const char *what)
+ virtual QCString trInheritedFrom(const QCString &members,const QCString &what)
{ return QCString(members)+" heredita el "+what; }
/*! Header of the sections with inherited members specific for the
diff --git a/src/translator_es.h b/src/translator_es.h
index 554c487..41dbd8f 100644
--- a/src/translator_es.h
+++ b/src/translator_es.h
@@ -135,9 +135,9 @@ class TranslatorSpanish : public TranslatorAdapter_1_8_15
/*! this is put at the author sections at the bottom of man pages.
* parameter s is name of the project name.
*/
- virtual QCString trGeneratedAutomatically(const char *s)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Generado automáticamente por Doxygen";
- if (s) result+=(QCString)" para "+s;
+ if (!s.isEmpty()) result+=(QCString)" para "+s;
result+=" del código fuente.";
return result;
}
@@ -495,16 +495,16 @@ class TranslatorSpanish : public TranslatorAdapter_1_8_15
/*! This is used in the standard footer of each page and indicates when
* the page was generated
*/
- virtual QCString trGeneratedAt(const char *date,const char *projName)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"Generado el "+date;
- if (projName) result+=(QCString)" para "+projName;
+ if (!projName.isEmpty()) result+=(QCString)" para "+projName;
result+=(QCString)" por";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return (QCString)"Diagrama de herencias de "+clName;
}
@@ -583,7 +583,7 @@ class TranslatorSpanish : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -605,7 +605,7 @@ class TranslatorSpanish : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result="Referencia del Archivo ";
result+=fileName;
@@ -613,7 +613,7 @@ class TranslatorSpanish : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result="Referencia del Namespace ";
result+=namespaceName;
@@ -820,13 +820,13 @@ class TranslatorSpanish : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Diagrama de colaboración para "+clName+":";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Dependencia gráfica adjunta para "+fName+":";
}
@@ -1139,7 +1139,7 @@ class TranslatorSpanish : public TranslatorAdapter_1_8_15
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Paquetes "+name;
}
@@ -1546,7 +1546,7 @@ class TranslatorSpanish : public TranslatorAdapter_1_8_15
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{
QCString result="Referencia del directorio ";
result+=dirName;
@@ -1684,7 +1684,7 @@ class TranslatorSpanish : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1706,7 +1706,7 @@ class TranslatorSpanish : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result="Referencia módulo ";
result+=namespaceName;
@@ -1809,7 +1809,7 @@ class TranslatorSpanish : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! directory relation for \a name */
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
return QCString(name)+" relación";
}
@@ -1846,7 +1846,7 @@ class TranslatorSpanish : public TranslatorAdapter_1_8_15
* table is shown. The heading for the first column mentions the
* source file that has a relation to another file.
*/
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return (QCString)"Fichero en "+name;
}
@@ -1855,7 +1855,7 @@ class TranslatorSpanish : public TranslatorAdapter_1_8_15
* table is shown. The heading for the second column mentions the
* destination file that is included.
*/
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return (QCString)"Incluye ficheros en "+name;
}
@@ -1903,7 +1903,7 @@ class TranslatorSpanish : public TranslatorAdapter_1_8_15
{ return "Copyright"; }
/*! Header for the graph showing the directory dependencies */
- virtual QCString trDirDepGraph(const char *name)
+ virtual QCString trDirDepGraph(const QCString &name)
{ return QCString("Gráfico de dependencias de directorios para ")+name+":"; }
//////////////////////////////////////////////////////////////////////////
@@ -1933,11 +1933,11 @@ class TranslatorSpanish : public TranslatorAdapter_1_8_15
}
/*! Header of a Java enum page (Java enums are represented as classes). */
- virtual QCString trEnumReference(const char *name)
+ virtual QCString trEnumReference(const QCString &name)
{ return QCString("Referencia del enum ") + QCString(name); }
/*! Used for a section containing inherited members */
- virtual QCString trInheritedFrom(const char *members,const char *what)
+ virtual QCString trInheritedFrom(const QCString &members,const QCString &what)
{ return QCString(members)+" heredados desde "+what; }
/*! Header of the sections with inherited members specific for the
@@ -2018,21 +2018,21 @@ class TranslatorSpanish : public TranslatorAdapter_1_8_15
{ return "Grupos constantes"; }
/** UNO IDL constant groups */
- virtual QCString trConstantGroupReference(const char *namespaceName)
+ virtual QCString trConstantGroupReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" referencia de grupos constantes";
return result;
}
/** UNO IDL service page title */
- virtual QCString trServiceReference(const char *sName)
+ virtual QCString trServiceReference(const QCString &sName)
{
QCString result=(QCString)sName;
result+=" Referencia servicio";
return result;
}
/** UNO IDL singleton page title */
- virtual QCString trSingletonReference(const char *sName)
+ virtual QCString trSingletonReference(const QCString &sName)
{
QCString result=(QCString)sName;
result+=" referencia Singleton";
@@ -2171,7 +2171,7 @@ class TranslatorSpanish : public TranslatorAdapter_1_8_15
return "Clase";
}
}
- virtual QCString trCustomReference(const char *name)
+ virtual QCString trCustomReference(const QCString &name)
{ return "Referencia"+QCString(name); }
virtual QCString trConstants()
@@ -2270,7 +2270,7 @@ class TranslatorSpanish : public TranslatorAdapter_1_8_15
{
return "Documentación de excepción";
}
- virtual QCString trCompoundReferenceSlice(const char *clName, ClassDef::CompoundType compType, bool isLocal)
+ virtual QCString trCompoundReferenceSlice(const QCString &clName, ClassDef::CompoundType compType, bool isLocal)
{
QCString result="Referencia de";
switch(compType)
diff --git a/src/translator_fa.h b/src/translator_fa.h
index 56ba3da..cec2da1 100644
--- a/src/translator_fa.h
+++ b/src/translator_fa.h
@@ -158,9 +158,9 @@ class TranslatorPersian : public TranslatorAdapter_1_7_5
/*! this is put at the author sections at the bottom of man pages.
* parameter s is name of the project name.
*/
- virtual QCString trGeneratedAutomatically(const char *s)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="تولید شده توسط نرم افزار دی اکسیژن ";
- if (s) result+=(QCString)" برای "+s;
+ if (!s.isEmpty()) result+=(QCString)" برای "+s;
result+=" از کد برنامه ";
return result;
}
@@ -502,16 +502,16 @@ class TranslatorPersian : public TranslatorAdapter_1_7_5
/*! This is used in the standard footer of each page and indicates when
* the page was generated
*/
- virtual QCString trGeneratedAt(const char *date,const char *projName)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result = HtmlDivEnd + HtmlRightToLeft + QCString("توليد شده در ") +date ;
- if (projName) result+=(QCString)" برای "+projName;
+ if (!projName.isEmpty()) result+=(QCString)" برای "+projName;
result+=(QCString)" توسط";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return (QCString)""+clName+" نمودار وراثت برای :";
}
@@ -590,7 +590,7 @@ class TranslatorPersian : public TranslatorAdapter_1_7_5
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -612,7 +612,7 @@ class TranslatorPersian : public TranslatorAdapter_1_7_5
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result=fileName;
result+=" مرجع پرونده";
@@ -620,7 +620,7 @@ class TranslatorPersian : public TranslatorAdapter_1_7_5
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" مرجع فضای نام";
@@ -814,12 +814,12 @@ class TranslatorPersian : public TranslatorAdapter_1_7_5
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Collaboration diagram for "+clName+":";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"نمودار شامل شدن ها برای "+fName+":";
}
@@ -1099,7 +1099,7 @@ class TranslatorPersian : public TranslatorAdapter_1_7_5
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Package "+name;
}
@@ -1492,7 +1492,7 @@ class TranslatorPersian : public TranslatorAdapter_1_7_5
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result=dirName; result+=" مرجع شاخه ی"; return result; }
/*! This returns the word directory with or without starting capital
@@ -1596,7 +1596,7 @@ class TranslatorPersian : public TranslatorAdapter_1_7_5
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1617,7 +1617,7 @@ class TranslatorPersian : public TranslatorAdapter_1_7_5
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" Module Reference";
@@ -1706,7 +1706,7 @@ class TranslatorPersian : public TranslatorAdapter_1_7_5
//////////////////////////////////////////////////////////////////////////
/*! directory relation for \a name */
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
return QCString(name) + " Relation";
}
@@ -1743,7 +1743,7 @@ class TranslatorPersian : public TranslatorAdapter_1_7_5
* table is shown. The heading for the first column mentions the
* source file that has a relation to another file.
*/
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return (QCString)"پرونده ای در "+name;
}
@@ -1752,7 +1752,7 @@ class TranslatorPersian : public TranslatorAdapter_1_7_5
* table is shown. The heading for the second column mentions the
* destination file that is included.
*/
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return (QCString)"Includes file in "+name;
}
diff --git a/src/translator_fi.h b/src/translator_fi.h
index dd2d38c..1db2372 100644
--- a/src/translator_fi.h
+++ b/src/translator_fi.h
@@ -197,7 +197,7 @@ class TranslatorFinnish : public TranslatorAdapter_1_6_0
/*! this is put at the author sections at the bottom of man pages.
* parameter s is name of the project name.
*/
- virtual QCString trGeneratedAutomatically(const char *s)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result=(QCString)"Automaattisesti luotu Doxygenilla "
"lähdekoodista projektille "+s; // "Generated automatically by Doxygen" ... "for" ... "from the sourcecode"
//if (s) result+=(QCString)" voor "+s;
@@ -565,20 +565,20 @@ class TranslatorFinnish : public TranslatorAdapter_1_6_0
/*! This is used in the standard footer of each page and indicates when
* the page was generated
*/
- virtual QCString trGeneratedAt(const char *date,const char *projName)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
// funktio on hiukan vaikea kääntää prepositioihin sidotun rakenteen vuoksi.
// Muutetaan siis lauserakennetta suomalaisemmaksi
// Generated on $date for $project by:
// -> Generated for $project on $date by:
QCString result=(QCString)"Generoinut ";
- if (projName) result+=(QCString)"projektille "+projName+" ";
+ if (!projName.isEmpty()) result+=(QCString)"projektille "+projName+" ";
result+=(QCString)date+" ";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return "Luokan "+(QCString)clName+" luokkakaavio"; // "Inheritance diagram for "
}
@@ -657,7 +657,7 @@ class TranslatorFinnish : public TranslatorAdapter_1_6_0
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -679,7 +679,7 @@ class TranslatorFinnish : public TranslatorAdapter_1_6_0
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result=fileName;
result+=" tiedostoreferenssi"; // " File Reference"
@@ -687,7 +687,7 @@ class TranslatorFinnish : public TranslatorAdapter_1_6_0
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" nimiavaruusreferenssi"; // " Namespace Reference"
@@ -884,12 +884,12 @@ class TranslatorFinnish : public TranslatorAdapter_1_6_0
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Yhteistyökaavio luokalle "+clName+":"; // "Collaboration diagram for "+clName+":"
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Sisällytysriippuvuuskaavio tiedostolle "+fName+":"; // "Include dependency graph for "+fName+":"
}
@@ -1221,7 +1221,7 @@ class TranslatorFinnish : public TranslatorAdapter_1_6_0
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Paketti "+name; // "Package "
}
@@ -1616,7 +1616,7 @@ class TranslatorFinnish : public TranslatorAdapter_1_6_0
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result=dirName; result+=" hakemistoreferenssi"; return result; }
// " Directory Reference"
@@ -1748,7 +1748,7 @@ class TranslatorFinnish : public TranslatorAdapter_1_6_0
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1769,7 +1769,7 @@ class TranslatorFinnish : public TranslatorAdapter_1_6_0
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" moduulin referenssi"; // " Module Reference"
diff --git a/src/translator_fr.h b/src/translator_fr.h
index a4eafc2..9bbcf2c 100644
--- a/src/translator_fr.h
+++ b/src/translator_fr.h
@@ -202,9 +202,9 @@ class TranslatorFrench : public TranslatorAdapter_1_8_15
/*! this is put at the author sections at the bottom of man pages.
* parameter s is name of the project name.
*/
- virtual QCString trGeneratedAutomatically(const char *s)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Généré automatiquement par Doxygen";
- if (s) result+=(QCString)" pour "+s;
+ if (!s.isEmpty()) result+=(QCString)" pour "+s;
result+=" à partir du code source.";
return result;
}
@@ -569,16 +569,16 @@ class TranslatorFrench : public TranslatorAdapter_1_8_15
/*! This is used in the standard footer of each page and indicates when
* the page was generated
*/
- virtual QCString trGeneratedAt(const char *date,const char *projName)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"Généré le "+date;
- if (projName) result+=(QCString)" pour "+projName;
+ if (!projName.isEmpty()) result+=(QCString)" pour "+projName;
result+=(QCString)" par";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return (QCString)"Graphe d'héritage de "+clName+":";
}
@@ -657,7 +657,7 @@ class TranslatorFrench : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -680,7 +680,7 @@ class TranslatorFrench : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result= "Référence du fichier ";
result+=fileName;
@@ -688,7 +688,7 @@ class TranslatorFrench : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result= "Référence de l'espace de nommage ";
result+=namespaceName;
@@ -888,12 +888,12 @@ class TranslatorFrench : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Graphe de collaboration de "+clName+":";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Graphe des dépendances par inclusion de "+fName+":";
}
@@ -1173,7 +1173,7 @@ class TranslatorFrench : public TranslatorAdapter_1_8_15
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Paquetage "+name;
}
@@ -1568,7 +1568,7 @@ class TranslatorFrench : public TranslatorAdapter_1_8_15
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result="Répertoire de référence de "; result+=dirName; return result; }
/*! This returns the word directory with or without starting capital
@@ -1695,7 +1695,7 @@ class TranslatorFrench : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1716,7 +1716,7 @@ class TranslatorFrench : public TranslatorAdapter_1_8_15
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result="Référence du module ";
result+= namespaceName;
@@ -1818,7 +1818,7 @@ class TranslatorFrench : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! directory relation for \a name */
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
return "Relation " + QCString(name);
}
@@ -1855,7 +1855,7 @@ class TranslatorFrench : public TranslatorAdapter_1_8_15
* table is shown. The heading for the first column mentions the
* source file that has a relation to another file.
*/
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return (QCString)"Fichier dans "+name;
}
@@ -1864,7 +1864,7 @@ class TranslatorFrench : public TranslatorAdapter_1_8_15
* table is shown. The heading for the second column mentions the
* destination file that is included.
*/
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return (QCString)"Inclut le fichier dans "+name;
}
@@ -1909,7 +1909,7 @@ class TranslatorFrench : public TranslatorAdapter_1_8_15
{ return "Copyright"; }
/*! Header for the graph showing the directory dependencies */
- virtual QCString trDirDepGraph(const char *name)
+ virtual QCString trDirDepGraph(const QCString &name)
{ return QCString("Graphe des dépendances de répertoires pour ")+name+":"; }
@@ -1938,11 +1938,11 @@ class TranslatorFrench : public TranslatorAdapter_1_8_15
}
/*! Header of a Java enum page (Java enums are represented as classes). */
- virtual QCString trEnumReference(const char *name)
+ virtual QCString trEnumReference(const QCString &name)
{ return QCString(name)+" Référence de l'énumération"; }
/*! Used for a section containing inherited members */
- virtual QCString trInheritedFrom(const char *members,const char *what)
+ virtual QCString trInheritedFrom(const QCString &members,const QCString &what)
{ return QCString(members)+" hérités de "+what; }
/*! Header of the sections with inherited members specific for the
@@ -2023,21 +2023,21 @@ class TranslatorFrench : public TranslatorAdapter_1_8_15
{ return "Groupes constants"; }
/** UNO IDL constant groups */
- virtual QCString trConstantGroupReference(const char *namespaceName)
+ virtual QCString trConstantGroupReference(const QCString &namespaceName)
{
QCString result="Référence du groupe constant ";
result+=namespaceName;
return result;
}
/** UNO IDL service page title */
- virtual QCString trServiceReference(const char *sName)
+ virtual QCString trServiceReference(const QCString &sName)
{
QCString result="Référence du service ";
result+=(QCString)sName;
return result;
}
/** UNO IDL singleton page title */
- virtual QCString trSingletonReference(const char *sName)
+ virtual QCString trSingletonReference(const QCString &sName)
{
QCString result="Référence du singleton ";
result+=(QCString)sName;
@@ -2176,7 +2176,7 @@ class TranslatorFrench : public TranslatorAdapter_1_8_15
return "Classe";
}
}
- virtual QCString trCustomReference(const char *name)
+ virtual QCString trCustomReference(const QCString &name)
{ return QCString("Référence ") + QCString(name); }
virtual QCString trConstants()
@@ -2275,7 +2275,7 @@ class TranslatorFrench : public TranslatorAdapter_1_8_15
{
return "Documentation des exceptions";
}
- virtual QCString trCompoundReferenceSlice(const char *clName, ClassDef::CompoundType compType, bool isLocal)
+ virtual QCString trCompoundReferenceSlice(const QCString &clName, ClassDef::CompoundType compType, bool isLocal)
{
QCString result = "Référence ";
bool feminine = true;
diff --git a/src/translator_gr.h b/src/translator_gr.h
index a0511b7..b40b2ec 100644
--- a/src/translator_gr.h
+++ b/src/translator_gr.h
@@ -140,9 +140,9 @@ class TranslatorGreek : public TranslatorAdapter_1_8_15
/*! this is put at the author sections at the bottom of man pages.
* parameter s is name of the project name.
*/
- virtual QCString trGeneratedAutomatically(const char *s)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Δημιουργήθηκε αυτόματα από το Doxygen";
- if (s) result+=(QCString)" για "+s;
+ if (!s.isEmpty()) result+=(QCString)" για "+s;
result+=" από τον πηγαίο κώδικα.";
return result;
}
@@ -501,16 +501,16 @@ class TranslatorGreek : public TranslatorAdapter_1_8_15
/*! This is used in the standard footer of each page and indicates when
* the page was generated
*/
- virtual QCString trGeneratedAt(const char *date,const char *projName)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"Δημιουργήθηκε στις "+date;
- if (projName) result+=(QCString)" για "+projName;
+ if (!projName.isEmpty()) result+=(QCString)" για "+projName;
result+=(QCString)" από";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return (QCString)"Διάγραμμα κληρονομικότητας για την "+clName+":";
}
@@ -589,7 +589,7 @@ class TranslatorGreek : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -611,7 +611,7 @@ class TranslatorGreek : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result="Τεκμηρίωση Αρχείου ";
result+=fileName;
@@ -619,7 +619,7 @@ class TranslatorGreek : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result="Τεκμηρίωση Χώρου Ονομάτων ";
result+=namespaceName;
@@ -816,12 +816,12 @@ class TranslatorGreek : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Διάγραμμα Συνεργασίας για την κλάση "+clName+":";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Διάγραμμα εξάρτησης αρχείου συμπερίληψης για το "+fName+":";
}
@@ -1104,7 +1104,7 @@ class TranslatorGreek : public TranslatorAdapter_1_8_15
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Πακέτο "+name;
}
@@ -1508,7 +1508,7 @@ class TranslatorGreek : public TranslatorAdapter_1_8_15
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result=QCString("Αναφορά του Καταλόγου ") + dirName; return result; }
/*! This returns the word directory with or without starting capital
@@ -1636,7 +1636,7 @@ class TranslatorGreek : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1657,7 +1657,7 @@ class TranslatorGreek : public TranslatorAdapter_1_8_15
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" Δηλώσεις Υπομονάδων";
@@ -1757,7 +1757,7 @@ class TranslatorGreek : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! directory relation for \a name */
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
return "Σχέση του "+QCString(name);
}
@@ -1794,7 +1794,7 @@ class TranslatorGreek : public TranslatorAdapter_1_8_15
* table is shown. The heading for the first column mentions the
* source file that has a relation to another file.
*/
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return (QCString)"Αρχείο σε "+name;
}
@@ -1803,7 +1803,7 @@ class TranslatorGreek : public TranslatorAdapter_1_8_15
* table is shown. The heading for the second column mentions the
* destination file that is included.
*/
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return (QCString)"Εσωκλείει το αρχείο στο "+name;
}
@@ -1848,7 +1848,7 @@ class TranslatorGreek : public TranslatorAdapter_1_8_15
{ return "Copyright"; }
/*! Header for the graph showing the directory dependencies */
- virtual QCString trDirDepGraph(const char *name)
+ virtual QCString trDirDepGraph(const QCString &name)
{ return QCString("Διάγραμμα εξάρτησης φακέλων για ")+name+":"; }
@@ -1877,11 +1877,11 @@ class TranslatorGreek : public TranslatorAdapter_1_8_15
}
/*! Header of a Java enum page (Java enums are represented as classes). */
- virtual QCString trEnumReference(const char *name)
+ virtual QCString trEnumReference(const QCString &name)
{ return QCString("Αναφορά Απαρίθμησης ") + QCString(name); }
/*! Used for a section containing inherited members */
- virtual QCString trInheritedFrom(const char *members,const char *what)
+ virtual QCString trInheritedFrom(const QCString &members,const QCString &what)
{ return QCString(members)+" κληρονόμησαν από "+what; }
/*! Header of the sections with inherited members specific for the
@@ -1962,21 +1962,21 @@ class TranslatorGreek : public TranslatorAdapter_1_8_15
{ return "Ομάδες Σταθερών"; }
/** UNO IDL constant groups */
- virtual QCString trConstantGroupReference(const char *namespaceName)
+ virtual QCString trConstantGroupReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" Τεκμηρίωση Ομάδας Σταθερών";
return result;
}
/** UNO IDL service page title */
- virtual QCString trServiceReference(const char *sName)
+ virtual QCString trServiceReference(const QCString &sName)
{
QCString result=(QCString)sName;
result+=" Τεκμηρίωση Υπηρεσίας";
return result;
}
/** UNO IDL singleton page title */
- virtual QCString trSingletonReference(const char *sName)
+ virtual QCString trSingletonReference(const QCString &sName)
{
QCString result=(QCString)sName;
result+=" Τεκμηρίωση Μονοσύνολου";
diff --git a/src/translator_hr.h b/src/translator_hr.h
index 3f9f492..9f9f841 100644
--- a/src/translator_hr.h
+++ b/src/translator_hr.h
@@ -118,9 +118,9 @@ class TranslatorCroatian : public TranslatorAdapter_1_8_2
{ return "Ovo je popis svih članova"; }
QCString trIncludingInheritedMembers()
{ return ", uključujući naslijeđene članove."; }
- QCString trGeneratedAutomatically(const char *s)
+ QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="napravljeno automatski Doxygen-om";
- if (s) result+=(QCString)" za "+s;
+ if (!s.isEmpty()) result+=(QCString)" za "+s;
result+=" iz programskog koda.";
return result;
}
@@ -285,14 +285,14 @@ class TranslatorCroatian : public TranslatorAdapter_1_8_2
{ return "Dokumentacija varijable"; }
QCString trCompounds()
{ return "Strukture"; }
- QCString trGeneratedAt(const char *date,const char *projName)
+ QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"Napravljeno "+date;
- if (projName) result+=(QCString)" projekt: "+projName;
+ if (!projName.isEmpty()) result+=(QCString)" projekt: "+projName;
result+=" generator: ";
return result;
}
- QCString trClassDiagram(const char *clName)
+ QCString trClassDiagram(const QCString &clName)
{
return QCString("Dijagram klasa za ")+clName;
}
@@ -342,7 +342,7 @@ class TranslatorCroatian : public TranslatorAdapter_1_8_2
// new since 0.49-990425
//////////////////////////////////////////////////////////////////////////
- QCString trCompoundReference(const char *clName,
+ QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool /*isTemplate*/)
// used as the title of the HTML page of a class/struct/union
@@ -362,14 +362,14 @@ class TranslatorCroatian : public TranslatorAdapter_1_8_2
result += clName;
return result;
}
- QCString trFileReference(const char *fileName)
+ QCString trFileReference(const QCString &fileName)
// used as the title of the HTML page of a file
{
QCString result="Opis datoteke ";
result+=fileName;
return result;
}
- QCString trNamespaceReference(const char *namespaceName)
+ QCString trNamespaceReference(const QCString &namespaceName)
// used as the title of the HTML page of a namespace
{
QCString result ="Opis imenika ";
@@ -559,12 +559,12 @@ class TranslatorCroatian : public TranslatorAdapter_1_8_2
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- QCString trCollaborationDiagram(const char *clName)
+ QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Kolaboracijski dijagram za "+clName+ ":";
}
/*! this text is put before an include dependency graph */
- QCString trInclDepGraph(const char *fName)
+ QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Graf include međuovisnosti za "+fName+":";
}
@@ -824,7 +824,7 @@ class TranslatorCroatian : public TranslatorAdapter_1_8_2
return "Klase";
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Paket "+name;
}
@@ -1194,7 +1194,7 @@ class TranslatorCroatian : public TranslatorAdapter_1_8_2
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result= "Opis direktorija "; result += dirName; return result; }
/*! This returns the word directory with or without starting capital
@@ -1320,7 +1320,7 @@ class TranslatorCroatian : public TranslatorAdapter_1_8_2
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1341,7 +1341,7 @@ class TranslatorCroatian : public TranslatorAdapter_1_8_2
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" - Sadržaj modula";
@@ -1438,7 +1438,7 @@ class TranslatorCroatian : public TranslatorAdapter_1_8_2
//////////////////////////////////////////////////////////////////////////
/*! directory relation for \a name */
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
return QCString("Relacije ") + QCString(name);
}
@@ -1475,7 +1475,7 @@ class TranslatorCroatian : public TranslatorAdapter_1_8_2
* table is shown. The heading for the first column mentions the
* source file that has a relation to another file.
*/
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return (QCString)"Datoteka u "+name;
}
@@ -1484,7 +1484,7 @@ class TranslatorCroatian : public TranslatorAdapter_1_8_2
* table is shown. The heading for the second column mentions the
* destination file that is included.
*/
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return (QCString)"Uključuje datotake u "+name;
}
@@ -1528,7 +1528,7 @@ class TranslatorCroatian : public TranslatorAdapter_1_8_2
{ return "Copyright"; }
/*! Header for the graph showing the directory dependencies */
- virtual QCString trDirDepGraph(const char *name)
+ virtual QCString trDirDepGraph(const QCString &name)
{ return QCString("Direktoriji o kojima ovisi ")+name+":"; }
//////////////////////////////////////////////////////////////////////////
@@ -1556,11 +1556,11 @@ class TranslatorCroatian : public TranslatorAdapter_1_8_2
}
/*! Header of a Java enum page (Java enums are represented as classes). */
- virtual QCString trEnumReference(const char *name)
+ virtual QCString trEnumReference(const QCString &name)
{ return "Opis enumeracije " + QCString(name); }
/*! Used for a section containing inherited members */
- virtual QCString trInheritedFrom(const char *members,const char *what)
+ virtual QCString trInheritedFrom(const QCString &members,const QCString &what)
{ return QCString(members)+" naslijeđeni od "+what; }
/*! Header of the sections with inherited members specific for the
diff --git a/src/translator_hu.h b/src/translator_hu.h
index ae2e169..67f3570 100644
--- a/src/translator_hu.h
+++ b/src/translator_hu.h
@@ -167,9 +167,9 @@ class TranslatorHungarian : public TranslatorAdapter_1_8_15
/*! this is put at the author sections at the bottom of man pages.
* parameter s is name of the project name.
*/
- virtual QCString trGeneratedAutomatically(const char *s)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Ezt a dokumentációt a Doxygen készítette ";
- if (s) result+=(QCString)" a" + zed(s[0])+s+(QCString)" projekthez";
+ if (!s.isEmpty()) result+=(QCString)" a" + zed(s[0])+s+(QCString)" projekthez";
result+=" a forráskódból.";
return result;
}
@@ -530,16 +530,16 @@ class TranslatorHungarian : public TranslatorAdapter_1_8_15
/*! This is used in the standard footer of each page and indicates when
* the page was generated
*/
- virtual QCString trGeneratedAt(const char *date,const char *projName)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"";
- if (projName) result+=(QCString)"Projekt: "+projName;
+ if (!projName.isEmpty()) result+=(QCString)"Projekt: "+projName;
result+=(QCString)" Készült: "+date+" Készítette: ";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return (QCString)"A"+zed(clName[0])+clName+" osztály származási diagramja:";
}
@@ -618,7 +618,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -640,7 +640,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result=fileName;
result+=" fájlreferencia";
@@ -648,7 +648,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" névtér-referencia";
@@ -845,12 +845,12 @@ class TranslatorHungarian : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"A"+zed(clName[0])+clName+" osztály együttműködési diagramja:";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"A"+zed(fName[0])+fName+" definíciós fájl függési gráfja:";
}
@@ -1131,7 +1131,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_8_15
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return name+(QCString)" csomag";
}
@@ -1526,7 +1526,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_8_15
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result=dirName; result+=" könyvtárreferencia"; return result; }
/*! This returns the word directory with or without starting capital
@@ -1653,7 +1653,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1674,7 +1674,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_8_15
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" modul hivatkozás";
@@ -1777,7 +1777,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! directory relation for \a name */
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
return QCString(name)+" kapcsolat";
}
@@ -1814,7 +1814,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_8_15
* table is shown. The heading for the first column mentions the
* source file that has a relation to another file.
*/
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return (QCString)"Fájl a(z) "+name+" könyvtárban";
}
@@ -1823,7 +1823,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_8_15
* table is shown. The heading for the second column mentions the
* destination file that is included.
*/
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return (QCString)"Tartalmazott fájl a(z) "+name+" könyvtárban";
}
@@ -1868,7 +1868,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_8_15
{ return "Szerzői jog"; }
/*! Header for the graph showing the directory dependencies */
- virtual QCString trDirDepGraph(const char *name)
+ virtual QCString trDirDepGraph(const QCString &name)
{ return QCString("Könyvtár függőségi gráf a(z) ")+name+"-könyvtárhoz:"; }
//////////////////////////////////////////////////////////////////////////
@@ -1896,11 +1896,11 @@ class TranslatorHungarian : public TranslatorAdapter_1_8_15
}
/*! Header of a Java enum page (Java enums are represented as classes). */
- virtual QCString trEnumReference(const char *name)
+ virtual QCString trEnumReference(const QCString &name)
{ return QCString(name)+" felsoroló referencia"; }
/*! Used for a section containing inherited members */
- virtual QCString trInheritedFrom(const char *members,const char *what)
+ virtual QCString trInheritedFrom(const QCString &members,const QCString &what)
{ return QCString(members)+" a(z) "+what+" osztályból származnak"; }
/*! Header of the sections with inherited members specific for the
@@ -1981,21 +1981,21 @@ class TranslatorHungarian : public TranslatorAdapter_1_8_15
{ return "Konstans csoportok"; }
/** UNO IDL constant groups */
- virtual QCString trConstantGroupReference(const char *namespaceName)
+ virtual QCString trConstantGroupReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" konstans csoport referencia";
return result;
}
/** UNO IDL service page title */
- virtual QCString trServiceReference(const char *sName)
+ virtual QCString trServiceReference(const QCString &sName)
{
QCString result=(QCString)sName;
result+=" szolgáltatás referencia";
return result;
}
/** UNO IDL singleton page title */
- virtual QCString trSingletonReference(const char *sName)
+ virtual QCString trSingletonReference(const QCString &sName)
{
QCString result=(QCString)sName;
result+=" egyke példány referencia";
diff --git a/src/translator_id.h b/src/translator_id.h
index 4b5626a..cb7ae2e 100644
--- a/src/translator_id.h
+++ b/src/translator_id.h
@@ -125,9 +125,9 @@ class TranslatorIndonesian : public TranslatorAdapter_1_8_0
/*! this is put at the author sections at the bottom of man pages.
* parameter s is name of the project name.
*/
- virtual QCString trGeneratedAutomatically(const char *s)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Dibangkitkan secara otomatis oleh Doxygen";
- if (s) result+=(QCString)" untuk "+s;
+ if (!s.isEmpty()) result+=(QCString)" untuk "+s;
result+=" dari kode sumber.";
return result;
}
@@ -486,16 +486,16 @@ class TranslatorIndonesian : public TranslatorAdapter_1_8_0
/*! This is used in the standard footer of each page and indicates when
* the page was generated
*/
- virtual QCString trGeneratedAt(const char *date,const char *projName)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"Dibangkitkan pada tanggal "+date;
- if (projName) result+=(QCString)" untuk "+projName;
+ if (!projName.isEmpty()) result+=(QCString)" untuk "+projName;
result+=(QCString)" oleh";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return (QCString)"Diagram hierarki kelas untuk "+clName+":";
}
@@ -574,7 +574,7 @@ class TranslatorIndonesian : public TranslatorAdapter_1_8_0
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -596,7 +596,7 @@ class TranslatorIndonesian : public TranslatorAdapter_1_8_0
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result="Referensi File ";
result+=fileName;
@@ -604,7 +604,7 @@ class TranslatorIndonesian : public TranslatorAdapter_1_8_0
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result="Referensi Namespace ";
result+=namespaceName;
@@ -802,12 +802,12 @@ class TranslatorIndonesian : public TranslatorAdapter_1_8_0
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Diagram kolaborasi untuk "+clName+":";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Bagan kebergantungan pemuatan untuk "+fName+":";
}
@@ -1086,7 +1086,7 @@ class TranslatorIndonesian : public TranslatorAdapter_1_8_0
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Paket "+name;
}
@@ -1479,7 +1479,7 @@ class TranslatorIndonesian : public TranslatorAdapter_1_8_0
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result="Referensi Direktori "; result+=dirName; return result; }
/*! This returns the word directory with or without starting capital
@@ -1606,7 +1606,7 @@ class TranslatorIndonesian : public TranslatorAdapter_1_8_0
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1627,7 +1627,7 @@ class TranslatorIndonesian : public TranslatorAdapter_1_8_0
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result="Referensi Modul ";
result+=namespaceName;
@@ -1727,7 +1727,7 @@ class TranslatorIndonesian : public TranslatorAdapter_1_8_0
//////////////////////////////////////////////////////////////////////////
/*! directory relation for \a name */
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
return "Relasi "+QCString(name);
}
@@ -1764,7 +1764,7 @@ class TranslatorIndonesian : public TranslatorAdapter_1_8_0
* table is shown. The heading for the first column mentions the
* source file that has a relation to another file.
*/
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return (QCString)"File dimuat dalam "+name;
}
@@ -1773,7 +1773,7 @@ class TranslatorIndonesian : public TranslatorAdapter_1_8_0
* table is shown. The heading for the second column mentions the
* destination file that is included.
*/
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return (QCString)"Memuat file dalam "+name;
}
@@ -1818,7 +1818,7 @@ class TranslatorIndonesian : public TranslatorAdapter_1_8_0
{ return "Hak Cipta"; }
/*! Header for the graph showing the directory dependencies */
- virtual QCString trDirDepGraph(const char *name)
+ virtual QCString trDirDepGraph(const QCString &name)
{ return QCString("Bagan dependensi directori untuk ")+name+":"; }
};
diff --git a/src/translator_it.h b/src/translator_it.h
index 4b12dae..87361d3 100644
--- a/src/translator_it.h
+++ b/src/translator_it.h
@@ -179,10 +179,10 @@ class TranslatorItalian : public TranslatorAdapter_1_8_15
/*! this is put at the author sections at the bottom of man pages.
* parameter s is name of the project name.
*/
- QCString trGeneratedAutomatically(const char *s)
+ QCString trGeneratedAutomatically(const QCString &s)
{
QCString result="Generato automaticamente da Doxygen";
- if (s) result+=(QCString)" per "+s;
+ if (!s.isEmpty()) result+=(QCString)" per "+s;
result+=" a partire dal codice sorgente.";
return result;
}
@@ -518,16 +518,16 @@ class TranslatorItalian : public TranslatorAdapter_1_8_15
/*! This is used in the standard footer of each page and indicates when
* the page was generated
*/
- QCString trGeneratedAt(const char *date,const char *projName)
+ QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"Generato "+date;
- if (projName) result+=(QCString)" per "+projName;
+ if (!projName.isEmpty()) result+=(QCString)" per "+projName;
result+=(QCString)" da";
return result;
}
/*! this text is put before a class diagram */
- QCString trClassDiagram(const char *clName)
+ QCString trClassDiagram(const QCString &clName)
{
return (QCString)"Diagramma delle classi per "+clName;
}
@@ -607,7 +607,7 @@ class TranslatorItalian : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- QCString trCompoundReference(const char *clName,
+ QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -630,7 +630,7 @@ class TranslatorItalian : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a file */
- QCString trFileReference(const char *fileName)
+ QCString trFileReference(const QCString &fileName)
{
QCString result="Riferimenti per il file ";
result+=(QCString)fileName;
@@ -638,7 +638,7 @@ class TranslatorItalian : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a namespace */
- QCString trNamespaceReference(const char *namespaceName)
+ QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result="Riferimenti per il namespace ";
result+=(QCString)namespaceName;
@@ -838,12 +838,12 @@ class TranslatorItalian : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- QCString trCollaborationDiagram(const char *clName)
+ QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Diagramma di collaborazione per "+clName+":";
}
/*! this text is put before an include dependency graph */
- QCString trInclDepGraph(const char *fName)
+ QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Grafo delle dipendenze di inclusione per "+fName+":";
}
@@ -1117,7 +1117,7 @@ class TranslatorItalian : public TranslatorAdapter_1_8_15
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Package "+name;
}
@@ -1483,7 +1483,7 @@ class TranslatorItalian : public TranslatorAdapter_1_8_15
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result="Riferimenti per la directory "; result+=dirName; return result; }
/*! This returns the word directory with or without starting capital
@@ -1609,7 +1609,7 @@ class TranslatorItalian : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1631,7 +1631,7 @@ class TranslatorItalian : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result="Riferimenti per il modulo ";
result+=namespaceName;
@@ -1733,7 +1733,7 @@ class TranslatorItalian : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! directory relation for \a name */
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
return "Relazione per "+QCString(name);
}
@@ -1770,7 +1770,7 @@ class TranslatorItalian : public TranslatorAdapter_1_8_15
* table is shown. The heading for the first column mentions the
* source file that has a relation to another file.
*/
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return (QCString)"File in "+name;
}
@@ -1779,7 +1779,7 @@ class TranslatorItalian : public TranslatorAdapter_1_8_15
* table is shown. The heading for the second column mentions the
* destination file that is included.
*/
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return (QCString)"Include il file in "+name;
}
@@ -1824,7 +1824,7 @@ class TranslatorItalian : public TranslatorAdapter_1_8_15
{ return "Copyright"; }
/*! Header for the graph showing the directory dependencies */
- virtual QCString trDirDepGraph(const char *name)
+ virtual QCString trDirDepGraph(const QCString &name)
{ return QCString("Grafo di dipendenza delle directory per ")+name+":"; }
//////////////////////////////////////////////////////////////////////////
@@ -1853,11 +1853,11 @@ class TranslatorItalian : public TranslatorAdapter_1_8_15
}
/*! Header of a Java enum page (Java enums are represented as classes). */
- virtual QCString trEnumReference(const char *name)
+ virtual QCString trEnumReference(const QCString &name)
{ return QCString("Riferimenti per il tipo enumerato ") + QCString(name); }
/*! Used for a section containing inherited members */
- virtual QCString trInheritedFrom(const char *members,const char *what)
+ virtual QCString trInheritedFrom(const QCString &members,const QCString &what)
{ return QCString(members)+" ereditati da "+what; }
/*! Header of the sections with inherited members specific for the
@@ -1938,21 +1938,21 @@ class TranslatorItalian : public TranslatorAdapter_1_8_15
{ return "Gruppi di costanti"; }
/** UNO IDL constant groups */
- virtual QCString trConstantGroupReference(const char *namespaceName)
+ virtual QCString trConstantGroupReference(const QCString &namespaceName)
{
QCString result="Riferimenti per il gruppo di costanti ";
result+=namespaceName;
return result;
}
/** UNO IDL service page title */
- virtual QCString trServiceReference(const char *sName)
+ virtual QCString trServiceReference(const QCString &sName)
{
QCString result=(QCString)"Riferimenti per il servizio ";
result+=sName;
return result;
}
/** UNO IDL singleton page title */
- virtual QCString trSingletonReference(const char *sName)
+ virtual QCString trSingletonReference(const QCString &sName)
{
QCString result=(QCString)"Riferimenti per il singleton ";
result+=sName;
diff --git a/src/translator_jp.h b/src/translator_jp.h
index 7985823..0f9cdf7 100644
--- a/src/translator_jp.h
+++ b/src/translator_jp.h
@@ -167,9 +167,9 @@ class TranslatorJapanese : public TranslatorAdapter_1_8_15
/*! this is put at the author sections at the bottom of man pages.
* parameter s is name of the project name.
*/
- virtual QCString trGeneratedAutomatically(const char *s)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result = "Doxygen により";
- if (s) result=(QCString)" "+s+"の";
+ if (!s.isEmpty()) result=(QCString)" "+s+"の";
result+="ソースコードから抽出しました。";
return result;
}
@@ -534,16 +534,16 @@ class TranslatorJapanese : public TranslatorAdapter_1_8_15
/*! This is used in the standard footer of each page and indicates when
* the page was generated
*/
- virtual QCString trGeneratedAt(const char *date,const char *projName)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result = (QCString)date+"作成";
- if (projName) result+=(QCString)" - " + projName;
+ if (!projName.isEmpty()) result+=(QCString)" - " + projName;
result+=" / 構成: ";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return (QCString)clName+" の継承関係図";
}
@@ -623,7 +623,7 @@ class TranslatorJapanese : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -644,14 +644,14 @@ class TranslatorJapanese : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result=(QCString)fileName+" ファイル";
return result;
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result=(QCString)namespaceName+" 名前空間";
return result;
@@ -850,12 +850,12 @@ class TranslatorJapanese : public TranslatorAdapter_1_8_15
}
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)clName+" 連携図";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)fName+" の依存先関係図:";
}
@@ -1128,7 +1128,7 @@ class TranslatorJapanese : public TranslatorAdapter_1_8_15
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)name+" パッケージ";
}
@@ -1507,7 +1507,7 @@ class TranslatorJapanese : public TranslatorAdapter_1_8_15
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result=dirName; result+=" ディレクトリリファレンス"; return result; }
/*! This returns the word directory with or without starting capital
@@ -1634,7 +1634,7 @@ class TranslatorJapanese : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1655,7 +1655,7 @@ class TranslatorJapanese : public TranslatorAdapter_1_8_15
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+="モジュール";
@@ -1744,7 +1744,7 @@ class TranslatorJapanese : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! directory relation for \a name */
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
return QCString(name)+" 関係";
}
@@ -1781,7 +1781,7 @@ class TranslatorJapanese : public TranslatorAdapter_1_8_15
* table is shown. The heading for the first column mentions the
* source file that has a relation to another file.
*/
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return (QCString)name+"にあるファイル";
}
@@ -1790,7 +1790,7 @@ class TranslatorJapanese : public TranslatorAdapter_1_8_15
* table is shown. The heading for the second column mentions the
* destination file that is included.
*/
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return (QCString)name+"にあるファイルを include している";
}
@@ -1834,7 +1834,7 @@ class TranslatorJapanese : public TranslatorAdapter_1_8_15
{ return "著作権所有"; }
/*! Header for the graph showing the directory dependencies */
- virtual QCString trDirDepGraph(const char *name)
+ virtual QCString trDirDepGraph(const QCString &name)
{ return QCString(name)+" のディレクトリ依存関係図"; }
//////////////////////////////////////////////////////////////////////////
@@ -1860,11 +1860,11 @@ class TranslatorJapanese : public TranslatorAdapter_1_8_15
}
/*! Header of a Java enum page (Java enums are represented as classes). */
- virtual QCString trEnumReference(const char *name)
+ virtual QCString trEnumReference(const QCString &name)
{ return QCString("列挙 ")+name+" 詳解"; }
/*! Used for a section containing inherited members */
- virtual QCString trInheritedFrom(const char *members,const char *what)
+ virtual QCString trInheritedFrom(const QCString &members,const QCString &what)
{ return QCString("基底クラス ")+what+" に属する継承"+members; }
/*! Header of the sections with inherited members specific for the
@@ -1946,21 +1946,21 @@ class TranslatorJapanese : public TranslatorAdapter_1_8_15
{ return "定数グループ"; }
/** UNO IDL constant groups */
- virtual QCString trConstantGroupReference(const char *namespaceName)
+ virtual QCString trConstantGroupReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" 定数グループ詳解";
return result;
}
/** UNO IDL service page title */
- virtual QCString trServiceReference(const char *sName)
+ virtual QCString trServiceReference(const QCString &sName)
{
QCString result=(QCString)sName;
result+=" サービス詳解";
return result;
}
/** UNO IDL singleton page title */
- virtual QCString trSingletonReference(const char *sName)
+ virtual QCString trSingletonReference(const QCString &sName)
{
QCString result=(QCString)sName;
result+=" Singleton 詳解";
diff --git a/src/translator_kr.h b/src/translator_kr.h
index dda8f6e..c0ae658 100644
--- a/src/translator_kr.h
+++ b/src/translator_kr.h
@@ -165,9 +165,9 @@ class TranslatorKorean : public TranslatorAdapter_1_8_15
/*! this is put at the author sections at the bottom of man pages.
* parameter s is name of the project name.
*/
- virtual QCString trGeneratedAutomatically(const char *s)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="소스 코드로부터 ";
- if (s) result+=s+(QCString)"를 위해 ";
+ if (!s.isEmpty()) result+=s+(QCString)"를 위해 ";
result+="Doxygen에 의해 자동으로 생성됨.";
return result;
}
@@ -529,16 +529,16 @@ class TranslatorKorean : public TranslatorAdapter_1_8_15
/*! This is used in the standard footer of each page and indicates when
* the page was generated
*/
- virtual QCString trGeneratedAt(const char *date,const char *projName)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"생성시간 : "+date;
- if (projName) result+=(QCString)", 프로젝트명 : "+projName;
+ if (!projName.isEmpty()) result+=(QCString)", 프로젝트명 : "+projName;
result+=(QCString)", 생성자 : ";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return (QCString)clName+"에 대한 상속 다이어그램 : ";
}
@@ -617,7 +617,7 @@ class TranslatorKorean : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -639,7 +639,7 @@ class TranslatorKorean : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result=fileName;
result+=" 파일 참조";
@@ -647,7 +647,7 @@ class TranslatorKorean : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" 네임스페이스 참조";
@@ -845,12 +845,12 @@ class TranslatorKorean : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)clName+"에 대한 협력 다이어그램:";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)fName+"에 대한 include 의존 그래프";
}
@@ -1124,7 +1124,7 @@ class TranslatorKorean : public TranslatorAdapter_1_8_15
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return name+(QCString)" 패키지";
}
@@ -1517,7 +1517,7 @@ class TranslatorKorean : public TranslatorAdapter_1_8_15
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result=dirName; result+=" 디렉토리 참조"; return result; }
/*! This returns the word directory with or without starting capital
@@ -1645,7 +1645,7 @@ class TranslatorKorean : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1666,7 +1666,7 @@ class TranslatorKorean : public TranslatorAdapter_1_8_15
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" 모듈 참조";
@@ -1767,7 +1767,7 @@ class TranslatorKorean : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! directory relation for \a name */
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
return QCString(name)+" 관계";
}
@@ -1804,7 +1804,7 @@ class TranslatorKorean : public TranslatorAdapter_1_8_15
* table is shown. The heading for the first column mentions the
* source file that has a relation to another file.
*/
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return QCString(name) + "의 파일";
}
@@ -1813,7 +1813,7 @@ class TranslatorKorean : public TranslatorAdapter_1_8_15
* table is shown. The heading for the second column mentions the
* destination file that is included.
*/
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return QCString(name) + "의 파일 포함";
}
@@ -1858,7 +1858,7 @@ class TranslatorKorean : public TranslatorAdapter_1_8_15
{ return "Copyright"; }
/*! Header for the graph showing the directory dependencies */
- virtual QCString trDirDepGraph(const char *name)
+ virtual QCString trDirDepGraph(const QCString &name)
{ return QCString(name) + QCString("에 대한 디렉토리 의존성 그래프:"); }
//////////////////////////////////////////////////////////////////////////
@@ -1884,11 +1884,11 @@ class TranslatorKorean : public TranslatorAdapter_1_8_15
}
/*! Header of a Java enum page (Java enums are represented as classes). */
- virtual QCString trEnumReference(const char *name)
+ virtual QCString trEnumReference(const QCString &name)
{ return QCString(name)+" Enum Reference"; }
/*! Used for a section containing inherited members */
- virtual QCString trInheritedFrom(const char *members,const char *what)
+ virtual QCString trInheritedFrom(const QCString &members,const QCString &what)
{ return QCString(what) + QCString("(으)로부터 상속된 ") + QCString(members); }
/*! Header of the sections with inherited members specific for the
@@ -1969,21 +1969,21 @@ class TranslatorKorean : public TranslatorAdapter_1_8_15
{ return "상수 그룹들"; }
/** UNO IDL constant groups */
- virtual QCString trConstantGroupReference(const char *namespaceName)
+ virtual QCString trConstantGroupReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" 상수 그룹 레퍼런스";
return result;
}
/** UNO IDL service page title */
- virtual QCString trServiceReference(const char *sName)
+ virtual QCString trServiceReference(const QCString &sName)
{
QCString result=(QCString)sName;
result+=" 서비스 레퍼런스";
return result;
}
/** UNO IDL singleton page title */
- virtual QCString trSingletonReference(const char *sName)
+ virtual QCString trSingletonReference(const QCString &sName)
{
QCString result=(QCString)sName;
result+=" 싱글톤 레퍼런스";
diff --git a/src/translator_lt.h b/src/translator_lt.h
index 1be20d2..ad88331 100644
--- a/src/translator_lt.h
+++ b/src/translator_lt.h
@@ -132,9 +132,9 @@ class TranslatorLithuanian : public TranslatorAdapter_1_4_6
/*! this is put at the author sections at the bottom of man pages.
* parameter s is name of the project name.
*/
- virtual QCString trGeneratedAutomatically(const char *s)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Automatiškai sugeneruota Doxygen įrankiu";
- if (s) result+=(QCString)" "+s;
+ if (!s.isEmpty()) result+=(QCString)" "+s;
result+=" iš programos kodo.";
return result;
}
@@ -494,16 +494,16 @@ class TranslatorLithuanian : public TranslatorAdapter_1_4_6
/*! This is used in the standard footer of each page and indicates when
* the page was generated
*/
- virtual QCString trGeneratedAt(const char *date,const char *projName)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"Sugeneruota "+date;/*FIXME*/
- if (projName) result+=(QCString)" "+projName;/*FIXME*/
+ if (!projName.isEmpty()) result+=(QCString)" "+projName;/*FIXME*/
result+=(QCString)" ";/*FIXME*/
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return (QCString)"Paveldimumo diagrama "+clName+":"; /*FIXME*/
}
@@ -582,7 +582,7 @@ class TranslatorLithuanian : public TranslatorAdapter_1_4_6
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -603,7 +603,7 @@ class TranslatorLithuanian : public TranslatorAdapter_1_4_6
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result=fileName;
result+=" Failo Nuoroda";
@@ -611,7 +611,7 @@ class TranslatorLithuanian : public TranslatorAdapter_1_4_6
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" Vardų Srities Nuoroda";
@@ -808,12 +808,12 @@ class TranslatorLithuanian : public TranslatorAdapter_1_4_6
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Bendradarbiavimo diagrama "+clName+":";/*FIXME*/
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Įtraukimo priklausomybių diagrama "+fName+":";/*FIXME*/
}
@@ -1094,7 +1094,7 @@ class TranslatorLithuanian : public TranslatorAdapter_1_4_6
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Paketas "+name;
}
@@ -1492,7 +1492,7 @@ class TranslatorLithuanian : public TranslatorAdapter_1_4_6
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result=dirName; result+=" Directorijos aprašas"; return result; }
/*! This returns the word directory with or without starting capital
diff --git a/src/translator_lv.h b/src/translator_lv.h
index 8dcc45b..7367502 100644
--- a/src/translator_lv.h
+++ b/src/translator_lv.h
@@ -147,9 +147,9 @@ class TranslatorLatvian : public TranslatorAdapter_1_8_4
/*! this is put at the author sections at the bottom of man pages.
* parameter s is name of the project name.
*/
- virtual QCString trGeneratedAutomatically(const char *s)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Automātiski ģenerēts izmantojot Doxygen";
- if (s) result+=(QCString)" priekš "+s;
+ if (!s.isEmpty()) result+=(QCString)" priekš "+s;
result+=" no pirmkoda.";
return result;
}
@@ -509,16 +509,16 @@ class TranslatorLatvian : public TranslatorAdapter_1_8_4
/*! This is used in the standard footer of each page and indicates when
* the page was generated
*/
- virtual QCString trGeneratedAt(const char *date,const char *projName)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"Ģenerēts "+date;
- if (projName) result+=(QCString)" projektam "+projName;
+ if (!projName.isEmpty()) result+=(QCString)" projektam "+projName;
result+=(QCString)" ar";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return (QCString)"Mantojamības diagramma klasei "+clName+":";
}
@@ -597,7 +597,7 @@ class TranslatorLatvian : public TranslatorAdapter_1_8_4
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -619,7 +619,7 @@ class TranslatorLatvian : public TranslatorAdapter_1_8_4
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result=fileName;
result+=" faila apraksts";
@@ -627,7 +627,7 @@ class TranslatorLatvian : public TranslatorAdapter_1_8_4
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" nosaukumvietas apraksts";
@@ -823,12 +823,12 @@ class TranslatorLatvian : public TranslatorAdapter_1_8_4
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Sadarbības diagramma klasei "+clName+":";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Include dependency graph for "+fName+":";
}
@@ -1111,7 +1111,7 @@ class TranslatorLatvian : public TranslatorAdapter_1_8_4
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Pakotne "+name;
}
@@ -1505,7 +1505,7 @@ class TranslatorLatvian : public TranslatorAdapter_1_8_4
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result="Direktorijas "; result+=dirName; result+=" atsauce"; return result; }
/*! This returns the word directory with or without starting capital
@@ -1633,7 +1633,7 @@ class TranslatorLatvian : public TranslatorAdapter_1_8_4
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1654,7 +1654,7 @@ class TranslatorLatvian : public TranslatorAdapter_1_8_4
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" moduļu atsauce";
@@ -1756,7 +1756,7 @@ class TranslatorLatvian : public TranslatorAdapter_1_8_4
//////////////////////////////////////////////////////////////////////////
/*! directory relation for \a name */
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
return QCString(name)+" relācija";
}
@@ -1793,7 +1793,7 @@ class TranslatorLatvian : public TranslatorAdapter_1_8_4
* table is shown. The heading for the first column mentions the
* source file that has a relation to another file.
*/
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return (QCString)"File in "+name;
}
@@ -1802,7 +1802,7 @@ class TranslatorLatvian : public TranslatorAdapter_1_8_4
* table is shown. The heading for the second column mentions the
* destination file that is included.
*/
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return (QCString)"Includes file in "+name;
}
@@ -1847,7 +1847,7 @@ class TranslatorLatvian : public TranslatorAdapter_1_8_4
{ return "Autortiesības"; }
/*! Header for the graph showing the directory dependencies */
- virtual QCString trDirDepGraph(const char *name)
+ virtual QCString trDirDepGraph(const QCString &name)
{ return QCString("Atkarību grafs direktorijai ")+name+":"; }
//////////////////////////////////////////////////////////////////////////
@@ -1877,11 +1877,11 @@ class TranslatorLatvian : public TranslatorAdapter_1_8_4
}
/*! Header of a Java enum page (Java enums are represented as classes). */
- virtual QCString trEnumReference(const char *name)
+ virtual QCString trEnumReference(const QCString &name)
{ return QCString(name)+" uzskaitījumliterāļa atsauce"; }
/*! Used for a section containing inherited members */
- virtual QCString trInheritedFrom(const char *members,const char *what)
+ virtual QCString trInheritedFrom(const QCString &members,const QCString &what)
{ return QCString(members)+" manto no "+what; }
/*! Header of the sections with inherited members specific for the
diff --git a/src/translator_mk.h b/src/translator_mk.h
index 97a55dc..6db452e 100644
--- a/src/translator_mk.h
+++ b/src/translator_mk.h
@@ -128,9 +128,9 @@ class TranslatorMacedonian : public TranslatorAdapter_1_6_0
/*! this is put at the author sections at the bottom of man pages.
* parameter s is name of the project name.
*/
- virtual QCString trGeneratedAutomatically(const char *s)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Автоматски создадено од Doxygen";
- if (s) result+=(QCString)" за "+s;
+ if (!s.isEmpty()) result+=(QCString)" за "+s;
result+=" изворниот код.";
return result;
}
@@ -489,16 +489,16 @@ class TranslatorMacedonian : public TranslatorAdapter_1_6_0
/*! This is used in the standard footer of each page and indicates when
* the page was generated
*/
- virtual QCString trGeneratedAt(const char *date,const char *projName)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"Создадено на "+date;
- if (projName) result+=(QCString)" за "+projName;
+ if (!projName.isEmpty()) result+=(QCString)" за "+projName;
result+=(QCString)" од";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return (QCString)"Диаграм на наследување за "+clName+":";
}
@@ -577,7 +577,7 @@ class TranslatorMacedonian : public TranslatorAdapter_1_6_0
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -599,7 +599,7 @@ class TranslatorMacedonian : public TranslatorAdapter_1_6_0
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result = "Опис на Датотекaта ";
result += fileName;
@@ -607,7 +607,7 @@ class TranslatorMacedonian : public TranslatorAdapter_1_6_0
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result = "Опис на Имeто на Простор ";
result += namespaceName;
@@ -804,12 +804,12 @@ class TranslatorMacedonian : public TranslatorAdapter_1_6_0
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Диаграм на соработка за "+clName+":";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Вклучен дијаграм на зависност за "+fName+":";
}
@@ -1089,7 +1089,7 @@ class TranslatorMacedonian : public TranslatorAdapter_1_6_0
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Пакет "+name;
}
@@ -1481,7 +1481,7 @@ class TranslatorMacedonian : public TranslatorAdapter_1_6_0
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result= "Опис на Именикот "; result += dirName; return result; }
/*! This returns the word directory with or without starting capital
@@ -1608,7 +1608,7 @@ class TranslatorMacedonian : public TranslatorAdapter_1_6_0
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1628,7 +1628,7 @@ class TranslatorMacedonian : public TranslatorAdapter_1_6_0
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" - Содржина на Модул";
diff --git a/src/translator_nl.h b/src/translator_nl.h
index 413d353..7bf8db3 100644
--- a/src/translator_nl.h
+++ b/src/translator_nl.h
@@ -62,9 +62,9 @@ class TranslatorDutch : public Translator
{ return "Dit is de complete lijst van alle members voor"; }
QCString trIncludingInheritedMembers()
{ return ", inclusief alle overge&euml;rfde members."; }
- QCString trGeneratedAutomatically(const char *s)
+ QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Automatisch gegenereerd door Doxygen";
- if (s) result+=(QCString)" voor "+s;
+ if (!s.isEmpty()) result+=(QCString)" voor "+s;
result+=" uit de programmatekst.";
return result;
}
@@ -202,14 +202,14 @@ class TranslatorDutch : public Translator
{ return "Documentatie van variabelen"; }
QCString trCompounds()
{ return "Klassen"; }
- QCString trGeneratedAt(const char *date,const char *projName)
+ QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"Gegenereerd op "+date;
- if (projName) result+=(QCString)" voor "+projName;
+ if (!projName.isEmpty()) result+=(QCString)" voor "+projName;
result+=(QCString)" door";
return result;
}
- QCString trClassDiagram(const char *clName)
+ QCString trClassDiagram(const QCString &clName)
{
return (QCString)"Klasse diagram voor "+clName;
}
@@ -259,7 +259,7 @@ class TranslatorDutch : public Translator
// new since 0.49-990425
//////////////////////////////////////////////////////////////////////////
- QCString trCompoundReference(const char *clName,
+ QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
// used as the title of the HTML page of a class/struct/union
@@ -280,14 +280,14 @@ class TranslatorDutch : public Translator
result+=" Referentie";
return result;
}
- QCString trFileReference(const char *fileName)
+ QCString trFileReference(const QCString &fileName)
// used as the title of the HTML page of a file
{
QCString result=fileName;
result+=" Bestand Referentie";
return result;
}
- QCString trNamespaceReference(const char *namespaceName)
+ QCString trNamespaceReference(const QCString &namespaceName)
// used as the title of the HTML page of a namespace
{
QCString result=namespaceName;
@@ -479,12 +479,12 @@ class TranslatorDutch : public Translator
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- QCString trCollaborationDiagram(const char *clName)
+ QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Collaboratie diagram voor "+clName+":";
}
/*! this text is put before an include dependency graph */
- QCString trInclDepGraph(const char *fName)
+ QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Include afhankelijkheidsgraaf voor "+fName+":";
}
@@ -749,7 +749,7 @@ class TranslatorDutch : public Translator
return "Klassen";
}
/*! Used as the title of a Java package */
- QCString trPackage(const char *name)
+ QCString trPackage(const QCString &name)
{
return (QCString)"Package "+name;
}
@@ -1137,7 +1137,7 @@ class TranslatorDutch : public Translator
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result=dirName; result+=" Folder Referentie"; return result; }
/*! This returns the word directory with or without starting capital
@@ -1249,7 +1249,7 @@ class TranslatorDutch : public Translator
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1270,7 +1270,7 @@ class TranslatorDutch : public Translator
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" Module Referentie";
@@ -1367,7 +1367,7 @@ class TranslatorDutch : public Translator
//////////////////////////////////////////////////////////////////////////
/*! directory relation for \a name */
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
return QCString(name)+" Relatie";
}
@@ -1404,7 +1404,7 @@ class TranslatorDutch : public Translator
* table is shown. The heading for the first column mentions the
* source file that has a relation to another file.
*/
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return (QCString)"Bestand in "+name;
}
@@ -1413,7 +1413,7 @@ class TranslatorDutch : public Translator
* table is shown. The heading for the second column mentions the
* destination file that is included.
*/
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return (QCString)"Includeert bestand in "+name;
}
@@ -1447,7 +1447,7 @@ class TranslatorDutch : public Translator
{ return "Copyright"; }
/*! Header for the graph showing the directory dependencies */
- virtual QCString trDirDepGraph(const char *name)
+ virtual QCString trDirDepGraph(const QCString &name)
{ return QCString("Folder afhankelijkheidsgraaf voor ")+name+":"; }
//////////////////////////////////////////////////////////////////////////
@@ -1476,11 +1476,11 @@ class TranslatorDutch : public Translator
}
/*! Header of a Java enum page (Java enums are represented as classes). */
- virtual QCString trEnumReference(const char *name)
+ virtual QCString trEnumReference(const QCString &name)
{ return QCString(name)+" Enum Referentie"; }
/*! Used for a section containing inherited members */
- virtual QCString trInheritedFrom(const char *members,const char *what)
+ virtual QCString trInheritedFrom(const QCString &members,const QCString &what)
{ return QCString(members)+" overge&euml;rfd van "+what; }
/*! Header of the sections with inherited members specific for the
@@ -1561,21 +1561,21 @@ class TranslatorDutch : public Translator
{ return "Konstanten Groepen"; }
/** UNO IDL constant groups */
- virtual QCString trConstantGroupReference(const char *namespaceName)
+ virtual QCString trConstantGroupReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" Konstanten Groepen Referentie";
return result;
}
/** UNO IDL service page title */
- virtual QCString trServiceReference(const char *sName)
+ virtual QCString trServiceReference(const QCString &sName)
{
QCString result=(QCString)sName;
result+=" Service Referentie";
return result;
}
/** UNO IDL singleton page title */
- virtual QCString trSingletonReference(const char *sName)
+ virtual QCString trSingletonReference(const QCString &sName)
{
QCString result=(QCString)sName;
result+=" Singleton Referentie";
@@ -1712,7 +1712,7 @@ class TranslatorDutch : public Translator
return "Klasse";
}
}
- virtual QCString trCustomReference(const char *name)
+ virtual QCString trCustomReference(const QCString &name)
{ return QCString(name)+" Referentie"; }
/* Slice */
@@ -1764,7 +1764,7 @@ class TranslatorDutch : public Translator
{ return "Deze inheritance lijst is min of meer alfabetisch gesorteerd:"; }
virtual QCString trExceptionDocumentation()
{ return "Documentatie van exceptions"; }
- virtual QCString trCompoundReferenceSlice(const char *clName, ClassDef::CompoundType compType, bool isLocal)
+ virtual QCString trCompoundReferenceSlice(const QCString &clName, ClassDef::CompoundType compType, bool isLocal)
{
QCString result=(QCString)clName;
if (isLocal) result+=" Lokale";
@@ -1796,6 +1796,46 @@ class TranslatorDutch : public Translator
//////////////////////////////////////////////////////////////////////////
virtual QCString trDesignUnitDocumentation()
{ return "Ontwerp Eenheid Documentatie"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.9.2
+//////////////////////////////////////////////////////////////////////////
+ virtual QCString trConcept(bool first_capital, bool singular)
+ {
+ QCString result((first_capital ? "Concept" : "concept"));
+ if (!singular) result+="en";
+ return result;
+ }
+
+ virtual QCString trConceptReference(const QCString &conceptName)
+ {
+ QCString result=conceptName;
+ result+=" Concept Referentie";
+ return result;
+ }
+
+ virtual QCString trConceptList()
+ { return "Concept Lijst"; }
+
+ virtual QCString trConceptIndex()
+ { return "Concept Index"; }
+
+ virtual QCString trConceptDocumentation()
+ { return "Concept Documentatie"; }
+
+ virtual QCString trConceptListDescription(bool extractAll)
+ {
+ QCString result="Hieronder volgt de lijst met alle ";
+ if (!extractAll) result+="gedocumenteerde ";
+ result+="concepten, elk met een korte beschrijving:";
+ return result;
+ }
+
+ virtual QCString trConceptDefinition()
+ {
+ return "Concept definitie";
+ }
+
};
#endif
diff --git a/src/translator_no.h b/src/translator_no.h
index dee96d0..0444047 100755
--- a/src/translator_no.h
+++ b/src/translator_no.h
@@ -142,9 +142,9 @@ class TranslatorNorwegian : public TranslatorAdapter_1_4_6
/*! this is put at the author sections at the bottom of man pages.
* parameter s is name of the project name.
*/
- virtual QCString trGeneratedAutomatically(const char *s)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Generert automatisk av Doxygen";
- if (s) result+=(QCString)" for "+s;
+ if (!s.isEmpty()) result+=(QCString)" for "+s;
result+=" fra kildekoden.";
return result;
}
@@ -524,16 +524,16 @@ class TranslatorNorwegian : public TranslatorAdapter_1_4_6
/*! This is used in the standard footer of each page and indicates when
* the page was generated
*/
- virtual QCString trGeneratedAt(const char *date,const char *projName)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"Generert "+date;
- if (projName) result+=(QCString)" for "+projName;
+ if (!projName.isEmpty()) result+=(QCString)" for "+projName;
result+=(QCString)" av";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return (QCString)"Arvediagram for "+clName+":";
}
@@ -620,7 +620,7 @@ class TranslatorNorwegian : public TranslatorAdapter_1_4_6
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -642,7 +642,7 @@ class TranslatorNorwegian : public TranslatorAdapter_1_4_6
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result=fileName;
result+=" filreferanse";
@@ -650,7 +650,7 @@ class TranslatorNorwegian : public TranslatorAdapter_1_4_6
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" navneromsreferanse";
@@ -851,12 +851,12 @@ class TranslatorNorwegian : public TranslatorAdapter_1_4_6
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Samarbeidsdiagram for "+clName+":";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Avhengighetsgraf for "+fName+":";
}
@@ -1136,7 +1136,7 @@ class TranslatorNorwegian : public TranslatorAdapter_1_4_6
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Package "+name;
}
@@ -1546,7 +1546,7 @@ class TranslatorNorwegian : public TranslatorAdapter_1_4_6
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result=dirName; result+=" Katalog referanse"; return result; }
/*! This returns the word directory with or without starting capital
diff --git a/src/translator_pl.h b/src/translator_pl.h
index 86bc72b..1a094d6 100644
--- a/src/translator_pl.h
+++ b/src/translator_pl.h
@@ -121,9 +121,9 @@ class TranslatorPolish : public TranslatorAdapter_1_8_2
/*! this is put at the author sections at the bottom of man pages.
* parameter s is name of the project name.
*/
- QCString trGeneratedAutomatically(const char *s)
+ QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Wygenerowano automatycznie z kodu źródłowego programem Doxygen";
- if (s) result+=(QCString)" dla "+s;
+ if (!s.isEmpty()) result+=(QCString)" dla "+s;
result+=".";
return result;
}
@@ -497,16 +497,16 @@ class TranslatorPolish : public TranslatorAdapter_1_8_2
/*! This is used in the standard footer of each page and indicates when
* the page was generated
*/
- QCString trGeneratedAt(const char *date,const char *projName)
+ QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"Wygenerowano "+date;
- if (projName) result+=(QCString)" dla "+projName;
+ if (!projName.isEmpty()) result+=(QCString)" dla "+projName;
result+=(QCString)" programem";
return result;
}
/*! this text is put before a class diagram */
- QCString trClassDiagram(const char *clName)
+ QCString trClassDiagram(const QCString &clName)
{
return (QCString)"Diagram dziedziczenia dla "+clName;
}
@@ -591,7 +591,7 @@ class TranslatorPolish : public TranslatorAdapter_1_8_2
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- QCString trCompoundReference(const char *clName,
+ QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -613,7 +613,7 @@ class TranslatorPolish : public TranslatorAdapter_1_8_2
}
/*! used as the title of the HTML page of a file */
- QCString trFileReference(const char *fileName)
+ QCString trFileReference(const QCString &fileName)
{
QCString result="Dokumentacja pliku ";
result+=fileName;
@@ -621,7 +621,7 @@ class TranslatorPolish : public TranslatorAdapter_1_8_2
}
/*! used as the title of the HTML page of a namespace */
- QCString trNamespaceReference(const char *namespaceName)
+ QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result="Dokumentacja przestrzeni nazw ";
result+=namespaceName;
@@ -823,12 +823,12 @@ class TranslatorPolish : public TranslatorAdapter_1_8_2
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- QCString trCollaborationDiagram(const char *clName)
+ QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Diagram współpracy dla "+clName+":";
}
/*! this text is put before an include dependency graph */
- QCString trInclDepGraph(const char *fName)
+ QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Wykres zależności załączania dla "+fName+":";
}
@@ -1110,7 +1110,7 @@ class TranslatorPolish : public TranslatorAdapter_1_8_2
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Pakiet "+name;
}
@@ -1497,7 +1497,7 @@ class TranslatorPolish : public TranslatorAdapter_1_8_2
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result="Dokumentacja katalogu "; result+=dirName; return result; }
/*! This returns the word directory with or without starting capital
@@ -1624,7 +1624,7 @@ class TranslatorPolish : public TranslatorAdapter_1_8_2
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1645,7 +1645,7 @@ class TranslatorPolish : public TranslatorAdapter_1_8_2
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result="Dokumentacja modułu ";
result+=namespaceName;
@@ -1744,7 +1744,7 @@ class TranslatorPolish : public TranslatorAdapter_1_8_2
//////////////////////////////////////////////////////////////////////////
/*! directory relation for \a name */
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
return "Relacja "+ QCString(name);
}
@@ -1781,7 +1781,7 @@ class TranslatorPolish : public TranslatorAdapter_1_8_2
* table is shown. The heading for the first column mentions the
* source file that has a relation to another file.
*/
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return (QCString)"Plik w "+name;
}
@@ -1790,7 +1790,7 @@ class TranslatorPolish : public TranslatorAdapter_1_8_2
* table is shown. The heading for the second column mentions the
* destination file that is included.
*/
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return (QCString)"Zawiera plik w "+name;
}
@@ -1835,7 +1835,7 @@ class TranslatorPolish : public TranslatorAdapter_1_8_2
{ return "Copyright"; }
/*! Header for the graph showing the directory dependencies */
- virtual QCString trDirDepGraph(const char *name)
+ virtual QCString trDirDepGraph(const QCString &name)
{ return QCString("Wykres zależności katalogu dla ")+name+":"; }
//////////////////////////////////////////////////////////////////////////
@@ -1862,11 +1862,11 @@ class TranslatorPolish : public TranslatorAdapter_1_8_2
}
/*! Header of a Java enum page (Java enums are represented as classes). */
- virtual QCString trEnumReference(const char *name)
+ virtual QCString trEnumReference(const QCString &name)
{ QCString result="Dokumentacja wyliczenia "; result+=name; return result; }
/*! Used for a section containing inherited members */
- virtual QCString trInheritedFrom(const char *members,const char *what)
+ virtual QCString trInheritedFrom(const QCString &members,const QCString &what)
{ return QCString(members)+" dziedziczone z "+what; }
/*! Header of the sections with inherited members specific for the
diff --git a/src/translator_pt.h b/src/translator_pt.h
index 2273c97..223ca53 100644
--- a/src/translator_pt.h
+++ b/src/translator_pt.h
@@ -27,7 +27,7 @@
* ---------------
* History:
* 20200112:
- * - Updated to 1.9.1;
+ * - Updated to 1.9.1;
* 20190203:
* - Slice methods added;
* 20180612:
@@ -63,7 +63,7 @@
#define TRANSLATOR_PT_H
-class TranslatorPortuguese : public Translator
+class TranslatorPortuguese : public TranslatorAdapter_1_9_2
{
public:
@@ -165,9 +165,9 @@ class TranslatorPortuguese : public Translator
/*! this is put at the author sections at the bottom of man pages.
* parameter s is name of the project name.
*/
- QCString trGeneratedAutomatically(const char *s)
+ QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Gerado automaticamente por Doxygen";
- if (s) result+=(QCString)" para "+s;
+ if (!s.isEmpty()) result+=(QCString)" para "+s;
result+=" a partir do código fonte.";
return result;
}
@@ -515,16 +515,16 @@ class TranslatorPortuguese : public Translator
/*! This is used in the standard footer of each page and indicates when
* the page was generated
*/
- QCString trGeneratedAt(const char *date,const char *projName)
+ QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"Gerado em "+date;
- if (projName) result+=(QCString)" para "+projName;
+ if (!projName.isEmpty()) result+=(QCString)" para "+projName;
result+=(QCString)" por";
return result;
}
/*! this text is put before a class diagram */
- QCString trClassDiagram(const char *clName)
+ QCString trClassDiagram(const QCString &clName)
{
return (QCString)"Diagrama de heranças da classe "+clName;
}
@@ -603,7 +603,7 @@ class TranslatorPortuguese : public Translator
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -625,7 +625,7 @@ class TranslatorPortuguese : public Translator
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result= "Referência ao ficheiro ";
result += fileName;
@@ -633,7 +633,7 @@ class TranslatorPortuguese : public Translator
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result= "Referência ao namespace ";
result += namespaceName;
@@ -834,12 +834,12 @@ class TranslatorPortuguese : public Translator
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Diagrama de colaboração para "+clName+":";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Diagrama de dependências de inclusão para "+fName+":";
}
@@ -1112,7 +1112,7 @@ class TranslatorPortuguese : public Translator
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Pacote "+name;
}
@@ -1504,7 +1504,7 @@ class TranslatorPortuguese : public Translator
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{
QCString result = "Referência do diretório ";
result += dirName;
@@ -1632,7 +1632,7 @@ class TranslatorPortuguese : public Translator
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1656,7 +1656,7 @@ class TranslatorPortuguese : public Translator
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result = "Referência do Módulo ";
result += namespaceName;
@@ -1761,7 +1761,7 @@ class TranslatorPortuguese : public Translator
/*! directory relation for \a name
*/
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
return "Relação " + QCString(name);
}
@@ -1798,7 +1798,7 @@ class TranslatorPortuguese : public Translator
* table is shown. The heading for the first column mentions the
* source file that has a relation to another file.
*/
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return (QCString)"Ficheiro em "+name;
}
@@ -1807,7 +1807,7 @@ class TranslatorPortuguese : public Translator
* table is shown. The heading for the second column mentions the
* destination file that is included.
*/
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return (QCString)"Inclui ficheiro em "+name;
}
@@ -1856,7 +1856,7 @@ class TranslatorPortuguese : public Translator
}
/*! Header for the graph showing the directory dependencies */
- virtual QCString trDirDepGraph(const char *name)
+ virtual QCString trDirDepGraph(const QCString &name)
{ return QCString("Grafo de dependências do directório ")+name+":"; }
//////////////////////////////////////////////////////////////////////////
@@ -1887,14 +1887,14 @@ class TranslatorPortuguese : public Translator
}
/*! Header of a Java enum page (Java enums are represented as classes). */
- virtual QCString trEnumReference(const char *name)
+ virtual QCString trEnumReference(const QCString &name)
{
QCString result = "Referência da enumeração ";
return result + name;
}
/*! Used for a section containing inherited members */
- virtual QCString trInheritedFrom(const char *members,const char *what)
+ virtual QCString trInheritedFrom(const QCString &members,const QCString &what)
{ return QCString(members)+" herdados de "+what; }
/*! Header of the sections with inherited members specific for the
@@ -1975,7 +1975,7 @@ class TranslatorPortuguese : public Translator
{ return "Grupos de Constantes"; }
/** UNO IDL constant groups */
- virtual QCString trConstantGroupReference(const char *namespaceName)
+ virtual QCString trConstantGroupReference(const QCString &namespaceName)
{
QCString result = "Referência do grupo de constantes ";
result += namespaceName;
@@ -1983,7 +1983,7 @@ class TranslatorPortuguese : public Translator
}
/** UNO IDL service page title */
- virtual QCString trServiceReference(const char *sName)
+ virtual QCString trServiceReference(const QCString &sName)
{
QCString result = "Referência do serviço ";
result += sName;
@@ -1991,7 +1991,7 @@ class TranslatorPortuguese : public Translator
}
/** UNO IDL singleton page title */
- virtual QCString trSingletonReference(const char *sName)
+ virtual QCString trSingletonReference(const QCString &sName)
{
QCString result = "Referência do Singleton ";
result += sName;
@@ -2141,7 +2141,7 @@ class TranslatorPortuguese : public Translator
return "Classe";
}
}
- virtual QCString trCustomReference(const char *name)
+ virtual QCString trCustomReference(const QCString &name)
{ return "Referência de " + QCString(name); }
/* Slice */
@@ -2241,7 +2241,7 @@ class TranslatorPortuguese : public Translator
{
return "Exceções";
}
- virtual QCString trCompoundReferenceSlice(const char *clName, ClassDef::CompoundType compType, bool isLocal)
+ virtual QCString trCompoundReferenceSlice(const QCString &clName, ClassDef::CompoundType compType, bool isLocal)
{
QCString result=(QCString)"Referência ";
switch(compType)
@@ -2279,11 +2279,11 @@ class TranslatorPortuguese : public Translator
//////////////////////////////////////////////////////////////////////////
// new since 1.8.19
//////////////////////////////////////////////////////////////////////////
-
+
/** VHDL design unit documentation */
virtual QCString trDesignUnitDocumentation()
- {
- return "Documentação da Unidade de Projeto";
+ {
+ return "Documentação da Unidade de Projeto";
}
};
diff --git a/src/translator_ro.h b/src/translator_ro.h
index 01765a6..6536009 100644
--- a/src/translator_ro.h
+++ b/src/translator_ro.h
@@ -142,9 +142,9 @@ class TranslatorRomanian : public TranslatorAdapter_1_8_15
/*! this is put at the author sections at the bottom of man pages.
* parameter s is name of the project name.
*/
- virtual QCString trGeneratedAutomatically(const char *s)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Generat automat de Doxygen";
- if (s) result+=(QCString)" pentru "+s;
+ if (!s.isEmpty()) result+=(QCString)" pentru "+s;
result+=" din codul sursă.";
return result;
}
@@ -516,16 +516,16 @@ class TranslatorRomanian : public TranslatorAdapter_1_8_15
/*! This is used in the standard footer of each page and indicates when
* the page was generated
*/
- virtual QCString trGeneratedAt(const char *date,const char *projName)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"Generat "+date;
- if (projName) result+=(QCString)" pentru "+projName;
+ if (!projName.isEmpty()) result+=(QCString)" pentru "+projName;
result+=(QCString)" de către";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return (QCString)"Diagrama de relaţii pentru "+clName;
}
@@ -603,7 +603,7 @@ class TranslatorRomanian : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -626,7 +626,7 @@ class TranslatorRomanian : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result="Referinţă la fişierul ";
result+=fileName;
@@ -634,7 +634,7 @@ class TranslatorRomanian : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result="Referinţă la Namespace-ul ";
result+=namespaceName;
@@ -833,12 +833,12 @@ class TranslatorRomanian : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Diagrama de relaţii pentru "+clName+":";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Graful dependenţelor prin incluziune pentru "+fName+":";
}
@@ -1115,7 +1115,7 @@ class TranslatorRomanian : public TranslatorAdapter_1_8_15
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Pachet "+name;
}
@@ -1509,7 +1509,7 @@ class TranslatorRomanian : public TranslatorAdapter_1_8_15
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{
QCString result="Director-referinţă "; result+=dirName;
return result;
@@ -1639,7 +1639,7 @@ class TranslatorRomanian : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1660,7 +1660,7 @@ class TranslatorRomanian : public TranslatorAdapter_1_8_15
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result="Referinţă la Modulul ";
result += namespaceName;
@@ -1762,7 +1762,7 @@ class TranslatorRomanian : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! directory relation for \a name */
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
return QCString(name)+" Relație";
}
@@ -1799,7 +1799,7 @@ class TranslatorRomanian : public TranslatorAdapter_1_8_15
* table is shown. The heading for the first column mentions the
* source file that has a relation to another file.
*/
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return (QCString)"Fișierul din "+name;
}
@@ -1808,7 +1808,7 @@ class TranslatorRomanian : public TranslatorAdapter_1_8_15
* table is shown. The heading for the second column mentions the
* destination file that is included.
*/
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return (QCString)"Include fișierul din "+name;
}
@@ -1853,7 +1853,7 @@ class TranslatorRomanian : public TranslatorAdapter_1_8_15
{ return "Copyright"; }
/*! Header for the graph showing the directory dependencies */
- virtual QCString trDirDepGraph(const char *name)
+ virtual QCString trDirDepGraph(const QCString &name)
{ return QCString("Grafic de dependență a directoarelor pentru ")+name+":"; }
//////////////////////////////////////////////////////////////////////////
@@ -1883,11 +1883,11 @@ class TranslatorRomanian : public TranslatorAdapter_1_8_15
}
/*! Header of a Java enum page (Java enums are represented as classes). */
- virtual QCString trEnumReference(const char *name)
+ virtual QCString trEnumReference(const QCString &name)
{ return QCString(name)+" Referință Enum"; }
/*! Used for a section containing inherited members */
- virtual QCString trInheritedFrom(const char *members,const char *what)
+ virtual QCString trInheritedFrom(const QCString &members,const QCString &what)
{ return QCString(members)+" moștenit(e) din "+what; }
/*! Header of the sections with inherited members specific for the
@@ -1968,21 +1968,21 @@ class TranslatorRomanian : public TranslatorAdapter_1_8_15
{ return "Grupuri Constante"; }
/** UNO IDL constant groups */
- virtual QCString trConstantGroupReference(const char *namespaceName)
+ virtual QCString trConstantGroupReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" Referință Grup Constant";
return result;
}
/** UNO IDL service page title */
- virtual QCString trServiceReference(const char *sName)
+ virtual QCString trServiceReference(const QCString &sName)
{
QCString result=(QCString)sName;
result+=" Referință Serviciu";
return result;
}
/** UNO IDL singleton page title */
- virtual QCString trSingletonReference(const char *sName)
+ virtual QCString trSingletonReference(const QCString &sName)
{
QCString result=(QCString)sName;
result+=" Referință Singleton";
diff --git a/src/translator_ru.h b/src/translator_ru.h
index 3e3f7dc..6a699d4 100644
--- a/src/translator_ru.h
+++ b/src/translator_ru.h
@@ -110,9 +110,9 @@ class TranslatorRussian : public TranslatorAdapter_1_8_15
/*! this is put at the author sections at the bottom of man pages.
* parameter s is name of the project name.
*/
- virtual QCString trGeneratedAutomatically(const char *s)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Автоматически создано Doxygen";
- if (s) result+=QCString(" для ")+s;
+ if (!s.isEmpty()) result+=QCString(" для ")+s;
result+=" из исходного текста.";
return result;
}
@@ -455,17 +455,17 @@ class TranslatorRussian : public TranslatorAdapter_1_8_15
/*! This is used in the standard footer of each page and indicates when
* the page was generated
*/
- virtual QCString trGeneratedAt(const char *date,const char *projName)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result="Документация ";
- if (projName) result+=QCString("по ")+projName;
+ if (!projName.isEmpty()) result+=QCString("по ")+projName;
result+=QCString(". Последние изменения: ")+date;
result+=". Создано системой";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return QCString("Граф наследования:")+clName+":";
}
@@ -545,7 +545,7 @@ class TranslatorRussian : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -584,13 +584,13 @@ class TranslatorRussian : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
return QCString("Файл ")+fileName;
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
return QCString("Пространство имен ")+namespaceName;
}
@@ -802,12 +802,12 @@ class TranslatorRussian : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Граф связей класса "+clName+":";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Граф включаемых заголовочных файлов для "+fName+":";
}
@@ -1089,7 +1089,7 @@ class TranslatorRussian : public TranslatorAdapter_1_8_15
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return QCString("Пакет ")+name;
}
@@ -1459,7 +1459,7 @@ class TranslatorRussian : public TranslatorAdapter_1_8_15
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result=QCString("Содержание директории ")+ dirName; return result; }
/*! This returns the word directory with or without starting capital
@@ -1589,7 +1589,7 @@ class TranslatorRussian : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1626,7 +1626,7 @@ class TranslatorRussian : public TranslatorAdapter_1_8_15
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
return QCString("Модуль ") + namespaceName;
}
@@ -1722,7 +1722,7 @@ class TranslatorRussian : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! directory relation for \a name */
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
return QCString(name)+" Связь";
}
@@ -1759,7 +1759,7 @@ class TranslatorRussian : public TranslatorAdapter_1_8_15
* table is shown. The heading for the first column mentions the
* source file that has a relation to another file.
*/
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return (QCString)"Файл в "+name;
}
@@ -1768,7 +1768,7 @@ class TranslatorRussian : public TranslatorAdapter_1_8_15
* table is shown. The heading for the second column mentions the
* destination file that is included.
*/
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return (QCString)"Включает файл в "+name;
}
@@ -1813,7 +1813,7 @@ class TranslatorRussian : public TranslatorAdapter_1_8_15
{ return "Авторство"; }
/*! Header for the graph showing the directory dependencies */
- virtual QCString trDirDepGraph(const char *name)
+ virtual QCString trDirDepGraph(const QCString &name)
{ return QCString("Директория графа зависимостей ")+name+":"; }
///////////////////////////////////////////////////////////////////////
@@ -1841,11 +1841,11 @@ class TranslatorRussian : public TranslatorAdapter_1_8_15
}
/*! Header of a Java enum page (Java enums are represented as classes). */
- virtual QCString trEnumReference(const char *name)
+ virtual QCString trEnumReference(const QCString &name)
{ return QCString(name)+" Ссылки на перечисление"; }
/*! Used for a section containing inherited members */
- virtual QCString trInheritedFrom(const char *members,const char *what)
+ virtual QCString trInheritedFrom(const QCString &members,const QCString &what)
{ return QCString(members)+" унаследованные от "+what; }
/*! Header of the sections with inherited members specific for the
@@ -1926,21 +1926,21 @@ class TranslatorRussian : public TranslatorAdapter_1_8_15
{ return "Постоянные группы"; }
/** UNO IDL constant groups */
- virtual QCString trConstantGroupReference(const char *namespaceName)
+ virtual QCString trConstantGroupReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" Ссылка на постоянную группу";
return result;
}
/** UNO IDL service page title */
- virtual QCString trServiceReference(const char *sName)
+ virtual QCString trServiceReference(const QCString &sName)
{
QCString result=(QCString)sName;
result+=" Ссылка на сервис";
return result;
}
/** UNO IDL singleton page title */
- virtual QCString trSingletonReference(const char *sName)
+ virtual QCString trSingletonReference(const QCString &sName)
{
QCString result=(QCString)sName;
result+=" Ссылка на одиночку";
diff --git a/src/translator_sc.h b/src/translator_sc.h
index b8b5b42..c5924b8 100644
--- a/src/translator_sc.h
+++ b/src/translator_sc.h
@@ -145,9 +145,9 @@ class TranslatorSerbianCyrillic : public TranslatorAdapter_1_6_0
/*! this is put at the author sections at the bottom of man pages.
* parameter s is name of the project name.
*/
- virtual QCString trGeneratedAutomatically(const char *s)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Аутоматски направљено помоћу Doxygen-а";
- if (s) result+=(QCString)" за "+s;
+ if (!s.isEmpty()) result+=(QCString)" за "+s;
result+=" из изворног кода.";
return result;
}
@@ -507,16 +507,16 @@ class TranslatorSerbianCyrillic : public TranslatorAdapter_1_6_0
/*! This is used in the standard footer of each page and indicates when
* the page was generated
*/
- virtual QCString trGeneratedAt(const char *date,const char *projName)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"Направљено "+date;
- if (projName) result+=(QCString)" за "+projName;
+ if (!projName.isEmpty()) result+=(QCString)" за "+projName;
result+=(QCString)" помоћу";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return (QCString)"Дијаграм наслеђивања за "+clName+":";
}
@@ -595,7 +595,7 @@ class TranslatorSerbianCyrillic : public TranslatorAdapter_1_6_0
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -634,7 +634,7 @@ class TranslatorSerbianCyrillic : public TranslatorAdapter_1_6_0
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result=fileName;
result+=" Референца датотеке";
@@ -642,7 +642,7 @@ class TranslatorSerbianCyrillic : public TranslatorAdapter_1_6_0
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" Референца простора имена";
@@ -839,12 +839,12 @@ class TranslatorSerbianCyrillic : public TranslatorAdapter_1_6_0
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Дијаграм сарадње за "+clName+":";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Дијаграм зависности укључивања за "+fName+":";
}
@@ -1125,7 +1125,7 @@ class TranslatorSerbianCyrillic : public TranslatorAdapter_1_6_0
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Пакет "+name;
}
@@ -1531,7 +1531,7 @@ class TranslatorSerbianCyrillic : public TranslatorAdapter_1_6_0
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result=dirName; result+=" Референца директоријума"; return result; }
/*! This returns the word directory with or without starting capital
@@ -1658,7 +1658,7 @@ class TranslatorSerbianCyrillic : public TranslatorAdapter_1_6_0
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1679,7 +1679,7 @@ class TranslatorSerbianCyrillic : public TranslatorAdapter_1_6_0
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" Референца модула";
diff --git a/src/translator_si.h b/src/translator_si.h
index 5a03a71..c199ef6 100644
--- a/src/translator_si.h
+++ b/src/translator_si.h
@@ -64,9 +64,9 @@ class TranslatorSlovene : public TranslatorAdapter_1_4_6
{ return "Seznam metod razreda "; }
QCString trIncludingInheritedMembers()
{ return ", vključujoč dedovane metode in atribute."; }
- QCString trGeneratedAutomatically(const char *s)
+ QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="zgenerirano z Doxygen-om";
- if (s) result+=(QCString)" za "+s;
+ if (!s.isEmpty()) result+=(QCString)" za "+s;
result+=" iz izvorne kode.";
return result;
}
@@ -186,14 +186,14 @@ class TranslatorSlovene : public TranslatorAdapter_1_4_6
{ return "Opis spremenljivke"; }
QCString trCompounds()
{ return "Strukture"; }
- QCString trGeneratedAt(const char *date,const char *projName)
+ QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"Generirano "+date;
- if (projName) result+=(QCString)" projekt: "+projName;
+ if (!projName.isEmpty()) result+=(QCString)" projekt: "+projName;
result+=(QCString)" generator: ";
return result;
}
- QCString trClassDiagram(const char *clName)
+ QCString trClassDiagram(const QCString &clName)
{
return (QCString)"Diagram razredov za "+clName;
}
@@ -249,7 +249,7 @@ class TranslatorSlovene : public TranslatorAdapter_1_4_6
// new since 0.49-990425
//////////////////////////////////////////////////////////////////////////
- QCString trCompoundReference(const char *clName,
+ QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool /*isTemplate*/)
// used as the title of the HTML page of a class/struct/union
@@ -270,14 +270,14 @@ class TranslatorSlovene : public TranslatorAdapter_1_4_6
return result;
}
- QCString trFileReference(const char *fileName)
+ QCString trFileReference(const QCString &fileName)
// used as the title of the HTML page of a file
{
QCString result="Datoteka ";
result+=fileName;
return result;
}
- QCString trNamespaceReference(const char *namespaceName)
+ QCString trNamespaceReference(const QCString &namespaceName)
// used as the title of the HTML page of a namespace
{
QCString result ="Imenski prostor ";
@@ -472,12 +472,12 @@ class TranslatorSlovene : public TranslatorAdapter_1_4_6
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- QCString trCollaborationDiagram(const char *clName)
+ QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Kolaboracijski diagram razreda "+clName+":";
}
/*! this text is put before an include dependency graph */
- QCString trInclDepGraph(const char *fName)
+ QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Graf prikazuje seznam datotek, "
"ki jih datoteka \""+fName+"\" "
@@ -765,7 +765,7 @@ class TranslatorSlovene : public TranslatorAdapter_1_4_6
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"JAVA paket "+name;
}
@@ -1178,7 +1178,7 @@ class TranslatorSlovene : public TranslatorAdapter_1_4_6
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result=dirName;
result+=" imeniške reference"; /* not sure for context */
return result;
diff --git a/src/translator_sk.h b/src/translator_sk.h
index 1e5d258..1691ff5 100644
--- a/src/translator_sk.h
+++ b/src/translator_sk.h
@@ -115,10 +115,10 @@ class TranslatorSlovak : public TranslatorAdapter_1_8_15
/*! this is put at the author sections at the bottom of man pages.
* parameter s is name of the project name.
*/
- virtual QCString trGeneratedAutomatically(const char *s)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result("Generované automaticky programom Doxygen "
"zo zdrojových textov");
- if (s)
+ if (!s.isEmpty())
result+=(QCString)" projektu "+s;
result+=".";
return result;
@@ -478,16 +478,16 @@ class TranslatorSlovak : public TranslatorAdapter_1_8_15
/*! This is used in the standard footer of each page and indicates when
* the page was generated
*/
- virtual QCString trGeneratedAt(const char *date,const char *projName)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"Generované "+date;
- if (projName) result+=(QCString)" pre projekt "+projName;
+ if (!projName.isEmpty()) result+=(QCString)" pre projekt "+projName;
result+=(QCString)" programom";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return (QCString)"Diagram dedičnosti pre triedu "+clName;
}
@@ -564,7 +564,7 @@ class TranslatorSlovak : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -586,7 +586,7 @@ class TranslatorSlovak : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result("Dokumentácia súboru ");
result+=fileName;
@@ -594,7 +594,7 @@ class TranslatorSlovak : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result("Dokumentácia priestoru mien ");
result+=namespaceName;
@@ -806,12 +806,12 @@ class TranslatorSlovak : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Diagram tried pre "+clName+":";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Graf závislostí na vkladaných súboroch "
"pre "+fName+":";
@@ -1090,7 +1090,7 @@ class TranslatorSlovak : public TranslatorAdapter_1_8_15
return "Triedy";
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Balík "+name;
}
@@ -1462,7 +1462,7 @@ class TranslatorSlovak : public TranslatorAdapter_1_8_15
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{
QCString result = "Referencia k adresáru ";
result += dirName;
@@ -1595,7 +1595,7 @@ class TranslatorSlovak : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1617,7 +1617,7 @@ class TranslatorSlovak : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result="Dokumentácia modulu ";
result += namespaceName;
@@ -1717,7 +1717,7 @@ class TranslatorSlovak : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! directory relation for \a name */
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
return "Relácia " + QCString(name);
}
@@ -1754,7 +1754,7 @@ class TranslatorSlovak : public TranslatorAdapter_1_8_15
* table is shown. The heading for the first column mentions the
* source file that has a relation to another file.
*/
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return (QCString)"Súbor v "+name;
}
@@ -1763,7 +1763,7 @@ class TranslatorSlovak : public TranslatorAdapter_1_8_15
* table is shown. The heading for the second column mentions the
* destination file that is included.
*/
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return (QCString)"Vkladá (include) súbor z "+name;
}
@@ -1808,7 +1808,7 @@ class TranslatorSlovak : public TranslatorAdapter_1_8_15
{ return "Copyright"; }
/*! Header for the graph showing the directory dependencies */
- virtual QCString trDirDepGraph(const char *name)
+ virtual QCString trDirDepGraph(const QCString &name)
{ return QCString("Graf závislosti na priečinkoch pre ")+name+":"; }
//////////////////////////////////////////////////////////////////////////
@@ -1827,7 +1827,7 @@ class TranslatorSlovak : public TranslatorAdapter_1_8_15
virtual QCString trAndMore(const QCString &number)
{
QCString result("a " + number + " ďaľší");
- if (atoi(number) >= 5)
+ if (number.toInt() >= 5)
result += "ch";
return result + "...";
}
@@ -1843,11 +1843,11 @@ class TranslatorSlovak : public TranslatorAdapter_1_8_15
}
/*! Header of a Java enum page (Java enums are represented as classes). */
- virtual QCString trEnumReference(const char *name)
+ virtual QCString trEnumReference(const QCString &name)
{ return "Referencia k enumerácii "+QCString(name); }
/*! Used for a section containing inherited members */
- virtual QCString trInheritedFrom(const char *members,const char *what)
+ virtual QCString trInheritedFrom(const QCString &members,const QCString &what)
{ return QCString(members)+" dedí sa z "+what; }
/*! Header of the sections with inherited members specific for the
@@ -1928,21 +1928,21 @@ class TranslatorSlovak : public TranslatorAdapter_1_8_15
{ return "Konštantné skupiny"; }
/** UNO IDL constant groups */
- virtual QCString trConstantGroupReference(const char *namespaceName)
+ virtual QCString trConstantGroupReference(const QCString &namespaceName)
{
QCString result="Konštantné skupiny z ";
result += namespaceName;
return result;
}
/** UNO IDL service page title */
- virtual QCString trServiceReference(const char *sName)
+ virtual QCString trServiceReference(const QCString &sName)
{
QCString result="Popis služby ";
result += sName;
return result;
}
/** UNO IDL singleton page title */
- virtual QCString trSingletonReference(const char *sName)
+ virtual QCString trSingletonReference(const QCString &sName)
{
QCString result="Popis singletonu ";
result += sName;
diff --git a/src/translator_sr.h b/src/translator_sr.h
index cb080ea..e5a6cf7 100644
--- a/src/translator_sr.h
+++ b/src/translator_sr.h
@@ -128,9 +128,9 @@ class TranslatorSerbian : public TranslatorAdapter_1_6_0
/*! this is put at the author sections at the bottom of man pages.
* parameter s is name of the project name.
*/
- virtual QCString trGeneratedAutomatically(const char *s)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Napravljeno automatski korišćenjem alata Doxygen";
- if( s ) result+=(QCString)" za projekat " + s;
+ if (!s.isEmpty()) result+=(QCString)" za projekat " + s;
result+=" od izvornog koda.";
return result;
}
@@ -487,16 +487,16 @@ class TranslatorSerbian : public TranslatorAdapter_1_6_0
/*! This is used in the standard footer of each page and indicates when
* the page was generated
*/
- virtual QCString trGeneratedAt(const char *date,const char *projName)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"[" + date + "] Napravljeno automatski ";
- if ( projName ) result+=(QCString)" za projekat " + projName;
+ if (!projName.isEmpty()) result+=(QCString)" za projekat " + projName;
result+=(QCString)" upotrebom ";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return QCString("Dijagram nasleđivanja za klasu ") + clName + ":";
}
@@ -575,7 +575,7 @@ class TranslatorSerbian : public TranslatorAdapter_1_6_0
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -597,7 +597,7 @@ class TranslatorSerbian : public TranslatorAdapter_1_6_0
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result = "Opis datoteke ";
result += fileName;
@@ -605,7 +605,7 @@ class TranslatorSerbian : public TranslatorAdapter_1_6_0
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result="Opis prostora imena ";
result += namespaceName;
@@ -802,12 +802,12 @@ class TranslatorSerbian : public TranslatorAdapter_1_6_0
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Klasni dijagram za "+clName+":";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Graf zavisnosti datoteka za "+fName+":";
}
@@ -1087,7 +1087,7 @@ class TranslatorSerbian : public TranslatorAdapter_1_6_0
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Paket "+name;
}
@@ -1480,7 +1480,7 @@ class TranslatorSerbian : public TranslatorAdapter_1_6_0
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result=dirName; result+="Opis direktorijuma"; return result; }
/*! This returns the word directory with or without starting capital
@@ -1608,7 +1608,7 @@ class TranslatorSerbian : public TranslatorAdapter_1_6_0
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1629,7 +1629,7 @@ class TranslatorSerbian : public TranslatorAdapter_1_6_0
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" - sažet pregled modula";
diff --git a/src/translator_sv.h b/src/translator_sv.h
index 853e265..4916694 100644
--- a/src/translator_sv.h
+++ b/src/translator_sv.h
@@ -151,7 +151,7 @@ English:
#ifndef TRANSLATOR_SE_H
#define TRANSLATOR_SE_H
-class TranslatorSwedish : public Translator
+class TranslatorSwedish : public TranslatorAdapter_1_9_2
{
public:
@@ -244,9 +244,9 @@ class TranslatorSwedish : public Translator
/*! this is put at the author sections at the bottom of man pages.
* parameter s is name of the project name.
*/
- virtual QCString trGeneratedAutomatically(const char *s)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Automatiskt skapad av Doxygen";
- if (s) result+=(QCString)" för "+s;
+ if (!s.isEmpty()) result+=(QCString)" för "+s;
result+=" från källkoden.";
return result;
}
@@ -607,16 +607,16 @@ class TranslatorSwedish : public Translator
/*! This is used in the standard footer of each page and indicates when
* the page was generated
*/
- virtual QCString trGeneratedAt(const char *date,const char *projName)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"Skapad "+date;
- if (projName) result+=(QCString)" för "+projName;
+ if (!projName.isEmpty()) result+=(QCString)" för "+projName;
result+=(QCString)" av";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return (QCString)"Klassdiagram för "+clName;
}
@@ -692,7 +692,7 @@ class TranslatorSwedish : public Translator
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -714,7 +714,7 @@ class TranslatorSwedish : public Translator
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result=fileName;
result+=" filreferens";
@@ -722,7 +722,7 @@ class TranslatorSwedish : public Translator
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" namnrymdreferens";
@@ -929,12 +929,12 @@ class TranslatorSwedish : public Translator
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Samarbetsdiagram för "+clName+":";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Include-beroendediagram för "+fName+":";
}
@@ -1217,7 +1217,7 @@ class TranslatorSwedish : public Translator
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Paket "+name;
}
@@ -1599,7 +1599,7 @@ class TranslatorSwedish : public Translator
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result=dirName; result+=" Katalogreferens"; return result; }
/*! This returns the word directory with or without starting capital
@@ -1728,7 +1728,7 @@ class TranslatorSwedish : public Translator
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1749,7 +1749,7 @@ class TranslatorSwedish : public Translator
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" Modulreferens";
@@ -1850,7 +1850,7 @@ class TranslatorSwedish : public Translator
//////////////////////////////////////////////////////////////////////////
/*! directory relation for \a name */
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
return QCString(name)+" Relation";
}
@@ -1887,7 +1887,7 @@ class TranslatorSwedish : public Translator
* table is shown. The heading for the first column mentions the
* source file that has a relation to another file.
*/
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return (QCString)"Fil i "+name;
}
@@ -1896,7 +1896,7 @@ class TranslatorSwedish : public Translator
* table is shown. The heading for the second column mentions the
* destination file that is included.
*/
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return (QCString)"Inkluderar fil i "+name;
}
@@ -1941,7 +1941,7 @@ class TranslatorSwedish : public Translator
{ return "Copyright"; }
/*! Header for the graph showing the directory dependencies */
- virtual QCString trDirDepGraph(const char *name)
+ virtual QCString trDirDepGraph(const QCString &name)
{ return QCString("Katalogberoendegraf för ")+name+":"; }
//////////////////////////////////////////////////////////////////////////
@@ -1969,11 +1969,11 @@ class TranslatorSwedish : public Translator
}
/*! Header of a Java enum page (Java enums are represented as classes). */
- virtual QCString trEnumReference(const char *name)
+ virtual QCString trEnumReference(const QCString &name)
{ return QCString(name)+" Enum-referens"; }
/*! Used for a section containing inherited members */
- virtual QCString trInheritedFrom(const char *members,const char *what)
+ virtual QCString trInheritedFrom(const QCString &members,const QCString &what)
{ return QCString(members)+" ärvd ifrån "+what; }
/*! Header of the sections with inherited members specific for the
@@ -2054,21 +2054,21 @@ class TranslatorSwedish : public Translator
{ return "Konstantgrupper"; }
/** UNO IDL constant groups */
- virtual QCString trConstantGroupReference(const char *namespaceName)
+ virtual QCString trConstantGroupReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" Referens till konstantgrupp";
return result;
}
/** UNO IDL service page title */
- virtual QCString trServiceReference(const char *sName)
+ virtual QCString trServiceReference(const QCString &sName)
{
QCString result=(QCString)sName;
result+=" Tjänstereferens";
return result;
}
/** UNO IDL singleton page title */
- virtual QCString trSingletonReference(const char *sName)
+ virtual QCString trSingletonReference(const QCString &sName)
{
QCString result=(QCString)sName;
result+=" Singleton-referens";
@@ -2206,7 +2206,7 @@ class TranslatorSwedish : public Translator
return "Klass";
}
}
- virtual QCString trCustomReference(const char *name)
+ virtual QCString trCustomReference(const QCString &name)
{ return QCString(name)+"referens"; }
/* Slice */
@@ -2311,7 +2311,7 @@ class TranslatorSwedish : public Translator
{
return "Undantagsdokumentation";
}
- virtual QCString trCompoundReferenceSlice(const char *clName, ClassDef::CompoundType compType, bool isLocal)
+ virtual QCString trCompoundReferenceSlice(const QCString &clName, ClassDef::CompoundType compType, bool isLocal)
{
QCString result=(QCString)clName;
if (isLocal) result+=" Lokal";
diff --git a/src/translator_tr.h b/src/translator_tr.h
index 4a68184..ef8c5a3 100644
--- a/src/translator_tr.h
+++ b/src/translator_tr.h
@@ -140,9 +140,9 @@ class TranslatorTurkish : public TranslatorAdapter_1_7_5
/*! this is put at the author sections at the bottom of man pages.
* parameter s is name of the project name.
*/
- virtual QCString trGeneratedAutomatically(const char *s)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Doxygen tarafından";
- if (s) result+=s+(QCString)" için ";
+ if (!s.isEmpty()) result+=s+(QCString)" için ";
result+=" kaynak koddan otomatik üretilmiştir.";
return result;
}
@@ -498,16 +498,16 @@ class TranslatorTurkish : public TranslatorAdapter_1_7_5
/*! This is used in the standard footer of each page and indicates when
* the page was generated
*/
- virtual QCString trGeneratedAt(const char *date,const char *projName)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=projName+(QCString)" için "+date;
- if (projName) result+=(QCString)" tarihinde ";
+ if (!projName.isEmpty()) result+=(QCString)" tarihinde ";
result+=(QCString)" üreten: ";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return clName+(QCString)" için kalıtım şeması:";
}
@@ -586,7 +586,7 @@ class TranslatorTurkish : public TranslatorAdapter_1_7_5
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -608,7 +608,7 @@ class TranslatorTurkish : public TranslatorAdapter_1_7_5
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result=fileName;
result+=" Dosya Referansı";
@@ -616,7 +616,7 @@ class TranslatorTurkish : public TranslatorAdapter_1_7_5
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" Namespace Referansı";
@@ -814,12 +814,12 @@ class TranslatorTurkish : public TranslatorAdapter_1_7_5
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return clName+(QCString)" için işbirliği (collaboration) şeması:";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return fName+(QCString)" için içerme bağımlılık grafiği:";
}
@@ -1099,7 +1099,7 @@ class TranslatorTurkish : public TranslatorAdapter_1_7_5
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Paket "+name;
}
@@ -1493,7 +1493,7 @@ class TranslatorTurkish : public TranslatorAdapter_1_7_5
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result=dirName; result+=" Dizin Referansı"; return result; }
/*! This returns the word directory with or without starting capital
@@ -1620,7 +1620,7 @@ class TranslatorTurkish : public TranslatorAdapter_1_7_5
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1641,7 +1641,7 @@ class TranslatorTurkish : public TranslatorAdapter_1_7_5
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" Modül Referansı";
@@ -1742,7 +1742,7 @@ class TranslatorTurkish : public TranslatorAdapter_1_7_5
//////////////////////////////////////////////////////////////////////////
/*! directory relation for \a name */
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
return QCString(name)+" İlişkisi";
}
@@ -1779,7 +1779,7 @@ class TranslatorTurkish : public TranslatorAdapter_1_7_5
* table is shown. The heading for the first column mentions the
* source file that has a relation to another file.
*/
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return (QCString)(name) + (QCString)" dizinindeki dosya";
}
@@ -1788,7 +1788,7 @@ class TranslatorTurkish : public TranslatorAdapter_1_7_5
* table is shown. The heading for the second column mentions the
* destination file that is included.
*/
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return (QCString)(name) + (QCString)" dizinindeki dosyayı kapsıyor";
}
diff --git a/src/translator_tw.h b/src/translator_tw.h
index 8d9658b..24ad7ed 100644
--- a/src/translator_tw.h
+++ b/src/translator_tw.h
@@ -153,9 +153,9 @@ class TranslatorChinesetraditional : public TranslatorAdapter_1_8_15
/*! this is put at the author sections at the bottom of man pages.
* parameter s is name of the project name.
*/
- virtual QCString trGeneratedAutomatically(const char *s)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="本文件由Doxygen";
- if (s) result+=(QCString)" 自 "+s;
+ if (!s.isEmpty()) result+=(QCString)" 自 "+s;
result+=" 的原始碼中自動產生.";
return result;
}
@@ -517,16 +517,16 @@ class TranslatorChinesetraditional : public TranslatorAdapter_1_8_15
/*! This is used in the standard footer of each page and indicates when
* the page was generated
*/
- virtual QCString trGeneratedAt(const char *date,const char *projName)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"產生日期:"+date;
- if (projName) result+=(QCString)", 專案:"+projName;
+ if (!projName.isEmpty()) result+=(QCString)", 專案:"+projName;
result+=(QCString)", 產生器:";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return (QCString)"類別"+clName+"的繼承圖:";
}
@@ -605,7 +605,7 @@ class TranslatorChinesetraditional : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -627,7 +627,7 @@ class TranslatorChinesetraditional : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result=fileName;
result+=" 檔案參考文件";
@@ -635,7 +635,7 @@ class TranslatorChinesetraditional : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" 命名空間(Namespace)參考文件";
@@ -831,12 +831,12 @@ class TranslatorChinesetraditional : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)""+clName+"的合作圖:";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)""+fName+"的包含相依圖:";
}
@@ -1117,7 +1117,7 @@ class TranslatorChinesetraditional : public TranslatorAdapter_1_8_15
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Package "+name;
}
@@ -1495,7 +1495,7 @@ class TranslatorChinesetraditional : public TranslatorAdapter_1_8_15
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result=dirName; result+=" 目錄參考文件"; return result; }
/*! This returns the word directory with or without starting capital
@@ -1614,7 +1614,7 @@ class TranslatorChinesetraditional : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1635,7 +1635,7 @@ class TranslatorChinesetraditional : public TranslatorAdapter_1_8_15
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+="模組參考文件";
@@ -1730,7 +1730,7 @@ class TranslatorChinesetraditional : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! directory relation for \a name */
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
return QCString(name)+" 關連";
}
@@ -1767,7 +1767,7 @@ class TranslatorChinesetraditional : public TranslatorAdapter_1_8_15
* table is shown. The heading for the first column mentions the
* source file that has a relation to another file.
*/
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return (QCString)"檔案在"+name;
}
@@ -1776,7 +1776,7 @@ class TranslatorChinesetraditional : public TranslatorAdapter_1_8_15
* table is shown. The heading for the second column mentions the
* destination file that is included.
*/
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return (QCString)"含入檔案在"+name;
}
@@ -1821,7 +1821,7 @@ class TranslatorChinesetraditional : public TranslatorAdapter_1_8_15
{ return "版權聲明"; }
/*! Header for the graph showing the directory dependencies */
- virtual QCString trDirDepGraph(const char *name)
+ virtual QCString trDirDepGraph(const QCString &name)
{ return QCString(name)+"的目錄關連圖"+":"; }
//////////////////////////////////////////////////////////////////////////
@@ -1849,11 +1849,11 @@ class TranslatorChinesetraditional : public TranslatorAdapter_1_8_15
}
/*! Header of a Java enum page (Java enums are represented as classes). */
- virtual QCString trEnumReference(const char *name)
+ virtual QCString trEnumReference(const QCString &name)
{ return QCString(name)+" 列舉型態參考"; }
/*! Used for a section containing inherited members */
- virtual QCString trInheritedFrom(const char *members,const char *what)
+ virtual QCString trInheritedFrom(const QCString &members,const QCString &what)
{ return QCString(members)+" 繼承自 "+what; }
/*! Header of the sections with inherited members specific for the
@@ -1934,21 +1934,21 @@ class TranslatorChinesetraditional : public TranslatorAdapter_1_8_15
{ return "常數群組"; }
/** UNO IDL constant groups */
- virtual QCString trConstantGroupReference(const char *namespaceName)
+ virtual QCString trConstantGroupReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+="常數群組參考";
return result;
}
/** UNO IDL service page title */
- virtual QCString trServiceReference(const char *sName)
+ virtual QCString trServiceReference(const QCString &sName)
{
QCString result=(QCString)sName;
result+="服務參考";
return result;
}
/** UNO IDL singleton page title */
- virtual QCString trSingletonReference(const char *sName)
+ virtual QCString trSingletonReference(const QCString &sName)
{
QCString result=(QCString)sName;
result+="Singleton參考";
diff --git a/src/translator_ua.h b/src/translator_ua.h
index e24136c..02f9eab 100644
--- a/src/translator_ua.h
+++ b/src/translator_ua.h
@@ -106,9 +106,9 @@ class TranslatorUkrainian : public TranslatorAdapter_1_8_4
/*! this is put at the author sections at the bottom of man pages.
* parameter s is name of the project name.
*/
- virtual QCString trGeneratedAutomatically(const char *s)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Автоматично створено за допомогою Doxygen";
- if (s) result+=QCString(" для ")+s;
+ if (!s.isEmpty()) result+=QCString(" для ")+s;
result+=" з тексту програми.";
return result;
}
@@ -450,17 +450,17 @@ class TranslatorUkrainian : public TranslatorAdapter_1_8_4
/*! This is used in the standard footer of each page and indicates when
* the page was generated
*/
- virtual QCString trGeneratedAt(const char *date,const char *projName)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result="Документація ";
- if (projName) result+=QCString("до ")+projName;
+ if (!projName.isEmpty()) result+=QCString("до ")+projName;
result+=QCString(" створена ")+date;
result+=" системою";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return QCString("Схема успадкувань для ")+clName;
}
@@ -539,7 +539,7 @@ class TranslatorUkrainian : public TranslatorAdapter_1_8_4
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -578,13 +578,13 @@ class TranslatorUkrainian : public TranslatorAdapter_1_8_4
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
return QCString("Файл ")+fileName;
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
return QCString("Простір імен ")+namespaceName;
}
@@ -795,12 +795,12 @@ class TranslatorUkrainian : public TranslatorAdapter_1_8_4
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Діаграма зв'язків класу "+clName+":";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return QCString("Діаграма включених заголовочних файлів для ")+fName+":";
}
@@ -1078,7 +1078,7 @@ class TranslatorUkrainian : public TranslatorAdapter_1_8_4
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return QCString("Пакет ")+name;
}
@@ -1455,7 +1455,7 @@ class TranslatorUkrainian : public TranslatorAdapter_1_8_4
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result="Довідник каталогу "; result+=dirName; return result; }
/*! This returns the word directory with or without starting capital
@@ -1583,7 +1583,7 @@ class TranslatorUkrainian : public TranslatorAdapter_1_8_4
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1620,7 +1620,7 @@ class TranslatorUkrainian : public TranslatorAdapter_1_8_4
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" Модуль";
@@ -1722,7 +1722,7 @@ class TranslatorUkrainian : public TranslatorAdapter_1_8_4
//////////////////////////////////////////////////////////////////////////
/*! directory relation for \a name */
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
return "Зв'язок з "+QCString(name);
}
@@ -1759,7 +1759,7 @@ class TranslatorUkrainian : public TranslatorAdapter_1_8_4
* table is shown. The heading for the first column mentions the
* source file that has a relation to another file.
*/
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return (QCString)"Файл у "+name;
}
@@ -1768,7 +1768,7 @@ class TranslatorUkrainian : public TranslatorAdapter_1_8_4
* table is shown. The heading for the second column mentions the
* destination file that is included.
*/
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return (QCString)"Включає файли в "+name;
}
@@ -1813,7 +1813,7 @@ class TranslatorUkrainian : public TranslatorAdapter_1_8_4
{ return "Копірайт"; }
/*! Header for the graph showing the directory dependencies */
- virtual QCString trDirDepGraph(const char *name)
+ virtual QCString trDirDepGraph(const QCString &name)
{ return QCString("Граф залежностей каталогу для ")+name+":"; }
//////////////////////////////////////////////////////////////////////////
@@ -1841,11 +1841,11 @@ class TranslatorUkrainian : public TranslatorAdapter_1_8_4
}
/*! Header of a Java enum page (Java enums are represented as classes). */
- virtual QCString trEnumReference(const char *name)
+ virtual QCString trEnumReference(const QCString &name)
{ return QCString(name)+" Перелік"; }
/*! Used for a section containing inherited members */
- virtual QCString trInheritedFrom(const char *members,const char *what)
+ virtual QCString trInheritedFrom(const QCString &members,const QCString &what)
{ return QCString(members)+" успадковано з "+what; }
/*! Header of the sections with inherited members specific for the
diff --git a/src/translator_vi.h b/src/translator_vi.h
index 272dedd..a36dee4 100644
--- a/src/translator_vi.h
+++ b/src/translator_vi.h
@@ -161,9 +161,9 @@ class TranslatorVietnamese : public TranslatorAdapter_1_6_0
/*! this is put at the author sections at the bottom of man pages.
* parameter s is name of the project name.
*/
- virtual QCString trGeneratedAutomatically(const char *s)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Được tạo ra bởi Doxygen";
- if (s) result+=(QCString)" cho "+s;
+ if (!s.isEmpty()) result+=(QCString)" cho "+s;
result+=" từ mã nguồn.";
return result;
}
@@ -523,16 +523,16 @@ class TranslatorVietnamese : public TranslatorAdapter_1_6_0
/*! This is used in the standard footer of each page and indicates when
* the page was generated
*/
- virtual QCString trGeneratedAt(const char *date,const char *projName)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"Được biên soạn vào "+date;
- if (projName) result+=(QCString)" cho mã nguồn dự án "+projName;
+ if (!projName.isEmpty()) result+=(QCString)" cho mã nguồn dự án "+projName;
result+=(QCString)" bởi";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return (QCString)"Sơ đồ kế thừa cho "+clName+":";
}
@@ -611,7 +611,7 @@ class TranslatorVietnamese : public TranslatorAdapter_1_6_0
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -633,7 +633,7 @@ class TranslatorVietnamese : public TranslatorAdapter_1_6_0
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result=fileName;
result+=" File Tham chiếu";
@@ -641,7 +641,7 @@ class TranslatorVietnamese : public TranslatorAdapter_1_6_0
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" Namespace Tham chiếu";
@@ -837,12 +837,12 @@ class TranslatorVietnamese : public TranslatorAdapter_1_6_0
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Sơ đồ liên kết cho "+clName+":";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Kèm theo graph phụ thuộc cho "+fName+":";
}
@@ -1122,7 +1122,7 @@ class TranslatorVietnamese : public TranslatorAdapter_1_6_0
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Gói "+name;
}
@@ -1516,7 +1516,7 @@ class TranslatorVietnamese : public TranslatorAdapter_1_6_0
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result=dirName; result+=" Tham chiếu thư mục"; return result; }
/*! This returns the word directory with or without starting capital
@@ -1643,7 +1643,7 @@ class TranslatorVietnamese : public TranslatorAdapter_1_6_0
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1664,7 +1664,7 @@ class TranslatorVietnamese : public TranslatorAdapter_1_6_0
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" Tham chiếu Module";
diff --git a/src/translator_za.h b/src/translator_za.h
index 8fc847e..362adfb 100644
--- a/src/translator_za.h
+++ b/src/translator_za.h
@@ -126,9 +126,9 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_6_0
/*! this is put at the author sections at the bottom of man pages.
* parameter s is name of the project name.
*/
- virtual QCString trGeneratedAutomatically(const char *s)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Automaties gegenereer deur Doxygen";
- if (s) result+=(QCString)" vir "+s;
+ if (!s.isEmpty()) result+=(QCString)" vir "+s;
result+=" van die bron kode af.";
return result;
}
@@ -486,16 +486,16 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_6_0
/*! This is used in the standard footer of each page and indicates when
* the page was generated
*/
- virtual QCString trGeneratedAt(const char *date,const char *projName)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"Gegenereer op "+date;
- if (projName) result+=(QCString)" vir "+projName;
+ if (!projName.isEmpty()) result+=(QCString)" vir "+projName;
result+=(QCString)" deur";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return (QCString)"Afleidings diagram vir "+clName+":";
}
@@ -574,7 +574,7 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_6_0
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -596,7 +596,7 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_6_0
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result=fileName;
result+=" Leër Verwysing";
@@ -604,7 +604,7 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_6_0
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" Namespace Verwysing";
@@ -801,12 +801,12 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_6_0
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Samewerkings diagram vir "+clName+":";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Insluitings afhanklikheid diagram vir "+fName+":";
}
@@ -1087,7 +1087,7 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_6_0
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Pakket "+name;
}
@@ -1481,7 +1481,7 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_6_0
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result=dirName; result+=" Directory Verwysing"; return result; }
/*! This returns the word directory with or without starting capital
@@ -1609,7 +1609,7 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_6_0
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1630,7 +1630,7 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_6_0
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" Module Bron";
diff --git a/src/types.h b/src/types.h
index 0038011..a3b7de1 100644
--- a/src/types.h
+++ b/src/types.h
@@ -16,7 +16,7 @@
#ifndef TYPES_H
#define TYPES_H
-#include <qcstring.h>
+#include "qcstring.h"
/** @file
* @brief This file contains a number of basic enums and types.
@@ -91,7 +91,7 @@ struct Grouping
return "???";
}
- Grouping( const char *gn, GroupPri_t p ) : groupname(gn), pri(p) {}
+ Grouping( const QCString &gn, GroupPri_t p ) : groupname(gn), pri(p) {}
QCString groupname; //!< name of the group
GroupPri_t pri; //!< priority of this definition
diff --git a/src/utf8.cpp b/src/utf8.cpp
new file mode 100644
index 0000000..e7108f4
--- /dev/null
+++ b/src/utf8.cpp
@@ -0,0 +1,233 @@
+/******************************************************************************
+ *
+ * Copyright (C) 1997-2021 by Dimitri van Heesch.
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
+ * for any purpose. It is provided "as is" without express or implied warranty.
+ * See the GNU General Public License for more details.
+ *
+ * Documents produced by Doxygen are derivative works derived from the
+ * input used in their production; they are not affected by this license.
+ *
+ */
+
+#include <cstdint>
+#include <sstream>
+
+#include "utf8.h"
+#include "caseconvert.h"
+#include "textstream.h"
+
+uint8_t getUTF8CharNumBytes(char c)
+{
+ uint8_t num=1;
+ unsigned char uc = static_cast<unsigned char>(c);
+ if (uc>=0x80u) // multibyte character
+ {
+ if ((uc&0xE0u)==0xC0u)
+ {
+ num=2; // 110x.xxxx: 2 byte character
+ }
+ if ((uc&0xF0u)==0xE0u)
+ {
+ num=3; // 1110.xxxx: 3 byte character
+ }
+ if ((uc&0xF8u)==0xF0u)
+ {
+ num=4; // 1111.0xxx: 4 byte character
+ }
+ if ((uc&0xFCu)==0xF8u)
+ {
+ num=5; // 1111.10xx: 5 byte character
+ }
+ if ((uc&0xFEu)==0xFCu)
+ {
+ num=6; // 1111.110x: 6 byte character
+ }
+ }
+ return num;
+}
+
+//! Decodes a given input of utf8 data to a unicode code point
+//! given the number of bytes it's made of
+static inline uint32_t decode_utf8( const char* data , int numBytes ) noexcept
+{
+ uint32_t cp = (unsigned char)*data;
+ if (numBytes>1)
+ {
+ cp &= 0x7F >> numBytes; // Mask out the header bits
+ for (int i=1 ; i<numBytes ; i++)
+ {
+ cp = (cp<<6) | ((unsigned char)data[i]&0x3F);
+ }
+ }
+ return cp;
+}
+
+static inline uint32_t convertUTF8CharToUnicode(const char *s,size_t bytesLeft,int &len)
+{
+ if (s==0 || bytesLeft==0)
+ {
+ len=0;
+ return 0;
+ }
+ unsigned char uc = static_cast<unsigned char>(*s);
+ if (uc<128) // ASCII case
+ {
+ len=1;
+ return uc;
+ }
+ switch (bytesLeft)
+ {
+ default:
+ if ((uc&0xFEu)==0xFCu)// 1111110X six bytes
+ {
+ len=6;
+ return decode_utf8(s,len);
+ }
+ // fall through
+ case 5:
+ if ((uc&0xFCu)==0xF8u) // 111110XX five bytes
+ {
+ len=5;
+ return decode_utf8(s,len);
+ }
+ // fall through
+ case 4:
+ if ((uc&0xF8u)==0xF0u) // 11110XXX four bytes
+ {
+ len=4;
+ return decode_utf8(s,len);
+ }
+ // fall through
+ case 3:
+ if ((uc&0xF0u)==0xE0u) // 1110XXXX three bytes
+ {
+ len=3;
+ return decode_utf8(s,len);
+ }
+ // fall through
+ case 2:
+ if ((uc&0xE0u)==0xC0u) // 110XXXXX two bytes
+ {
+ len=2;
+ return decode_utf8(s,len);
+ }
+ // fall through
+ case 1:
+ {
+ len=1;
+ return uc;
+ }
+ }
+}
+
+std::string getUTF8CharAt(const std::string &input,size_t pos)
+{
+ if (input.length()<=pos) return std::string();
+ int numBytes=getUTF8CharNumBytes(input[pos]);
+ if (input.length()<pos+numBytes) return std::string();
+ return input.substr(pos,pos+numBytes);
+}
+
+uint32_t getUnicodeForUTF8CharAt(const std::string &input,size_t pos)
+{
+ std::string charS = getUTF8CharAt(input,pos);
+ int len;
+ return convertUTF8CharToUnicode(charS.c_str(),charS.length(),len);
+}
+
+static inline char asciiToLower(uint32_t code)
+{
+ return code>='A' && code<='Z' ? (char)(code+'a'-'A') : (char)code;
+}
+
+static inline char asciiToUpper(uint32_t code)
+{
+ return code>='a' && code<='z' ? (char)(code+'A'-'a') : (char)code;
+}
+
+static inline std::string caseConvert(const std::string &input,
+ char (*asciiConversionFunc)(uint32_t code),
+ const char *(*conversionFunc)(uint32_t code))
+{
+ uint32_t code;
+ std::string result;
+ result.reserve(input.length()); // assume all ASCII characters
+ int len;
+ size_t bytesLeft = input.length();
+ const char *p = input.c_str();
+ while ((code=convertUTF8CharToUnicode(p,bytesLeft,len)))
+ {
+ if (code<128) // ASCII case
+ {
+ char c = asciiConversionFunc(code);
+ result+=c;
+ }
+ else // generic case
+ {
+ const char *conv = conversionFunc(code);
+ if (conv==nullptr) // no difference between lower and upper case
+ {
+ result.append(p,len);
+ }
+ else // replace the input character with the conversion result
+ {
+ result.append(conv);
+ }
+ }
+ p+=len;
+ bytesLeft-=len;
+ }
+ return result;
+}
+
+std::string convertUTF8ToLower(const std::string &input)
+{
+ return caseConvert(input,asciiToLower,convertUnicodeToLower);
+}
+
+std::string convertUTF8ToUpper(const std::string &input)
+{
+ return caseConvert(input,asciiToUpper,convertUnicodeToUpper);
+}
+
+const char *writeUTF8Char(TextStream &t,const char *s)
+{
+ if (s==0) return 0;
+ uint8_t len = getUTF8CharNumBytes(*s);
+ for (uint8_t i=0;i<len;i++)
+ {
+ if (s[i]==0) // detect premature end of string (due to invalid UTF8 char)
+ {
+ len=i;
+ }
+ }
+ t.write(s,len);
+ return s+len;
+}
+
+bool lastUTF8CharIsMultibyte(const std::string &input)
+{
+ // last byte is part of a multibyte UTF8 char if bit 8 is set and bit 7 is not
+ return !input.empty() && (((unsigned char)input[input.length()-1])&0xC0)==0x80;
+}
+
+bool isUTF8CharUpperCase(const std::string &input,size_t pos)
+{
+ if (input.length()<=pos) return false;
+ int len;
+ // turn the UTF8 character at position pos into a unicode value
+ uint32_t code = convertUTF8CharToUnicode(input.c_str()+pos,input.length()-pos,len);
+ // check if the character can be converted to lower case, if so it was an upper case character
+ return convertUnicodeToLower(code)!=nullptr;
+}
+
+int isUTF8NonBreakableSpace(const char *input)
+{
+ return (static_cast<unsigned char>(input[0])==0xC2 &&
+ static_cast<unsigned char>(input[1])==0xA0) ? 2 : 0;
+}
+
diff --git a/src/utf8.h b/src/utf8.h
new file mode 100644
index 0000000..08979f3
--- /dev/null
+++ b/src/utf8.h
@@ -0,0 +1,72 @@
+/******************************************************************************
+ *
+ * Copyright (C) 1997-2021 by Dimitri van Heesch.
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
+ * for any purpose. It is provided "as is" without express or implied warranty.
+ * See the GNU General Public License for more details.
+ *
+ * Documents produced by Doxygen are derivative works derived from the
+ * input used in their production; they are not affected by this license.
+ *
+ */
+
+#ifndef UTF8_H
+#define UTF8_H
+
+#include <cstdint>
+#include <string>
+
+class TextStream;
+
+/** @file
+ * @brief Various UTF8 related helper functions.
+ *
+ * See https://en.wikipedia.org/wiki/UTF-8 for details on UTF8 encoding.
+ */
+
+
+/** Converts the input string into a lower case version, also taking into account
+ * non-ASCII characters that has a lower case variant.
+ */
+std::string convertUTF8ToLower(const std::string &input);
+
+/** Converts the input string into a upper case version, also taking into account
+ * non-ASCII characters that has a upper case variant.
+ */
+std::string convertUTF8ToUpper(const std::string &input);
+
+/** Returns the UTF8 character found at byte position pos in the input string.
+ * The resulting string can be a multi byte sequence.
+ */
+std::string getUTF8CharAt(const std::string &input,size_t pos);
+
+/** Returns the 32bit Unicode value matching character at byte position pos in
+ * the UTF8 encoded input.
+ */
+uint32_t getUnicodeForUTF8CharAt(const std::string &input,size_t pos);
+
+/** Returns the number of bytes making up a single UTF8 character given the first byte
+ * in the sequence.
+ */
+uint8_t getUTF8CharNumBytes(char firstByte);
+
+/** Writes the UTF8 character pointed to by s to stream t and returns a pointer
+ * to the next character.
+ */
+const char *writeUTF8Char(TextStream &t,const char *s);
+
+/** Returns true iff the last character in input is a multibyte character. */
+bool lastUTF8CharIsMultibyte(const std::string &input);
+
+/** Returns true iff the input string at byte position pos holds an upper case character. */
+bool isUTF8CharUpperCase(const std::string &input,size_t pos);
+
+/** Check if the first character pointed at by input is a non-breakable whitespace character.
+ * Returns the byte size of the character if there is match or 0 if not.
+ */
+int isUTF8NonBreakableSpace(const char *input);
+
+#endif
diff --git a/src/util.cpp b/src/util.cpp
index 6c098e8..4174d42 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -19,21 +19,19 @@
#include <math.h>
#include <limits.h>
#include <string.h>
+#include <assert.h>
#include <mutex>
#include <unordered_set>
#include <codecvt>
-#include <iostream>
#include <algorithm>
#include <ctime>
#include <cctype>
#include <cinttypes>
+#include <sstream>
#include "md5.h"
-#include <qfileinfo.h>
-#include <qdir.h>
-
#include "regex.h"
#include "util.h"
#include "message.h"
@@ -71,6 +69,10 @@
#include "dirdef.h"
#include "htmlentity.h"
#include "symbolresolver.h"
+#include "fileinfo.h"
+#include "dir.h"
+#include "utf8.h"
+#include "textstream.h"
#define ENABLE_TRACINGSUPPORT 0
@@ -98,13 +100,13 @@ TextGeneratorOLImpl::TextGeneratorOLImpl(OutputDocInterface &od) : m_od(od)
{
}
-void TextGeneratorOLImpl::writeString(const char *s,bool keepSpaces) const
+void TextGeneratorOLImpl::writeString(const QCString &s,bool keepSpaces) const
{
- if (s==0) return;
+ if (s.isEmpty()) return;
//printf("TextGeneratorOlImpl::writeString('%s',%d)\n",s,keepSpaces);
if (keepSpaces)
{
- const char *p=s;
+ const char *p=s.data();
if (p)
{
char cs[2];
@@ -133,8 +135,8 @@ void TextGeneratorOLImpl::writeBreak(int indent) const
}
}
-void TextGeneratorOLImpl::writeLink(const char *extRef,const char *file,
- const char *anchor,const char *text
+void TextGeneratorOLImpl::writeLink(const QCString &extRef,const QCString &file,
+ const QCString &anchor,const QCString &text
) const
{
//printf("TextGeneratorOlImpl::writeLink('%s')\n",text);
@@ -161,10 +163,10 @@ const int maxInheritanceDepth = 100000;
"bla @1" => "bla"
\endverbatim
*/
-QCString removeAnonymousScopes(const char *str)
+QCString removeAnonymousScopes(const QCString &str)
{
std::string result;
- if (str==0) return result;
+ if (str.isEmpty()) return result;
// helper to check if the found delimiter starts with a colon
auto startsWithColon = [](const std::string &del)
@@ -189,7 +191,7 @@ QCString removeAnonymousScopes(const char *str)
};
static const reg::Ex re(R"([\s:]*@\d+[\s:]*)");
- std::string s = str;
+ std::string s = str.str();
reg::Iterator iter(s,re);
reg::Iterator end;
size_t p=0;
@@ -218,12 +220,13 @@ QCString removeAnonymousScopes(const char *str)
}
// replace anonymous scopes with __anonymous__ or replacement if provided
-QCString replaceAnonymousScopes(const char *s,const char *replacement)
+QCString replaceAnonymousScopes(const QCString &s,const QCString &replacement)
{
- if (s==0) return QCString();
+ if (s.isEmpty()) return s;
static const reg::Ex marker(R"(@\d+)");
- std::string result = reg::replace(s,marker,replacement?replacement:"__anonymous__");
- //printf("replaceAnonymousScopes('%s')='%s'\n",s.data(),result.data());
+ std::string result = reg::replace(s.str(),marker,
+ replacement.isEmpty() ? replacement.data() : "__anonymous__");
+ //printf("replaceAnonymousScopes('%s')='%s'\n",qPrint(s),qPrint(result));
return result;
}
@@ -236,7 +239,7 @@ QCString stripAnonymousNamespaceScope(const QCString &s)
int sl = s.length();
while ((i=getScopeFragment(s,p,&l))!=-1)
{
- //printf("Scope fragment %s\n",s.mid(i,l).data());
+ //printf("Scope fragment %s\n",qPrint(s.mid(i,l)));
if (Doxygen::namespaceLinkedMap->find(s.left(i+l))!=0)
{
if (s.at(i)!='@')
@@ -254,11 +257,11 @@ QCString stripAnonymousNamespaceScope(const QCString &s)
p=i+l;
}
done:
- //printf("stripAnonymousNamespaceScope('%s')='%s'\n",s.data(),newScope.data());
+ //printf("stripAnonymousNamespaceScope('%s')='%s'\n",qPrint(s),qPrint(newScope));
return newScope;
}
-void writePageRef(OutputDocInterface &od,const char *cn,const char *mn)
+void writePageRef(OutputDocInterface &od,const QCString &cn,const QCString &mn)
{
od.pushGeneratorState();
@@ -325,9 +328,9 @@ QCString stripFromIncludePath(const QCString &path)
* at the extension. A number of variations is allowed in both upper and
* lower case) If anyone knows or uses another extension please let me know :-)
*/
-int guessSection(const char *name)
+int guessSection(const QCString &name)
{
- QCString n=((QCString)name).lower();
+ QCString n=name.lower();
if (n.right(2)==".c" || // source
n.right(3)==".cc" ||
n.right(4)==".cxx" ||
@@ -362,7 +365,7 @@ QCString resolveTypeDef(const Definition *context,const QCString &qualifiedName,
const Definition **typedefContext)
{
//printf("<<resolveTypeDef(%s,%s)\n",
- // context ? context->name().data() : "<none>",qualifiedName.data());
+ // context ? qPrint(context->name()) : "<none>",qPrint(qualifiedName));
QCString result;
if (qualifiedName.isEmpty())
{
@@ -395,7 +398,7 @@ QCString resolveTypeDef(const Definition *context,const QCString &qualifiedName,
{
// split-off scope part
QCString resScopeName = qualifiedName.left(scopeIndex);
- //printf("resScopeName='%s'\n",resScopeName.data());
+ //printf("resScopeName='%s'\n",qPrint(resScopeName));
// look-up scope in context
int is,ps=0;
@@ -406,18 +409,18 @@ QCString resolveTypeDef(const Definition *context,const QCString &qualifiedName,
QCString tmp = resolveTypeDef(mContext,qualScopePart);
if (!tmp.isEmpty()) qualScopePart=tmp;
resScope = resScope->findInnerCompound(qualScopePart);
- //printf("qualScopePart='%s' resScope=%p\n",qualScopePart.data(),resScope);
+ //printf("qualScopePart='%s' resScope=%p\n",qPrint(qualScopePart),resScope);
if (resScope==0) break;
ps=is+l;
}
}
- //printf("resScope=%s\n",resScope?resScope->name().data():"<none>");
+ //printf("resScope=%s\n",resScope? qPrint(resScope->name()) : "<none>");
// step 2: get the member
if (resScope) // no scope or scope found in the current context
{
//printf("scope found: %s, look for typedef %s\n",
- // resScope->qualifiedName().data(),resName.data());
+ // qPrint(resScope->qualifiedName()),qPrint(resName));
MemberNameLinkedMap *mnd=0;
if (resScope->definitionType()==Definition::TypeClass)
{
@@ -435,8 +438,8 @@ QCString resolveTypeDef(const Definition *context,const QCString &qualifiedName,
{
const MemberDef *tmd = tmd_p.get();
//printf("Found member %s resScope=%s outerScope=%s mContext=%p\n",
- // tmd->name().data(), resScope->name().data(),
- // tmd->getOuterScope()->name().data(), mContext);
+ // qPrint(tmd->name()),qPrint( resScope->name()),
+ // qPrint(tmd->getOuterScope()->name()), mContext);
if (tmd->isTypedef() /*&& tmd->getOuterScope()==resScope*/)
{
SymbolResolver resolver;
@@ -457,7 +460,7 @@ QCString resolveTypeDef(const Definition *context,const QCString &qualifiedName,
if (md)
{
//printf(">>resolveTypeDef: Found typedef name '%s' in scope '%s' value='%s' args='%s'\n",
- // qualifiedName.data(),context->name().data(),md->typeString(),md->argsString()
+ // qPrint(qualifiedName),qPrint(context->name()),md->typeString(),md->argsString()
// );
result=md->typeString();
QCString args = md->argsString();
@@ -474,7 +477,7 @@ QCString resolveTypeDef(const Definition *context,const QCString &qualifiedName,
else
{
//printf(">>resolveTypeDef: Typedef '%s' not found in scope '%s'!\n",
- // qualifiedName.data(),context ? context->name().data() : "<global>");
+ // qPrint(qualifiedName),context ? qPrint(context->name()) : "<global>");
}
return result;
@@ -484,16 +487,36 @@ QCString resolveTypeDef(const Definition *context,const QCString &qualifiedName,
/*! Get a class definition given its name.
* Returns 0 if the class is not found.
*/
-ClassDef *getClass(const char *n)
+ClassDef *getClass(const QCString &n)
{
- if (n==0 || n[0]=='\0') return 0;
+ if (n.isEmpty()) return 0;
return Doxygen::classLinkedMap->find(n);
}
-NamespaceDef *getResolvedNamespace(const char *name)
+
+ConceptDef *getConcept(const QCString &n)
+{
+ if (n.isEmpty()) return 0;
+ return Doxygen::conceptLinkedMap->find(n);
+}
+
+ConceptDef *getResolvedConcept(const Definition *d,const QCString &name)
+{
+ ConceptDef *cd=0;
+ while (d && d!=Doxygen::globalScope)
+ {
+ cd = getConcept(d->name()+"::"+name);
+ if (cd) return cd;
+ d = d->getOuterScope();
+ }
+ cd = getConcept(name);
+ return cd;
+}
+
+NamespaceDef *getResolvedNamespace(const QCString &name)
{
- if (name==0 || name[0]=='\0') return 0;
- auto it = Doxygen::namespaceAliasMap.find(name);
+ if (name.isEmpty()) return 0;
+ auto it = Doxygen::namespaceAliasMap.find(name.str());
if (it!=Doxygen::namespaceAliasMap.end())
{
int count=0; // recursion detection guard
@@ -506,9 +529,9 @@ NamespaceDef *getResolvedNamespace(const char *name)
}
if (count==10)
{
- warn_uncond("possible recursive namespace alias detected for %s!\n",name);
+ warn_uncond("possible recursive namespace alias detected for %s!\n",qPrint(name));
}
- return Doxygen::namespaceLinkedMap->find(it->second.data());
+ return Doxygen::namespaceLinkedMap->find(it->second);
}
else
{
@@ -592,7 +615,7 @@ QCString removeRedundantWhiteSpace(const QCString &s)
}
if (growBuf==0) return s; // should not happen, only we run out of memory
- char *src=s.rawData();
+ const char *src=s.data();
char *dst=growBuf;
uint i=0;
@@ -809,7 +832,7 @@ QCString removeRedundantWhiteSpace(const QCString &s)
pc=c;
}
*dst++='\0';
- //printf("removeRedundantWhitespace(%s)->%s\n",s.data(),growBuf);
+ //printf("removeRedundantWhitespace(%s)->%s\n",qPrint(s),growBuf);
return growBuf;
}
@@ -887,12 +910,12 @@ bool leftScopeMatch(const QCString &scope, const QCString &name)
void linkifyText(const TextGeneratorIntf &out, const Definition *scope,
const FileDef *fileScope,const Definition *self,
- const char *text, bool autoBreak,bool external,
+ const QCString &text, bool autoBreak,bool external,
bool keepSpaces,int indentLevel)
{
- if (text==0) return;
+ if (text.isEmpty()) return;
//printf("linkify='%s'\n",text);
- std::string txtStr=text;
+ std::string txtStr=text.str();
size_t strLen = txtStr.length();
if (strLen==0) return;
@@ -901,9 +924,9 @@ void linkifyText(const TextGeneratorIntf &out, const Definition *scope,
reg::Iterator end;
//printf("linkifyText scope=%s fileScope=%s strtxt=%s strlen=%d external=%d\n",
- // scope?scope->name().data():"<none>",
- // fileScope?fileScope->name().data():"<none>",
- // txtStr.data(),strLen,external);
+ // scope ? qPrint(scope->name()):"<none>",
+ // fileScope ? qPrint(fileScope->name()) : "<none>",
+ // qPrint(txtStr),strLen,external);
size_t index=0;
size_t skipIndex=0;
size_t floatingIndex=0;
@@ -938,7 +961,7 @@ void linkifyText(const TextGeneratorIntf &out, const Definition *scope,
if (i==std::string::npos) { i=splitText.find('<'); if (i!=std::string::npos) offset=0; }
if (i==std::string::npos) i=splitText.find('>');
if (i==std::string::npos) i=splitText.find(' ');
- //printf("splitText=[%s] len=%d i=%d offset=%d\n",splitText.data(),splitLength,i,offset);
+ //printf("splitText=[%s] len=%d i=%d offset=%d\n",qPrint(splitText),splitLength,i,offset);
if (i!=std::string::npos) // add a link-break at i in case of Html output
{
std::string part1 = splitText.substr(0,i+offset);
@@ -961,9 +984,9 @@ void linkifyText(const TextGeneratorIntf &out, const Definition *scope,
}
// get word from string
std::string word=txtStr.substr(newIndex,matchLen);
- QCString matchWord = substitute(substitute(word,"\\","::"),".","::");
+ QCString matchWord = substitute(substitute(QCString(word),"\\","::"),".","::");
//printf("linkifyText word=%s matchWord=%s scope=%s\n",
- // word.data(),matchWord.data(),scope?scope->name().data():"<none>");
+ // qPrint(word),qPrint(matchWord),scope ? qPrint(scope->name()) : "<none>");
bool found=FALSE;
if (!insideString)
{
@@ -972,14 +995,15 @@ void linkifyText(const TextGeneratorIntf &out, const Definition *scope,
const FileDef *fd=0;
const NamespaceDef *nd=0;
const GroupDef *gd=0;
- //printf("** Match word '%s'\n",matchWord.data());
+ const ConceptDef *cnd=0;
+ //printf("** Match word '%s'\n",qPrint(matchWord));
SymbolResolver resolver(fileScope);
cd=resolver.resolveClass(scope,matchWord);
const MemberDef *typeDef = resolver.getTypedef();
if (typeDef) // First look at typedef then class, see bug 584184.
{
- //printf("Found typedef %s\n",typeDef->name().data());
+ //printf("Found typedef %s\n",qPrint(typeDef->name()));
if (external ? typeDef->isLinkable() : typeDef->isLinkableInProject())
{
if (typeDef->getOuterScope()!=self)
@@ -994,7 +1018,7 @@ void linkifyText(const TextGeneratorIntf &out, const Definition *scope,
}
if (!found && (cd || (cd=getClass(matchWord))))
{
- //printf("Found class %s\n",cd->name().data());
+ //printf("Found class %s\n",qPrint(cd->name()));
// add link to the result
if (external ? cd->isLinkable() : cd->isLinkableInProject())
{
@@ -1017,18 +1041,18 @@ void linkifyText(const TextGeneratorIntf &out, const Definition *scope,
}
}
}
-// else if ((cd=getClass(matchWord+"-g"))) // C# generic as well
-// {
-// // add link to the result
-// if (external ? cd->isLinkable() : cd->isLinkableInProject())
-// {
-// if (cd!=self)
-// {
-// out.writeLink(cd->getReference(),cd->getOutputFileBase(),cd->anchor(),word);
-// found=TRUE;
-// }
-// }
-// }
+ else if ((cnd=getConcept(matchWord)))
+ {
+ // add link to the result
+ if (external ? cnd->isLinkable() : cnd->isLinkableInProject())
+ {
+ if (cnd!=self)
+ {
+ out.writeLink(cnd->getReference(),cnd->getOutputFileBase(),cnd->anchor(),word.c_str());
+ found=TRUE;
+ }
+ }
+ }
else
{
//printf(" -> nothing\n");
@@ -1050,17 +1074,17 @@ void linkifyText(const TextGeneratorIntf &out, const Definition *scope,
matchWord = matchWord.mid(m+2);
}
- //printf("ScopeName=%s\n",scopeName.data());
- //if (!found) printf("Trying to link %s in %s\n",word.data(),scopeName.data());
+ //printf("ScopeName=%s\n",qPrint(scopeName));
+ //if (!found) printf("Trying to link %s in %s\n",qPrint(word),qPrint(scopeName));
if (!found &&
- getDefs(scopeName,matchWord,0,md,cd,fd,nd,gd) &&
+ getDefs(scopeName,matchWord,QCString(),md,cd,fd,nd,gd) &&
//(md->isTypedef() || md->isEnumerate() ||
// md->isReference() || md->isVariable()
//) &&
(external ? md->isLinkable() : md->isLinkableInProject())
)
{
- //printf("Found ref scope=%s\n",d?d->name().data():"<global>");
+ //printf("Found ref scope=%s\n",d ? qPrint(d->name()) : "<global>");
//ol.writeObjectLink(d->getReference(),d->getOutputFileBase(),
// md->anchor(),word);
if (md!=self && (self==0 || md->name()!=self->name()))
@@ -1073,7 +1097,7 @@ void linkifyText(const TextGeneratorIntf &out, const Definition *scope,
{
out.writeLink(md->getReference(),md->getOutputFileBase(),
md->anchor(),word.c_str());
- //printf("found symbol %s\n",matchWord.data());
+ //printf("found symbol %s\n",qPrint(matchWord));
found=TRUE;
}
}
@@ -1128,8 +1152,8 @@ void writeExamples(OutputList &ol,const ExampleList &list)
ol.disable(OutputGenerator::RTF);
ol.disable(OutputGenerator::Docbook);
// link for Html / man
- //printf("writeObjectLink(file=%s)\n",e->file.data());
- ol.writeObjectLink(0,e.file,e.anchor,e.name);
+ //printf("writeObjectLink(file=%s)\n",qPrint(e->file));
+ ol.writeObjectLink(QCString(),e.file,e.anchor,e.name);
ol.popGeneratorState();
ol.pushGeneratorState();
@@ -1137,7 +1161,7 @@ void writeExamples(OutputList &ol,const ExampleList &list)
ol.disable(OutputGenerator::Html);
// link for Latex / pdf with anchor because the sources
// are not hyperlinked (not possible with a verbatim environment).
- ol.writeObjectLink(0,e.file,0,e.name);
+ ol.writeObjectLink(QCString(),e.file,QCString(),e.name);
ol.popGeneratorState();
};
@@ -1280,7 +1304,7 @@ int filterCRLF(char *buf,int len)
return dest; // length of the valid part of the buf
}
-static QCString getFilterFromList(const char *name,const StringVector &filterList,bool &found)
+static QCString getFilterFromList(const QCString &name,const StringVector &filterList,bool &found)
{
found=FALSE;
// compare the file name to the filter pattern list
@@ -1321,10 +1345,10 @@ static QCString getFilterFromList(const char *name,const StringVector &filterLis
* In case \a inSourceCode is TRUE then first the source filter list is
* considered.
*/
-QCString getFileFilter(const char* name,bool isSourceCode)
+QCString getFileFilter(const QCString &name,bool isSourceCode)
{
// sanity check
- if (name==0) return "";
+ if (name.isEmpty()) return "";
const StringVector& filterSrcList = Config_getList(FILTER_SOURCE_PATTERNS);
const StringVector& filterList = Config_getList(FILTER_PATTERNS);
@@ -1365,30 +1389,30 @@ QCString transcodeCharacterStringToUTF8(const QCString &input)
int inputSize=input.length();
int outputSize=inputSize*4+1;
QCString output(outputSize);
- void *cd = portable_iconv_open(outputEncoding,inputEncoding);
+ void *cd = portable_iconv_open(outputEncoding,inputEncoding.data());
if (cd==(void *)(-1))
{
err("unsupported character conversion: '%s'->'%s'\n",
- inputEncoding.data(),outputEncoding);
+ qPrint(inputEncoding),outputEncoding);
error=TRUE;
}
if (!error)
{
size_t iLeft=inputSize;
size_t oLeft=outputSize;
- char *inputPtr = input.rawData();
+ const char *inputPtr = input.data();
char *outputPtr = output.rawData();
if (!portable_iconv(cd, &inputPtr, &iLeft, &outputPtr, &oLeft))
{
outputSize-=(int)oLeft;
output.resize(outputSize+1);
output.at(outputSize)='\0';
- //printf("iconv: input size=%d output size=%d\n[%s]\n",size,newSize,srcBuf.data());
+ //printf("iconv: input size=%d output size=%d\n[%s]\n",size,newSize,qPrint(srcBuf));
}
else
{
err("failed to translate characters from %s to %s: check INPUT_ENCODING\ninput=[%s]\n",
- inputEncoding.data(),outputEncoding,input.data());
+ qPrint(inputEncoding),outputEncoding,qPrint(input));
error=TRUE;
}
}
@@ -1400,42 +1424,30 @@ QCString transcodeCharacterStringToUTF8(const QCString &input)
* is TRUE the file will be filtered by any user specified input filter.
* If \a name is "-" the string will be read from standard input.
*/
-QCString fileToString(const char *name,bool filter,bool isSourceCode)
+QCString fileToString(const QCString &name,bool filter,bool isSourceCode)
{
- if (name==0 || name[0]==0) return 0;
- QFile f;
-
- bool fileOpened=FALSE;
+ if (name.isEmpty()) return QCString();
+ bool fileOpened=false;
if (name[0]=='-' && name[1]==0) // read from stdin
{
- fileOpened=f.open(IO_ReadOnly,stdin);
- if (fileOpened)
+ fileOpened=true;
+ std::string contents;
+ std::string line;
+ while (getline(std::cin,line))
{
- const int bSize=4096;
- QCString contents(bSize+1);
- int totalSize=0;
- int size;
- while ((size=f.readBlock(contents.rawData()+totalSize,bSize))==bSize)
- {
- totalSize+=bSize;
- contents.resize(totalSize+bSize+1);
- }
- totalSize = filterCRLF(contents.rawData(),totalSize+size)+2;
- contents.resize(totalSize);
- contents.at(totalSize-2)='\n'; // to help the scanner
- contents.at(totalSize-1)='\0';
- return contents;
+ contents+=line+'\n';
}
+ return contents;
}
else // read from file
{
- QFileInfo fi(name);
+ FileInfo fi(name.str());
if (!fi.exists() || !fi.isFile())
{
- err("file '%s' not found\n",name);
+ err("file '%s' not found\n",qPrint(name));
return "";
}
- BufStr buf(fi.size());
+ BufStr buf((uint)fi.size());
fileOpened=readInputFile(name,buf,filter,isSourceCode);
if (fileOpened)
{
@@ -1450,7 +1462,7 @@ QCString fileToString(const char *name,bool filter,bool isSourceCode)
}
if (!fileOpened)
{
- err("cannot open file '%s' for reading\n",name);
+ err("cannot open file '%s' for reading\n",qPrint(name));
}
return "";
}
@@ -1468,7 +1480,7 @@ static std::tm getCurrentDateTime()
if (!warnedOnce)
{
warn_uncond("Environment variable SOURCE_DATE_EPOCH does not contain a valid number; value is '%s'\n",
- sourceDateEpoch.data());
+ qPrint(sourceDateEpoch));
warnedOnce=TRUE;
}
}
@@ -1522,7 +1534,7 @@ int minClassDistance(const ClassDef *cd,const ClassDef *bcd,int level)
if (level==256)
{
warn_uncond("class %s seem to have a recursive "
- "inheritance relation!\n",cd->name().data());
+ "inheritance relation!\n",qPrint(cd->name()));
return -1;
}
int m=maxInheritanceDepth;
@@ -1549,7 +1561,7 @@ Protection classInheritedProtectionLevel(const ClassDef *cd,const ClassDef *bcd,
if (level==256)
{
err("Internal inconsistency: found class %s seem to have a recursive "
- "inheritance relation! Please send a bug report to doxygen@gmail.com\n",cd->name().data());
+ "inheritance relation! Please send a bug report to doxygen@gmail.com\n",qPrint(cd->name()));
}
else if (prot!=Private)
{
@@ -1561,17 +1573,17 @@ Protection classInheritedProtectionLevel(const ClassDef *cd,const ClassDef *bcd,
}
}
exit:
- //printf("classInheritedProtectionLevel(%s,%s)=%d\n",cd->name().data(),bcd->name().data(),prot);
+ //printf("classInheritedProtectionLevel(%s,%s)=%d\n",qPrint(cd->name()),qPrint(bcd->name()),prot);
return prot;
}
void trimBaseClassScope(const BaseClassList &bcl,QCString &s,int level=0)
{
- //printf("trimBaseClassScope level=%d '%s'\n",level,s.data());
+ //printf("trimBaseClassScope level=%d '%s'\n",level,qPrint(s));
for (const auto &bcd : bcl)
{
ClassDef *cd=bcd.classDef;
- //printf("Trying class %s\n",cd->name().data());
+ //printf("Trying class %s\n",qPrint(cd->name()));
int spos=s.find(cd->name()+"::");
if (spos!=-1)
{
@@ -1579,7 +1591,7 @@ void trimBaseClassScope(const BaseClassList &bcl,QCString &s,int level=0)
s.length()-spos-cd->name().length()-2
);
}
- //printf("base class '%s'\n",cd->name().data());
+ //printf("base class '%s'\n",qPrint(cd->name()));
if (!cd->baseClasses().empty())
{
trimBaseClassScope(cd->baseClasses(),s,level+1);
@@ -1640,11 +1652,11 @@ static void stripIrrelevantString(QCString &target,const QCString &str)
*/
void stripIrrelevantConstVolatile(QCString &s)
{
- //printf("stripIrrelevantConstVolatile(%s)=",s.data());
+ //printf("stripIrrelevantConstVolatile(%s)=",qPrint(s));
stripIrrelevantString(s,"const");
stripIrrelevantString(s,"volatile");
stripIrrelevantString(s,"final");
- //printf("%s\n",s.data());
+ //printf("%s\n",qPrint(s));
}
@@ -1685,7 +1697,7 @@ QCString getCanonicalTemplateSpec(const Definition *d,const FileDef *fs,const QC
{
templSpec = resolvedType;
}
- //printf("getCanonicalTemplateSpec(%s)=%s\n",spec.data(),templSpec.data());
+ //printf("getCanonicalTemplateSpec(%s)=%s\n",qPrint(spec),qPrint(templSpec));
return templSpec;
}
@@ -1709,9 +1721,9 @@ static QCString getCanonicalTypeForIdentifier(
symName=word;
}
//printf("getCanonicalTypeForIdentifier(%s d=%s fs=%s ,[%s->%s]) start\n",
- // word.data(),
- // d ? d->name().data() : "<null>",fs ? fs->name().data() : "<null>",
- // tSpec?tSpec->data():"<none>",templSpec.data());
+ // qPrint(word),
+ // d ? qPrint(d->name()) : "<null>", fs ? qPrint(fs->name()) : "<null>",
+ // tSpec ? qPrint(tSpec) : "<none>", qPrint(templSpec));
// lookup class / class template instance
SymbolResolver resolver(fs);
@@ -1733,23 +1745,23 @@ static QCString getCanonicalTypeForIdentifier(
//printf("cd=%p mtype=%p\n",cd,mType);
//printf(" getCanonicalTypeForIdentifier: symbol=%s word=%s cd=%s d=%s fs=%s cd->isTemplate=%d\n",
- // symName.data(),
- // word.data(),
- // cd?cd->name().data():"<none>",
- // d?d->name().data():"<none>",
- // fs?fs->name().data():"<none>",
- // cd?cd->isTemplate():-1
+ // qPrint(symName),
+ // qPrint(word),
+ // cd ? qPrint(cd->name()) : "<none>",
+ // d ? qPrint( d->name()) : "<none>",
+ // fs ? qPrint(fs->name()) : "<none>",
+ // cd ? cd->isTemplate():-1
// );
//printf(" >>>> word '%s' => '%s' templSpec=%s ts=%s tSpec=%s isTemplate=%d resolvedType=%s\n",
- // (word+templSpec).data(),
- // cd?cd->qualifiedName().data():"<none>",
- // templSpec.data(),ts.data(),
- // tSpec?tSpec->data():"<null>",
- // cd?cd->isTemplate():FALSE,
- // resolvedType.data());
+ // qPrint((word+templSpec)),
+ // cd ? qPrint(cd->qualifiedName()) : "<none>",
+ // qPrint(templSpec), qPrint(ts),
+ // tSpec ? qPrint(tSpec) : "<null>",
+ // cd ? cd->isTemplate():FALSE,
+ // qPrint(resolvedType));
- //printf(" mtype=%s\n",mType?mType->name().data():"<none>");
+ //printf(" mtype=%s\n",mType ? qPrint(mType->name()) : "<none>");
if (cd) // resolves to a known class type
{
@@ -1804,7 +1816,7 @@ static QCString getCanonicalTypeForIdentifier(
{
//result = mType->qualifiedName(); // changed after 1.7.2
//result = mType->typeString();
- //printf("word=%s typeString=%s\n",word.data(),mType->typeString());
+ //printf("word=%s typeString=%s\n",qPrint(word),mType->typeString());
if (word!=mType->typeString())
{
QCString type = mType->typeString();
@@ -1823,7 +1835,7 @@ static QCString getCanonicalTypeForIdentifier(
else // fallback
{
resolvedType = resolveTypeDef(d,word);
- //printf("typedef [%s]->[%s]\n",word.data(),resolvedType.data());
+ //printf("typedef [%s]->[%s]\n",qPrint(word),qPrint(resolvedType));
if (resolvedType.isEmpty()) // not known as a typedef either
{
result = word;
@@ -1833,7 +1845,7 @@ static QCString getCanonicalTypeForIdentifier(
result = resolvedType;
}
}
- //printf("getCanonicalTypeForIdentifier [%s]->[%s]\n",word.data(),result.data());
+ //printf("getCanonicalTypeForIdentifier [%s]->[%s]\n",qPrint(word),qPrint(result));
return result;
}
@@ -1852,8 +1864,8 @@ static QCString extractCanonicalType(const Definition *d,const FileDef *fs,QCStr
type.stripPrefix("typename ");
type = removeRedundantWhiteSpace(type);
- //printf("extractCanonicalType(type=%s) start: def=%s file=%s\n",type.data(),
- // d ? d->name().data() : "<null>",fs ? fs->name().data() : "<null>");
+ //printf("extractCanonicalType(type=%s) start: def=%s file=%s\n",qPrint(type),
+ // d ? qPrint(d->name()) : "<null>", fs ? qPrint(fs->name()) : "<null>");
QCString canType;
QCString templSpec,word;
@@ -1878,7 +1890,7 @@ static QCString extractCanonicalType(const Definition *d,const FileDef *fs,QCStr
canType += ct;
}
//printf(" word=%s templSpec=%s canType=%s ct=%s\n",
- // word.data(),templSpec.data(),canType.data(),ct.data());
+ // qPrint(word), qPrint(templSpec), qPrint(canType), qPrint(ct));
if (!templSpec.isEmpty()) // if we didn't use up the templSpec already
// (i.e. type is not a template specialization)
// then resolve any identifiers inside.
@@ -1890,7 +1902,7 @@ static QCString extractCanonicalType(const Definition *d,const FileDef *fs,QCStr
size_t tp=0;
// for each identifier template specifier
- //printf("adding resolved %s to %s\n",templSpec.data(),canType.data());
+ //printf("adding resolved %s to %s\n",qPrint(templSpec),qPrint(canType));
for (; it!=end ; ++it)
{
const auto &match = *it;
@@ -1907,7 +1919,7 @@ static QCString extractCanonicalType(const Definition *d,const FileDef *fs,QCStr
pp=p;
}
canType += type.right(type.length()-pp);
- //printf("extractCanonicalType = '%s'->'%s'\n",type.data(),canType.data());
+ //printf("extractCanonicalType = '%s'->'%s'\n",qPrint(type),qPrint(canType));
return removeRedundantWhiteSpace(canType);
}
@@ -1916,7 +1928,7 @@ static QCString extractCanonicalArgType(const Definition *d,const FileDef *fs,co
{
QCString type = arg.type.stripWhiteSpace();
QCString name = arg.name;
- //printf("----- extractCanonicalArgType(type=%s,name=%s)\n",type.data(),name.data());
+ //printf("----- extractCanonicalArgType(type=%s,name=%s)\n",qPrint(type),qPrint(name));
if ((type=="const" || type=="volatile") && !name.isEmpty())
{ // name is part of type => correct
type+=" ";
@@ -1941,10 +1953,10 @@ static bool matchArgument2(
)
{
//printf(">> match argument: %s::'%s|%s' (%s) <-> %s::'%s|%s' (%s)\n",
- // srcScope ? srcScope->name().data() : "",
- // srcA.type.data(),srcA.name.data(),srcA.canType.data(),
- // dstScope ? dstScope->name().data() : "",
- // dstA.type.data(),dstA.name.data(),dstA.canType.data());
+ // srcScope ? qPrint(srcScope->name()) : "",
+ // qPrint(srcA.type), qPrint(srcA.name), qPrint(srcA.canType),
+ // dstScope ? qPrint(dstScope->name()) : "",
+ // qPrint(dstA.type), qPrint(dstA.name), qPrint(dstA.canType));
//if (srcA->array!=dstA->array) // nomatch for char[] against char
//{
@@ -1957,8 +1969,8 @@ static bool matchArgument2(
QCString dstType = dstA.type;
stripIrrelevantConstVolatile(srcType);
stripIrrelevantConstVolatile(dstType);
- //printf("'%s'<->'%s'\n",sSrcName.data(),dstType.right(sSrcName.length()).data());
- //printf("'%s'<->'%s'\n",sDstName.data(),srcType.right(sDstName.length()).data());
+ //printf("'%s'<->'%s'\n",qPrint(sSrcName),qPrint(dstType.right(sSrcName.length())));
+ //printf("'%s'<->'%s'\n",qPrint(sDstName),qPrint(srcType.right(sDstName.length())));
if (sSrcName==dstType.right(sSrcName.length()))
{ // case "unsigned int" <-> "unsigned int i"
srcA.type+=sSrcName;
@@ -1987,7 +1999,7 @@ static bool matchArgument2(
else
{
//printf(" Canonical types do not match [%s]<->[%s]\n",
- // srcA->canType.data(),dstA->canType.data());
+ // qPrint(srcA->canType),qPrint(dstA->canType));
NOMATCH
return FALSE;
}
@@ -2087,7 +2099,7 @@ bool matchArguments2(const Definition *srcScope,const FileDef *srcFileScope,cons
void mergeArguments(ArgumentList &srcAl,ArgumentList &dstAl,bool forceNameOverwrite)
{
//printf("mergeArguments '%s', '%s'\n",
- // argListToString(srcAl).data(),argListToString(dstAl).data());
+ // qPrint(argListToString(srcAl)),qPrint(argListToString(dstAl)));
if (srcAl.size()!=dstAl.size())
{
@@ -2103,12 +2115,12 @@ void mergeArguments(ArgumentList &srcAl,ArgumentList &dstAl,bool forceNameOverwr
if (srcA.defval.isEmpty() && !dstA.defval.isEmpty())
{
- //printf("Defval changing '%s'->'%s'\n",srcA.defval.data(),dstA.defval.data());
+ //printf("Defval changing '%s'->'%s'\n",qPrint(srcA.defval),qPrint(dstA.defval));
srcA.defval=dstA.defval;
}
else if (!srcA.defval.isEmpty() && dstA.defval.isEmpty())
{
- //printf("Defval changing '%s'->'%s'\n",dstA.defval.data(),srcA.defval.data());
+ //printf("Defval changing '%s'->'%s'\n",qPrint(dstA.defval),qPrint(srcA.defval));
dstA.defval=srcA.defval;
}
@@ -2127,24 +2139,24 @@ void mergeArguments(ArgumentList &srcAl,ArgumentList &dstAl,bool forceNameOverwr
if (srcA.type==dstA.type)
{
- //printf("1. merging %s:%s <-> %s:%s\n",srcA.type.data(),srcA.name.data(),dstA.type.data(),dstA.name.data());
+ //printf("1. merging %s:%s <-> %s:%s\n",qPrint(srcA.type),qPrint(srcA.name),qPrint(dstA.type),qPrint(dstA.name));
if (srcA.name.isEmpty() && !dstA.name.isEmpty())
{
- //printf("type: '%s':='%s'\n",srcA.type.data(),dstA.type.data());
- //printf("name: '%s':='%s'\n",srcA.name.data(),dstA.name.data());
+ //printf("type: '%s':='%s'\n",qPrint(srcA.type),qPrint(dstA.type));
+ //printf("name: '%s':='%s'\n",qPrint(srcA.name),qPrint(dstA.name));
srcA.type = dstA.type;
srcA.name = dstA.name;
}
else if (!srcA.name.isEmpty() && dstA.name.isEmpty())
{
- //printf("type: '%s':='%s'\n",dstA.type.data(),srcA.type.data());
- //printf("name: '%s':='%s'\n",dstA.name.data(),srcA.name.data());
+ //printf("type: '%s':='%s'\n",qPrint(dstA.type),qPrint(srcA.type));
+ //printf("name: '%s':='%s'\n",qPrint(dstA.name),qPrint(srcA.name));
dstA.type = srcA.type;
dstA.name = dstA.name;
}
else if (!srcA.name.isEmpty() && !dstA.name.isEmpty())
{
- //printf("srcA.name=%s dstA.name=%s\n",srcA.name.data(),dstA.name.data());
+ //printf("srcA.name=%s dstA.name=%s\n",qPrint(srcA.name),qPrint(dstA.name));
if (forceNameOverwrite)
{
srcA.name = dstA.name;
@@ -2164,7 +2176,7 @@ void mergeArguments(ArgumentList &srcAl,ArgumentList &dstAl,bool forceNameOverwr
}
else
{
- //printf("2. merging '%s':'%s' <-> '%s':'%s'\n",srcA.type.data(),srcA.name.data(),dstA.type.data(),dstA.name.data());
+ //printf("2. merging '%s':'%s' <-> '%s':'%s'\n",qPrint(srcA.type),qPrint(srcA.name),qPrint(dstA.type),qPrint(dstA.name));
srcA.type=srcA.type.stripWhiteSpace();
dstA.type=dstA.type.stripWhiteSpace();
if (srcA.type+" "+srcA.name==dstA.type) // "unsigned long:int" <-> "unsigned long int:bla"
@@ -2192,15 +2204,15 @@ void mergeArguments(ArgumentList &srcAl,ArgumentList &dstAl,bool forceNameOverwr
j2=dstA.type.length()-i2-2;
if (i1!=-1 && i2==-1 && srcA.type.right(j1)==dstA.type)
{
- //printf("type: '%s':='%s'\n",dstA.type.data(),srcA.type.data());
- //printf("name: '%s':='%s'\n",dstA.name.data(),srcA.name.data());
+ //printf("type: '%s':='%s'\n",qPrint(dstA.type),qPrint(srcA.type));
+ //printf("name: '%s':='%s'\n",qPrint(dstA.name),qPrint(srcA.name));
dstA.type = srcA.type.left(i1+2)+dstA.type;
dstA.name = dstA.name;
}
else if (i1==-1 && i2!=-1 && dstA.type.right(j2)==srcA.type)
{
- //printf("type: '%s':='%s'\n",srcA.type.data(),dstA.type.data());
- //printf("name: '%s':='%s'\n",dstA.name.data(),srcA.name.data());
+ //printf("type: '%s':='%s'\n",qPrint(srcA.type),qPrint(dstA.type));
+ //printf("name: '%s':='%s'\n",qPrint(dstA.name),qPrint(srcA.name));
srcA.type = dstA.type.left(i2+2)+srcA.type;
srcA.name = dstA.name;
}
@@ -2213,15 +2225,15 @@ void mergeArguments(ArgumentList &srcAl,ArgumentList &dstAl,bool forceNameOverwr
dstA.docs = srcA.docs;
}
//printf("Merge argument '%s|%s' '%s|%s'\n",
- // srcA.type.data(),srcA.name.data(),
- // dstA.type.data(),dstA.name.data());
+ // qPrint(srcA.type), qPrint(srcA.name),
+ // qPrint(dstA.type), qPrint(dstA.name));
++srcIt;
++dstIt;
}
}
static void findMembersWithSpecificName(const MemberName *mn,
- const char *args,
+ const QCString &args,
bool checkStatics,
const FileDef *currentFile,
bool checkCV,
@@ -2235,7 +2247,7 @@ static void findMembersWithSpecificName(const MemberName *mn,
const FileDef *fd=md->getFileDef();
const GroupDef *gd=md->getGroupDef();
//printf(" md->name()='%s' md->args='%s' fd=%p gd=%p current=%p ref=%s\n",
- // md->name().data(),args,fd,gd,currentFile,md->getReference().data());
+ // qPrint(md->name()),args,fd,gd,currentFile,qPrint(md->getReference()));
if (
((gd && gd->isLinkable()) || (fd && fd->isLinkable()) || md->isReference()) &&
md->getNamespaceDef()==0 && md->isLinkable() &&
@@ -2244,7 +2256,7 @@ static void findMembersWithSpecificName(const MemberName *mn,
)
{
bool match=TRUE;
- if (args && !md->isDefine() && qstrcmp(args,"()")!=0)
+ if (!args.isEmpty() && !md->isDefine() && args!="()")
{
const ArgumentList &mdAl = md->argumentList();
auto argList_p = stringToArgumentList(md->getLanguage(),args);
@@ -2286,7 +2298,7 @@ static void findMembersWithSpecificName(const MemberName *mn,
*/
bool getDefs(const QCString &scName,
const QCString &mbName,
- const char *args,
+ const QCString &args,
const MemberDef *&md,
const ClassDef *&cd,
const FileDef *&fd,
@@ -2305,7 +2317,7 @@ bool getDefs(const QCString &scName,
scopeName = substitute(scopeName,"\\","::"); // for PHP
memberName = substitute(memberName,"\\","::"); // for PHP
//printf("Search for name=%s args=%s in scope=%s forceEmpty=%d\n",
- // memberName.data(),args,scopeName.data(),forceEmptyScope);
+ // qPrint(memberName),qPrint(args),qPrint(scopeName),forceEmptyScope);
int is,im=0,pm=0;
// strip common part of the scope from the scopeName
@@ -2318,7 +2330,7 @@ bool getDefs(const QCString &scName,
pm=im+2;
}
//printf("result after scope corrections scope=%s name=%s\n",
- // scopeName.data(),memberName.data());
+ // qPrint(scopeName), qPrint(memberName));
QCString mName=memberName;
QCString mScope;
@@ -2335,15 +2347,15 @@ bool getDefs(const QCString &scName,
// handle special the case where both scope name and member scope are equal
if (mScope==scopeName) scopeName.resize(0);
- //printf("mScope='%s' mName='%s'\n",mScope.data(),mName.data());
+ //printf("mScope='%s' mName='%s'\n",qPrint(mScope),qPrint(mName));
MemberName *mn = Doxygen::memberNameLinkedMap->find(mName);
- //printf("mName=%s mn=%p\n",mName.data(),mn);
+ //printf("mName=%s mn=%p\n",qPrint(mName),mn);
if ((!forceEmptyScope || scopeName.isEmpty()) && // this was changed for bug638856, forceEmptyScope => empty scopeName
mn && !(scopeName.isEmpty() && mScope.isEmpty()))
{
- //printf(" >member name '%s' found\n",mName.data());
+ //printf(" >member name '%s' found\n",qPrint(mName));
int scopeOffset=scopeName.length();
do
{
@@ -2367,7 +2379,7 @@ bool getDefs(const QCString &scName,
fcd=resolver.resolveClass(Doxygen::globalScope,nameWithoutTemplates);
tmd=resolver.getTypedef();
}
- //printf("Trying class scope %s: fcd=%p tmd=%p\n",className.data(),fcd,tmd);
+ //printf("Trying class scope %s: fcd=%p tmd=%p\n",qPrint(className),fcd,tmd);
// todo: fill in correct fileScope!
if (fcd && // is it a documented class
fcd->isLinkable()
@@ -2376,7 +2388,7 @@ bool getDefs(const QCString &scName,
//printf(" Found fcd=%p\n",fcd);
int mdist=maxInheritanceDepth;
std::unique_ptr<ArgumentList> argList;
- if (args)
+ if (!args.isEmpty())
{
argList = stringToArgumentList(fcd->getLanguage(),args);
}
@@ -2386,7 +2398,7 @@ bool getDefs(const QCString &scName,
if (!mmd->isStrongEnumValue())
{
const ArgumentList &mmdAl = mmd->argumentList();
- bool match=args==0 ||
+ bool match = args.isEmpty() ||
matchArguments2(mmd->getOuterScope(),mmd->getFileDef(),&mmdAl,
fcd, fcd->getFileDef(),argList.get(),
checkCV);
@@ -2407,7 +2419,7 @@ bool getDefs(const QCString &scName,
}
}
}
- if (mdist==maxInheritanceDepth && args && qstrcmp(args,"()")==0)
+ if (mdist==maxInheritanceDepth && args=="()")
// no exact match found, but if args="()" an arbitrary member will do
{
//printf(" >Searching for arbitrary member\n");
@@ -2417,7 +2429,7 @@ bool getDefs(const QCString &scName,
//if (mmd->isLinkable())
//{
const ClassDef *mcd=mmd->getClassDef();
- //printf(" >Class %s found\n",mcd->name().data());
+ //printf(" >Class %s found\n",qPrint(mcd->name()));
if (mcd)
{
int m=minClassDistance(fcd,mcd);
@@ -2488,9 +2500,9 @@ bool getDefs(const QCString &scName,
//printf("Global symbol\n");
const MemberDef *fuzzy_mmd = 0;
std::unique_ptr<ArgumentList> argList;
- bool hasEmptyArgs = args && qstrcmp(args, "()") == 0;
+ bool hasEmptyArgs = args=="()";
- if (args)
+ if (!args.isEmpty())
{
argList = stringToArgumentList(SrcLangExt_Cpp, args);
}
@@ -2504,7 +2516,7 @@ bool getDefs(const QCString &scName,
continue;
}
- if (!args)
+ if (args.isEmpty())
{
fuzzy_mmd = mmd;
break;
@@ -2538,7 +2550,7 @@ bool getDefs(const QCString &scName,
// maybe an namespace, file or group member ?
//printf("Testing for global symbol scopeName='%s' mScope='%s' :: mName='%s'\n",
- // scopeName.data(),mScope.data(),mName.data());
+ // qPrint(scopeName), qPrint(mScope), qPrint(mName));
if ((mn=Doxygen::functionNameLinkedMap->find(mName))) // name is known
{
//printf(" >symbol name found\n");
@@ -2553,16 +2565,16 @@ bool getDefs(const QCString &scName,
}
else if (!mScope.isEmpty())
{
- namespaceName=mScope.copy();
+ namespaceName=mScope;
}
- //printf("Trying namespace %s\n",namespaceName.data());
+ //printf("Trying namespace %s\n",qPrint(namespaceName));
if (!namespaceName.isEmpty() &&
(fnd=Doxygen::namespaceLinkedMap->find(namespaceName)) &&
fnd->isLinkable()
)
{
//printf("Symbol inside existing namespace '%s' count=%d\n",
- // namespaceName.data(),mn->count());
+ // qPrint(namespaceName),mn->count());
bool found=FALSE;
for (const auto &mmd_p : *mn)
{
@@ -2572,7 +2584,7 @@ bool getDefs(const QCString &scName,
const MemberDef *emd = mmd->getEnumScope();
if (emd && emd->isStrong())
{
- //printf("yes match %s<->%s!\n",mScope.data(),emd->localName().data());
+ //printf("yes match %s<->%s!\n",qPrint(mScope),qPrint(emd->localName()));
if (emd->getNamespaceDef()==fnd &&
rightScopeMatch(mScope,emd->localName()))
{
@@ -2592,7 +2604,7 @@ bool getDefs(const QCString &scName,
else if (mmd->getOuterScope()==fnd /* && mmd->isLinkable() */ )
{ // namespace is found
bool match=TRUE;
- if (args && qstrcmp(args,"()")!=0)
+ if (!args.isEmpty() && args!="()")
{
const ArgumentList &mmdAl = mmd->argumentList();
auto argList_p = stringToArgumentList(mmd->getLanguage(),args);
@@ -2610,7 +2622,7 @@ bool getDefs(const QCString &scName,
}
}
}
- if (!found && args && !qstrcmp(args,"()"))
+ if (!found && args=="()")
// no exact match found, but if args="()" an arbitrary
// member will do
{
@@ -2649,9 +2661,9 @@ bool getDefs(const QCString &scName,
{
const MemberDef *mmd = mmd_p.get();
const MemberDef *tmd = mmd->getEnumScope();
- //printf("try member %s tmd=%s\n",mmd->name().data(),tmd?tmd->name().data():"<none>");
+ //printf("try member %s tmd=%s\n",qPrint(mmd->name()),tmd ? qPrint(tmd->name()) : "<none>");
int ni=namespaceName.findRev("::");
- //printf("namespaceName=%s ni=%d\n",namespaceName.data(),ni);
+ //printf("namespaceName=%s ni=%d\n",qPrint(namespaceName),ni);
bool notInNS = tmd && ni==-1 && tmd->getNamespaceDef()==0 && (mScope.isEmpty() || mScope==tmd->name());
bool sameNS = tmd && tmd->getNamespaceDef() && namespaceName.left(ni)==tmd->getNamespaceDef()->name() && namespaceName.mid(ni+2)==tmd->name();
//printf("notInNS=%d sameNS=%d\n",notInNS,sameNS);
@@ -2665,7 +2677,7 @@ bool getDefs(const QCString &scName,
gd=mmd->getGroupDef();
if (gd && gd->isLinkable()) fd=0; else gd=0;
//printf("Found scoped enum %s fd=%p gd=%p\n",
- // mmd->name().data(),fd,gd);
+ // qPrint(mmd->name()),fd,gd);
return TRUE;
}
}
@@ -2691,7 +2703,7 @@ bool getDefs(const QCString &scName,
findMembersWithSpecificName(mn,args,FALSE,currentFile,checkCV,members);
}
//printf("found %d members\n",members.count());
- if (members.size()!=1 && args && !qstrcmp(args,"()"))
+ if (members.size()!=1 && args=="()")
{
// no exact match found, but if args="()" an arbitrary
// member will do
@@ -2701,8 +2713,8 @@ bool getDefs(const QCString &scName,
{
const auto &mmd_p = *it;
const MemberDef *mmd = mmd_p.get();
- //printf("Found member '%s'\n",mmd->name().data());
- //printf("member is linkable mmd->name()='%s'\n",mmd->name().data());
+ //printf("Found member '%s'\n",qPrint(mmd->name()));
+ //printf("member is linkable mmd->name()='%s'\n",qPrint(mmd->name()));
fd=mmd->getFileDef();
gd=mmd->getGroupDef();
const MemberDef *tmd = mmd->getEnumScope();
@@ -2720,7 +2732,7 @@ bool getDefs(const QCString &scName,
{
if (currentFile)
{
- //printf("multiple results; pick one from file:%s\n", currentFile->name().data());
+ //printf("multiple results; pick one from file:%s\n",qPrint( currentFile->name()));
for (const auto &rmd : members)
{
if (rmd->getFileDef() && rmd->getFileDef()->name() == currentFile->name())
@@ -2769,7 +2781,7 @@ bool getDefs(const QCString &scName,
* - if `cd` is non zero, the scope was a class pointed to by cd.
* - if `nd` is non zero, the scope was a namespace pointed to by nd.
*/
-static bool getScopeDefs(const char *docScope,const char *scope,
+static bool getScopeDefs(const QCString &docScope,const QCString &scope,
ClassDef *&cd, NamespaceDef *&nd)
{
cd=0;nd=0;
@@ -2794,7 +2806,7 @@ static bool getScopeDefs(const char *docScope,const char *scope,
do // for each possible docScope (from largest to and including empty)
{
- QCString fullName=scopeName.copy();
+ QCString fullName=scopeName;
if (scopeOffset>0) fullName.prepend(docScopeName.left(scopeOffset)+"::");
if (((cd=getClass(fullName)) || // normal class
@@ -2823,18 +2835,18 @@ static bool getScopeDefs(const char *docScope,const char *scope,
static bool isLowerCase(QCString &s)
{
+ if (s.isEmpty()) return true;
uchar *p=(uchar*)s.data();
- if (p==0) return TRUE;
int c;
- while ((c=*p++)) if (!islower(c)) return FALSE;
- return TRUE;
+ while ((c=*p++)) if (!islower(c)) return false;
+ return true;
}
/*! Returns an object to reference to given its name and context
* @post return value TRUE implies *resContext!=0 or *resMember!=0
*/
-bool resolveRef(/* in */ const char *scName,
- /* in */ const char *name,
+bool resolveRef(/* in */ const QCString &scName,
+ /* in */ const QCString &name,
/* in */ bool inSeeBlock,
/* out */ const Definition **resContext,
/* out */ const MemberDef **resMember,
@@ -2843,7 +2855,7 @@ bool resolveRef(/* in */ const char *scName,
bool checkScope
)
{
- //printf("resolveRef(scope=%s,name=%s,inSeeBlock=%d)\n",scName,name,inSeeBlock);
+ //printf("resolveRef(scope=%s,name=%s,inSeeBlock=%d)\n",qPrint(scName),qPrint(name),inSeeBlock);
QCString tsName = name;
//bool memberScopeFirst = tsName.find('#')!=-1;
QCString fullName = substitute(tsName,"#","::");
@@ -2881,7 +2893,7 @@ bool resolveRef(/* in */ const char *scName,
return FALSE;
}
- //printf("scName=%s fullName=%s\n",scName,fullName.data());
+ //printf("scName=%s fullName=%s\n",scName,qPrint(fullName));
// check if this is a class or namespace reference
if (scName!=fullName && getScopeDefs(scName,fullName,cd,nd))
@@ -2902,7 +2914,7 @@ bool resolveRef(/* in */ const char *scName,
{
//printf("found scName=%s fullName=%s scName==fullName=%d "
// "inSeeBlock=%d scopePos=%d!\n",
- // scName,fullName.data(),scName==fullName,inSeeBlock,scopePos);
+ // scName,qPrint(fullName),scName==fullName,inSeeBlock,scopePos);
return FALSE;
}
// continue search...
@@ -2943,10 +2955,11 @@ bool resolveRef(/* in */ const char *scName,
const FileDef *fd = 0;
const NamespaceDef *nd = 0;
const GroupDef *gd = 0;
+ const ConceptDef *cnd = 0;
// check if nameStr is a member or global.
//printf("getDefs(scope=%s,name=%s,args=%s checkScope=%d)\n",
- // scopeStr.data(),nameStr.data(),argsStr.data(),checkScope);
+ // qPrint(scopeStr), qPrint(nameStr), qPrint(argsStr),checkScope);
if (getDefs(scopeStr,nameStr,argsStr,
md,cd,fd,nd,gd,
//scopePos==0 && !memberScopeFirst, // forceEmptyScope
@@ -2956,7 +2969,7 @@ bool resolveRef(/* in */ const char *scName,
)
)
{
- //printf("after getDefs checkScope=%d nameStr=%s cd=%p nd=%p\n",checkScope,nameStr.data(),cd,nd);
+ //printf("after getDefs checkScope=%d nameStr=%s cd=%p nd=%p\n",checkScope,qPrint(nameStr),cd,nd);
if (checkScope && md && md->getOuterScope()==Doxygen::globalScope &&
!md->isStrongEnumValue() &&
(!scopeStr.isEmpty() || nameStr.find("::")>0))
@@ -2977,7 +2990,7 @@ bool resolveRef(/* in */ const char *scName,
else if (gd) *resContext=gd;
else { *resContext=0; *resMember=0; return FALSE; }
//printf("member=%s (md=%p) anchor=%s linkable()=%d context=%s\n",
- // md->name().data(),md,md->anchor().data(),md->isLinkable(),(*resContext)->name().data());
+ // qPrint(md->name()), md, qPrint(md->anchor()), md->isLinkable(), qPrint((*resContext)->name()));
return TRUE;
}
else if (inSeeBlock && !nameStr.isEmpty() && (gd=Doxygen::groupLinkedMap->find(nameStr)))
@@ -2985,6 +2998,11 @@ bool resolveRef(/* in */ const char *scName,
*resContext=gd;
return TRUE;
}
+ else if ((cnd=Doxygen::conceptLinkedMap->find(nameStr)))
+ {
+ *resContext=cnd;
+ return TRUE;
+ }
else if (tsName.find('.')!=-1) // maybe a link to a file
{
bool ambig;
@@ -3013,7 +3031,7 @@ bool resolveRef(/* in */ const char *scName,
return FALSE;
}
-QCString linkToText(SrcLangExt lang,const char *link,bool isFileName)
+QCString linkToText(SrcLangExt lang,const QCString &link,bool isFileName)
{
//static bool optimizeOutputJava = Config_getBool(OPTIMIZE_OUTPUT_JAVA);
QCString result=link;
@@ -3107,8 +3125,8 @@ bool generateRef(OutputDocInterface &od,const char *scName,
}
#endif
-bool resolveLink(/* in */ const char *scName,
- /* in */ const char *lr,
+bool resolveLink(/* in */ const QCString &scName,
+ /* in */ const QCString &lr,
/* in */ bool /*inSeeBlock*/,
/* out */ const Definition **resContext,
/* out */ QCString &resAnchor
@@ -3118,12 +3136,13 @@ bool resolveLink(/* in */ const char *scName,
QCString linkRef=lr;
QCString linkRefWithoutTemplates = stripTemplateSpecifiersFromScope(linkRef,FALSE);
- //printf("ResolveLink linkRef=%s\n",lr);
+ //printf("ResolveLink linkRef=%s\n",qPrint(lr));
const FileDef *fd;
const GroupDef *gd;
const PageDef *pd;
const ClassDef *cd;
const DirDef *dir;
+ const ConceptDef *cnd;
const NamespaceDef *nd;
const SectionInfo *si=0;
bool ambig;
@@ -3186,18 +3205,18 @@ bool resolveLink(/* in */ const char *scName,
resAnchor=cd->anchor();
return TRUE;
}
-// else if ((cd=getClass(linkRef+"-g"))) // C# generic link
-// {
-// *resContext=cd;
-// resAnchor=cd->anchor();
-// return TRUE;
-// }
+ else if ((cnd=getConcept(linkRef))) // C++20 concept definition
+ {
+ *resContext=cnd;
+ resAnchor=cnd->anchor();
+ return TRUE;
+ }
else if ((nd=Doxygen::namespaceLinkedMap->find(linkRef)))
{
*resContext=nd;
return TRUE;
}
- else if ((dir=Doxygen::dirLinkedMap->find(QFileInfo(linkRef).absFilePath().utf8()+"/"))
+ else if ((dir=Doxygen::dirLinkedMap->find(FileInfo(linkRef.str()).absFilePath()+"/"))
&& dir->isLinkable()) // TODO: make this location independent like filedefs
{
*resContext=dir;
@@ -3220,19 +3239,19 @@ bool resolveLink(/* in */ const char *scName,
// basis for the link's text.
// returns TRUE if a link could be generated.
-bool generateLink(OutputDocInterface &od,const char *clName,
- const char *lr,bool inSeeBlock,const char *lt)
+bool generateLink(OutputDocInterface &od,const QCString &clName,
+ const QCString &lr,bool inSeeBlock,const QCString &lt)
{
//printf("generateLink(clName=%s,lr=%s,lr=%s)\n",clName,lr,lt);
const Definition *compound = 0;
//PageDef *pageDef=0;
QCString anchor,linkText=linkToText(SrcLangExt_Unknown,lt,FALSE);
- //printf("generateLink linkText=%s\n",linkText.data());
+ //printf("generateLink linkText=%s\n",qPrint(linkText));
if (resolveLink(clName,lr,inSeeBlock,&compound,anchor))
{
if (compound) // link to compound
{
- if (lt==0 && anchor.isEmpty() && /* compound link */
+ if (lt.isEmpty() && anchor.isEmpty() && /* compound link */
compound->definitionType()==Definition::TypeGroup /* is group */
)
{
@@ -3262,17 +3281,17 @@ bool generateLink(OutputDocInterface &od,const char *clName,
}
}
-void generateFileRef(OutputDocInterface &od,const char *name,const char *text)
+void generateFileRef(OutputDocInterface &od,const QCString &name,const QCString &text)
{
//printf("generateFileRef(%s,%s)\n",name,text);
- QCString linkText = text ? text : name;
+ QCString linkText = text.isEmpty() ? text : name;
//FileInfo *fi;
FileDef *fd;
bool ambig;
if ((fd=findFileDef(Doxygen::inputNameLinkedMap,name,ambig)) &&
fd->isLinkable())
// link to documented input file
- od.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),0,linkText);
+ od.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),QCString(),linkText);
else
od.docify(linkText);
}
@@ -3291,10 +3310,10 @@ static Cache<std::string,FindFileCacheElem> g_findFileDefCache(5000);
static std::mutex g_findFileDefMutex;
-FileDef *findFileDef(const FileNameLinkedMap *fnMap,const char *n,bool &ambig)
+FileDef *findFileDef(const FileNameLinkedMap *fnMap,const QCString &n,bool &ambig)
{
ambig=FALSE;
- if (n==0) return 0;
+ if (n.isEmpty()) return 0;
std::lock_guard<std::mutex> lock(g_findFileDefMutex);
@@ -3305,7 +3324,7 @@ FileDef *findFileDef(const FileNameLinkedMap *fnMap,const char *n,bool &ambig)
key+=n;
FindFileCacheElem *cachedResult = g_findFileDefCache.find(key.str());
- //printf("key=%s cachedResult=%p\n",key.data(),cachedResult);
+ //printf("key=%s cachedResult=%p\n",qPrint(key),cachedResult);
if (cachedResult)
{
ambig = cachedResult->isAmbig;
@@ -3317,22 +3336,21 @@ FileDef *findFileDef(const FileNameLinkedMap *fnMap,const char *n,bool &ambig)
cachedResult = g_findFileDefCache.insert(key.str(),FindFileCacheElem(0,FALSE));
}
- QCString name=QDir::cleanDirPath(n).utf8();
+ QCString name=Dir::cleanDirPath(n.str());
QCString path;
int slashPos;
const FileName *fn;
if (name.isEmpty()) goto exit;
- slashPos=QMAX(name.findRev('/'),name.findRev('\\'));
+ slashPos=std::max(name.findRev('/'),name.findRev('\\'));
if (slashPos!=-1)
{
path=name.left(slashPos+1);
name=name.right(name.length()-slashPos-1);
- //printf("path=%s name=%s\n",path.data(),name.data());
}
if (name.isEmpty()) goto exit;
if ((fn=fnMap->find(name)))
{
- //printf("fn->count()=%d\n",fn->count());
+ //printf("fn->size()=%zu\n",fn->size());
if (fn->size()==1)
{
const std::unique_ptr<FileDef> &fd = fn->front();
@@ -3378,12 +3396,12 @@ exit:
//----------------------------------------------------------------------
-QCString showFileDefMatches(const FileNameLinkedMap *fnMap,const char *n)
+QCString showFileDefMatches(const FileNameLinkedMap *fnMap,const QCString &n)
{
QCString result;
QCString name=n;
QCString path;
- int slashPos=QMAX(name.findRev('/'),name.findRev('\\'));
+ int slashPos=std::max(name.findRev('/'),name.findRev('\\'));
if (slashPos!=-1)
{
path=name.left(slashPos+1);
@@ -3405,11 +3423,11 @@ QCString showFileDefMatches(const FileNameLinkedMap *fnMap,const char *n)
//----------------------------------------------------------------------
-QCString substituteKeywords(const QCString &s,const char *title,
- const char *projName,const char *projNum,const char *projBrief)
+QCString substituteKeywords(const QCString &s,const QCString &title,
+ const QCString &projName,const QCString &projNum,const QCString &projBrief)
{
QCString result = s;
- if (title) result = substitute(result,"$title",title);
+ if (!title.isEmpty()) result = substitute(result,"$title",title);
result = substitute(result,"$datetime",dateToString(TRUE));
result = substitute(result,"$date",dateToString(FALSE));
result = substitute(result,"$year",yearToString());
@@ -3487,6 +3505,7 @@ bool hasVisibleRoot(const BaseClassList &bcl)
//----------------------------------------------------------------------
+#if 0
// copies the next UTF8 character from input stream into buffer ids
// returns the size of the character in bytes (or 0 if it is invalid)
// the character itself will be copied as a UTF-8 encoded string to ids.
@@ -3546,17 +3565,17 @@ int getUtf8Char(const char *input,char ids[MAX_UTF8_CHAR_SIZE],CaseModifier modi
}
return inputLen;
}
-
+#endif
// note that this function is not reentrant due to the use of static growBuf!
-QCString escapeCharsInString(const char *name,bool allowDots,bool allowUnderscore)
+QCString escapeCharsInString(const QCString &name,bool allowDots,bool allowUnderscore)
{
+ if (name.isEmpty()) return name;
bool caseSenseNames = Config_getBool(CASE_SENSE_NAMES);
bool allowUnicodeNames = Config_getBool(ALLOW_UNICODE_NAMES);
- if (name==0) return "";
GrowBuf growBuf;
signed char c;
- const char *p=name;
+ const char *p=name.data();
while ((c=*p++)!=0)
{
switch(c)
@@ -3592,20 +3611,20 @@ QCString escapeCharsInString(const char *name,bool allowDots,bool allowUnderscor
default:
if (c<0)
{
- char ids[MAX_UTF8_CHAR_SIZE];
bool doEscape = true;
if (allowUnicodeNames)
{
- int charLen = getUtf8Char(p-1,ids);
+ int charLen = getUTF8CharNumBytes(c);
if (charLen>0)
{
- growBuf.addStr(ids);
- p+=charLen-1;
+ growBuf.addStr(p-1,charLen);
+ p+=charLen;
doEscape = false;
}
}
if (doEscape) // not a valid unicode char or escaping needed
{
+ char ids[5];
unsigned char id = (unsigned char)c;
ids[0]='_';
ids[1]='x';
@@ -3631,11 +3650,12 @@ QCString escapeCharsInString(const char *name,bool allowDots,bool allowUnderscor
return growBuf.get();
}
-QCString unescapeCharsInString(const char *s)
+QCString unescapeCharsInString(const QCString &s)
{
- static bool caseSenseNames = Config_getBool(CASE_SENSE_NAMES);
+ if (s.isEmpty()) return s;
+ bool caseSenseNames = Config_getBool(CASE_SENSE_NAMES);
QCString result;
- const char *p = s;
+ const char *p = s.data();
if (p)
{
char c;
@@ -3710,16 +3730,16 @@ static int g_usedNamesCount=1;
* given its name, which could be a class name with template
* arguments, so special characters need to be escaped.
*/
-QCString convertNameToFile(const char *name,bool allowDots,bool allowUnderscore)
+QCString convertNameToFile(const QCString &name,bool allowDots,bool allowUnderscore)
{
- if (name==0 || name[0]=='\0') return "";
+ if (name.isEmpty()) return name;
static bool shortNames = Config_getBool(SHORT_NAMES);
static bool createSubdirs = Config_getBool(CREATE_SUBDIRS);
QCString result;
if (shortNames) // use short names only
{
std::lock_guard<std::mutex> lock(g_usedNamesMutex);
- auto kv = g_usedNames.find(name);
+ auto kv = g_usedNames.find(name.str());
uint num=0;
if (kv!=g_usedNames.end())
{
@@ -3728,7 +3748,7 @@ QCString convertNameToFile(const char *name,bool allowDots,bool allowUnderscore)
else
{
num = g_usedNamesCount;
- g_usedNames.insert(std::make_pair(name,g_usedNamesCount++));
+ g_usedNames.insert(std::make_pair(name.str(),g_usedNamesCount++));
}
result.sprintf("a%05d",num);
}
@@ -3740,9 +3760,9 @@ QCString convertNameToFile(const char *name,bool allowDots,bool allowUnderscore)
{
// third algorithm based on MD5 hash
uchar md5_sig[16];
- QCString sigStr(33);
+ char sigStr[33];
MD5Buffer((const unsigned char *)result.data(),resultLen,md5_sig);
- MD5SigToString(md5_sig,sigStr.rawData(),33);
+ MD5SigToString(md5_sig,sigStr);
result=result.left(128-32)+sigStr;
}
}
@@ -3758,23 +3778,22 @@ QCString convertNameToFile(const char *name,bool allowDots,bool allowUnderscore)
result.prepend(QCString().sprintf("d%x/d%02x/",l1Dir,l2Dir));
}
- //printf("*** convertNameToFile(%s)->%s\n",name,result.data());
+ //printf("*** convertNameToFile(%s)->%s\n",name,qPrint(result));
return result;
}
-QCString relativePathToRoot(const char *name)
+QCString relativePathToRoot(const QCString &name)
{
QCString result;
if (Config_getBool(CREATE_SUBDIRS))
{
- if (name==0)
+ if (name.isEmpty())
{
return REL_PATH_TO_ROOT;
}
else
{
- QCString n = name;
- int i = n.findRev('/');
+ int i = name.findRev('/');
if (i!=-1)
{
result=REL_PATH_TO_ROOT;
@@ -3784,7 +3803,7 @@ QCString relativePathToRoot(const char *name)
return result;
}
-void createSubDirs(QDir &d)
+void createSubDirs(const Dir &d)
{
if (Config_getBool(CREATE_SUBDIRS))
{
@@ -3794,17 +3813,17 @@ void createSubDirs(QDir &d)
{
QCString subdir;
subdir.sprintf("d%x",l1);
- if (!d.exists(subdir) && !d.mkdir(subdir))
+ if (!d.exists(subdir.str()) && !d.mkdir(subdir.str()))
{
- term("Failed to create output directory '%s'\n",subdir.data());
+ term("Failed to create output directory '%s'\n",qPrint(subdir));
}
for (l2=0;l2<256;l2++)
{
QCString subsubdir;
subsubdir.sprintf("d%x/d%02x",l1,l2);
- if (!d.exists(subsubdir) && !d.mkdir(subsubdir))
+ if (!d.exists(subsubdir.str()) && !d.mkdir(subsubdir.str()))
{
- term("Failed to create output directory '%s'\n",subsubdir.data());
+ term("Failed to create output directory '%s'\n",qPrint(subsubdir));
}
}
}
@@ -3823,7 +3842,7 @@ void extractNamespaceName(const QCString &scopeName,
NamespaceDef *nd = 0;
if (!clName.isEmpty() && (nd=getResolvedNamespace(clName)) && getClass(clName)==0)
{ // the whole name is a namespace (and not a class)
- namespaceName=nd->name().copy();
+ namespaceName=nd->name();
className.resize(0);
goto done;
}
@@ -3831,11 +3850,11 @@ void extractNamespaceName(const QCString &scopeName,
while (p>=0 && (i=clName.findRev("::",p))!=-1)
// see if the first part is a namespace (and not a class)
{
- //printf("Trying %s\n",clName.left(i).data());
+ //printf("Trying %s\n",qPrint(clName.left(i)));
if (i>0 && (nd=getResolvedNamespace(clName.left(i))) && getClass(clName.left(i))==0)
{
//printf("found!\n");
- namespaceName=nd->name().copy();
+ namespaceName=nd->name();
className=clName.right(clName.length()-i-2);
goto done;
}
@@ -3844,18 +3863,18 @@ void extractNamespaceName(const QCString &scopeName,
//printf("not found!\n");
// not found, so we just have to guess.
- className=scopeName.copy();
+ className=scopeName;
namespaceName.resize(0);
done:
if (className.isEmpty() && !namespaceName.isEmpty() && !allowEmptyClass)
{
// class and namespace with the same name, correct to return the class.
- className=namespaceName.copy();
+ className=namespaceName;
namespaceName.resize(0);
}
- //printf("extractNamespace '%s' => '%s|%s'\n",scopeName.data(),
- // className.data(),namespaceName.data());
+ //printf("extractNamespace '%s' => '%s|%s'\n",qPrint(scopeName),
+ // qPrint(className),qPrint(namespaceName));
if (/*className.right(2)=="-g" ||*/ className.right(2)=="-p")
{
className = className.left(className.length()-2);
@@ -3865,7 +3884,7 @@ done:
QCString insertTemplateSpecifierInScope(const QCString &scope,const QCString &templ)
{
- QCString result=scope.copy();
+ QCString result=scope;
if (!templ.isEmpty() && scope.find('<')==-1)
{
int si,pi=0;
@@ -3875,7 +3894,7 @@ QCString insertTemplateSpecifierInScope(const QCString &scope,const QCString &te
((cd=getClass(scope.left(si)))==0 || cd->templateArguments().empty())
)
{
- //printf("Tried '%s'\n",(scope.left(si)+templ).data());
+ //printf("Tried '%s'\n",qPrint((scope.left(si)+templ)));
pi=si+2;
}
if (si==-1) // not nested => append template specifier
@@ -3888,7 +3907,7 @@ QCString insertTemplateSpecifierInScope(const QCString &scope,const QCString &te
}
}
//printf("insertTemplateSpecifierInScope('%s','%s')=%s\n",
- // scope.data(),templ.data(),result.data());
+ // qPrint(scope),qPrint(templ),qPrint(result));
return result;
}
@@ -3896,7 +3915,7 @@ QCString insertTemplateSpecifierInScope(const QCString &scope,const QCString &te
/*! Strips the scope from a name. Examples: A::B will return A
* and A<T>::B<N::C<D> > will return A<T>.
*/
-QCString stripScope(const char *name)
+QCString stripScope(const QCString &name)
{
QCString result = name;
int l=result.length();
@@ -3916,7 +3935,7 @@ QCString stripScope(const char *name)
{
case ':':
// only exit in the case of ::
- //printf("stripScope(%s)=%s\n",name,result.right(l-p-1).data());
+ //printf("stripScope(%s)=%s\n",name,qPrint(result.right(l-p-1)));
if (p>0 && result.at(p-1)==':' && (count==0 || skipBracket))
{
return result.right(l-p-1);
@@ -3989,11 +4008,11 @@ QCString stripScope(const char *name)
}
/*! Converts a string to a HTML id string */
-QCString convertToId(const char *s)
+QCString convertToId(const QCString &s)
{
- if (s==0) return "";
+ if (s.isEmpty()) return s;
GrowBuf growBuf;
- const char *p=s;
+ const char *p=s.data();
char c;
bool first=TRUE;
while ((c=*p++))
@@ -4022,18 +4041,18 @@ QCString convertToId(const char *s)
* that an id cannot have a digit at the first position. To overcome problems
* with double labels we always place an "a" in front
*/
-QCString correctId(QCString s)
+QCString correctId(const QCString &s)
{
if (s.isEmpty()) return s;
return "a" + s;
}
/*! Converts a string to an XML-encoded string */
-QCString convertToXML(const char *s, bool keepEntities)
+QCString convertToXML(const QCString &s, bool keepEntities)
{
- if (s==0) return "";
+ if (s.isEmpty()) return s;
GrowBuf growBuf;
- const char *p=s;
+ const char *p=s.data();
char c;
while ((c=*p++))
{
@@ -4080,13 +4099,13 @@ QCString convertToXML(const char *s, bool keepEntities)
}
/*! Converts a string to an DocBook-encoded string */
-QCString convertToDocBook(const char *s)
+QCString convertToDocBook(const QCString &s)
{
- if (s==0) return "";
+ if (s.isEmpty()) return s;
GrowBuf growBuf;
const unsigned char *q;
int cnt;
- const unsigned char *p=(const unsigned char *)s;
+ const unsigned char *p=(const unsigned char *)s.data();
char c;
while ((c=*p++))
{
@@ -4144,11 +4163,11 @@ QCString convertToDocBook(const char *s)
}
/*! Converts a string to a HTML-encoded string */
-QCString convertToHtml(const char *s,bool keepEntities)
+QCString convertToHtml(const QCString &s,bool keepEntities)
{
- if (s==0) return "";
+ if (s.isEmpty()) return s;
GrowBuf growBuf;
- const char *p=s;
+ const char *p=s.data();
char c;
while ((c=*p++))
{
@@ -4204,11 +4223,11 @@ QCString convertToHtml(const char *s,bool keepEntities)
return growBuf.get();
}
-QCString convertToJSString(const char *s)
+QCString convertToJSString(const QCString &s)
{
- if (s==0) return "";
+ if (s.isEmpty()) return s;
GrowBuf growBuf;
- const char *p=s;
+ const char *p=s.data();
char c;
while ((c=*p++))
{
@@ -4223,11 +4242,11 @@ QCString convertToJSString(const char *s)
return convertCharEntitiesToUTF8(growBuf.get());
}
-QCString convertToPSString(const char *s)
+QCString convertToPSString(const QCString &s)
{
- if (s==0) return "";
+ if (s.isEmpty()) return s;
GrowBuf growBuf;
- const char *p=s;
+ const char *p=s.data();
char c;
while ((c=*p++))
{
@@ -4244,19 +4263,18 @@ QCString convertToPSString(const char *s)
QCString convertToLaTeX(const QCString &s,bool insideTabbing,bool keepSpaces)
{
- QGString result;
- FTextStream t(&result);
+ TextStream t;
filterLatexString(t,s,insideTabbing,false,false,false,keepSpaces);
- return result.data();
+ return t.str();
}
-QCString convertCharEntitiesToUTF8(const char *str)
+QCString convertCharEntitiesToUTF8(const QCString &str)
{
- if (str==0) return QCString();
+ if (str.isEmpty()) return QCString();
- std::string s = str;
+ std::string s = str.data();
static const reg::Ex re(R"(&\a\w*;)");
reg::Iterator it(s,re);
reg::Iterator end;
@@ -4272,7 +4290,7 @@ QCString convertCharEntitiesToUTF8(const char *str)
{
growBuf.addStr(s.substr(i,p-i));
}
- std::string entity = match.str();
+ QCString entity(match.str());
DocSymbol::SymType symType = HtmlEntityMapper::instance()->name2sym(entity);
const char *code=0;
if (symType!=DocSymbol::Sym_Unknown && (code=HtmlEntityMapper::instance()->utf8(symType)))
@@ -4287,7 +4305,7 @@ QCString convertCharEntitiesToUTF8(const char *str)
}
growBuf.addStr(s.substr(i));
growBuf.addChar(0);
- //printf("convertCharEntitiesToUTF8(%s)->%s\n",s.data(),growBuf.get());
+ //printf("convertCharEntitiesToUTF8(%s)->%s\n",qPrint(s),growBuf.get());
return growBuf.get();
}
@@ -4307,7 +4325,7 @@ void addMembersToMemberGroup(MemberList *ml,
const Definition *context)
{
ASSERT(context!=0);
- //printf("addMemberToMemberGroup() context=%s\n",context->name().data());
+ //printf("addMemberToMemberGroup() context=%s\n",qPrint(context->name()));
if (ml==0) return;
struct MoveMemberInfo
@@ -4418,7 +4436,7 @@ void addMembersToMemberGroup(MemberList *ml,
* class \a name and a template argument list \a templSpec. If -1 is returned
* there are no more matches.
*/
-int extractClassNameFromType(const char *type,int &pos,QCString &name,QCString &templSpec,SrcLangExt lang)
+int extractClassNameFromType(const QCString &type,int &pos,QCString &name,QCString &templSpec,SrcLangExt lang)
{
static reg::Ex re_norm(R"(\a[\w:]*)");
static reg::Ex re_fortran(R"(\a[\w:()=]*)");
@@ -4426,8 +4444,8 @@ int extractClassNameFromType(const char *type,int &pos,QCString &name,QCString &
name.resize(0);
templSpec.resize(0);
- if (type==0) return -1;
- int typeLen=qstrlen(type);
+ if (type.isEmpty()) return -1;
+ int typeLen=(int)type.length();
if (typeLen>0)
{
if (lang == SrcLangExt_Fortran)
@@ -4438,7 +4456,7 @@ int extractClassNameFromType(const char *type,int &pos,QCString &name,QCString &
re = &re_fortran;
}
}
- std::string s = type;
+ std::string s = type.str();
reg::Iterator it(s,*re,(int)pos);
reg::Iterator end;
@@ -4482,13 +4500,13 @@ int extractClassNameFromType(const char *type,int &pos,QCString &name,QCString &
pos=i+l;
}
//printf("extractClassNameFromType([in] type=%s,[out] pos=%d,[out] name=%s,[out] templ=%s)=TRUE i=%d\n",
- // type,pos,name.data(),templSpec.data(),i);
+ // type,pos,qPrint(name),qPrint(templSpec),i);
return i;
}
}
pos = typeLen;
//printf("extractClassNameFromType([in] type=%s,[out] pos=%d,[out] name=%s,[out] templ=%s)=FALSE\n",
- // type,pos,name.data(),templSpec.data());
+ // type,pos,qPrint(name),qPrint(templSpec));
return -1;
}
@@ -4515,7 +4533,7 @@ QCString normalizeNonTemplateArgumentsInString(
size_t i = match.position();
size_t l = match.length();
result += s.substr(pi,i-pi);
- std::string n = match.str();
+ QCString n(match.str());
bool found=FALSE;
for (const Argument &formArg : formalArgs)
{
@@ -4529,7 +4547,7 @@ QCString normalizeNonTemplateArgumentsInString(
{
// try to resolve the type
SymbolResolver resolver;
- const ClassDef *cd = resolver.resolveClass(context,n.c_str());
+ const ClassDef *cd = resolver.resolveClass(context,n);
if (cd)
{
result+=cd->name();
@@ -4546,7 +4564,7 @@ QCString normalizeNonTemplateArgumentsInString(
pi=i+l;
}
result+=s.substr(pi);
- //printf("normalizeNonTemplateArgumentInString(%s)=%s\n",name.data(),result.data());
+ //printf("normalizeNonTemplateArgumentInString(%s)=%s\n",qPrint(name),qPrint(result));
return removeRedundantWhiteSpace(result);
}
@@ -4558,16 +4576,17 @@ QCString normalizeNonTemplateArgumentsInString(
* prevent recursive substitution.
*/
QCString substituteTemplateArgumentsInString(
- const std::string &name,
+ const QCString &nm,
const ArgumentList &formalArgs,
const std::unique_ptr<ArgumentList> &actualArgs)
{
//printf("substituteTemplateArgumentsInString(name=%s formal=%s actualArg=%s)\n",
- // name.data(),argListToString(formalArgs).data(),argListToString(actualArgs).data());
- if (formalArgs.empty()) return name;
- std::string result;
+ // qPrint(name),qPrint(argListToString(formalArgs)),qPrint(argListToString(actualArgs)));
+ if (formalArgs.empty()) return nm;
+ QCString result;
static const reg::Ex re(R"(\a[\w:]*)");
+ std::string name = nm.str();
reg::Iterator it(name,re);
reg::Iterator end;
size_t p=0;
@@ -4578,7 +4597,7 @@ QCString substituteTemplateArgumentsInString(
size_t i = match.position();
size_t l = match.length();
if (i>p) result += name.substr(p,i-p);
- std::string n = match.str();
+ QCString n(match.str());
ArgumentList::iterator actIt;
if (actualArgs)
{
@@ -4612,9 +4631,9 @@ QCString substituteTemplateArgumentsInString(
if (formArg.type=="class" || formArg.type=="typename" || formArg.type.left(8)=="template")
{
//printf("n=%s formArg->type='%s' formArg->name='%s' formArg->defval='%s'\n",
- // n.data(),formArg->type.data(),formArg->name.data(),formArg->defval.data());
+ // qPrint(n),qPrint(formArg->type),qPrint(formArg->name),qPrint(formArg->defval));
//printf(">> n='%s' formArg->name='%s' actArg->type='%s' actArg->name='%s'\n",
- // n.data(),formArg.name.data(),actIt!=actualArgs.end() ? actIt->type.data() : "",actIt!=actualArgs.end() ? actIt->name.data() : ""
+ // qPrint(n),qPrint(formArg.name),actIt!=actualArgs.end() ? qPrint(actIt->type) : "",actIt!=actualArgs.end() ? qPrint(actIt->name) : ""
// );
if (formArg.name==n && actualArgs && actIt!=actualArgs->end() && !actArg.type.isEmpty()) // base class is a template argument
{
@@ -4643,20 +4662,20 @@ QCString substituteTemplateArgumentsInString(
else if (formArg.name==n &&
(actualArgs==nullptr || actIt==actualArgs->end()) &&
!formArg.defval.isEmpty() &&
- formArg.defval!=name /* to prevent recursion */
+ formArg.defval!=nm /* to prevent recursion */
)
{
- result += substituteTemplateArgumentsInString(formArg.defval.str(),formalArgs,actualArgs)+" ";
+ result += substituteTemplateArgumentsInString(formArg.defval,formalArgs,actualArgs)+" ";
found=TRUE;
}
}
else if (formArg.name==n &&
(actualArgs==nullptr || actIt==actualArgs->end()) &&
!formArg.defval.isEmpty() &&
- formArg.defval!=name /* to prevent recursion */
+ formArg.defval!=nm /* to prevent recursion */
)
{
- result += substituteTemplateArgumentsInString(formArg.defval.str(),formalArgs,actualArgs)+" ";
+ result += substituteTemplateArgumentsInString(formArg.defval,formalArgs,actualArgs)+" ";
found=TRUE;
}
if (actualArgs && actIt!=actualArgs->end())
@@ -4672,8 +4691,8 @@ QCString substituteTemplateArgumentsInString(
}
result+=name.substr(p);
//printf(" Inheritance relation %s -> %s\n",
- // name.data(),result.data());
- return QCString(result).stripWhiteSpace();
+ // qPrint(name),qPrint(result));
+ return result.stripWhiteSpace();
}
@@ -4695,7 +4714,7 @@ QCString stripTemplateSpecifiersFromScope(const QCString &fullName,
int l=fullName.length();
while (i!=-1)
{
- //printf("1:result+=%s\n",fullName.mid(p,i-p).data());
+ //printf("1:result+=%s\n",qPrint(fullName.mid(p,i-p)));
int e=i+1;
int count=1;
int round=0;
@@ -4718,22 +4737,22 @@ QCString stripTemplateSpecifiersFromScope(const QCString &fullName,
// we only do the parent scope, so we stop here if needed
result+=fullName.mid(p,i-p);
- //printf(" trying %s\n",(result+fullName.mid(i,e-i)).data());
+ //printf(" trying %s\n",qPrint(result+fullName.mid(i,e-i)));
if (getClass(result+fullName.mid(i,e-i))!=0)
{
result+=fullName.mid(i,e-i);
- //printf(" 2:result+=%s\n",fullName.mid(i,e-i-1).data());
+ //printf(" 2:result+=%s\n",qPrint(fullName.mid(i,e-i-1)));
}
else if (pLastScopeStripped)
{
- //printf(" last stripped scope '%s'\n",fullName.mid(i,e-i).data());
+ //printf(" last stripped scope '%s'\n",qPrint(fullName.mid(i,e-i)));
*pLastScopeStripped=fullName.mid(i,e-i);
}
p=e;
i=fullName.find('<',p);
}
result+=fullName.right(l-p);
- //printf("3:result+=%s\n",fullName.right(l-p).data());
+ //printf("3:result+=%s\n",qPrint(fullName.right(l-p)));
return result;
}
@@ -4768,7 +4787,7 @@ QCString mergeScopes(const QCString &leftScope,const QCString &rightScope)
if (found) return result;
// case leftScope=="A" rightScope=="B" => result = "A::B"
- result=leftScope.copy();
+ result=leftScope;
if (!result.isEmpty() && !rightScope.isEmpty()) result+="::";
result+=rightScope;
return result;
@@ -4822,15 +4841,15 @@ int getScopeFragment(const QCString &s,int p,int *l)
}
found:
*l=sp-p;
- //printf("getScopeFragment(%s,%d)=%s\n",s.data(),p,s.mid(p,*l).data());
+ //printf("getScopeFragment(%s,%d)=%s\n",qPrint(s),p,qPrint(s.mid(p,*l)));
return p;
}
//----------------------------------------------------------------------------
-PageDef *addRelatedPage(const char *name,const QCString &ptitle,
+PageDef *addRelatedPage(const QCString &name,const QCString &ptitle,
const QCString &doc,
- const char *fileName,
+ const QCString &fileName,
int docLine,
int startLine,
const RefItemVector &sli,
@@ -4848,11 +4867,11 @@ PageDef *addRelatedPage(const char *name,const QCString &ptitle,
if (!xref && !title.isEmpty() && pd->title()!=title)
{
warn(fileName,startLine,"multiple use of page label '%s', (other occurrence: %s, line: %d)",
- name,pd->docFile().data(),pd->getStartBodyLine());
+ qPrint(name),qPrint(pd->docFile()),pd->getStartBodyLine());
}
// append documentation block to the page.
pd->setDocumentation(doc,fileName,docLine);
- //printf("Adding page docs '%s' pi=%p name=%s\n",doc.data(),pd,name);
+ //printf("Adding page docs '%s' pi=%p name=%s\n",qPrint(doc),pd,name);
// append (x)refitems to the page.
pd->setRefItems(sli);
}
@@ -4864,7 +4883,7 @@ PageDef *addRelatedPage(const char *name,const QCString &ptitle,
else if (baseName.right(Doxygen::htmlFileExtension.length())==Doxygen::htmlFileExtension)
baseName=baseName.left(baseName.length()-Doxygen::htmlFileExtension.length());
- //printf("Appending page '%s'\n",baseName.data());
+ //printf("Appending page '%s'\n",qPrint(baseName));
pd = Doxygen::pageLinkedMap->add(baseName,
std::unique_ptr<PageDef>(
createPageDef(fileName,docLine,baseName,doc,title)));
@@ -4906,11 +4925,11 @@ PageDef *addRelatedPage(const char *name,const QCString &ptitle,
{
if (si->lineNr() != -1)
{
- warn(orgFile,line,"multiple use of section label '%s', (first occurrence: %s, line %d)",pd->name().data(),si->fileName().data(),si->lineNr());
+ warn(orgFile,line,"multiple use of section label '%s', (first occurrence: %s, line %d)",qPrint(pd->name()),qPrint(si->fileName()),si->lineNr());
}
else
{
- warn(orgFile,line,"multiple use of section label '%s', (first occurrence: %s)",pd->name().data(),si->fileName().data());
+ warn(orgFile,line,"multiple use of section label '%s', (first occurrence: %s)",qPrint(pd->name()),qPrint(si->fileName()));
}
}
else
@@ -4918,10 +4937,10 @@ PageDef *addRelatedPage(const char *name,const QCString &ptitle,
SectionManager::instance().add(pd->name(),
file,-1,pd->title(),SectionType::Page,0,pd->getReference());
//printf("si->label='%s' si->definition=%s si->fileName='%s'\n",
- // si->label.data(),si->definition?si->definition->name().data():"<none>",
- // si->fileName.data());
- //printf(" SectionInfo: sec=%p sec->fileName=%s\n",si,si->fileName.data());
- //printf("Adding section key=%s si->fileName=%s\n",pageName.data(),si->fileName.data());
+ // qPrint(si->label),si->definition?si->definition->name().data():"<none>",
+ // qPrint(si->fileName));
+ //printf(" SectionInfo: sec=%p sec->fileName=%s\n",si,qPrint(si->fileName));
+ //printf("Adding section key=%s si->fileName=%s\n",qPrint(pageName),qPrint(si->fileName));
}
}
}
@@ -4931,11 +4950,11 @@ PageDef *addRelatedPage(const char *name,const QCString &ptitle,
//----------------------------------------------------------------------------
void addRefItem(const RefItemVector &sli,
- const char *key,
- const char *prefix, const char *name,const char *title,const char *args,const Definition *scope)
+ const QCString &key, const QCString &prefix, const QCString &name,
+ const QCString &title, const QCString &args, const Definition *scope)
{
//printf("addRefItem(sli=%d,key=%s,prefix=%s,name=%s,title=%s,args=%s)\n",(int)sli.size(),key,prefix,name,title,args);
- if (key && key[0]!='@') // check for @ to skip anonymous stuff (see bug427012)
+ if (!key.isEmpty() && key[0]!='@') // check for @ to skip anonymous stuff (see bug427012)
{
for (RefItem *item : sli)
{
@@ -4967,7 +4986,7 @@ bool recursivelyAddGroupListToTitle(OutputList &ol,const Definition *d,bool root
{
ol.writeString(" &raquo; ");
}
- ol.writeObjectLink(gd->getReference(),gd->getOutputFileBase(),0,gd->groupTitle());
+ ol.writeObjectLink(gd->getReference(),gd->getOutputFileBase(),QCString(),gd->groupTitle());
}
if (root)
{
@@ -4984,12 +5003,12 @@ void addGroupListToTitle(OutputList &ol,const Definition *d)
recursivelyAddGroupListToTitle(ol,d,TRUE);
}
-void filterLatexString(FTextStream &t,const char *str,
+void filterLatexString(TextStream &t,const QCString &str,
bool insideTabbing,bool insidePre,bool insideItem,bool insideTable,bool keepSpaces)
{
- if (str==0) return;
+ if (str.isEmpty()) return;
//if (strlen(str)<2) stackTrace();
- const unsigned char *p=(const unsigned char *)str;
+ const unsigned char *p=(const unsigned char *)str.data();
const unsigned char *q;
int cnt;
unsigned char c;
@@ -5136,13 +5155,12 @@ void filterLatexString(FTextStream &t,const char *str,
}
}
-QCString latexEscapeLabelName(const char *s)
+QCString latexEscapeLabelName(const QCString &s)
{
- if (s==0) return "";
- QGString result;
- QCString tmp(qstrlen(s)+1);
- FTextStream t(&result);
- const char *p=s;
+ if (s.isEmpty()) return s;
+ QCString tmp(s.length()+1);
+ TextStream t;
+ const char *p=s.data();
char c;
int i;
while ((c=*p++))
@@ -5177,16 +5195,15 @@ QCString latexEscapeLabelName(const char *s)
break;
}
}
- return result.data();
+ return t.str();
}
-QCString latexEscapeIndexChars(const char *s)
+QCString latexEscapeIndexChars(const QCString &s)
{
- if (s==0) return "";
- QGString result;
- QCString tmp(qstrlen(s)+1);
- FTextStream t(&result);
- const char *p=s;
+ if (s.isEmpty()) return s;
+ QCString tmp(s.length()+1);
+ TextStream t;
+ const char *p=s.data();
char c;
int i;
while ((c=*p++))
@@ -5212,7 +5229,7 @@ QCString latexEscapeIndexChars(const char *s)
p++;
}
tmp[i]=0;
- filterLatexString(t,tmp.data(),
+ filterLatexString(t,tmp,
true, // insideTabbing
false, // insidePre
false, // insideItem
@@ -5222,15 +5239,14 @@ QCString latexEscapeIndexChars(const char *s)
break;
}
}
- return result.data();
+ return t.str();
}
-QCString latexEscapePDFString(const char *s)
+QCString latexEscapePDFString(const QCString &s)
{
- if (s==0) return "";
- QGString result;
- FTextStream t(&result);
- const char *p=s;
+ if (s.isEmpty()) return s;
+ TextStream t;
+ const char *p=s.data();
char c;
while ((c=*p++))
{
@@ -5247,15 +5263,14 @@ QCString latexEscapePDFString(const char *s)
break;
}
}
- return result.data();
+ return t.str();
}
-QCString latexFilterURL(const char *s)
+QCString latexFilterURL(const QCString &s)
{
- if (s==0) return "";
- QGString result;
- FTextStream t(&result);
- const signed char *p=(const signed char*)s;
+ if (s.isEmpty()) return s;
+ TextStream t;
+ const signed char *p=(const signed char*)s.data();
char c;
while ((c=*p++))
{
@@ -5277,14 +5292,14 @@ QCString latexFilterURL(const char *s)
break;
}
}
- return result.data();
+ return t.str();
}
static std::mutex g_rtfFormatMutex;
static std::unordered_map<std::string,std::string> g_tagMap;
static QCString g_nextTag( "AAAAAAAAAA" );
-QCString rtfFormatBmkStr(const char *name)
+QCString rtfFormatBmkStr(const QCString &name)
{
std::lock_guard<std::mutex> lock(g_rtfFormatMutex);
@@ -5293,7 +5308,7 @@ QCString rtfFormatBmkStr(const char *name)
// supplied, and keep track of the correspondence
// between names and strings.
QCString tag = g_nextTag;
- auto result = g_tagMap.insert( std::make_pair(name, g_nextTag) );
+ auto result = g_tagMap.insert( std::make_pair(name.str(), g_nextTag.str()) );
if (result.second) // new item was added
{
@@ -5314,7 +5329,7 @@ QCString rtfFormatBmkStr(const char *name)
}
}
- //printf("Name = %s RTF_tag = %s\n",name,(*tag).data());
+ //printf("Name = %s RTF_tag = %s\n",name,qPrint(*tag)));
return tag;
}
@@ -5323,28 +5338,27 @@ bool checkExtension(const char *fName, const char *ext)
return (QCString(fName).right(QCString(ext).length())==ext);
}
-QCString addHtmlExtensionIfMissing(const char *fName)
+QCString addHtmlExtensionIfMissing(const QCString &fName)
{
- if (fName==0) return fName;
- const char *p = strchr(fName,'.');
- if (p==nullptr) // no extension
+ if (fName.isEmpty()) return fName;
+ if (fName.find('.')==-1) // no extension
{
return QCString(fName)+Doxygen::htmlFileExtension;
}
return fName;
}
-QCString stripExtensionGeneral(const char *fName, const char *ext)
+QCString stripExtensionGeneral(const QCString &fName, const QCString &ext)
{
QCString result=fName;
- if (result.right(QCString(ext).length())==QCString(ext))
+ if (result.right(ext.length())==ext)
{
- result=result.left(result.length()-QCString(ext).length());
+ result=result.left(result.length()-ext.length());
}
return result;
}
-QCString stripExtension(const char *fName)
+QCString stripExtension(const QCString &fName)
{
return stripExtensionGeneral(fName, Doxygen::htmlFileExtension);
}
@@ -5356,10 +5370,10 @@ void replaceNamespaceAliases(QCString &scope,int i)
QCString ns = scope.left(i);
if (!ns.isEmpty())
{
- auto it = Doxygen::namespaceAliasMap.find(ns.data());
+ auto it = Doxygen::namespaceAliasMap.find(ns.str());
if (it!=Doxygen::namespaceAliasMap.end())
{
- scope=it->second.data()+scope.right(scope.length()-i);
+ scope=QCString(it->second)+scope.right(scope.length()-i);
i=static_cast<int>(it->second.length());
}
}
@@ -5367,7 +5381,7 @@ void replaceNamespaceAliases(QCString &scope,int i)
}
}
-QCString stripPath(const char *s)
+QCString stripPath(const QCString &s)
{
QCString result=s;
int i=result.findRev('/');
@@ -5384,11 +5398,11 @@ QCString stripPath(const char *s)
}
/** returns \c TRUE iff string \a s contains word \a w */
-bool containsWord(const char *str,const char *word)
+bool containsWord(const QCString &str,const char *word)
{
- if (str==0 || word==0) return false;
+ if (str.isEmpty() || word==0) return false;
static const reg::Ex re(R"(\a+)");
- std::string s = str;
+ std::string s = str.str();
for (reg::Iterator it(s,re) ; it!=reg::Iterator() ; ++it)
{
if (it->str()==word) return true;
@@ -5445,8 +5459,8 @@ bool findAndRemoveWord(QCString &sentence,const char *word)
*/
QCString stripLeadingAndTrailingEmptyLines(const QCString &s,int &docLine)
{
+ if (s.isEmpty()) return QCString();
const char *p = s.data();
- if (p==0) return 0;
// search for leading empty lines
int i=0,li=-1,l=s.length();
@@ -5477,8 +5491,8 @@ QCString stripLeadingAndTrailingEmptyLines(const QCString &s,int &docLine)
// return substring
if (bi==-1) bi=l;
if (li==-1) li=0;
- if (bi<=li) return 0; // only empty lines
- //printf("docLine='%s' len=%d li=%d bi=%d\n",s.data(),s.length(),li,bi);
+ if (bi<=li) return QCString(); // only empty lines
+ //printf("docLine='%s' len=%d li=%d bi=%d\n",qPrint(s),s.length(),li,bi);
return s.mid(li,bi-li);
}
@@ -5538,17 +5552,17 @@ bool updateLanguageMapping(const QCString &extension,const QCString &language)
{
g_extLookup.erase(it); // language was already register for this ext
}
- //printf("registering extension %s\n",extName.data());
- g_extLookup.insert(std::make_pair(extName,parserId));
+ //printf("registering extension %s\n",qPrint(extName));
+ g_extLookup.insert(std::make_pair(extName.str(),parserId));
if (!Doxygen::parserManager->registerExtension(extName,p->parserName))
{
err("Failed to assign extension %s to parser %s for language %s\n",
- extName.data(),p->parserName,language.data());
+ extName.data(),p->parserName,qPrint(language));
}
else
{
//msg("Registered extension %s to language parser %s...\n",
- // extName.data(),language.data());
+ // extName.data(),qPrint(language));
}
return TRUE;
}
@@ -5624,18 +5638,18 @@ void addCodeOnlyMappings()
SrcLangExt getLanguageFromFileName(const QCString& fileName)
{
- QFileInfo fi(fileName);
- // we need only the part after the last ".", newer implementations of QFileInfo have 'suffix()' for this.
- QCString extName = fi.extension(FALSE).lower().data();
+ FileInfo fi(fileName.str());
+ // we need only the part after the last ".", newer implementations of FileInfo have 'suffix()' for this.
+ QCString extName = QCString(fi.extension(FALSE)).lower();
if (extName.isEmpty()) extName=".no_extension";
if (extName.at(0)!='.') extName.prepend(".");
auto it = g_extLookup.find(extName.str());
if (it!=g_extLookup.end()) // listed extension
{
- //printf("getLanguageFromFileName(%s)=%x\n",fi.extension().data(),*pVal);
+ //printf("getLanguageFromFileName(%s)=%x\n",qPrint(fi.extension()),*pVal);
return (SrcLangExt)it->second;
}
- //printf("getLanguageFromFileName(%s) not found!\n",fileName.data());
+ //printf("getLanguageFromFileName(%s) not found!\n",qPrint(fileName));
return SrcLangExt_Cpp; // not listed => assume C-ish language.
}
@@ -5650,7 +5664,7 @@ QCString getFileNameExtension(QCString fn)
//--------------------------------------------------------------------------
static MemberDef *getMemberFromSymbol(const Definition *scope,const FileDef *fileScope,
- const char *n)
+ const QCString &n)
{
if (scope==0 ||
(scope->definitionType()!=Definition::TypeClass &&
@@ -5678,7 +5692,7 @@ static MemberDef *getMemberFromSymbol(const Definition *scope,const FileDef *fil
replaceNamespaceAliases(explicitScopePart,explicitScopePart.length());
name = name.mid(qualifierIndex+2);
}
- //printf("explicitScopePart=%s\n",explicitScopePart.data());
+ //printf("explicitScopePart=%s\n",qPrint(explicitScopePart));
int minDistance = 10000;
MemberDef *bestMatch = 0;
@@ -5694,7 +5708,7 @@ static MemberDef *getMemberFromSymbol(const Definition *scope,const FileDef *fil
{
minDistance = distance;
bestMatch = toMemberDef(d);
- //printf("new best match %s distance=%d\n",bestMatch->qualifiedName().data(),distance);
+ //printf("new best match %s distance=%d\n",qPrint(bestMatch->qualifiedName()),distance);
}
}
}
@@ -5702,7 +5716,7 @@ static MemberDef *getMemberFromSymbol(const Definition *scope,const FileDef *fil
}
/*! Returns true iff the given name string appears to be a typedef in scope. */
-bool checkIfTypedef(const Definition *scope,const FileDef *fileScope,const char *n)
+bool checkIfTypedef(const Definition *scope,const FileDef *fileScope,const QCString &n)
{
MemberDef *bestMatch = getMemberFromSymbol(scope,fileScope,n);
@@ -5712,66 +5726,14 @@ bool checkIfTypedef(const Definition *scope,const FileDef *fileScope,const char
return FALSE;
}
-const char *writeUtf8Char(FTextStream &t,const char *s)
-{
- uchar c=(uchar)*s++;
- t << (char)c;
- if (c>=0x80) // multibyte character
- {
- if (((uchar)c&0xE0)==0xC0)
- {
- t << *s++; // 11xx.xxxx: >=2 byte character
- }
- if (((uchar)c&0xF0)==0xE0)
- {
- t << *s++; // 111x.xxxx: >=3 byte character
- }
- if (((uchar)c&0xF8)==0xF0)
- {
- t << *s++; // 1111.xxxx: >=4 byte character
- }
- if (((uchar)c&0xFC)==0xF8)
- {
- t << *s++; // 1111.1xxx: >=5 byte character
- }
- if (((uchar)c&0xFE)==0xFC)
- {
- t << *s++; // 1111.1xxx: 6 byte character
- }
- }
- return s;
-}
-
-int nextUtf8CharPosition(const QCString &utf8Str,uint len,uint startPos)
+static int nextUTF8CharPosition(const QCString &utf8Str,uint len,uint startPos)
{
- int bytes=1;
if (startPos>=len) return len;
uchar c = (uchar)utf8Str[startPos];
- if (c>=0x80) // multibyte utf-8 character
- {
- if (((uchar)c&0xE0)==0xC0)
- {
- bytes+=1; // 11xx.xxxx: >=2 byte character
- }
- if (((uchar)c&0xF0)==0xE0)
- {
- bytes+=2; // 111x.xxxx: >=3 byte character
- }
- if (((uchar)c&0xF8)==0xF0)
- {
- bytes+=3; // 1111.xxxx: >=4 byte character
- }
- if (((uchar)c&0xFC)==0xF8)
- {
- bytes+=4; // 1111.1xxx: >=5 byte character
- }
- if (((uchar)c&0xFE)==0xFC)
- {
- bytes+=5; // 1111.1xxx: 6 byte character
- }
- }
- else if (c=='&') // skip over character entities
+ int bytes=getUTF8CharNumBytes(c);
+ if (c=='&') // skip over character entities
{
+ bytes=1;
int (*matcher)(int) = 0;
c = (uchar)utf8Str[startPos+bytes];
if (c=='#') // numerical entity?
@@ -5811,29 +5773,28 @@ int nextUtf8CharPosition(const QCString &utf8Str,uint len,uint startPos)
QCString parseCommentAsText(const Definition *scope,const MemberDef *md,
const QCString &doc,const QCString &fileName,int lineNr)
{
- QGString s;
- if (doc.isEmpty()) return s.data();
- //printf("parseCommentAsText(%s)\n",doc.data());
- FTextStream t(&s);
+ if (doc.isEmpty()) return "";
+ //printf("parseCommentAsText(%s)\n",qPrint(doc));
+ TextStream t;
DocNode *root = validatingParseDoc(fileName,lineNr,
(Definition*)scope,(MemberDef*)md,doc,FALSE,FALSE,
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
TextDocVisitor *visitor = new TextDocVisitor(t);
root->accept(visitor);
delete visitor;
delete root;
- QCString result = convertCharEntitiesToUTF8(s.data()).stripWhiteSpace();
+ QCString result = convertCharEntitiesToUTF8(t.str().c_str()).stripWhiteSpace();
int i=0;
int charCnt=0;
int l=result.length();
- while ((i=nextUtf8CharPosition(result,l,i))<l)
+ while ((i=nextUTF8CharPosition(result,l,i))<l)
{
charCnt++;
if (charCnt>=80) break;
}
if (charCnt>=80) // try to truncate the string
{
- while ((i=nextUtf8CharPosition(result,l,i))<l && charCnt<100)
+ while ((i=nextUTF8CharPosition(result,l,i))<l && charCnt<100)
{
charCnt++;
if (result.at(i)==',' ||
@@ -5853,7 +5814,7 @@ QCString parseCommentAsText(const Definition *scope,const MemberDef *md,
//--------------------------------------------------------------------------------------
static QCString expandAliasRec(StringUnorderedSet &aliasesProcessed,
- const std::string &s,bool allowRecursion=FALSE);
+ const QCString &s,bool allowRecursion=FALSE);
struct Marker
{
@@ -5898,7 +5859,7 @@ static int findEndOfCommand(const char *s)
static QCString replaceAliasArguments(StringUnorderedSet &aliasesProcessed,
const QCString &aliasValue,const QCString &argList)
{
- //printf("----- replaceAliasArguments(val=[%s],args=[%s])\n",aliasValue.data(),argList.data());
+ //printf("----- replaceAliasArguments(val=[%s],args=[%s])\n",qPrint(aliasValue),qPrint(argList));
// first make a list of arguments from the comma separated argument list
std::vector<QCString> args;
@@ -5936,7 +5897,7 @@ static QCString replaceAliasArguments(StringUnorderedSet &aliasesProcessed,
insideMarkerId = false;
int markerLen = i-markerStart;
markerList.push_back(Marker(markerStart-1,
- atoi(aliasValue.mid(markerStart,markerLen)),
+ aliasValue.mid(markerStart,markerLen).toInt(),
markerLen+1));
}
if (c=='\\' && (pc=='@' || pc=='\\')) // found escaped backslash
@@ -5962,62 +5923,61 @@ static QCString replaceAliasArguments(StringUnorderedSet &aliasesProcessed,
{
const Marker &m = markerList.at(i);
result+=aliasValue.mid(p,m.pos-p);
- //printf("part before marker %d: '%s'\n",i,aliasValue.mid(p,m->pos-p).data());
+ //printf("part before marker %d: '%s'\n",i,qPrint(aliasValue.mid(p,m->pos-p)));
if (m.number>0 && m.number<=(int)args.size()) // valid number
{
- result+=expandAliasRec(aliasesProcessed,args.at(m.number-1).str(),TRUE);
+ result+=expandAliasRec(aliasesProcessed,args.at(m.number-1),TRUE);
//printf("marker index=%d pos=%d number=%d size=%d replacement %s\n",i,m->pos,m->number,m->size,
- // args.at(m->number-1)->data());
+ // qPrint(args.at(m->number-1)));
}
p=m.pos+m.size; // continue after the marker
}
result+=aliasValue.right(l-p); // append remainder
- //printf("string after replacement of markers: '%s'\n",result.data());
+ //printf("string after replacement of markers: '%s'\n",qPrint(result));
// expand the result again
result = substitute(result,"\\{","{");
result = substitute(result,"\\}","}");
- result = expandAliasRec(aliasesProcessed,substitute(result,"\\,",",").str());
+ result = expandAliasRec(aliasesProcessed,substitute(result,"\\,",","));
return result;
}
static QCString escapeCommas(const QCString &s)
{
- QGString result;
+ if (s.isEmpty()) return s;
+ TextStream result;
const char *p = s.data();
char c,pc=0;
while ((c=*p++))
{
if (c==',' && pc!='\\')
{
- result+="\\,";
+ result << "\\,";
}
else
{
- result+=c;
+ result << c;
}
pc=c;
}
- result+='\0';
- //printf("escapeCommas: '%s'->'%s'\n",s.data(),result.data());
- return result.data();
+ //printf("escapeCommas: '%s'->'%s'\n",qPrint(s),qPrint(result));
+ return result.str();
}
-static QCString expandAliasRec(StringUnorderedSet &aliasesProcessed,const std::string &s,bool allowRecursion)
+static QCString expandAliasRec(StringUnorderedSet &aliasesProcessed,const QCString &s,bool allowRecursion)
{
- std::string result;
+ QCString result;
static const reg::Ex re(R"([\\@](\a\w*))");
- reg::Iterator re_it(s,re);
- reg::Iterator end;
-
- int p = 0;
- for ( ; re_it!=end ; ++re_it)
+ std::string str = s.str();
+ reg::Match match;
+ size_t p = 0;
+ while (search(str,match,re,p))
{
- const auto &match = *re_it;
- int i = (int)match.position();
- int l = (int)match.length();
- if (i>p) result+=s.substr(p,i-p);
+ size_t i = match.position();
+ size_t l = match.length();
+ if (i>p) result+=s.mid(p,i-p);
+
QCString args = extractAliasArgs(s,i+l);
bool hasArgs = !args.isEmpty(); // found directly after command
int argsLen = args.length();
@@ -6030,7 +5990,6 @@ static QCString expandAliasRec(StringUnorderedSet &aliasesProcessed,const std::s
cmd += QCString().sprintf("{%d}",numArgs); // alias name + {n}
}
auto it = Doxygen::aliasMap.find(cmd.str());
-
if (numArgs>1 && it==Doxygen::aliasMap.end())
{ // in case there is no command with numArgs parameters, but there is a command with 1 parameter,
// we also accept all text as the argument of that command (so you don't have to escape commas)
@@ -6042,20 +6001,20 @@ static QCString expandAliasRec(StringUnorderedSet &aliasesProcessed,const std::s
}
}
//printf("Found command s='%s' cmd='%s' numArgs=%d args='%s' aliasText=%s\n",
- // s.data(),cmd.data(),numArgs,args.data(),it!=Doxygen::aliasMap.end()?it->second.c_str():"<none>");
+ // s.data(),cmd.data(),numArgs,args.data(),aliasText?aliasText->data():"<none>");
if ((allowRecursion || aliasesProcessed.find(cmd.str())==aliasesProcessed.end()) &&
it!=Doxygen::aliasMap.end()) // expand the alias
{
//printf("is an alias!\n");
if (!allowRecursion) aliasesProcessed.insert(cmd.str());
- QCString val = it->second;
+ QCString val(it->second);
if (hasArgs)
{
val = replaceAliasArguments(aliasesProcessed,val,args);
//printf("replace '%s'->'%s' args='%s'\n",
// aliasText->data(),val.data(),args.data());
}
- result+=expandAliasRec(aliasesProcessed,val.str()).str();
+ result+=expandAliasRec(aliasesProcessed,val);
if (!allowRecursion) aliasesProcessed.erase(cmd.str());
p=i+l;
if (hasArgs) p+=argsLen+2;
@@ -6067,14 +6026,14 @@ static QCString expandAliasRec(StringUnorderedSet &aliasesProcessed,const std::s
p=i+l;
}
}
- result+=s.substr(p);
+ result+=s.right(s.length()-p);
//printf("expandAliases '%s'->'%s'\n",s.data(),result.data());
return result;
}
-int countAliasArguments(const QCString argList)
+int countAliasArguments(const QCString &argList)
{
int count=1;
int l = argList.length();
@@ -6115,7 +6074,7 @@ QCString extractAliasArgs(const QCString &args,int pos)
if (bc==0)
{
- //printf("extractAliasArgs('%s')->'%s'\n",args.data(),args.mid(pos+1,i-pos-1).data());
+ //printf("extractAliasArgs('%s')->'%s'\n",qPrint(args),qPrint(args.mid(pos+1,i-pos-1)));
return args.mid(pos+1,i-pos-1);
}
}
@@ -6123,13 +6082,13 @@ QCString extractAliasArgs(const QCString &args,int pos)
return "";
}
-QCString resolveAliasCmd(const QCString aliasCmd)
+QCString resolveAliasCmd(const QCString &aliasCmd)
{
QCString result;
StringUnorderedSet aliasesProcessed;
- //printf("Expanding: '%s'\n",aliasCmd.data());
- result = expandAliasRec(aliasesProcessed,aliasCmd.str());
- //printf("Expanding result: '%s'->'%s'\n",aliasCmd.data(),result.data());
+ //printf("Expanding: '%s'\n",qPrint(aliasCmd));
+ result = expandAliasRec(aliasesProcessed,aliasCmd);
+ //printf("Expanding result: '%s'->'%s'\n",qPrint(aliasCmd),qPrint(result));
return result;
}
@@ -6140,9 +6099,9 @@ std::string expandAlias(const std::string &aliasName,const std::string &aliasVal
// avoid expanding this command recursively
aliasesProcessed.insert(aliasName);
// expand embedded commands
- //printf("Expanding: '%s'->'%s'\n",aliasName.data(),aliasValue.data());
+ //printf("Expanding: '%s'->'%s'\n",qPrint(aliasName),qPrint(aliasValue));
result = expandAliasRec(aliasesProcessed,aliasValue.c_str());
- //printf("Expanding result: '%s'->'%s'\n",aliasName.data(),result.data());
+ //printf("Expanding result: '%s'->'%s'\n",qPrint(aliasName),qPrint(result));
return result.str();
}
@@ -6160,7 +6119,7 @@ void writeTypeConstraints(OutputList &ol,const Definition *d,const ArgumentList
ol.endConstraintType();
ol.startConstraintDocs();
ol.generateDoc(d->docFile(),d->docLine(),d,0,a.docs,TRUE,FALSE,
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
ol.endConstraintDocs();
}
ol.endConstraintList();
@@ -6195,23 +6154,23 @@ void stackTrace()
#endif
}
-static int transcodeCharacterBuffer(const char *fileName,BufStr &srcBuf,int size,
- const char *inputEncoding,const char *outputEncoding)
+static int transcodeCharacterBuffer(const QCString &fileName,BufStr &srcBuf,int size,
+ const QCString &inputEncoding,const QCString &outputEncoding)
{
- if (inputEncoding==0 || outputEncoding==0) return size;
+ if (inputEncoding.isEmpty() || outputEncoding.isEmpty()) return size;
if (qstricmp(inputEncoding,outputEncoding)==0) return size;
- void *cd = portable_iconv_open(outputEncoding,inputEncoding);
+ void *cd = portable_iconv_open(outputEncoding.data(),inputEncoding.data());
if (cd==(void *)(-1))
{
term("unsupported character conversion: '%s'->'%s': %s\n"
"Check the INPUT_ENCODING setting in the config file!\n",
- inputEncoding,outputEncoding,strerror(errno));
+ qPrint(inputEncoding),qPrint(outputEncoding),strerror(errno));
}
int tmpBufSize=size*4+1;
BufStr tmpBuf(tmpBufSize);
size_t iLeft=size;
size_t oLeft=tmpBufSize;
- char *srcPtr = srcBuf.data();
+ const char *srcPtr = srcBuf.data();
char *dstPtr = tmpBuf.data();
uint newSize=0;
if (!portable_iconv(cd, &srcPtr, &iLeft, &dstPtr, &oLeft))
@@ -6219,42 +6178,41 @@ static int transcodeCharacterBuffer(const char *fileName,BufStr &srcBuf,int size
newSize = tmpBufSize-(int)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());
+ //printf("iconv: input size=%d output size=%d\n[%s]\n",size,newSize,qPrint(srcBuf));
}
else
{
term("%s: failed to translate characters from %s to %s: check INPUT_ENCODING\n",
- fileName,inputEncoding,outputEncoding);
+ qPrint(fileName),qPrint(inputEncoding),qPrint(outputEncoding));
}
portable_iconv_close(cd);
return newSize;
}
//! read a file name \a fileName and optionally filter and transcode it
-bool readInputFile(const char *fileName,BufStr &inBuf,bool filter,bool isSourceCode)
+bool readInputFile(const QCString &fileName,BufStr &inBuf,bool filter,bool isSourceCode)
{
// try to open file
int size=0;
- //uint oldPos = dest.curPos();
- //printf(".......oldPos=%d\n",oldPos);
- QFileInfo fi(fileName);
+ FileInfo fi(fileName.str());
if (!fi.exists()) return FALSE;
QCString filterName = getFileFilter(fileName,isSourceCode);
if (filterName.isEmpty() || !filter)
{
- QFile f(fileName);
- if (!f.open(IO_ReadOnly))
+ std::ifstream f(fileName.str(),std::ifstream::in | std::ifstream::binary);
+ if (!f.is_open())
{
- err("could not open file %s\n",fileName);
+ err("could not open file %s\n",qPrint(fileName));
return FALSE;
}
- size=fi.size();
+ size=(int)fi.size();
// read the file
inBuf.skip(size);
- if (f.readBlock(inBuf.data()/*+oldPos*/,size)!=size)
+ f.read(inBuf.data(),size);
+ if (f.fail())
{
- err("problems while reading file %s\n",fileName);
+ err("problems while reading file %s\n",qPrint(fileName));
return FALSE;
}
}
@@ -6265,7 +6223,7 @@ bool readInputFile(const char *fileName,BufStr &inBuf,bool filter,bool isSourceC
FILE *f=Portable::popen(cmd,"r");
if (!f)
{
- err("could not execute filter %s\n",filterName.data());
+ err("could not execute filter %s\n",qPrint(filterName));
return FALSE;
}
const int bufSize=1024;
@@ -6317,22 +6275,23 @@ bool readInputFile(const char *fileName,BufStr &inBuf,bool filter,bool isSourceC
// and translate CR's
size=inBuf.curPos()-start;
int newSize=filterCRLF(inBuf.data()+start,size);
- //printf("filter char at %p size=%d newSize=%d\n",dest.data()+oldPos,size,newSize);
+ //printf("filter char at %p size=%d newSize=%d\n",qPrint(dest)+oldPos,size,newSize);
if (newSize!=size) // we removed chars
{
inBuf.shrink(newSize); // resize the array
- //printf(".......resizing from %d to %d result=[%s]\n",oldPos+size,oldPos+newSize,dest.data());
+ //printf(".......resizing from %d to %d result=[%s]\n",oldPos+size,oldPos+newSize,qPrint(dest));
}
inBuf.addChar(0);
return TRUE;
}
// Replace %word by word in title
-QCString filterTitle(const std::string &title)
+QCString filterTitle(const QCString &title)
{
std::string tf;
+ std::string t = title.str();
static const reg::Ex re(R"(%[a-z_A-Z]+)");
- reg::Iterator it(title,re);
+ reg::Iterator it(t,re);
reg::Iterator end;
size_t p = 0;
for (; it!=end ; ++it)
@@ -6340,11 +6299,11 @@ QCString filterTitle(const std::string &title)
const auto &match = *it;
size_t i = match.position();
size_t l = match.length();
- if (i>p) tf+=title.substr(p,i-p);
+ if (i>p) tf+=t.substr(p,i-p);
tf+=match.str().substr(1); // skip %
p=i+l;
}
- tf+=title.substr(p);
+ tf+=t.substr(p);
return tf;
}
@@ -6352,7 +6311,7 @@ QCString filterTitle(const std::string &title)
// returns TRUE if the name of the file represented by 'fi' matches
// one of the file patterns in the 'patList' list.
-bool patternMatch(const QFileInfo &fi,const StringVector &patList)
+bool patternMatch(const FileInfo &fi,const StringVector &patList)
{
bool caseSenseNames = Config_getBool(CASE_SENSE_NAMES);
bool found = FALSE;
@@ -6365,9 +6324,9 @@ bool patternMatch(const QFileInfo &fi,const StringVector &patList)
if (!patList.empty())
{
- std::string fn = fi.fileName().data();
- std::string fp = fi.filePath().data();
- std::string afp= fi.absFilePath().data();
+ std::string fn = fi.fileName();
+ std::string fp = fi.filePath();
+ std::string afp= fi.absFilePath();
for (auto pattern: patList)
{
@@ -6380,14 +6339,16 @@ bool patternMatch(const QFileInfo &fi,const StringVector &patList)
{
pattern = QCString(pattern).lower().str();
fn = QCString(fn).lower().str();
- fp = QCString(fn).lower().str();
- afp = QCString(fn).lower().str();
+ fp = QCString(fp).lower().str();
+ afp = QCString(afp).lower().str();
}
reg::Ex re(pattern,reg::Ex::Mode::Wildcard);
- found = re.isValid() && (reg::match(fn,re) || reg::match(fp,re) || reg::match(afp,re));
+ found = re.isValid() && (reg::match(fn,re) ||
+ (fn!=fp && reg::match(fp,re)) ||
+ (fn!=afp && fp!=afp && reg::match(afp,re)));
if (found) break;
//printf("Matching '%s' against pattern '%s' found=%d\n",
- // fi->fileName().data(),pattern.data(),found);
+ // qPrint(fi->fileName()),qPrint(pattern),found);
}
}
}
@@ -6434,23 +6395,17 @@ QCString externalRef(const QCString &relPath,const QCString &ref,bool href)
/** Writes the intensity only bitmap represented by \a data as an image to
* directory \a dir using the colors defined by HTML_COLORSTYLE_*.
*/
-void writeColoredImgData(const char *dir,ColoredImgDataItem data[])
+void writeColoredImgData(const QCString &dir,ColoredImgDataItem data[])
{
static int hue = Config_getInt(HTML_COLORSTYLE_HUE);
static int sat = Config_getInt(HTML_COLORSTYLE_SAT);
static int gamma = Config_getInt(HTML_COLORSTYLE_GAMMA);
while (data->name)
{
- QCString fileName;
- fileName=(QCString)dir+"/"+data->name;
- QFile f(fileName);
- if (f.open(IO_WriteOnly))
- {
- ColoredImage img(data->width,data->height,data->content,data->alpha,
- sat,hue,gamma);
- img.save(fileName);
- }
- else
+ QCString fileName = dir+"/"+data->name;
+ ColoredImage img(data->width,data->height,data->content,data->alpha,
+ sat,hue,gamma);
+ if (!img.save(fileName))
{
fprintf(stderr,"Warning: Cannot open file %s for writing\n",data->name);
}
@@ -6464,11 +6419,11 @@ void writeColoredImgData(const char *dir,ColoredImgDataItem data[])
* valid color, based on the intensity represented by hex number AA
* and the current HTML_COLORSTYLE_* settings.
*/
-QCString replaceColorMarkers(const char *str)
+QCString replaceColorMarkers(const QCString &str)
{
- if (str==0) return QCString();
+ if (str.isEmpty()) return QCString();
std::string result;
- std::string s=str;
+ std::string s=str.str();
static const reg::Ex re(R"(##[0-9A-Fa-f][0-9A-Fa-f])");
reg::Iterator it(s,re);
reg::Iterator end;
@@ -6505,7 +6460,7 @@ QCString replaceColorMarkers(const char *str)
colStr[5]=hex[blue>>4];
colStr[6]=hex[blue&0xf];
colStr[7]=0;
- //printf("replacing %s->%s (level=%d)\n",lumStr.data(),colStr,level);
+ //printf("replacing %s->%s (level=%d)\n",qPrint(lumStr),colStr,level);
result+=colStr;
p=i+l;
}
@@ -6518,38 +6473,19 @@ QCString replaceColorMarkers(const char *str)
*/
bool copyFile(const QCString &src,const QCString &dest)
{
- QFile sf(src);
- if (sf.open(IO_ReadOnly))
+ if (!Dir().copy(src.str(),dest.str()))
{
- QFileInfo fi(src);
- QFile df(dest);
- if (df.open(IO_WriteOnly))
- {
- char *buffer = new char[fi.size()];
- sf.readBlock(buffer,fi.size());
- df.writeBlock(buffer,fi.size());
- df.flush();
- delete[] buffer;
- }
- else
- {
- err("could not write to file %s\n",dest.data());
- return FALSE;
- }
- }
- else
- {
- err("could not open user specified file %s\n",src.data());
- return FALSE;
+ err("could not copy file %s to %s\n",qPrint(src),qPrint(dest));
+ return false;
}
- return TRUE;
+ return true;
}
/** Returns the section of text, in between a pair of markers.
* Full lines are returned, excluding the lines on which the markers appear.
* \sa routine lineBlock
*/
-QCString extractBlock(const QCString text,const QCString marker)
+QCString extractBlock(const QCString &text,const QCString &marker)
{
QCString result;
int p=0,i;
@@ -6587,14 +6523,14 @@ QCString extractBlock(const QCString text,const QCString marker)
{
l2=lp;
}
- //printf("text=[%s]\n",text.mid(l1,l2-l1).data());
+ //printf("text=[%s]\n",qPrint(text.mid(l1,l2-l1)));
return l2>l1 ? text.mid(l1,l2-l1) : QCString();
}
/** Returns the line number of the line following the line with the marker.
* \sa routine extractBlock
*/
-int lineBlock(const QCString text,const QCString marker)
+int lineBlock(const QCString &text,const QCString &marker)
{
int result = 1;
int p=0,i;
@@ -6697,7 +6633,7 @@ QCString stripIndentation(const QCString &s)
{
if (s.isEmpty()) return s; // empty string -> we're done
- //printf("stripIndentation:\n%s\n------\n",s.data());
+ //printf("stripIndentation:\n%s\n------\n",qPrint(s));
// compute minimum indentation over all lines
const char *p=s.data();
char c;
@@ -6721,7 +6657,7 @@ QCString stripIndentation(const QCString &s)
if (minIndent==0) return s;
// remove minimum indentation for each line
- QGString result;
+ TextStream result;
p=s.data();
indent=0;
while ((c=*p++))
@@ -6729,7 +6665,7 @@ QCString stripIndentation(const QCString &s)
if (c=='\n') // start of new line
{
indent=0;
- result+=c;
+ result << c;
}
else if (indent<minIndent) // skip until we reach minIndent
{
@@ -6739,7 +6675,7 @@ QCString stripIndentation(const QCString &s)
int i=newIndent;
while (i>minIndent) // if a tab crosses the minIndent boundary fill the rest with spaces
{
- result+=' ';
+ result << ' ';
i--;
}
indent=newIndent;
@@ -6751,12 +6687,11 @@ QCString stripIndentation(const QCString &s)
}
else // copy anything until the end of the line
{
- result+=c;
+ result << c;
}
}
- result+='\0';
- return result.data();
+ return result.str();
}
// strip up to \a indentationLevel spaces from each line in \a doc (excluding the first line)
@@ -6805,7 +6740,7 @@ void stripIndentation(QCString &doc,const int indentationLevel)
break;
}
}
- doc.resize(dst-doc.data()+1);
+ doc.resize(static_cast<uint>(dst-doc.data())+1);
}
@@ -6823,6 +6758,7 @@ bool fileVisibleInIndex(const FileDef *fd,bool &genSourceFile)
//--------------------------------------------------------------------------------------
+#if 0
/*! @brief Get one unicode character as an unsigned integer from utf-8 string
*
* @param s utf-8 encoded string
@@ -6887,6 +6823,9 @@ uint getUtf8CodeToUpper( const QCString& s, int idx )
const uint v = getUtf8Code( s, idx );
return v < 0x7f ? toupper( v ) : v;
}
+#endif
+
+
//--------------------------------------------------------------------------------------
//
@@ -6902,14 +6841,34 @@ bool namespaceHasNestedNamespace(const NamespaceDef *nd)
return false;
}
+bool namespaceHasNestedConcept(const NamespaceDef *nd)
+{
+ for (const auto &cnd : nd->getNamespaces())
+ {
+ if (namespaceHasNestedConcept(cnd))
+ {
+ //printf("<namespaceHasVisibleChild(%s,includeClasses=%d): case2\n",qPrint(nd->name()),includeClasses);
+ return true;
+ }
+ }
+ for (const auto &cnd : nd->getConcepts())
+ {
+ if (cnd->isLinkableInProject())
+ {
+ return true;
+ }
+ }
+ return false;
+}
+
bool namespaceHasNestedClass(const NamespaceDef *nd,bool filterClasses,ClassDef::CompoundType ct)
{
- //printf(">namespaceHasVisibleChild(%s,includeClasses=%d)\n",nd->name().data(),includeClasses);
+ //printf(">namespaceHasVisibleChild(%s,includeClasses=%d)\n",qPrint(nd->name()),includeClasses);
for (const auto &cnd : nd->getNamespaces())
{
if (namespaceHasNestedClass(cnd,filterClasses,ct))
{
- //printf("<namespaceHasVisibleChild(%s,includeClasses=%d): case2\n",nd->name().data(),includeClasses);
+ //printf("<namespaceHasVisibleChild(%s,includeClasses=%d): case2\n",qPrint(nd->name()),includeClasses);
return TRUE;
}
}
@@ -6935,7 +6894,7 @@ bool namespaceHasNestedClass(const NamespaceDef *nd,bool filterClasses,ClassDef:
{
if (cd->isLinkableInProject() && cd->templateMaster()==0)
{
- //printf("<namespaceHasVisibleChild(%s,includeClasses=%d): case3\n",nd->name().data(),includeClasses);
+ //printf("<namespaceHasVisibleChild(%s,includeClasses=%d): case3\n",qPrint(nd->name()),includeClasses);
return TRUE;
}
}
@@ -7194,32 +7153,34 @@ QCString getDotImageExtension()
return i==-1 ? imgExt : imgExt.left(i);
}
-bool openOutputFile(const char *outFile,QFile &f)
+bool openOutputFile(const QCString &outFile,std::ofstream &f)
{
+ assert(!f.is_open());
bool fileOpened=FALSE;
- bool writeToStdout=(outFile[0]=='-' && outFile[1]=='\0');
+ bool writeToStdout=outFile=="-";
if (writeToStdout) // write to stdout
{
- fileOpened = f.open(IO_WriteOnly,stdout);
+ f.basic_ios<char>::rdbuf(std::cout.rdbuf());
+ fileOpened = true;
}
else // write to file
{
- QFileInfo fi(outFile);
+ FileInfo fi(outFile.str());
if (fi.exists()) // create a backup
{
- QDir dir=fi.dir();
- QFileInfo backup(fi.fileName()+".bak");
+ Dir dir;
+ FileInfo backup(fi.fileName()+".bak");
if (backup.exists()) // remove existing backup
dir.remove(backup.fileName());
dir.rename(fi.fileName(),fi.fileName()+".bak");
}
- f.setName(outFile);
- fileOpened = f.open(IO_WriteOnly|IO_Translate);
+ f.open(outFile.str(),std::ofstream::out | std::ofstream::binary);
+ fileOpened = f.is_open();
}
return fileOpened;
}
-void writeExtraLatexPackages(FTextStream &t)
+void writeExtraLatexPackages(TextStream &t)
{
// User-specified packages
const StringVector &extraPackages = Config_getList(EXTRA_PACKAGES);
@@ -7237,7 +7198,7 @@ void writeExtraLatexPackages(FTextStream &t)
}
}
-void writeLatexSpecialFormulaChars(FTextStream &t)
+void writeLatexSpecialFormulaChars(TextStream &t)
{
unsigned char minus[4]; // Superscript minus
char *pminus = (char *)minus;
@@ -7265,7 +7226,7 @@ void writeLatexSpecialFormulaChars(FTextStream &t)
//------------------------------------------------------
// simplified way to know if this is fixed form
-bool recognizeFixedForm(const char* contents, FortranFormat format)
+bool recognizeFixedForm(const QCString &contents, FortranFormat format)
{
int column=0;
bool skipLine=FALSE;
@@ -7273,10 +7234,12 @@ bool recognizeFixedForm(const char* contents, FortranFormat format)
if (format == FortranFormat_Fixed) return TRUE;
if (format == FortranFormat_Free) return FALSE;
- for(int i=0;;i++) {
+ for (int i=0;;i++)
+ {
column++;
- switch(contents[i]) {
+ switch(contents[i])
+ {
case '\n':
column=0;
skipLine=FALSE;
@@ -7310,7 +7273,7 @@ bool recognizeFixedForm(const char* contents, FortranFormat format)
FortranFormat convertFileNameFortranParserCode(QCString fn)
{
QCString ext = getFileNameExtension(fn);
- QCString parserName = Doxygen::parserManager->getParserName(ext.data());
+ QCString parserName = Doxygen::parserManager->getParserName(ext);
if (parserName == "fortranfixed") return FortranFormat_Fixed;
else if (parserName == "fortranfree") return FortranFormat_Free;
@@ -7320,18 +7283,18 @@ FortranFormat convertFileNameFortranParserCode(QCString fn)
//------------------------------------------------------------------------
/// Clear a text block \a s from \a begin to \a end markers
-QCString clearBlock(const char *s,const char *begin,const char *end)
+QCString clearBlock(const QCString &s,const QCString &begin,const QCString &end)
{
- if (s==0 || begin==0 || end==0) return s;
+ if (s.isEmpty() || begin.isEmpty() || end.isEmpty()) return s;
const char *p, *q;
- int beginLen = qstrlen(begin);
- int endLen = qstrlen(end);
+ int beginLen = (int)begin.length();
+ int endLen = (int)end.length();
int resLen = 0;
- for (p=s; (q=strstr(p,begin))!=0; p=q+endLen)
+ for (p=s.data(); (q=strstr(p,begin.data()))!=0; p=q+endLen)
{
resLen+=(int)(q-p);
p=q+beginLen;
- if ((q=strstr(p,end))==0)
+ if ((q=strstr(p,end.data()))==0)
{
resLen+=beginLen;
break;
@@ -7342,15 +7305,15 @@ QCString clearBlock(const char *s,const char *begin,const char *end)
QCString result(resLen+1);
char *r;
- for (r=result.rawData(), p=s; (q=strstr(p,begin))!=0; p=q+endLen)
+ for (r=result.rawData(), p=s.data(); (q=strstr(p,begin.data()))!=0; p=q+endLen)
{
int l = (int)(q-p);
memcpy(r,p,l);
r+=l;
p=q+beginLen;
- if ((q=strstr(p,end))==0)
+ if ((q=strstr(p,end.data()))==0)
{
- memcpy(r,begin,beginLen);
+ memcpy(r,begin.data(),beginLen);
r+=beginLen;
break;
}
@@ -7428,7 +7391,7 @@ QCString removeEmptyLines(const QCString &s)
}
}
out.addChar('\0');
- //printf("removeEmptyLines(%s)=%s\n",s.data(),out.data());
+ //printf("removeEmptyLines(%s)=%s\n",qPrint(s),qPrint(out));
return out.data();
}
@@ -7484,3 +7447,17 @@ int findIndex(const std::string &s,const reg::Ex &re)
return reg::search(s,match,re) ? (int)match.position() : -1;
}
+/// create a string where the string in the vector are joined by the given delimiter
+std::string join(const StringVector &sv,const std::string &delimiter)
+{
+ std::string result;
+ bool first=true;
+ for (const auto &s : sv)
+ {
+ if (!first) result+=delimiter;
+ first=false;
+ result+=s;
+ }
+ return result;
+}
+
diff --git a/src/util.h b/src/util.h
index 1d98f8b..67a2cbf 100644
--- a/src/util.h
+++ b/src/util.h
@@ -1,8 +1,6 @@
/******************************************************************************
*
- *
- *
- * Copyright (C) 1997-2015 by Dimitri van Heesch.
+ * Copyright (C) 1997-2021 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
@@ -26,6 +24,7 @@
#include <unordered_map>
#include <algorithm>
#include <functional>
+#include <fstream>
#include <ctype.h>
#include "types.h"
@@ -36,6 +35,8 @@
#include "namespacedef.h"
#include "outputgen.h"
#include "regex.h"
+#include "dir.h"
+#include "conceptdef.h"
//--------------------------------------------------------------------
@@ -52,13 +53,9 @@ class GroupDef;
struct TagInfo;
class PageDef;
class SectionInfo;
-class QDir;
class Definition;
class BufStr;
-class QFileInfo;
-class QStrList;
-class FTextStream;
-class QFile;
+class FileInfo;
//--------------------------------------------------------------------
@@ -67,10 +64,10 @@ class TextGeneratorIntf
{
public:
virtual ~TextGeneratorIntf() {}
- virtual void writeString(const char *,bool) const = 0;
+ virtual void writeString(const QCString &,bool) const = 0;
virtual void writeBreak(int indent) const = 0;
- virtual void writeLink(const char *extRef,const char *file,
- const char *anchor,const char *text
+ virtual void writeLink(const QCString &extRef,const QCString &file,
+ const QCString &anchor,const QCString &text
) const = 0;
};
@@ -80,10 +77,10 @@ class TextGeneratorOLImpl : public TextGeneratorIntf
public:
virtual ~TextGeneratorOLImpl() {}
TextGeneratorOLImpl(OutputDocInterface &od);
- void writeString(const char *s,bool keepSpaces) const;
+ void writeString(const QCString &s,bool keepSpaces) const;
void writeBreak(int indent) const;
- void writeLink(const char *extRef,const char *file,
- const char *anchor,const char *text
+ void writeLink(const QCString &extRef,const QCString &file,
+ const QCString &anchor,const QCString &text
) const;
private:
OutputDocInterface &m_od;
@@ -100,20 +97,20 @@ void linkifyText(const TextGeneratorIntf &ol,
const Definition *scope,
const FileDef *fileScope,
const Definition *self,
- const char *text,
+ const QCString &text,
bool autoBreak=FALSE,
bool external=TRUE,
bool keepSpaces=FALSE,
int indentLevel=0
);
-QCString fileToString(const char *name,bool filter=FALSE,bool isSourceCode=FALSE);
+QCString fileToString(const QCString &name,bool filter=FALSE,bool isSourceCode=FALSE);
QCString dateToString(bool);
bool getDefs(const QCString &scopeName,
const QCString &memberName,
- const char *,
+ const QCString &args,
const MemberDef *&md,
const ClassDef *&cd,
const FileDef *&fd,
@@ -124,10 +121,10 @@ bool getDefs(const QCString &scopeName,
bool checkCV=FALSE
);
-QCString getFileFilter(const char* name,bool isSourceCode);
+QCString getFileFilter(const QCString &name,bool isSourceCode);
-bool resolveRef(/* in */ const char *scName,
- /* in */ const char *name,
+bool resolveRef(/* in */ const QCString &scName,
+ /* in */ const QCString &name,
/* in */ bool inSeeBlock,
/* out */ const Definition **resContext,
/* out */ const MemberDef **resMember,
@@ -136,8 +133,8 @@ bool resolveRef(/* in */ const char *scName,
/* in */ bool checkScope = FALSE
);
-bool resolveLink(/* in */ const char *scName,
- /* in */ const char *lr,
+bool resolveLink(/* in */ const QCString &scName,
+ /* in */ const QCString &lr,
/* in */ bool inSeeBlock,
/* out */ const Definition **resContext,
/* out */ QCString &resAnchor
@@ -146,13 +143,13 @@ bool resolveLink(/* in */ const char *scName,
//bool generateRef(OutputDocInterface &od,const char *,
// const char *,bool inSeeBlock,const char * =0);
-bool generateLink(OutputDocInterface &od,const char *,
- const char *,bool inSeeBlock,const char *);
+bool generateLink(OutputDocInterface &od,const QCString &,
+ const QCString &,bool inSeeBlock,const QCString &);
-void generateFileRef(OutputDocInterface &od,const char *,
- const char *linkTxt=0);
+void generateFileRef(OutputDocInterface &od,const QCString &,
+ const QCString &linkTxt=QCString());
-void writePageRef(OutputDocInterface &od,const char *cn,const char *mn);
+void writePageRef(OutputDocInterface &od,const QCString &cn,const QCString &mn);
QCString getCanonicalTemplateSpec(const Definition *d,const FileDef *fs,const QCString& spec);
@@ -170,31 +167,39 @@ QCString clearBlock(const char *s,const char *begin,const char *end);
QCString selectBlock(const QCString& s,const QCString &name,bool enable, OutputGenerator::OutputType o);
QCString removeEmptyLines(const QCString &s);
-QCString resolveDefines(const char *n);
-
-ClassDef *getClass(const char *key);
-inline ClassDefMutable *getClassMutable(const char *key)
+ClassDef *getClass(const QCString &key);
+inline ClassDefMutable *getClassMutable(const QCString &key)
{
return toClassDefMutable(getClass(key));
}
+ConceptDef *getConcept(const QCString &key);
+inline ConceptDefMutable *getConceptMutable(const QCString &key)
+{
+ return toConceptDefMutable(getConcept(key));
+}
+ConceptDef *getResolvedConcept(const Definition *scope,const QCString &name);
-NamespaceDef *getResolvedNamespace(const char *key);
-inline NamespaceDefMutable *getResolvedNamespaceMutable(const char *key)
+NamespaceDef *getResolvedNamespace(const QCString &key);
+inline NamespaceDefMutable *getResolvedNamespaceMutable(const QCString &key)
{
return toNamespaceDefMutable(getResolvedNamespace(key));
}
-FileDef *findFileDef(const FileNameLinkedMap *fnMap,const char *n,
+FileDef *findFileDef(const FileNameLinkedMap *fnMap,const QCString &n,
bool &ambig);
-QCString showFileDefMatches(const FileNameLinkedMap *fnMap,const char *n);
+QCString showFileDefMatches(const FileNameLinkedMap *fnMap,const QCString &n);
-int guessSection(const char *name);
+int guessSection(const QCString &name);
inline bool isId(int c)
{
return c=='_' || c>=128 || c<0 || isalnum(c);
}
+inline bool isIdJS(int c)
+{
+ return c>=128 || c<0 || isalnum(c);
+}
QCString removeRedundantWhiteSpace(const QCString &s);
@@ -216,25 +221,26 @@ bool rightScopeMatch(const QCString &scope, const QCString &name);
bool leftScopeMatch(const QCString &scope, const QCString &name);
-QCString substituteKeywords(const QCString &s,const char *title,
- const char *projName,const char *projNum,const char *projBrief);
+QCString substituteKeywords(const QCString &s,const QCString &title,
+ const QCString &projName,const QCString &projNum,const QCString &projBrief);
int getPrefixIndex(const QCString &name);
-QCString removeAnonymousScopes(const char *s);
+QCString removeAnonymousScopes(const QCString &s);
-QCString replaceAnonymousScopes(const char *s,const char *replacement=0);
+QCString replaceAnonymousScopes(const QCString &s,const QCString &replacement=QCString());
bool hasVisibleRoot(const BaseClassList &bcl);
bool classHasVisibleChildren(const ClassDef *cd);
bool namespaceHasNestedNamespace(const NamespaceDef *nd);
+bool namespaceHasNestedConcept(const NamespaceDef *nd);
bool namespaceHasNestedClass(const NamespaceDef *nd,bool filterClasses,ClassDef::CompoundType ct);
bool classVisibleInIndex(const ClassDef *cd);
int minClassDistance(const ClassDef *cd,const ClassDef *bcd,int level=0);
Protection classInheritedProtectionLevel(const ClassDef *cd,const ClassDef *bcd,Protection prot=Public,int level=0);
-QCString convertNameToFile(const char *name,bool allowDots=FALSE,bool allowUnderscore=FALSE);
+QCString convertNameToFile(const QCString &name,bool allowDots=FALSE,bool allowUnderscore=FALSE);
void extractNamespaceName(const QCString &scopeName,
QCString &className,QCString &namespaceName,
@@ -242,22 +248,22 @@ void extractNamespaceName(const QCString &scopeName,
QCString insertTemplateSpecifierInScope(const QCString &scope,const QCString &templ);
-QCString stripScope(const char *name);
+QCString stripScope(const QCString &name);
-QCString convertToId(const char *s);
-QCString correctId(QCString s);
+QCString convertToId(const QCString &s);
+QCString correctId(const QCString &s);
-QCString convertToHtml(const char *s,bool keepEntities=TRUE);
+QCString convertToHtml(const QCString &s,bool keepEntities=TRUE);
QCString convertToLaTeX(const QCString &s,bool insideTabbing=FALSE,bool keepSpaces=FALSE);
-QCString convertToXML(const char *s, bool keepEntities=FALSE);
+QCString convertToXML(const QCString &s, bool keepEntities=FALSE);
-QCString convertToDocBook(const char *s);
+QCString convertToDocBook(const QCString &s);
-QCString convertToJSString(const char *s);
+QCString convertToJSString(const QCString &s);
-QCString convertToPSString(const char *s);
+QCString convertToPSString(const QCString &s);
QCString getOverloadDocs();
@@ -265,7 +271,7 @@ void addMembersToMemberGroup(/* in,out */ MemberList *ml,
/* in,out */ MemberGroupList *pMemberGroups,
/* in */ const Definition *context);
-int extractClassNameFromType(const char *type,int &pos,
+int extractClassNameFromType(const QCString &type,int &pos,
QCString &name,QCString &templSpec,SrcLangExt=SrcLangExt_Unknown);
QCString normalizeNonTemplateArgumentsInString(
@@ -274,7 +280,7 @@ QCString normalizeNonTemplateArgumentsInString(
const ArgumentList &formalArgs);
QCString substituteTemplateArgumentsInString(
- const std::string &name,
+ const QCString &name,
const ArgumentList &formalArgs,
const std::unique_ptr<ArgumentList> &actualArgs);
@@ -292,17 +298,17 @@ int getScopeFragment(const QCString &s,int p,int *l);
int filterCRLF(char *buf,int len);
void addRefItem(const RefItemVector &sli,
- const char *key,
- const char *prefix,
- const char *name,
- const char *title,
- const char *args,
+ const QCString &key,
+ const QCString &prefix,
+ const QCString &name,
+ const QCString &title,
+ const QCString &args,
const Definition *scope);
-PageDef *addRelatedPage(const char *name,
+PageDef *addRelatedPage(const QCString &name,
const QCString &ptitle,
const QCString &doc,
- const char *fileName,
+ const QCString &fileName,
int docLine,
int startLine,
const RefItemVector &sli = RefItemVector(),
@@ -312,34 +318,34 @@ PageDef *addRelatedPage(const char *name,
SrcLangExt lang=SrcLangExt_Unknown
);
-QCString escapeCharsInString(const char *name,bool allowDots,bool allowUnderscore=FALSE);
-QCString unescapeCharsInString(const char *s);
+QCString escapeCharsInString(const QCString &name,bool allowDots,bool allowUnderscore=FALSE);
+QCString unescapeCharsInString(const QCString &s);
void addGroupListToTitle(OutputList &ol,const Definition *d);
-void filterLatexString(FTextStream &t,const char *str,
+void filterLatexString(TextStream &t,const QCString &str,
bool insideTabbing,
bool insidePre,
bool insideItem,
bool insideTable,
bool keepSpaces);
-QCString latexEscapeLabelName(const char *s);
-QCString latexEscapeIndexChars(const char *s);
-QCString latexEscapePDFString(const char *s);
-QCString latexFilterURL(const char *s);
+QCString latexEscapeLabelName(const QCString &s);
+QCString latexEscapeIndexChars(const QCString &s);
+QCString latexEscapePDFString(const QCString &s);
+QCString latexFilterURL(const QCString &s);
-QCString rtfFormatBmkStr(const char *name);
+QCString rtfFormatBmkStr(const QCString &name);
-QCString linkToText(SrcLangExt lang,const char *link,bool isFileName);
+QCString linkToText(SrcLangExt lang,const QCString &link,bool isFileName);
bool checkExtension(const char *fName, const char *ext);
-QCString addHtmlExtensionIfMissing(const char *fName);
+QCString addHtmlExtensionIfMissing(const QCString &fName);
-QCString stripExtensionGeneral(const char *fName, const char *ext);
+QCString stripExtensionGeneral(const QCString &fName, const QCString &ext);
-QCString stripExtension(const char *fName);
+QCString stripExtension(const QCString &fName);
void replaceNamespaceAliases(QCString &scope,int i);
@@ -347,13 +353,13 @@ int computeQualifiedIndex(const QCString &name);
void addDirPrefix(QCString &fileName);
-QCString relativePathToRoot(const char *name);
+QCString relativePathToRoot(const QCString &name);
-void createSubDirs(QDir &d);
+void createSubDirs(const Dir &d);
-QCString stripPath(const char *s);
+QCString stripPath(const QCString &s);
-bool containsWord(const char *s,const char *word);
+bool containsWord(const QCString &s,const char *word);
bool findAndRemoveWord(QCString &s,const char *word);
@@ -365,7 +371,7 @@ QCString getFileNameExtension(QCString fn);
void initDefaultExtensionMapping();
void addCodeOnlyMappings();
-bool checkIfTypedef(const Definition *scope,const FileDef *fileScope,const char *n);
+bool checkIfTypedef(const Definition *scope,const FileDef *fileScope,const QCString &n);
QCString parseCommentAsText(const Definition *scope,const MemberDef *member,const QCString &doc,const QCString &fileName,int lineNr);
@@ -375,27 +381,26 @@ QCString recodeString(const QCString &str,const char *fromEncoding,const char *t
QCString extractAliasArgs(const QCString &args,int pos);
-int countAliasArguments(const QCString argList);
+int countAliasArguments(const QCString &argList);
-QCString resolveAliasCmd(const QCString aliasCmd);
+QCString resolveAliasCmd(const QCString &aliasCmd);
std::string expandAlias(const std::string &aliasName,const std::string &aliasValue);
void writeTypeConstraints(OutputList &ol,const Definition *d,const ArgumentList &al);
-QCString convertCharEntitiesToUTF8(const char *s);
+QCString convertCharEntitiesToUTF8(const QCString &s);
void stackTrace();
-bool readInputFile(const char *fileName,BufStr &inBuf,
+bool readInputFile(const QCString &fileName,BufStr &inBuf,
bool filter=TRUE,bool isSourceCode=FALSE);
-QCString filterTitle(const std::string &title);
+QCString filterTitle(const QCString &title);
-bool patternMatch(const QFileInfo &fi,const StringVector &patList);
+bool patternMatch(const FileInfo &fi,const StringVector &patList);
QCString externalLinkTarget(const bool parent = false);
QCString externalRef(const QCString &relPath,const QCString &ref,bool href);
int nextUtf8CharPosition(const QCString &utf8Str,uint len,uint startPos);
-const char *writeUtf8Char(FTextStream &t,const char *s);
void writeMarkerList(OutputList &ol,const std::string &markerText,size_t numMarkers,
std::function<void(size_t)> replaceFunc);
@@ -410,12 +415,12 @@ struct ColoredImgDataItem
unsigned char *alpha;
};
-void writeColoredImgData(const char *dir,ColoredImgDataItem data[]);
-QCString replaceColorMarkers(const char *str);
+void writeColoredImgData(const QCString &dir,ColoredImgDataItem data[]);
+QCString replaceColorMarkers(const QCString &str);
bool copyFile(const QCString &src,const QCString &dest);
-QCString extractBlock(const QCString text,const QCString marker);
-int lineBlock(const QCString text,const QCString marker);
+QCString extractBlock(const QCString &text,const QCString &marker);
+int lineBlock(const QCString &text,const QCString &marker);
bool isURL(const QCString &url);
@@ -432,19 +437,6 @@ QCString getDotImageExtension();
bool fileVisibleInIndex(const FileDef *fd,bool &genSourceFile);
-const int MAX_UTF8_CHAR_LEN = 4;
-const int MAX_UTF8_CHAR_SIZE = MAX_UTF8_CHAR_LEN+1; // include 0 terminator
-enum class CaseModifier
-{
- None,
- ToUpper,
- ToLower
-};
-int getUtf8Char(const char *input,char ids[MAX_UTF8_CHAR_SIZE],CaseModifier modifier=CaseModifier::None);
-uint getUtf8Code( const QCString& s, int idx );
-uint getUtf8CodeToLower( const QCString& s, int idx );
-uint getUtf8CodeToUpper( const QCString& s, int idx );
-
QCString extractDirection(QCString &docs);
void convertProtectionLevel(
@@ -455,16 +447,17 @@ void convertProtectionLevel(
);
bool mainPageHasTitle();
-bool openOutputFile(const char *outFile,QFile &f);
-void writeExtraLatexPackages(FTextStream &t);
-void writeLatexSpecialFormulaChars(FTextStream &t);
+bool openOutputFile(const QCString &outFile,std::ofstream &f);
+void writeExtraLatexPackages(TextStream &t);
+void writeLatexSpecialFormulaChars(TextStream &t);
StringVector split(const std::string &s,const std::string &delimiter);
StringVector split(const std::string &s,const reg::Ex &delimiter);
int findIndex(const StringVector &sv,const std::string &s);
int findIndex(const std::string &s,const reg::Ex &re);
+std::string join(const StringVector &s,const std::string &delimiter);
-bool recognizeFixedForm(const char* contents, FortranFormat format);
+bool recognizeFixedForm(const QCString &contents, FortranFormat format);
FortranFormat convertFileNameFortranParserCode(QCString fn);
#endif
diff --git a/src/vhdlcode.h b/src/vhdlcode.h
index 48c15bb..c563a8f 100644
--- a/src/vhdlcode.h
+++ b/src/vhdlcode.h
@@ -29,11 +29,11 @@ class VHDLCodeParser : public CodeParserInterface
VHDLCodeParser();
virtual ~VHDLCodeParser();
void parseCode(CodeOutputInterface &codeOutIntf,
- const char *scopeName,
+ const QCString &scopeName,
const QCString &input,
SrcLangExt lang,
bool isExampleBlock,
- const char *exampleName=0,
+ const QCString &exampleName=QCString(),
FileDef *fileDef=0,
int startLine=-1,
int endLine=-1,
diff --git a/src/vhdlcode.l b/src/vhdlcode.l
index c363a23..8908976 100644
--- a/src/vhdlcode.l
+++ b/src/vhdlcode.l
@@ -37,8 +37,6 @@
#include <stdio.h>
#include <assert.h>
#include <ctype.h>
-#include <qdir.h>
-#include <qcstringlist.h>
#include "vhdlcode.h"
#include "entry.h"
@@ -112,27 +110,27 @@ struct vhdlcodeYY_state
};
-static void writeFont(yyscan_t yyscanner,const char *s,const char* text);
+static void writeFont(yyscan_t yyscanner,const char *s,const QCString &text);
static void generateMemLink(yyscan_t yyscanner,CodeOutputInterface &ol,QCString &clName,QCString& memberName);
static bool writeColoredWord(yyscan_t yyscanner,QCString& word );
-static void generateClassOrGlobalLink(yyscan_t yyscanner,CodeOutputInterface &ol,const char *clName, bool typeOnly=false, const char *curr_class=0);
+static void generateClassOrGlobalLink(yyscan_t yyscanner,CodeOutputInterface &ol,const QCString &clName, bool typeOnly=false, const QCString &curr_class=QCString());
static void setCurrentDoc(yyscan_t yyscanner,const QCString &anchor);
static bool checkVhdlString(yyscan_t yyscanner,QCString &name);
-static void addToSearchIndex(yyscan_t yyscanner,const char *text);
+static void addToSearchIndex(yyscan_t yyscanner,const QCString &text);
static void startCodeLine(yyscan_t yyscanner);
static void endCodeLine(yyscan_t yyscanner);
static void nextCodeLine(yyscan_t yyscanner);
-static void writeWord(yyscan_t yyscanner,const char *word,const char* curr_class=0,bool classLink=false);
-static void codifyLines(yyscan_t yyscanner,const char *text,const char *cl=0,bool classlink=false,bool comment=false);
+static void writeWord(yyscan_t yyscanner,const QCString &word,const QCString &curr_class=QCString(),bool classLink=false);
+static void codifyLines(yyscan_t yyscanner,const QCString &text,const QCString &cl=QCString(),bool classlink=false,bool comment=false);
static void writeMultiLineCodeLink(yyscan_t yyscanner,CodeOutputInterface &ol,
const Definition *d,
- const char *text);
+ const QCString &text);
static void generateFuncLink(yyscan_t yyscanner,CodeOutputInterface &ol,const MemberDef* mdef);
static int countLines(yyscan_t yyscanner);
static void endFontClass(yyscan_t yyscanner);
static void startFontClass(yyscan_t yyscanner,const char *s);
static void appStringLower(QCString& qcs,const char* text);
-static void codifyMapLines(yyscan_t yyscanner,const char *text);
+static void codifyMapLines(yyscan_t yyscanner,const QCString &text);
static void writeFuncProto(yyscan_t yyscanner);
static void writeProcessProto(yyscan_t yyscanner);
static yy_size_t yyread(yyscan_t yyscanner,char *buf,yy_size_t max_size);
@@ -230,7 +228,7 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI
if (ql.size()>=2)
{
unsigned int index=0;
- QCString t1=ql[0];
+ QCString t1(ql[0]);
char cc=t1.at(index);
while (cc==' ' || cc=='\t')
{
@@ -261,7 +259,7 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI
}
codifyLines(yyscanner,"=>");
index=0;
- QCString s2=ql[1];
+ QCString s2(ql[1]);
t1=s2;
cc=t1.at(index);
while (cc==' ' || cc=='\t')
@@ -289,7 +287,7 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI
}
else
{
- codifyLines(yyscanner,yytext,yyextra->currClass.data());
+ codifyLines(yyscanner,yytext,yyextra->currClass);
}
BEGIN(Map);
}
@@ -355,7 +353,7 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI
<ParseType>{ENDEFUNC} {
QCString tt(yytext);
- codifyLines(yyscanner,yytext,yyextra->currClass.data());
+ codifyLines(yyscanner,yytext,yyextra->currClass);
tt=tt.lower();
VhdlDocGen::deleteAllChars(tt,';');
tt.stripWhiteSpace();
@@ -376,12 +374,12 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI
}
<ParseType>{END1} {
- codifyLines(yyscanner,yytext,yyextra->currClass.data());
+ codifyLines(yyscanner,yytext,yyextra->currClass);
yyextra->vhdlKeyDict.clear();
}
<ParseType>^{B}*("begin "|"begin") {
- codifyLines(yyscanner,yytext,yyextra->currClass.data());
+ codifyLines(yyscanner,yytext,yyextra->currClass);
yyextra->isFuncProto=false;
}
@@ -389,7 +387,7 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI
yyextra->funcProto.append(yytext);
if (yyextra->isProto)
{
- codifyLines(yyscanner,yytext,yyextra->currClass.data());
+ codifyLines(yyscanner,yytext,yyextra->currClass);
}
}
@@ -414,7 +412,7 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI
if (VhdlDocGen::isNumber(val.str()))
{
startFontClass(yyscanner,"vhdllogic");
- codifyLines(yyscanner,yytext,yyextra->currClass.data());
+ codifyLines(yyscanner,yytext,yyextra->currClass);
endFontClass(yyscanner);
}
else
@@ -424,7 +422,7 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI
}
else
{
- codifyLines(yyscanner,yytext,yyextra->currClass.data());
+ codifyLines(yyscanner,yytext,yyextra->currClass);
}
}
}
@@ -574,26 +572,25 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI
}
<ParsePackage>[^:;]* { //found package
- QCString temp(yytext);
- QCStringList strl=QCStringList::split(".",temp);
- if (strl.count()>2)
+ StringVector strl=split(yytext,".");
+ if (strl.size()>2)
{
- QCString s1=strl[0];
- QCString s2=strl[1];
- QCString s3=strl[2];
+ std::string s1=strl[0];
+ std::string s2=strl[1];
+ std::string s3=strl[2];
s1.append(".");
- s3.prepend(".");
- codifyLines(yyscanner,s1.data(),yyextra->currClass.data());
- ClassDef *cd=VhdlDocGen::getPackageName(s2);
+ s3.insert(0,".");
+ codifyLines(yyscanner,s1.c_str(),yyextra->currClass);
+ ClassDef *cd=VhdlDocGen::getPackageName(s2.c_str());
if (cd)
{
- generateClassOrGlobalLink(yyscanner,*yyextra->code,s2.data());
+ generateClassOrGlobalLink(yyscanner,*yyextra->code,s2.c_str());
}
else
{
- codifyLines(yyscanner,s2.data());
+ codifyLines(yyscanner,s2.c_str());
}
- codifyLines(yyscanner,s3.data());
+ codifyLines(yyscanner,s3.c_str());
}
else
{
@@ -609,27 +606,27 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI
if (j>0)
{
QCString left=tt.left(j+1);
- codifyLines(yyscanner,left.data());
+ codifyLines(yyscanner,left);
tt=tt.right(tt.length()-j-1);
- left=VhdlDocGen::getIndexWord(tt.data(),0);
+ left=VhdlDocGen::getIndexWord(tt,0);
if (!left.isEmpty())
{
if (left.contains('('))
{
j=left.find('(',false);
QCString name=left.left(j);
- generateClassOrGlobalLink(yyscanner,*yyextra->code,name.data());
+ generateClassOrGlobalLink(yyscanner,*yyextra->code,name);
yyextra->PortMapComp=name;
name=tt.right(tt.length()-name.length());
- codifyLines(yyscanner,name.data());
+ codifyLines(yyscanner,name);
}
else
{
- generateClassOrGlobalLink(yyscanner,*yyextra->code,left.data());
- tt.stripPrefix(left.data()); //=tt.right(tt.length()-left.length()-1);
+ generateClassOrGlobalLink(yyscanner,*yyextra->code,left);
+ tt.stripPrefix(left); //=tt.right(tt.length()-left.length()-1);
yyextra->PortMapComp=left;
- codifyLines(yyscanner,tt.data());
+ codifyLines(yyscanner,tt);
}
}
}
@@ -637,11 +634,11 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI
{
if (tt.contains(':',false))
{
- codifyMapLines(yyscanner,tt.data());
+ codifyMapLines(yyscanner,tt);
}
else
{
- codifyLines(yyscanner,tt.data());
+ codifyLines(yyscanner,tt);
}
}
yyextra->braceCount=1;
@@ -654,7 +651,7 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI
temp=temp.stripWhiteSpace();
VhdlDocGen::deleteAllChars(temp,'\n');
yyextra->tempComp=temp;
- codifyLines(yyscanner,yytext,temp.data(),true);
+ codifyLines(yyscanner,yytext,temp,true);
yyextra->braceCount=0;
yyextra->isComponent=true;
BEGIN(ParseComponent);
@@ -670,7 +667,7 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI
temp+=VhdlDocGen::getIndexWord(yytext,1);
yyextra->currClass=temp;
VhdlDocGen::deleteAllChars(temp,'\n');
- codifyLines(yyscanner,yytext,temp.data(),true);
+ codifyLines(yyscanner,yytext,temp,true);
yyextra->isPackageBody=false;
}
@@ -678,12 +675,12 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI
<Bases>^{B}*("package "){BN}*("body"){BN}*{FUNCNAME} { // found package body
QCString ss(yytext);
QCString temp=VhdlDocGen::getIndexWord(yytext,2);
- QCStringList ql=QCStringList::split(temp,ss);
- QCString ll=ql[0];
- codifyLines(yyscanner,ll.data(),yyextra->currClass.data());
+ StringVector ql=split(yytext,temp.str());
+ std::string ll=ql[0];
+ codifyLines(yyscanner,ll.c_str(),yyextra->currClass);
temp=temp.stripWhiteSpace();
temp.prepend("_");
- generateClassOrGlobalLink(yyscanner,*yyextra->code,temp.data());
+ generateClassOrGlobalLink(yyscanner,*yyextra->code,temp);
yyextra->currClass.resize(0);
yyextra->currClass=temp;
yyextra->isProto=false;
@@ -746,13 +743,13 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI
}
<Bases>"end"{BN}+"architecture"{BN}+{FUNCNAME} {
- codifyLines(yyscanner,yytext,yyextra->currClass.data(),true);
+ codifyLines(yyscanner,yytext,yyextra->currClass,true);
yyextra->currArch = false;
}
<Bases>"end"{BN}+{FUNCNAME} {
if (yyextra->currArch)
{
- codifyLines(yyscanner,yytext,yyextra->currClass.data(),true);
+ codifyLines(yyscanner,yytext,yyextra->currClass,true);
yyextra->currArch = false;
}
else
@@ -775,7 +772,7 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI
if (!writeColoredWord(yyscanner,temp))
{
- generateClassOrGlobalLink(yyscanner,*yyextra->code,temp.data());
+ generateClassOrGlobalLink(yyscanner,*yyextra->code,temp);
}
}
<End>";" {
@@ -813,7 +810,7 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI
}
<Bases>^{B}*("use"){BN}+("entity"|"component")[^\n]* {
- codifyLines(yyscanner,yytext,yyextra->currClass.data(),true);
+ codifyLines(yyscanner,yytext,yyextra->currClass,true);
}
@@ -862,7 +859,7 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI
<Bases>^{B}*{XILINX}/[^a-zA-Z0-9_] {
writeWord(yyscanner,yytext);
- //codifyLines(yyscanner,yytext,yyextra->currClass.data(),true);
+ //codifyLines(yyscanner,yytext,yyextra->currClass,true);
}
<Bases>^{B}*"set_"[^\n]* {
@@ -972,7 +969,7 @@ static bool checkVhdlString(yyscan_t yyscanner,QCString &name)
else
{
startFontClass(yyscanner,"keyword");
- yyextra->code->codify(name.data());
+ yyextra->code->codify(name);
endFontClass(yyscanner);
}
return true;
@@ -981,14 +978,14 @@ static bool checkVhdlString(yyscan_t yyscanner,QCString &name)
if (VhdlDocGen::isNumber(name.str()))
{
startFontClass(yyscanner,"vhdllogic");
- yyextra->code->codify(name.data());
+ yyextra->code->codify(name);
endFontClass(yyscanner);
return true;
}
return false;
}
-static void addToSearchIndex(yyscan_t yyscanner,const char *text)
+static void addToSearchIndex(yyscan_t yyscanner,const QCString &text)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
if (Doxygen::searchIndex)
@@ -1014,14 +1011,14 @@ static void startCodeLine(yyscan_t yyscanner)
// if ((yyextra->yyLineNr % 500) == 0)
// fprintf(stderr,"\n starting Line %d:",yyextra->yyLineNr);
const Definition *d = yyextra->sourceFileDef->getSourceDefinition(yyextra->yyLineNr);
- //printf("startCodeLine %d d=%s\n", yyextra->yyLineNr,d ? d->name().data() : "<null>");
+ //printf("startCodeLine %d d=%s\n", yyextra->yyLineNr,qPrint(d ? d->name()) : "<null>");
if (!yyextra->includeCodeFragment && d)
{
yyextra->currentDefinition = d;
yyextra->currentMemberDef = yyextra->sourceFileDef->getSourceMember(yyextra->yyLineNr);
if (!yyextra->tempComp.isEmpty() && yyextra->currentMemberDef )
{
- //ClassDef *cf=VhdlDocGen::getClass(yyextra->tempComp.data());
+ //ClassDef *cf=VhdlDocGen::getClass(yyextra->tempComp);
QCString nn=yyextra->currentMemberDef->name();
const MemberDef* mdeff=VhdlDocGen::findMember(yyextra->tempComp,nn);
if (mdeff)
@@ -1043,13 +1040,13 @@ static void startCodeLine(yyscan_t yyscanner)
{
yyextra->code->writeLineNumber(d->getReference(),
d->getOutputFileBase(),
- 0,yyextra->yyLineNr);
+ QCString(),yyextra->yyLineNr);
setCurrentDoc(yyscanner,lineAnchor);
}
}
else
{
- yyextra->code->writeLineNumber(0,0,0,yyextra->yyLineNr);
+ yyextra->code->writeLineNumber(QCString(),QCString(),QCString(),yyextra->yyLineNr);
}
}
yyextra->code->startCodeLine(yyextra->sourceFileDef);
@@ -1087,7 +1084,7 @@ static void nextCodeLine(yyscan_t yyscanner)
* and will be linked.
*/
-static void writeWord(yyscan_t yyscanner,const char *word,const char* curr_class,bool classLink)
+static void writeWord(yyscan_t yyscanner,const QCString &word,const QCString &curr_class,bool classLink)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
bool found=false;
@@ -1105,8 +1102,8 @@ static void writeWord(yyscan_t yyscanner,const char *word,const char* curr_class
if (!writeColoredWord(yyscanner,temp)) // is it a keyword ?
{
//if (VhdlDocGen::findKeyWord(temp))
- // writeFont(yyscanner,"vhdlkeyword",temp.data());
- //printf("writeWord: %s\n",temp.data());
+ // writeFont(yyscanner,"vhdlkeyword",temp);
+ //printf("writeWord: %s\n",qPrint(temp));
if (!tclass.isEmpty())
{
if (!classLink)
@@ -1122,7 +1119,7 @@ static void writeWord(yyscan_t yyscanner,const char *word,const char* curr_class
{
if (!checkVhdlString(yyscanner,temp))
{
- yyextra->code->codify(temp.data());
+ yyextra->code->codify(temp);
}
}
}
@@ -1159,16 +1156,16 @@ static void writeWord(yyscan_t yyscanner,const char *word,const char* curr_class
}
else
{
- QCString qc(temp.data());
+ QCString qc(temp);
if (VhdlDocGen::isNumber(qc.str()))
{
startFontClass(yyscanner,"vhdllogic");
- yyextra->code->codify(temp.data());
+ yyextra->code->codify(temp);
endFontClass(yyscanner);
}
else
{
- yyextra->code->codify(temp.data());
+ yyextra->code->codify(temp);
}
}
}
@@ -1179,12 +1176,12 @@ static void writeWord(yyscan_t yyscanner,const char *word,const char* curr_class
/*! write a code fragment 'text' that may span multiple lines, inserting
* line numbers for each line.
*/
-static void codifyLines(yyscan_t yyscanner,const char *text,const char *cl,bool classlink,bool comment)
+static void codifyLines(yyscan_t yyscanner,const QCString &text,const QCString &cl,bool classlink,bool comment)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
- if (text==0) return;
+ if (text.isEmpty()) return;
//printf("codifyLines(%d,\"%s\")\n",yyextra->yyLineNr,text);
- const char *p=text,*sp=p;
+ const char *p=text.data(),*sp=p;
char c;
bool done=false;
while (!done)
@@ -1198,7 +1195,7 @@ static void codifyLines(yyscan_t yyscanner,const char *text,const char *cl,bool
line = line.left((int)(p-sp)-1);
if (comment)
{
- writeFont(yyscanner,"comment",line.data());
+ writeFont(yyscanner,"comment",line);
}
else
{
@@ -1227,9 +1224,10 @@ static void codifyLines(yyscan_t yyscanner,const char *text,const char *cl,bool
*/
static void writeMultiLineCodeLink(yyscan_t yyscanner,CodeOutputInterface &ol,
const Definition *d,
- const char *text)
+ const QCString &text)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ if (text.isEmpty()) return;
static bool sourceTooltips = Config_getBool(SOURCE_TOOLTIPS);
TooltipManager::instance().addTooltip(ol,d);
QCString ref = d->getReference();
@@ -1241,18 +1239,17 @@ static void writeMultiLineCodeLink(yyscan_t yyscanner,CodeOutputInterface &ol,
tooltip = d->briefDescriptionAsTooltip();
}
bool done=false;
- char *p=(char *)text;
+ const char *p=text.data();
while (!done)
{
- char *sp=p;
+ const char *sp=p;
char c;
while ((c=*p++) && c!='\n') {}
if (c=='\n')
{
yyextra->yyLineNr++;
- *(p-1)='\0';
// printf("writeCodeLink(%s,%s,%s,%s)\n",ref,file,anchor,sp);
- ol.writeCodeLink(ref,file,anchor,sp,tooltip);
+ ol.writeCodeLink(ref,file,anchor,QCString(sp,p-sp-1),tooltip);
nextCodeLine(yyscanner);
}
else
@@ -1267,7 +1264,7 @@ static void writeMultiLineCodeLink(yyscan_t yyscanner,CodeOutputInterface &ol,
*/
static void generateFuncLink(yyscan_t yyscanner,CodeOutputInterface &ol,const MemberDef* mdef)
{
- //printf("generateFuncLink(FuncName=%s)\n",mdef->name().data());
+ //printf("generateFuncLink(FuncName=%s)\n",qPrint(mdef->name()));
QCString memberName=mdef->name();
if (mdef->isLinkable()) // is it a linkable class
@@ -1276,7 +1273,7 @@ static void generateFuncLink(yyscan_t yyscanner,CodeOutputInterface &ol,const Me
addToSearchIndex(yyscanner,memberName);
return;
}
- codifyLines(yyscanner,memberName.data());
+ codifyLines(yyscanner,memberName);
addToSearchIndex(yyscanner,memberName);
} // generateFuncLink
@@ -1286,7 +1283,7 @@ static void generateMemLink(yyscan_t yyscanner,CodeOutputInterface &ol,QCString
if (memberName.isEmpty()) return;
if (clName.isEmpty())
{
- codifyLines(yyscanner,memberName.data());
+ codifyLines(yyscanner,memberName);
return;
}
@@ -1297,7 +1294,7 @@ static void generateMemLink(yyscan_t yyscanner,CodeOutputInterface &ol,QCString
//bool isLocal=false;
const MemberDef *md=VhdlDocGen::findMember(className,memberName);
- ClassDef *po=VhdlDocGen::getClass(className.data());
+ ClassDef *po=VhdlDocGen::getClass(className);
if (md==0 && po && (VhdlDocGen::VhdlClasses)po->protection()==VhdlDocGen::PACKBODYCLASS)
{
@@ -1313,12 +1310,13 @@ static void generateMemLink(yyscan_t yyscanner,CodeOutputInterface &ol,QCString
return;
}
// nothing found, just write out the word
- codifyLines(yyscanner,memberName.data());
+ codifyLines(yyscanner,memberName);
addToSearchIndex(yyscanner,memberName);
}// generateMemLink
-static void generateClassOrGlobalLink(yyscan_t yyscanner,CodeOutputInterface &ol,const char *clName, bool /*typeOnly*/, const char *curr_class)
+static void generateClassOrGlobalLink(yyscan_t yyscanner,CodeOutputInterface &ol,
+ const QCString &clName, bool /*typeOnly*/, const QCString &curr_class)
{
QCString className=clName;
@@ -1328,8 +1326,8 @@ static void generateClassOrGlobalLink(yyscan_t yyscanner,CodeOutputInterface &ol
//MemberDef *md=0;
//bool isLocal=false;
className.stripPrefix("_");
- cd = getClass(className.data());
- if (!cd && curr_class)
+ cd = getClass(className);
+ if (!cd && !curr_class.isEmpty())
{
QCString cls = curr_class;
QCString suffix = "::";
@@ -1412,10 +1410,10 @@ static void startFontClass(yyscan_t yyscanner,const char *s)
yyextra->currentFontClass=s;
}
-static void writeFont(yyscan_t yyscanner,const char *s,const char* text)
+static void writeFont(yyscan_t yyscanner,const char *s,const QCString &text)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
- if (s==0 || text==0) return;
+ if (s==0 || text.isEmpty()) return;
//printf("writeFont(yyscanner,%d,\"%s\")\n",yyextra->yyLineNr,text);
yyextra->code->startFontClass(s);
yyextra->code->codify(text);
@@ -1432,16 +1430,16 @@ static void appStringLower(QCString& qcs,const char* text)
}
/* writes and links a port map statement */
-static void codifyMapLines(yyscan_t yyscanner,const char *text)
+static void codifyMapLines(yyscan_t yyscanner,const QCString &text)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
- if (text==0) return;
+ if (text.isEmpty()) return;
QCString temp;
//bool dot=false;
int wordCounter=0;
QCString ctemp;
- //printf("codifyMapLines(%d,\"%s\")\n",yyextra->yyLineNr,text);
- const char *p=text; //,*sp=p;
+ //printf("codifyMapLines(%d,\"%s\")\n",yyextra->yyLineNr,qPrint(text));
+ const char *p=text.data();
char c;
bool done=false;
while (!done)
@@ -1480,7 +1478,7 @@ static void codifyMapLines(yyscan_t yyscanner,const char *text)
}
}
ctemp.fill(c,1);
- codifyLines(yyscanner,ctemp.data());
+ codifyLines(yyscanner,ctemp);
ctemp.resize(0);
temp.resize(0);
}//while
@@ -1498,13 +1496,13 @@ static void writeFuncProto(yyscan_t yyscanner)
if (name.isEmpty())
{
- codifyLines(yyscanner,yyextra->funcProto.data(),yyextra->currClass.data());
+ codifyLines(yyscanner,yyextra->funcProto,yyextra->currClass);
return;
}
- QCStringList qlist=QCStringList::split(name,yyextra->funcProto);
- QCString temp=qlist[0];
- codifyLines(yyscanner,temp.data(),yyextra->currClass.data());
- yyextra->funcProto.stripPrefix(temp.data());
+ StringVector qlist=split(yyextra->funcProto.str(),name.str());
+ QCString temp(qlist[0]);
+ codifyLines(yyscanner,temp,yyextra->currClass);
+ yyextra->funcProto.stripPrefix(temp);
temp.resize(0);
temp=yyextra->currClass;
if (yyextra->isPackageBody)
@@ -1516,12 +1514,12 @@ static void writeFuncProto(yyscan_t yyscanner)
if (mdef)
{
generateFuncLink(yyscanner,*yyextra->code,mdef);
- yyextra->funcProto.stripPrefix(name.data());
- codifyLines(yyscanner,yyextra->funcProto.data(),yyextra->currClass.data());
+ yyextra->funcProto.stripPrefix(name);
+ codifyLines(yyscanner,yyextra->funcProto,yyextra->currClass);
}
else
{
- codifyLines(yyscanner,yyextra->funcProto.data(),yyextra->currClass.data());
+ codifyLines(yyscanner,yyextra->funcProto,yyextra->currClass);
}
}// writeFuncProto
@@ -1530,7 +1528,7 @@ static void writeFuncProto(yyscan_t yyscanner)
static void writeProcessProto(yyscan_t yyscanner)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
- codifyLines(yyscanner,yyextra->funcProto.data(),yyextra->currClass.data());
+ codifyLines(yyscanner,yyextra->funcProto,yyextra->currClass);
yyextra->vhdlKeyDict.clear();
}// writeProcessProto
@@ -1542,7 +1540,7 @@ static bool writeColoredWord(yyscan_t yyscanner,QCString& word )
const char *ss=VhdlDocGen::findKeyWord(qcs);
if (ss)
{
- writeFont(yyscanner,ss,word.data());
+ writeFont(yyscanner,ss,word);
return true;
}
return false;
@@ -1576,11 +1574,11 @@ void VHDLCodeParser::resetCodeParserState()
}
void VHDLCodeParser::parseCode(CodeOutputInterface &od,
- const char *className,
+ const QCString &className,
const QCString &s,
SrcLangExt,
bool exBlock,
- const char *exName,
+ const QCString &exName,
FileDef *fd,
int startLine,
int endLine,
@@ -1594,7 +1592,7 @@ void VHDLCodeParser::parseCode(CodeOutputInterface &od,
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
//printf("***parseCode() exBlock=%d exName=%s fd=%p\n",exBlock,exName,fd);
if (s.isEmpty()) return;
- printlex(yy_flex_debug, true, __FILE__, fd ? fd->fileName().data(): NULL);
+ printlex(yy_flex_debug, true, __FILE__, fd ? qPrint(fd->fileName()): NULL);
if (memberDef)
{
const ClassDef *dd=memberDef->getClassDef();
@@ -1602,7 +1600,7 @@ void VHDLCodeParser::parseCode(CodeOutputInterface &od,
}
resetCodeParserState();
yyextra->code = &od;
- yyextra->inputString = s;
+ yyextra->inputString = s.data();
yyextra->inputPosition = 0;
yyextra->currentFontClass = 0;
yyextra->needsTermination = false;
@@ -1667,7 +1665,7 @@ void VHDLCodeParser::parseCode(CodeOutputInterface &od,
// write the tooltips
TooltipManager::instance().writeTooltips(od);
- printlex(yy_flex_debug, false, __FILE__, fd ? fd->fileName().data(): NULL);
+ printlex(yy_flex_debug, false, __FILE__, fd ? qPrint(fd->fileName()): NULL);
}
#if USE_STATE2STRING
diff --git a/src/vhdldocgen.cpp b/src/vhdldocgen.cpp
index 86110a8..f0763db 100644
--- a/src/vhdldocgen.cpp
+++ b/src/vhdldocgen.cpp
@@ -27,13 +27,11 @@
#include <map>
#include <algorithm>
-#include <qcstring.h>
-#include <qfileinfo.h>
-#include <qcstringlist.h>
/* --------------------------------------------------------------- */
// local includes
+#include "qcstring.h"
#include "vhdldocgen.h"
#include "message.h"
#include "config.h"
@@ -63,25 +61,26 @@
#include "VhdlParser.h"
#include "regex.h"
#include "plantuml.h"
+#include "textstream.h"
//#define DEBUGFLOW
#define theTranslator_vhdlType theTranslator->trVhdlType
-static void initUCF(Entry* root,const char* type,QCString & qcs,int line,QCString & fileName,QCString & brief);
+static void initUCF(Entry* root,const QCString &type,QCString &qcs,int line,const QCString & fileName,QCString & brief);
static void writeUCFLink(const MemberDef* mdef,OutputList &ol);
static void addInstance(ClassDefMutable* entity, ClassDefMutable* arch, ClassDefMutable *inst,
const std::shared_ptr<Entry> &cur);
//---------- create svg -------------------------------------------------------------
static void createSVG();
-static void startDot(FTextStream &t);
-static void startTable(FTextStream &t,const QCString &className);
+static void startDot(TextStream &t);
+static void startTable(TextStream &t,const QCString &className);
static std::vector<const MemberDef *> getPorts(const ClassDef *cd);
-static void writeVhdlEntityToolTip(FTextStream& t,ClassDef *cd);
-static void endDot(FTextStream &t);
-static void writeTable(const std::vector<const MemberDef*> &portList,FTextStream & t);
-static void endTable(FTextStream &t);
-static void writeClassToDot(FTextStream &t,ClassDef* cd);
-static void writeVhdlDotLink(FTextStream &t,const QCString &a,const QCString &b,const QCString &style);
+static void writeVhdlEntityToolTip(TextStream& t,ClassDef *cd);
+static void endDot(TextStream &t);
+static void writeTable(const std::vector<const MemberDef*> &portList,TextStream & t);
+static void endTable(TextStream &t);
+static void writeClassToDot(TextStream &t,ClassDef* cd);
+static void writeVhdlDotLink(TextStream &t,const QCString &a,const QCString &b,const QCString &style);
static const MemberDef *flowMember=0;
void VhdlDocGen::setFlowMember( const MemberDef* mem)
@@ -97,11 +96,11 @@ void VhdlDocGen::setFlowMember( const MemberDef* mem)
//--------------------------------------------------------------------------------------------------
-static void codify(FTextStream &t,const char *str)
+static void codify(TextStream &t,const QCString &str)
{
- if (str)
+ if (!str.isEmpty())
{
- const char *p=str;
+ const char *p=str.data();
char c;
while (*p)
{
@@ -136,7 +135,7 @@ static void writeLink(const MemberDef* mdef,OutputList &ol)
static void startFonts(const QCString& q, const char *keyword,OutputList& ol)
{
ol.startFontClass(keyword);
- ol.docify(q.data());
+ ol.docify(q);
ol.endFontClass();
}
@@ -189,14 +188,13 @@ void VhdlDocGen::writeOverview()
QCString ov =Config_getString(HTML_OUTPUT);
QCString fileName=ov+"/vhdl_design.dot";
- QFile f(fileName);
- FTextStream t(&f);
-
- if (!f.open(IO_WriteOnly))
+ std::ofstream f(fileName.str(),std::ofstream::out | std::ofstream::binary);
+ if (!f.is_open())
{
- err("Warning: Cannot open file %s for writing\n",fileName.data());
+ err("Warning: Cannot open file %s for writing\n",qPrint(fileName));
return;
}
+ TextStream t(&f);
startDot(t);
@@ -227,20 +225,21 @@ void VhdlDocGen::writeOverview()
dotn+=cd->name();
QCString csc=bClass->name()+":";
csc+=bClass->name();
- // fprintf(stderr,"\n <%s| %s>",dotn.data(),csc.data());
- writeVhdlDotLink(t,dotn,csc,0);
+ // fprintf(stderr,"\n <%s| %s>",qPrint(dotn),qPrint(csc));
+ writeVhdlDotLink(t,dotn,csc,QCString());
}
}// for
endDot(t);
// writePortLinks(t);
+ t.flush();
f.close();
createSVG();
}
//------------------------------------------------------------------------------------------------------------------------------------------------------
-static void startDot(FTextStream &t)
+static void startDot(TextStream &t)
{
t << " digraph G { \n";
t << "rankdir=LR \n";
@@ -248,18 +247,18 @@ static void startDot(FTextStream &t)
t << "stylesheet=\"doxygen.css\"\n";
}
-static void endDot(FTextStream &t)
+static void endDot(TextStream &t)
{
t <<" } \n";
}
-static void startTable(FTextStream &t,const QCString &className)
+static void startTable(TextStream &t,const QCString &className)
{
t << className <<" [ shape=none , fontname=\"arial\", fontcolor=\"blue\" , \n";
t << "label=<<TABLE BORDER=\"0\" CELLBORDER=\"1\" CELLSPACING=\"0\">\n";
}
-static void writeVhdlDotLink(FTextStream &t,
+static void writeVhdlDotLink(TextStream &t,
const QCString &a,const QCString &b,const QCString &style)
{
t << a << "->" << b;
@@ -289,7 +288,7 @@ static QCString formatBriefNote(const QCString &brief,ClassDef * cd)
return vForm;
}
-static void writeVhdlEntityToolTip(FTextStream& t,ClassDef *cd)
+static void writeVhdlEntityToolTip(TextStream& t,ClassDef *cd)
{
QCString brief=cd->briefDescription();
@@ -310,7 +309,7 @@ static void writeVhdlEntityToolTip(FTextStream& t,ClassDef *cd)
writeVhdlDotLink(t,dotn,node,"dotted");
}
-static void writeColumn(FTextStream &t,const MemberDef *md,bool start)
+static void writeColumn(TextStream &t,const MemberDef *md,bool start)
{
QCString toolTip;
@@ -343,7 +342,7 @@ static void writeColumn(FTextStream &t,const MemberDef *md,bool start)
t<<" TOOLTIP=\"";
if (!toolTip.isEmpty())
{
- codify(t,toolTip.data());
+ codify(t,toolTip);
}
else
{
@@ -351,7 +350,7 @@ static void writeColumn(FTextStream &t,const MemberDef *md,bool start)
if (!largs.isEmpty())
{
largs=substitute(largs,"%"," ");
- codify(t,largs.data());
+ codify(t,largs);
}
}
t << "\" ";
@@ -393,13 +392,13 @@ static void writeColumn(FTextStream &t,const MemberDef *md,bool start)
}
}
-static void endTable(FTextStream &t)
+static void endTable(TextStream &t)
{
t << "</TABLE>>\n";
t << "] \n";
}
-static void writeClassToDot(FTextStream &t,ClassDef* cd)
+static void writeClassToDot(TextStream &t,ClassDef* cd)
{
t << "<TR><TD COLSPAN=\"2\" BGCOLOR=\"yellow\" ";
t << "PORT=\"";
@@ -433,9 +432,9 @@ static std::vector<const MemberDef*> getPorts(const ClassDef *cd)
return portList;
}
-//writeColumn(FTextStream &t,QCString name,bool start)
+//writeColumn(TextStream &t,QCString name,bool start)
-static void writeTable(const std::vector<const MemberDef*> &portList,FTextStream & t)
+static void writeTable(const std::vector<const MemberDef*> &portList,TextStream & t)
{
std::vector<const MemberDef *> inPorts;
std::vector<const MemberDef *> outPorts;
@@ -580,9 +579,9 @@ const char* VhdlDocGen::findKeyWord(const QCString& kw)
return 0;
}
-ClassDef *VhdlDocGen::getClass(const char *name)
+ClassDef *VhdlDocGen::getClass(const QCString &name)
{
- if (name==0 || name[0]=='\0') return 0;
+ if (name.isEmpty()) return 0;
return Doxygen::classLinkedMap->find(QCString(name).stripWhiteSpace());
}
@@ -601,7 +600,7 @@ const MemberDef* VhdlDocGen::findMember(const QCString& className, const QCStrin
const MemberDef *mdef=0;
cd=getClass(className);
- //printf("VhdlDocGen::findMember(%s,%s)=%p\n",className.data(),memName.data(),cd);
+ //printf("VhdlDocGen::findMember(%s,%s)=%p\n",qPrint(className),qPrint(memName),cd);
if (cd==0) return 0;
mdef=VhdlDocGen::findMemberDef(cd,memName,MemberListType_variableMembers);
@@ -698,7 +697,7 @@ const MemberDef* VhdlDocGen::findMember(const QCString& className, const QCStrin
const MemberDef* VhdlDocGen::findMemberDef(ClassDef* cd,const QCString& key,MemberListType type)
{
QCString keyType=cd->symbolName()+"@"+key;
- //printf("\n %s | %s | %s",cd->symbolName().data(),key.data(,),keyType.data());
+ //printf("\n %s | %s | %s",qPrint(cd->symbolName()),key.data(,),qPrint(keyType));
auto it = g_varMap.find(keyType.str());
if (it!=g_varMap.end())
@@ -716,7 +715,7 @@ const MemberDef* VhdlDocGen::findMemberDef(ClassDef* cd,const QCString& key,Memb
return 0;
}
//int l=ml->count();
- // fprintf(stderr,"\n loading entity %s %s: %d",cd->symbolName().data(),keyType.data(),l);
+ // fprintf(stderr,"\n loading entity %s %s: %d",qPrint(cd->symbolName()),qPrint(keyType),l);
for (const auto &md : *ml)
{
@@ -769,7 +768,7 @@ void VhdlDocGen::findAllPackages( ClassDef *cdef)
const MemberDef* VhdlDocGen::findFunction(const QCString& funcname, const QCString& package)
{
- ClassDef *cdef=getClass(package.data());
+ ClassDef *cdef=getClass(package);
if (cdef==0) return 0;
MemberList *mem=cdef->getMemberList(MemberListType_pubMethods);
@@ -852,18 +851,21 @@ void VhdlDocGen::writeInlineClassLink(const ClassDef* cd ,OutputList& ol)
if (ii==VhdlDocGen::PACKAGE_BODY)
{
nn.stripPrefix("_");
- cd=getClass(nn.data());
+ cd=getClass(nn);
}
else if (ii==VhdlDocGen::PACKAGE)
{
nn.prepend("_");
- cd=getClass(nn.data());
+ cd=getClass(nn);
}
else if (ii==VhdlDocGen::ARCHITECTURE)
{
- QCStringList qlist=QCStringList::split("-",nn);
- nn=qlist[1];
- cd=VhdlDocGen::getClass(nn.data());
+ StringVector qlist=split(nn.str(),"-");
+ if (qlist.size()>1)
+ {
+ nn=qlist[1];
+ cd=VhdlDocGen::getClass(nn);
+ }
}
QCString opp;
@@ -872,15 +874,18 @@ void VhdlDocGen::writeInlineClassLink(const ClassDef* cd ,OutputList& ol)
VhdlDocGen::findAllArchitectures(ql,cd);
for (const auto &s : ql)
{
- QCStringList qlist=QCStringList::split("-",s);
- QCString s1=qlist[0];
- QCString s2=qlist[1];
- s1.stripPrefix("_");
- if (ql.size()==1) s1.resize(0);
- ClassDef *cc = getClass(s);
- if (cc)
+ StringVector qlist=split(s.str(),"-");
+ if (qlist.size()>2)
{
- VhdlDocGen::writeVhdlLink(cc,ol,type,s2,s1);
+ QCString s1(qlist[0]);
+ QCString s2(qlist[1]);
+ s1.stripPrefix("_");
+ if (ql.size()==1) s1.resize(0);
+ ClassDef *cc = getClass(s);
+ if (cc)
+ {
+ VhdlDocGen::writeVhdlLink(cc,ol,type,s2,s1);
+ }
}
}
}
@@ -920,10 +925,10 @@ const ClassDef* VhdlDocGen::findArchitecture(const ClassDef *cd)
for (const auto &citer : *Doxygen::classLinkedMap)
{
QCString jj=citer->name();
- QCStringList ql=QCStringList::split(":",jj);
- if (ql.count()>1)
+ StringVector ql=split(jj.str(),":");
+ if (ql.size()>1)
{
- if (ql[0]==nn )
+ if (QCString(ql[0])==nn)
{
return citer.get();
}
@@ -939,16 +944,16 @@ void VhdlDocGen::writeVhdlLink(const ClassDef* ccd ,OutputList& ol,QCString& typ
{
if (ccd==0) return;
ol.startBold();
- ol.docify(type.data());
+ ol.docify(type);
ol.endBold();
nn.stripPrefix("_");
- ol.writeObjectLink(ccd->getReference(),ccd->getOutputFileBase(),0,nn.data());
+ ol.writeObjectLink(ccd->getReference(),ccd->getOutputFileBase(),QCString(),nn);
if (!behav.isEmpty())
{
behav.prepend(" ");
ol.startBold();
- ol.docify(behav.data());
+ ol.docify(behav);
ol.endBold();
}
@@ -981,7 +986,7 @@ void VhdlDocGen::prepareComment(QCString& qcs)
* @param ret Stores the return type
* @param doc ???
*/
-void VhdlDocGen::parseFuncProto(const char* text,QCString& name,QCString& ret,bool doc)
+void VhdlDocGen::parseFuncProto(const QCString &text,QCString& name,QCString& ret,bool doc)
{
int index,end;
QCString s1(text);
@@ -1012,7 +1017,7 @@ void VhdlDocGen::parseFuncProto(const char* text,QCString& name,QCString& ret,bo
int s=s1.find(' ');
if (s==-1) s=s1.find('\t');
if (i==-1 || i<s)
- s1=VhdlDocGen::getIndexWord(s1.data(),1);
+ s1=VhdlDocGen::getIndexWord(s1,1);
else // s<i, s=start of name, i=end of name
s1=s1.mid(s,(i-s));
@@ -1031,14 +1036,14 @@ void VhdlDocGen::parseFuncProto(const char* text,QCString& name,QCString& ret,bo
* returns the n'th word of a string
*/
-QCString VhdlDocGen::getIndexWord(const char* c,int index)
+QCString VhdlDocGen::getIndexWord(const QCString &c,int index)
{
static const reg::Ex reg(R"([\s|])");
- auto ql=split(c,reg);
+ auto ql=split(c.str(),reg);
if ((size_t)index < ql.size())
{
- return ql[index];
+ return QCString(ql[index]);
}
return "";
@@ -1251,7 +1256,7 @@ void VhdlDocGen::formatString(const QCString &s, OutputList& ol,const MemberDef*
index=temp.length();
}// for
temp=temp.stripWhiteSpace();
- // printf("\n [%s]",qcs.data());
+ // printf("\n [%s]",qPrint(qcs));
VhdlDocGen::writeFormatString(temp,ol,mdef);
}
@@ -1363,7 +1368,7 @@ void VhdlDocGen::writeFunctionProto(OutputList& ol,const ArgumentList &al,const
else
startFonts(w,"vhdlchar",ol);
- if (arg.attrib)
+ if (!arg.attrib.isEmpty())
startFonts(arg.attrib,"vhdlchar",ol);
sem=TRUE;
@@ -1375,8 +1380,8 @@ void VhdlDocGen::writeFunctionProto(OutputList& ol,const ArgumentList &al,const
}
ol.startBold();
ol.docify(" )");
- const char *exp=mdef->excpString();
- if (exp)
+ QCString exp=mdef->excpString();
+ if (!exp.isEmpty())
{
ol.insertMemberAlign();
ol.startBold();
@@ -1532,57 +1537,57 @@ QCString VhdlDocGen::convertArgumentListToString(const ArgumentList &al,bool fun
void VhdlDocGen::writeVhdlDeclarations(const MemberList* ml,
OutputList& ol,const GroupDef* gd,const ClassDef* cd,const FileDef *fd,const NamespaceDef* nd)
{
- VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::LIBRARY,FALSE),0,FALSE,VhdlDocGen::LIBRARY);
- VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::USE,FALSE),0,FALSE,VhdlDocGen::USE);
- VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::FUNCTION,FALSE),0,FALSE,VhdlDocGen::FUNCTION);
- VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::COMPONENT,FALSE),0,FALSE,VhdlDocGen::COMPONENT);
- VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::CONSTANT,FALSE),0,FALSE,VhdlDocGen::CONSTANT);
- VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::TYPE,FALSE),0,FALSE,VhdlDocGen::TYPE);
- VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::SUBTYPE,FALSE),0,FALSE,VhdlDocGen::SUBTYPE);
- VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::GENERIC,FALSE),0,FALSE,VhdlDocGen::GENERIC);
- VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::PORT,FALSE),0,FALSE,VhdlDocGen::PORT);
- VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::PROCESS,FALSE),0,FALSE,VhdlDocGen::PROCESS);
- VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::SIGNAL,FALSE),0,FALSE,VhdlDocGen::SIGNAL);
- VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::ATTRIBUTE,FALSE),0,FALSE,VhdlDocGen::ATTRIBUTE);
- VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::PROCEDURE,FALSE),0,FALSE,VhdlDocGen::PROCEDURE);
- VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::RECORD,FALSE),0,FALSE,VhdlDocGen::RECORD);
- VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::UNITS,FALSE),0,FALSE,VhdlDocGen::UNITS);
- VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::SHAREDVARIABLE,FALSE),0,FALSE,VhdlDocGen::SHAREDVARIABLE);
- VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::VFILE,FALSE),0,FALSE,VhdlDocGen::VFILE);
- VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::GROUP,FALSE),0,FALSE,VhdlDocGen::GROUP);
- VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::INSTANTIATION,FALSE),0,FALSE,VhdlDocGen::INSTANTIATION);
- VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::ALIAS,FALSE),0,FALSE,VhdlDocGen::ALIAS);
- VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::MISCELLANEOUS,TRUE),0,FALSE,VhdlDocGen::MISCELLANEOUS);
+ VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::LIBRARY,FALSE),QCString(),FALSE,VhdlDocGen::LIBRARY);
+ VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::USE,FALSE),QCString(),FALSE,VhdlDocGen::USE);
+ VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::FUNCTION,FALSE),QCString(),FALSE,VhdlDocGen::FUNCTION);
+ VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::COMPONENT,FALSE),QCString(),FALSE,VhdlDocGen::COMPONENT);
+ VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::CONSTANT,FALSE),QCString(),FALSE,VhdlDocGen::CONSTANT);
+ VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::TYPE,FALSE),QCString(),FALSE,VhdlDocGen::TYPE);
+ VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::SUBTYPE,FALSE),QCString(),FALSE,VhdlDocGen::SUBTYPE);
+ VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::GENERIC,FALSE),QCString(),FALSE,VhdlDocGen::GENERIC);
+ VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::PORT,FALSE),QCString(),FALSE,VhdlDocGen::PORT);
+ VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::PROCESS,FALSE),QCString(),FALSE,VhdlDocGen::PROCESS);
+ VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::SIGNAL,FALSE),QCString(),FALSE,VhdlDocGen::SIGNAL);
+ VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::ATTRIBUTE,FALSE),QCString(),FALSE,VhdlDocGen::ATTRIBUTE);
+ VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::PROCEDURE,FALSE),QCString(),FALSE,VhdlDocGen::PROCEDURE);
+ VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::RECORD,FALSE),QCString(),FALSE,VhdlDocGen::RECORD);
+ VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::UNITS,FALSE),QCString(),FALSE,VhdlDocGen::UNITS);
+ VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::SHAREDVARIABLE,FALSE),QCString(),FALSE,VhdlDocGen::SHAREDVARIABLE);
+ VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::VFILE,FALSE),QCString(),FALSE,VhdlDocGen::VFILE);
+ VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::GROUP,FALSE),QCString(),FALSE,VhdlDocGen::GROUP);
+ VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::INSTANTIATION,FALSE),QCString(),FALSE,VhdlDocGen::INSTANTIATION);
+ VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::ALIAS,FALSE),QCString(),FALSE,VhdlDocGen::ALIAS);
+ VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::MISCELLANEOUS,TRUE),QCString(),FALSE,VhdlDocGen::MISCELLANEOUS);
// configurations must be added to global file definitions.
- VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::CONFIG,FALSE),0,FALSE,VhdlDocGen::CONFIG);
- VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::UCF_CONST,FALSE),0,FALSE,VhdlDocGen::UCF_CONST);
+ VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::CONFIG,FALSE),QCString(),FALSE,VhdlDocGen::CONFIG);
+ VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::UCF_CONST,FALSE),QCString(),FALSE,VhdlDocGen::UCF_CONST);
}
void VhdlDocGen::correctMemberProperties(MemberDefMutable *md)
{
- if (qstrcmp(md->argsString(),"package")==0)
+ if (md->argsString()=="package")
{
md->setMemberSpecifiers(VhdlDocGen::INSTANTIATION);
}
- else if (qstrcmp(md->argsString(),"configuration")==0)
+ else if (md->argsString()=="configuration")
{
md->setMemberSpecifiers(VhdlDocGen::CONFIG);
}
- else if (qstrcmp(md->typeString(),"library")==0)
+ else if (md->typeString()=="library")
{
md->setMemberSpecifiers(VhdlDocGen::LIBRARY);
}
- else if (qstrcmp(md->typeString(),"use")==0)
+ else if (md->typeString()=="use")
{
md->setMemberSpecifiers(VhdlDocGen::USE);
}
- else if (qstricmp(md->typeString(),"misc")==0)
+ else if (md->typeString().lower()=="misc")
{
md->setMemberSpecifiers(VhdlDocGen::MISCELLANEOUS);
}
- else if (qstricmp(md->typeString(),"ucf_const")==0)
+ else if (md->typeString().lower()=="ucf_const")
{
md->setMemberSpecifiers(VhdlDocGen::UCF_CONST);
}
@@ -1692,7 +1697,7 @@ bool VhdlDocGen::writeVHDLTypeDocumentation(const MemberDef* mdef, const Definit
return hasParams;
}
-void VhdlDocGen::writeTagFile(MemberDefMutable *mdef,FTextStream &tagFile)
+void VhdlDocGen::writeTagFile(MemberDefMutable *mdef,TextStream &tagFile)
{
tagFile << " <member kind=\"";
if (VhdlDocGen::isGeneric(mdef)) tagFile << "generic";
@@ -1717,21 +1722,21 @@ void VhdlDocGen::writeTagFile(MemberDefMutable *mdef,FTextStream &tagFile)
if (VhdlDocGen::isAlias(mdef)) tagFile << "alias";
if (VhdlDocGen::isCompInst(mdef)) tagFile << "configuration";
- tagFile << "\">" << endl;
- tagFile << " <type>" << convertToXML(mdef->typeString()) << "</type>" << endl;
- tagFile << " <name>" << convertToXML(mdef->name()) << "</name>" << endl;
- tagFile << " <anchorfile>" << convertToXML(mdef->getOutputFileBase()) << Doxygen::htmlFileExtension << "</anchorfile>" << endl;
- tagFile << " <anchor>" << convertToXML(mdef->anchor()) << "</anchor>" << endl;
+ tagFile << "\">\n";
+ tagFile << " <type>" << convertToXML(mdef->typeString()) << "</type>\n";
+ tagFile << " <name>" << convertToXML(mdef->name()) << "</name>\n";
+ tagFile << " <anchorfile>" << convertToXML(mdef->getOutputFileBase()) << Doxygen::htmlFileExtension << "</anchorfile>\n";
+ tagFile << " <anchor>" << convertToXML(mdef->anchor()) << "</anchor>\n";
if (VhdlDocGen::isVhdlFunction(mdef))
- tagFile << " <arglist>" << convertToXML(VhdlDocGen::convertArgumentListToString(mdef->argumentList(),TRUE)) << "</arglist>" << endl;
+ tagFile << " <arglist>" << convertToXML(VhdlDocGen::convertArgumentListToString(mdef->argumentList(),TRUE)) << "</arglist>\n";
else if (VhdlDocGen::isProcedure(mdef))
- tagFile << " <arglist>" << convertToXML(VhdlDocGen::convertArgumentListToString(mdef->argumentList(),FALSE)) << "</arglist>" << endl;
+ tagFile << " <arglist>" << convertToXML(VhdlDocGen::convertArgumentListToString(mdef->argumentList(),FALSE)) << "</arglist>\n";
else
- tagFile << " <arglist>" << convertToXML(mdef->argsString()) << "</arglist>" << endl;
+ tagFile << " <arglist>" << convertToXML(mdef->argsString()) << "</arglist>\n";
mdef->writeDocAnchorsToTagFile(tagFile);
- tagFile << " </member>" << endl;
+ tagFile << " </member>\n";
}
/* writes a vhdl type declaration */
@@ -1772,8 +1777,8 @@ void VhdlDocGen::writeVHDLDeclaration(const MemberDefMutable* mdef,OutputList &o
// start a new member declaration
uint isAnonymous = (bool)(annoClassDef); // || m_impl->annMemb || m_impl->annEnumType;
- ///printf("startMemberItem for %s\n",name().data());
- int mm=mdef->getMemberSpecifiers();
+ ///printf("startMemberItem for %s\n",qPrint(name()));
+ uint64_t mm=mdef->getMemberSpecifiers();
if (mm==VhdlDocGen::MISCELLANEOUS)
isAnonymous=3;
@@ -1783,7 +1788,7 @@ void VhdlDocGen::writeVHDLDeclaration(const MemberDefMutable* mdef,OutputList &o
bool detailsVisible = mdef->isDetailedSectionLinkable();
if (!detailsVisible) // && !m_impl->annMemb)
{
- QCString doxyName=mdef->name().copy();
+ QCString doxyName=mdef->name();
if (!cname.isEmpty()) doxyName.prepend(cname+"::");
QCString doxyArgs=mdef->argsString();
ol.startDoxyAnchor(cfname,cname,mdef->anchor(),doxyName,doxyArgs);
@@ -1842,12 +1847,12 @@ void VhdlDocGen::writeVHDLDeclaration(const MemberDefMutable* mdef,OutputList &o
ol.docify(" ");
QCString name=theTranslator_vhdlType(VhdlDocGen::PACKAGE,TRUE);
ol.startBold();
- ol.docify(name.data());
+ ol.docify(name);
name.resize(0);
ol.endBold();
name+=" <"+mdef->name()+">";
ol.startEmphasis();
- ol.writeObjectLink(kl->getReference(),kl->getOutputFileBase(),0,name.data());
+ ol.writeObjectLink(kl->getReference(),kl->getOutputFileBase(),QCString(),name);
ol.popGeneratorState();
}
break;
@@ -1910,7 +1915,7 @@ void VhdlDocGen::writeVHDLDeclaration(const MemberDefMutable* mdef,OutputList &o
}
largs.prepend("::");
- largs.prepend(mdef->name().data());
+ largs.prepend(mdef->name());
ol.writeObjectLink(mdef->getReference(),
cfname,
mdef->anchor(),
@@ -1937,7 +1942,7 @@ void VhdlDocGen::writeVHDLDeclaration(const MemberDefMutable* mdef,OutputList &o
{
nn=mdef->name();
}
- kl=getClass(nn.data());
+ kl=getClass(nn);
if (kl)
{
nn=kl->getOutputFileBase();
@@ -1953,7 +1958,7 @@ void VhdlDocGen::writeVHDLDeclaration(const MemberDefMutable* mdef,OutputList &o
{
name+=mdef->name()+"> ";
}
- ol.writeObjectLink(kl->getReference(),kl->getOutputFileBase(),0,name.data());
+ ol.writeObjectLink(kl->getReference(),kl->getOutputFileBase(),QCString(),name);
ol.endEmphasis();
ol.popGeneratorState();
}
@@ -2000,17 +2005,15 @@ void VhdlDocGen::writeVHDLDeclaration(const MemberDefMutable* mdef,OutputList &o
ol.endDoxyAnchor(cfname,mdef->anchor());
}
- // name().data(),annoClassDef,annEnumType);
- // if(mm!=VhdlDocGen::MISCELLANEOUS)
ol.endMemberItem();
if (!mdef->briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC) /* && !annMemb */)
{
QCString s=mdef->briefDescription();
- ol.startMemberDescription(mdef->anchor(), NULL, mm == VhdlDocGen::PORT);
+ ol.startMemberDescription(mdef->anchor(), QCString(), mm == VhdlDocGen::PORT);
ol.generateDoc(mdef->briefFile(),mdef->briefLine(),
mdef->getOuterScope()?mdef->getOuterScope():d,
- mdef,s.data(),TRUE,FALSE,
- 0,TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ mdef,s,TRUE,FALSE,
+ QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
if (detailsVisible)
{
ol.pushGeneratorState();
@@ -2023,7 +2026,7 @@ void VhdlDocGen::writeVHDLDeclaration(const MemberDefMutable* mdef,OutputList &o
}
else // local link
{
- ol.startTextLink(0,mdef->anchor());
+ ol.startTextLink(QCString(),mdef->anchor());
}
ol.endTextLink();
//ol.startEmphasis();
@@ -2039,7 +2042,7 @@ void VhdlDocGen::writeVHDLDeclaration(const MemberDefMutable* mdef,OutputList &o
void VhdlDocGen::writePlainVHDLDeclarations(
const MemberList* mlist,OutputList &ol,
- const ClassDef *cd,const NamespaceDef *nd,const FileDef *fd,const GroupDef *gd,int specifier)
+ const ClassDef *cd,const NamespaceDef *nd,const FileDef *fd,const GroupDef *gd,uint64_t specifier)
{
StringSet pack;
@@ -2050,7 +2053,7 @@ void VhdlDocGen::writePlainVHDLDeclarations(
MemberDefMutable *md = toMemberDefMutable(imd);
if (md)
{
- int mems=md->getMemberSpecifiers();
+ uint64_t mems=md->getMemberSpecifiers();
if (md->isBriefSectionVisible() && (mems==specifier) && (mems!=VhdlDocGen::LIBRARY) )
{
if (first) { ol.startMemberList();first=FALSE; }
@@ -2092,22 +2095,22 @@ static bool membersHaveSpecificType(const MemberList *ml,uint64 type)
void VhdlDocGen::writeVHDLDeclarations(const MemberList* ml,OutputList &ol,
const ClassDef *cd,const NamespaceDef *nd,const FileDef *fd,const GroupDef *gd,
- const char *title,const char *subtitle,bool /*showEnumValues*/,int type)
+ const QCString &title,const QCString &subtitle,bool /*showEnumValues*/,int type)
{
if (!membersHaveSpecificType(ml,type)) return;
- if (title)
+ if (!title.isEmpty())
{
ol.startMemberHeader(convertToId(title),type == VhdlDocGen::PORT ? 3 : 2);
ol.parseText(title);
ol.endMemberHeader();
ol.docify(" ");
}
- if (subtitle && subtitle[0]!=0)
+ if (!subtitle.isEmpty())
{
ol.startMemberSubtitle();
ol.generateDoc("[generated]",-1,0,0,subtitle,FALSE,FALSE,
- 0,TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
ol.endMemberSubtitle();
} //printf("memberGroupList=%p\n",memberGroupList);
@@ -2117,7 +2120,7 @@ void VhdlDocGen::writeVHDLDeclarations(const MemberList* ml,OutputList &ol,
{
if (membersHaveSpecificType(&mg->members(),type))
{
- //printf("mg->header=%s\n",mg->header().data());
+ //printf("mg->header=%s\n",qPrint(mg->header()));
bool hasHeader=mg->header()!="[NOHEADER]";
ol.startMemberGroupHeader(hasHeader);
if (hasHeader)
@@ -2130,7 +2133,7 @@ void VhdlDocGen::writeVHDLDeclarations(const MemberList* ml,OutputList &ol,
//printf("Member group has docs!\n");
ol.startMemberGroupDocs();
ol.generateDoc("[generated]",-1,0,0,mg->documentation()+"\n",FALSE,FALSE,
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
ol.endMemberGroupDocs();
}
ol.startMemberGroup();
@@ -2149,7 +2152,7 @@ bool VhdlDocGen::writeClassType( const ClassDef * cd,
QCString qcs = theTranslator->trVhdlType(id+2,TRUE);
cname=VhdlDocGen::getClassName(cd);
ol.startBold();
- ol.writeString(qcs.data());
+ ol.writeString(qcs);
ol.writeString(" ");
ol.endBold();
//ol.insertMemberAlign();
@@ -2212,11 +2215,11 @@ void VhdlDocGen::writeSource(const MemberDefMutable *mdef,OutputList& ol,const Q
ol.pushGeneratorState();
ol.startCodeFragment("DoxyCode");
intf->parseCode( ol, // codeOutIntf
- 0, // scope
+ QCString(), // scope
codeFragment, // input
SrcLangExt_VHDL, // lang
FALSE, // isExample
- 0, // exampleName
+ QCString(), // exampleName
const_cast<FileDef*>(mdef->getFileDef()), // fileDef
mdef->getStartBodyLine(), // startLine
mdef->getEndBodyLine(), // endLine
@@ -2258,7 +2261,7 @@ QCString VhdlDocGen::convertFileNameToClassName(QCString name)
return n;
}
-void VhdlDocGen::parseUCF(const char* input, Entry* entity,QCString fileName,bool altera)
+void VhdlDocGen::parseUCF(const char* input, Entry* entity,const QCString &fileName,bool altera)
{
QCString ucFile(input);
int lineNo=0;
@@ -2293,18 +2296,18 @@ void VhdlDocGen::parseUCF(const char* input, Entry* entity,QCString fileName,b
temp.stripPrefix("set_location_assignment");
- initUCF(entity,0,temp,lineNo,fileName,brief);
+ initUCF(entity,QCString(),temp,lineNo,fileName,brief);
}
else
{
static const reg::Ex ee(R"([\s=])");
int in=findIndex(temp.str(),ee);
QCString ff=temp.left(in);
- temp.stripPrefix(ff.data());
+ temp.stripPrefix(ff);
ff.append("#");
if (!temp.isEmpty())
{
- initUCF(entity,ff.data(),temp,lineNo,fileName,brief);
+ initUCF(entity,ff,temp,lineNo,fileName,brief);
}
}
}
@@ -2314,11 +2317,11 @@ void VhdlDocGen::parseUCF(const char* input, Entry* entity,QCString fileName,b
}// while
}
-static void initUCF(Entry* root,const char* type,QCString & qcs,int line,QCString & fileName,QCString & brief)
+static void initUCF(Entry* root,const QCString &type,QCString &qcs,
+ int line,const QCString &fileName,QCString & brief)
{
if (qcs.isEmpty())return;
QCString n;
- // bool bo=(qstricmp(type,qcs.data())==0);
VhdlDocGen::deleteAllChars(qcs,';');
qcs=qcs.stripWhiteSpace();
@@ -2330,7 +2333,6 @@ static void initUCF(Entry* root,const char* type,QCString & qcs,int line,QCStr
{
n=type;
VhdlDocGen::deleteAllChars(n,'#');
- type="";
}
else
{
@@ -2358,7 +2360,7 @@ static void initUCF(Entry* root,const char* type,QCString & qcs,int line,QCStr
}
current->name= n+"_";
- current->name.append(VhdlDocGen::getRecordNumber().data());
+ current->name.append(VhdlDocGen::getRecordNumber());
if (!brief.isEmpty())
{
@@ -2382,7 +2384,7 @@ static void writeUCFLink(const MemberDef* mdef,OutputList &ol)
if (!equ)
{
- ol.writeString(n.data());
+ ol.writeString(n);
ol.docify(" ");
ol.insertMemberAlign();
}
@@ -2467,11 +2469,11 @@ QCString VhdlDocGen::parseForBinding(QCString & entity,QCString & arch)
// find class with upper/lower letters
-ClassDef* VhdlDocGen::findVhdlClass(const char *className )
+ClassDef* VhdlDocGen::findVhdlClass(const QCString &className )
{
for (const auto &cd : *Doxygen::classLinkedMap)
{
- if (qstricmp(className,cd->name().data())==0)
+ if (qstricmp(className.data(),qPrint(cd->name()))==0)
{
return cd.get();
}
@@ -2515,8 +2517,8 @@ void VhdlDocGen::computeVhdlComponentRelations()
entity=cur->type;
}
- ClassDefMutable *classEntity= toClassDefMutable(VhdlDocGen::findVhdlClass(entity.data()));
- inst=VhdlDocGen::getIndexWord(cur->args.data(),0);
+ ClassDefMutable *classEntity= toClassDefMutable(VhdlDocGen::findVhdlClass(entity));
+ inst=VhdlDocGen::getIndexWord(cur->args,0);
ClassDefMutable *cd=toClassDefMutable(Doxygen::classLinkedMap->find(inst));
ClassDefMutable *ar=toClassDefMutable(Doxygen::classLinkedMap->find(cur->args));
@@ -2526,7 +2528,7 @@ void VhdlDocGen::computeVhdlComponentRelations()
}
// if (classEntity==0)
- // err("%s:%d:Entity:%s%s",cur->fileName.data(),cur->startLine,entity.data()," could not be found");
+ // err("%s:%d:Entity:%s%s",qPrint(cur->fileName),cur->startLine,qPrint(entity)," could not be found");
addInstance(classEntity,ar,cd,cur);
}
@@ -2550,12 +2552,12 @@ static void addInstance(ClassDefMutable* classEntity, ClassDefMutable* ar,
if (classEntity==cd) return;
bName=classEntity->name();
- // fprintf(stderr,"\naddInstance %s to %s %s %s\n", classEntity->name().data(),cd->name().data(),ar->name().data(),cur->name);
- n1=classEntity->name().data();
+ // fprintf(stderr,"\naddInstance %s to %s %s %s\n",qPrint( classEntity->name()),qPrint(cd->name()),qPrint(ar->name()),cur->name);
+ n1=classEntity->name();
if (!cd->isBaseClass(classEntity, true, 0))
{
- cd->insertBaseClass(classEntity,n1,Public,Normal,0);
+ cd->insertBaseClass(classEntity,n1,Public,Normal,QCString());
}
else
{
@@ -2564,7 +2566,7 @@ static void addInstance(ClassDefMutable* classEntity, ClassDefMutable* ar,
if (!VhdlDocGen::isSubClass(classEntity,cd,true,0))
{
- classEntity->insertSubClass(cd,Public,Normal,0);
+ classEntity->insertSubClass(cd,Public,Normal,QCString());
classEntity->setLanguage(SrcLangExt_VHDL);
}
@@ -2572,14 +2574,14 @@ ferr:
QCString uu=cur->name;
std::unique_ptr<MemberDefMutable> md { createMemberDef(
ar->getDefFileName(), cur->startLine,cur->startColumn,
- n1,uu,uu, 0,
+ n1,uu,uu, QCString(),
Public, Normal, cur->stat,Member,
MemberType_Variable,
ArgumentList(),
ArgumentList(),
"") };
- if (ar->getOutputFileBase())
+ if (!ar->getOutputFileBase().isEmpty())
{
TagInfo tg;
tg.anchor = 0;
@@ -2588,13 +2590,13 @@ ferr:
md->setTagInfo(&tg);
}
- //fprintf(stderr,"\n%s%s%s\n",md->name().data(),cur->brief.data(),cur->doc.data());
+ //fprintf(stderr,"\n%s%s%s\n",qPrint(md->name()),qPrint(cur->brief),qPrint(cur->doc));
md->setLanguage(SrcLangExt_VHDL);
md->setMemberSpecifiers(VhdlDocGen::INSTANTIATION);
md->setBriefDescription(cur->brief,cur->briefFile,cur->briefLine);
md->setBodySegment(cur->startLine,cur->startLine,-1) ;
- md->setDocumentation(cur->doc.data(),cur->docFile.data(),cur->docLine);
+ md->setDocumentation(cur->doc,cur->docFile,cur->docLine);
FileDef *fd=ar->getFileDef();
md->setBodyDef(fd);
ar->insertMember(md.get());
@@ -2610,7 +2612,7 @@ void VhdlDocGen::writeRecordUnit(QCString & largs,QCString & ltype,OutputList&
if (i>0)
{
//sets the real record member name
- const_cast<MemberDefMutable*>(mdef)->setName(mdef->name().left(i).data());
+ const_cast<MemberDefMutable*>(mdef)->setName(mdef->name().left(i));
}
writeLink(mdef,ol);
@@ -2629,14 +2631,14 @@ void VhdlDocGen::writeRecUnitDocu(
QCString largs)
{
- QCStringList ql=QCStringList::split("#",largs);
- uint len=ql.count();
+ StringVector ql=split(largs.str(),"#");
+ size_t len=ql.size();
ol.startParameterList(TRUE);
bool first=TRUE;
- for(uint i=0;i<len;i++)
+ for(size_t i=0;i<len;i++)
{
- QCString n=ql[i];
+ QCString n=QCString(ql[i]);
ol.startParameterType(first,"");
ol.endParameterType();
ol.startParameterName(TRUE);
@@ -2660,7 +2662,7 @@ void VhdlDocGen::writeRecUnitDocu(
bool VhdlDocGen::isSubClass(ClassDef* cd,ClassDef *scd, bool followInstances,int level)
{
bool found=FALSE;
- //printf("isBaseClass(cd=%s) looking for %s\n",name().data(),bcd->name().data());
+ //printf("isBaseClass(cd=%s) looking for %s\n",qPrint(name()),qPrint(bcd->name()));
if (level>255)
{
err("Possible recursive class relation while inside %s and looking for %s\n",qPrint(cd->name()),qPrint(scd->name()));
@@ -2672,7 +2674,7 @@ bool VhdlDocGen::isSubClass(ClassDef* cd,ClassDef *scd, bool followInstances,int
{
const ClassDef *ccd=bcd.classDef;
if (!followInstances && ccd->templateMaster()) ccd=ccd->templateMaster();
- //printf("isSubClass() subclass %s\n",ccd->name().data());
+ //printf("isSubClass() subclass %s\n",qPrint(ccd->name()));
if (ccd==scd)
{
found=TRUE;
@@ -2751,12 +2753,12 @@ void VhdlDocGen::createFlowChart(const MemberDef *mdef)
mdList.push_back(mdef);
}
- //fprintf(stderr,"\n create flow mem %s %p\n",mdef->name().data(),mdef);
+ //fprintf(stderr,"\n create flow mem %s %p\n",qPrint(mdef->name()),mdef);
int actualStart= mdef->getStartBodyLine();
int actualEnd=mdef->getEndBodyLine();
const FileDef* fd=mdef->getFileDef();
- bool b=readCodeFragment( fd->absFilePath().data(), actualStart,actualEnd,codeFragment);
+ bool b=readCodeFragment( fd->absFilePath(), actualStart,actualEnd,codeFragment);
if (!b) return;
auto parser { Doxygen::parserManager->getOutlineParser(".vhd") };
@@ -2895,7 +2897,7 @@ void alignText(QCString & q)
q.append(" ...");
- QCString str(q.data());
+ QCString str(q);
QCString temp;
while (str.length()>80)
@@ -2939,7 +2941,7 @@ void FlowChart::printNode(const FlowChart& flo)
q=" ";
}
QCString nn=flo.exp.stripWhiteSpace();
- printf("\nYES: %s%s[%d,%d]",q.data(),nn.data(),flo.stamp,flo.id);
+ printf("\nYES: %s%s[%d,%d]",qPrint(q),qPrint(nn),flo.stamp,flo.id);
}
else
{
@@ -3028,7 +3030,7 @@ void FlowChart::colTextNodes()
const FlowChart &ftemp = flowList[j+1];
if (ftemp.type & EMPTY)
{
- FlowChart fc(TEXT_NO,"empty ",0);
+ FlowChart fc(TEXT_NO,"empty ",QCString());
fc.stamp = flo.stamp;
flowList.insert(flowList.begin()+j+1,fc);
}
@@ -3052,18 +3054,18 @@ void FlowChart::delFlowList()
flowList.clear();
}
-void FlowChart::alignCommentNode(FTextStream &t,QCString com)
+void FlowChart::alignCommentNode(TextStream &t,QCString com)
{
uint max=0;
QCString s;
- QCStringList ql=QCStringList::split("\n",com);
- for (uint j=0;j<ql.count();j++)
+ StringVector ql=split(com.str(),"\n");
+ for (size_t j=0;j<ql.size();j++)
{
- s=(QCString)ql[j];
+ s=ql[j];
if (max<s.length()) max=s.length();
}
- s=ql.last();
+ s=ql.back();
int diff=max-s.length();
QCString n(1);
@@ -3072,23 +3074,23 @@ void FlowChart::alignCommentNode(FTextStream &t,QCString com)
n.fill(' ',2*diff);
n.append(".");
s+=n;
- ql.remove(ql.last());
- ql.append(s);
+ ql.pop_back();
+ ql.push_back(s.str());
}
- for (uint j=0;j<ql.count();j++)
+ for (size_t j=0;j<ql.size();j++)
{
s=ql[j];
- if (j<ql.count()-1)
+ if (j<ql.size()-1)
{
s+="\n";
}
- FlowChart::codify(t,s.data());
+ FlowChart::codify(t,s);
}
}
-void FlowChart::buildCommentNodes(FTextStream & t)
+void FlowChart::buildCommentNodes(TextStream & t)
{
size_t size=flowList.size();
bool begin=false;
@@ -3173,11 +3175,11 @@ void FlowChart::buildCommentNodes(FTextStream & t)
}// for;
}
-void FlowChart::codify(FTextStream &t,const char *str)
+void FlowChart::codify(TextStream &t,const QCString &str)
{
- if (str)
+ if (!str.isEmpty())
{
- const char *p=str;
+ const char *p=str.data();
char c;
while (*p)
{
@@ -3200,7 +3202,7 @@ FlowChart::~FlowChart()
{
}
-FlowChart::FlowChart(int typ,const char * t,const char* ex,const char* lab)
+FlowChart::FlowChart(int typ,const QCString &t,const QCString &ex,const QCString &lab)
{
stamp=ifcounter;
@@ -3227,7 +3229,7 @@ FlowChart::FlowChart(int typ,const char * t,const char* ex,const char* lab)
id=nodeCounter++;
}
-void FlowChart::addFlowChart(int type,const char* text,const char* exp, const char *label)
+void FlowChart::addFlowChart(int type,const QCString &text,const QCString &exp, const QCString &label)
{
if (!VhdlDocGen::getFlowMember()) return;
@@ -3235,12 +3237,12 @@ void FlowChart::addFlowChart(int type,const char* text,const char* exp, const ch
QCString expression(exp);
- if (text)
+ if (!text.isEmpty())
{
typeString=substitute(typeString,";","\n");
}
- if (exp)
+ if (!exp.isEmpty())
{
expression=substitute(expression,"\"","\\\"");
}
@@ -3386,7 +3388,7 @@ void FlowChart::createSVG()
//const MemberDef *m=VhdlDocGen::getFlowMember();
//if (m)
- // fprintf(stderr,"\n creating flowchart : %s %s in file %s \n",theTranslator->trVhdlType(m->getMemberSpecifiers(),TRUE),m->name().data(),m->getFileDef()->name().data());
+ // fprintf(stderr,"\n creating flowchart : %s %s in file %s \n",theTranslator->trVhdlType(m->getMemberSpecifiers(),TRUE),qPrint(m->name()),qPrint(m->getFileDef()->name()));
QCString dir=" -o \""+ov+qcs+"\"";
ov+="/flow_design.dot";
@@ -3399,7 +3401,7 @@ void FlowChart::createSVG()
}
}
-void FlowChart::startDot(FTextStream &t)
+void FlowChart::startDot(TextStream &t)
{
t << " digraph G { \n";
t << "rankdir=TB \n";
@@ -3407,7 +3409,7 @@ void FlowChart::startDot(FTextStream &t)
t << "stylesheet=\"doxygen.css\"\n";
}
-void FlowChart::endDot(FTextStream &t)
+void FlowChart::endDot(TextStream &t)
{
t << " } \n";
}
@@ -3418,14 +3420,13 @@ void FlowChart::writeFlowChart()
QCString ov = Config_getString(HTML_OUTPUT);
QCString fileName = ov+"/flow_design.dot";
- QFile f(fileName);
- FTextStream t(&f);
-
- if (!f.open(IO_WriteOnly))
+ std::ofstream f(fileName.str(),std::ofstream::out | std::ofstream::binary);
+ if (!f.is_open())
{
- err("Cannot open file %s for writing\n",fileName.data());
+ err("Cannot open file %s for writing\n",qPrint(fileName));
return;
}
+ TextStream t(&f);
colTextNodes();
// buildCommentNodes(t);
@@ -3438,6 +3439,7 @@ void FlowChart::writeFlowChart()
{
printUmlTree();
delFlowList();
+ t.flush();
f.close();
return;
}
@@ -3452,11 +3454,12 @@ void FlowChart::writeFlowChart()
FlowChart::endDot(t);
delFlowList();
+ t.flush();
f.close();
FlowChart::createSVG();
}// writeFlowChart
-void FlowChart::writeShape(FTextStream &t,const FlowChart &fl)
+void FlowChart::writeShape(TextStream &t,const FlowChart &fl)
{
if (fl.type & EEND) return;
QCString var;
@@ -3497,7 +3500,7 @@ void FlowChart::writeShape(FTextStream &t,const FlowChart &fl)
QCString kl;
if (exit) kl=fl.text+" ";
- if (fl.label)
+ if (!fl.label.isEmpty())
{
kl+=fl.label+":"+exp+var;
}
@@ -3558,14 +3561,14 @@ void FlowChart::writeShape(FTextStream &t,const FlowChart &fl)
}
-void FlowChart::writeEdge(FTextStream &t,const FlowChart &fl_from,const FlowChart &fl_to,int i)
+void FlowChart::writeEdge(TextStream &t,const FlowChart &fl_from,const FlowChart &fl_to,int i)
{
bool b=fl_from.type & STARTL;
bool c=fl_to.type & STARTL;
#ifdef DEBUGFLOW
- QCString s1(getNodeName(fl_from.id).data());
- QCString s2(getNodeName(fl_to.id).data());
+ QCString s1(getNodeName(fl_from.id));
+ QCString s2(getNodeName(fl_to.id));
auto it = g_keyMap.find(s1.str());
auto it1 = g_keyMap.find(s2.str());
// checks if the link is connected to a valid node
@@ -3576,7 +3579,7 @@ void FlowChart::writeEdge(FTextStream &t,const FlowChart &fl_from,const FlowChar
writeEdge(t,fl_from.id,fl_to.id,i,b,c);
}
-void FlowChart::writeEdge(FTextStream &t,int fl_from,int fl_to,int i,bool bFrom,bool bTo)
+void FlowChart::writeEdge(TextStream &t,int fl_from,int fl_to,int i,bool bFrom,bool bTo)
{
QCString label,col;
@@ -3597,10 +3600,10 @@ void FlowChart::writeEdge(FTextStream &t,int fl_from,int fl_to,int i,bool bFrom,
}
t << "edge [color=\""+col+"\",label=\""+label+"\"]\n";
- t << getNodeName(fl_from).data();
+ t << getNodeName(fl_from);
if (bFrom) t << ":s";
t << "->";
- t << getNodeName(fl_to).data();
+ t << getNodeName(fl_to);
if (bTo) t << ":n";
t << "\n";
}
@@ -3631,7 +3634,7 @@ void FlowChart::alignFuncProc( QCString & q,const ArgumentList &al,bool isFunc)
attl+=arg.type;
if (--index) attl+=",\n"; else attl+="\n";
- attl.prepend(prev.data());
+ attl.prepend(prev);
temp+=attl;
}
@@ -3688,7 +3691,7 @@ size_t FlowChart::findLabel(size_t index,const QCString &label)
return j;
}
}
- err("could not find label: %s",label.data());
+ err("could not find label: %s",qPrint(label));
return 0;
}
@@ -3768,7 +3771,7 @@ size_t FlowChart::getNextIfLink(const FlowChart &fl,size_t index)
return getNextNode(endifNode,stamp);
}
-void FlowChart::writeFlowLinks(FTextStream &t)
+void FlowChart::writeFlowLinks(TextStream &t)
{
size_t size=flowList.size();
if (size<2) return;
@@ -3864,7 +3867,7 @@ void FlowChart::writeFlowLinks(FTextStream &t)
{
size_t z;
bool b = kind==NEXT_NO;
- if (fll.exp)
+ if (!fll.exp.isEmpty())
{
writeEdge(t,fll,flowList[j+1],1);
}
diff --git a/src/vhdldocgen.h b/src/vhdldocgen.h
index 3a55b45..207e449 100644
--- a/src/vhdldocgen.h
+++ b/src/vhdldocgen.h
@@ -21,7 +21,7 @@
* vhdl documents
*/
-#include <qcstring.h>
+#include "qcstring.h"
#include "layout.h"
#include "arguments.h"
#include "entry.h"
@@ -31,17 +31,17 @@ class ClassDef;
class MemberList;
class MemberDef;
class MemberDefMutable;
-class FTextStream;
class OutputList;
class Definition;
class GroupDef;
class FileDef;
class NamespaceDef;
+class TextStream;
struct Argument;
struct VhdlConfNode
{
- VhdlConfNode(const char* a,const char* b,const char* config,const char* cs,bool leaf)
+ VhdlConfNode(const QCString &a,const QCString &b,const QCString &config,const QCString &cs,bool leaf)
{
arch=a; // architecture e.g. for iobuffer
arch=arch.lower();
@@ -116,10 +116,10 @@ class VhdlDocGen
static bool isSubClass(ClassDef* cd,ClassDef *scd, bool followInstances,int level);
- static QCString getIndexWord(const char* ,int index);
+ static QCString getIndexWord(const QCString &,int index);
static bool deleteCharRev(QCString &s,char c);
static void deleteAllChars(QCString &s,char c);
- static void parseFuncProto(const char* text,
+ static void parseFuncProto(const QCString &text,
QCString& name,
QCString& ret,
bool doc=false);
@@ -136,13 +136,13 @@ class VhdlDocGen
static const MemberDef* findMemberDef(ClassDef* cd,
const QCString& key,
MemberListType type);
- static ClassDef *getClass(const char *name);
+ static ClassDef *getClass(const QCString &name);
static const MemberDef* findFunction(const QCString& name,
const QCString& package);
static QCString getClassTitle(const ClassDef*);
static void writeInlineClassLink(const ClassDef*,
OutputList &ol);
- static void writeTagFile(MemberDefMutable *mdef,FTextStream &tagFile);
+ static void writeTagFile(MemberDefMutable *mdef,TextStream &tagFile);
static bool isConstraint(const MemberDef *mdef);
static bool isConfig(const MemberDef *mdef);
@@ -194,11 +194,11 @@ class VhdlDocGen
static void writePlainVHDLDeclarations(const MemberList* ml,OutputList &ol,
const ClassDef *cd,const NamespaceDef *nd,const FileDef *fd,const GroupDef *gd,
- int specifier);
+ uint64_t specifier);
static void writeVHDLDeclarations(const MemberList* ml,OutputList &ol,
const ClassDef *cd,const NamespaceDef *nd,const FileDef *fd,const GroupDef *gd,
- const char *title,const char *subtitle,bool showEnumValues,int type);
+ const QCString &title,const QCString &subtitle,bool showEnumValues,int type);
static bool writeClassType(const ClassDef *,OutputList &ol ,QCString & cname);
@@ -210,10 +210,9 @@ class VhdlDocGen
static bool isNumber(const std::string& s);
static QCString getProtectionName(int prot);
- static void parseUCF(const char* input,Entry* entity,QCString f,bool vendor);
+ static void parseUCF(const char* input,Entry* entity,const QCString &f,bool vendor);
static const ClassDef* findArchitecture(const ClassDef *cd);
- //static const ClassDef* findArchitecture(QCString identifier, QCString entity_name);
static void correctMemberProperties(MemberDefMutable *md);
@@ -222,14 +221,14 @@ class VhdlDocGen
static QCString parseForConfig(QCString & entity,QCString & arch);
static QCString parseForBinding(QCString & entity,QCString & arch);
static void addBaseClass(ClassDef* cd,ClassDef *ent);
- static ClassDef* findVhdlClass(const char *className );
+ static ClassDef* findVhdlClass(const QCString &className );
static void writeOverview(OutputList &ol);
static void writeOverview();
// flowcharts
static void createFlowChart(const MemberDef*);
- //static void addFlowImage(const FTextStream &,const QCString &);
+ //static void addFlowImage(const TextStream &,const QCString &);
static void setFlowMember( const MemberDef *flowMember);
static const MemberDef *getFlowMember();
@@ -289,13 +288,13 @@ class FlowChart
//---------- create svg -------------------------------------------------------------
static void createSVG();
- static void startDot(FTextStream &t);
- static void endDot(FTextStream &t);
- static void codify(FTextStream &t,const char *str);
- static void writeShape(FTextStream &t,const FlowChart &fl);
- static void writeEdge(FTextStream &t,int fl_from,int fl_to,int i,bool bFrom=FALSE,bool bTo=FALSE);
- static void writeEdge(FTextStream &t,const FlowChart &fl_from,const FlowChart &fl_to,int i);
- static void writeFlowLinks(FTextStream &t);
+ static void startDot(TextStream &t);
+ static void endDot(TextStream &t);
+ static void codify(TextStream &t,const QCString &str);
+ static void writeShape(TextStream &t,const FlowChart &fl);
+ static void writeEdge(TextStream &t,int fl_from,int fl_to,int i,bool bFrom=FALSE,bool bTo=FALSE);
+ static void writeEdge(TextStream &t,const FlowChart &fl_from,const FlowChart &fl_to,int i);
+ static void writeFlowLinks(TextStream &t);
static QCString getNodeName(int n);
static void colTextNodes();
@@ -310,7 +309,7 @@ class FlowChart
static void delFlowList();
static const char* getNodeType(int c);
- static void addFlowChart(int type,const char* text,const char* exp,const char * label=0);
+ static void addFlowChart(int type,const QCString &text,const QCString &exp,const QCString &label=QCString());
static void moveToPrevLevel();
static int getTimeStamp();
static void writeFlowChart();
@@ -318,13 +317,13 @@ class FlowChart
static QCString convertNameToFileName();
static void printNode(const FlowChart& n);
static void printFlowTree();
- static void buildCommentNodes(FTextStream &t);
- static void alignCommentNode(FTextStream &t,QCString com);
+ static void buildCommentNodes(TextStream &t);
+ static void alignCommentNode(TextStream &t,QCString com);
static void printUmlTree();
static QCString printPlantUmlNode(const FlowChart &flo,bool,bool);
- FlowChart(int typ,const char* t,const char* ex,const char* label=0);
+ FlowChart(int typ,const QCString &t,const QCString &ex,const QCString &label=QCString());
~FlowChart();
private:
diff --git a/src/vhdljjparser.cpp b/src/vhdljjparser.cpp
index 9eaf167..963f3ec 100644
--- a/src/vhdljjparser.cpp
+++ b/src/vhdljjparser.cpp
@@ -12,8 +12,7 @@
#include <string>
-#include <qcstring.h>
-#include <qfileinfo.h>
+#include "qcstring.h"
#include "containers.h"
#include "vhdljjparser.h"
#include "vhdldocgen.h"
@@ -58,7 +57,7 @@ static EntryList g_instFiles;
struct VHDLOutlineParser::Private
{
- void parseVhdlfile(const char *fileName,const char* inputBuffer,bool inLine);
+ void parseVhdlfile(const QCString &fileName,const char* inputBuffer,bool inLine);
VHDLOutlineParser *thisParser = 0;
VhdlParser *vhdlParser = 0;
@@ -87,20 +86,20 @@ struct VHDLOutlineParser::Private
};
-void VHDLOutlineParser::Private::parseVhdlfile(const char *fileName,
+void VHDLOutlineParser::Private::parseVhdlfile(const QCString &fileName,
const char* inputBuffer,bool inLine)
{
JAVACC_STRING_TYPE s =inputBuffer;
CharStream *stream = new CharStream(s.c_str(), (int)s.size(), 1, 1);
VhdlParserTokenManager *tokenManager = new VhdlParserTokenManager(stream);
- VhdlTokenManagerErrorHandler *tokErrHandler=new VhdlTokenManagerErrorHandler(fileName);
+ VhdlTokenManagerErrorHandler *tokErrHandler=new VhdlTokenManagerErrorHandler(fileName.data());
vhdlParser=new VhdlParser(tokenManager);
vhdlParser->setOutlineParser(thisParser);
vhdlParser->setSharedState(&shared);
tokenManager->setLexParser(vhdlParser);
tokenManager->ReInit(stream,0);
tokenManager->setErrorHandler(tokErrHandler);
- VhdlErrorHandler *parserErrHandler=new VhdlErrorHandler(fileName);
+ VhdlErrorHandler *parserErrHandler=new VhdlErrorHandler(fileName.data());
vhdlParser->setErrorHandler(parserErrHandler);
try
{
@@ -130,7 +129,7 @@ VHDLOutlineParser::~VHDLOutlineParser()
{
}
-void VHDLOutlineParser::parseInput(const char *fileName,const char *fileBuf,
+void VHDLOutlineParser::parseInput(const QCString &fileName,const char *fileBuf,
const std::shared_ptr<Entry> &root, ClangTUParser *)
{
VhdlParser::SharedState *s = &p->shared;
@@ -139,7 +138,7 @@ void VHDLOutlineParser::parseInput(const char *fileName,const char *fileBuf,
// fprintf(stderr,"\n ============= %s\n ==========\n",fileBuf);
- bool inLine = (fileName==0 || strlen(fileName)==0);
+ bool inLine = fileName.isEmpty();
p->yyFileName=fileName;
@@ -253,8 +252,9 @@ static int idCounter;
* end;
*/
-QString VHDLOutlineParser::getNameID(){
- return QString::number(idCounter++,10);
+QCString VHDLOutlineParser::getNameID()
+{
+ return QCString().setNum(idCounter++);
}
void VHDLOutlineParser::handleFlowComment(const char* doc)
@@ -266,7 +266,7 @@ void VHDLOutlineParser::handleFlowComment(const char* doc)
QCString qcs(doc);
qcs=qcs.stripWhiteSpace();
qcs.stripPrefix("--#");
- FlowChart::addFlowChart(FlowChart::COMMENT_NO,0,0,qcs.data());
+ FlowChart::addFlowChart(FlowChart::COMMENT_NO,QCString(),QCString(),qcs);
}
}
@@ -318,12 +318,13 @@ int VHDLOutlineParser::checkInlineCode(QCString &doc)
code = stripLeadingAndTrailingEmptyLines(code, iLine);
int val = code.contains('\n');
VhdlDocGen::prepareComment(p->strComment);
- QCStringList ql = QCStringList::split('\n', p->strComment);
+ StringVector ql = split(p->strComment.str(),"\n");
QCString co;
QCString na;
- for (QCString qcs : ql)
+ for (const auto &qcs_ : ql)
{
+ QCString qcs(qcs_);
qcs = qcs.simplifyWhiteSpace();
if (findRe(qcs,csRe)!=-1)
{
@@ -379,7 +380,7 @@ int VHDLOutlineParser::checkInlineCode(QCString &doc)
return 1;
}
-void VHDLOutlineParser::handleCommentBlock(const char *doc1, bool brief)
+void VHDLOutlineParser::handleCommentBlock(const QCString &doc1, bool brief)
{
int position = 0;
bool needsEntry = FALSE;
@@ -461,7 +462,7 @@ void VHDLOutlineParser::handleCommentBlock(const char *doc1, bool brief)
p->strComment.resize(0);
}
-void VHDLOutlineParser::parsePrototype(const char *text)
+void VHDLOutlineParser::parsePrototype(const QCString &text)
{
p->varName=text;
p->varr=TRUE;
@@ -521,9 +522,9 @@ void VHDLOutlineParser::addVhdlType(const char *n,int startLine,int section,
spec= VhdlDocGen::GENERIC;
}
- QCStringList ql=QCStringList::split(",",name);
+ StringVector ql=split(name.str(),",");
- for (uint u=0;u<ql.count();u++)
+ for (size_t u=0;u<ql.size();u++)
{
s->current->name=ql[u];
s->current->startLine=startLine;
@@ -583,11 +584,11 @@ void VHDLOutlineParser::createFunction(const char *imp,uint64 spec,const char *f
VhdlDocGen::deleteAllChars(s->current->args,' ');
if (!fname.isEmpty())
{
- QCStringList q1=QCStringList::split(",",fname);
- for (uint ii=0;ii<q1.count();ii++)
+ StringVector q1=split(fname.str(),",");
+ for (const auto &name : q1)
{
Argument arg;
- arg.name=q1[ii];
+ arg.name=name;
s->current->argList.push_back(arg);
}
}
@@ -617,7 +618,7 @@ void VHDLOutlineParser::pushLabel( QCString &label,QCString & val)
QCString VHDLOutlineParser::popLabel(QCString & q)
{
int i=q.findRev("|");
- if (i<0) return "";
+ if (i<0) return QCString();
q = q.left(i);
return q;
}
@@ -630,12 +631,12 @@ void VHDLOutlineParser::addProto(const char *s1,const char *s2,const char *s3,
VhdlParser::SharedState *s = &p->shared;
(void)s5; // avoid unused warning
QCString name=s2;
- QCStringList ql=QCStringList::split(",",name);
+ StringVector ql=split(name.str(),",");
- for (uint u=0;u<ql.count();u++)
+ for (const auto &n : ql)
{
Argument arg;
- arg.name=ql[u];
+ arg.name=n;
if (s3)
{
arg.type=s3;
@@ -763,9 +764,9 @@ void VHDLOutlineParser::createFlow()
q+=")";
}
- q.prepend(VhdlDocGen::getFlowMember()->name().data());
+ q.prepend(VhdlDocGen::getFlowMember()->name());
- FlowChart::addFlowChart(FlowChart::START_NO,q,0);
+ FlowChart::addFlowChart(FlowChart::START_NO,q,QCString());
if (s->currP==VhdlDocGen::FUNCTION)
{
@@ -780,7 +781,7 @@ void VHDLOutlineParser::createFlow()
ret="end process ";
}
- FlowChart::addFlowChart(FlowChart::END_NO,ret,0);
+ FlowChart::addFlowChart(FlowChart::END_NO,ret,QCString());
// FlowChart::printFlowList();
FlowChart::writeFlowChart();
s->currP=0;
@@ -848,7 +849,7 @@ void VHDLOutlineParser::error_skipto(int kind)
p->vhdlParser->getNextToken(); // step to next token
op=p->vhdlParser->getToken(1); // get first token
if (op==0) break;
- //fprintf(stderr,"\n %s",t->image.data());
+ //fprintf(stderr,"\n %s",qPrint(t->image));
} while (op->kind != kind);
p->vhdlParser->clearError();
// The above loop consumes tokens all the way up to a token of
diff --git a/src/vhdljjparser.h b/src/vhdljjparser.h
index b074511..542f48d 100755
--- a/src/vhdljjparser.h
+++ b/src/vhdljjparser.h
@@ -4,7 +4,6 @@
#include <vector>
#include <memory>
#include <string>
-#include <qcstringlist.h>
#include "parserintf.h"
#include <stdio.h>
@@ -12,11 +11,11 @@
#include <assert.h>
#include <ctype.h>
-#include <qfile.h>
#include "types.h"
#include "entry.h"
#include "vhdldocgen.h"
#include "config.h"
+#include "util.h"
enum { GEN_SEC=0x1, PARAM_SEC,CONTEXT_SEC,PROTECTED_SEC } ;
//void parserVhdlfile(const char* inputBuffer);
@@ -30,13 +29,13 @@ class VHDLOutlineParser : public OutlineParserInterface
public:
VHDLOutlineParser();
virtual ~VHDLOutlineParser();
- void parseInput(const char * fileName,
+ void parseInput(const QCString &fileName,
const char *fileBuf,
const std::shared_ptr<Entry> &root,
ClangTUParser *clangParser);
bool needsPreprocessing(const QCString &) const { return TRUE; }
- void parsePrototype(const char *text);
+ void parsePrototype(const QCString &text);
// interface for generated parser code
@@ -51,7 +50,7 @@ class VHDLOutlineParser : public OutlineParserInterface
void createFunction(const char *impure,uint64 spec,const char *fname);
void addVhdlType(const char *n,int startLine,int section, uint64 spec,const char* args,const char* type,Protection prot);
void addCompInst(const char *n, const char* instName, const char* comp,int iLine);
- void handleCommentBlock(const char* doc,bool brief);
+ void handleCommentBlock(const QCString &doc,bool brief);
void handleFlowComment(const char*);
void initEntry(Entry *e);
void newEntry();
@@ -66,7 +65,7 @@ class VHDLOutlineParser : public OutlineParserInterface
void setMultCommentLine();
bool checkMultiComment(QCString& qcs,int line);
void insertEntryAtLine(std::shared_ptr<Entry> ce,int line);
- QString getNameID();
+ QCString getNameID();
int checkInlineCode(QCString & doc);
private:
struct Private;
diff --git a/src/xmlcode.h b/src/xmlcode.h
index 5a35506..93b05b7 100644
--- a/src/xmlcode.h
+++ b/src/xmlcode.h
@@ -33,11 +33,11 @@ class XMLCodeParser : public CodeParserInterface
XMLCodeParser();
virtual ~XMLCodeParser();
void parseCode(CodeOutputInterface &codeOutIntf,
- const char *scopeName,
+ const QCString &scopeName,
const QCString &input,
SrcLangExt,
bool isExampleBlock,
- const char *exampleName=0,
+ const QCString &exampleName=QCString(),
FileDef *fileDef=0,
int startLine=-1,
int endLine=-1,
diff --git a/src/xmlcode.l b/src/xmlcode.l
index 65406d4..ff3d247 100644
--- a/src/xmlcode.l
+++ b/src/xmlcode.l
@@ -246,7 +246,7 @@ static void startCodeLine(yyscan_t yyscanner)
yyextra->currentDefinition = d;
yyextra->currentMemberDef = yyextra->sourceFileDef->getSourceMember(yyextra->yyLineNr);
//yyextra->insideBody = false;
- yyextra->classScope = d->name().copy();
+ yyextra->classScope = d->name();
QCString lineAnchor;
lineAnchor.sprintf("l%05d",yyextra->yyLineNr);
if (yyextra->currentMemberDef)
@@ -260,13 +260,13 @@ static void startCodeLine(yyscan_t yyscanner)
{
yyextra->code->writeLineNumber(d->getReference(),
d->getOutputFileBase(),
- 0,yyextra->yyLineNr);
+ QCString(),yyextra->yyLineNr);
setCurrentDoc(yyscanner,lineAnchor);
}
}
else
{
- yyextra->code->writeLineNumber(0,0,0,yyextra->yyLineNr);
+ yyextra->code->writeLineNumber(QCString(),QCString(),QCString(),yyextra->yyLineNr);
}
}
@@ -395,11 +395,11 @@ void XMLCodeParser::resetCodeParserState()
}
void XMLCodeParser::parseCode(CodeOutputInterface &codeOutIntf,
- const char *scopeName,
+ const QCString &scopeName,
const QCString &input,
SrcLangExt,
bool isExampleBlock,
- const char *exampleName,
+ const QCString &exampleName,
FileDef *fileDef,
int startLine,
int endLine,
@@ -415,10 +415,10 @@ void XMLCodeParser::parseCode(CodeOutputInterface &codeOutIntf,
if (input.isEmpty()) return;
- printlex(yy_flex_debug, true, __FILE__, fileDef ? fileDef->fileName().data(): NULL);
+ printlex(yy_flex_debug, true, __FILE__, fileDef ? qPrint(fileDef->fileName()): NULL);
yyextra->code = &codeOutIntf;
- yyextra->inputString = input;
+ yyextra->inputString = input.data();
yyextra->inputPosition = 0;
yyextra->currentFontClass = 0;
yyextra->needsTermination = false;
@@ -443,7 +443,7 @@ void XMLCodeParser::parseCode(CodeOutputInterface &codeOutIntf,
if (isExampleBlock && fileDef==0)
{
// create a dummy filedef for the example
- yyextra->sourceFileDef = createFileDef("",(exampleName?exampleName:"generated"));
+ yyextra->sourceFileDef = createFileDef("",(!exampleName.isEmpty()?exampleName:QCString("generated")));
cleanupSourceDef = true;
}
@@ -471,7 +471,7 @@ void XMLCodeParser::parseCode(CodeOutputInterface &codeOutIntf,
yyextra->sourceFileDef=0;
}
- printlex(yy_flex_debug, false, __FILE__, fileDef ? fileDef->fileName().data(): NULL);
+ printlex(yy_flex_debug, false, __FILE__, fileDef ? qPrint(fileDef->fileName()): NULL);
}
diff --git a/src/xmldocvisitor.cpp b/src/xmldocvisitor.cpp
index 56d6f55..eb6269a 100644
--- a/src/xmldocvisitor.cpp
+++ b/src/xmldocvisitor.cpp
@@ -13,8 +13,6 @@
*
*/
-#include <qfileinfo.h>
-
#include "xmldocvisitor.h"
#include "docparser.h"
#include "language.h"
@@ -30,13 +28,14 @@
#include "htmlentity.h"
#include "emoji.h"
#include "filedef.h"
+#include "fileinfo.h"
static void visitCaption(XmlDocVisitor *parent, const DocNodeList &children)
{
for (const auto &n : children) n->accept(parent);
}
-static void visitPreStart(FTextStream &t, const char *cmd, bool doCaption,
+static void visitPreStart(TextStream &t, const char *cmd, bool doCaption,
XmlDocVisitor *parent, const DocNodeList &children,
const QCString &name, bool writeType, DocImage::Type type, const QCString &width,
const QCString &height, const QCString &alt = QCString(""), bool inlineImage = FALSE)
@@ -83,12 +82,12 @@ static void visitPreStart(FTextStream &t, const char *cmd, bool doCaption,
t << ">";
}
-static void visitPostEnd(FTextStream &t, const char *cmd)
+static void visitPostEnd(TextStream &t, const char *cmd)
{
- t << "</" << cmd << ">" << endl;
+ t << "</" << cmd << ">\n";
}
-XmlDocVisitor::XmlDocVisitor(FTextStream &t,CodeOutputInterface &ci,const char *langExt)
+XmlDocVisitor::XmlDocVisitor(TextStream &t,CodeOutputInterface &ci,const QCString &langExt)
: DocVisitor(DocVisitor_XML), m_t(t), m_ci(ci), m_insidePre(FALSE), m_hide(FALSE),
m_langExt(langExt)
{
@@ -332,8 +331,8 @@ void XmlDocVisitor::visit(DocInclude *inc)
case DocInclude::IncWithLines:
{
m_t << "<programlisting filename=\"" << inc->file() << "\">";
- QFileInfo cfi( inc->file() );
- FileDef *fd = createFileDef( cfi.dirPath().utf8(), cfi.fileName().utf8() );
+ FileInfo cfi( inc->file().str() );
+ FileDef *fd = createFileDef( cfi.dirPath(), cfi.fileName() );
getCodeParser(inc->extension()).parseCode(m_ci,inc->context(),
inc->text(),
langExt,
@@ -423,8 +422,8 @@ void XmlDocVisitor::visit(DocInclude *inc)
case DocInclude::SnipWithLines:
{
m_t << "<programlisting filename=\"" << inc->file() << "\">";
- QFileInfo cfi( inc->file() );
- FileDef *fd = createFileDef( cfi.dirPath().utf8(), cfi.fileName().utf8() );
+ FileInfo cfi( inc->file().str() );
+ FileDef *fd = createFileDef( cfi.dirPath(), cfi.fileName() );
getCodeParser(inc->extension()).parseCode(m_ci,
inc->context(),
extractBlock(inc->text(),inc->blockId()),
@@ -453,7 +452,7 @@ void XmlDocVisitor::visit(DocInclude *inc)
void XmlDocVisitor::visit(DocIncOperator *op)
{
//printf("DocIncOperator: type=%d first=%d, last=%d text='%s'\n",
- // op->type(),op->isFirst(),op->isLast(),op->text().data());
+ // op->type(),op->isFirst(),op->isLast(),qPrint(op->text()));
if (op->isFirst())
{
if (!m_hide)
@@ -474,8 +473,8 @@ void XmlDocVisitor::visit(DocIncOperator *op)
FileDef *fd = 0;
if (!op->includeFileName().isEmpty())
{
- QFileInfo cfi( op->includeFileName() );
- fd = createFileDef( cfi.dirPath().utf8(), cfi.fileName().utf8() );
+ FileInfo cfi( op->includeFileName().str() );
+ fd = createFileDef( cfi.dirPath(), cfi.fileName() );
}
getCodeParser(locLangExt).parseCode(m_ci,op->context(),
@@ -500,7 +499,7 @@ void XmlDocVisitor::visit(DocIncOperator *op)
}
else
{
- if (!m_hide) m_t << endl;
+ if (!m_hide) m_t << "\n";
}
}
@@ -591,7 +590,7 @@ void XmlDocVisitor::visitPre(DocPara *)
void XmlDocVisitor::visitPost(DocPara *)
{
if (m_hide) return;
- m_t << "</para>" << endl;
+ m_t << "</para>\n";
}
void XmlDocVisitor::visitPre(DocRoot *)
@@ -696,10 +695,10 @@ void XmlDocVisitor::visitPre(DocSection *s)
if (m_hide) return;
m_t << "<sect" << s->level() << " id=\"" << s->file();
if (!s->anchor().isEmpty()) m_t << "_1" << s->anchor();
- m_t << "\">" << endl;
+ m_t << "\">\n";
m_t << "<title>";
filter(convertCharEntitiesToUTF8(s->title()));
- m_t << "</title>" << endl;
+ m_t << "</title>\n";
}
void XmlDocVisitor::visitPost(DocSection *s)
@@ -884,7 +883,7 @@ void XmlDocVisitor::visitPre(DocInternal *)
void XmlDocVisitor::visitPost(DocInternal *)
{
if (m_hide) return;
- m_t << "</internal>" << endl;
+ m_t << "</internal>\n";
}
void XmlDocVisitor::visitPre(DocHRef *href)
@@ -938,19 +937,7 @@ void XmlDocVisitor::visitPre(DocImage *img)
bool ambig;
if (url.isEmpty() && (fd=findFileDef(Doxygen::imageNameLinkedMap,img->name(),ambig)))
{
- QFile inImage(fd->absFilePath());
- QFile outImage(Config_getString(XML_OUTPUT)+"/"+baseName.data());
- if (inImage.open(IO_ReadOnly))
- {
- if (outImage.open(IO_WriteOnly))
- {
- char *buffer = new char[inImage.size()];
- inImage.readBlock(buffer,inImage.size());
- outImage.writeBlock(buffer,inImage.size());
- outImage.flush();
- delete[] buffer;
- }
- }
+ copyFile(fd->absFilePath(),Config_getString(XML_OUTPUT)+"/"+baseName);
}
}
@@ -1034,19 +1021,19 @@ void XmlDocVisitor::visitPre(DocSecRefItem *ref)
void XmlDocVisitor::visitPost(DocSecRefItem *)
{
if (m_hide) return;
- m_t << "</tocitem>" << endl;
+ m_t << "</tocitem>\n";
}
void XmlDocVisitor::visitPre(DocSecRefList *)
{
if (m_hide) return;
- m_t << "<toclist>" << endl;
+ m_t << "<toclist>\n";
}
void XmlDocVisitor::visitPost(DocSecRefList *)
{
if (m_hide) return;
- m_t << "</toclist>" << endl;
+ m_t << "</toclist>\n";
}
//void XmlDocVisitor::visitPre(DocLanguage *l)
@@ -1058,7 +1045,7 @@ void XmlDocVisitor::visitPost(DocSecRefList *)
//void XmlDocVisitor::visitPost(DocLanguage *)
//{
// if (m_hide) return;
-// m_t << "</language>" << endl;
+// m_t << "</language>\n";
//}
void XmlDocVisitor::visitPre(DocParamSect *s)
@@ -1084,14 +1071,14 @@ void XmlDocVisitor::visitPre(DocParamSect *s)
void XmlDocVisitor::visitPost(DocParamSect *)
{
if (m_hide) return;
- m_t << "</parameterlist>" << endl;
+ m_t << "</parameterlist>\n";
}
void XmlDocVisitor::visitPre(DocParamList *pl)
{
if (m_hide) return;
- m_t << "<parameteritem>" << endl;
- m_t << "<parameternamelist>" << endl;
+ m_t << "<parameteritem>\n";
+ m_t << "<parameternamelist>\n";
for (const auto &param : pl->parameters())
{
if (!pl->paramTypes().empty())
@@ -1109,11 +1096,11 @@ void XmlDocVisitor::visitPre(DocParamList *pl)
}
else if (type->kind()==DocNode::Kind_Sep)
{
- m_t << "</parametertype>" << endl;
+ m_t << "</parametertype>\n";
m_t << "<parametertype>";
}
}
- m_t << "</parametertype>" << endl;
+ m_t << "</parametertype>\n";
}
m_t << "<parametername";
if (pl->direction()!=DocParamSect::Unspecified)
@@ -1142,17 +1129,17 @@ void XmlDocVisitor::visitPre(DocParamList *pl)
{
visit((DocLinkedWord*)param.get());
}
- m_t << "</parametername>" << endl;
+ m_t << "</parametername>\n";
}
- m_t << "</parameternamelist>" << endl;
- m_t << "<parameterdescription>" << endl;
+ m_t << "</parameternamelist>\n";
+ m_t << "<parameterdescription>\n";
}
void XmlDocVisitor::visitPost(DocParamList *)
{
if (m_hide) return;
- m_t << "</parameterdescription>" << endl;
- m_t << "</parameteritem>" << endl;
+ m_t << "</parameterdescription>\n";
+ m_t << "</parameteritem>\n";
}
void XmlDocVisitor::visitPre(DocXRefItem *x)
@@ -1179,7 +1166,7 @@ void XmlDocVisitor::visitPost(DocXRefItem *x)
void XmlDocVisitor::visitPre(DocInternalRef *ref)
{
if (m_hide) return;
- startLink(0,ref->file(),ref->anchor());
+ startLink(QCString(),ref->file(),ref->anchor());
}
void XmlDocVisitor::visitPost(DocInternalRef *)
@@ -1230,14 +1217,14 @@ void XmlDocVisitor::visitPost(DocParBlock *)
}
-void XmlDocVisitor::filter(const char *str)
+void XmlDocVisitor::filter(const QCString &str)
{
m_t << convertToXML(str);
}
void XmlDocVisitor::startLink(const QCString &ref,const QCString &file,const QCString &anchor)
{
- //printf("XmlDocVisitor: file=%s anchor=%s\n",file.data(),anchor.data());
+ //printf("XmlDocVisitor: file=%s anchor=%s\n",qPrint(file),qPrint(anchor));
m_t << "<ref refid=\"" << file;
if (!anchor.isEmpty()) m_t << "_1" << anchor;
m_t << "\" kindref=\"";
diff --git a/src/xmldocvisitor.h b/src/xmldocvisitor.h
index 60270b8..f4b2a71 100644
--- a/src/xmldocvisitor.h
+++ b/src/xmldocvisitor.h
@@ -19,10 +19,12 @@
#ifndef _XMLDOCVISITOR_H
#define _XMLDOCVISITOR_H
+#include <iostream>
+
+#include "qcstring.h"
#include "docvisitor.h"
-#include <qcstring.h>
+#include "textstream.h"
-class FTextStream;
class CodeOutputInterface;
class QCString;
@@ -30,7 +32,7 @@ class QCString;
class XmlDocVisitor : public DocVisitor
{
public:
- XmlDocVisitor(FTextStream &t,CodeOutputInterface &ci,const char *langExt);
+ XmlDocVisitor(TextStream &t,CodeOutputInterface &ci,const QCString &langExt);
//--------------------------------------
// visitor functions for leaf nodes
@@ -144,7 +146,7 @@ class XmlDocVisitor : public DocVisitor
// helper functions
//--------------------------------------
- void filter(const char *str);
+ void filter(const QCString &str);
void startLink(const QCString &ref,const QCString &file,
const QCString &anchor);
void endLink();
@@ -153,7 +155,7 @@ class XmlDocVisitor : public DocVisitor
// state variables
//--------------------------------------
- FTextStream &m_t;
+ TextStream &m_t;
CodeOutputInterface &m_ci;
bool m_insidePre;
bool m_hide;
diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp
index 3f74da1..8489a3c 100644
--- a/src/xmlgen.cpp
+++ b/src/xmlgen.cpp
@@ -15,9 +15,7 @@
#include <stdlib.h>
-#include <qdir.h>
-#include <qfile.h>
-
+#include "textstream.h"
#include "xmlgen.h"
#include "doxygen.h"
#include "message.h"
@@ -47,6 +45,8 @@
#include "section.h"
#include "htmlentity.h"
#include "resourcemgr.h"
+#include "dir.h"
+#include "utf8.h"
// no debug info
#define XML_DB(x) do {} while(0)
@@ -107,13 +107,15 @@ static const char *xmlSectionMapper(MemberListType ml)
}
-inline void writeXMLString(FTextStream &t,const char *s)
+inline void writeXMLString(TextStream &t,const QCString &s)
{
t << convertToXML(s);
}
-inline void writeXMLCodeString(FTextStream &t,const char *s, int &col)
+inline void writeXMLCodeString(TextStream &t,const QCString &str, int &col)
{
+ if (str.isEmpty()) return;
+ const char *s = str.data();
char c;
while ((c=*s++))
{
@@ -140,34 +142,32 @@ inline void writeXMLCodeString(FTextStream &t,const char *s, int &col)
// encode invalid XML characters (see http://www.w3.org/TR/2000/REC-xml-20001006#NT-Char)
t << "<sp value=\"" << int(c) << "\"/>";
break;
- default: s=writeUtf8Char(t,s-1); col++; break;
+ default: s=writeUTF8Char(t,s-1); col++; break;
}
}
}
-static void writeXMLHeader(FTextStream &t)
+static void writeXMLHeader(TextStream &t)
{
- t << "<?xml version='1.0' encoding='UTF-8' standalone='no'?>" << endl;;
+ t << "<?xml version='1.0' encoding='UTF-8' standalone='no'?>\n";;
t << "<doxygen xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ";
t << "xsi:noNamespaceSchemaLocation=\"compound.xsd\" ";
t << "version=\"" << getDoxygenVersion() << "\" ";
t << "xml:lang=\"" << theTranslator->trISOLang() << "\"";
- t << ">" << endl;
+ t << ">\n";
}
static void writeCombineScript()
{
QCString outputDirectory = Config_getString(XML_OUTPUT);
QCString fileName=outputDirectory+"/combine.xslt";
- QFile f(fileName);
- if (!f.open(IO_WriteOnly))
+ std::ofstream t(fileName.str(),std::ofstream::out | std::ofstream::binary);
+ if (!t.is_open())
{
- err("Cannot open file %s for writing!\n",fileName.data());
+ err("Cannot open file %s for writing!\n",qPrint(fileName));
return;
}
- FTextStream t(&f);
- //t.setEncoding(FTextStream::UnicodeUTF8);
t <<
"<!-- XSLT script to combine the generated output into a single file. \n"
@@ -188,16 +188,16 @@ static void writeCombineScript()
}
-void writeXMLLink(FTextStream &t,const char *extRef,const char *compoundId,
- const char *anchorId,const char *text,const char *tooltip)
+void writeXMLLink(TextStream &t,const QCString &extRef,const QCString &compoundId,
+ const QCString &anchorId,const QCString &text,const QCString &tooltip)
{
t << "<ref refid=\"" << compoundId;
- if (anchorId) t << "_1" << anchorId;
+ if (!anchorId.isEmpty()) t << "_1" << anchorId;
t << "\" kindref=\"";
- if (anchorId) t << "member"; else t << "compound";
+ if (!anchorId.isEmpty()) t << "member"; else t << "compound";
t << "\"";
- if (extRef) t << " external=\"" << extRef << "\"";
- if (tooltip) t << " tooltip=\"" << convertToXML(tooltip) << "\"";
+ if (!extRef.isEmpty()) t << " external=\"" << extRef << "\"";
+ if (!tooltip.isEmpty()) t << " tooltip=\"" << convertToXML(tooltip) << "\"";
t << ">";
writeXMLString(t,text);
t << "</ref>";
@@ -207,26 +207,26 @@ void writeXMLLink(FTextStream &t,const char *extRef,const char *compoundId,
class TextGeneratorXMLImpl : public TextGeneratorIntf
{
public:
- TextGeneratorXMLImpl(FTextStream &t): m_t(t) {}
- void writeString(const char *s,bool /*keepSpaces*/) const
+ TextGeneratorXMLImpl(TextStream &t): m_t(t) {}
+ void writeString(const QCString &s,bool /*keepSpaces*/) const
{
writeXMLString(m_t,s);
}
void writeBreak(int) const {}
- void writeLink(const char *extRef,const char *file,
- const char *anchor,const char *text
+ void writeLink(const QCString &extRef,const QCString &file,
+ const QCString &anchor,const QCString &text
) const
{
- writeXMLLink(m_t,extRef,file,anchor,text,0);
+ writeXMLLink(m_t,extRef,file,anchor,text,QCString());
}
private:
- FTextStream &m_t;
+ TextStream &m_t;
};
//-------------------------------------------------------------------------------------------
/** Generator for producing XML formatted source code. */
-void XMLCodeGenerator::codify(const char *text)
+void XMLCodeGenerator::codify(const QCString &text)
{
XML_DB(("(codify \"%s\")\n",text));
if (m_insideCodeLine && !m_insideSpecialHL && m_normalHLNeedStartTag)
@@ -236,9 +236,9 @@ void XMLCodeGenerator::codify(const char *text)
}
writeXMLCodeString(m_t,text,m_col);
}
-void XMLCodeGenerator::writeCodeLink(const char *ref,const char *file,
- const char *anchor,const char *name,
- const char *tooltip)
+void XMLCodeGenerator::writeCodeLink(const QCString &ref,const QCString &file,
+ const QCString &anchor,const QCString &name,
+ const QCString &tooltip)
{
XML_DB(("(writeCodeLink)\n"));
if (m_insideCodeLine && !m_insideSpecialHL && m_normalHLNeedStartTag)
@@ -247,10 +247,10 @@ void XMLCodeGenerator::writeCodeLink(const char *ref,const char *file,
m_normalHLNeedStartTag=FALSE;
}
writeXMLLink(m_t,ref,file,anchor,name,tooltip);
- m_col+=qstrlen(name);
+ m_col+=name.length();
}
-void XMLCodeGenerator::writeTooltip(const char *, const DocLinkInfo &, const char *,
- const char *, const SourceLinkInfo &, const SourceLinkInfo &
+void XMLCodeGenerator::writeTooltip(const QCString &, const DocLinkInfo &, const QCString &,
+ const QCString &, const SourceLinkInfo &, const SourceLinkInfo &
)
{
XML_DB(("(writeToolTip)\n"));
@@ -291,13 +291,13 @@ void XMLCodeGenerator::endCodeLine()
m_t << "</highlight>";
m_normalHLNeedStartTag=TRUE;
}
- m_t << "</codeline>" << endl; // non DocBook
+ m_t << "</codeline>\n"; // non DocBook
m_lineNumber = -1;
m_refId.resize(0);
m_external.resize(0);
m_insideCodeLine=FALSE;
}
-void XMLCodeGenerator::startFontClass(const char *colorClass)
+void XMLCodeGenerator::startFontClass(const QCString &colorClass)
{
XML_DB(("(startFontClass)\n"));
if (m_insideCodeLine && !m_insideSpecialHL && !m_normalHLNeedStartTag)
@@ -314,23 +314,23 @@ void XMLCodeGenerator::endFontClass()
m_t << "</highlight>"; // non DocBook
m_insideSpecialHL=FALSE;
}
-void XMLCodeGenerator::writeCodeAnchor(const char *)
+void XMLCodeGenerator::writeCodeAnchor(const QCString &)
{
XML_DB(("(writeCodeAnchor)\n"));
}
-void XMLCodeGenerator::writeLineNumber(const char *extRef,const char *compId,
- const char *anchorId,int l)
+void XMLCodeGenerator::writeLineNumber(const QCString &extRef,const QCString &compId,
+ const QCString &anchorId,int l)
{
XML_DB(("(writeLineNumber)\n"));
// we remember the information provided here to use it
// at the <codeline> start tag.
m_lineNumber = l;
- if (compId)
+ if (!compId.isEmpty())
{
m_refId=compId;
- if (anchorId) m_refId+=(QCString)"_1"+anchorId;
+ if (!anchorId.isEmpty()) m_refId+=(QCString)"_1"+anchorId;
m_isMemberRef = anchorId!=0;
- if (extRef) m_external=extRef;
+ if (!extRef.isEmpty()) m_external=extRef;
}
}
void XMLCodeGenerator::finish()
@@ -338,19 +338,19 @@ void XMLCodeGenerator::finish()
if (m_insideCodeLine) endCodeLine();
}
-void XMLCodeGenerator::startCodeFragment(const char *)
+void XMLCodeGenerator::startCodeFragment(const QCString &)
{
- m_t << " <programlisting>" << endl;
+ m_t << " <programlisting>\n";
}
-void XMLCodeGenerator::endCodeFragment(const char *)
+void XMLCodeGenerator::endCodeFragment(const QCString &)
{
- m_t << " </programlisting>" << endl;
+ m_t << " </programlisting>\n";
}
//-------------------------------------------------------------------------------------------
-static void writeTemplateArgumentList(FTextStream &t,
+static void writeTemplateArgumentList(TextStream &t,
const ArgumentList &al,
const Definition *scope,
const FileDef *fileScope,
@@ -360,50 +360,55 @@ static void writeTemplateArgumentList(FTextStream &t,
indentStr.fill(' ',indent);
if (al.hasParameters())
{
- t << indentStr << "<templateparamlist>" << endl;
+ t << indentStr << "<templateparamlist>\n";
for (const Argument &a : al)
{
- t << indentStr << " <param>" << endl;
+ t << indentStr << " <param>\n";
if (!a.type.isEmpty())
{
t << indentStr << " <type>";
linkifyText(TextGeneratorXMLImpl(t),scope,fileScope,0,a.type);
- t << "</type>" << endl;
+ t << "</type>\n";
}
if (!a.name.isEmpty())
{
- t << indentStr << " <declname>" << convertToXML(a.name) << "</declname>" << endl;
- t << indentStr << " <defname>" << convertToXML(a.name) << "</defname>" << endl;
+ t << indentStr << " <declname>" << convertToXML(a.name) << "</declname>\n";
+ t << indentStr << " <defname>" << convertToXML(a.name) << "</defname>\n";
}
if (!a.defval.isEmpty())
{
t << indentStr << " <defval>";
linkifyText(TextGeneratorXMLImpl(t),scope,fileScope,0,a.defval);
- t << "</defval>" << endl;
+ t << "</defval>\n";
}
if (!a.typeConstraint.isEmpty())
{
t << indentStr << " <typeconstraint>";
linkifyText(TextGeneratorXMLImpl(t),scope,fileScope,0,a.typeConstraint);
- t << "</typeconstraint>" << endl;
+ t << "</typeconstraint>\n";
}
- t << indentStr << " </param>" << endl;
+ t << indentStr << " </param>\n";
}
- t << indentStr << "</templateparamlist>" << endl;
+ t << indentStr << "</templateparamlist>\n";
}
}
-static void writeMemberTemplateLists(const MemberDef *md,FTextStream &t)
+static void writeMemberTemplateLists(const MemberDef *md,TextStream &t)
{
writeTemplateArgumentList(t,md->templateArguments(),md->getClassDef(),md->getFileDef(),8);
}
-static void writeTemplateList(const ClassDef *cd,FTextStream &t)
+static void writeTemplateList(const ClassDef *cd,TextStream &t)
+{
+ writeTemplateArgumentList(t,cd->templateArguments(),cd,cd->getFileDef(),4);
+}
+
+static void writeTemplateList(const ConceptDef *cd,TextStream &t)
{
- writeTemplateArgumentList(t,cd->templateArguments(),cd,0,4);
+ writeTemplateArgumentList(t,cd->getTemplateParameterList(),cd,cd->getFileDef(),4);
}
-static void writeXMLDocBlock(FTextStream &t,
+static void writeXMLDocBlock(TextStream &t,
const QCString &fileName,
int lineNr,
const Definition *scope,
@@ -414,7 +419,7 @@ static void writeXMLDocBlock(FTextStream &t,
if (stext.isEmpty()) return;
// convert the documentation string into an abstract syntax tree
DocNode *root = validatingParseDoc(fileName,lineNr,scope,md,text,FALSE,FALSE,
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
// create a code generator
XMLCodeGenerator *xmlCodeGen = new XMLCodeGenerator(t);
// create a parse tree visitor for XML
@@ -428,7 +433,7 @@ static void writeXMLDocBlock(FTextStream &t,
}
-void writeXMLCodeBlock(FTextStream &t,FileDef *fd)
+void writeXMLCodeBlock(TextStream &t,FileDef *fd)
{
auto intf=Doxygen::parserManager->getCodeParser(fd->getDefFileExtension());
SrcLangExt langExt = getLanguageFromFileName(fd->getDefFileExtension());
@@ -436,11 +441,11 @@ void writeXMLCodeBlock(FTextStream &t,FileDef *fd)
XMLCodeGenerator *xmlGen = new XMLCodeGenerator(t);
xmlGen->startCodeFragment("DoxyCode");
intf->parseCode(*xmlGen, // codeOutIntf
- 0, // scopeName
+ QCString(), // scopeName
fileToString(fd->absFilePath(),Config_getBool(FILTER_SOURCE_FILES)),
langExt, // lang
FALSE, // isExampleBlock
- 0, // exampleName
+ QCString(), // exampleName
fd, // fileDef
-1, // startLine
-1, // endLine
@@ -453,7 +458,7 @@ void writeXMLCodeBlock(FTextStream &t,FileDef *fd)
delete xmlGen;
}
-static void writeMemberReference(FTextStream &t,const Definition *def,const MemberDef *rmd,const char *tagName)
+static void writeMemberReference(TextStream &t,const Definition *def,const MemberDef *rmd,const QCString &tagName)
{
QCString scope = rmd->getScopeString();
QCString name = rmd->name();
@@ -472,7 +477,7 @@ static void writeMemberReference(FTextStream &t,const Definition *def,const Memb
t << " endline=\"" << rmd->getEndBodyLine() << "\"";
}
}
- t << ">" << convertToXML(name) << "</" << tagName << ">" << endl;
+ t << ">" << convertToXML(name) << "</" << tagName << ">\n";
}
@@ -510,7 +515,7 @@ static QCString memberOutputFileBase(const MemberDef *md)
}
-static void generateXMLForMember(const MemberDef *md,FTextStream &ti,FTextStream &t,const Definition *def)
+static void generateXMLForMember(const MemberDef *md,TextStream &ti,TextStream &t,const Definition *def)
{
// + declaration/definition arg lists
@@ -558,7 +563,7 @@ static void generateXMLForMember(const MemberDef *md,FTextStream &ti,FTextStream
ti << " <member refid=\"" << memberOutputFileBase(md)
<< "_1" << md->anchor() << "\" kind=\"" << memType << "\"><name>"
- << convertToXML(md->name()) << "</name></member>" << endl;
+ << convertToXML(md->name()) << "</name></member>\n";
QCString scopeName;
if (md->getClassDef())
@@ -788,7 +793,7 @@ static void generateXMLForMember(const MemberDef *md,FTextStream &ti,FTextStream
t << "\"";
}
- t << ">" << endl;
+ t << ">\n";
if (md->memberType()!=MemberType_Define &&
md->memberType()!=MemberType_Enumeration
@@ -799,33 +804,33 @@ static void generateXMLForMember(const MemberDef *md,FTextStream &ti,FTextStream
stripQualifiers(typeStr);
t << " <type>";
linkifyText(TextGeneratorXMLImpl(t),def,md->getBodyDef(),md,typeStr);
- t << "</type>" << endl;
- t << " <definition>" << convertToXML(md->definition()) << "</definition>" << endl;
- t << " <argsstring>" << convertToXML(md->argsString()) << "</argsstring>" << endl;
+ t << "</type>\n";
+ t << " <definition>" << convertToXML(md->definition()) << "</definition>\n";
+ t << " <argsstring>" << convertToXML(md->argsString()) << "</argsstring>\n";
}
if (md->memberType() == MemberType_Enumeration)
{
t << " <type>";
linkifyText(TextGeneratorXMLImpl(t),def,md->getBodyDef(),md,md->enumBaseType());
- t << "</type>" << endl;
+ t << "</type>\n";
}
- t << " <name>" << convertToXML(md->name()) << "</name>" << endl;
+ t << " <name>" << convertToXML(md->name()) << "</name>\n";
if (md->memberType() == MemberType_Property)
{
if (md->isReadable())
- t << " <read>" << convertToXML(md->getReadAccessor()) << "</read>" << endl;
+ t << " <read>" << convertToXML(md->getReadAccessor()) << "</read>\n";
if (md->isWritable())
- t << " <write>" << convertToXML(md->getWriteAccessor()) << "</write>" << endl;
+ t << " <write>" << convertToXML(md->getWriteAccessor()) << "</write>\n";
}
- if (md->memberType()==MemberType_Variable && md->bitfieldString())
+ if (md->memberType()==MemberType_Variable && !md->bitfieldString().isEmpty())
{
QCString bitfield = md->bitfieldString();
if (bitfield.at(0)==':') bitfield=bitfield.mid(1);
- t << " <bitfield>" << convertToXML(bitfield) << "</bitfield>" << endl;
+ t << " <bitfield>" << convertToXML(bitfield) << "</bitfield>\n";
}
const MemberDef *rmd = md->reimplements();
@@ -833,22 +838,22 @@ static void generateXMLForMember(const MemberDef *md,FTextStream &ti,FTextStream
{
t << " <reimplements refid=\""
<< memberOutputFileBase(rmd) << "_1" << rmd->anchor() << "\">"
- << convertToXML(rmd->name()) << "</reimplements>" << endl;
+ << convertToXML(rmd->name()) << "</reimplements>\n";
}
for (const auto &rbmd : md->reimplementedBy())
{
t << " <reimplementedby refid=\""
<< memberOutputFileBase(rbmd) << "_1" << rbmd->anchor() << "\">"
- << convertToXML(rbmd->name()) << "</reimplementedby>" << endl;
+ << convertToXML(rbmd->name()) << "</reimplementedby>\n";
}
if (md->isFriendClass()) // for friend classes we show a link to the class as a "parameter"
{
- t << " <param>" << endl;
+ t << " <param>\n";
t << " <type>";
linkifyText(TextGeneratorXMLImpl(t),def,md->getBodyDef(),md,md->name());
- t << "</type>" << endl;
- t << " </param>" << endl;
+ t << "</type>\n";
+ t << " </param>\n";
}
else if (isFunc) //function
{
@@ -866,83 +871,89 @@ static void generateXMLForMember(const MemberDef *md,FTextStream &ti,FTextStream
defArg = &(*defIt);
++defIt;
}
- t << " <param>" << endl;
+ t << " <param>\n";
if (!a.attrib.isEmpty())
{
t << " <attributes>";
writeXMLString(t,a.attrib);
- t << "</attributes>" << endl;
+ t << "</attributes>\n";
}
if (!a.type.isEmpty())
{
t << " <type>";
linkifyText(TextGeneratorXMLImpl(t),def,md->getBodyDef(),md,a.type);
- t << "</type>" << endl;
+ t << "</type>\n";
}
if (!a.name.isEmpty())
{
t << " <declname>";
writeXMLString(t,a.name);
- t << "</declname>" << endl;
+ t << "</declname>\n";
}
if (defArg && !defArg->name.isEmpty() && defArg->name!=a.name)
{
t << " <defname>";
writeXMLString(t,defArg->name);
- t << "</defname>" << endl;
+ t << "</defname>\n";
}
if (!a.array.isEmpty())
{
t << " <array>";
writeXMLString(t,a.array);
- t << "</array>" << endl;
+ t << "</array>\n";
}
if (!a.defval.isEmpty())
{
t << " <defval>";
linkifyText(TextGeneratorXMLImpl(t),def,md->getBodyDef(),md,a.defval);
- t << "</defval>" << endl;
+ t << "</defval>\n";
}
if (defArg && defArg->hasDocumentation())
{
t << " <briefdescription>";
writeXMLDocBlock(t,md->getDefFileName(),md->getDefLine(),
md->getOuterScope(),md,defArg->docs);
- t << "</briefdescription>" << endl;
+ t << "</briefdescription>\n";
}
- t << " </param>" << endl;
+ t << " </param>\n";
}
}
}
else if (md->memberType()==MemberType_Define &&
- md->argsString()) // define
+ !md->argsString().isEmpty()) // define
{
if (md->argumentList().empty()) // special case for "foo()" to
// distinguish it from "foo".
{
- t << " <param></param>" << endl;
+ t << " <param></param>\n";
}
else
{
for (const Argument &a : md->argumentList())
{
- t << " <param><defname>" << a.type << "</defname></param>" << endl;
+ t << " <param><defname>" << a.type << "</defname></param>\n";
}
}
}
+ if (!md->requiresClause().isEmpty())
+ {
+ t << " <requiresclause>";
+ linkifyText(TextGeneratorXMLImpl(t),md,md->getFileDef(),md,md->requiresClause());
+ t << " </requiresclause>\n";
+ }
if (md->hasOneLineInitializer() || md->hasMultiLineInitializer())
{
t << " <initializer>";
linkifyText(TextGeneratorXMLImpl(t),def,md->getBodyDef(),md,md->initializer());
- t << "</initializer>" << endl;
+ t << "</initializer>\n";
}
- if (md->excpString())
+ if (!md->excpString().isEmpty())
{
t << " <exceptions>";
linkifyText(TextGeneratorXMLImpl(t),def,md->getBodyDef(),md,md->excpString());
- t << "</exceptions>" << endl;
+ t << "</exceptions>\n";
}
if (md->memberType()==MemberType_Enumeration) // enum
@@ -951,7 +962,7 @@ static void generateXMLForMember(const MemberDef *md,FTextStream &ti,FTextStream
{
ti << " <member refid=\"" << memberOutputFileBase(md)
<< "_1" << emd->anchor() << "\" kind=\"enumvalue\"><name>"
- << convertToXML(emd->name()) << "</name></member>" << endl;
+ << convertToXML(emd->name()) << "</name></member>\n";
t << " <enumvalue id=\"" << memberOutputFileBase(md) << "_1"
<< emd->anchor() << "\" prot=\"";
@@ -962,34 +973,34 @@ static void generateXMLForMember(const MemberDef *md,FTextStream &ti,FTextStream
case Private: t << "private"; break;
case Package: t << "package"; break;
}
- t << "\">" << endl;
+ t << "\">\n";
t << " <name>";
writeXMLString(t,emd->name());
- t << "</name>" << endl;
+ t << "</name>\n";
if (!emd->initializer().isEmpty())
{
t << " <initializer>";
writeXMLString(t,emd->initializer());
- t << "</initializer>" << endl;
+ t << "</initializer>\n";
}
- t << " <briefdescription>" << endl;
+ t << " <briefdescription>\n";
writeXMLDocBlock(t,emd->briefFile(),emd->briefLine(),emd->getOuterScope(),emd,emd->briefDescription());
- t << " </briefdescription>" << endl;
- t << " <detaileddescription>" << endl;
+ t << " </briefdescription>\n";
+ t << " <detaileddescription>\n";
writeXMLDocBlock(t,emd->docFile(),emd->docLine(),emd->getOuterScope(),emd,emd->documentation());
- t << " </detaileddescription>" << endl;
- t << " </enumvalue>" << endl;
+ t << " </detaileddescription>\n";
+ t << " </enumvalue>\n";
}
}
- t << " <briefdescription>" << endl;
+ t << " <briefdescription>\n";
writeXMLDocBlock(t,md->briefFile(),md->briefLine(),md->getOuterScope(),md,md->briefDescription());
- t << " </briefdescription>" << endl;
- t << " <detaileddescription>" << endl;
+ t << " </briefdescription>\n";
+ t << " <detaileddescription>\n";
writeXMLDocBlock(t,md->docFile(),md->docLine(),md->getOuterScope(),md,md->documentation());
- t << " </detaileddescription>" << endl;
- t << " <inbodydescription>" << endl;
+ t << " </detaileddescription>\n";
+ t << " <inbodydescription>\n";
writeXMLDocBlock(t,md->docFile(),md->inbodyLine(),md->getOuterScope(),md,md->inbodyDocumentation());
- t << " </inbodydescription>" << endl;
+ t << " </inbodydescription>\n";
if (md->getDefLine()!=-1)
{
t << " <location file=\""
@@ -1012,7 +1023,7 @@ static void generateXMLForMember(const MemberDef *md,FTextStream &ti,FTextStream
<< md->getDeclLine() << "\" declcolumn=\""
<< md->getDeclColumn() << "\"";
}
- t << "/>" << endl;
+ t << "/>\n";
}
//printf("md->getReferencesMembers()=%p\n",md->getReferencesMembers());
@@ -1027,7 +1038,7 @@ static void generateXMLForMember(const MemberDef *md,FTextStream &ti,FTextStream
writeMemberReference(t,def,refmd,"referencedby");
}
- t << " </memberdef>" << endl;
+ t << " </memberdef>\n";
}
// namespace members are also inserted in the file scope, but
@@ -1039,9 +1050,9 @@ static bool memberVisible(const Definition *d,const MemberDef *md)
md->getNamespaceDef()==0;
}
-static void generateXMLSection(const Definition *d,FTextStream &ti,FTextStream &t,
- const MemberList *ml,const char *kind,const char *header=0,
- const char *documentation=0)
+static void generateXMLSection(const Definition *d,TextStream &ti,TextStream &t,
+ const MemberList *ml,const QCString &kind,const QCString &header=QCString(),
+ const QCString &documentation=QCString())
{
if (ml==0) return;
int count=0;
@@ -1055,16 +1066,16 @@ static void generateXMLSection(const Definition *d,FTextStream &ti,FTextStream &
}
if (count==0) return; // empty list
- t << " <sectiondef kind=\"" << kind << "\">" << endl;
- if (header)
+ t << " <sectiondef kind=\"" << kind << "\">\n";
+ if (!header.isEmpty())
{
- t << " <header>" << convertToXML(header) << "</header>" << endl;
+ t << " <header>" << convertToXML(header) << "</header>\n";
}
- if (documentation)
+ if (!documentation.isEmpty())
{
t << " <description>";
writeXMLDocBlock(t,d->docFile(),d->docLine(),d,0,documentation);
- t << "</description>" << endl;
+ t << "</description>\n";
}
for (const auto &md : *ml)
{
@@ -1073,12 +1084,12 @@ static void generateXMLSection(const Definition *d,FTextStream &ti,FTextStream &
generateXMLForMember(md,ti,t,d);
}
}
- t << " </sectiondef>" << endl;
+ t << " </sectiondef>\n";
}
-static void writeListOfAllMembers(const ClassDef *cd,FTextStream &t)
+static void writeListOfAllMembers(const ClassDef *cd,TextStream &t)
{
- t << " <listofallmembers>" << endl;
+ t << " <listofallmembers>\n";
for (auto &mni : cd->memberNameInfoLinkedMap())
{
for (auto &mi : *mni)
@@ -1110,14 +1121,14 @@ static void writeListOfAllMembers(const ClassDef *cd,FTextStream &t)
t << " ambiguityscope=\"" << convertToXML(mi->ambiguityResolutionScope()) << "\"";
}
t << "><scope>" << convertToXML(cd->name()) << "</scope><name>" <<
- convertToXML(md->name()) << "</name></member>" << endl;
+ convertToXML(md->name()) << "</name></member>\n";
}
}
}
- t << " </listofallmembers>" << endl;
+ t << " </listofallmembers>\n";
}
-static void writeInnerClasses(const ClassLinkedRefMap &cl,FTextStream &t)
+static void writeInnerClasses(const ClassLinkedRefMap &cl,TextStream &t)
{
for (const auto &cd : cl)
{
@@ -1132,12 +1143,12 @@ static void writeInnerClasses(const ClassLinkedRefMap &cl,FTextStream &t)
case Private: t << "private"; break;
case Package: t << "package"; break;
}
- t << "\">" << convertToXML(cd->name()) << "</innerclass>" << endl;
+ t << "\">" << convertToXML(cd->name()) << "</innerclass>\n";
}
}
}
-static void writeInnerNamespaces(const NamespaceLinkedRefMap &nl,FTextStream &t)
+static void writeInnerNamespaces(const NamespaceLinkedRefMap &nl,TextStream &t)
{
for (const auto &nd : nl)
{
@@ -1145,21 +1156,21 @@ static void writeInnerNamespaces(const NamespaceLinkedRefMap &nl,FTextStream &t)
{
t << " <innernamespace refid=\"" << nd->getOutputFileBase()
<< "\"" << (nd->isInline() ? " inline=\"yes\"" : "")
- << ">" << convertToXML(nd->name()) << "</innernamespace>" << endl;
+ << ">" << convertToXML(nd->name()) << "</innernamespace>\n";
}
}
}
-static void writeInnerFiles(const FileList &fl,FTextStream &t)
+static void writeInnerFiles(const FileList &fl,TextStream &t)
{
for (const auto &fd : fl)
{
t << " <innerfile refid=\"" << fd->getOutputFileBase()
- << "\">" << convertToXML(fd->name()) << "</innerfile>" << endl;
+ << "\">" << convertToXML(fd->name()) << "</innerfile>\n";
}
}
-static void writeInnerPages(const PageLinkedRefMap &pl,FTextStream &t)
+static void writeInnerPages(const PageLinkedRefMap &pl,TextStream &t)
{
for (const auto &pd : pl)
{
@@ -1168,33 +1179,53 @@ static void writeInnerPages(const PageLinkedRefMap &pl,FTextStream &t)
{
t << "_" << pd->name();
}
- t << "\">" << convertToXML(pd->title()) << "</innerpage>" << endl;
+ t << "\">" << convertToXML(pd->title()) << "</innerpage>\n";
}
}
-static void writeInnerGroups(const GroupList &gl,FTextStream &t)
+static void writeInnerGroups(const GroupList &gl,TextStream &t)
{
for (const auto &sgd : gl)
{
t << " <innergroup refid=\"" << sgd->getOutputFileBase()
<< "\">" << convertToXML(sgd->groupTitle())
- << "</innergroup>" << endl;
+ << "</innergroup>\n";
}
}
-static void writeInnerDirs(const DirList *dl,FTextStream &t)
+static void writeInnerDirs(const DirList *dl,TextStream &t)
{
if (dl)
{
for(const auto subdir : *dl)
{
t << " <innerdir refid=\"" << subdir->getOutputFileBase()
- << "\">" << convertToXML(subdir->displayName()) << "</innerdir>" << endl;
+ << "\">" << convertToXML(subdir->displayName()) << "</innerdir>\n";
+ }
+ }
+}
+
+static void writeIncludeInfo(const IncludeInfo *ii,TextStream &t)
+{
+ if (ii)
+ {
+ QCString nm = ii->includeName;
+ if (nm.isEmpty() && ii->fileDef) nm = ii->fileDef->docName();
+ if (!nm.isEmpty())
+ {
+ t << " <includes";
+ if (ii->fileDef && !ii->fileDef->isReference()) // TODO: support external references
+ {
+ t << " refid=\"" << ii->fileDef->getOutputFileBase() << "\"";
+ }
+ t << " local=\"" << (ii->local ? "yes" : "no") << "\">";
+ t << nm;
+ t << "</includes>\n";
}
}
}
-static void generateXMLForClass(const ClassDef *cd,FTextStream &ti)
+static void generateXMLForClass(const ClassDef *cd,TextStream &ti)
{
// + brief description
// + detailed description
@@ -1218,22 +1249,21 @@ static void generateXMLForClass(const ClassDef *cd,FTextStream &ti)
if (cd->templateMaster()!=0) return; // skip generated template instances.
if (cd->isArtificial()) return; // skip artificially created classes
- msg("Generating XML output for class %s\n",cd->name().data());
+ msg("Generating XML output for class %s\n",qPrint(cd->name()));
ti << " <compound refid=\"" << classOutputFileBase(cd)
<< "\" kind=\"" << cd->compoundTypeString()
- << "\"><name>" << convertToXML(cd->name()) << "</name>" << endl;
+ << "\"><name>" << convertToXML(cd->name()) << "</name>\n";
QCString outputDirectory = Config_getString(XML_OUTPUT);
QCString fileName=outputDirectory+"/"+ classOutputFileBase(cd)+".xml";
- QFile f(fileName);
- if (!f.open(IO_WriteOnly))
+ std::ofstream f(fileName.str(),std::ofstream::out | std::ofstream::binary);
+ if (!f.is_open())
{
- err("Cannot open file %s for writing!\n",fileName.data());
+ err("Cannot open file %s for writing!\n",qPrint(fileName));
return;
}
- FTextStream t(&f);
- //t.setEncoding(FTextStream::UnicodeUTF8);
+ TextStream t(&f);
writeXMLHeader(t);
t << " <compounddef id=\""
@@ -1250,10 +1280,10 @@ static void generateXMLForClass(const ClassDef *cd,FTextStream &ti)
if (cd->isFinal()) t << "\" final=\"yes";
if (cd->isSealed()) t << "\" sealed=\"yes";
if (cd->isAbstract()) t << "\" abstract=\"yes";
- t << "\">" << endl;
+ t << "\">\n";
t << " <compoundname>";
writeXMLString(t,cd->name());
- t << "</compoundname>" << endl;
+ t << "</compoundname>\n";
for (const auto &bcd : cd->baseClasses())
{
t << " <basecompoundref ";
@@ -1288,7 +1318,7 @@ static void generateXMLForClass(const ClassDef *cd,FTextStream &ti)
{
t << convertToXML(bcd.classDef->displayName());
}
- t << "</basecompoundref>" << endl;
+ t << "</basecompoundref>\n";
}
for (const auto &bcd : cd->subClasses())
{
@@ -1310,26 +1340,10 @@ static void generateXMLForClass(const ClassDef *cd,FTextStream &ti)
case Pure: t << "pure-virtual"; break;
}
t << "\">" << convertToXML(bcd.classDef->displayName())
- << "</derivedcompoundref>" << endl;
+ << "</derivedcompoundref>\n";
}
- const IncludeInfo *ii=cd->includeInfo();
- if (ii)
- {
- QCString nm = ii->includeName;
- if (nm.isEmpty() && ii->fileDef) nm = ii->fileDef->docName();
- if (!nm.isEmpty())
- {
- t << " <includes";
- if (ii->fileDef && !ii->fileDef->isReference()) // TODO: support external references
- {
- t << " refid=\"" << ii->fileDef->getOutputFileBase() << "\"";
- }
- t << " local=\"" << (ii->local ? "yes" : "no") << "\">";
- t << nm;
- t << "</includes>" << endl;
- }
- }
+ writeIncludeInfo(cd->includeInfo(),t);
writeInnerClasses(cd->getClasses(),t);
@@ -1348,25 +1362,32 @@ static void generateXMLForClass(const ClassDef *cd,FTextStream &ti)
}
}
- t << " <briefdescription>" << endl;
+ if (!cd->requiresClause().isEmpty())
+ {
+ t << " <requiresclause>";
+ linkifyText(TextGeneratorXMLImpl(t),cd,cd->getFileDef(),0,cd->requiresClause());
+ t << " </requiresclause>\n";
+ }
+
+ t << " <briefdescription>\n";
writeXMLDocBlock(t,cd->briefFile(),cd->briefLine(),cd,0,cd->briefDescription());
- t << " </briefdescription>" << endl;
- t << " <detaileddescription>" << endl;
+ t << " </briefdescription>\n";
+ t << " <detaileddescription>\n";
writeXMLDocBlock(t,cd->docFile(),cd->docLine(),cd,0,cd->documentation());
- t << " </detaileddescription>" << endl;
+ t << " </detaileddescription>\n";
DotClassGraph inheritanceGraph(cd,Inheritance);
if (!inheritanceGraph.isTrivial())
{
- t << " <inheritancegraph>" << endl;
+ t << " <inheritancegraph>\n";
inheritanceGraph.writeXML(t);
- t << " </inheritancegraph>" << endl;
+ t << " </inheritancegraph>\n";
}
DotClassGraph collaborationGraph(cd,Collaboration);
if (!collaborationGraph.isTrivial())
{
- t << " <collaborationgraph>" << endl;
+ t << " <collaborationgraph>\n";
collaborationGraph.writeXML(t);
- t << " </collaborationgraph>" << endl;
+ t << " </collaborationgraph>\n";
}
t << " <location file=\""
<< convertToXML(stripFromPath(cd->getDefFileName())) << "\" line=\""
@@ -1382,15 +1403,59 @@ static void generateXMLForClass(const ClassDef *cd,FTextStream &ti)
t << " bodystart=\"" << cd->getStartBodyLine() << "\" bodyend=\""
<< cd->getEndBodyLine() << "\"";
}
- t << "/>" << endl;
+ t << "/>\n";
writeListOfAllMembers(cd,t);
- t << " </compounddef>" << endl;
- t << "</doxygen>" << endl;
+ t << " </compounddef>\n";
+ t << "</doxygen>\n";
- ti << " </compound>" << endl;
+ ti << " </compound>\n";
}
-static void generateXMLForNamespace(const NamespaceDef *nd,FTextStream &ti)
+static void generateXMLForConcept(const ConceptDef *cd,TextStream &ti)
+{
+ if (cd->isReference() || cd->isHidden()) return; // skip external references.
+
+ ti << " <compound refid=\"" << cd->getOutputFileBase()
+ << "\" kind=\"concept\"" << "><name>"
+ << convertToXML(cd->name()) << "</name>\n";
+
+ QCString outputDirectory = Config_getString(XML_OUTPUT);
+ QCString fileName=outputDirectory+"/"+cd->getOutputFileBase()+".xml";
+ std::ofstream f(fileName.str(),std::ofstream::out | std::ofstream::binary);
+ if (!f.is_open())
+ {
+ err("Cannot open file %s for writing!\n",qPrint(fileName));
+ return;
+ }
+ TextStream t(&f);
+ writeXMLHeader(t);
+ t << " <compounddef id=\"" << cd->getOutputFileBase()
+ << "\" kind=\"concept\">\n";
+ t << " <compoundname>";
+ writeXMLString(t,cd->name());
+ t << "</compoundname>\n";
+ writeIncludeInfo(cd->includeInfo(),t);
+ writeTemplateList(cd,t);
+ t << " <initializer>";
+ linkifyText(TextGeneratorXMLImpl(t),cd,cd->getFileDef(),0,cd->initializer());
+ t << " </initializer>\n";
+ t << " <briefdescription>\n";
+ writeXMLDocBlock(t,cd->briefFile(),cd->briefLine(),cd,0,cd->briefDescription());
+ t << " </briefdescription>\n";
+ t << " <detaileddescription>\n";
+ writeXMLDocBlock(t,cd->docFile(),cd->docLine(),cd,0,cd->documentation());
+ t << " </detaileddescription>\n";
+ t << " <location file=\""
+ << convertToXML(stripFromPath(cd->getDefFileName())) << "\" line=\""
+ << cd->getDefLine() << "\"" << " column=\""
+ << cd->getDefColumn() << "\"/>\n" ;
+ t << " </compounddef>\n";
+ t << "</doxygen>\n";
+
+ ti << " </compound>\n";
+}
+
+static void generateXMLForNamespace(const NamespaceDef *nd,TextStream &ti)
{
// + contained class definitions
// + contained namespace definitions
@@ -1405,28 +1470,27 @@ static void generateXMLForNamespace(const NamespaceDef *nd,FTextStream &ti)
ti << " <compound refid=\"" << nd->getOutputFileBase()
<< "\" kind=\"namespace\"" << "><name>"
- << convertToXML(nd->name()) << "</name>" << endl;
+ << convertToXML(nd->name()) << "</name>\n";
QCString outputDirectory = Config_getString(XML_OUTPUT);
QCString fileName=outputDirectory+"/"+nd->getOutputFileBase()+".xml";
- QFile f(fileName);
- if (!f.open(IO_WriteOnly))
+ std::ofstream f(fileName.str(),std::ofstream::out | std::ofstream::binary);
+ if (!f.is_open())
{
- err("Cannot open file %s for writing!\n",fileName.data());
+ err("Cannot open file %s for writing!\n",qPrint(fileName));
return;
}
- FTextStream t(&f);
- //t.setEncoding(FTextStream::UnicodeUTF8);
+ TextStream t(&f);
writeXMLHeader(t);
t << " <compounddef id=\"" << nd->getOutputFileBase()
<< "\" kind=\"namespace\" "
<< (nd->isInline()?"inline=\"yes\" ":"")
<< "language=\""
- << langToString(nd->getLanguage()) << "\">" << endl;
+ << langToString(nd->getLanguage()) << "\">\n";
t << " <compoundname>";
writeXMLString(t,nd->name());
- t << "</compoundname>" << endl;
+ t << "</compoundname>\n";
writeInnerClasses(nd->getClasses(),t);
writeInnerNamespaces(nd->getNamespaces(),t);
@@ -1445,23 +1509,23 @@ static void generateXMLForNamespace(const NamespaceDef *nd,FTextStream &ti)
}
}
- t << " <briefdescription>" << endl;
+ t << " <briefdescription>\n";
writeXMLDocBlock(t,nd->briefFile(),nd->briefLine(),nd,0,nd->briefDescription());
- t << " </briefdescription>" << endl;
- t << " <detaileddescription>" << endl;
+ t << " </briefdescription>\n";
+ t << " <detaileddescription>\n";
writeXMLDocBlock(t,nd->docFile(),nd->docLine(),nd,0,nd->documentation());
- t << " </detaileddescription>" << endl;
+ t << " </detaileddescription>\n";
t << " <location file=\""
<< convertToXML(stripFromPath(nd->getDefFileName())) << "\" line=\""
<< nd->getDefLine() << "\"" << " column=\""
- << nd->getDefColumn() << "\"/>" << endl ;
- t << " </compounddef>" << endl;
- t << "</doxygen>" << endl;
+ << nd->getDefColumn() << "\"/>\n" ;
+ t << " </compounddef>\n";
+ t << "</doxygen>\n";
- ti << " </compound>" << endl;
+ ti << " </compound>\n";
}
-static void generateXMLForFile(FileDef *fd,FTextStream &ti)
+static void generateXMLForFile(FileDef *fd,TextStream &ti)
{
// + includes files
// + includedby files
@@ -1481,26 +1545,25 @@ static void generateXMLForFile(FileDef *fd,FTextStream &ti)
ti << " <compound refid=\"" << fd->getOutputFileBase()
<< "\" kind=\"file\"><name>" << convertToXML(fd->name())
- << "</name>" << endl;
+ << "</name>\n";
QCString outputDirectory = Config_getString(XML_OUTPUT);
QCString fileName=outputDirectory+"/"+fd->getOutputFileBase()+".xml";
- QFile f(fileName);
- if (!f.open(IO_WriteOnly))
+ std::ofstream f(fileName.str(),std::ofstream::out | std::ofstream::binary);
+ if (!f.is_open())
{
- err("Cannot open file %s for writing!\n",fileName.data());
+ err("Cannot open file %s for writing!\n",qPrint(fileName));
return;
}
- FTextStream t(&f);
- //t.setEncoding(FTextStream::UnicodeUTF8);
+ TextStream t(&f);
writeXMLHeader(t);
t << " <compounddef id=\"" << fd->getOutputFileBase()
<< "\" kind=\"file\" language=\""
- << langToString(fd->getLanguage()) << "\">" << endl;
+ << langToString(fd->getLanguage()) << "\">\n";
t << " <compoundname>";
writeXMLString(t,fd->name());
- t << "</compoundname>" << endl;
+ t << "</compoundname>\n";
for (const auto &inc : fd->includeFileList())
{
@@ -1511,7 +1574,7 @@ static void generateXMLForFile(FileDef *fd,FTextStream &ti)
}
t << " local=\"" << (inc.local ? "yes" : "no") << "\">";
t << inc.includeName;
- t << "</includes>" << endl;
+ t << "</includes>\n";
}
for (const auto &inc : fd->includedByFileList())
@@ -1523,23 +1586,23 @@ static void generateXMLForFile(FileDef *fd,FTextStream &ti)
}
t << " local=\"" << (inc.local ? "yes" : "no") << "\">";
t << inc.includeName;
- t << "</includedby>" << endl;
+ t << "</includedby>\n";
}
DotInclDepGraph incDepGraph(fd,FALSE);
if (!incDepGraph.isTrivial())
{
- t << " <incdepgraph>" << endl;
+ t << " <incdepgraph>\n";
incDepGraph.writeXML(t);
- t << " </incdepgraph>" << endl;
+ t << " </incdepgraph>\n";
}
DotInclDepGraph invIncDepGraph(fd,TRUE);
if (!invIncDepGraph.isTrivial())
{
- t << " <invincdepgraph>" << endl;
+ t << " <invincdepgraph>\n";
invIncDepGraph.writeXML(t);
- t << " </invincdepgraph>" << endl;
+ t << " </invincdepgraph>\n";
}
writeInnerClasses(fd->getClasses(),t);
@@ -1559,24 +1622,24 @@ static void generateXMLForFile(FileDef *fd,FTextStream &ti)
}
}
- t << " <briefdescription>" << endl;
+ t << " <briefdescription>\n";
writeXMLDocBlock(t,fd->briefFile(),fd->briefLine(),fd,0,fd->briefDescription());
- t << " </briefdescription>" << endl;
- t << " <detaileddescription>" << endl;
+ t << " </briefdescription>\n";
+ t << " <detaileddescription>\n";
writeXMLDocBlock(t,fd->docFile(),fd->docLine(),fd,0,fd->documentation());
- t << " </detaileddescription>" << endl;
+ t << " </detaileddescription>\n";
if (Config_getBool(XML_PROGRAMLISTING))
{
writeXMLCodeBlock(t,fd);
}
- t << " <location file=\"" << convertToXML(stripFromPath(fd->getDefFileName())) << "\"/>" << endl;
- t << " </compounddef>" << endl;
- t << "</doxygen>" << endl;
+ t << " <location file=\"" << convertToXML(stripFromPath(fd->getDefFileName())) << "\"/>\n";
+ t << " </compounddef>\n";
+ t << "</doxygen>\n";
- ti << " </compound>" << endl;
+ ti << " </compound>\n";
}
-static void generateXMLForGroup(const GroupDef *gd,FTextStream &ti)
+static void generateXMLForGroup(const GroupDef *gd,TextStream &ti)
{
// + members
// + member groups
@@ -1593,24 +1656,23 @@ static void generateXMLForGroup(const GroupDef *gd,FTextStream &ti)
if (gd->isReference()) return; // skip external references
ti << " <compound refid=\"" << gd->getOutputFileBase()
- << "\" kind=\"group\"><name>" << convertToXML(gd->name()) << "</name>" << endl;
+ << "\" kind=\"group\"><name>" << convertToXML(gd->name()) << "</name>\n";
QCString outputDirectory = Config_getString(XML_OUTPUT);
QCString fileName=outputDirectory+"/"+gd->getOutputFileBase()+".xml";
- QFile f(fileName);
- if (!f.open(IO_WriteOnly))
+ std::ofstream f(fileName.str(),std::ofstream::out | std::ofstream::binary);
+ if (!f.is_open())
{
- err("Cannot open file %s for writing!\n",fileName.data());
+ err("Cannot open file %s for writing!\n",qPrint(fileName));
return;
}
+ TextStream t(&f);
- FTextStream t(&f);
- //t.setEncoding(FTextStream::UnicodeUTF8);
writeXMLHeader(t);
t << " <compounddef id=\""
- << gd->getOutputFileBase() << "\" kind=\"group\">" << endl;
- t << " <compoundname>" << convertToXML(gd->name()) << "</compoundname>" << endl;
- t << " <title>" << convertToXML(gd->groupTitle()) << "</title>" << endl;
+ << gd->getOutputFileBase() << "\" kind=\"group\">\n";
+ t << " <compoundname>" << convertToXML(gd->name()) << "</compoundname>\n";
+ t << " <title>" << convertToXML(gd->groupTitle()) << "</title>\n";
writeInnerFiles(gd->getFiles(),t);
writeInnerClasses(gd->getClasses(),t);
@@ -1632,58 +1694,57 @@ static void generateXMLForGroup(const GroupDef *gd,FTextStream &ti)
}
}
- t << " <briefdescription>" << endl;
+ t << " <briefdescription>\n";
writeXMLDocBlock(t,gd->briefFile(),gd->briefLine(),gd,0,gd->briefDescription());
- t << " </briefdescription>" << endl;
- t << " <detaileddescription>" << endl;
+ t << " </briefdescription>\n";
+ t << " <detaileddescription>\n";
writeXMLDocBlock(t,gd->docFile(),gd->docLine(),gd,0,gd->documentation());
- t << " </detaileddescription>" << endl;
- t << " </compounddef>" << endl;
- t << "</doxygen>" << endl;
+ t << " </detaileddescription>\n";
+ t << " </compounddef>\n";
+ t << "</doxygen>\n";
- ti << " </compound>" << endl;
+ ti << " </compound>\n";
}
-static void generateXMLForDir(DirDef *dd,FTextStream &ti)
+static void generateXMLForDir(DirDef *dd,TextStream &ti)
{
if (dd->isReference()) return; // skip external references
ti << " <compound refid=\"" << dd->getOutputFileBase()
<< "\" kind=\"dir\"><name>" << convertToXML(dd->displayName())
- << "</name>" << endl;
+ << "</name>\n";
QCString outputDirectory = Config_getString(XML_OUTPUT);
QCString fileName=outputDirectory+"/"+dd->getOutputFileBase()+".xml";
- QFile f(fileName);
- if (!f.open(IO_WriteOnly))
+ std::ofstream f(fileName.str(),std::ofstream::out | std::ofstream::binary);
+ if (!f.is_open())
{
- err("Cannot open file %s for writing!\n",fileName.data());
+ err("Cannot open file %s for writing!\n",qPrint(fileName));
return;
}
+ TextStream t(&f);
- FTextStream t(&f);
- //t.setEncoding(FTextStream::UnicodeUTF8);
writeXMLHeader(t);
t << " <compounddef id=\""
- << dd->getOutputFileBase() << "\" kind=\"dir\">" << endl;
- t << " <compoundname>" << convertToXML(dd->displayName()) << "</compoundname>" << endl;
+ << dd->getOutputFileBase() << "\" kind=\"dir\">\n";
+ t << " <compoundname>" << convertToXML(dd->displayName()) << "</compoundname>\n";
writeInnerDirs(&dd->subDirs(),t);
writeInnerFiles(dd->getFiles(),t);
- t << " <briefdescription>" << endl;
+ t << " <briefdescription>\n";
writeXMLDocBlock(t,dd->briefFile(),dd->briefLine(),dd,0,dd->briefDescription());
- t << " </briefdescription>" << endl;
- t << " <detaileddescription>" << endl;
+ t << " </briefdescription>\n";
+ t << " <detaileddescription>\n";
writeXMLDocBlock(t,dd->docFile(),dd->docLine(),dd,0,dd->documentation());
- t << " </detaileddescription>" << endl;
- t << " <location file=\"" << convertToXML(stripFromPath(dd->name())) << "\"/>" << endl;
- t << " </compounddef>" << endl;
- t << "</doxygen>" << endl;
+ t << " </detaileddescription>\n";
+ t << " <location file=\"" << convertToXML(stripFromPath(dd->name())) << "\"/>\n";
+ t << " </compounddef>\n";
+ t << "</doxygen>\n";
- ti << " </compound>" << endl;
+ ti << " </compound>\n";
}
-static void generateXMLForPage(PageDef *pd,FTextStream &ti,bool isExample)
+static void generateXMLForPage(PageDef *pd,TextStream &ti,bool isExample)
{
// + name
// + title
@@ -1703,24 +1764,23 @@ static void generateXMLForPage(PageDef *pd,FTextStream &ti,bool isExample)
ti << " <compound refid=\"" << pageName
<< "\" kind=\"" << kindName << "\"><name>" << convertToXML(pd->name())
- << "</name>" << endl;
+ << "</name>\n";
QCString outputDirectory = Config_getString(XML_OUTPUT);
QCString fileName=outputDirectory+"/"+pageName+".xml";
- QFile f(fileName);
- if (!f.open(IO_WriteOnly))
+ std::ofstream f(fileName.str(),std::ofstream::out | std::ofstream::binary);
+ if (!f.is_open())
{
- err("Cannot open file %s for writing!\n",fileName.data());
+ err("Cannot open file %s for writing!\n",qPrint(fileName));
return;
}
+ TextStream t(&f);
- FTextStream t(&f);
- //t.setEncoding(FTextStream::UnicodeUTF8);
writeXMLHeader(t);
t << " <compounddef id=\"" << pageName;
- t << "\" kind=\"" << kindName << "\">" << endl;
+ t << "\" kind=\"" << kindName << "\">\n";
t << " <compoundname>" << convertToXML(pd->name())
- << "</compoundname>" << endl;
+ << "</compoundname>\n";
if (pd==Doxygen::mainPage.get()) // main page is special
{
@@ -1734,7 +1794,7 @@ static void generateXMLForPage(PageDef *pd,FTextStream &ti,bool isExample)
title = Config_getString(PROJECT_NAME);
}
t << " <title>" << convertToXML(convertCharEntitiesToUTF8(title))
- << "</title>" << endl;
+ << "</title>\n";
}
else
{
@@ -1742,14 +1802,14 @@ static void generateXMLForPage(PageDef *pd,FTextStream &ti,bool isExample)
if (si)
{
t << " <title>" << convertToXML(filterTitle(convertCharEntitiesToUTF8(si->title()).str()))
- << "</title>" << endl;
+ << "</title>\n";
}
}
writeInnerPages(pd->getSubPages(),t);
const SectionRefs &sectionRefs = pd->getSectionRefs();
if (pd->localToc().isXmlEnabled() && !sectionRefs.empty())
{
- t << " <tableofcontents>" << endl;
+ t << " <tableofcontents>\n";
int level=1,l;
bool inLi[5]={ FALSE, FALSE, FALSE, FALSE, FALSE };
int maxLevel = pd->localToc().xmlLevel();
@@ -1757,31 +1817,31 @@ static void generateXMLForPage(PageDef *pd,FTextStream &ti,bool isExample)
{
if (isSection(si->type()))
{
- //printf(" level=%d title=%s\n",level,si->title.data());
+ //printf(" level=%d title=%s\n",level,qPrint(si->title));
int nextLevel = (int)si->type();
if (nextLevel>level)
{
for (l=level;l<nextLevel;l++)
{
- if (l < maxLevel) t << " <tableofcontents>" << endl;
+ if (l < maxLevel) t << " <tableofcontents>\n";
}
}
else if (nextLevel<level)
{
for (l=level;l>nextLevel;l--)
{
- if (l <= maxLevel && inLi[l]) t << " </tocsect>" << endl;
+ if (l <= maxLevel && inLi[l]) t << " </tocsect>\n";
inLi[l]=FALSE;
- if (l <= maxLevel) t << " </tableofcontents>" << endl;
+ if (l <= maxLevel) t << " </tableofcontents>\n";
}
}
if (nextLevel <= maxLevel)
{
- if (inLi[nextLevel]) t << " </tocsect>" << endl;
+ if (inLi[nextLevel]) t << " </tocsect>\n";
QCString titleDoc = convertToXML(si->title());
- t << " <tocsect>" << endl;
- t << " <name>" << (si->title().isEmpty()?si->label():titleDoc) << "</name>" << endl;
- t << " <reference>" << convertToXML(pageName) << "_1" << convertToXML(si->label()) << "</reference>" << endl;
+ t << " <tocsect>\n";
+ t << " <name>" << (si->title().isEmpty()?si->label():titleDoc) << "</name>\n";
+ t << " <reference>" << convertToXML(pageName) << "_1" << convertToXML(si->label()) << "</reference>\n";
inLi[nextLevel]=TRUE;
level = nextLevel;
}
@@ -1789,19 +1849,19 @@ static void generateXMLForPage(PageDef *pd,FTextStream &ti,bool isExample)
}
while (level>1 && level <= maxLevel)
{
- if (inLi[level]) t << " </tocsect>" << endl;
+ if (inLi[level]) t << " </tocsect>\n";
inLi[level]=FALSE;
- t << " </tableofcontents>" << endl;
+ t << " </tableofcontents>\n";
level--;
}
- if (level <= maxLevel && inLi[level]) t << " </tocsect>" << endl;
+ if (level <= maxLevel && inLi[level]) t << " </tocsect>\n";
inLi[level]=FALSE;
- t << " </tableofcontents>" << endl;
+ t << " </tableofcontents>\n";
}
- t << " <briefdescription>" << endl;
+ t << " <briefdescription>\n";
writeXMLDocBlock(t,pd->briefFile(),pd->briefLine(),pd,0,pd->briefDescription());
- t << " </briefdescription>" << endl;
- t << " <detaileddescription>" << endl;
+ t << " </briefdescription>\n";
+ t << " <detaileddescription>\n";
if (isExample)
{
writeXMLDocBlock(t,pd->docFile(),pd->docLine(),pd,0,
@@ -1812,19 +1872,20 @@ static void generateXMLForPage(PageDef *pd,FTextStream &ti,bool isExample)
writeXMLDocBlock(t,pd->docFile(),pd->docLine(),pd,0,
pd->documentation());
}
- t << " </detaileddescription>" << endl;
+ t << " </detaileddescription>\n";
- t << " <location file=\"" << convertToXML(stripFromPath(pd->getDefFileName())) << "\"/>" << endl;
+ t << " <location file=\"" << convertToXML(stripFromPath(pd->getDefFileName())) << "\"/>\n";
- t << " </compounddef>" << endl;
- t << "</doxygen>" << endl;
+ t << " </compounddef>\n";
+ t << "</doxygen>\n";
- ti << " </compound>" << endl;
+ ti << " </compound>\n";
}
void generateXML()
{
// + classes
+ // + concepts
// + namespaces
// + files
// + groups
@@ -1832,111 +1893,118 @@ void generateXML()
// - examples
QCString outputDirectory = Config_getString(XML_OUTPUT);
- QDir xmlDir(outputDirectory);
+ Dir xmlDir(outputDirectory.str());
createSubDirs(xmlDir);
ResourceMgr::instance().copyResource("xml.xsd",outputDirectory);
ResourceMgr::instance().copyResource("index.xsd",outputDirectory);
QCString fileName=outputDirectory+"/compound.xsd";
- QFile f(fileName);
- if (!f.open(IO_WriteOnly))
+ std::ofstream f(fileName.str(),std::ofstream::out | std::ofstream::binary);
+ if (!f.is_open())
{
- err("Cannot open file %s for writing!\n",fileName.data());
+ err("Cannot open file %s for writing!\n",qPrint(fileName));
return;
}
-
- // write compound.xsd, but replace special marker with the entities
- QCString compound_xsd = ResourceMgr::instance().getAsString("compound.xsd");
- const char *startLine = compound_xsd.data();
- while (*startLine)
{
- // find end of the line
- const char *endLine = startLine+1;
- while (*endLine && *(endLine-1)!='\n') endLine++; // skip to end of the line including \n
- int len=endLine-startLine;
- if (len>0)
+ TextStream t(&f);
+
+ // write compound.xsd, but replace special marker with the entities
+ QCString compound_xsd = ResourceMgr::instance().getAsString("compound.xsd");
+ const char *startLine = compound_xsd.data();
+ while (*startLine)
{
- QCString s(len+1);
- qstrncpy(s.rawData(),startLine,len);
- s[len]='\0';
- if (s.find("<!-- Automatically insert here the HTML entities -->")!=-1)
- {
- FTextStream t(&f);
- HtmlEntityMapper::instance()->writeXMLSchema(t);
- }
- else
+ // find end of the line
+ const char *endLine = startLine+1;
+ while (*endLine && *(endLine-1)!='\n') endLine++; // skip to end of the line including \n
+ int len=static_cast<int>(endLine-startLine);
+ if (len>0)
{
- f.writeBlock(startLine,len);
+ QCString s(startLine,len);
+ if (s.find("<!-- Automatically insert here the HTML entities -->")!=-1)
+ {
+ HtmlEntityMapper::instance()->writeXMLSchema(t);
+ }
+ else
+ {
+ t.write(startLine,len);
+ }
}
+ startLine=endLine;
}
- startLine=endLine;
}
f.close();
fileName=outputDirectory+"/index.xml";
- f.setName(fileName);
- if (!f.open(IO_WriteOnly))
+ f.open(fileName.str(),std::ofstream::out | std::ofstream::binary);
+ if (!f.is_open())
{
- err("Cannot open file %s for writing!\n",fileName.data());
+ err("Cannot open file %s for writing!\n",qPrint(fileName));
return;
}
- FTextStream t(&f);
- //t.setEncoding(FTextStream::UnicodeUTF8);
+ else
+ {
+ TextStream t(&f);
- // write index header
- t << "<?xml version='1.0' encoding='UTF-8' standalone='no'?>" << endl;;
- t << "<doxygenindex xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ";
- t << "xsi:noNamespaceSchemaLocation=\"index.xsd\" ";
- t << "version=\"" << getDoxygenVersion() << "\" ";
- t << "xml:lang=\"" << theTranslator->trISOLang() << "\"";
- t << ">" << endl;
+ // write index header
+ t << "<?xml version='1.0' encoding='UTF-8' standalone='no'?>\n";;
+ t << "<doxygenindex xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ";
+ t << "xsi:noNamespaceSchemaLocation=\"index.xsd\" ";
+ t << "version=\"" << getDoxygenVersion() << "\" ";
+ t << "xml:lang=\"" << theTranslator->trISOLang() << "\"";
+ t << ">\n";
- for (const auto &cd : *Doxygen::classLinkedMap)
- {
- generateXMLForClass(cd.get(),t);
- }
- for (const auto &nd : *Doxygen::namespaceLinkedMap)
- {
- msg("Generating XML output for namespace %s\n",nd->name().data());
- generateXMLForNamespace(nd.get(),t);
- }
- for (const auto &fn : *Doxygen::inputNameLinkedMap)
- {
- for (const auto &fd : *fn)
+ for (const auto &cd : *Doxygen::classLinkedMap)
{
- msg("Generating XML output for file %s\n",fd->name().data());
- generateXMLForFile(fd.get(),t);
+ generateXMLForClass(cd.get(),t);
+ }
+ for (const auto &cd : *Doxygen::conceptLinkedMap)
+ {
+ msg("Generating XML output for concept %s\n",qPrint(cd->name()));
+ generateXMLForConcept(cd.get(),t);
+ }
+ for (const auto &nd : *Doxygen::namespaceLinkedMap)
+ {
+ msg("Generating XML output for namespace %s\n",qPrint(nd->name()));
+ generateXMLForNamespace(nd.get(),t);
+ }
+ for (const auto &fn : *Doxygen::inputNameLinkedMap)
+ {
+ for (const auto &fd : *fn)
+ {
+ msg("Generating XML output for file %s\n",qPrint(fd->name()));
+ generateXMLForFile(fd.get(),t);
+ }
+ }
+ for (const auto &gd : *Doxygen::groupLinkedMap)
+ {
+ msg("Generating XML output for group %s\n",qPrint(gd->name()));
+ generateXMLForGroup(gd.get(),t);
+ }
+ for (const auto &pd : *Doxygen::pageLinkedMap)
+ {
+ msg("Generating XML output for page %s\n",qPrint(pd->name()));
+ generateXMLForPage(pd.get(),t,FALSE);
+ }
+ for (const auto &dd : *Doxygen::dirLinkedMap)
+ {
+ msg("Generate XML output for dir %s\n",qPrint(dd->name()));
+ generateXMLForDir(dd.get(),t);
+ }
+ for (const auto &pd : *Doxygen::exampleLinkedMap)
+ {
+ msg("Generating XML output for example %s\n",qPrint(pd->name()));
+ generateXMLForPage(pd.get(),t,TRUE);
+ }
+ if (Doxygen::mainPage)
+ {
+ msg("Generating XML output for the main page\n");
+ generateXMLForPage(Doxygen::mainPage.get(),t,FALSE);
}
- }
- for (const auto &gd : *Doxygen::groupLinkedMap)
- {
- msg("Generating XML output for group %s\n",gd->name().data());
- generateXMLForGroup(gd.get(),t);
- }
- for (const auto &pd : *Doxygen::pageLinkedMap)
- {
- msg("Generating XML output for page %s\n",pd->name().data());
- generateXMLForPage(pd.get(),t,FALSE);
- }
- for (const auto &dd : *Doxygen::dirLinkedMap)
- {
- msg("Generate XML output for dir %s\n",dd->name().data());
- generateXMLForDir(dd.get(),t);
- }
- for (const auto &pd : *Doxygen::exampleLinkedMap)
- {
- msg("Generating XML output for example %s\n",pd->name().data());
- generateXMLForPage(pd.get(),t,TRUE);
- }
- if (Doxygen::mainPage)
- {
- msg("Generating XML output for the main page\n");
- generateXMLForPage(Doxygen::mainPage.get(),t,FALSE);
- }
- //t << " </compoundlist>" << endl;
- t << "</doxygenindex>" << endl;
+ //t << " </compoundlist>\n";
+ t << "</doxygenindex>\n";
+ }
writeCombineScript();
}
diff --git a/src/xmlgen.h b/src/xmlgen.h
index 27bb10b..ec67906 100644
--- a/src/xmlgen.h
+++ b/src/xmlgen.h
@@ -15,37 +15,39 @@
#include "outputgen.h"
+class TextStream;
+
class XMLCodeGenerator : public CodeOutputInterface
{
public:
- XMLCodeGenerator(FTextStream &t) : m_t(t), m_lineNumber(-1), m_isMemberRef(FALSE), m_col(0),
+ XMLCodeGenerator(TextStream &t) : m_t(t), m_lineNumber(-1), m_isMemberRef(FALSE), m_col(0),
m_insideCodeLine(FALSE), m_normalHLNeedStartTag(TRUE), m_insideSpecialHL(FALSE) {}
virtual ~XMLCodeGenerator() { }
- void codify(const char *text);
- void writeCodeLink(const char *ref,const char *file,
- const char *anchor,const char *name,
- const char *tooltip);
- void writeTooltip(const char *, const DocLinkInfo &, const char *,
- const char *, const SourceLinkInfo &, const SourceLinkInfo &
- );
- void startCodeLine(bool);
- void endCodeLine();
- void startFontClass(const char *colorClass);
- void endFontClass();
- void writeCodeAnchor(const char *);
- void writeLineNumber(const char *extRef,const char *compId,
- const char *anchorId,int l);
- void setCurrentDoc(const Definition *,const char *,bool){}
- void addWord(const char *,bool){}
- void startCodeFragment(const char *);
- void endCodeFragment(const char *);
+ void codify(const QCString &text) override;
+ void writeCodeLink(const QCString &ref,const QCString &file,
+ const QCString &anchor,const QCString &name,
+ const QCString &tooltip) override;
+ void writeTooltip(const QCString &, const DocLinkInfo &, const QCString &,
+ const QCString &, const SourceLinkInfo &, const SourceLinkInfo &
+ ) override;
+ void startCodeLine(bool) override;
+ void endCodeLine() override;
+ void startFontClass(const QCString &colorClass) override;
+ void endFontClass() override;
+ void writeCodeAnchor(const QCString &) override;
+ void writeLineNumber(const QCString &extRef,const QCString &compId,
+ const QCString &anchorId,int l) override;
+ void setCurrentDoc(const Definition *,const QCString &,bool) override {}
+ void addWord(const QCString &,bool) override {}
+ void startCodeFragment(const QCString &) override;
+ void endCodeFragment(const QCString &) override;
void finish();
private:
- FTextStream &m_t;
+ TextStream &m_t;
QCString m_refId;
QCString m_external;
int m_lineNumber;
diff --git a/templates/general/layout_default.xml b/templates/general/layout_default.xml
index 373bb20..c671020 100644
--- a/templates/general/layout_default.xml
+++ b/templates/general/layout_default.xml
@@ -9,6 +9,8 @@
<tab type="namespacelist" visible="yes" title="" intro=""/>
<tab type="namespacemembers" visible="yes" title="" intro=""/>
</tab>
+ <tab type="concepts" visible="yes" title="">
+ </tab>
<tab type="interfaces" visible="yes" title="">
<tab type="interfacelist" visible="yes" title="" intro=""/>
<tab type="interfaceindex" visible="$ALPHABETICAL_INDEX" title=""/>
@@ -103,6 +105,7 @@
<constantgroups visible="yes" title=""/>
<interfaces visible="yes" title=""/>
<classes visible="yes" title=""/>
+ <concepts visible="yes" title=""/>
<structs visible="yes" title=""/>
<exceptions visible="yes" title=""/>
<typedefs title=""/>
@@ -126,6 +129,15 @@
<authorsection visible="yes"/>
</namespace>
+ <!-- Layout definition for a concept page -->
+ <concept>
+ <briefdescription visible="yes"/>
+ <includes visible="$SHOW_INCLUDE_FILES"/>
+ <definition visible="yes" title=""/>
+ <detaileddescription title=""/>
+ <authorsection visible="yes"/>
+ </concept>
+
<!-- Layout definition for a file page -->
<file>
<briefdescription visible="yes"/>
@@ -139,6 +151,7 @@
<structs visible="yes" title=""/>
<exceptions visible="yes" title=""/>
<namespaces visible="yes" title=""/>
+ <concepts visible="yes" title=""/>
<constantgroups visible="yes" title=""/>
<defines title=""/>
<typedefs title=""/>
@@ -172,6 +185,7 @@
<dirs visible="yes" title=""/>
<files visible="yes" title=""/>
<namespaces visible="yes" title=""/>
+ <concepts visible="yes" title=""/>
<classes visible="yes" title=""/>
<defines title=""/>
<typedefs title=""/>
diff --git a/templates/html/doxygen.css b/templates/html/doxygen.css
index 5898d87..29dafbe 100644
--- a/templates/html/doxygen.css
+++ b/templates/html/doxygen.css
@@ -439,6 +439,12 @@ img.footer {
vertical-align: middle;
}
+.compoundTemplParams {
+ color: ##60;
+ font-size: 80%;
+ line-height: 120%;
+}
+
/* @group Code Colorization */
span.keyword {
diff --git a/templates/html/htmllayout.tpl b/templates/html/htmllayout.tpl
index 74d83c6..b79f835 100644
--- a/templates/html/htmllayout.tpl
+++ b/templates/html/htmllayout.tpl
@@ -12,7 +12,7 @@
{% resource 'tab_s.lum' %}
{% resource 'tab_h.lum' %}
{% resource 'bc_s.luma' %}
-{% resource 'doxygen.luma' %}
+{% resource 'doxygen.svg' %}
{% resource 'closed.luma' %}
{% resource 'open.luma' %}
{% resource 'bdwn.luma' %}
diff --git a/templates/html/search.js b/templates/html/search.js
index 08d1c06..fb226f7 100644
--- a/templates/html/search.js
+++ b/templates/html/search.js
@@ -335,15 +335,11 @@ function SearchBox(name, resultsPath, inFrame, label, extension)
var searchValue = this.DOMSearchField().value.replace(/^ +/, "");
var code = searchValue.toLowerCase().charCodeAt(0);
- var idxChar = searchValue.substr(0, 1);
+ var idxChar = searchValue.substr(0, 1).toLowerCase();
if ( 0xD800 <= code && code <= 0xDBFF && searchValue > 1) // surrogate pair
{
idxChar = searchValue.substr(0, 2);
}
- else if (code <128)
- {
- idxChar = idxChar.toLowerCase();
- }
var resultsPage;
var resultsPageWithSearch;
diff --git a/templates/latex/tabu_doxygen.sty b/templates/latex/tabu_doxygen.sty
index 60fd7e8..3f17d1d 100755
--- a/templates/latex/tabu_doxygen.sty
+++ b/templates/latex/tabu_doxygen.sty
@@ -1,2557 +1,2557 @@
-%%
-%% This is file `tabu.sty',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% tabu.dtx (with options: `package')
-%%
-%% This is a generated file.
-%% Copyright (FC) 2010-2011 - lppl
-%%
-%% tabu : 2011/02/26 v2.8 - tabu : Flexible LaTeX tabulars
-%%
-%% **********************************************************************************************
-%% \begin{tabu} { preamble } => default target: \linewidth or \linegoal
-%% \begin{tabu} to <dimen>{ preamble } => target specified
-%% \begin{tabu} spread <dimen>{ preamble } => target relative to the ``natural width''
-%%
-%% tabu works in text and in math modes.
-%%
-%% X columns: automatic width adjustment + horizontal and vertical alignment
-%% \begin{tabu} { X[4c] X[1c] X[-2ml] }
-%%
-%% Horizontal lines and / or leaders:
-%% \hline\hline => double horizontal line
-%% \firsthline\hline => for nested tabulars
-%% \lasthline\hline => for nested tabulars
-%% \tabucline[line spec]{column-column} => ``funny'' lines (dash/leader)
-%% Automatic lines / leaders :
-%% \everyrow{\hline\hline}
-%%
-%% Vertical lines and / or leaders:
-%% \begin{tabu} { |[3pt red] X[4c] X[1c] X[-2ml] |[3pt blue] }
-%% \begin{tabu} { |[3pt red] X[4c] X[1c] X[-2ml] |[3pt on 2pt off 4pt blue] }
-%%
-%% Fixed vertical spacing adjustment:
-%% \extrarowheight=<dimen> \extrarowdepth=<dimen>
-%% or: \extrarowsep=<dimen> => may be prefixed by \global
-%%
-%% Dynamic vertical spacing adjustment:
-%% \abovetabulinesep=<dimen> \belowtabulinesep=<dimen>
-%% or: \tabulinesep=<dimen> => may be prefixed by \global
-%%
-%% delarray.sty shortcuts: in math and text modes
-%% \begin{tabu} .... \({ preamble }\)
-%%
-%% Algorithms reports:
-%% \tracingtabu=1 \tracingtabu=2
-%%
-%% **********************************************************************************************
-%%
-%% This work may be distributed and/or modified under the
-%% conditions of the LaTeX Project Public License, either
-%% version 1.3 of this license or (at your option) any later
-%% version. The latest version of this license is in
-%% http://www.latex-project.org/lppl.txt
-%%
-%% This work consists of the main source file tabu.dtx
-%% and the derived files
-%% tabu.sty, tabu.pdf, tabu.ins
-%%
-%% tabu : Flexible LaTeX tabulars
-%% lppl copyright 2010-2011 by FC <florent.chervet@free.fr>
-%%
-
-\NeedsTeXFormat{LaTeX2e}[2005/12/01]
-\ProvidesPackage{tabu_doxygen}[2011/02/26 v2.8 - flexible LaTeX tabulars (FC), frozen version for doxygen]
-\RequirePackage{array}[2008/09/09]
-\RequirePackage{varwidth}[2009/03/30]
-\AtEndOfPackage{\tabu@AtEnd \let\tabu@AtEnd \@undefined}
-\let\tabu@AtEnd\@empty
-\def\TMP@EnsureCode#1={%
- \edef\tabu@AtEnd{\tabu@AtEnd
- \catcode#1 \the\catcode#1}%
- \catcode#1=%
-}% \TMP@EnsureCode
-\TMP@EnsureCode 33 = 12 % !
-\TMP@EnsureCode 58 = 12 % : (for siunitx)
-\TMP@EnsureCode124 = 12 % |
-\TMP@EnsureCode 36 = 3 % $ = math shift
-\TMP@EnsureCode 38 = 4 % & = tab alignment character
-\TMP@EnsureCode 32 = 10 % space
-\TMP@EnsureCode 94 = 7 % ^
-\TMP@EnsureCode 95 = 8 % _
-%% Constants --------------------------------------------------------
-\newcount \c@taburow \def\thetaburow {\number\c@taburow}
-\newcount \tabu@nbcols
-\newcount \tabu@cnt
-\newcount \tabu@Xcol
-\let\tabu@start \@tempcnta
-\let\tabu@stop \@tempcntb
-\newcount \tabu@alloc \tabu@alloc=\m@ne
-\newcount \tabu@nested
-\def\tabu@alloc@{\global\advance\tabu@alloc \@ne \tabu@nested\tabu@alloc}
-\newdimen \tabu@target
-\newdimen \tabu@spreadtarget
-\newdimen \tabu@naturalX
-\newdimen \tabucolX
-\let\tabu@DELTA \@tempdimc
-\let\tabu@thick \@tempdima
-\let\tabu@on \@tempdimb
-\let\tabu@off \@tempdimc
-\newdimen \tabu@Xsum
-\newdimen \extrarowdepth
-\newdimen \abovetabulinesep
-\newdimen \belowtabulinesep
-\newdimen \tabustrutrule \tabustrutrule \z@
-\newtoks \tabu@thebody
-\newtoks \tabu@footnotes
-\newsavebox \tabu@box
-\newsavebox \tabu@arstrutbox
-\newsavebox \tabu@hleads
-\newsavebox \tabu@vleads
-\newif \iftabu@colortbl
-\newif \iftabu@siunitx
-\newif \iftabu@measuring
-\newif \iftabu@spread
-\newif \iftabu@negcoef
-\newif \iftabu@everyrow
-\def\tabu@everyrowtrue {\global\let\iftabu@everyrow \iftrue}
-\def\tabu@everyrowfalse{\global\let\iftabu@everyrow \iffalse}
-\newif \iftabu@long
-\newif \iftabuscantokens
-\def\tabu@rescan {\tabu@verbatim \scantokens }
-%% Utilities (for internal usage) -----------------------------------
-\def\tabu@gobblespace #1 {#1}
-\def\tabu@gobbletoken #1#2{#1}
-\def\tabu@gobbleX{\futurelet\@let@token \tabu@gobblex}
-\def\tabu@gobblex{\if ^^J\noexpand\@let@token \expandafter\@gobble
- \else\ifx \@sptoken\@let@token
- \expandafter\tabu@gobblespace\expandafter\tabu@gobbleX
- \fi\fi
-}% \tabu@gobblex
-\def\tabu@X{^^J}
-{\obeyspaces
-\global\let\tabu@spxiii= % saves an active space (for \ifx)
-\gdef\tabu@@spxiii{ }}
-\def\tabu@ifenvir {% only for \multicolumn
- \expandafter\tabu@if@nvir\csname\@currenvir\endcsname
-}% \tabu@ifenvir
-\def\tabu@if@nvir #1{\csname @\ifx\tabu#1first\else
- \ifx\longtabu#1first\else
- second\fi\fi oftwo\endcsname
-}% \tabu@ifenvir
-\def\tabu@modulo #1#2{\numexpr\ifnum\numexpr#1=\z@ 0\else #1-(#1-(#2-1)/2)/(#2)*(#2)\fi}
-{\catcode`\&=3
-\gdef\tabu@strtrim #1{% #1 = control sequence to trim
- \ifodd 1\ifx #1\@empty \else \ifx #1\space \else 0\fi \fi
- \let\tabu@c@l@r \@empty \let#1\@empty
- \else \expandafter \tabu@trimspaces #1&#1\@nnil
- \fi
-}% \tabu@strtrim
-\gdef\tabu@trimspaces #1&#2\@nnil{\let\tabu@c@l@r=#2\tabu@firstspace .#1& &#2}%
-\gdef\tabu@firstspace #1#2#3 &{\tabu@lastspace #2#3&}
-\gdef\tabu@lastspace #1&#2&#3{\def #3{#1}%
- \ifx #3\tabu@c@l@r \def\tabu@c@l@r{\protect\color{#1}}\expandafter\remove@to@nnil \fi
- \tabu@trimspaces #1&#3\@nnil}
-}% \catcode
-\def\tabu@sanitizearg #1#2{{%
- \csname \ifcsname if@safe@actives\endcsname % <babel>
- @safe@activestrue\else
- relax\fi \endcsname
- \edef#2{#1}\tabu@strtrim#2\@onelevel@sanitize#2%
- \expandafter}\expandafter\def\expandafter#2\expandafter{#2}%
-}% \tabu@sanitizearg
-\def\tabu@textbar #1{\begingroup \endlinechar\m@ne \scantokens{\def\:{|}}%
- \expandafter\endgroup \expandafter#1\:% !!! semi simple group !!!
-}% \tabu@textbar
-\def\tabu@everyrow@bgroup{\iftabu@everyrow \begingroup \else \noalign{\ifnum0=`}\fi \fi}
-\def\tabu@everyrow@egroup{%
- \iftabu@everyrow \expandafter \endgroup \the\toks@
- \else \ifnum0=`{\fi}%
- \fi
-}% \tabu@everyrow@egroup
-\def\tabu@arstrut {\global\setbox\@arstrutbox \hbox{\vrule
- height \arraystretch \dimexpr\ht\strutbox+\extrarowheight
- depth \arraystretch \dimexpr\dp\strutbox+\extrarowdepth
- width \z@}%
-}% \tabu@arstrut
-\def\tabu@rearstrut {%
- \@tempdima \arraystretch\dimexpr\ht\strutbox+\extrarowheight \relax
- \@tempdimb \arraystretch\dimexpr\dp\strutbox+\extrarowdepth \relax
- \ifodd 1\ifdim \ht\@arstrutbox=\@tempdima
- \ifdim \dp\@arstrutbox=\@tempdimb 0 \fi\fi
- \tabu@mkarstrut
- \fi
-}% \tabu@rearstrut
-\def\tabu@@DBG #1{\ifdim\tabustrutrule>\z@ \color{#1}\fi}
-\def\tabu@DBG@arstrut {\global\setbox\@arstrutbox
- \hbox to\z@{\hbox to\z@{\hss
- {\tabu@DBG{cyan}\vrule
- height \arraystretch \dimexpr\ht\strutbox+\extrarowheight
- depth \z@
- width \tabustrutrule}\kern-\tabustrutrule
- {\tabu@DBG{pink}\vrule
- height \z@
- depth \arraystretch \dimexpr\dp\strutbox+\extrarowdepth
- width \tabustrutrule}}}%
-}% \tabu@DBG@arstrut
-\def\tabu@save@decl{\toks\count@ \expandafter{\the\toks\expandafter\count@
- \@nextchar}}%
-\def\tabu@savedecl{\ifcat$\d@llarend\else
- \let\save@decl \tabu@save@decl \fi % no inversion of tokens in text mode
-}% \tabu@savedecl
-\def\tabu@finalstrut #1{\unskip\ifhmode\nobreak\fi\vrule height\z@ depth\z@ width\z@}
-\newcommand*\tabuDisableCommands {\g@addto@macro\tabu@trialh@@k }
-\let\tabu@trialh@@k \@empty
-\def\tabu@nowrite #1#{{\afterassignment}\toks@}
-\let\tabu@write\write
-\let\tabu@immediate\immediate
-\def\tabu@WRITE{\begingroup
- \def\immediate\write{\aftergroup\endgroup
- \tabu@immediate\tabu@write}%
-}% \tabu@WRITE
-\expandafter\def\expandafter\tabu@GenericError\expandafter{%
- \expandafter\tabu@WRITE\GenericError}
-\def\tabu@warn{\tabu@WRITE\PackageWarning{tabu}}
-\def\tabu@noxfootnote [#1]{\@gobble}
-\def\tabu@nocolor #1#{\@gobble}
-\newcommand*\tabu@norowcolor[2][]{}
-\def\tabu@maybesiunitx #1{\def\tabu@temp{#1}%
- \futurelet\@let@token \tabu@m@ybesiunitx}
-\def\tabu@m@ybesiunitx #1{\def\tabu@m@ybesiunitx {%
- \ifx #1\@let@token \let\tabu@cellleft \@empty \let\tabu@cellright \@empty \fi
- \tabu@temp}% \tabu@m@ybesiunitx
-}\expandafter\tabu@m@ybesiunitx \csname siunitx_table_collect_begin:Nn\endcsname
-\def\tabu@celllalign@def #1{\def\tabu@celllalign{\tabu@maybesiunitx{#1}}}%
-%% Fixed vertical spacing adjustment: \extrarowsep ------------------
-\newcommand*\extrarowsep{\edef\tabu@C@extra{\the\numexpr\tabu@C@extra+1}%
- \iftabu@everyrow \aftergroup\tabu@Gextra
- \else \aftergroup\tabu@n@Gextra
- \fi
- \@ifnextchar={\tabu@gobbletoken\tabu@extra} \tabu@extra
-}% \extrarowsep
-\def\tabu@extra {\@ifnextchar_%
- {\tabu@gobbletoken{\tabu@setextra\extrarowheight \extrarowdepth}}
- {\ifx ^\@let@token \def\tabu@temp{%
- \tabu@gobbletoken{\tabu@setextra\extrarowdepth \extrarowheight}}%
- \else \let\tabu@temp \@empty
- \afterassignment \tabu@setextrasep \extrarowdepth
- \fi \tabu@temp}%
-}% \tabu@extra
-\def\tabu@setextra #1#2{\def\tabu@temp{\tabu@extr@#1#2}\afterassignment\tabu@temp#2}
-\def\tabu@extr@ #1#2{\@ifnextchar^%
- {\tabu@gobbletoken{\tabu@setextra\extrarowdepth \extrarowheight}}
- {\ifx _\@let@token \def\tabu@temp{%
- \tabu@gobbletoken{\tabu@setextra\extrarowheight \extrarowdepth}}%
- \else \let\tabu@temp \@empty
- \tabu@Gsave \tabu@G@extra \tabu@C@extra \extrarowheight \extrarowdepth
- \fi \tabu@temp}%
-}% \tabu@extr@
-\def\tabu@setextrasep {\extrarowheight=\extrarowdepth
- \tabu@Gsave \tabu@G@extra \tabu@C@extra \extrarowheight \extrarowdepth
-}% \tabu@setextrasep
-\def\tabu@Gextra{\ifx \tabu@G@extra\@empty \else {\tabu@Rextra}\fi}
-\def\tabu@n@Gextra{\ifx \tabu@G@extra\@empty \else \noalign{\tabu@Rextra}\fi}
-\def\tabu@Rextra{\tabu@Grestore \tabu@G@extra \tabu@C@extra}
-\let\tabu@C@extra \z@
-\let\tabu@G@extra \@empty
-%% Dynamic vertical spacing adjustment: \tabulinesep ----------------
-\newcommand*\tabulinesep{\edef\tabu@C@linesep{\the\numexpr\tabu@C@linesep+1}%
- \iftabu@everyrow \aftergroup\tabu@Glinesep
- \else \aftergroup\tabu@n@Glinesep
- \fi
- \@ifnextchar={\tabu@gobbletoken\tabu@linesep} \tabu@linesep
-}% \tabulinesep
-\def\tabu@linesep {\@ifnextchar_%
- {\tabu@gobbletoken{\tabu@setsep\abovetabulinesep \belowtabulinesep}}
- {\ifx ^\@let@token \def\tabu@temp{%
- \tabu@gobbletoken{\tabu@setsep\belowtabulinesep \abovetabulinesep}}%
- \else \let\tabu@temp \@empty
- \afterassignment \tabu@setlinesep \abovetabulinesep
- \fi \tabu@temp}%
-}% \tabu@linesep
-\def\tabu@setsep #1#2{\def\tabu@temp{\tabu@sets@p#1#2}\afterassignment\tabu@temp#2}
-\def\tabu@sets@p #1#2{\@ifnextchar^%
- {\tabu@gobbletoken{\tabu@setsep\belowtabulinesep \abovetabulinesep}}
- {\ifx _\@let@token \def\tabu@temp{%
- \tabu@gobbletoken{\tabu@setsep\abovetabulinesep \belowtabulinesep}}%
- \else \let\tabu@temp \@empty
- \tabu@Gsave \tabu@G@linesep \tabu@C@linesep \abovetabulinesep \belowtabulinesep
- \fi \tabu@temp}%
-}% \tabu@sets@p
-\def\tabu@setlinesep {\belowtabulinesep=\abovetabulinesep
- \tabu@Gsave \tabu@G@linesep \tabu@C@linesep \abovetabulinesep \belowtabulinesep
-}% \tabu@setlinesep
-\def\tabu@Glinesep{\ifx \tabu@G@linesep\@empty \else {\tabu@Rlinesep}\fi}
-\def\tabu@n@Glinesep{\ifx \tabu@G@linesep\@empty \else \noalign{\tabu@Rlinesep}\fi}
-\def\tabu@Rlinesep{\tabu@Grestore \tabu@G@linesep \tabu@C@linesep}
-\let\tabu@C@linesep \z@
-\let\tabu@G@linesep \@empty
-%% \global\extrarowsep and \global\tabulinesep -------------------
-\def\tabu@Gsave #1#2#3#4{\xdef#1{#1%
- \toks#2{\toks\the\currentgrouplevel{\global#3\the#3\global#4\the#4}}}%
-}% \tabu@Gsave
-\def\tabu@Grestore#1#2{%
- \toks#2{}#1\toks\currentgrouplevel\expandafter{\expandafter}\the\toks#2\relax
- \ifcat$\the\toks\currentgrouplevel$\else
- \global\let#1\@empty \global\let#2\z@
- \the\toks\currentgrouplevel
- \fi
-}% \tabu@Grestore
-%% Setting code for every row ---------------------------------------
-\newcommand*\everyrow{\tabu@everyrow@bgroup
- \tabu@start \z@ \tabu@stop \z@ \tabu@evrstartstop
-}% \everyrow
-\def\tabu@evrstartstop {\@ifnextchar^%
- {\afterassignment \tabu@evrstartstop \tabu@stop=}%
- {\ifx ^\@let@token
- \afterassignment\tabu@evrstartstop \tabu@start=%
- \else \afterassignment\tabu@everyr@w \toks@
- \fi}%
-}% \tabu@evrstartstop
-\def\tabu@everyr@w {%
- \xdef\tabu@everyrow{%
- \noexpand\tabu@everyrowfalse
- \let\noalign \relax
- \noexpand\tabu@rowfontreset
- \iftabu@colortbl \noexpand\tabu@rc@ \fi % \taburowcolors
- \let\noexpand\tabu@docline \noexpand\tabu@docline@evr
- \the\toks@
- \noexpand\tabu@evrh@@k
- \noexpand\tabu@rearstrut
- \global\advance\c@taburow \@ne}%
- \iftabu@everyrow \toks@\expandafter
- {\expandafter\def\expandafter\tabu@evr@L\expandafter{\the\toks@}\ignorespaces}%
- \else \xdef\tabu@evr@G{\the\toks@}%
- \fi
- \tabu@everyrow@egroup
-}% \tabu@everyr@w
-\def\tabu@evr {\def\tabu@evrh@@k} % for internal use only
-\tabu@evr{}
-%% line style and leaders -------------------------------------------
-\newcommand*\newtabulinestyle [1]{%
- {\@for \@tempa :=#1\do{\expandafter\tabu@newlinestyle \@tempa==\@nil}}%
-}% \newtabulinestyle
-\def\tabu@newlinestyle #1=#2=#3\@nil{\tabu@getline {#2}%
- \tabu@sanitizearg {#1}\@tempa
- \ifodd 1\ifx \@tempa\@empty \ifdefined\tabu@linestyle@ 0 \fi\fi
- \global\expandafter\let
- \csname tabu@linestyle@\@tempa \endcsname =\tabu@thestyle \fi
-}% \tabu@newlinestyle
-\newcommand*\tabulinestyle [1]{\tabu@everyrow@bgroup \tabu@getline{#1}%
- \iftabu@everyrow
- \toks@\expandafter{\expandafter \def \expandafter
- \tabu@ls@L\expandafter{\tabu@thestyle}\ignorespaces}%
- \gdef\tabu@ls@{\tabu@ls@L}%
- \else
- \global\let\tabu@ls@G \tabu@thestyle
- \gdef\tabu@ls@{\tabu@ls@G}%
- \fi
- \tabu@everyrow@egroup
-}% \tabulinestyle
-\newcommand*\taburulecolor{\tabu@everyrow@bgroup \tabu@textbar \tabu@rulecolor}
-\def\tabu@rulecolor #1{\toks@{}%
- \def\tabu@temp #1##1#1{\tabu@ruledrsc{##1}}\@ifnextchar #1%
- \tabu@temp
- \tabu@rulearc
-}% \tabu@rulecolor
-\def\tabu@ruledrsc #1{\edef\tabu@temp{#1}\tabu@strtrim\tabu@temp
- \ifx \tabu@temp\@empty \def\tabu@temp{\tabu@rule@drsc@ {}{}}%
- \else \edef\tabu@temp{\noexpand\tabu@rule@drsc@ {}{\tabu@temp}}%
- \fi
- \tabu@temp
-}% \tabu@ruledrsc@
-\def\tabu@ruledrsc@ #1#{\tabu@rule@drsc@ {#1}}
-\def\tabu@rule@drsc@ #1#2{%
- \iftabu@everyrow
- \ifx \\#1#2\\\toks@{\let\CT@drsc@ \relax}%
- \else \toks@{\def\CT@drsc@{\color #1{#2}}}%
- \fi
- \else
- \ifx \\#1#2\\\global\let\CT@drsc@ \relax
- \else \gdef\CT@drsc@{\color #1{#2}}%
- \fi
- \fi
- \tabu@rulearc
-}% \tabu@rule@drsc@
-\def\tabu@rulearc #1#{\tabu@rule@arc@ {#1}}
-\def\tabu@rule@arc@ #1#2{%
- \iftabu@everyrow
- \ifx \\#1#2\\\toks@\expandafter{\the\toks@ \def\CT@arc@{}}%
- \else \toks@\expandafter{\the\toks@ \def\CT@arc@{\color #1{#2}}}%
- \fi
- \toks@\expandafter{\the\toks@
- \let\tabu@arc@L \CT@arc@
- \let\tabu@drsc@L \CT@drsc@
- \ignorespaces}%
- \else
- \ifx \\#1#2\\\gdef\CT@arc@{}%
- \else \gdef\CT@arc@{\color #1{#2}}%
- \fi
- \global\let\tabu@arc@G \CT@arc@
- \global\let\tabu@drsc@G \CT@drsc@
- \fi
- \tabu@everyrow@egroup
-}% \tabu@rule@arc@
-\def\taburowcolors {\tabu@everyrow@bgroup \@testopt \tabu@rowcolors 1}
-\def\tabu@rowcolors [#1]#2#{\tabu@rowc@lors{#1}{#2}}
-\def\tabu@rowc@lors #1#2#3{%
- \toks@{}\@defaultunits \count@ =\number0#2\relax \@nnil
- \@defaultunits \tabu@start =\number0#1\relax \@nnil
- \ifnum \count@<\tw@ \count@=\tw@ \fi
- \advance\tabu@start \m@ne
- \ifnum \tabu@start<\z@ \tabu@start \z@ \fi
- \tabu@rowcolorseries #3\in@..\in@ \@nnil
-}% \tabu@rowcolors
-\def\tabu@rowcolorseries #1..#2\in@ #3\@nnil {%
- \ifx \in@#1\relax
- \iftabu@everyrow \toks@{\def\tabu@rc@{}\let\tabu@rc@L \tabu@rc@}%
- \else \gdef\tabu@rc@{}\global\let\tabu@rc@G \tabu@rc@
- \fi
- \else
- \ifx \\#2\\\tabu@rowcolorserieserror \fi
- \tabu@sanitizearg{#1}\tabu@temp
- \tabu@sanitizearg{#2}\@tempa
- \advance\count@ \m@ne
- \iftabu@everyrow
- \def\tabu@rc@ ##1##2##3##4{\def\tabu@rc@{%
- \ifnum ##2=\c@taburow
- \definecolorseries{tabu@rcseries@\the\tabu@nested}{rgb}{last}{##3}{##4}\fi
- \ifnum \c@taburow<##2 \else
- \ifnum \tabu@modulo {\c@taburow-##2}{##1+1}=\z@
- \resetcolorseries[{##1}]{tabu@rcseries@\the\tabu@nested}\fi
- \xglobal\colorlet{tabu@rc@\the\tabu@nested}{tabu@rcseries@\the\tabu@nested!!+}%
- \rowcolor{tabu@rc@\the\tabu@nested}\fi}%
- }\edef\x{\noexpand\tabu@rc@ {\the\count@}
- {\the\tabu@start}
- {\tabu@temp}
- {\@tempa}%
- }\x
- \toks@\expandafter{\expandafter\def\expandafter\tabu@rc@\expandafter{\tabu@rc@}}%
- \toks@\expandafter{\the\toks@ \let\tabu@rc@L \tabu@rc@ \ignorespaces}%
- \else % inside \noalign
- \definecolorseries{tabu@rcseries@\the\tabu@nested}{rgb}{last}{\tabu@temp}{\@tempa}%
- \expandafter\resetcolorseries\expandafter[\the\count@]{tabu@rcseries@\the\tabu@nested}%
- \xglobal\colorlet{tabu@rc@\the\tabu@nested}{tabu@rcseries@\the\tabu@nested!!+}%
- \let\noalign \relax \rowcolor{tabu@rc@\the\tabu@nested}%
- \def\tabu@rc@ ##1##2{\gdef\tabu@rc@{%
- \ifnum \tabu@modulo {\c@taburow-##2}{##1+1}=\@ne
- \resetcolorseries[{##1}]{tabu@rcseries@\the\tabu@nested}\fi
- \xglobal\colorlet{tabu@rc@\the\tabu@nested}{tabu@rcseries@\the\tabu@nested!!+}%
- \rowcolor{tabu@rc@\the\tabu@nested}}%
- }\edef\x{\noexpand\tabu@rc@{\the\count@}{\the\c@taburow}}\x
- \global\let\tabu@rc@G \tabu@rc@
- \fi
- \fi
- \tabu@everyrow@egroup
-}% \tabu@rowcolorseries
-\tabuDisableCommands {\let\tabu@rc@ \@empty }
-\def\tabu@rowcolorserieserror {\PackageError{tabu}
- {Invalid syntax for \string\taburowcolors
- \MessageBreak Please look at the documentation!}\@ehd
-}% \tabu@rowcolorserieserror
-\newcommand*\tabureset {%
- \tabulinesep=\z@ \extrarowsep=\z@ \extratabsurround=\z@
- \tabulinestyle{}\everyrow{}\taburulecolor||{}\taburowcolors{}%
-}% \tabureset
-%% Parsing the line styles ------------------------------------------
-\def\tabu@getline #1{\begingroup
- \csname \ifcsname if@safe@actives\endcsname % <babel>
- @safe@activestrue\else
- relax\fi \endcsname
- \edef\tabu@temp{#1}\tabu@sanitizearg{#1}\@tempa
- \let\tabu@thestyle \relax
- \ifcsname tabu@linestyle@\@tempa \endcsname
- \edef\tabu@thestyle{\endgroup
- \def\tabu@thestyle{\expandafter\noexpand
- \csname tabu@linestyle@\@tempa\endcsname}%
- }\tabu@thestyle
- \else \expandafter\tabu@definestyle \tabu@temp \@nil
- \fi
-}% \tabu@getline
-\def\tabu@definestyle #1#2\@nil {\endlinechar \m@ne \makeatletter
- \tabu@thick \maxdimen \tabu@on \maxdimen \tabu@off \maxdimen
- \let\tabu@c@lon \@undefined \let\tabu@c@loff \@undefined
- \ifodd 1\ifcat .#1\else\ifcat\relax #1\else 0\fi\fi % catcode 12 or non expandable cs
- \def\tabu@temp{\tabu@getparam{thick}}%
- \else \def\tabu@temp{\tabu@getparam{thick}\maxdimen}%
- \fi
- {%
- \let\tabu@ \relax
- \def\:{\obeyspaces \tabu@oXIII \tabu@commaXIII \edef\:}% (space active \: happy ;-))
- \scantokens{\:{\tabu@temp #1#2 \tabu@\tabu@}}%
- \expandafter}\expandafter
- \def\expandafter\:\expandafter{\:}% line spec rewritten now ;-)
- \def\;{\def\:}%
- \scantokens\expandafter{\expandafter\;\expandafter{\:}}% space is now inactive (catcode 10)
- \let\tabu@ \tabu@getcolor \:% all arguments are ready now ;-)
- \ifdefined\tabu@c@lon \else \let\tabu@c@lon\@empty \fi
- \ifx \tabu@c@lon\@empty \def\tabu@c@lon{\CT@arc@}\fi
- \ifdefined\tabu@c@loff \else \let\tabu@c@loff \@empty \fi
- \ifdim \tabu@on=\maxdimen \ifdim \tabu@off<\maxdimen
- \tabu@on \tabulineon \fi\fi
- \ifdim \tabu@off=\maxdimen \ifdim \tabu@on<\maxdimen
- \tabu@off \tabulineoff \fi\fi
- \ifodd 1\ifdim \tabu@off=\maxdimen \ifdim \tabu@on=\maxdimen 0 \fi\fi
- \in@true % <leaders>
- \else \in@false % <rule>
- \fi
- \ifdim\tabu@thick=\maxdimen \def\tabu@thick{\arrayrulewidth}%
- \else \edef\tabu@thick{\the\tabu@thick}%
- \fi
- \edef \tabu@thestyle ##1##2{\endgroup
- \def\tabu@thestyle{%
- \ifin@ \noexpand\tabu@leadersstyle {\tabu@thick}
- {\the\tabu@on}{##1}
- {\the\tabu@off}{##2}%
- \else \noexpand\tabu@rulesstyle
- {##1\vrule width \tabu@thick}%
- {##1\leaders \hrule height \tabu@thick \hfil}%
- \fi}%
- }\expandafter \expandafter
- \expandafter \tabu@thestyle \expandafter
- \expandafter \expandafter
- {\expandafter\tabu@c@lon\expandafter}\expandafter{\tabu@c@loff}%
-}% \tabu@definestyle
-{\catcode`\O=\active \lccode`\O=`\o \catcode`\,=\active
- \lowercase{\gdef\tabu@oXIII {\catcode`\o=\active \let O=\tabu@oxiii}}
- \gdef\tabu@commaXIII {\catcode`\,=\active \let ,=\space}
-}% \catcode
-\def\tabu@oxiii #1{%
- \ifcase \ifx n#1\z@ \else
- \ifx f#1\@ne\else
- \tw@ \fi\fi
- \expandafter\tabu@onxiii
- \or \expandafter\tabu@ofxiii
- \else o%
- \fi#1}%
-\def\tabu@onxiii #1#2{%
- \ifcase \ifx !#2\tw@ \else
- \ifcat.\noexpand#2\z@ \else
- \ifx \tabu@spxiii#2\@ne\else
- \tw@ \fi\fi\fi
- \tabu@getparam{on}#2\expandafter\@gobble
- \or \expandafter\tabu@onxiii % (space is active)
- \else o\expandafter\@firstofone
- \fi{#1#2}}%
-\def\tabu@ofxiii #1#2{%
- \ifx #2f\expandafter\tabu@offxiii
- \else o\expandafter\@firstofone
- \fi{#1#2}}
-\def\tabu@offxiii #1#2{%
- \ifcase \ifx !#2\tw@ \else
- \ifcat.\noexpand#2\z@ \else
- \ifx\tabu@spxiii#2\@ne \else
- \tw@ \fi\fi\fi
- \tabu@getparam{off}#2\expandafter\@gobble
- \or \expandafter\tabu@offxiii % (space is active)
- \else o\expandafter\@firstofone
- \fi{#1#2}}
-\def\tabu@getparam #1{\tabu@ \csname tabu@#1\endcsname=}
-\def\tabu@getcolor #1{% \tabu@ <- \tabu@getcolor after \edef
- \ifx \tabu@#1\else % no more spec
- \let\tabu@theparam=#1\afterassignment \tabu@getc@l@r #1\fi
-}% \tabu@getcolor
-\def\tabu@getc@l@r #1\tabu@ {%
- \def\tabu@temp{#1}\tabu@strtrim \tabu@temp
- \ifx \tabu@temp\@empty
- \else%\ifcsname \string\color@\tabu@temp \endcsname % if the color exists
- \ifx \tabu@theparam \tabu@off \let\tabu@c@loff \tabu@c@l@r
- \else \let\tabu@c@lon \tabu@c@l@r
- \fi
- %\else \tabu@warncolour{\tabu@temp}%
- \fi%\fi
- \tabu@ % next spec
-}% \tabu@getc@l@r
-\def\tabu@warncolour #1{\PackageWarning{tabu}
- {Color #1 is not defined. Default color used}%
-}% \tabu@warncolour
-\def\tabu@leadersstyle #1#2#3#4#5{\def\tabu@leaders{{#1}{#2}{#3}{#4}{#5}}%
- \ifx \tabu@leaders\tabu@leaders@G \else
- \tabu@LEADERS{#1}{#2}{#3}{#4}{#5}\fi
-}% \tabu@leadersstyle
-\def\tabu@rulesstyle #1#2{\let\tabu@leaders \@undefined
- \gdef\tabu@thevrule{#1}\gdef\tabu@thehrule{#2}%
-}% \tabu@rulesstyle
-%% The leaders boxes ------------------------------------------------
-\def\tabu@LEADERS #1#2#3#4#5{%% width, dash, dash color, gap, gap color
- {\let\color \tabu@color % => during trials -> \color = \tabu@nocolor
- {% % but the leaders boxes should have colors !
- \def\@therule{\vrule}\def\@thick{height}\def\@length{width}%
- \def\@box{\hbox}\def\@unbox{\unhbox}\def\@elt{\wd}%
- \def\@skip{\hskip}\def\@ss{\hss}\def\tabu@leads{\tabu@hleads}%
- \tabu@l@@d@rs {#1}{#2}{#3}{#4}{#5}%
- \global\let\tabu@thehleaders \tabu@theleaders
- }%
- {%
- \def\@therule{\hrule}\def\@thick{width}\def\@length{height}%
- \def\@box{\vbox}\def\@unbox{\unvbox}\def\@elt{\ht}%
- \def\@skip{\vskip}\def\@ss{\vss}\def\tabu@leads{\tabu@vleads}%
- \tabu@l@@d@rs {#1}{#2}{#3}{#4}{#5}%
- \global\let\tabu@thevleaders \tabu@theleaders
- }%
- \gdef\tabu@leaders@G{{#1}{#2}{#3}{#4}{#5}}%
- }%
-}% \tabu@LEADERS
-\def\tabu@therule #1#2{\@therule \@thick#1\@length\dimexpr#2/2 \@depth\z@}
-\def\tabu@l@@d@rs #1#2#3#4#5{%% width, dash, dash color, gap, gap color
- \global\setbox \tabu@leads=\@box{%
- {#3\tabu@therule{#1}{#2}}%
- \ifx\\#5\\\@skip#4\else{#5\tabu@therule{#1}{#4*2}}\fi
- {#3\tabu@therule{#1}{#2}}}%
- \global\setbox\tabu@leads=\@box to\@elt\tabu@leads{\@ss
- {#3\tabu@therule{#1}{#2}}\@unbox\tabu@leads}%
- \edef\tabu@theleaders ##1{\def\noexpand\tabu@theleaders {%
- {##1\tabu@therule{#1}{#2}}%
- \xleaders \copy\tabu@leads \@ss
- \tabu@therule{0pt}{-#2}{##1\tabu@therule{#1}{#2}}}%
- }\tabu@theleaders{#3}%
-}% \tabu@l@@d@rs
-%% \tabu \endtabu \tabu* \longtabu \endlongtabu \longtabu* ----------
-\newcommand*\tabu {\tabu@longfalse
- \ifmmode \def\tabu@ {\array}\def\endtabu {\endarray}%
- \else \def\tabu@ {\tabu@tabular}\def\endtabu {\endtabular}\fi
- \expandafter\let\csname tabu*\endcsname \tabu
- \expandafter\def\csname endtabu*\endcsname{\endtabu}%
- \tabu@spreadfalse \tabu@negcoeffalse \tabu@settarget
-}% {tabu}
-\let\tabu@tabular \tabular % <For LyX: some users redefine \tabular...>
-\expandafter\def\csname tabu*\endcsname{\tabuscantokenstrue \tabu}
-\newcommand*\longtabu {\tabu@longtrue
- \ifmmode\PackageError{tabu}{longtabu not allowed in math mode}\fi
- \def\tabu@{\longtable}\def\endlongtabu{\endlongtable}%
- \LTchunksize=\@M
- \expandafter\let\csname tabu*\endcsname \tabu
- \expandafter\def\csname endlongtabu*\endcsname{\endlongtabu}%
- \let\LT@startpbox \tabu@LT@startpbox % \everypar{ array struts }
- \tabu@spreadfalse \tabu@negcoeffalse \tabu@settarget
-}% {longtabu}
-\expandafter\def\csname longtabu*\endcsname{\tabuscantokenstrue \longtabu}
-\def\tabu@nolongtabu{\PackageError{tabu}
- {longtabu requires the longtable package}\@ehd}
-%% Read the target and then : \tabular or \@array ------------------
-\def\tabu@settarget {\futurelet\@let@token \tabu@sett@rget }
-\def\tabu@sett@rget {\tabu@target \z@
- \ifcase \ifx \bgroup\@let@token \z@ \else
- \ifx \@sptoken\@let@token \@ne \else
- \if t\@let@token \tw@ \else
- \if s\@let@token \thr@@\else
- \z@\fi\fi\fi\fi
- \expandafter\tabu@begin
- \or \expandafter\tabu@gobblespace\expandafter\tabu@settarget
- \or \expandafter\tabu@to
- \or \expandafter\tabu@spread
- \fi
-}% \tabu@sett@rget
-\def\tabu@to to{\def\tabu@halignto{to}\tabu@gettarget}
-\def\tabu@spread spread{\tabu@spreadtrue\def\tabu@halignto{spread}\tabu@gettarget}
-\def\tabu@gettarget {\afterassignment\tabu@linegoaltarget \tabu@target }
-\def\tabu@linegoaltarget {\futurelet\tabu@temp \tabu@linegoalt@rget }
-\def\tabu@linegoalt@rget {%
- \ifx \tabu@temp\LNGL@setlinegoal
- \LNGL@setlinegoal \expandafter \@firstoftwo \fi % @gobbles \LNGL@setlinegoal
- \tabu@begin
-}% \tabu@linegoalt@rget
-\def\tabu@begin #1#{%
- \iftabu@measuring \expandafter\tabu@nestedmeasure \fi
- \ifdim \tabu@target=\z@ \let\tabu@halignto \@empty
- \else \edef\tabu@halignto{\tabu@halignto\the\tabu@target}%
- \fi
- \@testopt \tabu@tabu@ \tabu@aligndefault #1\@nil
-}% \tabu@begin
-\long\def\tabu@tabu@ [#1]#2\@nil #3{\tabu@setup
- \def\tabu@align {#1}\def\tabu@savedpream{\NC@find #3}%
- \tabu@ [\tabu@align ]#2{#3\tabu@rewritefirst }%
-}% \tabu@tabu@
-\def\tabu@nestedmeasure {%
- \ifodd 1\iftabu@spread \else \ifdim\tabu@target=\z@ \else 0 \fi\fi\relax
- \tabu@spreadtrue
- \else \begingroup \iffalse{\fi \ifnum0=`}\fi
- \toks@{}\def\tabu@stack{b}%
- \expandafter\tabu@collectbody\expandafter\tabu@quickrule
- \expandafter\endgroup
- \fi
-}% \tabu@nestedmeasure
-\def\tabu@quickrule {\indent\vrule height\z@ depth\z@ width\tabu@target}
-%% \tabu@setup \tabu@init \tabu@indent
-\def\tabu@setup{\tabu@alloc@
- \ifcase \tabu@nested
- \ifmmode \else \iftabu@spread\else \ifdim\tabu@target=\z@
- \let\tabu@afterendpar \par
- \fi\fi\fi
- \def\tabu@aligndefault{c}\tabu@init \tabu@indent
- \else % <nested tabu>
- \def\tabu@aligndefault{t}\let\tabudefaulttarget \linewidth
- \fi
- \let\tabu@thetarget \tabudefaulttarget \let\tabu@restored \@undefined
- \edef\tabu@NC@list{\the\NC@list}\NC@list{\NC@do \tabu@rewritefirst}%
- \everycr{}\let\@startpbox \tabu@startpbox % for nested tabu inside longtabu...
- \let\@endpbox \tabu@endpbox % idem " " " " " "
- \let\@tabarray \tabu@tabarray % idem " " " " " "
- \tabu@setcleanup \tabu@setreset
-}% \tabu@setup
-\def\tabu@init{\tabu@starttimer \tabu@measuringfalse
- \edef\tabu@hfuzz {\the\dimexpr\hfuzz+1sp}\global\tabu@footnotes{}%
- \let\firsthline \tabu@firsthline \let\lasthline \tabu@lasthline
- \let\firstline \tabu@firstline \let\lastline \tabu@lastline
- \let\hline \tabu@hline \let\@xhline \tabu@xhline
- \let\color \tabu@color \let\@arstrutbox \tabu@arstrutbox
- \iftabu@colortbl\else\let\LT@@hline \tabu@LT@@hline \fi
- \tabu@trivlist %<restore \\=\@normalcr inside lists>
- \let\@footnotetext \tabu@footnotetext \let\@xfootnotetext \tabu@xfootnotetext
- \let\@xfootnote \tabu@xfootnote \let\centering \tabu@centering
- \let\raggedright \tabu@raggedright \let\raggedleft \tabu@raggedleft
- \let\tabudecimal \tabu@tabudecimal \let\Centering \tabu@Centering
- \let\RaggedRight \tabu@RaggedRight \let\RaggedLeft \tabu@RaggedLeft
- \let\justifying \tabu@justifying \let\rowfont \tabu@rowfont
- \let\fbox \tabu@fbox \let\color@b@x \tabu@color@b@x
- \let\tabu@@everycr \everycr \let\tabu@@everypar \everypar
- \let\tabu@prepnext@tokORI \prepnext@tok\let\prepnext@tok \tabu@prepnext@tok
- \let\tabu@multicolumnORI\multicolumn \let\multicolumn \tabu@multicolumn
- \let\tabu@startpbox \@startpbox % for nested tabu inside longtabu pfff !!!
- \let\tabu@endpbox \@endpbox % idem " " " " " " "
- \let\tabu@tabarray \@tabarray % idem " " " " " " "
- \tabu@adl@fix \let\endarray \tabu@endarray % <fix> colortbl & arydshln (delarray)
- \iftabu@colortbl\CT@everycr\expandafter{\expandafter\iftabu@everyrow \the\CT@everycr \fi}\fi
-}% \tabu@init
-\def\tabu@indent{% correction for indentation
- \ifdim \parindent>\z@\ifx \linewidth\tabudefaulttarget
- \everypar\expandafter{%
- \the\everypar\everypar\expandafter{\the\everypar}%
- \setbox\z@=\lastbox
- \ifdim\wd\z@>\z@ \edef\tabu@thetarget
- {\the\dimexpr -\wd\z@+\tabudefaulttarget}\fi
- \box\z@}%
- \fi\fi
-}% \tabu@indent
-\def\tabu@setcleanup {% saves last global assignments
- \ifodd 1\ifmmode \else \iftabu@long \else 0\fi\fi\relax
- \def\tabu@aftergroupcleanup{%
- \def\tabu@aftergroupcleanup{\aftergroup\tabu@cleanup}}%
- \else
- \def\tabu@aftergroupcleanup{%
- \aftergroup\aftergroup\aftergroup\tabu@cleanup
- \let\tabu@aftergroupcleanup \relax}%
- \fi
- \let\tabu@arc@Gsave \tabu@arc@G
- \let\tabu@arc@G \tabu@arc@L % <init>
- \let\tabu@drsc@Gsave \tabu@drsc@G
- \let\tabu@drsc@G \tabu@drsc@L % <init>
- \let\tabu@ls@Gsave \tabu@ls@G
- \let\tabu@ls@G \tabu@ls@L % <init>
- \let\tabu@rc@Gsave \tabu@rc@G
- \let\tabu@rc@G \tabu@rc@L % <init>
- \let\tabu@evr@Gsave \tabu@evr@G
- \let\tabu@evr@G \tabu@evr@L % <init>
- \let\tabu@celllalign@save \tabu@celllalign
- \let\tabu@cellralign@save \tabu@cellralign
- \let\tabu@cellleft@save \tabu@cellleft
- \let\tabu@cellright@save \tabu@cellright
- \let\tabu@@celllalign@save \tabu@@celllalign
- \let\tabu@@cellralign@save \tabu@@cellralign
- \let\tabu@@cellleft@save \tabu@@cellleft
- \let\tabu@@cellright@save \tabu@@cellright
- \let\tabu@rowfontreset@save \tabu@rowfontreset
- \let\tabu@@rowfontreset@save\tabu@@rowfontreset
- \let\tabu@rowfontreset \@empty
- \edef\tabu@alloc@save {\the\tabu@alloc}% restore at \tabu@reset
- \edef\c@taburow@save {\the\c@taburow}%
- \edef\tabu@naturalX@save {\the\tabu@naturalX}%
- \let\tabu@naturalXmin@save \tabu@naturalXmin
- \let\tabu@naturalXmax@save \tabu@naturalXmax
- \let\tabu@mkarstrut@save \tabu@mkarstrut
- \edef\tabu@clarstrut{%
- \extrarowheight \the\dimexpr \ht\@arstrutbox-\ht\strutbox \relax
- \extrarowdepth \the\dimexpr \dp\@arstrutbox-\dp\strutbox \relax
- \let\noexpand\@arraystretch \@ne \noexpand\tabu@rearstrut}%
-}% \tabu@setcleanup
-\def\tabu@cleanup {\begingroup
- \globaldefs\@ne \tabu@everyrowtrue
- \let\tabu@arc@G \tabu@arc@Gsave
- \let\CT@arc@ \tabu@arc@G
- \let\tabu@drsc@G \tabu@drsc@Gsave
- \let\CT@drsc@ \tabu@drsc@G
- \let\tabu@ls@G \tabu@ls@Gsave
- \let\tabu@ls@ \tabu@ls@G
- \let\tabu@rc@G \tabu@rc@Gsave
- \let\tabu@rc@ \tabu@rc@G
- \let\CT@do@color \relax
- \let\tabu@evr@G \tabu@evr@Gsave
- \let\tabu@celllalign \tabu@celllalign@save
- \let\tabu@cellralign \tabu@cellralign@save
- \let\tabu@cellleft \tabu@cellleft@save
- \let\tabu@cellright \tabu@cellright@save
- \let\tabu@@celllalign \tabu@@celllalign@save
- \let\tabu@@cellralign \tabu@@cellralign@save
- \let\tabu@@cellleft \tabu@@cellleft@save
- \let\tabu@@cellright \tabu@@cellright@save
- \let\tabu@rowfontreset \tabu@rowfontreset@save
- \let\tabu@@rowfontreset \tabu@@rowfontreset@save
- \tabu@naturalX =\tabu@naturalX@save
- \let\tabu@naturalXmax \tabu@naturalXmax@save
- \let\tabu@naturalXmin \tabu@naturalXmin@save
- \let\tabu@mkarstrut \tabu@mkarstrut@save
- \c@taburow =\c@taburow@save
- \ifcase \tabu@nested \tabu@alloc \m@ne\fi
- \endgroup % <end of \globaldefs>
- \ifcase \tabu@nested
- \the\tabu@footnotes \global\tabu@footnotes{}%
- \tabu@afterendpar \tabu@elapsedtime
- \fi
- \tabu@clarstrut
- \everyrow\expandafter {\tabu@evr@G}%
-}% \tabu@cleanup
-\let\tabu@afterendpar \relax
-\def\tabu@setreset {%
- \edef\tabu@savedparams {% \relax for \tabu@message@save
- \ifmmode \col@sep \the\arraycolsep
- \else \col@sep \the\tabcolsep \fi \relax
- \arrayrulewidth \the\arrayrulewidth \relax
- \doublerulesep \the\doublerulesep \relax
- \extratabsurround \the\extratabsurround \relax
- \extrarowheight \the\extrarowheight \relax
- \extrarowdepth \the\extrarowdepth \relax
- \abovetabulinesep \the\abovetabulinesep \relax
- \belowtabulinesep \the\belowtabulinesep \relax
- \def\noexpand\arraystretch{\arraystretch}%
- \ifdefined\minrowclearance \minrowclearance\the\minrowclearance\relax\fi}%
- \begingroup
- \@temptokena\expandafter{\tabu@savedparams}% => only for \savetabu / \usetabu
- \ifx \tabu@arc@L\relax \else \tabu@setsave \tabu@arc@L \fi
- \ifx \tabu@drsc@L\relax \else \tabu@setsave \tabu@drsc@L \fi
- \tabu@setsave \tabu@ls@L \tabu@setsave \tabu@evr@L
- \expandafter \endgroup \expandafter
- \def\expandafter\tabu@saved@ \expandafter{\the\@temptokena
- \let\tabu@arc@G \tabu@arc@L
- \let\tabu@drsc@G \tabu@drsc@L
- \let\tabu@ls@G \tabu@ls@L
- \let\tabu@rc@G \tabu@rc@L
- \let\tabu@evr@G \tabu@evr@L}%
- \def\tabu@reset{\tabu@savedparams
- \tabu@everyrowtrue \c@taburow \z@
- \let\CT@arc@ \tabu@arc@L
- \let\CT@drsc@ \tabu@drsc@L
- \let\tabu@ls@ \tabu@ls@L
- \let\tabu@rc@ \tabu@rc@L
- \global\tabu@alloc \tabu@alloc@save
- \everyrow\expandafter{\tabu@evr@L}}%
-}% \tabu@reset
-\def\tabu@setsave #1{\expandafter\tabu@sets@ve #1\@nil{#1}}
-\long\def\tabu@sets@ve #1\@nil #2{\@temptokena\expandafter{\the\@temptokena \def#2{#1}}}
-%% The Rewriting Process -------------------------------------------
-\def\tabu@newcolumntype #1{%
- \expandafter\tabu@new@columntype
- \csname NC@find@\string#1\expandafter\endcsname
- \csname NC@rewrite@\string#1\endcsname
- {#1}%
-}% \tabu@newcolumntype
-\def\tabu@new@columntype #1#2#3{%
- \def#1##1#3{\NC@{##1}}%
- \let#2\relax \newcommand*#2%
-}% \tabu@new@columntype
-\def\tabu@privatecolumntype #1{%
- \expandafter\tabu@private@columntype
- \csname NC@find@\string#1\expandafter\endcsname
- \csname NC@rewrite@\string#1\expandafter\endcsname
- \csname tabu@NC@find@\string#1\expandafter\endcsname
- \csname tabu@NC@rewrite@\string#1\endcsname
- {#1}%
-}% \tabu@privatecolumntype
-\def\tabu@private@columntype#1#2#3#4{%
- \g@addto@macro\tabu@privatecolumns{\let#1#3\let#2#4}%
- \tabu@new@columntype#3#4%
-}% \tabu@private@columntype
-\let\tabu@privatecolumns \@empty
-\newcommand*\tabucolumn [1]{\expandafter \def \expandafter
- \tabu@highprioritycolumns\expandafter{\tabu@highprioritycolumns
- \NC@do #1}}%
-\let\tabu@highprioritycolumns \@empty
-%% The | ``column'' : rewriting process --------------------------
-\tabu@privatecolumntype |{\tabu@rewritevline}
-\newcommand*\tabu@rewritevline[1][]{\tabu@vlinearg{#1}%
- \expandafter \NC@find \tabu@rewritten}
-\def\tabu@lines #1{%
- \ifx|#1\else \tabu@privatecolumntype #1{\tabu@rewritevline}\fi
- \NC@list\expandafter{\the\NC@list \NC@do #1}%
-}% \tabu@lines@
-\def\tabu@vlinearg #1{%
- \ifx\\#1\\\def\tabu@thestyle {\tabu@ls@}%
- \else\tabu@getline {#1}%
- \fi
- \def\tabu@rewritten ##1{\def\tabu@rewritten{!{##1\tabu@thevline}}%
- }\expandafter\tabu@rewritten\expandafter{\tabu@thestyle}%
- \expandafter \tabu@keepls \tabu@thestyle \@nil
-}% \tabu@vlinearg
-\def\tabu@keepls #1\@nil{%
- \ifcat $\@cdr #1\@nil $%
- \ifx \relax#1\else
- \ifx \tabu@ls@#1\else
- \let#1\relax
- \xdef\tabu@mkpreambuffer{\tabu@mkpreambuffer
- \tabu@savels\noexpand#1}\fi\fi\fi
-}% \tabu@keepls
-\def\tabu@thevline {\begingroup
- \ifdefined\tabu@leaders
- \setbox\@tempboxa=\vtop to\dimexpr
- \ht\@arstrutbox+\dp\@arstrutbox{{\tabu@thevleaders}}%
- \ht\@tempboxa=\ht\@arstrutbox \dp\@tempboxa=\dp\@arstrutbox
- \box\@tempboxa
- \else
- \tabu@thevrule
- \fi \endgroup
-}% \tabu@thevline
-\def\tabu@savels #1{%
- \expandafter\let\csname\string#1\endcsname #1%
- \expandafter\def\expandafter\tabu@reset\expandafter{\tabu@reset
- \tabu@resetls#1}}%
-\def\tabu@resetls #1{\expandafter\let\expandafter#1\csname\string#1\endcsname}%
-%% \multicolumn inside tabu environment -----------------------------
-\tabu@newcolumntype \tabu@rewritemulticolumn{%
- \aftergroup \tabu@endrewritemulticolumn % after \@mkpream group
- \NC@list{\NC@do *}\tabu@textbar \tabu@lines
- \tabu@savedecl
- \tabu@privatecolumns
- \NC@list\expandafter{\the\expandafter\NC@list \tabu@NC@list}%
- \let\tabu@savels \relax
- \NC@find
-}% \tabu@rewritemulticolumn
-\def\tabu@endrewritemulticolumn{\gdef\tabu@mkpreambuffer{}\endgroup}
-\def\tabu@multicolumn{\tabu@ifenvir \tabu@multic@lumn \tabu@multicolumnORI}
-\long\def\tabu@multic@lumn #1#2#3{\multispan{#1}\begingroup
- \tabu@everyrowtrue
- \NC@list{\NC@do \tabu@rewritemulticolumn}%
- \expandafter\@gobbletwo % gobbles \multispan{#1}
- \tabu@multicolumnORI{#1}{\tabu@rewritemulticolumn #2}%
- {\iftabuscantokens \tabu@rescan \else \expandafter\@firstofone \fi
- {#3}}%
-}% \tabu@multic@lumn
-%% The X column(s): rewriting process -----------------------------
-\tabu@privatecolumntype X[1][]{\begingroup \tabu@siunitx{\endgroup \tabu@rewriteX {#1}}}
-\def\tabu@nosiunitx #1{#1{}{}\expandafter \NC@find \tabu@rewritten }
-\def\tabu@siunitx #1{\@ifnextchar \bgroup
- {\tabu@rewriteX@Ss{#1}}
- {\tabu@nosiunitx{#1}}}
-\def\tabu@rewriteX@Ss #1#2{\@temptokena{}%
- \@defaultunits \let\tabu@temp =#2\relax\@nnil
- \ifodd 1\ifx S\tabu@temp \else \ifx s\tabu@temp \else 0 \fi\fi
- \def\NC@find{\def\NC@find >####1####2<####3\relax{#1 {####1}{####3}%
- }\expandafter\NC@find \the\@temptokena \relax
- }\expandafter\NC@rewrite@S \@gobble #2\relax
- \else \tabu@siunitxerror
- \fi
- \expandafter \NC@find \tabu@rewritten
-}% \tabu@rewriteX@Ss
-\def\tabu@siunitxerror {\PackageError{tabu}{Not a S nor s column !
- \MessageBreak X column can only embed siunitx S or s columns}\@ehd
-}% \tabu@siunitxerror
-\def\tabu@rewriteX #1#2#3{\tabu@Xarg {#1}{#2}{#3}%
- \iftabu@measuring
- \else \tabu@measuringtrue % first X column found in the preamble
- \let\@halignto \relax \let\tabu@halignto \relax
- \iftabu@spread \tabu@spreadtarget \tabu@target \tabu@target \z@
- \else \tabu@spreadtarget \z@ \fi
- \ifdim \tabu@target=\z@
- \setlength\tabu@target \tabu@thetarget
- \tabu@message{\tabu@message@defaulttarget}%
- \else \tabu@message{\tabu@message@target}\fi
- \fi
-}% \tabu@rewriteX
-\def\tabu@rewriteXrestore #1#2#3{\let\@halignto \relax
- \def\tabu@rewritten{l}}
-\def\tabu@Xarg #1#2#3{%
- \advance\tabu@Xcol \@ne \let\tabu@Xlcr \@empty
- \let\tabu@Xdisp \@empty \let\tabu@Xmath \@empty
- \ifx\\#1\\% <shortcut when no option>
- \def\tabu@rewritten{p}\tabucolX \p@ % <default coef = 1>
- \else
- \let\tabu@rewritten \@empty \let\tabu@temp \@empty \tabucolX \z@
- \tabu@Xparse {}#1\relax
- \fi
- \tabu@Xrewritten{#2}{#3}%
-}% \tabu@Xarg
-\def\tabu@Xparse #1{\futurelet\@let@token \tabu@Xtest}
-\expandafter\def\expandafter\tabu@Xparsespace\space{\tabu@Xparse{}}
-\def\tabu@Xtest{%
- \ifcase \ifx \relax\@let@token \z@ \else
- \if ,\@let@token \m@ne\else
- \if p\@let@token 1\else
- \if m\@let@token 2\else
- \if b\@let@token 3\else
- \if l\@let@token 4\else
- \if c\@let@token 5\else
- \if r\@let@token 6\else
- \if j\@let@token 7\else
- \if L\@let@token 8\else
- \if C\@let@token 9\else
- \if R\@let@token 10\else
- \if J\@let@token 11\else
- \ifx \@sptoken\@let@token 12\else
- \if .\@let@token 13\else
- \if -\@let@token 13\else
- \ifcat $\@let@token 14\else
- 15\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\relax
- \or \tabu@Xtype {p}%
- \or \tabu@Xtype {m}%
- \or \tabu@Xtype {b}%
- \or \tabu@Xalign \raggedright\relax
- \or \tabu@Xalign \centering\relax
- \or \tabu@Xalign \raggedleft\relax
- \or \tabu@Xalign \tabu@justify\relax
- \or \tabu@Xalign \RaggedRight\raggedright
- \or \tabu@Xalign \Centering\centering
- \or \tabu@Xalign \RaggedLeft\raggedleft
- \or \tabu@Xalign \justifying\tabu@justify
- \or \expandafter \tabu@Xparsespace
- \or \expandafter \tabu@Xcoef
- \or \expandafter \tabu@Xm@th
- \or \tabu@Xcoef{}%
- \else\expandafter \tabu@Xparse
- \fi
-}% \tabu@Xtest
-\def\tabu@Xalign #1#2{%
- \ifx \tabu@Xlcr\@empty \else \PackageWarning{tabu}
- {Duplicate horizontal alignment specification}\fi
- \ifdefined#1\def\tabu@Xlcr{#1}\let#1\relax
- \else \def\tabu@Xlcr{#2}\let#2\relax\fi
- \expandafter\tabu@Xparse
-}% \tabu@Xalign
-\def\tabu@Xtype #1{%
- \ifx \tabu@rewritten\@empty \else \PackageWarning{tabu}
- {Duplicate vertical alignment specification}\fi
- \def\tabu@rewritten{#1}\expandafter\tabu@Xparse
-}% \tabu@Xtype
-\def\tabu@Xcoef#1{\edef\tabu@temp{\tabu@temp#1}%
- \afterassignment\tabu@Xc@ef \tabu@cnt\number\if-#10\fi
-}% \tabu@Xcoef
-\def\tabu@Xc@ef{\advance\tabucolX \tabu@temp\the\tabu@cnt\p@
- \tabu@Xparse{}%
-}% \tabu@Xc@ef
-\def\tabu@Xm@th #1{\futurelet \@let@token \tabu@Xd@sp}
-\def\tabu@Xd@sp{\let\tabu@Xmath=$%
- \ifx $\@let@token \def\tabu@Xdisp{\displaystyle}%
- \expandafter\tabu@Xparse
- \else \expandafter\tabu@Xparse\expandafter{\expandafter}%
- \fi
-}% \tabu@Xd@sp
-\def\tabu@Xrewritten {%
- \ifx \tabu@rewritten\@empty \def\tabu@rewritten{p}\fi
- \ifdim \tabucolX<\z@ \tabu@negcoeftrue
- \else\ifdim \tabucolX=\z@ \tabucolX \p@
- \fi\fi
- \edef\tabu@temp{{\the\tabu@Xcol}{\tabu@strippt\tabucolX}}%
- \edef\tabu@Xcoefs{\tabu@Xcoefs \tabu@ \tabu@temp}%
- \edef\tabu@rewritten ##1##2{\def\noexpand\tabu@rewritten{%
- >{\tabu@Xlcr \ifx$\tabu@Xmath$\tabu@Xdisp\fi ##1}%
- \tabu@rewritten {\tabu@hsize \tabu@temp}%
- <{##2\ifx$\tabu@Xmath$\fi}}%
- }\tabu@rewritten
-}% \tabu@Xrewritten
-\def\tabu@hsize #1#2{%
- \ifdim #2\p@<\z@
- \ifdim \tabucolX=\maxdimen \tabu@wd{#1}\else
- \ifdim \tabu@wd{#1}<-#2\tabucolX \tabu@wd{#1}\else -#2\tabucolX\fi
- \fi
- \else #2\tabucolX
- \fi
-}% \tabu@hsize
-%% \usetabu and \preamble: rewriting process ---------------------
-\tabu@privatecolumntype \usetabu [1]{%
- \ifx\\#1\\\tabu@saveerr{}\else
- \@ifundefined{tabu@saved@\string#1}
- {\tabu@saveerr{#1}}
- {\let\tabu@rewriteX \tabu@rewriteXrestore
- \csname tabu@saved@\string#1\expandafter\endcsname\expandafter\@ne}%
- \fi
-}% \NC@rewrite@\usetabu
-\tabu@privatecolumntype \preamble [1]{%
- \ifx\\#1\\\tabu@saveerr{}\else
- \@ifundefined{tabu@saved@\string#1}
- {\tabu@saveerr{#1}}
- {\csname tabu@saved@\string#1\expandafter\endcsname\expandafter\z@}%
- \fi
-}% \NC@rewrite@\preamble
-%% Controlling the rewriting process -------------------------------
-\tabu@newcolumntype \tabu@rewritefirst{%
- \iftabu@long \aftergroup \tabu@longpream % <the whole implementation is here !>
- \else \aftergroup \tabu@pream
- \fi
- \let\tabu@ \relax \let\tabu@hsize \relax
- \let\tabu@Xcoefs \@empty \let\tabu@savels \relax
- \tabu@Xcol \z@ \tabu@cnt \tw@
- \gdef\tabu@mkpreambuffer{\tabu@{}}\tabu@measuringfalse
- \global\setbox\@arstrutbox \box\@arstrutbox
- \NC@list{\NC@do *}\tabu@textbar \tabu@lines
- \NC@list\expandafter{\the\NC@list \NC@do X}%
- \iftabu@siunitx % <siunitx S and s columns>
- \NC@list\expandafter{\the\NC@list \NC@do S\NC@do s}\fi
- \NC@list\expandafter{\the\expandafter\NC@list \tabu@highprioritycolumns}%
- \expandafter\def\expandafter\tabu@NC@list\expandafter{%
- \the\expandafter\NC@list \tabu@NC@list}% % * | X S <original>
- \NC@list\expandafter{\expandafter \NC@do \expandafter\usetabu
- \expandafter \NC@do \expandafter\preamble
- \the\NC@list \NC@do \tabu@rewritemiddle
- \NC@do \tabu@rewritelast}%
- \tabu@savedecl
- \tabu@privatecolumns
- \edef\tabu@prev{\the\@temptokena}\NC@find \tabu@rewritemiddle
-}% NC@rewrite@\tabu@rewritefirst
-\tabu@newcolumntype \tabu@rewritemiddle{%
- \edef\tabu@temp{\the\@temptokena}\NC@find \tabu@rewritelast
-}% \NC@rewrite@\tabu@rewritemiddle
-\tabu@newcolumntype \tabu@rewritelast{%
- \ifx \tabu@temp\tabu@prev \advance\tabu@cnt \m@ne
- \NC@list\expandafter{\tabu@NC@list \NC@do \tabu@rewritemiddle
- \NC@do \tabu@rewritelast}%
- \else \let\tabu@prev\tabu@temp
- \fi
- \ifcase \tabu@cnt \expandafter\tabu@endrewrite
- \else \expandafter\NC@find \expandafter\tabu@rewritemiddle
- \fi
-}% \NC@rewrite@\tabu@rewritelast
-%% Choosing the strategy --------------------------------------------
-\def\tabu@endrewrite {%
- \let\tabu@temp \NC@find
- \ifx \@arrayright\relax \let\@arrayright \@empty \fi
- \count@=%
- \ifx \@finalstrut\tabu@finalstrut \z@ % outer in mode 0 print
- \iftabu@measuring
- \xdef\tabu@mkpreambuffer{\tabu@mkpreambuffer
- \tabu@target \csname tabu@\the\tabu@nested.T\endcsname
- \tabucolX \csname tabu@\the\tabu@nested.X\endcsname
- \edef\@halignto {\ifx\@arrayright\@empty to\tabu@target\fi}}%
- \fi
- \else\iftabu@measuring 4 % X columns
- \xdef\tabu@mkpreambuffer{\tabu@{\tabu@mkpreambuffer
- \tabu@target \the\tabu@target
- \tabu@spreadtarget \the\tabu@spreadtarget}%
- \def\noexpand\tabu@Xcoefs{\tabu@Xcoefs}%
- \edef\tabu@halignto{\ifx \@arrayright\@empty to\tabu@target\fi}}%
- \let\tabu@Xcoefs \relax
- \else\ifcase\tabu@nested \thr@@ % outer, no X
- \global\let\tabu@afterendpar \relax
- \else \@ne % inner, no X, outer in mode 1 or 2
- \fi
- \ifdefined\tabu@usetabu
- \else \ifdim\tabu@target=\z@
- \else \let\tabu@temp \tabu@extracolsep
- \fi\fi
- \fi
- \fi
- \xdef\tabu@mkpreambuffer{\count@ \the\count@ \tabu@mkpreambuffer}%
- \tabu@temp
-}% \tabu@endrewrite
-\def\tabu@extracolsep{\@defaultunits \expandafter\let
- \expandafter\tabu@temp \expandafter=\the\@temptokena \relax\@nnil
- \ifx \tabu@temp\@sptoken
- \expandafter\tabu@gobblespace \expandafter\tabu@extracolsep
- \else
- \edef\tabu@temp{\noexpand\NC@find
- \if |\noexpand\tabu@temp @%
- \else\if !\noexpand\tabu@temp @%
- \else !%
- \fi\fi
- {\noexpand\extracolsep\noexpand\@flushglue}}%
- \fi
- \tabu@temp
-}% \tabu@extrac@lsep
-%% Implementing the strategy ----------------------------------------
-\long\def\tabu@pream #1\@preamble {%
- \let\tabu@ \tabu@@ \tabu@mkpreambuffer \tabu@aftergroupcleanup
- \NC@list\expandafter {\tabu@NC@list}% in case of nesting...
- \ifdefined\tabu@usetabu \tabu@usetabu \tabu@target \z@ \fi
- \let\tabu@savedpreamble \@preamble
- \global\let\tabu@elapsedtime \relax
- \tabu@thebody ={#1\tabu@aftergroupcleanup}%
- \tabu@thebody =\expandafter{\the\expandafter\tabu@thebody
- \@preamble}%
- \edef\tabuthepreamble {\the\tabu@thebody}% ( no @ allowed for \scantokens )
- \tabu@select
-}% \tabu@pream
-\long\def\tabu@longpream #1\LT@bchunk #2\LT@bchunk{%
- \let\tabu@ \tabu@@ \tabu@mkpreambuffer \tabu@aftergroupcleanup
- \NC@list\expandafter {\tabu@NC@list}% in case of nesting...
- \let\tabu@savedpreamble \@preamble
- \global\let\tabu@elapsedtime \relax
- \tabu@thebody ={#1\LT@bchunk #2\tabu@aftergroupcleanup \LT@bchunk}%
- \edef\tabuthepreamble {\the\tabu@thebody}% ( no @ allowed for \scantokens )
- \tabu@select
-}% \tabu@longpream
-\def\tabu@select {%
- \ifnum\tabu@nested>\z@ \tabuscantokensfalse \fi
- \ifnum \count@=\@ne \iftabu@measuring \count@=\tw@ \fi\fi
- \ifcase \count@
- \global\let\tabu@elapsedtime \relax
- \tabu@seteverycr
- \expandafter \tabuthepreamble % vertical adjustment (inherited from outer)
- \or % exit in vertical measure + struts per cell because no X and outer in mode 3
- \tabu@evr{\tabu@verticalinit}\tabu@celllalign@def{\tabu@verticalmeasure}%
- \def\tabu@cellralign{\tabu@verticalspacing}%
- \tabu@seteverycr
- \expandafter \tabuthepreamble
- \or % exit without measure because no X and outer in mode 4
- \tabu@evr{}\tabu@celllalign@def{}\let\tabu@cellralign \@empty
- \tabu@seteverycr
- \expandafter \tabuthepreamble
- \else % needs trials
- \tabu@evr{}\tabu@celllalign@def{}\let\tabu@cellralign \@empty
- \tabu@savecounters
- \expandafter \tabu@setstrategy
- \fi
-}% \tabu@select
-\def\tabu@@ {\gdef\tabu@mkpreambuffer}
-%% Protections to set up before trials ------------------------------
-\def\tabu@setstrategy {\begingroup % <trials group>
- \tabu@trialh@@k \tabu@cnt \z@ % number of trials
- \hbadness \@M \let\hbadness \@tempcnta
- \hfuzz \maxdimen \let\hfuzz \@tempdima
- \let\write \tabu@nowrite\let\GenericError \tabu@GenericError
- \let\savetabu \@gobble \let\tabudefaulttarget \linewidth
- \let\@footnotetext \@gobble \let\@xfootnote \tabu@xfootnote
- \let\color \tabu@nocolor\let\rowcolor \tabu@norowcolor
- \let\tabu@aftergroupcleanup \relax % only after the last trial
- \tabu@mkpreambuffer
- \ifnum \count@>\thr@@ \let\@halignto \@empty \tabucolX@init
- \def\tabu@lasttry{\m@ne\p@}\fi
- \begingroup \iffalse{\fi \ifnum0=`}\fi
- \toks@{}\def\tabu@stack{b}\iftabuscantokens \endlinechar=10 \obeyspaces \fi %
- \tabu@collectbody \tabu@strategy %
-}% \tabu@setstrategy
-\def\tabu@savecounters{%
- \def\@elt ##1{\csname c@##1\endcsname\the\csname c@##1\endcsname}%
- \edef\tabu@clckpt {\begingroup \globaldefs=\@ne \cl@@ckpt \endgroup}\let\@elt \relax
-}% \tabu@savecounters
-\def\tabucolX@init {% \tabucolX <= \tabu@target / (sum coefs > 0)
- \dimen@ \z@ \tabu@Xsum \z@ \tabucolX \z@ \let\tabu@ \tabu@Xinit \tabu@Xcoefs
- \ifdim \dimen@>\z@
- \@tempdima \dimexpr \tabu@target *\p@/\dimen@ + \tabu@hfuzz\relax
- \ifdim \tabucolX<\@tempdima \tabucolX \@tempdima \fi
- \fi
-}% \tabucolX@init
-\def\tabu@Xinit #1#2{\tabu@Xcol #1 \advance \tabu@Xsum
- \ifdim #2\p@>\z@ #2\p@ \advance\dimen@ #2\p@
- \else -#2\p@ \tabu@negcoeftrue
- \@tempdima \dimexpr \tabu@target*\p@/\dimexpr-#2\p@\relax \relax
- \ifdim \tabucolX<\@tempdima \tabucolX \@tempdima \fi
- \tabu@wddef{#1}{0pt}%
- \fi
-}% \tabu@Xinit
-%% Collecting the environment body ----------------------------------
-\long\def\tabu@collectbody #1#2\end #3{%
- \edef\tabu@stack{\tabu@pushbegins #2\begin\end\expandafter\@gobble\tabu@stack}%
- \ifx \tabu@stack\@empty
- \toks@\expandafter{\expandafter\tabu@thebody\expandafter{\the\toks@ #2}%
- \def\tabu@end@envir{\end{#3}}%
- \iftabuscantokens
- \iftabu@long \def\tabu@endenvir {\end{#3}\tabu@gobbleX}%
- \else \def\tabu@endenvir {\let\endarray \@empty
- \end{#3}\tabu@gobbleX}%
- \fi
- \else \def\tabu@endenvir {\end{#3}}\fi}%
- \let\tabu@collectbody \tabu@endofcollect
- \else\def\tabu@temp{#3}%
- \ifx \tabu@temp\@empty \toks@\expandafter{\the\toks@ #2\end }%
- \else \ifx\tabu@temp\tabu@@spxiii \toks@\expandafter{\the\toks@ #2\end #3}%
- \else \ifx\tabu@temp\tabu@X \toks@\expandafter{\the\toks@ #2\end #3}%
- \else \toks@\expandafter{\the\toks@ #2\end{#3}}%
- \fi\fi\fi
- \fi
- \tabu@collectbody{#1}%
-}% \tabu@collectbody
-\long\def\tabu@pushbegins#1\begin#2{\ifx\end#2\else b\expandafter\tabu@pushbegins\fi}%
-\def\tabu@endofcollect #1{\ifnum0=`{}\fi
- \expandafter\endgroup \the\toks@ #1%
-}% \tabu@endofcollect
-%% The trials: switching between strategies -------------------------
-\def\tabu@strategy {\relax % stops \count@ assignment !
- \ifcase\count@ % case 0 = print with vertical adjustment (outer is finished)
- \expandafter \tabu@endoftrials
- \or % case 1 = exit in vertical measure (outer in mode 3)
- \expandafter\xdef\csname tabu@\the\tabu@nested.T\endcsname{\the\tabu@target}%
- \expandafter\xdef\csname tabu@\the\tabu@nested.X\endcsname{\the\tabucolX}%
- \expandafter \tabu@endoftrials
- \or % case 2 = exit with a rule replacing the table (outer in mode 4)
- \expandafter \tabu@quickend
- \or % case 3 = outer is in mode 3 because of no X
- \begingroup
- \tabu@evr{\tabu@verticalinit}\tabu@celllalign@def{\tabu@verticalmeasure}%
- \def\tabu@cellralign{\tabu@verticalspacing}%
- \expandafter \tabu@measuring
- \else % case 4 = horizontal measure
- \begingroup
- \global\let\tabu@elapsedtime \tabu@message@etime
- \long\def\multicolumn##1##2##3{\multispan{##1}}%
- \let\tabu@startpboxORI \@startpbox
- \iftabu@spread
- \def\tabu@naturalXmax {\z@}%
- \let\tabu@naturalXmin \tabu@naturalXmax
- \tabu@evr{\global\tabu@naturalX \z@}%
- \let\@startpbox \tabu@startpboxmeasure
- \else\iftabu@negcoef
- \let\@startpbox \tabu@startpboxmeasure
- \else \let\@startpbox \tabu@startpboxquick
- \fi\fi
- \expandafter \tabu@measuring
- \fi
-}% \tabu@strategy
-\def\tabu@measuring{\expandafter \tabu@trial \expandafter
- \count@ \the\count@ \tabu@endtrial
-}% \tabu@measuring
-\def\tabu@trial{\iftabu@long \tabu@longtrial \else \tabu@shorttrial \fi}
-\def\tabu@shorttrial {\setbox\tabu@box \hbox\bgroup \tabu@seteverycr
- \ifx \tabu@savecounters\relax \else
- \let\tabu@savecounters \relax \tabu@clckpt \fi
- $\iftabuscantokens \tabu@rescan \else \expandafter\@secondoftwo \fi
- \expandafter{\expandafter \tabuthepreamble
- \the\tabu@thebody
- \csname tabu@adl@endtrial\endcsname
- \endarray}$\egroup % got \tabu@box
-}% \tabu@shorttrial
-\def\tabu@longtrial {\setbox\tabu@box \hbox\bgroup \tabu@seteverycr
- \ifx \tabu@savecounters\relax \else
- \let\tabu@savecounters \relax \tabu@clckpt \fi
- \iftabuscantokens \tabu@rescan \else \expandafter\@secondoftwo \fi
- \expandafter{\expandafter \tabuthepreamble
- \the\tabu@thebody
- \tabuendlongtrial}\egroup % got \tabu@box
-}% \tabu@longtrial
-\def\tabuendlongtrial{% no @ allowed for \scantokens
- \LT@echunk \global\setbox\@ne \hbox{\unhbox\@ne}\kern\wd\@ne
- \LT@get@widths
-}% \tabuendlongtrial
-\def\tabu@adl@endtrial{% <arydshln in nested trials - problem for global column counters!>
- \crcr \noalign{\global\adl@ncol \tabu@nbcols}}% anything global is crap, junky and fails !
-\def\tabu@seteverycr {\tabu@reset
- \everycr \expandafter{\the\everycr \tabu@everycr}%
- \let\everycr \tabu@noeverycr % <for ialign>
-}% \tabu@seteverycr
-\def\tabu@noeverycr{{\aftergroup\tabu@restoreeverycr \afterassignment}\toks@}
-\def\tabu@restoreeverycr {\let\everycr \tabu@@everycr}
-\def\tabu@everycr {\iftabu@everyrow \noalign{\tabu@everyrow}\fi}
-\def\tabu@endoftrials {%
- \iftabuscantokens \expandafter\@firstoftwo
- \else \expandafter\@secondoftwo
- \fi
- {\expandafter \tabu@closetrialsgroup \expandafter
- \tabu@rescan \expandafter{%
- \expandafter\tabuthepreamble
- \the\expandafter\tabu@thebody
- \iftabu@long \else \endarray \fi}}
- {\expandafter\tabu@closetrialsgroup \expandafter
- \tabuthepreamble
- \the\tabu@thebody}%
- \tabu@endenvir % Finish !
-}% \tabu@endoftrials
-\def\tabu@closetrialsgroup {%
- \toks@\expandafter{\tabu@endenvir}%
- \edef\tabu@bufferX{\endgroup
- \tabucolX \the\tabucolX
- \tabu@target \the\tabu@target
- \tabu@cnt \the\tabu@cnt
- \def\noexpand\tabu@endenvir{\the\toks@}%
- %Quid de \@halignto = \tabu@halignto ??
- }% \tabu@bufferX
- \tabu@bufferX
- \ifcase\tabu@nested % print out (outer in mode 0)
- \global\tabu@cnt \tabu@cnt
- \tabu@evr{\tabu@verticaldynamicadjustment}%
- \tabu@celllalign@def{\everypar{}}\let\tabu@cellralign \@empty
- \let\@finalstrut \tabu@finalstrut
- \else % vertical measure of nested tabu
- \tabu@evr{\tabu@verticalinit}%
- \tabu@celllalign@def{\tabu@verticalmeasure}%
- \def\tabu@cellralign{\tabu@verticalspacing}%
- \fi
- \tabu@clckpt \let\@halignto \tabu@halignto
- \let\@halignto \@empty
- \tabu@seteverycr
- \ifdim \tabustrutrule>\z@ \ifnum\tabu@nested=\z@
- \setbox\@arstrutbox \box\voidb@x % force \@arstrutbox to be rebuilt (visible struts)
- \fi\fi
-}% \tabu@closetrialsgroup
-\def\tabu@quickend {\expandafter \endgroup \expandafter
- \tabu@target \the\tabu@target \tabu@quickrule
- \let\endarray \relax \tabu@endenvir
-}% \tabu@quickend
-\def\tabu@endtrial {\relax % stops \count@ assignment !
- \ifcase \count@ \tabu@err % case 0 = impossible here
- \or \tabu@err % case 1 = impossible here
- \or \tabu@err % case 2 = impossible here
- \or % case 3 = outer goes into mode 0
- \def\tabu@bufferX{\endgroup}\count@ \z@
- \else % case 4 = outer goes into mode 3
- \iftabu@spread \tabu@spreadarith % inner into mode 1 (outer in mode 3)
- \else \tabu@arith % or 2 (outer in mode 4)
- \fi
- \count@=%
- \ifcase\tabu@nested \thr@@ % outer goes into mode 3
- \else\iftabu@measuring \tw@ % outer is in mode 4
- \else \@ne % outer is in mode 3
- \fi\fi
- \edef\tabu@bufferX{\endgroup
- \tabucolX \the\tabucolX
- \tabu@target \the\tabu@target}%
- \fi
- \expandafter \tabu@bufferX \expandafter
- \count@ \the\count@ \tabu@strategy
-}% \tabu@endtrial
-\def\tabu@err{\errmessage{(tabu) Internal impossible error! (\count@=\the\count@)}}
-%% The algorithms: compute the widths / stop or go on ---------------
-\def\tabu@arithnegcoef {%
- \@tempdima \z@ \dimen@ \z@ \let\tabu@ \tabu@arith@negcoef \tabu@Xcoefs
-}% \tabu@arithnegcoef
-\def\tabu@arith@negcoef #1#2{%
- \ifdim #2\p@>\z@ \advance\dimen@ #2\p@ % saturated by definition
- \advance\@tempdima #2\tabucolX
- \else
- \ifdim -#2\tabucolX <\tabu@wd{#1}% c_i X < natural width <= \tabu@target-> saturated
- \advance\dimen@ -#2\p@
- \advance\@tempdima -#2\tabucolX
- \else
- \advance\@tempdima \tabu@wd{#1}% natural width <= c_i X => neutralised
- \ifdim \tabu@wd{#1}<\tabu@target \else % neutralised
- \advance\dimen@ -#2\p@ % saturated (natural width = tabu@target)
- \fi
- \fi
- \fi
-}% \tabu@arith@negcoef
-\def\tabu@givespace #1#2{% here \tabu@DELTA < \z@
- \ifdim \@tempdima=\z@
- \tabu@wddef{#1}{\the\dimexpr -\tabu@DELTA*\p@/\tabu@Xsum}%
- \else
- \tabu@wddef{#1}{\the\dimexpr \tabu@hsize{#1}{#2}
- *(\p@ -\tabu@DELTA*\p@/\@tempdima)/\p@\relax}%
- \fi
-}% \tabu@givespace
-\def\tabu@arith {\advance\tabu@cnt \@ne
- \ifnum \tabu@cnt=\@ne \tabu@message{\tabu@titles}\fi
- \tabu@arithnegcoef
- \@tempdimb \dimexpr \wd\tabu@box -\@tempdima \relax % <incompressible material>
- \tabu@DELTA = \dimexpr \wd\tabu@box - \tabu@target \relax
- \tabu@message{\tabu@message@arith}%
- \ifdim \tabu@DELTA <\tabu@hfuzz
- \ifdim \tabu@DELTA<\z@ % wd (tabu)<\tabu@target ?
- \let\tabu@ \tabu@givespace \tabu@Xcoefs
- \advance\@tempdima \@tempdimb \advance\@tempdima -\tabu@DELTA % for message
- \else % already converged: nothing to do but nearly impossible...
- \fi
- \tabucolX \maxdimen
- \tabu@measuringfalse
- \else % need for narrower X columns
- \tabucolX =\dimexpr (\@tempdima -\tabu@DELTA) *\p@/\tabu@Xsum \relax
- \tabu@measuringtrue
- \@whilesw \iftabu@measuring\fi {%
- \advance\tabu@cnt \@ne
- \tabu@arithnegcoef
- \tabu@DELTA =\dimexpr \@tempdima+\@tempdimb -\tabu@target \relax % always < 0 here
- \tabu@message{\tabu@header
- \tabu@msgalign \tabucolX { }{ }{ }{ }{ }\@@
- \tabu@msgalign \@tempdima+\@tempdimb { }{ }{ }{ }{ }\@@
- \tabu@msgalign \tabu@target { }{ }{ }{ }{ }\@@
- \tabu@msgalign@PT \dimen@ { }{}{}{}{}{}{}\@@
- \ifdim -\tabu@DELTA<\tabu@hfuzz \tabu@spaces target ok\else
- \tabu@msgalign \dimexpr -\tabu@DELTA *\p@/\dimen@ {}{}{}{}{}\@@
- \fi}%
- \ifdim -\tabu@DELTA<\tabu@hfuzz
- \advance\@tempdima \@tempdimb % for message
- \tabu@measuringfalse
- \else
- \advance\tabucolX \dimexpr -\tabu@DELTA *\p@/\dimen@ \relax
- \fi
- }%
- \fi
- \tabu@message{\tabu@message@reached}%
- \edef\tabu@bufferX{\endgroup \tabu@cnt \the\tabu@cnt
- \tabucolX \the\tabucolX
- \tabu@target \the\tabu@target}%
-}% \tabu@arith
-\def\tabu@spreadarith {%
- \dimen@ \z@ \@tempdima \tabu@naturalXmax \let\tabu@ \tabu@spread@arith \tabu@Xcoefs
- \edef\tabu@naturalXmin {\the\dimexpr\tabu@naturalXmin*\dimen@/\p@}%
- \@tempdimc =\dimexpr \wd\tabu@box -\tabu@naturalXmax+\tabu@naturalXmin \relax
- \iftabu@measuring
- \tabu@target =\dimexpr \@tempdimc+\tabu@spreadtarget \relax
- \edef\tabu@bufferX{\endgroup \tabucolX \the\tabucolX \tabu@target\the\tabu@target}%
- \else
- \tabu@message{\tabu@message@spreadarith}%
- \ifdim \dimexpr \@tempdimc+\tabu@spreadtarget >\tabu@target
- \tabu@message{(tabu) spread
- \ifdim \@tempdimc>\tabu@target useless here: default target used%
- \else too large: reduced to fit default target\fi.}%
- \else
- \tabu@target =\dimexpr \@tempdimc+\tabu@spreadtarget \relax
- \tabu@message{(tabu) spread: New target set to \the\tabu@target^^J}%
- \fi
- \begingroup \let\tabu@wddef \@gobbletwo
- \@tempdimb \@tempdima
- \tabucolX@init
- \tabu@arithnegcoef
- \wd\tabu@box =\dimexpr \wd\tabu@box +\@tempdima-\@tempdimb \relax
- \expandafter\endgroup \expandafter\tabucolX \the\tabucolX
- \tabu@arith
- \fi
-}% \tabu@spreadarith
-\def\tabu@spread@arith #1#2{%
- \ifdim #2\p@>\z@ \advance\dimen@ #2\p@
- \else \advance\@tempdima \tabu@wd{#1}\relax
- \fi
-}% \tabu@spread@arith
-%% Reporting in the .log file ---------------------------------------
-\def\tabu@message@defaulttarget{%
- \ifnum\tabu@nested=\z@^^J(tabu) Default target:
- \ifx\tabudefaulttarget\linewidth \string\linewidth
- \ifdim \tabu@thetarget=\linewidth \else
- -\the\dimexpr\linewidth-\tabu@thetarget\fi =
- \else\ifx\tabudefaulttarget\linegoal\string\linegoal=
- \fi\fi
- \else (tabu) Default target (nested): \fi
- \the\tabu@target \on@line
- \ifnum\tabu@nested=\z@ , page \the\c@page\fi}
-\def\tabu@message@target {^^J(tabu) Target specified:
- \the\tabu@target \on@line, page \the\c@page}
-\def\tabu@message@arith {\tabu@header
- \tabu@msgalign \tabucolX { }{ }{ }{ }{ }\@@
- \tabu@msgalign \wd\tabu@box { }{ }{ }{ }{ }\@@
- \tabu@msgalign \tabu@target { }{ }{ }{ }{ }\@@
- \tabu@msgalign@PT \dimen@ { }{}{}{}{}{}{}\@@
- \ifdim \tabu@DELTA<\tabu@hfuzz giving space\else
- \tabu@msgalign \dimexpr (\@tempdima-\tabu@DELTA) *\p@/\tabu@Xsum -\tabucolX {}{}{}{}{}\@@
- \fi
-}% \tabu@message@arith
-\def\tabu@message@spreadarith {\tabu@spreadheader
- \tabu@msgalign \tabu@spreadtarget { }{ }{ }{ }{}\@@
- \tabu@msgalign \wd\tabu@box { }{ }{ }{ }{}\@@
- \tabu@msgalign -\tabu@naturalXmax { }{}{}{}{}\@@
- \tabu@msgalign \tabu@naturalXmin { }{ }{ }{ }{}\@@
- \tabu@msgalign \ifdim \dimexpr\@tempdimc>\tabu@target \tabu@target
- \else \@tempdimc+\tabu@spreadtarget \fi
- {}{}{}{}{}\@@}
-\def\tabu@message@negcoef #1#2{
- \tabu@spaces\tabu@spaces\space * #1. X[\rem@pt#2]:
- \space width = \tabu@wd {#1}
- \expandafter\string\csname tabu@\the\tabu@nested.W\number#1\endcsname
- \ifdim -\tabu@pt#2\tabucolX<\tabu@target
- < \number-\rem@pt#2 X
- = \the\dimexpr -\tabu@pt#2\tabucolX \relax
- \else
- <= \the\tabu@target\space < \number-\rem@pt#2 X\fi}
-\def\tabu@message@reached{\tabu@header
- ******* Reached Target:
- hfuzz = \tabu@hfuzz\on@line\space *******}
-\def\tabu@message@etime{\edef\tabu@stoptime{\the\pdfelapsedtime}%
- \tabu@message{(tabu)\tabu@spaces Time elapsed during measure:
- \the\numexpr(\tabu@stoptime-\tabu@starttime-32767)/65536\relax sec
- \the\numexpr\numexpr(\tabu@stoptime-\tabu@starttime)
- -\numexpr(\tabu@stoptime-\tabu@starttime-32767)/65536\relax*65536\relax
- *1000/65536\relax ms \tabu@spaces(\the\tabu@cnt\space
- cycle\ifnum\tabu@cnt>\@ne s\fi)^^J^^J}}
-\def\tabu@message@verticalsp {%
- \ifdim \@tempdima>\tabu@ht
- \ifdim \@tempdimb>\tabu@dp
- \expandafter\expandafter\expandafter\string\tabu@ht =
- \tabu@msgalign \@tempdima { }{ }{ }{ }{ }\@@
- \expandafter\expandafter\expandafter\string\tabu@dp =
- \tabu@msgalign \@tempdimb { }{ }{ }{ }{ }\@@^^J%
- \else
- \expandafter\expandafter\expandafter\string\tabu@ht =
- \tabu@msgalign \@tempdima { }{ }{ }{ }{ }\@@^^J%
- \fi
- \else\ifdim \@tempdimb>\tabu@dp
- \tabu@spaces\tabu@spaces\tabu@spaces
- \expandafter\expandafter\expandafter\string\tabu@dp =
- \tabu@msgalign \@tempdimb { }{ }{ }{ }{ }\@@^^J\fi
- \fi
-}% \tabu@message@verticalsp
-\edef\tabu@spaces{\@spaces}
-\def\tabu@strippt{\expandafter\tabu@pt\the}
-{\@makeother\P \@makeother\T\lowercase{\gdef\tabu@pt #1PT{#1}}}
-\def\tabu@msgalign{\expandafter\tabu@msg@align\the\dimexpr}
-\def\tabu@msgalign@PT{\expandafter\tabu@msg@align\romannumeral-`\0\tabu@strippt}
-\def\do #1{%
- \def\tabu@msg@align##1.##2##3##4##5##6##7##8##9\@@{%
- \ifnum##1<10 #1 #1\else
- \ifnum##1<100 #1 \else
- \ifnum##1<\@m #1\fi\fi\fi
- ##1.##2##3##4##5##6##7##8#1}%
- \def\tabu@header{(tabu) \ifnum\tabu@cnt<10 #1\fi\the\tabu@cnt) }%
- \def\tabu@titles{\ifnum \tabu@nested=\z@
- (tabu) Try#1 #1 tabu X #1 #1 #1tabu Width #1 #1 Target
- #1 #1 #1 Coefs #1 #1 #1 Update^^J\fi}%
- \def\tabu@spreadheader{%
- (tabu) Try#1 #1 Spread #1 #1 tabu Width #1 #1 #1 Nat. X #1 #1 #1 #1Nat. Min.
- #1 New Target^^J%
- (tabu) sprd}
- \def\tabu@message@save {\begingroup
- \def\x ####1{\tabu@msg@align ####1{ }{ }{ }{ }{}\@@}
- \def\z ####1{\expandafter\x\expandafter{\romannumeral-`\0\tabu@strippt
- \dimexpr####1\p@{ }{ }}}%
- \let\color \relax \def\tabu@rulesstyle ####1####2{\detokenize{####1}}%
- \let\CT@arc@ \relax \let\@preamble \@gobble
- \let\tabu@savedpream \@firstofone
- \let\tabu@savedparams \@firstofone
- \def\tabu@target ####1\relax {(tabu) target #1 #1 #1 #1 #1 = \x{####1}^^J}%
- \def\tabucolX ####1\relax {(tabu) X columns width#1 = \x{####1}^^J}%
- \def\tabu@nbcols ####1\relax {(tabu) Number of columns: \z{####1}^^J}%
- \def\tabu@aligndefault ####1{(tabu) Default alignment: #1 #1 ####1^^J}%
- \def\col@sep ####1\relax {(tabu) column sep #1 #1 #1 = \x{####1}^^J}%
- \def\arrayrulewidth ####1\relax{(tabu) arrayrulewidth #1 = \x{####1}}%
- \def\doublerulesep ####1\relax { doublerulesep = \x{####1}^^J}%
- \def\extratabsurround####1\relax{(tabu) extratabsurround = \x{####1}^^J}%
- \def\extrarowheight ####1\relax{(tabu) extrarowheight #1 = \x{####1}}%
- \def\extrarowdepth ####1\relax {extrarowdepth = \x{####1}^^J}%
- \def\abovetabulinesep####1\relax{(tabu) abovetabulinesep=\x{####1} }%
- \def\belowtabulinesep####1\relax{ belowtabulinesep=\x{####1}^^J}%
- \def\arraystretch ####1{(tabu) arraystretch #1 #1 = \z{####1}^^J}%
- \def\minrowclearance####1\relax{(tabu) minrowclearance #1 = \x{####1}^^J}%
- \def\tabu@arc@L ####1{(tabu) taburulecolor #1 #1 = ####1^^J}%
- \def\tabu@drsc@L ####1{(tabu) tabudoublerulecolor= ####1^^J}%
- \def\tabu@evr@L ####1{(tabu) everyrow #1 #1 #1 #1 = \detokenize{####1}^^J}%
- \def\tabu@ls@L ####1{(tabu) line style = \detokenize{####1}^^J}%
- \def\NC@find ####1\@nil{(tabu) tabu preamble#1 #1 = \detokenize{####1}^^J}%
- \def\tabu@wddef####1####2{(tabu) Natural width ####1 = \x{####2}^^J}%
- \let\edef \@gobbletwo \let\def \@empty \let\let \@gobbletwo
- \tabu@message{%
- (tabu) \string\savetabu{\tabu@temp}: \on@line^^J%
- \tabu@usetabu \@nil^^J}%
- \endgroup}
-}\do{ }
-%% Measuring the natural width (varwidth) - store the results -------
-\def\tabu@startpboxmeasure #1{\bgroup % entering \vtop
- \edef\tabu@temp{\expandafter\@secondoftwo \ifx\tabu@hsize #1\else\relax\fi}%
- \ifodd 1\ifx \tabu@temp\@empty 0 \else % starts with \tabu@hsize ?
- \iftabu@spread \else % if spread -> measure
- \ifdim \tabu@temp\p@>\z@ 0 \fi\fi\fi% if coef>0 -> do not measure
- \let\@startpbox \tabu@startpboxORI % restore immediately (nesting)
- \tabu@measuringtrue % for the quick option...
- \tabu@Xcol =\expandafter\@firstoftwo\ifx\tabu@hsize #1\fi
- \ifdim \tabu@temp\p@>\z@ \ifdim \tabu@temp\tabucolX<\tabu@target
- \tabu@target=\tabu@temp\tabucolX \fi\fi
- \setbox\tabu@box \hbox \bgroup
- \begin{varwidth}\tabu@target
- \let\FV@ListProcessLine \tabu@FV@ListProcessLine % \hbox to natural width...
- \narrowragged \arraybackslash \parfillskip \@flushglue
- \ifdefined\pdfadjustspacing \pdfadjustspacing\z@ \fi
- \bgroup \aftergroup\tabu@endpboxmeasure
- \ifdefined \cellspacetoplimit \tabu@cellspacepatch \fi
- \else \expandafter\@gobble
- \tabu@startpboxquick{#1}% \@gobble \bgroup
- \fi
-}% \tabu@startpboxmeasure
-\def\tabu@cellspacepatch{\def\bcolumn##1\@nil{}\let\ecolumn\@empty
- \bgroup\color@begingroup}
-\def\tabu@endpboxmeasure {%
- \@finalstrut \@arstrutbox
- \end{varwidth}\egroup % <got my \tabu@box>
- \ifdim \tabu@temp\p@ <\z@ % neg coef
- \ifdim \tabu@wd\tabu@Xcol <\wd\tabu@box
- \tabu@wddef\tabu@Xcol {\the\wd\tabu@box}%
- \tabu@debug{\tabu@message@endpboxmeasure}%
- \fi
- \else % spread coef>0
- \global\advance \tabu@naturalX \wd\tabu@box
- \@tempdima =\dimexpr \wd\tabu@box *\p@/\dimexpr \tabu@temp\p@\relax \relax
- \ifdim \tabu@naturalXmax <\tabu@naturalX
- \xdef\tabu@naturalXmax {\the\tabu@naturalX}\fi
- \ifdim \tabu@naturalXmin <\@tempdima
- \xdef\tabu@naturalXmin {\the\@tempdima}\fi
- \fi
- \box\tabu@box \egroup % end of \vtop (measure) restore \tabu@target
-}% \tabu@endpboxmeasure
-\def\tabu@wddef #1{\expandafter\xdef
- \csname tabu@\the\tabu@nested.W\number#1\endcsname}
-\def\tabu@wd #1{\csname tabu@\the\tabu@nested.W\number#1\endcsname}
-\def\tabu@message@endpboxmeasure{\tabu@spaces\tabu@spaces<-> % <-> save natural wd
- \the\tabu@Xcol. X[\tabu@temp]:
- target = \the\tabucolX \space
- \expandafter\expandafter\expandafter\string\tabu@wd\tabu@Xcol
- =\tabu@wd\tabu@Xcol
-}% \tabu@message@endpboxmeasure
-\def\tabu@startpboxquick {\bgroup
- \let\@startpbox \tabu@startpboxORI % restore immediately
- \let\tabu \tabu@quick % \begin is expanded before...
- \expandafter\@gobble \@startpbox % gobbles \bgroup
-}% \tabu@startpboxquick
-\def\tabu@quick {\begingroup \iffalse{\fi \ifnum0=`}\fi
- \toks@{}\def\tabu@stack{b}\tabu@collectbody \tabu@endquick
-}% \tabu@quick
-\def\tabu@endquick {%
- \ifodd 1\ifx\tabu@end@envir\tabu@endtabu \else
- \ifx\tabu@end@envir\tabu@endtabus \else 0\fi\fi\relax
- \endgroup
- \else \let\endtabu \relax
- \tabu@end@envir
- \fi
-}% \tabu@quick
-\def\tabu@endtabu {\end{tabu}}
-\def\tabu@endtabus {\end{tabu*}}
-%% Measuring the heights and depths - store the results -------------
-\def\tabu@verticalmeasure{\everypar{}%
- \ifnum \currentgrouptype>12 % 14=semi-simple, 15=math shift group
- \setbox\tabu@box =\hbox\bgroup
- \let\tabu@verticalspacing \tabu@verticalsp@lcr
- \d@llarbegin % after \hbox ...
- \else
- \edef\tabu@temp{\ifnum\currentgrouptype=5\vtop
- \else\ifnum\currentgrouptype=12\vcenter
- \else\vbox\fi\fi}%
- \setbox\tabu@box \hbox\bgroup$\tabu@temp \bgroup
- \let\tabu@verticalspacing \tabu@verticalsp@pmb
- \fi
-}% \tabu@verticalmeasure
-\def\tabu@verticalsp@lcr{%
- \d@llarend \egroup % <got my \tabu@box>
- \@tempdima \dimexpr \ht\tabu@box+\abovetabulinesep
- \@tempdimb \dimexpr \dp\tabu@box+\belowtabulinesep \relax
- \ifdim\tabustrutrule>\z@ \tabu@debug{\tabu@message@verticalsp}\fi
- \ifdim \tabu@ht<\@tempdima \tabu@htdef{\the\@tempdima}\fi
- \ifdim \tabu@dp<\@tempdimb \tabu@dpdef{\the\@tempdimb}\fi
- \noindent\vrule height\@tempdima depth\@tempdimb
-}% \tabu@verticalsp@lcr
-\def\tabu@verticalsp@pmb{% inserts struts as needed
- \par \expandafter\egroup
- \expandafter$\expandafter
- \egroup \expandafter
- \@tempdimc \the\prevdepth
- \@tempdima \dimexpr \ht\tabu@box+\abovetabulinesep
- \@tempdimb \dimexpr \dp\tabu@box+\belowtabulinesep \relax
- \ifdim\tabustrutrule>\z@ \tabu@debug{\tabu@message@verticalsp}\fi
- \ifdim \tabu@ht<\@tempdima \tabu@htdef{\the\@tempdima}\fi
- \ifdim \tabu@dp<\@tempdimb \tabu@dpdef{\the\@tempdimb}\fi
- \let\@finalstrut \@gobble
- \hrule height\@tempdima depth\@tempdimb width\hsize
-%% \box\tabu@box
-}% \tabu@verticalsp@pmb
-
-\def\tabu@verticalinit{%
- \ifnum \c@taburow=\z@ \tabu@rearstrut \fi % after \tabu@reset !
- \advance\c@taburow \@ne
- \tabu@htdef{\the\ht\@arstrutbox}\tabu@dpdef{\the\dp\@arstrutbox}%
- \advance\c@taburow \m@ne
-}% \tabu@verticalinit
-\def\tabu@htdef {\expandafter\xdef \csname tabu@\the\tabu@nested.H\the\c@taburow\endcsname}
-\def\tabu@ht {\csname tabu@\the\tabu@nested.H\the\c@taburow\endcsname}
-\def\tabu@dpdef {\expandafter\xdef \csname tabu@\the\tabu@nested.D\the\c@taburow\endcsname}
-\def\tabu@dp {\csname tabu@\the\tabu@nested.D\the\c@taburow\endcsname}
-\def\tabu@verticaldynamicadjustment {%
- \advance\c@taburow \@ne
- \extrarowheight \dimexpr\tabu@ht - \ht\strutbox
- \extrarowdepth \dimexpr\tabu@dp - \dp\strutbox
- \let\arraystretch \@empty
- \advance\c@taburow \m@ne
-}% \tabu@verticaldynamicadjustment
-\def\tabuphantomline{\crcr \noalign{%
- {\globaldefs \@ne
- \setbox\@arstrutbox \box\voidb@x
- \let\tabu@@celllalign \tabu@celllalign
- \let\tabu@@cellralign \tabu@cellralign
- \let\tabu@@cellleft \tabu@cellleft
- \let\tabu@@cellright \tabu@cellright
- \let\tabu@@thevline \tabu@thevline
- \let\tabu@celllalign \@empty
- \let\tabu@cellralign \@empty
- \let\tabu@cellright \@empty
- \let\tabu@cellleft \@empty
- \let\tabu@thevline \relax}%
- \edef\tabu@temp{\tabu@multispan \tabu@nbcols{\noindent &}}%
- \toks@\expandafter{\tabu@temp \noindent\tabu@everyrowfalse \cr
- \noalign{\tabu@rearstrut
- {\globaldefs\@ne
- \let\tabu@celllalign \tabu@@celllalign
- \let\tabu@cellralign \tabu@@cellralign
- \let\tabu@cellleft \tabu@@cellleft
- \let\tabu@cellright \tabu@@cellright
- \let\tabu@thevline \tabu@@thevline}}}%
- \expandafter}\the\toks@
-}% \tabuphantomline
-%% \firsthline and \lasthline corrections ---------------------------
-\def\tabu@firstline {\tabu@hlineAZ \tabu@firsthlinecorrection {}}
-\def\tabu@firsthline{\tabu@hlineAZ \tabu@firsthlinecorrection \hline}
-\def\tabu@lastline {\tabu@hlineAZ \tabu@lasthlinecorrection {}}
-\def\tabu@lasthline {\tabu@hlineAZ \tabu@lasthlinecorrection \hline}
-\def\tabu@hline {% replaces \hline if no colortbl (see \AtBeginDocument)
- \noalign{\ifnum0=`}\fi
- {\CT@arc@\hrule height\arrayrulewidth}%
- \futurelet \tabu@temp \tabu@xhline
-}% \tabu@hline
-\def\tabu@xhline{%
- \ifx \tabu@temp \hline
- {\ifx \CT@drsc@\relax \vskip
- \else\ifx \CT@drsc@\@empty \vskip
- \else \CT@drsc@\hrule height
- \fi\fi
- \doublerulesep}%
- \fi
- \ifnum0=`{\fi}%
-}% \tabu@xhline
-\def\tabu@hlineAZ #1#2{\noalign{\ifnum0=`}\fi \dimen@ \z@ \count@ \z@
- \toks@{}\def\tabu@hlinecorrection{#1}\def\tabu@temp{#2}%
- \tabu@hlineAZsurround
-}% \tabu@hlineAZ
-\newcommand*\tabu@hlineAZsurround[1][\extratabsurround]{%
- \extratabsurround #1\let\tabucline \tabucline@scan
- \let\hline \tabu@hlinescan \let\firsthline \hline
- \let\cline \tabu@clinescan \let\lasthline \hline
- \expandafter \futurelet \expandafter \tabu@temp
- \expandafter \tabu@nexthlineAZ \tabu@temp
-}% \tabu@hlineAZsurround
-\def\tabu@hlinescan {\tabu@thick \arrayrulewidth \tabu@xhlineAZ \hline}
-\def\tabu@clinescan #1{\tabu@thick \arrayrulewidth \tabu@xhlineAZ {\cline{#1}}}
-\def\tabucline@scan{\@testopt \tabucline@sc@n {}}
-\def\tabucline@sc@n #1[#2]{\tabu@xhlineAZ {\tabucline[{#1}]{#2}}}
-\def\tabu@nexthlineAZ{%
- \ifx \tabu@temp\hline \else
- \ifx \tabu@temp\cline \else
- \ifx \tabu@temp\tabucline \else
- \tabu@hlinecorrection
- \fi\fi\fi
-}% \tabu@nexthlineAZ
-\def\tabu@xhlineAZ #1{%
- \toks@\expandafter{\the\toks@ #1}%
- \@tempdimc \tabu@thick % The last line width
- \ifcase\count@ \@tempdimb \tabu@thick % The first line width
- \else \advance\dimen@ \dimexpr \tabu@thick+\doublerulesep \relax
- \fi
- \advance\count@ \@ne \futurelet \tabu@temp \tabu@nexthlineAZ
-}% \tabu@xhlineAZ
-\def\tabu@firsthlinecorrection{% \count@ = number of \hline -1
- \@tempdima \dimexpr \ht\@arstrutbox+\dimen@
- \edef\firsthline{% <local in \noalign>
- \omit \hbox to\z@{\hss{\noexpand\tabu@DBG{yellow}\vrule
- height \the\dimexpr\@tempdima+\extratabsurround
- depth \dp\@arstrutbox
- width \tabustrutrule}\hss}\cr
- \noalign{\vskip -\the\dimexpr \@tempdima+\@tempdimb
- +\dp\@arstrutbox \relax}%
- \the\toks@
- }\ifnum0=`{\fi
- \expandafter}\firsthline % we are then !
-}% \tabu@firsthlinecorrection
-\def\tabu@lasthlinecorrection{%
- \@tempdima \dimexpr \dp\@arstrutbox+\dimen@+\@tempdimb+\@tempdimc
- \edef\lasthline{% <local in \noalign>
- \the\toks@
- \noalign{\vskip -\the\dimexpr\dimen@+\@tempdimb+\dp\@arstrutbox}%
- \omit \hbox to\z@{\hss{\noexpand\tabu@DBG{yellow}\vrule
- depth \the\dimexpr \dp\@arstrutbox+\@tempdimb+\dimen@
- +\extratabsurround-\@tempdimc
- height \z@
- width \tabustrutrule}\hss}\cr
- }\ifnum0=`{\fi
- \expandafter}\lasthline % we are then !
-}% \tabu@lasthlinecorrection
-\def\tabu@LT@@hline{%
- \ifx\LT@next\hline
- \global\let\LT@next \@gobble
- \ifx \CT@drsc@\relax
- \gdef\CT@LT@sep{%
- \noalign{\penalty-\@medpenalty\vskip\doublerulesep}}%
- \else
- \gdef\CT@LT@sep{%
- \multispan\LT@cols{%
- \CT@drsc@\leaders\hrule\@height\doublerulesep\hfill}\cr}%
- \fi
- \else
- \global\let\LT@next\empty
- \gdef\CT@LT@sep{%
- \noalign{\penalty-\@lowpenalty\vskip-\arrayrulewidth}}%
- \fi
- \ifnum0=`{\fi}%
- \multispan\LT@cols
- {\CT@arc@\leaders\hrule\@height\arrayrulewidth\hfill}\cr
- \CT@LT@sep
- \multispan\LT@cols
- {\CT@arc@\leaders\hrule\@height\arrayrulewidth\hfill}\cr
- \noalign{\penalty\@M}%
- \LT@next
-}% \tabu@LT@@hline
-%% Horizontal lines : \tabucline ------------------------------------
-\let\tabu@start \@tempcnta
-\let\tabu@stop \@tempcntb
-\newcommand*\tabucline{\noalign{\ifnum0=`}\fi \tabu@cline}
-\newcommand*\tabu@cline[2][]{\tabu@startstop{#2}%
- \ifnum \tabu@stop<\z@ \toks@{}%
- \else \tabu@clinearg{#1}\tabu@thestyle
- \edef\tabucline{\toks@{%
- \ifnum \tabu@start>\z@ \omit
- \tabu@multispan\tabu@start {\span\omit}&\fi
- \omit \tabu@multispan\tabu@stop {\span\omit}%
- \tabu@thehline\cr
- }}\tabucline
- \tabu@tracinglines{(tabu:tabucline) Style: #1^^J\the\toks@^^J^^J}%
- \fi
- \futurelet \tabu@temp \tabu@xcline
-}% \tabu@cline
-\def\tabu@clinearg #1{%
- \ifx\\#1\\\let\tabu@thestyle \tabu@ls@
- \else \@defaultunits \expandafter\let\expandafter\@tempa
- \romannumeral-`\0#1\relax \@nnil
- \ifx \hbox\@tempa \tabu@clinebox{#1}%
- \else\ifx \box\@tempa \tabu@clinebox{#1}%
- \else\ifx \vbox\@tempa \tabu@clinebox{#1}%
- \else\ifx \vtop\@tempa \tabu@clinebox{#1}%
- \else\ifx \copy\@tempa \tabu@clinebox{#1}%
- \else\ifx \leaders\@tempa \tabu@clineleads{#1}%
- \else\ifx \cleaders\@tempa \tabu@clineleads{#1}%
- \else\ifx \xleaders\@tempa \tabu@clineleads{#1}%
- \else\tabu@getline {#1}%
- \fi\fi\fi\fi\fi\fi\fi\fi
- \fi
-}% \tabu@clinearg
-\def\tabu@clinebox #1{\tabu@clineleads{\xleaders#1\hss}}
-\def\tabu@clineleads #1{%
- \let\tabu@thestyle \relax \let\tabu@leaders \@undefined
- \gdef\tabu@thehrule{#1}}
-\def\tabu@thehline{\begingroup
- \ifdefined\tabu@leaders
- \noexpand\tabu@thehleaders
- \else \noexpand\tabu@thehrule
- \fi \endgroup
-}% \tabu@thehline
-\def\tabu@xcline{%
- \ifx \tabu@temp\tabucline
- \toks@\expandafter{\the\toks@ \noalign
- {\ifx\CT@drsc@\relax \vskip
- \else \CT@drsc@\hrule height
- \fi
- \doublerulesep}}%
- \fi
- \tabu@docline
-}% \tabu@xcline
-\def\tabu@docline {\ifnum0=`{\fi \expandafter}\the\toks@}
-\def\tabu@docline@evr {\xdef\tabu@doclineafter{\the\toks@}%
- \ifnum0=`{\fi}\aftergroup\tabu@doclineafter}
-\def\tabu@multispan #1#2{%
- \ifnum\numexpr#1>\@ne #2\expandafter\tabu@multispan
- \else \expandafter\@gobbletwo
- \fi {#1-1}{#2}%
-}% \tabu@multispan
-\def\tabu@startstop #1{\tabu@start@stop #1\relax 1-\tabu@nbcols \@nnil}
-\def\tabu@start@stop #1-#2\@nnil{%
- \@defaultunits \tabu@start\number 0#1\relax \@nnil
- \@defaultunits \tabu@stop \number 0#2\relax \@nnil
- \tabu@stop \ifnum \tabu@start>\tabu@nbcols \m@ne
- \else\ifnum \tabu@stop=\z@ \tabu@nbcols
- \else\ifnum \tabu@stop>\tabu@nbcols \tabu@nbcols
- \else \tabu@stop
- \fi\fi\fi
- \advance\tabu@start \m@ne
- \ifnum \tabu@start>\z@ \advance\tabu@stop -\tabu@start \fi
-}% \tabu@start@stop
-%% Numbers: siunitx S columns (and \tabudecimal) -------------------
-\def\tabu@tabudecimal #1{%
- \def\tabu@decimal{#1}\@temptokena{}%
- \let\tabu@getdecimal@ \tabu@getdecimal@ignorespaces
- \tabu@scandecimal
-}% \tabu@tabudecimal
-\def\tabu@scandecimal{\futurelet \tabu@temp \tabu@getdecimal@}
-\def\tabu@skipdecimal#1{#1\tabu@scandecimal}
-\def\tabu@getdecimal@ignorespaces{%
- \ifcase 0\ifx\tabu@temp\ignorespaces\else
- \ifx\tabu@temp\@sptoken1\else
- 2\fi\fi\relax
- \let\tabu@getdecimal@ \tabu@getdecimal
- \expandafter\tabu@skipdecimal
- \or \expandafter\tabu@gobblespace\expandafter\tabu@scandecimal
- \else \expandafter\tabu@skipdecimal
- \fi
-}% \tabu@getdecimal@ignorespaces
-\def\tabu@get@decimal#1{\@temptokena\expandafter{\the\@temptokena #1}%
- \tabu@scandecimal}
-\def\do#1{%
- \def\tabu@get@decimalspace#1{%
- \@temptokena\expandafter{\the\@temptokena #1}\tabu@scandecimal}%
-}\do{ }
-\let\tabu@@tabudecimal \tabu@tabudecimal
-\def\tabu@getdecimal{%
- \ifcase 0\ifx 0\tabu@temp\else
- \ifx 1\tabu@temp\else
- \ifx 2\tabu@temp\else
- \ifx 3\tabu@temp\else
- \ifx 4\tabu@temp\else
- \ifx 5\tabu@temp\else
- \ifx 6\tabu@temp\else
- \ifx 7\tabu@temp\else
- \ifx 8\tabu@temp\else
- \ifx 9\tabu@temp\else
- \ifx .\tabu@temp\else
- \ifx ,\tabu@temp\else
- \ifx -\tabu@temp\else
- \ifx +\tabu@temp\else
- \ifx e\tabu@temp\else
- \ifx E\tabu@temp\else
- \ifx\tabu@cellleft\tabu@temp1\else
- \ifx\ignorespaces\tabu@temp1\else
- \ifx\@sptoken\tabu@temp2\else
- 3\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\relax
- \expandafter\tabu@get@decimal
- \or \expandafter\tabu@skipdecimal
- \or \expandafter\tabu@get@decimalspace
- \else\expandafter\tabu@printdecimal
- \fi
-}% \tabu@getdecimal
-\def\tabu@printdecimal{%
- \edef\tabu@temp{\the\@temptokena}%
- \ifx\tabu@temp\@empty\else
- \ifx\tabu@temp\space\else
- \expandafter\tabu@decimal\expandafter{\the\@temptokena}%
- \fi\fi
-}% \tabu@printdecimal
-%% Verbatim inside X columns ----------------------------------------
-\def\tabu@verbatim{%
- \let\verb \tabu@verb
- \let\FV@DefineCheckEnd \tabu@FV@DefineCheckEnd
-}% \tabu@verbatim
-\let\tabu@ltx@verb \verb
-\def\tabu@verb{\@ifstar {\tabu@ltx@verb*} \tabu@ltx@verb}
-\def\tabu@fancyvrb {%
- \def\tabu@FV@DefineCheckEnd ##1{%
- \def\tabu@FV@DefineCheckEnd{%
- ##1% <original definition (if fancyvrb is loaded)>
- \let\FV@CheckEnd \tabu@FV@CheckEnd
- \let\FV@@CheckEnd \tabu@FV@@CheckEnd
- \let\FV@@@CheckEnd \tabu@FV@@@CheckEnd
- \edef\FV@EndScanning{%
- \def\noexpand\next{\noexpand\end{\FV@EnvironName}}%
- \global\let\noexpand\FV@EnvironName\relax
- \noexpand\next}%
- \xdef\FV@EnvironName{\detokenize\expandafter{\FV@EnvironName}}}%
- }\expandafter\tabu@FV@DefineCheckEnd\expandafter{\FV@DefineCheckEnd}
-}% \tabu@fancyvrb
-\def\tabu@FV@CheckEnd #1{\expandafter\FV@@CheckEnd \detokenize{#1\end{}}\@nil}
-\edef\tabu@FV@@@CheckEnd {\detokenize{\end{}}}
-\begingroup
-\catcode`\[1 \catcode`\]2
-\@makeother\{ \@makeother\}
- \edef\x[\endgroup
- \def\noexpand\tabu@FV@@CheckEnd ##1\detokenize[\end{]##2\detokenize[}]##3%
- ]\x \@nil{\def\@tempa{#2}\def\@tempb{#3}}
-\def\tabu@FV@ListProcessLine #1{%
- \hbox {%to \hsize{%
- \kern\leftmargin
- \hbox {%to \linewidth{%
- \FV@LeftListNumber
- \FV@LeftListFrame
- \FancyVerbFormatLine{#1}\hss
-%% DG/SR modification begin - Jan. 28, 1998 (for numbers=right add-on)
-%% \FV@RightListFrame}%
- \FV@RightListFrame
- \FV@RightListNumber}%
-%% DG/SR modification end
- \hss}}
-%% \savetabu --------------------------------------------------------
-\newcommand*\savetabu[1]{\noalign{%
- \tabu@sanitizearg{#1}\tabu@temp
- \ifx \tabu@temp\@empty \tabu@savewarn{}{The tabu will not be saved}\else
- \@ifundefined{tabu@saved@\tabu@temp}{}{\tabu@savewarn{#1}{Overwriting}}%
- \ifdefined\tabu@restored \expandafter\let
- \csname tabu@saved@\tabu@temp \endcsname \tabu@restored
- \else {\tabu@save}%
- \fi
- \fi}%
-}% \savetabu
-\def\tabu@save {%
- \toks0\expandafter{\tabu@saved@}%
- \iftabu@negcoef
- \let\tabu@wddef \relax \let\tabu@ \tabu@savewd \edef\tabu@savewd{\tabu@Xcoefs}%
- \toks0\expandafter{\the\toks\expandafter0\tabu@savewd}\fi
- \toks1\expandafter{\tabu@savedpream}%
- \toks2\expandafter{\tabu@savedpreamble}%
- \let\@preamble \relax
- \let\tabu@savedpream \relax \let\tabu@savedparams \relax
- \edef\tabu@preamble{%
- \def\noexpand\tabu@aligndefault{\tabu@align}%
- \def\tabu@savedparams {\noexpand\the\toks0}%
- \def\tabu@savedpream {\noexpand\the\toks1}}%
- \edef\tabu@usetabu{%
- \def\@preamble {\noexpand\the\toks2}%
- \tabu@target \the\tabu@target \relax
- \tabucolX \the\tabucolX \relax
- \tabu@nbcols \the\tabu@nbcols \relax
- \def\noexpand\tabu@aligndefault{\tabu@align}%
- \def\tabu@savedparams {\noexpand\the\toks0}%
- \def\tabu@savedpream {\noexpand\the\toks1}}%
- \let\tabu@aligndefault \relax \let\@sharp \relax
- \edef\@tempa{\noexpand\tabu@s@ved
- {\tabu@usetabu}
- {\tabu@preamble}
- {\the\toks1}}\@tempa
- \tabu@message@save
-}% \tabu@save
-\long\def\tabu@s@ved #1#2#3{%
- \def\tabu@usetabu{#1}% <for \tabu@message@save>
- \expandafter\gdef\csname tabu@saved@\tabu@temp\endcsname ##1{%
- \ifodd ##1% \usetabu
- \tabu@measuringfalse \tabu@spreadfalse % Just in case...
- \gdef\tabu@usetabu {%
- \ifdim \tabu@target>\z@ \tabu@warn@usetabu \fi
- \global\let\tabu@usetabu \@undefined
- \def\@halignto {to\tabu@target}%
- #1%
- \ifx \tabu@align\tabu@aligndefault@text
- \ifnum \tabu@nested=\z@
- \let\tabu@align \tabu@aligndefault \fi\fi}%
- \else % \preamble
- \gdef\tabu@preamble {%
- \global\let\tabu@preamble \@undefined
- #2%
- \ifx \tabu@align\tabu@aligndefault@text
- \ifnum \tabu@nested=\z@
- \let\tabu@align \tabu@aligndefault \fi\fi}%
- \fi
- #3}%
-}% \tabu@s@ved
-\def\tabu@aligndefault@text {\tabu@aligndefault}%
-\def\tabu@warn@usetabu {\PackageWarning{tabu}
- {Specifying a target with \string\usetabu\space is useless
- \MessageBreak The target cannot be changed!}}
-\def\tabu@savewd #1#2{\ifdim #2\p@<\z@ \tabu@wddef{#1}{\tabu@wd{#1}}\fi}
-\def\tabu@savewarn#1#2{\PackageInfo{tabu}
- {User-name `#1' already used for \string\savetabu
- \MessageBreak #2}}%
-\def\tabu@saveerr#1{\PackageError{tabu}
- {User-name `#1' is unknown for \string\usetabu
- \MessageBreak I cannot restore an unknown preamble!}\@ehd}
-%% \rowfont ---------------------------------------------------------
-\newskip \tabu@cellskip
-\def\tabu@rowfont{\ifdim \baselineskip=\z@\noalign\fi
- {\ifnum0=`}\fi \tabu@row@font}
-\newcommand*\tabu@row@font[2][]{%
- \ifnum7=\currentgrouptype
- \global\let\tabu@@cellleft \tabu@cellleft
- \global\let\tabu@@cellright \tabu@cellright
- \global\let\tabu@@celllalign \tabu@celllalign
- \global\let\tabu@@cellralign \tabu@cellralign
- \global\let\tabu@@rowfontreset\tabu@rowfontreset
- \fi
- \global\let\tabu@rowfontreset \tabu@rowfont@reset
- \expandafter\gdef\expandafter\tabu@cellleft\expandafter{\tabu@cellleft #2}%
- \ifcsname tabu@cell@#1\endcsname % row alignment
- \csname tabu@cell@#1\endcsname \fi
- \ifnum0=`{\fi}% end of group / noalign group
-}% \rowfont
-\def\tabu@ifcolorleavevmode #1{\let\color \tabu@leavevmodecolor #1\let\color\tabu@color}%
-\def\tabu@rowfont@reset{%
- \global\let\tabu@rowfontreset \tabu@@rowfontreset
- \global\let\tabu@cellleft \tabu@@cellleft
- \global\let\tabu@cellright \tabu@@cellright
- \global\let\tabu@cellfont \@empty
- \global\let\tabu@celllalign \tabu@@celllalign
- \global\let\tabu@cellralign \tabu@@cellralign
-}% \tabu@@rowfontreset
-\let\tabu@rowfontreset \@empty % overwritten \AtBeginDocument if colortbl
-%% \tabu@prepnext@tok -----------------------------------------------
-\newif \iftabu@cellright
-\def\tabu@prepnext@tok{%
- \ifnum \count@<\z@ % <first initialisation>
- \@tempcnta \@M % <not initialized by array.sty>
- \tabu@nbcols\z@
- \let\tabu@fornoopORI \@fornoop
- \tabu@cellrightfalse
- \else
- \ifcase \numexpr \count@-\@tempcnta \relax % (case 0): prev. token is left
- \advance \tabu@nbcols \@ne
- \iftabu@cellright % before-previous token is right and is finished
- \tabu@cellrightfalse % <only once>
- \tabu@righttok
- \fi
- \tabu@lefttok
- \or % (case 1) previous token is right
- \tabu@cellrighttrue \let\@fornoop \tabu@lastnoop
- \else % special column: do not change the token
- \iftabu@cellright % before-previous token is right
- \tabu@cellrightfalse
- \tabu@righttok
- \fi
- \fi % \ifcase
- \fi
- \tabu@prepnext@tokORI
-}% \tabu@prepnext@tok
-\long\def\tabu@lastnoop#1\@@#2#3{\tabu@lastn@@p #2\@nextchar \in@\in@@}
-\def\tabu@lastn@@p #1\@nextchar #2#3\in@@{%
- \ifx \in@#2\else
- \let\@fornoop \tabu@fornoopORI
- \xdef\tabu@mkpreambuffer{\tabu@nbcols\the\tabu@nbcols \tabu@mkpreambuffer}%
- \toks0\expandafter{\expandafter\tabu@everyrowtrue \the\toks0}%
- \expandafter\prepnext@tok
- \fi
-}% \tabu@lastnoop
-\def\tabu@righttok{%
- \advance \count@ \m@ne
- \toks\count@\expandafter {\the\toks\count@ \tabu@cellright \tabu@cellralign}%
- \advance \count@ \@ne
-}% \tabu@righttok
-\def\tabu@lefttok{\toks\count@\expandafter{\expandafter\tabu@celllalign
- \the\toks\count@ \tabu@cellleft}% after because of $
-}% \tabu@lefttok
-%% Neutralisation of glues ------------------------------------------
-\let\tabu@cellleft \@empty
-\let\tabu@cellright \@empty
-\tabu@celllalign@def{\tabu@cellleft}%
-\let\tabu@cellralign \@empty
-\def\tabu@cell@align #1#2#3{%
- \let\tabu@maybesiunitx \toks@ \tabu@celllalign
- \global \expandafter \tabu@celllalign@def \expandafter {\the\toks@ #1}%
- \toks@\expandafter{\tabu@cellralign #2}%
- \xdef\tabu@cellralign{\the\toks@}%
- \toks@\expandafter{\tabu@cellleft #3}%
- \xdef\tabu@cellleft{\the\toks@}%
-}% \tabu@cell@align
-\def\tabu@cell@l{% force alignment to left
- \tabu@cell@align
- {\tabu@removehfil \raggedright \tabu@cellleft}% left
- {\tabu@flush1\tabu@ignorehfil}% right
- \raggedright
-}% \tabu@cell@l
-\def\tabu@cell@c{% force alignment to center
- \tabu@cell@align
- {\tabu@removehfil \centering \tabu@flush{.5}\tabu@cellleft}
- {\tabu@flush{.5}\tabu@ignorehfil}
- \centering
-}% \tabu@cell@c
-\def\tabu@cell@r{% force alignment to right
- \tabu@cell@align
- {\tabu@removehfil \raggedleft \tabu@flush1\tabu@cellleft}
- \tabu@ignorehfil
- \raggedleft
-}% \tabu@cell@r
-\def\tabu@cell@j{% force justification (for p, m, b columns)
- \tabu@cell@align
- {\tabu@justify\tabu@cellleft}
- {}
- \tabu@justify
-}% \tabu@cell@j
-\def\tabu@justify{%
- \leftskip\z@skip \@rightskip\leftskip \rightskip\@rightskip
- \parfillskip\@flushglue
-}% \tabu@justify
-%% ragged2e settings
-\def\tabu@cell@L{% force alignment to left (ragged2e)
- \tabu@cell@align
- {\tabu@removehfil \RaggedRight \tabu@cellleft}
- {\tabu@flush 1\tabu@ignorehfil}
- \RaggedRight
-}% \tabu@cell@L
-\def\tabu@cell@C{% force alignment to center (ragged2e)
- \tabu@cell@align
- {\tabu@removehfil \Centering \tabu@flush{.5}\tabu@cellleft}
- {\tabu@flush{.5}\tabu@ignorehfil}
- \Centering
-}% \tabu@cell@C
-\def\tabu@cell@R{% force alignment to right (ragged2e)
- \tabu@cell@align
- {\tabu@removehfil \RaggedLeft \tabu@flush 1\tabu@cellleft}
- \tabu@ignorehfil
- \RaggedLeft
-}% \tabu@cell@R
-\def\tabu@cell@J{% force justification (ragged2e)
- \tabu@cell@align
- {\justifying \tabu@cellleft}
- {}
- \justifying
-}% \tabu@cell@J
-\def\tabu@flush#1{%
- \iftabu@colortbl % colortbl uses \hfill rather than \hfil
- \hskip \ifnum13<\currentgrouptype \stretch{#1}%
- \else \ifdim#1pt<\p@ \tabu@cellskip
- \else \stretch{#1}
- \fi\fi \relax
- \else % array.sty
- \ifnum 13<\currentgrouptype
- \hfil \hskip1sp \relax \fi
- \fi
-}% \tabu@flush
-\let\tabu@hfil \hfil
-\let\tabu@hfill \hfill
-\let\tabu@hskip \hskip
-\def\tabu@removehfil{%
- \iftabu@colortbl
- \unkern \tabu@cellskip =\lastskip
- \ifnum\gluestretchorder\tabu@cellskip =\tw@ \hskip-\tabu@cellskip
- \else \tabu@cellskip \z@skip
- \fi
- \else
- \ifdim\lastskip=1sp\unskip\fi
- \ifnum\gluestretchorder\lastskip =\@ne
- \hfilneg % \hfilneg for array.sty but not for colortbl...
- \fi
- \fi
-}% \tabu@removehfil
-\def\tabu@ignorehfil{\aftergroup \tabu@nohfil}
-\def\tabu@nohfil{% \hfil -> do nothing + restore original \hfil
- \def\hfil{\let\hfil \tabu@hfil}% local to (alignment template) group
-}% \tabu@nohfil
-\def\tabu@colortblalignments {% if colortbl
- \def\tabu@nohfil{%
- \def\hfil {\let\hfil \tabu@hfil}% local to (alignment template) group
- \def\hfill {\let\hfill \tabu@hfill}% (colortbl uses \hfill) pfff...
- \def\hskip ####1\relax{\let\hskip \tabu@hskip}}% local
-}% \tabu@colortblalignments
-%% Taking care of footnotes and hyperfootnotes ----------------------
-\long\def\tabu@footnotetext #1{%
- \edef\@tempa{\the\tabu@footnotes
- \noexpand\footnotetext [\the\csname c@\@mpfn\endcsname]}%
- \global\tabu@footnotes\expandafter{\@tempa {#1}}}%
-\long\def\tabu@xfootnotetext [#1]#2{%
- \global\tabu@footnotes\expandafter{\the\tabu@footnotes
- \footnotetext [{#1}]{#2}}}
-\let\tabu@xfootnote \@xfootnote
-\long\def\tabu@Hy@ftntext{\tabu@Hy@ftntxt {\the \c@footnote }}
-\long\def\tabu@Hy@xfootnote [#1]{%
- \begingroup
- \value\@mpfn #1\relax
- \protected@xdef \@thefnmark {\thempfn}%
- \endgroup
- \@footnotemark \tabu@Hy@ftntxt {#1}%
-}% \tabu@Hy@xfootnote
-\long\def\tabu@Hy@ftntxt #1#2{%
- \edef\@tempa{%
- \the\tabu@footnotes
- \begingroup
- \value\@mpfn #1\relax
- \noexpand\protected@xdef\noexpand\@thefnmark {\noexpand\thempfn}%
- \expandafter \noexpand \expandafter
- \tabu@Hy@footnotetext \expandafter{\Hy@footnote@currentHref}%
- }%
- \global\tabu@footnotes\expandafter{\@tempa {#2}%
- \endgroup}%
-}% \tabu@Hy@ftntxt
-\long\def\tabu@Hy@footnotetext #1#2{%
- \H@@footnotetext{%
- \ifHy@nesting
- \hyper@@anchor {#1}{#2}%
- \else
- \Hy@raisedlink{%
- \hyper@@anchor {#1}{\relax}%
- }%
- \def\@currentHref {#1}%
- \let\@currentlabelname \@empty
- #2%
- \fi
- }%
-}% \tabu@Hy@footnotetext
-%% No need for \arraybackslash ! ------------------------------------
-\def\tabu@latextwoe {%
-\def\tabu@temp##1##2##3{{\toks@\expandafter{##2##3}\xdef##1{\the\toks@}}}
-\tabu@temp \tabu@centering \centering \arraybackslash
-\tabu@temp \tabu@raggedleft \raggedleft \arraybackslash
-\tabu@temp \tabu@raggedright \raggedright \arraybackslash
-}% \tabu@latextwoe
-\def\tabu@raggedtwoe {%
-\def\tabu@temp ##1##2##3{{\toks@\expandafter{##2##3}\xdef##1{\the\toks@}}}
-\tabu@temp \tabu@Centering \Centering \arraybackslash
-\tabu@temp \tabu@RaggedLeft \RaggedLeft \arraybackslash
-\tabu@temp \tabu@RaggedRight \RaggedRight \arraybackslash
-\tabu@temp \tabu@justifying \justifying \arraybackslash
-}% \tabu@raggedtwoe
-\def\tabu@normalcrbackslash{\let\\\@normalcr}
-\def\tabu@trivlist{\expandafter\def\expandafter\@trivlist\expandafter{%
- \expandafter\tabu@normalcrbackslash \@trivlist}}
-%% Utilities: \fbox \fcolorbox and \tabudecimal -------------------
-\def\tabu@fbox {\leavevmode\afterassignment\tabu@beginfbox \setbox\@tempboxa\hbox}
-\def\tabu@beginfbox {\bgroup \kern\fboxsep
- \bgroup\aftergroup\tabu@endfbox}
-\def\tabu@endfbox {\kern\fboxsep\egroup\egroup
- \@frameb@x\relax}
-\def\tabu@color@b@x #1#2{\leavevmode \bgroup
- \def\tabu@docolor@b@x{#1{#2\color@block{\wd\z@}{\ht\z@}{\dp\z@}\box\z@}}%
- \afterassignment\tabu@begincolor@b@x \setbox\z@ \hbox
-}% \tabu@color@b@x
-\def\tabu@begincolor@b@x {\kern\fboxsep \bgroup
- \aftergroup\tabu@endcolor@b@x \set@color}
-\def\tabu@endcolor@b@x {\kern\fboxsep \egroup
- \dimen@\ht\z@ \advance\dimen@ \fboxsep \ht\z@ \dimen@
- \dimen@\dp\z@ \advance\dimen@ \fboxsep \dp\z@ \dimen@
- \tabu@docolor@b@x \egroup
-}% \tabu@endcolor@b@x
-%% Corrections (arydshln, delarray, colortbl) -----------------------
-\def\tabu@fix@arrayright {%% \@arrayright is missing from \endarray
- \iftabu@colortbl
- \ifdefined\adl@array % <colortbl + arydshln>
- \def\tabu@endarray{%
- \adl@endarray \egroup \adl@arrayrestore \CT@end \egroup %<original>
- \@arrayright % <FC>
- \gdef\@preamble{}}% <FC>
- \else % <colortbl / no arydshln>
- \def\tabu@endarray{%
- \crcr \egroup \egroup %<original>
- \@arrayright % <FC>
- \gdef\@preamble{}\CT@end}%
- \fi
- \else
- \ifdefined\adl@array % <arydshln / no colortbl>
- \def\tabu@endarray{%
- \adl@endarray \egroup \adl@arrayrestore \egroup %<original>
- \@arrayright % <FC>
- \gdef\@preamble{}}% <FC>
- \else % <no arydshln / no colotbl + \@arrayright missing>
- \PackageWarning{tabu}
- {\string\@arrayright\space is missing from the
- \MessageBreak definition of \string\endarray.
- \MessageBreak Compatibility with delarray.sty is broken.}%
- \fi\fi
-}% \tabu@fix@arrayright
-\def\tabu@adl@xarraydashrule #1#2#3{%
- \ifnum\@lastchclass=\adl@class@start\else
- \ifnum\@lastchclass=\@ne\else
- \ifnum\@lastchclass=5 \else % <FC> @-arg (class 5) and !-arg (class 1)
- \adl@leftrulefalse \fi\fi % must be treated the same
- \fi
- \ifadl@zwvrule\else \ifadl@inactive\else
- \@addtopreamble{\vrule\@width\arrayrulewidth
- \@height\z@ \@depth\z@}\fi \fi
- \ifadl@leftrule
- \@addtopreamble{\adl@vlineL{\CT@arc@}{\adl@dashgapcolor}%
- {\number#1}#3}%
- \else \@addtopreamble{\adl@vlineR{\CT@arc@}{\adl@dashgapcolor}%
- {\number#2}#3}
- \fi
-}% \tabu@adl@xarraydashrule
-\def\tabu@adl@act@endpbox {%
- \unskip \ifhmode \nobreak \fi \@finalstrut \@arstrutbox
- \egroup \egroup
- \adl@colhtdp \box\adl@box \hfil
-}% \tabu@adl@act@endpbox
-\def\tabu@adl@fix {%
- \let\adl@xarraydashrule \tabu@adl@xarraydashrule % <fix> arydshln
- \let\adl@act@endpbox \tabu@adl@act@endpbox % <fix> arydshln
- \let\adl@act@@endpbox \tabu@adl@act@endpbox % <fix> arydshln
- \let\@preamerror \@preamerr % <fix> arydshln
-}% \tabu@adl@fix
-%% Correction for longtable' \@startbox definition ------------------
-%% => \everypar is ``missing'' : TeX should be in vertical mode
-\def\tabu@LT@startpbox #1{%
- \bgroup
- \let\@footnotetext\LT@p@ftntext
- \setlength\hsize{#1}%
- \@arrayparboxrestore
- \everypar{%
- \vrule \@height \ht\@arstrutbox \@width \z@
- \everypar{}}%
-}% \tabu@LT@startpbox
-%% \tracingtabu and the package options ------------------
-\DeclareOption{delarray}{\AtEndOfPackage{\RequirePackage{delarray}}}
-\DeclareOption{linegoal}{%
- \AtEndOfPackage{%
- \RequirePackage{linegoal}[2010/12/07]%
- \let\tabudefaulttarget \linegoal% \linegoal is \linewidth if not pdfTeX
-}}
-\DeclareOption{scantokens}{\tabuscantokenstrue}
-\DeclareOption{debugshow}{\AtEndOfPackage{\tracingtabu=\tw@}}
-\def\tracingtabu {\begingroup\@ifnextchar=%
- {\afterassignment\tabu@tracing\count@}
- {\afterassignment\tabu@tracing\count@1\relax}}
-\def\tabu@tracing{\expandafter\endgroup
- \expandafter\tabu@tr@cing \the\count@ \relax
-}% \tabu@tracing
-\def\tabu@tr@cing #1\relax {%
- \ifnum#1>\thr@@ \let\tabu@tracinglines\message
- \else \let\tabu@tracinglines\@gobble
- \fi
- \ifnum#1>\tw@ \let\tabu@DBG \tabu@@DBG
- \def\tabu@mkarstrut {\tabu@DBG@arstrut}%
- \tabustrutrule 1.5\p@
- \else \let\tabu@DBG \@gobble
- \def\tabu@mkarstrut {\tabu@arstrut}%
- \tabustrutrule \z@
- \fi
- \ifnum#1>\@ne \let\tabu@debug \message
- \else \let\tabu@debug \@gobble
- \fi
- \ifnum#1>\z@
- \let\tabu@message \message
- \let\tabu@tracing@save \tabu@message@save
- \let\tabu@starttimer \tabu@pdftimer
- \else
- \let\tabu@message \@gobble
- \let\tabu@tracing@save \@gobble
- \let\tabu@starttimer \relax
- \fi
-}% \tabu@tr@cing
-%% Setup \AtBeginDocument
-\AtBeginDocument{\tabu@AtBeginDocument}
-\def\tabu@AtBeginDocument{\let\tabu@AtBeginDocument \@undefined
- \ifdefined\arrayrulecolor \tabu@colortbltrue % <colortbl>
- \tabu@colortblalignments % different glues are used
- \else \tabu@colortblfalse \fi
- \ifdefined\CT@arc@ \else \let\CT@arc@ \relax \fi
- \ifdefined\CT@drsc@\else \let\CT@drsc@ \relax \fi
- \let\tabu@arc@L \CT@arc@ \let\tabu@drsc@L \CT@drsc@
- \ifodd 1\ifcsname siunitx_table_collect_begin:Nn\endcsname % <siunitx: ok>
- \expandafter\ifx
- \csname siunitx_table_collect_begin:Nn\endcsname\relax 0\fi\fi\relax
- \tabu@siunitxtrue
- \else \let\tabu@maybesiunitx \@firstofone % <not siunitx: setup>
- \let\tabu@siunitx \tabu@nosiunitx
- \tabu@siunitxfalse
- \fi
- \ifdefined\adl@array % <arydshln>
- \else \let\tabu@adl@fix \relax
- \let\tabu@adl@endtrial \@empty \fi
- \ifdefined\longtable % <longtable>
- \else \let\longtabu \tabu@nolongtabu \fi
- \ifdefined\cellspacetoplimit \tabu@warn@cellspace\fi
- \csname\ifcsname ifHy@hyperfootnotes\endcsname % <hyperfootnotes>
- ifHy@hyperfootnotes\else iffalse\fi\endcsname
- \let\tabu@footnotetext \tabu@Hy@ftntext
- \let\tabu@xfootnote \tabu@Hy@xfootnote \fi
- \ifdefined\FV@DefineCheckEnd% <fancyvrb>
- \tabu@fancyvrb \fi
- \ifdefined\color % <color / xcolor>
- \let\tabu@color \color
- \def\tabu@leavevmodecolor ##1{%
- \def\tabu@leavevmodecolor {\leavevmode ##1}%
- }\expandafter\tabu@leavevmodecolor\expandafter{\color}%
- \else
- \let\tabu@color \tabu@nocolor
- \let\tabu@leavevmodecolor \@firstofone \fi
- \tabu@latextwoe
- \ifdefined\@raggedtwoe@everyselectfont % <ragged2e>
- \tabu@raggedtwoe
- \else
- \let\tabu@cell@L \tabu@cell@l
- \let\tabu@cell@R \tabu@cell@r
- \let\tabu@cell@C \tabu@cell@c
- \let\tabu@cell@J \tabu@cell@j \fi
- \expandafter\in@ \expandafter\@arrayright \expandafter{\endarray}%
- \ifin@ \let\tabu@endarray \endarray
- \else \tabu@fix@arrayright \fi% <fix for colortbl & arydshln (delarray)>
- \everyrow{}%
-}% \tabu@AtBeginDocument
-\def\tabu@warn@cellspace{%
- \PackageWarning{tabu}{%
- Package cellspace has some limitations
- \MessageBreak And redefines some macros of array.sty.
- \MessageBreak Please use \string\tabulinesep\space to control
- \MessageBreak vertical spacing of lines inside tabu environment}%
-}% \tabu@warn@cellspace
-%% tabu Package initialisation
-\tabuscantokensfalse
-\let\tabu@arc@G \relax
-\let\tabu@drsc@G \relax
-\let\tabu@evr@G \@empty
-\let\tabu@rc@G \@empty
-\def\tabu@ls@G {\tabu@linestyle@}%
-\let\tabu@@rowfontreset \@empty % <init>
-\let\tabu@@celllalign \@empty
-\let\tabu@@cellralign \@empty
-\let\tabu@@cellleft \@empty
-\let\tabu@@cellright \@empty
-\def\tabu@naturalXmin {\z@}
-\def\tabu@naturalXmax {\z@}
-\let\tabu@rowfontreset \@empty
-\def\tabulineon {4pt}\let\tabulineoff \tabulineon
-\tabu@everyrowtrue
-\ifdefined\pdfelapsedtime % <pdfTeX>
- \def\tabu@pdftimer {\xdef\tabu@starttime{\the\pdfelapsedtime}}%
-\else \let\tabu@pdftimer \relax \let\tabu@message@etime \relax
-\fi
-\tracingtabu=\z@
-\newtabulinestyle {=\maxdimen}% creates the 'factory' settings \tabu@linestyle@
-\tabulinestyle{}
-\taburowcolors{}
-\let\tabudefaulttarget \linewidth
-\ProcessOptions* % \ProcessOptions* is quicker !
-\endinput
-%%
-%% End of file `tabu.sty'.
+%%
+%% This is file `tabu.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% tabu.dtx (with options: `package')
+%%
+%% This is a generated file.
+%% Copyright (FC) 2010-2011 - lppl
+%%
+%% tabu : 2011/02/26 v2.8 - tabu : Flexible LaTeX tabulars
+%%
+%% **********************************************************************************************
+%% \begin{tabu} { preamble } => default target: \linewidth or \linegoal
+%% \begin{tabu} to <dimen>{ preamble } => target specified
+%% \begin{tabu} spread <dimen>{ preamble } => target relative to the ``natural width''
+%%
+%% tabu works in text and in math modes.
+%%
+%% X columns: automatic width adjustment + horizontal and vertical alignment
+%% \begin{tabu} { X[4c] X[1c] X[-2ml] }
+%%
+%% Horizontal lines and / or leaders:
+%% \hline\hline => double horizontal line
+%% \firsthline\hline => for nested tabulars
+%% \lasthline\hline => for nested tabulars
+%% \tabucline[line spec]{column-column} => ``funny'' lines (dash/leader)
+%% Automatic lines / leaders :
+%% \everyrow{\hline\hline}
+%%
+%% Vertical lines and / or leaders:
+%% \begin{tabu} { |[3pt red] X[4c] X[1c] X[-2ml] |[3pt blue] }
+%% \begin{tabu} { |[3pt red] X[4c] X[1c] X[-2ml] |[3pt on 2pt off 4pt blue] }
+%%
+%% Fixed vertical spacing adjustment:
+%% \extrarowheight=<dimen> \extrarowdepth=<dimen>
+%% or: \extrarowsep=<dimen> => may be prefixed by \global
+%%
+%% Dynamic vertical spacing adjustment:
+%% \abovetabulinesep=<dimen> \belowtabulinesep=<dimen>
+%% or: \tabulinesep=<dimen> => may be prefixed by \global
+%%
+%% delarray.sty shortcuts: in math and text modes
+%% \begin{tabu} .... \({ preamble }\)
+%%
+%% Algorithms reports:
+%% \tracingtabu=1 \tracingtabu=2
+%%
+%% **********************************************************************************************
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either
+%% version 1.3 of this license or (at your option) any later
+%% version. The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%%
+%% This work consists of the main source file tabu.dtx
+%% and the derived files
+%% tabu.sty, tabu.pdf, tabu.ins
+%%
+%% tabu : Flexible LaTeX tabulars
+%% lppl copyright 2010-2011 by FC <florent.chervet@free.fr>
+%%
+
+\NeedsTeXFormat{LaTeX2e}[2005/12/01]
+\ProvidesPackage{tabu_doxygen}[2011/02/26 v2.8 - flexible LaTeX tabulars (FC), frozen version for doxygen]
+\RequirePackage{array}[2008/09/09]
+\RequirePackage{varwidth}[2009/03/30]
+\AtEndOfPackage{\tabu@AtEnd \let\tabu@AtEnd \@undefined}
+\let\tabu@AtEnd\@empty
+\def\TMP@EnsureCode#1={%
+ \edef\tabu@AtEnd{\tabu@AtEnd
+ \catcode#1 \the\catcode#1}%
+ \catcode#1=%
+}% \TMP@EnsureCode
+\TMP@EnsureCode 33 = 12 % !
+\TMP@EnsureCode 58 = 12 % : (for siunitx)
+\TMP@EnsureCode124 = 12 % |
+\TMP@EnsureCode 36 = 3 % $ = math shift
+\TMP@EnsureCode 38 = 4 % & = tab alignment character
+\TMP@EnsureCode 32 = 10 % space
+\TMP@EnsureCode 94 = 7 % ^
+\TMP@EnsureCode 95 = 8 % _
+%% Constants --------------------------------------------------------
+\newcount \c@taburow \def\thetaburow {\number\c@taburow}
+\newcount \tabu@nbcols
+\newcount \tabu@cnt
+\newcount \tabu@Xcol
+\let\tabu@start \@tempcnta
+\let\tabu@stop \@tempcntb
+\newcount \tabu@alloc \tabu@alloc=\m@ne
+\newcount \tabu@nested
+\def\tabu@alloc@{\global\advance\tabu@alloc \@ne \tabu@nested\tabu@alloc}
+\newdimen \tabu@target
+\newdimen \tabu@spreadtarget
+\newdimen \tabu@naturalX
+\newdimen \tabucolX
+\let\tabu@DELTA \@tempdimc
+\let\tabu@thick \@tempdima
+\let\tabu@on \@tempdimb
+\let\tabu@off \@tempdimc
+\newdimen \tabu@Xsum
+\newdimen \extrarowdepth
+\newdimen \abovetabulinesep
+\newdimen \belowtabulinesep
+\newdimen \tabustrutrule \tabustrutrule \z@
+\newtoks \tabu@thebody
+\newtoks \tabu@footnotes
+\newsavebox \tabu@box
+\newsavebox \tabu@arstrutbox
+\newsavebox \tabu@hleads
+\newsavebox \tabu@vleads
+\newif \iftabu@colortbl
+\newif \iftabu@siunitx
+\newif \iftabu@measuring
+\newif \iftabu@spread
+\newif \iftabu@negcoef
+\newif \iftabu@everyrow
+\def\tabu@everyrowtrue {\global\let\iftabu@everyrow \iftrue}
+\def\tabu@everyrowfalse{\global\let\iftabu@everyrow \iffalse}
+\newif \iftabu@long
+\newif \iftabuscantokens
+\def\tabu@rescan {\tabu@verbatim \scantokens }
+%% Utilities (for internal usage) -----------------------------------
+\def\tabu@gobblespace #1 {#1}
+\def\tabu@gobbletoken #1#2{#1}
+\def\tabu@gobbleX{\futurelet\@let@token \tabu@gobblex}
+\def\tabu@gobblex{\if ^^J\noexpand\@let@token \expandafter\@gobble
+ \else\ifx \@sptoken\@let@token
+ \expandafter\tabu@gobblespace\expandafter\tabu@gobbleX
+ \fi\fi
+}% \tabu@gobblex
+\def\tabu@X{^^J}
+{\obeyspaces
+\global\let\tabu@spxiii= % saves an active space (for \ifx)
+\gdef\tabu@@spxiii{ }}
+\def\tabu@ifenvir {% only for \multicolumn
+ \expandafter\tabu@if@nvir\csname\@currenvir\endcsname
+}% \tabu@ifenvir
+\def\tabu@if@nvir #1{\csname @\ifx\tabu#1first\else
+ \ifx\longtabu#1first\else
+ second\fi\fi oftwo\endcsname
+}% \tabu@ifenvir
+\def\tabu@modulo #1#2{\numexpr\ifnum\numexpr#1=\z@ 0\else #1-(#1-(#2-1)/2)/(#2)*(#2)\fi}
+{\catcode`\&=3
+\gdef\tabu@strtrim #1{% #1 = control sequence to trim
+ \ifodd 1\ifx #1\@empty \else \ifx #1\space \else 0\fi \fi
+ \let\tabu@c@l@r \@empty \let#1\@empty
+ \else \expandafter \tabu@trimspaces #1&#1\@nnil
+ \fi
+}% \tabu@strtrim
+\gdef\tabu@trimspaces #1&#2\@nnil{\let\tabu@c@l@r=#2\tabu@firstspace .#1& &#2}%
+\gdef\tabu@firstspace #1#2#3 &{\tabu@lastspace #2#3&}
+\gdef\tabu@lastspace #1&#2&#3{\def #3{#1}%
+ \ifx #3\tabu@c@l@r \def\tabu@c@l@r{\protect\color{#1}}\expandafter\remove@to@nnil \fi
+ \tabu@trimspaces #1&#3\@nnil}
+}% \catcode
+\def\tabu@sanitizearg #1#2{{%
+ \csname \ifcsname if@safe@actives\endcsname % <babel>
+ @safe@activestrue\else
+ relax\fi \endcsname
+ \edef#2{#1}\tabu@strtrim#2\@onelevel@sanitize#2%
+ \expandafter}\expandafter\def\expandafter#2\expandafter{#2}%
+}% \tabu@sanitizearg
+\def\tabu@textbar #1{\begingroup \endlinechar\m@ne \scantokens{\def\:{|}}%
+ \expandafter\endgroup \expandafter#1\:% !!! semi simple group !!!
+}% \tabu@textbar
+\def\tabu@everyrow@bgroup{\iftabu@everyrow \begingroup \else \noalign{\ifnum0=`}\fi \fi}
+\def\tabu@everyrow@egroup{%
+ \iftabu@everyrow \expandafter \endgroup \the\toks@
+ \else \ifnum0=`{\fi}%
+ \fi
+}% \tabu@everyrow@egroup
+\def\tabu@arstrut {\global\setbox\@arstrutbox \hbox{\vrule
+ height \arraystretch \dimexpr\ht\strutbox+\extrarowheight
+ depth \arraystretch \dimexpr\dp\strutbox+\extrarowdepth
+ width \z@}%
+}% \tabu@arstrut
+\def\tabu@rearstrut {%
+ \@tempdima \arraystretch\dimexpr\ht\strutbox+\extrarowheight \relax
+ \@tempdimb \arraystretch\dimexpr\dp\strutbox+\extrarowdepth \relax
+ \ifodd 1\ifdim \ht\@arstrutbox=\@tempdima
+ \ifdim \dp\@arstrutbox=\@tempdimb 0 \fi\fi
+ \tabu@mkarstrut
+ \fi
+}% \tabu@rearstrut
+\def\tabu@@DBG #1{\ifdim\tabustrutrule>\z@ \color{#1}\fi}
+\def\tabu@DBG@arstrut {\global\setbox\@arstrutbox
+ \hbox to\z@{\hbox to\z@{\hss
+ {\tabu@DBG{cyan}\vrule
+ height \arraystretch \dimexpr\ht\strutbox+\extrarowheight
+ depth \z@
+ width \tabustrutrule}\kern-\tabustrutrule
+ {\tabu@DBG{pink}\vrule
+ height \z@
+ depth \arraystretch \dimexpr\dp\strutbox+\extrarowdepth
+ width \tabustrutrule}}}%
+}% \tabu@DBG@arstrut
+\def\tabu@save@decl{\toks\count@ \expandafter{\the\toks\expandafter\count@
+ \@nextchar}}%
+\def\tabu@savedecl{\ifcat$\d@llarend\else
+ \let\save@decl \tabu@save@decl \fi % no inversion of tokens in text mode
+}% \tabu@savedecl
+\def\tabu@finalstrut #1{\unskip\ifhmode\nobreak\fi\vrule height\z@ depth\z@ width\z@}
+\newcommand*\tabuDisableCommands {\g@addto@macro\tabu@trialh@@k }
+\let\tabu@trialh@@k \@empty
+\def\tabu@nowrite #1#{{\afterassignment}\toks@}
+\let\tabu@write\write
+\let\tabu@immediate\immediate
+\def\tabu@WRITE{\begingroup
+ \def\immediate\write{\aftergroup\endgroup
+ \tabu@immediate\tabu@write}%
+}% \tabu@WRITE
+\expandafter\def\expandafter\tabu@GenericError\expandafter{%
+ \expandafter\tabu@WRITE\GenericError}
+\def\tabu@warn{\tabu@WRITE\PackageWarning{tabu}}
+\def\tabu@noxfootnote [#1]{\@gobble}
+\def\tabu@nocolor #1#{\@gobble}
+\newcommand*\tabu@norowcolor[2][]{}
+\def\tabu@maybesiunitx #1{\def\tabu@temp{#1}%
+ \futurelet\@let@token \tabu@m@ybesiunitx}
+\def\tabu@m@ybesiunitx #1{\def\tabu@m@ybesiunitx {%
+ \ifx #1\@let@token \let\tabu@cellleft \@empty \let\tabu@cellright \@empty \fi
+ \tabu@temp}% \tabu@m@ybesiunitx
+}\expandafter\tabu@m@ybesiunitx \csname siunitx_table_collect_begin:Nn\endcsname
+\def\tabu@celllalign@def #1{\def\tabu@celllalign{\tabu@maybesiunitx{#1}}}%
+%% Fixed vertical spacing adjustment: \extrarowsep ------------------
+\newcommand*\extrarowsep{\edef\tabu@C@extra{\the\numexpr\tabu@C@extra+1}%
+ \iftabu@everyrow \aftergroup\tabu@Gextra
+ \else \aftergroup\tabu@n@Gextra
+ \fi
+ \@ifnextchar={\tabu@gobbletoken\tabu@extra} \tabu@extra
+}% \extrarowsep
+\def\tabu@extra {\@ifnextchar_%
+ {\tabu@gobbletoken{\tabu@setextra\extrarowheight \extrarowdepth}}
+ {\ifx ^\@let@token \def\tabu@temp{%
+ \tabu@gobbletoken{\tabu@setextra\extrarowdepth \extrarowheight}}%
+ \else \let\tabu@temp \@empty
+ \afterassignment \tabu@setextrasep \extrarowdepth
+ \fi \tabu@temp}%
+}% \tabu@extra
+\def\tabu@setextra #1#2{\def\tabu@temp{\tabu@extr@#1#2}\afterassignment\tabu@temp#2}
+\def\tabu@extr@ #1#2{\@ifnextchar^%
+ {\tabu@gobbletoken{\tabu@setextra\extrarowdepth \extrarowheight}}
+ {\ifx _\@let@token \def\tabu@temp{%
+ \tabu@gobbletoken{\tabu@setextra\extrarowheight \extrarowdepth}}%
+ \else \let\tabu@temp \@empty
+ \tabu@Gsave \tabu@G@extra \tabu@C@extra \extrarowheight \extrarowdepth
+ \fi \tabu@temp}%
+}% \tabu@extr@
+\def\tabu@setextrasep {\extrarowheight=\extrarowdepth
+ \tabu@Gsave \tabu@G@extra \tabu@C@extra \extrarowheight \extrarowdepth
+}% \tabu@setextrasep
+\def\tabu@Gextra{\ifx \tabu@G@extra\@empty \else {\tabu@Rextra}\fi}
+\def\tabu@n@Gextra{\ifx \tabu@G@extra\@empty \else \noalign{\tabu@Rextra}\fi}
+\def\tabu@Rextra{\tabu@Grestore \tabu@G@extra \tabu@C@extra}
+\let\tabu@C@extra \z@
+\let\tabu@G@extra \@empty
+%% Dynamic vertical spacing adjustment: \tabulinesep ----------------
+\newcommand*\tabulinesep{\edef\tabu@C@linesep{\the\numexpr\tabu@C@linesep+1}%
+ \iftabu@everyrow \aftergroup\tabu@Glinesep
+ \else \aftergroup\tabu@n@Glinesep
+ \fi
+ \@ifnextchar={\tabu@gobbletoken\tabu@linesep} \tabu@linesep
+}% \tabulinesep
+\def\tabu@linesep {\@ifnextchar_%
+ {\tabu@gobbletoken{\tabu@setsep\abovetabulinesep \belowtabulinesep}}
+ {\ifx ^\@let@token \def\tabu@temp{%
+ \tabu@gobbletoken{\tabu@setsep\belowtabulinesep \abovetabulinesep}}%
+ \else \let\tabu@temp \@empty
+ \afterassignment \tabu@setlinesep \abovetabulinesep
+ \fi \tabu@temp}%
+}% \tabu@linesep
+\def\tabu@setsep #1#2{\def\tabu@temp{\tabu@sets@p#1#2}\afterassignment\tabu@temp#2}
+\def\tabu@sets@p #1#2{\@ifnextchar^%
+ {\tabu@gobbletoken{\tabu@setsep\belowtabulinesep \abovetabulinesep}}
+ {\ifx _\@let@token \def\tabu@temp{%
+ \tabu@gobbletoken{\tabu@setsep\abovetabulinesep \belowtabulinesep}}%
+ \else \let\tabu@temp \@empty
+ \tabu@Gsave \tabu@G@linesep \tabu@C@linesep \abovetabulinesep \belowtabulinesep
+ \fi \tabu@temp}%
+}% \tabu@sets@p
+\def\tabu@setlinesep {\belowtabulinesep=\abovetabulinesep
+ \tabu@Gsave \tabu@G@linesep \tabu@C@linesep \abovetabulinesep \belowtabulinesep
+}% \tabu@setlinesep
+\def\tabu@Glinesep{\ifx \tabu@G@linesep\@empty \else {\tabu@Rlinesep}\fi}
+\def\tabu@n@Glinesep{\ifx \tabu@G@linesep\@empty \else \noalign{\tabu@Rlinesep}\fi}
+\def\tabu@Rlinesep{\tabu@Grestore \tabu@G@linesep \tabu@C@linesep}
+\let\tabu@C@linesep \z@
+\let\tabu@G@linesep \@empty
+%% \global\extrarowsep and \global\tabulinesep -------------------
+\def\tabu@Gsave #1#2#3#4{\xdef#1{#1%
+ \toks#2{\toks\the\currentgrouplevel{\global#3\the#3\global#4\the#4}}}%
+}% \tabu@Gsave
+\def\tabu@Grestore#1#2{%
+ \toks#2{}#1\toks\currentgrouplevel\expandafter{\expandafter}\the\toks#2\relax
+ \ifcat$\the\toks\currentgrouplevel$\else
+ \global\let#1\@empty \global\let#2\z@
+ \the\toks\currentgrouplevel
+ \fi
+}% \tabu@Grestore
+%% Setting code for every row ---------------------------------------
+\newcommand*\everyrow{\tabu@everyrow@bgroup
+ \tabu@start \z@ \tabu@stop \z@ \tabu@evrstartstop
+}% \everyrow
+\def\tabu@evrstartstop {\@ifnextchar^%
+ {\afterassignment \tabu@evrstartstop \tabu@stop=}%
+ {\ifx ^\@let@token
+ \afterassignment\tabu@evrstartstop \tabu@start=%
+ \else \afterassignment\tabu@everyr@w \toks@
+ \fi}%
+}% \tabu@evrstartstop
+\def\tabu@everyr@w {%
+ \xdef\tabu@everyrow{%
+ \noexpand\tabu@everyrowfalse
+ \let\noalign \relax
+ \noexpand\tabu@rowfontreset
+ \iftabu@colortbl \noexpand\tabu@rc@ \fi % \taburowcolors
+ \let\noexpand\tabu@docline \noexpand\tabu@docline@evr
+ \the\toks@
+ \noexpand\tabu@evrh@@k
+ \noexpand\tabu@rearstrut
+ \global\advance\c@taburow \@ne}%
+ \iftabu@everyrow \toks@\expandafter
+ {\expandafter\def\expandafter\tabu@evr@L\expandafter{\the\toks@}\ignorespaces}%
+ \else \xdef\tabu@evr@G{\the\toks@}%
+ \fi
+ \tabu@everyrow@egroup
+}% \tabu@everyr@w
+\def\tabu@evr {\def\tabu@evrh@@k} % for internal use only
+\tabu@evr{}
+%% line style and leaders -------------------------------------------
+\newcommand*\newtabulinestyle [1]{%
+ {\@for \@tempa :=#1\do{\expandafter\tabu@newlinestyle \@tempa==\@nil}}%
+}% \newtabulinestyle
+\def\tabu@newlinestyle #1=#2=#3\@nil{\tabu@getline {#2}%
+ \tabu@sanitizearg {#1}\@tempa
+ \ifodd 1\ifx \@tempa\@empty \ifdefined\tabu@linestyle@ 0 \fi\fi
+ \global\expandafter\let
+ \csname tabu@linestyle@\@tempa \endcsname =\tabu@thestyle \fi
+}% \tabu@newlinestyle
+\newcommand*\tabulinestyle [1]{\tabu@everyrow@bgroup \tabu@getline{#1}%
+ \iftabu@everyrow
+ \toks@\expandafter{\expandafter \def \expandafter
+ \tabu@ls@L\expandafter{\tabu@thestyle}\ignorespaces}%
+ \gdef\tabu@ls@{\tabu@ls@L}%
+ \else
+ \global\let\tabu@ls@G \tabu@thestyle
+ \gdef\tabu@ls@{\tabu@ls@G}%
+ \fi
+ \tabu@everyrow@egroup
+}% \tabulinestyle
+\newcommand*\taburulecolor{\tabu@everyrow@bgroup \tabu@textbar \tabu@rulecolor}
+\def\tabu@rulecolor #1{\toks@{}%
+ \def\tabu@temp #1##1#1{\tabu@ruledrsc{##1}}\@ifnextchar #1%
+ \tabu@temp
+ \tabu@rulearc
+}% \tabu@rulecolor
+\def\tabu@ruledrsc #1{\edef\tabu@temp{#1}\tabu@strtrim\tabu@temp
+ \ifx \tabu@temp\@empty \def\tabu@temp{\tabu@rule@drsc@ {}{}}%
+ \else \edef\tabu@temp{\noexpand\tabu@rule@drsc@ {}{\tabu@temp}}%
+ \fi
+ \tabu@temp
+}% \tabu@ruledrsc@
+\def\tabu@ruledrsc@ #1#{\tabu@rule@drsc@ {#1}}
+\def\tabu@rule@drsc@ #1#2{%
+ \iftabu@everyrow
+ \ifx \\#1#2\\\toks@{\let\CT@drsc@ \relax}%
+ \else \toks@{\def\CT@drsc@{\color #1{#2}}}%
+ \fi
+ \else
+ \ifx \\#1#2\\\global\let\CT@drsc@ \relax
+ \else \gdef\CT@drsc@{\color #1{#2}}%
+ \fi
+ \fi
+ \tabu@rulearc
+}% \tabu@rule@drsc@
+\def\tabu@rulearc #1#{\tabu@rule@arc@ {#1}}
+\def\tabu@rule@arc@ #1#2{%
+ \iftabu@everyrow
+ \ifx \\#1#2\\\toks@\expandafter{\the\toks@ \def\CT@arc@{}}%
+ \else \toks@\expandafter{\the\toks@ \def\CT@arc@{\color #1{#2}}}%
+ \fi
+ \toks@\expandafter{\the\toks@
+ \let\tabu@arc@L \CT@arc@
+ \let\tabu@drsc@L \CT@drsc@
+ \ignorespaces}%
+ \else
+ \ifx \\#1#2\\\gdef\CT@arc@{}%
+ \else \gdef\CT@arc@{\color #1{#2}}%
+ \fi
+ \global\let\tabu@arc@G \CT@arc@
+ \global\let\tabu@drsc@G \CT@drsc@
+ \fi
+ \tabu@everyrow@egroup
+}% \tabu@rule@arc@
+\def\taburowcolors {\tabu@everyrow@bgroup \@testopt \tabu@rowcolors 1}
+\def\tabu@rowcolors [#1]#2#{\tabu@rowc@lors{#1}{#2}}
+\def\tabu@rowc@lors #1#2#3{%
+ \toks@{}\@defaultunits \count@ =\number0#2\relax \@nnil
+ \@defaultunits \tabu@start =\number0#1\relax \@nnil
+ \ifnum \count@<\tw@ \count@=\tw@ \fi
+ \advance\tabu@start \m@ne
+ \ifnum \tabu@start<\z@ \tabu@start \z@ \fi
+ \tabu@rowcolorseries #3\in@..\in@ \@nnil
+}% \tabu@rowcolors
+\def\tabu@rowcolorseries #1..#2\in@ #3\@nnil {%
+ \ifx \in@#1\relax
+ \iftabu@everyrow \toks@{\def\tabu@rc@{}\let\tabu@rc@L \tabu@rc@}%
+ \else \gdef\tabu@rc@{}\global\let\tabu@rc@G \tabu@rc@
+ \fi
+ \else
+ \ifx \\#2\\\tabu@rowcolorserieserror \fi
+ \tabu@sanitizearg{#1}\tabu@temp
+ \tabu@sanitizearg{#2}\@tempa
+ \advance\count@ \m@ne
+ \iftabu@everyrow
+ \def\tabu@rc@ ##1##2##3##4{\def\tabu@rc@{%
+ \ifnum ##2=\c@taburow
+ \definecolorseries{tabu@rcseries@\the\tabu@nested}{rgb}{last}{##3}{##4}\fi
+ \ifnum \c@taburow<##2 \else
+ \ifnum \tabu@modulo {\c@taburow-##2}{##1+1}=\z@
+ \resetcolorseries[{##1}]{tabu@rcseries@\the\tabu@nested}\fi
+ \xglobal\colorlet{tabu@rc@\the\tabu@nested}{tabu@rcseries@\the\tabu@nested!!+}%
+ \rowcolor{tabu@rc@\the\tabu@nested}\fi}%
+ }\edef\x{\noexpand\tabu@rc@ {\the\count@}
+ {\the\tabu@start}
+ {\tabu@temp}
+ {\@tempa}%
+ }\x
+ \toks@\expandafter{\expandafter\def\expandafter\tabu@rc@\expandafter{\tabu@rc@}}%
+ \toks@\expandafter{\the\toks@ \let\tabu@rc@L \tabu@rc@ \ignorespaces}%
+ \else % inside \noalign
+ \definecolorseries{tabu@rcseries@\the\tabu@nested}{rgb}{last}{\tabu@temp}{\@tempa}%
+ \expandafter\resetcolorseries\expandafter[\the\count@]{tabu@rcseries@\the\tabu@nested}%
+ \xglobal\colorlet{tabu@rc@\the\tabu@nested}{tabu@rcseries@\the\tabu@nested!!+}%
+ \let\noalign \relax \rowcolor{tabu@rc@\the\tabu@nested}%
+ \def\tabu@rc@ ##1##2{\gdef\tabu@rc@{%
+ \ifnum \tabu@modulo {\c@taburow-##2}{##1+1}=\@ne
+ \resetcolorseries[{##1}]{tabu@rcseries@\the\tabu@nested}\fi
+ \xglobal\colorlet{tabu@rc@\the\tabu@nested}{tabu@rcseries@\the\tabu@nested!!+}%
+ \rowcolor{tabu@rc@\the\tabu@nested}}%
+ }\edef\x{\noexpand\tabu@rc@{\the\count@}{\the\c@taburow}}\x
+ \global\let\tabu@rc@G \tabu@rc@
+ \fi
+ \fi
+ \tabu@everyrow@egroup
+}% \tabu@rowcolorseries
+\tabuDisableCommands {\let\tabu@rc@ \@empty }
+\def\tabu@rowcolorserieserror {\PackageError{tabu}
+ {Invalid syntax for \string\taburowcolors
+ \MessageBreak Please look at the documentation!}\@ehd
+}% \tabu@rowcolorserieserror
+\newcommand*\tabureset {%
+ \tabulinesep=\z@ \extrarowsep=\z@ \extratabsurround=\z@
+ \tabulinestyle{}\everyrow{}\taburulecolor||{}\taburowcolors{}%
+}% \tabureset
+%% Parsing the line styles ------------------------------------------
+\def\tabu@getline #1{\begingroup
+ \csname \ifcsname if@safe@actives\endcsname % <babel>
+ @safe@activestrue\else
+ relax\fi \endcsname
+ \edef\tabu@temp{#1}\tabu@sanitizearg{#1}\@tempa
+ \let\tabu@thestyle \relax
+ \ifcsname tabu@linestyle@\@tempa \endcsname
+ \edef\tabu@thestyle{\endgroup
+ \def\tabu@thestyle{\expandafter\noexpand
+ \csname tabu@linestyle@\@tempa\endcsname}%
+ }\tabu@thestyle
+ \else \expandafter\tabu@definestyle \tabu@temp \@nil
+ \fi
+}% \tabu@getline
+\def\tabu@definestyle #1#2\@nil {\endlinechar \m@ne \makeatletter
+ \tabu@thick \maxdimen \tabu@on \maxdimen \tabu@off \maxdimen
+ \let\tabu@c@lon \@undefined \let\tabu@c@loff \@undefined
+ \ifodd 1\ifcat .#1\else\ifcat\relax #1\else 0\fi\fi % catcode 12 or non expandable cs
+ \def\tabu@temp{\tabu@getparam{thick}}%
+ \else \def\tabu@temp{\tabu@getparam{thick}\maxdimen}%
+ \fi
+ {%
+ \let\tabu@ \relax
+ \def\:{\obeyspaces \tabu@oXIII \tabu@commaXIII \edef\:}% (space active \: happy ;-))
+ \scantokens{\:{\tabu@temp #1#2 \tabu@\tabu@}}%
+ \expandafter}\expandafter
+ \def\expandafter\:\expandafter{\:}% line spec rewritten now ;-)
+ \def\;{\def\:}%
+ \scantokens\expandafter{\expandafter\;\expandafter{\:}}% space is now inactive (catcode 10)
+ \let\tabu@ \tabu@getcolor \:% all arguments are ready now ;-)
+ \ifdefined\tabu@c@lon \else \let\tabu@c@lon\@empty \fi
+ \ifx \tabu@c@lon\@empty \def\tabu@c@lon{\CT@arc@}\fi
+ \ifdefined\tabu@c@loff \else \let\tabu@c@loff \@empty \fi
+ \ifdim \tabu@on=\maxdimen \ifdim \tabu@off<\maxdimen
+ \tabu@on \tabulineon \fi\fi
+ \ifdim \tabu@off=\maxdimen \ifdim \tabu@on<\maxdimen
+ \tabu@off \tabulineoff \fi\fi
+ \ifodd 1\ifdim \tabu@off=\maxdimen \ifdim \tabu@on=\maxdimen 0 \fi\fi
+ \in@true % <leaders>
+ \else \in@false % <rule>
+ \fi
+ \ifdim\tabu@thick=\maxdimen \def\tabu@thick{\arrayrulewidth}%
+ \else \edef\tabu@thick{\the\tabu@thick}%
+ \fi
+ \edef \tabu@thestyle ##1##2{\endgroup
+ \def\tabu@thestyle{%
+ \ifin@ \noexpand\tabu@leadersstyle {\tabu@thick}
+ {\the\tabu@on}{##1}
+ {\the\tabu@off}{##2}%
+ \else \noexpand\tabu@rulesstyle
+ {##1\vrule width \tabu@thick}%
+ {##1\leaders \hrule height \tabu@thick \hfil}%
+ \fi}%
+ }\expandafter \expandafter
+ \expandafter \tabu@thestyle \expandafter
+ \expandafter \expandafter
+ {\expandafter\tabu@c@lon\expandafter}\expandafter{\tabu@c@loff}%
+}% \tabu@definestyle
+{\catcode`\O=\active \lccode`\O=`\o \catcode`\,=\active
+ \lowercase{\gdef\tabu@oXIII {\catcode`\o=\active \let O=\tabu@oxiii}}
+ \gdef\tabu@commaXIII {\catcode`\,=\active \let ,=\space}
+}% \catcode
+\def\tabu@oxiii #1{%
+ \ifcase \ifx n#1\z@ \else
+ \ifx f#1\@ne\else
+ \tw@ \fi\fi
+ \expandafter\tabu@onxiii
+ \or \expandafter\tabu@ofxiii
+ \else o%
+ \fi#1}%
+\def\tabu@onxiii #1#2{%
+ \ifcase \ifx !#2\tw@ \else
+ \ifcat.\noexpand#2\z@ \else
+ \ifx \tabu@spxiii#2\@ne\else
+ \tw@ \fi\fi\fi
+ \tabu@getparam{on}#2\expandafter\@gobble
+ \or \expandafter\tabu@onxiii % (space is active)
+ \else o\expandafter\@firstofone
+ \fi{#1#2}}%
+\def\tabu@ofxiii #1#2{%
+ \ifx #2f\expandafter\tabu@offxiii
+ \else o\expandafter\@firstofone
+ \fi{#1#2}}
+\def\tabu@offxiii #1#2{%
+ \ifcase \ifx !#2\tw@ \else
+ \ifcat.\noexpand#2\z@ \else
+ \ifx\tabu@spxiii#2\@ne \else
+ \tw@ \fi\fi\fi
+ \tabu@getparam{off}#2\expandafter\@gobble
+ \or \expandafter\tabu@offxiii % (space is active)
+ \else o\expandafter\@firstofone
+ \fi{#1#2}}
+\def\tabu@getparam #1{\tabu@ \csname tabu@#1\endcsname=}
+\def\tabu@getcolor #1{% \tabu@ <- \tabu@getcolor after \edef
+ \ifx \tabu@#1\else % no more spec
+ \let\tabu@theparam=#1\afterassignment \tabu@getc@l@r #1\fi
+}% \tabu@getcolor
+\def\tabu@getc@l@r #1\tabu@ {%
+ \def\tabu@temp{#1}\tabu@strtrim \tabu@temp
+ \ifx \tabu@temp\@empty
+ \else%\ifcsname \string\color@\tabu@temp \endcsname % if the color exists
+ \ifx \tabu@theparam \tabu@off \let\tabu@c@loff \tabu@c@l@r
+ \else \let\tabu@c@lon \tabu@c@l@r
+ \fi
+ %\else \tabu@warncolour{\tabu@temp}%
+ \fi%\fi
+ \tabu@ % next spec
+}% \tabu@getc@l@r
+\def\tabu@warncolour #1{\PackageWarning{tabu}
+ {Color #1 is not defined. Default color used}%
+}% \tabu@warncolour
+\def\tabu@leadersstyle #1#2#3#4#5{\def\tabu@leaders{{#1}{#2}{#3}{#4}{#5}}%
+ \ifx \tabu@leaders\tabu@leaders@G \else
+ \tabu@LEADERS{#1}{#2}{#3}{#4}{#5}\fi
+}% \tabu@leadersstyle
+\def\tabu@rulesstyle #1#2{\let\tabu@leaders \@undefined
+ \gdef\tabu@thevrule{#1}\gdef\tabu@thehrule{#2}%
+}% \tabu@rulesstyle
+%% The leaders boxes ------------------------------------------------
+\def\tabu@LEADERS #1#2#3#4#5{%% width, dash, dash color, gap, gap color
+ {\let\color \tabu@color % => during trials -> \color = \tabu@nocolor
+ {% % but the leaders boxes should have colors !
+ \def\@therule{\vrule}\def\@thick{height}\def\@length{width}%
+ \def\@box{\hbox}\def\@unbox{\unhbox}\def\@elt{\wd}%
+ \def\@skip{\hskip}\def\@ss{\hss}\def\tabu@leads{\tabu@hleads}%
+ \tabu@l@@d@rs {#1}{#2}{#3}{#4}{#5}%
+ \global\let\tabu@thehleaders \tabu@theleaders
+ }%
+ {%
+ \def\@therule{\hrule}\def\@thick{width}\def\@length{height}%
+ \def\@box{\vbox}\def\@unbox{\unvbox}\def\@elt{\ht}%
+ \def\@skip{\vskip}\def\@ss{\vss}\def\tabu@leads{\tabu@vleads}%
+ \tabu@l@@d@rs {#1}{#2}{#3}{#4}{#5}%
+ \global\let\tabu@thevleaders \tabu@theleaders
+ }%
+ \gdef\tabu@leaders@G{{#1}{#2}{#3}{#4}{#5}}%
+ }%
+}% \tabu@LEADERS
+\def\tabu@therule #1#2{\@therule \@thick#1\@length\dimexpr#2/2 \@depth\z@}
+\def\tabu@l@@d@rs #1#2#3#4#5{%% width, dash, dash color, gap, gap color
+ \global\setbox \tabu@leads=\@box{%
+ {#3\tabu@therule{#1}{#2}}%
+ \ifx\\#5\\\@skip#4\else{#5\tabu@therule{#1}{#4*2}}\fi
+ {#3\tabu@therule{#1}{#2}}}%
+ \global\setbox\tabu@leads=\@box to\@elt\tabu@leads{\@ss
+ {#3\tabu@therule{#1}{#2}}\@unbox\tabu@leads}%
+ \edef\tabu@theleaders ##1{\def\noexpand\tabu@theleaders {%
+ {##1\tabu@therule{#1}{#2}}%
+ \xleaders \copy\tabu@leads \@ss
+ \tabu@therule{0pt}{-#2}{##1\tabu@therule{#1}{#2}}}%
+ }\tabu@theleaders{#3}%
+}% \tabu@l@@d@rs
+%% \tabu \endtabu \tabu* \longtabu \endlongtabu \longtabu* ----------
+\newcommand*\tabu {\tabu@longfalse
+ \ifmmode \def\tabu@ {\array}\def\endtabu {\endarray}%
+ \else \def\tabu@ {\tabu@tabular}\def\endtabu {\endtabular}\fi
+ \expandafter\let\csname tabu*\endcsname \tabu
+ \expandafter\def\csname endtabu*\endcsname{\endtabu}%
+ \tabu@spreadfalse \tabu@negcoeffalse \tabu@settarget
+}% {tabu}
+\let\tabu@tabular \tabular % <For LyX: some users redefine \tabular...>
+\expandafter\def\csname tabu*\endcsname{\tabuscantokenstrue \tabu}
+\newcommand*\longtabu {\tabu@longtrue
+ \ifmmode\PackageError{tabu}{longtabu not allowed in math mode}\fi
+ \def\tabu@{\longtable}\def\endlongtabu{\endlongtable}%
+ \LTchunksize=\@M
+ \expandafter\let\csname tabu*\endcsname \tabu
+ \expandafter\def\csname endlongtabu*\endcsname{\endlongtabu}%
+ \let\LT@startpbox \tabu@LT@startpbox % \everypar{ array struts }
+ \tabu@spreadfalse \tabu@negcoeffalse \tabu@settarget
+}% {longtabu}
+\expandafter\def\csname longtabu*\endcsname{\tabuscantokenstrue \longtabu}
+\def\tabu@nolongtabu{\PackageError{tabu}
+ {longtabu requires the longtable package}\@ehd}
+%% Read the target and then : \tabular or \@array ------------------
+\def\tabu@settarget {\futurelet\@let@token \tabu@sett@rget }
+\def\tabu@sett@rget {\tabu@target \z@
+ \ifcase \ifx \bgroup\@let@token \z@ \else
+ \ifx \@sptoken\@let@token \@ne \else
+ \if t\@let@token \tw@ \else
+ \if s\@let@token \thr@@\else
+ \z@\fi\fi\fi\fi
+ \expandafter\tabu@begin
+ \or \expandafter\tabu@gobblespace\expandafter\tabu@settarget
+ \or \expandafter\tabu@to
+ \or \expandafter\tabu@spread
+ \fi
+}% \tabu@sett@rget
+\def\tabu@to to{\def\tabu@halignto{to}\tabu@gettarget}
+\def\tabu@spread spread{\tabu@spreadtrue\def\tabu@halignto{spread}\tabu@gettarget}
+\def\tabu@gettarget {\afterassignment\tabu@linegoaltarget \tabu@target }
+\def\tabu@linegoaltarget {\futurelet\tabu@temp \tabu@linegoalt@rget }
+\def\tabu@linegoalt@rget {%
+ \ifx \tabu@temp\LNGL@setlinegoal
+ \LNGL@setlinegoal \expandafter \@firstoftwo \fi % @gobbles \LNGL@setlinegoal
+ \tabu@begin
+}% \tabu@linegoalt@rget
+\def\tabu@begin #1#{%
+ \iftabu@measuring \expandafter\tabu@nestedmeasure \fi
+ \ifdim \tabu@target=\z@ \let\tabu@halignto \@empty
+ \else \edef\tabu@halignto{\tabu@halignto\the\tabu@target}%
+ \fi
+ \@testopt \tabu@tabu@ \tabu@aligndefault #1\@nil
+}% \tabu@begin
+\long\def\tabu@tabu@ [#1]#2\@nil #3{\tabu@setup
+ \def\tabu@align {#1}\def\tabu@savedpream{\NC@find #3}%
+ \tabu@ [\tabu@align ]#2{#3\tabu@rewritefirst }%
+}% \tabu@tabu@
+\def\tabu@nestedmeasure {%
+ \ifodd 1\iftabu@spread \else \ifdim\tabu@target=\z@ \else 0 \fi\fi\relax
+ \tabu@spreadtrue
+ \else \begingroup \iffalse{\fi \ifnum0=`}\fi
+ \toks@{}\def\tabu@stack{b}%
+ \expandafter\tabu@collectbody\expandafter\tabu@quickrule
+ \expandafter\endgroup
+ \fi
+}% \tabu@nestedmeasure
+\def\tabu@quickrule {\indent\vrule height\z@ depth\z@ width\tabu@target}
+%% \tabu@setup \tabu@init \tabu@indent
+\def\tabu@setup{\tabu@alloc@
+ \ifcase \tabu@nested
+ \ifmmode \else \iftabu@spread\else \ifdim\tabu@target=\z@
+ \let\tabu@afterendpar \par
+ \fi\fi\fi
+ \def\tabu@aligndefault{c}\tabu@init \tabu@indent
+ \else % <nested tabu>
+ \def\tabu@aligndefault{t}\let\tabudefaulttarget \linewidth
+ \fi
+ \let\tabu@thetarget \tabudefaulttarget \let\tabu@restored \@undefined
+ \edef\tabu@NC@list{\the\NC@list}\NC@list{\NC@do \tabu@rewritefirst}%
+ \everycr{}\let\@startpbox \tabu@startpbox % for nested tabu inside longtabu...
+ \let\@endpbox \tabu@endpbox % idem " " " " " "
+ \let\@tabarray \tabu@tabarray % idem " " " " " "
+ \tabu@setcleanup \tabu@setreset
+}% \tabu@setup
+\def\tabu@init{\tabu@starttimer \tabu@measuringfalse
+ \edef\tabu@hfuzz {\the\dimexpr\hfuzz+1sp}\global\tabu@footnotes{}%
+ \let\firsthline \tabu@firsthline \let\lasthline \tabu@lasthline
+ \let\firstline \tabu@firstline \let\lastline \tabu@lastline
+ \let\hline \tabu@hline \let\@xhline \tabu@xhline
+ \let\color \tabu@color \let\@arstrutbox \tabu@arstrutbox
+ \iftabu@colortbl\else\let\LT@@hline \tabu@LT@@hline \fi
+ \tabu@trivlist %<restore \\=\@normalcr inside lists>
+ \let\@footnotetext \tabu@footnotetext \let\@xfootnotetext \tabu@xfootnotetext
+ \let\@xfootnote \tabu@xfootnote \let\centering \tabu@centering
+ \let\raggedright \tabu@raggedright \let\raggedleft \tabu@raggedleft
+ \let\tabudecimal \tabu@tabudecimal \let\Centering \tabu@Centering
+ \let\RaggedRight \tabu@RaggedRight \let\RaggedLeft \tabu@RaggedLeft
+ \let\justifying \tabu@justifying \let\rowfont \tabu@rowfont
+ \let\fbox \tabu@fbox \let\color@b@x \tabu@color@b@x
+ \let\tabu@@everycr \everycr \let\tabu@@everypar \everypar
+ \let\tabu@prepnext@tokORI \prepnext@tok\let\prepnext@tok \tabu@prepnext@tok
+ \let\tabu@multicolumnORI\multicolumn \let\multicolumn \tabu@multicolumn
+ \let\tabu@startpbox \@startpbox % for nested tabu inside longtabu pfff !!!
+ \let\tabu@endpbox \@endpbox % idem " " " " " " "
+ \let\tabu@tabarray \@tabarray % idem " " " " " " "
+ \tabu@adl@fix \let\endarray \tabu@endarray % <fix> colortbl & arydshln (delarray)
+ \iftabu@colortbl\CT@everycr\expandafter{\expandafter\iftabu@everyrow \the\CT@everycr \fi}\fi
+}% \tabu@init
+\def\tabu@indent{% correction for indentation
+ \ifdim \parindent>\z@\ifx \linewidth\tabudefaulttarget
+ \everypar\expandafter{%
+ \the\everypar\everypar\expandafter{\the\everypar}%
+ \setbox\z@=\lastbox
+ \ifdim\wd\z@>\z@ \edef\tabu@thetarget
+ {\the\dimexpr -\wd\z@+\tabudefaulttarget}\fi
+ \box\z@}%
+ \fi\fi
+}% \tabu@indent
+\def\tabu@setcleanup {% saves last global assignments
+ \ifodd 1\ifmmode \else \iftabu@long \else 0\fi\fi\relax
+ \def\tabu@aftergroupcleanup{%
+ \def\tabu@aftergroupcleanup{\aftergroup\tabu@cleanup}}%
+ \else
+ \def\tabu@aftergroupcleanup{%
+ \aftergroup\aftergroup\aftergroup\tabu@cleanup
+ \let\tabu@aftergroupcleanup \relax}%
+ \fi
+ \let\tabu@arc@Gsave \tabu@arc@G
+ \let\tabu@arc@G \tabu@arc@L % <init>
+ \let\tabu@drsc@Gsave \tabu@drsc@G
+ \let\tabu@drsc@G \tabu@drsc@L % <init>
+ \let\tabu@ls@Gsave \tabu@ls@G
+ \let\tabu@ls@G \tabu@ls@L % <init>
+ \let\tabu@rc@Gsave \tabu@rc@G
+ \let\tabu@rc@G \tabu@rc@L % <init>
+ \let\tabu@evr@Gsave \tabu@evr@G
+ \let\tabu@evr@G \tabu@evr@L % <init>
+ \let\tabu@celllalign@save \tabu@celllalign
+ \let\tabu@cellralign@save \tabu@cellralign
+ \let\tabu@cellleft@save \tabu@cellleft
+ \let\tabu@cellright@save \tabu@cellright
+ \let\tabu@@celllalign@save \tabu@@celllalign
+ \let\tabu@@cellralign@save \tabu@@cellralign
+ \let\tabu@@cellleft@save \tabu@@cellleft
+ \let\tabu@@cellright@save \tabu@@cellright
+ \let\tabu@rowfontreset@save \tabu@rowfontreset
+ \let\tabu@@rowfontreset@save\tabu@@rowfontreset
+ \let\tabu@rowfontreset \@empty
+ \edef\tabu@alloc@save {\the\tabu@alloc}% restore at \tabu@reset
+ \edef\c@taburow@save {\the\c@taburow}%
+ \edef\tabu@naturalX@save {\the\tabu@naturalX}%
+ \let\tabu@naturalXmin@save \tabu@naturalXmin
+ \let\tabu@naturalXmax@save \tabu@naturalXmax
+ \let\tabu@mkarstrut@save \tabu@mkarstrut
+ \edef\tabu@clarstrut{%
+ \extrarowheight \the\dimexpr \ht\@arstrutbox-\ht\strutbox \relax
+ \extrarowdepth \the\dimexpr \dp\@arstrutbox-\dp\strutbox \relax
+ \let\noexpand\@arraystretch \@ne \noexpand\tabu@rearstrut}%
+}% \tabu@setcleanup
+\def\tabu@cleanup {\begingroup
+ \globaldefs\@ne \tabu@everyrowtrue
+ \let\tabu@arc@G \tabu@arc@Gsave
+ \let\CT@arc@ \tabu@arc@G
+ \let\tabu@drsc@G \tabu@drsc@Gsave
+ \let\CT@drsc@ \tabu@drsc@G
+ \let\tabu@ls@G \tabu@ls@Gsave
+ \let\tabu@ls@ \tabu@ls@G
+ \let\tabu@rc@G \tabu@rc@Gsave
+ \let\tabu@rc@ \tabu@rc@G
+ \let\CT@do@color \relax
+ \let\tabu@evr@G \tabu@evr@Gsave
+ \let\tabu@celllalign \tabu@celllalign@save
+ \let\tabu@cellralign \tabu@cellralign@save
+ \let\tabu@cellleft \tabu@cellleft@save
+ \let\tabu@cellright \tabu@cellright@save
+ \let\tabu@@celllalign \tabu@@celllalign@save
+ \let\tabu@@cellralign \tabu@@cellralign@save
+ \let\tabu@@cellleft \tabu@@cellleft@save
+ \let\tabu@@cellright \tabu@@cellright@save
+ \let\tabu@rowfontreset \tabu@rowfontreset@save
+ \let\tabu@@rowfontreset \tabu@@rowfontreset@save
+ \tabu@naturalX =\tabu@naturalX@save
+ \let\tabu@naturalXmax \tabu@naturalXmax@save
+ \let\tabu@naturalXmin \tabu@naturalXmin@save
+ \let\tabu@mkarstrut \tabu@mkarstrut@save
+ \c@taburow =\c@taburow@save
+ \ifcase \tabu@nested \tabu@alloc \m@ne\fi
+ \endgroup % <end of \globaldefs>
+ \ifcase \tabu@nested
+ \the\tabu@footnotes \global\tabu@footnotes{}%
+ \tabu@afterendpar \tabu@elapsedtime
+ \fi
+ \tabu@clarstrut
+ \everyrow\expandafter {\tabu@evr@G}%
+}% \tabu@cleanup
+\let\tabu@afterendpar \relax
+\def\tabu@setreset {%
+ \edef\tabu@savedparams {% \relax for \tabu@message@save
+ \ifmmode \col@sep \the\arraycolsep
+ \else \col@sep \the\tabcolsep \fi \relax
+ \arrayrulewidth \the\arrayrulewidth \relax
+ \doublerulesep \the\doublerulesep \relax
+ \extratabsurround \the\extratabsurround \relax
+ \extrarowheight \the\extrarowheight \relax
+ \extrarowdepth \the\extrarowdepth \relax
+ \abovetabulinesep \the\abovetabulinesep \relax
+ \belowtabulinesep \the\belowtabulinesep \relax
+ \def\noexpand\arraystretch{\arraystretch}%
+ \ifdefined\minrowclearance \minrowclearance\the\minrowclearance\relax\fi}%
+ \begingroup
+ \@temptokena\expandafter{\tabu@savedparams}% => only for \savetabu / \usetabu
+ \ifx \tabu@arc@L\relax \else \tabu@setsave \tabu@arc@L \fi
+ \ifx \tabu@drsc@L\relax \else \tabu@setsave \tabu@drsc@L \fi
+ \tabu@setsave \tabu@ls@L \tabu@setsave \tabu@evr@L
+ \expandafter \endgroup \expandafter
+ \def\expandafter\tabu@saved@ \expandafter{\the\@temptokena
+ \let\tabu@arc@G \tabu@arc@L
+ \let\tabu@drsc@G \tabu@drsc@L
+ \let\tabu@ls@G \tabu@ls@L
+ \let\tabu@rc@G \tabu@rc@L
+ \let\tabu@evr@G \tabu@evr@L}%
+ \def\tabu@reset{\tabu@savedparams
+ \tabu@everyrowtrue \c@taburow \z@
+ \let\CT@arc@ \tabu@arc@L
+ \let\CT@drsc@ \tabu@drsc@L
+ \let\tabu@ls@ \tabu@ls@L
+ \let\tabu@rc@ \tabu@rc@L
+ \global\tabu@alloc \tabu@alloc@save
+ \everyrow\expandafter{\tabu@evr@L}}%
+}% \tabu@reset
+\def\tabu@setsave #1{\expandafter\tabu@sets@ve #1\@nil{#1}}
+\long\def\tabu@sets@ve #1\@nil #2{\@temptokena\expandafter{\the\@temptokena \def#2{#1}}}
+%% The Rewriting Process -------------------------------------------
+\def\tabu@newcolumntype #1{%
+ \expandafter\tabu@new@columntype
+ \csname NC@find@\string#1\expandafter\endcsname
+ \csname NC@rewrite@\string#1\endcsname
+ {#1}%
+}% \tabu@newcolumntype
+\def\tabu@new@columntype #1#2#3{%
+ \def#1##1#3{\NC@{##1}}%
+ \let#2\relax \newcommand*#2%
+}% \tabu@new@columntype
+\def\tabu@privatecolumntype #1{%
+ \expandafter\tabu@private@columntype
+ \csname NC@find@\string#1\expandafter\endcsname
+ \csname NC@rewrite@\string#1\expandafter\endcsname
+ \csname tabu@NC@find@\string#1\expandafter\endcsname
+ \csname tabu@NC@rewrite@\string#1\endcsname
+ {#1}%
+}% \tabu@privatecolumntype
+\def\tabu@private@columntype#1#2#3#4{%
+ \g@addto@macro\tabu@privatecolumns{\let#1#3\let#2#4}%
+ \tabu@new@columntype#3#4%
+}% \tabu@private@columntype
+\let\tabu@privatecolumns \@empty
+\newcommand*\tabucolumn [1]{\expandafter \def \expandafter
+ \tabu@highprioritycolumns\expandafter{\tabu@highprioritycolumns
+ \NC@do #1}}%
+\let\tabu@highprioritycolumns \@empty
+%% The | ``column'' : rewriting process --------------------------
+\tabu@privatecolumntype |{\tabu@rewritevline}
+\newcommand*\tabu@rewritevline[1][]{\tabu@vlinearg{#1}%
+ \expandafter \NC@find \tabu@rewritten}
+\def\tabu@lines #1{%
+ \ifx|#1\else \tabu@privatecolumntype #1{\tabu@rewritevline}\fi
+ \NC@list\expandafter{\the\NC@list \NC@do #1}%
+}% \tabu@lines@
+\def\tabu@vlinearg #1{%
+ \ifx\\#1\\\def\tabu@thestyle {\tabu@ls@}%
+ \else\tabu@getline {#1}%
+ \fi
+ \def\tabu@rewritten ##1{\def\tabu@rewritten{!{##1\tabu@thevline}}%
+ }\expandafter\tabu@rewritten\expandafter{\tabu@thestyle}%
+ \expandafter \tabu@keepls \tabu@thestyle \@nil
+}% \tabu@vlinearg
+\def\tabu@keepls #1\@nil{%
+ \ifcat $\@cdr #1\@nil $%
+ \ifx \relax#1\else
+ \ifx \tabu@ls@#1\else
+ \let#1\relax
+ \xdef\tabu@mkpreambuffer{\tabu@mkpreambuffer
+ \tabu@savels\noexpand#1}\fi\fi\fi
+}% \tabu@keepls
+\def\tabu@thevline {\begingroup
+ \ifdefined\tabu@leaders
+ \setbox\@tempboxa=\vtop to\dimexpr
+ \ht\@arstrutbox+\dp\@arstrutbox{{\tabu@thevleaders}}%
+ \ht\@tempboxa=\ht\@arstrutbox \dp\@tempboxa=\dp\@arstrutbox
+ \box\@tempboxa
+ \else
+ \tabu@thevrule
+ \fi \endgroup
+}% \tabu@thevline
+\def\tabu@savels #1{%
+ \expandafter\let\csname\string#1\endcsname #1%
+ \expandafter\def\expandafter\tabu@reset\expandafter{\tabu@reset
+ \tabu@resetls#1}}%
+\def\tabu@resetls #1{\expandafter\let\expandafter#1\csname\string#1\endcsname}%
+%% \multicolumn inside tabu environment -----------------------------
+\tabu@newcolumntype \tabu@rewritemulticolumn{%
+ \aftergroup \tabu@endrewritemulticolumn % after \@mkpream group
+ \NC@list{\NC@do *}\tabu@textbar \tabu@lines
+ \tabu@savedecl
+ \tabu@privatecolumns
+ \NC@list\expandafter{\the\expandafter\NC@list \tabu@NC@list}%
+ \let\tabu@savels \relax
+ \NC@find
+}% \tabu@rewritemulticolumn
+\def\tabu@endrewritemulticolumn{\gdef\tabu@mkpreambuffer{}\endgroup}
+\def\tabu@multicolumn{\tabu@ifenvir \tabu@multic@lumn \tabu@multicolumnORI}
+\long\def\tabu@multic@lumn #1#2#3{\multispan{#1}\begingroup
+ \tabu@everyrowtrue
+ \NC@list{\NC@do \tabu@rewritemulticolumn}%
+ \expandafter\@gobbletwo % gobbles \multispan{#1}
+ \tabu@multicolumnORI{#1}{\tabu@rewritemulticolumn #2}%
+ {\iftabuscantokens \tabu@rescan \else \expandafter\@firstofone \fi
+ {#3}}%
+}% \tabu@multic@lumn
+%% The X column(s): rewriting process -----------------------------
+\tabu@privatecolumntype X[1][]{\begingroup \tabu@siunitx{\endgroup \tabu@rewriteX {#1}}}
+\def\tabu@nosiunitx #1{#1{}{}\expandafter \NC@find \tabu@rewritten }
+\def\tabu@siunitx #1{\@ifnextchar \bgroup
+ {\tabu@rewriteX@Ss{#1}}
+ {\tabu@nosiunitx{#1}}}
+\def\tabu@rewriteX@Ss #1#2{\@temptokena{}%
+ \@defaultunits \let\tabu@temp =#2\relax\@nnil
+ \ifodd 1\ifx S\tabu@temp \else \ifx s\tabu@temp \else 0 \fi\fi
+ \def\NC@find{\def\NC@find >####1####2<####3\relax{#1 {####1}{####3}%
+ }\expandafter\NC@find \the\@temptokena \relax
+ }\expandafter\NC@rewrite@S \@gobble #2\relax
+ \else \tabu@siunitxerror
+ \fi
+ \expandafter \NC@find \tabu@rewritten
+}% \tabu@rewriteX@Ss
+\def\tabu@siunitxerror {\PackageError{tabu}{Not a S nor s column !
+ \MessageBreak X column can only embed siunitx S or s columns}\@ehd
+}% \tabu@siunitxerror
+\def\tabu@rewriteX #1#2#3{\tabu@Xarg {#1}{#2}{#3}%
+ \iftabu@measuring
+ \else \tabu@measuringtrue % first X column found in the preamble
+ \let\@halignto \relax \let\tabu@halignto \relax
+ \iftabu@spread \tabu@spreadtarget \tabu@target \tabu@target \z@
+ \else \tabu@spreadtarget \z@ \fi
+ \ifdim \tabu@target=\z@
+ \setlength\tabu@target \tabu@thetarget
+ \tabu@message{\tabu@message@defaulttarget}%
+ \else \tabu@message{\tabu@message@target}\fi
+ \fi
+}% \tabu@rewriteX
+\def\tabu@rewriteXrestore #1#2#3{\let\@halignto \relax
+ \def\tabu@rewritten{l}}
+\def\tabu@Xarg #1#2#3{%
+ \advance\tabu@Xcol \@ne \let\tabu@Xlcr \@empty
+ \let\tabu@Xdisp \@empty \let\tabu@Xmath \@empty
+ \ifx\\#1\\% <shortcut when no option>
+ \def\tabu@rewritten{p}\tabucolX \p@ % <default coef = 1>
+ \else
+ \let\tabu@rewritten \@empty \let\tabu@temp \@empty \tabucolX \z@
+ \tabu@Xparse {}#1\relax
+ \fi
+ \tabu@Xrewritten{#2}{#3}%
+}% \tabu@Xarg
+\def\tabu@Xparse #1{\futurelet\@let@token \tabu@Xtest}
+\expandafter\def\expandafter\tabu@Xparsespace\space{\tabu@Xparse{}}
+\def\tabu@Xtest{%
+ \ifcase \ifx \relax\@let@token \z@ \else
+ \if ,\@let@token \m@ne\else
+ \if p\@let@token 1\else
+ \if m\@let@token 2\else
+ \if b\@let@token 3\else
+ \if l\@let@token 4\else
+ \if c\@let@token 5\else
+ \if r\@let@token 6\else
+ \if j\@let@token 7\else
+ \if L\@let@token 8\else
+ \if C\@let@token 9\else
+ \if R\@let@token 10\else
+ \if J\@let@token 11\else
+ \ifx \@sptoken\@let@token 12\else
+ \if .\@let@token 13\else
+ \if -\@let@token 13\else
+ \ifcat $\@let@token 14\else
+ 15\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\relax
+ \or \tabu@Xtype {p}%
+ \or \tabu@Xtype {m}%
+ \or \tabu@Xtype {b}%
+ \or \tabu@Xalign \raggedright\relax
+ \or \tabu@Xalign \centering\relax
+ \or \tabu@Xalign \raggedleft\relax
+ \or \tabu@Xalign \tabu@justify\relax
+ \or \tabu@Xalign \RaggedRight\raggedright
+ \or \tabu@Xalign \Centering\centering
+ \or \tabu@Xalign \RaggedLeft\raggedleft
+ \or \tabu@Xalign \justifying\tabu@justify
+ \or \expandafter \tabu@Xparsespace
+ \or \expandafter \tabu@Xcoef
+ \or \expandafter \tabu@Xm@th
+ \or \tabu@Xcoef{}%
+ \else\expandafter \tabu@Xparse
+ \fi
+}% \tabu@Xtest
+\def\tabu@Xalign #1#2{%
+ \ifx \tabu@Xlcr\@empty \else \PackageWarning{tabu}
+ {Duplicate horizontal alignment specification}\fi
+ \ifdefined#1\def\tabu@Xlcr{#1}\let#1\relax
+ \else \def\tabu@Xlcr{#2}\let#2\relax\fi
+ \expandafter\tabu@Xparse
+}% \tabu@Xalign
+\def\tabu@Xtype #1{%
+ \ifx \tabu@rewritten\@empty \else \PackageWarning{tabu}
+ {Duplicate vertical alignment specification}\fi
+ \def\tabu@rewritten{#1}\expandafter\tabu@Xparse
+}% \tabu@Xtype
+\def\tabu@Xcoef#1{\edef\tabu@temp{\tabu@temp#1}%
+ \afterassignment\tabu@Xc@ef \tabu@cnt\number\if-#10\fi
+}% \tabu@Xcoef
+\def\tabu@Xc@ef{\advance\tabucolX \tabu@temp\the\tabu@cnt\p@
+ \tabu@Xparse{}%
+}% \tabu@Xc@ef
+\def\tabu@Xm@th #1{\futurelet \@let@token \tabu@Xd@sp}
+\def\tabu@Xd@sp{\let\tabu@Xmath=$%
+ \ifx $\@let@token \def\tabu@Xdisp{\displaystyle}%
+ \expandafter\tabu@Xparse
+ \else \expandafter\tabu@Xparse\expandafter{\expandafter}%
+ \fi
+}% \tabu@Xd@sp
+\def\tabu@Xrewritten {%
+ \ifx \tabu@rewritten\@empty \def\tabu@rewritten{p}\fi
+ \ifdim \tabucolX<\z@ \tabu@negcoeftrue
+ \else\ifdim \tabucolX=\z@ \tabucolX \p@
+ \fi\fi
+ \edef\tabu@temp{{\the\tabu@Xcol}{\tabu@strippt\tabucolX}}%
+ \edef\tabu@Xcoefs{\tabu@Xcoefs \tabu@ \tabu@temp}%
+ \edef\tabu@rewritten ##1##2{\def\noexpand\tabu@rewritten{%
+ >{\tabu@Xlcr \ifx$\tabu@Xmath$\tabu@Xdisp\fi ##1}%
+ \tabu@rewritten {\tabu@hsize \tabu@temp}%
+ <{##2\ifx$\tabu@Xmath$\fi}}%
+ }\tabu@rewritten
+}% \tabu@Xrewritten
+\def\tabu@hsize #1#2{%
+ \ifdim #2\p@<\z@
+ \ifdim \tabucolX=\maxdimen \tabu@wd{#1}\else
+ \ifdim \tabu@wd{#1}<-#2\tabucolX \tabu@wd{#1}\else -#2\tabucolX\fi
+ \fi
+ \else #2\tabucolX
+ \fi
+}% \tabu@hsize
+%% \usetabu and \preamble: rewriting process ---------------------
+\tabu@privatecolumntype \usetabu [1]{%
+ \ifx\\#1\\\tabu@saveerr{}\else
+ \@ifundefined{tabu@saved@\string#1}
+ {\tabu@saveerr{#1}}
+ {\let\tabu@rewriteX \tabu@rewriteXrestore
+ \csname tabu@saved@\string#1\expandafter\endcsname\expandafter\@ne}%
+ \fi
+}% \NC@rewrite@\usetabu
+\tabu@privatecolumntype \preamble [1]{%
+ \ifx\\#1\\\tabu@saveerr{}\else
+ \@ifundefined{tabu@saved@\string#1}
+ {\tabu@saveerr{#1}}
+ {\csname tabu@saved@\string#1\expandafter\endcsname\expandafter\z@}%
+ \fi
+}% \NC@rewrite@\preamble
+%% Controlling the rewriting process -------------------------------
+\tabu@newcolumntype \tabu@rewritefirst{%
+ \iftabu@long \aftergroup \tabu@longpream % <the whole implementation is here !>
+ \else \aftergroup \tabu@pream
+ \fi
+ \let\tabu@ \relax \let\tabu@hsize \relax
+ \let\tabu@Xcoefs \@empty \let\tabu@savels \relax
+ \tabu@Xcol \z@ \tabu@cnt \tw@
+ \gdef\tabu@mkpreambuffer{\tabu@{}}\tabu@measuringfalse
+ \global\setbox\@arstrutbox \box\@arstrutbox
+ \NC@list{\NC@do *}\tabu@textbar \tabu@lines
+ \NC@list\expandafter{\the\NC@list \NC@do X}%
+ \iftabu@siunitx % <siunitx S and s columns>
+ \NC@list\expandafter{\the\NC@list \NC@do S\NC@do s}\fi
+ \NC@list\expandafter{\the\expandafter\NC@list \tabu@highprioritycolumns}%
+ \expandafter\def\expandafter\tabu@NC@list\expandafter{%
+ \the\expandafter\NC@list \tabu@NC@list}% % * | X S <original>
+ \NC@list\expandafter{\expandafter \NC@do \expandafter\usetabu
+ \expandafter \NC@do \expandafter\preamble
+ \the\NC@list \NC@do \tabu@rewritemiddle
+ \NC@do \tabu@rewritelast}%
+ \tabu@savedecl
+ \tabu@privatecolumns
+ \edef\tabu@prev{\the\@temptokena}\NC@find \tabu@rewritemiddle
+}% NC@rewrite@\tabu@rewritefirst
+\tabu@newcolumntype \tabu@rewritemiddle{%
+ \edef\tabu@temp{\the\@temptokena}\NC@find \tabu@rewritelast
+}% \NC@rewrite@\tabu@rewritemiddle
+\tabu@newcolumntype \tabu@rewritelast{%
+ \ifx \tabu@temp\tabu@prev \advance\tabu@cnt \m@ne
+ \NC@list\expandafter{\tabu@NC@list \NC@do \tabu@rewritemiddle
+ \NC@do \tabu@rewritelast}%
+ \else \let\tabu@prev\tabu@temp
+ \fi
+ \ifcase \tabu@cnt \expandafter\tabu@endrewrite
+ \else \expandafter\NC@find \expandafter\tabu@rewritemiddle
+ \fi
+}% \NC@rewrite@\tabu@rewritelast
+%% Choosing the strategy --------------------------------------------
+\def\tabu@endrewrite {%
+ \let\tabu@temp \NC@find
+ \ifx \@arrayright\relax \let\@arrayright \@empty \fi
+ \count@=%
+ \ifx \@finalstrut\tabu@finalstrut \z@ % outer in mode 0 print
+ \iftabu@measuring
+ \xdef\tabu@mkpreambuffer{\tabu@mkpreambuffer
+ \tabu@target \csname tabu@\the\tabu@nested.T\endcsname
+ \tabucolX \csname tabu@\the\tabu@nested.X\endcsname
+ \edef\@halignto {\ifx\@arrayright\@empty to\tabu@target\fi}}%
+ \fi
+ \else\iftabu@measuring 4 % X columns
+ \xdef\tabu@mkpreambuffer{\tabu@{\tabu@mkpreambuffer
+ \tabu@target \the\tabu@target
+ \tabu@spreadtarget \the\tabu@spreadtarget}%
+ \def\noexpand\tabu@Xcoefs{\tabu@Xcoefs}%
+ \edef\tabu@halignto{\ifx \@arrayright\@empty to\tabu@target\fi}}%
+ \let\tabu@Xcoefs \relax
+ \else\ifcase\tabu@nested \thr@@ % outer, no X
+ \global\let\tabu@afterendpar \relax
+ \else \@ne % inner, no X, outer in mode 1 or 2
+ \fi
+ \ifdefined\tabu@usetabu
+ \else \ifdim\tabu@target=\z@
+ \else \let\tabu@temp \tabu@extracolsep
+ \fi\fi
+ \fi
+ \fi
+ \xdef\tabu@mkpreambuffer{\count@ \the\count@ \tabu@mkpreambuffer}%
+ \tabu@temp
+}% \tabu@endrewrite
+\def\tabu@extracolsep{\@defaultunits \expandafter\let
+ \expandafter\tabu@temp \expandafter=\the\@temptokena \relax\@nnil
+ \ifx \tabu@temp\@sptoken
+ \expandafter\tabu@gobblespace \expandafter\tabu@extracolsep
+ \else
+ \edef\tabu@temp{\noexpand\NC@find
+ \if |\noexpand\tabu@temp @%
+ \else\if !\noexpand\tabu@temp @%
+ \else !%
+ \fi\fi
+ {\noexpand\extracolsep\noexpand\@flushglue}}%
+ \fi
+ \tabu@temp
+}% \tabu@extrac@lsep
+%% Implementing the strategy ----------------------------------------
+\long\def\tabu@pream #1\@preamble {%
+ \let\tabu@ \tabu@@ \tabu@mkpreambuffer \tabu@aftergroupcleanup
+ \NC@list\expandafter {\tabu@NC@list}% in case of nesting...
+ \ifdefined\tabu@usetabu \tabu@usetabu \tabu@target \z@ \fi
+ \let\tabu@savedpreamble \@preamble
+ \global\let\tabu@elapsedtime \relax
+ \tabu@thebody ={#1\tabu@aftergroupcleanup}%
+ \tabu@thebody =\expandafter{\the\expandafter\tabu@thebody
+ \@preamble}%
+ \edef\tabuthepreamble {\the\tabu@thebody}% ( no @ allowed for \scantokens )
+ \tabu@select
+}% \tabu@pream
+\long\def\tabu@longpream #1\LT@bchunk #2\LT@bchunk{%
+ \let\tabu@ \tabu@@ \tabu@mkpreambuffer \tabu@aftergroupcleanup
+ \NC@list\expandafter {\tabu@NC@list}% in case of nesting...
+ \let\tabu@savedpreamble \@preamble
+ \global\let\tabu@elapsedtime \relax
+ \tabu@thebody ={#1\LT@bchunk #2\tabu@aftergroupcleanup \LT@bchunk}%
+ \edef\tabuthepreamble {\the\tabu@thebody}% ( no @ allowed for \scantokens )
+ \tabu@select
+}% \tabu@longpream
+\def\tabu@select {%
+ \ifnum\tabu@nested>\z@ \tabuscantokensfalse \fi
+ \ifnum \count@=\@ne \iftabu@measuring \count@=\tw@ \fi\fi
+ \ifcase \count@
+ \global\let\tabu@elapsedtime \relax
+ \tabu@seteverycr
+ \expandafter \tabuthepreamble % vertical adjustment (inherited from outer)
+ \or % exit in vertical measure + struts per cell because no X and outer in mode 3
+ \tabu@evr{\tabu@verticalinit}\tabu@celllalign@def{\tabu@verticalmeasure}%
+ \def\tabu@cellralign{\tabu@verticalspacing}%
+ \tabu@seteverycr
+ \expandafter \tabuthepreamble
+ \or % exit without measure because no X and outer in mode 4
+ \tabu@evr{}\tabu@celllalign@def{}\let\tabu@cellralign \@empty
+ \tabu@seteverycr
+ \expandafter \tabuthepreamble
+ \else % needs trials
+ \tabu@evr{}\tabu@celllalign@def{}\let\tabu@cellralign \@empty
+ \tabu@savecounters
+ \expandafter \tabu@setstrategy
+ \fi
+}% \tabu@select
+\def\tabu@@ {\gdef\tabu@mkpreambuffer}
+%% Protections to set up before trials ------------------------------
+\def\tabu@setstrategy {\begingroup % <trials group>
+ \tabu@trialh@@k \tabu@cnt \z@ % number of trials
+ \hbadness \@M \let\hbadness \@tempcnta
+ \hfuzz \maxdimen \let\hfuzz \@tempdima
+ \let\write \tabu@nowrite\let\GenericError \tabu@GenericError
+ \let\savetabu \@gobble \let\tabudefaulttarget \linewidth
+ \let\@footnotetext \@gobble \let\@xfootnote \tabu@xfootnote
+ \let\color \tabu@nocolor\let\rowcolor \tabu@norowcolor
+ \let\tabu@aftergroupcleanup \relax % only after the last trial
+ \tabu@mkpreambuffer
+ \ifnum \count@>\thr@@ \let\@halignto \@empty \tabucolX@init
+ \def\tabu@lasttry{\m@ne\p@}\fi
+ \begingroup \iffalse{\fi \ifnum0=`}\fi
+ \toks@{}\def\tabu@stack{b}\iftabuscantokens \endlinechar=10 \obeyspaces \fi %
+ \tabu@collectbody \tabu@strategy %
+}% \tabu@setstrategy
+\def\tabu@savecounters{%
+ \def\@elt ##1{\csname c@##1\endcsname\the\csname c@##1\endcsname}%
+ \edef\tabu@clckpt {\begingroup \globaldefs=\@ne \cl@@ckpt \endgroup}\let\@elt \relax
+}% \tabu@savecounters
+\def\tabucolX@init {% \tabucolX <= \tabu@target / (sum coefs > 0)
+ \dimen@ \z@ \tabu@Xsum \z@ \tabucolX \z@ \let\tabu@ \tabu@Xinit \tabu@Xcoefs
+ \ifdim \dimen@>\z@
+ \@tempdima \dimexpr \tabu@target *\p@/\dimen@ + \tabu@hfuzz\relax
+ \ifdim \tabucolX<\@tempdima \tabucolX \@tempdima \fi
+ \fi
+}% \tabucolX@init
+\def\tabu@Xinit #1#2{\tabu@Xcol #1 \advance \tabu@Xsum
+ \ifdim #2\p@>\z@ #2\p@ \advance\dimen@ #2\p@
+ \else -#2\p@ \tabu@negcoeftrue
+ \@tempdima \dimexpr \tabu@target*\p@/\dimexpr-#2\p@\relax \relax
+ \ifdim \tabucolX<\@tempdima \tabucolX \@tempdima \fi
+ \tabu@wddef{#1}{0pt}%
+ \fi
+}% \tabu@Xinit
+%% Collecting the environment body ----------------------------------
+\long\def\tabu@collectbody #1#2\end #3{%
+ \edef\tabu@stack{\tabu@pushbegins #2\begin\end\expandafter\@gobble\tabu@stack}%
+ \ifx \tabu@stack\@empty
+ \toks@\expandafter{\expandafter\tabu@thebody\expandafter{\the\toks@ #2}%
+ \def\tabu@end@envir{\end{#3}}%
+ \iftabuscantokens
+ \iftabu@long \def\tabu@endenvir {\end{#3}\tabu@gobbleX}%
+ \else \def\tabu@endenvir {\let\endarray \@empty
+ \end{#3}\tabu@gobbleX}%
+ \fi
+ \else \def\tabu@endenvir {\end{#3}}\fi}%
+ \let\tabu@collectbody \tabu@endofcollect
+ \else\def\tabu@temp{#3}%
+ \ifx \tabu@temp\@empty \toks@\expandafter{\the\toks@ #2\end }%
+ \else \ifx\tabu@temp\tabu@@spxiii \toks@\expandafter{\the\toks@ #2\end #3}%
+ \else \ifx\tabu@temp\tabu@X \toks@\expandafter{\the\toks@ #2\end #3}%
+ \else \toks@\expandafter{\the\toks@ #2\end{#3}}%
+ \fi\fi\fi
+ \fi
+ \tabu@collectbody{#1}%
+}% \tabu@collectbody
+\long\def\tabu@pushbegins#1\begin#2{\ifx\end#2\else b\expandafter\tabu@pushbegins\fi}%
+\def\tabu@endofcollect #1{\ifnum0=`{}\fi
+ \expandafter\endgroup \the\toks@ #1%
+}% \tabu@endofcollect
+%% The trials: switching between strategies -------------------------
+\def\tabu@strategy {\relax % stops \count@ assignment !
+ \ifcase\count@ % case 0 = print with vertical adjustment (outer is finished)
+ \expandafter \tabu@endoftrials
+ \or % case 1 = exit in vertical measure (outer in mode 3)
+ \expandafter\xdef\csname tabu@\the\tabu@nested.T\endcsname{\the\tabu@target}%
+ \expandafter\xdef\csname tabu@\the\tabu@nested.X\endcsname{\the\tabucolX}%
+ \expandafter \tabu@endoftrials
+ \or % case 2 = exit with a rule replacing the table (outer in mode 4)
+ \expandafter \tabu@quickend
+ \or % case 3 = outer is in mode 3 because of no X
+ \begingroup
+ \tabu@evr{\tabu@verticalinit}\tabu@celllalign@def{\tabu@verticalmeasure}%
+ \def\tabu@cellralign{\tabu@verticalspacing}%
+ \expandafter \tabu@measuring
+ \else % case 4 = horizontal measure
+ \begingroup
+ \global\let\tabu@elapsedtime \tabu@message@etime
+ \long\def\multicolumn##1##2##3{\multispan{##1}}%
+ \let\tabu@startpboxORI \@startpbox
+ \iftabu@spread
+ \def\tabu@naturalXmax {\z@}%
+ \let\tabu@naturalXmin \tabu@naturalXmax
+ \tabu@evr{\global\tabu@naturalX \z@}%
+ \let\@startpbox \tabu@startpboxmeasure
+ \else\iftabu@negcoef
+ \let\@startpbox \tabu@startpboxmeasure
+ \else \let\@startpbox \tabu@startpboxquick
+ \fi\fi
+ \expandafter \tabu@measuring
+ \fi
+}% \tabu@strategy
+\def\tabu@measuring{\expandafter \tabu@trial \expandafter
+ \count@ \the\count@ \tabu@endtrial
+}% \tabu@measuring
+\def\tabu@trial{\iftabu@long \tabu@longtrial \else \tabu@shorttrial \fi}
+\def\tabu@shorttrial {\setbox\tabu@box \hbox\bgroup \tabu@seteverycr
+ \ifx \tabu@savecounters\relax \else
+ \let\tabu@savecounters \relax \tabu@clckpt \fi
+ $\iftabuscantokens \tabu@rescan \else \expandafter\@secondoftwo \fi
+ \expandafter{\expandafter \tabuthepreamble
+ \the\tabu@thebody
+ \csname tabu@adl@endtrial\endcsname
+ \endarray}$\egroup % got \tabu@box
+}% \tabu@shorttrial
+\def\tabu@longtrial {\setbox\tabu@box \hbox\bgroup \tabu@seteverycr
+ \ifx \tabu@savecounters\relax \else
+ \let\tabu@savecounters \relax \tabu@clckpt \fi
+ \iftabuscantokens \tabu@rescan \else \expandafter\@secondoftwo \fi
+ \expandafter{\expandafter \tabuthepreamble
+ \the\tabu@thebody
+ \tabuendlongtrial}\egroup % got \tabu@box
+}% \tabu@longtrial
+\def\tabuendlongtrial{% no @ allowed for \scantokens
+ \LT@echunk \global\setbox\@ne \hbox{\unhbox\@ne}\kern\wd\@ne
+ \LT@get@widths
+}% \tabuendlongtrial
+\def\tabu@adl@endtrial{% <arydshln in nested trials - problem for global column counters!>
+ \crcr \noalign{\global\adl@ncol \tabu@nbcols}}% anything global is crap, junky and fails !
+\def\tabu@seteverycr {\tabu@reset
+ \everycr \expandafter{\the\everycr \tabu@everycr}%
+ \let\everycr \tabu@noeverycr % <for ialign>
+}% \tabu@seteverycr
+\def\tabu@noeverycr{{\aftergroup\tabu@restoreeverycr \afterassignment}\toks@}
+\def\tabu@restoreeverycr {\let\everycr \tabu@@everycr}
+\def\tabu@everycr {\iftabu@everyrow \noalign{\tabu@everyrow}\fi}
+\def\tabu@endoftrials {%
+ \iftabuscantokens \expandafter\@firstoftwo
+ \else \expandafter\@secondoftwo
+ \fi
+ {\expandafter \tabu@closetrialsgroup \expandafter
+ \tabu@rescan \expandafter{%
+ \expandafter\tabuthepreamble
+ \the\expandafter\tabu@thebody
+ \iftabu@long \else \endarray \fi}}
+ {\expandafter\tabu@closetrialsgroup \expandafter
+ \tabuthepreamble
+ \the\tabu@thebody}%
+ \tabu@endenvir % Finish !
+}% \tabu@endoftrials
+\def\tabu@closetrialsgroup {%
+ \toks@\expandafter{\tabu@endenvir}%
+ \edef\tabu@bufferX{\endgroup
+ \tabucolX \the\tabucolX
+ \tabu@target \the\tabu@target
+ \tabu@cnt \the\tabu@cnt
+ \def\noexpand\tabu@endenvir{\the\toks@}%
+ %Quid de \@halignto = \tabu@halignto ??
+ }% \tabu@bufferX
+ \tabu@bufferX
+ \ifcase\tabu@nested % print out (outer in mode 0)
+ \global\tabu@cnt \tabu@cnt
+ \tabu@evr{\tabu@verticaldynamicadjustment}%
+ \tabu@celllalign@def{\everypar{}}\let\tabu@cellralign \@empty
+ \let\@finalstrut \tabu@finalstrut
+ \else % vertical measure of nested tabu
+ \tabu@evr{\tabu@verticalinit}%
+ \tabu@celllalign@def{\tabu@verticalmeasure}%
+ \def\tabu@cellralign{\tabu@verticalspacing}%
+ \fi
+ \tabu@clckpt \let\@halignto \tabu@halignto
+ \let\@halignto \@empty
+ \tabu@seteverycr
+ \ifdim \tabustrutrule>\z@ \ifnum\tabu@nested=\z@
+ \setbox\@arstrutbox \box\voidb@x % force \@arstrutbox to be rebuilt (visible struts)
+ \fi\fi
+}% \tabu@closetrialsgroup
+\def\tabu@quickend {\expandafter \endgroup \expandafter
+ \tabu@target \the\tabu@target \tabu@quickrule
+ \let\endarray \relax \tabu@endenvir
+}% \tabu@quickend
+\def\tabu@endtrial {\relax % stops \count@ assignment !
+ \ifcase \count@ \tabu@err % case 0 = impossible here
+ \or \tabu@err % case 1 = impossible here
+ \or \tabu@err % case 2 = impossible here
+ \or % case 3 = outer goes into mode 0
+ \def\tabu@bufferX{\endgroup}\count@ \z@
+ \else % case 4 = outer goes into mode 3
+ \iftabu@spread \tabu@spreadarith % inner into mode 1 (outer in mode 3)
+ \else \tabu@arith % or 2 (outer in mode 4)
+ \fi
+ \count@=%
+ \ifcase\tabu@nested \thr@@ % outer goes into mode 3
+ \else\iftabu@measuring \tw@ % outer is in mode 4
+ \else \@ne % outer is in mode 3
+ \fi\fi
+ \edef\tabu@bufferX{\endgroup
+ \tabucolX \the\tabucolX
+ \tabu@target \the\tabu@target}%
+ \fi
+ \expandafter \tabu@bufferX \expandafter
+ \count@ \the\count@ \tabu@strategy
+}% \tabu@endtrial
+\def\tabu@err{\errmessage{(tabu) Internal impossible error! (\count@=\the\count@)}}
+%% The algorithms: compute the widths / stop or go on ---------------
+\def\tabu@arithnegcoef {%
+ \@tempdima \z@ \dimen@ \z@ \let\tabu@ \tabu@arith@negcoef \tabu@Xcoefs
+}% \tabu@arithnegcoef
+\def\tabu@arith@negcoef #1#2{%
+ \ifdim #2\p@>\z@ \advance\dimen@ #2\p@ % saturated by definition
+ \advance\@tempdima #2\tabucolX
+ \else
+ \ifdim -#2\tabucolX <\tabu@wd{#1}% c_i X < natural width <= \tabu@target-> saturated
+ \advance\dimen@ -#2\p@
+ \advance\@tempdima -#2\tabucolX
+ \else
+ \advance\@tempdima \tabu@wd{#1}% natural width <= c_i X => neutralised
+ \ifdim \tabu@wd{#1}<\tabu@target \else % neutralised
+ \advance\dimen@ -#2\p@ % saturated (natural width = tabu@target)
+ \fi
+ \fi
+ \fi
+}% \tabu@arith@negcoef
+\def\tabu@givespace #1#2{% here \tabu@DELTA < \z@
+ \ifdim \@tempdima=\z@
+ \tabu@wddef{#1}{\the\dimexpr -\tabu@DELTA*\p@/\tabu@Xsum}%
+ \else
+ \tabu@wddef{#1}{\the\dimexpr \tabu@hsize{#1}{#2}
+ *(\p@ -\tabu@DELTA*\p@/\@tempdima)/\p@\relax}%
+ \fi
+}% \tabu@givespace
+\def\tabu@arith {\advance\tabu@cnt \@ne
+ \ifnum \tabu@cnt=\@ne \tabu@message{\tabu@titles}\fi
+ \tabu@arithnegcoef
+ \@tempdimb \dimexpr \wd\tabu@box -\@tempdima \relax % <incompressible material>
+ \tabu@DELTA = \dimexpr \wd\tabu@box - \tabu@target \relax
+ \tabu@message{\tabu@message@arith}%
+ \ifdim \tabu@DELTA <\tabu@hfuzz
+ \ifdim \tabu@DELTA<\z@ % wd (tabu)<\tabu@target ?
+ \let\tabu@ \tabu@givespace \tabu@Xcoefs
+ \advance\@tempdima \@tempdimb \advance\@tempdima -\tabu@DELTA % for message
+ \else % already converged: nothing to do but nearly impossible...
+ \fi
+ \tabucolX \maxdimen
+ \tabu@measuringfalse
+ \else % need for narrower X columns
+ \tabucolX =\dimexpr (\@tempdima -\tabu@DELTA) *\p@/\tabu@Xsum \relax
+ \tabu@measuringtrue
+ \@whilesw \iftabu@measuring\fi {%
+ \advance\tabu@cnt \@ne
+ \tabu@arithnegcoef
+ \tabu@DELTA =\dimexpr \@tempdima+\@tempdimb -\tabu@target \relax % always < 0 here
+ \tabu@message{\tabu@header
+ \tabu@msgalign \tabucolX { }{ }{ }{ }{ }\@@
+ \tabu@msgalign \@tempdima+\@tempdimb { }{ }{ }{ }{ }\@@
+ \tabu@msgalign \tabu@target { }{ }{ }{ }{ }\@@
+ \tabu@msgalign@PT \dimen@ { }{}{}{}{}{}{}\@@
+ \ifdim -\tabu@DELTA<\tabu@hfuzz \tabu@spaces target ok\else
+ \tabu@msgalign \dimexpr -\tabu@DELTA *\p@/\dimen@ {}{}{}{}{}\@@
+ \fi}%
+ \ifdim -\tabu@DELTA<\tabu@hfuzz
+ \advance\@tempdima \@tempdimb % for message
+ \tabu@measuringfalse
+ \else
+ \advance\tabucolX \dimexpr -\tabu@DELTA *\p@/\dimen@ \relax
+ \fi
+ }%
+ \fi
+ \tabu@message{\tabu@message@reached}%
+ \edef\tabu@bufferX{\endgroup \tabu@cnt \the\tabu@cnt
+ \tabucolX \the\tabucolX
+ \tabu@target \the\tabu@target}%
+}% \tabu@arith
+\def\tabu@spreadarith {%
+ \dimen@ \z@ \@tempdima \tabu@naturalXmax \let\tabu@ \tabu@spread@arith \tabu@Xcoefs
+ \edef\tabu@naturalXmin {\the\dimexpr\tabu@naturalXmin*\dimen@/\p@}%
+ \@tempdimc =\dimexpr \wd\tabu@box -\tabu@naturalXmax+\tabu@naturalXmin \relax
+ \iftabu@measuring
+ \tabu@target =\dimexpr \@tempdimc+\tabu@spreadtarget \relax
+ \edef\tabu@bufferX{\endgroup \tabucolX \the\tabucolX \tabu@target\the\tabu@target}%
+ \else
+ \tabu@message{\tabu@message@spreadarith}%
+ \ifdim \dimexpr \@tempdimc+\tabu@spreadtarget >\tabu@target
+ \tabu@message{(tabu) spread
+ \ifdim \@tempdimc>\tabu@target useless here: default target used%
+ \else too large: reduced to fit default target\fi.}%
+ \else
+ \tabu@target =\dimexpr \@tempdimc+\tabu@spreadtarget \relax
+ \tabu@message{(tabu) spread: New target set to \the\tabu@target^^J}%
+ \fi
+ \begingroup \let\tabu@wddef \@gobbletwo
+ \@tempdimb \@tempdima
+ \tabucolX@init
+ \tabu@arithnegcoef
+ \wd\tabu@box =\dimexpr \wd\tabu@box +\@tempdima-\@tempdimb \relax
+ \expandafter\endgroup \expandafter\tabucolX \the\tabucolX
+ \tabu@arith
+ \fi
+}% \tabu@spreadarith
+\def\tabu@spread@arith #1#2{%
+ \ifdim #2\p@>\z@ \advance\dimen@ #2\p@
+ \else \advance\@tempdima \tabu@wd{#1}\relax
+ \fi
+}% \tabu@spread@arith
+%% Reporting in the .log file ---------------------------------------
+\def\tabu@message@defaulttarget{%
+ \ifnum\tabu@nested=\z@^^J(tabu) Default target:
+ \ifx\tabudefaulttarget\linewidth \string\linewidth
+ \ifdim \tabu@thetarget=\linewidth \else
+ -\the\dimexpr\linewidth-\tabu@thetarget\fi =
+ \else\ifx\tabudefaulttarget\linegoal\string\linegoal=
+ \fi\fi
+ \else (tabu) Default target (nested): \fi
+ \the\tabu@target \on@line
+ \ifnum\tabu@nested=\z@ , page \the\c@page\fi}
+\def\tabu@message@target {^^J(tabu) Target specified:
+ \the\tabu@target \on@line, page \the\c@page}
+\def\tabu@message@arith {\tabu@header
+ \tabu@msgalign \tabucolX { }{ }{ }{ }{ }\@@
+ \tabu@msgalign \wd\tabu@box { }{ }{ }{ }{ }\@@
+ \tabu@msgalign \tabu@target { }{ }{ }{ }{ }\@@
+ \tabu@msgalign@PT \dimen@ { }{}{}{}{}{}{}\@@
+ \ifdim \tabu@DELTA<\tabu@hfuzz giving space\else
+ \tabu@msgalign \dimexpr (\@tempdima-\tabu@DELTA) *\p@/\tabu@Xsum -\tabucolX {}{}{}{}{}\@@
+ \fi
+}% \tabu@message@arith
+\def\tabu@message@spreadarith {\tabu@spreadheader
+ \tabu@msgalign \tabu@spreadtarget { }{ }{ }{ }{}\@@
+ \tabu@msgalign \wd\tabu@box { }{ }{ }{ }{}\@@
+ \tabu@msgalign -\tabu@naturalXmax { }{}{}{}{}\@@
+ \tabu@msgalign \tabu@naturalXmin { }{ }{ }{ }{}\@@
+ \tabu@msgalign \ifdim \dimexpr\@tempdimc>\tabu@target \tabu@target
+ \else \@tempdimc+\tabu@spreadtarget \fi
+ {}{}{}{}{}\@@}
+\def\tabu@message@negcoef #1#2{
+ \tabu@spaces\tabu@spaces\space * #1. X[\rem@pt#2]:
+ \space width = \tabu@wd {#1}
+ \expandafter\string\csname tabu@\the\tabu@nested.W\number#1\endcsname
+ \ifdim -\tabu@pt#2\tabucolX<\tabu@target
+ < \number-\rem@pt#2 X
+ = \the\dimexpr -\tabu@pt#2\tabucolX \relax
+ \else
+ <= \the\tabu@target\space < \number-\rem@pt#2 X\fi}
+\def\tabu@message@reached{\tabu@header
+ ******* Reached Target:
+ hfuzz = \tabu@hfuzz\on@line\space *******}
+\def\tabu@message@etime{\edef\tabu@stoptime{\the\pdfelapsedtime}%
+ \tabu@message{(tabu)\tabu@spaces Time elapsed during measure:
+ \the\numexpr(\tabu@stoptime-\tabu@starttime-32767)/65536\relax sec
+ \the\numexpr\numexpr(\tabu@stoptime-\tabu@starttime)
+ -\numexpr(\tabu@stoptime-\tabu@starttime-32767)/65536\relax*65536\relax
+ *1000/65536\relax ms \tabu@spaces(\the\tabu@cnt\space
+ cycle\ifnum\tabu@cnt>\@ne s\fi)^^J^^J}}
+\def\tabu@message@verticalsp {%
+ \ifdim \@tempdima>\tabu@ht
+ \ifdim \@tempdimb>\tabu@dp
+ \expandafter\expandafter\expandafter\string\tabu@ht =
+ \tabu@msgalign \@tempdima { }{ }{ }{ }{ }\@@
+ \expandafter\expandafter\expandafter\string\tabu@dp =
+ \tabu@msgalign \@tempdimb { }{ }{ }{ }{ }\@@^^J%
+ \else
+ \expandafter\expandafter\expandafter\string\tabu@ht =
+ \tabu@msgalign \@tempdima { }{ }{ }{ }{ }\@@^^J%
+ \fi
+ \else\ifdim \@tempdimb>\tabu@dp
+ \tabu@spaces\tabu@spaces\tabu@spaces
+ \expandafter\expandafter\expandafter\string\tabu@dp =
+ \tabu@msgalign \@tempdimb { }{ }{ }{ }{ }\@@^^J\fi
+ \fi
+}% \tabu@message@verticalsp
+\edef\tabu@spaces{\@spaces}
+\def\tabu@strippt{\expandafter\tabu@pt\the}
+{\@makeother\P \@makeother\T\lowercase{\gdef\tabu@pt #1PT{#1}}}
+\def\tabu@msgalign{\expandafter\tabu@msg@align\the\dimexpr}
+\def\tabu@msgalign@PT{\expandafter\tabu@msg@align\romannumeral-`\0\tabu@strippt}
+\def\do #1{%
+ \def\tabu@msg@align##1.##2##3##4##5##6##7##8##9\@@{%
+ \ifnum##1<10 #1 #1\else
+ \ifnum##1<100 #1 \else
+ \ifnum##1<\@m #1\fi\fi\fi
+ ##1.##2##3##4##5##6##7##8#1}%
+ \def\tabu@header{(tabu) \ifnum\tabu@cnt<10 #1\fi\the\tabu@cnt) }%
+ \def\tabu@titles{\ifnum \tabu@nested=\z@
+ (tabu) Try#1 #1 tabu X #1 #1 #1tabu Width #1 #1 Target
+ #1 #1 #1 Coefs #1 #1 #1 Update^^J\fi}%
+ \def\tabu@spreadheader{%
+ (tabu) Try#1 #1 Spread #1 #1 tabu Width #1 #1 #1 Nat. X #1 #1 #1 #1Nat. Min.
+ #1 New Target^^J%
+ (tabu) sprd}
+ \def\tabu@message@save {\begingroup
+ \def\x ####1{\tabu@msg@align ####1{ }{ }{ }{ }{}\@@}
+ \def\z ####1{\expandafter\x\expandafter{\romannumeral-`\0\tabu@strippt
+ \dimexpr####1\p@{ }{ }}}%
+ \let\color \relax \def\tabu@rulesstyle ####1####2{\detokenize{####1}}%
+ \let\CT@arc@ \relax \let\@preamble \@gobble
+ \let\tabu@savedpream \@firstofone
+ \let\tabu@savedparams \@firstofone
+ \def\tabu@target ####1\relax {(tabu) target #1 #1 #1 #1 #1 = \x{####1}^^J}%
+ \def\tabucolX ####1\relax {(tabu) X columns width#1 = \x{####1}^^J}%
+ \def\tabu@nbcols ####1\relax {(tabu) Number of columns: \z{####1}^^J}%
+ \def\tabu@aligndefault ####1{(tabu) Default alignment: #1 #1 ####1^^J}%
+ \def\col@sep ####1\relax {(tabu) column sep #1 #1 #1 = \x{####1}^^J}%
+ \def\arrayrulewidth ####1\relax{(tabu) arrayrulewidth #1 = \x{####1}}%
+ \def\doublerulesep ####1\relax { doublerulesep = \x{####1}^^J}%
+ \def\extratabsurround####1\relax{(tabu) extratabsurround = \x{####1}^^J}%
+ \def\extrarowheight ####1\relax{(tabu) extrarowheight #1 = \x{####1}}%
+ \def\extrarowdepth ####1\relax {extrarowdepth = \x{####1}^^J}%
+ \def\abovetabulinesep####1\relax{(tabu) abovetabulinesep=\x{####1} }%
+ \def\belowtabulinesep####1\relax{ belowtabulinesep=\x{####1}^^J}%
+ \def\arraystretch ####1{(tabu) arraystretch #1 #1 = \z{####1}^^J}%
+ \def\minrowclearance####1\relax{(tabu) minrowclearance #1 = \x{####1}^^J}%
+ \def\tabu@arc@L ####1{(tabu) taburulecolor #1 #1 = ####1^^J}%
+ \def\tabu@drsc@L ####1{(tabu) tabudoublerulecolor= ####1^^J}%
+ \def\tabu@evr@L ####1{(tabu) everyrow #1 #1 #1 #1 = \detokenize{####1}^^J}%
+ \def\tabu@ls@L ####1{(tabu) line style = \detokenize{####1}^^J}%
+ \def\NC@find ####1\@nil{(tabu) tabu preamble#1 #1 = \detokenize{####1}^^J}%
+ \def\tabu@wddef####1####2{(tabu) Natural width ####1 = \x{####2}^^J}%
+ \let\edef \@gobbletwo \let\def \@empty \let\let \@gobbletwo
+ \tabu@message{%
+ (tabu) \string\savetabu{\tabu@temp}: \on@line^^J%
+ \tabu@usetabu \@nil^^J}%
+ \endgroup}
+}\do{ }
+%% Measuring the natural width (varwidth) - store the results -------
+\def\tabu@startpboxmeasure #1{\bgroup % entering \vtop
+ \edef\tabu@temp{\expandafter\@secondoftwo \ifx\tabu@hsize #1\else\relax\fi}%
+ \ifodd 1\ifx \tabu@temp\@empty 0 \else % starts with \tabu@hsize ?
+ \iftabu@spread \else % if spread -> measure
+ \ifdim \tabu@temp\p@>\z@ 0 \fi\fi\fi% if coef>0 -> do not measure
+ \let\@startpbox \tabu@startpboxORI % restore immediately (nesting)
+ \tabu@measuringtrue % for the quick option...
+ \tabu@Xcol =\expandafter\@firstoftwo\ifx\tabu@hsize #1\fi
+ \ifdim \tabu@temp\p@>\z@ \ifdim \tabu@temp\tabucolX<\tabu@target
+ \tabu@target=\tabu@temp\tabucolX \fi\fi
+ \setbox\tabu@box \hbox \bgroup
+ \begin{varwidth}\tabu@target
+ \let\FV@ListProcessLine \tabu@FV@ListProcessLine % \hbox to natural width...
+ \narrowragged \arraybackslash \parfillskip \@flushglue
+ \ifdefined\pdfadjustspacing \pdfadjustspacing\z@ \fi
+ \bgroup \aftergroup\tabu@endpboxmeasure
+ \ifdefined \cellspacetoplimit \tabu@cellspacepatch \fi
+ \else \expandafter\@gobble
+ \tabu@startpboxquick{#1}% \@gobble \bgroup
+ \fi
+}% \tabu@startpboxmeasure
+\def\tabu@cellspacepatch{\def\bcolumn##1\@nil{}\let\ecolumn\@empty
+ \bgroup\color@begingroup}
+\def\tabu@endpboxmeasure {%
+ \@finalstrut \@arstrutbox
+ \end{varwidth}\egroup % <got my \tabu@box>
+ \ifdim \tabu@temp\p@ <\z@ % neg coef
+ \ifdim \tabu@wd\tabu@Xcol <\wd\tabu@box
+ \tabu@wddef\tabu@Xcol {\the\wd\tabu@box}%
+ \tabu@debug{\tabu@message@endpboxmeasure}%
+ \fi
+ \else % spread coef>0
+ \global\advance \tabu@naturalX \wd\tabu@box
+ \@tempdima =\dimexpr \wd\tabu@box *\p@/\dimexpr \tabu@temp\p@\relax \relax
+ \ifdim \tabu@naturalXmax <\tabu@naturalX
+ \xdef\tabu@naturalXmax {\the\tabu@naturalX}\fi
+ \ifdim \tabu@naturalXmin <\@tempdima
+ \xdef\tabu@naturalXmin {\the\@tempdima}\fi
+ \fi
+ \box\tabu@box \egroup % end of \vtop (measure) restore \tabu@target
+}% \tabu@endpboxmeasure
+\def\tabu@wddef #1{\expandafter\xdef
+ \csname tabu@\the\tabu@nested.W\number#1\endcsname}
+\def\tabu@wd #1{\csname tabu@\the\tabu@nested.W\number#1\endcsname}
+\def\tabu@message@endpboxmeasure{\tabu@spaces\tabu@spaces<-> % <-> save natural wd
+ \the\tabu@Xcol. X[\tabu@temp]:
+ target = \the\tabucolX \space
+ \expandafter\expandafter\expandafter\string\tabu@wd\tabu@Xcol
+ =\tabu@wd\tabu@Xcol
+}% \tabu@message@endpboxmeasure
+\def\tabu@startpboxquick {\bgroup
+ \let\@startpbox \tabu@startpboxORI % restore immediately
+ \let\tabu \tabu@quick % \begin is expanded before...
+ \expandafter\@gobble \@startpbox % gobbles \bgroup
+}% \tabu@startpboxquick
+\def\tabu@quick {\begingroup \iffalse{\fi \ifnum0=`}\fi
+ \toks@{}\def\tabu@stack{b}\tabu@collectbody \tabu@endquick
+}% \tabu@quick
+\def\tabu@endquick {%
+ \ifodd 1\ifx\tabu@end@envir\tabu@endtabu \else
+ \ifx\tabu@end@envir\tabu@endtabus \else 0\fi\fi\relax
+ \endgroup
+ \else \let\endtabu \relax
+ \tabu@end@envir
+ \fi
+}% \tabu@quick
+\def\tabu@endtabu {\end{tabu}}
+\def\tabu@endtabus {\end{tabu*}}
+%% Measuring the heights and depths - store the results -------------
+\def\tabu@verticalmeasure{\everypar{}%
+ \ifnum \currentgrouptype>12 % 14=semi-simple, 15=math shift group
+ \setbox\tabu@box =\hbox\bgroup
+ \let\tabu@verticalspacing \tabu@verticalsp@lcr
+ \d@llarbegin % after \hbox ...
+ \else
+ \edef\tabu@temp{\ifnum\currentgrouptype=5\vtop
+ \else\ifnum\currentgrouptype=12\vcenter
+ \else\vbox\fi\fi}%
+ \setbox\tabu@box \hbox\bgroup$\tabu@temp \bgroup
+ \let\tabu@verticalspacing \tabu@verticalsp@pmb
+ \fi
+}% \tabu@verticalmeasure
+\def\tabu@verticalsp@lcr{%
+ \d@llarend \egroup % <got my \tabu@box>
+ \@tempdima \dimexpr \ht\tabu@box+\abovetabulinesep
+ \@tempdimb \dimexpr \dp\tabu@box+\belowtabulinesep \relax
+ \ifdim\tabustrutrule>\z@ \tabu@debug{\tabu@message@verticalsp}\fi
+ \ifdim \tabu@ht<\@tempdima \tabu@htdef{\the\@tempdima}\fi
+ \ifdim \tabu@dp<\@tempdimb \tabu@dpdef{\the\@tempdimb}\fi
+ \noindent\vrule height\@tempdima depth\@tempdimb
+}% \tabu@verticalsp@lcr
+\def\tabu@verticalsp@pmb{% inserts struts as needed
+ \par \expandafter\egroup
+ \expandafter$\expandafter
+ \egroup \expandafter
+ \@tempdimc \the\prevdepth
+ \@tempdima \dimexpr \ht\tabu@box+\abovetabulinesep
+ \@tempdimb \dimexpr \dp\tabu@box+\belowtabulinesep \relax
+ \ifdim\tabustrutrule>\z@ \tabu@debug{\tabu@message@verticalsp}\fi
+ \ifdim \tabu@ht<\@tempdima \tabu@htdef{\the\@tempdima}\fi
+ \ifdim \tabu@dp<\@tempdimb \tabu@dpdef{\the\@tempdimb}\fi
+ \let\@finalstrut \@gobble
+ \hrule height\@tempdima depth\@tempdimb width\hsize
+%% \box\tabu@box
+}% \tabu@verticalsp@pmb
+
+\def\tabu@verticalinit{%
+ \ifnum \c@taburow=\z@ \tabu@rearstrut \fi % after \tabu@reset !
+ \advance\c@taburow \@ne
+ \tabu@htdef{\the\ht\@arstrutbox}\tabu@dpdef{\the\dp\@arstrutbox}%
+ \advance\c@taburow \m@ne
+}% \tabu@verticalinit
+\def\tabu@htdef {\expandafter\xdef \csname tabu@\the\tabu@nested.H\the\c@taburow\endcsname}
+\def\tabu@ht {\csname tabu@\the\tabu@nested.H\the\c@taburow\endcsname}
+\def\tabu@dpdef {\expandafter\xdef \csname tabu@\the\tabu@nested.D\the\c@taburow\endcsname}
+\def\tabu@dp {\csname tabu@\the\tabu@nested.D\the\c@taburow\endcsname}
+\def\tabu@verticaldynamicadjustment {%
+ \advance\c@taburow \@ne
+ \extrarowheight \dimexpr\tabu@ht - \ht\strutbox
+ \extrarowdepth \dimexpr\tabu@dp - \dp\strutbox
+ \let\arraystretch \@empty
+ \advance\c@taburow \m@ne
+}% \tabu@verticaldynamicadjustment
+\def\tabuphantomline{\crcr \noalign{%
+ {\globaldefs \@ne
+ \setbox\@arstrutbox \box\voidb@x
+ \let\tabu@@celllalign \tabu@celllalign
+ \let\tabu@@cellralign \tabu@cellralign
+ \let\tabu@@cellleft \tabu@cellleft
+ \let\tabu@@cellright \tabu@cellright
+ \let\tabu@@thevline \tabu@thevline
+ \let\tabu@celllalign \@empty
+ \let\tabu@cellralign \@empty
+ \let\tabu@cellright \@empty
+ \let\tabu@cellleft \@empty
+ \let\tabu@thevline \relax}%
+ \edef\tabu@temp{\tabu@multispan \tabu@nbcols{\noindent &}}%
+ \toks@\expandafter{\tabu@temp \noindent\tabu@everyrowfalse \cr
+ \noalign{\tabu@rearstrut
+ {\globaldefs\@ne
+ \let\tabu@celllalign \tabu@@celllalign
+ \let\tabu@cellralign \tabu@@cellralign
+ \let\tabu@cellleft \tabu@@cellleft
+ \let\tabu@cellright \tabu@@cellright
+ \let\tabu@thevline \tabu@@thevline}}}%
+ \expandafter}\the\toks@
+}% \tabuphantomline
+%% \firsthline and \lasthline corrections ---------------------------
+\def\tabu@firstline {\tabu@hlineAZ \tabu@firsthlinecorrection {}}
+\def\tabu@firsthline{\tabu@hlineAZ \tabu@firsthlinecorrection \hline}
+\def\tabu@lastline {\tabu@hlineAZ \tabu@lasthlinecorrection {}}
+\def\tabu@lasthline {\tabu@hlineAZ \tabu@lasthlinecorrection \hline}
+\def\tabu@hline {% replaces \hline if no colortbl (see \AtBeginDocument)
+ \noalign{\ifnum0=`}\fi
+ {\CT@arc@\hrule height\arrayrulewidth}%
+ \futurelet \tabu@temp \tabu@xhline
+}% \tabu@hline
+\def\tabu@xhline{%
+ \ifx \tabu@temp \hline
+ {\ifx \CT@drsc@\relax \vskip
+ \else\ifx \CT@drsc@\@empty \vskip
+ \else \CT@drsc@\hrule height
+ \fi\fi
+ \doublerulesep}%
+ \fi
+ \ifnum0=`{\fi}%
+}% \tabu@xhline
+\def\tabu@hlineAZ #1#2{\noalign{\ifnum0=`}\fi \dimen@ \z@ \count@ \z@
+ \toks@{}\def\tabu@hlinecorrection{#1}\def\tabu@temp{#2}%
+ \tabu@hlineAZsurround
+}% \tabu@hlineAZ
+\newcommand*\tabu@hlineAZsurround[1][\extratabsurround]{%
+ \extratabsurround #1\let\tabucline \tabucline@scan
+ \let\hline \tabu@hlinescan \let\firsthline \hline
+ \let\cline \tabu@clinescan \let\lasthline \hline
+ \expandafter \futurelet \expandafter \tabu@temp
+ \expandafter \tabu@nexthlineAZ \tabu@temp
+}% \tabu@hlineAZsurround
+\def\tabu@hlinescan {\tabu@thick \arrayrulewidth \tabu@xhlineAZ \hline}
+\def\tabu@clinescan #1{\tabu@thick \arrayrulewidth \tabu@xhlineAZ {\cline{#1}}}
+\def\tabucline@scan{\@testopt \tabucline@sc@n {}}
+\def\tabucline@sc@n #1[#2]{\tabu@xhlineAZ {\tabucline[{#1}]{#2}}}
+\def\tabu@nexthlineAZ{%
+ \ifx \tabu@temp\hline \else
+ \ifx \tabu@temp\cline \else
+ \ifx \tabu@temp\tabucline \else
+ \tabu@hlinecorrection
+ \fi\fi\fi
+}% \tabu@nexthlineAZ
+\def\tabu@xhlineAZ #1{%
+ \toks@\expandafter{\the\toks@ #1}%
+ \@tempdimc \tabu@thick % The last line width
+ \ifcase\count@ \@tempdimb \tabu@thick % The first line width
+ \else \advance\dimen@ \dimexpr \tabu@thick+\doublerulesep \relax
+ \fi
+ \advance\count@ \@ne \futurelet \tabu@temp \tabu@nexthlineAZ
+}% \tabu@xhlineAZ
+\def\tabu@firsthlinecorrection{% \count@ = number of \hline -1
+ \@tempdima \dimexpr \ht\@arstrutbox+\dimen@
+ \edef\firsthline{% <local in \noalign>
+ \omit \hbox to\z@{\hss{\noexpand\tabu@DBG{yellow}\vrule
+ height \the\dimexpr\@tempdima+\extratabsurround
+ depth \dp\@arstrutbox
+ width \tabustrutrule}\hss}\cr
+ \noalign{\vskip -\the\dimexpr \@tempdima+\@tempdimb
+ +\dp\@arstrutbox \relax}%
+ \the\toks@
+ }\ifnum0=`{\fi
+ \expandafter}\firsthline % we are then !
+}% \tabu@firsthlinecorrection
+\def\tabu@lasthlinecorrection{%
+ \@tempdima \dimexpr \dp\@arstrutbox+\dimen@+\@tempdimb+\@tempdimc
+ \edef\lasthline{% <local in \noalign>
+ \the\toks@
+ \noalign{\vskip -\the\dimexpr\dimen@+\@tempdimb+\dp\@arstrutbox}%
+ \omit \hbox to\z@{\hss{\noexpand\tabu@DBG{yellow}\vrule
+ depth \the\dimexpr \dp\@arstrutbox+\@tempdimb+\dimen@
+ +\extratabsurround-\@tempdimc
+ height \z@
+ width \tabustrutrule}\hss}\cr
+ }\ifnum0=`{\fi
+ \expandafter}\lasthline % we are then !
+}% \tabu@lasthlinecorrection
+\def\tabu@LT@@hline{%
+ \ifx\LT@next\hline
+ \global\let\LT@next \@gobble
+ \ifx \CT@drsc@\relax
+ \gdef\CT@LT@sep{%
+ \noalign{\penalty-\@medpenalty\vskip\doublerulesep}}%
+ \else
+ \gdef\CT@LT@sep{%
+ \multispan\LT@cols{%
+ \CT@drsc@\leaders\hrule\@height\doublerulesep\hfill}\cr}%
+ \fi
+ \else
+ \global\let\LT@next\empty
+ \gdef\CT@LT@sep{%
+ \noalign{\penalty-\@lowpenalty\vskip-\arrayrulewidth}}%
+ \fi
+ \ifnum0=`{\fi}%
+ \multispan\LT@cols
+ {\CT@arc@\leaders\hrule\@height\arrayrulewidth\hfill}\cr
+ \CT@LT@sep
+ \multispan\LT@cols
+ {\CT@arc@\leaders\hrule\@height\arrayrulewidth\hfill}\cr
+ \noalign{\penalty\@M}%
+ \LT@next
+}% \tabu@LT@@hline
+%% Horizontal lines : \tabucline ------------------------------------
+\let\tabu@start \@tempcnta
+\let\tabu@stop \@tempcntb
+\newcommand*\tabucline{\noalign{\ifnum0=`}\fi \tabu@cline}
+\newcommand*\tabu@cline[2][]{\tabu@startstop{#2}%
+ \ifnum \tabu@stop<\z@ \toks@{}%
+ \else \tabu@clinearg{#1}\tabu@thestyle
+ \edef\tabucline{\toks@{%
+ \ifnum \tabu@start>\z@ \omit
+ \tabu@multispan\tabu@start {\span\omit}&\fi
+ \omit \tabu@multispan\tabu@stop {\span\omit}%
+ \tabu@thehline\cr
+ }}\tabucline
+ \tabu@tracinglines{(tabu:tabucline) Style: #1^^J\the\toks@^^J^^J}%
+ \fi
+ \futurelet \tabu@temp \tabu@xcline
+}% \tabu@cline
+\def\tabu@clinearg #1{%
+ \ifx\\#1\\\let\tabu@thestyle \tabu@ls@
+ \else \@defaultunits \expandafter\let\expandafter\@tempa
+ \romannumeral-`\0#1\relax \@nnil
+ \ifx \hbox\@tempa \tabu@clinebox{#1}%
+ \else\ifx \box\@tempa \tabu@clinebox{#1}%
+ \else\ifx \vbox\@tempa \tabu@clinebox{#1}%
+ \else\ifx \vtop\@tempa \tabu@clinebox{#1}%
+ \else\ifx \copy\@tempa \tabu@clinebox{#1}%
+ \else\ifx \leaders\@tempa \tabu@clineleads{#1}%
+ \else\ifx \cleaders\@tempa \tabu@clineleads{#1}%
+ \else\ifx \xleaders\@tempa \tabu@clineleads{#1}%
+ \else\tabu@getline {#1}%
+ \fi\fi\fi\fi\fi\fi\fi\fi
+ \fi
+}% \tabu@clinearg
+\def\tabu@clinebox #1{\tabu@clineleads{\xleaders#1\hss}}
+\def\tabu@clineleads #1{%
+ \let\tabu@thestyle \relax \let\tabu@leaders \@undefined
+ \gdef\tabu@thehrule{#1}}
+\def\tabu@thehline{\begingroup
+ \ifdefined\tabu@leaders
+ \noexpand\tabu@thehleaders
+ \else \noexpand\tabu@thehrule
+ \fi \endgroup
+}% \tabu@thehline
+\def\tabu@xcline{%
+ \ifx \tabu@temp\tabucline
+ \toks@\expandafter{\the\toks@ \noalign
+ {\ifx\CT@drsc@\relax \vskip
+ \else \CT@drsc@\hrule height
+ \fi
+ \doublerulesep}}%
+ \fi
+ \tabu@docline
+}% \tabu@xcline
+\def\tabu@docline {\ifnum0=`{\fi \expandafter}\the\toks@}
+\def\tabu@docline@evr {\xdef\tabu@doclineafter{\the\toks@}%
+ \ifnum0=`{\fi}\aftergroup\tabu@doclineafter}
+\def\tabu@multispan #1#2{%
+ \ifnum\numexpr#1>\@ne #2\expandafter\tabu@multispan
+ \else \expandafter\@gobbletwo
+ \fi {#1-1}{#2}%
+}% \tabu@multispan
+\def\tabu@startstop #1{\tabu@start@stop #1\relax 1-\tabu@nbcols \@nnil}
+\def\tabu@start@stop #1-#2\@nnil{%
+ \@defaultunits \tabu@start\number 0#1\relax \@nnil
+ \@defaultunits \tabu@stop \number 0#2\relax \@nnil
+ \tabu@stop \ifnum \tabu@start>\tabu@nbcols \m@ne
+ \else\ifnum \tabu@stop=\z@ \tabu@nbcols
+ \else\ifnum \tabu@stop>\tabu@nbcols \tabu@nbcols
+ \else \tabu@stop
+ \fi\fi\fi
+ \advance\tabu@start \m@ne
+ \ifnum \tabu@start>\z@ \advance\tabu@stop -\tabu@start \fi
+}% \tabu@start@stop
+%% Numbers: siunitx S columns (and \tabudecimal) -------------------
+\def\tabu@tabudecimal #1{%
+ \def\tabu@decimal{#1}\@temptokena{}%
+ \let\tabu@getdecimal@ \tabu@getdecimal@ignorespaces
+ \tabu@scandecimal
+}% \tabu@tabudecimal
+\def\tabu@scandecimal{\futurelet \tabu@temp \tabu@getdecimal@}
+\def\tabu@skipdecimal#1{#1\tabu@scandecimal}
+\def\tabu@getdecimal@ignorespaces{%
+ \ifcase 0\ifx\tabu@temp\ignorespaces\else
+ \ifx\tabu@temp\@sptoken1\else
+ 2\fi\fi\relax
+ \let\tabu@getdecimal@ \tabu@getdecimal
+ \expandafter\tabu@skipdecimal
+ \or \expandafter\tabu@gobblespace\expandafter\tabu@scandecimal
+ \else \expandafter\tabu@skipdecimal
+ \fi
+}% \tabu@getdecimal@ignorespaces
+\def\tabu@get@decimal#1{\@temptokena\expandafter{\the\@temptokena #1}%
+ \tabu@scandecimal}
+\def\do#1{%
+ \def\tabu@get@decimalspace#1{%
+ \@temptokena\expandafter{\the\@temptokena #1}\tabu@scandecimal}%
+}\do{ }
+\let\tabu@@tabudecimal \tabu@tabudecimal
+\def\tabu@getdecimal{%
+ \ifcase 0\ifx 0\tabu@temp\else
+ \ifx 1\tabu@temp\else
+ \ifx 2\tabu@temp\else
+ \ifx 3\tabu@temp\else
+ \ifx 4\tabu@temp\else
+ \ifx 5\tabu@temp\else
+ \ifx 6\tabu@temp\else
+ \ifx 7\tabu@temp\else
+ \ifx 8\tabu@temp\else
+ \ifx 9\tabu@temp\else
+ \ifx .\tabu@temp\else
+ \ifx ,\tabu@temp\else
+ \ifx -\tabu@temp\else
+ \ifx +\tabu@temp\else
+ \ifx e\tabu@temp\else
+ \ifx E\tabu@temp\else
+ \ifx\tabu@cellleft\tabu@temp1\else
+ \ifx\ignorespaces\tabu@temp1\else
+ \ifx\@sptoken\tabu@temp2\else
+ 3\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\relax
+ \expandafter\tabu@get@decimal
+ \or \expandafter\tabu@skipdecimal
+ \or \expandafter\tabu@get@decimalspace
+ \else\expandafter\tabu@printdecimal
+ \fi
+}% \tabu@getdecimal
+\def\tabu@printdecimal{%
+ \edef\tabu@temp{\the\@temptokena}%
+ \ifx\tabu@temp\@empty\else
+ \ifx\tabu@temp\space\else
+ \expandafter\tabu@decimal\expandafter{\the\@temptokena}%
+ \fi\fi
+}% \tabu@printdecimal
+%% Verbatim inside X columns ----------------------------------------
+\def\tabu@verbatim{%
+ \let\verb \tabu@verb
+ \let\FV@DefineCheckEnd \tabu@FV@DefineCheckEnd
+}% \tabu@verbatim
+\let\tabu@ltx@verb \verb
+\def\tabu@verb{\@ifstar {\tabu@ltx@verb*} \tabu@ltx@verb}
+\def\tabu@fancyvrb {%
+ \def\tabu@FV@DefineCheckEnd ##1{%
+ \def\tabu@FV@DefineCheckEnd{%
+ ##1% <original definition (if fancyvrb is loaded)>
+ \let\FV@CheckEnd \tabu@FV@CheckEnd
+ \let\FV@@CheckEnd \tabu@FV@@CheckEnd
+ \let\FV@@@CheckEnd \tabu@FV@@@CheckEnd
+ \edef\FV@EndScanning{%
+ \def\noexpand\next{\noexpand\end{\FV@EnvironName}}%
+ \global\let\noexpand\FV@EnvironName\relax
+ \noexpand\next}%
+ \xdef\FV@EnvironName{\detokenize\expandafter{\FV@EnvironName}}}%
+ }\expandafter\tabu@FV@DefineCheckEnd\expandafter{\FV@DefineCheckEnd}
+}% \tabu@fancyvrb
+\def\tabu@FV@CheckEnd #1{\expandafter\FV@@CheckEnd \detokenize{#1\end{}}\@nil}
+\edef\tabu@FV@@@CheckEnd {\detokenize{\end{}}}
+\begingroup
+\catcode`\[1 \catcode`\]2
+\@makeother\{ \@makeother\}
+ \edef\x[\endgroup
+ \def\noexpand\tabu@FV@@CheckEnd ##1\detokenize[\end{]##2\detokenize[}]##3%
+ ]\x \@nil{\def\@tempa{#2}\def\@tempb{#3}}
+\def\tabu@FV@ListProcessLine #1{%
+ \hbox {%to \hsize{%
+ \kern\leftmargin
+ \hbox {%to \linewidth{%
+ \FV@LeftListNumber
+ \FV@LeftListFrame
+ \FancyVerbFormatLine{#1}\hss
+%% DG/SR modification begin - Jan. 28, 1998 (for numbers=right add-on)
+%% \FV@RightListFrame}%
+ \FV@RightListFrame
+ \FV@RightListNumber}%
+%% DG/SR modification end
+ \hss}}
+%% \savetabu --------------------------------------------------------
+\newcommand*\savetabu[1]{\noalign{%
+ \tabu@sanitizearg{#1}\tabu@temp
+ \ifx \tabu@temp\@empty \tabu@savewarn{}{The tabu will not be saved}\else
+ \@ifundefined{tabu@saved@\tabu@temp}{}{\tabu@savewarn{#1}{Overwriting}}%
+ \ifdefined\tabu@restored \expandafter\let
+ \csname tabu@saved@\tabu@temp \endcsname \tabu@restored
+ \else {\tabu@save}%
+ \fi
+ \fi}%
+}% \savetabu
+\def\tabu@save {%
+ \toks0\expandafter{\tabu@saved@}%
+ \iftabu@negcoef
+ \let\tabu@wddef \relax \let\tabu@ \tabu@savewd \edef\tabu@savewd{\tabu@Xcoefs}%
+ \toks0\expandafter{\the\toks\expandafter0\tabu@savewd}\fi
+ \toks1\expandafter{\tabu@savedpream}%
+ \toks2\expandafter{\tabu@savedpreamble}%
+ \let\@preamble \relax
+ \let\tabu@savedpream \relax \let\tabu@savedparams \relax
+ \edef\tabu@preamble{%
+ \def\noexpand\tabu@aligndefault{\tabu@align}%
+ \def\tabu@savedparams {\noexpand\the\toks0}%
+ \def\tabu@savedpream {\noexpand\the\toks1}}%
+ \edef\tabu@usetabu{%
+ \def\@preamble {\noexpand\the\toks2}%
+ \tabu@target \the\tabu@target \relax
+ \tabucolX \the\tabucolX \relax
+ \tabu@nbcols \the\tabu@nbcols \relax
+ \def\noexpand\tabu@aligndefault{\tabu@align}%
+ \def\tabu@savedparams {\noexpand\the\toks0}%
+ \def\tabu@savedpream {\noexpand\the\toks1}}%
+ \let\tabu@aligndefault \relax \let\@sharp \relax
+ \edef\@tempa{\noexpand\tabu@s@ved
+ {\tabu@usetabu}
+ {\tabu@preamble}
+ {\the\toks1}}\@tempa
+ \tabu@message@save
+}% \tabu@save
+\long\def\tabu@s@ved #1#2#3{%
+ \def\tabu@usetabu{#1}% <for \tabu@message@save>
+ \expandafter\gdef\csname tabu@saved@\tabu@temp\endcsname ##1{%
+ \ifodd ##1% \usetabu
+ \tabu@measuringfalse \tabu@spreadfalse % Just in case...
+ \gdef\tabu@usetabu {%
+ \ifdim \tabu@target>\z@ \tabu@warn@usetabu \fi
+ \global\let\tabu@usetabu \@undefined
+ \def\@halignto {to\tabu@target}%
+ #1%
+ \ifx \tabu@align\tabu@aligndefault@text
+ \ifnum \tabu@nested=\z@
+ \let\tabu@align \tabu@aligndefault \fi\fi}%
+ \else % \preamble
+ \gdef\tabu@preamble {%
+ \global\let\tabu@preamble \@undefined
+ #2%
+ \ifx \tabu@align\tabu@aligndefault@text
+ \ifnum \tabu@nested=\z@
+ \let\tabu@align \tabu@aligndefault \fi\fi}%
+ \fi
+ #3}%
+}% \tabu@s@ved
+\def\tabu@aligndefault@text {\tabu@aligndefault}%
+\def\tabu@warn@usetabu {\PackageWarning{tabu}
+ {Specifying a target with \string\usetabu\space is useless
+ \MessageBreak The target cannot be changed!}}
+\def\tabu@savewd #1#2{\ifdim #2\p@<\z@ \tabu@wddef{#1}{\tabu@wd{#1}}\fi}
+\def\tabu@savewarn#1#2{\PackageInfo{tabu}
+ {User-name `#1' already used for \string\savetabu
+ \MessageBreak #2}}%
+\def\tabu@saveerr#1{\PackageError{tabu}
+ {User-name `#1' is unknown for \string\usetabu
+ \MessageBreak I cannot restore an unknown preamble!}\@ehd}
+%% \rowfont ---------------------------------------------------------
+\newskip \tabu@cellskip
+\def\tabu@rowfont{\ifdim \baselineskip=\z@\noalign\fi
+ {\ifnum0=`}\fi \tabu@row@font}
+\newcommand*\tabu@row@font[2][]{%
+ \ifnum7=\currentgrouptype
+ \global\let\tabu@@cellleft \tabu@cellleft
+ \global\let\tabu@@cellright \tabu@cellright
+ \global\let\tabu@@celllalign \tabu@celllalign
+ \global\let\tabu@@cellralign \tabu@cellralign
+ \global\let\tabu@@rowfontreset\tabu@rowfontreset
+ \fi
+ \global\let\tabu@rowfontreset \tabu@rowfont@reset
+ \expandafter\gdef\expandafter\tabu@cellleft\expandafter{\tabu@cellleft #2}%
+ \ifcsname tabu@cell@#1\endcsname % row alignment
+ \csname tabu@cell@#1\endcsname \fi
+ \ifnum0=`{\fi}% end of group / noalign group
+}% \rowfont
+\def\tabu@ifcolorleavevmode #1{\let\color \tabu@leavevmodecolor #1\let\color\tabu@color}%
+\def\tabu@rowfont@reset{%
+ \global\let\tabu@rowfontreset \tabu@@rowfontreset
+ \global\let\tabu@cellleft \tabu@@cellleft
+ \global\let\tabu@cellright \tabu@@cellright
+ \global\let\tabu@cellfont \@empty
+ \global\let\tabu@celllalign \tabu@@celllalign
+ \global\let\tabu@cellralign \tabu@@cellralign
+}% \tabu@@rowfontreset
+\let\tabu@rowfontreset \@empty % overwritten \AtBeginDocument if colortbl
+%% \tabu@prepnext@tok -----------------------------------------------
+\newif \iftabu@cellright
+\def\tabu@prepnext@tok{%
+ \ifnum \count@<\z@ % <first initialisation>
+ \@tempcnta \@M % <not initialized by array.sty>
+ \tabu@nbcols\z@
+ \let\tabu@fornoopORI \@fornoop
+ \tabu@cellrightfalse
+ \else
+ \ifcase \numexpr \count@-\@tempcnta \relax % (case 0): prev. token is left
+ \advance \tabu@nbcols \@ne
+ \iftabu@cellright % before-previous token is right and is finished
+ \tabu@cellrightfalse % <only once>
+ \tabu@righttok
+ \fi
+ \tabu@lefttok
+ \or % (case 1) previous token is right
+ \tabu@cellrighttrue \let\@fornoop \tabu@lastnoop
+ \else % special column: do not change the token
+ \iftabu@cellright % before-previous token is right
+ \tabu@cellrightfalse
+ \tabu@righttok
+ \fi
+ \fi % \ifcase
+ \fi
+ \tabu@prepnext@tokORI
+}% \tabu@prepnext@tok
+\long\def\tabu@lastnoop#1\@@#2#3{\tabu@lastn@@p #2\@nextchar \in@\in@@}
+\def\tabu@lastn@@p #1\@nextchar #2#3\in@@{%
+ \ifx \in@#2\else
+ \let\@fornoop \tabu@fornoopORI
+ \xdef\tabu@mkpreambuffer{\tabu@nbcols\the\tabu@nbcols \tabu@mkpreambuffer}%
+ \toks0\expandafter{\expandafter\tabu@everyrowtrue \the\toks0}%
+ \expandafter\prepnext@tok
+ \fi
+}% \tabu@lastnoop
+\def\tabu@righttok{%
+ \advance \count@ \m@ne
+ \toks\count@\expandafter {\the\toks\count@ \tabu@cellright \tabu@cellralign}%
+ \advance \count@ \@ne
+}% \tabu@righttok
+\def\tabu@lefttok{\toks\count@\expandafter{\expandafter\tabu@celllalign
+ \the\toks\count@ \tabu@cellleft}% after because of $
+}% \tabu@lefttok
+%% Neutralisation of glues ------------------------------------------
+\let\tabu@cellleft \@empty
+\let\tabu@cellright \@empty
+\tabu@celllalign@def{\tabu@cellleft}%
+\let\tabu@cellralign \@empty
+\def\tabu@cell@align #1#2#3{%
+ \let\tabu@maybesiunitx \toks@ \tabu@celllalign
+ \global \expandafter \tabu@celllalign@def \expandafter {\the\toks@ #1}%
+ \toks@\expandafter{\tabu@cellralign #2}%
+ \xdef\tabu@cellralign{\the\toks@}%
+ \toks@\expandafter{\tabu@cellleft #3}%
+ \xdef\tabu@cellleft{\the\toks@}%
+}% \tabu@cell@align
+\def\tabu@cell@l{% force alignment to left
+ \tabu@cell@align
+ {\tabu@removehfil \raggedright \tabu@cellleft}% left
+ {\tabu@flush1\tabu@ignorehfil}% right
+ \raggedright
+}% \tabu@cell@l
+\def\tabu@cell@c{% force alignment to center
+ \tabu@cell@align
+ {\tabu@removehfil \centering \tabu@flush{.5}\tabu@cellleft}
+ {\tabu@flush{.5}\tabu@ignorehfil}
+ \centering
+}% \tabu@cell@c
+\def\tabu@cell@r{% force alignment to right
+ \tabu@cell@align
+ {\tabu@removehfil \raggedleft \tabu@flush1\tabu@cellleft}
+ \tabu@ignorehfil
+ \raggedleft
+}% \tabu@cell@r
+\def\tabu@cell@j{% force justification (for p, m, b columns)
+ \tabu@cell@align
+ {\tabu@justify\tabu@cellleft}
+ {}
+ \tabu@justify
+}% \tabu@cell@j
+\def\tabu@justify{%
+ \leftskip\z@skip \@rightskip\leftskip \rightskip\@rightskip
+ \parfillskip\@flushglue
+}% \tabu@justify
+%% ragged2e settings
+\def\tabu@cell@L{% force alignment to left (ragged2e)
+ \tabu@cell@align
+ {\tabu@removehfil \RaggedRight \tabu@cellleft}
+ {\tabu@flush 1\tabu@ignorehfil}
+ \RaggedRight
+}% \tabu@cell@L
+\def\tabu@cell@C{% force alignment to center (ragged2e)
+ \tabu@cell@align
+ {\tabu@removehfil \Centering \tabu@flush{.5}\tabu@cellleft}
+ {\tabu@flush{.5}\tabu@ignorehfil}
+ \Centering
+}% \tabu@cell@C
+\def\tabu@cell@R{% force alignment to right (ragged2e)
+ \tabu@cell@align
+ {\tabu@removehfil \RaggedLeft \tabu@flush 1\tabu@cellleft}
+ \tabu@ignorehfil
+ \RaggedLeft
+}% \tabu@cell@R
+\def\tabu@cell@J{% force justification (ragged2e)
+ \tabu@cell@align
+ {\justifying \tabu@cellleft}
+ {}
+ \justifying
+}% \tabu@cell@J
+\def\tabu@flush#1{%
+ \iftabu@colortbl % colortbl uses \hfill rather than \hfil
+ \hskip \ifnum13<\currentgrouptype \stretch{#1}%
+ \else \ifdim#1pt<\p@ \tabu@cellskip
+ \else \stretch{#1}
+ \fi\fi \relax
+ \else % array.sty
+ \ifnum 13<\currentgrouptype
+ \hfil \hskip1sp \relax \fi
+ \fi
+}% \tabu@flush
+\let\tabu@hfil \hfil
+\let\tabu@hfill \hfill
+\let\tabu@hskip \hskip
+\def\tabu@removehfil{%
+ \iftabu@colortbl
+ \unkern \tabu@cellskip =\lastskip
+ \ifnum\gluestretchorder\tabu@cellskip =\tw@ \hskip-\tabu@cellskip
+ \else \tabu@cellskip \z@skip
+ \fi
+ \else
+ \ifdim\lastskip=1sp\unskip\fi
+ \ifnum\gluestretchorder\lastskip =\@ne
+ \hfilneg % \hfilneg for array.sty but not for colortbl...
+ \fi
+ \fi
+}% \tabu@removehfil
+\def\tabu@ignorehfil{\aftergroup \tabu@nohfil}
+\def\tabu@nohfil{% \hfil -> do nothing + restore original \hfil
+ \def\hfil{\let\hfil \tabu@hfil}% local to (alignment template) group
+}% \tabu@nohfil
+\def\tabu@colortblalignments {% if colortbl
+ \def\tabu@nohfil{%
+ \def\hfil {\let\hfil \tabu@hfil}% local to (alignment template) group
+ \def\hfill {\let\hfill \tabu@hfill}% (colortbl uses \hfill) pfff...
+ \def\hskip ####1\relax{\let\hskip \tabu@hskip}}% local
+}% \tabu@colortblalignments
+%% Taking care of footnotes and hyperfootnotes ----------------------
+\long\def\tabu@footnotetext #1{%
+ \edef\@tempa{\the\tabu@footnotes
+ \noexpand\footnotetext [\the\csname c@\@mpfn\endcsname]}%
+ \global\tabu@footnotes\expandafter{\@tempa {#1}}}%
+\long\def\tabu@xfootnotetext [#1]#2{%
+ \global\tabu@footnotes\expandafter{\the\tabu@footnotes
+ \footnotetext [{#1}]{#2}}}
+\let\tabu@xfootnote \@xfootnote
+\long\def\tabu@Hy@ftntext{\tabu@Hy@ftntxt {\the \c@footnote }}
+\long\def\tabu@Hy@xfootnote [#1]{%
+ \begingroup
+ \value\@mpfn #1\relax
+ \protected@xdef \@thefnmark {\thempfn}%
+ \endgroup
+ \@footnotemark \tabu@Hy@ftntxt {#1}%
+}% \tabu@Hy@xfootnote
+\long\def\tabu@Hy@ftntxt #1#2{%
+ \edef\@tempa{%
+ \the\tabu@footnotes
+ \begingroup
+ \value\@mpfn #1\relax
+ \noexpand\protected@xdef\noexpand\@thefnmark {\noexpand\thempfn}%
+ \expandafter \noexpand \expandafter
+ \tabu@Hy@footnotetext \expandafter{\Hy@footnote@currentHref}%
+ }%
+ \global\tabu@footnotes\expandafter{\@tempa {#2}%
+ \endgroup}%
+}% \tabu@Hy@ftntxt
+\long\def\tabu@Hy@footnotetext #1#2{%
+ \H@@footnotetext{%
+ \ifHy@nesting
+ \hyper@@anchor {#1}{#2}%
+ \else
+ \Hy@raisedlink{%
+ \hyper@@anchor {#1}{\relax}%
+ }%
+ \def\@currentHref {#1}%
+ \let\@currentlabelname \@empty
+ #2%
+ \fi
+ }%
+}% \tabu@Hy@footnotetext
+%% No need for \arraybackslash ! ------------------------------------
+\def\tabu@latextwoe {%
+\def\tabu@temp##1##2##3{{\toks@\expandafter{##2##3}\xdef##1{\the\toks@}}}
+\tabu@temp \tabu@centering \centering \arraybackslash
+\tabu@temp \tabu@raggedleft \raggedleft \arraybackslash
+\tabu@temp \tabu@raggedright \raggedright \arraybackslash
+}% \tabu@latextwoe
+\def\tabu@raggedtwoe {%
+\def\tabu@temp ##1##2##3{{\toks@\expandafter{##2##3}\xdef##1{\the\toks@}}}
+\tabu@temp \tabu@Centering \Centering \arraybackslash
+\tabu@temp \tabu@RaggedLeft \RaggedLeft \arraybackslash
+\tabu@temp \tabu@RaggedRight \RaggedRight \arraybackslash
+\tabu@temp \tabu@justifying \justifying \arraybackslash
+}% \tabu@raggedtwoe
+\def\tabu@normalcrbackslash{\let\\\@normalcr}
+\def\tabu@trivlist{\expandafter\def\expandafter\@trivlist\expandafter{%
+ \expandafter\tabu@normalcrbackslash \@trivlist}}
+%% Utilities: \fbox \fcolorbox and \tabudecimal -------------------
+\def\tabu@fbox {\leavevmode\afterassignment\tabu@beginfbox \setbox\@tempboxa\hbox}
+\def\tabu@beginfbox {\bgroup \kern\fboxsep
+ \bgroup\aftergroup\tabu@endfbox}
+\def\tabu@endfbox {\kern\fboxsep\egroup\egroup
+ \@frameb@x\relax}
+\def\tabu@color@b@x #1#2{\leavevmode \bgroup
+ \def\tabu@docolor@b@x{#1{#2\color@block{\wd\z@}{\ht\z@}{\dp\z@}\box\z@}}%
+ \afterassignment\tabu@begincolor@b@x \setbox\z@ \hbox
+}% \tabu@color@b@x
+\def\tabu@begincolor@b@x {\kern\fboxsep \bgroup
+ \aftergroup\tabu@endcolor@b@x \set@color}
+\def\tabu@endcolor@b@x {\kern\fboxsep \egroup
+ \dimen@\ht\z@ \advance\dimen@ \fboxsep \ht\z@ \dimen@
+ \dimen@\dp\z@ \advance\dimen@ \fboxsep \dp\z@ \dimen@
+ \tabu@docolor@b@x \egroup
+}% \tabu@endcolor@b@x
+%% Corrections (arydshln, delarray, colortbl) -----------------------
+\def\tabu@fix@arrayright {%% \@arrayright is missing from \endarray
+ \iftabu@colortbl
+ \ifdefined\adl@array % <colortbl + arydshln>
+ \def\tabu@endarray{%
+ \adl@endarray \egroup \adl@arrayrestore \CT@end \egroup %<original>
+ \@arrayright % <FC>
+ \gdef\@preamble{}}% <FC>
+ \else % <colortbl / no arydshln>
+ \def\tabu@endarray{%
+ \crcr \egroup \egroup %<original>
+ \@arrayright % <FC>
+ \gdef\@preamble{}\CT@end}%
+ \fi
+ \else
+ \ifdefined\adl@array % <arydshln / no colortbl>
+ \def\tabu@endarray{%
+ \adl@endarray \egroup \adl@arrayrestore \egroup %<original>
+ \@arrayright % <FC>
+ \gdef\@preamble{}}% <FC>
+ \else % <no arydshln / no colotbl + \@arrayright missing>
+ \PackageWarning{tabu}
+ {\string\@arrayright\space is missing from the
+ \MessageBreak definition of \string\endarray.
+ \MessageBreak Compatibility with delarray.sty is broken.}%
+ \fi\fi
+}% \tabu@fix@arrayright
+\def\tabu@adl@xarraydashrule #1#2#3{%
+ \ifnum\@lastchclass=\adl@class@start\else
+ \ifnum\@lastchclass=\@ne\else
+ \ifnum\@lastchclass=5 \else % <FC> @-arg (class 5) and !-arg (class 1)
+ \adl@leftrulefalse \fi\fi % must be treated the same
+ \fi
+ \ifadl@zwvrule\else \ifadl@inactive\else
+ \@addtopreamble{\vrule\@width\arrayrulewidth
+ \@height\z@ \@depth\z@}\fi \fi
+ \ifadl@leftrule
+ \@addtopreamble{\adl@vlineL{\CT@arc@}{\adl@dashgapcolor}%
+ {\number#1}#3}%
+ \else \@addtopreamble{\adl@vlineR{\CT@arc@}{\adl@dashgapcolor}%
+ {\number#2}#3}
+ \fi
+}% \tabu@adl@xarraydashrule
+\def\tabu@adl@act@endpbox {%
+ \unskip \ifhmode \nobreak \fi \@finalstrut \@arstrutbox
+ \egroup \egroup
+ \adl@colhtdp \box\adl@box \hfil
+}% \tabu@adl@act@endpbox
+\def\tabu@adl@fix {%
+ \let\adl@xarraydashrule \tabu@adl@xarraydashrule % <fix> arydshln
+ \let\adl@act@endpbox \tabu@adl@act@endpbox % <fix> arydshln
+ \let\adl@act@@endpbox \tabu@adl@act@endpbox % <fix> arydshln
+ \let\@preamerror \@preamerr % <fix> arydshln
+}% \tabu@adl@fix
+%% Correction for longtable' \@startbox definition ------------------
+%% => \everypar is ``missing'' : TeX should be in vertical mode
+\def\tabu@LT@startpbox #1{%
+ \bgroup
+ \let\@footnotetext\LT@p@ftntext
+ \setlength\hsize{#1}%
+ \@arrayparboxrestore
+ \everypar{%
+ \vrule \@height \ht\@arstrutbox \@width \z@
+ \everypar{}}%
+}% \tabu@LT@startpbox
+%% \tracingtabu and the package options ------------------
+\DeclareOption{delarray}{\AtEndOfPackage{\RequirePackage{delarray}}}
+\DeclareOption{linegoal}{%
+ \AtEndOfPackage{%
+ \RequirePackage{linegoal}[2010/12/07]%
+ \let\tabudefaulttarget \linegoal% \linegoal is \linewidth if not pdfTeX
+}}
+\DeclareOption{scantokens}{\tabuscantokenstrue}
+\DeclareOption{debugshow}{\AtEndOfPackage{\tracingtabu=\tw@}}
+\def\tracingtabu {\begingroup\@ifnextchar=%
+ {\afterassignment\tabu@tracing\count@}
+ {\afterassignment\tabu@tracing\count@1\relax}}
+\def\tabu@tracing{\expandafter\endgroup
+ \expandafter\tabu@tr@cing \the\count@ \relax
+}% \tabu@tracing
+\def\tabu@tr@cing #1\relax {%
+ \ifnum#1>\thr@@ \let\tabu@tracinglines\message
+ \else \let\tabu@tracinglines\@gobble
+ \fi
+ \ifnum#1>\tw@ \let\tabu@DBG \tabu@@DBG
+ \def\tabu@mkarstrut {\tabu@DBG@arstrut}%
+ \tabustrutrule 1.5\p@
+ \else \let\tabu@DBG \@gobble
+ \def\tabu@mkarstrut {\tabu@arstrut}%
+ \tabustrutrule \z@
+ \fi
+ \ifnum#1>\@ne \let\tabu@debug \message
+ \else \let\tabu@debug \@gobble
+ \fi
+ \ifnum#1>\z@
+ \let\tabu@message \message
+ \let\tabu@tracing@save \tabu@message@save
+ \let\tabu@starttimer \tabu@pdftimer
+ \else
+ \let\tabu@message \@gobble
+ \let\tabu@tracing@save \@gobble
+ \let\tabu@starttimer \relax
+ \fi
+}% \tabu@tr@cing
+%% Setup \AtBeginDocument
+\AtBeginDocument{\tabu@AtBeginDocument}
+\def\tabu@AtBeginDocument{\let\tabu@AtBeginDocument \@undefined
+ \ifdefined\arrayrulecolor \tabu@colortbltrue % <colortbl>
+ \tabu@colortblalignments % different glues are used
+ \else \tabu@colortblfalse \fi
+ \ifdefined\CT@arc@ \else \let\CT@arc@ \relax \fi
+ \ifdefined\CT@drsc@\else \let\CT@drsc@ \relax \fi
+ \let\tabu@arc@L \CT@arc@ \let\tabu@drsc@L \CT@drsc@
+ \ifodd 1\ifcsname siunitx_table_collect_begin:Nn\endcsname % <siunitx: ok>
+ \expandafter\ifx
+ \csname siunitx_table_collect_begin:Nn\endcsname\relax 0\fi\fi\relax
+ \tabu@siunitxtrue
+ \else \let\tabu@maybesiunitx \@firstofone % <not siunitx: setup>
+ \let\tabu@siunitx \tabu@nosiunitx
+ \tabu@siunitxfalse
+ \fi
+ \ifdefined\adl@array % <arydshln>
+ \else \let\tabu@adl@fix \relax
+ \let\tabu@adl@endtrial \@empty \fi
+ \ifdefined\longtable % <longtable>
+ \else \let\longtabu \tabu@nolongtabu \fi
+ \ifdefined\cellspacetoplimit \tabu@warn@cellspace\fi
+ \csname\ifcsname ifHy@hyperfootnotes\endcsname % <hyperfootnotes>
+ ifHy@hyperfootnotes\else iffalse\fi\endcsname
+ \let\tabu@footnotetext \tabu@Hy@ftntext
+ \let\tabu@xfootnote \tabu@Hy@xfootnote \fi
+ \ifdefined\FV@DefineCheckEnd% <fancyvrb>
+ \tabu@fancyvrb \fi
+ \ifdefined\color % <color / xcolor>
+ \let\tabu@color \color
+ \def\tabu@leavevmodecolor ##1{%
+ \def\tabu@leavevmodecolor {\leavevmode ##1}%
+ }\expandafter\tabu@leavevmodecolor\expandafter{\color}%
+ \else
+ \let\tabu@color \tabu@nocolor
+ \let\tabu@leavevmodecolor \@firstofone \fi
+ \tabu@latextwoe
+ \ifdefined\@raggedtwoe@everyselectfont % <ragged2e>
+ \tabu@raggedtwoe
+ \else
+ \let\tabu@cell@L \tabu@cell@l
+ \let\tabu@cell@R \tabu@cell@r
+ \let\tabu@cell@C \tabu@cell@c
+ \let\tabu@cell@J \tabu@cell@j \fi
+ \expandafter\in@ \expandafter\@arrayright \expandafter{\endarray}%
+ \ifin@ \let\tabu@endarray \endarray
+ \else \tabu@fix@arrayright \fi% <fix for colortbl & arydshln (delarray)>
+ \everyrow{}%
+}% \tabu@AtBeginDocument
+\def\tabu@warn@cellspace{%
+ \PackageWarning{tabu}{%
+ Package cellspace has some limitations
+ \MessageBreak And redefines some macros of array.sty.
+ \MessageBreak Please use \string\tabulinesep\space to control
+ \MessageBreak vertical spacing of lines inside tabu environment}%
+}% \tabu@warn@cellspace
+%% tabu Package initialisation
+\tabuscantokensfalse
+\let\tabu@arc@G \relax
+\let\tabu@drsc@G \relax
+\let\tabu@evr@G \@empty
+\let\tabu@rc@G \@empty
+\def\tabu@ls@G {\tabu@linestyle@}%
+\let\tabu@@rowfontreset \@empty % <init>
+\let\tabu@@celllalign \@empty
+\let\tabu@@cellralign \@empty
+\let\tabu@@cellleft \@empty
+\let\tabu@@cellright \@empty
+\def\tabu@naturalXmin {\z@}
+\def\tabu@naturalXmax {\z@}
+\let\tabu@rowfontreset \@empty
+\def\tabulineon {4pt}\let\tabulineoff \tabulineon
+\tabu@everyrowtrue
+\ifdefined\pdfelapsedtime % <pdfTeX>
+ \def\tabu@pdftimer {\xdef\tabu@starttime{\the\pdfelapsedtime}}%
+\else \let\tabu@pdftimer \relax \let\tabu@message@etime \relax
+\fi
+\tracingtabu=\z@
+\newtabulinestyle {=\maxdimen}% creates the 'factory' settings \tabu@linestyle@
+\tabulinestyle{}
+\taburowcolors{}
+\let\tabudefaulttarget \linewidth
+\ProcessOptions* % \ProcessOptions* is quicker !
+\endinput
+%%
+%% End of file `tabu.sty'.
diff --git a/templates/xml/compound.xsd b/templates/xml/compound.xsd
index 400bea5..c128140 100644
--- a/templates/xml/compound.xsd
+++ b/templates/xml/compound.xsd
@@ -33,6 +33,8 @@
<xsd:element name="templateparamlist" type="templateparamlistType" minOccurs="0" />
<xsd:element name="sectiondef" type="sectiondefType" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="tableofcontents" type="tableofcontentsType" minOccurs="0" maxOccurs="1" />
+ <xsd:element name="requiresclause" type="linkedTextType" minOccurs="0" />
+ <xsd:element name="initializer" type="linkedTextType" minOccurs="0" />
<xsd:element name="briefdescription" type="descriptionType" minOccurs="0" />
<xsd:element name="detaileddescription" type="descriptionType" minOccurs="0" />
<xsd:element name="inheritancegraph" type="graphType" minOccurs="0" />
@@ -147,6 +149,7 @@
<xsd:element name="reimplementedby" type="reimplementType" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="param" type="paramType" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="enumvalue" type="enumvalueType" minOccurs="0" maxOccurs="unbounded" />
+ <xsd:element name="requiresclause" type="linkedTextType" minOccurs="0" />
<xsd:element name="initializer" type="linkedTextType" minOccurs="0" />
<xsd:element name="exceptions" type="linkedTextType" minOccurs="0" />
<xsd:element name="briefdescription" type="descriptionType" minOccurs="0" />
@@ -815,6 +818,7 @@
<xsd:enumeration value="page" />
<xsd:enumeration value="example" />
<xsd:enumeration value="dir" />
+ <xsd:enumeration value="concept" />
</xsd:restriction>
</xsd:simpleType>
diff --git a/templates/xml/index.xsd b/templates/xml/index.xsd
index edb1d34..cfb7041 100644
--- a/templates/xml/index.xsd
+++ b/templates/xml/index.xsd
@@ -45,6 +45,7 @@
<xsd:enumeration value="example"/>
<xsd:enumeration value="dir"/>
<xsd:enumeration value="type"/>
+ <xsd:enumeration value="concept"/>
</xsd:restriction>
</xsd:simpleType>
diff --git a/vhdlparser/CMakeLists.txt b/vhdlparser/CMakeLists.txt
index b610f5c..b7f831a 100644
--- a/vhdlparser/CMakeLists.txt
+++ b/vhdlparser/CMakeLists.txt
@@ -32,11 +32,14 @@ endif()
add_custom_command(
COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/vhdlparser/vhdl_adj.py ${PROJECT_SOURCE_DIR}/vhdlparser/VhdlParser.cc ${GENERATED_SRC}/VhdlParser_adj.cc
DEPENDS ${PROJECT_SOURCE_DIR}/vhdlparser/VhdlParser.cc ${PROJECT_SOURCE_DIR}/vhdlparser/vhdl_adj.py
- OUTPUT ${GENERATED_SRC}/VhdlParser_adj.cc
+ OUTPUT ${GENERATED_SRC}/VhdlParser_adj.cc
)
set_source_files_properties(${GENERATED_SRC}/VhdlParser_adj.cc PROPERTIES GENERATED 1)
-include_directories(${PROJECT_SOURCE_DIR}/src ${PROJECT_SOURCE_DIR}/qtools ${PROJECT_SOURCE_DIR}/vhdlparser ${GENERATED_SRC})
+include_directories(
+ ${PROJECT_SOURCE_DIR}/src
+ ${PROJECT_SOURCE_DIR}/vhdlparser
+ ${GENERATED_SRC})
add_library(vhdlparser STATIC
CharStream.cc
ParseException.cc
diff --git a/vhdlparser/VhdlParser.cc b/vhdlparser/VhdlParser.cc
index e039b33..16753ea 100644
--- a/vhdlparser/VhdlParser.cc
+++ b/vhdlparser/VhdlParser.cc
@@ -28,7 +28,7 @@ QCString VhdlParser::abstract_literal() {Token *tok;
tok = jj_consume_token(DECIMAL_LITERAL);
}
if (!hasError) {
-return tok->image.c_str();
+return QCString(tok->image);
}
break;
}
@@ -37,7 +37,7 @@ return tok->image.c_str();
tok = jj_consume_token(INTEGER);
}
if (!hasError) {
-return tok->image.c_str();
+return QCString(tok->image);
}
break;
}
@@ -46,7 +46,7 @@ return tok->image.c_str();
tok = jj_consume_token(BASED_LITERAL);
}
if (!hasError) {
-return tok->image.c_str();
+return QCString(tok->image);
}
break;
}
@@ -66,7 +66,7 @@ QCString VhdlParser::access_type_definition() {Token *tok=0;QCString str,str1;
if (!hasError) {
str1 = subtype_indication();
}
-str=tok->image.c_str(); return str+str1;
+str=tok->image; return str+str1;
assert(false);
}
@@ -78,7 +78,7 @@ QCString VhdlParser::actual_designator() {QCString str;Token *t=0;
t = jj_consume_token(OPEN_T);
}
if (!hasError) {
-return t->image.c_str();
+return QCString(t->image);
}
break;
}
@@ -241,7 +241,7 @@ s+=","+s1;
if (!hasError) {
jj_consume_token(RPAREN_T);
}
-return "("+s+")";
+return QCString("("+s+")");
assert(false);
}
@@ -330,7 +330,7 @@ return s;
tok = jj_consume_token(CHARACTER_LITERAL);
}
if (!hasError) {
-return tok->image.c_str();
+return QCString(tok->image);
}
break;
}
@@ -401,7 +401,7 @@ QCString t=s1+"::"+s;
m_sharedState->genLabels.resize(0);
outlineParser()->pushLabel(m_sharedState->genLabels,s1);
m_sharedState->lastCompound=m_sharedState->current;
- outlineParser()->addVhdlType(t,outlineParser()->getLine(ARCHITECTURE_T),Entry::CLASS_SEC,VhdlDocGen::ARCHITECTURE,0,0,Private);
+ outlineParser()->addVhdlType(t.data(),outlineParser()->getLine(ARCHITECTURE_T),Entry::CLASS_SEC,VhdlDocGen::ARCHITECTURE,0,0,Private);
}
if (!hasError) {
try {
@@ -724,7 +724,7 @@ return s;
tok = jj_consume_token(RANGE_T);
}
if (!hasError) {
-return tok->image.c_str();
+return QCString(tok->image);
}
break;
}
@@ -830,7 +830,7 @@ QCString VhdlParser::base() {Token *tok=0;
if (!hasError) {
tok = jj_consume_token(INTEGER);
}
-return tok->image.c_str();
+return QCString(tok->image);
assert(false);
}
@@ -839,7 +839,7 @@ QCString VhdlParser::base_specifier() {Token *tok=0;
if (!hasError) {
tok = jj_consume_token(BASIC_IDENTIFIER);
}
-return tok->image.c_str();
+return QCString(tok->image);
assert(false);
}
@@ -857,7 +857,7 @@ QCString VhdlParser::based_integer() {Token *tok=0;
if (!hasError) {
tok = jj_consume_token(BASIC_IDENTIFIER);
}
-return tok->image.c_str();
+return QCString(tok->image);
assert(false);
}
@@ -866,7 +866,7 @@ QCString VhdlParser::based_literal() {Token *tok=0;
if (!hasError) {
tok = jj_consume_token(BASED_LITERAL);
}
-return tok->image.c_str();
+return QCString(tok->image);
assert(false);
}
@@ -875,7 +875,7 @@ QCString VhdlParser::basic_identifier() {Token *tok=0;
if (!hasError) {
tok = jj_consume_token(BASIC_IDENTIFIER);
}
-return tok->image.c_str();
+return QCString(tok->image);
assert(false);
}
@@ -930,7 +930,7 @@ QCString VhdlParser::bit_string_literal() {Token *tok=0;
if (!hasError) {
tok = jj_consume_token(BIT_STRING_LITERAL);
}
-return tok->image.c_str();
+return QCString(tok->image);
assert(false);
}
@@ -939,7 +939,7 @@ QCString VhdlParser::bit_value() {Token *tok=0;
if (!hasError) {
tok = jj_consume_token(BASIC_IDENTIFIER);
}
-return tok->image.c_str();
+return QCString(tok->image);
assert(false);
}
@@ -1391,7 +1391,7 @@ void VhdlParser::case_statement() {QCString s;
}
if (!hasError) {
QCString ca="case "+s;
- FlowChart::addFlowChart(FlowChart::CASE_NO,0,ca);
+ FlowChart::addFlowChart(FlowChart::CASE_NO,QCString(),ca);
}
if (!hasError) {
jj_consume_token(IS_T);
@@ -1440,7 +1440,7 @@ QCString ca="case "+s;
jj_consume_token(SEMI_T);
}
FlowChart::moveToPrevLevel();
- FlowChart::addFlowChart(FlowChart::END_CASE,"end case",0);
+ FlowChart::addFlowChart(FlowChart::END_CASE,"end case",QCString());
}
@@ -1455,9 +1455,9 @@ void VhdlParser::case_statement_alternative() {QCString s;
jj_consume_token(ARROW_T);
}
if (!hasError) {
-QCString t="when ";
+QCString t("when ");
t+=s+"=> ";
- FlowChart::addFlowChart(FlowChart::WHEN_NO,s.data(),t);
+ FlowChart::addFlowChart(FlowChart::WHEN_NO,s,t);
}
if (!hasError) {
sequence_of_statement();
@@ -1470,7 +1470,7 @@ QCString VhdlParser::character_literal() {Token *tok=0;
if (!hasError) {
tok = jj_consume_token(CHARACTER_LITERAL);
}
-return tok->image.c_str();
+return QCString(tok->image);
assert(false);
}
@@ -1703,8 +1703,8 @@ void VhdlParser::component_instantiation_statement() {QCString s,s1;
if (!hasError) {
QCString s3;
if (s1.contains("|")) {
- s3=VhdlDocGen::getIndexWord(s1.data(),0);
- s1=VhdlDocGen::getIndexWord(s1.data(),1);
+ s3=VhdlDocGen::getIndexWord(s1,0);
+ s1=VhdlDocGen::getIndexWord(s1,1);
}
outlineParser()->addCompInst(s.lower().data(),s1.lower().data(),s3.data(),outlineParser()->getLine());
@@ -2337,7 +2337,7 @@ QCString VhdlParser::decimal_literal() {Token *tok=0;
if (!hasError) {
tok = jj_consume_token(DECIMAL_LITERAL);
}
-return tok->image.c_str();
+return QCString(tok->image);
assert(false);
}
@@ -2489,7 +2489,7 @@ QCString VhdlParser::direction() {Token *tok=0;
tok = jj_consume_token(TO_T);
}
if (!hasError) {
-return tok->image.c_str();
+return QCString(tok->image);
}
break;
}
@@ -2498,7 +2498,7 @@ return tok->image.c_str();
tok = jj_consume_token(DOWNTO_T);
}
if (!hasError) {
-return tok->image.c_str();
+return QCString(tok->image);
}
break;
}
@@ -2602,16 +2602,20 @@ QCString VhdlParser::element_declaration() {QCString rec_name,s1,s2;
if (!hasError) {
jj_consume_token(SEMI_T);
}
-QCString name;
- QCStringList ql=QCStringList::split(",",rec_name);
- for (uint j=0;j<ql.count();j++)
- {
- name=ql[j]+"~";
- name+=outlineParser()->getNameID().data();;
- outlineParser()->addVhdlType(name.data(),outlineParser()->getLine(),Entry::VARIABLE_SEC,VhdlDocGen::RECORD,0,s1.data(),Public);
- }
- s2=rec_name+":"+s1;
- return s2;
+auto ql = split(rec_name.str(),",");
+ for (const auto &n : ql)
+ {
+ std::string name=n+"~";
+ name+=outlineParser()->getNameID().data();
+ outlineParser()->addVhdlType(
+ name.c_str(),outlineParser()->getLine(),
+ Entry::VARIABLE_SEC,
+ VhdlDocGen::RECORD,0,
+ s1.data(),
+ Public);
+ }
+ s2=rec_name+":"+s1;
+ return s2;
assert(false);
}
@@ -2660,7 +2664,7 @@ return s;
s = name();
}
if (!hasError) {
-return tok->image.c_str()+s;
+return QCString(tok->image)+s;
}
break;
}
@@ -2669,7 +2673,7 @@ return tok->image.c_str()+s;
tok = jj_consume_token(OPEN_T);
}
if (!hasError) {
-return tok->image.c_str();
+return QCString(tok->image);
}
break;
}
@@ -3504,7 +3508,7 @@ QCString VhdlParser::exit_statement() {QCString s,s1,s2;Token *t=0;Token *t1=0;
m_sharedState->lab.resize(0);
if(t) s+=":";
if(t1) s2.prepend(" when ");
- FlowChart::addFlowChart(FlowChart::EXIT_NO,"exit",s2.data(),s1.data());
+ FlowChart::addFlowChart(FlowChart::EXIT_NO,"exit",s2,s1);
return s+s1+s2+";";
assert(false);
@@ -3617,7 +3621,7 @@ QCString VhdlParser::extended_identifier() {Token *t;
if (!hasError) {
t = jj_consume_token(EXTENDED_CHARACTER);
}
-return t->image.c_str();
+return QCString(t->image);
assert(false);
}
@@ -3856,7 +3860,7 @@ return s;
tok = jj_consume_token(INTEGER);
}
if (!hasError) {
-return tok->image.c_str();
+return QCString(tok->image);
}
break;
}
@@ -4254,7 +4258,7 @@ QCString VhdlParser::identifier() {Token *tok=0;
tok = jj_consume_token(EXTENDED_CHARACTER);
}
if (!hasError) {
-return tok->image.c_str();
+return QCString(tok->image);
}
break;
}
@@ -4263,7 +4267,7 @@ return tok->image.c_str();
tok = jj_consume_token(BASIC_IDENTIFIER);
}
if (!hasError) {
-return tok->image.c_str();
+return QCString(tok->image);
}
break;
}
@@ -4337,7 +4341,7 @@ void VhdlParser::if_statement() {QCString s,s1;
}
if (!hasError) {
s.prepend("if ");
- FlowChart::addFlowChart(FlowChart::IF_NO,0,s);
+ FlowChart::addFlowChart(FlowChart::IF_NO,QCString(),s);
}
if (!hasError) {
sequence_of_statement();
@@ -4364,7 +4368,7 @@ s.prepend("if ");
}
if (!hasError) {
s1.prepend("elsif ");
- FlowChart::addFlowChart(FlowChart::ELSIF_NO,0,s1.data());
+ FlowChart::addFlowChart(FlowChart::ELSIF_NO,QCString(),s1);
}
if (!hasError) {
sequence_of_statement();
@@ -4379,7 +4383,7 @@ s1.prepend("elsif ");
jj_consume_token(ELSE_T);
}
if (!hasError) {
-FlowChart::addFlowChart(FlowChart::ELSE_NO,0,0);
+FlowChart::addFlowChart(FlowChart::ELSE_NO,QCString(),QCString());
}
if (!hasError) {
sequence_of_statement();
@@ -4415,7 +4419,7 @@ FlowChart::addFlowChart(FlowChart::ELSE_NO,0,0);
jj_consume_token(SEMI_T);
}
FlowChart::moveToPrevLevel();
- FlowChart::addFlowChart(FlowChart::ENDIF_NO,0,0);
+ FlowChart::addFlowChart(FlowChart::ENDIF_NO,QCString(),QCString());
}
@@ -4434,7 +4438,7 @@ assert(false);
}
-QCString VhdlParser::index_constraint() {QCString s="("; QCString s1,s2;
+QCString VhdlParser::index_constraint() {QCString s("("); QCString s1,s2;
if (!hasError) {
jj_consume_token(LPAREN_T);
}
@@ -4656,7 +4660,7 @@ return s;
tok = jj_consume_token(OTHER_T);
}
if (!hasError) {
-return tok->image.c_str();
+return QCString(tok->image);
}
break;
}
@@ -4665,7 +4669,7 @@ return tok->image.c_str();
tok = jj_consume_token(ALL_T);
}
if (!hasError) {
-return tok->image.c_str();
+return QCString(tok->image);
}
break;
}
@@ -4682,7 +4686,7 @@ QCString VhdlParser::integer() {Token *t;
if (!hasError) {
t = jj_consume_token(INTEGER);
}
-return t->image.c_str();
+return QCString(t->image);
assert(false);
}
@@ -4786,7 +4790,7 @@ QCString VhdlParser::interface_file_declaration() {QCString s,s1;
s1 = subtype_indication();
}
outlineParser()->addVhdlType(s.data(),outlineParser()->getLine(),Entry::VARIABLE_SEC,VhdlDocGen::VFILE,0,s1.data(),Public);
- return " file "+s+":"+s1;
+ return QCString(" file "+s+":"+s1);
assert(false);
}
@@ -4925,7 +4929,7 @@ QCString VhdlParser::interface_variable_declaration() {Token *tok=0;Token *tok1=
}
}
if(tok)
- s5=tok->image.c_str();
+ s5=QCString(tok->image);
if(tok1)
s3=tok1->image.data();
@@ -4966,7 +4970,7 @@ QCString VhdlParser::iteration_scheme() {QCString s;
}
if (!hasError) {
s.prepend("while ");
- FlowChart::addFlowChart(FlowChart::WHILE_NO,0,s.data(),m_sharedState->lab.data());
+ FlowChart::addFlowChart(FlowChart::WHILE_NO,QCString(),s,m_sharedState->lab);
m_sharedState->lab="";
return s;
}
@@ -4981,7 +4985,7 @@ s.prepend("while ");
}
if (!hasError) {
QCString q=m_sharedState->lab+" for "+s;
- FlowChart::addFlowChart(FlowChart::FOR_NO,0,q.data(),m_sharedState->lab.data());
+ FlowChart::addFlowChart(FlowChart::FOR_NO,QCString(),q,m_sharedState->lab);
m_sharedState->lab="";
return q;
}
@@ -5155,7 +5159,7 @@ s+=":";
}
if (!hasError) {
if(s1.isEmpty())
- FlowChart::addFlowChart(FlowChart::LOOP_NO,0,"infinite");
+ FlowChart::addFlowChart(FlowChart::LOOP_NO,QCString(),"infinite");
}
if (!hasError) {
jj_consume_token(LOOP_T);
@@ -5189,7 +5193,7 @@ if(s1.isEmpty())
QCString q = s+" loop "+s2+" end loop" +s3;
QCString endLoop="end loop" + s3;
FlowChart::moveToPrevLevel();
- FlowChart::addFlowChart(FlowChart::END_LOOP,endLoop.data(),0);
+ FlowChart::addFlowChart(FlowChart::END_LOOP,endLoop,QCString());
return q;
assert(false);
}
@@ -5296,7 +5300,7 @@ QCString VhdlParser::multiplying_operation() {Token *tok=0;
tok = jj_consume_token(MULT_T);
}
if (!hasError) {
-return tok->image.c_str();
+return QCString(tok->image);
}
break;
}
@@ -5305,7 +5309,7 @@ return tok->image.c_str();
tok = jj_consume_token(SLASH_T);
}
if (!hasError) {
-return tok->image.c_str();
+return QCString(tok->image);
}
break;
}
@@ -5314,7 +5318,7 @@ return tok->image.c_str();
tok = jj_consume_token(MOD_T);
}
if (!hasError) {
-return tok->image.c_str();
+return QCString(tok->image);
}
break;
}
@@ -5323,7 +5327,7 @@ return tok->image.c_str();
tok = jj_consume_token(REM_T);
}
if (!hasError) {
-return tok->image.c_str();
+return QCString(tok->image);
}
break;
}
@@ -5676,7 +5680,7 @@ QCString VhdlParser::next_statement() {QCString s,s1,s2;Token *t=0;Token *t1=0;
jj_consume_token(SEMI_T);
}
if(t) s+=":";
- FlowChart::addFlowChart(FlowChart::NEXT_NO,"next ",s2.data(),s1.data());
+ FlowChart::addFlowChart(FlowChart::NEXT_NO,"next ",s2,s1);
m_sharedState->lab.resize(0);
if(t1) s2.prepend("when ");
return s+s1+s2+";";
@@ -5819,7 +5823,7 @@ QCString VhdlParser::operator_symbol() {Token *tok=0;
if (!hasError) {
tok = jj_consume_token(STRINGLITERAL);
}
-return tok->image.c_str();
+return QCString(tok->image);
assert(false);
}
@@ -5872,7 +5876,7 @@ void VhdlParser::package_body() {QCString s;
if (!hasError) {
m_sharedState->lastCompound=m_sharedState->current;
s.prepend("_");
- outlineParser()->addVhdlType(s,outlineParser()->getLine(),Entry::CLASS_SEC,VhdlDocGen::PACKAGE_BODY,0,0,Protected);
+ outlineParser()->addVhdlType(s.data(),outlineParser()->getLine(),Entry::CLASS_SEC,VhdlDocGen::PACKAGE_BODY,0,0,Protected);
}
if (!hasError) {
package_body_declarative_part();
@@ -6083,7 +6087,7 @@ m_sharedState->lastCompound=m_sharedState->current;
clone->bodyLine=outlineParser()->getLine(PACKAGE_T);
clone->protection=Package;
m_sharedState->current_root->moveToSubEntryAndKeep(clone);
- outlineParser()->addVhdlType(s,outlineParser()->getLine(PACKAGE_T),Entry::CLASS_SEC,VhdlDocGen::PACKAGE,0,0,Package);
+ outlineParser()->addVhdlType(s.data(),outlineParser()->getLine(PACKAGE_T),Entry::CLASS_SEC,VhdlDocGen::PACKAGE,0,0,Package);
}
if (!hasError) {
package_header();
@@ -6525,7 +6529,7 @@ return s;
allocator();
}
if (!hasError) {
-return "";
+return QCString();
}
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
@@ -6664,7 +6668,7 @@ QCString VhdlParser::process_declarative_item() {QCString s;
subprogram_declaration();
}
if (!hasError) {
-return "";
+return QCString();
}
break;
}
@@ -6902,8 +6906,8 @@ m_sharedState->currP=VhdlDocGen::PROCESS;
}
if (!hasError) {
if (s2.data())
- FlowChart::addFlowChart(FlowChart::VARIABLE_NO,s2.data(),0);
- FlowChart::addFlowChart(FlowChart::BEGIN_NO,"BEGIN",0);
+ FlowChart::addFlowChart(FlowChart::VARIABLE_NO,s2,QCString());
+ FlowChart::addFlowChart(FlowChart::BEGIN_NO,"BEGIN",QCString());
}
if (!hasError) {
jj_consume_token(BEGIN_T);
@@ -6957,8 +6961,8 @@ if(s.isEmpty())
m_sharedState->current->endBodyLine=outlineParser()->getLine();
m_sharedState->currP=0;
if(tok)
- s1=tok->image.data();
- outlineParser()->createFunction(m_sharedState->currName,VhdlDocGen::PROCESS,s1.data());
+ s1=tok->image;
+ outlineParser()->createFunction(m_sharedState->currName.data(),VhdlDocGen::PROCESS,s1.data());
outlineParser()->createFlow();
m_sharedState->currName="";
outlineParser()->newEntry();
@@ -7282,7 +7286,7 @@ return "?=";
jj_consume_token(QNEQU_T);
}
if (!hasError) {
-return "?/=";
+return "?/=";
}
break;
}
@@ -7674,42 +7678,42 @@ QCString VhdlParser::sequential_statement() {QCString s;
s = signal_assignment_statement();
}
if (!hasError) {
-FlowChart::addFlowChart(FlowChart::TEXT_NO,s.data(),0);return s;
+FlowChart::addFlowChart(FlowChart::TEXT_NO,s,QCString());return s;
}
} else if (jj_2_85(3)) {
if (!hasError) {
s = assertion_statement();
}
if (!hasError) {
-FlowChart::addFlowChart(FlowChart::TEXT_NO,s.data(),0);return s;
+FlowChart::addFlowChart(FlowChart::TEXT_NO,s,QCString());return s;
}
} else if (jj_2_86(3)) {
if (!hasError) {
s = report_statement();
}
if (!hasError) {
-FlowChart::addFlowChart(FlowChart::TEXT_NO,s.data(),0);return s;
+FlowChart::addFlowChart(FlowChart::TEXT_NO,s,QCString());return s;
}
} else if (jj_2_87(3)) {
if (!hasError) {
s = wait_statement();
}
if (!hasError) {
-FlowChart::addFlowChart(FlowChart::TEXT_NO,s.data(),0);return s;
+FlowChart::addFlowChart(FlowChart::TEXT_NO,s,QCString());return s;
}
} else if (jj_2_88(2147483647)) {
if (!hasError) {
s = variable_assignment_statement();
}
if (!hasError) {
-FlowChart::addFlowChart(FlowChart::TEXT_NO,s.data(),0);return s;
+FlowChart::addFlowChart(FlowChart::TEXT_NO,s,QCString());return s;
}
} else if (jj_2_89(3)) {
if (!hasError) {
s = procedure_call_statement();
}
if (!hasError) {
-FlowChart::addFlowChart(FlowChart::TEXT_NO,s.data(),0);return s;
+FlowChart::addFlowChart(FlowChart::TEXT_NO,s,QCString());return s;
}
} else if (jj_2_90(3)) {
if (!hasError) {
@@ -7751,7 +7755,7 @@ return s;
s = return_statement();
}
if (!hasError) {
-FlowChart::addFlowChart(FlowChart::RETURN_NO,s.data(),0);return s;
+FlowChart::addFlowChart(FlowChart::RETURN_NO,s,QCString());return s;
}
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
@@ -7762,7 +7766,7 @@ FlowChart::addFlowChart(FlowChart::RETURN_NO,s.data(),0);return s;
s = null_statement();
}
if (!hasError) {
-FlowChart::addFlowChart(FlowChart::TEXT_NO,s.data(),0);return s;
+FlowChart::addFlowChart(FlowChart::TEXT_NO,s,QCString());return s;
}
break;
}
@@ -7906,14 +7910,14 @@ QCString VhdlParser::signal_assignment_statement() {QCString s,s1,s2,s3;
conditional_signal_assignment_wave();
}
if (!hasError) {
-return "";
+return QCString();
}
} else if (jj_2_98(2147483647)) {
if (!hasError) {
selected_signal_assignment_wave();
}
if (!hasError) {
-return "";
+return QCString();
}
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
@@ -8273,7 +8277,7 @@ QCString VhdlParser::string_literal() {Token *tok=0;
if (!hasError) {
tok = jj_consume_token(STRINGLITERAL);
}
-return tok->image.c_str();
+return QCString(tok->image);
assert(false);
}
@@ -8289,9 +8293,9 @@ void VhdlParser::subprogram_body() {QCString s;
if (!hasError) {
if (s.data())
{
- FlowChart::addFlowChart(FlowChart::VARIABLE_NO,s,0);
+ FlowChart::addFlowChart(FlowChart::VARIABLE_NO,s,QCString());
}
- FlowChart::addFlowChart(FlowChart::BEGIN_NO,"BEGIN",0);
+ FlowChart::addFlowChart(FlowChart::BEGIN_NO,"BEGIN",QCString());
}
if (!hasError) {
jj_consume_token(BEGIN_T);
@@ -8403,7 +8407,7 @@ QCString VhdlParser::subprogram_declarative_item() {QCString s;
subprogram_declaration();
}
if (!hasError) {
-return "";
+return QCString();
}
break;
}
@@ -8421,7 +8425,7 @@ return s;
subprogram_body();
}
if (!hasError) {
-return "";
+return QCString();
}
break;
}
@@ -9048,7 +9052,6 @@ QCString VhdlParser::type_definition() {QCString s;
case RANGE_T:
case LPAREN_T:{
if (!hasError) {
- //try{
s = scalar_type_definition();
}
if (!hasError) {
@@ -9091,7 +9094,7 @@ return s;
protected_type_body();
}
if (!hasError) {
-return "";
+return QCString();
}
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
@@ -9100,7 +9103,7 @@ return "";
protected_type_declaration();
}
if (!hasError) {
-return "";
+return QCString();
}
break;
}
@@ -9204,14 +9207,22 @@ s+=",";s+=s1;
if (!hasError) {
jj_consume_token(SEMI_T);
}
-QCStringList ql1=QCStringList::split(",",s);
- for (uint j=0;j<ql1.count();j++)
+auto ql1=split(s.str(),",");
+ for (const auto &name : ql1)
{
- QCStringList ql=QCStringList::split(".",ql1[j]);
- QCString it=ql[1];
- if ( m_sharedState->parse_sec==0 && Config_getBool(SHOW_INCLUDE_FILES) )
+ auto ql2=split(name,".");
+ if (ql2.size()>1)
{
- outlineParser()->addVhdlType(it.data(),outlineParser()->getLine(),Entry::VARIABLE_SEC,VhdlDocGen::USE,it.data(),"_use_",Public);
+ std::string it=ql2[1];
+ if ( m_sharedState->parse_sec==0 && Config_getBool(SHOW_INCLUDE_FILES) )
+ {
+ outlineParser()->addVhdlType(it.c_str(),
+ outlineParser()->getLine(),
+ Entry::VARIABLE_SEC,
+ VhdlDocGen::USE,
+ it.c_str(),
+ "_use_",Public);
+ }
}
}
s1="use "+s;
@@ -9264,7 +9275,7 @@ return s+s1+":="+s2+";";
selected_variable_assignment();
}
if (!hasError) {
-return "";
+return QCString();
}
break;
}
@@ -9551,7 +9562,7 @@ QCString VhdlParser::protected_type_body() {
;
}
}
-return "";
+return QCString();
assert(false);
}
@@ -9724,7 +9735,7 @@ outlineParser()->error_skipto(END_T);
;
}
}
-return "";
+return QCString();
assert(false);
}
@@ -10403,7 +10414,7 @@ QCString VhdlParser::sig_stat() {Token *t;
t = jj_consume_token(CONSTANT_T);
}
if (!hasError) {
-return t->image.data();
+return QCString(t->image);
}
break;
}
@@ -10412,7 +10423,7 @@ return t->image.data();
t = jj_consume_token(SIGNAL_T);
}
if (!hasError) {
-return t->image.data();
+return QCString(t->image);
}
break;
}
@@ -10421,7 +10432,7 @@ return t->image.data();
t = jj_consume_token(VARIABLE_T);
}
if (!hasError) {
-return t->image.data();
+return QCString(t->image);
}
break;
}
@@ -11314,7 +11325,7 @@ QCString q;
if (a>b) b=a;
outlineParser()->addVhdlType(m_sharedState->current->name.data(),b,Entry::VARIABLE_SEC,VhdlDocGen::GENERIC,ss.data(),0,Public);
}
- m_sharedState->currP=0;return "";
+ m_sharedState->currP=0;return QCString();
assert(false);
}
diff --git a/vhdlparser/VhdlParser.h b/vhdlparser/VhdlParser.h
index 891b085..c2f2cb2 100644
--- a/vhdlparser/VhdlParser.h
+++ b/vhdlparser/VhdlParser.h
@@ -1407,16 +1407,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_97()
- {
- if (jj_done) return true;
- if (jj_scan_token(FILE_T)) return true;
- if (jj_3R_205()) return true;
- if (jj_scan_token(COLON_T)) return true;
- if (jj_3R_89()) return true;
- return false;
- }
-
inline bool jj_3R_693()
{
if (jj_done) return true;
@@ -1424,17 +1414,20 @@ void parseInline();
return false;
}
- inline bool jj_3R_414()
+ inline bool jj_3R_97()
{
if (jj_done) return true;
- if (jj_3R_513()) return true;
+ if (jj_scan_token(FILE_T)) return true;
+ if (jj_3R_205()) return true;
+ if (jj_scan_token(COLON_T)) return true;
+ if (jj_3R_89()) return true;
return false;
}
- inline bool jj_3_46()
+ inline bool jj_3R_414()
{
if (jj_done) return true;
- if (jj_3R_98()) return true;
+ if (jj_3R_513()) return true;
return false;
}
@@ -1450,6 +1443,13 @@ void parseInline();
return false;
}
+ inline bool jj_3_46()
+ {
+ if (jj_done) return true;
+ if (jj_3R_98()) return true;
+ return false;
+ }
+
inline bool jj_3R_572()
{
if (jj_done) return true;
@@ -1528,24 +1528,24 @@ void parseInline();
return false;
}
- inline bool jj_3R_427()
+ inline bool jj_3R_631()
{
if (jj_done) return true;
- if (jj_scan_token(ALL_T)) return true;
+ if (jj_3R_74()) return true;
return false;
}
- inline bool jj_3R_426()
+ inline bool jj_3R_427()
{
if (jj_done) return true;
- if (jj_scan_token(OTHER_T)) return true;
+ if (jj_scan_token(ALL_T)) return true;
return false;
}
- inline bool jj_3R_631()
+ inline bool jj_3R_426()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_scan_token(OTHER_T)) return true;
return false;
}
@@ -1629,56 +1629,56 @@ void parseInline();
return false;
}
- inline bool jj_3R_628()
+ inline bool jj_3R_535()
{
if (jj_done) return true;
- if (jj_3R_61()) return true;
+ if (jj_scan_token(LPAREN_T)) return true;
+ if (jj_3R_327()) return true;
+ if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3R_627()
+ inline bool jj_3R_628()
{
if (jj_done) return true;
- if (jj_3R_72()) return true;
+ if (jj_3R_61()) return true;
return false;
}
- inline bool jj_3R_577()
+ inline bool jj_3_125()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (!jj_3R_627()) return false;
- jj_scanpos = xsp;
- if (jj_3R_628()) return true;
+ if (jj_3R_61()) return true;
+ if (jj_scan_token(WHEN_T)) return true;
return false;
}
- inline bool jj_3R_535()
+ inline bool jj_3R_442()
{
if (jj_done) return true;
- if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_327()) return true;
- if (jj_scan_token(RPAREN_T)) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_scan_token(77)) jj_scanpos = xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_535()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3_125()
+ inline bool jj_3R_627()
{
if (jj_done) return true;
- if (jj_3R_61()) return true;
- if (jj_scan_token(WHEN_T)) return true;
+ if (jj_3R_72()) return true;
return false;
}
- inline bool jj_3R_442()
+ inline bool jj_3R_577()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_scan_token(77)) jj_scanpos = xsp;
- xsp = jj_scanpos;
- if (jj_3R_535()) jj_scanpos = xsp;
+ if (!jj_3R_627()) return false;
+ jj_scanpos = xsp;
+ if (jj_3R_628()) return true;
return false;
}
@@ -1696,15 +1696,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_547()
- {
- if (jj_done) return true;
- if (jj_scan_token(TYPE_T)) return true;
- if (jj_3R_74()) return true;
- if (jj_scan_token(SEMI_T)) return true;
- return false;
- }
-
inline bool jj_3R_401()
{
if (jj_done) return true;
@@ -1719,19 +1710,20 @@ void parseInline();
return false;
}
- inline bool jj_3R_546()
+ inline bool jj_3R_547()
{
if (jj_done) return true;
- if (jj_scan_token(COMMA_T)) return true;
- if (jj_3R_466()) return true;
+ if (jj_scan_token(TYPE_T)) return true;
+ if (jj_3R_74()) return true;
+ if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_630()
+ inline bool jj_3R_546()
{
if (jj_done) return true;
- if (jj_scan_token(ELSE_T)) return true;
- if (jj_3R_268()) return true;
+ if (jj_scan_token(COMMA_T)) return true;
+ if (jj_3R_466()) return true;
return false;
}
@@ -1750,6 +1742,14 @@ void parseInline();
return false;
}
+ inline bool jj_3R_630()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(ELSE_T)) return true;
+ if (jj_3R_268()) return true;
+ return false;
+ }
+
inline bool jj_3R_443()
{
if (jj_done) return true;
@@ -1761,16 +1761,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_629()
- {
- if (jj_done) return true;
- if (jj_scan_token(ELSIF_T)) return true;
- if (jj_3R_83()) return true;
- if (jj_scan_token(THEN_T)) return true;
- if (jj_3R_268()) return true;
- return false;
- }
-
inline bool jj_3R_361()
{
if (jj_done) return true;
@@ -1787,6 +1777,16 @@ void parseInline();
return false;
}
+ inline bool jj_3R_629()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(ELSIF_T)) return true;
+ if (jj_3R_83()) return true;
+ if (jj_scan_token(THEN_T)) return true;
+ if (jj_3R_268()) return true;
+ return false;
+ }
+
inline bool jj_3R_362()
{
if (jj_done) return true;
@@ -1804,6 +1804,31 @@ void parseInline();
return false;
}
+ inline bool jj_3R_203()
+ {
+ if (jj_done) return true;
+ if (jj_3R_361()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_202()
+ {
+ if (jj_done) return true;
+ if (jj_3R_360()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_94()
+ {
+ if (jj_done) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (!jj_3R_202()) return false;
+ jj_scanpos = xsp;
+ if (jj_3R_203()) return true;
+ return false;
+ }
+
inline bool jj_3R_264()
{
if (jj_done) return true;
@@ -1836,31 +1861,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_203()
- {
- if (jj_done) return true;
- if (jj_3R_361()) return true;
- return false;
- }
-
- inline bool jj_3R_202()
- {
- if (jj_done) return true;
- if (jj_3R_360()) return true;
- return false;
- }
-
- inline bool jj_3R_94()
- {
- if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (!jj_3R_202()) return false;
- jj_scanpos = xsp;
- if (jj_3R_203()) return true;
- return false;
- }
-
inline bool jj_3R_205()
{
if (jj_done) return true;
@@ -1884,13 +1884,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_171()
- {
- if (jj_done) return true;
- if (jj_scan_token(BASIC_IDENTIFIER)) return true;
- return false;
- }
-
inline bool jj_3R_400()
{
if (jj_done) return true;
@@ -1903,6 +1896,13 @@ void parseInline();
return false;
}
+ inline bool jj_3R_171()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(BASIC_IDENTIFIER)) return true;
+ return false;
+ }
+
inline bool jj_3R_170()
{
if (jj_done) return true;
@@ -1962,19 +1962,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_68()
- {
- if (jj_done) return true;
- if (jj_scan_token(GROUP_T)) return true;
- if (jj_3R_74()) return true;
- if (jj_scan_token(IS_T)) return true;
- if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_491()) return true;
- if (jj_scan_token(RPAREN_T)) return true;
- if (jj_scan_token(SEMI_T)) return true;
- return false;
- }
-
inline bool jj_3R_317()
{
if (jj_done) return true;
@@ -1993,15 +1980,14 @@ void parseInline();
return false;
}
- inline bool jj_3R_398()
+ inline bool jj_3R_68()
{
if (jj_done) return true;
if (jj_scan_token(GROUP_T)) return true;
if (jj_3R_74()) return true;
- if (jj_scan_token(COLON_T)) return true;
- if (jj_3R_74()) return true;
+ if (jj_scan_token(IS_T)) return true;
if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_492()) return true;
+ if (jj_3R_491()) return true;
if (jj_scan_token(RPAREN_T)) return true;
if (jj_scan_token(SEMI_T)) return true;
return false;
@@ -2025,15 +2011,17 @@ void parseInline();
return false;
}
- inline bool jj_3R_492()
+ inline bool jj_3R_398()
{
if (jj_done) return true;
- if (jj_3R_559()) return true;
- Token * xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_560()) { jj_scanpos = xsp; break; }
- }
+ if (jj_scan_token(GROUP_T)) return true;
+ if (jj_3R_74()) return true;
+ if (jj_scan_token(COLON_T)) return true;
+ if (jj_3R_74()) return true;
+ if (jj_scan_token(LPAREN_T)) return true;
+ if (jj_3R_492()) return true;
+ if (jj_scan_token(RPAREN_T)) return true;
+ if (jj_scan_token(SEMI_T)) return true;
return false;
}
@@ -2061,28 +2049,15 @@ void parseInline();
return false;
}
- inline bool jj_3R_620()
- {
- if (jj_done) return true;
- if (jj_3R_369()) return true;
- return false;
- }
-
- inline bool jj_3R_619()
- {
- if (jj_done) return true;
- if (jj_3R_63()) return true;
- return false;
- }
-
- inline bool jj_3R_559()
+ inline bool jj_3R_492()
{
if (jj_done) return true;
+ if (jj_3R_559()) return true;
Token * xsp;
- xsp = jj_scanpos;
- if (!jj_3R_619()) return false;
- jj_scanpos = xsp;
- if (jj_3R_620()) return true;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_560()) { jj_scanpos = xsp; break; }
+ }
return false;
}
@@ -2093,14 +2068,10 @@ void parseInline();
return false;
}
- inline bool jj_3R_73()
+ inline bool jj_3R_620()
{
if (jj_done) return true;
- if (jj_scan_token(GENERIC_T)) return true;
- if (jj_scan_token(MAP_T)) return true;
- if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_169()) return true;
- if (jj_scan_token(RPAREN_T)) return true;
+ if (jj_3R_369()) return true;
return false;
}
@@ -2130,6 +2101,35 @@ void parseInline();
return false;
}
+ inline bool jj_3R_619()
+ {
+ if (jj_done) return true;
+ if (jj_3R_63()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_559()
+ {
+ if (jj_done) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (!jj_3R_619()) return false;
+ jj_scanpos = xsp;
+ if (jj_3R_620()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_73()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(GENERIC_T)) return true;
+ if (jj_scan_token(MAP_T)) return true;
+ if (jj_scan_token(LPAREN_T)) return true;
+ if (jj_3R_169()) return true;
+ if (jj_scan_token(RPAREN_T)) return true;
+ return false;
+ }
+
inline bool jj_3R_587()
{
if (jj_done) return true;
@@ -2160,21 +2160,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_162()
- {
- if (jj_done) return true;
- if (jj_3R_327()) return true;
- return false;
- }
-
- inline bool jj_3_39()
- {
- if (jj_done) return true;
- if (jj_3R_74()) return true;
- if (jj_scan_token(COLON_T)) return true;
- return false;
- }
-
inline bool jj_3R_314()
{
if (jj_done) return true;
@@ -2198,6 +2183,13 @@ void parseInline();
return false;
}
+ inline bool jj_3R_162()
+ {
+ if (jj_done) return true;
+ if (jj_3R_327()) return true;
+ return false;
+ }
+
inline bool jj_3R_464()
{
if (jj_done) return true;
@@ -2205,14 +2197,11 @@ void parseInline();
return false;
}
- inline bool jj_3R_69()
+ inline bool jj_3_39()
{
if (jj_done) return true;
- if (jj_scan_token(GENERIC_T)) return true;
- if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_162()) return true;
- if (jj_scan_token(RPAREN_T)) return true;
- if (jj_scan_token(SEMI_T)) return true;
+ if (jj_3R_74()) return true;
+ if (jj_scan_token(COLON_T)) return true;
return false;
}
@@ -2241,6 +2230,17 @@ void parseInline();
return false;
}
+ inline bool jj_3R_69()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(GENERIC_T)) return true;
+ if (jj_scan_token(LPAREN_T)) return true;
+ if (jj_3R_162()) return true;
+ if (jj_scan_token(RPAREN_T)) return true;
+ if (jj_scan_token(SEMI_T)) return true;
+ return false;
+ }
+
inline bool jj_3R_336()
{
if (jj_done) return true;
@@ -2248,6 +2248,13 @@ void parseInline();
return false;
}
+ inline bool jj_3R_462()
+ {
+ if (jj_done) return true;
+ if (jj_3R_420()) return true;
+ return false;
+ }
+
inline bool jj_3R_174()
{
if (jj_done) return true;
@@ -2266,13 +2273,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_462()
- {
- if (jj_done) return true;
- if (jj_3R_420()) return true;
- return false;
- }
-
inline bool jj_3R_149()
{
if (jj_done) return true;
@@ -2301,15 +2301,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_78()
- {
- if (jj_done) return true;
- if (jj_3R_74()) return true;
- if (jj_scan_token(COLON_T)) return true;
- if (jj_3R_174()) return true;
- return false;
- }
-
inline bool jj_3_122()
{
if (jj_done) return true;
@@ -2317,13 +2308,12 @@ void parseInline();
return false;
}
- inline bool jj_3R_110()
+ inline bool jj_3R_78()
{
if (jj_done) return true;
- if (jj_3R_63()) return true;
- if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_236()) return true;
- if (jj_scan_token(RPAREN_T)) return true;
+ if (jj_3R_74()) return true;
+ if (jj_scan_token(COLON_T)) return true;
+ if (jj_3R_174()) return true;
return false;
}
@@ -2344,6 +2334,16 @@ void parseInline();
return false;
}
+ inline bool jj_3R_110()
+ {
+ if (jj_done) return true;
+ if (jj_3R_63()) return true;
+ if (jj_scan_token(LPAREN_T)) return true;
+ if (jj_3R_236()) return true;
+ if (jj_scan_token(RPAREN_T)) return true;
+ return false;
+ }
+
inline bool jj_3R_278()
{
if (jj_done) return true;
@@ -2377,13 +2377,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_481()
- {
- if (jj_done) return true;
- if (jj_3R_549()) return true;
- return false;
- }
-
inline bool jj_3R_313()
{
if (jj_done) return true;
@@ -2400,6 +2393,13 @@ void parseInline();
return false;
}
+ inline bool jj_3R_481()
+ {
+ if (jj_done) return true;
+ if (jj_3R_549()) return true;
+ return false;
+ }
+
inline bool jj_3R_147()
{
if (jj_done) return true;
@@ -2420,6 +2420,16 @@ void parseInline();
return false;
}
+ inline bool jj_3R_148()
+ {
+ if (jj_done) return true;
+ if (jj_3R_74()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_313()) jj_scanpos = xsp;
+ return false;
+ }
+
inline bool jj_3R_592()
{
if (jj_done) return true;
@@ -2436,13 +2446,11 @@ void parseInline();
return false;
}
- inline bool jj_3R_148()
+ inline bool jj_3R_647()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_313()) jj_scanpos = xsp;
+ if (jj_scan_token(NEG_T)) return true;
+ if (jj_scan_token(DOT_T)) return true;
return false;
}
@@ -2457,14 +2465,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_647()
- {
- if (jj_done) return true;
- if (jj_scan_token(NEG_T)) return true;
- if (jj_scan_token(DOT_T)) return true;
- return false;
- }
-
inline bool jj_3R_623()
{
if (jj_done) return true;
@@ -2477,16 +2477,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_66()
- {
- if (jj_done) return true;
- if (jj_3R_63()) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_160()) jj_scanpos = xsp;
- return false;
- }
-
inline bool jj_3_119()
{
if (jj_done) return true;
@@ -2506,63 +2496,73 @@ void parseInline();
return false;
}
- inline bool jj_3R_582()
+ inline bool jj_3R_66()
{
if (jj_done) return true;
- if (jj_3R_327()) return true;
+ if (jj_3R_63()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_160()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_413()
+ inline bool jj_3R_622()
{
if (jj_done) return true;
- if (jj_scan_token(INTEGER)) return true;
+ if (jj_scan_token(DOT_T)) return true;
+ if (jj_3R_74()) return true;
return false;
}
- inline bool jj_3R_622()
+ inline bool jj_3R_582()
+ {
+ if (jj_done) return true;
+ if (jj_3R_327()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_621()
{
if (jj_done) return true;
if (jj_scan_token(DOT_T)) return true;
+ if (jj_3R_147()) return true;
if (jj_3R_74()) return true;
return false;
}
- inline bool jj_3R_326()
+ inline bool jj_3R_568()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_412()) return false;
+ if (!jj_3R_621()) return false;
jj_scanpos = xsp;
- if (jj_3R_413()) return true;
+ if (jj_3R_622()) return true;
return false;
}
- inline bool jj_3R_412()
+ inline bool jj_3R_413()
{
if (jj_done) return true;
- if (jj_3R_63()) return true;
+ if (jj_scan_token(INTEGER)) return true;
return false;
}
- inline bool jj_3R_621()
+ inline bool jj_3R_326()
{
if (jj_done) return true;
- if (jj_scan_token(DOT_T)) return true;
- if (jj_3R_147()) return true;
- if (jj_3R_74()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (!jj_3R_412()) return false;
+ jj_scanpos = xsp;
+ if (jj_3R_413()) return true;
return false;
}
- inline bool jj_3R_568()
+ inline bool jj_3R_412()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (!jj_3R_621()) return false;
- jj_scanpos = xsp;
- if (jj_3R_622()) return true;
+ if (jj_3R_63()) return true;
return false;
}
@@ -2614,15 +2614,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_659()
- {
- if (jj_done) return true;
- if (jj_scan_token(FILE_T)) return true;
- if (jj_scan_token(OF_T)) return true;
- if (jj_3R_161()) return true;
- return false;
- }
-
inline bool jj_3R_508()
{
if (jj_done) return true;
@@ -2630,14 +2621,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_591()
- {
- if (jj_done) return true;
- if (jj_scan_token(OPEN_T)) return true;
- if (jj_3R_61()) return true;
- return false;
- }
-
inline bool jj_3R_410()
{
if (jj_done) return true;
@@ -2658,6 +2641,23 @@ void parseInline();
return false;
}
+ inline bool jj_3R_659()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(FILE_T)) return true;
+ if (jj_scan_token(OF_T)) return true;
+ if (jj_3R_161()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_591()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(OPEN_T)) return true;
+ if (jj_3R_61()) return true;
+ return false;
+ }
+
inline bool jj_3R_549()
{
if (jj_done) return true;
@@ -2671,13 +2671,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_593()
- {
- if (jj_done) return true;
- if (jj_3R_61()) return true;
- return false;
- }
-
inline bool jj_3_114()
{
if (jj_done) return true;
@@ -2693,6 +2686,13 @@ void parseInline();
return false;
}
+ inline bool jj_3R_593()
+ {
+ if (jj_done) return true;
+ if (jj_3R_61()) return true;
+ return false;
+ }
+
inline bool jj_3R_323()
{
if (jj_done) return true;
@@ -2713,6 +2713,13 @@ void parseInline();
return false;
}
+ inline bool jj_3R_284()
+ {
+ if (jj_done) return true;
+ if (jj_3R_137()) return true;
+ return false;
+ }
+
inline bool jj_3R_467()
{
if (jj_done) return true;
@@ -2735,10 +2742,10 @@ void parseInline();
return false;
}
- inline bool jj_3R_284()
+ inline bool jj_3_116()
{
if (jj_done) return true;
- if (jj_3R_137()) return true;
+ if (jj_3R_146()) return true;
return false;
}
@@ -2749,13 +2756,6 @@ void parseInline();
return false;
}
- inline bool jj_3_116()
- {
- if (jj_done) return true;
- if (jj_3R_146()) return true;
- return false;
- }
-
inline bool jj_3R_295()
{
if (jj_done) return true;
@@ -2815,6 +2815,13 @@ void parseInline();
return false;
}
+ inline bool jj_3R_296()
+ {
+ if (jj_done) return true;
+ if (jj_3R_74()) return true;
+ return false;
+ }
+
inline bool jj_3R_251()
{
if (jj_done) return true;
@@ -2823,6 +2830,13 @@ void parseInline();
return false;
}
+ inline bool jj_3R_246()
+ {
+ if (jj_done) return true;
+ if (jj_3R_137()) return true;
+ return false;
+ }
+
inline bool jj_3R_152()
{
if (jj_done) return true;
@@ -2831,10 +2845,11 @@ void parseInline();
return false;
}
- inline bool jj_3R_296()
+ inline bool jj_3_115()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_145()) return true;
+ if (jj_scan_token(COLON_T)) return true;
return false;
}
@@ -2859,32 +2874,42 @@ void parseInline();
return false;
}
- inline bool jj_3R_246()
+ inline bool jj_3R_406()
{
if (jj_done) return true;
- if (jj_3R_137()) return true;
+ if (jj_scan_token(NOR_T)) return true;
return false;
}
- inline bool jj_3R_406()
+ inline bool jj_3R_405()
{
if (jj_done) return true;
- if (jj_scan_token(NOR_T)) return true;
+ if (jj_scan_token(NAND_T)) return true;
return false;
}
- inline bool jj_3_115()
+ inline bool jj_3R_144()
{
if (jj_done) return true;
- if (jj_3R_145()) return true;
- if (jj_scan_token(COLON_T)) return true;
+ if (jj_scan_token(END_T)) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_296()) jj_scanpos = xsp;
+ if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_405()
+ inline bool jj_3R_648()
{
if (jj_done) return true;
- if (jj_scan_token(NAND_T)) return true;
+ if (jj_3R_137()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_188()
+ {
+ if (jj_done) return true;
+ if (jj_3R_349()) return true;
return false;
}
@@ -2914,31 +2939,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_144()
- {
- if (jj_done) return true;
- if (jj_scan_token(END_T)) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_296()) jj_scanpos = xsp;
- if (jj_scan_token(SEMI_T)) return true;
- return false;
- }
-
- inline bool jj_3R_648()
- {
- if (jj_done) return true;
- if (jj_3R_137()) return true;
- return false;
- }
-
- inline bool jj_3R_188()
- {
- if (jj_done) return true;
- if (jj_3R_349()) return true;
- return false;
- }
-
inline bool jj_3R_61()
{
if (jj_done) return true;
@@ -2982,6 +2982,16 @@ void parseInline();
return false;
}
+ inline bool jj_3R_136()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(GENERIC_T)) return true;
+ if (jj_scan_token(LPAREN_T)) return true;
+ if (jj_3R_327()) return true;
+ if (jj_scan_token(RPAREN_T)) return true;
+ return false;
+ }
+
inline bool jj_3R_116()
{
if (jj_done) return true;
@@ -2996,20 +3006,21 @@ void parseInline();
return false;
}
- inline bool jj_3R_136()
+ inline bool jj_3R_218()
{
if (jj_done) return true;
- if (jj_scan_token(GENERIC_T)) return true;
- if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_327()) return true;
- if (jj_scan_token(RPAREN_T)) return true;
+ if (jj_3R_369()) return true;
return false;
}
- inline bool jj_3R_218()
+ inline bool jj_3R_137()
{
if (jj_done) return true;
- if (jj_3R_369()) return true;
+ if (jj_scan_token(GENERIC_T)) return true;
+ if (jj_scan_token(MAP_T)) return true;
+ if (jj_scan_token(LPAREN_T)) return true;
+ if (jj_3R_169()) return true;
+ if (jj_scan_token(RPAREN_T)) return true;
return false;
}
@@ -3031,17 +3042,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_137()
- {
- if (jj_done) return true;
- if (jj_scan_token(GENERIC_T)) return true;
- if (jj_scan_token(MAP_T)) return true;
- if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_169()) return true;
- if (jj_scan_token(RPAREN_T)) return true;
- return false;
- }
-
inline bool jj_3R_685()
{
if (jj_done) return true;
@@ -3067,6 +3067,22 @@ void parseInline();
return false;
}
+ inline bool jj_3R_135()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(FUNCTION_T)) return true;
+ if (jj_3R_74()) return true;
+ if (jj_scan_token(IS_T)) return true;
+ if (jj_scan_token(NEW_T)) return true;
+ if (jj_3R_63()) return true;
+ if (jj_3R_245()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_284()) jj_scanpos = xsp;
+ if (jj_scan_token(SEMI_T)) return true;
+ return false;
+ }
+
inline bool jj_3R_645()
{
if (jj_done) return true;
@@ -3089,22 +3105,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_135()
- {
- if (jj_done) return true;
- if (jj_scan_token(FUNCTION_T)) return true;
- if (jj_3R_74()) return true;
- if (jj_scan_token(IS_T)) return true;
- if (jj_scan_token(NEW_T)) return true;
- if (jj_3R_63()) return true;
- if (jj_3R_245()) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_284()) jj_scanpos = xsp;
- if (jj_scan_token(SEMI_T)) return true;
- return false;
- }
-
inline bool jj_3R_95()
{
if (jj_done) return true;
@@ -3127,22 +3127,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_488()
- {
- if (jj_done) return true;
- if (jj_3R_554()) return true;
- if (jj_scan_token(COLON_T)) return true;
- if (jj_3R_555()) return true;
- return false;
- }
-
- inline bool jj_3R_662()
- {
- if (jj_done) return true;
- if (jj_3R_245()) return true;
- return false;
- }
-
inline bool jj_3R_91()
{
if (jj_done) return true;
@@ -3159,17 +3143,19 @@ void parseInline();
return false;
}
- inline bool jj_3R_438()
+ inline bool jj_3R_488()
{
if (jj_done) return true;
- if (jj_3R_348()) return true;
+ if (jj_3R_554()) return true;
+ if (jj_scan_token(COLON_T)) return true;
+ if (jj_3R_555()) return true;
return false;
}
- inline bool jj_3R_597()
+ inline bool jj_3R_438()
{
if (jj_done) return true;
- if (jj_scan_token(ALL_T)) return true;
+ if (jj_3R_348()) return true;
return false;
}
@@ -3180,10 +3166,10 @@ void parseInline();
return false;
}
- inline bool jj_3R_596()
+ inline bool jj_3R_662()
{
if (jj_done) return true;
- if (jj_scan_token(OTHER_T)) return true;
+ if (jj_3R_245()) return true;
return false;
}
@@ -3207,6 +3193,20 @@ void parseInline();
return false;
}
+ inline bool jj_3R_597()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(ALL_T)) return true;
+ return false;
+ }
+
+ inline bool jj_3R_596()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(OTHER_T)) return true;
+ return false;
+ }
+
inline bool jj_3R_595()
{
if (jj_done) return true;
@@ -3259,20 +3259,20 @@ void parseInline();
return false;
}
- inline bool jj_3R_644()
+ inline bool jj_3R_263()
{
if (jj_done) return true;
- if (jj_3R_661()) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_662()) jj_scanpos = xsp;
+ if (jj_3R_382()) return true;
return false;
}
- inline bool jj_3R_263()
+ inline bool jj_3R_644()
{
if (jj_done) return true;
- if (jj_3R_382()) return true;
+ if (jj_3R_661()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_662()) jj_scanpos = xsp;
return false;
}
@@ -3309,20 +3309,6 @@ void parseInline();
return false;
}
- inline bool jj_3_36()
- {
- if (jj_done) return true;
- if (jj_3R_91()) return true;
- return false;
- }
-
- inline bool jj_3_34()
- {
- if (jj_done) return true;
- if (jj_3R_67()) return true;
- return false;
- }
-
inline bool jj_3R_720()
{
if (jj_done) return true;
@@ -3337,18 +3323,17 @@ void parseInline();
return false;
}
- inline bool jj_3_35()
+ inline bool jj_3_36()
{
if (jj_done) return true;
- if (jj_3R_68()) return true;
+ if (jj_3R_91()) return true;
return false;
}
- inline bool jj_3R_558()
+ inline bool jj_3_34()
{
if (jj_done) return true;
- if (jj_scan_token(COMMA_T)) return true;
- if (jj_3R_557()) return true;
+ if (jj_3R_67()) return true;
return false;
}
@@ -3372,6 +3357,21 @@ void parseInline();
return false;
}
+ inline bool jj_3_35()
+ {
+ if (jj_done) return true;
+ if (jj_3R_68()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_558()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(COMMA_T)) return true;
+ if (jj_3R_557()) return true;
+ return false;
+ }
+
inline bool jj_3R_681()
{
if (jj_done) return true;
@@ -3431,13 +3431,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_618()
- {
- if (jj_done) return true;
- if (jj_scan_token(BOX_T)) return true;
- return false;
- }
-
inline bool jj_3_113()
{
if (jj_done) return true;
@@ -3459,18 +3452,17 @@ void parseInline();
return false;
}
- inline bool jj_3R_714()
+ inline bool jj_3R_618()
{
if (jj_done) return true;
- if (jj_3R_67()) return true;
+ if (jj_scan_token(BOX_T)) return true;
return false;
}
- inline bool jj_3R_366()
+ inline bool jj_3R_714()
{
if (jj_done) return true;
- if (jj_scan_token(ENTITY_T)) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_67()) return true;
return false;
}
@@ -3495,6 +3487,14 @@ void parseInline();
return false;
}
+ inline bool jj_3R_366()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(ENTITY_T)) return true;
+ if (jj_3R_74()) return true;
+ return false;
+ }
+
inline bool jj_3R_710()
{
if (jj_done) return true;
@@ -3523,18 +3523,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_491()
- {
- if (jj_done) return true;
- if (jj_3R_557()) return true;
- Token * xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_558()) { jj_scanpos = xsp; break; }
- }
- return false;
- }
-
inline bool jj_3R_706()
{
if (jj_done) return true;
@@ -3582,6 +3570,18 @@ void parseInline();
return false;
}
+ inline bool jj_3R_491()
+ {
+ if (jj_done) return true;
+ if (jj_3R_557()) return true;
+ Token * xsp;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_558()) { jj_scanpos = xsp; break; }
+ }
+ return false;
+ }
+
inline bool jj_3R_557()
{
if (jj_done) return true;
@@ -3592,6 +3592,14 @@ void parseInline();
return false;
}
+ inline bool jj_3R_544()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(AFTER_T)) return true;
+ if (jj_3R_61()) return true;
+ return false;
+ }
+
inline bool jj_3R_626()
{
if (jj_done) return true;
@@ -3601,6 +3609,21 @@ void parseInline();
return false;
}
+ inline bool jj_3R_143()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(PROTECTED_T)) return true;
+ if (jj_scan_token(BODY_T)) return true;
+ if (jj_3R_680()) return true;
+ if (jj_scan_token(END_T)) return true;
+ if (jj_scan_token(PROTECTED_T)) return true;
+ if (jj_scan_token(BODY_T)) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_681()) jj_scanpos = xsp;
+ return false;
+ }
+
inline bool jj_3R_614()
{
if (jj_done) return true;
@@ -3608,11 +3631,11 @@ void parseInline();
return false;
}
- inline bool jj_3R_544()
+ inline bool jj_3R_519()
{
if (jj_done) return true;
- if (jj_scan_token(AFTER_T)) return true;
- if (jj_3R_61()) return true;
+ if (jj_scan_token(COMMA_T)) return true;
+ if (jj_3R_463()) return true;
return false;
}
@@ -3637,21 +3660,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_143()
- {
- if (jj_done) return true;
- if (jj_scan_token(PROTECTED_T)) return true;
- if (jj_scan_token(BODY_T)) return true;
- if (jj_3R_680()) return true;
- if (jj_scan_token(END_T)) return true;
- if (jj_scan_token(PROTECTED_T)) return true;
- if (jj_scan_token(BODY_T)) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_681()) jj_scanpos = xsp;
- return false;
- }
-
inline bool jj_3R_610()
{
if (jj_done) return true;
@@ -3659,14 +3667,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_519()
- {
- if (jj_done) return true;
- if (jj_scan_token(COMMA_T)) return true;
- if (jj_3R_463()) return true;
- return false;
- }
-
inline bool jj_3R_609()
{
if (jj_done) return true;
@@ -3730,27 +3730,27 @@ void parseInline();
return false;
}
- inline bool jj_3R_600()
+ inline bool jj_3R_463()
{
if (jj_done) return true;
- if (jj_scan_token(CONFIGURATION_T)) return true;
+ if (jj_3R_61()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_544()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_599()
+ inline bool jj_3R_600()
{
if (jj_done) return true;
- if (jj_scan_token(ARCHITECTURE_T)) return true;
+ if (jj_scan_token(CONFIGURATION_T)) return true;
return false;
}
- inline bool jj_3R_463()
+ inline bool jj_3R_599()
{
if (jj_done) return true;
- if (jj_3R_61()) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_544()) jj_scanpos = xsp;
+ if (jj_scan_token(ARCHITECTURE_T)) return true;
return false;
}
@@ -3802,6 +3802,13 @@ void parseInline();
return false;
}
+ inline bool jj_3R_422()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(UNAFFECTED_T)) return true;
+ return false;
+ }
+
inline bool jj_3R_576()
{
if (jj_done) return true;
@@ -3817,10 +3824,26 @@ void parseInline();
return false;
}
- inline bool jj_3R_422()
+ inline bool jj_3R_332()
{
if (jj_done) return true;
- if (jj_scan_token(UNAFFECTED_T)) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (!jj_3R_421()) return false;
+ jj_scanpos = xsp;
+ if (jj_3R_422()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_421()
+ {
+ if (jj_done) return true;
+ if (jj_3R_463()) return true;
+ Token * xsp;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_519()) { jj_scanpos = xsp; break; }
+ }
return false;
}
@@ -3848,29 +3871,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_332()
- {
- if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (!jj_3R_421()) return false;
- jj_scanpos = xsp;
- if (jj_3R_422()) return true;
- return false;
- }
-
- inline bool jj_3R_421()
- {
- if (jj_done) return true;
- if (jj_3R_463()) return true;
- Token * xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_519()) { jj_scanpos = xsp; break; }
- }
- return false;
- }
-
inline bool jj_3R_260()
{
if (jj_done) return true;
@@ -3896,14 +3896,6 @@ void parseInline();
return false;
}
- inline bool jj_3_33()
- {
- if (jj_done) return true;
- if (jj_3R_90()) return true;
- if (jj_scan_token(ARROW_T)) return true;
- return false;
- }
-
inline bool jj_3R_705()
{
if (jj_done) return true;
@@ -3914,6 +3906,14 @@ void parseInline();
return false;
}
+ inline bool jj_3_33()
+ {
+ if (jj_done) return true;
+ if (jj_3R_90()) return true;
+ if (jj_scan_token(ARROW_T)) return true;
+ return false;
+ }
+
inline bool jj_3_32()
{
if (jj_done) return true;
@@ -3954,31 +3954,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_168()
- {
- if (jj_done) return true;
- if (jj_3R_89()) return true;
- return false;
- }
-
- inline bool jj_3R_167()
- {
- if (jj_done) return true;
- if (jj_3R_88()) return true;
- return false;
- }
-
- inline bool jj_3R_72()
- {
- if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (!jj_3R_167()) return false;
- jj_scanpos = xsp;
- if (jj_3R_168()) return true;
- return false;
- }
-
inline bool jj_3R_480()
{
if (jj_done) return true;
@@ -3987,12 +3962,10 @@ void parseInline();
return false;
}
- inline bool jj_3R_489()
+ inline bool jj_3R_168()
{
if (jj_done) return true;
- if (jj_3R_556()) return true;
- if (jj_scan_token(COLON_T)) return true;
- if (jj_3R_63()) return true;
+ if (jj_3R_89()) return true;
return false;
}
@@ -4012,44 +3985,45 @@ void parseInline();
return false;
}
- inline bool jj_3R_490()
+ inline bool jj_3R_167()
{
if (jj_done) return true;
- if (jj_scan_token(COMMA_T)) return true;
- if (jj_3R_434()) return true;
+ if (jj_3R_88()) return true;
return false;
}
- inline bool jj_3R_458()
+ inline bool jj_3R_72()
{
if (jj_done) return true;
- if (jj_3R_542()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (!jj_3R_167()) return false;
+ jj_scanpos = xsp;
+ if (jj_3R_168()) return true;
return false;
}
- inline bool jj_3R_397()
+ inline bool jj_3R_458()
{
if (jj_done) return true;
- if (jj_scan_token(DISCONNECT_T)) return true;
- if (jj_3R_489()) return true;
- if (jj_scan_token(AFTER_T)) return true;
- if (jj_3R_61()) return true;
- if (jj_scan_token(SEMI_T)) return true;
+ if (jj_3R_542()) return true;
return false;
}
- inline bool jj_3_111()
+ inline bool jj_3R_489()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_556()) return true;
if (jj_scan_token(COLON_T)) return true;
+ if (jj_3R_63()) return true;
return false;
}
- inline bool jj_3R_166()
+ inline bool jj_3_111()
{
if (jj_done) return true;
- if (jj_scan_token(DOWNTO_T)) return true;
+ if (jj_3R_74()) return true;
+ if (jj_scan_token(COLON_T)) return true;
return false;
}
@@ -4077,6 +4051,32 @@ void parseInline();
return false;
}
+ inline bool jj_3R_490()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(COMMA_T)) return true;
+ if (jj_3R_434()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_397()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(DISCONNECT_T)) return true;
+ if (jj_3R_489()) return true;
+ if (jj_scan_token(AFTER_T)) return true;
+ if (jj_3R_61()) return true;
+ if (jj_scan_token(SEMI_T)) return true;
+ return false;
+ }
+
+ inline bool jj_3R_166()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(DOWNTO_T)) return true;
+ return false;
+ }
+
inline bool jj_3R_477()
{
if (jj_done) return true;
@@ -4142,18 +4142,18 @@ void parseInline();
return false;
}
- inline bool jj_3R_573()
+ inline bool jj_3_106()
{
if (jj_done) return true;
- if (jj_scan_token(REJECT_T)) return true;
- if (jj_3R_61()) return true;
+ if (jj_3R_139()) return true;
return false;
}
- inline bool jj_3_106()
+ inline bool jj_3R_573()
{
if (jj_done) return true;
- if (jj_3R_139()) return true;
+ if (jj_scan_token(REJECT_T)) return true;
+ if (jj_3R_61()) return true;
return false;
}
@@ -4216,13 +4216,6 @@ void parseInline();
return false;
}
- inline bool jj_3_29()
- {
- if (jj_done) return true;
- if (jj_3R_65()) return true;
- return false;
- }
-
inline bool jj_3R_193()
{
if (jj_done) return true;
@@ -4237,24 +4230,24 @@ void parseInline();
return false;
}
- inline bool jj_3R_187()
+ inline bool jj_3_29()
{
if (jj_done) return true;
- if (jj_3R_348()) return true;
+ if (jj_3R_65()) return true;
return false;
}
- inline bool jj_3_28()
+ inline bool jj_3R_187()
{
if (jj_done) return true;
- if (jj_3R_86()) return true;
+ if (jj_3R_348()) return true;
return false;
}
- inline bool jj_3R_186()
+ inline bool jj_3_28()
{
if (jj_done) return true;
- if (jj_3R_87()) return true;
+ if (jj_3R_86()) return true;
return false;
}
@@ -4272,10 +4265,10 @@ void parseInline();
return false;
}
- inline bool jj_3R_185()
+ inline bool jj_3R_186()
{
if (jj_done) return true;
- if (jj_3R_347()) return true;
+ if (jj_3R_87()) return true;
return false;
}
@@ -4286,6 +4279,13 @@ void parseInline();
return false;
}
+ inline bool jj_3R_185()
+ {
+ if (jj_done) return true;
+ if (jj_3R_347()) return true;
+ return false;
+ }
+
inline bool jj_3R_640()
{
if (jj_done) return true;
@@ -4348,35 +4348,35 @@ void parseInline();
return false;
}
- inline bool jj_3R_139()
+ inline bool jj_3R_192()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (!jj_3R_285()) return false;
- jj_scanpos = xsp;
- if (jj_3R_286()) return true;
+ if (jj_3R_63()) return true;
return false;
}
- inline bool jj_3R_285()
+ inline bool jj_3R_476()
{
if (jj_done) return true;
- if (jj_3R_86()) return true;
+ if (jj_3R_547()) return true;
return false;
}
- inline bool jj_3R_192()
+ inline bool jj_3R_139()
{
if (jj_done) return true;
- if (jj_3R_63()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (!jj_3R_285()) return false;
+ jj_scanpos = xsp;
+ if (jj_3R_286()) return true;
return false;
}
- inline bool jj_3R_476()
+ inline bool jj_3R_285()
{
if (jj_done) return true;
- if (jj_3R_547()) return true;
+ if (jj_3R_86()) return true;
return false;
}
@@ -4453,6 +4453,13 @@ void parseInline();
return false;
}
+ inline bool jj_3R_256()
+ {
+ if (jj_done) return true;
+ if (jj_3R_114()) return true;
+ return false;
+ }
+
inline bool jj_3R_389()
{
if (jj_done) return true;
@@ -4467,13 +4474,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_256()
- {
- if (jj_done) return true;
- if (jj_3R_114()) return true;
- return false;
- }
-
inline bool jj_3R_119()
{
if (jj_done) return true;
@@ -4513,27 +4513,27 @@ void parseInline();
return false;
}
- inline bool jj_3R_396()
+ inline bool jj_3R_227()
{
if (jj_done) return true;
- if (jj_scan_token(FOR_T)) return true;
- if (jj_3R_181()) return true;
- if (jj_3R_344()) return true;
- if (jj_scan_token(SEMI_T)) return true;
+ if (jj_3R_321()) return true;
return false;
}
- inline bool jj_3R_227()
+ inline bool jj_3R_226()
{
if (jj_done) return true;
- if (jj_3R_321()) return true;
+ if (jj_3R_369()) return true;
return false;
}
- inline bool jj_3R_226()
+ inline bool jj_3R_396()
{
if (jj_done) return true;
- if (jj_3R_369()) return true;
+ if (jj_scan_token(FOR_T)) return true;
+ if (jj_3R_181()) return true;
+ if (jj_3R_344()) return true;
+ if (jj_scan_token(SEMI_T)) return true;
return false;
}
@@ -4566,6 +4566,13 @@ void parseInline();
return false;
}
+ inline bool jj_3_105()
+ {
+ if (jj_done) return true;
+ if (jj_3R_138()) return true;
+ return false;
+ }
+
inline bool jj_3R_578()
{
if (jj_done) return true;
@@ -4584,13 +4591,6 @@ void parseInline();
return false;
}
- inline bool jj_3_105()
- {
- if (jj_done) return true;
- if (jj_3R_138()) return true;
- return false;
- }
-
inline bool jj_3R_89()
{
if (jj_done) return true;
@@ -4616,15 +4616,6 @@ void parseInline();
return false;
}
- inline bool jj_3_25()
- {
- if (jj_done) return true;
- if (jj_scan_token(WHEN_T)) return true;
- if (jj_3R_83()) return true;
- if (jj_scan_token(ELSE_T)) return true;
- return false;
- }
-
inline bool jj_3R_388()
{
if (jj_done) return true;
@@ -4643,6 +4634,15 @@ void parseInline();
return false;
}
+ inline bool jj_3_25()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(WHEN_T)) return true;
+ if (jj_3R_83()) return true;
+ if (jj_scan_token(ELSE_T)) return true;
+ return false;
+ }
+
inline bool jj_3R_584()
{
if (jj_done) return true;
@@ -4792,13 +4792,6 @@ void parseInline();
return false;
}
- inline bool jj_3_22()
- {
- if (jj_done) return true;
- if (jj_3R_80()) return true;
- return false;
- }
-
inline bool jj_3R_364()
{
if (jj_done) return true;
@@ -4826,6 +4819,13 @@ void parseInline();
return false;
}
+ inline bool jj_3_22()
+ {
+ if (jj_done) return true;
+ if (jj_3R_80()) return true;
+ return false;
+ }
+
inline bool jj_3R_79()
{
if (jj_done) return true;
@@ -4895,42 +4895,35 @@ void parseInline();
return false;
}
- inline bool jj_3R_76()
- {
- if (jj_done) return true;
- if (jj_3R_74()) return true;
- if (jj_scan_token(COLON_T)) return true;
- return false;
- }
-
- inline bool jj_3_18()
+ inline bool jj_3_101()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_76()) jj_scanpos = xsp;
- if (jj_scan_token(BLOCK_T)) return true;
+ if (jj_3R_67()) return true;
return false;
}
- inline bool jj_3_101()
+ inline bool jj_3R_675()
{
if (jj_done) return true;
- if (jj_3R_67()) return true;
+ if (jj_3R_398()) return true;
return false;
}
- inline bool jj_3R_675()
+ inline bool jj_3R_76()
{
if (jj_done) return true;
- if (jj_3R_398()) return true;
+ if (jj_3R_74()) return true;
+ if (jj_scan_token(COLON_T)) return true;
return false;
}
- inline bool jj_3_20()
+ inline bool jj_3_18()
{
if (jj_done) return true;
- if (jj_3R_78()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_76()) jj_scanpos = xsp;
+ if (jj_scan_token(BLOCK_T)) return true;
return false;
}
@@ -4955,6 +4948,13 @@ void parseInline();
return false;
}
+ inline bool jj_3_20()
+ {
+ if (jj_done) return true;
+ if (jj_3R_78()) return true;
+ return false;
+ }
+
inline bool jj_3R_672()
{
if (jj_done) return true;
@@ -4976,13 +4976,6 @@ void parseInline();
return false;
}
- inline bool jj_3_17()
- {
- if (jj_done) return true;
- if (jj_3R_75()) return true;
- return false;
- }
-
inline bool jj_3R_669()
{
if (jj_done) return true;
@@ -5004,6 +4997,13 @@ void parseInline();
return false;
}
+ inline bool jj_3_17()
+ {
+ if (jj_done) return true;
+ if (jj_3R_75()) return true;
+ return false;
+ }
+
inline bool jj_3R_667()
{
if (jj_done) return true;
@@ -5025,13 +5025,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_176()
- {
- if (jj_done) return true;
- if (jj_3R_337()) return true;
- return false;
- }
-
inline bool jj_3R_664()
{
if (jj_done) return true;
@@ -5072,41 +5065,33 @@ void parseInline();
return false;
}
- inline bool jj_3R_175()
+ inline bool jj_3R_176()
{
if (jj_done) return true;
- if (jj_3R_75()) return true;
+ if (jj_3R_337()) return true;
return false;
}
- inline bool jj_3_16()
+ inline bool jj_3R_479()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
- if (jj_scan_token(COLON_T)) return true;
+ if (jj_scan_token(VARASSIGN_T)) return true;
+ if (jj_3R_61()) return true;
return false;
}
- inline bool jj_3R_479()
+ inline bool jj_3R_175()
{
if (jj_done) return true;
- if (jj_scan_token(VARASSIGN_T)) return true;
- if (jj_3R_61()) return true;
+ if (jj_3R_75()) return true;
return false;
}
- inline bool jj_3R_80()
+ inline bool jj_3_16()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3_16()) jj_scanpos = xsp;
- xsp = jj_scanpos;
- if (jj_scan_token(79)) jj_scanpos = xsp;
- xsp = jj_scanpos;
- if (!jj_3R_175()) return false;
- jj_scanpos = xsp;
- if (jj_3R_176()) return true;
+ if (jj_3R_74()) return true;
+ if (jj_scan_token(COLON_T)) return true;
return false;
}
@@ -5135,6 +5120,21 @@ void parseInline();
return false;
}
+ inline bool jj_3R_80()
+ {
+ if (jj_done) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3_16()) jj_scanpos = xsp;
+ xsp = jj_scanpos;
+ if (jj_scan_token(79)) jj_scanpos = xsp;
+ xsp = jj_scanpos;
+ if (!jj_3R_175()) return false;
+ jj_scanpos = xsp;
+ if (jj_3R_176()) return true;
+ return false;
+ }
+
inline bool jj_3_15()
{
if (jj_done) return true;
@@ -5156,39 +5156,26 @@ void parseInline();
return false;
}
- inline bool jj_3_14()
- {
- if (jj_done) return true;
- if (jj_3R_74()) return true;
- if (jj_scan_token(COLON_T)) return true;
- return false;
- }
-
- inline bool jj_3_13()
+ inline bool jj_3R_209()
{
if (jj_done) return true;
- if (jj_3R_73()) return true;
+ if (jj_3R_364()) return true;
+ if (jj_3R_365()) return true;
return false;
}
- inline bool jj_3R_209()
+ inline bool jj_3_14()
{
if (jj_done) return true;
- if (jj_3R_364()) return true;
- if (jj_3R_365()) return true;
+ if (jj_3R_74()) return true;
+ if (jj_scan_token(COLON_T)) return true;
return false;
}
- inline bool jj_3R_92()
+ inline bool jj_3_13()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3_14()) jj_scanpos = xsp;
- xsp = jj_scanpos;
- if (jj_scan_token(79)) jj_scanpos = xsp;
- if (jj_3R_196()) return true;
- if (jj_scan_token(SEMI_T)) return true;
+ if (jj_3R_73()) return true;
return false;
}
@@ -5225,6 +5212,19 @@ void parseInline();
return false;
}
+ inline bool jj_3R_92()
+ {
+ if (jj_done) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3_14()) jj_scanpos = xsp;
+ xsp = jj_scanpos;
+ if (jj_scan_token(79)) jj_scanpos = xsp;
+ if (jj_3R_196()) return true;
+ if (jj_scan_token(SEMI_T)) return true;
+ return false;
+ }
+
inline bool jj_3R_679()
{
if (jj_done) return true;
@@ -5264,6 +5264,13 @@ void parseInline();
return false;
}
+ inline bool jj_3R_478()
+ {
+ if (jj_done) return true;
+ if (jj_3R_548()) return true;
+ return false;
+ }
+
inline bool jj_3R_487()
{
if (jj_done) return true;
@@ -5271,10 +5278,11 @@ void parseInline();
return false;
}
- inline bool jj_3R_478()
+ inline bool jj_3R_164()
{
if (jj_done) return true;
- if (jj_3R_548()) return true;
+ if (jj_3R_133()) return true;
+ if (jj_3R_134()) return true;
return false;
}
@@ -5287,14 +5295,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_164()
- {
- if (jj_done) return true;
- if (jj_3R_133()) return true;
- if (jj_3R_134()) return true;
- return false;
- }
-
inline bool jj_3R_540()
{
if (jj_done) return true;
@@ -5348,6 +5348,14 @@ void parseInline();
return false;
}
+ inline bool jj_3R_453()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(COMMA_T)) return true;
+ if (jj_3R_63()) return true;
+ return false;
+ }
+
inline bool jj_3R_183()
{
if (jj_done) return true;
@@ -5363,19 +5371,18 @@ void parseInline();
return false;
}
- inline bool jj_3R_453()
+ inline bool jj_3R_195()
{
if (jj_done) return true;
- if (jj_scan_token(COMMA_T)) return true;
- if (jj_3R_63()) return true;
+ if (jj_scan_token(BAR_T)) return true;
+ if (jj_3R_194()) return true;
return false;
}
- inline bool jj_3R_195()
+ inline bool jj_3R_163()
{
if (jj_done) return true;
- if (jj_scan_token(BAR_T)) return true;
- if (jj_3R_194()) return true;
+ if (jj_3R_328()) return true;
return false;
}
@@ -5399,13 +5406,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_163()
- {
- if (jj_done) return true;
- if (jj_3R_328()) return true;
- return false;
- }
-
inline bool jj_3R_70()
{
if (jj_done) return true;
@@ -5471,18 +5471,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_90()
- {
- if (jj_done) return true;
- if (jj_3R_194()) return true;
- Token * xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_195()) { jj_scanpos = xsp; break; }
- }
- return false;
- }
-
inline bool jj_3R_245()
{
if (jj_done) return true;
@@ -5496,10 +5484,15 @@ void parseInline();
return false;
}
- inline bool jj_3_11()
+ inline bool jj_3R_90()
{
if (jj_done) return true;
- if (jj_3R_70()) return true;
+ if (jj_3R_194()) return true;
+ Token * xsp;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_195()) { jj_scanpos = xsp; break; }
+ }
return false;
}
@@ -5510,10 +5503,10 @@ void parseInline();
return false;
}
- inline bool jj_3R_354()
+ inline bool jj_3_11()
{
if (jj_done) return true;
- if (jj_scan_token(OTHER_T)) return true;
+ if (jj_3R_70()) return true;
return false;
}
@@ -5524,18 +5517,10 @@ void parseInline();
return false;
}
- inline bool jj_3_10()
- {
- if (jj_done) return true;
- if (jj_3R_70()) return true;
- if (jj_3R_71()) return true;
- return false;
- }
-
- inline bool jj_3R_353()
+ inline bool jj_3R_354()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_scan_token(OTHER_T)) return true;
return false;
}
@@ -5564,6 +5549,21 @@ void parseInline();
return false;
}
+ inline bool jj_3_10()
+ {
+ if (jj_done) return true;
+ if (jj_3R_70()) return true;
+ if (jj_3R_71()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_353()
+ {
+ if (jj_done) return true;
+ if (jj_3R_74()) return true;
+ return false;
+ }
+
inline bool jj_3R_590()
{
if (jj_done) return true;
@@ -5657,6 +5657,13 @@ void parseInline();
return false;
}
+ inline bool jj_3_98()
+ {
+ if (jj_done) return true;
+ if (jj_3R_132()) return true;
+ return false;
+ }
+
inline bool jj_3R_632()
{
if (jj_done) return true;
@@ -5667,10 +5674,10 @@ void parseInline();
return false;
}
- inline bool jj_3_98()
+ inline bool jj_3_97()
{
if (jj_done) return true;
- if (jj_3R_132()) return true;
+ if (jj_3R_131()) return true;
return false;
}
@@ -5681,13 +5688,6 @@ void parseInline();
return false;
}
- inline bool jj_3_97()
- {
- if (jj_done) return true;
- if (jj_3R_131()) return true;
- return false;
- }
-
inline bool jj_3R_541()
{
if (jj_done) return true;
@@ -5753,6 +5753,13 @@ void parseInline();
return false;
}
+ inline bool jj_3R_417()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(MINUS_T)) return true;
+ return false;
+ }
+
inline bool jj_3R_265()
{
if (jj_done) return true;
@@ -5764,10 +5771,21 @@ void parseInline();
return false;
}
- inline bool jj_3R_417()
+ inline bool jj_3R_328()
{
if (jj_done) return true;
- if (jj_scan_token(MINUS_T)) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (!jj_3R_416()) return false;
+ jj_scanpos = xsp;
+ if (jj_3R_417()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_416()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(PLUS_T)) return true;
return false;
}
@@ -5793,24 +5811,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_328()
- {
- if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (!jj_3R_416()) return false;
- jj_scanpos = xsp;
- if (jj_3R_417()) return true;
- return false;
- }
-
- inline bool jj_3R_416()
- {
- if (jj_done) return true;
- if (jj_scan_token(PLUS_T)) return true;
- return false;
- }
-
inline bool jj_3R_567()
{
if (jj_done) return true;
@@ -5898,6 +5898,13 @@ void parseInline();
return false;
}
+ inline bool jj_3_95()
+ {
+ if (jj_done) return true;
+ if (jj_3R_130()) return true;
+ return false;
+ }
+
inline bool jj_3_9()
{
if (jj_done) return true;
@@ -5905,10 +5912,10 @@ void parseInline();
return false;
}
- inline bool jj_3_95()
+ inline bool jj_3_94()
{
if (jj_done) return true;
- if (jj_3R_130()) return true;
+ if (jj_3R_129()) return true;
return false;
}
@@ -5922,13 +5929,6 @@ void parseInline();
return false;
}
- inline bool jj_3_94()
- {
- if (jj_done) return true;
- if (jj_3R_129()) return true;
- return false;
- }
-
inline bool jj_3_93()
{
if (jj_done) return true;
@@ -5983,32 +5983,32 @@ void parseInline();
return false;
}
- inline bool jj_3R_311()
+ inline bool jj_3R_118()
{
if (jj_done) return true;
- if (jj_3R_398()) return true;
+ if (jj_3R_74()) return true;
+ if (jj_scan_token(COLON_T)) return true;
return false;
}
- inline bool jj_3_7()
+ inline bool jj_3R_311()
{
if (jj_done) return true;
- if (jj_3R_67()) return true;
+ if (jj_3R_398()) return true;
return false;
}
- inline bool jj_3R_118()
+ inline bool jj_3R_253()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
- if (jj_scan_token(COLON_T)) return true;
+ if (jj_3R_378()) return true;
return false;
}
- inline bool jj_3R_253()
+ inline bool jj_3_7()
{
if (jj_done) return true;
- if (jj_3R_378()) return true;
+ if (jj_3R_67()) return true;
return false;
}
@@ -6023,6 +6023,13 @@ void parseInline();
return false;
}
+ inline bool jj_3_87()
+ {
+ if (jj_done) return true;
+ if (jj_3R_122()) return true;
+ return false;
+ }
+
inline bool jj_3_8()
{
if (jj_done) return true;
@@ -6044,10 +6051,10 @@ void parseInline();
return false;
}
- inline bool jj_3_87()
+ inline bool jj_3_86()
{
if (jj_done) return true;
- if (jj_3R_122()) return true;
+ if (jj_3R_121()) return true;
return false;
}
@@ -6065,27 +6072,6 @@ void parseInline();
return false;
}
- inline bool jj_3_86()
- {
- if (jj_done) return true;
- if (jj_3R_121()) return true;
- return false;
- }
-
- inline bool jj_3R_305()
- {
- if (jj_done) return true;
- if (jj_3R_394()) return true;
- return false;
- }
-
- inline bool jj_3R_306()
- {
- if (jj_done) return true;
- if (jj_3R_67()) return true;
- return false;
- }
-
inline bool jj_3_85()
{
if (jj_done) return true;
@@ -6093,13 +6079,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_304()
- {
- if (jj_done) return true;
- if (jj_3R_393()) return true;
- return false;
- }
-
inline bool jj_3R_520()
{
if (jj_done) return true;
@@ -6110,17 +6089,24 @@ void parseInline();
return false;
}
- inline bool jj_3R_303()
+ inline bool jj_3R_305()
{
if (jj_done) return true;
- if (jj_3R_392()) return true;
+ if (jj_3R_394()) return true;
return false;
}
- inline bool jj_3R_302()
+ inline bool jj_3R_306()
{
if (jj_done) return true;
- if (jj_3R_391()) return true;
+ if (jj_3R_67()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_304()
+ {
+ if (jj_done) return true;
+ if (jj_3R_393()) return true;
return false;
}
@@ -6164,17 +6150,17 @@ void parseInline();
return false;
}
- inline bool jj_3R_301()
+ inline bool jj_3R_303()
{
if (jj_done) return true;
- if (jj_3R_390()) return true;
+ if (jj_3R_392()) return true;
return false;
}
- inline bool jj_3R_300()
+ inline bool jj_3R_302()
{
if (jj_done) return true;
- if (jj_3R_389()) return true;
+ if (jj_3R_391()) return true;
return false;
}
@@ -6186,6 +6172,20 @@ void parseInline();
return false;
}
+ inline bool jj_3R_301()
+ {
+ if (jj_done) return true;
+ if (jj_3R_390()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_300()
+ {
+ if (jj_done) return true;
+ if (jj_3R_389()) return true;
+ return false;
+ }
+
inline bool jj_3R_299()
{
if (jj_done) return true;
@@ -6214,6 +6214,13 @@ void parseInline();
return false;
}
+ inline bool jj_3_83()
+ {
+ if (jj_done) return true;
+ if (jj_3R_117()) return true;
+ return false;
+ }
+
inline bool jj_3R_146()
{
if (jj_done) return true;
@@ -6260,13 +6267,6 @@ void parseInline();
return false;
}
- inline bool jj_3_83()
- {
- if (jj_done) return true;
- if (jj_3R_117()) return true;
- return false;
- }
-
inline bool jj_3R_268()
{
if (jj_done) return true;
@@ -6298,15 +6298,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_250()
- {
- if (jj_done) return true;
- if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_61()) return true;
- if (jj_scan_token(RPAREN_T)) return true;
- return false;
- }
-
inline bool jj_3R_440()
{
if (jj_done) return true;
@@ -6319,6 +6310,15 @@ void parseInline();
return false;
}
+ inline bool jj_3R_250()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(LPAREN_T)) return true;
+ if (jj_3R_61()) return true;
+ if (jj_scan_token(RPAREN_T)) return true;
+ return false;
+ }
+
inline bool jj_3R_357()
{
if (jj_done) return true;
@@ -6344,13 +6344,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_100()
- {
- if (jj_done) return true;
- if (jj_scan_token(BIT_STRING_LITERAL)) return true;
- return false;
- }
-
inline bool jj_3R_380()
{
if (jj_done) return true;
@@ -6359,17 +6352,10 @@ void parseInline();
return false;
}
- inline bool jj_3R_430()
- {
- if (jj_done) return true;
- if (jj_3R_341()) return true;
- return false;
- }
-
- inline bool jj_3R_429()
+ inline bool jj_3R_100()
{
if (jj_done) return true;
- if (jj_3R_73()) return true;
+ if (jj_scan_token(BIT_STRING_LITERAL)) return true;
return false;
}
@@ -6387,6 +6373,20 @@ void parseInline();
return false;
}
+ inline bool jj_3R_430()
+ {
+ if (jj_done) return true;
+ if (jj_3R_341()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_429()
+ {
+ if (jj_done) return true;
+ if (jj_3R_73()) return true;
+ return false;
+ }
+
inline bool jj_3R_428()
{
if (jj_done) return true;
@@ -6408,13 +6408,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_249()
- {
- if (jj_done) return true;
- if (jj_3R_63()) return true;
- return false;
- }
-
inline bool jj_3R_337()
{
if (jj_done) return true;
@@ -6436,6 +6429,13 @@ void parseInline();
return false;
}
+ inline bool jj_3R_249()
+ {
+ if (jj_done) return true;
+ if (jj_3R_63()) return true;
+ return false;
+ }
+
inline bool jj_3R_434()
{
if (jj_done) return true;
@@ -6571,13 +6571,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_372()
- {
- if (jj_done) return true;
- if (jj_scan_token(RANGE_T)) return true;
- return false;
- }
-
inline bool jj_3R_319()
{
if (jj_done) return true;
@@ -6600,6 +6593,13 @@ void parseInline();
return false;
}
+ inline bool jj_3R_372()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(RANGE_T)) return true;
+ return false;
+ }
+
inline bool jj_3R_230()
{
if (jj_done) return true;
@@ -6674,6 +6674,20 @@ void parseInline();
return false;
}
+ inline bool jj_3R_499()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(LESSTHAN_T)) return true;
+ return false;
+ }
+
+ inline bool jj_3R_498()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(GREATERTHAN_T)) return true;
+ return false;
+ }
+
inline bool jj_3_6()
{
if (jj_done) return true;
@@ -6693,10 +6707,10 @@ void parseInline();
return false;
}
- inline bool jj_3R_499()
+ inline bool jj_3R_497()
{
if (jj_done) return true;
- if (jj_scan_token(LESSTHAN_T)) return true;
+ if (jj_scan_token(EQU_T)) return true;
return false;
}
@@ -6708,20 +6722,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_498()
- {
- if (jj_done) return true;
- if (jj_scan_token(GREATERTHAN_T)) return true;
- return false;
- }
-
- inline bool jj_3R_497()
- {
- if (jj_done) return true;
- if (jj_scan_token(EQU_T)) return true;
- return false;
- }
-
inline bool jj_3R_496()
{
if (jj_done) return true;
@@ -6789,18 +6789,18 @@ void parseInline();
return false;
}
- inline bool jj_3R_418()
+ inline bool jj_3R_697()
{
if (jj_done) return true;
- if (jj_3R_66()) return true;
- if (jj_scan_token(ARROW_T)) return true;
+ if (jj_3R_705()) return true;
return false;
}
- inline bool jj_3R_697()
+ inline bool jj_3R_418()
{
if (jj_done) return true;
- if (jj_3R_705()) return true;
+ if (jj_3R_66()) return true;
+ if (jj_scan_token(ARROW_T)) return true;
return false;
}
@@ -6814,14 +6814,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_257()
- {
- if (jj_done) return true;
- if (jj_3R_145()) return true;
- if (jj_scan_token(COLON_T)) return true;
- return false;
- }
-
inline bool jj_3R_690()
{
if (jj_done) return true;
@@ -6839,6 +6831,14 @@ void parseInline();
return false;
}
+ inline bool jj_3R_257()
+ {
+ if (jj_done) return true;
+ if (jj_3R_145()) return true;
+ if (jj_scan_token(COLON_T)) return true;
+ return false;
+ }
+
inline bool jj_3R_120()
{
if (jj_done) return true;
@@ -6887,19 +6887,19 @@ void parseInline();
return false;
}
- inline bool jj_3_5()
+ inline bool jj_3_79()
{
if (jj_done) return true;
- if (jj_scan_token(ARRAY_T)) return true;
- if (jj_3R_65()) return true;
- if (jj_scan_token(OF_T)) return true;
+ if (jj_3R_114()) return true;
return false;
}
- inline bool jj_3_79()
+ inline bool jj_3_5()
{
if (jj_done) return true;
- if (jj_3R_114()) return true;
+ if (jj_scan_token(ARRAY_T)) return true;
+ if (jj_3R_65()) return true;
+ if (jj_scan_token(OF_T)) return true;
return false;
}
@@ -6946,6 +6946,13 @@ void parseInline();
return false;
}
+ inline bool jj_3R_237()
+ {
+ if (jj_done) return true;
+ if (jj_3R_114()) return true;
+ return false;
+ }
+
inline bool jj_3R_695()
{
if (jj_done) return true;
@@ -6964,13 +6971,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_237()
- {
- if (jj_done) return true;
- if (jj_3R_114()) return true;
- return false;
- }
-
inline bool jj_3R_64()
{
if (jj_done) return true;
@@ -7067,13 +7067,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_551()
- {
- if (jj_done) return true;
- if (jj_scan_token(CHARACTER_LITERAL)) return true;
- return false;
- }
-
inline bool jj_3R_197()
{
if (jj_done) return true;
@@ -7082,23 +7075,10 @@ void parseInline();
return false;
}
- inline bool jj_3R_550()
- {
- if (jj_done) return true;
- if (jj_3R_74()) return true;
- return false;
- }
-
- inline bool jj_3R_482()
+ inline bool jj_3R_551()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (!jj_3R_550()) return false;
- jj_scanpos = xsp;
- if (!jj_3R_551()) return false;
- jj_scanpos = xsp;
- if (jj_3R_552()) return true;
+ if (jj_scan_token(CHARACTER_LITERAL)) return true;
return false;
}
@@ -7128,6 +7108,26 @@ void parseInline();
return false;
}
+ inline bool jj_3R_550()
+ {
+ if (jj_done) return true;
+ if (jj_3R_74()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_482()
+ {
+ if (jj_done) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (!jj_3R_550()) return false;
+ jj_scanpos = xsp;
+ if (!jj_3R_551()) return false;
+ jj_scanpos = xsp;
+ if (jj_3R_552()) return true;
+ return false;
+ }
+
inline bool jj_3R_358()
{
if (jj_done) return true;
@@ -7153,18 +7153,18 @@ void parseInline();
return false;
}
- inline bool jj_3R_483()
+ inline bool jj_3R_533()
{
if (jj_done) return true;
- if (jj_scan_token(COLON_T)) return true;
- if (jj_3R_89()) return true;
+ if (jj_3R_347()) return true;
return false;
}
- inline bool jj_3R_533()
+ inline bool jj_3R_483()
{
if (jj_done) return true;
- if (jj_3R_347()) return true;
+ if (jj_scan_token(COLON_T)) return true;
+ if (jj_3R_89()) return true;
return false;
}
@@ -7205,20 +7205,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_114()
- {
- if (jj_done) return true;
- if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_247()) return true;
- Token * xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_248()) { jj_scanpos = xsp; break; }
- }
- if (jj_scan_token(RPAREN_T)) return true;
- return false;
- }
-
inline bool jj_3_77()
{
if (jj_done) return true;
@@ -7240,6 +7226,20 @@ void parseInline();
return false;
}
+ inline bool jj_3R_114()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(LPAREN_T)) return true;
+ if (jj_3R_247()) return true;
+ Token * xsp;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_248()) { jj_scanpos = xsp; break; }
+ }
+ if (jj_scan_token(RPAREN_T)) return true;
+ return false;
+ }
+
inline bool jj_3R_528()
{
if (jj_done) return true;
@@ -7254,6 +7254,13 @@ void parseInline();
return false;
}
+ inline bool jj_3R_526()
+ {
+ if (jj_done) return true;
+ if (jj_3R_387()) return true;
+ return false;
+ }
+
inline bool jj_3R_282()
{
if (jj_done) return true;
@@ -7268,18 +7275,18 @@ void parseInline();
return false;
}
- inline bool jj_3R_526()
+ inline bool jj_3_3()
{
if (jj_done) return true;
- if (jj_3R_387()) return true;
+ if (jj_3R_63()) return true;
+ if (jj_scan_token(LPAREN_T)) return true;
return false;
}
- inline bool jj_3_3()
+ inline bool jj_3R_525()
{
if (jj_done) return true;
- if (jj_3R_63()) return true;
- if (jj_scan_token(LPAREN_T)) return true;
+ if (jj_3R_98()) return true;
return false;
}
@@ -7303,13 +7310,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_525()
- {
- if (jj_done) return true;
- if (jj_3R_98()) return true;
- return false;
- }
-
inline bool jj_3R_441()
{
if (jj_done) return true;
@@ -7357,23 +7357,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_516()
- {
- if (jj_done) return true;
- if (jj_3R_63()) return true;
- if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_62()) return true;
- if (jj_scan_token(RPAREN_T)) return true;
- return false;
- }
-
- inline bool jj_3R_515()
- {
- if (jj_done) return true;
- if (jj_scan_token(BOX_T)) return true;
- return false;
- }
-
inline bool jj_3_76()
{
if (jj_done) return true;
@@ -7393,23 +7376,20 @@ void parseInline();
return false;
}
- inline bool jj_3R_514()
+ inline bool jj_3R_516()
{
if (jj_done) return true;
+ if (jj_3R_63()) return true;
+ if (jj_scan_token(LPAREN_T)) return true;
if (jj_3R_62()) return true;
+ if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3R_419()
+ inline bool jj_3R_515()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (!jj_3R_514()) return false;
- jj_scanpos = xsp;
- if (!jj_3R_515()) return false;
- jj_scanpos = xsp;
- if (jj_3R_516()) return true;
+ if (jj_scan_token(BOX_T)) return true;
return false;
}
@@ -7423,10 +7403,23 @@ void parseInline();
return false;
}
- inline bool jj_3R_236()
+ inline bool jj_3R_514()
{
if (jj_done) return true;
- if (jj_3R_169()) return true;
+ if (jj_3R_62()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_419()
+ {
+ if (jj_done) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (!jj_3R_514()) return false;
+ jj_scanpos = xsp;
+ if (!jj_3R_515()) return false;
+ jj_scanpos = xsp;
+ if (jj_3R_516()) return true;
return false;
}
@@ -7444,6 +7437,13 @@ void parseInline();
return false;
}
+ inline bool jj_3R_236()
+ {
+ if (jj_done) return true;
+ if (jj_3R_169()) return true;
+ return false;
+ }
+
inline bool jj_3R_213()
{
if (jj_done) return true;
@@ -7465,24 +7465,24 @@ void parseInline();
return false;
}
- inline bool jj_3R_155()
+ inline bool jj_3R_212()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_91()) return true;
return false;
}
- inline bool jj_3R_212()
+ inline bool jj_3R_211()
{
if (jj_done) return true;
- if (jj_3R_91()) return true;
+ if (jj_3R_367()) return true;
return false;
}
- inline bool jj_3R_211()
+ inline bool jj_3R_155()
{
if (jj_done) return true;
- if (jj_3R_367()) return true;
+ if (jj_3R_74()) return true;
return false;
}
@@ -7519,6 +7519,13 @@ void parseInline();
return false;
}
+ inline bool jj_3_72()
+ {
+ if (jj_done) return true;
+ if (jj_3R_63()) return true;
+ return false;
+ }
+
inline bool jj_3R_154()
{
if (jj_done) return true;
@@ -7526,10 +7533,10 @@ void parseInline();
return false;
}
- inline bool jj_3_72()
+ inline bool jj_3_71()
{
if (jj_done) return true;
- if (jj_3R_63()) return true;
+ if (jj_3R_112()) return true;
return false;
}
@@ -7553,13 +7560,6 @@ void parseInline();
return false;
}
- inline bool jj_3_71()
- {
- if (jj_done) return true;
- if (jj_3R_112()) return true;
- return false;
- }
-
inline bool jj_3R_475()
{
if (jj_done) return true;
@@ -7574,18 +7574,18 @@ void parseInline();
return false;
}
- inline bool jj_3R_658()
+ inline bool jj_3R_474()
{
if (jj_done) return true;
- if (jj_scan_token(ACCESS_T)) return true;
- if (jj_3R_89()) return true;
+ if (jj_3R_113()) return true;
return false;
}
- inline bool jj_3R_474()
+ inline bool jj_3R_658()
{
if (jj_done) return true;
- if (jj_3R_113()) return true;
+ if (jj_scan_token(ACCESS_T)) return true;
+ if (jj_3R_89()) return true;
return false;
}
@@ -7603,6 +7603,22 @@ void parseInline();
return false;
}
+ inline bool jj_3_68()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(LPAREN_T)) return true;
+ if (jj_3R_61()) return true;
+ if (jj_scan_token(RPAREN_T)) return true;
+ return false;
+ }
+
+ inline bool jj_3R_472()
+ {
+ if (jj_done) return true;
+ if (jj_3R_112()) return true;
+ return false;
+ }
+
inline bool jj_3R_235()
{
if (jj_done) return true;
@@ -7610,12 +7626,10 @@ void parseInline();
return false;
}
- inline bool jj_3_68()
+ inline bool jj_3R_702()
{
if (jj_done) return true;
- if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_61()) return true;
- if (jj_scan_token(RPAREN_T)) return true;
+ if (jj_3R_63()) return true;
return false;
}
@@ -7626,10 +7640,10 @@ void parseInline();
return false;
}
- inline bool jj_3R_472()
+ inline bool jj_3_67()
{
if (jj_done) return true;
- if (jj_3R_112()) return true;
+ if (jj_3R_110()) return true;
return false;
}
@@ -7653,20 +7667,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_702()
- {
- if (jj_done) return true;
- if (jj_3R_63()) return true;
- return false;
- }
-
- inline bool jj_3_67()
- {
- if (jj_done) return true;
- if (jj_3R_110()) return true;
- return false;
- }
-
inline bool jj_3R_471()
{
if (jj_done) return true;
diff --git a/vhdlparser/VhdlParserTokenManager.cc b/vhdlparser/VhdlParserTokenManager.cc
index 341469f..3b7b396 100644
--- a/vhdlparser/VhdlParserTokenManager.cc
+++ b/vhdlparser/VhdlParserTokenManager.cc
@@ -3503,7 +3503,7 @@ void VhdlParserTokenManager::SkipLexicalActions(Token *matchedToken){
if (count == 1)
parser->outlineParser()->oneLineComment(doc);
else
- parser->outlineParser()->handleCommentBlock(image.data(),FALSE); ;
+ parser->outlineParser()->handleCommentBlock(QCString(image),FALSE); ;
}
break;
}
@@ -3521,7 +3521,7 @@ void VhdlParserTokenManager::SkipLexicalActions(Token *matchedToken){
image.append(input_stream->GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)));
{
QCString q = filter2008VhdlComment(image.data());
- parser->outlineParser()->handleCommentBlock(q.data(),TRUE);image.clear();
+ parser->outlineParser()->handleCommentBlock(QCString(q),TRUE);image.clear();
}
break;
}
diff --git a/vhdlparser/vhdl_adj.py b/vhdlparser/vhdl_adj.py
index a431970..388864a 100644
--- a/vhdlparser/vhdl_adj.py
+++ b/vhdlparser/vhdl_adj.py
@@ -18,7 +18,7 @@ def main():
inputFile = open(sys.argv[1], 'r')
outputFile = open(sys.argv[2], 'w')
for line in inputFile:
- outputFile.write(line.replace("assert(false);","assert(false);return \"\";"))
+ outputFile.write(line.replace("assert(false);","assert(false);return QCString();"))
if __name__ == '__main__':
main()
diff --git a/vhdlparser/vhdlparser.jj b/vhdlparser/vhdlparser.jj
index e263289..3ef732e 100755
--- a/vhdlparser/vhdlparser.jj
+++ b/vhdlparser/vhdlparser.jj
@@ -110,7 +110,7 @@ SKIP:
if (count == 1)
parser->outlineParser()->oneLineComment(doc);
else
- parser->outlineParser()->handleCommentBlock(image.data(),FALSE); ;
+ parser->outlineParser()->handleCommentBlock(QCString(image),FALSE); ;
}
}
@@ -128,7 +128,7 @@ SKIP :
{
{
QCString q = filter2008VhdlComment(image.data());
- parser->outlineParser()->handleCommentBlock(q.data(),TRUE);image.clear();
+ parser->outlineParser()->handleCommentBlock(QCString(q),TRUE);image.clear();
}
}
| <MULT_VHDL_2008_COMMENT : "/*" (~["*"])* "*" ("*" | ~["*","/"] (~["*"])* "*")* "/">
@@ -337,22 +337,22 @@ TOKEN:
QCString abstract_literal() :
{Token *tok;}
{
- tok=<DECIMAL_LITERAL> { return tok->image.c_str(); }
- | tok=<INTEGER> { return tok->image.c_str(); }
- | tok=<BASED_LITERAL> { return tok->image.c_str(); }
+ tok=<DECIMAL_LITERAL> { return QCString(tok->image); }
+ | tok=<INTEGER> { return QCString(tok->image); }
+ | tok=<BASED_LITERAL> { return QCString(tok->image); }
}
QCString access_type_definition() :
{Token *tok=0;QCString str,str1;}
{
- tok=<ACCESS_T> str1=subtype_indication() { str=tok->image.c_str(); return str+str1; }
+ tok=<ACCESS_T> str1=subtype_indication() { str=tok->image; return str+str1; }
}
QCString actual_designator() :
{QCString str;Token *t=0;}
{
-t=<OPEN_T> { return t->image.c_str(); }
+t=<OPEN_T> { return QCString(t->image); }
|
LOOKAHEAD(expression())
str=expression() { return str; }
@@ -392,7 +392,7 @@ QCString adding_operator () :
QCString aggregate() : {QCString s,s1,s2;}
{
- <LPAREN_T> s=element_association() (<COMMA_T> s1=element_association(){s+=","+s1;})* <RPAREN_T> { return "("+s+")";}
+ <LPAREN_T> s=element_association() (<COMMA_T> s1=element_association(){s+=","+s1;})* <RPAREN_T> { return QCString("("+s+")");}
}
QCString alias_declaration() : {QCString s,s1,s2;}
@@ -411,7 +411,7 @@ QCString alias_declaration() : {QCString s,s1,s2;}
QCString alias_designator() : {Token *tok=0;QCString s;}
{
s=identifier() { return s;}
- | tok=<CHARACTER_LITERAL> { return tok->image.c_str(); }
+ | tok=<CHARACTER_LITERAL> { return QCString(tok->image); }
| s=operator_symbol() { return s; }
}
@@ -431,7 +431,7 @@ void architecture_body() : {QCString s,s1;}
m_sharedState->genLabels.resize(0);
outlineParser()->pushLabel(m_sharedState->genLabels,s1);
m_sharedState->lastCompound=m_sharedState->current;
- outlineParser()->addVhdlType(t,outlineParser()->getLine(ARCHITECTURE_T),Entry::CLASS_SEC,VhdlDocGen::ARCHITECTURE,0,0,Private);
+ outlineParser()->addVhdlType(t.data(),outlineParser()->getLine(ARCHITECTURE_T),Entry::CLASS_SEC,VhdlDocGen::ARCHITECTURE,0,0,Private);
}
try
{
@@ -511,7 +511,7 @@ QCString attribute_declaration() : {QCString s,s1;}
QCString attribute_designator (): {QCString s;Token *tok=0;}
{
s=identifier() { return s;}
- | tok=<RANGE_T> { return tok->image.c_str(); }
+ | tok=<RANGE_T> { return QCString(tok->image); }
}
@@ -532,12 +532,12 @@ QCString attribute_specification(): {QCString s,s1,s2;}
QCString base() : {Token *tok=0;}
{
- tok=<INTEGER> { return tok->image.c_str();}
+ tok=<INTEGER> { return QCString(tok->image);}
}
QCString base_specifier (): {Token *tok=0;}
{
- tok=<BASIC_IDENTIFIER> { return tok->image.c_str();}
+ tok=<BASIC_IDENTIFIER> { return QCString(tok->image);}
}
QCString base_unit_declaration() :
@@ -548,17 +548,17 @@ QCString base_unit_declaration() :
QCString based_integer() : {Token *tok=0;}
{
- tok=<BASIC_IDENTIFIER> { return tok->image.c_str();}
+ tok=<BASIC_IDENTIFIER> { return QCString(tok->image);}
}
QCString based_literal(): {Token *tok=0;}
{
- tok=<BASED_LITERAL> { return tok->image.c_str();}
+ tok=<BASED_LITERAL> { return QCString(tok->image);}
}
QCString basic_identifier() : {Token *tok=0;}
{
- tok=<BASIC_IDENTIFIER> { return tok->image.c_str();}
+ tok=<BASIC_IDENTIFIER> { return QCString(tok->image);}
}
void binding_indication() : {}
@@ -570,13 +570,13 @@ void binding_indication() : {}
QCString bit_string_literal (): {Token *tok=0;}
{
- tok=<BIT_STRING_LITERAL> { return tok->image.c_str();}
+ tok=<BIT_STRING_LITERAL> { return QCString(tok->image);}
}
QCString bit_value() : {Token *tok=0;}
{
- tok=<BASIC_IDENTIFIER> { return tok->image.c_str();}
+ tok=<BASIC_IDENTIFIER> { return QCString(tok->image);}
}
void block_configuration() : {}
@@ -653,7 +653,7 @@ void case_statement() : {QCString s;}
<CASE_T> s=expression()
{
QCString ca="case "+s;
- FlowChart::addFlowChart(FlowChart::CASE_NO,0,ca);
+ FlowChart::addFlowChart(FlowChart::CASE_NO,QCString(),ca);
}
<IS_T>
case_statement_alternative()
@@ -661,7 +661,7 @@ void case_statement() : {QCString s;}
<END_T> <CASE_T> [ identifier() ] <SEMI_T>
{
FlowChart::moveToPrevLevel();
- FlowChart::addFlowChart(FlowChart::END_CASE,"end case",0);
+ FlowChart::addFlowChart(FlowChart::END_CASE,"end case",QCString());
}
}
@@ -669,16 +669,16 @@ void case_statement_alternative() : {QCString s;}
{
<WHEN_T> s=choices() <ARROW_T>
{
- QCString t="when ";
+ QCString t("when ");
t+=s+"=> ";
- FlowChart::addFlowChart(FlowChart::WHEN_NO,s.data(),t);
+ FlowChart::addFlowChart(FlowChart::WHEN_NO,s,t);
}
sequence_of_statement(){FlowChart::moveToPrevLevel(); }
}
QCString character_literal() : {Token *tok=0;}
{
- tok=<CHARACTER_LITERAL>{ return tok->image.c_str();}
+ tok=<CHARACTER_LITERAL>{ return QCString(tok->image);}
}
QCString choice() : {QCString s;}
@@ -731,8 +731,8 @@ void component_instantiation_statement() : {QCString s,s1;}
{
QCString s3;
if (s1.contains("|")) {
- s3=VhdlDocGen::getIndexWord(s1.data(),0);
- s1=VhdlDocGen::getIndexWord(s1.data(),1);
+ s3=VhdlDocGen::getIndexWord(s1,0);
+ s1=VhdlDocGen::getIndexWord(s1,1);
}
outlineParser()->addCompInst(s.lower().data(),s1.lower().data(),s3.data(),outlineParser()->getLine());
@@ -914,7 +914,7 @@ void context_item() : {}
QCString decimal_literal() : {Token *tok=0;}
{
- tok=<DECIMAL_LITERAL> { return tok->image.c_str(); }
+ tok=<DECIMAL_LITERAL> { return QCString(tok->image); }
}
@@ -944,8 +944,8 @@ QCString designator() : {QCString s;}
QCString direction (): {Token *tok=0;}
{
-tok=<TO_T> { return tok->image.c_str();}
-| tok=<DOWNTO_T> { return tok->image.c_str();}
+tok=<TO_T> { return QCString(tok->image);}
+| tok=<DOWNTO_T> { return QCString(tok->image);}
}
void disconnection_specification() : {}
@@ -979,27 +979,31 @@ return s1;
QCString element_declaration() : {QCString rec_name,s1,s2;}
{
-rec_name=identifier_list() <COLON_T> s1=subtype_indication() <SEMI_T>
-{
- QCString name;
- QCStringList ql=QCStringList::split(",",rec_name);
- for (uint j=0;j<ql.count();j++)
- {
- name=ql[j]+"~";
- name+=outlineParser()->getNameID().data();;
- outlineParser()->addVhdlType(name.data(),outlineParser()->getLine(),Entry::VARIABLE_SEC,VhdlDocGen::RECORD,0,s1.data(),Public);
- }
- s2=rec_name+":"+s1;
- return s2;
- }
+ rec_name=identifier_list() <COLON_T> s1=subtype_indication() <SEMI_T>
+ {
+ auto ql = split(rec_name.str(),",");
+ for (const auto &n : ql)
+ {
+ std::string name=n+"~";
+ name+=outlineParser()->getNameID().data();
+ outlineParser()->addVhdlType(
+ name.c_str(),outlineParser()->getLine(),
+ Entry::VARIABLE_SEC,
+ VhdlDocGen::RECORD,0,
+ s1.data(),
+ Public);
+ }
+ s2=rec_name+":"+s1;
+ return s2;
+ }
}
QCString entity_aspect() : {Token *tok=0;QCString s,s1;}
{
tok=<ENTITY_T> s=name() [ LOOKAHEAD(1)<LPAREN_T> s1=identifier() <RPAREN_T> {s+="("+s1+")";} ] { return s;}
-| tok=<CONFIGURATION_T> s=name() { return tok->image.c_str()+s;}
-| tok=<OPEN_T> { return tok->image.c_str(); }
+| tok=<CONFIGURATION_T> s=name() { return QCString(tok->image)+s;}
+| tok=<OPEN_T> { return QCString(tok->image); }
}
QCString entity_class() : {}
@@ -1152,7 +1156,7 @@ QCString exit_statement() : {QCString s,s1,s2;Token *t=0;Token *t1=0;}
m_sharedState->lab.resize(0);
if(t) s+=":";
if(t1) s2.prepend(" when ");
- FlowChart::addFlowChart(FlowChart::EXIT_NO,"exit",s2.data(),s1.data());
+ FlowChart::addFlowChart(FlowChart::EXIT_NO,"exit",s2,s1);
return s+s1+s2+";";
}
@@ -1176,7 +1180,7 @@ QCString logop() : {}
QCString extended_identifier (): {Token *t;}
{
- t=<EXTENDED_CHARACTER> { return t->image.c_str(); }
+ t=<EXTENDED_CHARACTER> { return QCString(t->image); }
}
QCString factor(): {QCString s,s1;}
@@ -1222,7 +1226,7 @@ QCString floating_type_definition() : {QCString s;}
QCString formal_designator() : {QCString s;Token *tok=0;}
{
s=name() { return s; }
- |tok=<INTEGER> { return tok->image.c_str();}
+ |tok=<INTEGER> { return QCString(tok->image);}
}
@@ -1340,8 +1344,8 @@ void guarded_signal_specification() : {}
QCString identifier() : {Token *tok=0;}
{
- tok=<EXTENDED_CHARACTER>{ return tok->image.c_str(); }
- |tok=<BASIC_IDENTIFIER> { return tok->image.c_str(); }
+ tok=<EXTENDED_CHARACTER>{ return QCString(tok->image); }
+ |tok=<BASIC_IDENTIFIER> { return QCString(tok->image); }
}
QCString identifier_list() : {QCString str,str1;}
@@ -1355,25 +1359,25 @@ void if_statement() : {QCString s,s1;}
<IF_T> s=condition() <THEN_T>
{
s.prepend("if ");
- FlowChart::addFlowChart(FlowChart::IF_NO,0,s);
+ FlowChart::addFlowChart(FlowChart::IF_NO,QCString(),s);
}
sequence_of_statement()
(
<ELSIF_T> s1=condition() <THEN_T>
{
s1.prepend("elsif ");
- FlowChart::addFlowChart(FlowChart::ELSIF_NO,0,s1.data());
+ FlowChart::addFlowChart(FlowChart::ELSIF_NO,QCString(),s1);
}
sequence_of_statement()
)*
[LOOKAHEAD(1) <ELSE_T>
{
- FlowChart::addFlowChart(FlowChart::ELSE_NO,0,0);
+ FlowChart::addFlowChart(FlowChart::ELSE_NO,QCString(),QCString());
}
sequence_of_statement() ] <END_T> <IF_T> [ identifier() ] <SEMI_T>
{
FlowChart::moveToPrevLevel();
- FlowChart::addFlowChart(FlowChart::ENDIF_NO,0,0);
+ FlowChart::addFlowChart(FlowChart::ENDIF_NO,QCString(),QCString());
}
}
@@ -1385,11 +1389,9 @@ QCString incomplete_type_declaration() : {QCString s;}
}
}
-QCString index_constraint() : {QCString s="("; QCString s1,s2;}
+QCString index_constraint() : {QCString s("("); QCString s1,s2;}
{
- //try{
<LPAREN_T> s2=discrete_range(){s+=s2;}(LOOKAHEAD(1)<COMMA_T> s1=discrete_range(){s+=",";s+=s1;})* <RPAREN_T> {return s+")";}
-//}catch(...){ outlineParser()->error_skipto(SEMI_T);hasError=false;return "";}
}
QCString index_specification() : {QCString s;}
@@ -1414,13 +1416,13 @@ QCString instantiation_unit() : {QCString s,s1,s2;}
QCString instantiation_list() : {QCString s;Token *tok=0;}
{
s=identifier_list() { return s;}
-| tok=<OTHER_T> {return tok->image.c_str();}
-| tok=<ALL_T> {return tok->image.c_str();}
+| tok=<OTHER_T> {return QCString(tok->image);}
+| tok=<ALL_T> {return QCString(tok->image);}
}
QCString integer() : {Token *t;}
{
- t=<INTEGER> {return t->image.c_str();}
+ t=<INTEGER> {return QCString(t->image);}
}
QCString integer_type_definition() : {QCString s;}
@@ -1464,7 +1466,7 @@ QCString interface_file_declaration() : {QCString s,s1;}
<FILE_T> s=identifier_list() <COLON_T> s1=subtype_indication()
{
outlineParser()->addVhdlType(s.data(),outlineParser()->getLine(),Entry::VARIABLE_SEC,VhdlDocGen::VFILE,0,s1.data(),Public);
- return " file "+s+":"+s1;
+ return QCString(" file "+s+":"+s1);
}
}
@@ -1482,7 +1484,7 @@ QCString interface_variable_declaration() : {Token *tok=0;Token *tok1=0;Token *
s2=subtype_indication() [ tok1=<BUS_T> ] [ tok2=<VARASSIGN_T> s4=expression() ]
{
if(tok)
- s5=tok->image.c_str();
+ s5=QCString(tok->image);
if(tok1)
s3=tok1->image.data();
@@ -1516,14 +1518,14 @@ QCString iteration_scheme() : {QCString s;}
<WHILE_T> s=condition()
{
s.prepend("while ");
- FlowChart::addFlowChart(FlowChart::WHILE_NO,0,s.data(),m_sharedState->lab.data());
+ FlowChart::addFlowChart(FlowChart::WHILE_NO,QCString(),s,m_sharedState->lab);
m_sharedState->lab="";
return s;
}
| <FOR_T> s=parameter_specification()
{
QCString q=m_sharedState->lab+" for "+s;
- FlowChart::addFlowChart(FlowChart::FOR_NO,0,q.data(),m_sharedState->lab.data());
+ FlowChart::addFlowChart(FlowChart::FOR_NO,QCString(),q,m_sharedState->lab);
m_sharedState->lab="";
return q;
}
@@ -1584,7 +1586,7 @@ QCString loop_statement() : {QCString s,s1,s2,s3;}
[ s1=iteration_scheme() ]
{
if(s1.isEmpty())
- FlowChart::addFlowChart(FlowChart::LOOP_NO,0,"infinite");
+ FlowChart::addFlowChart(FlowChart::LOOP_NO,QCString(),"infinite");
}
<LOOP_T>
s2=sequence_of_statement()
@@ -1593,7 +1595,7 @@ QCString loop_statement() : {QCString s,s1,s2,s3;}
QCString q = s+" loop "+s2+" end loop" +s3;
QCString endLoop="end loop" + s3;
FlowChart::moveToPrevLevel();
- FlowChart::addFlowChart(FlowChart::END_LOOP,endLoop.data(),0);
+ FlowChart::addFlowChart(FlowChart::END_LOOP,endLoop,QCString());
return q;
}
@@ -1602,9 +1604,9 @@ QCString loop_statement() : {QCString s,s1,s2,s3;}
QCString miscellaneous_operator():{Token *t=0;}
{
- <DOUBLEMULT_T> {return "**";}
- | <ABS_T> {return "abs";}
- | <NOT_T> {return "not";}
+ <DOUBLEMULT_T> { return "**"; }
+ | <ABS_T> { return "abs"; }
+ | <NOT_T> { return "not"; }
}
QCString mode() : {Token *tok=0;}
@@ -1618,10 +1620,10 @@ tok=<IN_T> { return "in"; }
QCString multiplying_operation() : {Token *tok=0;}
{
-tok=<MULT_T> { return tok->image.c_str(); }
-| tok=<SLASH_T> { return tok->image.c_str(); }
-| tok=<MOD_T> { return tok->image.c_str(); }
-| tok=<REM_T> { return tok->image.c_str(); }
+tok=<MULT_T> { return QCString(tok->image); }
+| tok=<SLASH_T> { return QCString(tok->image); }
+| tok=<MOD_T> { return QCString(tok->image); }
+| tok=<REM_T> { return QCString(tok->image); }
}
@@ -1683,7 +1685,7 @@ QCString next_statement() : {QCString s,s1,s2;Token *t=0;Token *t1=0;}
[ t1=<WHEN_T> s2=condition() ] <SEMI_T>
{
if(t) s+=":";
- FlowChart::addFlowChart(FlowChart::NEXT_NO,"next ",s2.data(),s1.data());
+ FlowChart::addFlowChart(FlowChart::NEXT_NO,"next ",s2,s1);
m_sharedState->lab.resize(0);
if(t1) s2.prepend("when ");
return s+s1+s2+";";
@@ -1715,7 +1717,7 @@ QCString object_class() : {}
QCString operator_symbol() : {Token *tok=0;}
{
-tok=<STRINGLITERAL> {return tok->image.c_str();}
+tok=<STRINGLITERAL> {return QCString(tok->image);}
}
void options() : {}
@@ -1729,7 +1731,7 @@ void package_body() : {QCString s;}
{
m_sharedState->lastCompound=m_sharedState->current;
s.prepend("_");
- outlineParser()->addVhdlType(s,outlineParser()->getLine(),Entry::CLASS_SEC,VhdlDocGen::PACKAGE_BODY,0,0,Protected);
+ outlineParser()->addVhdlType(s.data(),outlineParser()->getLine(),Entry::CLASS_SEC,VhdlDocGen::PACKAGE_BODY,0,0,Protected);
}
package_body_declarative_part()
@@ -1778,7 +1780,7 @@ void package_declaration(): {QCString s;}
clone->bodyLine=outlineParser()->getLine(PACKAGE_T);
clone->protection=Package;
m_sharedState->current_root->moveToSubEntryAndKeep(clone);
- outlineParser()->addVhdlType(s,outlineParser()->getLine(PACKAGE_T),Entry::CLASS_SEC,VhdlDocGen::PACKAGE,0,0,Package);
+ outlineParser()->addVhdlType(s.data(),outlineParser()->getLine(PACKAGE_T),Entry::CLASS_SEC,VhdlDocGen::PACKAGE,0,0,Package);
}
package_header()
package_declarative_part()
@@ -1883,7 +1885,7 @@ LOOKAHEAD(name())
s=name() { return s;}
|
LOOKAHEAD(allocator())
-allocator() { return "";}
+allocator() { return QCString();}
|
s=aggregate() { return s; }
}
@@ -1920,7 +1922,7 @@ QCString procedure_call_statement() : {QCString s,s1;}
QCString process_declarative_item() : {QCString s;}
{
-subprogram_declaration() { return "";}
+subprogram_declaration() { return QCString();}
//| subprogram_body()
| s=type_declaration() { return s;}
| s=subtype_declaration() { return s;}
@@ -1958,8 +1960,8 @@ void process_statement() : {QCString s,s1,s2;Token *tok=0;Token *tok1=0;}
s2=process_declarative_part()
{
if (s2.data())
- FlowChart::addFlowChart(FlowChart::VARIABLE_NO,s2.data(),0);
- FlowChart::addFlowChart(FlowChart::BEGIN_NO,"BEGIN",0);
+ FlowChart::addFlowChart(FlowChart::VARIABLE_NO,s2,QCString());
+ FlowChart::addFlowChart(FlowChart::BEGIN_NO,"BEGIN",QCString());
}
<BEGIN_T>
process_statement_part()
@@ -1976,8 +1978,8 @@ void process_statement() : {QCString s,s1,s2;Token *tok=0;Token *tok1=0;}
m_sharedState->current->endBodyLine=outlineParser()->getLine();
m_sharedState->currP=0;
if(tok)
- s1=tok->image.data();
- outlineParser()->createFunction(m_sharedState->currName,VhdlDocGen::PROCESS,s1.data());
+ s1=tok->image;
+ outlineParser()->createFunction(m_sharedState->currName.data(),VhdlDocGen::PROCESS,s1.data());
outlineParser()->createFlow();
m_sharedState->currName="";
outlineParser()->newEntry();
@@ -2042,7 +2044,7 @@ QCString relation_operator() : {}
|<QG_T> { return "?>";}
|<QL_T> { return "?<";}
|<QEQU_T> { return "?=";}
- |<QNEQU_T> {return "?/="; }
+ |<QNEQU_T> {return "?/="; }
}
@@ -2128,22 +2130,22 @@ QCString sequence_of_statement() : {QCString s,s1;}
QCString sequential_statement() :{QCString s;}
{
LOOKAHEAD( [ identifier() ":" ] target() "<=")
- s=signal_assignment_statement(){FlowChart::addFlowChart(FlowChart::TEXT_NO,s.data(),0);return s;}
+ s=signal_assignment_statement(){FlowChart::addFlowChart(FlowChart::TEXT_NO,s,QCString());return s;}
|
LOOKAHEAD(3)
- s=assertion_statement(){FlowChart::addFlowChart(FlowChart::TEXT_NO,s.data(),0);return s;}
+ s=assertion_statement(){FlowChart::addFlowChart(FlowChart::TEXT_NO,s,QCString());return s;}
|
LOOKAHEAD(3)
- s=report_statement(){FlowChart::addFlowChart(FlowChart::TEXT_NO,s.data(),0);return s;}
+ s=report_statement(){FlowChart::addFlowChart(FlowChart::TEXT_NO,s,QCString());return s;}
|
LOOKAHEAD(3)
- s=wait_statement(){FlowChart::addFlowChart(FlowChart::TEXT_NO,s.data(),0);return s;}
+ s=wait_statement(){FlowChart::addFlowChart(FlowChart::TEXT_NO,s,QCString());return s;}
|
LOOKAHEAD( [ identifier() ":" ] target() ":=" )
- s=variable_assignment_statement(){FlowChart::addFlowChart(FlowChart::TEXT_NO,s.data(),0);return s;}
+ s=variable_assignment_statement(){FlowChart::addFlowChart(FlowChart::TEXT_NO,s,QCString());return s;}
|
LOOKAHEAD(3)
- s=procedure_call_statement(){ FlowChart::addFlowChart(FlowChart::TEXT_NO,s.data(),0);return s; }
+ s=procedure_call_statement(){ FlowChart::addFlowChart(FlowChart::TEXT_NO,s,QCString());return s; }
|
LOOKAHEAD(3)
if_statement(){return s;}
@@ -2161,9 +2163,9 @@ QCString sequential_statement() :{QCString s;}
s=exit_statement(){return s;}
|
LOOKAHEAD(3)
- s=return_statement(){FlowChart::addFlowChart(FlowChart::RETURN_NO,s.data(),0);return s;}
+ s=return_statement(){FlowChart::addFlowChart(FlowChart::RETURN_NO,s,QCString());return s;}
|
- s=null_statement(){FlowChart::addFlowChart(FlowChart::TEXT_NO,s.data(),0);return s;}
+ s=null_statement(){FlowChart::addFlowChart(FlowChart::TEXT_NO,s,QCString());return s;}
}
QCString shift_expression() : {QCString s,s1,s2;}
@@ -2190,10 +2192,10 @@ QCString signal_assignment_statement() : {QCString s,s1,s2,s3;}
{
LOOKAHEAD(conditional_signal_assignment_wave())
- conditional_signal_assignment_wave(){ return ""; }
+ conditional_signal_assignment_wave(){ return QCString(); }
|
LOOKAHEAD(selected_signal_assignment_wave())
- selected_signal_assignment_wave() { return ""; }
+ selected_signal_assignment_wave() { return QCString(); }
|
[LOOKAHEAD(2) s=identifier() <COLON_T> {s+=":";} ]
s1=target() <LESSTHAN_T>
@@ -2259,7 +2261,7 @@ QCString slice_name() : {QCString s,s1;}
QCString string_literal() : {Token *tok=0;}
{
-tok=<STRINGLITERAL> {return tok->image.c_str();}
+tok=<STRINGLITERAL> {return QCString(tok->image);}
}
void subprogram_body() : {QCString s;}
@@ -2271,9 +2273,9 @@ tok=<STRINGLITERAL> {return tok->image.c_str();}
{
if (s.data())
{
- FlowChart::addFlowChart(FlowChart::VARIABLE_NO,s,0);
+ FlowChart::addFlowChart(FlowChart::VARIABLE_NO,s,QCString());
}
- FlowChart::addFlowChart(FlowChart::BEGIN_NO,"BEGIN",0);
+ FlowChart::addFlowChart(FlowChart::BEGIN_NO,"BEGIN",QCString());
}
// }catch(...){outlineParser()->error_skipto(BEGIN_T);}
<BEGIN_T>
@@ -2303,9 +2305,9 @@ void subprogram_1() : {}
QCString subprogram_declarative_item() : {QCString s;}
{
-subprogram_declaration(){ return "";}
+subprogram_declaration(){ return QCString();}
|s=type_declaration(){ return s;}
- | subprogram_body(){ return "";}
+ | subprogram_body(){ return QCString();}
| s=subtype_declaration(){ return s;}
| s=constant_declaration(){ return s;}
| s=variable_declaration(){ return s;}
@@ -2438,16 +2440,14 @@ s=full_type_declaration(){ return s;}
QCString type_definition() : {QCString s;}
{
-//try{
s=scalar_type_definition(){ return s;}
| s=composite_type_definition(){ return s;}
| s=access_type_definition(){ return s;}
| s=file_type_definition(){ return s;}
|
LOOKAHEAD(2)
- protected_type_body() { return ""; }
-| protected_type_declaration() { return ""; }
-//}catch(...){outlineParser()->error_skipto(SEMI_T); return "";}
+ protected_type_body() { return QCString(); }
+| protected_type_declaration() { return QCString(); }
}
QCString type_mark() : {QCString s; }
@@ -2465,14 +2465,22 @@ QCString unconstraint_array_definition() : {QCString s,s1,s2,s3;}
{
<USE_T> s=selected_name()(<COMMA_T> s1=selected_name(){s+=",";s+=s1;})* <SEMI_T>
{
- QCStringList ql1=QCStringList::split(",",s);
- for (uint j=0;j<ql1.count();j++)
+ auto ql1=split(s.str(),",");
+ for (const auto &name : ql1)
{
- QCStringList ql=QCStringList::split(".",ql1[j]);
- QCString it=ql[1];
- if ( m_sharedState->parse_sec==0 && Config_getBool(SHOW_INCLUDE_FILES) )
+ auto ql2=split(name,".");
+ if (ql2.size()>1)
{
- outlineParser()->addVhdlType(it.data(),outlineParser()->getLine(),Entry::VARIABLE_SEC,VhdlDocGen::USE,it.data(),"_use_",Public);
+ std::string it=ql2[1];
+ if ( m_sharedState->parse_sec==0 && Config_getBool(SHOW_INCLUDE_FILES) )
+ {
+ outlineParser()->addVhdlType(it.c_str(),
+ outlineParser()->getLine(),
+ Entry::VARIABLE_SEC,
+ VhdlDocGen::USE,
+ it.c_str(),
+ "_use_",Public);
+ }
}
}
s1="use "+s;
@@ -2486,7 +2494,7 @@ QCString variable_assignment_statement() : {QCString s,s1,s2;}
s1=target() <VARASSIGN_T> s2=expression() <SEMI_T>
{return s+s1+":="+s2+";";}
|
- selected_variable_assignment() { return ""; }
+ selected_variable_assignment() { return QCString(); }
}
QCString variable_declaration() : {Token *tok=0;Token *t1=0;QCString s,s1,s2;}
@@ -2555,7 +2563,7 @@ QCString protected_type_body() :{ }
protected_type_body_declarative_part()
//}catch(...){outlineParser()->error_skipto(END_T);}
- <END_T><PROTECTED_T> <BODY_T> [identifier()] {return "";}
+ <END_T><PROTECTED_T> <BODY_T> [identifier()] {return QCString();}
}
void protected_type_body_declarative_item() : { }
@@ -2591,7 +2599,7 @@ QCString protected_type_declaration() : { }
try{
protected_type_declarative_part()
}catch(...){outlineParser()->error_skipto(END_T);}
- <END_T><PROTECTED_T> [ identifier() ] { return "";}
+ <END_T><PROTECTED_T> [ identifier() ] { return QCString();}
}
@@ -2742,9 +2750,9 @@ QCString external_name(): {QCString s,s1,s2;}
QCString sig_stat(): {Token *t;}
{
- t=<CONSTANT_T> { return t->image.data(); }
- | t=<SIGNAL_T> { return t->image.data(); }
- | t=<VARIABLE_T> { return t->image.data(); }
+ t=<CONSTANT_T> { return QCString(t->image); }
+ | t=<SIGNAL_T> { return QCString(t->image); }
+ | t=<VARIABLE_T> { return QCString(t->image); }
}
@@ -2917,7 +2925,7 @@ QCString ifunc():{QCString s,s1,s2,s3;Token *t=0;Token *t1=0;Token *t2=0;}
if (a>b) b=a;
outlineParser()->addVhdlType(m_sharedState->current->name.data(),b,Entry::VARIABLE_SEC,VhdlDocGen::GENERIC,ss.data(),0,Public);
}
- m_sharedState->currP=0;return "";
+ m_sharedState->currP=0;return QCString();
}
}