summaryrefslogtreecommitdiff
path: root/qmake
Unidiff
Diffstat (limited to 'qmake') (more/less context) (show whitespace changes)
-rw-r--r--qmake/CHANGES32
-rw-r--r--qmake/Makefile74
-rw-r--r--qmake/generators/mac/metrowerks_xml.cpp21
-rw-r--r--qmake/generators/mac/metrowerks_xml.h17
-rw-r--r--qmake/generators/mac/pbuilder_pbx.cpp801
-rw-r--r--qmake/generators/mac/pbuilder_pbx.h31
-rw-r--r--qmake/generators/makefile.cpp548
-rw-r--r--qmake/generators/makefile.h39
-rw-r--r--qmake/generators/projectgenerator.cpp36
-rw-r--r--qmake/generators/projectgenerator.h8
-rw-r--r--qmake/generators/unix/unixmake.cpp441
-rw-r--r--qmake/generators/unix/unixmake.h22
-rw-r--r--qmake/generators/unix/unixmake2.cpp596
-rw-r--r--qmake/generators/win32/borland_bmake.cpp218
-rw-r--r--qmake/generators/win32/borland_bmake.h9
-rw-r--r--qmake/generators/win32/mingw_make.cpp284
-rw-r--r--qmake/generators/win32/mingw_make.h11
-rw-r--r--qmake/generators/win32/msvc_dsp.cpp238
-rw-r--r--qmake/generators/win32/msvc_dsp.h13
-rw-r--r--qmake/generators/win32/msvc_nmake.cpp315
-rw-r--r--qmake/generators/win32/msvc_nmake.h15
-rw-r--r--qmake/generators/win32/msvc_objectmodel.cpp341
-rw-r--r--qmake/generators/win32/msvc_objectmodel.h43
-rw-r--r--qmake/generators/win32/msvc_vcproj.cpp686
-rw-r--r--qmake/generators/win32/msvc_vcproj.h14
-rw-r--r--qmake/generators/win32/winmakefile.cpp121
-rw-r--r--qmake/generators/win32/winmakefile.h10
-rw-r--r--qmake/include/private/qdir_p.h2
-rw-r--r--qmake/include/private/qlocale_p.h128
-rw-r--r--qmake/include/private/qsettings_p.h30
-rw-r--r--qmake/include/qfiledefs_p.h64
-rw-r--r--qmake/include/qglobal.h165
-rw-r--r--qmake/include/qlocale.h491
-rw-r--r--qmake/include/qsettings.h156
-rw-r--r--qmake/include/qunicodetables_p.h263
-rw-r--r--qmake/include/quuid.h27
-rw-r--r--qmake/main.cpp51
-rw-r--r--qmake/meta.cpp192
-rw-r--r--qmake/meta.h93
-rw-r--r--qmake/option.cpp85
-rw-r--r--qmake/option.h29
-rw-r--r--qmake/project.cpp524
-rw-r--r--qmake/project.h21
-rw-r--r--qmake/property.cpp186
-rw-r--r--qmake/property.h60
-rw-r--r--qmake/qtmd5.cpp304
-rw-r--r--qmake/qtmd5.h11
-rw-r--r--qmake/tools/qconfig.cpp33
-rw-r--r--qmake/tools/qlocale.cpp6083
-rw-r--r--qmake/tools/qsettings.cpp365
-rw-r--r--qmake/tools/qunicodetables.cpp13237
-rw-r--r--qmake/tools/quuid.cpp234
52 files changed, 26219 insertions, 1599 deletions
diff --git a/qmake/CHANGES b/qmake/CHANGES
index 995c16e..ca786ee 100644
--- a/qmake/CHANGES
+++ b/qmake/CHANGES
@@ -1,3 +1,31 @@
11.07a -
2
3 support for precompiled headers added
4
51.06b -
6
7 support for reading and writing libtool (.la) files
8 support for reading pkgconfig (.pkg) files
9
10 PWD added as an automatic variable to mean the directory
11 the file being parsed is in (this change required that the
12 directory be set to the file being parsed as well, function
13 tests that query relative paths will need to be relative the
14 file being parsed).
15
16 persistant data cache introduced
17
181.05a -
19
20 caching of more information (speed ups)
21 $$list() added to be used as a lambda function in qmake
22 $$files() added to allow regular expression matching
23 $$fromfile() added to grab one single variable value from a parsed file
24 $$prompt() added to allow querying for user input from qmake
25 include() modified to support specifying which variables to import
26 equals() test added to test for equality
27 MSVC.net generator added [partial solution files in vcsubdirs]
28
11.04a - 291.04a -
2 30
3 subdirs supports multiple project files in a single directory. 31 subdirs supports multiple project files in a single directory.
@@ -8,7 +36,7 @@
8 36
91.02a - 371.02a -
10 38
11 Dependancy / Mocable caching. qmake can cache these expensive operations with qmake_cache 39 Dependency / Mocable caching. qmake can cache these expensive operations with qmake_cache
12 CONFIG. 40 CONFIG.
13 41
14 The parser has been improved to cover more error cases, as well as more forgiving 42 The parser has been improved to cover more error cases, as well as more forgiving
@@ -21,7 +49,7 @@
21 49
22 New system for library linking. This system allows a user several different features: 50 New system for library linking. This system allows a user several different features:
23 51
24 1) libtool like library dependancies to static libraries build with qmake 52 1) libtool like library dependencies to static libraries build with qmake
25 2) library dependencies, when on .pro depends on another library - it will 53 2) library dependencies, when on .pro depends on another library - it will
26 automatically build that other library (unix makefiles only) 54 automatically build that other library (unix makefiles only)
27 3) automatic detection of configurations for Qt, if CONFIG qt is specified 55 3) automatic detection of configurations for Qt, if CONFIG qt is specified
diff --git a/qmake/Makefile b/qmake/Makefile
index 01bb1a1..5a72210 100644
--- a/qmake/Makefile
+++ b/qmake/Makefile
@@ -1,29 +1,47 @@
1QMAKESPECSDIR=$(OPIEDIR)/mkspecs 1QMAKESPECSDIR=$(OPIEDIR)/mkspecs
2 2
3########################################################################
4## This file was autogenerated by configure, all changes will be lost ##
5########################################################################
6 CC = gcc 3 CC = gcc
7 CXX = g++ 4 CXX = g++
8 5
9#qmake code 6#qmake code
10OBJS=project.o main.o makefile.o unixmake2.o unixmake.o borland_bmake.o \ 7OBJS=project.o property.o main.o makefile.o unixmake2.o unixmake.o msvc_nmake.o \
11 mingw_make.o msvc_nmake.o msvc_dsp.o msvc_vcproj.o option.o winmakefile.o \ 8 borland_bmake.o mingw_make.o msvc_dsp.o msvc_vcproj.o option.o \
12 projectgenerator.o metrowerks_xml.o pbuilder_pbx.o msvc_objectmodel.o 9 winmakefile.o projectgenerator.o metrowerks_xml.o pbuilder_pbx.o \
10 msvc_objectmodel.o meta.o qtmd5.o
13 11
14#qt code 12#qt code
15QOBJS=qstring.o qtextstream.o qiodevice.o qglobal.o qgdict.o qcstring.o \ 13QOBJS=qstring.o qtextstream.o qiodevice.o qglobal.o qgdict.o qcstring.o \
16 qdatastream.o qgarray.o qbuffer.o qglist.o qptrcollection.o qfile.o \ 14 qdatastream.o qgarray.o qbuffer.o qglist.o qptrcollection.o qfile.o \
17 qfile_unix.o qregexp.o qgvector.o qgcache.o qbitarray.o qdir.o quuid.o \ 15 qfile_unix.o qregexp.o qgvector.o qgcache.o qbitarray.o qdir.o quuid.o \
18 qfileinfo_unix.o qdir_unix.o qfileinfo.o qdatetime.o qstringlist.o qmap.o \ 16 qfileinfo_unix.o qdir_unix.o qfileinfo.o qdatetime.o qstringlist.o qmap.o \
19 qconfig.o 17 qconfig.o qunicodetables.o qsettings.o qlocale.o
20 18
21CFLAGS= \ 19#all sources, used for the depend target
20DEPEND_SRC=project.cpp property.cpp meta.cpp main.cpp qtmd5.cpp generators/makefile.cpp generators/unix/unixmake2.cpp \
21 generators/unix/unixmake.cpp generators/win32/msvc_nmake.cpp generators/win32/borland_bmake.cpp \
22 generators/win32/winmakefile.cpp generators/projectgenerator.cpp generators/mac/metrowerks_xml.cpp \
23 generators/mac/pbuilder_pbx.cpp generators/win32/msvc_objectmodel.cpp \
24 $(OPIEDIR)/qmake/tools/qstring.cpp $(OPIEDIR)/qmake/tools/qtextstream.cpp \
25 $(OPIEDIR)/qmake/tools/qiodevice.cpp $(OPIEDIR)/qmake/tools/qglobal.cpp \
26 $(OPIEDIR)/qmake/tools/qgdict.cpp $(OPIEDIR)/qmake/tools/qcstring.cpp \
27 $(OPIEDIR)/qmake/tools/qdatastream.cpp $(OPIEDIR)/qmake/src/tools/qgarray.cpp \
28 $(OPIEDIR)/qmake/tools/qbuffer.cpp $(OPIEDIR)/qmake/tools/qglist.cpp \
29 $(OPIEDIR)/qmake/tools/qptrcollection.cpp $(OPIEDIR)/qmake/tools/qfile.cpp \
30 $(OPIEDIR)/qmake/tools/qfile_unix.cpp $(OPIEDIR)/qmake/tools/qregexp.cpp \
31 $(OPIEDIR)/qmake/tools/qgvector.cpp $(OPIEDIR)/qmake/tools/qgcache.cpp \
32 $(OPIEDIR)/qmake/tools/qbitarray.cpp $(OPIEDIR)/qmake/tools/qdir.cpp \
33 $(OPIEDIR)/qmake/tools/quuid.cpp $(OPIEDIR)/qmake/tools/qfileinfo_unix.cpp \
34 $(OPIEDIR)/qmake/tools/qdir_unix.cpp $(OPIEDIR)/qmake/tools/qfileinfo.cpp \
35 $(OPIEDIR)/qmake/tools/qdatetime.cpp $(OPIEDIR)/qmake/tools/qstringlist.cpp \
36 $(OPIEDIR)/qmake/tools/qmap.cpp $(OPIEDIR)/qmake/tools/qconfig.cpp \
37 $(OPIEDIR)/qmake/tools/qsettings.cpp $(OPIEDIR)/qmake/tools/qurl.cpp \
38 $(OPIEDIR)/qmake/tools/qsettings_mac.cpp $(OPIEDIR)/qmake/tools/qlocale.cpp
39
40CXXFLAGS= \
22 -I. -Igenerators -Igenerators/unix -Igenerators/win32 -Igenerators/mac \ 41 -I. -Igenerators -Igenerators/unix -Igenerators/win32 -Igenerators/mac \
23 -I$(OPIEDIR)/qmake/include -I$(OPIEDIR)/qmake/include/qmake -I$(QMAKESPECSDIR)/default \ 42 -I$(OPIEDIR)/qmake/include/qmake -I$(OPIEDIR)/qmake/include -I$(OPIEDIR)/qmake/include/private \
24 -I$(OPIEDIR)/qmake/include/private \ 43 -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_STL \
25 -DQT_NO_TEXTCODEC -DQT_LITE_COMPONENT -DQT_NO_STL -DQT_NO_COMPRESS 44 -DQT_NO_COMPRESS -I$(QMAKESPECSDIR)/default -DHAVE_QCONFIG_CPP
26CXXFLAGS= $(CFLAGS)
27LFLAGS= 45LFLAGS=
28 46
29qmake: $(OBJS) $(QOBJS) 47qmake: $(OBJS) $(QOBJS)
@@ -43,6 +61,7 @@ clean::
43distclean:: clean 61distclean:: clean
44 rm -rf qmake .deps 62 rm -rf qmake .deps
45 63
64
46# don't use optimization for these 65# don't use optimization for these
47qtextstream.o: $(OPIEDIR)/qmake/tools/qtextstream.cpp 66qtextstream.o: $(OPIEDIR)/qmake/tools/qtextstream.cpp
48 $(CXX) -c -o $@ $(CXXFLAGS) $(OPIEDIR)/qmake/tools/qtextstream.cpp 67 $(CXX) -c -o $@ $(CXXFLAGS) $(OPIEDIR)/qmake/tools/qtextstream.cpp
@@ -59,12 +78,27 @@ qgdict.o: $(OPIEDIR)/qmake/tools/qgdict.cpp
59qcstring.o: $(OPIEDIR)/qmake/tools/qcstring.cpp 78qcstring.o: $(OPIEDIR)/qmake/tools/qcstring.cpp
60 $(CXX) -c -o $@ $(CXXFLAGS) $(OPIEDIR)/qmake/tools/qcstring.cpp 79 $(CXX) -c -o $@ $(CXXFLAGS) $(OPIEDIR)/qmake/tools/qcstring.cpp
61 80
81qsettings.o: $(OPIEDIR)/qmake/tools/qsettings.cpp
82 $(CXX) -c -o $@ $(CXXFLAGS) $(OPIEDIR)/qmake/tools/qsettings.cpp
83
84qsettings_mac.o: $(OPIEDIR)/qmake/tools/qsettings_mac.cpp
85 $(CXX) -c -o $@ $(CXXFLAGS) $(OPIEDIR)/qmake/tools/qsettings_mac.cpp
86
87qurl.o: $(OPIEDIR)/qmake/kernel/qurl.cpp
88 $(CXX) -c -o $@ $(CXXFLAGS) $(OPIEDIR)/qmake/kernel/qurl.cpp
89
62qstring.o: $(OPIEDIR)/qmake/tools/qstring.cpp 90qstring.o: $(OPIEDIR)/qmake/tools/qstring.cpp
63 $(CXX) -c -o $@ $(CXXFLAGS) $(OPIEDIR)/qmake/tools/qstring.cpp 91 $(CXX) -c -o $@ $(CXXFLAGS) $(OPIEDIR)/qmake/tools/qstring.cpp
64 92
93qlocale.o: $(OPIEDIR)/qmake/tools/qlocale.cpp
94 $(CXX) -c -o $@ $(CXXFLAGS) $(OPIEDIR)/qmake/tools/qlocale.cpp
95
65qdatastream.o: $(OPIEDIR)/qmake/tools/qdatastream.cpp 96qdatastream.o: $(OPIEDIR)/qmake/tools/qdatastream.cpp
66 $(CXX) -c -o $@ $(CXXFLAGS) $(OPIEDIR)/qmake/tools/qdatastream.cpp 97 $(CXX) -c -o $@ $(CXXFLAGS) $(OPIEDIR)/qmake/tools/qdatastream.cpp
67 98
99qunicodetables.o: $(OPIEDIR)/qmake/tools/qunicodetables.cpp
100 $(CXX) -c -o $@ $(CXXFLAGS) $(OPIEDIR)/qmake/tools/qunicodetables.cpp
101
68qgarray.o: $(OPIEDIR)/qmake/tools/qgarray.cpp 102qgarray.o: $(OPIEDIR)/qmake/tools/qgarray.cpp
69 $(CXX) -c -o $@ $(CXXFLAGS) $(OPIEDIR)/qmake/tools/qgarray.cpp 103 $(CXX) -c -o $@ $(CXXFLAGS) $(OPIEDIR)/qmake/tools/qgarray.cpp
70 104
@@ -128,12 +162,21 @@ winmakefile.o: generators/win32/winmakefile.cpp
128project.o: project.cpp project.h option.h 162project.o: project.cpp project.h option.h
129 $(CXX) -c -o $@ $(CXXFLAGS) project.cpp 163 $(CXX) -c -o $@ $(CXXFLAGS) project.cpp
130 164
165property.o: property.cpp project.h option.h
166 $(CXX) -c -o $@ $(CXXFLAGS) property.cpp
167
168meta.o: meta.cpp project.h option.h
169 $(CXX) -c -o $@ $(CXXFLAGS) meta.cpp
170
131main.o: main.cpp project.h 171main.o: main.cpp project.h
132 $(CXX) -c -o $@ $(CXXFLAGS) main.cpp 172 $(CXX) -c -o $@ $(CXXFLAGS) main.cpp
133 173
134option.o: option.cpp option.h 174option.o: option.cpp option.h
135 $(CXX) -c -o $@ $(CXXFLAGS) option.cpp 175 $(CXX) -c -o $@ $(CXXFLAGS) option.cpp
136 176
177qtmd5.o: qtmd5.cpp
178 $(CXX) -c -o $@ $(CXXFLAGS) qtmd5.cpp
179
137makefile.o: generators/makefile.cpp 180makefile.o: generators/makefile.cpp
138 $(CXX) -c -o $@ $(CXXFLAGS) generators/makefile.cpp 181 $(CXX) -c -o $@ $(CXXFLAGS) generators/makefile.cpp
139 182
@@ -171,8 +214,7 @@ projectgenerator.o: generators/projectgenerator.cpp
171 $(CXX) -c -o $@ $(CXXFLAGS) generators/projectgenerator.cpp 214 $(CXX) -c -o $@ $(CXXFLAGS) generators/projectgenerator.cpp
172 215
173#default rules 216#default rules
174.c.o:
175 $(CC) -c -o $@ $(CFLAGS) $<
176
177.cpp.o: 217.cpp.o:
178 $(CXX) -c -o $@ $(CXXFLAGS) $< 218 $(CXX) -c -o $@ $(CXXFLAGS) $<
219
220# DO NOT DELETE THIS LINE -- make depend depends on it
diff --git a/qmake/generators/mac/metrowerks_xml.cpp b/qmake/generators/mac/metrowerks_xml.cpp
index 125749d..baaeeec 100644
--- a/qmake/generators/mac/metrowerks_xml.cpp
+++ b/qmake/generators/mac/metrowerks_xml.cpp
@@ -1,13 +1,11 @@
1/**************************************************************************** 1/****************************************************************************
2** $Id$
3** 2**
4** Definition of ________ class.
5** 3**
6** Created : 970521 4** Implementation of MetrowerksMakefileGenerator class.
7** 5**
8** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. 6** Copyright (C) 1992-2003 Trolltech AS. All rights reserved.
9** 7**
10** This file is part of the network module of the Qt GUI Toolkit. 8** This file is part of qmake.
11** 9**
12** This file may be distributed under the terms of the Q Public License 10** This file may be distributed under the terms of the Q Public License
13** as defined by Trolltech AS of Norway and appearing in the file 11** as defined by Trolltech AS of Norway and appearing in the file
@@ -42,13 +40,12 @@
42#include <qregexp.h> 40#include <qregexp.h>
43#include <stdlib.h> 41#include <stdlib.h>
44#include <time.h> 42#include <time.h>
45#ifdef Q_OS_MAC 43#if !defined(QWS) && defined(Q_OS_MAC)
46#include <Carbon/Carbon.h> 44#include <Carbon/Carbon.h>
47#include <sys/types.h> 45#include <sys/types.h>
48#include <sys/stat.h> 46#include <sys/stat.h>
49#endif 47#endif
50 48
51
52MetrowerksMakefileGenerator::MetrowerksMakefileGenerator(QMakeProject *p) : MakefileGenerator(p), init_flag(FALSE) 49MetrowerksMakefileGenerator::MetrowerksMakefileGenerator(QMakeProject *p) : MakefileGenerator(p), init_flag(FALSE)
53{ 50{
54 51
@@ -607,7 +604,7 @@ MetrowerksMakefileGenerator::init()
607 604
608 605
609QString 606QString
610MetrowerksMakefileGenerator::findTemplate(QString file) 607MetrowerksMakefileGenerator::findTemplate(const QString &file)
611{ 608{
612 QString ret; 609 QString ret;
613 if(!QFile::exists(ret = file) && 610 if(!QFile::exists(ret = file) &&
@@ -621,7 +618,7 @@ MetrowerksMakefileGenerator::findTemplate(QString file)
621bool 618bool
622MetrowerksMakefileGenerator::createFork(const QString &f) 619MetrowerksMakefileGenerator::createFork(const QString &f)
623{ 620{
624#if defined(Q_OS_MACX) 621#if !defined(QWS) && defined(Q_OS_MACX)
625 FSRef fref; 622 FSRef fref;
626 FSSpec fileSpec; 623 FSSpec fileSpec;
627 if(QFile::exists(f)) { 624 if(QFile::exists(f)) {
@@ -664,7 +661,7 @@ MetrowerksMakefileGenerator::fixifyToMacPath(QString &p, QString &v, bool )
664 static QString st_volume; 661 static QString st_volume;
665 if(st_volume.isEmpty()) { 662 if(st_volume.isEmpty()) {
666 st_volume = var("QMAKE_VOLUMENAME"); 663 st_volume = var("QMAKE_VOLUMENAME");
667#ifdef Q_OS_MAC 664#if !defined(QWS) && defined(Q_OS_MACX)
668 if(st_volume.isEmpty()) { 665 if(st_volume.isEmpty()) {
669 uchar foo[512]; 666 uchar foo[512];
670 HVolumeParam pb; 667 HVolumeParam pb;
@@ -733,7 +730,7 @@ MetrowerksMakefileGenerator::processPrlFiles()
733 } else if(opt.left(2) == "-l") { 730 } else if(opt.left(2) == "-l") {
734 QString lib = opt.right(opt.length() - 2), prl; 731 QString lib = opt.right(opt.length() - 2), prl;
735 for(MakefileDependDir *mdd = libdirs.first(); mdd; mdd = libdirs.next() ) { 732 for(MakefileDependDir *mdd = libdirs.first(); mdd; mdd = libdirs.next() ) {
736 prl = mdd->local_dir + Option::dir_sep + "lib" + lib + Option::prl_ext; 733 prl = mdd->local_dir + Option::dir_sep + "lib" + lib;
737 if(processPrlFile(prl)) { 734 if(processPrlFile(prl)) {
738 if(prl.startsWith(mdd->local_dir)) 735 if(prl.startsWith(mdd->local_dir))
739 prl.replace(0, mdd->local_dir.length(), mdd->real_dir); 736 prl.replace(0, mdd->local_dir.length(), mdd->real_dir);
@@ -751,7 +748,7 @@ MetrowerksMakefileGenerator::processPrlFiles()
751 ++it; 748 ++it;
752 opt = (*it); 749 opt = (*it);
753 QString prl = "/System/Library/Frameworks/" + opt + 750 QString prl = "/System/Library/Frameworks/" + opt +
754 ".framework/" + opt + Option::prl_ext; 751 ".framework/" + opt;
755 if(processPrlFile(prl)) 752 if(processPrlFile(prl))
756 ret = TRUE; 753 ret = TRUE;
757 } 754 }
diff --git a/qmake/generators/mac/metrowerks_xml.h b/qmake/generators/mac/metrowerks_xml.h
index ae3cfae..0aa3615 100644
--- a/qmake/generators/mac/metrowerks_xml.h
+++ b/qmake/generators/mac/metrowerks_xml.h
@@ -1,13 +1,11 @@
1/**************************************************************************** 1/****************************************************************************
2** $Id$
3** 2**
4** Definition of ________ class.
5** 3**
6** Created : 970521 4** Definition of MetrowerksMakefileGenerator class.
7** 5**
8** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. 6** Copyright (C) 1992-2003 Trolltech AS. All rights reserved.
9** 7**
10** This file is part of the network module of the Qt GUI Toolkit. 8** This file is part of qmake.
11** 9**
12** This file may be distributed under the terms of the Q Public License 10** This file may be distributed under the terms of the Q Public License
13** as defined by Trolltech AS of Norway and appearing in the file 11** as defined by Trolltech AS of Norway and appearing in the file
@@ -34,8 +32,9 @@
34** not clear to you. 32** not clear to you.
35** 33**
36**********************************************************************/ 34**********************************************************************/
37#ifndef __METROWERKSMAKE_H__ 35
38#define __METROWERKSMAKE_H__ 36#ifndef __METROWERKS_XML_H__
37#define __METROWERKS_XML_H__
39 38
40#include "makefile.h" 39#include "makefile.h"
41 40
@@ -50,7 +49,7 @@ class MetrowerksMakefileGenerator : public MakefileGenerator
50 bool writeSubDirs(QTextStream &); 49 bool writeSubDirs(QTextStream &);
51 50
52 bool writeMakefile(QTextStream &); 51 bool writeMakefile(QTextStream &);
53 QString findTemplate(QString file); 52 QString findTemplate(const QString &file);
54 void init(); 53 void init();
55public: 54public:
56 MetrowerksMakefileGenerator(QMakeProject *p); 55 MetrowerksMakefileGenerator(QMakeProject *p);
@@ -66,4 +65,4 @@ protected:
66inline MetrowerksMakefileGenerator::~MetrowerksMakefileGenerator() 65inline MetrowerksMakefileGenerator::~MetrowerksMakefileGenerator()
67{ } 66{ }
68 67
69#endif /* __METROWERKSMAKE_H__ */ 68#endif /* __METROWERKS_XML_H__ */
diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp
index b46005b..9d1286e 100644
--- a/qmake/generators/mac/pbuilder_pbx.cpp
+++ b/qmake/generators/mac/pbuilder_pbx.cpp
@@ -1,13 +1,11 @@
1/**************************************************************************** 1/****************************************************************************
2** $Id$
3** 2**
4** Definition of ________ class.
5** 3**
6** Created : 970521 4** Implementation of ProjectBuilderMakefileGenerator class.
7** 5**
8** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. 6** Copyright (C) 1992-2003 Trolltech AS. All rights reserved.
9** 7**
10** This file is part of the network module of the Qt GUI Toolkit. 8** This file is part of qmake.
11** 9**
12** This file may be distributed under the terms of the Q Public License 10** This file may be distributed under the terms of the Q Public License
13** as defined by Trolltech AS of Norway and appearing in the file 11** as defined by Trolltech AS of Norway and appearing in the file
@@ -37,11 +35,13 @@
37 35
38#include "pbuilder_pbx.h" 36#include "pbuilder_pbx.h"
39#include "option.h" 37#include "option.h"
38#include "meta.h"
40#include <qdir.h> 39#include <qdir.h>
41#include <qdict.h> 40#include <qdict.h>
42#include <qregexp.h> 41#include <qregexp.h>
43#include <stdlib.h> 42#include <stdlib.h>
44#include <time.h> 43#include <time.h>
44#include "qtmd5.h"
45#ifdef Q_OS_UNIX 45#ifdef Q_OS_UNIX
46# include <sys/types.h> 46# include <sys/types.h>
47# include <sys/stat.h> 47# include <sys/stat.h>
@@ -49,7 +49,6 @@
49 49
50// Note: this is fairly hacky, but it does the job... 50// Note: this is fairly hacky, but it does the job...
51 51
52
53ProjectBuilderMakefileGenerator::ProjectBuilderMakefileGenerator(QMakeProject *p) : UnixMakefileGenerator(p) 52ProjectBuilderMakefileGenerator::ProjectBuilderMakefileGenerator(QMakeProject *p) : UnixMakefileGenerator(p)
54{ 53{
55 54
@@ -67,16 +66,210 @@ ProjectBuilderMakefileGenerator::writeMakefile(QTextStream &t)
67 66
68 project->variables()["MAKEFILE"].clear(); 67 project->variables()["MAKEFILE"].clear();
69 project->variables()["MAKEFILE"].append("Makefile"); 68 project->variables()["MAKEFILE"].append("Makefile");
70 if(project->first("TEMPLATE") == "app" || project->first("TEMPLATE") == "lib") { 69 if(project->first("TEMPLATE") == "app" || project->first("TEMPLATE") == "lib")
71 return writeMakeParts(t); 70 return writeMakeParts(t);
72 } else if(project->first("TEMPLATE") == "subdirs") { 71 else if(project->first("TEMPLATE") == "subdirs")
73 writeSubdirs(t, FALSE); 72 return writeSubdirs(t, FALSE);
74 return TRUE;
75 }
76 return FALSE; 73 return FALSE;
77} 74}
78 75
79bool 76bool
77ProjectBuilderMakefileGenerator::writeSubdirs(QTextStream &t, bool direct)
78{
79 QString mkwrap = fileFixify(pbx_dir + Option::dir_sep + ".." + Option::dir_sep + project->first("MAKEFILE"),
80 QDir::currentDirPath());
81 QFile mkwrapf(mkwrap);
82 if(mkwrapf.open(IO_WriteOnly | IO_Translate)) {
83 debug_msg(1, "pbuilder: Creating file: %s", mkwrap.latin1());
84 QTextStream mkwrapt(&mkwrapf);
85 UnixMakefileGenerator::writeSubdirs(mkwrapt, direct);
86 }
87
88 //HEADER
89 t << "// !$*UTF8*$!" << "\n"
90 << "{" << "\n"
91 << "\t" << "archiveVersion = 1;" << "\n"
92 << "\t" << "classes = {" << "\n" << "\t" << "};" << "\n"
93 << "\t" << "objectVersion = " << pbuilderVersion() << ";" << "\n"
94 << "\t" << "objects = {" << endl;
95
96 //SUBDIRS
97 QStringList subdirs = project->variables()["SUBDIRS"];
98 QString oldpwd = QDir::currentDirPath();
99 QMap<QString, QStringList> groups;
100 for(QStringList::Iterator it = subdirs.begin(); it != subdirs.end(); ++it) {
101 QFileInfo fi(Option::fixPathToLocalOS((*it), TRUE));
102 if(fi.exists()) {
103 if(fi.isDir()) {
104 QString profile = (*it);
105 if(!profile.endsWith(Option::dir_sep))
106 profile += Option::dir_sep;
107 profile += fi.baseName() + ".pro";
108 subdirs.append(profile);
109 } else {
110 QMakeProject tmp_proj;
111 QString dir = fi.dirPath(), fn = fi.fileName();
112 if(!dir.isEmpty()) {
113 if(!QDir::setCurrent(dir))
114 fprintf(stderr, "Cannot find directory: %s\n", dir.latin1());
115 }
116 if(tmp_proj.read(fn, oldpwd)) {
117 if(Option::debug_level) {
118 QMap<QString, QStringList> &vars = tmp_proj.variables();
119 for(QMap<QString, QStringList>::Iterator it = vars.begin();
120 it != vars.end(); ++it) {
121 if(it.key().left(1) != "." && !it.data().isEmpty())
122 debug_msg(1, "%s: %s === %s", fn.latin1(), it.key().latin1(),
123 it.data().join(" :: ").latin1());
124 }
125 }
126 if(tmp_proj.first("TEMPLATE") == "subdirs") {
127 subdirs += fileFixify(tmp_proj.variables()["SUBDIRS"]);
128 } else if(tmp_proj.first("TEMPLATE") == "app" || tmp_proj.first("TEMPLATE") == "lib") {
129 QString pbxproj = QDir::currentDirPath() + Option::dir_sep + tmp_proj.first("TARGET") + projectSuffix();
130 if(!QFile::exists(pbxproj)) {
131 warn_msg(WarnLogic, "Ignored (not found) '%s'", pbxproj.latin1());
132 goto nextfile; // # Dirty!
133 }
134 project->variables()["QMAKE_PBX_SUBDIRS"] += pbxproj;
135 //PROJECTREF
136 {
137 bool in_root = TRUE;
138 QString name = QDir::currentDirPath();
139 QString project_key = keyFor(pbxproj + "_PROJECTREF");
140 if(project->isActiveConfig("flat")) {
141 QString flat_file = fileFixify(name, oldpwd, Option::output_dir, TRUE);
142 if(flat_file.find(Option::dir_sep) != -1) {
143 QStringList dirs = QStringList::split(Option::dir_sep, flat_file);
144 name = dirs.back();
145 }
146 } else {
147 QString flat_file = fileFixify(name, oldpwd, Option::output_dir, TRUE);
148 if(QDir::isRelativePath(flat_file) && flat_file.find(Option::dir_sep) != -1) {
149 QString last_grp("QMAKE_PBX_HEIR_GROUP");
150 QStringList dirs = QStringList::split(Option::dir_sep, flat_file);
151 name = dirs.back();
152 for(QStringList::Iterator dir_it = dirs.begin(); dir_it != dirs.end(); ++dir_it) {
153 QString new_grp(last_grp + Option::dir_sep + (*dir_it)), new_grp_key(keyFor(new_grp));
154 if(dir_it == dirs.begin()) {
155 if(!groups.contains(new_grp))
156 project->variables()["QMAKE_PBX_GROUPS"].append(new_grp_key);
157 } else {
158 if(!groups[last_grp].contains(new_grp_key))
159 groups[last_grp] += new_grp_key;
160 }
161 last_grp = new_grp;
162 }
163 groups[last_grp] += project_key;
164 in_root = FALSE;
165 }
166 }
167 if(in_root)
168 project->variables()["QMAKE_PBX_GROUPS"] += project_key;
169 t << "\t\t" << project_key << " = {" << "\n"
170 << "\t\t\t" << "isa = PBXFileReference;" << "\n"
171 << "\t\t\t" << "name = " << tmp_proj.first("TARGET") << ";" << "\n"
172 << "\t\t\t" << "path = " << pbxproj << ";" << "\n"
173 << "\t\t\t" << "refType = 0;" << "\n"
174 << "\t\t\t" << "sourceTree = \"<absolute>\";" << "\n"
175 << "\t\t" << "};" << "\n";
176 //PRODUCTGROUP
177 t << "\t\t" << keyFor(pbxproj + "_PRODUCTGROUP") << " = {" << "\n"
178 << "\t\t\t" << "children = (" << "\n"
179 << "\t\t\t" << ");" << "\n"
180 << "\t\t\t" << "isa = PBXGroup;" << "\n"
181 << "\t\t\t" << "name = Products;" << "\n"
182 << "\t\t\t" << "refType = 4;" << "\n"
183 << "\t\t\t" << "sourceTree = \"<group>\";" << "\n"
184 << "\t\t" << "};" << "\n";
185 }
186 }
187 }
188nextfile:
189 QDir::setCurrent(oldpwd);
190 }
191 }
192 }
193 for(QMap<QString, QStringList>::Iterator grp_it = groups.begin(); grp_it != groups.end(); ++grp_it) {
194 t << "\t\t" << keyFor(grp_it.key()) << " = {" << "\n"
195 << "\t\t\t" << "isa = PBXGroup;" << "\n"
196 << "\t\t\t" << "children = (" << "\n"
197 << valGlue(grp_it.data(), "\t\t\t\t", ",\n\t\t\t\t", "\n")
198 << "\t\t\t" << ");" << "\n"
199 << "\t\t\t" << "name = \"" << grp_it.key().section(Option::dir_sep, -1) << "\";" << "\n"
200 << "\t\t\t" << "refType = 4;" << "\n"
201 << "\t\t" << "};" << "\n";
202 }
203
204 //DUMP EVERYTHING THAT TIES THE ABOVE TOGETHER
205 //BUILDSTYLE
206 QString active_buildstyle;
207#if 0
208 for(int as_release = 0; as_release < 2; as_release++)
209#else
210 bool as_release = !project->isActiveConfig("debug");
211#endif
212 {
213 QString key = keyFor("QMAKE_PBX_" + QString(as_release ? "RELEASE" : "DEBUG"));
214 if(project->isActiveConfig("debug") != as_release)
215 active_buildstyle = key;
216 project->variables()["QMAKE_PBX_BUILDSTYLES"].append(key);
217 t << "\t\t" << key << " = {" << "\n"
218 << "\t\t\t" << "buildRules = (" << "\n"
219 << "\t\t\t" << ");" << "\n"
220 << "\t\t\t" << "buildSettings = {" << "\n"
221 << "\t\t\t\t" << "COPY_PHASE_STRIP = " << (as_release ? "YES" : "NO") << ";" << "\n";
222 if(as_release)
223 t << "\t\t\t\t" << "DEBUGGING_SYMBOLS = NO;" << "\n";
224 t << "\t\t\t" << "};" << "\n"
225 << "\t\t\t" << "isa = PBXBuildStyle;" << "\n"
226 << "\t\t\t" << "name = " << (as_release ? "Deployment" : "Development") << ";" << "\n"
227 << "\t\t" << "};" << "\n";
228 }
229
230 //ROOT_GROUP
231 t << "\t\t" << keyFor("QMAKE_PBX_ROOT_GROUP") << " = {" << "\n"
232 << "\t\t\t" << "children = (" << "\n"
233 << varGlue("QMAKE_PBX_GROUPS", "\t\t\t\t", ",\n\t\t\t\t", "\n")
234 << "\t\t\t" << ");" << "\n"
235 << "\t\t\t" << "isa = PBXGroup;" << "\n"
236 << "\t\t\t" << "refType = 4;" << "\n"
237 << "\t\t\t" << "sourceTree = \"<group>\";" << "\n"
238 << "\t\t" << "};" << "\n";
239
240 //ROOT
241 t << "\t\t" << keyFor("QMAKE_PBX_ROOT") << " = {" << "\n"
242 << "\t\t\t" << "buildSettings = {" << "\n"
243 << "\t\t\t" << "};" << "\n"
244 << "\t\t\t" << "buildStyles = (" << "\n"
245 << varGlue("QMAKE_PBX_BUILDSTYLES", "\t\t\t\t", ",\n\t\t\t\t", "\n")
246 << "\t\t\t" << ");" << "\n"
247 << "\t\t\t" << "isa = PBXProject;" << "\n"
248 << "\t\t\t" << "mainGroup = " << keyFor("QMAKE_PBX_ROOT_GROUP") << ";" << "\n"
249 << "\t\t\t" << "projectDirPath = \"\";" << "\n"
250 << "\t\t\t" << "projectReferences = (" << "\n";
251 {
252 QStringList &libdirs = project->variables()["QMAKE_PBX_SUBDIRS"];
253 for(QStringList::Iterator it = libdirs.begin(); it != libdirs.end(); ++it)
254 t << "\t\t\t\t" << "{" << "\n"
255 << "\t\t\t\t\t" << "ProductGroup = " << keyFor((*it) + "_PRODUCTGROUP") << ";" << "\n"
256 << "\t\t\t\t\t" << "ProjectRef = " << keyFor((*it) + "_PROJECTREF") << ";" << "\n"
257 << "\t\t\t\t" << "}," << "\n";
258 }
259 t << "\t\t\t" << ");" << "\n"
260 << "\t\t\t" << "targets = (" << "\n"
261 << "\t\t\t" << ");" << "\n"
262 << "\t\t" << "};" << "\n";
263
264 //FOOTER
265 t << "\t" << "};" << "\n"
266 << "\t" << "rootObject = " << keyFor("QMAKE_PBX_ROOT") << ";" << "\n"
267 << "}" << endl;
268
269 return TRUE;
270}
271
272bool
80ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) 273ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
81{ 274{
82 int i; 275 int i;
@@ -107,7 +300,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
107 } 300 }
108 QString phase_key = keyFor("QMAKE_PBX_MAKEQMAKE_BUILDPHASE"); 301 QString phase_key = keyFor("QMAKE_PBX_MAKEQMAKE_BUILDPHASE");
109 mkfile = fileFixify(mkfile, QDir::currentDirPath()); 302 mkfile = fileFixify(mkfile, QDir::currentDirPath());
110 project->variables()["QMAKE_PBX_BUILDPHASES"].append(phase_key); 303 project->variables()["QMAKE_PBX_PRESCRIPT_BUILDPHASES"].append(phase_key);
111 t << "\t\t" << phase_key << " = {" << "\n" 304 t << "\t\t" << phase_key << " = {" << "\n"
112 << "\t\t\t" << "buildActionMask = 2147483647;" << "\n" 305 << "\t\t\t" << "buildActionMask = 2147483647;" << "\n"
113 << "\t\t\t" << "files = (" << "\n" 306 << "\t\t\t" << "files = (" << "\n"
@@ -126,29 +319,74 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
126 319
127 //DUMP SOURCES 320 //DUMP SOURCES
128 QMap<QString, QStringList> groups; 321 QMap<QString, QStringList> groups;
129 QString srcs[] = { "SOURCES", "SRCMOC", "UICIMPLS", QString::null }; 322 QString srcs[] = { "HEADERS", "SOURCES", "SRCMOC", "UICIMPLS", "QMAKE_IMAGE_COLLECTION",
323 "FORMS", "QMAKE_INTERNAL_INCLUDED_FILES", QString::null };
130 for(i = 0; !srcs[i].isNull(); i++) { 324 for(i = 0; !srcs[i].isNull(); i++) {
131 tmp = project->variables()[srcs[i]]; 325 tmp = project->variables()[srcs[i]];
326 if(srcs[i] == "QMAKE_INTERNAL_INCLUDED_FILES") {
327 QString pfile = project->projectFile();
328 if(pfile != "(stdin)")
329 tmp.prepend(pfile);
330 }
132 QStringList &src_list = project->variables()["QMAKE_PBX_" + srcs[i]]; 331 QStringList &src_list = project->variables()["QMAKE_PBX_" + srcs[i]];
332 QStringList &root_group_list = project->variables()["QMAKE_PBX_GROUPS"];
333
334 //hard coded groups..
335 QString src_group;
336 if(srcs[i] == "SOURCES")
337 src_group = "Sources";
338 else if(srcs[i] == "HEADERS")
339 src_group = "Headers";
340 else if(srcs[i] == "SRCMOC")
341 src_group = "Sources [moc]";
342 else if(srcs[i] == "UICIMPLS" || srcs[i] == "FORMS")
343 src_group = "Sources [uic]";
344 else if(srcs[i] == "QMAKE_IMAGE_COLLECTION")
345 src_group = "Sources [images]";
346 else if(srcs[i] == "QMAKE_INTERNAL_INCLUDED_FILES")
347 src_group = "Sources [qmake]";
348
133 for(QStringList::Iterator it = tmp.begin(); it != tmp.end(); ++it) { 349 for(QStringList::Iterator it = tmp.begin(); it != tmp.end(); ++it) {
134 QString file = fileFixify((*it)); 350 QStringList files = (*it);
135 if(file.endsWith(Option::moc_ext)) 351 bool buildable = TRUE;
352 if(srcs[i] == "FORMS") {
353 QString form_dot_h = (*it) + Option::h_ext.first();
354 if(QFile::exists(form_dot_h))
355 files += form_dot_h;
356 buildable = FALSE;
357 } else if(srcs[i] == "HEADERS" || srcs[i] == "QMAKE_INTERNAL_INCLUDED_FILES") {
358 buildable = FALSE;
359 }
360
361 files = fileFixify(files);
362 for(QStringList::Iterator file_it = files.begin(); file_it != files.end(); ++file_it) {
363 QString file = (*file_it);
364 if(file.length() >= 2 && (file[0] == '"' || file[0] == '\'') && file[(int) file.length()-1] == file[0])
365 file = file.mid(1, file.length()-2);
366 if(file.endsWith(Option::cpp_moc_ext) || file.endsWith(Option::prl_ext))
136 continue; 367 continue;
137 bool in_root = TRUE; 368 bool in_root = TRUE;
138 QString src_key = keyFor(file); 369 QString src_key = keyFor(file), name = file;
139 if(!project->isActiveConfig("flat")) { 370 if(project->isActiveConfig("flat")) {
371 QString flat_file = fileFixify(file, QDir::currentDirPath(), Option::output_dir, TRUE);
372 if(flat_file.find(Option::dir_sep) != -1) {
373 QStringList dirs = QStringList::split(Option::dir_sep, flat_file);
374 name = dirs.back();
375 }
376 } else {
140 QString flat_file = fileFixify(file, QDir::currentDirPath(), Option::output_dir, TRUE); 377 QString flat_file = fileFixify(file, QDir::currentDirPath(), Option::output_dir, TRUE);
141 if(QDir::isRelativePath(flat_file) && flat_file.find(Option::dir_sep) != -1) { 378 if(QDir::isRelativePath(flat_file) && flat_file.find(Option::dir_sep) != -1) {
142 QString last_grp("QMAKE_PBX_" + srcs[i] + "_HEIR_GROUP"); 379 QString last_grp("QMAKE_PBX_" + src_group + "_HEIR_GROUP");
143 QStringList dirs = QStringList::split(Option::dir_sep, flat_file); 380 QStringList dirs = QStringList::split(Option::dir_sep, flat_file);
381 name = dirs.back();
144 dirs.pop_back(); //remove the file portion as it will be added via src_key 382 dirs.pop_back(); //remove the file portion as it will be added via src_key
145 for(QStringList::Iterator dir_it = dirs.begin(); dir_it != dirs.end(); ++dir_it) { 383 for(QStringList::Iterator dir_it = dirs.begin(); dir_it != dirs.end(); ++dir_it) {
146 QString new_grp(last_grp + Option::dir_sep + (*dir_it)), 384 QString new_grp(last_grp + Option::dir_sep + (*dir_it)), new_grp_key(keyFor(new_grp));
147 new_grp_key(keyFor(new_grp)), last_grp_key(keyFor(last_grp));
148 if(dir_it == dirs.begin()) { 385 if(dir_it == dirs.begin()) {
149 if(!groups.contains(new_grp)) 386 if(!src_list.contains(new_grp_key))
150 project->variables()["QMAKE_PBX_" + srcs[i]].append(new_grp_key); 387 src_list.append(new_grp_key);
151 } else { 388 } else {
389 if(!groups[last_grp].contains(new_grp_key))
152 groups[last_grp] += new_grp_key; 390 groups[last_grp] += new_grp_key;
153 } 391 }
154 last_grp = new_grp; 392 last_grp = new_grp;
@@ -162,10 +400,22 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
162 //source reference 400 //source reference
163 t << "\t\t" << src_key << " = {" << "\n" 401 t << "\t\t" << src_key << " = {" << "\n"
164 << "\t\t\t" << "isa = PBXFileReference;" << "\n" 402 << "\t\t\t" << "isa = PBXFileReference;" << "\n"
403 << "\t\t\t" << "name = \"" << name << "\";" << "\n"
165 << "\t\t\t" << "path = \"" << file << "\";" << "\n" 404 << "\t\t\t" << "path = \"" << file << "\";" << "\n"
166 << "\t\t\t" << "refType = " << reftypeForFile(file) << ";" << "\n" 405 << "\t\t\t" << "refType = " << reftypeForFile(file) << ";" << "\n";
167 << "\t\t" << "};" << "\n"; 406 if (ideType() == MAC_XCODE) {
168 //build reference 407 QString filetype;
408 for(QStringList::Iterator cppit = Option::cpp_ext.begin(); cppit != Option::cpp_ext.end(); ++cppit) {
409 if(file.endsWith((*cppit))) {
410 filetype = "sourcecode.cpp.cpp";
411 break;
412 }
413 }
414 if(!filetype.isNull())
415 t << "\t\t\t" << "lastKnownFileType = " << filetype << ";" << "\n";
416 }
417 t << "\t\t" << "};" << "\n";
418 if(buildable) { //build reference
169 QString obj_key = file + ".o"; 419 QString obj_key = file + ".o";
170 obj_key = keyFor(obj_key); 420 obj_key = keyFor(obj_key);
171 t << "\t\t" << obj_key << " = {" << "\n" 421 t << "\t\t" << obj_key << " = {" << "\n"
@@ -178,8 +428,9 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
178 << "\t\t" << "};" << "\n"; 428 << "\t\t" << "};" << "\n";
179 project->variables()["QMAKE_PBX_OBJ"].append(obj_key); 429 project->variables()["QMAKE_PBX_OBJ"].append(obj_key);
180 } 430 }
431 }
432 }
181 if(!src_list.isEmpty()) { 433 if(!src_list.isEmpty()) {
182 QString grp;
183 if(srcs[i] == "SOURCES") { 434 if(srcs[i] == "SOURCES") {
184 if(project->first("TEMPLATE") == "app" && !project->isEmpty("RC_FILE")) { //Icon 435 if(project->first("TEMPLATE") == "app" && !project->isEmpty("RC_FILE")) { //Icon
185 QString icns_file = keyFor("ICNS_FILE"); 436 QString icns_file = keyFor("ICNS_FILE");
@@ -196,26 +447,15 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
196 << "\t\t\t" << "};" << "\n" 447 << "\t\t\t" << "};" << "\n"
197 << "\t\t" << "};" << "\n"; 448 << "\t\t" << "};" << "\n";
198 } 449 }
199 grp = "Sources";
200 } else if(srcs[i] == "SRCMOC") {
201 grp = "Mocables";
202 } else if(srcs[i] == "UICIMPLS") {
203 grp = "UICables";
204 } 450 }
205 QString grp_key = keyFor(grp); 451
206 project->variables()["QMAKE_PBX_GROUPS"].append(grp_key); 452 QString src_group_key = keyFor(src_group);
207 t << "\t\t" << grp_key << " = {" << "\n" 453 if(root_group_list.findIndex(src_group_key) == -1)
208 << "\t\t\t" << "children = (" << "\n" 454 root_group_list += src_group_key;
209 << varGlue("QMAKE_PBX_" + srcs[i], "\t\t\t\t", ",\n\t\t\t\t", "\n") 455 groups[src_group] += src_list;
210 << "\t\t\t" << ");" << "\n"
211 << "\t\t\t" << "isa = PBXGroup;" << "\n"
212 << "\t\t\t" << "name = " << grp << ";" << "\n"
213 << "\t\t\t" << "refType = 4;" << "\n"
214 << "\t\t" << "};" << "\n";
215 } 456 }
216 } 457 }
217 for(QMap<QString, QStringList>::Iterator grp_it = groups.begin(); 458 for(QMap<QString, QStringList>::Iterator grp_it = groups.begin(); grp_it != groups.end(); ++grp_it) {
218 grp_it != groups.end(); ++grp_it) {
219 t << "\t\t" << keyFor(grp_it.key()) << " = {" << "\n" 459 t << "\t\t" << keyFor(grp_it.key()) << " = {" << "\n"
220 << "\t\t\t" << "isa = PBXGroup;" << "\n" 460 << "\t\t\t" << "isa = PBXGroup;" << "\n"
221 << "\t\t\t" << "children = (" << "\n" 461 << "\t\t\t" << "children = (" << "\n"
@@ -236,8 +476,8 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
236 debug_msg(1, "pbuilder: Creating file: %s", mkfile.latin1()); 476 debug_msg(1, "pbuilder: Creating file: %s", mkfile.latin1());
237 QTextStream mkt(&mkf); 477 QTextStream mkt(&mkf);
238 writeHeader(mkt); 478 writeHeader(mkt);
239 mkt << "MOC = " << var("QMAKE_MOC") << endl; 479 mkt << "MOC = " << Option::fixPathToTargetOS(var("QMAKE_MOC")) << endl;
240 mkt << "UIC = " << var("QMAKE_UIC") << endl; 480 mkt << "UIC = " << Option::fixPathToTargetOS(var("QMAKE_UIC")) << endl;
241 mkt << "LEX = " << var("QMAKE_LEX") << endl; 481 mkt << "LEX = " << var("QMAKE_LEX") << endl;
242 mkt << "LEXFLAGS = " << var("QMAKE_LEXFLAGS") << endl; 482 mkt << "LEXFLAGS = " << var("QMAKE_LEXFLAGS") << endl;
243 mkt << "YACC = " << var("QMAKE_YACC") << endl; 483 mkt << "YACC = " << var("QMAKE_YACC") << endl;
@@ -245,6 +485,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
245 mkt << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl; 485 mkt << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl;
246 mkt << "MOVE = " << var("QMAKE_MOVE") << endl << endl; 486 mkt << "MOVE = " << var("QMAKE_MOVE") << endl << endl;
247 mkt << "FORMS = " << varList("UICIMPLS") << endl; 487 mkt << "FORMS = " << varList("UICIMPLS") << endl;
488 mkt << "IMAGES = " << varList("QMAKE_IMAGE_COLLECTION") << endl;
248 mkt << "MOCS = " << varList("SRCMOC") << endl; 489 mkt << "MOCS = " << varList("SRCMOC") << endl;
249 mkt << "PARSERS ="; 490 mkt << "PARSERS =";
250 if(!project->isEmpty("YACCSOURCES")) { 491 if(!project->isEmpty("YACCSOURCES")) {
@@ -264,14 +505,16 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
264 } 505 }
265 } 506 }
266 mkt << "\n"; 507 mkt << "\n";
267 mkt << "preprocess: $(FORMS) $(MOCS) $(PARSERS)" << endl; 508 mkt << "preprocess: $(FORMS) $(MOCS) $(PARSERS) $(IMAGES)" << endl;
268 mkt << "preprocess_clean: mocclean uiclean parser_clean" << endl << endl; 509 mkt << "clean preprocess_clean: mocclean uiclean parser_clean" << endl << endl;
269 mkt << "mocclean:" << "\n"; 510 mkt << "mocclean:" << "\n";
270 if(!project->isEmpty("SRCMOC")) 511 if(!project->isEmpty("SRCMOC"))
271 mkt << "\t-rm -f $(MOCS)" << "\n"; 512 mkt << "\t-rm -f $(MOCS)" << "\n";
272 mkt << "uiclean:" << "\n"; 513 mkt << "uiclean:" << "\n";
273 if(!project->isEmpty("UICIMPLS")) 514 if(!project->isEmpty("UICIMPLS"))
274 mkt << "\t-rm -f $(FORMS)" << "\n"; 515 mkt << "\t-rm -f $(FORMS)" << "\n";
516 if(!project->isEmpty("QMAKE_IMAGE_COLLECTION"))
517 mkt << "\t-rm -f $(IMAGES)" << "\n";
275 mkt << "parser_clean:" << "\n"; 518 mkt << "parser_clean:" << "\n";
276 if(!project->isEmpty("YACCSOURCES") || !project->isEmpty("LEXSOURCES")) 519 if(!project->isEmpty("YACCSOURCES") || !project->isEmpty("LEXSOURCES"))
277 mkt << "\t-rm -f $(PARSERS)" << "\n"; 520 mkt << "\t-rm -f $(PARSERS)" << "\n";
@@ -281,36 +524,31 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
281 writeMocSrc(mkt, "UICDECLS"); 524 writeMocSrc(mkt, "UICDECLS");
282 writeYaccSrc(mkt, "YACCSOURCES"); 525 writeYaccSrc(mkt, "YACCSOURCES");
283 writeLexSrc(mkt, "LEXSOURCES"); 526 writeLexSrc(mkt, "LEXSOURCES");
527 writeImageSrc(mkt, "QMAKE_IMAGE_COLLECTION");
284 mkf.close(); 528 mkf.close();
285 } 529 }
286 QString target_key = keyFor("QMAKE_PBX_PREPROCESS_TARGET");
287 mkfile = fileFixify(mkfile, QDir::currentDirPath()); 530 mkfile = fileFixify(mkfile, QDir::currentDirPath());
288 t << "\t\t" << target_key << " = {" << "\n" 531 QString phase_key = keyFor("QMAKE_PBX_PREPROCESS_TARGET");
289 << "\t\t\t" << "buildArgumentsString = \"-f " << mkfile << "\";" << "\n" 532 //project->variables()["QMAKE_PBX_BUILDPHASES"].append(phase_key);
290 << "\t\t\t" << "buildPhases = (" << "\n" 533 project->variables()["QMAKE_PBX_PRESCRIPT_BUILDPHASES"].append(phase_key);
534 t << "\t\t" << phase_key << " = {" << "\n"
535 << "\t\t\t" << "buildActionMask = 2147483647;" << "\n"
536 << "\t\t\t" << "files = (" << "\n"
291 << "\t\t\t" << ");" << "\n" 537 << "\t\t\t" << ");" << "\n"
292 << "\t\t\t" << "buildSettings = {" << "\n" 538 << "\t\t\t" << "generatedFileNames = (" << "\n"
293 << "\t\t\t" << "};" << "\n" 539 << varGlue("QMAKE_PBX_OBJ", "\t\t\t\t", ",\n\t\t\t\t", "\n")
294 << "\t\t\t" << "buildToolPath = \"/usr/bin/gnumake\";"<< "\n"
295 << "\t\t\t" << "buildWorkingDirectory = \"" << QDir::currentDirPath() << "\";" << "\n"
296 << "\t\t\t" << "dependencies = (" << "\n"
297 << "\t\t\t" << ");" << "\n" 540 << "\t\t\t" << ");" << "\n"
298 << "\t\t\t" << "isa = PBXLegacyTarget;" << "\n" 541 << "\t\t\t" << "isa = PBXShellScriptBuildPhase;" << "\n"
299 << "\t\t\t" << "name = QtPreprocessors;" << "\n" 542 << "\t\t\t" << "name = \"Qt Preprocessors\";" << "\n"
300 << "\t\t\t" << "productName = QtPreprocessors;" << "\n" 543 << "\t\t\t" << "neededFileNames = (" << "\n"
301 << "\t\t\t" << "settingsToExpand = 6;" << "\n" 544 << varGlue("QMAKE_PBX_OBJ", "\t\t\t\t", ",\n\t\t\t\t", "\n")
302 << "\t\t\t" << "settingsToPassInEnvironment = 287;" << "\n" 545 << "\t\t\t" << ");" << "\n"
303 << "\t\t\t" << "settingsToPassOnCommandLine = 280;" << "\n" 546 << "\t\t\t" << "shellPath = /bin/sh;" << "\n"
304 << "\t\t\t" << "shouldsUseHeadermap = 0;" << "\n" 547 << "\t\t\t" << "shellScript = \"make -C " << QDir::currentDirPath() <<
305 << "\t\t" << "};" << "\n"; 548 " -f " << mkfile << "\";" << "\n"
306
307 QString target_depend_key = keyFor("QMAKE_PBX_PREPROCESS_TARGET_DEPEND");
308 project->variables()["QMAKE_PBX_TARGETDEPENDS"].append(target_depend_key);
309 t << "\t\t" << target_depend_key << " = {" << "\n"
310 << "\t\t\t" << "isa = PBXTargetDependency;" << "\n"
311 << "\t\t\t" << "target = " << target_key << ";" << "\n"
312 << "\t\t" << "};" << "\n"; 549 << "\t\t" << "};" << "\n";
313 } 550 }
551
314 //SOURCE BUILDPHASE 552 //SOURCE BUILDPHASE
315 if(!project->isEmpty("QMAKE_PBX_OBJ")) { 553 if(!project->isEmpty("QMAKE_PBX_OBJ")) {
316 QString grp = "Build Sources", key = keyFor(grp); 554 QString grp = "Build Sources", key = keyFor(grp);
@@ -327,40 +565,44 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
327 565
328 if(!project->isActiveConfig("staticlib")) { //DUMP LIBRARIES 566 if(!project->isActiveConfig("staticlib")) { //DUMP LIBRARIES
329 QStringList &libdirs = project->variables()["QMAKE_PBX_LIBPATHS"]; 567 QStringList &libdirs = project->variables()["QMAKE_PBX_LIBPATHS"];
330 QString libs[] = { "QMAKE_LIBDIR_FLAGS", "QMAKE_LIBS", QString::null }; 568 QString libs[] = { "QMAKE_LFLAGS", "QMAKE_LIBDIR_FLAGS", "QMAKE_LIBS", QString::null };
331 for(i = 0; !libs[i].isNull(); i++) { 569 for(i = 0; !libs[i].isNull(); i++) {
332 tmp = project->variables()[libs[i]]; 570 tmp = project->variables()[libs[i]];
333 for(QStringList::Iterator it = tmp.begin(); it != tmp.end();) { 571 for(QStringList::Iterator it = tmp.begin(); it != tmp.end();) {
334 bool remove = FALSE; 572 bool remove = FALSE;
335 QString library, name, opt = (*it).stripWhiteSpace(); 573 QString library, name, opt = (*it).stripWhiteSpace();
574 if(opt.length() >= 2 && (opt[0] == '"' || opt[0] == '\'') && opt[(int) opt.length()-1] == opt[0])
575 opt = opt.mid(1, opt.length()-2);
336 if(opt.startsWith("-L")) { 576 if(opt.startsWith("-L")) {
337 QString r = opt.right(opt.length() - 2); 577 QString r = opt.right(opt.length() - 2);
338 fixEnvVariables(r); 578 fixEnvVariables(r);
339 libdirs.append(r); 579 libdirs.append(r);
580 } else if(opt == "-prebind") {
581 project->variables()["QMAKE_DO_PREBINDING"].append("TRUE");
582 remove = TRUE;
340 } else if(opt.startsWith("-l")) { 583 } else if(opt.startsWith("-l")) {
341 name = opt.right(opt.length() - 2); 584 name = opt.right(opt.length() - 2);
342 QString lib("lib" + name); 585 QString lib("lib" + name);
343 for(QStringList::Iterator lit = libdirs.begin(); lit != libdirs.end(); ++lit) { 586 for(QStringList::Iterator lit = libdirs.begin(); lit != libdirs.end(); ++lit) {
344 if(project->isActiveConfig("link_prl")) { 587 if(project->isActiveConfig("link_prl")) {
345 /* This isn't real nice, but it is real useful. This looks in a prl 588 /* This isn't real nice, but it is real usefull. This looks in a prl
346 for what the library will ultimately be called so we can stick it 589 for what the library will ultimately be called so we can stick it
347 in the ProjectFile. If the prl format ever changes (not likely) then 590 in the ProjectFile. If the prl format ever changes (not likely) then
348 this will not really work. However, more concerning is that it will 591 this will not really work. However, more concerning is that it will
349 encode the version number in the Project file which might be a bad 592 encode the version number in the Project file which might be a bad
350 things in days to come? --Sam 593 things in days to come? --Sam
351 */ 594 */
352 QString prl_file = (*lit) + Option::dir_sep + lib + Option::prl_ext; 595 QString lib_file = (*lit) + Option::dir_sep + lib;
353 if(QFile::exists(prl_file)) { 596 if(QMakeMetaInfo::libExists(lib_file)) {
354 QMakeProject proj; 597 QMakeMetaInfo libinfo;
355 if(proj.read(prl_file, QDir::currentDirPath())) { 598 if(libinfo.readLib(lib_file)) {
356 if(!proj.isEmpty("QMAKE_PRL_TARGET")) { 599 if(!libinfo.isEmpty("QMAKE_PRL_TARGET")) {
357 library = (*lit) + Option::dir_sep + proj.first("QMAKE_PRL_TARGET"); 600 library = (*lit) + Option::dir_sep + libinfo.first("QMAKE_PRL_TARGET");
358 debug_msg(1, "pbuilder: Found library (%s) via PRL %s (%s)", 601 debug_msg(1, "pbuilder: Found library (%s) via PRL %s (%s)",
359 opt.latin1(), prl_file.latin1(), library.latin1()); 602 opt.latin1(), lib_file.latin1(), library.latin1());
360 remove = TRUE; 603 remove = TRUE;
361 } 604 }
362 } 605 }
363
364 } 606 }
365 } 607 }
366 if(!remove) { 608 if(!remove) {
@@ -392,6 +634,8 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
392 break; 634 break;
393 } 635 }
394 } 636 }
637 } else if(opt == "-undefined") {
638 ++it; //the next option is not a library..
395 } else if(opt.left(1) != "-") { 639 } else if(opt.left(1) != "-") {
396 remove = TRUE; 640 remove = TRUE;
397 library = opt; 641 library = opt;
@@ -453,7 +697,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
453 } 697 }
454 QString phase_key = keyFor("QMAKE_PBX_SUBLIBS_BUILDPHASE"); 698 QString phase_key = keyFor("QMAKE_PBX_SUBLIBS_BUILDPHASE");
455 mkfile = fileFixify(mkfile, QDir::currentDirPath()); 699 mkfile = fileFixify(mkfile, QDir::currentDirPath());
456 project->variables()["QMAKE_PBX_BUILDPHASES"].append(phase_key); 700 project->variables()["QMAKE_PBX_PRESCRIPT_BUILDPHASES"].append(phase_key);
457 t << "\t\t" << phase_key << " = {" << "\n" 701 t << "\t\t" << phase_key << " = {" << "\n"
458 << "\t\t\t" << "buildActionMask = 2147483647;" << "\n" 702 << "\t\t\t" << "buildActionMask = 2147483647;" << "\n"
459 << "\t\t\t" << "files = (" << "\n" 703 << "\t\t\t" << "files = (" << "\n"
@@ -498,8 +742,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
498 << "\t\t\t" << "name = \"" << grp << "\";" << "\n" 742 << "\t\t\t" << "name = \"" << grp << "\";" << "\n"
499 << "\t\t" << "};" << "\n"; 743 << "\t\t" << "};" << "\n";
500 } 744 }
501 if(project->isActiveConfig("resource_fork") && !project->isActiveConfig("console") && 745 if(!project->isActiveConfig("console") && project->first("TEMPLATE") == "app") { //BUNDLE RESOURCES
502 project->first("TEMPLATE") == "app") { //BUNDLE RESOURCES
503 QString grp("Bundle Resources"), key = keyFor(grp); 746 QString grp("Bundle Resources"), key = keyFor(grp);
504 project->variables()["QMAKE_PBX_BUILDPHASES"].append(key); 747 project->variables()["QMAKE_PBX_BUILDPHASES"].append(key);
505 t << "\t\t" << key << " = {" << "\n" 748 t << "\t\t" << key << " = {" << "\n"
@@ -511,21 +754,6 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
511 << "\t\t\t" << "name = \"" << grp << "\";" << "\n" 754 << "\t\t\t" << "name = \"" << grp << "\";" << "\n"
512 << "\t\t" << "};" << "\n"; 755 << "\t\t" << "};" << "\n";
513 } 756 }
514
515 //DUMP EVERYTHING THAT TIES THE ABOVE TOGETHER
516 //PRODUCTS
517 {
518 QString grp("Products"), key = keyFor(grp);
519 project->variables()["QMAKE_PBX_GROUPS"].append(key);
520 t << "\t\t" << key << " = {" << "\n"
521 << "\t\t\t" << "children = (" << "\n"
522 << "\t\t\t\t" << keyFor("QMAKE_PBX_REFERENCE") << "\n"
523 << "\t\t\t" << ");" << "\n"
524 << "\t\t\t" << "isa = PBXGroup;" << "\n"
525 << "\t\t\t" << "name = Products;" << "\n"
526 << "\t\t\t" << "refType = 4;" << "\n"
527 << "\t\t" << "};" << "\n";
528 }
529 { //INSTALL BUILDPHASE (sh script) 757 { //INSTALL BUILDPHASE (sh script)
530 QString targ = project->first("TARGET"); 758 QString targ = project->first("TARGET");
531 if(project->first("TEMPLATE") == "app" || 759 if(project->first("TEMPLATE") == "app" ||
@@ -540,7 +768,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
540 if(project->first("TEMPLATE") == "app") { 768 if(project->first("TEMPLATE") == "app") {
541 if(project->isActiveConfig("resource_fork") && !project->isActiveConfig("console")) 769 if(project->isActiveConfig("resource_fork") && !project->isActiveConfig("console"))
542 targ += ".app"; 770 targ += ".app";
543 } else if(!project->isActiveConfig("staticlib") && 771 } else if(!project->isActiveConfig("staticlib") && !project->isActiveConfig("plugin") &&
544 !project->isActiveConfig("frameworklib")) { 772 !project->isActiveConfig("frameworklib")) {
545 QString li[] = { "TARGET_", "TARGET_x", "TARGET_x.y", QString::null }; 773 QString li[] = { "TARGET_", "TARGET_x", "TARGET_x.y", QString::null };
546 for(int n = 0; !li[n].isNull(); n++) { 774 for(int n = 0; !li[n].isNull(); n++) {
@@ -559,7 +787,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
559 QString targ = project->first("QMAKE_ORIG_TARGET"), cpflags; 787 QString targ = project->first("QMAKE_ORIG_TARGET"), cpflags;
560 if(project->first("TEMPLATE") == "app") { 788 if(project->first("TEMPLATE") == "app") {
561 targ = project->first("TARGET"); 789 targ = project->first("TARGET");
562 if(project->isActiveConfig("resource_fork") && !project->isActiveConfig("console")) { 790 if(!project->isActiveConfig("console")) {
563 targ += ".app"; 791 targ += ".app";
564 cpflags += "-r "; 792 cpflags += "-r ";
565 } 793 }
@@ -568,24 +796,26 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
568 targ = project->first("TARGET"); 796 targ = project->first("TARGET");
569 else 797 else
570 targ = project->first("TARGET_"); 798 targ = project->first("TARGET_");
799 }
571 int slsh = targ.findRev(Option::dir_sep); 800 int slsh = targ.findRev(Option::dir_sep);
572 if(slsh != -1) 801 if(slsh != -1)
573 targ = targ.right(targ.length() - slsh - 1); 802 targ = targ.right(targ.length() - slsh - 1);
574 } 803
575 QTextStream sht(&shf);
576 QString dstdir = project->first("DESTDIR"); 804 QString dstdir = project->first("DESTDIR");
577 fixEnvVariables(dstdir); 805 fixEnvVariables(dstdir);
578 806
807 QTextStream sht(&shf);
579 sht << "#!/bin/sh" << endl; 808 sht << "#!/bin/sh" << endl;
580 //copy the actual target 809 //copy the actual target
581 sht << "OUT_TARG=\"" << targ << "\"\n" 810 sht << "OUT_TARG=\"${TARGET_BUILD_DIR}/${FULL_PRODUCT_NAME}\"\n"
582 << "[ -z \"$BUILD_ROOT\" ] || OUT_TARG=\"${BUILD_ROOT}/${OUT_TARG}\"" << endl; 811 << "if [ -e \"$OUT_TARG\" ]; then" << "\n"
583 sht << "[ \"$OUT_TARG\" = \"" 812 << " [ \"$OUT_TARG\" = \""
584 << (dstdir.isEmpty() ? QDir::currentDirPath() + QDir::separator(): dstdir) << targ << "\" ] || " 813 << (dstdir.isEmpty() ? QDir::currentDirPath() + QDir::separator(): dstdir) << targ << "\" ] || "
585 << "[ \"$OUT_TARG\" = \"" << targ << "\" ] || " 814 << "[ \"$OUT_TARG\" = \"" << targ << "\" ] || "
586 << "cp -r \"$OUT_TARG\" " << "\"" << dstdir << targ << "\"" << endl; 815 << "cp -r \"$OUT_TARG\" " << "\"" << dstdir << targ << "\"" << "\n"
816 << "fi" << endl;
587 //rename as a framework 817 //rename as a framework
588 if(project->first("TEMPLATE") == "lib" && project->isActiveConfig("frameworklib")) 818 if(project->first("TEMPLATE") == "lib" && project->isActiveConfig("frameworklib") && !project->isActiveConfig("plugin"))
589 sht << "ln -sf \"" << targ << "\" " << "\"" << dstdir << targ << "\"" << endl; 819 sht << "ln -sf \"" << targ << "\" " << "\"" << dstdir << targ << "\"" << endl;
590 //create all the version symlinks (just to be like unixmake) 820 //create all the version symlinks (just to be like unixmake)
591 for(QStringList::Iterator it = links.begin(); it != links.end(); ++it) { 821 for(QStringList::Iterator it = links.begin(); it != links.end(); ++it) {
@@ -600,7 +830,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
600 script = fileFixify(script, QDir::currentDirPath()); 830 script = fileFixify(script, QDir::currentDirPath());
601 project->variables()["QMAKE_PBX_BUILDPHASES"].append(phase_key); 831 project->variables()["QMAKE_PBX_BUILDPHASES"].append(phase_key);
602 t << "\t\t" << phase_key << " = {" << "\n" 832 t << "\t\t" << phase_key << " = {" << "\n"
603 << "\t\t\t" << "buildActionMask = 8;" << "\n" //only on install! 833 << "\t\t\t" << "buildActionMask = 2147483647;" << "\n"
604 << "\t\t\t" << "files = (" << "\n" 834 << "\t\t\t" << "files = (" << "\n"
605 << "\t\t\t" << ");" << "\n" 835 << "\t\t\t" << ");" << "\n"
606 << "\t\t\t" << "generatedFileNames = (" << "\n" 836 << "\t\t\t" << "generatedFileNames = (" << "\n"
@@ -614,6 +844,45 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
614 << "\t\t" << "};" << "\n"; 844 << "\t\t" << "};" << "\n";
615 } 845 }
616 } 846 }
847 if(/*ideType() == MAC_XCODE &&*/ !project->isEmpty("QMAKE_PBX_PRESCRIPT_BUILDPHASES") && 0) {
848 // build reference
849 t << "\t\t" << keyFor("QMAKE_PBX_PRESCRIPT_BUILDREFERENCE") << " = {" << "\n"
850 << "\t\t\t" << "includeInIndex = 0;" << "\n"
851 << "\t\t\t" << "isa = PBXFileReference;" << "\n"
852 << "\t\t\t" << "path = preprocessor.out;" << "\n"
853 << "\t\t\t" << "refType = 3;" << "\n"
854 << "\t\t\t" << "sourceTree = BUILT_PRODUCTS_DIR;" << "\n"
855 << "\t\t" << "};" << "\n";
856 project->variables()["QMAKE_PBX_PRODUCTS"].append(keyFor("QMAKE_PBX_PRESCRIPTS_BUILDREFERENCE"));
857 //build phase
858 QString prescript_key = keyFor("QMAKE_PBX_PRESCRIPTS_BUILDPHASE");
859 project->variables()["QMAKE_PBX_TARGETS"].append(prescript_key);
860 t << "\t\t" << prescript_key << " = {" << "\n"
861 << "\t\t\t" << "buildPhases = (" << "\n"
862 << varGlue("QMAKE_PBX_PRESCRIPT_BUILDPHASES", "\t\t\t\t", ",\n\t\t\t\t", "\n")
863 << "\t\t\t" << ");" << "\n"
864 << "\t\t\t" << "buildRules = (" << "\n"
865 << "\t\t\t" << ");" << "\n"
866 << "\t\t\t" << "buildSettings = {" << "\n"
867 << "\t\t\t" << "};" << "\n"
868 << "\t\t\t" << "dependencies = (" << "\n"
869 << "\t\t\t" << ");" << "\n"
870 << "\t\t\t" << "isa = PBXNativeTarget;" << "\n"
871 << "\t\t\t" << "name = \"Qt Preprocessor Steps\";" << "\n"
872 << "\t\t\t" << "productName = \"Qt Preprocessor Steps\";" << "\n"
873 << "\t\t\t" << "productReference = " << keyFor("QMAKE_PBX_PRESCRIPTS_BUILDREFERENCE") << ";" << "\n"
874 << "\t\t\t" << "productType = \"com.apple.product-type.tool\";" << "\n"
875 << "\t\t" << "};" << "\n";
876 //dependency
877 t << "\t\t" << keyFor("QMAKE_PBX_PRESCRIPTS_DEPENDENCY") << " = {" << "\n"
878 << "\t\t\t" << "isa = PBXTargetDependency;" << "\n"
879 << "\t\t\t" << "target = " << keyFor("QMAKE_PBX_PRESCRIPTS_BUILDPHASE") << ";" << "\n"
880 << "\t\t" << "};" << "\n";
881 project->variables()["QMAKE_PBX_TARGET_DEPENDS"].append(keyFor("QMAKE_PBX_PRESCRIPTS_DEPENDENCY"));
882 project->variables()["QMAKE_PBX_PRESCRIPT_BUILDPHASES"].clear(); //these are already consumed above
883 }
884
885 //DUMP EVERYTHING THAT TIES THE ABOVE TOGETHER
617 //ROOT_GROUP 886 //ROOT_GROUP
618 t << "\t\t" << keyFor("QMAKE_PBX_ROOT_GROUP") << " = {" << "\n" 887 t << "\t\t" << keyFor("QMAKE_PBX_ROOT_GROUP") << " = {" << "\n"
619 << "\t\t\t" << "children = (" << "\n" 888 << "\t\t\t" << "children = (" << "\n"
@@ -625,7 +894,9 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
625 << "\t\t\t" << "refType = 4;" << "\n" 894 << "\t\t\t" << "refType = 4;" << "\n"
626 << "\t\t" << "};" << "\n"; 895 << "\t\t" << "};" << "\n";
627 //REFERENCE 896 //REFERENCE
628 t << "\t\t" << keyFor("QMAKE_PBX_REFERENCE") << " = {" << "\n"; 897 project->variables()["QMAKE_PBX_PRODUCTS"].append(keyFor(pbx_dir + "QMAKE_PBX_REFERENCE"));
898 t << "\t\t" << keyFor(pbx_dir + "QMAKE_PBX_REFERENCE") << " = {" << "\n"
899 << "\t\t\t" << "fallbackIsa = PBXFileReference;" << "\n";
629 if(project->first("TEMPLATE") == "app") { 900 if(project->first("TEMPLATE") == "app") {
630 QString targ = project->first("QMAKE_ORIG_TARGET"); 901 QString targ = project->first("QMAKE_ORIG_TARGET");
631 if(project->isActiveConfig("resource_fork") && !project->isActiveConfig("console")) { 902 if(project->isActiveConfig("resource_fork") && !project->isActiveConfig("console")) {
@@ -653,31 +924,80 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
653 if(slsh != -1) 924 if(slsh != -1)
654 lib = lib.right(lib.length() - slsh - 1); 925 lib = lib.right(lib.length() - slsh - 1);
655 t << "\t\t\t" << "isa = PBXLibraryReference;" << "\n" 926 t << "\t\t\t" << "isa = PBXLibraryReference;" << "\n"
927 << "\t\t\t" << "expectedFileType = \"compiled.mach-o.dylib\";" << "\n"
656 << "\t\t\t" << "path = " << lib << ";\n" 928 << "\t\t\t" << "path = " << lib << ";\n"
657 << "\t\t\t" << "refType = " << reftypeForFile(lib) << ";" << "\n"; 929 << "\t\t\t" << "refType = " << 3/*reftypeForFile(lib)*/ << ";" << "\n"
930 << "\t\t\t" << "sourceTree = BUILT_PRODUCTS_DIR" << ";" << "\n";
658 } 931 }
659 t << "\t\t" << "};" << "\n"; 932 t << "\t\t" << "};" << "\n";
933 { //Products group
934 QString grp("Products"), key = keyFor(grp);
935 project->variables()["QMAKE_PBX_GROUPS"].append(key);
936 t << "\t\t" << key << " = {" << "\n"
937 << "\t\t\t" << "children = (" << "\n"
938 << varGlue("QMAKE_PBX_PRODUCTS", "\t\t\t\t", ",\n\t\t\t\t", "\n")
939 << "\t\t\t" << ");" << "\n"
940 << "\t\t\t" << "isa = PBXGroup;" << "\n"
941 << "\t\t\t" << "name = Products;" << "\n"
942 << "\t\t\t" << "refType = 4;" << "\n"
943 << "\t\t" << "};" << "\n";
944 }
660 //TARGET 945 //TARGET
661 t << "\t\t" << keyFor("QMAKE_PBX_TARGET") << " = {" << "\n" 946 QString target_key = keyFor("QMAKE_PBX_TARGET");
947 project->variables()["QMAKE_PBX_TARGETS"].append(target_key);
948 t << "\t\t" << target_key << " = {" << "\n"
662 << "\t\t\t" << "buildPhases = (" << "\n" 949 << "\t\t\t" << "buildPhases = (" << "\n"
950 << varGlue("QMAKE_PBX_PRESCRIPT_BUILDPHASES", "\t\t\t\t", ",\n\t\t\t\t", ",\n")
663 << varGlue("QMAKE_PBX_BUILDPHASES", "\t\t\t\t", ",\n\t\t\t\t", "\n") 951 << varGlue("QMAKE_PBX_BUILDPHASES", "\t\t\t\t", ",\n\t\t\t\t", "\n")
664 << "\t\t\t" << ");" << "\n" 952 << "\t\t\t" << ");" << "\n"
665 << "\t\t\t" << "buildSettings = {" << "\n" 953 << "\t\t\t" << "buildSettings = {" << "\n"
954 << "\t\t\t\t" << "CC = \"" << fixEnvsList("QMAKE_CC") << "\";" << "\n"
955 << "\t\t\t\t" << "CPLUSPLUS = \"" << fixEnvsList("QMAKE_CXX") << "\";" << "\n"
666 << "\t\t\t\t" << "FRAMEWORK_SEARCH_PATHS = \"\";" << "\n" 956 << "\t\t\t\t" << "FRAMEWORK_SEARCH_PATHS = \"\";" << "\n"
667 << "\t\t\t\t" << "HEADER_SEARCH_PATHS = \"" << fixEnvsList("INCLUDEPATH") << " " << fixEnvs(specdir()) << "\";" << "\n" 957 << "\t\t\t\t" << "HEADER_SEARCH_PATHS = \"" << fixEnvsList("INCLUDEPATH") << " " << fixEnvs(specdir()) << "\";" << "\n"
668 << "\t\t\t\t" << "LIBRARY_SEARCH_PATHS = \"" << var("QMAKE_PBX_LIBPATHS") << "\";" << "\n" 958 << "\t\t\t\t" << "LIBRARY_SEARCH_PATHS = \"" << var("QMAKE_PBX_LIBPATHS") << "\";" << "\n"
669 << "\t\t\t\t" << "OPTIMIZATION_CFLAGS = \"\";" << "\n" 959 << "\t\t\t\t" << "OPTIMIZATION_CFLAGS = \"\";" << "\n"
670 << "\t\t\t\t" << "OTHER_CFLAGS = \"" << 960 << "\t\t\t\t" << "OTHER_CFLAGS = \"" <<
671 fixEnvsList("QMAKE_CFLAGS") << varGlue("PRL_EXPORT_DEFINES"," -D"," -D","") << 961 fixEnvsList("QMAKE_CFLAGS") << fixQuotes(varGlue("PRL_EXPORT_DEFINES"," -D"," -D","")) <<
672 varGlue("DEFINES"," -D"," -D","") << "\";" << "\n" 962 fixQuotes(varGlue("DEFINES"," -D"," -D","")) << "\";" << "\n"
673 << "\t\t\t\t" << "LEXFLAGS = \"" << var("QMAKE_LEXFLAGS") << "\";" << "\n" 963 << "\t\t\t\t" << "LEXFLAGS = \"" << var("QMAKE_LEXFLAGS") << "\";" << "\n"
674 << "\t\t\t\t" << "YACCFLAGS = \"" << var("QMAKE_YACCFLAGS") << "\";" << "\n" 964 << "\t\t\t\t" << "YACCFLAGS = \"" << var("QMAKE_YACCFLAGS") << "\";" << "\n"
675 << "\t\t\t\t" << "OTHER_CPLUSPLUSFLAGS = \"" << 965 << "\t\t\t\t" << "OTHER_CPLUSPLUSFLAGS = \"" <<
676 fixEnvsList("QMAKE_CXXFLAGS") << varGlue("PRL_EXPORT_DEFINES"," -D"," -D","") << 966 fixEnvsList("QMAKE_CXXFLAGS") << fixQuotes(varGlue("PRL_EXPORT_DEFINES"," -D"," -D","")) <<
677 varGlue("DEFINES"," -D"," -D","") << "\";" << "\n" 967 fixQuotes(varGlue("DEFINES"," -D"," -D","")) << "\";" << "\n"
678 << "\t\t\t\t" << "OTHER_REZFLAGS = \"\";" << "\n" 968 << "\t\t\t\t" << "OTHER_REZFLAGS = \"\";" << "\n"
679 << "\t\t\t\t" << "SECTORDER_FLAGS = \"\";" << "\n" 969 << "\t\t\t\t" << "SECTORDER_FLAGS = \"\";" << "\n"
680 << "\t\t\t\t" << "WARNING_CFLAGS = \"\";" << "\n"; 970 << "\t\t\t\t" << "WARNING_CFLAGS = \"\";" << "\n"
971 << "\t\t\t\t" << "PREBINDING = " << (project->isEmpty("QMAKE_DO_PREBINDING") ? "NO" : "YES") << ";" << "\n";
972 if(!project->isEmpty("PRECOMPILED_HEADER")) {
973 if (ideType() == MAC_XCODE) {
974 t << "\t\t\t\t" << "GCC_PRECOMPILE_PREFIX_HEADER = \"YES\";" << "\n"
975 << "\t\t\t\t" << "GCC_PREFIX_HEADER = \"" << project->first("PRECOMPILED_HEADER") << "\";" << "\n";
976 } else {
977 t << "\t\t\t\t" << "PRECOMPILE_PREFIX_HEADER = \"YES\";" << "\n"
978 << "\t\t\t\t" << "PREFIX_HEADER = \"" << project->first("PRECOMPILED_HEADER") << "\";" << "\n";
979 }
980 }
981 if(project->first("TEMPLATE") == "app") {
982 QString plist = fileFixify(project->first("QMAKE_INFO_PLIST"));
983 if(plist.isEmpty())
984 plist = specdir() + QDir::separator() + "Info.plist." + project->first("TEMPLATE");
985 if(QFile::exists(plist)) {
986 QFile plist_in_file(plist);
987 if(plist_in_file.open(IO_ReadOnly)) {
988 QTextStream plist_in(&plist_in_file);
989 QString plist_in_text = plist_in.read();
990 plist_in_text = plist_in_text.replace("@ICON@", (project->isEmpty("RC_FILE") ? QString("") : project->first("RC_FILE").section(Option::dir_sep, -1)));
991 plist_in_text = plist_in_text.replace("@EXECUTABLE@", project->first("QMAKE_ORIG_TARGET"));
992 QFile plist_out_file("Info.plist");
993 if(plist_out_file.open(IO_WriteOnly | IO_Translate)) {
994 QTextStream plist_out(&plist_out_file);
995 plist_out << plist_in_text;
996 t << "\t\t\t\t" << "INFOPLIST_FILE = \"Info.plist\";" << "\n";
997 }
998 }
999 }
1000 }
681#if 1 1001#if 1
682 t << "\t\t\t\t" << "BUILD_ROOT = \"" << QDir::currentDirPath() << "\";" << "\n"; 1002 t << "\t\t\t\t" << "BUILD_ROOT = \"" << QDir::currentDirPath() << "\";" << "\n";
683#endif 1003#endif
@@ -685,50 +1005,91 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
685 t << "\t\t\t\t" << "OTHER_LDFLAGS = \"" << fixEnvsList("SUBLIBS") << " " << 1005 t << "\t\t\t\t" << "OTHER_LDFLAGS = \"" << fixEnvsList("SUBLIBS") << " " <<
686 fixEnvsList("QMAKE_LFLAGS") << " " << fixEnvsList("QMAKE_LIBDIR_FLAGS") << 1006 fixEnvsList("QMAKE_LFLAGS") << " " << fixEnvsList("QMAKE_LIBDIR_FLAGS") <<
687 " " << fixEnvsList("QMAKE_LIBS") << "\";" << "\n"; 1007 " " << fixEnvsList("QMAKE_LIBS") << "\";" << "\n";
688 if(!project->isEmpty("DESTDIR")) 1008 if(!project->isEmpty("DESTDIR")) {
689 t << "\t\t\t\t" << "INSTALL_PATH = \"" << project->first("DESTDIR") << "\";" << "\n"; 1009 QString dir = project->first("DESTDIR");
690 if(!project->isEmpty("VERSION") && project->first("VERSION") != "0.0.0") 1010 if (QDir::isRelativePath(dir))
691 t << "\t\t\t\t" << "DYLIB_CURRENT_VERSION = \"" << project->first("VERSION") << "\";" << "\n"; 1011 dir.prepend(QDir::currentDirPath() + Option::dir_sep);
1012 t << "\t\t\t\t" << "INSTALL_DIR = \"" << dir << "\";" << "\n";
1013 }
1014 if ( project->first("TEMPLATE") == "lib") {
1015 t << "\t\t\t\t" << "INSTALL_PATH = \"" << "\";" << "\n";
1016 }
1017 if(!project->isEmpty("VERSION") && project->first("VERSION") != "0.0.0") {
1018 t << "\t\t\t\t" << "DYLIB_CURRENT_VERSION = \"" << project->first("VER_MAJ") << "."
1019 << project->first("VER_MIN") << "." << project->first("VER_PAT") << "\";" << "\n";
1020 if(project->isEmpty("COMPAT_VERSION"))
1021 t << "\t\t\t\t" << "DYLIB_COMPATIBILITY_VERSION = \"" << project->first("VER_MAJ") << "."
1022 << project->first("VER_MIN") << "\";" << "\n";
1023 }
1024 if(!project->isEmpty("COMPAT_VERSION"))
1025 t << "\t\t\t\t" << "DYLIB_COMPATIBILITY_VERSION = \"" << project->first("COMPAT_VERSION") << "\";" << "\n";
1026
1027 if(ideType() == MAC_XCODE) {
692 if(!project->isEmpty("OBJECTS_DIR")) 1028 if(!project->isEmpty("OBJECTS_DIR"))
693 t << "\t\t\t\t" << "OBJECT_FILE_DIR = \"" << project->first("OBJECTS_DIR") << "\";" << "\n"; 1029 t << "\t\t\t\t" << "OBJROOT = \"" << project->first("OBJECTS_DIR") << "\";" << "\n";
1030 }
1031#if 0
1032 if(!project->isEmpty("DESTDIR"))
1033 t << "\t\t\t\t" << "SYMROOT = \"" << project->first("DESTDIR") << "\";" << "\n";
1034 else
1035 t << "\t\t\t\t" << "SYMROOT = \"" << QDir::currentDirPath() << "\";" << "\n";
1036#endif
694 if(project->first("TEMPLATE") == "app") { 1037 if(project->first("TEMPLATE") == "app") {
695 if(project->isActiveConfig("resource_fork") && !project->isActiveConfig("console")) 1038 if(ideType() == MAC_PBUILDER && !project->isActiveConfig("console"))
696 t << "\t\t\t\t" << "WRAPPER_EXTENSION = app;" << "\n"; 1039 t << "\t\t\t\t" << "WRAPPER_EXTENSION = app;" << "\n";
697 t << "\t\t\t\t" << "PRODUCT_NAME = " << project->first("QMAKE_ORIG_TARGET") << ";" << "\n"; 1040 t << "\t\t\t\t" << "PRODUCT_NAME = " << project->first("QMAKE_ORIG_TARGET") << ";" << "\n";
698 } else { 1041 } else {
699 QString lib = project->first("QMAKE_ORIG_TARGET");
700 if(!project->isActiveConfig("plugin") && project->isActiveConfig("staticlib")) { 1042 if(!project->isActiveConfig("plugin") && project->isActiveConfig("staticlib")) {
701 t << "\t\t\t\t" << "LIBRARY_STYLE = STATIC;" << "\n"; 1043 t << "\t\t\t\t" << "LIBRARY_STYLE = STATIC;" << "\n";
702 lib = project->first("TARGET");
703 } else { 1044 } else {
704 t << "\t\t\t\t" << "LIBRARY_STYLE = DYNAMIC;" << "\n"; 1045 t << "\t\t\t\t" << "LIBRARY_STYLE = DYNAMIC;" << "\n";
705 if(!project->isActiveConfig("frameworklib")) {
706 if(project->isActiveConfig("plugin"))
707 lib = project->first("TARGET");
708 else
709 lib = project->first("TARGET_");
710 } 1046 }
711 } 1047 QString lib = project->first("QMAKE_ORIG_TARGET");
712 int slsh = lib.findRev(Option::dir_sep); 1048 if (!project->isActiveConfig("frameworklib") && !project->isActiveConfig("staticlib"))
713 if(slsh != -1) 1049 lib.prepend("lib");
714 lib = lib.right(lib.length() - slsh - 1);
715 t << "\t\t\t\t" << "PRODUCT_NAME = " << lib << ";" << "\n"; 1050 t << "\t\t\t\t" << "PRODUCT_NAME = " << lib << ";" << "\n";
716 } 1051 }
717 tmp = project->variables()["QMAKE_PBX_VARS"]; 1052 tmp = project->variables()["QMAKE_PBX_VARS"];
718 for(QStringList::Iterator it = tmp.begin(); it != tmp.end(); ++it) 1053 for(QStringList::Iterator it = tmp.begin(); it != tmp.end(); ++it) {
719 t << "\t\t\t\t" << (*it) << " = \"" << getenv((*it)) << "\";" << "\n"; 1054 QString var = (*it), val = getenv(var);
1055 if(!val && var == "TB")
1056 val = "/usr/bin/";
1057 t << "\t\t\t\t" << var << " = \"" << val << "\";" << "\n";
1058 }
720 t << "\t\t\t" << "};" << "\n" 1059 t << "\t\t\t" << "};" << "\n"
721 << "\t\t\t" << "conditionalBuildSettings = {" << "\n" 1060 << "\t\t\t" << "conditionalBuildSettings = {" << "\n"
722 << "\t\t\t" << "};" << "\n" 1061 << "\t\t\t" << "};" << "\n"
723 << "\t\t\t" << "dependencies = (" << "\n" 1062 << "\t\t\t" << "dependencies = (" << "\n"
724 << varGlue("QMAKE_PBX_TARGETDEPENDS", "\t\t\t\t", ",\n\t\t\t\t", "\n") 1063 << varGlue("QMAKE_PBX_TARGET_DEPENDS", "\t\t\t\t", ",\n\t\t\t\t", "\n")
725 << "\t\t\t" << ");" << "\n" 1064 << "\t\t\t" << ");" << "\n"
726 << "\t\t\t" << "productReference = " << keyFor("QMAKE_PBX_REFERENCE") << ";" << "\n" 1065 << "\t\t\t" << "productReference = " << keyFor(pbx_dir + "QMAKE_PBX_REFERENCE") << ";" << "\n"
727 << "\t\t\t" << "shouldUseHeadermap = 1;" << "\n"; 1066 << "\t\t\t" << "shouldUseHeadermap = 1;" << "\n";
1067 if(ideType() == MAC_XCODE)
1068 t << "\t\t\t" << "isa = PBXNativeTarget;" << "\n";
728 if(project->first("TEMPLATE") == "app") { 1069 if(project->first("TEMPLATE") == "app") {
729 if(project->isActiveConfig("resource_fork") && !project->isActiveConfig("console")) { 1070 if(project->isActiveConfig("console")) {
730 t << "\t\t\t" << "isa = PBXApplicationTarget;" << "\n" 1071 if(ideType() == MAC_XCODE)
731 << "\t\t\t" << "productSettingsXML = " << "\"" << "<?xml version=" 1072 t << "\t\t\t" << "productType = \"com.apple.product-type.tool\";" << "\n";
1073 else
1074 t << "\t\t\t" << "isa = PBXToolTarget;" << "\n";
1075 } else {
1076 if(ideType() == MAC_XCODE)
1077 t << "\t\t\t" << "productType = \"com.apple.product-type.application\";" << "\n";
1078 else
1079 t << "\t\t\t" << "isa = PBXApplicationReference;" << "\n";
1080 t << "\t\t\t" << "productSettingsXML = \"";
1081 bool read_plist = false;
1082 if(QFile::exists("Info.plist")) {
1083 QFile plist("Info.plist");
1084 if(plist.open(IO_ReadOnly)) {
1085 read_plist = true;
1086 QTextStream stream(&plist);
1087 while(!stream.eof())
1088 t << stream.readLine().replace('"', "\\\"") << endl;
1089 }
1090 }
1091 if(!read_plist) {
1092 t << "<?xml version="
732 << "\\\"1.0\\\" encoding=" << "\\\"UTF-8\\\"" << "?>" << "\n" 1093 << "\\\"1.0\\\" encoding=" << "\\\"UTF-8\\\"" << "?>" << "\n"
733 << "\t\t\t\t" << "<!DOCTYPE plist SYSTEM \\\"file://localhost/System/" 1094 << "\t\t\t\t" << "<!DOCTYPE plist SYSTEM \\\"file://localhost/System/"
734 << "Library/DTDs/PropertyList.dtd\\\">" << "\n" 1095 << "Library/DTDs/PropertyList.dtd\\\">" << "\n"
@@ -745,44 +1106,65 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
745 << "\t\t\t\t\t" << "<key>CFBundlePackageType</key>" << "\n" 1106 << "\t\t\t\t\t" << "<key>CFBundlePackageType</key>" << "\n"
746 << "\t\t\t\t\t" << "<string>APPL</string>" << "\n" 1107 << "\t\t\t\t\t" << "<string>APPL</string>" << "\n"
747 << "\t\t\t\t\t" << "<key>CFBundleSignature</key>" << "\n" 1108 << "\t\t\t\t\t" << "<key>CFBundleSignature</key>" << "\n"
748 << "\t\t\t\t\t" << "<string>????</string>" << "\n" 1109 //Although the output below looks strange it is to avoid the trigraph ??<
1110 << "\t\t\t\t\t" << "<string>????" << "</string>" << "\n"
749 << "\t\t\t\t\t" << "<key>CFBundleVersion</key>" << "\n" 1111 << "\t\t\t\t\t" << "<key>CFBundleVersion</key>" << "\n"
750 << "\t\t\t\t\t" << "<string>0.1</string>" << "\n" 1112 << "\t\t\t\t\t" << "<string>0.1</string>" << "\n"
751 << "\t\t\t\t\t" << "<key>CSResourcesFileMapped</key>" << "\n" 1113 << "\t\t\t\t\t" << "<key>CSResourcesFileMapped</key>" << "\n"
752 << "\t\t\t\t\t" << "<true/>" << "\n" 1114 << "\t\t\t\t\t" << "<true/>" << "\n"
753 << "\t\t\t\t" << "</dict>" << "\n" 1115 << "\t\t\t\t" << "</dict>" << "\n"
754 << "\t\t\t\t" << "</plist>" << "\";" << "\n"; 1116 << "\t\t\t\t" << "</plist>";
755 } else {
756 t << "\t\t\t" << "isa = PBXToolTarget;" << "\n";
757 } 1117 }
1118 }
1119 t << "\";" << "\n";
758 t << "\t\t\t" << "name = \"" << project->first("QMAKE_ORIG_TARGET") << "\";" << "\n" 1120 t << "\t\t\t" << "name = \"" << project->first("QMAKE_ORIG_TARGET") << "\";" << "\n"
759 << "\t\t\t" << "productName = " << project->first("QMAKE_ORIG_TARGET") << ";" << "\n"; 1121 << "\t\t\t" << "productName = " << project->first("QMAKE_ORIG_TARGET") << ";" << "\n";
760 } else { 1122 } else {
761 QString lib = project->first("QMAKE_ORIG_TARGET"); 1123 QString lib = project->first("QMAKE_ORIG_TARGET");
762 if(!project->isActiveConfig("frameworklib")) 1124 if(!project->isActiveConfig("frameworklib") && !project->isActiveConfig("staticlib"))
763 lib.prepend("lib"); 1125 lib.prepend("lib");
764 t << "\t\t\t" << "isa = PBXLibraryTarget;" << "\n" 1126 t << "\t\t\t" << "name = \"" << lib << "\";" << "\n"
765 << "\t\t\t" << "name = \"" << lib << "\";" << "\n"
766 << "\t\t\t" << "productName = " << lib << ";" << "\n"; 1127 << "\t\t\t" << "productName = " << lib << ";" << "\n";
1128 if(ideType() == MAC_XCODE) {
1129 if(project->isActiveConfig("staticlib"))
1130 t << "\t\t\t" << "productType = \"com.apple.product-type.library.static\";" << "\n";
1131 else
1132 t << "\t\t\t" << "productType = \"com.apple.product-type.library.dynamic\";" << "\n";
1133 } else {
1134 t << "\t\t\t" << "isa = PBXLibraryTarget;" << "\n";
767 } 1135 }
1136 }
1137 t << "\t\t\t" << "startupPath = \"<<ProjectDirectory>>\";" << "\n";
768 if(!project->isEmpty("DESTDIR")) 1138 if(!project->isEmpty("DESTDIR"))
769 t << "\t\t\t" << "productInstallPath = \"" << project->first("DESTDIR") << "\";" << "\n"; 1139 t << "\t\t\t" << "productInstallPath = \"" << project->first("DESTDIR") << "\";" << "\n";
770 t << "\t\t" << "};" << "\n"; 1140 t << "\t\t" << "};" << "\n";
771 //DEBUG/RELEASE 1141 //DEBUG/RELEASE
772 for(i = 0; i < 2; i++) { 1142 QString active_buildstyle;
773 bool as_release = !i; 1143#if 0
774 if(project->isActiveConfig("debug")) 1144 for(int as_release = 0; as_release < 2; as_release++)
775 as_release = i; 1145#else
776 QString key = "QMAKE_PBX_" + QString(as_release ? "RELEASE" : "DEBUG"); 1146 bool as_release = !project->isActiveConfig("debug");
777 key = keyFor(key); 1147#endif
1148 {
1149 QString key = keyFor("QMAKE_PBX_" + QString(as_release ? "RELEASE" : "DEBUG"));
1150 if(project->isActiveConfig("debug") != as_release)
1151 active_buildstyle = key;
778 project->variables()["QMAKE_PBX_BUILDSTYLES"].append(key); 1152 project->variables()["QMAKE_PBX_BUILDSTYLES"].append(key);
779 t << "\t\t" << key << " = {" << "\n" 1153 t << "\t\t" << key << " = {" << "\n"
780 << "\t\t\t" << "buildRules = (" << "\n" 1154 << "\t\t\t" << "buildRules = (" << "\n"
781 << "\t\t\t" << ");" << "\n" 1155 << "\t\t\t" << ");" << "\n"
782 << "\t\t\t" << "buildSettings = {" << "\n" 1156 << "\t\t\t" << "buildSettings = {" << "\n"
783 << "\t\t\t\t" << "COPY_PHASE_STRIP = " << (as_release ? "YES" : "NO") << ";" << "\n"; 1157 << "\t\t\t\t" << "COPY_PHASE_STRIP = " << (as_release ? "YES" : "NO") << ";" << "\n";
784 if(as_release) 1158 if(as_release) {
785 t << "\t\t\t\t" << "DEBUGGING_SYMBOLS = NO;" << "\n"; 1159 t << "\t\t\t\t" << "DEBUGGING_SYMBOLS = NO;" << "\n";
1160 } else {
1161 t << "\t\t\t\t" << "GCC_ENABLE_FIX_AND_CONTINUE = "
1162 << (project->isActiveConfig("no_fix_and_continue") ? "NO" : "YES") << ";" << "\n"
1163 << "\t\t\t\t" << "GCC_GENERATE_DEBUGGING_SYMBOLS = YES;" << "\n"
1164 << "\t\t\t\t" << "GCC_OPTIMIZATION_LEVEL = 0;" << "\n"
1165 << "\t\t\t\t" << "ZERO_LINK ="
1166 << (project->isActiveConfig("no_zero_link") ? "NO" : "YES") << ";" << "\n";
1167 }
786 t << "\t\t\t" << "};" << "\n" 1168 t << "\t\t\t" << "};" << "\n"
787 << "\t\t\t" << "isa = PBXBuildStyle;" << "\n" 1169 << "\t\t\t" << "isa = PBXBuildStyle;" << "\n"
788 << "\t\t\t" << "name = " << (as_release ? "Deployment" : "Development") << ";" << "\n" 1170 << "\t\t\t" << "name = " << (as_release ? "Deployment" : "Development") << ";" << "\n"
@@ -793,10 +1175,12 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
793 << "\t\t\t" << "buildStyles = (" << "\n" 1175 << "\t\t\t" << "buildStyles = (" << "\n"
794 << varGlue("QMAKE_PBX_BUILDSTYLES", "\t\t\t\t", ",\n\t\t\t\t", "\n") 1176 << varGlue("QMAKE_PBX_BUILDSTYLES", "\t\t\t\t", ",\n\t\t\t\t", "\n")
795 << "\t\t\t" << ");" << "\n" 1177 << "\t\t\t" << ");" << "\n"
1178 << "\t\t\t" << "hasScannedForEncodings = 1;" << "\n"
796 << "\t\t\t" << "isa = PBXProject;" << "\n" 1179 << "\t\t\t" << "isa = PBXProject;" << "\n"
797 << "\t\t\t" << "mainGroup = " << keyFor("QMAKE_PBX_ROOT_GROUP") << ";" << "\n" 1180 << "\t\t\t" << "mainGroup = " << keyFor("QMAKE_PBX_ROOT_GROUP") << ";" << "\n"
1181 << "\t\t\t" << "projectDirPath = \"\";" << "\n"
798 << "\t\t\t" << "targets = (" << "\n" 1182 << "\t\t\t" << "targets = (" << "\n"
799 << "\t\t\t\t" << keyFor("QMAKE_PBX_TARGET") << "\n" 1183 << varGlue("QMAKE_PBX_TARGETS", "\t\t\t\t", ",\n\t\t\t\t", "\n")
800 << "\t\t\t" << ");" << "\n" 1184 << "\t\t\t" << ");" << "\n"
801 << "\t\t" << "};" << "\n"; 1185 << "\t\t" << "};" << "\n";
802 1186
@@ -805,6 +1189,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
805 << "\t" << "rootObject = " << keyFor("QMAKE_PBX_ROOT") << ";" << "\n" 1189 << "\t" << "rootObject = " << keyFor("QMAKE_PBX_ROOT") << ";" << "\n"
806 << "}" << endl; 1190 << "}" << endl;
807 1191
1192 if(project->isActiveConfig("generate_pbxbuild_makefile")) {
808 QString mkwrap = fileFixify(pbx_dir + Option::dir_sep + ".." + Option::dir_sep + project->first("MAKEFILE"), 1193 QString mkwrap = fileFixify(pbx_dir + Option::dir_sep + ".." + Option::dir_sep + project->first("MAKEFILE"),
809 QDir::currentDirPath()); 1194 QDir::currentDirPath());
810 QFile mkwrapf(mkwrap); 1195 QFile mkwrapf(mkwrap);
@@ -815,22 +1200,31 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
815 const char *cleans = "uiclean mocclean preprocess_clean "; 1200 const char *cleans = "uiclean mocclean preprocess_clean ";
816 mkwrapt << "#This is a makefile wrapper for PROJECT BUILDER\n" 1201 mkwrapt << "#This is a makefile wrapper for PROJECT BUILDER\n"
817 << "all:" << "\n\t" 1202 << "all:" << "\n\t"
818 << "cd " << (project->first("QMAKE_ORIG_TARGET") + ".pbproj/ && pbxbuild") << "\n" 1203 << "cd " << project->first("QMAKE_ORIG_TARGET") << projectSuffix() << "/ && " << pbxbuild() << "\n"
819 << "install: all" << "\n\t" 1204 << "install: all" << "\n\t"
820 << "cd " << (project->first("QMAKE_ORIG_TARGET") + ".pbproj/ && pbxbuild install") << "\n" 1205 << "cd " << project->first("QMAKE_ORIG_TARGET") << projectSuffix() << "/ && " << pbxbuild() << " install\n"
821 << "distclean clean: preprocess_clean" << "\n\t" 1206 << "distclean clean: preprocess_clean" << "\n\t"
822 << "cd " << (project->first("QMAKE_ORIG_TARGET") + ".pbproj/ && pbxbuild clean") << "\n" 1207 << "cd " << project->first("QMAKE_ORIG_TARGET") << projectSuffix() << "/ && " << pbxbuild() << " clean" << "\n"
823 << (!did_preprocess ? cleans : "") << ":" << "\n"; 1208 << (!did_preprocess ? cleans : "") << ":" << "\n";
824 if(did_preprocess) 1209 if(did_preprocess)
825 mkwrapt << cleans << ":" << "\n\t" 1210 mkwrapt << cleans << ":" << "\n\t"
826 << "make -f " 1211 << "make -f "
827 << pbx_dir << Option::dir_sep << "qt_preprocess.mak $@" << endl; 1212 << pbx_dir << Option::dir_sep << "qt_preprocess.mak $@" << endl;
828 } 1213 }
1214 }
829 return TRUE; 1215 return TRUE;
830} 1216}
831 1217
832QString 1218QString
833ProjectBuilderMakefileGenerator::fixEnvs(QString file) 1219ProjectBuilderMakefileGenerator::fixQuotes(const QString &val)
1220{
1221 QString ret(val);
1222 ret = ret.replace(QRegExp("('|\")"), "\\\\1");
1223 return ret;
1224}
1225
1226QString
1227ProjectBuilderMakefileGenerator::fixEnvs(const QString &file)
834{ 1228{
835 QRegExp reg_var("\\$\\((.*)\\)"); 1229 QRegExp reg_var("\\$\\((.*)\\)");
836 for(int rep = 0; (rep = reg_var.search(file, rep)) != -1; ) { 1230 for(int rep = 0; (rep = reg_var.search(file, rep)) != -1; ) {
@@ -842,7 +1236,7 @@ ProjectBuilderMakefileGenerator::fixEnvs(QString file)
842} 1236}
843 1237
844QString 1238QString
845ProjectBuilderMakefileGenerator::fixEnvsList(QString where) 1239ProjectBuilderMakefileGenerator::fixEnvsList(const QString &where)
846{ 1240{
847 QString ret; 1241 QString ret;
848 const QStringList &l = project->variables()[where]; 1242 const QStringList &l = project->variables()[where];
@@ -856,32 +1250,15 @@ ProjectBuilderMakefileGenerator::fixEnvsList(QString where)
856} 1250}
857 1251
858QString 1252QString
859ProjectBuilderMakefileGenerator::keyFor(QString block) 1253ProjectBuilderMakefileGenerator::keyFor(const QString &block)
860{ 1254{
861#if 0 //This make this code much easier to debug.. 1255#if 1 //This make this code much easier to debug..
1256 if(project->isActiveConfig("no_pb_munge_key"))
862 return block; 1257 return block;
863#endif 1258#endif
864
865 QString ret; 1259 QString ret;
866 if(!keys.contains(block)) { 1260 if(!keys.contains(block)) {
867#if 0 1261 ret = qtMD5(block.utf8()).left(24).upper();
868 static unsigned int r = 0;
869 ret.sprintf("%024x", ++r);
870#else //not really necesary, but makes it look more interesting..
871 static struct { unsigned int a1, a2, a3; } r = { 0, 0, 0 };
872 if(!r.a1 && !r.a2 && !r.a3) {
873 r.a1 = rand();
874 r.a2 = rand();
875 r.a3 = rand();
876 }
877 switch(rand() % 3) {
878 case 0: ++r.a1; break;
879 case 1: ++r.a2; break;
880 case 2: ++r.a3; break;
881 }
882 ret.sprintf("%08x%08x%08x", r.a1, r.a2, r.a3);
883#endif
884 ret = ret.upper();
885 keys.insert(block, ret); 1262 keys.insert(block, ret);
886 } else { 1263 } else {
887 ret = keys[block]; 1264 ret = keys[block];
@@ -892,16 +1269,17 @@ ProjectBuilderMakefileGenerator::keyFor(QString block)
892bool 1269bool
893ProjectBuilderMakefileGenerator::openOutput(QFile &file) const 1270ProjectBuilderMakefileGenerator::openOutput(QFile &file) const
894{ 1271{
895 if(project->first("TEMPLATE") != "subdirs") { 1272 if(QDir::isRelativePath(file.name()))
1273 file.setName(Option::output_dir + file.name()); //pwd when qmake was run
896 QFileInfo fi(file); 1274 QFileInfo fi(file);
897 if(fi.extension() != "pbxproj" || file.name().isEmpty()) { 1275 if(fi.extension() != "pbxproj" || file.name().isEmpty()) {
898 QString output = file.name(); 1276 QString output = file.name();
899 if(fi.isDir()) 1277 if(fi.isDir())
900 output += QDir::separator(); 1278 output += QDir::separator();
901 if(fi.extension() != "pbproj") { 1279 if(!output.endsWith(projectSuffix())) {
902 if(file.name().isEmpty() || fi.isDir()) 1280 if(file.name().isEmpty() || fi.isDir())
903 output += project->first("TARGET"); 1281 output += project->first("TARGET");
904 output += QString(".pbproj") + QDir::separator(); 1282 output += projectSuffix() + QDir::separator();
905 } else if(output[(int)output.length() - 1] != QDir::separator()) { 1283 } else if(output[(int)output.length() - 1] != QDir::separator()) {
906 output += QDir::separator(); 1284 output += QDir::separator();
907 } 1285 }
@@ -913,8 +1291,6 @@ ProjectBuilderMakefileGenerator::openOutput(QFile &file) const
913 Option::output_dir = pbx_dir.section(Option::dir_sep, 0, -2); 1291 Option::output_dir = pbx_dir.section(Option::dir_sep, 0, -2);
914 return ret; 1292 return ret;
915 } 1293 }
916 return UnixMakefileGenerator::openOutput(file);
917}
918 1294
919/* This function is such a hack it is almost pointless, but it 1295/* This function is such a hack it is almost pointless, but it
920 eliminates the warning message from ProjectBuilder that the project 1296 eliminates the warning message from ProjectBuilder that the project
@@ -928,10 +1304,14 @@ ProjectBuilderMakefileGenerator::pbuilderVersion() const
928 QString ret; 1304 QString ret;
929 if(project->isEmpty("QMAKE_PBUILDER_VERSION")) { 1305 if(project->isEmpty("QMAKE_PBUILDER_VERSION")) {
930 QString version, version_plist = project->first("QMAKE_PBUILDER_VERSION_PLIST"); 1306 QString version, version_plist = project->first("QMAKE_PBUILDER_VERSION_PLIST");
931 if(version_plist.isEmpty()) 1307 if(version_plist.isEmpty()) {
932 version_plist = "/Developer/Applications/Project Builder.app/Contents/version.plist"; 1308 if(ideType() == MAC_XCODE && QFile::exists("/Developer/Applications/Xcode.app/Contents/version.plist"))
1309 version_plist = "/Developer/Applications/Xcode.app/Contents/version.plist";
933 else 1310 else
1311 version_plist = "/Developer/Applications/Project Builder.app/Contents/version.plist";
1312 } else {
934 version_plist = version_plist.replace(QRegExp("\""), ""); 1313 version_plist = version_plist.replace(QRegExp("\""), "");
1314 }
935 QFile version_file(version_plist); 1315 QFile version_file(version_plist);
936 if(version_file.open(IO_ReadOnly)) { 1316 if(version_file.open(IO_ReadOnly)) {
937 debug_msg(1, "pbuilder: version.plist: Reading file: %s", version_plist.latin1()); 1317 debug_msg(1, "pbuilder: version.plist: Reading file: %s", version_plist.latin1());
@@ -954,11 +1334,15 @@ ProjectBuilderMakefileGenerator::pbuilderVersion() const
954 } 1334 }
955 } 1335 }
956 version_file.close(); 1336 version_file.close();
957 } else debug_msg(1, "pbuilder: version.plist: Failure to open %s", version_plist.latin1()); 1337 } else { debug_msg(1, "pbuilder: version.plist: Failure to open %s", version_plist.latin1()); }
958 if(version.startsWith("2.0")) 1338 if(version_plist.contains("Xcode")) {
1339 ret = "39";
1340 } else {
1341 if(version.startsWith("2."))
959 ret = "38"; 1342 ret = "38";
960 else if(version == "1.1") 1343 else if(version == "1.1")
961 ret = "34"; 1344 ret = "34";
1345 }
962 } else { 1346 } else {
963 ret = project->first("QMAKE_PBUILDER_VERSION"); 1347 ret = project->first("QMAKE_PBUILDER_VERSION");
964 } 1348 }
@@ -974,10 +1358,39 @@ ProjectBuilderMakefileGenerator::pbuilderVersion() const
974 return 34; //my fallback 1358 return 34; //my fallback
975} 1359}
976 1360
977QString 1361int
978ProjectBuilderMakefileGenerator::reftypeForFile(QString where) 1362ProjectBuilderMakefileGenerator::reftypeForFile(const QString &where)
979{ 1363{
1364 int ret = 0; //absolute is the default..
980 if(QDir::isRelativePath(where)) 1365 if(QDir::isRelativePath(where))
981 return "4"; //relative 1366 ret = 4; //relative
982 return "0"; //absolute 1367 return ret;
1368}
1369
1370ProjectBuilderMakefileGenerator::IDE_TYPE
1371ProjectBuilderMakefileGenerator::ideType() const
1372{
1373 if(!project->isActiveConfig("no_pbx_xcode") &&
1374 (QFile::exists("/Developer/Applications/Xcode.app") || project->isActiveConfig("pbx_xcode")))
1375 return ProjectBuilderMakefileGenerator::MAC_XCODE;
1376 return ProjectBuilderMakefileGenerator::MAC_PBUILDER;
983} 1377}
1378
1379QString
1380ProjectBuilderMakefileGenerator::projectSuffix() const
1381{
1382 if(ideType() == MAC_XCODE)
1383 return ".xcode";
1384 return ".pbproj";
1385}
1386
1387QString
1388ProjectBuilderMakefileGenerator::pbxbuild()
1389{
1390 if(QFile::exists("/usr/bin/pbbuild"))
1391 return "pbbuild";
1392 if(QFile::exists("/usr/bin/xcodebuild"))
1393 return "xcodebuild";
1394 return (ideType() == MAC_XCODE ? "xcodebuild" : "pbxbuild");
1395}
1396
diff --git a/qmake/generators/mac/pbuilder_pbx.h b/qmake/generators/mac/pbuilder_pbx.h
index ec2e1be..4ffb9a8 100644
--- a/qmake/generators/mac/pbuilder_pbx.h
+++ b/qmake/generators/mac/pbuilder_pbx.h
@@ -1,13 +1,11 @@
1/**************************************************************************** 1/****************************************************************************
2** $Id$
3** 2**
4** Definition of ________ class.
5** 3**
6** Created : 970521 4** Definition of ProjectBuilderMakefileGenerator class.
7** 5**
8** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. 6** Copyright (C) 1992-2003 Trolltech AS. All rights reserved.
9** 7**
10** This file is part of the network module of the Qt GUI Toolkit. 8** This file is part of qmake.
11** 9**
12** This file may be distributed under the terms of the Q Public License 10** This file may be distributed under the terms of the Q Public License
13** as defined by Trolltech AS of Norway and appearing in the file 11** as defined by Trolltech AS of Norway and appearing in the file
@@ -34,8 +32,9 @@
34** not clear to you. 32** not clear to you.
35** 33**
36**********************************************************************/ 34**********************************************************************/
37#ifndef __PBUILDERMAKE_H__ 35
38#define __PBUILDERMAKE_H__ 36#ifndef __PBUILDER_PBX_H__
37#define __PBUILDER_PBX_H__
39 38
40#include "unixmake.h" 39#include "unixmake.h"
41 40
@@ -43,14 +42,21 @@ class ProjectBuilderMakefileGenerator : public UnixMakefileGenerator
43{ 42{
44 QString pbx_dir; 43 QString pbx_dir;
45 int pbuilderVersion() const; 44 int pbuilderVersion() const;
45 bool writeSubdirs(QTextStream &, bool);
46 bool writeMakeParts(QTextStream &); 46 bool writeMakeParts(QTextStream &);
47 bool writeMakefile(QTextStream &); 47 bool writeMakefile(QTextStream &);
48 48
49 QString pbxbuild();
49 QMap<QString, QString> keys; 50 QMap<QString, QString> keys;
50 QString keyFor(QString file); 51 QString keyFor(const QString &file);
51 QString fixEnvs(QString file); 52 QString fixQuotes(const QString &val);
52 QString fixEnvsList(QString where); 53 QString fixEnvs(const QString &file);
53 QString reftypeForFile(QString file); 54 QString fixEnvsList(const QString &where);
55 int reftypeForFile(const QString &where);
56 QString projectSuffix() const;
57
58 enum IDE_TYPE { MAC_XCODE, MAC_PBUILDER };
59 IDE_TYPE ideType() const;
54 60
55public: 61public:
56 ProjectBuilderMakefileGenerator(QMakeProject *p); 62 ProjectBuilderMakefileGenerator(QMakeProject *p);
@@ -58,6 +64,7 @@ public:
58 64
59 virtual bool openOutput(QFile &) const; 65 virtual bool openOutput(QFile &) const;
60protected: 66protected:
67 bool doPrecompiledHeaders() const { return FALSE; }
61 virtual bool doDepends() const { return FALSE; } //never necesary 68 virtual bool doDepends() const { return FALSE; } //never necesary
62}; 69};
63 70
@@ -65,4 +72,4 @@ inline ProjectBuilderMakefileGenerator::~ProjectBuilderMakefileGenerator()
65{ } 72{ }
66 73
67 74
68#endif /* __PBUILDERMAKE_H__ */ 75#endif /* __PBUILDER_PBX_H__ */
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index c12375d..5ce387f 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -1,13 +1,11 @@
1/**************************************************************************** 1/****************************************************************************
2** $Id$
3** 2**
4** Definition of ________ class.
5** 3**
6** Created : 970521 4** Implementation of MakefileGenerator class.
7** 5**
8** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. 6** Copyright (C) 1992-2003 Trolltech AS. All rights reserved.
9** 7**
10** This file is part of the network module of the Qt GUI Toolkit. 8** This file is part of qmake.
11** 9**
12** This file may be distributed under the terms of the Q Public License 10** This file may be distributed under the terms of the Q Public License
13** as defined by Trolltech AS of Norway and appearing in the file 11** as defined by Trolltech AS of Norway and appearing in the file
@@ -37,6 +35,7 @@
37 35
38#include "makefile.h" 36#include "makefile.h"
39#include "option.h" 37#include "option.h"
38#include "meta.h"
40#include <qdir.h> 39#include <qdir.h>
41#include <qfile.h> 40#include <qfile.h>
42#include <qtextstream.h> 41#include <qtextstream.h>
@@ -58,8 +57,9 @@
58#ifndef S_ISDIR 57#ifndef S_ISDIR
59 #define S_ISDIR(m)(((m) & S_IFMT) == S_IFDIR) 58 #define S_ISDIR(m)(((m) & S_IFMT) == S_IFDIR)
60#endif 59#endif
60#define QMAKE_EOL(x) (x == '\r' || x == '\n')
61 61
62static QString mkdir_p_asstring(const QString &dir) 62QString mkdir_p_asstring(const QString &dir)
63{ 63{
64 QString ret = "@$(CHK_DIR_EXISTS) \"" + dir + "\" "; 64 QString ret = "@$(CHK_DIR_EXISTS) \"" + dir + "\" ";
65 if(Option::target_mode == Option::TARG_WIN_MODE) 65 if(Option::target_mode == Option::TARG_WIN_MODE)
@@ -74,7 +74,6 @@ static bool createDir(const QString& fullPath)
74{ 74{
75 if(QFile::exists(fullPath)) 75 if(QFile::exists(fullPath))
76 return FALSE; 76 return FALSE;
77
78 QDir dirTmp; 77 QDir dirTmp;
79 bool ret = TRUE; 78 bool ret = TRUE;
80 QString pathComponent, tmpPath; 79 QString pathComponent, tmpPath;
@@ -142,7 +141,7 @@ MakefileGenerator::generateMocList(const QString &fn_target)
142 x++; 141 x++;
143 if(total_size_read >= x) { 142 if(total_size_read >= x) {
144 if(*(big_buffer + x) == '/') { //c++ style comment 143 if(*(big_buffer + x) == '/') { //c++ style comment
145 for( ;x < total_size_read && *(big_buffer + x) != '\n'; x++); 144 for( ;x < total_size_read && !QMAKE_EOL(*(big_buffer + x)); x++);
146 line_count++; 145 line_count++;
147 } else if(*(big_buffer + x) == '*') { //c style comment 146 } else if(*(big_buffer + x) == '*') { //c style comment
148 for( ;x < total_size_read; x++) { 147 for( ;x < total_size_read; x++) {
@@ -160,7 +159,7 @@ MakefileGenerator::generateMocList(const QString &fn_target)
160 x += 2; 159 x += 2;
161 break; 160 break;
162 } 161 }
163 } else if(*(big_buffer + x) == '\n') { 162 } else if(QMAKE_EOL(*(big_buffer + x))) {
164 line_count++; 163 line_count++;
165 } 164 }
166 } 165 }
@@ -206,14 +205,14 @@ MakefileGenerator::generateMocList(const QString &fn_target)
206 break; 205 break;
207 } 206 }
208 if(cpp_ext) { 207 if(cpp_ext) {
209 mocFile += fn_target.mid(dir_pos+1, ext_pos - dir_pos-1) + Option::moc_ext; 208 mocFile += Option::cpp_moc_mod + fn_target.mid(dir_pos+1, ext_pos - dir_pos-1) + Option::cpp_moc_ext;
210 project->variables()["_SRCMOC"].append(mocFile); 209 project->variables()["_SRCMOC"].append(mocFile);
211 } else if(project->variables()["HEADERS"].findIndex(fn_target) != -1) { 210 } else if(project->variables()["HEADERS"].findIndex(fn_target) != -1) {
212 for(QStringList::Iterator hit = Option::h_ext.begin(); 211 for(QStringList::Iterator hit = Option::h_ext.begin();
213 hit != Option::h_ext.end(); ++hit) { 212 hit != Option::h_ext.end(); ++hit) {
214 if((fn_target.right(ext_len) == (*hit))) { 213 if((fn_target.right(ext_len) == (*hit))) {
215 mocFile += Option::moc_mod + fn_target.mid(dir_pos+1, ext_pos - dir_pos-1) + 214 mocFile += Option::h_moc_mod + fn_target.mid(dir_pos+1, ext_pos - dir_pos-1) +
216 Option::cpp_ext.first(); 215 Option::h_moc_ext;
217 logicWarn(mocFile, "SOURCES"); 216 logicWarn(mocFile, "SOURCES");
218 project->variables()["_HDRMOC"].append(mocFile); 217 project->variables()["_HDRMOC"].append(mocFile);
219 break; 218 break;
@@ -232,7 +231,7 @@ MakefileGenerator::generateMocList(const QString &fn_target)
232 231
233 while(x < total_size_read && SYMBOL_CHAR(*(big_buffer+x))) 232 while(x < total_size_read && SYMBOL_CHAR(*(big_buffer+x)))
234 x++; 233 x++;
235 if(*(big_buffer+x) == '\n') 234 if(QMAKE_EOL(*(big_buffer+x)))
236 line_count++; 235 line_count++;
237 } 236 }
238#undef OBJ_LEN 237#undef OBJ_LEN
@@ -243,9 +242,11 @@ MakefileGenerator::generateMocList(const QString &fn_target)
243bool 242bool
244MakefileGenerator::generateDependencies(QPtrList<MakefileDependDir> &dirs, const QString &f, bool recurse) 243MakefileGenerator::generateDependencies(QPtrList<MakefileDependDir> &dirs, const QString &f, bool recurse)
245{ 244{
246 QStringList &fndeps = findDependencies(f); 245 if(processedDependencies(f))
247 if(!fndeps.isEmpty())
248 return TRUE; 246 return TRUE;
247 setProcessedDependencies(f, TRUE);
248
249 QStringList &fndeps = findDependencies(f);
249 QString fn = fileFixify(f, QDir::currentDirPath(), Option::output_dir); 250 QString fn = fileFixify(f, QDir::currentDirPath(), Option::output_dir);
250 fn = Option::fixPathToLocalOS(fn, FALSE); 251 fn = Option::fixPathToLocalOS(fn, FALSE);
251 QString fix_env_fn = Option::fixPathToLocalOS(fn); 252 QString fix_env_fn = Option::fixPathToLocalOS(fn);
@@ -283,7 +284,7 @@ MakefileGenerator::generateDependencies(QPtrList<MakefileDependDir> &dirs, const
283 x++; 284 x++;
284 if(total_size_read >= x) { 285 if(total_size_read >= x) {
285 if(*(big_buffer + x) == '/') { //c++ style comment 286 if(*(big_buffer + x) == '/') { //c++ style comment
286 for( ; x < total_size_read && *(big_buffer + x) != '\n'; x++); 287 for( ; x < total_size_read && !QMAKE_EOL(*(big_buffer + x)); x++);
287 } else if(*(big_buffer + x) == '*') { //c style comment 288 } else if(*(big_buffer + x) == '*') { //c style comment
288 for( ; x < total_size_read; x++) { 289 for( ; x < total_size_read; x++) {
289 if(*(big_buffer + x) == '*') { 290 if(*(big_buffer + x) == '*') {
@@ -291,13 +292,16 @@ MakefileGenerator::generateDependencies(QPtrList<MakefileDependDir> &dirs, const
291 x += 2; 292 x += 2;
292 break; 293 break;
293 } 294 }
294 } else if(*(big_buffer + x) == '\n') { 295 } else if(QMAKE_EOL(*(big_buffer + x))) {
295 line_count++; 296 line_count++;
296 } 297 }
297 } 298 }
298 } 299 }
299 } 300 }
300 } 301 }
302 while(x < total_size_read && //Skip spaces
303 (*(big_buffer+x) == ' ' || *(big_buffer+x) == '\t'))
304 x++;
301 if(*(big_buffer + x) == '#') { 305 if(*(big_buffer + x) == '#') {
302 x++; 306 x++;
303 while(x < total_size_read && //Skip spaces after hash 307 while(x < total_size_read && //Skip spaces after hash
@@ -318,28 +322,31 @@ MakefileGenerator::generateDependencies(QPtrList<MakefileDependDir> &dirs, const
318 x++; 322 x++;
319 323
320 int inc_len; 324 int inc_len;
321 for(inc_len = 0; *(big_buffer + x + inc_len) != term; inc_len++); 325 for(inc_len = 0; *(big_buffer + x + inc_len) != term &&
326 !QMAKE_EOL(*(big_buffer + x + inc_len)); inc_len++);
322 *(big_buffer + x + inc_len) = '\0'; 327 *(big_buffer + x + inc_len) = '\0';
323 inc = big_buffer + x; 328 inc = big_buffer + x;
324 } else if(total_size_read >= x + 14 && !strncmp(big_buffer + x, "qmake_warning ", 14)) { 329 } else if(total_size_read >= x + 14 && !strncmp(big_buffer + x, "qmake_warning ", 14)) {
325 for(x+=14; //skip spaces after keyword 330 for(x+=14; //skip spaces after keyword
326 x < total_size_read && (*(big_buffer+x) == ' ' || *(big_buffer+x) == '\t'); 331 x < total_size_read && (*(big_buffer+x) == ' ' || *(big_buffer+x) == '\t');
327 x++); 332 x++);
328 char term = '\n'; 333 char term = 0;
329 if(*(big_buffer + x) == '"') 334 if(*(big_buffer + x) == '"')
330 term = '"'; 335 term = '"';
331 if(*(big_buffer + x) == '\'') 336 if(*(big_buffer + x) == '\'')
332 term = '\''; 337 term = '\'';
333 if(term != '\n') 338 if(term)
334 x++; 339 x++;
335 340
336 int msg_len; 341 int msg_len;
337 for(msg_len = 0; *(big_buffer + x + msg_len) != term; msg_len++); 342 for(msg_len = 0; (term && *(big_buffer + x + msg_len) != term) &&
343 !QMAKE_EOL(*(big_buffer + x + msg_len)); msg_len++);
344 const char saved_term = *(big_buffer + x + msg_len);
338 *(big_buffer + x + msg_len) = '\0'; 345 *(big_buffer + x + msg_len) = '\0';
339 QString msg = big_buffer + x; 346 QString msg = big_buffer + x;
340 debug_msg(0, "%s:%d qmake_warning -- %s", fix_env_fn.latin1(), 347 debug_msg(0, "%s:%d qmake_warning -- %s", fix_env_fn.latin1(),
341 line_count, msg.latin1()); 348 line_count, msg.latin1());
342 *(big_buffer + x + msg_len) = term; //put it back 349 *(big_buffer + x + msg_len) = saved_term; //put it back
343 } 350 }
344 } 351 }
345 } else if(ui_file) { 352 } else if(ui_file) {
@@ -351,11 +358,31 @@ MakefileGenerator::generateDependencies(QPtrList<MakefileDependDir> &dirs, const
351 x++; 358 x++;
352 if(total_size_read >= x + 12 && !strncmp(big_buffer + x, "includehint", 11) && 359 if(total_size_read >= x + 12 && !strncmp(big_buffer + x, "includehint", 11) &&
353 (*(big_buffer + x + 11) == ' ' || *(big_buffer + x + 11) == '>')) { 360 (*(big_buffer + x + 11) == ' ' || *(big_buffer + x + 11) == '>')) {
354 for(x += 12; *(big_buffer + x) != '>'; x++); 361 for(x += 11; *(big_buffer + x) != '>'; x++);
355 int inc_len = 0; 362 int inc_len = 0;
356 for(x += 1 ; *(big_buffer + x + inc_len) != '<'; inc_len++); 363 for(x += 1 ; *(big_buffer + x + inc_len) != '<'; inc_len++);
357 *(big_buffer + x + inc_len) = '\0'; 364 *(big_buffer + x + inc_len) = '\0';
358 inc = big_buffer + x; 365 inc = big_buffer + x;
366 } else if(total_size_read >= x + 13 && !strncmp(big_buffer + x, "customwidget", 12) &&
367 (*(big_buffer + x + 12) == ' ' || *(big_buffer + x + 12) == '>')) {
368 for(x += 13; *(big_buffer + x) != '>'; x++); //skip up to >
369 while(x < total_size_read) {
370 for(x++; *(big_buffer + x) != '<'; x++); //skip up to <
371 x++;
372 if(total_size_read >= x + 7 && !strncmp(big_buffer+x, "header", 6) &&
373 (*(big_buffer + x + 6) == ' ' || *(big_buffer + x + 6) == '>')) {
374 for(x += 7; *(big_buffer + x) != '>'; x++); //skip up to >
375 int inc_len = 0;
376 for(x += 1 ; *(big_buffer + x + inc_len) != '<'; inc_len++);
377 *(big_buffer + x + inc_len) = '\0';
378 inc = big_buffer + x;
379 break;
380 } else if(total_size_read >= x + 14 && !strncmp(big_buffer+x, "/customwidget", 13) &&
381 (*(big_buffer + x + 13) == ' ' || *(big_buffer + x + 13) == '>')) {
382 x += 14;
383 break;
384 }
385 }
359 } else if(total_size_read >= x + 8 && !strncmp(big_buffer + x, "include", 7) && 386 } else if(total_size_read >= x + 8 && !strncmp(big_buffer + x, "include", 7) &&
360 (*(big_buffer + x + 7) == ' ' || *(big_buffer + x + 7) == '>')) { 387 (*(big_buffer + x + 7) == ' ' || *(big_buffer + x + 7) == '>')) {
361 for(x += 8; *(big_buffer + x) != '>'; x++) { 388 for(x += 8; *(big_buffer + x) != '>'; x++) {
@@ -417,12 +444,15 @@ MakefileGenerator::generateDependencies(QPtrList<MakefileDependDir> &dirs, const
417 if(found) 444 if(found)
418 continue; 445 continue;
419 } 446 }
420
421 QString fqn; 447 QString fqn;
422 if(project->isEmpty("QMAKE_ABSOLUTE_SOURCE_PATH") && 448 if(project->isEmpty("QMAKE_ABSOLUTE_SOURCE_PATH") &&
423 !stat(fix_env_fndir + inc, &fst) && !S_ISDIR(fst.st_mode)) { 449 !stat(fix_env_fndir + inc, &fst) && !S_ISDIR(fst.st_mode)) {
424 fqn = fndir + inc; 450 fqn = fndir + inc;
425 goto handle_fqn; 451 goto handle_fqn;
452 } else if(project->isEmpty("QMAKE_ABSOLUTE_SOURCE_PATH") &&
453 !stat(inc, &fst) && !S_ISDIR(fst.st_mode)) {
454 fqn = inc;
455 goto handle_fqn;
426 } else { 456 } else {
427 if((Option::target_mode == Option::TARG_MAC9_MODE && inc.find(':')) || 457 if((Option::target_mode == Option::TARG_MAC9_MODE && inc.find(':')) ||
428 (Option::target_mode == Option::TARG_WIN_MODE && inc[1] != ':') || 458 (Option::target_mode == Option::TARG_WIN_MODE && inc[1] != ':') ||
@@ -446,6 +476,7 @@ MakefileGenerator::generateDependencies(QPtrList<MakefileDependDir> &dirs, const
446 //and see if they go away.. 476 //and see if they go away..
447 if(depHeuristics.contains(inc)) { 477 if(depHeuristics.contains(inc)) {
448 fqn = depHeuristics[inc]; 478 fqn = depHeuristics[inc];
479 from_source_dir = FALSE;
449 } else if(Option::mkfile::do_dep_heuristics) { //some heuristics.. 480 } else if(Option::mkfile::do_dep_heuristics) { //some heuristics..
450 //is it a file from a .ui? 481 //is it a file from a .ui?
451 QString inc_file = inc.section(Option::dir_sep, -1); 482 QString inc_file = inc.section(Option::dir_sep, -1);
@@ -468,7 +499,7 @@ MakefileGenerator::generateDependencies(QPtrList<MakefileDependDir> &dirs, const
468 fqn += inc_file; 499 fqn += inc_file;
469 from_source_dir = FALSE; //uics go in the output_dir (so don't fix them) 500 from_source_dir = FALSE; //uics go in the output_dir (so don't fix them)
470 fqn = fileFixify(fqn, QDir::currentDirPath(), Option::output_dir); 501 fqn = fileFixify(fqn, QDir::currentDirPath(), Option::output_dir);
471 goto handle_fqn; 502 goto cache_fqn;
472 } 503 }
473 } 504 }
474 } 505 }
@@ -488,7 +519,9 @@ MakefileGenerator::generateDependencies(QPtrList<MakefileDependDir> &dirs, const
488 d = project->first("QMAKE_ABSOLUTE_SOURCE_PATH"); 519 d = project->first("QMAKE_ABSOLUTE_SOURCE_PATH");
489 if(s == lhs) { 520 if(s == lhs) {
490 fqn = d + inc; 521 fqn = d + inc;
491 goto handle_fqn; 522 from_source_dir = FALSE; //uics go in the output_dir (so don't fix them)
523 fqn = fileFixify(fqn, QDir::currentDirPath(), Option::output_dir);
524 goto cache_fqn;
492 } 525 }
493 } 526 }
494 } 527 }
@@ -509,13 +542,16 @@ MakefileGenerator::generateDependencies(QPtrList<MakefileDependDir> &dirs, const
509 d = project->first("QMAKE_ABSOLUTE_SOURCE_PATH"); 542 d = project->first("QMAKE_ABSOLUTE_SOURCE_PATH");
510 if(s == lhs) { 543 if(s == lhs) {
511 fqn = d + inc; 544 fqn = d + inc;
512 goto handle_fqn; 545 from_source_dir = FALSE; //uics go in the output_dir (so don't fix them)
546 fqn = fileFixify(fqn, QDir::currentDirPath(), Option::output_dir);
547 goto cache_fqn;
513 } 548 }
514 } 549 }
515 } 550 }
516 } 551 }
517 if(mocAware() && //is it a moc file? 552 if(mocAware() && //is it a moc file?
518 (inc.endsWith(Option::cpp_ext.first()) || inc.endsWith(Option::moc_ext))) { 553 ( inc.endsWith(Option::cpp_ext.first()) || inc.endsWith(Option::cpp_moc_ext) )
554 || ( (Option::cpp_ext.first() != Option::h_moc_ext) && inc.endsWith(Option::h_moc_ext) )) {
519 QString mocs[] = { QString("_HDRMOC"), QString("_SRCMOC"), QString::null }; 555 QString mocs[] = { QString("_HDRMOC"), QString("_SRCMOC"), QString::null };
520 for(int moc = 0; !mocs[moc].isNull(); moc++) { 556 for(int moc = 0; !mocs[moc].isNull(); moc++) {
521 QStringList &l = project->variables()[mocs[moc]]; 557 QStringList &l = project->variables()[mocs[moc]];
@@ -527,7 +563,7 @@ MakefileGenerator::generateDependencies(QPtrList<MakefileDependDir> &dirs, const
527 //Since it is include, no need to link it in as well 563 //Since it is include, no need to link it in as well
528 project->variables()["_SRCMOC"].append((*it)); 564 project->variables()["_SRCMOC"].append((*it));
529 l.remove(it); 565 l.remove(it);
530 } else if(!findMocSource(fqn).endsWith(fn)) { 566 } else if(!findMocSource(fqn).endsWith(fileFixify(fn))) {
531 /* Not really a very good test, but this will at least avoid 567 /* Not really a very good test, but this will at least avoid
532 confusion if it really does happen (since tmake/qmake 568 confusion if it really does happen (since tmake/qmake
533 previously didn't even allow this the test is mostly accurate) */ 569 previously didn't even allow this the test is mostly accurate) */
@@ -536,11 +572,17 @@ MakefileGenerator::generateDependencies(QPtrList<MakefileDependDir> &dirs, const
536 inc.latin1(), fqn.latin1(), fix_env_fn.latin1()); 572 inc.latin1(), fqn.latin1(), fix_env_fn.latin1());
537 } 573 }
538 from_source_dir = FALSE; //mocs go in the output_dir (so don't fix them) 574 from_source_dir = FALSE; //mocs go in the output_dir (so don't fix them)
539 goto handle_fqn; 575 goto cache_fqn;
540 } 576 }
541 } 577 }
542 } 578 }
543 } 579 }
580 fqn = findDependency(inc); //all else fails..
581 cache_fqn:
582 if(from_source_dir) {
583 fqn = fileFixify(fqn);
584 from_source_dir = FALSE;
585 }
544 depHeuristics.insert(inc, fqn); 586 depHeuristics.insert(inc, fqn);
545 } 587 }
546 } 588 }
@@ -555,7 +597,7 @@ MakefileGenerator::generateDependencies(QPtrList<MakefileDependDir> &dirs, const
555 outdeps->append(fqn); 597 outdeps->append(fqn);
556 } 598 }
557 //read past new line now.. 599 //read past new line now..
558 for( ; x < total_size_read && (*(big_buffer + x) != '\n'); x++); 600 for( ; x < total_size_read && !QMAKE_EOL(*(big_buffer + x)); x++);
559 line_count++; 601 line_count++;
560 } 602 }
561 603
@@ -564,7 +606,7 @@ MakefileGenerator::generateDependencies(QPtrList<MakefileDependDir> &dirs, const
564 generateDependencies(dirs, (*fnit), recurse); 606 generateDependencies(dirs, (*fnit), recurse);
565 QStringList &deplist = findDependencies((*fnit)); 607 QStringList &deplist = findDependencies((*fnit));
566 for(QStringList::Iterator it = deplist.begin(); it != deplist.end(); ++it) 608 for(QStringList::Iterator it = deplist.begin(); it != deplist.end(); ++it)
567 if(fndeps.findIndex((*it)) == -1) 609 if(fndeps.findIndex((*it)) == -1 && (*it) != fn)
568 fndeps.append((*it)); 610 fndeps.append((*it));
569 } 611 }
570 } 612 }
@@ -606,10 +648,14 @@ MakefileGenerator::initOutPaths()
606 QString currentDir = QDir::currentDirPath(); 648 QString currentDir = QDir::currentDirPath();
607 QString dirs[] = { QString("OBJECTS_DIR"), QString("MOC_DIR"), QString("UI_HEADERS_DIR"), 649 QString dirs[] = { QString("OBJECTS_DIR"), QString("MOC_DIR"), QString("UI_HEADERS_DIR"),
608 QString("UI_SOURCES_DIR"), QString("UI_DIR"), QString("DESTDIR"), 650 QString("UI_SOURCES_DIR"), QString("UI_DIR"), QString("DESTDIR"),
609 QString("SUBLIBS_DIR"), QString::null }; 651 QString("SUBLIBS_DIR"), QString("DLLDESTDIR"), QString::null };
610 for(int x = 0; dirs[x] != QString::null; x++) { 652 for(int x = 0; dirs[x] != QString::null; x++) {
611 if ( !v[dirs[x]].isEmpty() ) { 653 if ( !v[dirs[x]].isEmpty() ) {
612 QString orig_path = v[dirs[x]].first(); 654 QString orig_path = v[dirs[x]].first();
655#ifdef Q_WS_WIN
656 // We don't want to add a separator for DLLDESTDIR on Windows
657 if (!(dirs[x] == "DLLDESTDIR"))
658#endif
613 { 659 {
614 QString &path = v[dirs[x]].first(); 660 QString &path = v[dirs[x]].first();
615 path = fileFixify(path, Option::output_dir, Option::output_dir); 661 path = fileFixify(path, Option::output_dir, Option::output_dir);
@@ -661,6 +707,11 @@ MakefileGenerator::initOutPaths()
661#endif 707#endif
662 } 708 }
663 } 709 }
710 if ( !v["DESTDIR"].isEmpty() ) {
711 QDir d(v["DESTDIR"].first());
712 if(Option::fixPathToLocalOS(d.absPath()) == Option::fixPathToLocalOS(Option::output_dir))
713 v.remove("DESTDIR");
714 }
664 QDir::current().cd( currentDir ); 715 QDir::current().cd( currentDir );
665} 716}
666 717
@@ -674,12 +725,17 @@ MakefileGenerator::init()
674 725
675 QMap<QString, QStringList> &v = project->variables(); 726 QMap<QString, QStringList> &v = project->variables();
676 QString paths[] = { QString("SOURCES"), QString("FORMS"), QString("YACCSOURCES"), QString("INCLUDEPATH"), 727 QString paths[] = { QString("SOURCES"), QString("FORMS"), QString("YACCSOURCES"), QString("INCLUDEPATH"),
677 QString("HEADERS"), QString("HEADERS_ORIG"), 728 QString("HEADERS"), QString("HEADERS_ORIG"), QString("LEXSOURCES"),
678 QString("LEXSOURCES"), QString("QMAKE_INTERNAL_INCLUDED_FILES"), QString::null }; 729 QString("QMAKE_INTERNAL_INCLUDED_FILES"),
730 QString("PRECOMPILED_HEADER"), QString::null };
679 for(int y = 0; paths[y] != QString::null; y++) { 731 for(int y = 0; paths[y] != QString::null; y++) {
680 QStringList &l = v[paths[y]]; 732 QStringList &l = v[paths[y]];
681 if(!l.isEmpty()) 733 for(QStringList::Iterator it = l.begin(); it != l.end(); ++it) {
682 l = fileFixify(l); 734 if ((*it).isEmpty())
735 continue;
736 if(QFile::exists((*it)))
737 (*it) = fileFixify((*it));
738 }
683 } 739 }
684 740
685 /* get deps and mocables */ 741 /* get deps and mocables */
@@ -761,6 +817,7 @@ MakefileGenerator::init()
761 debug_msg(2, "Dependencies (cached): %s -> %s", file.latin1(), 817 debug_msg(2, "Dependencies (cached): %s -> %s", file.latin1(),
762 files.join(" :: ").latin1()); 818 files.join(" :: ").latin1());
763 findDependencies(file) = files; 819 findDependencies(file) = files;
820 setProcessedDependencies(file, TRUE);
764 } 821 }
765 } 822 }
766 } else { 823 } else {
@@ -810,18 +867,18 @@ MakefileGenerator::init()
810 if(!noIO()) { 867 if(!noIO()) {
811 QString sources[] = { QString("OBJECTS"), QString("LEXSOURCES"), QString("YACCSOURCES"), 868 QString sources[] = { QString("OBJECTS"), QString("LEXSOURCES"), QString("YACCSOURCES"),
812 QString("HEADERS"), QString("SOURCES"), QString("FORMS"), 869 QString("HEADERS"), QString("SOURCES"), QString("FORMS"),
813 QString::null }; 870 QString("PRECOMPILED_HEADER"), QString::null };
814 depHeuristics.clear(); 871 depHeuristics.clear();
815 bool write_cache = FALSE, read_cache = QFile::exists(cache_file); 872 bool write_cache = FALSE, read_cache = QFile::exists(cache_file);
816 for(int x = 0; sources[x] != QString::null; x++) { 873 int x;
874 for(x = 0; sources[x] != QString::null; x++) {
817 QStringList vpath, &l = v[sources[x]]; 875 QStringList vpath, &l = v[sources[x]];
818 for(QStringList::Iterator val_it = l.begin(); val_it != l.end(); ++val_it) { 876 for(QStringList::Iterator val_it = l.begin(); val_it != l.end(); ++val_it) {
819 if(!(*val_it).isEmpty()) { 877 if(!(*val_it).isEmpty()) {
820 QString file = Option::fixPathToLocalOS((*val_it)); 878 QString file = fileFixify((*val_it), QDir::currentDirPath(), Option::output_dir);
821 QStringList file_list(file);
822 if(!QFile::exists(file)) { 879 if(!QFile::exists(file)) {
823 bool found = FALSE; 880 bool found = FALSE;
824 if(QDir::isRelativePath(file)) { 881 if(QDir::isRelativePath((*val_it))) {
825 if(vpath.isEmpty()) 882 if(vpath.isEmpty())
826 vpath = v["VPATH_" + sources[x]] + v["VPATH"] + 883 vpath = v["VPATH_" + sources[x]] + v["VPATH"] +
827 v["QMAKE_ABSOLUTE_SOURCE_PATH"] + v["DEPENDPATH"]; 884 v["QMAKE_ABSOLUTE_SOURCE_PATH"] + v["DEPENDPATH"];
@@ -858,13 +915,12 @@ MakefileGenerator::init()
858 warn_msg(WarnLogic, "Failure to find: %s", (*val_it).latin1()); 915 warn_msg(WarnLogic, "Failure to find: %s", (*val_it).latin1());
859 continue; 916 continue;
860 } else { 917 } else {
861 file_list.clear();
862 for(int i = 0; i < (int)d.count(); i++) { 918 for(int i = 0; i < (int)d.count(); i++) {
863 file_list.append(dir + d[i]); 919 QString file = fileFixify(dir + d[i]);
864 if(i == (int)d.count() - 1) 920 if(i == (int)d.count() - 1)
865 (*val_it) = dir + d[i]; 921 (*val_it) = file;
866 else 922 else
867 l.insert(val_it, dir + d[i]); 923 l.insert(val_it, file);
868 } 924 }
869 } 925 }
870 } else { 926 } else {
@@ -876,15 +932,18 @@ MakefileGenerator::init()
876 } 932 }
877 } 933 }
878 } 934 }
879 for(QStringList::Iterator file_it = file_list.begin(); 935 }
880 file_it != file_list.end(); ++file_it) { 936 }
881 QString file_list_file = fileFixify((*file_it)); 937 }
938 for(x = 0; sources[x] != QString::null; x++) {
939 QStringList &l = v[sources[x]];
940 for(QStringList::Iterator val_it = l.begin(); val_it != l.end(); ++val_it) {
882 bool found_cache_moc = FALSE, found_cache_dep = FALSE; 941 bool found_cache_moc = FALSE, found_cache_dep = FALSE;
883 if(read_cache && Option::output.name() != "-" && 942 if(read_cache && Option::output.name() != "-" &&
884 project->isActiveConfig("qmake_cache")) { 943 project->isActiveConfig("qmake_cache")) {
885 if(!findDependencies(file_list_file).isEmpty()) 944 if(processedDependencies((*val_it)))
886 found_cache_dep = TRUE; 945 found_cache_dep = TRUE;
887 if(cache_found_files[(*file_it)] == (void *)2) 946 if(cache_found_files[(*val_it)] == (void *)2)
888 found_cache_moc = TRUE; 947 found_cache_moc = TRUE;
889 if(!found_cache_moc || !found_cache_dep) 948 if(!found_cache_moc || !found_cache_dep)
890 write_cache = TRUE; 949 write_cache = TRUE;
@@ -892,12 +951,13 @@ MakefileGenerator::init()
892 /* Do moc before dependency checking since some includes can come from 951 /* Do moc before dependency checking since some includes can come from
893 moc_*.cpp files */ 952 moc_*.cpp files */
894 if(found_cache_moc) { 953 if(found_cache_moc) {
895 QString moc = findMocDestination(file_list_file); 954 QString fixed_file(fileFixify((*val_it), QDir::currentDirPath(), Option::output_dir));
955 QString moc = findMocDestination(fixed_file);
896 if(!moc.isEmpty()) { 956 if(!moc.isEmpty()) {
897 for(QStringList::Iterator cppit = Option::cpp_ext.begin(); 957 for(QStringList::Iterator cppit = Option::cpp_ext.begin();
898 cppit != Option::cpp_ext.end(); ++cppit) { 958 cppit != Option::cpp_ext.end(); ++cppit) {
899 if(file_list_file.endsWith((*cppit))) { 959 if(fixed_file.endsWith((*cppit))) {
900 QStringList &deps = findDependencies(file_list_file); 960 QStringList &deps = findDependencies(fixed_file);
901 if(!deps.contains(moc)) 961 if(!deps.contains(moc))
902 deps.append(moc); 962 deps.append(moc);
903 break; 963 break;
@@ -907,13 +967,11 @@ MakefileGenerator::init()
907 } else if(mocAware() && (sources[x] == "SOURCES" || sources[x] == "HEADERS") && 967 } else if(mocAware() && (sources[x] == "SOURCES" || sources[x] == "HEADERS") &&
908 (Option::qmake_mode == Option::QMAKE_GENERATE_PROJECT || 968 (Option::qmake_mode == Option::QMAKE_GENERATE_PROJECT ||
909 Option::mkfile::do_mocs)) { 969 Option::mkfile::do_mocs)) {
910 generateMocList((*file_it)); 970 generateMocList((*val_it));
911 } 971 }
912 if(!found_cache_dep && sources[x] != "OBJECTS") { 972 if(!found_cache_dep && sources[x] != "OBJECTS") {
913 debug_msg(5, "Looking for dependencies for %s", (*file_it).latin1()); 973 debug_msg(5, "Looking for dependencies for %s", (*val_it).latin1());
914 generateDependencies(deplist, (*file_it), doDepends()); 974 generateDependencies(deplist, (*val_it), doDepends());
915 }
916 }
917 } 975 }
918 } 976 }
919 } 977 }
@@ -932,7 +990,7 @@ MakefileGenerator::init()
932 cachet << "[depend]" << endl; 990 cachet << "[depend]" << endl;
933 for(QMap<QString, QStringList>::Iterator it = depends.begin(); 991 for(QMap<QString, QStringList>::Iterator it = depends.begin();
934 it != depends.end(); ++it) 992 it != depends.end(); ++it)
935 cachet << depKeyMap[it.key()] << " = " << it.data().join(" ") << endl; 993 cachet << dependencyKey(it.key()) << " = " << it.data().join(" ") << endl;
936 cachet << "[mocable]" << endl; 994 cachet << "[mocable]" << endl;
937 QString mc, moc_sources[] = { QString("HEADERS"), QString("SOURCES"), QString::null }; 995 QString mc, moc_sources[] = { QString("HEADERS"), QString("SOURCES"), QString::null };
938 for(int x = 0; moc_sources[x] != QString::null; x++) { 996 for(int x = 0; moc_sources[x] != QString::null; x++) {
@@ -1072,7 +1130,7 @@ MakefileGenerator::init()
1072 } 1130 }
1073 } 1131 }
1074 impl = fileFixify(impl, QDir::currentDirPath(), Option::output_dir); 1132 impl = fileFixify(impl, QDir::currentDirPath(), Option::output_dir);
1075 if(!impl.isEmpty()) 1133 if(!impl.isEmpty() && !impl.endsWith(Option::dir_sep))
1076 impl += Option::dir_sep; 1134 impl += Option::dir_sep;
1077 impl += fi.baseName(TRUE) + Option::cpp_ext.first(); 1135 impl += fi.baseName(TRUE) + Option::cpp_ext.first();
1078 if(Option::output_dir != QDir::currentDirPath() && 1136 if(Option::output_dir != QDir::currentDirPath() &&
@@ -1084,7 +1142,7 @@ MakefileGenerator::init()
1084 project->variables()["INCLUDEPATH"].append(decl); 1142 project->variables()["INCLUDEPATH"].append(decl);
1085 } 1143 }
1086 decl = fileFixify(decl, QDir::currentDirPath(), Option::output_dir); 1144 decl = fileFixify(decl, QDir::currentDirPath(), Option::output_dir);
1087 if(!decl.isEmpty()) 1145 if(!decl.isEmpty() && !decl.endsWith(Option::dir_sep))
1088 decl += Option::dir_sep; 1146 decl += Option::dir_sep;
1089 decl += fi.baseName(TRUE) + Option::h_ext.first(); 1147 decl += fi.baseName(TRUE) + Option::h_ext.first();
1090 logicWarn(impl, "SOURCES"); 1148 logicWarn(impl, "SOURCES");
@@ -1093,7 +1151,7 @@ MakefileGenerator::init()
1093 impls.append(impl); 1151 impls.append(impl);
1094 findDependencies(impl).append(decl); 1152 findDependencies(impl).append(decl);
1095 1153
1096 QString mocable = Option::moc_mod + fi.baseName(TRUE) + Option::cpp_ext.first(); 1154 QString mocable = Option::h_moc_mod + fi.baseName(TRUE) + Option::h_moc_ext;
1097 if(!v["MOC_DIR"].isEmpty()) 1155 if(!v["MOC_DIR"].isEmpty())
1098 mocable.prepend(v["MOC_DIR"].first()); 1156 mocable.prepend(v["MOC_DIR"].first());
1099 else if(fi.dirPath() != ".") 1157 else if(fi.dirPath() != ".")
@@ -1106,6 +1164,14 @@ MakefileGenerator::init()
1106 v["OBJECTS"] += (v["UICOBJECTS"] = createObjectList("UICDECLS")); 1164 v["OBJECTS"] += (v["UICOBJECTS"] = createObjectList("UICDECLS"));
1107 } 1165 }
1108 1166
1167 //Translation files
1168 if(!project->isEmpty("TRANSLATIONS")) {
1169 QStringList &trf = project->variables()["TRANSLATIONS"];
1170 for(QStringList::Iterator it = trf.begin(); it != trf.end(); ++it) {
1171 (*it) = Option::fixPathToLocalOS((*it));
1172 }
1173 }
1174
1109 //Image files 1175 //Image files
1110 if(!project->isEmpty("IMAGES")) { 1176 if(!project->isEmpty("IMAGES")) {
1111 if(project->isEmpty("QMAKE_IMAGE_COLLECTION")) 1177 if(project->isEmpty("QMAKE_IMAGE_COLLECTION"))
@@ -1140,6 +1206,7 @@ MakefileGenerator::init()
1140 if ( mocAware() ) { 1206 if ( mocAware() ) {
1141 if(!project->isEmpty("MOC_DIR")) 1207 if(!project->isEmpty("MOC_DIR"))
1142 project->variables()["INCLUDEPATH"].append(project->first("MOC_DIR")); 1208 project->variables()["INCLUDEPATH"].append(project->first("MOC_DIR"));
1209 if ( Option::h_moc_ext == Option::cpp_ext.first() )
1143 v["OBJMOC"] = createObjectList("_HDRMOC") + createObjectList("_UIMOC"); 1210 v["OBJMOC"] = createObjectList("_HDRMOC") + createObjectList("_UIMOC");
1144 1211
1145 QStringList &l = v["SRCMOC"]; 1212 QStringList &l = v["SRCMOC"];
@@ -1149,28 +1216,46 @@ MakefileGenerator::init()
1149 (*val_it) = Option::fixPathToTargetOS((*val_it), FALSE); 1216 (*val_it) = Option::fixPathToTargetOS((*val_it), FALSE);
1150 } 1217 }
1151 } 1218 }
1219
1220 QString fixpaths[] = { QString("PRE_TARGETDEPS"), QString("POST_TARGETDEPS"), QString::null };
1221 for(int path = 0; !fixpaths[path].isNull(); path++) {
1222 QStringList &l = v[fixpaths[path]];
1223 for(QStringList::Iterator val_it = l.begin(); val_it != l.end(); ++val_it) {
1224 if(!(*val_it).isEmpty())
1225 (*val_it) = Option::fixPathToTargetOS((*val_it), FALSE);
1226 }
1227 }
1228
1229 // Make sure the INCLUDEPATH doesn't contain any empty(/null) entries
1230 QStringList &ipl = project->variables()["INCLUDEPATH"];
1231 for(QStringList::Iterator ipl_it = ipl.begin(); ipl_it != ipl.end();) {
1232 if ((*ipl_it).isEmpty())
1233 ipl_it = ipl.remove(ipl_it);
1234 else
1235 ++ipl_it;
1236 }
1152} 1237}
1153 1238
1154bool 1239bool
1155MakefileGenerator::processPrlFile(QString &file) 1240MakefileGenerator::processPrlFile(QString &file)
1156{ 1241{
1157 bool ret = FALSE, try_replace_file=FALSE; 1242 bool ret = FALSE, try_replace_file=FALSE;
1158 QString prl_file; 1243 QString meta_file, orig_file = file;
1159 if(file.endsWith(Option::prl_ext)) { 1244 if(QMakeMetaInfo::libExists(file)) {
1160 try_replace_file = TRUE; 1245 try_replace_file = TRUE;
1161 prl_file = file; 1246 meta_file = file;
1162 file = ""; 1247 file = "";
1163 } else { 1248 } else {
1164 QString tmp = file; 1249 QString tmp = file;
1165 int ext = tmp.findRev('.'); 1250 int ext = tmp.findRev('.');
1166 if(ext != -1) 1251 if(ext != -1)
1167 tmp = tmp.left(ext); 1252 tmp = tmp.left(ext);
1168 prl_file = tmp + Option::prl_ext; 1253 meta_file = tmp;
1169 } 1254 }
1170 prl_file = fileFixify(prl_file); 1255 meta_file = fileFixify(meta_file);
1171 if(!QFile::exists(fileFixify(prl_file, QDir::currentDirPath(), Option::output_dir)) && 1256 if(!QMakeMetaInfo::libExists(fileFixify(meta_file, QDir::currentDirPath(), Option::output_dir)) &&
1172 project->isActiveConfig("qt")) { 1257 project->isActiveConfig("qt")) {
1173 QString stem = prl_file, dir, extn; 1258 QString stem = meta_file, dir, extn;
1174 int slsh = stem.findRev('/'), hadlib = 0; 1259 int slsh = stem.findRev('/'), hadlib = 0;
1175 if(slsh != -1) { 1260 if(slsh != -1) {
1176 dir = stem.left(slsh + 1); 1261 dir = stem.left(slsh + 1);
@@ -1190,39 +1275,53 @@ MakefileGenerator::processPrlFile(QString &file)
1190 stem = stem.left(stem.length() - 3); //lose the -mt 1275 stem = stem.left(stem.length() - 3); //lose the -mt
1191 else 1276 else
1192 stem += "-mt"; //try the thread case 1277 stem += "-mt"; //try the thread case
1193 prl_file = dir; 1278 meta_file = dir;
1194 if(hadlib) 1279 if(hadlib)
1195 prl_file += "lib"; 1280 meta_file += "lib";
1196 prl_file += stem + extn; 1281 meta_file += stem + extn;
1197 try_replace_file = TRUE; 1282 try_replace_file = TRUE;
1198 } 1283 }
1199 } 1284 }
1200 QString real_prl_file = Option::fixPathToLocalOS(prl_file); 1285 QString real_meta_file = Option::fixPathToLocalOS(meta_file);
1201 if(project->variables()["QMAKE_PRL_INTERNAL_FILES"].findIndex(prl_file) != -1) { 1286 if(project->variables()["QMAKE_PRL_INTERNAL_FILES"].findIndex(QMakeMetaInfo::findLib(meta_file)) != -1) {
1202 ret = TRUE; 1287 ret = TRUE;
1203 } else if(!real_prl_file.isEmpty() && 1288 } else if(!meta_file.isEmpty()) {
1204 QFile::exists(fileFixify(real_prl_file, QDir::currentDirPath(), Option::output_dir))) { 1289 QString f = fileFixify(real_meta_file, QDir::currentDirPath(), Option::output_dir);
1205 project->variables()["QMAKE_PRL_INTERNAL_FILES"].append(prl_file); 1290 if(QMakeMetaInfo::libExists(f)) {
1206 QMakeProject proj; 1291 QMakeMetaInfo libinfo;
1207 debug_msg(1, "Processing PRL file: %s", real_prl_file.latin1()); 1292 debug_msg(1, "Processing PRL file: %s", real_meta_file.latin1());
1208 if(!proj.read(fileFixify(real_prl_file, QDir::currentDirPath(), Option::output_dir), 1293 if(!libinfo.readLib(f)) {
1209 QDir::currentDirPath(), TRUE)) { 1294 fprintf(stderr, "Error processing meta file: %s\n", real_meta_file.latin1());
1210 fprintf(stderr, "Error processing prl file: %s\n", real_prl_file.latin1()); 1295 } else if(project->isActiveConfig("no_read_prl_" + libinfo.type().lower())) {
1296 debug_msg(2, "Ignored meta file %s [%s]", real_meta_file.latin1(), libinfo.type().latin1());
1211 } else { 1297 } else {
1212 ret = TRUE; 1298 ret = TRUE;
1213 QMap<QString, QStringList> &vars = proj.variables(); 1299 QMap<QString, QStringList> &vars = libinfo.variables();
1214 for( QMap<QString, QStringList>::Iterator it = vars.begin(); it != vars.end(); ++it) 1300 for( QMap<QString, QStringList>::Iterator it = vars.begin(); it != vars.end(); ++it)
1215 processPrlVariable(it.key(), it.data()); 1301 processPrlVariable(it.key(), it.data());
1216 if(try_replace_file && !proj.isEmpty("QMAKE_PRL_TARGET")) { 1302 if(try_replace_file && !libinfo.isEmpty("QMAKE_PRL_TARGET")) {
1217 QString dir; 1303 QString dir;
1218 int slsh = real_prl_file.findRev(Option::dir_sep); 1304 int slsh = real_meta_file.findRev(Option::dir_sep);
1219 if(slsh != -1) 1305 if(slsh != -1)
1220 dir = real_prl_file.left(slsh+1); 1306 dir = real_meta_file.left(slsh+1);
1221 file = dir + proj.first("QMAKE_PRL_TARGET"); 1307 file = libinfo.first("QMAKE_PRL_TARGET");
1308 if(QDir::isRelativePath(file))
1309 file.prepend(dir);
1222 } 1310 }
1223 } 1311 }
1224 if(ret) 1312 }
1225 project->variables()["QMAKE_INTERNAL_INCLUDED_FILES"].append(prl_file); 1313 if(ret) {
1314 QString mf = QMakeMetaInfo::findLib(meta_file);
1315 project->variables()["QMAKE_PRL_INTERNAL_FILES"].append(mf);
1316 project->variables()["QMAKE_INTERNAL_INCLUDED_FILES"].append(mf);
1317 }
1318 }
1319 if(try_replace_file && file.isEmpty()) {
1320#if 0
1321 warn_msg(WarnLogic, "Found prl [%s] file with no target [%s]!", meta_file.latin1(),
1322 orig_file.latin1());
1323#endif
1324 file = orig_file;
1226 } 1325 }
1227 return ret; 1326 return ret;
1228} 1327}
@@ -1296,6 +1395,10 @@ MakefileGenerator::writePrlFile(QTextStream &t)
1296 t << "QMAKE_PRL_TARGET = " << target << endl; 1395 t << "QMAKE_PRL_TARGET = " << target << endl;
1297 if(!project->isEmpty("PRL_EXPORT_DEFINES")) 1396 if(!project->isEmpty("PRL_EXPORT_DEFINES"))
1298 t << "QMAKE_PRL_DEFINES = " << project->variables()["PRL_EXPORT_DEFINES"].join(" ") << endl; 1397 t << "QMAKE_PRL_DEFINES = " << project->variables()["PRL_EXPORT_DEFINES"].join(" ") << endl;
1398 if(!project->isEmpty("PRL_EXPORT_CFLAGS"))
1399 t << "QMAKE_PRL_CFLAGS = " << project->variables()["PRL_EXPORT_CFLAGS"].join(" ") << endl;
1400 if(!project->isEmpty("PRL_EXPORT_CXXFLAGS"))
1401 t << "QMAKE_PRL_CXXFLAGS = " << project->variables()["PRL_EXPORT_CXXFLAGS"].join(" ") << endl;
1299 if(!project->isEmpty("CONFIG")) 1402 if(!project->isEmpty("CONFIG"))
1300 t << "QMAKE_PRL_CONFIG = " << project->variables()["CONFIG"].join(" ") << endl; 1403 t << "QMAKE_PRL_CONFIG = " << project->variables()["CONFIG"].join(" ") << endl;
1301 if(!project->isEmpty("VERSION")) 1404 if(!project->isEmpty("VERSION"))
@@ -1316,10 +1419,12 @@ MakefileGenerator::writePrlFile(QTextStream &t)
1316bool 1419bool
1317MakefileGenerator::write() 1420MakefileGenerator::write()
1318{ 1421{
1422 usePlatformDir();
1319 init(); 1423 init();
1320 findLibraries(); 1424 findLibraries();
1321 if((Option::qmake_mode == Option::QMAKE_GENERATE_MAKEFILE || //write prl 1425 if((Option::qmake_mode == Option::QMAKE_GENERATE_MAKEFILE || //write prl
1322 Option::qmake_mode == Option::QMAKE_GENERATE_PRL) && 1426 Option::qmake_mode == Option::QMAKE_GENERATE_PRL) &&
1427 project->variables()["QMAKE_FAILED_REQUIREMENTS"].isEmpty() &&
1323 project->isActiveConfig("create_prl") && project->first("TEMPLATE") == "lib" && 1428 project->isActiveConfig("create_prl") && project->first("TEMPLATE") == "lib" &&
1324 !project->isActiveConfig("plugin")) { 1429 !project->isActiveConfig("plugin")) {
1325 QString prl = var("TARGET"); 1430 QString prl = var("TARGET");
@@ -1346,7 +1451,7 @@ MakefileGenerator::write()
1346 project->isActiveConfig("link_prl")) //load up prl's' 1451 project->isActiveConfig("link_prl")) //load up prl's'
1347 processPrlFiles(); 1452 processPrlFiles();
1348 1453
1349 if(Option::qmake_mode == Option::QMAKE_GENERATE_MAKEFILE || 1454 if(Option::qmake_mode == Option::QMAKE_GENERATE_MAKEFILE || //write prl file
1350 Option::qmake_mode == Option::QMAKE_GENERATE_PROJECT) { 1455 Option::qmake_mode == Option::QMAKE_GENERATE_PROJECT) {
1351 QTextStream t(&Option::output); 1456 QTextStream t(&Option::output);
1352 writeMakefile(t); 1457 writeMakefile(t);
@@ -1354,6 +1459,61 @@ MakefileGenerator::write()
1354 return TRUE; 1459 return TRUE;
1355} 1460}
1356 1461
1462// Manipulate directories, so it's possible to build
1463// several cross-platform targets concurrently
1464void
1465MakefileGenerator::usePlatformDir()
1466{
1467 QString pltDir(project->first("QMAKE_PLATFORM_DIR"));
1468 if(pltDir.isEmpty())
1469 return;
1470 char sep = QDir::separator();
1471 QString slashPltDir = sep + pltDir;
1472
1473 QString filePath = project->first("DESTDIR");
1474 project->variables()["DESTDIR"] = filePath
1475 + (filePath.isEmpty() ? pltDir : slashPltDir);
1476
1477 filePath = project->first("DLLDESTDIR");
1478 project->variables()["DLLDESTDIR"] = filePath
1479 + (filePath.isEmpty() ? pltDir : slashPltDir);
1480
1481 filePath = project->first("OBJECTS_DIR");
1482 project->variables()["OBJECTS_DIR"] = filePath
1483 + (filePath.isEmpty() ? pltDir : slashPltDir);
1484
1485 filePath = project->first("QMAKE_LIBDIR_QT");
1486 project->variables()["QMAKE_LIBDIR_QT"] = filePath
1487 + (filePath.isEmpty() ? pltDir : slashPltDir);
1488
1489 filePath = project->first("QMAKE_LIBS_QT");
1490 int fpi = filePath.findRev(sep);
1491 if (fpi == -1)
1492 project->variables()["QMAKE_LIBS_QT"].prepend(pltDir + sep);
1493 else
1494 project->variables()["QMAKE_LIBS_QT"] = filePath.left(fpi)
1495 + slashPltDir
1496 + filePath.mid(fpi);
1497
1498 filePath = project->first("QMAKE_LIBS_QT_THREAD");
1499 fpi = filePath.findRev(sep);
1500 if (fpi == -1)
1501 project->variables()["QMAKE_LIBS_QT_THREAD"].prepend(pltDir + sep);
1502 else
1503 project->variables()["QMAKE_LIBS_QT_THREAD"] = filePath.left(fpi)
1504 + slashPltDir
1505 + filePath.mid(fpi);
1506
1507 filePath = project->first("QMAKE_LIBS_QT_ENTRY");
1508 fpi = filePath.findRev(sep);
1509 if (fpi == -1)
1510 project->variables()["QMAKE_LIBS_QT_ENTRY"].prepend(pltDir + sep);
1511 else
1512 project->variables()["QMAKE_LIBS_QT_ENTRY"] = filePath.left(fpi)
1513 + slashPltDir
1514 + filePath.mid(fpi);
1515}
1516
1357void 1517void
1358MakefileGenerator::writeObj(QTextStream &t, const QString &obj, const QString &src) 1518MakefileGenerator::writeObj(QTextStream &t, const QString &obj, const QString &src)
1359{ 1519{
@@ -1372,7 +1532,7 @@ MakefileGenerator::writeObj(QTextStream &t, const QString &obj, const QString &s
1372 QString sdep, odep = (*sit) + " "; 1532 QString sdep, odep = (*sit) + " ";
1373 QStringList deps = findDependencies((*sit)); 1533 QStringList deps = findDependencies((*sit));
1374 for(QStringList::Iterator dit = deps.begin(); dit != deps.end(); dit++) { 1534 for(QStringList::Iterator dit = deps.begin(); dit != deps.end(); dit++) {
1375 if((*dit).endsWith(Option::moc_ext)) 1535 if((*dit).endsWith(Option::cpp_moc_ext))
1376 odep += (*dit) + " "; 1536 odep += (*dit) + " ";
1377 else 1537 else
1378 sdep += (*dit) + " "; 1538 sdep += (*dit) + " ";
@@ -1406,8 +1566,8 @@ MakefileGenerator::writeObj(QTextStream &t, const QString &obj, const QString &s
1406 } 1566 }
1407 } 1567 }
1408 if (!use_implicit_rule && !project->isEmpty(comp)) { 1568 if (!use_implicit_rule && !project->isEmpty(comp)) {
1409 QString p = var(comp); 1569 QString p = var(comp), srcf(*sit);
1410 p.replace(stringSrc, (*sit)); 1570 p.replace(stringSrc, srcf);
1411 p.replace(stringObj, (*oit)); 1571 p.replace(stringObj, (*oit));
1412 t << "\n\t" << p; 1572 t << "\n\t" << p;
1413 } 1573 }
@@ -1421,15 +1581,13 @@ MakefileGenerator::writeUicSrc(QTextStream &t, const QString &ui)
1421{ 1581{
1422 QStringList &uil = project->variables()[ui]; 1582 QStringList &uil = project->variables()[ui];
1423 for(QStringList::Iterator it = uil.begin(); it != uil.end(); it++) { 1583 for(QStringList::Iterator it = uil.begin(); it != uil.end(); it++) {
1424 QString deps = findDependencies((*it)).join(" \\\n\t\t"), decl, impl; 1584 QString decl, impl;
1425 { 1585 {
1426 QString tmp = (*it), impl_dir, decl_dir; 1586 QString tmp = (*it), impl_dir, decl_dir;
1427 decl = tmp.replace(QRegExp("\\" + Option::ui_ext + "$"), Option::h_ext.first()); 1587 decl = tmp.replace(QRegExp("\\" + Option::ui_ext + "$"), Option::h_ext.first());
1428 decl = fileFixify(decl, QDir::currentDirPath(), Option::output_dir);
1429 int dlen = decl.findRev(Option::dir_sep) + 1; 1588 int dlen = decl.findRev(Option::dir_sep) + 1;
1430 tmp = (*it); 1589 tmp = (*it);
1431 impl = tmp.replace(QRegExp("\\" + Option::ui_ext + "$"), Option::cpp_ext.first()); 1590 impl = tmp.replace(QRegExp("\\" + Option::ui_ext + "$"), Option::cpp_ext.first());
1432 impl = fileFixify(impl, QDir::currentDirPath(), Option::output_dir);
1433 int ilen = decl.findRev(Option::dir_sep) + 1; 1591 int ilen = decl.findRev(Option::dir_sep) + 1;
1434 if(!project->isEmpty("UI_DIR")) { 1592 if(!project->isEmpty("UI_DIR")) {
1435 impl_dir = project->first("UI_DIR"); 1593 impl_dir = project->first("UI_DIR");
@@ -1445,25 +1603,31 @@ MakefileGenerator::writeUicSrc(QTextStream &t, const QString &ui)
1445 impl = project->first("UI_SOURCES_DIR") + impl.right(impl.length() - ilen); 1603 impl = project->first("UI_SOURCES_DIR") + impl.right(impl.length() - ilen);
1446 } 1604 }
1447 } 1605 }
1606 impl = fileFixify(impl, QDir::currentDirPath(), Option::output_dir);
1607 decl = fileFixify(decl, QDir::currentDirPath(), Option::output_dir);
1448 if(decl_dir.isEmpty()) 1608 if(decl_dir.isEmpty())
1449 decl_dir = decl.left(dlen); 1609 decl_dir = decl.section(Option::dir_sep,0,-2);
1450 if(impl_dir.isEmpty()) 1610 if(impl_dir.isEmpty())
1451 impl_dir = impl.left(ilen); 1611 impl_dir = impl.section(Option::dir_sep,0,-2);
1452 if(!impl_dir.isEmpty()) 1612 if (QDir::isRelativePath(impl_dir))
1453 createDir(Option::output_dir + Option::dir_sep + impl_dir); 1613 impl_dir.prepend(Option::output_dir + Option::dir_sep);
1454 if(!decl_dir.isEmpty() && decl_dir != impl_dir) 1614 if (QDir::isRelativePath(decl_dir))
1455 createDir(Option::output_dir + Option::dir_sep + decl_dir); 1615 decl_dir.prepend(Option::output_dir + Option::dir_sep);
1456 } 1616 createDir(impl_dir);
1457 t << decl << ": " << (*it) << " " << deps << "\n\t" 1617 createDir(decl_dir);
1618 }
1619 QStringList deps = findDependencies((*it));
1620 deps.remove(decl); //avoid circular dependencies..
1621 t << decl << ": " << (*it) << " " << deps.join(" \\\n\t\t") << "\n\t"
1458 << "$(UIC) " << (*it) << " -o " << decl << endl << endl; 1622 << "$(UIC) " << (*it) << " -o " << decl << endl << endl;
1459 1623
1460 QString mildDecl = decl; 1624 QString mildDecl = decl;
1461 int k = mildDecl.findRev( Option::dir_sep ); 1625 int k = mildDecl.findRev( Option::dir_sep );
1462 if ( k != -1 ) 1626 if ( k != -1 )
1463 mildDecl = mildDecl.mid( k + 1 ); 1627 mildDecl = mildDecl.mid( k + 1 );
1464 1628 t << impl << ": " << decl << " " << (*it) << " " << deps.join(" \\\n\t\t") << "\n\t"
1465 t << impl << ": " << decl << " " << (*it) << " " << deps << "\n\t" 1629 << "$(UIC)";
1466 << "$(UIC) " << (*it) << " -i " << mildDecl << " -o " << impl << endl << endl; 1630 t << " " << (*it) << " -i " << mildDecl << " -o " << impl << endl << endl;
1467 } 1631 }
1468} 1632}
1469 1633
@@ -1477,7 +1641,8 @@ MakefileGenerator::writeMocObj(QTextStream &t, const QString &obj, const QString
1477 QString stringSrc("$src"), stringObj("$obj"); 1641 QString stringSrc("$src"), stringObj("$obj");
1478 for( ;sit != srcl.end() && oit != objl.end(); oit++, sit++) { 1642 for( ;sit != srcl.end() && oit != objl.end(); oit++, sit++) {
1479 QString hdr = findMocSource((*sit)); 1643 QString hdr = findMocSource((*sit));
1480 t << (*oit) << ": " << (*sit) << " " 1644 t << (*oit) << ": "
1645 << (*sit) << " " << findDependencies((*sit)).join(" \\\n\t\t") << " "
1481 << hdr << " " << findDependencies(hdr).join(" \\\n\t\t"); 1646 << hdr << " " << findDependencies(hdr).join(" \\\n\t\t");
1482 bool use_implicit_rule = !project->isEmpty("QMAKE_RUN_CXX_IMP"); 1647 bool use_implicit_rule = !project->isEmpty("QMAKE_RUN_CXX_IMP");
1483 if(use_implicit_rule) { 1648 if(use_implicit_rule) {
@@ -1490,8 +1655,8 @@ MakefileGenerator::writeMocObj(QTextStream &t, const QString &obj, const QString
1490 } 1655 }
1491 } 1656 }
1492 if (!use_implicit_rule && !project->isEmpty("QMAKE_RUN_CXX")) { 1657 if (!use_implicit_rule && !project->isEmpty("QMAKE_RUN_CXX")) {
1493 QString p = var("QMAKE_RUN_CXX"); 1658 QString p = var("QMAKE_RUN_CXX"), srcf(*sit);
1494 p.replace(stringSrc, (*sit)); 1659 p.replace(stringSrc, srcf);
1495 p.replace(stringObj, (*oit)); 1660 p.replace(stringObj, (*oit));
1496 t << "\n\t" << p; 1661 t << "\n\t" << p;
1497 } 1662 }
@@ -1512,7 +1677,8 @@ MakefileGenerator::writeMocSrc(QTextStream &t, const QString &src)
1512 deps += "$(MOC) "; 1677 deps += "$(MOC) ";
1513 deps += (*it); 1678 deps += (*it);
1514 t << m << ": " << deps << "\n\t" 1679 t << m << ": " << deps << "\n\t"
1515 << "$(MOC) " << (*it) << " -o " << m << endl << endl; 1680 << "$(MOC)";
1681 t << " " << (*it) << " -o " << m << endl << endl;
1516 } 1682 }
1517 } 1683 }
1518} 1684}
@@ -1545,6 +1711,9 @@ MakefileGenerator::writeYaccSrc(QTextStream &t, const QString &src)
1545 QString yaccflags = "$(YACCFLAGS)", mangle = "y"; 1711 QString yaccflags = "$(YACCFLAGS)", mangle = "y";
1546 if(!project->isActiveConfig("yacc_no_name_mangle")) { 1712 if(!project->isActiveConfig("yacc_no_name_mangle")) {
1547 mangle = fi.baseName(TRUE); 1713 mangle = fi.baseName(TRUE);
1714 if(!project->isEmpty("QMAKE_YACCFLAGS_MANGLE"))
1715 yaccflags += " " + var("QMAKE_YACCFLAGS_MANGLE").replace(stringBase, mangle);
1716 else
1548 yaccflags += " -p " + mangle; 1717 yaccflags += " -p " + mangle;
1549 } 1718 }
1550 QString out_h = default_out_h, out_c = default_out_c; 1719 QString out_h = default_out_h, out_c = default_out_c;
@@ -1621,8 +1790,8 @@ MakefileGenerator::writeImageObj(QTextStream &t, const QString &obj)
1621 } 1790 }
1622 } 1791 }
1623 if(!use_implicit_rule && !project->isEmpty("QMAKE_RUN_CXX")) { 1792 if(!use_implicit_rule && !project->isEmpty("QMAKE_RUN_CXX")) {
1624 QString p = var("QMAKE_RUN_CXX"); 1793 QString p = var("QMAKE_RUN_CXX"), srcf(src);
1625 p.replace( stringSrc, src); 1794 p.replace(stringSrc, srcf);
1626 p.replace( stringObj, (*oit)); 1795 p.replace( stringObj, (*oit));
1627 t << "\n\t" << p; 1796 t << "\n\t" << p;
1628 } 1797 }
@@ -1661,7 +1830,8 @@ MakefileGenerator::writeInstalls(QTextStream &t, const QString &installs)
1661 QStringList &l = project->variables()[installs]; 1830 QStringList &l = project->variables()[installs];
1662 for(QStringList::Iterator it = l.begin(); it != l.end(); ++it) { 1831 for(QStringList::Iterator it = l.begin(); it != l.end(); ++it) {
1663 QString pvar = (*it) + ".path"; 1832 QString pvar = (*it) + ".path";
1664 if(project->variables()[pvar].isEmpty()) { 1833 if(project->variables()[(*it) + ".CONFIG"].findIndex("no_path") == -1 &&
1834 project->variables()[pvar].isEmpty()) {
1665 warn_msg(WarnLogic, "%s is not defined: install target not created\n", pvar.latin1()); 1835 warn_msg(WarnLogic, "%s is not defined: install target not created\n", pvar.latin1());
1666 continue; 1836 continue;
1667 } 1837 }
@@ -1669,13 +1839,13 @@ MakefileGenerator::writeInstalls(QTextStream &t, const QString &installs)
1669 bool do_default = TRUE; 1839 bool do_default = TRUE;
1670 const QString root = "$(INSTALL_ROOT)"; 1840 const QString root = "$(INSTALL_ROOT)";
1671 QString target, dst= fileFixify(project->variables()[pvar].first()); 1841 QString target, dst= fileFixify(project->variables()[pvar].first());
1672#ifndef Q_WS_WIN
1673 if(dst.right(1) != Option::dir_sep) 1842 if(dst.right(1) != Option::dir_sep)
1674 dst += Option::dir_sep; 1843 dst += Option::dir_sep;
1675#endif 1844 QStringList tmp, uninst = project->variables()[(*it) + ".uninstall"];
1676 QStringList tmp, &uninst = project->variables()[(*it) + ".uninstall"];
1677 //other 1845 //other
1678 tmp = project->variables()[(*it) + ".extra"]; 1846 tmp = project->variables()[(*it) + ".extra"];
1847 if(tmp.isEmpty())
1848 tmp = project->variables()[(*it) + ".commands"]; //to allow compatible name
1679 if(!tmp.isEmpty()) { 1849 if(!tmp.isEmpty()) {
1680 do_default = FALSE; 1850 do_default = FALSE;
1681 if(!target.isEmpty()) 1851 if(!target.isEmpty())
@@ -1703,11 +1873,16 @@ MakefileGenerator::writeInstalls(QTextStream &t, const QString &installs)
1703 QFileInfo fi(wild); 1873 QFileInfo fi(wild);
1704 if(!target.isEmpty()) 1874 if(!target.isEmpty())
1705 target += "\t"; 1875 target += "\t";
1706 target += QString(fi.isDir() ? "-$(COPY_DIR)" : "-$(COPY_FILE)") + " \"" + 1876 QString cmd = QString(fi.isDir() ? "-$(INSTALL_DIR)" : "-$(INSTALL_FILE)") + " \"" +
1707 Option::fixPathToTargetOS(fileFixify(wild), FALSE) + "\" \"" + root + dst + "\"\n"; 1877 Option::fixPathToTargetOS(fileFixify(wild, QString::null,
1878 QString::null, FALSE, FALSE), FALSE) +
1879 "\" \"" + root + dst + "\"\n";
1880 target += cmd;
1708 if(!project->isActiveConfig("debug") && 1881 if(!project->isActiveConfig("debug") &&
1709 !fi.isDir() && fi.isExecutable() && !project->isEmpty("QMAKE_STRIP")) 1882 !fi.isDir() && fi.isExecutable() && !project->isEmpty("QMAKE_STRIP"))
1710 target += QString("\t-") + var("QMAKE_STRIP") + " \"" + root + fileFixify(dst + filestr) + "\"\n"; 1883 target += QString("\t-") + var("QMAKE_STRIP") + " \"" +
1884 root + fileFixify(dst + filestr, QString::null, QString::null, FALSE, FALSE) +
1885 "\"\n";
1711 if(!uninst.isEmpty()) 1886 if(!uninst.isEmpty())
1712 uninst.append("\n\t"); 1887 uninst.append("\n\t");
1713 uninst.append( 1888 uninst.append(
@@ -1716,9 +1891,10 @@ MakefileGenerator::writeInstalls(QTextStream &t, const QString &installs)
1716#else 1891#else
1717 QString("-$(DEL_FILE) -r") 1892 QString("-$(DEL_FILE) -r")
1718#endif 1893#endif
1719 + " \"" + root + fileFixify(dst + filestr) + "\""); 1894 + " \"" + root + fileFixify(dst + filestr, QString::null, QString::null, FALSE, FALSE) + "\"");
1720 continue; 1895 continue;
1721 } 1896 }
1897 fixEnvVariables(dirstr);
1722 QDir dir(dirstr, filestr); //wild 1898 QDir dir(dirstr, filestr); //wild
1723 for(uint x = 0; x < dir.count(); x++) { 1899 for(uint x = 0; x < dir.count(); x++) {
1724 QString file = dir[x]; 1900 QString file = dir[x];
@@ -1732,25 +1908,42 @@ MakefileGenerator::writeInstalls(QTextStream &t, const QString &installs)
1732#else 1908#else
1733 QString("-$(DEL_FILE) -r") 1909 QString("-$(DEL_FILE) -r")
1734#endif 1910#endif
1735 + " \"" + root + fileFixify(dst + file) + "\""); 1911 + " \"" + root + fileFixify(dst + file, QString::null, QString::null, FALSE, FALSE) +
1736 QFileInfo fi(file); 1912 "\"");
1913 QFileInfo fi(Option::fixPathToTargetOS(fileFixify(dirstr + file), TRUE));
1737 if(!target.isEmpty()) 1914 if(!target.isEmpty())
1738 target += "\t"; 1915 target += "\t";
1739 target += QString(fi.isDir() ? "-$(COPY_DIR)" : "-$(COPY_FILE)") + " \"" + 1916 QString cmd = QString(fi.isDir() ? "-$(INSTALL_DIR)" : "-$(INSTALL_FILE)") + " \"" +
1740 Option::fixPathToTargetOS(fileFixify(dirstr + file), FALSE) + 1917 Option::fixPathToTargetOS(fileFixify(dirstr + file, QString::null,
1741 "\" \"" + root + fileFixify(dst) + "\"\n"; 1918 QString::null, FALSE, FALSE), FALSE) +
1919 "\" \"" + root + dst + "\"\n";
1920 target += cmd;
1742 if(!project->isActiveConfig("debug") && 1921 if(!project->isActiveConfig("debug") &&
1743 !fi.isDir() && fi.isExecutable() && !project->isEmpty("QMAKE_STRIP")) 1922 !fi.isDir() && fi.isExecutable() && !project->isEmpty("QMAKE_STRIP"))
1744 target += QString("\t-") + var("QMAKE_STRIP") + " \"" + root + fileFixify(dst + file) + "\"\n"; 1923 target += QString("\t-") + var("QMAKE_STRIP") + " \"" +
1924 root + fileFixify(dst + file, QString::null, QString::null, FALSE, FALSE) +
1925 "\"\n";
1745 } 1926 }
1746 } 1927 }
1747 } 1928 }
1748 //default? 1929 //default?
1749 if(do_default) 1930 if(do_default) {
1750 target = defaultInstall((*it)); 1931 target = defaultInstall((*it));
1932 uninst = project->variables()[(*it) + ".uninstall"];
1933 }
1751 1934
1752 if(!target.isEmpty()) { 1935 if(!target.isEmpty()) {
1753 t << "install_" << (*it) << ": " << "\n\t"; 1936 t << "install_" << (*it) << ": all ";
1937 const QStringList &deps = project->variables()[(*it) + ".depends"];
1938 if(!deps.isEmpty()) {
1939 for(QStringList::ConstIterator dep_it = deps.begin(); dep_it != deps.end(); ++dep_it) {
1940 QString targ = var((*dep_it) + ".target");
1941 if(targ.isEmpty())
1942 targ = (*dep_it);
1943 t << targ;
1944 }
1945 }
1946 t << "\n\t";
1754 const QStringList &dirs = project->variables()[pvar]; 1947 const QStringList &dirs = project->variables()[pvar];
1755 for(QStringList::ConstIterator pit = dirs.begin(); pit != dirs.end(); ++pit) { 1948 for(QStringList::ConstIterator pit = dirs.begin(); pit != dirs.end(); ++pit) {
1756 QString tmp_dst = fileFixify((*pit)); 1949 QString tmp_dst = fileFixify((*pit));
@@ -1761,20 +1954,24 @@ MakefileGenerator::writeInstalls(QTextStream &t, const QString &installs)
1761 t << mkdir_p_asstring(root+tmp_dst) << "\n\t"; 1954 t << mkdir_p_asstring(root+tmp_dst) << "\n\t";
1762 } 1955 }
1763 t << target << endl << endl; 1956 t << target << endl << endl;
1764 all_installs += QString("install_") + (*it) + " ";
1765 if(!uninst.isEmpty()) { 1957 if(!uninst.isEmpty()) {
1766 t << "uninstall_" << (*it) << ": " << "\n\t" 1958 t << "uninstall_" << (*it) << ": " << "\n\t"
1767 << uninst.join("") << "\n\t" 1959 << uninst.join("") << "\n\t"
1768 << "-$(DEL_DIR) \"" << ( root + dst ) << "\"" << endl << endl; 1960 << "-$(DEL_DIR) \"" << ( root + dst ) << "\"" << endl << endl;
1769 all_uninstalls += "uninstall_" + (*it) + " ";
1770 } 1961 }
1771 t << endl; 1962 t << endl;
1963
1964 if(project->variables()[(*it) + ".CONFIG"].findIndex("no_default_install") == -1) {
1965 all_installs += QString("install_") + (*it) + " ";
1966 if(!uninst.isEmpty())
1967 all_uninstalls += "uninstall_" + (*it) + " ";
1968 }
1772 } else { 1969 } else {
1773 debug_msg(1, "no definition for install %s: install target not created",(*it).latin1()); 1970 debug_msg(1, "no definition for install %s: install target not created",(*it).latin1());
1774 } 1971 }
1775 } 1972 }
1776 t << "install: all " << all_installs << "\n\n"; 1973 t << "install: " << all_installs << " " << var("INSTALLDEPS") << "\n\n";
1777 t << "uninstall: " << all_uninstalls << "\n\n"; 1974 t << "uninstall: " << all_uninstalls << " " << var("UNINSTALLDEPS") << "\n\n";
1778} 1975}
1779 1976
1780QString 1977QString
@@ -1971,8 +2168,12 @@ MakefileGenerator::writeMakeQmake(QTextStream &t)
1971 t << ofile << ": " << fileFixify(pfile) << " "; 2168 t << ofile << ": " << fileFixify(pfile) << " ";
1972 if(Option::mkfile::do_cache) 2169 if(Option::mkfile::do_cache)
1973 t << fileFixify(Option::mkfile::cachefile) << " "; 2170 t << fileFixify(Option::mkfile::cachefile) << " ";
1974 if(!specdir().isEmpty()) 2171 if(!specdir().isEmpty()) {
2172 if (QFile::exists(Option::fixPathToLocalOS(specdir()+QDir::separator()+"qmake.conf")))
1975 t << specdir() << Option::dir_sep << "qmake.conf" << " "; 2173 t << specdir() << Option::dir_sep << "qmake.conf" << " ";
2174 else if (QFile::exists(Option::fixPathToLocalOS(specdir()+QDir::separator()+"tmake.conf")))
2175 t << specdir() << Option::dir_sep << "tmake.conf" << " ";
2176 }
1976 t << project->variables()["QMAKE_INTERNAL_INCLUDED_FILES"].join(" \\\n\t\t") << "\n\t" 2177 t << project->variables()["QMAKE_INTERNAL_INCLUDED_FILES"].join(" \\\n\t\t") << "\n\t"
1977 << qmake <<endl; 2178 << qmake <<endl;
1978 } 2179 }
@@ -1986,26 +2187,31 @@ MakefileGenerator::writeMakeQmake(QTextStream &t)
1986} 2187}
1987 2188
1988QStringList 2189QStringList
1989MakefileGenerator::fileFixify(const QStringList& files, const QString &out_dir, const QString &in_dir, bool force_fix) const 2190MakefileGenerator::fileFixify(const QStringList& files, const QString &out_dir, const QString &in_dir,
2191 bool force_fix, bool canon) const
1990{ 2192{
1991 if(files.isEmpty()) 2193 if(files.isEmpty())
1992 return files; 2194 return files;
1993 QStringList ret; 2195 QStringList ret;
1994 for(QStringList::ConstIterator it = files.begin(); it != files.end(); ++it) { 2196 for(QStringList::ConstIterator it = files.begin(); it != files.end(); ++it) {
1995 if(!(*it).isEmpty()) 2197 if(!(*it).isEmpty())
1996 ret << fileFixify((*it), out_dir, in_dir, force_fix); 2198 ret << fileFixify((*it), out_dir, in_dir, force_fix, canon);
1997 } 2199 }
1998 return ret; 2200 return ret;
1999} 2201}
2000 2202
2001QString 2203QString
2002MakefileGenerator::fileFixify(const QString& file0, const QString &out_d, const QString &in_d, bool force_fix) const 2204MakefileGenerator::fileFixify(const QString& file0, const QString &out_d,
2205 const QString &in_d, bool force_fix, bool canon) const
2003{ 2206{
2004 if(file0.isEmpty()) 2207 if(file0.isEmpty())
2005 return file0; 2208 return file0;
2006 QString key = file0; 2209 QString key = file0;
2007 if(!in_d.isEmpty() || !out_d.isEmpty() || force_fix) 2210 if(QDir::isRelativePath(file0))
2008 key.prepend(in_d + "--" + out_d + "--" + QString::number((int)force_fix) + "-"); 2211 key.prepend(QDir::currentDirPath() + "--");
2212 if(!in_d.isEmpty() || !out_d.isEmpty() || force_fix || !canon)
2213 key.prepend(in_d + "--" + out_d + "--" + QString::number((int)force_fix) + "--" +
2214 QString::number((int)canon) + "-");
2009 if(fileFixed.contains(key)) 2215 if(fileFixed.contains(key))
2010 return fileFixed[key]; 2216 return fileFixed[key];
2011 2217
@@ -2027,7 +2233,7 @@ MakefileGenerator::fileFixify(const QString& file0, const QString &out_d, const
2027 QString orig_file = file; 2233 QString orig_file = file;
2028 if(!force_fix && project->isActiveConfig("no_fixpath")) { 2234 if(!force_fix && project->isActiveConfig("no_fixpath")) {
2029 if(!project->isEmpty("QMAKE_ABSOLUTE_SOURCE_PATH")) { //absoluteify it 2235 if(!project->isEmpty("QMAKE_ABSOLUTE_SOURCE_PATH")) { //absoluteify it
2030 QString qfile = Option::fixPathToLocalOS(file); 2236 QString qfile = Option::fixPathToLocalOS(file, TRUE, canon);
2031 if(QDir::isRelativePath(file)) { //already absolute 2237 if(QDir::isRelativePath(file)) { //already absolute
2032 QFileInfo fi(qfile); 2238 QFileInfo fi(qfile);
2033 if(!fi.convertToAbs()) //strange 2239 if(!fi.convertToAbs()) //strange
@@ -2035,14 +2241,17 @@ MakefileGenerator::fileFixify(const QString& file0, const QString &out_d, const
2035 } 2241 }
2036 } 2242 }
2037 } else { //fix it.. 2243 } else { //fix it..
2038 QString qfile(Option::fixPathToLocalOS(file, TRUE)), in_dir(in_d), out_dir(out_d); 2244 QString qfile(Option::fixPathToLocalOS(file, TRUE, canon)), in_dir(in_d), out_dir(out_d);
2039 { 2245 {
2040 if(out_dir.isNull()) 2246 if(out_dir.isNull() || QDir::isRelativePath(out_dir))
2041 out_dir = Option::output_dir; 2247 out_dir.prepend(Option::output_dir + QDir::separator());
2042 if(out_dir == ".") 2248 if(out_dir == ".")
2043 out_dir = QDir::currentDirPath(); 2249 out_dir = QDir::currentDirPath();
2044 if(in_dir.isEmpty() || in_dir == ".") 2250 if(in_dir.isEmpty() || QDir::isRelativePath(in_dir))
2251 in_dir.prepend(QDir::currentDirPath() + QDir::separator());
2252 if(in_dir == ".")
2045 in_dir = QDir::currentDirPath(); 2253 in_dir = QDir::currentDirPath();
2254
2046 if(!QDir::isRelativePath(in_dir) || !QDir::isRelativePath(out_dir)) { 2255 if(!QDir::isRelativePath(in_dir) || !QDir::isRelativePath(out_dir)) {
2047 QFileInfo in_fi(in_dir); 2256 QFileInfo in_fi(in_dir);
2048 if(!in_fi.convertToAbs()) 2257 if(!in_fi.convertToAbs())
@@ -2065,13 +2274,13 @@ MakefileGenerator::fileFixify(const QString& file0, const QString &out_d, const
2065 file.prepend(Option::dir_sep); 2274 file.prepend(Option::dir_sep);
2066 file.prepend(in_dir); 2275 file.prepend(in_dir);
2067 } 2276 }
2068 file = Option::fixPathToTargetOS(file, FALSE); 2277 file = Option::fixPathToTargetOS(file, FALSE, canon);
2069 if(QFile::exists(file) && file == Option::fixPathToTargetOS(file, TRUE)) { 2278 if(canon && QFile::exists(file) && file == Option::fixPathToTargetOS(file, TRUE, canon)) {
2070 QString real_file = QDir(file).canonicalPath(); 2279 QString real_file = QDir(file).canonicalPath();
2071 if(!real_file.isEmpty()) 2280 if(!real_file.isEmpty())
2072 file = real_file; 2281 file = real_file;
2073 } 2282 }
2074 QString match_dir = Option::fixPathToTargetOS(out_dir, FALSE); 2283 QString match_dir = Option::fixPathToTargetOS(out_dir, FALSE, canon);
2075 if(file == match_dir) { 2284 if(file == match_dir) {
2076 file = ""; 2285 file = "";
2077 } else if(file.startsWith(match_dir) && 2286 } else if(file.startsWith(match_dir) &&
@@ -2100,12 +2309,13 @@ MakefileGenerator::fileFixify(const QString& file0, const QString &out_d, const
2100 } 2309 }
2101 } 2310 }
2102 } 2311 }
2103 file = Option::fixPathToTargetOS(file, FALSE); 2312 file = Option::fixPathToTargetOS(file, FALSE, canon);
2104 if(file.isEmpty()) 2313 if(file.isEmpty())
2105 file = "."; 2314 file = ".";
2106 if(!quote.isNull()) 2315 if(!quote.isNull())
2107 file = quote + file + quote; 2316 file = quote + file + quote;
2108 debug_msg(3, "Fixed %s :: to :: %s (%d)", orig_file.latin1(), file.latin1(), depth); 2317 debug_msg(3, "Fixed %s :: to :: %s (%d) [%s::%s]", orig_file.latin1(), file.latin1(), depth,
2318 in_d.latin1(), out_d.latin1());
2109 ((MakefileGenerator*)this)->fileFixed.insert(key, file); 2319 ((MakefileGenerator*)this)->fileFixed.insert(key, file);
2110 return file; 2320 return file;
2111} 2321}
@@ -2138,16 +2348,35 @@ void MakefileGenerator::logicWarn(const QString &f, const QString &w)
2138 } 2348 }
2139} 2349}
2140 2350
2141QStringList 2351QString
2142&MakefileGenerator::findDependencies(const QString &file) 2352MakefileGenerator::dependencyKey(const QString &file) const
2143{ 2353{
2144 QString key = file; 2354 QString key = file;
2145 Option::fixPathToTargetOS(key); 2355 Option::fixPathToTargetOS(key);
2146 if(key.find(Option::dir_sep)) 2356 if(key.find(Option::dir_sep))
2147 key = key.right(key.length() - key.findRev(Option::dir_sep) - 1); 2357 key = key.right(key.length() - key.findRev(Option::dir_sep) - 1);
2148 if(!depKeyMap.contains(key)) 2358 return key;
2149 depKeyMap.insert(key, file); 2359}
2150 return depends[key]; 2360
2361void
2362MakefileGenerator::setProcessedDependencies(const QString &file, bool b)
2363{
2364 depProcessed[dependencyKey(file)] = b;
2365}
2366
2367bool
2368MakefileGenerator::processedDependencies(const QString &file)
2369{
2370 QString key = dependencyKey(file);
2371 if(!depProcessed.contains(key))
2372 return FALSE;
2373 return depProcessed[key];
2374}
2375
2376QStringList
2377&MakefileGenerator::findDependencies(const QString &file)
2378{
2379 return depends[dependencyKey(file)];
2151} 2380}
2152 2381
2153 2382
@@ -2157,8 +2386,8 @@ MakefileGenerator::specdir()
2157 if(!spec.isEmpty()) 2386 if(!spec.isEmpty())
2158 return spec; 2387 return spec;
2159 spec = Option::mkfile::qmakespec; 2388 spec = Option::mkfile::qmakespec;
2160 const char *d = getenv("QTDIR"); 2389#if 0
2161 if(d) { 2390 if(const char *d = getenv("QTDIR")) {
2162 QString qdir = Option::fixPathToTargetOS(QString(d)); 2391 QString qdir = Option::fixPathToTargetOS(QString(d));
2163 if(qdir.endsWith(QString(QChar(QDir::separator())))) 2392 if(qdir.endsWith(QString(QChar(QDir::separator()))))
2164 qdir.truncate(qdir.length()-1); 2393 qdir.truncate(qdir.length()-1);
@@ -2172,6 +2401,9 @@ MakefileGenerator::specdir()
2172 spec = absSpec; 2401 spec = absSpec;
2173 } 2402 }
2174 } 2403 }
2404#else
2405 spec = Option::fixPathToTargetOS(spec);
2406#endif
2175 return spec; 2407 return spec;
2176} 2408}
2177 2409
@@ -2181,6 +2413,8 @@ MakefileGenerator::openOutput(QFile &file) const
2181 { 2413 {
2182 QString outdir; 2414 QString outdir;
2183 if(!file.name().isEmpty()) { 2415 if(!file.name().isEmpty()) {
2416 if(QDir::isRelativePath(file.name()))
2417 file.setName(Option::output_dir + file.name()); //pwd when qmake was run
2184 QFileInfo fi(file); 2418 QFileInfo fi(file);
2185 if(fi.isDir()) 2419 if(fi.isDir())
2186 outdir = file.name() + QDir::separator(); 2420 outdir = file.name() + QDir::separator();
diff --git a/qmake/generators/makefile.h b/qmake/generators/makefile.h
index 4fdabe8..e818089 100644
--- a/qmake/generators/makefile.h
+++ b/qmake/generators/makefile.h
@@ -1,13 +1,11 @@
1/**************************************************************************** 1/****************************************************************************
2** $Id$
3** 2**
4** Definition of ________ class.
5** 3**
6** Created : 970521 4** Definition of MakefileGenerator class.
7** 5**
8** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. 6** Copyright (C) 1992-2003 Trolltech AS. All rights reserved.
9** 7**
10** This file is part of the network module of the Qt GUI Toolkit. 8** This file is part of qmake.
11** 9**
12** This file may be distributed under the terms of the Q Public License 10** This file may be distributed under the terms of the Q Public License
13** as defined by Trolltech AS of Norway and appearing in the file 11** as defined by Trolltech AS of Norway and appearing in the file
@@ -41,13 +39,21 @@
41#include "project.h" 39#include "project.h"
42#include <qtextstream.h> 40#include <qtextstream.h>
43 41
42#ifdef Q_OS_WIN32
43#define QT_POPEN _popen
44#else
45#define QT_POPEN popen
46#endif
47
44class MakefileGenerator 48class MakefileGenerator
45{ 49{
46 QString spec; 50 QString spec;
47 bool init_opath_already, init_already, moc_aware, no_io; 51 bool init_opath_already, init_already, moc_aware, no_io;
48 QStringList createObjectList(const QString &var); 52 QStringList createObjectList(const QString &var);
49 QString build_args(); 53 QString build_args();
50 QMap<QString, QString> depHeuristics, depKeyMap, fileFixed; 54 QString dependencyKey(const QString &file) const;
55 QMap<QString, bool> depProcessed;
56 QMap<QString, QString> depHeuristics, fileFixed;
51 QMap<QString, QString> mocablesToMOC, mocablesFromMOC; 57 QMap<QString, QString> mocablesToMOC, mocablesFromMOC;
52 QMap<QString, QStringList> depends; 58 QMap<QString, QStringList> depends;
53 59
@@ -81,7 +87,7 @@ protected:
81 87
82 QString findMocSource(const QString &moc_file) const; 88 QString findMocSource(const QString &moc_file) const;
83 QString findMocDestination(const QString &src_file) const; 89 QString findMocDestination(const QString &src_file) const;
84 QStringList &findDependencies(const QString &file); 90 virtual QStringList &findDependencies(const QString &file);
85 91
86 void setNoIO(bool o); 92 void setNoIO(bool o);
87 bool noIO() const; 93 bool noIO() const;
@@ -97,6 +103,9 @@ protected:
97 void initOutPaths(); 103 void initOutPaths();
98 virtual void init(); 104 virtual void init();
99 105
106 //for cross-platform dependent directories
107 virtual void usePlatformDir();
108
100 //for installs 109 //for installs
101 virtual QString defaultInstall(const QString &); 110 virtual QString defaultInstall(const QString &);
102 111
@@ -108,8 +117,12 @@ protected:
108 117
109 //make sure libraries are found 118 //make sure libraries are found
110 virtual bool findLibraries(); 119 virtual bool findLibraries();
120 virtual QString findDependency(const QString &);
121
122 void setProcessedDependencies(const QString &file, bool b);
123 bool processedDependencies(const QString &file);
111 124
112 QString var(const QString &var); 125 virtual QString var(const QString &var);
113 QString varGlue(const QString &var, const QString &before, const QString &glue, const QString &after); 126 QString varGlue(const QString &var, const QString &before, const QString &glue, const QString &after);
114 QString varList(const QString &var); 127 QString varList(const QString &var);
115 QString val(const QStringList &varList); 128 QString val(const QStringList &varList);
@@ -118,15 +131,15 @@ protected:
118 131
119 132
120 QString fileFixify(const QString& file, const QString &out_dir=QString::null, 133 QString fileFixify(const QString& file, const QString &out_dir=QString::null,
121 const QString &in_dir=QString::null, bool force_fix=FALSE) const; 134 const QString &in_dir=QString::null, bool force_fix=FALSE, bool canon=TRUE) const;
122 QStringList fileFixify(const QStringList& files, const QString &out_dir=QString::null, 135 QStringList fileFixify(const QStringList& files, const QString &out_dir=QString::null,
123 const QString &in_dir=QString::null, bool force_fix=FALSE) const; 136 const QString &in_dir=QString::null, bool force_fix=FALSE, bool canon=TRUE) const;
124public: 137public:
125 MakefileGenerator(QMakeProject *p); 138 MakefileGenerator(QMakeProject *p);
126 virtual ~MakefileGenerator(); 139 virtual ~MakefileGenerator();
127 140
128 static MakefileGenerator *create(QMakeProject *); 141 static MakefileGenerator *create(QMakeProject *);
129 bool write(); 142 virtual bool write();
130 virtual bool openOutput(QFile &) const; 143 virtual bool openOutput(QFile &) const;
131}; 144};
132 145
@@ -166,8 +179,12 @@ inline QString MakefileGenerator::defaultInstall(const QString &)
166inline bool MakefileGenerator::findLibraries() 179inline bool MakefileGenerator::findLibraries()
167{ return TRUE; } 180{ return TRUE; }
168 181
182inline QString MakefileGenerator::findDependency(const QString &)
183{ return QString(""); }
184
169inline MakefileGenerator::~MakefileGenerator() 185inline MakefileGenerator::~MakefileGenerator()
170{ } 186{ }
171 187
188QString mkdir_p_asstring(const QString &dir);
172 189
173#endif /* __MAKEFILE_H__ */ 190#endif /* __MAKEFILE_H__ */
diff --git a/qmake/generators/projectgenerator.cpp b/qmake/generators/projectgenerator.cpp
index 1515216..1c17379 100644
--- a/qmake/generators/projectgenerator.cpp
+++ b/qmake/generators/projectgenerator.cpp
@@ -1,13 +1,11 @@
1/**************************************************************************** 1/****************************************************************************
2** $Id$
3** 2**
4** Definition of ________ class.
5** 3**
6** Created : 970521 4** Implementation of ProjectGenerator class.
7** 5**
8** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. 6** Copyright (C) 1992-2003 Trolltech AS. All rights reserved.
9** 7**
10** This file is part of the network module of the Qt GUI Toolkit. 8** This file is part of qmake.
11** 9**
12** This file may be distributed under the terms of the Q Public License 10** This file may be distributed under the terms of the Q Public License
13** as defined by Trolltech AS of Norway and appearing in the file 11** as defined by Trolltech AS of Norway and appearing in the file
@@ -157,6 +155,7 @@ ProjectGenerator::init()
157 QStringList dirs = Option::projfile::project_dirs; 155 QStringList dirs = Option::projfile::project_dirs;
158 if(Option::projfile::do_pwd) 156 if(Option::projfile::do_pwd)
159 dirs.prepend("."); 157 dirs.prepend(".");
158 const QString out_file = fileFixify(Option::output.name());
160 for(QStringList::Iterator pd = dirs.begin(); pd != dirs.end(); pd++) { 159 for(QStringList::Iterator pd = dirs.begin(); pd != dirs.end(); pd++) {
161 if(QFile::exists((*pd))) { 160 if(QFile::exists((*pd))) {
162 QString newdir = (*pd); 161 QString newdir = (*pd);
@@ -171,14 +170,17 @@ ProjectGenerator::init()
171 QDir d(newdir, "*.pro"); 170 QDir d(newdir, "*.pro");
172 d.setFilter(QDir::Files); 171 d.setFilter(QDir::Files);
173 for(int i = 0; i < (int)d.count(); i++) { 172 for(int i = 0; i < (int)d.count(); i++) {
174 QString nd = newdir + QDir::separator() + d[i]; 173 QString nd = newdir;
174 if(nd == ".")
175 nd = "";
176 else if(!nd.isEmpty() && !nd.endsWith(QString(QChar(QDir::separator()))))
177 nd += QDir::separator();
178 nd += d[i];
175 fileFixify(nd); 179 fileFixify(nd);
176 if(d[i] != "." && d[i] != ".." && !subdirs.contains(nd)) { 180 if(d[i] != "." && d[i] != ".." && !subdirs.contains(nd) && !out_file.endsWith(nd))
177 if(newdir + d[i] != Option::output_dir + Option::output.name())
178 subdirs.append(nd); 181 subdirs.append(nd);
179 } 182 }
180 } 183 }
181 }
182 if(Option::projfile::do_recursive) { 184 if(Option::projfile::do_recursive) {
183 QDir d(newdir); 185 QDir d(newdir);
184 d.setFilter(QDir::Dirs); 186 d.setFilter(QDir::Dirs);
@@ -324,7 +326,7 @@ ProjectGenerator::init()
324 break; 326 break;
325 } 327 }
326 } 328 }
327 if(!found && (*val_it).endsWith(Option::moc_ext)) 329 if(!found && (*val_it).endsWith(Option::cpp_moc_ext))
328 found = TRUE; 330 found = TRUE;
329 if(found) 331 if(found)
330 val_it = l.remove(val_it); 332 val_it = l.remove(val_it);
@@ -391,7 +393,7 @@ ProjectGenerator::addFile(QString file)
391 int s = file.findRev(Option::dir_sep); 393 int s = file.findRev(Option::dir_sep);
392 if(s != -1) 394 if(s != -1)
393 dir = file.left(s+1); 395 dir = file.left(s+1);
394 if(file.mid(dir.length(), Option::moc_mod.length()) == Option::moc_mod) 396 if(file.mid(dir.length(), Option::h_moc_mod.length()) == Option::h_moc_mod)
395 return FALSE; 397 return FALSE;
396 398
397 QString where; 399 QString where;
@@ -435,7 +437,7 @@ ProjectGenerator::addFile(QString file)
435 437
436 438
437QString 439QString
438ProjectGenerator::getWritableVar(const QString &v, bool /*fixPath*/) 440ProjectGenerator::getWritableVar(const QString &v, bool fixPath)
439{ 441{
440 QStringList &vals = project->variables()[v]; 442 QStringList &vals = project->variables()[v];
441 if(vals.isEmpty()) 443 if(vals.isEmpty())
@@ -455,10 +457,14 @@ ProjectGenerator::getWritableVar(const QString &v, bool /*fixPath*/)
455 spaces += " "; 457 spaces += " ";
456 join = vals.join(" \\\n" + spaces); 458 join = vals.join(" \\\n" + spaces);
457 } 459 }
460#if 0
458 // ### Commented out for now so that project generation works. 461 // ### Commented out for now so that project generation works.
459 // Sam: can you look at why this was needed? 462 // Sam: it had to do with trailing \'s (ie considered continuation lines)
460 /* if(fixPath) 463 if(fixPath)
461 join = join.replace("\\", "/");*/ 464 join = join.replace("\\", "/");
465#else
466 Q_UNUSED(fixPath);
467#endif
462 return ret + join + "\n"; 468 return ret + join + "\n";
463} 469}
464 470
diff --git a/qmake/generators/projectgenerator.h b/qmake/generators/projectgenerator.h
index 055a784..bebb259 100644
--- a/qmake/generators/projectgenerator.h
+++ b/qmake/generators/projectgenerator.h
@@ -1,13 +1,11 @@
1/**************************************************************************** 1/****************************************************************************
2** $Id$
3** 2**
4** Definition of ________ class.
5** 3**
6** Created : 970521 4** Definition of ProjectGenerator class.
7** 5**
8** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. 6** Copyright (C) 1992-2003 Trolltech AS. All rights reserved.
9** 7**
10** This file is part of the network module of the Qt GUI Toolkit. 8** This file is part of qmake.
11** 9**
12** This file may be distributed under the terms of the Q Public License 10** This file may be distributed under the terms of the Q Public License
13** as defined by Trolltech AS of Norway and appearing in the file 11** as defined by Trolltech AS of Norway and appearing in the file
diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp
index e274481..caaddee 100644
--- a/qmake/generators/unix/unixmake.cpp
+++ b/qmake/generators/unix/unixmake.cpp
@@ -1,13 +1,11 @@
1/**************************************************************************** 1/****************************************************************************
2** $Id$
3** 2**
4** Definition of ________ class.
5** 3**
6** Created : 970521 4** Implementation of UnixMakefileGenerator class.
7** 5**
8** Copyright (C) 1992-2003 Trolltech AS. All rights reserved. 6** Copyright (C) 1992-2003 Trolltech AS. All rights reserved.
9** 7**
10** This file is part of the network module of the Qt GUI Toolkit. 8** This file is part of qmake.
11** 9**
12** This file may be distributed under the terms of the Q Public License 10** This file may be distributed under the terms of the Q Public License
13** as defined by Trolltech AS of Norway and appearing in the file 11** as defined by Trolltech AS of Norway and appearing in the file
@@ -78,10 +76,24 @@ UnixMakefileGenerator::init()
78 project->variables()["QMAKE_EXTENSION_SHLIB"].append( "dll" ); 76 project->variables()["QMAKE_EXTENSION_SHLIB"].append( "dll" );
79 } 77 }
80 } 78 }
79 if( project->isEmpty("QMAKE_CFLAGS_PRECOMPILE"))
80 project->variables()["QMAKE_CFLAGS_PRECOMPILE"].append("-x c-header -c");
81 if( project->isEmpty("QMAKE_CXXFLAGS_PRECOMPILE"))
82 project->variables()["QMAKE_CXXFLAGS_PRECOMPILE"].append("-x c++-header -c");
83 if( project->isEmpty("QMAKE_CFLAGS_USE_PRECOMPILE"))
84 project->variables()["QMAKE_CFLAGS_USE_PRECOMPILE"].append("-include");
85 if( project->isEmpty("QMAKE_EXTENSION_PLUGIN") )
86 project->variables()["QMAKE_EXTENSION_PLUGIN"].append(project->first("QMAKE_EXTENSION_SHLIB"));
81 if( project->isEmpty("QMAKE_COPY_FILE") ) 87 if( project->isEmpty("QMAKE_COPY_FILE") )
82 project->variables()["QMAKE_COPY_FILE"].append( "$(COPY) -p" ); 88 project->variables()["QMAKE_COPY_FILE"].append( "$(COPY)" );
83 if( project->isEmpty("QMAKE_COPY_DIR") ) 89 if( project->isEmpty("QMAKE_COPY_DIR") )
84 project->variables()["QMAKE_COPY_DIR"].append( "$(COPY) -pR" ); 90 project->variables()["QMAKE_COPY_DIR"].append( "$(COPY) -R" );
91 if( project->isEmpty("QMAKE_INSTALL_FILE") )
92 project->variables()["QMAKE_INSTALL_FILE"].append( "$(COPY_FILE)" );
93 if( project->isEmpty("QMAKE_INSTALL_DIR") )
94 project->variables()["QMAKE_INSTALL_DIR"].append( "$(COPY_DIR)" );
95 if( project->isEmpty("QMAKE_LIBTOOL") )
96 project->variables()["QMAKE_LIBTOOL"].append( "libtool --silent" );
85 //If the TARGET looks like a path split it into DESTDIR and the resulting TARGET 97 //If the TARGET looks like a path split it into DESTDIR and the resulting TARGET
86 if(!project->isEmpty("TARGET")) { 98 if(!project->isEmpty("TARGET")) {
87 QString targ = project->first("TARGET"); 99 QString targ = project->first("TARGET");
@@ -103,7 +115,6 @@ UnixMakefileGenerator::init()
103 bool extern_libs = !project->isEmpty("QMAKE_APP_FLAG") || 115 bool extern_libs = !project->isEmpty("QMAKE_APP_FLAG") ||
104 (!project->isEmpty("QMAKE_LIB_FLAG") && 116 (!project->isEmpty("QMAKE_LIB_FLAG") &&
105 project->isActiveConfig("dll")) || is_qt; 117 project->isActiveConfig("dll")) || is_qt;
106 if(!project->isActiveConfig("global_init_link_order"))
107 project->variables()["QMAKE_LIBS"] += project->variables()["LIBS"]; 118 project->variables()["QMAKE_LIBS"] += project->variables()["LIBS"];
108 if ( (!project->isEmpty("QMAKE_LIB_FLAG") && !project->isActiveConfig("staticlib") ) || 119 if ( (!project->isEmpty("QMAKE_LIB_FLAG") && !project->isActiveConfig("staticlib") ) ||
109 (project->isActiveConfig("qt") && project->isActiveConfig( "plugin" ) )) { 120 (project->isActiveConfig("qt") && project->isActiveConfig( "plugin" ) )) {
@@ -137,21 +148,22 @@ UnixMakefileGenerator::init()
137 project->variables()["INCLUDEPATH"] += project->variables()["QMAKE_INCDIR"]; 148 project->variables()["INCLUDEPATH"] += project->variables()["QMAKE_INCDIR"];
138 if(!project->isEmpty("QMAKE_LIBDIR")) { 149 if(!project->isEmpty("QMAKE_LIBDIR")) {
139 if ( !project->isEmpty("QMAKE_RPATH") ) 150 if ( !project->isEmpty("QMAKE_RPATH") )
140 project->variables()["QMAKE_LIBDIR_FLAGS"] += varGlue("QMAKE_LIBDIR", " " + var("QMAKE_RPATH"), 151 project->variables()["QMAKE_LFLAGS"] += varGlue("QMAKE_LIBDIR", " " + var("QMAKE_RPATH"),
141 " " + var("QMAKE_RPATH"), ""); 152 " " + var("QMAKE_RPATH"), "");
142 project->variables()["QMAKE_LIBDIR_FLAGS"] += varGlue( "QMAKE_LIBDIR", "-L", " -L", "" ); 153 project->variables()["QMAKE_LIBDIR_FLAGS"] += varGlue( "QMAKE_LIBDIR", "-L", " -L", "" );
143 } 154 }
144 if ( extern_libs && (project->isActiveConfig("qt") || project->isActiveConfig("opengl")) ) { 155 if ( project->isActiveConfig("qtopia") ) {
145 if(configs.findIndex("x11lib") == -1) 156 if(configs.findIndex("qtopialib") == -1)
146 configs.append("x11lib"); 157 configs.append("qtopialib");
147 if ( project->isActiveConfig("opengl") && configs.findIndex("x11inc") == -1 ) 158 if(configs.findIndex("qtopiainc") == -1)
148 configs.append("x11inc"); 159 configs.append("qtopiainc");
149 } 160 }
150 if ( project->isActiveConfig("x11") ) { 161 if ( project->isActiveConfig("qtopiainc") )
151 if(configs.findIndex("x11lib") == -1) 162 project->variables()["INCLUDEPATH"] += project->variables()["QMAKE_INCDIR_QTOPIA"];
152 configs.append("x11lib"); 163 if ( project->isActiveConfig("qtopialib") ) {
153 if(configs.findIndex("x11inc") == -1) 164 if(!project->isEmpty("QMAKE_LIBDIR_QTOPIA"))
154 configs.append("x11inc"); 165 project->variables()["QMAKE_LIBDIR_FLAGS"] += varGlue("QMAKE_LIBDIR_QTOPIA", "-L", " -L", "");
166 project->variables()["QMAKE_LIBS"] += project->variables()["QMAKE_LIBS_QTOPIA"];
155 } 167 }
156 if ( project->isActiveConfig("qt") ) { 168 if ( project->isActiveConfig("qt") ) {
157 if ( project->isActiveConfig("accessibility" ) ) 169 if ( project->isActiveConfig("accessibility" ) )
@@ -163,19 +175,23 @@ UnixMakefileGenerator::init()
163 if ( !project->isActiveConfig("debug") ) 175 if ( !project->isActiveConfig("debug") )
164 project->variables()[is_qt ? "PRL_EXPORT_DEFINES" : "DEFINES"].append("QT_NO_DEBUG"); 176 project->variables()[is_qt ? "PRL_EXPORT_DEFINES" : "DEFINES"].append("QT_NO_DEBUG");
165 if ( !is_qt ) { 177 if ( !is_qt ) {
166 if ( !project->isEmpty("QMAKE_LIBDIR_QT") ) { 178 if ( !project->isEmpty("QMAKE_RPATH") ) {
167 if ( !project->isEmpty("QMAKE_RPATH") ) 179 if ( !project->isEmpty("QMAKE_RTLDIR_QT") )
168 project->variables()["QMAKE_LIBDIR_FLAGS"] += varGlue("QMAKE_LIBDIR_QT", " " + var("QMAKE_RPATH"), 180 project->variables()["QMAKE_LFLAGS"] += varGlue("QMAKE_RTLDIR_QT", " " + var("QMAKE_RPATH"),
181 " " + var("QMAKE_RPATH"), "");
182 else if ( !project->isEmpty("QMAKE_LIBDIR_QT") )
183 project->variables()["QMAKE_LFLAGS"] += varGlue("QMAKE_LIBDIR_QT", " " + var("QMAKE_RPATH"),
169 " " + var("QMAKE_RPATH"), ""); 184 " " + var("QMAKE_RPATH"), "");
170 project->variables()["QMAKE_LIBDIR_FLAGS"] += varGlue("QMAKE_LIBDIR_QT", "-L", " -L", "");
171 } 185 }
186 if ( !project->isEmpty("QMAKE_LIBDIR_QT") )
187 project->variables()["QMAKE_LIBDIR_FLAGS"] += varGlue("QMAKE_LIBDIR_QT", "-L", " -L", "");
172 if (project->isActiveConfig("thread") && !project->isEmpty("QMAKE_LIBS_QT_THREAD")) 188 if (project->isActiveConfig("thread") && !project->isEmpty("QMAKE_LIBS_QT_THREAD"))
173 project->variables()["QMAKE_LIBS"] += project->variables()["QMAKE_LIBS_QT_THREAD"]; 189 project->variables()["QMAKE_LIBS"] += project->variables()["QMAKE_LIBS_QT_THREAD"];
174 else 190 else
175 project->variables()["QMAKE_LIBS"] += project->variables()["QMAKE_LIBS_QT"]; 191 project->variables()["QMAKE_LIBS"] += project->variables()["QMAKE_LIBS_QT"];
176 } 192 }
177 } 193 }
178 if ( project->isActiveConfig("opengl") ) { 194 if ( project->isActiveConfig("opengl") && !project->isActiveConfig("dlopen_opengl")) {
179 project->variables()["INCLUDEPATH"] += project->variables()["QMAKE_INCDIR_OPENGL"]; 195 project->variables()["INCLUDEPATH"] += project->variables()["QMAKE_INCDIR_OPENGL"];
180 if(!project->isEmpty("QMAKE_LIBDIR_OPENGL")) 196 if(!project->isEmpty("QMAKE_LIBDIR_OPENGL"))
181 project->variables()["QMAKE_LIBDIR_FLAGS"] += varGlue("QMAKE_LIBDIR_OPENGL", "-L", " -L", ""); 197 project->variables()["QMAKE_LIBDIR_FLAGS"] += varGlue("QMAKE_LIBDIR_OPENGL", "-L", " -L", "");
@@ -184,8 +200,18 @@ UnixMakefileGenerator::init()
184 else 200 else
185 project->variables()["QMAKE_LIBS"] += project->variables()["QMAKE_LIBS_OPENGL"]; 201 project->variables()["QMAKE_LIBS"] += project->variables()["QMAKE_LIBS_OPENGL"];
186 } 202 }
187 if(project->isActiveConfig("global_init_link_order")) 203 if ( extern_libs && (project->isActiveConfig("qt") || project->isActiveConfig("opengl")) ) {
188 project->variables()["QMAKE_LIBS"] += project->variables()["LIBS"]; 204 if(configs.findIndex("x11lib") == -1)
205 configs.append("x11lib");
206 if ( project->isActiveConfig("opengl") && configs.findIndex("x11inc") == -1 )
207 configs.append("x11inc");
208 }
209 if ( project->isActiveConfig("x11") ) {
210 if(configs.findIndex("x11lib") == -1)
211 configs.append("x11lib");
212 if(configs.findIndex("x11inc") == -1)
213 configs.append("x11inc");
214 }
189 if ( project->isActiveConfig("x11inc") ) 215 if ( project->isActiveConfig("x11inc") )
190 project->variables()["INCLUDEPATH"] += project->variables()["QMAKE_INCDIR_X11"]; 216 project->variables()["INCLUDEPATH"] += project->variables()["QMAKE_INCDIR_X11"];
191 if ( project->isActiveConfig("x11lib") ) { 217 if ( project->isActiveConfig("x11lib") ) {
@@ -200,10 +226,14 @@ UnixMakefileGenerator::init()
200 if ( project->isActiveConfig("thread") ) { 226 if ( project->isActiveConfig("thread") ) {
201 if(project->isActiveConfig("qt")) 227 if(project->isActiveConfig("qt"))
202 project->variables()[is_qt ? "PRL_EXPORT_DEFINES" : "DEFINES"].append("QT_THREAD_SUPPORT"); 228 project->variables()[is_qt ? "PRL_EXPORT_DEFINES" : "DEFINES"].append("QT_THREAD_SUPPORT");
203 if ( !project->isEmpty("QMAKE_CFLAGS_THREAD")) 229 if ( !project->isEmpty("QMAKE_CFLAGS_THREAD")) {
204 project->variables()["QMAKE_CFLAGS"] += project->variables()["QMAKE_CFLAGS_THREAD"]; 230 project->variables()["QMAKE_CFLAGS"] += project->variables()["QMAKE_CFLAGS_THREAD"];
205 if( !project->isEmpty("QMAKE_CXXFLAGS_THREAD")) 231 project->variables()["PRL_EXPORT_CFLAGS"] += project->variables()["QMAKE_CFLAGS_THREAD"];
232 }
233 if( !project->isEmpty("QMAKE_CXXFLAGS_THREAD")) {
206 project->variables()["QMAKE_CXXFLAGS"] += project->variables()["QMAKE_CXXFLAGS_THREAD"]; 234 project->variables()["QMAKE_CXXFLAGS"] += project->variables()["QMAKE_CXXFLAGS_THREAD"];
235 project->variables()["PRL_EXPORT_CXXFLAGS"] += project->variables()["QMAKE_CXXFLAGS_THREAD"];
236 }
207 project->variables()["INCLUDEPATH"] += project->variables()["QMAKE_INCDIR_THREAD"]; 237 project->variables()["INCLUDEPATH"] += project->variables()["QMAKE_INCDIR_THREAD"];
208 project->variables()["QMAKE_LIBS"] += project->variables()["QMAKE_LIBS_THREAD"]; 238 project->variables()["QMAKE_LIBS"] += project->variables()["QMAKE_LIBS_THREAD"];
209 if(!project->isEmpty("QMAKE_LFLAGS_THREAD")) 239 if(!project->isEmpty("QMAKE_LFLAGS_THREAD"))
@@ -211,24 +241,35 @@ UnixMakefileGenerator::init()
211 } 241 }
212 if ( project->isActiveConfig("moc") ) 242 if ( project->isActiveConfig("moc") )
213 setMocAware(TRUE); 243 setMocAware(TRUE);
214 if ( project->isEmpty("QMAKE_RUN_CC") ) 244 QString compile_flag = var("QMAKE_COMPILE_FLAG");
215 project->variables()["QMAKE_RUN_CC"].append("$(CC) -c $(CFLAGS) $(INCPATH) -o $obj $src"); 245 if(compile_flag.isEmpty())
216 if ( project->isEmpty("QMAKE_RUN_CC_IMP") ) 246 compile_flag = "-c";
217 project->variables()["QMAKE_RUN_CC_IMP"].append("$(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<"); 247 if(doPrecompiledHeaders() && !project->isEmpty("PRECOMPILED_HEADER")) {
218 if ( project->isEmpty("QMAKE_RUN_CXX") ) 248 QString prefix_flags = project->first("QMAKE_CFLAGS_PREFIX_INCLUDE");
219 project->variables()["QMAKE_RUN_CXX"].append("$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $obj $src"); 249 if(prefix_flags.isEmpty())
220 if ( project->isEmpty("QMAKE_RUN_CXX_IMP") ) 250 prefix_flags = "-include";
221 project->variables()["QMAKE_RUN_CXX_IMP"].append("$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<"); 251 compile_flag += " " + prefix_flags + " " + project->first("QMAKE_ORIG_TARGET");
222 project->variables()["QMAKE_FILETAGS"] += QStringList::split("HEADERS SOURCES TARGET DESTDIR", " "); 252 }
223 if ( !project->isEmpty("PRECOMPH") ) { 253 if(!project->isEmpty("ALLMOC_HEADER")) {
224 initOutPaths(); // Need to fix MOC_DIR since we do this before init() 254 initOutPaths(); // Need to fix outdirs since we do this before init() (because we could add to SOURCES et al)
225 QString allmoc = fileFixify(project->first("MOC_DIR") + "/allmoc.cpp", QDir::currentDirPath(), Option::output_dir); 255 QString allmoc = fileFixify(project->first("MOC_DIR") + "/allmoc.cpp", QDir::currentDirPath(), Option::output_dir);
226 project->variables()["SOURCES"].prepend(allmoc); 256 project->variables()["SOURCES"].prepend(allmoc);
227 project->variables()["HEADERS_ORIG"] = project->variables()["HEADERS"]; 257 project->variables()["HEADERS_ORIG"] = project->variables()["HEADERS"];
228 project->variables()["HEADERS"].clear(); 258 project->variables()["HEADERS"].clear();
229 } 259 }
260 if ( project->isEmpty("QMAKE_RUN_CC") )
261 project->variables()["QMAKE_RUN_CC"].append("$(CC) " + compile_flag + " $(CFLAGS) $(INCPATH) -o $obj $src");
262 if ( project->isEmpty("QMAKE_RUN_CC_IMP") )
263 project->variables()["QMAKE_RUN_CC_IMP"].append("$(CC) " + compile_flag + " $(CFLAGS) $(INCPATH) -o $@ $<");
264 if ( project->isEmpty("QMAKE_RUN_CXX") )
265 project->variables()["QMAKE_RUN_CXX"].append("$(CXX) " + compile_flag + " $(CXXFLAGS) $(INCPATH) -o $obj $src");
266 if ( project->isEmpty("QMAKE_RUN_CXX_IMP") )
267 project->variables()["QMAKE_RUN_CXX_IMP"].append("$(CXX) " + compile_flag + " $(CXXFLAGS) $(INCPATH) -o $@ $<");
268 project->variables()["QMAKE_FILETAGS"] += QStringList::split("HEADERS SOURCES TARGET DESTDIR", " ");
230 if( project->isActiveConfig("GNUmake") && !project->isEmpty("QMAKE_CFLAGS_DEPS")) 269 if( project->isActiveConfig("GNUmake") && !project->isEmpty("QMAKE_CFLAGS_DEPS"))
231 include_deps = TRUE; //do not generate deps 270 include_deps = TRUE; //do not generate deps
271 if(project->isActiveConfig("compile_libtool"))
272 Option::obj_ext = ".lo"; //override the .o
232 273
233 MakefileGenerator::init(); 274 MakefileGenerator::init();
234 if ( project->isActiveConfig("resource_fork") && !project->isActiveConfig("console")) { 275 if ( project->isActiveConfig("resource_fork") && !project->isActiveConfig("console")) {
@@ -240,9 +281,11 @@ UnixMakefileGenerator::init()
240 project->variables()["QMAKE_PKGINFO"].append(project->first("DESTDIR") + "../PkgInfo"); 281 project->variables()["QMAKE_PKGINFO"].append(project->first("DESTDIR") + "../PkgInfo");
241 project->variables()["ALL_DEPS"] += project->first("QMAKE_PKGINFO"); 282 project->variables()["ALL_DEPS"] += project->first("QMAKE_PKGINFO");
242 283
243 QString plist = specdir() + QDir::separator() + "Info.plist." + 284 QString plist = fileFixify(project->first("QMAKE_INFO_PLIST"));
244 project->first("TEMPLATE"); 285 if(plist.isEmpty())
286 plist = specdir() + QDir::separator() + "Info.plist." + project->first("TEMPLATE");
245 if(QFile::exists(Option::fixPathToLocalOS(plist))) { 287 if(QFile::exists(Option::fixPathToLocalOS(plist))) {
288 if(project->isEmpty("QMAKE_INFO_PLIST"))
246 project->variables()["QMAKE_INFO_PLIST"].append(plist); 289 project->variables()["QMAKE_INFO_PLIST"].append(plist);
247 project->variables()["QMAKE_INFO_PLIST_OUT"].append(project->first("DESTDIR") + 290 project->variables()["QMAKE_INFO_PLIST_OUT"].append(project->first("DESTDIR") +
248 "../Info.plist"); 291 "../Info.plist");
@@ -283,49 +326,105 @@ UnixMakefileGenerator::init()
283 project->variables()["QMAKE_INTERNAL_PRL_LIBS"] << "QMAKE_AR_SUBLIBS"; 326 project->variables()["QMAKE_INTERNAL_PRL_LIBS"] << "QMAKE_AR_SUBLIBS";
284 } 327 }
285 } 328 }
329
330 if(project->isActiveConfig("compile_libtool")) {
331 const QString libtoolify[] = { "QMAKE_RUN_CC", "QMAKE_RUN_CC_IMP",
332 "QMAKE_RUN_CXX", "QMAKE_RUN_CXX_IMP",
333 "QMAKE_LINK_THREAD", "QMAKE_LINK", "QMAKE_AR_CMD", "QMAKE_LINK_SHLIB_CMD",
334 QString::null };
335 for(int i = 0; !libtoolify[i].isNull(); i++) {
336 QStringList &l = project->variables()[libtoolify[i]];
337 if(!l.isEmpty()) {
338 QString libtool_flags, comp_flags;
339 if(libtoolify[i].startsWith("QMAKE_LINK") || libtoolify[i] == "QMAKE_AR_CMD") {
340 libtool_flags += " --mode=link";
341 if(project->isActiveConfig("staticlib")) {
342 libtool_flags += " -static";
343 } else {
344 if(!project->isEmpty("QMAKE_LIB_FLAG")) {
345 int maj = project->first("VER_MAJ").toInt();
346 int min = project->first("VER_MIN").toInt();
347 int pat = project->first("VER_PAT").toInt();
348 comp_flags += " -version-info " + QString::number(10*maj + min) +
349 ":" + QString::number(pat) + ":0";
350 if(libtoolify[i] != "QMAKE_AR_CMD") {
351 QString rpath = Option::output_dir;
352 if(!project->isEmpty("DESTDIR")) {
353 rpath = project->first("DESTDIR");
354 if(QDir::isRelativePath(rpath))
355 rpath.prepend(Option::output_dir + Option::dir_sep);
356 }
357 comp_flags += " -rpath " + Option::fixPathToTargetOS(rpath, FALSE);
358 }
359 }
360 }
361 if(project->isActiveConfig("plugin"))
362 libtool_flags += " -module";
363 } else {
364 libtool_flags += " --mode=compile";
365 }
366 l.first().prepend("$(LIBTOOL)" + libtool_flags + " ");
367 if(!comp_flags.isEmpty())
368 l.first() += comp_flags;
369 }
370 }
371 }
286} 372}
287 373
288QStringList 374QStringList
289UnixMakefileGenerator::uniqueSetLFlags(const QStringList &list1, QStringList &list2) 375UnixMakefileGenerator::combineSetLFlags(const QStringList &list1, const QStringList &list2)
290{ 376{
377 if(project->isActiveConfig("no_smart_library_merge"))
378 return list1 + list2;
379
291 QStringList ret; 380 QStringList ret;
292 for(QStringList::ConstIterator it = list1.begin(); it != list1.end(); ++it) { 381 for(int i = 0; i < 2; i++) {
293 bool unique = TRUE; 382 const QStringList *lst = i ? &list2 : &list1;
383 for(QStringList::ConstIterator it = lst->begin(); it != lst->end(); ++it) {
294 if((*it).startsWith("-")) { 384 if((*it).startsWith("-")) {
295 if((*it).startsWith("-l") || (*it).startsWith("-L")) { 385 if((*it).startsWith("-L")) {
296 unique = list2.findIndex((*it)) == -1; 386 if(ret.findIndex((*it)) == -1)
387 ret.append((*it));
388 } else if((*it).startsWith("-l")) {
389 while(1) {
390 QStringList::Iterator idx = ret.find((*it));
391 if(idx == ret.end())
392 break;
393 ret.remove(idx);
394 }
395 ret.append((*it));
297 } else if(project->isActiveConfig("macx") && (*it).startsWith("-framework")) { 396 } else if(project->isActiveConfig("macx") && (*it).startsWith("-framework")) {
298 int as_one = TRUE; 397 int as_one = TRUE;
299 QString framework_in; 398 QString framework_in;
300 if((*it).length() > 11) { 399 if((*it).length() > 11) {
301 framework_in = (*it).mid(11); 400 framework_in = (*it).mid(11);
302 } else { 401 } else {
303 if(it != list1.end()) { 402 if(it != lst->end()) {
304 ++it; 403 ++it;
305 as_one = FALSE; 404 as_one = FALSE;
306 framework_in = (*it); 405 framework_in = (*it);
307 } 406 }
308 } 407 }
309 if(!framework_in.isEmpty()) { 408 if(!framework_in.isEmpty()) {
310 for(QStringList::ConstIterator outit = list2.begin(); outit != list2.end(); ++outit) { 409 for(QStringList::Iterator outit = ret.begin(); outit != ret.end(); ++outit) {
311 if((*outit).startsWith("-framework")) { 410 if((*outit).startsWith("-framework")) {
312 QString framework_out; 411 int found = 0;
313 if((*outit).length() > 11) { 412 if((*outit).length() > 11) {
314 framework_out = (*outit).mid(11); 413 if(framework_in == (*outit).mid(11))
414 found = 1;
315 } else { 415 } else {
316 if(it != list2.end()) { 416 if(it != lst->end()) {
317 ++outit; 417 ++outit;
318 framework_out = (*outit); 418 if(framework_in == (*outit)) {
419 --outit;
420 found = 2;
319 } 421 }
320 } 422 }
321 if(framework_out == framework_in) {
322 unique = FALSE;
323 break;
324 } 423 }
424 for(int i = 0; i < found; i++)
425 outit = ret.remove(outit);
325 } 426 }
326 } 427 }
327 if(unique) {
328 unique = FALSE; //because I'm about to just insert it myself
329 if(as_one) { 428 if(as_one) {
330 ret.append("-framework " + framework_in); 429 ret.append("-framework " + framework_in);
331 } else { 430 } else {
@@ -333,29 +432,107 @@ UnixMakefileGenerator::uniqueSetLFlags(const QStringList &list1, QStringList &li
333 ret.append(framework_in); 432 ret.append(framework_in);
334 } 433 }
335 } 434 }
336 }
337 } else { 435 } else {
338 unique = (list2.findIndex((*it)) == -1); 436#if 1
437 while(1) {
438 QStringList::Iterator idx = ret.find((*it));
439 if(idx == ret.end())
440 break;
441 ret.remove(idx);
339 } 442 }
340 } else if(QFile::exists((*it))) { 443#endif
341 unique = (list2.findIndex((*it)) == -1); 444 ret.append((*it));
445 }
446 } else /*if(QFile::exists((*it)))*/ {
447 while(1) {
448 QStringList::Iterator idx = ret.find((*it));
449 if(idx == ret.end())
450 break;
451 ret.remove(idx);
342 } 452 }
343 if(unique)
344 ret.append((*it)); 453 ret.append((*it));
345 } 454 }
455 }
456 }
346 return ret; 457 return ret;
347} 458}
348 459
349
350void 460void
351UnixMakefileGenerator::processPrlVariable(const QString &var, const QStringList &l) 461UnixMakefileGenerator::processPrlVariable(const QString &var, const QStringList &l)
352{ 462{
353 if(var == "QMAKE_PRL_LIBS") 463 if(var == "QMAKE_PRL_LIBS")
354 project->variables()["QMAKE_CURRENT_PRL_LIBS"] += uniqueSetLFlags(l, project->variables()["QMAKE_LIBS"]); 464 project->variables()["QMAKE_CURRENT_PRL_LIBS"] = combineSetLFlags(project->variables()["QMAKE_CURRENT_PRL_LIBS"] +
465 project->variables()["QMAKE_LIBS"], l);
355 else 466 else
356 MakefileGenerator::processPrlVariable(var, l); 467 MakefileGenerator::processPrlVariable(var, l);
357} 468}
358 469
470QString
471UnixMakefileGenerator::findDependency(const QString &dep)
472{
473 QStringList::Iterator it;
474 {
475 QStringList &qut = project->variables()["QMAKE_EXTRA_UNIX_TARGETS"];
476 for(it = qut.begin(); it != qut.end(); ++it) {
477 QString targ = var((*it) + ".target");
478 if(targ.isEmpty())
479 targ = (*it);
480 if(targ.endsWith(dep))
481 return targ;
482 }
483 }
484 {
485 QStringList &quc = project->variables()["QMAKE_EXTRA_UNIX_COMPILERS"];
486 for(it = quc.begin(); it != quc.end(); ++it) {
487 QString tmp_out = project->variables()[(*it) + ".output"].first();
488 QString tmp_cmd = project->variables()[(*it) + ".commands"].join(" ");
489 if(tmp_out.isEmpty() || tmp_cmd.isEmpty())
490 continue;
491 QStringList &tmp = project->variables()[(*it) + ".input"];
492 for(QStringList::Iterator it2 = tmp.begin(); it2 != tmp.end(); ++it2) {
493 QStringList &inputs = project->variables()[(*it2)];
494 for(QStringList::Iterator input = inputs.begin(); input != inputs.end(); ++input) {
495 QString out = tmp_out;
496 QFileInfo fi(Option::fixPathToLocalOS((*input)));
497 out.replace("${QMAKE_FILE_BASE}", fi.baseName());
498 out.replace("${QMAKE_FILE_NAME}", fi.fileName());
499 if(out.endsWith(dep))
500 return out;
501 }
502 }
503 }
504 }
505 return MakefileGenerator::findDependency(dep);
506}
507
508QStringList
509&UnixMakefileGenerator::findDependencies(const QString &file)
510{
511 QStringList &ret = MakefileGenerator::findDependencies(file);
512 // Note: The QMAKE_IMAGE_COLLECTION file have all images
513 // as dependency, so don't add precompiled header then
514 if(doPrecompiledHeaders() && !project->isEmpty("PRECOMPILED_HEADER")
515 && file != project->first("QMAKE_IMAGE_COLLECTION")) {
516 QString header_prefix = project->first("QMAKE_ORIG_TARGET") + ".gch" + Option::dir_sep;
517 header_prefix += project->first("QMAKE_PRECOMP_PREFIX");
518 if(file.endsWith(".c")) {
519 QString precomp_h = header_prefix + "c";
520 if(!ret.contains(precomp_h))
521 ret += precomp_h;
522 } else {
523 for(QStringList::Iterator it = Option::cpp_ext.begin(); it != Option::cpp_ext.end(); ++it) {
524 if(file.endsWith(*it)) {
525 QString precomp_h = header_prefix + "c++";
526 if(!ret.contains(precomp_h))
527 ret += precomp_h;
528 break;
529 }
530 }
531 }
532 }
533 return ret;
534}
535
359bool 536bool
360UnixMakefileGenerator::findLibraries() 537UnixMakefileGenerator::findLibraries()
361{ 538{
@@ -400,7 +577,7 @@ UnixMakefileGenerator::findLibraries()
400 } 577 }
401 } 578 }
402 if(!stub.isEmpty()) { 579 if(!stub.isEmpty()) {
403 const QString modifs[] = { "-mt", QString::null }; 580 const QString modifs[] = { "", "-mt", QString::null };
404 for(int modif = 0; !modifs[modif].isNull(); modif++) { 581 for(int modif = 0; !modifs[modif].isNull(); modif++) {
405 bool found = FALSE; 582 bool found = FALSE;
406 QStringList extens; 583 QStringList extens;
@@ -431,8 +608,18 @@ UnixMakefileGenerator::findLibraries()
431 } 608 }
432 } 609 }
433 } 610 }
611 if(!found && project->isActiveConfig("compile_libtool")) {
612 for(MakefileDependDir *mdd = libdirs.first(); mdd; mdd = libdirs.next() ) {
613 if(QFile::exists(mdd->local_dir + Option::dir_sep + "lib" + stub + modifs[modif] + Option::libtool_ext)) {
614 (*it) = mdd->real_dir + Option::dir_sep + "lib" + stub + modifs[modif] + Option::libtool_ext;
615 found = TRUE;
616 break;
617 }
618 }
619 }
434 if(found) 620 if(found)
435 break; 621 break;
622
436 } 623 }
437 } 624 }
438 } 625 }
@@ -440,6 +627,14 @@ UnixMakefileGenerator::findLibraries()
440 return FALSE; 627 return FALSE;
441} 628}
442 629
630QString linkLib(const QString &file, const QString &libName) {
631 QString ret;
632 QRegExp reg("^.*lib(" + libName + "[^./=]*).*$");
633 if(reg.exactMatch(file))
634 ret = "-l" + reg.cap(1);
635 return ret;
636}
637
443void 638void
444UnixMakefileGenerator::processPrlFiles() 639UnixMakefileGenerator::processPrlFiles()
445{ 640{
@@ -453,7 +648,7 @@ UnixMakefileGenerator::processPrlFiles()
453 QStringList &l = project->variables()[lflags[i]]; 648 QStringList &l = project->variables()[lflags[i]];
454 for(QStringList::Iterator it = l.begin(); it != l.end(); ++it) { 649 for(QStringList::Iterator it = l.begin(); it != l.end(); ++it) {
455 project->variables()["QMAKE_CURRENT_PRL_LIBS"].clear(); 650 project->variables()["QMAKE_CURRENT_PRL_LIBS"].clear();
456 QString opt = (*it).stripWhiteSpace();; 651 QString opt = (*it).stripWhiteSpace();
457 if(opt.startsWith("-")) { 652 if(opt.startsWith("-")) {
458 if(opt.startsWith("-L")) { 653 if(opt.startsWith("-L")) {
459 QString r = opt.right(opt.length() - 2), l = r; 654 QString r = opt.right(opt.length() - 2), l = r;
@@ -461,16 +656,22 @@ UnixMakefileGenerator::processPrlFiles()
461 libdirs.append(new MakefileDependDir(r.replace("\"",""), 656 libdirs.append(new MakefileDependDir(r.replace("\"",""),
462 l.replace("\"",""))); 657 l.replace("\"","")));
463 } else if(opt.startsWith("-l") && !processed[opt]) { 658 } else if(opt.startsWith("-l") && !processed[opt]) {
464 QString lib = opt.right(opt.length() - 2), prl; 659 QString lib = opt.right(opt.length() - 2);
465 for(MakefileDependDir *mdd = libdirs.first(); mdd; mdd = libdirs.next() ) { 660 for(MakefileDependDir *mdd = libdirs.first(); mdd; mdd = libdirs.next() ) {
466 prl = mdd->local_dir + Option::dir_sep + "lib" + lib + Option::prl_ext; 661 if(!project->isActiveConfig("compile_libtool")) { //give them the .libs..
662 QString la = mdd->local_dir + Option::dir_sep + "lib" + lib + Option::libtool_ext;
663 if(QFile::exists(la) && QFile::exists(mdd->local_dir + Option::dir_sep + ".libs")) {
664 l_out.append("-L" + mdd->real_dir + Option::dir_sep + ".libs");
665 libdirs.append(new MakefileDependDir(mdd->real_dir + Option::dir_sep + ".libs",
666 mdd->local_dir + Option::dir_sep + ".libs"));
667 }
668 }
669
670 QString prl = mdd->local_dir + Option::dir_sep + "lib" + lib;
467 if(processPrlFile(prl)) { 671 if(processPrlFile(prl)) {
468 if(prl.startsWith(mdd->local_dir)) 672 if(prl.startsWith(mdd->local_dir))
469 prl.replace(0, mdd->local_dir.length(), mdd->real_dir); 673 prl.replace(0, mdd->local_dir.length(), mdd->real_dir);
470 QRegExp reg("^.*lib(" + lib + "[^./=]*)\\..*$"); 674 opt = linkLib(prl, lib);
471 if(reg.exactMatch(prl))
472 prl = "-l" + reg.cap(1);
473 opt = prl;
474 processed.insert(opt, (void*)1); 675 processed.insert(opt, (void*)1);
475 ret = TRUE; 676 ret = TRUE;
476 break; 677 break;
@@ -484,22 +685,27 @@ UnixMakefileGenerator::processPrlFiles()
484 opt = (*it); 685 opt = (*it);
485 } 686 }
486 QString prl = "/System/Library/Frameworks/" + opt + 687 QString prl = "/System/Library/Frameworks/" + opt +
487 ".framework/" + opt + Option::prl_ext; 688 ".framework/" + opt;
488 if(processPrlFile(prl)) 689 if(processPrlFile(prl))
489 ret = TRUE; 690 ret = TRUE;
490 l_out.append("-framework"); 691 l_out.append("-framework");
491 } 692 }
492 if(!opt.isEmpty()) 693 if(!opt.isEmpty())
493 l_out.append(opt); 694 l_out.append(opt);
494 l_out += uniqueSetLFlags(project->variables()["QMAKE_CURRENT_PRL_LIBS"], l_out); 695 l_out = combineSetLFlags(l_out, project->variables()["QMAKE_CURRENT_PRL_LIBS"]);
495 } else { 696 } else {
496 if(!processed[opt] && processPrlFile(opt)) { 697 QString lib = opt;
497 processed.insert(opt, (void*)1); 698 if(!processed[lib] && processPrlFile(lib)) {
699 processed.insert(lib, (void*)1);
498 ret = TRUE; 700 ret = TRUE;
499 } 701 }
702#if 0
703 if(ret)
704 opt = linkLib(lib, "");
705#endif
500 if(!opt.isEmpty()) 706 if(!opt.isEmpty())
501 l_out.append(opt); 707 l_out.append(opt);
502 l_out += uniqueSetLFlags(project->variables()["QMAKE_CURRENT_PRL_LIBS"], l_out); 708 l_out = combineSetLFlags(l_out, project->variables()["QMAKE_CURRENT_PRL_LIBS"]);
503 } 709 }
504 } 710 }
505 if(ret && l != l_out) 711 if(ret && l != l_out)
@@ -537,17 +743,65 @@ UnixMakefileGenerator::defaultInstall(const QString &t)
537 resource = TRUE; 743 resource = TRUE;
538 } 744 }
539 } else if(project->first("TEMPLATE") == "lib") { 745 } else if(project->first("TEMPLATE") == "lib") {
540 if(project->isActiveConfig("create_prl") && !project->isEmpty("QMAKE_INTERNAL_PRL_FILE")) { 746 if(project->isActiveConfig("create_prl") && !project->isActiveConfig("no_install_prl") &&
747 !project->isEmpty("QMAKE_INTERNAL_PRL_FILE")) {
541 QString dst_prl = project->first("QMAKE_INTERNAL_PRL_FILE"); 748 QString dst_prl = project->first("QMAKE_INTERNAL_PRL_FILE");
542 int slsh = dst_prl.findRev('/'); 749 int slsh = dst_prl.findRev('/');
543 if(slsh != -1) 750 if(slsh != -1)
544 dst_prl = dst_prl.right(dst_prl.length() - slsh - 1); 751 dst_prl = dst_prl.right(dst_prl.length() - slsh - 1);
545 dst_prl = root + targetdir + dst_prl; 752 dst_prl = root + targetdir + dst_prl;
546 ret += "-$(COPY) \"" + project->first("QMAKE_INTERNAL_PRL_FILE") + "\" \"" + dst_prl + "\""; 753 ret += "-$(INSTALL_FILE) \"" + project->first("QMAKE_INTERNAL_PRL_FILE") + "\" \"" + dst_prl + "\"";
547 if(!uninst.isEmpty()) 754 if(!uninst.isEmpty())
548 uninst.append("\n\t"); 755 uninst.append("\n\t");
549 uninst.append("-$(DEL_FILE) \"" + dst_prl + "\""); 756 uninst.append("-$(DEL_FILE) \"" + dst_prl + "\"");
550 } 757 }
758 if(project->isActiveConfig("create_libtool") && !project->isActiveConfig("compile_libtool")) {
759 QString src_lt = var("QMAKE_ORIG_TARGET");
760 int slsh = src_lt.findRev(Option::dir_sep);
761 if(slsh != -1)
762 src_lt = src_lt.right(src_lt.length() - slsh);
763 int dot = src_lt.find('.');
764 if(dot != -1)
765 src_lt = src_lt.left(dot);
766 src_lt += Option::libtool_ext;
767 src_lt.prepend("lib");
768 QString dst_lt = root + targetdir + src_lt;
769 if(!project->isEmpty("DESTDIR")) {
770 src_lt.prepend(var("DESTDIR"));
771 src_lt = Option::fixPathToLocalOS(fileFixify(src_lt,
772 QDir::currentDirPath(), Option::output_dir));
773 }
774 if(!ret.isEmpty())
775 ret += "\n\t";
776 ret += "-$(INSTALL_FILE) \"" + src_lt + "\" \"" + dst_lt + "\"";
777 if(!uninst.isEmpty())
778 uninst.append("\n\t");
779 uninst.append("-$(DEL_FILE) \"" + dst_lt + "\"");
780 }
781 if(project->isActiveConfig("create_pc")) {
782 QString src_pc = var("QMAKE_ORIG_TARGET");
783 int slsh = src_pc.findRev(Option::dir_sep);
784 if(slsh != -1)
785 src_pc = src_pc.right(src_pc.length() - slsh);
786 int dot = src_pc.find('.');
787 if(dot != -1)
788 src_pc = src_pc.left(dot);
789 src_pc += ".pc";
790 QString d = root + targetdir + "pkgconfig" + Option::dir_sep;
791 QString dst_pc = d + src_pc;
792 if(!project->isEmpty("DESTDIR")) {
793 src_pc.prepend(var("DESTDIR"));
794 src_pc = Option::fixPathToLocalOS(fileFixify(src_pc,
795 QDir::currentDirPath(), Option::output_dir));
796 }
797 if(!ret.isEmpty())
798 ret += "\n\t";
799 ret += mkdir_p_asstring(d) + "\n\t";
800 ret += "-$(INSTALL_FILE) \"" + src_pc + "\" \"" + dst_pc + "\"";
801 if(!uninst.isEmpty())
802 uninst.append("\n\t");
803 uninst.append("-$(DEL_FILE) \"" + dst_pc + "\"");
804 }
551 if ( project->isEmpty("QMAKE_CYGWIN_SHLIB") ) { 805 if ( project->isEmpty("QMAKE_CYGWIN_SHLIB") ) {
552 if ( !project->isActiveConfig("staticlib") && !project->isActiveConfig("plugin") ) { 806 if ( !project->isActiveConfig("staticlib") && !project->isActiveConfig("plugin") ) {
553 if ( project->isEmpty("QMAKE_HPUX_SHLIB") ) { 807 if ( project->isEmpty("QMAKE_HPUX_SHLIB") ) {
@@ -558,18 +812,37 @@ UnixMakefileGenerator::defaultInstall(const QString &t)
558 } 812 }
559 } 813 }
560 } 814 }
815
816 if(!resource && project->isActiveConfig("compile_libtool")) {
817 QString src_targ = target;
818 if(src_targ == "$(TARGET)")
819 src_targ = "$(TARGETL)";
820 QString dst_dir = fileFixify(targetdir);
821 if(QDir::isRelativePath(dst_dir))
822 dst_dir = Option::fixPathToTargetOS(Option::output_dir + Option::dir_sep + dst_dir);
823 ret = "-$(LIBTOOL) --mode=install cp \"" + src_targ + "\" \"" + root + dst_dir + "\"";
824 uninst.append("-$(LIBTOOL) --mode=uninstall \"" + src_targ + "\"");
825 } else {
561 QString src_targ = target; 826 QString src_targ = target;
562 if(!destdir.isEmpty()) 827 if(!destdir.isEmpty())
563 src_targ = Option::fixPathToTargetOS(destdir + target, FALSE); 828 src_targ = Option::fixPathToTargetOS(destdir + target, FALSE);
564 QString dst_targ = root + fileFixify(targetdir + target); 829 QString dst_targ = root + fileFixify(targetdir + target,
830 QDir::currentDirPath(), Option::output_dir);
565 if(!ret.isEmpty()) 831 if(!ret.isEmpty())
566 ret += "\n\t"; 832 ret += "\n\t";
567 ret += QString(resource ? "-$(COPY_DIR)" : "-$(COPY)") + " \"" + 833 if(resource)
834 ret += "$(DEL_FILE) -r \"" + dst_targ + "\"" + "\n\t";
835 if(!ret.isEmpty())
836 ret += "\n\t";
837 ret += QString(resource ? "-$(INSTALL_DIR)" : "-$(INSTALL_FILE)") + " \"" +
568 src_targ + "\" \"" + dst_targ + "\""; 838 src_targ + "\" \"" + dst_targ + "\"";
569 if(!project->isActiveConfig("debug") && !project->isEmpty("QMAKE_STRIP")) { 839 if(!project->isActiveConfig("debug") && !project->isEmpty("QMAKE_STRIP") &&
840 (project->first("TEMPLATE") != "lib" || !project->isActiveConfig("staticlib"))) {
570 ret += "\n\t-" + var("QMAKE_STRIP"); 841 ret += "\n\t-" + var("QMAKE_STRIP");
571 if(!project->isEmpty("QMAKE_STRIPFLAGS_LIB") && project->first("TEMPLATE") == "lib") 842 if(project->first("TEMPLATE") == "lib" && !project->isEmpty("QMAKE_STRIPFLAGS_LIB"))
572 ret += " " + var("QMAKE_STRIPFLAGS_LIB"); 843 ret += " " + var("QMAKE_STRIPFLAGS_LIB");
844 else if(project->first("TEMPLATE") == "app" && !project->isEmpty("QMAKE_STRIPFLAGS_APP"))
845 ret += " " + var("QMAKE_STRIPFLAGS_APP");
573 if(resource) 846 if(resource)
574 ret = " \"" + dst_targ + "/Contents/MacOS/$(QMAKE_TARGET)\""; 847 ret = " \"" + dst_targ + "/Contents/MacOS/$(QMAKE_TARGET)\"";
575 else 848 else
@@ -591,7 +864,7 @@ UnixMakefileGenerator::defaultInstall(const QString &t)
591 int lslash = link.findRev(Option::dir_sep); 864 int lslash = link.findRev(Option::dir_sep);
592 if(lslash != -1) 865 if(lslash != -1)
593 link = link.right(link.length() - (lslash + 1)); 866 link = link.right(link.length() - (lslash + 1));
594 QString dst_link = root + fileFixify(targetdir + link); 867 QString dst_link = root + targetdir + link;
595 ret += "\n\t-$(SYMLINK) \"$(TARGET)\" \"" + dst_link + "\""; 868 ret += "\n\t-$(SYMLINK) \"$(TARGET)\" \"" + dst_link + "\"";
596 if(!uninst.isEmpty()) 869 if(!uninst.isEmpty())
597 uninst.append("\n\t"); 870 uninst.append("\n\t");
@@ -599,6 +872,6 @@ UnixMakefileGenerator::defaultInstall(const QString &t)
599 } 872 }
600 } 873 }
601 } 874 }
875 }
602 return ret; 876 return ret;
603} 877}
604
diff --git a/qmake/generators/unix/unixmake.h b/qmake/generators/unix/unixmake.h
index 3d00214..91ec3b1 100644
--- a/qmake/generators/unix/unixmake.h
+++ b/qmake/generators/unix/unixmake.h
@@ -1,13 +1,11 @@
1/**************************************************************************** 1/****************************************************************************
2** $Id$
3** 2**
4** Definition of ________ class.
5** 3**
6** Created : 970521 4** Definition of UnixMakefileGenerator class.
7** 5**
8** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. 6** Copyright (C) 1992-2003 Trolltech AS. All rights reserved.
9** 7**
10** This file is part of the network module of the Qt GUI Toolkit. 8** This file is part of qmake.
11** 9**
12** This file may be distributed under the terms of the Q Public License 10** This file may be distributed under the terms of the Q Public License
13** as defined by Trolltech AS of Norway and appearing in the file 11** as defined by Trolltech AS of Norway and appearing in the file
@@ -34,6 +32,7 @@
34** not clear to you. 32** not clear to you.
35** 33**
36**********************************************************************/ 34**********************************************************************/
35
37#ifndef __UNIXMAKE_H__ 36#ifndef __UNIXMAKE_H__
38#define __UNIXMAKE_H__ 37#define __UNIXMAKE_H__
39 38
@@ -43,19 +42,30 @@ class UnixMakefileGenerator : public MakefileGenerator
43{ 42{
44 bool init_flag, include_deps; 43 bool init_flag, include_deps;
45 bool writeMakefile(QTextStream &); 44 bool writeMakefile(QTextStream &);
46 QStringList uniqueSetLFlags(const QStringList &list1, QStringList &list2); 45 void writeExtraVariables(QTextStream &);
46 QString libtoolFileName();
47 void writeLibtoolFile(); // for libtool
48 QString pkgConfigPrefix() const;
49 QString pkgConfigFileName();
50 QString pkgConfigFixPath(QString) const;
51 void writePkgConfigFile(); // for pkg-config
52 QStringList combineSetLFlags(const QStringList &list1, const QStringList &list2);
53 void writePrlFile(QTextStream &);
47 54
48public: 55public:
49 UnixMakefileGenerator(QMakeProject *p); 56 UnixMakefileGenerator(QMakeProject *p);
50 ~UnixMakefileGenerator(); 57 ~UnixMakefileGenerator();
51 58
52protected: 59protected:
60 virtual bool doPrecompiledHeaders() const { return project->isActiveConfig("precompile_header"); }
53 virtual bool doDepends() const { return !include_deps && MakefileGenerator::doDepends(); } 61 virtual bool doDepends() const { return !include_deps && MakefileGenerator::doDepends(); }
54 virtual QString defaultInstall(const QString &); 62 virtual QString defaultInstall(const QString &);
55 virtual void processPrlVariable(const QString &, const QStringList &); 63 virtual void processPrlVariable(const QString &, const QStringList &);
56 virtual void processPrlFiles(); 64 virtual void processPrlFiles();
57 65
58 virtual bool findLibraries(); 66 virtual bool findLibraries();
67 virtual QString findDependency(const QString &);
68 virtual QStringList &findDependencies(const QString &);
59 virtual void init(); 69 virtual void init();
60 70
61 void writeMakeParts(QTextStream &); 71 void writeMakeParts(QTextStream &);
diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp
index d8a4a0d..21348a6 100644
--- a/qmake/generators/unix/unixmake2.cpp
+++ b/qmake/generators/unix/unixmake2.cpp
@@ -1,13 +1,11 @@
1/**************************************************************************** 1/****************************************************************************
2** $Id$
3** 2**
4** Definition of ________ class.
5** 3**
6** Created : 970521 4** Implementation of UnixMakefileGenerator class.
7** 5**
8** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. 6** Copyright (C) 1992-2003 Trolltech AS. All rights reserved.
9** 7**
10** This file is part of the network module of the Qt GUI Toolkit. 8** This file is part of qmake.
11** 9**
12** This file may be distributed under the terms of the Q Public License 10** This file may be distributed under the terms of the Q Public License
13** as defined by Trolltech AS of Norway and appearing in the file 11** as defined by Trolltech AS of Norway and appearing in the file
@@ -37,23 +35,49 @@
37 35
38#include "unixmake.h" 36#include "unixmake.h"
39#include "option.h" 37#include "option.h"
38#include "meta.h"
40#include <qregexp.h> 39#include <qregexp.h>
41#include <qfile.h> 40#include <qfile.h>
42#include <qdir.h> 41#include <qdir.h>
43#include <time.h> 42#include <time.h>
44 43
44QString mkdir_p_asstring(const QString &dir);
45 45
46UnixMakefileGenerator::UnixMakefileGenerator(QMakeProject *p) : MakefileGenerator(p), init_flag(FALSE), include_deps(FALSE) 46UnixMakefileGenerator::UnixMakefileGenerator(QMakeProject *p) : MakefileGenerator(p), init_flag(FALSE), include_deps(FALSE)
47{ 47{
48 48
49} 49}
50 50
51void
52UnixMakefileGenerator::writePrlFile(QTextStream &t)
53{
54 MakefileGenerator::writePrlFile(t);
55 // libtool support
56 if(project->isActiveConfig("create_libtool") && project->first("TEMPLATE") == "lib") { //write .la
57 if(project->isActiveConfig("compile_libtool"))
58 warn_msg(WarnLogic, "create_libtool specified with compile_libtool can lead to conflicting .la\n"
59 "formats, create_libtool has been disabled\n");
60 else
61 writeLibtoolFile();
62 }
63 // pkg-config support
64 if(project->isActiveConfig("create_pc") && project->first("TEMPLATE") == "lib")
65 writePkgConfigFile();
66}
67
51bool 68bool
52UnixMakefileGenerator::writeMakefile(QTextStream &t) 69UnixMakefileGenerator::writeMakefile(QTextStream &t)
53{ 70{
71
54 writeHeader(t); 72 writeHeader(t);
55 if(!project->variables()["QMAKE_FAILED_REQUIREMENTS"].isEmpty()) { 73 if(!project->variables()["QMAKE_FAILED_REQUIREMENTS"].isEmpty()) {
56 t << "all clean:" << "\n\t" 74 t << "QMAKE = "<< (project->isEmpty("QMAKE_QMAKE") ? QString("qmake") : var("QMAKE_QMAKE")) << endl;
75 { //write the extra unix targets..
76 QStringList &qut = project->variables()["QMAKE_EXTRA_UNIX_TARGETS"];
77 for(QStringList::ConstIterator it = qut.begin(); it != qut.end(); ++it)
78 t << *it << " ";
79 }
80 t << "all clean install distclean mocables uninstall uicables:" << "\n\t"
57 << "@echo \"Some of the required modules (" 81 << "@echo \"Some of the required modules ("
58 << var("QMAKE_FAILED_REQUIREMENTS") << ") are not available.\"" << "\n\t" 82 << var("QMAKE_FAILED_REQUIREMENTS") << ") are not available.\"" << "\n\t"
59 << "@echo \"Skipped.\"" << endl << endl; 83 << "@echo \"Skipped.\"" << endl << endl;
@@ -73,9 +97,31 @@ UnixMakefileGenerator::writeMakefile(QTextStream &t)
73} 97}
74 98
75void 99void
100UnixMakefileGenerator::writeExtraVariables(QTextStream &t)
101{
102 bool first = TRUE;
103 QMap<QString, QStringList> &vars = project->variables();
104 QStringList &exports = project->variables()["QMAKE_EXTRA_UNIX_VARIABLES"];
105 for(QMap<QString, QStringList>::Iterator it = vars.begin(); it != vars.end(); ++it) {
106 for(QStringList::Iterator exp_it = exports.begin(); exp_it != exports.end(); ++exp_it) {
107 QRegExp rx((*exp_it), FALSE, TRUE);
108 if(rx.exactMatch(it.key())) {
109 if(first) {
110 t << "\n####### Custom Variables" << endl;
111 first = FALSE;
112 }
113 t << "EXPORT_" << it.key() << " = " << it.data().join(" ") << endl;
114 }
115 }
116 }
117 if(!first)
118 t << endl;
119}
120
121void
76UnixMakefileGenerator::writeMakeParts(QTextStream &t) 122UnixMakefileGenerator::writeMakeParts(QTextStream &t)
77{ 123{
78 QString deps = fileFixify(Option::output.name()), prl; 124 QString deps = fileFixify(Option::output.name()), target_deps, prl;
79 bool do_incremental = (project->isActiveConfig("incremental") && 125 bool do_incremental = (project->isActiveConfig("incremental") &&
80 !project->variables()["QMAKE_INCREMENTAL"].isEmpty() && 126 !project->variables()["QMAKE_INCREMENTAL"].isEmpty() &&
81 (!project->variables()["QMAKE_APP_FLAG"].isEmpty() || 127 (!project->variables()["QMAKE_APP_FLAG"].isEmpty() ||
@@ -135,9 +181,14 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
135 t << "QMAKE = "<< (project->isEmpty("QMAKE_QMAKE") ? QString("qmake") : var("QMAKE_QMAKE")) << endl; 181 t << "QMAKE = "<< (project->isEmpty("QMAKE_QMAKE") ? QString("qmake") : var("QMAKE_QMAKE")) << endl;
136 t << "TAR = "<< var("QMAKE_TAR") << endl; 182 t << "TAR = "<< var("QMAKE_TAR") << endl;
137 t << "GZIP = " << var("QMAKE_GZIP") << endl; 183 t << "GZIP = " << var("QMAKE_GZIP") << endl;
184 if(project->isActiveConfig("compile_libtool"))
185 t << "LIBTOOL= " << var("QMAKE_LIBTOOL") << endl;
138 t << "COPY = " << var("QMAKE_COPY") << endl; 186 t << "COPY = " << var("QMAKE_COPY") << endl;
139 t << "COPY_FILE= " << var("QMAKE_COPY_FILE") << endl; 187 t << "COPY_FILE= " << var("QMAKE_COPY_FILE") << endl;
140 t << "COPY_DIR = " << var("QMAKE_COPY_DIR") << endl; 188 t << "COPY_DIR = " << var("QMAKE_COPY_DIR") << endl;
189 t << "INSTALL_FILE= " << var("QMAKE_INSTALL_FILE") << endl;
190 t << "INSTALL_DIR = " << var("QMAKE_INSTALL_DIR") << endl;
191
141 t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl; 192 t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl;
142 t << "SYMLINK = " << var("QMAKE_SYMBOLIC_LINK") << endl; 193 t << "SYMLINK = " << var("QMAKE_SYMBOLIC_LINK") << endl;
143 t << "DEL_DIR = " << var("QMAKE_DEL_DIR") << endl; 194 t << "DEL_DIR = " << var("QMAKE_DEL_DIR") << endl;
@@ -220,9 +271,25 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
220 } 271 }
221 if(do_incremental && !moc_incremental && !src_incremental) 272 if(do_incremental && !moc_incremental && !src_incremental)
222 do_incremental = FALSE; 273 do_incremental = FALSE;
274 if(!project->isEmpty("QMAKE_EXTRA_UNIX_COMPILERS")) {
275 t << "OBJCOMP = " << varList("OBJCOMP") << endl;
276 target_deps += " $(OBJCOMP)";
277
278 QStringList &comps = project->variables()["QMAKE_EXTRA_UNIX_COMPILERS"];
279 for(QStringList::Iterator compit = comps.begin(); compit != comps.end(); ++compit) {
280 QStringList &vars = project->variables()[(*compit) + ".variables"];
281 for(QStringList::Iterator varit = vars.begin(); varit != vars.end(); ++varit) {
282 QStringList vals = project->variables()[(*varit)];
283 if(!vals.isEmpty())
284 t << "QMAKE_COMP_" << (*varit) << " = " << valList(vals) << endl;
285 }
286 }
287 }
223 t << "DIST = " << valList(fileFixify(project->variables()["DISTFILES"])) << endl; 288 t << "DIST = " << valList(fileFixify(project->variables()["DISTFILES"])) << endl;
224 t << "QMAKE_TARGET = " << var("QMAKE_ORIG_TARGET") << endl; 289 t << "QMAKE_TARGET = " << var("QMAKE_ORIG_TARGET") << endl;
225 t << "DESTDIR = " << var("DESTDIR") << endl; 290 t << "DESTDIR = " << var("DESTDIR") << endl;
291 if(project->isActiveConfig("compile_libtool"))
292 t << "TARGETL= " << var("TARGET_la") << endl;
226 t << "TARGET = " << var("TARGET") << endl; 293 t << "TARGET = " << var("TARGET") << endl;
227 if(project->isActiveConfig("plugin") ) { 294 if(project->isActiveConfig("plugin") ) {
228 t << "TARGETD = " << var("TARGET") << endl; 295 t << "TARGETD = " << var("TARGET") << endl;
@@ -238,9 +305,10 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
238 t << "TARGET0= " << var("TARGET_") << endl; 305 t << "TARGET0= " << var("TARGET_") << endl;
239 } 306 }
240 } 307 }
308 writeExtraVariables(t);
241 t << endl; 309 t << endl;
242 310
243 // blasted incldues 311 // blasted includes
244 QStringList &qeui = project->variables()["QMAKE_EXTRA_UNIX_INCLUDES"]; 312 QStringList &qeui = project->variables()["QMAKE_EXTRA_UNIX_INCLUDES"];
245 QStringList::Iterator it; 313 QStringList::Iterator it;
246 for( it = qeui.begin(); it != qeui.end(); ++it) 314 for( it = qeui.begin(); it != qeui.end(); ++it)
@@ -249,14 +317,14 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
249 /* rules */ 317 /* rules */
250 t << "first: all" << endl; 318 t << "first: all" << endl;
251 t << "####### Implicit rules" << endl << endl; 319 t << "####### Implicit rules" << endl << endl;
252 t << ".SUFFIXES: .c"; 320 t << ".SUFFIXES: .c " << Option::obj_ext;
253 QStringList::Iterator cppit; 321 QStringList::Iterator cppit;
254 for(cppit = Option::cpp_ext.begin(); cppit != Option::cpp_ext.end(); ++cppit) 322 for(cppit = Option::cpp_ext.begin(); cppit != Option::cpp_ext.end(); ++cppit)
255 t << " " << (*cppit); 323 t << " " << (*cppit);
256 t << endl << endl; 324 t << endl << endl;
257 for(cppit = Option::cpp_ext.begin(); cppit != Option::cpp_ext.end(); ++cppit) 325 for(cppit = Option::cpp_ext.begin(); cppit != Option::cpp_ext.end(); ++cppit)
258 t << (*cppit) << ".o:\n\t" << var("QMAKE_RUN_CXX_IMP") << endl << endl; 326 t << (*cppit) << Option::obj_ext << ":\n\t" << var("QMAKE_RUN_CXX_IMP") << endl << endl;
259 t << ".c.o:\n\t" << var("QMAKE_RUN_CC_IMP") << endl << endl; 327 t << ".c" << Option::obj_ext << ":\n\t" << var("QMAKE_RUN_CC_IMP") << endl << endl;
260 328
261 if(include_deps) { 329 if(include_deps) {
262 QString cmd=var("QMAKE_CFLAGS_DEPS") + " "; 330 QString cmd=var("QMAKE_CFLAGS_DEPS") + " ";
@@ -278,7 +346,6 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
278 << "@test -d $(@D) || mkdir -p $(@D)" << "\n\t" 346 << "@test -d $(@D) || mkdir -p $(@D)" << "\n\t"
279 << "@$(CC) " << cmd << " $< | sed \"s,^\\($(*F).o\\):," << odir << "\\1:,g\" >$@" << endl << endl; 347 << "@$(CC) " << cmd << " $< | sed \"s,^\\($(*F).o\\):," << odir << "\\1:,g\" >$@" << endl << endl;
280 348
281
282 QString src[] = { "SOURCES", "UICIMPLS", "SRCMOC", QString::null }; 349 QString src[] = { "SOURCES", "UICIMPLS", "SRCMOC", QString::null };
283 for(int x = 0; !src[x].isNull(); x++) { 350 for(int x = 0; !src[x].isNull(); x++) {
284 QStringList &l = project->variables()[src[x]]; 351 QStringList &l = project->variables()[src[x]];
@@ -298,10 +365,10 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
298 } 365 }
299 if(!d_file.isEmpty()) { 366 if(!d_file.isEmpty()) {
300 d_file = odir + ".deps/" + d_file + ".d"; 367 d_file = odir + ".deps/" + d_file + ".d";
301 QStringList deps = findDependencies((*it)).grep(QRegExp(Option::moc_ext + "$")); 368 QStringList deps = findDependencies((*it)).grep(QRegExp(Option::cpp_moc_ext + "$"));
302 if(!deps.isEmpty()) 369 if(!deps.isEmpty())
303 t << d_file << ": " << deps.join(" ") << endl; 370 t << d_file << ": " << deps.join(" ") << endl;
304 t << "-include " << d_file << endl; 371 t << var("QMAKE_CFLAGS_USE_PRECOMPILE") << " " << d_file << endl;
305 } 372 }
306 } 373 }
307 } 374 }
@@ -323,17 +390,17 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
323 QStringList &l = project->variables()["QMAKE_PRL_INTERNAL_FILES"]; 390 QStringList &l = project->variables()["QMAKE_PRL_INTERNAL_FILES"];
324 QStringList::Iterator it; 391 QStringList::Iterator it;
325 for(it = l.begin(); it != l.end(); ++it) { 392 for(it = l.begin(); it != l.end(); ++it) {
326 QMakeProject proj; 393 QMakeMetaInfo libinfo;
327 if(proj.read((*it), QDir::currentDirPath()) && !proj.isEmpty("QMAKE_PRL_BUILD_DIR")) { 394 if(libinfo.readLib((*it)) && !libinfo.isEmpty("QMAKE_PRL_BUILD_DIR")) {
328 QString dir; 395 QString dir;
329 int slsh = (*it).findRev(Option::dir_sep); 396 int slsh = (*it).findRev(Option::dir_sep);
330 if(slsh != -1) 397 if(slsh != -1)
331 dir = (*it).left(slsh + 1); 398 dir = (*it).left(slsh + 1);
332 QString targ = dir + proj.first("QMAKE_PRL_TARGET"); 399 QString targ = dir + libinfo.first("QMAKE_PRL_TARGET");
333 deps += " " + targ; 400 deps += " " + targ;
334 t << targ << ":" << "\n\t" 401 t << targ << ":" << "\n\t"
335 << "@echo \"Creating '" << targ << "'\"" << "\n\t" 402 << "@echo \"Creating '" << targ << "'\"" << "\n\t"
336 << "(cd " << proj.first("QMAKE_PRL_BUILD_DIR") << ";" 403 << "(cd " << libinfo.first("QMAKE_PRL_BUILD_DIR") << ";"
337 << "$(MAKE) )" << endl; 404 << "$(MAKE) )" << endl;
338 } 405 }
339 } 406 }
@@ -392,13 +459,13 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
392 << endl << endl; 459 << endl << endl;
393 460
394 //real target 461 //real target
395 t << var("TARGET") << ": " << var("PRE_TARGETDEPS") << " " << incr_deps 462 t << var("TARGET") << ": " << var("PRE_TARGETDEPS") << " " << incr_deps << " " << target_deps
396 << " " << var("POST_TARGETDEPS") << "\n\t"; 463 << " " << var("POST_TARGETDEPS") << "\n\t";
397 if(!destdir.isEmpty()) 464 if(!destdir.isEmpty())
398 t << "\n\t" << "test -d " << destdir << " || mkdir -p " << destdir << "\n\t"; 465 t << "\n\t" << "test -d " << destdir << " || mkdir -p " << destdir << "\n\t";
399 if(!project->isEmpty("QMAKE_PRE_LINK")) 466 if(!project->isEmpty("QMAKE_PRE_LINK"))
400 t << var("QMAKE_PRE_LINK") << "\n\t"; 467 t << var("QMAKE_PRE_LINK") << "\n\t";
401 t << "$(LINK) $(LFLAGS) -o $(TARGET) " << incr_deps << " " << incr_objs << " $(LIBS)"; 468 t << "$(LINK) $(LFLAGS) -o $(TARGET) " << incr_deps << " " << incr_objs << " $(OBJCOMP) $(LIBS)";
402 if(!project->isEmpty("QMAKE_POST_LINK")) 469 if(!project->isEmpty("QMAKE_POST_LINK"))
403 t << "\n\t" << var("QMAKE_POST_LINK"); 470 t << "\n\t" << var("QMAKE_POST_LINK");
404 t << endl << endl; 471 t << endl << endl;
@@ -407,12 +474,12 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
407 << endl << endl; 474 << endl << endl;
408 475
409 t << "$(TARGET): " << var("PRE_TARGETDEPS") << " $(UICDECLS) $(OBJECTS) $(OBJMOC) " 476 t << "$(TARGET): " << var("PRE_TARGETDEPS") << " $(UICDECLS) $(OBJECTS) $(OBJMOC) "
410 << var("POST_TARGETDEPS") << "\n\t"; 477 << target_deps << " " << var("POST_TARGETDEPS") << "\n\t";
411 if(!destdir.isEmpty()) 478 if(!destdir.isEmpty())
412 t << "test -d " << destdir << " || mkdir -p " << destdir << "\n\t"; 479 t << "test -d " << destdir << " || mkdir -p " << destdir << "\n\t";
413 if(!project->isEmpty("QMAKE_PRE_LINK")) 480 if(!project->isEmpty("QMAKE_PRE_LINK"))
414 t << var("QMAKE_PRE_LINK") << "\n\t"; 481 t << var("QMAKE_PRE_LINK") << "\n\t";
415 t << "$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS)"; 482 t << "$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(OBJCOMP) $(LIBS)";
416 if(!project->isEmpty("QMAKE_POST_LINK")) 483 if(!project->isEmpty("QMAKE_POST_LINK"))
417 t << "\n\t" << var("QMAKE_POST_LINK"); 484 t << "\n\t" << var("QMAKE_POST_LINK");
418 t << endl << endl; 485 t << endl << endl;
@@ -469,19 +536,23 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
469 536
470 //real target 537 //real target
471 t << var("DESTDIR_TARGET") << ": " << var("PRE_TARGETDEPS") << " " 538 t << var("DESTDIR_TARGET") << ": " << var("PRE_TARGETDEPS") << " "
472 << incr_deps << " $(SUBLIBS) " << var("POST_TARGETDEPS"); 539 << incr_deps << " $(SUBLIBS) " << target_deps << " " << var("POST_TARGETDEPS");
473 } else { 540 } else {
474 t << "all: " << deps << " " << varGlue("ALL_DEPS",""," ","") << " " << 541 t << "all: " << deps << " " << varGlue("ALL_DEPS",""," ","") << " " <<
475 var("DESTDIR_TARGET") << endl << endl; 542 var("DESTDIR_TARGET") << endl << endl;
476 t << var("DESTDIR_TARGET") << ": " << var("PRE_TARGETDEPS") 543 t << var("DESTDIR_TARGET") << ": " << var("PRE_TARGETDEPS")
477 << " $(UICDECLS) $(OBJECTS) $(OBJMOC) $(SUBLIBS) " << var("POST_TARGETDEPS"); 544 << " $(UICDECLS) $(OBJECTS) $(OBJMOC) $(SUBLIBS) $(OBJCOMP) " << target_deps
545 << " " << var("POST_TARGETDEPS");
478 } 546 }
479 if(!destdir.isEmpty()) 547 if(!destdir.isEmpty())
480 t << "\n\t" << "test -d " << destdir << " || mkdir -p " << destdir; 548 t << "\n\t" << "test -d " << destdir << " || mkdir -p " << destdir;
481 if(!project->isEmpty("QMAKE_PRE_LINK")) 549 if(!project->isEmpty("QMAKE_PRE_LINK"))
482 t << "\n\t" << var("QMAKE_PRE_LINK"); 550 t << "\n\t" << var("QMAKE_PRE_LINK");
483 551
484 if(project->isActiveConfig("plugin")) { 552 if(project->isActiveConfig("compile_libtool")) {
553 t << "\n\t"
554 << var("QMAKE_LINK_SHLIB_CMD");
555 } else if(project->isActiveConfig("plugin")) {
485 t << "\n\t" 556 t << "\n\t"
486 << "-$(DEL_FILE) $(TARGET)" << "\n\t" 557 << "-$(DEL_FILE) $(TARGET)" << "\n\t"
487 << var("QMAKE_LINK_SHLIB_CMD"); 558 << var("QMAKE_LINK_SHLIB_CMD");
@@ -526,7 +597,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
526 597
527 if (! project->isActiveConfig("plugin")) { 598 if (! project->isActiveConfig("plugin")) {
528 t << "staticlib: $(TARGETA)" << endl << endl; 599 t << "staticlib: $(TARGETA)" << endl << endl;
529 t << "$(TARGETA): " << var("PRE_TARGETDEPS") << " $(UICDECLS) $(OBJECTS) $(OBJMOC)"; 600 t << "$(TARGETA): " << var("PRE_TARGETDEPS") << " $(UICDECLS) $(OBJECTS) $(OBJMOC) $(OBJCOMP)";
530 if(do_incremental) 601 if(do_incremental)
531 t << " $(INCREMENTAL_OBJECTS) $(INCREMENTAL_OBJMOC)"; 602 t << " $(INCREMENTAL_OBJECTS) $(INCREMENTAL_OBJMOC)";
532 t << var("POST_TARGETDEPS") << "\n\t" 603 t << var("POST_TARGETDEPS") << "\n\t"
@@ -544,7 +615,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
544 << "staticlib: " << var("DESTDIR") << "$(TARGET)" << "\n\n"; 615 << "staticlib: " << var("DESTDIR") << "$(TARGET)" << "\n\n";
545 if(project->isEmpty("QMAKE_AR_SUBLIBS")) { 616 if(project->isEmpty("QMAKE_AR_SUBLIBS")) {
546 t << var("DESTDIR") << "$(TARGET): " << var("PRE_TARGETDEPS") 617 t << var("DESTDIR") << "$(TARGET): " << var("PRE_TARGETDEPS")
547 << " $(UICDECLS) $(OBJECTS) $(OBJMOC) " << var("POST_TARGETDEPS") << "\n\t"; 618 << " $(UICDECLS) $(OBJECTS) $(OBJMOC) $(OBJCOMP) " << var("POST_TARGETDEPS") << "\n\t";
548 if(!project->isEmpty("DESTDIR")) { 619 if(!project->isEmpty("DESTDIR")) {
549 QString destdir = project->first("DESTDIR"); 620 QString destdir = project->first("DESTDIR");
550 t << "test -d " << destdir << " || mkdir -p " << destdir << "\n\t"; 621 t << "test -d " << destdir << " || mkdir -p " << destdir << "\n\t";
@@ -560,7 +631,8 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
560 << "\t" << "-$(MOVE) $(TARGET) " << var("DESTDIR") << "\n"; 631 << "\t" << "-$(MOVE) $(TARGET) " << var("DESTDIR") << "\n";
561 } else { 632 } else {
562 int max_files = project->first("QMAKE_MAX_FILES_PER_AR").toInt(); 633 int max_files = project->first("QMAKE_MAX_FILES_PER_AR").toInt();
563 QStringList objs = project->variables()["OBJECTS"] + project->variables()["OBJMOC"], 634 QStringList objs = project->variables()["OBJECTS"] + project->variables()["OBJMOC"] +
635 project->variables()["OBJCOMP"],
564 libs = project->variables()["QMAKE_AR_SUBLIBS"]; 636 libs = project->variables()["QMAKE_AR_SUBLIBS"];
565 libs.prepend("$(TARGET)"); 637 libs.prepend("$(TARGET)");
566 for(QStringList::Iterator libit = libs.begin(), objit = objs.begin(); 638 for(QStringList::Iterator libit = libs.begin(), objit = objs.begin();
@@ -597,21 +669,44 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
597 t << endl << endl; 669 t << endl << endl;
598 } 670 }
599 671
600 t << "mocables: $(SRCMOC)" << endl << endl; 672 t << "mocables: $(SRCMOC)" << endl
673 << "uicables: $(UICDECLS) $(UICIMPLS)" << endl << endl;
601 674
602 if(!project->isActiveConfig("no_mocdepend")) { 675 if(!project->isActiveConfig("no_mocdepend")) {
603 //this is an implicity depend on moc, so it will be built if necesary, however 676 //this is an implicity depend on moc, so it will be built if necesary, however
604 //moc itself shouldn't have this dependency - this is a little kludgy but it is 677 //moc itself shouldn't have this dependency - this is a little kludgy but it is
605 //better than the alternative for now. 678 //better than the alternative for now.
606 QString moc = project->first("QMAKE_MOC"), target = project->first("TARGET"); 679 QString moc = project->first("QMAKE_MOC"), target = project->first("TARGET"),
680 moc_dir = "$(QTDIR)/src/moc";
681 if(!project->isEmpty("QMAKE_MOC_SRC"))
682 moc_dir = project->first("QMAKE_MOC_SRC");
607 fixEnvVariables(target); 683 fixEnvVariables(target);
608 fixEnvVariables(moc); 684 fixEnvVariables(moc);
609 if(target != moc) 685 if(target != moc)
610 t << "$(MOC): \n\t" 686 t << "$(MOC): \n\t"
611 << "( cd $(QTDIR)/src/moc ; $(MAKE) )" << endl << endl; 687 << "( cd " << moc_dir << " && $(MAKE) )" << endl << endl;
612 } 688 }
613 689
614 writeMakeQmake(t); 690 writeMakeQmake(t);
691 if(project->isEmpty("QMAKE_FAILED_REQUIREMENTS") && !project->isActiveConfig("no_autoqmake")) {
692 QString meta_files;
693 if(project->isActiveConfig("create_libtool") && project->first("TEMPLATE") == "lib" &&
694 !project->isActiveConfig("compile_libtool")) { //libtool
695 if(!meta_files.isEmpty())
696 meta_files += " ";
697 meta_files += libtoolFileName();
698 }
699 if(project->isActiveConfig("create_pc") && project->first("TEMPLATE") == "lib") { //pkg-config
700 if(!meta_files.isEmpty())
701 meta_files += " ";
702 meta_files += pkgConfigFileName();
703 }
704 if(!meta_files.isEmpty()) {
705 QStringList files = fileFixify(Option::mkfile::project_files);
706 t << meta_files << ": " << "\n\t"
707 << "@$(QMAKE) -prl " << buildArgs() << " " << files.join(" ") << endl;
708 }
709 }
615 710
616 if(!project->first("QMAKE_PKGINFO").isEmpty()) { 711 if(!project->first("QMAKE_PKGINFO").isEmpty()) {
617 QString pkginfo = project->first("QMAKE_PKGINFO"); 712 QString pkginfo = project->first("QMAKE_PKGINFO");
@@ -630,12 +725,14 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
630 if(!destdir.isEmpty()) 725 if(!destdir.isEmpty())
631 t << "@test -d " << destdir << " || mkdir -p " << destdir << "\n\t"; 726 t << "@test -d " << destdir << " || mkdir -p " << destdir << "\n\t";
632 t << "@$(DEL_FILE) " << info_plist_out << "\n\t" 727 t << "@$(DEL_FILE) " << info_plist_out << "\n\t"
633 << "@cp \"" << info_plist << "\" \"" << info_plist_out << "\"" << endl; 728 << "@sed -e \"s,@ICON@,application.icns,g\" -e \"s,@EXECUTABLE@," << var("QMAKE_ORIG_TARGET")
729 << ",g\" \"" << info_plist << "\" >\"" << info_plist_out << "\"" << endl;
634 if(!project->first("RC_FILE").isEmpty()) { 730 if(!project->first("RC_FILE").isEmpty()) {
635 QString dir = destdir + "../Resources/"; 731 QString dir = destdir + "../Resources/";
636 t << dir << "application.icns:" << "\n\t" 732 t << dir << "application.icns: " << var("RC_FILE") << "\n\t"
637 << "@test -d " << dir << " || mkdir -p " << dir << "\n\t" 733 << "@test -d " << dir << " || mkdir -p " << dir << "\n\t"
638 << "@cp " << var("RC_FILE") << " " << dir << "application.icns" << endl; 734 << "@$(DEL_FILE) " << dir << "application.icns" << "\n\t"
735 << "@$(COPY_FILE) " << var("RC_FILE") << " " << dir << "application.icns" << endl;
639 } 736 }
640 } 737 }
641 738
@@ -648,6 +745,8 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
648 << "$(COPY_FILE) --parents $(SOURCES) $(HEADERS) $(FORMS) $(DIST) " << ddir_c << Option::dir_sep << " && "; 745 << "$(COPY_FILE) --parents $(SOURCES) $(HEADERS) $(FORMS) $(DIST) " << ddir_c << Option::dir_sep << " && ";
649 if(!project->isEmpty("TRANSLATIONS")) 746 if(!project->isEmpty("TRANSLATIONS"))
650 t << "$(COPY_FILE) --parents " << var("TRANSLATIONS") << " " << ddir_c << Option::dir_sep << " && "; 747 t << "$(COPY_FILE) --parents " << var("TRANSLATIONS") << " " << ddir_c << Option::dir_sep << " && ";
748 if(!project->isEmpty("IMAGES"))
749 t << "$(COPY_FILE) --parents " << var("IMAGES") << " " << ddir_c << Option::dir_sep << " && ";
651 if(!project->isEmpty("FORMS")) { 750 if(!project->isEmpty("FORMS")) {
652 QStringList &forms = project->variables()["FORMS"], ui_headers; 751 QStringList &forms = project->variables()["FORMS"], ui_headers;
653 for(QStringList::Iterator formit = forms.begin(); formit != forms.end(); ++formit) { 752 for(QStringList::Iterator formit = forms.begin(); formit != forms.end(); ++formit) {
@@ -666,8 +765,8 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
666 << endl << endl; 765 << endl << endl;
667 766
668 QString clean_targets; 767 QString clean_targets;
669 if(mocAware()) {
670 t << "mocclean:" << "\n"; 768 t << "mocclean:" << "\n";
769 if(mocAware()) {
671 if(!objMoc.isEmpty() || !srcMoc.isEmpty() || moc_incremental) { 770 if(!objMoc.isEmpty() || !srcMoc.isEmpty() || moc_incremental) {
672 if(!objMoc.isEmpty()) 771 if(!objMoc.isEmpty())
673 t << "\t-$(DEL_FILE) $(OBJMOC)" << '\n'; 772 t << "\t-$(DEL_FILE) $(OBJMOC)" << '\n';
@@ -697,8 +796,8 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
697 dir = fileFixify(dir, QDir::currentDirPath(), Option::output_dir); 796 dir = fileFixify(dir, QDir::currentDirPath(), Option::output_dir);
698 if(!dir.isEmpty() && dir.right(Option::dir_sep.length()) != Option::dir_sep) 797 if(!dir.isEmpty() && dir.right(Option::dir_sep.length()) != Option::dir_sep)
699 dir += Option::dir_sep; 798 dir += Option::dir_sep;
700 clean << dir + fi.baseName(TRUE) + Option::yacc_mod + Option::cpp_ext.first(); 799 clean << ( dir + fi.baseName(TRUE) + Option::yacc_mod + Option::cpp_ext.first() );
701 clean << dir + fi.baseName(TRUE) + Option::yacc_mod + Option::h_ext.first(); 800 clean << ( dir + fi.baseName(TRUE) + Option::yacc_mod + Option::h_ext.first() );
702 } 801 }
703 if(!clean.isEmpty()) { 802 if(!clean.isEmpty()) {
704 t << "\t-$(DEL_FILE) " << clean.join(" ") << "\n"; 803 t << "\t-$(DEL_FILE) " << clean.join(" ") << "\n";
@@ -717,7 +816,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
717 dir = fileFixify(dir, QDir::currentDirPath(), Option::output_dir); 816 dir = fileFixify(dir, QDir::currentDirPath(), Option::output_dir);
718 if(!dir.isEmpty() && dir.right(Option::dir_sep.length()) != Option::dir_sep) 817 if(!dir.isEmpty() && dir.right(Option::dir_sep.length()) != Option::dir_sep)
719 dir += Option::dir_sep; 818 dir += Option::dir_sep;
720 clean << dir + fi.baseName(TRUE) + Option::lex_mod + Option::cpp_ext.first(); 819 clean << ( dir + fi.baseName(TRUE) + Option::lex_mod + Option::cpp_ext.first() );
721 } 820 }
722 if(!clean.isEmpty()) { 821 if(!clean.isEmpty()) {
723 t << "\t-$(DEL_FILE) " << clean.join(" ") << "\n"; 822 t << "\t-$(DEL_FILE) " << clean.join(" ") << "\n";
@@ -735,8 +834,18 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
735 } 834 }
736 835
737 t << "clean:" << clean_targets << "\n\t"; 836 t << "clean:" << clean_targets << "\n\t";
738 if(!project->isEmpty("OBJECTS")) 837 if(!project->isEmpty("OBJECTS")) {
838 if(project->isActiveConfig("compile_libtool"))
839 t << "-$(LIBTOOL) --mode=clean $(DEL_FILE) $(OBJECTS)" << "\n\t";
840 else
739 t << "-$(DEL_FILE) $(OBJECTS) " << "\n\t"; 841 t << "-$(DEL_FILE) $(OBJECTS) " << "\n\t";
842 }
843 if(doPrecompiledHeaders() && !project->isEmpty("PRECOMPILED_HEADER")) {
844 QString header_prefix = project->first("QMAKE_PRECOMP_PREFIX");
845 QString precomph_out_dir = project->first("QMAKE_ORIG_TARGET") + ".gch" + Option::dir_sep;
846 t << "-$(DEL_FILE) " << precomph_out_dir << header_prefix + "c "
847 << precomph_out_dir << header_prefix << "c++" << "\n\t";
848 }
740 if(!project->isEmpty("IMAGES")) 849 if(!project->isEmpty("IMAGES"))
741 t << varGlue("QMAKE_IMAGE_COLLECTION", "\t-$(DEL_FILE) ", " ", "") << "\n\t"; 850 t << varGlue("QMAKE_IMAGE_COLLECTION", "\t-$(DEL_FILE) ", " ", "") << "\n\t";
742 if(src_incremental) 851 if(src_incremental)
@@ -762,31 +871,55 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
762 if(project->first("TEMPLATE") == "app" && 871 if(project->first("TEMPLATE") == "app" &&
763 project->isActiveConfig("resource_fork") && !project->isActiveConfig("console")) 872 project->isActiveConfig("resource_fork") && !project->isActiveConfig("console"))
764 t << "\t-$(DEL_FILE) -r " << destdir.section(Option::dir_sep, 0, -4) << "\n"; 873 t << "\t-$(DEL_FILE) -r " << destdir.section(Option::dir_sep, 0, -4) << "\n";
874 else if(project->isActiveConfig("compile_libtool"))
875 t << "\t-$(LIBTOOL) --mode=clean $(DEL_FILE) " << "$(TARGET)" << "\n";
765 else 876 else
766 t << "\t-$(DEL_FILE) " << destdir << "$(TARGET)" << " " << "$(TARGET)" << "\n"; 877 t << "\t-$(DEL_FILE) " << destdir << "$(TARGET)" << " " << "$(TARGET)" << "\n";
767 if(!project->isActiveConfig("staticlib") && project->variables()["QMAKE_APP_FLAG"].isEmpty() && 878 if(!project->isActiveConfig("staticlib") && project->variables()["QMAKE_APP_FLAG"].isEmpty() &&
768 !project->isActiveConfig("plugin")) 879 !project->isActiveConfig("plugin") && !project->isActiveConfig("compile_libtool"))
769 t << "\t-$(DEL_FILE) " << destdir << "$(TARGET0) " << destdir << "$(TARGET1) " 880 t << "\t-$(DEL_FILE) " << destdir << "$(TARGET0) " << destdir << "$(TARGET1) "
770 << destdir << "$(TARGET2) $(TARGETA)" << "\n"; 881 << destdir << "$(TARGET2) $(TARGETA)" << "\n";
771 t << endl << endl; 882 t << endl << endl;
772 883
773 if ( !project->isEmpty("PRECOMPH") ) { 884 if(doPrecompiledHeaders() && !project->isEmpty("PRECOMPILED_HEADER") ) {
885 QString precomph = fileFixify(project->first("PRECOMPILED_HEADER"));
886 t << "###### Prefix headers" << endl;
887 QString comps[] = { "C", "CXX", QString::null };
888 for(int i = 0; !comps[i].isNull(); i++) {
889 QString flags = var("QMAKE_" + comps[i] + "FLAGS_PRECOMPILE");
890 flags += " $(" + comps[i] + "FLAGS)";
891
892 QString header_prefix = project->first("QMAKE_PRECOMP_PREFIX");
893 QString outdir = project->first("QMAKE_ORIG_TARGET") + ".gch" + Option::dir_sep, outfile = outdir;
894 QString compiler;
895 if(comps[i] == "C") {
896 outfile += header_prefix + "c";
897 compiler = "$(CC) ";
898 } else {
899 outfile += header_prefix + "c++";
900 compiler = "$(CXX) ";
901 }
902 t << outfile << ": " << precomph << " " << findDependencies(precomph).join(" \\\n\t\t")
903 << "\n\t" << "test -d " << outdir << " || mkdir -p " << outdir
904 << "\n\t" << compiler << flags << " $(INCPATH) " << precomph << " -o " << outfile << endl << endl;
905 }
906 }
907 if(!project->isEmpty("ALLMOC_HEADER")) {
774 QString outdir = project->first("MOC_DIR"); 908 QString outdir = project->first("MOC_DIR");
775 QString qt_dot_h = Option::fixPathToLocalOS(project->first("PRECOMPH")); 909 QString precomph = fileFixify(project->first("ALLMOC_HEADER"));
776 t << "###### Combined headers" << endl << endl; 910 t << "###### Combined headers" << endl << endl
777 //XXX 911 << outdir << "allmoc.cpp: " << precomph << " "
778 t << outdir << "allmoc.cpp: " << qt_dot_h << " "
779 << varList("HEADERS_ORIG") << "\n\t" 912 << varList("HEADERS_ORIG") << "\n\t"
780 << "echo '#include \"" << qt_dot_h << "\"' >" << outdir << "allmoc.cpp" << "\n\t" 913 << "echo '#include \"" << precomph << "\"' >" << outdir << "allmoc.cpp" << "\n\t"
781 << "$(CXX) -E -DQT_MOC_CPP -DQT_NO_STL $(CXXFLAGS) $(INCPATH) >" << outdir << "allmoc.h " 914 << "$(CXX) -E -DQT_MOC_CPP -DQT_NO_STL $(CXXFLAGS) $(INCPATH) >" << outdir << "allmoc.h "
782 << outdir << "allmoc.cpp" << "\n\t" 915 << outdir << "allmoc.cpp" << "\n\t"
783 << "$(MOC) -o " << outdir << "allmoc.cpp " << outdir << "allmoc.h" << "\n\t" 916 << "$(MOC) -o " << outdir << "allmoc.cpp " << outdir << "allmoc.h" << "\n\t"
784 << "perl -pi -e 's{#include \"allmoc.h\"}{#define QT_H_CPP\\n#include \"" 917 << "perl -pi -e 's{#include \"allmoc.h\"}{#define QT_H_CPP\\n#include \""
785 << qt_dot_h << "\"}' " << outdir << "allmoc.cpp" << "\n\t" 918 << precomph << "\"}' " << outdir << "allmoc.cpp" << "\n\t"
786 << "$(DEL_FILE) " << outdir << "allmoc.h" << endl << endl; 919 << "$(DEL_FILE) " << outdir << "allmoc.h" << endl << endl;
787 } 920 }
788 921
789 // blasted user defined targets 922 // user defined targets
790 QStringList &qut = project->variables()["QMAKE_EXTRA_UNIX_TARGETS"]; 923 QStringList &qut = project->variables()["QMAKE_EXTRA_UNIX_TARGETS"];
791 for(it = qut.begin(); it != qut.end(); ++it) { 924 for(it = qut.begin(); it != qut.end(); ++it) {
792 QString targ = var((*it) + ".target"), 925 QString targ = var((*it) + ".target"),
@@ -800,9 +933,59 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
800 dep = (*dep_it); 933 dep = (*dep_it);
801 deps += " " + dep; 934 deps += " " + dep;
802 } 935 }
936 if(project->variables()[(*it) + ".CONFIG"].findIndex("phony") != -1)
937 deps += QString(" ") + "FORCE";
803 t << targ << ":" << deps << "\n\t" 938 t << targ << ":" << deps << "\n\t"
804 << cmd << endl << endl; 939 << cmd << endl << endl;
805 } 940 }
941 // user defined compilers
942 QStringList &quc = project->variables()["QMAKE_EXTRA_UNIX_COMPILERS"];
943 for(it = quc.begin(); it != quc.end(); ++it) {
944 QString tmp_out = project->variables()[(*it) + ".output"].first();
945 QString tmp_cmd = project->variables()[(*it) + ".commands"].join(" ");
946 QString tmp_dep = project->variables()[(*it) + ".depends"].join(" ");
947 QStringList &vars = project->variables()[(*it) + ".variables"];
948 if(tmp_out.isEmpty() || tmp_cmd.isEmpty())
949 continue;
950 QStringList &tmp = project->variables()[(*it) + ".input"];
951 for(QStringList::Iterator it2 = tmp.begin(); it2 != tmp.end(); ++it2) {
952 QStringList &inputs = project->variables()[(*it2)];
953 for(QStringList::Iterator input = inputs.begin(); input != inputs.end(); ++input) {
954 QFileInfo fi(Option::fixPathToLocalOS((*input)));
955 QString in = Option::fixPathToTargetOS((*input), FALSE),
956 out = tmp_out, cmd = tmp_cmd, deps;
957 out.replace("${QMAKE_FILE_BASE}", fi.baseName());
958 out.replace("${QMAKE_FILE_NAME}", fi.fileName());
959 cmd.replace("${QMAKE_FILE_BASE}", fi.baseName());
960 cmd.replace("${QMAKE_FILE_OUT}", out);
961 cmd.replace("${QMAKE_FILE_NAME}", fi.fileName());
962 for(QStringList::Iterator it3 = vars.begin(); it3 != vars.end(); ++it3)
963 cmd.replace("$(" + (*it3) + ")", "$(QMAKE_COMP_" + (*it3)+")");
964 if(!tmp_dep.isEmpty()) {
965 char buff[256];
966 QString dep_cmd = tmp_dep;
967 dep_cmd.replace("${QMAKE_FILE_NAME}", fi.fileName());
968 if(FILE *proc = QT_POPEN(dep_cmd.latin1(), "r")) {
969 while(!feof(proc)) {
970 int read_in = int(fread(buff, 1, 255, proc));
971 if(!read_in)
972 break;
973 int l = 0;
974 for(int i = 0; i < read_in; i++) {
975 if(buff[i] == '\n' || buff[i] == ' ') {
976 deps += " " + QCString(buff+l, (i - l) + 1);
977 l = i;
978 }
979 }
980 }
981 fclose(proc);
982 }
983 }
984 t << out << ": " << in << deps << "\n\t"
985 << cmd << endl << endl;
986 }
987 }
988 }
806 t <<"FORCE:" << endl << endl; 989 t <<"FORCE:" << endl << endl;
807} 990}
808 991
@@ -814,6 +997,12 @@ struct SubDir
814void 997void
815UnixMakefileGenerator::writeSubdirs(QTextStream &t, bool direct) 998UnixMakefileGenerator::writeSubdirs(QTextStream &t, bool direct)
816{ 999{
1000 // blasted includes
1001 QStringList &qeui = project->variables()["QMAKE_EXTRA_UNIX_INCLUDES"];
1002 for(QStringList::Iterator qeui_it = qeui.begin(); qeui_it != qeui.end(); ++qeui_it)
1003 t << "include " << (*qeui_it) << endl;
1004 writeExtraVariables(t);
1005
817 QPtrList<SubDir> subdirs; 1006 QPtrList<SubDir> subdirs;
818 { 1007 {
819 QStringList subdirs_in = project->variables()["SUBDIRS"]; 1008 QStringList subdirs_in = project->variables()["SUBDIRS"];
@@ -832,6 +1021,8 @@ UnixMakefileGenerator::writeSubdirs(QTextStream &t, bool direct)
832 sd->profile = file; 1021 sd->profile = file;
833 } 1022 }
834 } else { 1023 } else {
1024 if(!file.isEmpty())
1025 sd->profile = file.section(Option::dir_sep, -1) + ".pro";
835 sd->directory = file; 1026 sd->directory = file;
836 } 1027 }
837 while(sd->directory.right(1) == Option::dir_sep) 1028 while(sd->directory.right(1) == Option::dir_sep)
@@ -857,6 +1048,10 @@ UnixMakefileGenerator::writeSubdirs(QTextStream &t, bool direct)
857 t << "MAKEFILE =" << var("MAKEFILE") << endl; 1048 t << "MAKEFILE =" << var("MAKEFILE") << endl;
858 t << "QMAKE =" << var("QMAKE") << endl; 1049 t << "QMAKE =" << var("QMAKE") << endl;
859 t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl; 1050 t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl;
1051 t << "CHK_DIR_EXISTS= " << var("QMAKE_CHK_DIR_EXISTS") << endl;
1052 t << "MKDIR = " << var("QMAKE_MKDIR") << endl;
1053 t << "INSTALL_FILE= " << var("QMAKE_INSTALL_FILE") << endl;
1054 t << "INSTALL_DIR = " << var("QMAKE_INSTALL_DIR") << endl;
860 t << "SUBTARGETS ="; // subdirectory targets are sub-directory 1055 t << "SUBTARGETS ="; // subdirectory targets are sub-directory
861 for( it.toFirst(); it.current(); ++it) 1056 for( it.toFirst(); it.current(); ++it)
862 t << " \\\n\t\t" << it.current()->target; 1057 t << " \\\n\t\t" << it.current()->target;
@@ -874,8 +1069,10 @@ UnixMakefileGenerator::writeSubdirs(QTextStream &t, bool direct)
874 //qmake it 1069 //qmake it
875 t << mkfile << ": " << "\n\t"; 1070 t << mkfile << ": " << "\n\t";
876 if(have_dir) 1071 if(have_dir)
877 t << "cd " << (*it)->directory << " && "; 1072 t << mkdir_p_asstring((*it)->directory) << "\n\t"
878 t << "$(QMAKE) " << (*it)->profile << buildArgs() << out << endl; 1073 << "cd " << (*it)->directory << " && ";
1074 QString profile = fileFixify((*it)->profile, (*it)->directory, (*it)->directory);
1075 t << "$(QMAKE) " << profile << buildArgs() << out << endl;
879 //actually compile 1076 //actually compile
880 t << (*it)->target << ": " << mkfile << " FORCE" << "\n\t"; 1077 t << (*it)->target << ": " << mkfile << " FORCE" << "\n\t";
881 if(have_dir) 1078 if(have_dir)
@@ -896,7 +1093,8 @@ UnixMakefileGenerator::writeSubdirs(QTextStream &t, bool direct)
896 writeMakeQmake(t); 1093 writeMakeQmake(t);
897 1094
898 if(project->isEmpty("SUBDIRS")) { 1095 if(project->isEmpty("SUBDIRS")) {
899 t << "all qmake_all distclean install uiclean mocclean lexclean yaccclean clean: FORCE" << endl; 1096 t << "all qmake_all distclean uicables mocables install_subdirs uninstall_subdirs"
1097 << " uiclean mocclean lexclean yaccclean clean " << var("SUBDIR_TARGETS") << ": FORCE" << endl;
900 } else { 1098 } else {
901 t << "all: $(SUBTARGETS)" << endl; 1099 t << "all: $(SUBTARGETS)" << endl;
902 t << "qmake_all:"; 1100 t << "qmake_all:";
@@ -914,7 +1112,8 @@ UnixMakefileGenerator::writeSubdirs(QTextStream &t, bool direct)
914 << " && $(MAKE) -f " << (*it)->makefile << " qmake_all" << "; ) || true"; 1112 << " && $(MAKE) -f " << (*it)->makefile << " qmake_all" << "; ) || true";
915 } 1113 }
916 t << endl; 1114 t << endl;
917 t << "clean uninstall install uiclean mocclean lexclean yaccclean: qmake_all FORCE"; 1115 t << "clean uicables mocables uiclean mocclean lexclean yaccclean "
1116 << var("SUBDIR_TARGETS") << ": qmake_all FORCE";
918 for( it.toFirst(); it.current(); ++it) { 1117 for( it.toFirst(); it.current(); ++it) {
919 t << "\n\t ( "; 1118 t << "\n\t ( ";
920 if(!(*it)->directory.isEmpty()) 1119 if(!(*it)->directory.isEmpty())
@@ -922,6 +1121,22 @@ UnixMakefileGenerator::writeSubdirs(QTextStream &t, bool direct)
922 t << "$(MAKE) -f " << (*it)->makefile << " $@" << "; ) || true"; 1121 t << "$(MAKE) -f " << (*it)->makefile << " $@" << "; ) || true";
923 } 1122 }
924 t << endl; 1123 t << endl;
1124 t << "uninstall_subdirs: qmake_all FORCE";
1125 for( it.toFirst(); it.current(); ++it) {
1126 t << "\n\t ( ";
1127 if(!(*it)->directory.isEmpty())
1128 t << "[ -d " << (*it)->directory << " ] && cd " << (*it)->directory << " ; ";
1129 t << "$(MAKE) -f " << (*it)->makefile << " uninstall" << "; ) || true";
1130 }
1131 t << endl;
1132 t << "install_subdirs: qmake_all FORCE";
1133 for( it.toFirst(); it.current(); ++it) {
1134 t << "\n\t ( ";
1135 if(!(*it)->directory.isEmpty())
1136 t << "[ -d " << (*it)->directory << " ] && cd " << (*it)->directory << " ; ";
1137 t << "$(MAKE) -f " << (*it)->makefile << " install" << "; ) || true";
1138 }
1139 t << endl;
925 t << "distclean: qmake_all FORCE"; 1140 t << "distclean: qmake_all FORCE";
926 for( it.toFirst(); it.current(); ++it) { 1141 for( it.toFirst(); it.current(); ++it) {
927 t << "\n\t ( "; 1142 t << "\n\t ( ";
@@ -931,6 +1146,31 @@ UnixMakefileGenerator::writeSubdirs(QTextStream &t, bool direct)
931 } 1146 }
932 t << endl << endl; 1147 t << endl << endl;
933 } 1148 }
1149
1150 //installations
1151 project->variables()["INSTALLDEPS"] += "install_subdirs";
1152 project->variables()["UNINSTALLDEPS"] += "uninstall_subdirs";
1153 writeInstalls(t, "INSTALLS");
1154
1155 // user defined targets
1156 QStringList &qut = project->variables()["QMAKE_EXTRA_UNIX_TARGETS"];
1157 for(QStringList::Iterator qut_it = qut.begin(); qut_it != qut.end(); ++qut_it) {
1158 QString targ = var((*qut_it) + ".target"),
1159 cmd = var((*qut_it) + ".commands"), deps;
1160 if(targ.isEmpty())
1161 targ = (*qut_it);
1162 QStringList &deplist = project->variables()[(*qut_it) + ".depends"];
1163 for(QStringList::Iterator dep_it = deplist.begin(); dep_it != deplist.end(); ++dep_it) {
1164 QString dep = var((*dep_it) + ".target");
1165 if(dep.isEmpty())
1166 dep = (*dep_it);
1167 deps += " " + dep;
1168 }
1169 if(project->variables()[(*qut_it) + ".CONFIG"].findIndex("phony") != -1)
1170 deps += QString(" ") + "FORCE";
1171 t << targ << ":" << deps << "\n\t"
1172 << cmd << endl << endl;
1173 }
934 t <<"FORCE:" << endl << endl; 1174 t <<"FORCE:" << endl << endl;
935} 1175}
936 1176
@@ -967,20 +1207,26 @@ void UnixMakefileGenerator::init2()
967 project->variables()["QMAKE_AR_CMD"].append("$(AR) $(TARGET) $(OBJECTS) $(OBJMOC)"); 1207 project->variables()["QMAKE_AR_CMD"].append("$(AR) $(TARGET) $(OBJECTS) $(OBJMOC)");
968 } else { 1208 } else {
969 project->variables()["TARGETA"].append(project->first("DESTDIR") + "lib" + project->first("TARGET") + ".a"); 1209 project->variables()["TARGETA"].append(project->first("DESTDIR") + "lib" + project->first("TARGET") + ".a");
1210 if( project->isActiveConfig("compile_libtool") )
1211 project->variables()["TARGET_la"] = project->first("DESTDIR") + "lib" + project->first("TARGET") + Option::libtool_ext;
1212
970 if ( !project->variables()["QMAKE_AR_CMD"].isEmpty() ) 1213 if ( !project->variables()["QMAKE_AR_CMD"].isEmpty() )
971 project->variables()["QMAKE_AR_CMD"].first().replace("(TARGET)","(TARGETA)"); 1214 project->variables()["QMAKE_AR_CMD"].first().replace("(TARGET)","(TARGETA)");
972 else 1215 else
973 project->variables()["QMAKE_AR_CMD"].append("$(AR) $(TARGETA) $(OBJECTS) $(OBJMOC)"); 1216 project->variables()["QMAKE_AR_CMD"].append("$(AR) $(TARGETA) $(OBJECTS) $(OBJMOC)");
974 if( project->isActiveConfig("plugin") ) { 1217 if( project->isActiveConfig("compile_libtool") ) {
1218 project->variables()["TARGET"] = project->variables()["TARGET_la"];
1219 } else if( project->isActiveConfig("plugin") ) {
975 project->variables()["TARGET_x.y.z"].append("lib" + 1220 project->variables()["TARGET_x.y.z"].append("lib" +
976 project->first("TARGET") + "." + project->first("QMAKE_EXTENSION_SHLIB")); 1221 project->first("TARGET") + "." +
1222 project->first("QMAKE_EXTENSION_PLUGIN"));
977 if(project->isActiveConfig("lib_version_first")) 1223 if(project->isActiveConfig("lib_version_first"))
978 project->variables()["TARGET_x"].append("lib" + project->first("TARGET") + "." + 1224 project->variables()["TARGET_x"].append("lib" + project->first("TARGET") + "." +
979 project->first("VER_MAJ") + "." + 1225 project->first("VER_MAJ") + "." +
980 project->first("QMAKE_EXTENSION_SHLIB")); 1226 project->first("QMAKE_EXTENSION_PLUGIN"));
981 else 1227 else
982 project->variables()["TARGET_x"].append("lib" + project->first("TARGET") + "." + 1228 project->variables()["TARGET_x"].append("lib" + project->first("TARGET") + "." +
983 project->first("QMAKE_EXTENSION_SHLIB") + 1229 project->first("QMAKE_EXTENSION_PLUGIN") +
984 "." + project->first("VER_MAJ")); 1230 "." + project->first("VER_MAJ"));
985 1231
986 project->variables()["TARGET"] = project->variables()["TARGET_x.y.z"]; 1232 project->variables()["TARGET"] = project->variables()["TARGET_x.y.z"];
@@ -1075,21 +1321,43 @@ void UnixMakefileGenerator::init2()
1075 } 1321 }
1076 if ( project->variables()["QMAKE_LINK_SHLIB_CMD"].isEmpty() ) 1322 if ( project->variables()["QMAKE_LINK_SHLIB_CMD"].isEmpty() )
1077 project->variables()["QMAKE_LINK_SHLIB_CMD"].append( 1323 project->variables()["QMAKE_LINK_SHLIB_CMD"].append(
1078 "$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS)"); 1324 "$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS) $(OBJCOMP)");
1079 } 1325 }
1080 if(project->isEmpty("QMAKE_SYMBOLIC_LINK")) 1326 if(project->isEmpty("QMAKE_SYMBOLIC_LINK"))
1081 project->variables()["QMAKE_SYMBOLIC_LINK"].append("ln -sf"); 1327 project->variables()["QMAKE_SYMBOLIC_LINK"].append("ln -sf");
1082 if ( !project->variables()["QMAKE_APP_FLAG"].isEmpty() ) { 1328 if ( !project->variables()["QMAKE_APP_FLAG"].isEmpty() ) {
1083 project->variables()["QMAKE_LFLAGS"] += project->variables()["QMAKE_LFLAGS_SHAPP"]; 1329 project->variables()["QMAKE_CFLAGS"] += project->variables()["QMAKE_CFLAGS_APP"];
1330 project->variables()["QMAKE_CXXFLAGS"] += project->variables()["QMAKE_CXXFLAGS_APP"];
1331 project->variables()["QMAKE_LFLAGS"] += project->variables()["QMAKE_LFLAGS_APP"];
1084 } else if ( project->isActiveConfig("dll") ) { 1332 } else if ( project->isActiveConfig("dll") ) {
1333 if( !project->isActiveConfig("plugin") || !project->isActiveConfig("plugin_no_share_shlib_cflags")) {
1085 project->variables()["QMAKE_CFLAGS"] += project->variables()["QMAKE_CFLAGS_SHLIB"]; 1334 project->variables()["QMAKE_CFLAGS"] += project->variables()["QMAKE_CFLAGS_SHLIB"];
1086 project->variables()["QMAKE_CXXFLAGS"] += project->variables()["QMAKE_CXXFLAGS_SHLIB"]; 1335 project->variables()["QMAKE_CXXFLAGS"] += project->variables()["QMAKE_CXXFLAGS_SHLIB"];
1336 }
1087 if ( project->isActiveConfig("plugin") ) { 1337 if ( project->isActiveConfig("plugin") ) {
1338 project->variables()["QMAKE_CFLAGS"] += project->variables()["QMAKE_CFLAGS_PLUGIN"];
1339 project->variables()["QMAKE_CXXFLAGS"] += project->variables()["QMAKE_CXXFLAGS_PLUGIN"];
1088 project->variables()["QMAKE_LFLAGS"] += project->variables()["QMAKE_LFLAGS_PLUGIN"]; 1340 project->variables()["QMAKE_LFLAGS"] += project->variables()["QMAKE_LFLAGS_PLUGIN"];
1089 if( !project->isActiveConfig("plugin_no_soname") ) 1341 if( project->isActiveConfig("plugin_with_soname") && !project->isActiveConfig("compile_libtool"))
1090 project->variables()["QMAKE_LFLAGS"] += project->variables()["QMAKE_LFLAGS_SONAME"]; 1342 project->variables()["QMAKE_LFLAGS"] += project->variables()["QMAKE_LFLAGS_SONAME"];
1091 } else { 1343 } else {
1092 project->variables()["QMAKE_LFLAGS"] += project->variables()["QMAKE_LFLAGS_SHLIB"]; 1344 project->variables()["QMAKE_LFLAGS"] += project->variables()["QMAKE_LFLAGS_SHLIB"];
1345 if(!project->isEmpty("QMAKE_LFLAGS_COMPAT_VERSION")) {
1346 if(project->isEmpty("COMPAT_VERSION"))
1347 project->variables()["QMAKE_LFLAGS"] += QString(project->first("QMAKE_LFLAGS_COMPAT_VERSION") +
1348 project->first("VER_MAJ") + "." +
1349 project->first("VER_MIN"));
1350 else
1351 project->variables()["QMAKE_LFLAGS"] += QString(project->first("QMAKE_LFLAGS_COMPAT_VERSION") +
1352 project->first("COMPATIBILITY_VERSION"));
1353 }
1354 if(!project->isEmpty("QMAKE_LFLAGS_VERSION")) {
1355 project->variables()["QMAKE_LFLAGS"] += QString(project->first("QMAKE_LFLAGS_VERSION") +
1356 project->first("VER_MAJ") + "." +
1357 project->first("VER_MIN") + "." +
1358 project->first("VER_PAT"));
1359 }
1360 if(!project->isActiveConfig("compile_libtool"))
1093 project->variables()["QMAKE_LFLAGS"] += project->variables()["QMAKE_LFLAGS_SONAME"]; 1361 project->variables()["QMAKE_LFLAGS"] += project->variables()["QMAKE_LFLAGS_SONAME"];
1094 } 1362 }
1095 QString destdir = project->first("DESTDIR"); 1363 QString destdir = project->first("DESTDIR");
@@ -1107,4 +1375,214 @@ void UnixMakefileGenerator::init2()
1107 project->variables()["QMAKE_LFLAGS"] += project->first("QMAKE_RPATH") + rpath_destdir; 1375 project->variables()["QMAKE_LFLAGS"] += project->first("QMAKE_RPATH") + rpath_destdir;
1108 } 1376 }
1109 } 1377 }
1378 QStringList &quc = project->variables()["QMAKE_EXTRA_UNIX_COMPILERS"];
1379 for(QStringList::Iterator it = quc.begin(); it != quc.end(); ++it) {
1380 QString tmp_out = project->variables()[(*it) + ".output"].first();
1381 if(tmp_out.isEmpty())
1382 continue;
1383 QStringList &tmp = project->variables()[(*it) + ".input"];
1384 for(QStringList::Iterator it2 = tmp.begin(); it2 != tmp.end(); ++it2) {
1385 QStringList &inputs = project->variables()[(*it2)];
1386 for(QStringList::Iterator input = inputs.begin(); input != inputs.end(); ++input) {
1387 QFileInfo fi(Option::fixPathToLocalOS((*input)));
1388 QString in = Option::fixPathToTargetOS((*input), FALSE),
1389 out = tmp_out;
1390 out.replace("${QMAKE_FILE_BASE}", fi.baseName());
1391 out.replace("${QMAKE_FILE_NAME}", fi.fileName());
1392 if(project->variables()[(*it) + ".CONFIG"].findIndex("no_link") == -1)
1393 project->variables()["OBJCOMP"] += out;
1394 }
1395 }
1396 }
1397}
1398
1399QString
1400UnixMakefileGenerator::libtoolFileName()
1401{
1402 QString ret = var("TARGET");
1403 int slsh = ret.findRev(Option::dir_sep);
1404 if(slsh != -1)
1405 ret = ret.right(ret.length() - slsh);
1406 int dot = ret.find('.');
1407 if(dot != -1)
1408 ret = ret.left(dot);
1409 ret += Option::libtool_ext;
1410 if(!project->isEmpty("DESTDIR"))
1411 ret.prepend(var("DESTDIR"));
1412 return ret;
1413}
1414
1415void
1416UnixMakefileGenerator::writeLibtoolFile()
1417{
1418 QString fname = libtoolFileName(), lname = fname;
1419 int slsh = lname.findRev(Option::dir_sep);
1420 if(slsh != -1)
1421 lname = lname.right(lname.length() - slsh - 1);
1422 QFile ft(fname);
1423 if(!ft.open(IO_WriteOnly))
1424 return;
1425 project->variables()["ALL_DEPS"].append(fname);
1426
1427 QTextStream t(&ft);
1428 t << "# " << lname << " - a libtool library file\n";
1429 time_t now = time(NULL);
1430 t << "# Generated by qmake/libtool (" << qmake_version() << ") (Qt "
1431 << QT_VERSION_STR << ") on: " << ctime(&now) << "\n";
1432
1433 t << "# The name that we can dlopen(3).\n"
1434 << "dlname='" << var(project->isActiveConfig("plugin") ? "TARGET" : "TARGET_x")
1435 << "'\n\n";
1436
1437 t << "# Names of this library.\n";
1438 t << "library_names='";
1439 if(project->isActiveConfig("plugin")) {
1440 t << var("TARGET");
1441 } else {
1442 if (project->isEmpty("QMAKE_HPUX_SHLIB"))
1443 t << var("TARGET_x.y.z") << " ";
1444 t << var("TARGET_x") << " " << var("TARGET_");
1445 }
1446 t << "'\n\n";
1447
1448 t << "# The name of the static archive.\n"
1449 << "old_library='" << lname.left(lname.length()-Option::libtool_ext.length()) << ".a'\n\n";
1450
1451 t << "# Libraries that this one depends upon.\n";
1452 QStringList libs;
1453 if(!project->isEmpty("QMAKE_INTERNAL_PRL_LIBS"))
1454 libs = project->variables()["QMAKE_INTERNAL_PRL_LIBS"];
1455 else
1456 libs << "QMAKE_LIBS"; //obvious one
1457 t << "dependency_libs='";
1458 for(QStringList::ConstIterator it = libs.begin(); it != libs.end(); ++it)
1459 t << project->variables()[(*it)].join(" ") << " ";
1460 t << "'\n\n";
1461
1462 t << "# Version information for " << lname << "\n";
1463 int maj = project->first("VER_MAJ").toInt();
1464 int min = project->first("VER_MIN").toInt();
1465 int pat = project->first("VER_PAT").toInt();
1466 t << "current=" << (10*maj + min) << "\n" // best I can think of
1467 << "age=0\n"
1468 << "revision=" << pat << "\n\n";
1469
1470 t << "# Is this an already installed library.\n"
1471 "installed=yes\n\n"; // ###
1472
1473 t << "# Files to dlopen/dlpreopen.\n"
1474 "dlopen=''\n"
1475 "dlpreopen=''\n\n";
1476
1477 QString install_dir = project->first("target.path");
1478 if(install_dir.isEmpty())
1479 install_dir = project->first("DESTDIR");
1480 t << "# Directory that this library needs to be installed in:\n"
1481 "libdir='" << Option::fixPathToTargetOS(install_dir, FALSE) << "'\n";
1482}
1483
1484QString
1485UnixMakefileGenerator::pkgConfigFileName()
1486{
1487 QString ret = var("TARGET");
1488 int slsh = ret.findRev(Option::dir_sep);
1489 if(slsh != -1)
1490 ret = ret.right(ret.length() - slsh);
1491 if(ret.startsWith("lib"))
1492 ret = ret.mid(3);
1493 int dot = ret.find('.');
1494 if(dot != -1)
1495 ret = ret.left(dot);
1496 ret += Option::pkgcfg_ext;
1497 if(!project->isEmpty("DESTDIR")) {
1498 ret.prepend(var("DESTDIR"));
1499 ret = Option::fixPathToLocalOS(fileFixify(ret,QDir::currentDirPath(), Option::output_dir));
1500 }
1501 return ret;
1502}
1503
1504QString
1505UnixMakefileGenerator::pkgConfigPrefix() const
1506{
1507 if(!project->isEmpty("QMAKE_PKGCONFIG_PREFIX"))
1508 return project->first("QMAKE_PKGCONFIG_PREFIX");
1509 return qInstallPath();
1510}
1511
1512QString
1513UnixMakefileGenerator::pkgConfigFixPath(QString path) const
1514{
1515 QString prefix = pkgConfigPrefix();
1516 if(path.startsWith(prefix))
1517 path = path.replace(prefix, "${prefix}");
1518 return path;
1519}
1520
1521void
1522UnixMakefileGenerator::writePkgConfigFile() // ### does make sense only for libqt so far
1523{
1524 QString fname = pkgConfigFileName(), lname = fname;
1525 int slsh = lname.findRev(Option::dir_sep);
1526 if(slsh != -1)
1527 lname = lname.right(lname.length() - slsh - 1);
1528 QFile ft(fname);
1529 if(!ft.open(IO_WriteOnly))
1530 return;
1531 project->variables()["ALL_DEPS"].append(fname);
1532 QTextStream t(&ft);
1533
1534 QString prefix = pkgConfigPrefix();
1535 QString libDir = project->first("QMAKE_PKGCONFIG_LIBDIR");
1536 if(libDir.isEmpty())
1537 libDir = prefix + "/lib";
1538 QString includeDir = project->first("QMAKE_PKGCONFIG_INCDIR");
1539 if(includeDir.isEmpty())
1540 includeDir = prefix + "/include";
1541
1542 t << "prefix=" << prefix << endl;
1543 t << "exec_prefix=${prefix}\n"
1544 << "libdir=" << pkgConfigFixPath(libDir) << "\n"
1545 << "includedir=" << pkgConfigFixPath(includeDir) << endl;
1546 // non-standard entry. Provides useful info normally only
1547 // contained in the internal .qmake.cache file
1548 t << varGlue("CONFIG", "qt_config=", " ", "") << endl << endl;
1549
1550 t << "Name: Qt" << endl;
1551 QString desc = project->first("QMAKE_PKGCONFIG_DESCRIPTION");
1552 if(desc.isEmpty()) {
1553 desc = project->first("TARGET").lower();
1554 desc.replace(0, 1, desc[0].upper());
1555 if(project->first("TEMPLATE") == "lib") {
1556 if(project->isActiveConfig("plugin"))
1557 desc += " Plugin";
1558 else
1559 desc += " Library";
1560 } else if(project->first("TEMPLATE") == "app") {
1561 desc += " Application";
1562 }
1563 }
1564 t << "Description: " << desc << endl;
1565 t << "Version: " << project->first("VERSION") << endl;
1566
1567 // libs
1568 QStringList libs;
1569 if(!project->isEmpty("QMAKE_INTERNAL_PRL_LIBS"))
1570 libs = project->variables()["QMAKE_INTERNAL_PRL_LIBS"];
1571 else
1572 libs << "QMAKE_LIBS"; //obvious one
1573 if(project->isActiveConfig("thread"))
1574 libs << "QMAKE_LFLAGS_THREAD"; //not sure about this one, but what about things like -pthread?
1575 t << "Libs: -L${libdir} -l" << lname.left(lname.length()-Option::libtool_ext.length()) << " ";
1576 for(QStringList::ConstIterator it = libs.begin(); it != libs.end(); ++it)
1577 t << project->variables()[(*it)].join(" ") << " ";
1578 t << endl;
1579
1580 // flags
1581 // ### too many
1582 t << "Cflags: "
1583 // << var("QMAKE_CXXFLAGS") << " "
1584 << varGlue("PRL_EXPORT_DEFINES","-D"," -D"," ")
1585 << project->variables()["PRL_EXPORT_CXXFLAGS"].join(" ")
1586 // << varGlue("DEFINES","-D"," -D"," ")
1587 << " -I${includedir}";
1110} 1588}
diff --git a/qmake/generators/win32/borland_bmake.cpp b/qmake/generators/win32/borland_bmake.cpp
index 26eea88..12607cf 100644
--- a/qmake/generators/win32/borland_bmake.cpp
+++ b/qmake/generators/win32/borland_bmake.cpp
@@ -1,13 +1,11 @@
1/**************************************************************************** 1/****************************************************************************
2** $Id$
3** 2**
4** Definition of ________ class.
5** 3**
6** Created : 970521 4** NmakeMakefileGenerator of BorlandMakefileGenerator class.
7** 5**
8** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. 6** Copyright (C) 1992-2003 Trolltech AS. All rights reserved.
9** 7**
10** This file is part of the network module of the Qt GUI Toolkit. 8** This file is part of qmake.
11** 9**
12** This file may be distributed under the terms of the Q Public License 10** This file may be distributed under the terms of the Q Public License
13** as defined by Trolltech AS of Norway and appearing in the file 11** as defined by Trolltech AS of Norway and appearing in the file
@@ -134,6 +132,8 @@ BorlandMakefileGenerator::writeBorlandParts(QTextStream &t)
134 t << "MOVE = " << var("QMAKE_MOVE") << endl; 132 t << "MOVE = " << var("QMAKE_MOVE") << endl;
135 t << "CHK_DIR_EXISTS =" << var("QMAKE_CHK_DIR_EXISTS") << endl; 133 t << "CHK_DIR_EXISTS =" << var("QMAKE_CHK_DIR_EXISTS") << endl;
136 t << "MKDIR =" << var("QMAKE_MKDIR") << endl; 134 t << "MKDIR =" << var("QMAKE_MKDIR") << endl;
135 t << "INSTALL_FILE= " << var("QMAKE_INSTALL_FILE") << endl;
136 t << "INSTALL_DIR = " << var("QMAKE_INSTALL_DIR") << endl;
137 t << endl; 137 t << endl;
138 138
139 t << "####### Files" << endl << endl; 139 t << "####### Files" << endl << endl;
@@ -145,6 +145,23 @@ BorlandMakefileGenerator::writeBorlandParts(QTextStream &t)
145 t << "UICIMPLS =" << varList("UICIMPLS") << endl; 145 t << "UICIMPLS =" << varList("UICIMPLS") << endl;
146 t << "SRCMOC =" << varList("SRCMOC") << endl; 146 t << "SRCMOC =" << varList("SRCMOC") << endl;
147 t << "OBJMOC =" << varList("OBJMOC") << endl; 147 t << "OBJMOC =" << varList("OBJMOC") << endl;
148
149 QString extraCompilerDeps;
150 if(!project->isEmpty("QMAKE_EXTRA_WIN_COMPILERS")) {
151 t << "OBJCOMP = " << varList("OBJCOMP") << endl;
152 extraCompilerDeps += " $(OBJCOMP) ";
153
154 QStringList &comps = project->variables()["QMAKE_EXTRA_WIN_COMPILERS"];
155 for(QStringList::Iterator compit = comps.begin(); compit != comps.end(); ++compit) {
156 QStringList &vars = project->variables()[(*compit) + ".variables"];
157 for(QStringList::Iterator varit = vars.begin(); varit != vars.end(); ++varit) {
158 QStringList vals = project->variables()[(*varit)];
159 if(!vals.isEmpty())
160 t << "QMAKE_COMP_" << (*varit) << " = " << valList(vals) << endl;
161 }
162 }
163 }
164
148 t << "DIST =" << varList("DISTFILES") << endl; 165 t << "DIST =" << varList("DISTFILES") << endl;
149 t << "TARGET =" 166 t << "TARGET ="
150 << varGlue("TARGET",project->first("DESTDIR"),"",project->first("TARGET_EXT")) 167 << varGlue("TARGET",project->first("DESTDIR"),"",project->first("TARGET_EXT"))
@@ -162,18 +179,19 @@ BorlandMakefileGenerator::writeBorlandParts(QTextStream &t)
162 t << ".c" << Option::obj_ext << ":\n\t" << var("QMAKE_RUN_CC_IMP") << endl << endl; 179 t << ".c" << Option::obj_ext << ":\n\t" << var("QMAKE_RUN_CC_IMP") << endl << endl;
163 180
164 t << "####### Build rules" << endl << endl; 181 t << "####### Build rules" << endl << endl;
165 t << "all: " << varGlue("ALL_DEPS",""," "," ") << " $(TARGET)" << endl << endl; 182 t << "all: " << fileFixify(Option::output.name()) << " " << varGlue("ALL_DEPS"," "," "," ") << " $(TARGET)" << endl << endl;
166 t << "$(TARGET): " << var("PRE_TARGETDEPS") << " $(UICDECLS) $(OBJECTS) $(OBJMOC) " 183 t << "$(TARGET): " << var("PRE_TARGETDEPS") << " $(UICDECLS) $(OBJECTS) $(OBJMOC) "
167 << var("POST_TARGETDEPS"); 184 << extraCompilerDeps << var("POST_TARGETDEPS");
168 if(!project->variables()["QMAKE_APP_OR_DLL"].isEmpty()) { 185 if(!project->variables()["QMAKE_APP_OR_DLL"].isEmpty()) {
169 t << "\n\t" << "$(LINK) @&&|" << "\n\t" 186 t << "\n\t" << "$(LINK) @&&|" << "\n\t"
170 << "$(LFLAGS) $(OBJECTS) $(OBJMOC),$(TARGET),,$(LIBS),$(DEF_FILE),$(RES_FILE)"; 187 << "$(LFLAGS) $(OBJECTS) $(OBJMOC),$(TARGET),,$(LIBS),$(DEF_FILE),$(RES_FILE)";
171 } else { 188 } else {
172 t << "\n\t-del $(TARGET)" 189 t << "\n\t-$(DEL_FILE) $(TARGET)"
173 << "\n\t" << "$(LIB) $(TARGET) @&&|" << " \n+" 190 << "\n\t" << "$(LIB) $(TARGET) @&&|" << " \n+"
174 << project->variables()["OBJECTS"].join(" \\\n+") << " \\\n+" 191 << project->variables()["OBJECTS"].join(" \\\n+") << " \\\n+"
175 << project->variables()["OBJMOC"].join(" \\\n+"); 192 << project->variables()["OBJMOC"].join(" \\\n+");
176 } 193 }
194 t << extraCompilerDeps;
177 t << endl << "|" << endl; 195 t << endl << "|" << endl;
178 196
179 if ( !project->variables()["QMAKE_POST_LINK"].isEmpty() ) 197 if ( !project->variables()["QMAKE_POST_LINK"].isEmpty() )
@@ -182,7 +200,7 @@ BorlandMakefileGenerator::writeBorlandParts(QTextStream &t)
182 if(project->isActiveConfig("dll") && !project->variables()["DLLDESTDIR"].isEmpty()) { 200 if(project->isActiveConfig("dll") && !project->variables()["DLLDESTDIR"].isEmpty()) {
183 QStringList dlldirs = project->variables()["DLLDESTDIR"]; 201 QStringList dlldirs = project->variables()["DLLDESTDIR"];
184 for ( QStringList::Iterator dlldir = dlldirs.begin(); dlldir != dlldirs.end(); ++dlldir ) { 202 for ( QStringList::Iterator dlldir = dlldirs.begin(); dlldir != dlldirs.end(); ++dlldir ) {
185 t << "\n\t" << "-copy $(TARGET) " << *dlldir; 203 t << "\n\t" << "-$(COPY_FILE) \"$(TARGET)\" " << *dlldir;
186 } 204 }
187 } 205 }
188 QString targetfilename = project->variables()["TARGET"].first(); 206 QString targetfilename = project->variables()["TARGET"].first();
@@ -192,14 +210,14 @@ BorlandMakefileGenerator::writeBorlandParts(QTextStream &t)
192 version = "1.0"; 210 version = "1.0";
193 211
194 if ( project->isActiveConfig("dll")) { 212 if ( project->isActiveConfig("dll")) {
195 t << "\n\t" << ("-$(IDC) $(TARGET) /idl tmp\\" + targetfilename + ".idl -version " + version); 213 t << "\n\t" << ("-$(IDC) $(TARGET) /idl " + var("OBJECTS_DIR") + targetfilename + ".idl -version " + version);
196 t << "\n\t" << ("-$(IDL) tmp\\" + targetfilename + ".idl /nologo /o tmp\\" + targetfilename + ".midl /tlb tmp\\" + targetfilename + ".tlb /iid tmp\\dump.midl /dlldata tmp\\dump.midl /cstub tmp\\dump.midl /header tmp\\dump.midl /proxy tmp\\dump.midl /sstub tmp\\dump.midl"); 214 t << "\n\t" << ("-$(IDL) /nologo " + var("OBJECTS_DIR") + targetfilename + ".idl /tlb " + var("OBJECTS_DIR") + targetfilename + ".tlb");
197 t << "\n\t" << ("-$(IDC) $(TARGET) /tlb tmp\\" + targetfilename + ".tlb"); 215 t << "\n\t" << ("-$(IDC) $(TARGET) /tlb " + var("OBJECTS_DIR") + targetfilename + ".tlb");
198 t << "\n\t" << ("-$(IDC) $(TARGET) /regserver" ); 216 t << "\n\t" << ("-$(IDC) $(TARGET) /regserver" );
199 } else { 217 } else {
200 t << "\n\t" << ("-$(TARGET) -dumpidl tmp\\" + targetfilename + ".idl -version " + version); 218 t << "\n\t" << ("-$(TARGET) -dumpidl " + var("OBJECTS_DIR") + targetfilename + ".idl -version " + version);
201 t << "\n\t" << ("-$(IDL) tmp\\" + targetfilename + ".idl /nologo /o tmp\\" + targetfilename + ".midl /tlb tmp\\" + targetfilename + ".tlb /iid tmp\\dump.midl /dlldata tmp\\dump.midl /cstub tmp\\dump.midl /header tmp\\dump.midl /proxy tmp\\dump.midl /sstub tmp\\dump.midl"); 219 t << "\n\t" << ("-$(IDL) /nologo " + var("OBJECTS_DIR") + targetfilename + ".idl /tlb " + var("OBJECTS_DIR") + targetfilename + ".tlb");
202 t << "\n\t" << ("-$(IDC) $(TARGET) /tlb tmp\\" + targetfilename + ".tlb"); 220 t << "\n\t" << ("-$(IDC) $(TARGET) /tlb " + var("OBJECTS_DIR") + targetfilename + ".tlb");
203 t << "\n\t" << ("-$(TARGET) -regserver"); 221 t << "\n\t" << ("-$(TARGET) -regserver");
204 } 222 }
205 } 223 }
@@ -209,32 +227,60 @@ BorlandMakefileGenerator::writeBorlandParts(QTextStream &t)
209 t << var("RES_FILE") << ": " << var("RC_FILE") << "\n\t" 227 t << var("RES_FILE") << ": " << var("RC_FILE") << "\n\t"
210 << var("QMAKE_RC") << " " << var("RC_FILE") << endl << endl; 228 << var("QMAKE_RC") << " " << var("RC_FILE") << endl << endl;
211 } 229 }
212 t << "mocables: $(SRCMOC)" << endl << endl; 230 t << "mocables: $(SRCMOC)" << endl
231 << "uicables: $(UICIMPLS) $(UICDECLS)" << endl << endl;
213 232
214 writeMakeQmake(t); 233 writeMakeQmake(t);
215 234
235 QStringList dist_files = Option::mkfile::project_files;
236 if(!project->isEmpty("QMAKE_INTERNAL_INCLUDED_FILES"))
237 dist_files += project->variables()["QMAKE_INTERNAL_INCLUDED_FILES"];
238 if(!project->isEmpty("TRANSLATIONS"))
239 dist_files << var("TRANSLATIONS");
240 if(!project->isEmpty("FORMS")) {
241 QStringList &forms = project->variables()["FORMS"];
242 for(QStringList::Iterator formit = forms.begin(); formit != forms.end(); ++formit) {
243 QString ui_h = fileFixify((*formit) + Option::h_ext.first());
244 if(QFile::exists(ui_h) )
245 dist_files << ui_h;
246 }
247 }
216 t << "dist:" << "\n\t" 248 t << "dist:" << "\n\t"
217 << "$(ZIP) " << var("PROJECT") << ".zip " << var("PROJECT") << ".pro $(SOURCES) $(HEADERS) $(DIST) $(FORMS)" 249 << "$(ZIP) " << var("QMAKE_ORIG_TARGET") << ".zip " << "$(SOURCES) $(HEADERS) $(DIST) $(FORMS) "
218 << endl << endl; 250 << dist_files.join(" ") << " " << var("TRANSLATIONS") << " " << var("IMAGES") << endl << endl;
251
252 t << "uiclean:";
253 QString uiclean = varGlue("UICDECLS" ,"\n\t-$(DEL_FILE) ","\n\t-$(DEL_FILE) ","") + varGlue("UICIMPLS" ,"\n\t-$(DEL_FILE) ","\n\t-$(DEL_FILE) ","");
254 if ( uiclean.isEmpty() ) {
255 // Borland make does not like an empty command section
256 uiclean = "\n\t@cd .";
257 }
258 t << uiclean << endl;
219 259
220 t << "clean:\n" 260 t << "mocclean:";
221 << varGlue("OBJECTS","\t-del ","\n\t-del ","") 261 QString mocclean = varGlue("SRCMOC" ,"\n\t-$(DEL_FILE) ","\n\t-$(DEL_FILE) ","") + varGlue("OBJMOC" ,"\n\t-$(DEL_FILE) ","\n\t-$(DEL_FILE) ","");
222 << varGlue("SRCMOC" ,"\n\t-del ","\n\t-del ","") 262 if ( mocclean.isEmpty() ) {
223 << varGlue("OBJMOC" ,"\n\t-del ","\n\t-del ","") 263 // Borland make does not like an empty command section
224 << varGlue("UICDECLS" ,"\n\t-del ","\n\t-del ","") 264 mocclean = "\n\t@cd .";
225 << varGlue("UICIMPLS" ,"\n\t-del ","\n\t-del ","") 265 }
226 << varGlue("QMAKE_CLEAN","\n\t-del ","\n\t-del ","") 266 t << mocclean << endl;
227 << varGlue("CLEAN_FILES","\n\t-del ","\n\t-del ",""); 267
268 t << "clean: uiclean mocclean"
269 << varGlue("OBJECTS","\n\t-$(DEL_FILE) ","\n\t-$(DEL_FILE) ","")
270 << varGlue("QMAKE_CLEAN","\n\t-$(DEL_FILE) ","\n\t-$(DEL_FILE) ","")
271 << varGlue("CLEAN_FILES","\n\t-$(DEL_FILE) ","\n\t-$(DEL_FILE) ","");
228 if ( project->isActiveConfig("activeqt")) { 272 if ( project->isActiveConfig("activeqt")) {
229 t << ("\n\t-del tmp\\" + targetfilename + ".*"); 273 t << ("\n\t-$(DEL_FILE) " + var("OBJECTS_DIR") + targetfilename + ".idl");
230 t << "\n\t-del tmp\\dump.*"; 274 t << ("\n\t-$(DEL_FILE) " + var("OBJECTS_DIR") + targetfilename + ".tlb");
231 } 275 }
232 if(!project->isEmpty("IMAGES")) 276 if(!project->isEmpty("IMAGES"))
233 t << varGlue("QMAKE_IMAGE_COLLECTION", "\n\t-del ", "\n\t-del ", ""); 277 t << varGlue("QMAKE_IMAGE_COLLECTION", "\n\t-$(DEL_FILE) ", "\n\t-$(DEL_FILE) ", "");
278 t << endl;
234 279
235 // blasted user defined targets 280 // user defined targets
281 QStringList::Iterator it;
236 QStringList &qut = project->variables()["QMAKE_EXTRA_WIN_TARGETS"]; 282 QStringList &qut = project->variables()["QMAKE_EXTRA_WIN_TARGETS"];
237 for(QStringList::Iterator it = qut.begin(); it != qut.end(); ++it) { 283 for(it = qut.begin(); it != qut.end(); ++it) {
238 QString targ = var((*it) + ".target"), 284 QString targ = var((*it) + ".target"),
239 cmd = var((*it) + ".commands"), deps; 285 cmd = var((*it) + ".commands"), deps;
240 if(targ.isEmpty()) 286 if(targ.isEmpty())
@@ -246,14 +292,66 @@ BorlandMakefileGenerator::writeBorlandParts(QTextStream &t)
246 dep = (*dep_it); 292 dep = (*dep_it);
247 deps += " " + dep; 293 deps += " " + dep;
248 } 294 }
295 if(!project->variables()["QMAKE_NOFORCE"].isEmpty() &&
296 project->variables()[(*it) + ".CONFIG"].findIndex("phony") != -1)
297 deps += QString(" ") + "FORCE";
249 t << "\n\n" << targ << ":" << deps << "\n\t" 298 t << "\n\n" << targ << ":" << deps << "\n\t"
250 << cmd; 299 << cmd;
251 } 300 }
252 301
253 t << endl << endl; 302 t << endl << endl;
254 303
304 QStringList &quc = project->variables()["QMAKE_EXTRA_WIN_COMPILERS"];
305 for(it = quc.begin(); it != quc.end(); ++it) {
306 QString tmp_out = project->variables()[(*it) + ".output"].first();
307 QString tmp_cmd = project->variables()[(*it) + ".commands"].join(" ");
308 QString tmp_dep = project->variables()[(*it) + ".depends"].join(" ");
309 QStringList &vars = project->variables()[(*it) + ".variables"];
310 if(tmp_out.isEmpty() || tmp_cmd.isEmpty())
311 continue;
312 QStringList &tmp = project->variables()[(*it) + ".input"];
313 for(QStringList::Iterator it2 = tmp.begin(); it2 != tmp.end(); ++it2) {
314 QStringList &inputs = project->variables()[(*it2)];
315 for(QStringList::Iterator input = inputs.begin(); input != inputs.end(); ++input) {
316 QFileInfo fi(Option::fixPathToLocalOS((*input)));
317 QString in = Option::fixPathToTargetOS((*input), FALSE),
318 out = tmp_out, cmd = tmp_cmd, deps;
319 out.replace("${QMAKE_FILE_BASE}", fi.baseName());
320 out.replace("${QMAKE_FILE_NAME}", fi.fileName());
321 cmd.replace("${QMAKE_FILE_BASE}", fi.baseName());
322 cmd.replace("${QMAKE_FILE_OUT}", out);
323 cmd.replace("${QMAKE_FILE_NAME}", fi.fileName());
324 for(QStringList::Iterator it3 = vars.begin(); it3 != vars.end(); ++it3)
325 cmd.replace("$(" + (*it3) + ")", "$(QMAKE_COMP_" + (*it3)+")");
326 if(!tmp_dep.isEmpty()) {
327 char buff[256];
328 QString dep_cmd = tmp_dep;
329 dep_cmd.replace("${QMAKE_FILE_NAME}", fi.fileName());
330 if(FILE *proc = QT_POPEN(dep_cmd.latin1(), "r")) {
331 while(!feof(proc)) {
332 int read_in = int(fread(buff, 1, 255, proc));
333 if(!read_in)
334 break;
335 int l = 0;
336 for(int i = 0; i < read_in; i++) {
337 if(buff[i] == '\n' || buff[i] == ' ') {
338 deps += " " + QCString(buff+l, (i - l) + 1);
339 l = i;
340 }
341 }
342 }
343 fclose(proc);
344 }
345 }
346 t << out << ": " << in << deps << "\n\t"
347 << cmd << endl << endl;
348 }
349 }
350 }
351 t << endl;
352
255 t << "distclean: clean" 353 t << "distclean: clean"
256 << "\n\t-del $(TARGET)" 354 << "\n\t-$(DEL_FILE) $(TARGET)"
257 << endl << endl; 355 << endl << endl;
258} 356}
259 357
@@ -280,12 +378,23 @@ BorlandMakefileGenerator::init()
280 return; 378 return;
281 } 379 }
282 380
381 if(project->isEmpty("QMAKE_INSTALL_FILE"))
382 project->variables()["QMAKE_INSTALL_FILE"].append("$(COPY_FILE)");
383 if(project->isEmpty("QMAKE_INSTALL_DIR"))
384 project->variables()["QMAKE_INSTALL_DIR"].append("$(COPY_DIR)");
385
283 bool is_qt = (project->first("TARGET") == "qt"QTDLL_POSTFIX || project->first("TARGET") == "qtmt"QTDLL_POSTFIX); 386 bool is_qt = (project->first("TARGET") == "qt"QTDLL_POSTFIX || project->first("TARGET") == "qtmt"QTDLL_POSTFIX);
284 QStringList &configs = project->variables()["CONFIG"]; 387 QStringList &configs = project->variables()["CONFIG"];
285 if (project->isActiveConfig("shared")) 388 if (project->isActiveConfig("shared"))
286 project->variables()["DEFINES"].append("QT_DLL"); 389 project->variables()["DEFINES"].append("QT_DLL");
287 if (project->isActiveConfig("qt_dll")) 390 if (project->isActiveConfig("qt_dll"))
288 if(configs.findIndex("qt") == -1) configs.append("qt"); 391 if(configs.findIndex("qt") == -1) configs.append("qt");
392 if ( project->isActiveConfig("qtopia") ) {
393 if(configs.findIndex("qtopialib") == -1)
394 configs.append("qtopialib");
395 if(configs.findIndex("qtopiainc") == -1)
396 configs.append("qtopiainc");
397 }
289 if ( project->isActiveConfig("qt") ) { 398 if ( project->isActiveConfig("qt") ) {
290 if ( project->isActiveConfig("plugin") ) { 399 if ( project->isActiveConfig("plugin") ) {
291 project->variables()["CONFIG"].append("dll"); 400 project->variables()["CONFIG"].append("dll");
@@ -356,6 +465,13 @@ BorlandMakefileGenerator::init()
356 if ( project->isActiveConfig("qt") || project->isActiveConfig("opengl") ) { 465 if ( project->isActiveConfig("qt") || project->isActiveConfig("opengl") ) {
357 project->variables()["CONFIG"].append("windows"); 466 project->variables()["CONFIG"].append("windows");
358 } 467 }
468 if ( project->isActiveConfig("qtopiainc") )
469 project->variables()["INCLUDEPATH"] += project->variables()["QMAKE_INCDIR_QTOPIA"];
470 if ( project->isActiveConfig("qtopialib") ) {
471 if(!project->isEmpty("QMAKE_LIBDIR_QTOPIA"))
472 project->variables()["QMAKE_LIBDIR"] += project->variables()["QMAKE_LIBDIR_QTOPIA"];
473 project->variables()["QMAKE_LIBS"] += project->variables()["QMAKE_LIBS_QTOPIA"];
474 }
359 if ( project->isActiveConfig("qt") ) { 475 if ( project->isActiveConfig("qt") ) {
360 project->variables()["CONFIG"].append("moc"); 476 project->variables()["CONFIG"].append("moc");
361 project->variables()["INCLUDEPATH"] +=project->variables()["QMAKE_INCDIR_QT"]; 477 project->variables()["INCLUDEPATH"] +=project->variables()["QMAKE_INCDIR_QT"];
@@ -468,10 +584,25 @@ BorlandMakefileGenerator::init()
468 setMocAware(TRUE); 584 setMocAware(TRUE);
469 } 585 }
470 project->variables()["QMAKE_LIBS"] += project->variables()["LIBS"]; 586 project->variables()["QMAKE_LIBS"] += project->variables()["LIBS"];
587 // Update -lname to name.lib, and -Ldir to
588 QStringList &libList = project->variables()["QMAKE_LIBS"];
589 for( QStringList::Iterator stIt = libList.begin(); stIt != libList.end(); ) {
590 QString s = *stIt;
591 if( s.startsWith( "-l" ) ) {
592 stIt = libList.remove( stIt );
593 stIt = libList.insert( stIt, s.mid( 2 ) + ".lib" );
594 } else if( s.startsWith( "-L" ) ) {
595 stIt = libList.remove( stIt );
596 project->variables()["QMAKE_LIBDIR"].append(QDir::convertSeparators(s.mid( 2 )));
597 } else {
598 stIt++;
599 }
600 }
471 project->variables()["QMAKE_FILETAGS"] += QStringList::split(' ', 601 project->variables()["QMAKE_FILETAGS"] += QStringList::split(' ',
472 "HEADERS SOURCES DEF_FILE RC_FILE TARGET QMAKE_LIBS DESTDIR DLLDESTDIR INCLUDEPATH"); 602 "HEADERS SOURCES DEF_FILE RC_FILE TARGET QMAKE_LIBS DESTDIR DLLDESTDIR INCLUDEPATH");
473 QStringList &l = project->variables()["QMAKE_FILETAGS"]; 603 QStringList &l = project->variables()["QMAKE_FILETAGS"];
474 for(QStringList::Iterator it = l.begin(); it != l.end(); ++it) { 604 QStringList::Iterator it;
605 for(it = l.begin(); it != l.end(); ++it) {
475 QStringList &gdmf = project->variables()[(*it)]; 606 QStringList &gdmf = project->variables()[(*it)];
476 for(QStringList::Iterator inner = gdmf.begin(); inner != gdmf.end(); ++inner) 607 for(QStringList::Iterator inner = gdmf.begin(); inner != gdmf.end(); ++inner)
477 (*inner) = Option::fixPathToTargetOS((*inner), FALSE); 608 (*inner) = Option::fixPathToTargetOS((*inner), FALSE);
@@ -486,6 +617,7 @@ BorlandMakefileGenerator::init()
486 project->variables()["RES_FILE"] = project->variables()["RC_FILE"]; 617 project->variables()["RES_FILE"] = project->variables()["RC_FILE"];
487 project->variables()["RES_FILE"].first().replace(".rc",".res"); 618 project->variables()["RES_FILE"].first().replace(".rc",".res");
488 project->variables()["POST_TARGETDEPS"] += project->variables()["RES_FILE"]; 619 project->variables()["POST_TARGETDEPS"] += project->variables()["RES_FILE"];
620 project->variables()["CLEAN_FILES"] += project->variables()["RES_FILE"];
489 } 621 }
490 MakefileGenerator::init(); 622 MakefileGenerator::init();
491 if ( !project->variables()["VERSION"].isEmpty()) { 623 if ( !project->variables()["VERSION"].isEmpty()) {
@@ -506,4 +638,24 @@ BorlandMakefileGenerator::init()
506 project->variables()["QMAKE_CLEAN"].append( 638 project->variables()["QMAKE_CLEAN"].append(
507 project->first("DESTDIR") + project->first("TARGET") + tdsPostfix ); 639 project->first("DESTDIR") + project->first("TARGET") + tdsPostfix );
508 } 640 }
641
642 QStringList &quc = project->variables()["QMAKE_EXTRA_WIN_COMPILERS"];
643 for(it = quc.begin(); it != quc.end(); ++it) {
644 QString tmp_out = project->variables()[(*it) + ".output"].first();
645 if(tmp_out.isEmpty())
646 continue;
647 QStringList &tmp = project->variables()[(*it) + ".input"];
648 for(QStringList::Iterator it2 = tmp.begin(); it2 != tmp.end(); ++it2) {
649 QStringList &inputs = project->variables()[(*it2)];
650 for(QStringList::Iterator input = inputs.begin(); input != inputs.end(); ++input) {
651 QFileInfo fi(Option::fixPathToLocalOS((*input)));
652 QString in = Option::fixPathToTargetOS((*input), FALSE),
653 out = tmp_out;
654 out.replace("${QMAKE_FILE_BASE}", fi.baseName());
655 out.replace("${QMAKE_FILE_NAME}", fi.fileName());
656 if(project->variables()[(*it) + ".CONFIG"].findIndex("no_link") == -1)
657 project->variables()["OBJCOMP"] += out;
658 }
659 }
660 }
509} 661}
diff --git a/qmake/generators/win32/borland_bmake.h b/qmake/generators/win32/borland_bmake.h
index 5ffed58..700e7f7 100644
--- a/qmake/generators/win32/borland_bmake.h
+++ b/qmake/generators/win32/borland_bmake.h
@@ -1,13 +1,11 @@
1/**************************************************************************** 1/****************************************************************************
2** $Id$
3** 2**
4** Definition of ________ class.
5** 3**
6** Created : 970521 4** Definition of BorlandMakefileGenerator class.
7** 5**
8** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. 6** Copyright (C) 1992-2003 Trolltech AS. All rights reserved.
9** 7**
10** This file is part of the network module of the Qt GUI Toolkit. 8** This file is part of qmake.
11** 9**
12** This file may be distributed under the terms of the Q Public License 10** This file may be distributed under the terms of the Q Public License
13** as defined by Trolltech AS of Norway and appearing in the file 11** as defined by Trolltech AS of Norway and appearing in the file
@@ -34,6 +32,7 @@
34** not clear to you. 32** not clear to you.
35** 33**
36**********************************************************************/ 34**********************************************************************/
35
37#ifndef __BORLAND_BMAKE_H__ 36#ifndef __BORLAND_BMAKE_H__
38#define __BORLAND_BMAKE_H__ 37#define __BORLAND_BMAKE_H__
39 38
diff --git a/qmake/generators/win32/mingw_make.cpp b/qmake/generators/win32/mingw_make.cpp
index 7f58a55..c693d6a 100644
--- a/qmake/generators/win32/mingw_make.cpp
+++ b/qmake/generators/win32/mingw_make.cpp
@@ -1,11 +1,11 @@
1/**************************************************************************** 1/****************************************************************************
2** $Id$
3** 2**
4** Definition of ________ class.
5** 3**
6** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. 4** Implementation of MingwMakefileGenerator class.
7** 5**
8** This file is part of the network module of the Qt GUI Toolkit. 6** Copyright (C) 1992-2003 Trolltech AS. All rights reserved.
7**
8** This file is part of qmake.
9** 9**
10** This file may be distributed under the terms of the Q Public License 10** This file may be distributed under the terms of the Q Public License
11** as defined by Trolltech AS of Norway and appearing in the file 11** as defined by Trolltech AS of Norway and appearing in the file
@@ -47,6 +47,12 @@ MingwMakefileGenerator::MingwMakefileGenerator(QMakeProject *p) : Win32MakefileG
47} 47}
48 48
49bool 49bool
50MingwMakefileGenerator::findLibraries() // todo - pascal
51{
52 return TRUE;
53}
54
55bool
50MingwMakefileGenerator::writeMakefile(QTextStream &t) 56MingwMakefileGenerator::writeMakefile(QTextStream &t)
51{ 57{
52 writeHeader(t); 58 writeHeader(t);
@@ -71,6 +77,21 @@ MingwMakefileGenerator::writeMakefile(QTextStream &t)
71 return FALSE; 77 return FALSE;
72} 78}
73 79
80void createLdObjectScriptFile(const QString & fileName, QStringList & objList)
81{
82 QString filePath = Option::output_dir + QDir::separator() + fileName;
83 QFile file(filePath);
84 if (file.open(IO_WriteOnly | IO_Translate )) {
85 QTextStream t(&file);
86 t << "INPUT(" << endl;
87 for (QStringList::Iterator it = objList.begin(); it != objList.end(); ++it ) {
88 t << *it << endl;
89 }
90 t << ");" << endl;
91 file.close();
92 }
93}
94
74void 95void
75MingwMakefileGenerator::writeMingwParts(QTextStream &t) 96MingwMakefileGenerator::writeMingwParts(QTextStream &t)
76{ 97{
@@ -94,17 +115,16 @@ MingwMakefileGenerator::writeMingwParts(QTextStream &t)
94 QString inc = (*incit); 115 QString inc = (*incit);
95 inc.replace(QRegExp("\\\\$"), "\\\\"); 116 inc.replace(QRegExp("\\\\$"), "\\\\");
96 inc.replace(QRegExp("\""), ""); 117 inc.replace(QRegExp("\""), "");
97 t << " -I" << inc ; 118 t << " -I" << "\"" << inc << "\"";
98 } 119 }
99 t << " -I" << specdir() 120 t << " -I" << "\"" << specdir() << "\"" << endl;
100 << endl;
101 if(!project->variables()["QMAKE_APP_OR_DLL"].isEmpty()) { 121 if(!project->variables()["QMAKE_APP_OR_DLL"].isEmpty()) {
102 t << "LINK =" << var("QMAKE_LINK") << endl; 122 t << "LINK =" << var("QMAKE_LINK") << endl;
103 t << "LFLAGS ="; 123 t << "LFLAGS =" << var("QMAKE_LFLAGS") << endl;
124 t << "LIBS =";
104 if ( !project->variables()["QMAKE_LIBDIR"].isEmpty() ) 125 if ( !project->variables()["QMAKE_LIBDIR"].isEmpty() )
105 t << varGlue("QMAKE_LIBDIR","-L",";","") << " "; 126 t << varGlue("QMAKE_LIBDIR","-L\"","\" -L\"","\"") << " ";
106 t << var("QMAKE_LFLAGS") << endl; 127 t << var("QMAKE_LIBS").replace(QRegExp("(\\slib|^lib)")," -l") << endl;
107 t << "LIBS =" << var("QMAKE_LIBS").replace(QRegExp("(\\slib|^lib)")," -l") << endl;
108 } 128 }
109 else { 129 else {
110 t << "LIB =" << var("QMAKE_LIB") << endl; 130 t << "LIB =" << var("QMAKE_LIB") << endl;
@@ -128,6 +148,8 @@ MingwMakefileGenerator::writeMingwParts(QTextStream &t)
128 t << "MOVE = " << var("QMAKE_MOVE") << endl; 148 t << "MOVE = " << var("QMAKE_MOVE") << endl;
129 t << "CHK_DIR_EXISTS =" << var("QMAKE_CHK_DIR_EXISTS") << endl; 149 t << "CHK_DIR_EXISTS =" << var("QMAKE_CHK_DIR_EXISTS") << endl;
130 t << "MKDIR =" << var("QMAKE_MKDIR") << endl; 150 t << "MKDIR =" << var("QMAKE_MKDIR") << endl;
151 t << "INSTALL_FILE= " << var("QMAKE_INSTALL_FILE") << endl;
152 t << "INSTALL_DIR = " << var("QMAKE_INSTALL_DIR") << endl;
131 t << endl; 153 t << endl;
132 154
133 t << "####### Output directory" << endl << endl; 155 t << "####### Output directory" << endl << endl;
@@ -144,14 +166,44 @@ MingwMakefileGenerator::writeMingwParts(QTextStream &t)
144 t << "####### Files" << endl << endl; 166 t << "####### Files" << endl << endl;
145 t << "HEADERS =" << varList("HEADERS") << endl; 167 t << "HEADERS =" << varList("HEADERS") << endl;
146 t << "SOURCES =" << varList("SOURCES") << endl; 168 t << "SOURCES =" << varList("SOURCES") << endl;
147 // t << "OBJECTS =" << varList("OBJECTS").replace(QRegExp("\\.obj"),".o") << endl; 169 QString objectsLinkLine;
170 if (!project->variables()["QMAKE_APP_OR_DLL"].isEmpty() &&
171 project->variables()["OBJECTS"].count() > var("QMAKE_LINK_OBJECT_MAX").toUInt()) {
172 createLdObjectScriptFile(var("QMAKE_LINK_OBJECT_SCRIPT"), project->variables()["OBJECTS"]);
173 objectsLinkLine = var("QMAKE_LINK_OBJECT_SCRIPT");
174 } else {
175 objectsLinkLine = "$(OBJECTS)";
176 }
148 t << "OBJECTS =" << varList("OBJECTS") << endl; 177 t << "OBJECTS =" << varList("OBJECTS") << endl;
149 t << "FORMS =" << varList("FORMS") << endl; 178 t << "FORMS =" << varList("FORMS") << endl;
150 t << "UICDECLS =" << varList("UICDECLS") << endl; 179 t << "UICDECLS =" << varList("UICDECLS") << endl;
151 t << "UICIMPLS =" << varList("UICIMPLS") << endl; 180 t << "UICIMPLS =" << varList("UICIMPLS") << endl;
152 t << "SRCMOC =" << varList("SRCMOC") << endl; 181 t << "SRCMOC =" << varList("SRCMOC") << endl;
182 QString objmocLinkLine;
183 if (!project->variables()["QMAKE_APP_OR_DLL"].isEmpty() &&
184 project->variables()["OBJMOC"].count() > var("QMAKE_LINK_OBJECT_MAX").toUInt()) {
185 createLdObjectScriptFile(var("QMAKE_LINK_OBJMOC_SCRIPT"), project->variables()["OBJMOC"]);
186 objmocLinkLine = var("QMAKE_LINK_OBJMOC_SCRIPT");
187 } else {
188 objmocLinkLine = "$(OBJMOC)";
189 }
153 t << "OBJMOC =" << varList("OBJMOC") << endl; 190 t << "OBJMOC =" << varList("OBJMOC") << endl;
154 // t << "OBJMOC =" << varList("OBJMOC").replace(QRegExp("\\.obj"),".o") << endl; 191 QString extraCompilerDeps;
192 if(!project->isEmpty("QMAKE_EXTRA_WIN_COMPILERS")) {
193 t << "OBJCOMP = " << varList("OBJCOMP") << endl;
194 extraCompilerDeps += " $(OBJCOMP) ";
195
196 QStringList &comps = project->variables()["QMAKE_EXTRA_WIN_COMPILERS"];
197 for(QStringList::Iterator compit = comps.begin(); compit != comps.end(); ++compit) {
198 QStringList &vars = project->variables()[(*compit) + ".variables"];
199 for(QStringList::Iterator varit = vars.begin(); varit != vars.end(); ++varit) {
200 QStringList vals = project->variables()[(*varit)];
201 if(!vals.isEmpty())
202 t << "QMAKE_COMP_" << (*varit) << " = " << valList(vals) << endl;
203 }
204 }
205 }
206
155 t << "DIST =" << varList("DISTFILES") << endl; 207 t << "DIST =" << varList("DISTFILES") << endl;
156 t << "TARGET ="; 208 t << "TARGET =";
157 if( !project->variables()[ "DESTDIR" ].isEmpty() ) 209 if( !project->variables()[ "DESTDIR" ].isEmpty() )
@@ -172,17 +224,17 @@ MingwMakefileGenerator::writeMingwParts(QTextStream &t)
172 t << "####### Build rules" << endl << endl; 224 t << "####### Build rules" << endl << endl;
173 t << "all: " << "$(OBJECTS_DIR) " << "$(MOC_DIR) " << varGlue("ALL_DEPS",""," "," ") << "$(TARGET)" << endl << endl; 225 t << "all: " << "$(OBJECTS_DIR) " << "$(MOC_DIR) " << varGlue("ALL_DEPS",""," "," ") << "$(TARGET)" << endl << endl;
174 t << "$(TARGET): " << var("PRE_TARGETDEPS") << " $(UICDECLS) $(OBJECTS) $(OBJMOC) " 226 t << "$(TARGET): " << var("PRE_TARGETDEPS") << " $(UICDECLS) $(OBJECTS) $(OBJMOC) "
175 << var("POST_TARGETDEPS"); 227 << extraCompilerDeps << var("POST_TARGETDEPS");
176 if(!project->variables()["QMAKE_APP_OR_DLL"].isEmpty()) { 228 if(!project->variables()["QMAKE_APP_OR_DLL"].isEmpty()) {
177 t << "\n\t" << "$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS)"; 229 t << "\n\t" << "$(LINK) $(LFLAGS) -o $(TARGET) " << objectsLinkLine << " " << objmocLinkLine << " $(LIBS)";
178 } else { 230 } else {
179 t << "\n\t" << "$(LIB) $(TARGET) $(OBJECTS) $(OBJMOC)"; 231 t << "\n\t" << "$(LIB) $(TARGET) " << objectsLinkLine << " " << objmocLinkLine;
180 } 232 }
181 233 t << extraCompilerDeps;
182 if(project->isActiveConfig("dll") && !project->variables()["DLLDESTDIR"].isEmpty()) { 234 if(project->isActiveConfig("dll") && !project->variables()["DLLDESTDIR"].isEmpty()) {
183 QStringList dlldirs = project->variables()["DLLDESTDIR"]; 235 QStringList dlldirs = project->variables()["DLLDESTDIR"];
184 for ( QStringList::Iterator dlldir = dlldirs.begin(); dlldir != dlldirs.end(); ++dlldir ) { 236 for ( QStringList::Iterator dlldir = dlldirs.begin(); dlldir != dlldirs.end(); ++dlldir ) {
185 t << "\n\t" << "copy $(TARGET) " << *dlldir; 237 t << "\n\t" << "$(COPY_FILE) \"$(TARGET)\" " << *dlldir;
186 } 238 }
187 } 239 }
188 QString targetfilename = project->variables()["TARGET"].first(); 240 QString targetfilename = project->variables()["TARGET"].first();
@@ -192,14 +244,14 @@ MingwMakefileGenerator::writeMingwParts(QTextStream &t)
192 version = "1.0"; 244 version = "1.0";
193 245
194 if ( project->isActiveConfig("dll")) { 246 if ( project->isActiveConfig("dll")) {
195 t << "\n\t" << ("-$(IDC) $(TARGET) /idl tmp\\" + targetfilename + ".idl -version " + version); 247 t << "\n\t" << ("-$(IDC) $(TARGET) /idl " + var("OBJECTS_DIR") + targetfilename + ".idl -version " + version);
196 t << "\n\t" << ("-$(IDL) tmp\\" + targetfilename + ".idl /nologo /o tmp\\" + targetfilename + ".midl /tlb tmp\\" + targetfilename + ".tlb /iid tmp\\dump.midl /dlldata tmp\\dump.midl /cstub tmp\\dump.midl /header tmp\\dump.midl /proxy tmp\\dump.midl /sstub tmp\\dump.midl"); 248 t << "\n\t" << ("-$(IDL) /nologo " + var("OBJECTS_DIR") + targetfilename + ".idl /tlb " + var("OBJECTS_DIR") + targetfilename + ".tlb");
197 t << "\n\t" << ("-$(IDC) $(TARGET) /tlb tmp\\" + targetfilename + ".tlb"); 249 t << "\n\t" << ("-$(IDC) $(TARGET) /tlb " + var("OBJECTS_DIR") + targetfilename + ".tlb");
198 t << "\n\t" << ("-$(IDC) $(TARGET) /regserver" ); 250 t << "\n\t" << ("-$(IDC) $(TARGET) /regserver" );
199 } else { 251 } else {
200 t << "\n\t" << ("-$(TARGET) -dumpidl tmp\\" + targetfilename + ".idl -version " + version); 252 t << "\n\t" << ("-$(TARGET) -dumpidl " + var("OBJECTS_DIR") + targetfilename + ".idl -version " + version);
201 t << "\n\t" << ("-$(IDL) tmp\\" + targetfilename + ".idl /nologo /o tmp\\" + targetfilename + ".midl /tlb tmp\\" + targetfilename + ".tlb /iid tmp\\dump.midl /dlldata tmp\\dump.midl /cstub tmp\\dump.midl /header tmp\\dump.midl /proxy tmp\\dump.midl /sstub tmp\\dump.midl"); 253 t << "\n\t" << ("-$(IDL) /nologo " + var("OBJECTS_DIR") + targetfilename + ".idl /tlb " + var("OBJECTS_DIR") + targetfilename + ".tlb");
202 t << "\n\t" << ("-$(IDC) $(TARGET) /tlb tmp\\" + targetfilename + ".tlb"); 254 t << "\n\t" << ("-$(IDC) $(TARGET) /tlb " + var("OBJECTS_DIR") + targetfilename + ".tlb");
203 t << "\n\t" << "-$(TARGET) -regserver"; 255 t << "\n\t" << "-$(TARGET) -regserver";
204 } 256 }
205 } 257 }
@@ -207,17 +259,17 @@ MingwMakefileGenerator::writeMingwParts(QTextStream &t)
207 259
208 if(!project->variables()["RC_FILE"].isEmpty()) { 260 if(!project->variables()["RC_FILE"].isEmpty()) {
209 t << var("RES_FILE") << ": " << var("RC_FILE") << "\n\t" 261 t << var("RES_FILE") << ": " << var("RC_FILE") << "\n\t"
210 << var("QMAKE_RC") << " -i " << var("RC_FILE") << " -o " << var("RC_FILE").replace(QRegExp("\\.rc"),".o") << endl << endl; 262 << var("QMAKE_RC") << " -i " << var("RC_FILE") << " -o " << var("RC_FILE").replace(QRegExp("\\.rc"),".o") << " --include-dir=" << QFileInfo(var("RC_FILE")).dirPath() << endl << endl;
211 } 263 }
212 project->variables()["RES_FILE"].first().replace(QRegExp("\\.rc"),".o"); 264 project->variables()["RES_FILE"].first().replace(QRegExp("\\.rc"),".o");
213 265
214 t << "mocables: $(SRCMOC)" << endl << endl; 266 t << "mocables: $(SRCMOC)" << endl << endl;
215 267
216 t << "$(OBJECTS_DIR):" << "\n\t" 268 t << "$(OBJECTS_DIR):" << "\n\t"
217 << "@if not exist $(OBJECTS_DIR) mkdir $(OBJECTS_DIR)" << endl << endl; 269 << "@if not exist $(OBJECTS_DIR) $(MKDIR) $(OBJECTS_DIR)" << endl << endl;
218 270
219 t << "$(MOC_DIR):" << "\n\t" 271 t << "$(MOC_DIR):" << "\n\t"
220 << "@if not exist $(MOC_DIR) mkdir $(MOC_DIR)" << endl << endl; 272 << "@if not exist $(MOC_DIR) $(MKDIR) $(MOC_DIR)" << endl << endl;
221 273
222 writeMakeQmake(t); 274 writeMakeQmake(t);
223 275
@@ -226,26 +278,26 @@ MingwMakefileGenerator::writeMingwParts(QTextStream &t)
226 << var("PROJECT") << ".pro $(SOURCES) $(HEADERS) $(DIST) $(FORMS)" << endl << endl; 278 << var("PROJECT") << ".pro $(SOURCES) $(HEADERS) $(DIST) $(FORMS)" << endl << endl;
227 279
228 t << "clean:" 280 t << "clean:"
229 << varGlue("OBJECTS","\n\t-del ","\n\t-del ","").replace(QRegExp("\\.obj"),".o") 281 << varGlue("OBJECTS","\n\t-$(DEL_FILE) ","\n\t-$(DEL_FILE) ","").replace(QRegExp("\\.obj"),".o")
230 << varGlue("SRCMOC" ,"\n\t-del ","\n\t-del ","") 282 << varGlue("SRCMOC" ,"\n\t-$(DEL_FILE) ","\n\t-$(DEL_FILE) ","")
231 << varGlue("OBJMOC" ,"\n\t-del ","\n\t-del ","").replace(QRegExp("\\.obj"),".o") 283 << varGlue("OBJMOC" ,"\n\t-$(DEL_FILE) ","\n\t-$(DEL_FILE) ","").replace(QRegExp("\\.obj"),".o")
232 << varGlue("UICDECLS" ,"\n\t-del ","\n\t-del ","") 284 << varGlue("UICDECLS" ,"\n\t-$(DEL_FILE) ","\n\t-$(DEL_FILE) ","")
233 << varGlue("UICIMPLS" ,"\n\t-del ","\n\t-del ","") 285 << varGlue("UICIMPLS" ,"\n\t-$(DEL_FILE) ","\n\t-$(DEL_FILE) ","")
234 << "\n\t-del $(TARGET)" 286 << "\n\t-$(DEL_FILE) $(TARGET)"
235 << varGlue("QMAKE_CLEAN","\n\t-del ","\n\t-del ","") 287 << varGlue("QMAKE_CLEAN","\n\t-$(DEL_FILE) ","\n\t-$(DEL_FILE) ","")
236 << varGlue("CLEAN_FILES","\n\t-del ","\n\t-del ",""); 288 << varGlue("CLEAN_FILES","\n\t-$(DEL_FILE) ","\n\t-$(DEL_FILE) ","");
237 if ( project->isActiveConfig("activeqt")) { 289 if ( project->isActiveConfig("activeqt")) {
238 t << ("\n\t-del tmp\\" + targetfilename + ".*"); 290 t << ("\n\t-$(DEL_FILE) " + var("OBJECTS_DIR") + targetfilename + ".idl");
239 t << "\n\t-del tmp\\dump.*"; 291 t << ("\n\t-$(DEL_FILE) " + var("OBJECTS_DIR") + targetfilename + ".tlb");
240 } 292 }
241 if(project->isActiveConfig("dll") && !project->variables()["DLLDESTDIR"].isEmpty())
242 t << "\n\t-del " << var("DLLDESTDIR") << "\\" << project->variables()[ "TARGET" ].first() << project->variables()[ "TARGET_EXT" ].first();
243 if(!project->isEmpty("IMAGES")) 293 if(!project->isEmpty("IMAGES"))
244 t << varGlue("QMAKE_IMAGE_COLLECTION", "\n\t-del ", "\n\t-del ", ""); 294 t << varGlue("QMAKE_IMAGE_COLLECTION", "\n\t-$(DEL_FILE) ", "\n\t-$(DEL_FILE) ", "");
245 295
246 // blasted user defined targets 296 // user defined targets
297 QStringList::Iterator it;
247 QStringList &qut = project->variables()["QMAKE_EXTRA_WIN_TARGETS"]; 298 QStringList &qut = project->variables()["QMAKE_EXTRA_WIN_TARGETS"];
248 for(QStringList::Iterator it = qut.begin(); it != qut.end(); ++it) { 299
300 for(it = qut.begin(); it != qut.end(); ++it) {
249 QString targ = var((*it) + ".target"), 301 QString targ = var((*it) + ".target"),
250 cmd = var((*it) + ".commands"), deps; 302 cmd = var((*it) + ".commands"), deps;
251 if(targ.isEmpty()) 303 if(targ.isEmpty())
@@ -262,6 +314,55 @@ MingwMakefileGenerator::writeMingwParts(QTextStream &t)
262 } 314 }
263 315
264 t << endl << endl; 316 t << endl << endl;
317
318 QStringList &quc = project->variables()["QMAKE_EXTRA_WIN_COMPILERS"];
319 for(it = quc.begin(); it != quc.end(); ++it) {
320 QString tmp_out = project->variables()[(*it) + ".output"].first();
321 QString tmp_cmd = project->variables()[(*it) + ".commands"].join(" ");
322 QString tmp_dep = project->variables()[(*it) + ".depends"].join(" ");
323 QStringList &vars = project->variables()[(*it) + ".variables"];
324 if(tmp_out.isEmpty() || tmp_cmd.isEmpty())
325 continue;
326 QStringList &tmp = project->variables()[(*it) + ".input"];
327 for(QStringList::Iterator it2 = tmp.begin(); it2 != tmp.end(); ++it2) {
328 QStringList &inputs = project->variables()[(*it2)];
329 for(QStringList::Iterator input = inputs.begin(); input != inputs.end(); ++input) {
330 QFileInfo fi(Option::fixPathToLocalOS((*input)));
331 QString in = Option::fixPathToTargetOS((*input), FALSE),
332 out = tmp_out, cmd = tmp_cmd, deps;
333 out.replace("${QMAKE_FILE_BASE}", fi.baseName());
334 out.replace("${QMAKE_FILE_NAME}", fi.fileName());
335 cmd.replace("${QMAKE_FILE_BASE}", fi.baseName());
336 cmd.replace("${QMAKE_FILE_OUT}", out);
337 cmd.replace("${QMAKE_FILE_NAME}", fi.fileName());
338 for(QStringList::Iterator it3 = vars.begin(); it3 != vars.end(); ++it3)
339 cmd.replace("$(" + (*it3) + ")", "$(QMAKE_COMP_" + (*it3)+")");
340 if(!tmp_dep.isEmpty()) {
341 char buff[256];
342 QString dep_cmd = tmp_dep;
343 dep_cmd.replace("${QMAKE_FILE_NAME}", fi.fileName());
344 if(FILE *proc = QT_POPEN(dep_cmd.latin1(), "r")) {
345 while(!feof(proc)) {
346 int read_in = int(fread(buff, 1, 255, proc));
347 if(!read_in)
348 break;
349 int l = 0;
350 for(int i = 0; i < read_in; i++) {
351 if(buff[i] == '\n' || buff[i] == ' ') {
352 deps += " " + QCString(buff+l, (i - l) + 1);
353 l = i;
354 }
355 }
356 }
357 fclose(proc);
358 }
359 }
360 t << out << ": " << in << deps << "\n\t"
361 << cmd << endl << endl;
362 }
363 }
364 }
365 t << endl;
265} 366}
266 367
267 368
@@ -286,6 +387,11 @@ MingwMakefileGenerator::init()
286 return; 387 return;
287 } 388 }
288 389
390 if(project->isEmpty("QMAKE_INSTALL_FILE"))
391 project->variables()["QMAKE_INSTALL_FILE"].append("$(COPY_FILE)");
392 if(project->isEmpty("QMAKE_INSTALL_DIR"))
393 project->variables()["QMAKE_INSTALL_DIR"].append("$(COPY_DIR)");
394
289 bool is_qt = (project->first("TARGET") == "qt"QTDLL_POSTFIX || project->first("TARGET") == "qt-mt"QTDLL_POSTFIX); 395 bool is_qt = (project->first("TARGET") == "qt"QTDLL_POSTFIX || project->first("TARGET") == "qt-mt"QTDLL_POSTFIX);
290 project->variables()["QMAKE_ORIG_TARGET"] = project->variables()["TARGET"]; 396 project->variables()["QMAKE_ORIG_TARGET"] = project->variables()["TARGET"];
291 397
@@ -294,10 +400,14 @@ MingwMakefileGenerator::init()
294 400
295 QString targetfilename = project->variables()["TARGET"].first(); 401 QString targetfilename = project->variables()["TARGET"].first();
296 QStringList &configs = project->variables()["CONFIG"]; 402 QStringList &configs = project->variables()["CONFIG"];
403
297 if (project->isActiveConfig("qt") && project->isActiveConfig("shared")) 404 if (project->isActiveConfig("qt") && project->isActiveConfig("shared"))
298 project->variables()["DEFINES"].append("QT_DLL"); 405 project->variables()["DEFINES"].append("QT_DLL");
406
299 if (project->isActiveConfig("qt_dll")) 407 if (project->isActiveConfig("qt_dll"))
300 if(configs.findIndex("qt") == -1) configs.append("qt"); 408 if (configs.findIndex("qt") == -1)
409 configs.append("qt");
410
301 if ( project->isActiveConfig("qt") ) { 411 if ( project->isActiveConfig("qt") ) {
302 if ( project->isActiveConfig( "plugin" ) ) { 412 if ( project->isActiveConfig( "plugin" ) ) {
303 project->variables()["CONFIG"].append("dll"); 413 project->variables()["CONFIG"].append("dll");
@@ -319,12 +429,14 @@ MingwMakefileGenerator::init()
319 if ( project->isActiveConfig("tablet") ) 429 if ( project->isActiveConfig("tablet") )
320 project->variables()[is_qt ? "PRL_EXPORT_DEFINES" : "DEFINES"].append("QT_TABLET_SUPPORT"); 430 project->variables()[is_qt ? "PRL_EXPORT_DEFINES" : "DEFINES"].append("QT_TABLET_SUPPORT");
321 } 431 }
432
322 if ( project->isActiveConfig("dll") || !project->variables()["QMAKE_APP_FLAG"].isEmpty() ) { 433 if ( project->isActiveConfig("dll") || !project->variables()["QMAKE_APP_FLAG"].isEmpty() ) {
323 project->variables()["CONFIG"].remove("staticlib"); 434 project->variables()["CONFIG"].remove("staticlib");
324 project->variables()["QMAKE_APP_OR_DLL"].append("1"); 435 project->variables()["QMAKE_APP_OR_DLL"].append("1");
325 } else { 436 } else {
326 project->variables()["CONFIG"].append("staticlib"); 437 project->variables()["CONFIG"].append("staticlib");
327 } 438 }
439
328 if ( project->isActiveConfig("warn_off") ) { 440 if ( project->isActiveConfig("warn_off") ) {
329 project->variables()["QMAKE_CFLAGS"] += project->variables()["QMAKE_CFLAGS_WARN_OFF"]; 441 project->variables()["QMAKE_CFLAGS"] += project->variables()["QMAKE_CFLAGS_WARN_OFF"];
330 project->variables()["QMAKE_CXXFLAGS"] += project->variables()["QMAKE_CXXFLAGS_WARN_OFF"]; 442 project->variables()["QMAKE_CXXFLAGS"] += project->variables()["QMAKE_CXXFLAGS_WARN_OFF"];
@@ -332,6 +444,7 @@ MingwMakefileGenerator::init()
332 project->variables()["QMAKE_CFLAGS"] += project->variables()["QMAKE_CFLAGS_WARN_ON"]; 444 project->variables()["QMAKE_CFLAGS"] += project->variables()["QMAKE_CFLAGS_WARN_ON"];
333 project->variables()["QMAKE_CXXFLAGS"] += project->variables()["QMAKE_CXXFLAGS_WARN_ON"]; 445 project->variables()["QMAKE_CXXFLAGS"] += project->variables()["QMAKE_CXXFLAGS_WARN_ON"];
334 } 446 }
447
335 if ( project->isActiveConfig("debug") ) { 448 if ( project->isActiveConfig("debug") ) {
336 if ( project->isActiveConfig("thread") ) { 449 if ( project->isActiveConfig("thread") ) {
337 // use the DLL RT even here 450 // use the DLL RT even here
@@ -363,8 +476,10 @@ MingwMakefileGenerator::init()
363 476
364 if ( !project->variables()["QMAKE_INCDIR"].isEmpty()) 477 if ( !project->variables()["QMAKE_INCDIR"].isEmpty())
365 project->variables()["INCLUDEPATH"] += project->variables()["QMAKE_INCDIR"]; 478 project->variables()["INCLUDEPATH"] += project->variables()["QMAKE_INCDIR"];
479
366 if ( project->isActiveConfig("qt") || project->isActiveConfig("opengl") ) 480 if ( project->isActiveConfig("qt") || project->isActiveConfig("opengl") )
367 project->variables()["CONFIG"].append("windows"); 481 project->variables()["CONFIG"].append("windows");
482
368 if ( project->isActiveConfig("qt") ) { 483 if ( project->isActiveConfig("qt") ) {
369 project->variables()["CONFIG"].append("moc"); 484 project->variables()["CONFIG"].append("moc");
370 project->variables()["INCLUDEPATH"] +=project->variables()["QMAKE_INCDIR_QT"]; 485 project->variables()["INCLUDEPATH"] +=project->variables()["QMAKE_INCDIR_QT"];
@@ -377,6 +492,7 @@ MingwMakefileGenerator::init()
377 project->variables()["QMAKE_LFLAGS"] += project->variables()["QMAKE_LFLAGS_QT_DLL"]; 492 project->variables()["QMAKE_LFLAGS"] += project->variables()["QMAKE_LFLAGS_QT_DLL"];
378 } 493 }
379 } else { 494 } else {
495
380 if(project->isActiveConfig("thread")) 496 if(project->isActiveConfig("thread"))
381 project->variables()["QMAKE_LIBS"] += project->variables()["QMAKE_LIBS_QT_THREAD"]; 497 project->variables()["QMAKE_LIBS"] += project->variables()["QMAKE_LIBS_QT_THREAD"];
382 else 498 else
@@ -396,19 +512,27 @@ MingwMakefileGenerator::init()
396 } 512 }
397 if ( project->isActiveConfig( "activeqt" ) ) { 513 if ( project->isActiveConfig( "activeqt" ) ) {
398 project->variables().remove("QMAKE_LIBS_QT_ENTRY"); 514 project->variables().remove("QMAKE_LIBS_QT_ENTRY");
399 project->variables()["QMAKE_LIBS_QT_ENTRY"] = "qaxserver.lib"; 515 project->variables()["QMAKE_LIBS_QT_ENTRY"] = "-lqaxserver";
400 if ( project->isActiveConfig( "dll" ) ) 516 if ( project->isActiveConfig( "dll" ) ) {
401 project->variables()["QMAKE_LIBS"] += project->variables()["QMAKE_LIBS_QT_ENTRY"]; 517 project->variables()["QMAKE_LIBS"] += project->variables()["QMAKE_LIBS_QT_ENTRY"];
402 } 518 }
519 }
403 if ( !project->isActiveConfig("dll") && !project->isActiveConfig("plugin") ) { 520 if ( !project->isActiveConfig("dll") && !project->isActiveConfig("plugin") ) {
404 project->variables()["QMAKE_LIBS"] +=project->variables()["QMAKE_LIBS_QT_ENTRY"]; 521 project->variables()["QMAKE_LIBS"] +=project->variables()["QMAKE_LIBS_QT_ENTRY"];
405 } 522 }
523
524 // QMAKE_LIBS_QT_ENTRY should be first on the link line as it needs qt
525 project->variables()["QMAKE_LIBS"].remove(project->variables()["QMAKE_LIBS_QT_ENTRY"].first());
526 project->variables()["QMAKE_LIBS"].prepend(project->variables()["QMAKE_LIBS_QT_ENTRY"].first());
527
406 } 528 }
407 } 529 }
530
408 if ( project->isActiveConfig("opengl") ) { 531 if ( project->isActiveConfig("opengl") ) {
409 project->variables()["QMAKE_LIBS"] += project->variables()["QMAKE_LIBS_OPENGL"]; 532 project->variables()["QMAKE_LIBS"] += project->variables()["QMAKE_LIBS_OPENGL"];
410 project->variables()["QMAKE_LFLAGS"] += project->variables()["QMAKE_LFLAGS_OPENGL"]; 533 project->variables()["QMAKE_LFLAGS"] += project->variables()["QMAKE_LFLAGS_OPENGL"];
411 } 534 }
535
412 if ( project->isActiveConfig("dll") ) { 536 if ( project->isActiveConfig("dll") ) {
413 project->variables()["QMAKE_CFLAGS_CONSOLE_ANY"] = project->variables()["QMAKE_CFLAGS_CONSOLE_DLL"]; 537 project->variables()["QMAKE_CFLAGS_CONSOLE_ANY"] = project->variables()["QMAKE_CFLAGS_CONSOLE_DLL"];
414 project->variables()["QMAKE_CXXFLAGS_CONSOLE_ANY"] = project->variables()["QMAKE_CXXFLAGS_CONSOLE_DLL"]; 538 project->variables()["QMAKE_CXXFLAGS_CONSOLE_ANY"] = project->variables()["QMAKE_CXXFLAGS_CONSOLE_DLL"];
@@ -434,6 +558,7 @@ MingwMakefileGenerator::init()
434 project->variables()["TARGET"].first().prepend("lib"); 558 project->variables()["TARGET"].first().prepend("lib");
435 } 559 }
436 } 560 }
561
437 if ( project->isActiveConfig("windows") ) { 562 if ( project->isActiveConfig("windows") ) {
438 if ( project->isActiveConfig("console") ) { 563 if ( project->isActiveConfig("console") ) {
439 project->variables()["QMAKE_CFLAGS"] += project->variables()["QMAKE_CFLAGS_CONSOLE_ANY"]; 564 project->variables()["QMAKE_CFLAGS"] += project->variables()["QMAKE_CFLAGS_CONSOLE_ANY"];
@@ -451,22 +576,56 @@ MingwMakefileGenerator::init()
451 project->variables()["QMAKE_LIBS"] += project->variables()["QMAKE_LIBS_CONSOLE"]; 576 project->variables()["QMAKE_LIBS"] += project->variables()["QMAKE_LIBS_CONSOLE"];
452 } 577 }
453 578
579 if ( project->isActiveConfig("exceptions") ) {
580 project->variables()["QMAKE_CFLAGS"] += project->variables()["QMAKE_CFLAGS_EXCEPTIONS_ON"];
581 project->variables()["QMAKE_CXXFLAGS"] += project->variables()["QMAKE_CXXFLAGS_EXCEPTIONS_ON"];
582 } else {
583 project->variables()["QMAKE_CFLAGS"] += project->variables()["QMAKE_CFLAGS_EXCEPTIONS_OFF"];
584 project->variables()["QMAKE_CXXFLAGS"] += project->variables()["QMAKE_CXXFLAGS_EXCEPTIONS_OFF"];
585 }
586
587 if ( project->isActiveConfig("rtti") ) {
588 project->variables()["QMAKE_CFLAGS"] += project->variables()["QMAKE_CFLAGS_RTTI_ON"];
589 project->variables()["QMAKE_CXXFLAGS"] += project->variables()["QMAKE_CXXFLAGS_RTTI_ON"];
590 } else {
591 project->variables()["QMAKE_CFLAGS"] += project->variables()["QMAKE_CFLAGS_RTTI_OFF"];
592 project->variables()["QMAKE_CXXFLAGS"] += project->variables()["QMAKE_CXXFLAGS_RTTI_OFF"];
593 }
594
454 if ( project->isActiveConfig("moc") ) 595 if ( project->isActiveConfig("moc") )
455 setMocAware(TRUE); 596 setMocAware(TRUE);
597
598 // add -L libs to libdir
599 QStringList &libs = project->variables()["QMAKE_LIBS"];
600 for ( QStringList::Iterator libit = libs.begin(); libit != libs.end(); ) {
601 if ( (*libit).startsWith( "-L" ) ) {
602 project->variables()["QMAKE_LIBDIR"] += (*libit).mid(2);
603 libit = libs.remove( libit );
604 } else {
605 ++libit;
606 }
607 }
608
456 project->variables()["QMAKE_FILETAGS"] += QStringList::split(' ', 609 project->variables()["QMAKE_FILETAGS"] += QStringList::split(' ',
457 "HEADERS SOURCES DEF_FILE RC_FILE TARGET QMAKE_LIBS DESTDIR DLLDESTDIR INCLUDEPATH"); 610 "HEADERS SOURCES DEF_FILE RC_FILE TARGET QMAKE_LIBS DESTDIR DLLDESTDIR INCLUDEPATH");
458 QStringList &l = project->variables()["QMAKE_FILETAGS"]; 611 QStringList &l = project->variables()["QMAKE_FILETAGS"];
459 for(QStringList::Iterator it = l.begin(); it != l.end(); ++it) { 612 QStringList::Iterator it;
613 for(it = l.begin(); it != l.end(); ++it) {
460 QStringList &gdmf = project->variables()[(*it)]; 614 QStringList &gdmf = project->variables()[(*it)];
461 for(QStringList::Iterator inner = gdmf.begin(); inner != gdmf.end(); ++inner) 615 for(QStringList::Iterator inner = gdmf.begin(); inner != gdmf.end(); ++inner)
462 (*inner) = Option::fixPathToTargetOS((*inner), FALSE); 616 (*inner) = Option::fixPathToTargetOS((*inner), FALSE);
463 } 617 }
464 618
465 if ( project->isActiveConfig("dll") ) 619 if ( project->isActiveConfig("dll") ) {
466 project->variables()["QMAKE_LFLAGS"].append(QString("-Wl,--out-implib,") + project->first("DESTDIR") + "\\lib"+ project->first("TARGET") + ".a"); 620 QString destDir = "";
621 if (!project->first("DESTDIR").isEmpty())
622 destDir = project->first("DESTDIR") + Option::dir_sep;
623 project->variables()["QMAKE_LFLAGS"].append(QString("-Wl,--out-implib,") +
624 destDir + "lib" + project->first("TARGET") + ".a");
625 }
467 626
468 if ( !project->variables()["DEF_FILE"].isEmpty() ) 627 if ( !project->variables()["DEF_FILE"].isEmpty() )
469 project->variables()["QMAKE_LFLAGS"].append(QString("-Wl,--output-def,") + project->first("DEF_FILE")); 628 project->variables()["QMAKE_LFLAGS"].append(QString("-Wl,") + project->first("DEF_FILE"));
470// if(!project->isActiveConfig("incremental")) 629// if(!project->isActiveConfig("incremental"))
471 //project->variables()["QMAKE_LFLAGS"].append(QString("/incremental:no")); 630 //project->variables()["QMAKE_LFLAGS"].append(QString("/incremental:no"));
472 631
@@ -480,6 +639,7 @@ MingwMakefileGenerator::init()
480 project->variables()["QMAKE_LFLAGS"].append( "/VERSION:" + major + "." + minor ); 639 project->variables()["QMAKE_LFLAGS"].append( "/VERSION:" + major + "." + minor );
481 } 640 }
482#endif 641#endif
642
483 if ( !project->variables()["RC_FILE"].isEmpty()) { 643 if ( !project->variables()["RC_FILE"].isEmpty()) {
484 if ( !project->variables()["RES_FILE"].isEmpty()) { 644 if ( !project->variables()["RES_FILE"].isEmpty()) {
485 fprintf(stderr, "Both .rc and .res file specified.\n"); 645 fprintf(stderr, "Both .rc and .res file specified.\n");
@@ -489,19 +649,43 @@ MingwMakefileGenerator::init()
489 project->variables()["RES_FILE"] = project->variables()["RC_FILE"]; 649 project->variables()["RES_FILE"] = project->variables()["RC_FILE"];
490 project->variables()["RES_FILE"].first().replace(".rc",".o"); 650 project->variables()["RES_FILE"].first().replace(".rc",".o");
491 project->variables()["POST_TARGETDEPS"] += project->variables()["RES_FILE"]; 651 project->variables()["POST_TARGETDEPS"] += project->variables()["RES_FILE"];
652 project->variables()["CLEAN_FILES"] += project->variables()["RES_FILE"];
492 } 653 }
654
493 if ( !project->variables()["RES_FILE"].isEmpty()) 655 if ( !project->variables()["RES_FILE"].isEmpty())
494 project->variables()["QMAKE_LIBS"] += project->variables()["RES_FILE"]; 656 project->variables()["QMAKE_LIBS"] += project->variables()["RES_FILE"];
495 657
496 MakefileGenerator::init(); 658 MakefileGenerator::init();
659
497 if ( !project->variables()["VERSION"].isEmpty()) { 660 if ( !project->variables()["VERSION"].isEmpty()) {
498 QStringList l = QStringList::split('.', project->first("VERSION")); 661 QStringList l = QStringList::split('.', project->first("VERSION"));
499 project->variables()["VER_MAJ"].append(l[0]); 662 project->variables()["VER_MAJ"].append(l[0]);
500 project->variables()["VER_MIN"].append(l[1]); 663 project->variables()["VER_MIN"].append(l[1]);
501 } 664 }
665
502 if(project->isActiveConfig("dll")) { 666 if(project->isActiveConfig("dll")) {
503 project->variables()["QMAKE_CLEAN"].append(project->first("DESTDIR") +"lib" + project->first("TARGET") + ".a"); 667 project->variables()["QMAKE_CLEAN"].append(project->first("DESTDIR") +"lib" + project->first("TARGET") + ".a");
504 } 668 }
669
670 QStringList &quc = project->variables()["QMAKE_EXTRA_WIN_COMPILERS"];
671 for(it = quc.begin(); it != quc.end(); ++it) {
672 QString tmp_out = project->variables()[(*it) + ".output"].first();
673 if(tmp_out.isEmpty())
674 continue;
675 QStringList &tmp = project->variables()[(*it) + ".input"];
676 for(QStringList::Iterator it2 = tmp.begin(); it2 != tmp.end(); ++it2) {
677 QStringList &inputs = project->variables()[(*it2)];
678 for(QStringList::Iterator input = inputs.begin(); input != inputs.end(); ++input) {
679 QFileInfo fi(Option::fixPathToLocalOS((*input)));
680 QString in = Option::fixPathToTargetOS((*input), FALSE),
681 out = tmp_out;
682 out.replace("${QMAKE_FILE_BASE}", fi.baseName());
683 out.replace("${QMAKE_FILE_NAME}", fi.fileName());
684 if(project->variables()[(*it) + ".CONFIG"].findIndex("no_link") == -1)
685 project->variables()["OBJCOMP"] += out;
686 }
687 }
688 }
505} 689}
506 690
507void 691void
@@ -511,7 +695,7 @@ MingwMakefileGenerator::writeSubDirs(QTextStream &t)
511 QTextStream ts (&qs, IO_WriteOnly) ; 695 QTextStream ts (&qs, IO_WriteOnly) ;
512 Win32MakefileGenerator::writeSubDirs( ts ) ; 696 Win32MakefileGenerator::writeSubDirs( ts ) ;
513 QRegExp rx("(\\n\\tcd [^\\n\\t]+)(\\n\\t.+)\\n\\t@cd ..") ; 697 QRegExp rx("(\\n\\tcd [^\\n\\t]+)(\\n\\t.+)\\n\\t@cd ..") ;
514 rx.setMinimal(true); 698 rx.setMinimal(TRUE);
515 int pos = 0 ; 699 int pos = 0 ;
516 while ( -1 != (pos = rx.search( qs, pos))) 700 while ( -1 != (pos = rx.search( qs, pos)))
517 { 701 {
diff --git a/qmake/generators/win32/mingw_make.h b/qmake/generators/win32/mingw_make.h
index c00bf1b..d971e3a 100644
--- a/qmake/generators/win32/mingw_make.h
+++ b/qmake/generators/win32/mingw_make.h
@@ -1,11 +1,11 @@
1/**************************************************************************** 1/****************************************************************************
2** $Id$
3** 2**
4** Definition of ________ class.
5** 3**
6** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. 4** Definition of MingwMakefileGenerator class.
7** 5**
8** This file is part of the network module of the Qt GUI Toolkit. 6** Copyright (C) 1992-2003 Trolltech AS. All rights reserved.
7**
8** This file is part of qmake.
9** 9**
10** This file may be distributed under the terms of the Q Public License 10** This file may be distributed under the terms of the Q Public License
11** as defined by Trolltech AS of Norway and appearing in the file 11** as defined by Trolltech AS of Norway and appearing in the file
@@ -32,6 +32,7 @@
32** not clear to you. 32** not clear to you.
33** 33**
34**********************************************************************/ 34**********************************************************************/
35
35#ifndef __MINGW_MAKE_H__ 36#ifndef __MINGW_MAKE_H__
36#define __MINGW_MAKE_H__ 37#define __MINGW_MAKE_H__
37 38
@@ -46,6 +47,8 @@ class MingwMakefileGenerator : public Win32MakefileGenerator
46 bool writeMakefile(QTextStream &); 47 bool writeMakefile(QTextStream &);
47 void init(); 48 void init();
48 49
50 virtual bool findLibraries();
51
49public: 52public:
50 MingwMakefileGenerator(QMakeProject *p); 53 MingwMakefileGenerator(QMakeProject *p);
51 ~MingwMakefileGenerator(); 54 ~MingwMakefileGenerator();
diff --git a/qmake/generators/win32/msvc_dsp.cpp b/qmake/generators/win32/msvc_dsp.cpp
index 3fa0496..d2abac6 100644
--- a/qmake/generators/win32/msvc_dsp.cpp
+++ b/qmake/generators/win32/msvc_dsp.cpp
@@ -1,13 +1,11 @@
1/**************************************************************************** 1/****************************************************************************
2** $Id$
3** 2**
4** Definition of ________ class.
5** 3**
6** Created : 970521 4** Implementation of DspMakefileGenerator class.
7** 5**
8** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. 6** Copyright (C) 1992-2003 Trolltech AS. All rights reserved.
9** 7**
10** This file is part of the network module of the Qt GUI Toolkit. 8** This file is part of qmake.
11** 9**
12** This file may be distributed under the terms of the Q Public License 10** This file may be distributed under the terms of the Q Public License
13** as defined by Trolltech AS of Norway and appearing in the file 11** as defined by Trolltech AS of Norway and appearing in the file
@@ -78,6 +76,8 @@ DspMakefileGenerator::writeDspParts(QTextStream &t)
78 } else { 76 } else {
79 dspfile = project->first("MSVCDSP_TEMPLATE"); 77 dspfile = project->first("MSVCDSP_TEMPLATE");
80 } 78 }
79 if (dspfile.startsWith("\"") && dspfile.endsWith("\""))
80 dspfile = dspfile.mid(1, dspfile.length() - 2);
81 QString dspfile_loc = findTemplate(dspfile); 81 QString dspfile_loc = findTemplate(dspfile);
82 82
83 QFile file(dspfile_loc); 83 QFile file(dspfile_loc);
@@ -87,6 +87,30 @@ DspMakefileGenerator::writeDspParts(QTextStream &t)
87 } 87 }
88 QTextStream dsp(&file); 88 QTextStream dsp(&file);
89 89
90 QString platform = "Win32";
91 if ( !project->variables()["QMAKE_PLATFORM"].isEmpty() )
92 platform = varGlue("QMAKE_PLATFORM", "", " ", "");
93
94 // Setup PCH variables
95 precompH = project->first("PRECOMPILED_HEADER");
96 QString namePCH = QFileInfo(precompH).fileName();
97 usePCH = !precompH.isEmpty() && project->isActiveConfig("precompile_header");
98 if (usePCH) {
99 // Created files
100 QString origTarget = project->first("QMAKE_ORIG_TARGET");
101 origTarget.replace(QRegExp("-"), "_");
102 precompObj = "\"$(IntDir)\\" + origTarget + Option::obj_ext + "\"";
103 precompPch = "\"$(IntDir)\\" + origTarget + ".pch\"";
104 // Add PRECOMPILED_HEADER to HEADERS
105 if (!project->variables()["HEADERS"].contains(precompH))
106 project->variables()["HEADERS"] += precompH;
107 // Add precompile compiler options
108 project->variables()["PRECOMPILED_FLAGS_REL"] = "/Yu\"" + namePCH + "\" /FI\"" + namePCH + "\" ";
109 project->variables()["PRECOMPILED_FLAGS_DEB"] = "/Yu\"" + namePCH + "\" /FI\"" + namePCH + "\" ";
110 // Return to variable pool
111 project->variables()["PRECOMPILED_OBJECT"] = precompObj;
112 project->variables()["PRECOMPILED_PCH"] = precompPch;
113 }
90 int rep; 114 int rep;
91 QString line; 115 QString line;
92 while ( !dsp.eof() ) { 116 while ( !dsp.eof() ) {
@@ -111,7 +135,9 @@ DspMakefileGenerator::writeDspParts(QTextStream &t)
111 for( it = list.begin(); it != list.end(); ++it) { 135 for( it = list.begin(); it != list.end(); ++it) {
112 beginGroupForFile((*it), t); 136 beginGroupForFile((*it), t);
113 t << "# Begin Source File\n\nSOURCE=" << (*it) << endl; 137 t << "# Begin Source File\n\nSOURCE=" << (*it) << endl;
114 if ( project->isActiveConfig("moc") && (*it).endsWith(Option::moc_ext)) { 138 if (usePCH && (*it).endsWith(".c"))
139 t << "# SUBTRACT CPP /FI\"" << namePCH << "\" /Yu\"" << namePCH << "\" /Fp" << endl;
140 if ( project->isActiveConfig("moc") && (*it).endsWith(Option::cpp_moc_ext)) {
115 QString base = (*it); 141 QString base = (*it);
116 base.replace(QRegExp("\\..*$"), "").upper(); 142 base.replace(QRegExp("\\..*$"), "").upper();
117 base.replace(QRegExp("[^a-zA-Z]"), "_"); 143 base.replace(QRegExp("[^a-zA-Z]"), "_");
@@ -124,8 +150,8 @@ DspMakefileGenerator::writeDspParts(QTextStream &t)
124 150
125 t << "USERDEP_" << base << "=\".\\" << findMocSource((*it)) << "\" \"$(QTDIR)\\bin\\moc.exe\"" << endl << endl; 151 t << "USERDEP_" << base << "=\".\\" << findMocSource((*it)) << "\" \"$(QTDIR)\\bin\\moc.exe\"" << endl << endl;
126 152
127 t << "!IF \"$(CFG)\" == \"" << var("MSVCDSP_PROJECT") << " - Win32 Release\"" << build 153 t << "!IF \"$(CFG)\" == \"" << var("MSVCDSP_PROJECT") << " - " << platform << " Release\"" << build
128 << "!ELSEIF \"$(CFG)\" == \"" << var("MSVCDSP_PROJECT") << " - Win32 Debug\"" 154 << "!ELSEIF \"$(CFG)\" == \"" << var("MSVCDSP_PROJECT") << " - " << platform << " Debug\""
129 << build << "!ENDIF " << endl << endl; 155 << build << "!ENDIF " << endl << endl;
130 } 156 }
131 t << "# End Source File" << endl; 157 t << "# End Source File" << endl;
@@ -146,25 +172,77 @@ DspMakefileGenerator::writeDspParts(QTextStream &t)
146 for(QStringList::Iterator it = list.begin(); it != list.end(); ++it) { 172 for(QStringList::Iterator it = list.begin(); it != list.end(); ++it) {
147 // beginGroupForFile((*it), t); 173 // beginGroupForFile((*it), t);
148 t << "# Begin Source File\n\nSOURCE=" << (*it) << endl << endl; 174 t << "# Begin Source File\n\nSOURCE=" << (*it) << endl << endl;
149 if ( project->isActiveConfig("moc") && !findMocDestination((*it)).isEmpty()) { 175 QString compilePCH;
176 QStringList customDependencies;
177 QString createMOC;
178 QString buildCmdsR, buildCmdsD;
179 QString buildCmds = "\nBuildCmds= \\\n";
180 // Create unique baseID
150 QString base = (*it); 181 QString base = (*it);
182 {
151 base.replace(QRegExp("\\..*$"), "").upper(); 183 base.replace(QRegExp("\\..*$"), "").upper();
152 base.replace(QRegExp("[^a-zA-Z]"), "_"); 184 base.replace(QRegExp("[^a-zA-Z]"), "_");
153 185 }
186 if (usePCH && precompH.endsWith(*it)) {
187 QString basicBuildCmd = QString("\tcl.exe /TP /W3 /FD /c /D \"WIN32\" /Yc /Fp\"%1\" /Fo\"%2\" %3 %4 %5 %6 %7 %8 %9 /D \"")
188 .arg(precompPch)
189 .arg(precompObj)
190 .arg(var("MSVCDSP_INCPATH"))
191 .arg(var("MSVCDSP_DEFINES"))
192 .arg(var("MSVCDSP_CXXFLAGS"));
193 buildCmdsR = basicBuildCmd
194 .arg("/D \"NDEBUG\"")
195 .arg(var("QMAKE_CXXFLAGS_RELEASE"))
196 .arg(var("MSVCDSP_MTDEF"))
197 .arg(var("MSVCDSP_RELDEFS"));
198 buildCmdsD = basicBuildCmd
199 .arg("/D \"_DEBUG\" /Od")
200 .arg(var("QMAKE_CXXFLAGS_DEBUG"))
201 .arg(var("MSVCDSP_MTDEFD"))
202 .arg(var("MSVCDSP_DEBUG_OPT"));
203 if (project->first("TEMPLATE") == "vcapp") {// App
204 buildCmdsR += var("MSVCDSP_WINCONDEF");
205 buildCmdsD += var("MSVCDSP_WINCONDEF");
206 } else if (project->isActiveConfig("dll")) {// Dll
207 buildCmdsR += "_WINDOWS\" /D \"_USRDLL";
208 buildCmdsD += "_WINDOWS\" /D \"_USRDLL";
209 } else { // Lib
210 buildCmdsR += "_LIB";
211 buildCmdsD += "_LIB";
212 }
213 buildCmdsR += "\" /Fd\"$(IntDir)\\\\\" " + (*it) + " \\\n";
214 buildCmdsD += "\" /Fd\"$(IntDir)\\\\\" " + (*it) + " \\\n";
215
216 compilePCH = precompPch + " : $(SOURCE) \"$(INTDIR)\" \"$(OUTDIR)\"\n $(BuildCmds)\n\n";
217
218 QStringList &tmp = findDependencies(precompH);
219 if(!tmp.isEmpty()) // Got Deps for PCH
220 customDependencies += tmp;
221 }
222 if (project->isActiveConfig("moc") && !findMocDestination((*it)).isEmpty()) {
154 QString mocpath = var( "QMAKE_MOC" ); 223 QString mocpath = var( "QMAKE_MOC" );
155 mocpath = mocpath.replace( QRegExp( "\\..*$" ), "" ) + " "; 224 mocpath = mocpath.replace( QRegExp( "\\..*$" ), "" ) + " ";
225 buildCmds += "\t" + mocpath + (*it) + " -o " + findMocDestination((*it)) + " \\\n";
226 createMOC = "\"" + findMocDestination((*it)) +"\" : $(SOURCE) \"$(INTDIR)\" \"$(OUTDIR)\"\n $(BuildCmds)\n\n";
227 customDependencies += "\"$(QTDIR)\\bin\\moc.exe\"";
228 }
229 if (!createMOC.isEmpty() || !compilePCH.isEmpty()) {
230 bool doMOC = !createMOC.isEmpty();
231 bool doPCH = !compilePCH.isEmpty();
232 QString build = "\n\n# Begin Custom Build - "+
233 QString(doMOC?"Moc'ing ":"") +
234 QString((doMOC&&doPCH)?" and ":"") +
235 QString(doPCH?"Creating PCH cpp from ":"") +
236 (*it) + "...\nInputPath=.\\" + (*it) + "\n\n" +
237 buildCmds + "%1\n" +
238 createMOC +
239 compilePCH +
240 "# End Custom Build\n\n";
156 241
157 QString build = "\n\n# Begin Custom Build - Moc'ing " + (*it) + 242 t << "USERDEP_" << base << "=" << valGlue(customDependencies, "\"", "\" \"", "\"") << endl << endl;
158 "...\n" "InputPath=.\\" + (*it) + "\n\n" "\"" + findMocDestination((*it)) + 243 t << "!IF \"$(CFG)\" == \"" << var("MSVCDSP_PROJECT") << " - " << platform << " Release\"" << build.arg(buildCmdsR)
159 "\"" " : $(SOURCE) \"$(INTDIR)\" \"$(OUTDIR)\"\n" 244 << "!ELSEIF \"$(CFG)\" == \"" << var("MSVCDSP_PROJECT") << " - " << platform << " Debug\"" << build.arg(buildCmdsD)
160 "\t" + mocpath + (*it) + " -o " + 245 << "!ENDIF " << endl << endl;
161 findMocDestination((*it)) + "\n\n" "# End Custom Build\n\n";
162
163 t << "USERDEP_" << base << "=\"$(QTDIR)\\bin\\moc.exe\"" << endl << endl;
164
165 t << "!IF \"$(CFG)\" == \"" << var("MSVCDSP_PROJECT") << " - Win32 Release\"" << build
166 << "!ELSEIF \"$(CFG)\" == \"" << var("MSVCDSP_PROJECT") << " - Win32 Debug\""
167 << build << "!ENDIF " << endl << endl;
168 } 246 }
169 t << "# End Source File" << endl; 247 t << "# End Source File" << endl;
170 } 248 }
@@ -252,7 +330,7 @@ DspMakefileGenerator::writeDspParts(QTextStream &t)
252 for(QStringList::Iterator it = list.begin(); it != list.end(); ++it) { 330 for(QStringList::Iterator it = list.begin(); it != list.end(); ++it) {
253 // beginGroupForFile((*it), t); 331 // beginGroupForFile((*it), t);
254 t << "# Begin Source File\n\nSOURCE=" << (*it) << endl; 332 t << "# Begin Source File\n\nSOURCE=" << (*it) << endl;
255 if ( project->isActiveConfig("moc") && (*it).endsWith(Option::moc_ext)) { 333 if ( project->isActiveConfig("moc") && (*it).endsWith(Option::cpp_moc_ext)) {
256 QString base = (*it); 334 QString base = (*it);
257 base.replace(QRegExp("\\..*$"), "").upper(); 335 base.replace(QRegExp("\\..*$"), "").upper();
258 base.replace(QRegExp("[^a-zA-Z]"), "_"); 336 base.replace(QRegExp("[^a-zA-Z]"), "_");
@@ -265,8 +343,8 @@ DspMakefileGenerator::writeDspParts(QTextStream &t)
265 343
266 t << "USERDEP_" << base << "=\".\\" << findMocSource((*it)) << "\" \"$(QTDIR)\\bin\\moc.exe\"" << endl << endl; 344 t << "USERDEP_" << base << "=\".\\" << findMocSource((*it)) << "\" \"$(QTDIR)\\bin\\moc.exe\"" << endl << endl;
267 345
268 t << "!IF \"$(CFG)\" == \"" << var("MSVCDSP_PROJECT") << " - Win32 Release\"" << build 346 t << "!IF \"$(CFG)\" == \"" << var("MSVCDSP_PROJECT") << " - " << platform << " Release\"" << build
269 << "!ELSEIF \"$(CFG)\" == \"" << var("MSVCDSP_PROJECT") << " - Win32 Debug\"" 347 << "!ELSEIF \"$(CFG)\" == \"" << var("MSVCDSP_PROJECT") << " - " << platform << " Debug\""
270 << build << "!ENDIF " << endl << endl; 348 << build << "!ENDIF " << endl << endl;
271 } 349 }
272 t << "# End Source File" << endl; 350 t << "# End Source File" << endl;
@@ -387,19 +465,20 @@ DspMakefileGenerator::writeDspParts(QTextStream &t)
387 "InputPath=.\\" + base + "\n\n" "BuildCmds= \\\n\t" + uicpath + base + 465 "InputPath=.\\" + base + "\n\n" "BuildCmds= \\\n\t" + uicpath + base +
388 " -o " + uiHeadersDir + fname + ".h \\\n" "\t" + uicpath + base + 466 " -o " + uiHeadersDir + fname + ".h \\\n" "\t" + uicpath + base +
389 " -i " + fname + ".h -o " + uiSourcesDir + fname + ".cpp \\\n" 467 " -i " + fname + ".h -o " + uiSourcesDir + fname + ".cpp \\\n"
390 "\t" + mocpath + uiHeadersDir + fname + ".h -o " + mocFile + "moc_" + fname + ".cpp \\\n"; 468 "\t" + mocpath + " " + uiHeadersDir +
469 fname + ".h -o " + mocFile + Option::h_moc_mod + fname + Option::h_moc_ext + " \\\n";
391 470
392 build.append("\n\"" + uiHeadersDir + fname + ".h\" : \"$(SOURCE)\" \"$(INTDIR)\" \"$(OUTDIR)\"" "\n" 471 build.append("\n\"" + uiHeadersDir + fname + ".h\" : \"$(SOURCE)\" \"$(INTDIR)\" \"$(OUTDIR)\"" "\n"
393 "\t$(BuildCmds)\n\n" 472 "\t$(BuildCmds)\n\n"
394 "\"" + uiSourcesDir + fname + ".cpp\" : \"$(SOURCE)\" \"$(INTDIR)\" \"$(OUTDIR)\"" "\n" 473 "\"" + uiSourcesDir + fname + ".cpp\" : \"$(SOURCE)\" \"$(INTDIR)\" \"$(OUTDIR)\"" "\n"
395 "\t$(BuildCmds)\n\n" 474 "\t$(BuildCmds)\n\n"
396 "\"" + mocFile + "moc_" + fname + ".cpp\" : \"$(SOURCE)\" \"$(INTDIR)\" \"$(OUTDIR)\"" "\n" 475 "\"" + mocFile + Option::h_moc_mod + fname + Option::h_moc_ext + "\" : \"$(SOURCE)\" \"$(INTDIR)\" \"$(OUTDIR)\"" "\n"
397 "\t$(BuildCmds)\n\n"); 476 "\t$(BuildCmds)\n\n");
398 477
399 build.append("# End Custom Build\n\n"); 478 build.append("# End Custom Build\n\n");
400 479
401 t << "!IF \"$(CFG)\" == \"" << var("MSVCDSP_PROJECT") << " - Win32 Release\"" << build 480 t << "!IF \"$(CFG)\" == \"" << var("MSVCDSP_PROJECT") << " - " << platform << " Release\"" << build
402 << "!ELSEIF \"$(CFG)\" == \"" << var("MSVCDSP_PROJECT") << " - Win32 Debug\"" << build 481 << "!ELSEIF \"$(CFG)\" == \"" << var("MSVCDSP_PROJECT") << " - " << platform << " Debug\"" << build
403 << "!ENDIF \n\n" << "# End Source File" << endl; 482 << "!ENDIF \n\n" << "# End Source File" << endl;
404 } 483 }
405 // endGroups(t); 484 // endGroups(t);
@@ -429,8 +508,8 @@ DspMakefileGenerator::writeDspParts(QTextStream &t)
429 "\tdel " + fname + "\\\n" 508 "\tdel " + fname + "\\\n"
430 "\tcopy lex.yy.c " + fname + "\n\n" + 509 "\tcopy lex.yy.c " + fname + "\n\n" +
431 "# End Custom Build\n\n"; 510 "# End Custom Build\n\n";
432 t << "!IF \"$(CFG)\" == \"" << var("MSVCDSP_PROJECT") << " - Win32 Release\"" << build 511 t << "!IF \"$(CFG)\" == \"" << var("MSVCDSP_PROJECT") << " - " << platform << " Release\"" << build
433 << "!ELSEIF \"$(CFG)\" == \"" << var("MSVCDSP_PROJECT") << " - Win32 Debug\"" << build 512 << "!ELSEIF \"$(CFG)\" == \"" << var("MSVCDSP_PROJECT") << " - " << platform << " Debug\"" << build
434 << "!ENDIF \n\n" << build 513 << "!ENDIF \n\n" << build
435 514
436 << "# End Source File" << endl; 515 << "# End Source File" << endl;
@@ -465,8 +544,8 @@ DspMakefileGenerator::writeDspParts(QTextStream &t)
465 "\tmove y.tab.c " + fname + Option::cpp_ext.first() + "\n\n" + 544 "\tmove y.tab.c " + fname + Option::cpp_ext.first() + "\n\n" +
466 "# End Custom Build\n\n"; 545 "# End Custom Build\n\n";
467 546
468 t << "!IF \"$(CFG)\" == \"" << var("MSVCDSP_PROJECT") << " - Win32 Release\"" << build 547 t << "!IF \"$(CFG)\" == \"" << var("MSVCDSP_PROJECT") << " - " << platform << " Release\"" << build
469 << "!ELSEIF \"$(CFG)\" == \"" << var("MSVCDSP_PROJECT") << " - Win32 Debug\"" << build 548 << "!ELSEIF \"$(CFG)\" == \"" << var("MSVCDSP_PROJECT") << " - " << platform << " Debug\"" << build
470 << "!ENDIF \n\n" 549 << "!ENDIF \n\n"
471 << "# End Source File" << endl; 550 << "# End Source File" << endl;
472 } 551 }
@@ -532,6 +611,7 @@ DspMakefileGenerator::init()
532 project->variables()["QMAKE_CXXFLAGS"] += project->variables()["QMAKE_CXXFLAGS_RTTI_OFF"]; 611 project->variables()["QMAKE_CXXFLAGS"] += project->variables()["QMAKE_CXXFLAGS_RTTI_OFF"];
533 } 612 }
534 613
614
535 /* this should probably not be here, but I'm using it to wrap the .t files */ 615 /* this should probably not be here, but I'm using it to wrap the .t files */
536 if(project->first("TEMPLATE") == "vcapp" ) 616 if(project->first("TEMPLATE") == "vcapp" )
537 project->variables()["QMAKE_APP_FLAG"].append("1"); 617 project->variables()["QMAKE_APP_FLAG"].append("1");
@@ -548,6 +628,12 @@ DspMakefileGenerator::init()
548 project->variables()["DEFINES"].append("QT_DLL"); 628 project->variables()["DEFINES"].append("QT_DLL");
549 if (project->isActiveConfig("qt_dll")) 629 if (project->isActiveConfig("qt_dll"))
550 if(configs.findIndex("qt") == -1) configs.append("qt"); 630 if(configs.findIndex("qt") == -1) configs.append("qt");
631 if ( project->isActiveConfig("qtopia") ) {
632 if(configs.findIndex("qtopialib") == -1)
633 configs.append("qtopialib");
634 if(configs.findIndex("qtopiainc") == -1)
635 configs.append("qtopiainc");
636 }
551 if ( project->isActiveConfig("qt") ) { 637 if ( project->isActiveConfig("qt") ) {
552 if ( project->isActiveConfig( "plugin" ) ) { 638 if ( project->isActiveConfig( "plugin" ) ) {
553 project->variables()["CONFIG"].append("dll"); 639 project->variables()["CONFIG"].append("dll");
@@ -581,6 +667,14 @@ DspMakefileGenerator::init()
581 project->variables()["MSVCDSP_VERSION"].append( "/VERSION:" + major + "." + minor ); 667 project->variables()["MSVCDSP_VERSION"].append( "/VERSION:" + major + "." + minor );
582 } 668 }
583 669
670 if ( project->isActiveConfig("qtopiainc") )
671 project->variables()["INCLUDEPATH"] += project->variables()["QMAKE_INCDIR_QTOPIA"];
672 if ( project->isActiveConfig("qtopialib") ) {
673 if(!project->isEmpty("QMAKE_LIBDIR_QTOPIA"))
674 project->variables()["QMAKE_LIBDIR"] += project->variables()["QMAKE_LIBDIR_QTOPIA"];
675 project->variables()["QMAKE_LIBS"] += project->variables()["QMAKE_LIBS_QTOPIA"];
676 }
677
584 if ( project->isActiveConfig("qt") ) { 678 if ( project->isActiveConfig("qt") ) {
585 project->variables()["CONFIG"].append("moc"); 679 project->variables()["CONFIG"].append("moc");
586 project->variables()["INCLUDEPATH"] +=project->variables()["QMAKE_INCDIR_QT"]; 680 project->variables()["INCLUDEPATH"] +=project->variables()["QMAKE_INCDIR_QT"];
@@ -634,6 +728,8 @@ DspMakefileGenerator::init()
634 } else { 728 } else {
635 if ( !project->first("OBJECTS_DIR").isEmpty() ) 729 if ( !project->first("OBJECTS_DIR").isEmpty() )
636 project->variables()["MSVCDSP_OBJECTSDIRREL"] = project->first("OBJECTS_DIR"); 730 project->variables()["MSVCDSP_OBJECTSDIRREL"] = project->first("OBJECTS_DIR");
731 else
732 project->variables()["MSVCDSP_OBJECTSDIRREL"] = "Release";
637 project->variables()["MSVCDSP_OBJECTSDIRDEB"] = "Debug"; 733 project->variables()["MSVCDSP_OBJECTSDIRDEB"] = "Debug";
638 if ( !project->first("DESTDIR").isEmpty() ) 734 if ( !project->first("DESTDIR").isEmpty() )
639 project->variables()["MSVCDSP_TARGETDIRREL"] = project->first("DESTDIR"); 735 project->variables()["MSVCDSP_TARGETDIRREL"] = project->first("DESTDIR");
@@ -670,6 +766,10 @@ DspMakefileGenerator::init()
670 project->variables()[is_qt ? "PRL_EXPORT_DEFINES" : "DEFINES"].append("QT_TABLET_SUPPORT"); 766 project->variables()[is_qt ? "PRL_EXPORT_DEFINES" : "DEFINES"].append("QT_TABLET_SUPPORT");
671 } 767 }
672 if ( project->isActiveConfig("dll") ) { 768 if ( project->isActiveConfig("dll") ) {
769 project->variables()["QMAKE_CFLAGS_CONSOLE_ANY"] = project->variables()["QMAKE_CFLAGS_CONSOLE_DLL"];
770 project->variables()["QMAKE_CXXFLAGS_CONSOLE_ANY"] = project->variables()["QMAKE_CXXFLAGS_CONSOLE_DLL"];
771 project->variables()["QMAKE_LFLAGS_CONSOLE_ANY"] = project->variables()["QMAKE_LFLAGS_CONSOLE_DLL"];
772 project->variables()["QMAKE_LFLAGS_WINDOWS_ANY"] = project->variables()["QMAKE_LFLAGS_WINDOWS_DLL"];
673 if ( !project->variables()["QMAKE_LIB_FLAG"].isEmpty() ) { 773 if ( !project->variables()["QMAKE_LIB_FLAG"].isEmpty() ) {
674 QString ver_xyz(project->first("VERSION")); 774 QString ver_xyz(project->first("VERSION"));
675 ver_xyz.replace(".", ""); 775 ver_xyz.replace(".", "");
@@ -678,12 +778,33 @@ DspMakefileGenerator::init()
678 project->variables()["TARGET_EXT"].append(".dll"); 778 project->variables()["TARGET_EXT"].append(".dll");
679 } 779 }
680 } else { 780 } else {
781 project->variables()["QMAKE_CFLAGS_CONSOLE_ANY"] = project->variables()["QMAKE_CFLAGS_CONSOLE"];
782 project->variables()["QMAKE_CXXFLAGS_CONSOLE_ANY"] = project->variables()["QMAKE_CXXFLAGS_CONSOLE"];
783 project->variables()["QMAKE_LFLAGS_CONSOLE_ANY"] = project->variables()["QMAKE_LFLAGS_CONSOLE"];
784 project->variables()["QMAKE_LFLAGS_WINDOWS_ANY"] = project->variables()["QMAKE_LFLAGS_WINDOWS"];
681 if ( !project->variables()["QMAKE_APP_FLAG"].isEmpty() ) 785 if ( !project->variables()["QMAKE_APP_FLAG"].isEmpty() )
682 project->variables()["TARGET_EXT"].append(".exe"); 786 project->variables()["TARGET_EXT"].append(".exe");
683 else 787 else
684 project->variables()["TARGET_EXT"].append(".lib"); 788 project->variables()["TARGET_EXT"].append(".lib");
685 } 789 }
686 790
791 if ( project->isActiveConfig("windows") ) {
792 if ( project->isActiveConfig("console") ) {
793 project->variables()["QMAKE_CFLAGS"] += project->variables()["QMAKE_CFLAGS_CONSOLE_ANY"];
794 project->variables()["QMAKE_CXXFLAGS"] += project->variables()["QMAKE_CXXFLAGS_CONSOLE_ANY"];
795 project->variables()["QMAKE_LFLAGS"] += project->variables()["QMAKE_LFLAGS_CONSOLE_ANY"];
796 project->variables()["QMAKE_LIBS"] += project->variables()["QMAKE_LIBS_CONSOLE"];
797 } else {
798 project->variables()["QMAKE_LFLAGS"] += project->variables()["QMAKE_LFLAGS_WINDOWS_ANY"];
799 }
800 project->variables()["QMAKE_LIBS"] += project->variables()["QMAKE_LIBS_WINDOWS"];
801 } else {
802 project->variables()["QMAKE_CFLAGS"] += project->variables()["QMAKE_CFLAGS_CONSOLE_ANY"];
803 project->variables()["QMAKE_CXXFLAGS"] += project->variables()["QMAKE_CXXFLAGS_CONSOLE_ANY"];
804 project->variables()["QMAKE_LFLAGS"] += project->variables()["QMAKE_LFLAGS_CONSOLE_ANY"];
805 project->variables()["QMAKE_LIBS"] += project->variables()["QMAKE_LIBS_CONSOLE"];
806 }
807
687 project->variables()["MSVCDSP_VER"] = "6.00"; 808 project->variables()["MSVCDSP_VER"] = "6.00";
688 project->variables()["MSVCDSP_DEBUG_OPT"] = "/GZ /ZI"; 809 project->variables()["MSVCDSP_DEBUG_OPT"] = "/GZ /ZI";
689 810
@@ -732,12 +853,10 @@ DspMakefileGenerator::init()
732 project->variables()["MSVCDSP_CONSOLE"].append("Console"); 853 project->variables()["MSVCDSP_CONSOLE"].append("Console");
733 project->variables()["MSVCDSP_WINCONDEF"].append("_CONSOLE"); 854 project->variables()["MSVCDSP_WINCONDEF"].append("_CONSOLE");
734 project->variables()["MSVCDSP_DSPTYPE"].append("0x0103"); 855 project->variables()["MSVCDSP_DSPTYPE"].append("0x0103");
735 project->variables()["MSVCDSP_SUBSYSTEM"].append("console");
736 } else { 856 } else {
737 project->variables()["MSVCDSP_CONSOLE"].clear(); 857 project->variables()["MSVCDSP_CONSOLE"].clear();
738 project->variables()["MSVCDSP_WINCONDEF"].append("_WINDOWS"); 858 project->variables()["MSVCDSP_WINCONDEF"].append("_WINDOWS");
739 project->variables()["MSVCDSP_DSPTYPE"].append("0x0101"); 859 project->variables()["MSVCDSP_DSPTYPE"].append("0x0101");
740 project->variables()["MSVCDSP_SUBSYSTEM"].append("windows");
741 } 860 }
742 } else { 861 } else {
743 if ( project->isActiveConfig("dll") ) { 862 if ( project->isActiveConfig("dll") ) {
@@ -749,6 +868,19 @@ DspMakefileGenerator::init()
749 868
750 project->variables()["QMAKE_LIBS"] += project->variables()["QMAKE_LIBS_WINDOWS"]; 869 project->variables()["QMAKE_LIBS"] += project->variables()["QMAKE_LIBS_WINDOWS"];
751 870
871 processPrlFiles();
872
873 // Update -lname to name.lib,
874 QStringList &libs2 = project->variables()["QMAKE_LIBS"];
875 for ( QStringList::Iterator libit2 = libs2.begin(); libit2 != libs2.end(); ++libit2 ) {
876 if ( (*libit2).startsWith( "-l" ) ) {
877 (*libit2) = (*libit2).mid( 2 ) + ".lib";
878 } else if ( (*libit2).startsWith( "-L" ) ) {
879 project->variables()["QMAKE_LIBDIR"] += (*libit2).mid(2);
880 libit2 = libs2.remove( libit2 );
881 }
882 }
883
752 project->variables()["MSVCDSP_LFLAGS" ] += project->variables()["QMAKE_LFLAGS"]; 884 project->variables()["MSVCDSP_LFLAGS" ] += project->variables()["QMAKE_LFLAGS"];
753 if ( !project->variables()["QMAKE_LIBDIR"].isEmpty() ) 885 if ( !project->variables()["QMAKE_LIBDIR"].isEmpty() )
754 project->variables()["MSVCDSP_LFLAGS" ].append(varGlue("QMAKE_LIBDIR","/LIBPATH:\"","\" /LIBPATH:\"","\"")); 886 project->variables()["MSVCDSP_LFLAGS" ].append(varGlue("QMAKE_LIBDIR","/LIBPATH:\"","\" /LIBPATH:\"","\""));
@@ -756,7 +888,9 @@ DspMakefileGenerator::init()
756 project->variables()["MSVCDSP_DEFINES"].append(varGlue("DEFINES","/D ","" " /D ","")); 888 project->variables()["MSVCDSP_DEFINES"].append(varGlue("DEFINES","/D ","" " /D ",""));
757 project->variables()["MSVCDSP_DEFINES"].append(varGlue("PRL_EXPORT_DEFINES","/D ","" " /D ","")); 889 project->variables()["MSVCDSP_DEFINES"].append(varGlue("PRL_EXPORT_DEFINES","/D ","" " /D ",""));
758 890
759 processPrlFiles(); 891 if (!project->variables()["RES_FILE"].isEmpty())
892 project->variables()["QMAKE_LIBS"] += project->variables()["RES_FILE"];
893
760 QStringList &libs = project->variables()["QMAKE_LIBS"]; 894 QStringList &libs = project->variables()["QMAKE_LIBS"];
761 for(QStringList::Iterator libit = libs.begin(); libit != libs.end(); ++libit) { 895 for(QStringList::Iterator libit = libs.begin(); libit != libs.end(); ++libit) {
762 QString lib = (*libit); 896 QString lib = (*libit);
@@ -768,6 +902,8 @@ DspMakefileGenerator::init()
768 for(QStringList::Iterator incit = incs.begin(); incit != incs.end(); ++incit) { 902 for(QStringList::Iterator incit = incs.begin(); incit != incs.end(); ++incit) {
769 QString inc = (*incit); 903 QString inc = (*incit);
770 inc.replace("\"", ""); 904 inc.replace("\"", "");
905 if(inc.endsWith("\\")) // Remove trailing \'s from paths
906 inc.truncate(inc.length()-1);
771 project->variables()["MSVCDSP_INCPATH"].append("/I \"" + inc + "\""); 907 project->variables()["MSVCDSP_INCPATH"].append("/I \"" + inc + "\"");
772 } 908 }
773 909
@@ -820,15 +956,12 @@ DspMakefileGenerator::init()
820 QString version = project->variables()["VERSION"].first(); 956 QString version = project->variables()["VERSION"].first();
821 if ( version.isEmpty() ) 957 if ( version.isEmpty() )
822 version = "1.0"; 958 version = "1.0";
823 959 project->variables()["MSVCDSP_IDLSOURCES"].append( var("OBJECTS_DIR") + targetfilename + ".idl" );
824 project->variables()["MSVCDSP_IDLSOURCES"].append( "tmp\\" + targetfilename + ".idl" );
825 project->variables()["MSVCDSP_IDLSOURCES"].append( "tmp\\" + targetfilename + ".tlb" );
826 project->variables()["MSVCDSP_IDLSOURCES"].append( "tmp\\" + targetfilename + ".midl" );
827 if ( project->isActiveConfig( "dll" ) ) { 960 if ( project->isActiveConfig( "dll" ) ) {
828 activeQtStepPreCopyDll += 961 activeQtStepPreCopyDll +=
829 "\t" + idc + " %1 -idl tmp\\" + targetfilename + ".idl -version " + version + 962 "\t" + idc + " %1 -idl " + var("OBJECTS_DIR") + targetfilename + ".idl -version " + version +
830 "\t" + idl + " tmp\\" + targetfilename + ".idl /nologo /o tmp\\" + targetfilename + ".midl /tlb tmp\\" + targetfilename + ".tlb /iid tmp\\dump.midl /dlldata tmp\\dump.midl /cstub tmp\\dump.midl /header tmp\\dump.midl /proxy tmp\\dump.midl /sstub tmp\\dump.midl" 963 "\t" + idl + " /nologo " + var("OBJECTS_DIR") + targetfilename + ".idl /tlb " + var("OBJECTS_DIR") + targetfilename + ".tlb" +
831 "\t" + idc + " %1 /tlb tmp\\" + targetfilename + ".tlb"; 964 "\t" + idc + " %2 /tlb " + var("OBJECTS_DIR") + targetfilename + ".tlb";
832 activeQtStepPostCopyDll += 965 activeQtStepPostCopyDll +=
833 "\t" + idc + " %1 /regserver\n"; 966 "\t" + idc + " %1 /regserver\n";
834 967
@@ -841,9 +974,9 @@ DspMakefileGenerator::init()
841 activeQtStepPostCopyDllDebug = activeQtStepPostCopyDll.arg(executable); 974 activeQtStepPostCopyDllDebug = activeQtStepPostCopyDll.arg(executable);
842 } else { 975 } else {
843 activeQtStepPreCopyDll += 976 activeQtStepPreCopyDll +=
844 "\t%1 -dumpidl tmp\\" + targetfilename + ".idl -version " + version + 977 "\t%1 -dumpidl " + var("OBJECTS_DIR") + targetfilename + ".idl -version " + version +
845 "\t" + idl + " tmp\\" + targetfilename + ".idl /nologo /o tmp\\" + targetfilename + ".midl /tlb tmp\\" + targetfilename + ".tlb /iid tmp\\dump.midl /dlldata tmp\\dump.midl /cstub tmp\\dump.midl /header tmp\\dump.midl /proxy tmp\\dump.midl /sstub tmp\\dump.midl" 978 "\t" + idl + " /nologo " + var("OBJECTS_DIR") + targetfilename + ".idl /tlb " + var("OBJECTS_DIR") + targetfilename + ".tlb" +
846 "\t" + idc + " %1 /tlb tmp\\" + targetfilename + ".tlb"; 979 "\t" + idc + " %2 /tlb " + var("OBJECTS_DIR") + targetfilename + ".tlb";
847 activeQtStepPostCopyDll += 980 activeQtStepPostCopyDll +=
848 "\t%1 -regserver\n"; 981 "\t%1 -regserver\n";
849 QString executable = project->variables()["MSVCDSP_TARGETDIRREL"].first() + "\\" + targetfilename + ".exe"; 982 QString executable = project->variables()["MSVCDSP_TARGETDIRREL"].first() + "\\" + targetfilename + ".exe";
@@ -919,7 +1052,6 @@ DspMakefileGenerator::beginGroupForFile(QString file, QTextStream &t,
919{ 1052{
920 if(project->isActiveConfig("flat")) 1053 if(project->isActiveConfig("flat"))
921 return; 1054 return;
922
923 fileFixify(file, QDir::currentDirPath(), QDir::currentDirPath(), TRUE); 1055 fileFixify(file, QDir::currentDirPath(), QDir::currentDirPath(), TRUE);
924 file = file.section(Option::dir_sep, 0, -2); 1056 file = file.section(Option::dir_sep, 0, -2);
925 if(file.right(Option::dir_sep.length()) != Option::dir_sep) 1057 if(file.right(Option::dir_sep.length()) != Option::dir_sep)
@@ -931,19 +1063,23 @@ DspMakefileGenerator::beginGroupForFile(QString file, QTextStream &t,
931 endGroups(t); 1063 endGroups(t);
932 return; 1064 return;
933 } 1065 }
934 if(file.startsWith(currentGroup)) 1066
935 file = file.mid(currentGroup.length()); 1067 QString tempFile = file;
1068 if(tempFile.startsWith(currentGroup))
1069 tempFile = tempFile.mid(currentGroup.length());
936 int dirSep = currentGroup.findRev( Option::dir_sep ); 1070 int dirSep = currentGroup.findRev( Option::dir_sep );
937 while( !file.startsWith( currentGroup ) && dirSep != -1 ) { 1071
1072 while( !tempFile.startsWith( currentGroup ) && dirSep != -1 ) {
938 currentGroup.truncate( dirSep ); 1073 currentGroup.truncate( dirSep );
939 dirSep = currentGroup.findRev( Option::dir_sep ); 1074 dirSep = currentGroup.findRev( Option::dir_sep );
940 if ( !file.startsWith( currentGroup ) && dirSep != -1 ) 1075 if ( !tempFile.startsWith( currentGroup ) && dirSep != -1 )
941 t << "\n# End Group\n"; 1076 t << "\n# End Group\n";
942 } 1077 }
943 if ( !file.startsWith( currentGroup ) ) { 1078 if ( !file.startsWith( currentGroup ) ) {
944 t << "\n# End Group\n"; 1079 t << "\n# End Group\n";
945 currentGroup = ""; 1080 currentGroup = "";
946 } 1081 }
1082
947 QStringList dirs = QStringList::split(Option::dir_sep, file.right( file.length() - currentGroup.length() ) ); 1083 QStringList dirs = QStringList::split(Option::dir_sep, file.right( file.length() - currentGroup.length() ) );
948 for(QStringList::Iterator dir_it = dirs.begin(); dir_it != dirs.end(); ++dir_it) { 1084 for(QStringList::Iterator dir_it = dirs.begin(); dir_it != dirs.end(); ++dir_it) {
949 t << "# Begin Group \"" << (*dir_it) << "\"\n" 1085 t << "# Begin Group \"" << (*dir_it) << "\"\n"
@@ -973,6 +1109,8 @@ DspMakefileGenerator::openOutput(QFile &file) const
973{ 1109{
974 QString outdir; 1110 QString outdir;
975 if(!file.name().isEmpty()) { 1111 if(!file.name().isEmpty()) {
1112 if(QDir::isRelativePath(file.name()))
1113 file.setName(Option::output_dir + file.name()); //pwd when qmake was run
976 QFileInfo fi(file); 1114 QFileInfo fi(file);
977 if(fi.isDir()) 1115 if(fi.isDir())
978 outdir = file.name() + QDir::separator(); 1116 outdir = file.name() + QDir::separator();
diff --git a/qmake/generators/win32/msvc_dsp.h b/qmake/generators/win32/msvc_dsp.h
index 3a7d18e..0e86539 100644
--- a/qmake/generators/win32/msvc_dsp.h
+++ b/qmake/generators/win32/msvc_dsp.h
@@ -1,13 +1,11 @@
1/**************************************************************************** 1/****************************************************************************
2** $Id$
3** 2**
4** Definition of ________ class.
5** 3**
6** Created : 970521 4** Definition of DspMakefileGenerator class.
7** 5**
8** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. 6** Copyright (C) 1992-2003 Trolltech AS. All rights reserved.
9** 7**
10** This file is part of the network module of the Qt GUI Toolkit. 8** This file is part of qmake.
11** 9**
12** This file may be distributed under the terms of the Q Public License 10** This file may be distributed under the terms of the Q Public License
13** as defined by Trolltech AS of Norway and appearing in the file 11** as defined by Trolltech AS of Norway and appearing in the file
@@ -34,6 +32,7 @@
34** not clear to you. 32** not clear to you.
35** 33**
36**********************************************************************/ 34**********************************************************************/
35
37#ifndef __MSVC_DSP_H__ 36#ifndef __MSVC_DSP_H__
38#define __MSVC_DSP_H__ 37#define __MSVC_DSP_H__
39 38
@@ -62,6 +61,10 @@ public:
62protected: 61protected:
63 virtual void processPrlVariable(const QString &, const QStringList &); 62 virtual void processPrlVariable(const QString &, const QStringList &);
64 virtual bool findLibraries(); 63 virtual bool findLibraries();
64
65 QString precompH,
66 precompObj, precompPch;
67 bool usePCH;
65}; 68};
66 69
67inline DspMakefileGenerator::~DspMakefileGenerator() 70inline DspMakefileGenerator::~DspMakefileGenerator()
diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp
index ecef34d..528cb19 100644
--- a/qmake/generators/win32/msvc_nmake.cpp
+++ b/qmake/generators/win32/msvc_nmake.cpp
@@ -1,13 +1,11 @@
1/**************************************************************************** 1/****************************************************************************
2** $Id$
3** 2**
4** Definition of ________ class.
5** 3**
6** Created : 970521 4** Implementation of NmakeMakefileGenerator class.
7** 5**
8** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. 6** Copyright (C) 1992-2003 Trolltech AS. All rights reserved.
9** 7**
10** This file is part of the network module of the Qt GUI Toolkit. 8** This file is part of qmake.
11** 9**
12** This file may be distributed under the terms of the Q Public License 10** This file may be distributed under the terms of the Q Public License
13** as defined by Trolltech AS of Norway and appearing in the file 11** as defined by Trolltech AS of Norway and appearing in the file
@@ -43,7 +41,6 @@
43#include <stdlib.h> 41#include <stdlib.h>
44#include <time.h> 42#include <time.h>
45 43
46
47NmakeMakefileGenerator::NmakeMakefileGenerator(QMakeProject *p) : Win32MakefileGenerator(p), init_flag(FALSE) 44NmakeMakefileGenerator::NmakeMakefileGenerator(QMakeProject *p) : Win32MakefileGenerator(p), init_flag(FALSE)
48{ 45{
49 46
@@ -54,6 +51,11 @@ NmakeMakefileGenerator::writeMakefile(QTextStream &t)
54{ 51{
55 writeHeader(t); 52 writeHeader(t);
56 if(!project->variables()["QMAKE_FAILED_REQUIREMENTS"].isEmpty()) { 53 if(!project->variables()["QMAKE_FAILED_REQUIREMENTS"].isEmpty()) {
54 { //write the extra unix targets..
55 QStringList &qut = project->variables()["QMAKE_EXTRA_WIN_TARGETS"];
56 for(QStringList::ConstIterator it = qut.begin(); it != qut.end(); ++it)
57 t << *it << " ";
58 }
57 t << "all clean:" << "\n\t" 59 t << "all clean:" << "\n\t"
58 << "@echo \"Some of the required modules (" 60 << "@echo \"Some of the required modules ("
59 << var("QMAKE_FAILED_REQUIREMENTS") << ") are not available.\"" << "\n\t" 61 << var("QMAKE_FAILED_REQUIREMENTS") << ") are not available.\"" << "\n\t"
@@ -74,6 +76,24 @@ NmakeMakefileGenerator::writeMakefile(QTextStream &t)
74 return FALSE; 76 return FALSE;
75} 77}
76 78
79QStringList
80&NmakeMakefileGenerator::findDependencies(const QString &file)
81{
82 QStringList &aList = MakefileGenerator::findDependencies(file);
83 // Note: The QMAKE_IMAGE_COLLECTION file have all images
84 // as dependency, so don't add precompiled header then
85 if (file == project->first("QMAKE_IMAGE_COLLECTION"))
86 return aList;
87 for(QStringList::Iterator it = Option::cpp_ext.begin(); it != Option::cpp_ext.end(); ++it) {
88 if(file.endsWith(*it)) {
89 if(!aList.contains(precompH))
90 aList += precompH;
91 break;
92 }
93 }
94 return aList;
95}
96
77void 97void
78NmakeMakefileGenerator::writeNmakeParts(QTextStream &t) 98NmakeMakefileGenerator::writeNmakeParts(QTextStream &t)
79{ 99{
@@ -95,8 +115,8 @@ NmakeMakefileGenerator::writeNmakeParts(QTextStream &t)
95 QStringList &incs = project->variables()["INCLUDEPATH"]; 115 QStringList &incs = project->variables()["INCLUDEPATH"];
96 for(QStringList::Iterator incit = incs.begin(); incit != incs.end(); ++incit) { 116 for(QStringList::Iterator incit = incs.begin(); incit != incs.end(); ++incit) {
97 QString inc = (*incit); 117 QString inc = (*incit);
98 inc.replace(QRegExp("\\\\$"), "\\\\"); 118 if (inc.endsWith("\\"))
99 inc.replace("\"", ""); 119 inc.truncate(inc.length()-1);
100 t << " -I\"" << inc << "\""; 120 t << " -I\"" << inc << "\"";
101 } 121 }
102 t << " -I\"" << specdir() << "\"" 122 t << " -I\"" << specdir() << "\""
@@ -111,8 +131,8 @@ NmakeMakefileGenerator::writeNmakeParts(QTextStream &t)
111 QStringList &libs = project->variables()["QMAKE_LIBS"]; 131 QStringList &libs = project->variables()["QMAKE_LIBS"];
112 for(QStringList::Iterator libit = libs.begin(); libit != libs.end(); ++libit) { 132 for(QStringList::Iterator libit = libs.begin(); libit != libs.end(); ++libit) {
113 QString lib = (*libit); 133 QString lib = (*libit);
114 lib.replace(QRegExp("\\\\$"), "\\\\"); 134 if (lib.endsWith("\\"))
115 lib.replace(QRegExp("\""), ""); 135 lib.truncate(lib.length()-1);
116 t << " \"" << lib << "\""; 136 t << " \"" << lib << "\"";
117 } 137 }
118 t << endl; 138 t << endl;
@@ -138,6 +158,8 @@ NmakeMakefileGenerator::writeNmakeParts(QTextStream &t)
138 t << "MOVE = " << var("QMAKE_MOVE") << endl; 158 t << "MOVE = " << var("QMAKE_MOVE") << endl;
139 t << "CHK_DIR_EXISTS =" << var("QMAKE_CHK_DIR_EXISTS") << endl; 159 t << "CHK_DIR_EXISTS =" << var("QMAKE_CHK_DIR_EXISTS") << endl;
140 t << "MKDIR =" << var("QMAKE_MKDIR") << endl; 160 t << "MKDIR =" << var("QMAKE_MKDIR") << endl;
161 t << "INSTALL_FILE= " << var("QMAKE_INSTALL_FILE") << endl;
162 t << "INSTALL_DIR = " << var("QMAKE_INSTALL_DIR") << endl;
141 t << endl; 163 t << endl;
142 164
143 t << "####### Files" << endl << endl; 165 t << "####### Files" << endl << endl;
@@ -149,6 +171,23 @@ NmakeMakefileGenerator::writeNmakeParts(QTextStream &t)
149 t << "UICIMPLS =" << varList("UICIMPLS") << endl; 171 t << "UICIMPLS =" << varList("UICIMPLS") << endl;
150 t << "SRCMOC =" << varList("SRCMOC") << endl; 172 t << "SRCMOC =" << varList("SRCMOC") << endl;
151 t << "OBJMOC =" << varList("OBJMOC") << endl; 173 t << "OBJMOC =" << varList("OBJMOC") << endl;
174
175 QString extraCompilerDeps;
176 if(!project->isEmpty("QMAKE_EXTRA_WIN_COMPILERS")) {
177 t << "OBJCOMP = " << varList("OBJCOMP") << endl;
178 extraCompilerDeps += " $(OBJCOMP) ";
179
180 QStringList &comps = project->variables()["QMAKE_EXTRA_WIN_COMPILERS"];
181 for(QStringList::Iterator compit = comps.begin(); compit != comps.end(); ++compit) {
182 QStringList &vars = project->variables()[(*compit) + ".variables"];
183 for(QStringList::Iterator varit = vars.begin(); varit != vars.end(); ++varit) {
184 QStringList vals = project->variables()[(*varit)];
185 if(!vals.isEmpty())
186 t << "QMAKE_COMP_" << (*varit) << " = " << valList(vals) << endl;
187 }
188 }
189 }
190
152 t << "DIST =" << varList("DISTFILES") << endl; 191 t << "DIST =" << varList("DISTFILES") << endl;
153 t << "TARGET ="; 192 t << "TARGET =";
154 if( !project->variables()[ "DESTDIR" ].isEmpty() ) 193 if( !project->variables()[ "DESTDIR" ].isEmpty() )
@@ -164,6 +203,7 @@ NmakeMakefileGenerator::writeNmakeParts(QTextStream &t)
164 for(cppit = Option::cpp_ext.begin(); cppit != Option::cpp_ext.end(); ++cppit) 203 for(cppit = Option::cpp_ext.begin(); cppit != Option::cpp_ext.end(); ++cppit)
165 t << " " << (*cppit); 204 t << " " << (*cppit);
166 t << endl << endl; 205 t << endl << endl;
206
167 if(!project->isActiveConfig("no_batch")) { 207 if(!project->isActiveConfig("no_batch")) {
168 // Batchmode doesn't use the non implicit rules QMAKE_RUN_CXX & QMAKE_RUN_CC 208 // Batchmode doesn't use the non implicit rules QMAKE_RUN_CXX & QMAKE_RUN_CC
169 project->variables().remove("QMAKE_RUN_CXX"); 209 project->variables().remove("QMAKE_RUN_CXX");
@@ -171,12 +211,14 @@ NmakeMakefileGenerator::writeNmakeParts(QTextStream &t)
171 211
172 QDict<void> source_directories; 212 QDict<void> source_directories;
173 source_directories.insert(".", (void*)1); 213 source_directories.insert(".", (void*)1);
174 if(!project->isEmpty("MOC_DIR")) 214 QString directories[] = { QString("MOC_DIR"), QString("UI_SOURCES_DIR"), QString("UI_DIR"), QString::null };
175 source_directories.insert(project->first("MOC_DIR"), (void*)1); 215 for(int y = 0; !directories[y].isNull(); y++) {
176 if(!project->isEmpty("UI_SOURCES_DIR")) 216 QString dirTemp = project->first(directories[y]);
177 source_directories.insert(project->first("UI_SOURCES_DIR"), (void*)1); 217 if (dirTemp.endsWith("\\"))
178 else if(!project->isEmpty("UI_DIR")) 218 dirTemp.truncate(dirTemp.length()-1);
179 source_directories.insert(project->first("UI_DIR"), (void*)1); 219 if(!dirTemp.isEmpty())
220 source_directories.insert(dirTemp, (void*)1);
221 }
180 QString srcs[] = { QString("SOURCES"), QString("UICIMPLS"), QString("SRCMOC"), QString::null }; 222 QString srcs[] = { QString("SOURCES"), QString("UICIMPLS"), QString("SRCMOC"), QString::null };
181 for(int x = 0; !srcs[x].isNull(); x++) { 223 for(int x = 0; !srcs[x].isNull(); x++) {
182 QStringList &l = project->variables()[srcs[x]]; 224 QStringList &l = project->variables()[srcs[x]];
@@ -206,9 +248,9 @@ NmakeMakefileGenerator::writeNmakeParts(QTextStream &t)
206 } 248 }
207 249
208 t << "####### Build rules" << endl << endl; 250 t << "####### Build rules" << endl << endl;
209 t << "all: " << varGlue("ALL_DEPS",""," "," ") << "$(TARGET)" << endl << endl; 251 t << "all: " << fileFixify(Option::output.name()) << " " << varGlue("ALL_DEPS"," "," "," ") << "$(TARGET)" << endl << endl;
210 t << "$(TARGET): " << var("PRE_TARGETDEPS") << " $(UICDECLS) $(OBJECTS) $(OBJMOC) " 252 t << "$(TARGET): " << var("PRE_TARGETDEPS") << " $(UICDECLS) $(OBJECTS) $(OBJMOC) "
211 << var("POST_TARGETDEPS"); 253 << extraCompilerDeps << var("POST_TARGETDEPS");
212 if(!project->variables()["QMAKE_APP_OR_DLL"].isEmpty()) { 254 if(!project->variables()["QMAKE_APP_OR_DLL"].isEmpty()) {
213 t << "\n\t" << "$(LINK) $(LFLAGS) /OUT:$(TARGET) @<< " << "\n\t " 255 t << "\n\t" << "$(LINK) $(LFLAGS) /OUT:$(TARGET) @<< " << "\n\t "
214 << "$(OBJECTS) $(OBJMOC) $(LIBS)"; 256 << "$(OBJECTS) $(OBJMOC) $(LIBS)";
@@ -216,13 +258,14 @@ NmakeMakefileGenerator::writeNmakeParts(QTextStream &t)
216 t << "\n\t" << "$(LIB) /OUT:$(TARGET) @<<" << "\n\t " 258 t << "\n\t" << "$(LIB) /OUT:$(TARGET) @<<" << "\n\t "
217 << "$(OBJECTS) $(OBJMOC)"; 259 << "$(OBJECTS) $(OBJMOC)";
218 } 260 }
261 t << extraCompilerDeps;
219 t << endl << "<<" << endl; 262 t << endl << "<<" << endl;
220 if ( !project->variables()["QMAKE_POST_LINK"].isEmpty() ) 263 if ( !project->variables()["QMAKE_POST_LINK"].isEmpty() )
221 t << "\t" << var( "QMAKE_POST_LINK" ) << endl; 264 t << "\t" << var( "QMAKE_POST_LINK" ) << endl;
222 if(project->isActiveConfig("dll") && !project->variables()["DLLDESTDIR"].isEmpty()) { 265 if(project->isActiveConfig("dll") && !project->variables()["DLLDESTDIR"].isEmpty()) {
223 QStringList dlldirs = project->variables()["DLLDESTDIR"]; 266 QStringList dlldirs = project->variables()["DLLDESTDIR"];
224 for ( QStringList::Iterator dlldir = dlldirs.begin(); dlldir != dlldirs.end(); ++dlldir ) { 267 for ( QStringList::Iterator dlldir = dlldirs.begin(); dlldir != dlldirs.end(); ++dlldir ) {
225 t << "\n\t" << "-copy $(TARGET) " << *dlldir; 268 t << "\n\t" << "-$(COPY_FILE) \"$(TARGET)\" " << *dlldir;
226 } 269 }
227 } 270 }
228 QString targetfilename = project->variables()["TARGET"].first(); 271 QString targetfilename = project->variables()["TARGET"].first();
@@ -232,14 +275,14 @@ NmakeMakefileGenerator::writeNmakeParts(QTextStream &t)
232 version = "1.0"; 275 version = "1.0";
233 276
234 if ( project->isActiveConfig("dll")) { 277 if ( project->isActiveConfig("dll")) {
235 t << "\n\t" << ("-$(IDC) $(TARGET) /idl tmp\\" + targetfilename + ".idl -version " + version); 278 t << "\n\t" << ("-$(IDC) $(TARGET) /idl " + var("OBJECTS_DIR") + targetfilename + ".idl -version " + version);
236 t << "\n\t" << ("-$(IDL) tmp\\" + targetfilename + ".idl /nologo /o tmp\\" + targetfilename + ".midl /tlb tmp\\" + targetfilename + ".tlb /iid tmp\\dump.midl /dlldata tmp\\dump.midl /cstub tmp\\dump.midl /header tmp\\dump.midl /proxy tmp\\dump.midl /sstub tmp\\dump.midl"); 279 t << "\n\t" << ("-$(IDL) /nologo " + var("OBJECTS_DIR") + targetfilename + ".idl /tlb " + var("OBJECTS_DIR") + targetfilename + ".tlb");
237 t << "\n\t" << ("-$(IDC) $(TARGET) /tlb tmp\\" + targetfilename + ".tlb"); 280 t << "\n\t" << ("-$(IDC) $(TARGET) /tlb " + var("OBJECTS_DIR") + targetfilename + ".tlb");
238 t << "\n\t" << ("-$(IDC) $(TARGET) /regserver" ); 281 t << "\n\t" << ("-$(IDC) $(TARGET) /regserver" );
239 } else { 282 } else {
240 t << "\n\t" << ("-$(TARGET) -dumpidl tmp\\" + targetfilename + ".idl -version " + version); 283 t << "\n\t" << ("-$(TARGET) -dumpidl " + var("OBJECTS_DIR") + targetfilename + ".idl -version " + version);
241 t << "\n\t" << ("-$(IDL) tmp\\" + targetfilename + ".idl /nologo /o tmp\\" + targetfilename + ".midl /tlb tmp\\" + targetfilename + ".tlb /iid tmp\\dump.midl /dlldata tmp\\dump.midl /cstub tmp\\dump.midl /header tmp\\dump.midl /proxy tmp\\dump.midl /sstub tmp\\dump.midl"); 284 t << "\n\t" << ("-$(IDL) /nologo " + var("OBJECTS_DIR") + targetfilename + ".idl /tlb " + var("OBJECTS_DIR") + targetfilename + ".tlb");
242 t << "\n\t" << ("-$(IDC) $(TARGET) /tlb tmp\\" + targetfilename + ".tlb"); 285 t << "\n\t" << ("-$(IDC) $(TARGET) /tlb " + var("OBJECTS_DIR") + targetfilename + ".tlb");
243 t << "\n\t" << "-$(TARGET) -regserver"; 286 t << "\n\t" << "-$(TARGET) -regserver";
244 } 287 }
245 } 288 }
@@ -250,33 +293,53 @@ NmakeMakefileGenerator::writeNmakeParts(QTextStream &t)
250 << var("QMAKE_RC") << " " << var("RC_FILE") << endl << endl; 293 << var("QMAKE_RC") << " " << var("RC_FILE") << endl << endl;
251 } 294 }
252 295
253 t << "mocables: $(SRCMOC)" << endl << endl; 296 t << "mocables: $(SRCMOC)" << endl
297 << "uicables: $(UICIMPLS) $(UICDECLS)" << endl << endl;
254 298
255 writeMakeQmake(t); 299 writeMakeQmake(t);
256 300
301 QStringList dist_files = Option::mkfile::project_files;
302 if(!project->isEmpty("QMAKE_INTERNAL_INCLUDED_FILES"))
303 dist_files += project->variables()["QMAKE_INTERNAL_INCLUDED_FILES"];
304 if(!project->isEmpty("TRANSLATIONS"))
305 dist_files << var("TRANSLATIONS");
306 if(!project->isEmpty("FORMS")) {
307 QStringList &forms = project->variables()["FORMS"];
308 for(QStringList::Iterator formit = forms.begin(); formit != forms.end(); ++formit) {
309 QString ui_h = fileFixify((*formit) + Option::h_ext.first());
310 if(QFile::exists(ui_h) )
311 dist_files << ui_h;
312 }
313 }
257 t << "dist:" << "\n\t" 314 t << "dist:" << "\n\t"
258 << "$(ZIP) " << var("PROJECT") << ".zip " 315 << "$(ZIP) " << var("QMAKE_ORIG_TARGET") << ".zip " << "$(SOURCES) $(HEADERS) $(DIST) $(FORMS) "
259 << var("PROJECT") << ".pro $(SOURCES) $(HEADERS) $(DIST) $(FORMS)" << endl << endl; 316 << dist_files.join(" ") << " " << var("TRANSLATIONS") << " " << var("IMAGES") << endl << endl;
260 317
261 t << "clean:" 318 t << "uiclean:"
262 << varGlue("OBJECTS","\n\t-del ","\n\t-del ","") 319 << varGlue("UICDECLS" ,"\n\t-$(DEL_FILE) ","\n\t-$(DEL_FILE) ","")
263 << varGlue("SRCMOC" ,"\n\t-del ","\n\t-del ","") 320 << varGlue("UICIMPLS" ,"\n\t-$(DEL_FILE) ","\n\t-$(DEL_FILE) ","") << endl;
264 << varGlue("OBJMOC" ,"\n\t-del ","\n\t-del ","")
265 << varGlue("UICDECLS" ,"\n\t-del ","\n\t-del ","")
266 << varGlue("UICIMPLS" ,"\n\t-del ","\n\t-del ","")
267 << varGlue("QMAKE_CLEAN","\n\t-del ","\n\t-del ","")
268 << varGlue("CLEAN_FILES","\n\t-del ","\n\t-del ","");
269 321
322 t << "mocclean:"
323 << varGlue("SRCMOC" ,"\n\t-$(DEL_FILE) ","\n\t-$(DEL_FILE) ","")
324 << varGlue("OBJMOC" ,"\n\t-$(DEL_FILE) ","\n\t-$(DEL_FILE) ","") << endl;
325
326 t << "clean: uiclean mocclean"
327 << varGlue("OBJECTS","\n\t-$(DEL_FILE) ","\n\t-$(DEL_FILE) ","")
328 << varGlue("QMAKE_CLEAN","\n\t-$(DEL_FILE) ","\n\t-$(DEL_FILE) ","\n")
329 << varGlue("CLEAN_FILES","\n\t-$(DEL_FILE) ","\n\t-$(DEL_FILE) ","\n");
270 if ( project->isActiveConfig("activeqt")) { 330 if ( project->isActiveConfig("activeqt")) {
271 t << ("\n\t-del tmp\\" + targetfilename + ".*"); 331 t << ("\n\t-$(DEL_FILE) " + var("OBJECTS_DIR") + targetfilename + ".idl");
272 t << "\n\t-del tmp\\dump.*"; 332 t << ("\n\t-$(DEL_FILE) " + var("OBJECTS_DIR") + targetfilename + ".tlb");
273 } 333 }
274 if(!project->isEmpty("IMAGES")) 334 if(!project->isEmpty("IMAGES"))
275 t << varGlue("QMAKE_IMAGE_COLLECTION", "\n\t-del ", "\n\t-del ", ""); 335 t << varGlue("QMAKE_IMAGE_COLLECTION", "\n\t-$(DEL_FILE) ", "\n\t-$(DEL_FILE) ", "");
336 t << endl;
337
338 // user defined targets
276 339
277 // blasted user defined targets 340 QStringList::Iterator it;
278 QStringList &qut = project->variables()["QMAKE_EXTRA_WIN_TARGETS"]; 341 QStringList &qut = project->variables()["QMAKE_EXTRA_WIN_TARGETS"];
279 for(QStringList::Iterator it = qut.begin(); it != qut.end(); ++it) { 342 for(it = qut.begin(); it != qut.end(); ++it) {
280 QString targ = var((*it) + ".target"), 343 QString targ = var((*it) + ".target"),
281 cmd = var((*it) + ".commands"), deps; 344 cmd = var((*it) + ".commands"), deps;
282 if(targ.isEmpty()) 345 if(targ.isEmpty())
@@ -288,17 +351,105 @@ NmakeMakefileGenerator::writeNmakeParts(QTextStream &t)
288 dep = (*dep_it); 351 dep = (*dep_it);
289 deps += " " + dep; 352 deps += " " + dep;
290 } 353 }
354 if(!project->variables()["QMAKE_NOFORCE"].isEmpty() &&
355 project->variables()[(*it) + ".CONFIG"].findIndex("phony") != -1)
356 deps += QString(" ") + "FORCE";
291 t << "\n\n" << targ << ":" << deps << "\n\t" 357 t << "\n\n" << targ << ":" << deps << "\n\t"
292 << cmd; 358 << cmd;
293 } 359 }
294
295 t << endl << endl; 360 t << endl << endl;
296 361
362 QStringList &quc = project->variables()["QMAKE_EXTRA_WIN_COMPILERS"];
363 for(it = quc.begin(); it != quc.end(); ++it) {
364 QString tmp_out = project->variables()[(*it) + ".output"].first();
365 QString tmp_cmd = project->variables()[(*it) + ".commands"].join(" ");
366 QString tmp_dep = project->variables()[(*it) + ".depends"].join(" ");
367 QStringList &vars = project->variables()[(*it) + ".variables"];
368 if(tmp_out.isEmpty() || tmp_cmd.isEmpty())
369 continue;
370 QStringList &tmp = project->variables()[(*it) + ".input"];
371 for(QStringList::Iterator it2 = tmp.begin(); it2 != tmp.end(); ++it2) {
372 QStringList &inputs = project->variables()[(*it2)];
373 for(QStringList::Iterator input = inputs.begin(); input != inputs.end(); ++input) {
374 QFileInfo fi(Option::fixPathToLocalOS((*input)));
375 QString in = Option::fixPathToTargetOS((*input), FALSE),
376 out = tmp_out, cmd = tmp_cmd, deps;
377 out.replace("${QMAKE_FILE_BASE}", fi.baseName());
378 out.replace("${QMAKE_FILE_NAME}", fi.fileName());
379 cmd.replace("${QMAKE_FILE_BASE}", fi.baseName());
380 cmd.replace("${QMAKE_FILE_OUT}", out);
381 cmd.replace("${QMAKE_FILE_NAME}", fi.fileName());
382 for(QStringList::Iterator it3 = vars.begin(); it3 != vars.end(); ++it3)
383 cmd.replace("$(" + (*it3) + ")", "$(QMAKE_COMP_" + (*it3)+")");
384 if(!tmp_dep.isEmpty()) {
385 char buff[256];
386 QString dep_cmd = tmp_dep;
387 dep_cmd.replace("${QMAKE_FILE_NAME}", fi.fileName());
388 if(FILE *proc = QT_POPEN(dep_cmd.latin1(), "r")) {
389 while(!feof(proc)) {
390 int read_in = int(fread(buff, 1, 255, proc));
391 if(!read_in)
392 break;
393 int l = 0;
394 for(int i = 0; i < read_in; i++) {
395 if(buff[i] == '\n' || buff[i] == ' ') {
396 deps += " " + QCString(buff+l, (i - l) + 1);
397 l = i;
398 }
399 }
400 }
401 fclose(proc);
402 }
403 }
404 t << out << ": " << in << deps << "\n\t"
405 << cmd << endl << endl;
406 }
407 }
408 }
409 t << endl;
410
411 if(project->variables()["QMAKE_NOFORCE"].isEmpty())
412 t << "FORCE:" << endl << endl;
413
297 t << "distclean: clean" 414 t << "distclean: clean"
298 << "\n\t-del $(TARGET)" 415 << "\n\t-$(DEL_FILE) $(TARGET)"
299 << endl << endl; 416 << endl << endl;
417
418 // precompiled header
419 if(usePCH) {
420 QString precompRule = QString("-c -Yc -Fp%1 -Fo%2").arg(precompPch).arg(precompObj);
421 t << precompObj << ": " << precompH << " " << findDependencies(precompH).join(" \\\n\t\t")
422 << "\n\t" << "$(CXX) " + precompRule +" $(CXXFLAGS) $(INCPATH) -TP " << precompH << endl << endl;
423 }
300} 424}
301 425
426QString
427NmakeMakefileGenerator::var(const QString &value)
428{
429 if (usePCH) {
430 if ((value == "QMAKE_RUN_CXX_IMP_BATCH"
431 || value == "QMAKE_RUN_CXX_IMP"
432 || value == "QMAKE_RUN_CXX")) {
433 QFileInfo precompHInfo(precompH);
434 QString precompRule = QString("-c -FI%1 -Yu%2 -Fp%3")
435 .arg(precompHInfo.fileName())
436 .arg(precompHInfo.fileName())
437 .arg(precompPch);
438 QString p = MakefileGenerator::var(value);
439 p.replace("-c", precompRule);
440 // Cannot use -Gm with -FI & -Yu, as this gives an
441 // internal compiler error, on the newer compilers
442 p.remove("-Gm");
443 return p;
444 } else if (value == "QMAKE_CXXFLAGS") {
445 // Remove internal compiler error option
446 return MakefileGenerator::var(value).remove("-Gm");
447 }
448 }
449
450 // Normal val
451 return MakefileGenerator::var(value);
452}
302 453
303void 454void
304NmakeMakefileGenerator::init() 455NmakeMakefileGenerator::init()
@@ -321,6 +472,11 @@ NmakeMakefileGenerator::init()
321 return; 472 return;
322 } 473 }
323 474
475 if(project->isEmpty("QMAKE_INSTALL_FILE"))
476 project->variables()["QMAKE_INSTALL_FILE"].append("$(COPY_FILE)");
477 if(project->isEmpty("QMAKE_INSTALL_DIR"))
478 project->variables()["QMAKE_INSTALL_DIR"].append("$(COPY_DIR)");
479
324 bool is_qt = (project->first("TARGET") == "qt"QTDLL_POSTFIX || project->first("TARGET") == "qt-mt"QTDLL_POSTFIX); 480 bool is_qt = (project->first("TARGET") == "qt"QTDLL_POSTFIX || project->first("TARGET") == "qt-mt"QTDLL_POSTFIX);
325 project->variables()["QMAKE_ORIG_TARGET"] = project->variables()["TARGET"]; 481 project->variables()["QMAKE_ORIG_TARGET"] = project->variables()["TARGET"];
326 482
@@ -330,6 +486,12 @@ NmakeMakefileGenerator::init()
330 project->variables()["DEFINES"].append("QT_DLL"); 486 project->variables()["DEFINES"].append("QT_DLL");
331 if (project->isActiveConfig("qt_dll")) 487 if (project->isActiveConfig("qt_dll"))
332 if(configs.findIndex("qt") == -1) configs.append("qt"); 488 if(configs.findIndex("qt") == -1) configs.append("qt");
489 if ( project->isActiveConfig("qtopia") ) {
490 if(configs.findIndex("qtopialib") == -1)
491 configs.append("qtopialib");
492 if(configs.findIndex("qtopiainc") == -1)
493 configs.append("qtopiainc");
494 }
333 if ( project->isActiveConfig("qt") ) { 495 if ( project->isActiveConfig("qt") ) {
334 if ( project->isActiveConfig( "plugin" ) ) { 496 if ( project->isActiveConfig( "plugin" ) ) {
335 project->variables()["CONFIG"].append("dll"); 497 project->variables()["CONFIG"].append("dll");
@@ -401,6 +563,13 @@ NmakeMakefileGenerator::init()
401 project->variables()["INCLUDEPATH"] += project->variables()["QMAKE_INCDIR"]; 563 project->variables()["INCLUDEPATH"] += project->variables()["QMAKE_INCDIR"];
402 if ( project->isActiveConfig("qt") || project->isActiveConfig("opengl") ) 564 if ( project->isActiveConfig("qt") || project->isActiveConfig("opengl") )
403 project->variables()["CONFIG"].append("windows"); 565 project->variables()["CONFIG"].append("windows");
566 if ( project->isActiveConfig("qtopiainc") )
567 project->variables()["INCLUDEPATH"] += project->variables()["QMAKE_INCDIR_QTOPIA"];
568 if ( project->isActiveConfig("qtopialib") ) {
569 if(!project->isEmpty("QMAKE_LIBDIR_QTOPIA"))
570 project->variables()["QMAKE_LIBDIR"] += project->variables()["QMAKE_LIBDIR_QTOPIA"];
571 project->variables()["QMAKE_LIBS"] += project->variables()["QMAKE_LIBS_QTOPIA"];
572 }
404 if ( project->isActiveConfig("qt") ) { 573 if ( project->isActiveConfig("qt") ) {
405 project->variables()["CONFIG"].append("moc"); 574 project->variables()["CONFIG"].append("moc");
406 project->variables()["INCLUDEPATH"] +=project->variables()["QMAKE_INCDIR_QT"]; 575 project->variables()["INCLUDEPATH"] +=project->variables()["QMAKE_INCDIR_QT"];
@@ -508,10 +677,26 @@ NmakeMakefileGenerator::init()
508 if ( project->isActiveConfig("moc") ) 677 if ( project->isActiveConfig("moc") )
509 setMocAware(TRUE); 678 setMocAware(TRUE);
510 project->variables()["QMAKE_LIBS"] += project->variables()["LIBS"]; 679 project->variables()["QMAKE_LIBS"] += project->variables()["LIBS"];
680
681 QStringList &libList = project->variables()["QMAKE_LIBS"];
682 for( QStringList::Iterator stIt = libList.begin(); stIt != libList.end(); ) {
683 QString s = *stIt;
684 if( s.startsWith( "-l" ) ) {
685 stIt = libList.remove( stIt );
686 stIt = libList.insert( stIt, s.mid( 2 ) + ".lib" );
687 } else if( s.startsWith( "-L" ) ) {
688 stIt = libList.remove( stIt );
689 project->variables()["QMAKE_LIBDIR"].append(QDir::convertSeparators(s.mid( 2 )));
690 } else {
691 stIt++;
692 }
693 }
694
511 project->variables()["QMAKE_FILETAGS"] += QStringList::split(' ', 695 project->variables()["QMAKE_FILETAGS"] += QStringList::split(' ',
512 "HEADERS SOURCES DEF_FILE RC_FILE TARGET QMAKE_LIBS DESTDIR DLLDESTDIR INCLUDEPATH"); 696 "HEADERS SOURCES DEF_FILE RC_FILE TARGET QMAKE_LIBS DESTDIR DLLDESTDIR INCLUDEPATH");
513 QStringList &l = project->variables()["QMAKE_FILETAGS"]; 697 QStringList &l = project->variables()["QMAKE_FILETAGS"];
514 for(QStringList::Iterator it = l.begin(); it != l.end(); ++it) { 698 QStringList::Iterator it;
699 for(it = l.begin(); it != l.end(); ++it) {
515 QStringList &gdmf = project->variables()[(*it)]; 700 QStringList &gdmf = project->variables()[(*it)];
516 for(QStringList::Iterator inner = gdmf.begin(); inner != gdmf.end(); ++inner) 701 for(QStringList::Iterator inner = gdmf.begin(); inner != gdmf.end(); ++inner)
517 (*inner) = Option::fixPathToTargetOS((*inner), FALSE); 702 (*inner) = Option::fixPathToTargetOS((*inner), FALSE);
@@ -539,11 +724,30 @@ NmakeMakefileGenerator::init()
539 project->variables()["RES_FILE"] = project->variables()["RC_FILE"]; 724 project->variables()["RES_FILE"] = project->variables()["RC_FILE"];
540 project->variables()["RES_FILE"].first().replace(".rc",".res"); 725 project->variables()["RES_FILE"].first().replace(".rc",".res");
541 project->variables()["POST_TARGETDEPS"] += project->variables()["RES_FILE"]; 726 project->variables()["POST_TARGETDEPS"] += project->variables()["RES_FILE"];
727 project->variables()["CLEAN_FILES"] += project->variables()["RES_FILE"];
542 } 728 }
543 if ( !project->variables()["RES_FILE"].isEmpty()) 729 if ( !project->variables()["RES_FILE"].isEmpty())
544 project->variables()["QMAKE_LIBS"] += project->variables()["RES_FILE"]; 730 project->variables()["QMAKE_LIBS"] += project->variables()["RES_FILE"];
545 731
732 // Base class init!
546 MakefileGenerator::init(); 733 MakefileGenerator::init();
734
735 // Setup PCH variables
736 precompH = project->first("PRECOMPILED_HEADER");
737 usePCH = !precompH.isEmpty() && project->isActiveConfig("precompile_header");
738 if (usePCH) {
739 // Created files
740 precompObj = var("OBJECTS_DIR") + project->first("TARGET") + "_pch" + Option::obj_ext;
741 precompPch = var("OBJECTS_DIR") + project->first("TARGET") + "_pch.pch";
742 // Add linking of precompObj (required for whole precompiled classes)
743 project->variables()["OBJECTS"] += precompObj;
744 // Add pch file to cleanup
745 project->variables()["QMAKE_CLEAN"] += precompPch;
746 // Return to variable pool
747 project->variables()["PRECOMPILED_OBJECT"] = precompObj;
748 project->variables()["PRECOMPILED_PCH"] = precompPch;
749 }
750
547 if ( !project->variables()["VERSION"].isEmpty()) { 751 if ( !project->variables()["VERSION"].isEmpty()) {
548 QStringList l = QStringList::split('.', project->first("VERSION")); 752 QStringList l = QStringList::split('.', project->first("VERSION"));
549 project->variables()["VER_MAJ"].append(l[0]); 753 project->variables()["VER_MAJ"].append(l[0]);
@@ -558,5 +762,26 @@ NmakeMakefileGenerator::init()
558 project->variables()["QMAKE_CLEAN"].append(project->first("DESTDIR") + project->first("TARGET") + version + ".pdb"); 762 project->variables()["QMAKE_CLEAN"].append(project->first("DESTDIR") + project->first("TARGET") + version + ".pdb");
559 project->variables()["QMAKE_CLEAN"].append(project->first("DESTDIR") + project->first("TARGET") + version + ".ilk"); 763 project->variables()["QMAKE_CLEAN"].append(project->first("DESTDIR") + project->first("TARGET") + version + ".ilk");
560 project->variables()["QMAKE_CLEAN"].append("vc*.pdb"); 764 project->variables()["QMAKE_CLEAN"].append("vc*.pdb");
765 project->variables()["QMAKE_CLEAN"].append("vc*.idb");
766 }
767
768 QStringList &quc = project->variables()["QMAKE_EXTRA_WIN_COMPILERS"];
769 for(it = quc.begin(); it != quc.end(); ++it) {
770 QString tmp_out = project->variables()[(*it) + ".output"].first();
771 if(tmp_out.isEmpty())
772 continue;
773 QStringList &tmp = project->variables()[(*it) + ".input"];
774 for(QStringList::Iterator it2 = tmp.begin(); it2 != tmp.end(); ++it2) {
775 QStringList &inputs = project->variables()[(*it2)];
776 for(QStringList::Iterator input = inputs.begin(); input != inputs.end(); ++input) {
777 QFileInfo fi(Option::fixPathToLocalOS((*input)));
778 QString in = Option::fixPathToTargetOS((*input), FALSE),
779 out = tmp_out;
780 out.replace("${QMAKE_FILE_BASE}", fi.baseName());
781 out.replace("${QMAKE_FILE_NAME}", fi.fileName());
782 if(project->variables()[(*it) + ".CONFIG"].findIndex("no_link") == -1)
783 project->variables()["OBJCOMP"] += out;
784 }
785 }
561 } 786 }
562} 787}
diff --git a/qmake/generators/win32/msvc_nmake.h b/qmake/generators/win32/msvc_nmake.h
index 579fc35..f2996cd 100644
--- a/qmake/generators/win32/msvc_nmake.h
+++ b/qmake/generators/win32/msvc_nmake.h
@@ -1,13 +1,11 @@
1/**************************************************************************** 1/****************************************************************************
2** $Id$
3** 2**
4** Definition of ________ class.
5** 3**
6** Created : 970521 4** Definition of NmakeMakefileGenerator class.
7** 5**
8** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. 6** Copyright (C) 1992-2003 Trolltech AS. All rights reserved.
9** 7**
10** This file is part of the network module of the Qt GUI Toolkit. 8** This file is part of qmake.
11** 9**
12** This file may be distributed under the terms of the Q Public License 10** This file may be distributed under the terms of the Q Public License
13** as defined by Trolltech AS of Norway and appearing in the file 11** as defined by Trolltech AS of Norway and appearing in the file
@@ -34,6 +32,7 @@
34** not clear to you. 32** not clear to you.
35** 33**
36**********************************************************************/ 34**********************************************************************/
35
37#ifndef __MSVC_NMAKE_H__ 36#ifndef __MSVC_NMAKE_H__
38#define __MSVC_NMAKE_H__ 37#define __MSVC_NMAKE_H__
39 38
@@ -47,6 +46,12 @@ class NmakeMakefileGenerator : public Win32MakefileGenerator
47 bool writeMakefile(QTextStream &); 46 bool writeMakefile(QTextStream &);
48 void init(); 47 void init();
49 48
49protected:
50 QStringList &findDependencies(const QString &file);
51 QString var(const QString &value);
52 QString precompH, precompObj, precompPch;
53 bool usePCH;
54
50public: 55public:
51 NmakeMakefileGenerator(QMakeProject *p); 56 NmakeMakefileGenerator(QMakeProject *p);
52 ~NmakeMakefileGenerator(); 57 ~NmakeMakefileGenerator();
diff --git a/qmake/generators/win32/msvc_objectmodel.cpp b/qmake/generators/win32/msvc_objectmodel.cpp
index 7ffe4f7..a672c2d 100644
--- a/qmake/generators/win32/msvc_objectmodel.cpp
+++ b/qmake/generators/win32/msvc_objectmodel.cpp
@@ -1,11 +1,11 @@
1/**************************************************************************** 1/****************************************************************************
2** $Id$
3** 2**
4** Definition of ________ class.
5** 3**
6** Copyright (C) 2002 Trolltech AS. All rights reserved. 4** Implementation of VCProject class.
7** 5**
8** This file is part of the network module of the Qt GUI Toolkit. 6** Copyright (C) 2002-2003 Trolltech AS. All rights reserved.
7**
8** This file is part of qmake.
9** 9**
10** This file may be distributed under the terms of the Q Public License 10** This file may be distributed under the terms of the Q Public License
11** as defined by Trolltech AS of Norway and appearing in the file 11** as defined by Trolltech AS of Norway and appearing in the file
@@ -37,21 +37,7 @@
37#include "msvc_vcproj.h" 37#include "msvc_vcproj.h"
38#include <qtextstream.h> 38#include <qtextstream.h>
39#include <qstringlist.h> 39#include <qstringlist.h>
40#include <quuid.h> 40#include <qfileinfo.h>
41
42#if defined(Q_OS_WIN32)
43#include <objbase.h>
44#ifndef GUID_DEFINED
45#define GUID_DEFINED
46typedef struct _GUID
47{
48 ulong Data1;
49 ushort Data2;
50 ushort Data3;
51 uchar Data4[8];
52} GUID;
53#endif
54#endif
55 41
56// XML Tags --------------------------------------------------------- 42// XML Tags ---------------------------------------------------------
57 const char* _xmlInit = "<?xml version=\"1.0\" encoding = \"Windows-1252\"?>"; 43 const char* _xmlInit = "<?xml version=\"1.0\" encoding = \"Windows-1252\"?>";
@@ -281,7 +267,6 @@ struct XPair {
281 267
282// void streamSPair( QTextStream &strm, const char *n, const QString &s ) 268// void streamSPair( QTextStream &strm, const char *n, const QString &s )
283 269
284
285// Streaming operators for property Pairs --------------------------- 270// Streaming operators for property Pairs ---------------------------
286QTextStream &operator<<( QTextStream &strm, const TPair &prop ) 271QTextStream &operator<<( QTextStream &strm, const TPair &prop )
287{ 272{
@@ -318,7 +303,7 @@ QTextStream &operator<<( QTextStream &strm, const LPair &prop )
318QTextStream &operator<<( QTextStream &strm, const SPair &prop ) 303QTextStream &operator<<( QTextStream &strm, const SPair &prop )
319{ 304{
320 if ( !prop.value.isEmpty() ) 305 if ( !prop.value.isEmpty() )
321 strm << prop.name << prop.value.latin1() << "\""; 306 strm << prop.name << QString(prop.value).remove("\"") << "\"";
322 return strm; 307 return strm;
323} 308}
324 309
@@ -334,7 +319,7 @@ VCCLCompilerTool::VCCLCompilerTool()
334 :AssemblerOutput( asmListingNone ), 319 :AssemblerOutput( asmListingNone ),
335 BasicRuntimeChecks( runtimeBasicCheckNone ), 320 BasicRuntimeChecks( runtimeBasicCheckNone ),
336 BrowseInformation( brInfoNone ), 321 BrowseInformation( brInfoNone ),
337 BufferSecurityCheck( unset ), 322 BufferSecurityCheck( _False ),
338 CallingConvention( callConventionDefault ), 323 CallingConvention( callConventionDefault ),
339 CompileAs( compileAsDefault ), 324 CompileAs( compileAsDefault ),
340 CompileAsManaged( managedDefault ), 325 CompileAsManaged( managedDefault ),
@@ -346,7 +331,7 @@ VCCLCompilerTool::VCCLCompilerTool()
346 EnableFiberSafeOptimizations( unset ), 331 EnableFiberSafeOptimizations( unset ),
347 EnableFunctionLevelLinking( unset ), 332 EnableFunctionLevelLinking( unset ),
348 EnableIntrinsicFunctions( unset ), 333 EnableIntrinsicFunctions( unset ),
349 ExceptionHandling( unset ), 334 ExceptionHandling( _False ),
350 ExpandAttributedSource( unset ), 335 ExpandAttributedSource( unset ),
351 FavorSizeOrSpeed( favorNone ), 336 FavorSizeOrSpeed( favorNone ),
352 ForceConformanceInForLoopScope( unset ), 337 ForceConformanceInForLoopScope( unset ),
@@ -354,13 +339,14 @@ VCCLCompilerTool::VCCLCompilerTool()
354 GlobalOptimizations( unset ), 339 GlobalOptimizations( unset ),
355 IgnoreStandardIncludePath( unset ), 340 IgnoreStandardIncludePath( unset ),
356 ImproveFloatingPointConsistency( unset ), 341 ImproveFloatingPointConsistency( unset ),
357 InlineFunctionExpansion( expandOnlyInline ), 342 InlineFunctionExpansion( expandDefault ),
358 KeepComments( unset ), 343 KeepComments( unset ),
359 MinimalRebuild( unset ), 344 MinimalRebuild( unset ),
360 OmitFramePointers( unset ), 345 OmitFramePointers( unset ),
361 Optimization( optimizeDisabled ), 346 Optimization( optimizeCustom ),
362 OptimizeForProcessor( procOptimizeBlended ), 347 OptimizeForProcessor( procOptimizeBlended ),
363 OptimizeForWindowsApplication( unset ), 348 OptimizeForWindowsApplication( unset ),
349 ProgramDataBaseFileName( "" ),
364 RuntimeLibrary( rtMultiThreaded ), 350 RuntimeLibrary( rtMultiThreaded ),
365 RuntimeTypeInfo( unset ), 351 RuntimeTypeInfo( unset ),
366 ShowIncludes( unset ), 352 ShowIncludes( unset ),
@@ -371,7 +357,7 @@ VCCLCompilerTool::VCCLCompilerTool()
371 TreatWChar_tAsBuiltInType( unset ), 357 TreatWChar_tAsBuiltInType( unset ),
372 TurnOffAssemblyGeneration( unset ), 358 TurnOffAssemblyGeneration( unset ),
373 UndefineAllPreprocessorDefinitions( unset ), 359 UndefineAllPreprocessorDefinitions( unset ),
374 UsePrecompiledHeader( pchGenerateAuto ), 360 UsePrecompiledHeader( pchNone ),
375 WarnAsError( unset ), 361 WarnAsError( unset ),
376 WarningLevel( warningLevel_0 ), 362 WarningLevel( warningLevel_0 ),
377 WholeProgramOptimization( unset ) 363 WholeProgramOptimization( unset )
@@ -395,7 +381,7 @@ QTextStream &operator<<( QTextStream &strm, const VCCLCompilerTool &tool )
395 if ( tool.CompileAs != compileAsDefault ) strm << EPair( _CompileAs, tool.CompileAs ); 381 if ( tool.CompileAs != compileAsDefault ) strm << EPair( _CompileAs, tool.CompileAs );
396 if ( tool.CompileAsManaged != managedDefault ) strm << EPair( _CompileAsManaged, tool.CompileAsManaged ); 382 if ( tool.CompileAsManaged != managedDefault ) strm << EPair( _CompileAsManaged, tool.CompileAsManaged );
397 strm << TPair( _CompileOnly, tool.CompileOnly ); 383 strm << TPair( _CompileOnly, tool.CompileOnly );
398 strm << EPair( _DebugInformationFormat, tool.DebugInformationFormat ); 384 if ( tool.DebugInformationFormat != debugUnknown ) strm << EPair( _DebugInformationFormat, tool.DebugInformationFormat );
399 strm << TPair( _DefaultCharIsUnsigned, tool.DefaultCharIsUnsigned ); 385 strm << TPair( _DefaultCharIsUnsigned, tool.DefaultCharIsUnsigned );
400 strm << TPair( _Detect64BitPortabilityProblems, tool.Detect64BitPortabilityProblems ); 386 strm << TPair( _Detect64BitPortabilityProblems, tool.Detect64BitPortabilityProblems );
401 strm << TPair( _DisableLanguageExtensions, tool.DisableLanguageExtensions ); 387 strm << TPair( _DisableLanguageExtensions, tool.DisableLanguageExtensions );
@@ -409,24 +395,24 @@ QTextStream &operator<<( QTextStream &strm, const VCCLCompilerTool &tool )
409 strm << TPair( _ForceConformanceInForLoopScope, tool.ForceConformanceInForLoopScope ); 395 strm << TPair( _ForceConformanceInForLoopScope, tool.ForceConformanceInForLoopScope );
410 strm << XPair( _ForcedIncludeFiles, tool.ForcedIncludeFiles ); 396 strm << XPair( _ForcedIncludeFiles, tool.ForcedIncludeFiles );
411 strm << XPair( _ForcedUsingFiles, tool.ForcedUsingFiles ); 397 strm << XPair( _ForcedUsingFiles, tool.ForcedUsingFiles );
412 strm << EPair( _GeneratePreprocessedFile, tool.GeneratePreprocessedFile ); 398 if ( tool.GeneratePreprocessedFile != preprocessUnknown)strm << EPair( _GeneratePreprocessedFile, tool.GeneratePreprocessedFile );
413 strm << TPair( _GlobalOptimizations, tool.GlobalOptimizations ); 399 strm << TPair( _GlobalOptimizations, tool.GlobalOptimizations );
414 strm << TPair( _IgnoreStandardIncludePath, tool.IgnoreStandardIncludePath ); 400 strm << TPair( _IgnoreStandardIncludePath, tool.IgnoreStandardIncludePath );
415 strm << TPair( _ImproveFloatingPointConsistency, tool.ImproveFloatingPointConsistency ); 401 strm << TPair( _ImproveFloatingPointConsistency, tool.ImproveFloatingPointConsistency );
416 strm << EPair( _InlineFunctionExpansion, tool.InlineFunctionExpansion ); 402 if ( tool.InlineFunctionExpansion != expandDefault ) strm << EPair( _InlineFunctionExpansion, tool.InlineFunctionExpansion );
417 strm << TPair( _KeepComments, tool.KeepComments ); 403 strm << TPair( _KeepComments, tool.KeepComments );
418 strm << TPair( _MinimalRebuild, tool.MinimalRebuild ); 404 strm << TPair( _MinimalRebuild, tool.MinimalRebuild );
419 strm << SPair( _ObjectFile, tool.ObjectFile ); 405 strm << SPair( _ObjectFile, tool.ObjectFile );
420 strm << TPair( _OmitFramePointers, tool.OmitFramePointers ); 406 strm << TPair( _OmitFramePointers, tool.OmitFramePointers );
421 strm << EPair( _Optimization, tool.Optimization ); 407 if ( tool.Optimization != optimizeDefault ) strm << EPair( _Optimization, tool.Optimization );
422 if ( tool.OptimizeForProcessor != procOptimizeBlended ) strm << EPair( _OptimizeForProcessor, tool.OptimizeForProcessor ); 408 if ( tool.OptimizeForProcessor != procOptimizeBlended ) strm << EPair( _OptimizeForProcessor, tool.OptimizeForProcessor );
423 strm << TPair( _OptimizeForWindowsApplication, tool.OptimizeForWindowsApplication ); 409 strm << TPair( _OptimizeForWindowsApplication, tool.OptimizeForWindowsApplication );
424 strm << SPair( _OutputFile, tool.OutputFile ); 410 strm << SPair( _OutputFile, tool.OutputFile );
425 strm << SPair( _PrecompiledHeaderFile, tool.PrecompiledHeaderFile ); 411 strm << SPair( _PrecompiledHeaderFile, tool.PrecompiledHeaderFile );
426 strm << SPair( _PrecompiledHeaderThrough, tool.PrecompiledHeaderThrough ); 412 strm << SPair( _PrecompiledHeaderThrough, tool.PrecompiledHeaderThrough );
427 strm << XPair( _PreprocessorDefinitions, tool.PreprocessorDefinitions ); 413 strm << XPair( _PreprocessorDefinitions, tool.PreprocessorDefinitions );
428 strm << SPair( _ProgramDataBaseFileName, tool.ProgramDataBaseFileName ); 414 if ( !tool.ProgramDataBaseFileName.isNull() ) strm << _ProgramDataBaseFileName << tool.ProgramDataBaseFileName.latin1() << "\"";
429 strm << EPair( _RuntimeLibrary, tool.RuntimeLibrary ); 415 if ( tool.RuntimeLibrary != rtUnknown ) strm << EPair( _RuntimeLibrary, tool.RuntimeLibrary );
430 strm << TPair( _RuntimeTypeInfo, tool.RuntimeTypeInfo ); 416 strm << TPair( _RuntimeTypeInfo, tool.RuntimeTypeInfo );
431 strm << TPair( _ShowIncludes, tool.ShowIncludes ); 417 strm << TPair( _ShowIncludes, tool.ShowIncludes );
432 strm << TPair( _SmallerTypeCheck, tool.SmallerTypeCheck ); 418 strm << TPair( _SmallerTypeCheck, tool.SmallerTypeCheck );
@@ -441,7 +427,7 @@ QTextStream &operator<<( QTextStream &strm, const VCCLCompilerTool &tool )
441 !tool.PrecompiledHeaderThrough.isEmpty() ) 427 !tool.PrecompiledHeaderThrough.isEmpty() )
442 strm << EPair( _UsePrecompiledHeader, tool.UsePrecompiledHeader ); 428 strm << EPair( _UsePrecompiledHeader, tool.UsePrecompiledHeader );
443 strm << TPair( _WarnAsError, tool.WarnAsError ); 429 strm << TPair( _WarnAsError, tool.WarnAsError );
444 strm << EPair( _WarningLevel, tool.WarningLevel ); 430 if ( tool.WarningLevel != warningLevelUnknown ) strm << EPair( _WarningLevel, tool.WarningLevel );
445 strm << TPair( _WholeProgramOptimization, tool.WholeProgramOptimization ); 431 strm << TPair( _WholeProgramOptimization, tool.WholeProgramOptimization );
446 strm << "/>"; 432 strm << "/>";
447return strm; 433return strm;
@@ -474,22 +460,29 @@ bool VCCLCompilerTool::parseOption( const char* option )
474 if ( second != 'I' ) { 460 if ( second != 'I' ) {
475 found = FALSE; break; 461 found = FALSE; break;
476 } 462 }
477 AdditionalUsingDirectories += option+2; 463 AdditionalUsingDirectories += option+3;
478 break; 464 break;
479 case 'C': 465 case 'C':
480 KeepComments = _True; 466 KeepComments = _True;
481 break; 467 break;
482 case 'D': 468 case 'D':
483 PreprocessorDefinitions += option+1; 469 PreprocessorDefinitions += option+2;
484 break; 470 break;
485 case 'E': 471 case 'E':
486 if ( second == 'H' ) { 472 if ( second == 'H' ) {
487 if ( third == 'a' || third == 'c' || third == 's' ) { 473 if ( third == 'a'
474 || (third == 'c' && fourth != 's')
475 || (third == 's' && fourth != 'c') ) {
488 // ExceptionHandling must be false, or it will override 476 // ExceptionHandling must be false, or it will override
489 // with an /EHsc option 477 // with an /EHsc option
490 ExceptionHandling = _False; 478 ExceptionHandling = _False;
491 AdditionalOptions += option; 479 AdditionalOptions += option;
492 break; 480 break;
481 } else if ( (third == 'c' && fourth == 's')
482 || (third == 's' && fourth == 'c') ) {
483 ExceptionHandling = _True;
484 AdditionalOptions += option;
485 break;
493 } 486 }
494 found = FALSE; break; 487 found = FALSE; break;
495 } 488 }
@@ -591,6 +584,9 @@ bool VCCLCompilerTool::parseOption( const char* option )
591 EnableFiberSafeOptimizations = _True; 584 EnableFiberSafeOptimizations = _True;
592 break; 585 break;
593 case 'X': 586 case 'X':
587 // ExceptionHandling == true will override with
588 // an /EHsc option, which is correct with /GX
589 ExceptionHandling = _True; // Fall-through
594 case 'Z': 590 case 'Z':
595 case 'e': 591 case 'e':
596 case 'h': 592 case 'h':
@@ -954,10 +950,10 @@ VCLinkerTool::VCLinkerTool()
954 HeapReserveSize( -1 ), 950 HeapReserveSize( -1 ),
955 IgnoreAllDefaultLibraries( unset ), 951 IgnoreAllDefaultLibraries( unset ),
956 IgnoreEmbeddedIDL( unset ), 952 IgnoreEmbeddedIDL( unset ),
957 IgnoreImportLibrary( unset ), 953 IgnoreImportLibrary( _True ),
958 LargeAddressAware( addrAwareDefault ), 954 LargeAddressAware( addrAwareDefault ),
959 LinkDLL( unset ), 955 LinkDLL( unset ),
960 LinkIncremental( linkIncrementalYes ), 956 LinkIncremental( linkIncrementalDefault ),
961 LinkTimeCodeGeneration( unset ), 957 LinkTimeCodeGeneration( unset ),
962 MapExports( unset ), 958 MapExports( unset ),
963 MapLines( unset ), 959 MapLines( unset ),
@@ -1019,7 +1015,7 @@ QTextStream &operator<<( QTextStream &strm, const VCLinkerTool &tool )
1019 if ( tool.OptimizeForWindows98 != optWin98Default ) strm << EPair( _OptimizeForWindows98, tool.OptimizeForWindows98 ); 1015 if ( tool.OptimizeForWindows98 != optWin98Default ) strm << EPair( _OptimizeForWindows98, tool.OptimizeForWindows98 );
1020 if ( tool.OptimizeReferences != optReferencesDefault ) strm << EPair( _OptimizeReferences, tool.OptimizeReferences ); 1016 if ( tool.OptimizeReferences != optReferencesDefault ) strm << EPair( _OptimizeReferences, tool.OptimizeReferences );
1021 strm << SPair( _OutputFile, tool.OutputFile ); 1017 strm << SPair( _OutputFile, tool.OutputFile );
1022 strm << SPair( _ProgramDatabaseFile, tool.ProgramDatabaseFile ); 1018 strm << _ProgramDatabaseFile << tool.ProgramDatabaseFile << "\"";
1023 strm << TPair( _RegisterOutput, tool.RegisterOutput ); 1019 strm << TPair( _RegisterOutput, tool.RegisterOutput );
1024 strm << TPair( _ResourceOnlyDLL, tool.ResourceOnlyDLL ); 1020 strm << TPair( _ResourceOnlyDLL, tool.ResourceOnlyDLL );
1025 strm << TPair( _SetChecksum, tool.SetChecksum ); 1021 strm << TPair( _SetChecksum, tool.SetChecksum );
@@ -1707,9 +1703,9 @@ QTextStream &operator<<( QTextStream &strm, const VCCustomBuildTool &tool )
1707 strm << _begTool3; 1703 strm << _begTool3;
1708 strm << SPair( _ToolName, tool.ToolName ); 1704 strm << SPair( _ToolName, tool.ToolName );
1709 strm << XPair( _AdditionalDependencies4, tool.AdditionalDependencies, ";" ); 1705 strm << XPair( _AdditionalDependencies4, tool.AdditionalDependencies, ";" );
1710 strm << SPair( _CommandLine4, tool.CommandLine ); 1706 strm << XPair( _CommandLine4, tool.CommandLine, "\n" );
1711 strm << SPair( _Description4, tool.Description ); 1707 strm << SPair( _Description4, tool.Description );
1712 strm << SPair( _Outputs4, tool.Outputs ); 1708 strm << XPair( _Outputs4, tool.Outputs, ";" );
1713 strm << SPair( _ToolPath, tool.ToolPath ); 1709 strm << SPair( _ToolPath, tool.ToolPath );
1714 strm << "/>"; 1710 strm << "/>";
1715 return strm; 1711 return strm;
@@ -1826,43 +1822,39 @@ QTextStream &operator<<( QTextStream &strm, const VCConfiguration &tool )
1826VCFilter::VCFilter() 1822VCFilter::VCFilter()
1827 : ParseFiles( unset ) 1823 : ParseFiles( unset )
1828{ 1824{
1825 useCustomBuildTool = FALSE;
1826 useCompilerTool = FALSE;
1829} 1827}
1830 1828
1831void VCFilter::generateMOC( QTextStream &strm, QString str ) const 1829void VCFilter::addMOCstage( QTextStream &strm, QString filename )
1832{ 1830{
1833 QString mocOutput = Project->findMocDestination( str ); 1831 QString mocOutput = Project->findMocDestination( filename );
1834 QString mocApp = Project->var( "QMAKE_MOC" ); 1832 QString mocApp = Project->var( "QMAKE_MOC" );
1835 1833
1836 if( mocOutput.isEmpty() ) { 1834 if( mocOutput.isEmpty() && filename.endsWith(".moc") ) {
1837 // In specialcases we DO moc .cpp files 1835 // In specialcases we DO moc .cpp files
1838 // when the result is an .moc file 1836 // when the result is an .moc file
1839 if ( !str.endsWith(".moc") ) 1837 mocOutput = filename;
1840 return; 1838 filename = Project->findMocSource( mocOutput );
1841 mocOutput = str;
1842 str = Project->findMocSource( mocOutput );
1843 } 1839 }
1844 1840
1845 strm << _begFileConfiguration; 1841 if (mocOutput.isEmpty())
1846 strm << _Name5; 1842 return;
1847 strm << Config->Name; 1843
1848 strm << "\">"; 1844 CustomBuildTool = VCCustomBuildTool();
1849 strm << _begTool5; 1845 useCustomBuildTool = TRUE;
1850 strm << _VCCustomBuildTool; 1846 CustomBuildTool.Description = "Moc&apos;ing " + filename + "...";
1851 strm << _Description6; 1847 CustomBuildTool.CommandLine += (mocApp + " "
1852 strm << "Moc'ing " << str << "...\""; 1848 + filename + " -o " + mocOutput);
1853 strm << _CommandLine6; 1849 CustomBuildTool.AdditionalDependencies = mocApp;
1854 strm << mocApp; 1850 CustomBuildTool.Outputs += mocOutput;
1855 strm << " " << str << " -o " << mocOutput << "\"";
1856 strm << _AdditionalDependencies6;
1857 strm << mocApp << "\"";
1858 strm << _Outputs6;
1859 strm << mocOutput << "\"";
1860 strm << "/>";
1861 strm << _endFileConfiguration;
1862} 1851}
1863 1852
1864void VCFilter::generateUIC( QTextStream &strm, const QString& str ) const 1853void VCFilter::addUICstage( QTextStream &strm, QString str )
1865{ 1854{
1855 CustomBuildTool = VCCustomBuildTool();
1856 useCustomBuildTool = TRUE;
1857
1866 QString uicApp = Project->var("QMAKE_UIC"); 1858 QString uicApp = Project->var("QMAKE_UIC");
1867 QString mocApp = Project->var( "QMAKE_MOC" ); 1859 QString mocApp = Project->var( "QMAKE_MOC" );
1868 QString fname = str.section( '\\', -1 ); 1860 QString fname = str.section( '\\', -1 );
@@ -1895,27 +1887,103 @@ void VCFilter::generateUIC( QTextStream &strm, const QString& str ) const
1895 if( dot != -1 ) 1887 if( dot != -1 )
1896 fname.truncate( dot ); 1888 fname.truncate( dot );
1897 1889
1898 strm << _begFileConfiguration; 1890 if ( mocDir.isEmpty() )
1899 strm << _Name5; 1891 mocDir = pname;
1900 strm << Config->Name; 1892
1901 strm << "\">"; 1893 CustomBuildTool.Description = ("Uic'ing " + str + "...\"");
1902 strm << _begTool5; 1894 CustomBuildTool.CommandLine += // Create .h from .ui file
1903 strm << _VCCustomBuildTool; 1895 uicApp + " " + str + " -o " + uiHeaders + fname + ".h";
1904 strm << _Description6; 1896 CustomBuildTool.CommandLine += // Create .cpp from .ui file
1905 strm << "Uic'ing " << str << "...\""; 1897 uicApp + " " + str + " -i " + fname + ".h -o " + uiSources + fname + ".cpp";
1906 strm << _CommandLine6; 1898 CustomBuildTool.CommandLine += // Moc the headerfile
1907 strm << uicApp << " " << str << " -o " << uiHeaders << fname << ".h &amp;&amp; "; // Create .h from .ui file 1899 mocApp + " " + uiHeaders + fname + ".h -o " + mocDir + Option::h_moc_mod + fname + Option::h_moc_ext;
1908 strm << uicApp << " " << str << " -i " << fname << ".h -o " << uiSources << fname << ".cpp &amp;&amp; ";// Create .cpp from .ui file 1900
1909 strm << mocApp << " " << uiHeaders << fname << ".h -o " << mocDir << "moc_" << fname << ".cpp\""; 1901 CustomBuildTool.AdditionalDependencies += mocApp;
1910 strm << _AdditionalDependencies6; 1902 CustomBuildTool.AdditionalDependencies += uicApp;
1911 strm << mocApp << ";" << uicApp << "\""; 1903 CustomBuildTool.Outputs +=
1912 strm << _Outputs6; 1904 uiHeaders + fname + ".h;" + uiSources + fname + ".cpp;" + mocDir + Option::h_moc_mod + fname + Option::h_moc_ext;
1913 strm << uiHeaders << fname << ".h;" << uiSources << fname << ".cpp;" << mocDir << "moc_" << fname << ".cpp\""; 1905}
1914 strm << "/>"; 1906
1915 strm << _endFileConfiguration; 1907void VCFilter::modifyPCHstage( QTextStream &strm, QString str )
1908{
1909 bool isCFile = str.endsWith(".c");
1910 bool isHFile = (str.endsWith(".h") && str == Project->precompH);
1911
1912 if (!isCFile && !isHFile)
1913 return;
1914
1915 CompilerTool = VCCLCompilerTool();
1916 useCompilerTool = TRUE;
1917
1918 // Unset some default options
1919 CompilerTool.BufferSecurityCheck = unset;
1920 CompilerTool.DebugInformationFormat = debugUnknown;
1921 CompilerTool.ExceptionHandling = unset;
1922 CompilerTool.GeneratePreprocessedFile = preprocessUnknown;
1923 CompilerTool.Optimization = optimizeDefault;
1924 CompilerTool.ProgramDataBaseFileName = QString::null;
1925 CompilerTool.RuntimeLibrary = rtUnknown;
1926 CompilerTool.WarningLevel = warningLevelUnknown;
1927
1928 // Setup PCH options
1929 CompilerTool.UsePrecompiledHeader = (isCFile ? pchNone : pchCreateUsingSpecific);
1930 CompilerTool.PrecompiledHeaderThrough = "$(NOINHERIT)";
1931 CompilerTool.ForcedIncludeFiles = "$(NOINHERIT)";
1916} 1932}
1917 1933
1918QTextStream &operator<<( QTextStream &strm, const VCFilter &tool ) 1934bool VCFilter::addIMGstage( QTextStream &strm, QString str )
1935{
1936 bool isCorH = FALSE;
1937 if (str.endsWith(".c") || str.endsWith(".rc"))
1938 isCorH = TRUE;
1939 QStringList::Iterator it;
1940 for(it = Option::cpp_ext.begin(); it != Option::cpp_ext.end(); ++it)
1941 if(str.endsWith(*it))
1942 isCorH = TRUE;
1943 for(it = Option::h_ext.begin(); it != Option::h_ext.end(); ++it)
1944 if(str.endsWith(*it))
1945 isCorH = TRUE;
1946
1947 QString collectionName = Project->project->first("QMAKE_IMAGE_COLLECTION");
1948 if (str.isEmpty() || isCorH || collectionName.isEmpty())
1949 return FALSE;
1950
1951 CustomBuildTool = VCCustomBuildTool();
1952 useCustomBuildTool = TRUE;
1953
1954 // Some projects (like designer core) may have too many images to
1955 // call uic directly. Therefor we have to create a temporary
1956 // file, with the image list, and call uic with the -f option.
1957 QString tmpFileCmd = "echo ";
1958 QString tmpImageFilename = ".imgcol";
1959 QStringList& list = Project->project->variables()["IMAGES"];
1960 bool firstOutput = TRUE;
1961 it = list.begin();
1962 while( it!=list.end() ) {
1963 tmpFileCmd += (*it) + " ";
1964 ++it;
1965 if (tmpFileCmd.length()>250 || it==list.end()) {
1966 CustomBuildTool.CommandLine += tmpFileCmd
1967 + (firstOutput?"> ":">> ")
1968 + tmpImageFilename;
1969 tmpFileCmd = "echo ";
1970 firstOutput = FALSE;
1971 }
1972 }
1973
1974 QString uicApp = Project->var("QMAKE_UIC");
1975 CustomBuildTool.Description = ("Generate imagecollection");
1976 CustomBuildTool.CommandLine +=
1977 uicApp + " -embed " + Project->project->first("QMAKE_ORIG_TARGET")
1978 + " -f .imgcol -o " + collectionName;
1979 CustomBuildTool.AdditionalDependencies += uicApp;
1980 CustomBuildTool.AdditionalDependencies += list;
1981 CustomBuildTool.Outputs = collectionName;
1982 CustomBuildTool.Outputs += tmpImageFilename;
1983 return TRUE;
1984}
1985
1986QTextStream &operator<<( QTextStream &strm, VCFilter &tool )
1919{ 1987{
1920 if ( tool.Files.count() == 0 ) 1988 if ( tool.Files.count() == 0 )
1921 return strm; 1989 return strm;
@@ -1925,17 +1993,77 @@ QTextStream &operator<<( QTextStream &strm, const VCFilter &tool )
1925 strm << TPair( _ParseFiles, tool.ParseFiles ); 1993 strm << TPair( _ParseFiles, tool.ParseFiles );
1926 strm << SPair( _Filter, tool.Filter ); 1994 strm << SPair( _Filter, tool.Filter );
1927 strm << ">"; 1995 strm << ">";
1996
1997 bool resourceBuild = FALSE;
1998 int currentLevels = 0;
1999 QStringList currentDirs;
1928 for ( QStringList::ConstIterator it = tool.Files.begin(); it != tool.Files.end(); ++it ) { 2000 for ( QStringList::ConstIterator it = tool.Files.begin(); it != tool.Files.end(); ++it ) {
2001 if ( !tool.flat_files ) {
2002 QStringList newDirs = QStringList::split('\\',(*it));
2003 newDirs.pop_back(); // Skip the filename
2004
2005 int newLevels = int(newDirs.count());
2006 int equalLevels = 0;
2007 for (int i = 0; i<currentLevels; i++, equalLevels++ )
2008 if (currentDirs[i] != newDirs[i])
2009 break;
2010 int closeFilters = currentLevels - equalLevels;
2011 int openFilters = newLevels - equalLevels;
2012
2013 // close previous non-equal filter
2014 while ( closeFilters-- )
2015 strm << _endFilter;
2016
2017 // open new non-equal filters
2018 newLevels = 0;
2019 while ( openFilters-- ) {
2020 strm << _begFilter;
2021 strm << SPair( _Name3, newDirs[equalLevels + newLevels] );
2022 strm << _Filter << "\">"; // Blank filter
2023 ++newLevels;
2024 }
2025 currentDirs = newDirs;
2026 currentLevels = int(newDirs.count());
2027 }
2028
2029 tool.useCustomBuildTool = FALSE;
2030 tool.useCompilerTool = FALSE;
2031 // Add UIC, MOC and PCH stages to file
2032 if ( tool.CustomBuild == moc )
2033 tool.addMOCstage( strm, *it );
2034 else if ( tool.CustomBuild == uic )
2035 tool.addUICstage( strm, *it );
2036 else if ( tool.CustomBuild == resource ) {
2037 if (!resourceBuild)
2038 resourceBuild = tool.addIMGstage(strm, *it);
2039 }
2040 if (tool.Project->usePCH)
2041 tool.modifyPCHstage( strm, *it );
2042
1929 strm << _begFile; 2043 strm << _begFile;
1930 strm << SPair( _RelativePath, *it ); 2044 strm << SPair( _RelativePath, *it );
1931 strm << ">"; 2045 strm << ">";
1932 if ( tool.CustomBuild == moc ) 2046 // Output custom build and compiler options
1933 tool.generateMOC( strm, *it ); 2047 // for all configurations
1934 else if ( tool.CustomBuild == uic ) 2048 if (tool.useCustomBuildTool || tool.useCompilerTool) {
1935 tool.generateUIC( strm, *it ); 2049 for ( uint i = 0; i < tool.Config->count(); i++ ) {
2050 strm << _begFileConfiguration;
2051 strm << _Name5;
2052 strm << (*tool.Config)[i].Name;
2053 strm << "\">";
2054 if (tool.useCustomBuildTool)
2055 strm << tool.CustomBuildTool;
2056 if (tool.useCompilerTool)
2057 strm << tool.CompilerTool;
2058 strm << _endFileConfiguration;
2059 }
2060 }
1936 strm << _endFile; 2061 strm << _endFile;
1937 } 2062 }
1938 2063 // close remaining open filters, in non-flat mode
2064 while ( !tool.flat_files && currentLevels-- ) {
2065 strm << _endFilter;
2066 }
1939 strm << _endFilter; 2067 strm << _endFilter;
1940 return strm; 2068 return strm;
1941} 2069}
@@ -1943,17 +2071,9 @@ QTextStream &operator<<( QTextStream &strm, const VCFilter &tool )
1943// VCProject -------------------------------------------------------- 2071// VCProject --------------------------------------------------------
1944VCProject::VCProject() 2072VCProject::VCProject()
1945{ 2073{
1946#if defined(Q_WS_WIN32) 2074 VCConfiguration conf;
1947 GUID guid; 2075 Configuration += conf ; // Release
1948 QUuid uniqueId; 2076 //Configuration += conf ; // Debug added later, after Release init
1949 HRESULT h = CoCreateGuid( &guid );
1950 if ( h == S_OK )
1951 uniqueId = QUuid( guid );
1952 ProjectGUID = uniqueId.toString();
1953#else
1954 // Qt doesn't support GUID on other platforms yet
1955 ProjectGUID = "";
1956#endif
1957} 2077}
1958 2078
1959QTextStream &operator<<( QTextStream &strm, const VCProject &tool ) 2079QTextStream &operator<<( QTextStream &strm, const VCProject &tool )
@@ -1973,17 +2093,18 @@ QTextStream &operator<<( QTextStream &strm, const VCProject &tool )
1973 strm << "/>"; 2093 strm << "/>";
1974 strm << _endPlatforms; 2094 strm << _endPlatforms;
1975 strm << _begConfigurations; 2095 strm << _begConfigurations;
1976 strm << tool.Configuration; 2096 for ( uint i = 0; i < tool.Configuration.count(); i++ )
2097 strm << tool.Configuration[i];
1977 strm << _endConfigurations; 2098 strm << _endConfigurations;
1978 strm << _begFiles; 2099 strm << _begFiles;
1979 strm << tool.SourceFiles; 2100 strm << (VCFilter&)tool.SourceFiles;
1980 strm << tool.HeaderFiles; 2101 strm << (VCFilter&)tool.HeaderFiles;
1981 strm << tool.MOCFiles; 2102 strm << (VCFilter&)tool.MOCFiles;
1982 strm << tool.UICFiles; 2103 strm << (VCFilter&)tool.UICFiles;
1983 strm << tool.FormFiles; 2104 strm << (VCFilter&)tool.FormFiles;
1984 strm << tool.TranslationFiles; 2105 strm << (VCFilter&)tool.TranslationFiles;
1985 strm << tool.LexYaccFiles; 2106 strm << (VCFilter&)tool.LexYaccFiles;
1986 strm << tool.ResourceFiles; 2107 strm << (VCFilter&)tool.ResourceFiles;
1987 strm << _endFiles; 2108 strm << _endFiles;
1988 strm << _begGlobals; 2109 strm << _begGlobals;
1989 strm << _endGlobals; 2110 strm << _endGlobals;
diff --git a/qmake/generators/win32/msvc_objectmodel.h b/qmake/generators/win32/msvc_objectmodel.h
index 1dca68d..9ce38d2 100644
--- a/qmake/generators/win32/msvc_objectmodel.h
+++ b/qmake/generators/win32/msvc_objectmodel.h
@@ -1,11 +1,11 @@
1/**************************************************************************** 1/****************************************************************************
2** $Id$
3** 2**
4** Definition of ________ class.
5** 3**
6** Copyright (C) 2002 Trolltech AS. All rights reserved. 4** Definition of VCProject class.
7** 5**
8** This file is part of the network module of the Qt GUI Toolkit. 6** Copyright (C) 2002-2003 Trolltech AS. All rights reserved.
7**
8** This file is part of qmake.
9** 9**
10** This file may be distributed under the terms of the Q Public License 10** This file may be distributed under the terms of the Q Public License
11** as defined by Trolltech AS of Norway and appearing in the file 11** as defined by Trolltech AS of Norway and appearing in the file
@@ -32,6 +32,7 @@
32** not clear to you. 32** not clear to you.
33** 33**
34**********************************************************************/ 34**********************************************************************/
35
35#ifndef __MSVC_OBJECTMODEL_H__ 36#ifndef __MSVC_OBJECTMODEL_H__
36#define __MSVC_OBJECTMODEL_H__ 37#define __MSVC_OBJECTMODEL_H__
37 38
@@ -56,7 +57,8 @@ enum customBuildCheck {
56 none, 57 none,
57 moc, 58 moc,
58 uic, 59 uic,
59 lexyacc 60 lexyacc,
61 resource
60}; 62};
61enum triState { 63enum triState {
62 unset = -1, 64 unset = -1,
@@ -114,6 +116,7 @@ enum ConfigurationTypes {
114 typeGeneric = 10 116 typeGeneric = 10
115}; 117};
116enum debugOption { 118enum debugOption {
119 debugUnknown = -1,
117 debugDisabled, 120 debugDisabled,
118 debugOldStyleInfo, 121 debugOldStyleInfo,
119 debugLineInfoOnly, 122 debugLineInfoOnly,
@@ -240,7 +243,8 @@ enum genProxyLanguage {
240enum inlineExpansionOption { 243enum inlineExpansionOption {
241 expandDisable, 244 expandDisable,
242 expandOnlyInline, 245 expandOnlyInline,
243 expandAnySuitable 246 expandAnySuitable,
247 expandDefault // Not useful number, but stops the output
244}; 248};
245enum linkIncrementalType { 249enum linkIncrementalType {
246 linkIncrementalDefault, 250 linkIncrementalDefault,
@@ -296,7 +300,8 @@ enum optimizeOption {
296 optimizeMinSpace, 300 optimizeMinSpace,
297 optimizeMaxSpeed, 301 optimizeMaxSpeed,
298 optimizeFull, 302 optimizeFull,
299 optimizeCustom 303 optimizeCustom,
304 optimizeDefault // Not useful number, but stops the output
300}; 305};
301enum optRefType { 306enum optRefType {
302 optReferencesDefault, 307 optReferencesDefault,
@@ -315,6 +320,7 @@ enum pchOption {
315 pchUseUsingSpecific 320 pchUseUsingSpecific
316}; 321};
317enum preprocessOption { 322enum preprocessOption {
323 preprocessUnknown = -1,
318 preprocessNo, 324 preprocessNo,
319 preprocessYes, 325 preprocessYes,
320 preprocessNoLineNumbers 326 preprocessNoLineNumbers
@@ -330,6 +336,7 @@ enum RemoteDebuggerType {
330 DbgRemoteTCPIP 336 DbgRemoteTCPIP
331}; 337};
332enum runtimeLibraryOption { 338enum runtimeLibraryOption {
339 rtUnknown = -1,
333 rtMultiThreaded, 340 rtMultiThreaded,
334 rtMultiThreadedDebug, 341 rtMultiThreadedDebug,
335 rtMultiThreadedDLL, 342 rtMultiThreadedDLL,
@@ -379,6 +386,7 @@ enum useOfMfc {
379 useMfcDynamic 386 useMfcDynamic
380}; 387};
381enum warningLevelOption { 388enum warningLevelOption {
389 warningLevelUnknown = -1,
382 warningLevel_0, 390 warningLevel_0,
383 warningLevel_1, 391 warningLevel_1,
384 warningLevel_2, 392 warningLevel_2,
@@ -611,9 +619,9 @@ public:
611 619
612 // Variables 620 // Variables
613 QStringList AdditionalDependencies; 621 QStringList AdditionalDependencies;
614 QString CommandLine; 622 QStringList CommandLine;
615 QString Description; 623 QString Description;
616 QString Outputs; 624 QStringList Outputs;
617 QString ToolName; 625 QString ToolName;
618 QString ToolPath; 626 QString ToolPath;
619}; 627};
@@ -719,8 +727,10 @@ public:
719 // Functions 727 // Functions
720 VCFilter(); 728 VCFilter();
721 ~VCFilter(){} 729 ~VCFilter(){}
722 void generateMOC( QTextStream &strm, QString str ) const; 730 void addMOCstage( QTextStream &strm, QString str );
723 void generateUIC( QTextStream &strm, const QString& str ) const; 731 void addUICstage( QTextStream &strm, QString str );
732 bool addIMGstage( QTextStream &strm, QString str );
733 void modifyPCHstage( QTextStream &strm, QString str );
724 734
725 // Variables 735 // Variables
726 QString Name; 736 QString Name;
@@ -728,8 +738,13 @@ public:
728 triState ParseFiles; 738 triState ParseFiles;
729 QStringList Files; 739 QStringList Files;
730 VcprojGenerator*Project; 740 VcprojGenerator*Project;
731 VCConfiguration*Config; 741 QValueList<VCConfiguration> *Config;
732 customBuildCheckCustomBuild; 742 customBuildCheckCustomBuild;
743 bool useCustomBuildTool;
744 VCCustomBuildTool CustomBuildTool;
745 bool useCompilerTool;
746 VCCLCompilerTool CompilerTool;
747 bool flat_files;
733}; 748};
734 749
735class VCProject 750class VCProject
@@ -748,7 +763,7 @@ public:
748 QString PlatformName; 763 QString PlatformName;
749 764
750 // XML sub-parts 765 // XML sub-parts
751 VCConfigurationConfiguration; 766 QValueList<VCConfiguration> Configuration;
752 VCFilter SourceFiles; 767 VCFilter SourceFiles;
753 VCFilter HeaderFiles; 768 VCFilter HeaderFiles;
754 VCFilter MOCFiles; 769 VCFilter MOCFiles;
@@ -767,7 +782,7 @@ QTextStream &operator<<( QTextStream &, const VCLibrarianTool & );
767QTextStream &operator<<( QTextStream &, const VCResourceCompilerTool & ); 782QTextStream &operator<<( QTextStream &, const VCResourceCompilerTool & );
768QTextStream &operator<<( QTextStream &, const VCEventTool & ); 783QTextStream &operator<<( QTextStream &, const VCEventTool & );
769QTextStream &operator<<( QTextStream &, const VCConfiguration & ); 784QTextStream &operator<<( QTextStream &, const VCConfiguration & );
770QTextStream &operator<<( QTextStream &, const VCFilter & ); 785QTextStream &operator<<( QTextStream &, VCFilter & );
771QTextStream &operator<<( QTextStream &, const VCProject & ); 786QTextStream &operator<<( QTextStream &, const VCProject & );
772 787
773#endif //__MSVC_OBJECTMODEL_H__ 788#endif //__MSVC_OBJECTMODEL_H__
diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp
index d2cbc31..aa8fe16 100644
--- a/qmake/generators/win32/msvc_vcproj.cpp
+++ b/qmake/generators/win32/msvc_vcproj.cpp
@@ -1,13 +1,11 @@
1/**************************************************************************** 1/****************************************************************************
2** $Id$
3** 2**
4** Definition of VcprojGenerator class.
5** 3**
6** Created : 970521 4** Implementation of VcprojGenerator class.
7** 5**
8** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. 6** Copyright (C) 1992-2003 Trolltech AS. All rights reserved.
9** 7**
10** This file is part of the network module of the Qt GUI Toolkit. 8** This file is part of qmake.
11** 9**
12** This file may be distributed under the terms of the Q Public License 10** This file may be distributed under the terms of the Q Public License
13** as defined by Trolltech AS of Norway and appearing in the file 11** as defined by Trolltech AS of Norway and appearing in the file
@@ -37,28 +35,68 @@
37 35
38#include "msvc_vcproj.h" 36#include "msvc_vcproj.h"
39#include "option.h" 37#include "option.h"
38#include "qtmd5.h" // SG's MD5 addon
40#include <qdir.h> 39#include <qdir.h>
41#include <qregexp.h> 40#include <qregexp.h>
42#include <qdict.h> 41#include <qdict.h>
43#include <quuid.h> 42#include <quuid.h>
44#include <stdlib.h> 43#include <stdlib.h>
44#include <qsettings.h>
45 45
46#if defined(Q_OS_WIN32) 46//#define DEBUG_SOLUTION_GEN
47#include <objbase.h> 47//#define DEBUG_PROJECT_GEN
48#ifndef GUID_DEFINED 48
49#define GUID_DEFINED 49// Registry keys for .NET version detection -------------------------
50typedef struct _GUID 50 const char* _regNet2002 = "Microsoft\\VisualStudio\\7.0\\Setup\\VC\\ProductDir";
51 const char* _regNet2003 = "Microsoft\\VisualStudio\\7.1\\Setup\\VC\\ProductDir";
52
53bool use_net2003_version()
51{ 54{
52 ulong Data1; 55#ifndef Q_OS_WIN32
53 ushort Data2; 56 return FALSE; // Always generate 7.0 versions on other platforms
54 ushort Data3; 57#else
55 uchar Data4[8]; 58 // Only search for the version once
56} GUID; 59 static int current_version = -1;
57#endif 60 if (current_version!=-1)
61 return (current_version==71);
62
63 // Fallback to .NET 2002
64 current_version = 70;
65
66 // Get registry entries for both versions
67 bool ok = false;
68 QSettings setting;
69 QString path2002 = setting.readEntry(_regNet2002);
70 QString path2003 = setting.readEntry(_regNet2003);
71
72 if ( path2002.isNull() || path2003.isNull() ) {
73 // Only have one MSVC, so use that one
74 current_version = (path2003.isNull() ? 70 : 71);
75 } else {
76 // Have both, so figure out the current
77 QString paths = getenv("PATH");
78 QStringList pathlist = QStringList::split(";", paths.lower());
79
80 path2003 = path2003.lower();
81 QStringList::iterator it;
82 for(it=pathlist.begin(); it!=pathlist.end(); ++it) {
83 if ((*it).contains(path2003)) {
84 current_version = 71;
85 } else if ((*it).contains(path2002)
86 && current_version == 71) {
87 fprintf( stderr, "Both .NET 2002 & .NET 2003 directories for VC found in you PATH variable!\nFallback to .NET 2002 project generation" );
88 current_version = 70;
89 break;
90 }
91 }
92 }
93 return (current_version==71);
58#endif 94#endif
95};
59 96
60// Flatfile Tags ---------------------------------------------------- 97// Flatfile Tags ----------------------------------------------------
61 const char* _snlHeader = "Microsoft Visual Studio Solution File, Format Version 7.00"; 98 const char* _slnHeader70= "Microsoft Visual Studio Solution File, Format Version 7.00";
99 const char* _slnHeader71= "Microsoft Visual Studio Solution File, Format Version 8.00";
62 // The following UUID _may_ change for later servicepacks... 100 // The following UUID _may_ change for later servicepacks...
63 // If so we need to search through the registry at 101 // If so we need to search through the registry at
64 // HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\7.0\Projects 102 // HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\7.0\Projects
@@ -66,22 +104,25 @@ const char* _snlHeader = "Microsoft Visual Studio Solution File, Format Version
66 // containing "vcproj"... 104 // containing "vcproj"...
67 // Use the hardcoded value for now so projects generated on other 105 // Use the hardcoded value for now so projects generated on other
68 // platforms are actually usable. 106 // platforms are actually usable.
69const char* _snlMSVCvcprojGUID = "{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}"; 107const char* _slnMSVCvcprojGUID = "{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}";
70 const char* _snlProjectBeg= "\nProject(\""; 108 const char* _slnProjectBeg= "\nProject(\"";
71 const char* _snlProjectMid= "\") = "; 109 const char* _slnProjectMid= "\") = ";
72 const char* _snlProjectEnd= "\nEndProject"; 110 const char* _slnProjectEnd= "\nEndProject";
73 const char* _snlGlobalBeg= "\nGlobal"; 111 const char* _slnGlobalBeg= "\nGlobal";
74 const char* _snlGlobalEnd= "\nEndGlobal"; 112 const char* _slnGlobalEnd= "\nEndGlobal";
75 const char* _snlSolutionConf= "\n\tGlobalSection(SolutionConfiguration) = preSolution" 113 const char* _slnSolutionConf= "\n\tGlobalSection(SolutionConfiguration) = preSolution"
76 "\n\t\tConfigName.0 = Release" 114 "\n\t\tConfigName.0 = Debug"
115 "\n\t\tConfigName.1 = Release"
77 "\n\tEndGlobalSection"; 116 "\n\tEndGlobalSection";
78 const char* _snlProjDepBeg= "\n\tGlobalSection(ProjectDependencies) = postSolution"; 117 const char* _slnProjDepBeg= "\n\tGlobalSection(ProjectDependencies) = postSolution";
79 const char* _snlProjDepEnd= "\n\tEndGlobalSection"; 118 const char* _slnProjDepEnd= "\n\tEndGlobalSection";
80 const char* _snlProjConfBeg= "\n\tGlobalSection(ProjectConfiguration) = postSolution"; 119 const char* _slnProjConfBeg= "\n\tGlobalSection(ProjectConfiguration) = postSolution";
81 const char* _snlProjConfTag1= ".Release.ActiveCfg = Release|Win32"; 120 const char* _slnProjRelConfTag1= ".Release.ActiveCfg = Release|Win32";
82 const char* _snlProjConfTag2= ".Release.Build.0 = Release|Win32"; 121 const char* _slnProjRelConfTag2= ".Release.Build.0 = Release|Win32";
83 const char* _snlProjConfEnd= "\n\tEndGlobalSection"; 122 const char* _slnProjDbgConfTag1= ".Debug.ActiveCfg = Debug|Win32";
84 const char* _snlExtSections= "\n\tGlobalSection(ExtensibilityGlobals) = postSolution" 123 const char* _slnProjDbgConfTag2= ".Debug.Build.0 = Debug|Win32";
124 const char* _slnProjConfEnd= "\n\tEndGlobalSection";
125 const char* _slnExtSections= "\n\tGlobalSection(ExtensibilityGlobals) = postSolution"
85 "\n\tEndGlobalSection" 126 "\n\tEndGlobalSection"
86 "\n\tGlobalSection(ExtensibilityAddIns) = postSolution" 127 "\n\tGlobalSection(ExtensibilityAddIns) = postSolution"
87 "\n\tEndGlobalSection"; 128 "\n\tEndGlobalSection";
@@ -126,9 +167,39 @@ struct VcsolutionDepend {
126 QString uuid; 167 QString uuid;
127 QString vcprojFile, orig_target, target; 168 QString vcprojFile, orig_target, target;
128 ::target targetType; 169 ::target targetType;
170 bool debugBuild;
129 QStringList dependencies; 171 QStringList dependencies;
130}; 172};
131 173
174QUuid VcprojGenerator::getProjectUUID(const QString &filename)
175{
176 bool validUUID = true;
177
178 // Read GUID from variable-space
179 QUuid uuid = project->first("GUID");
180
181 // If none, create one based on the MD5 of absolute project path
182 if (uuid.isNull() || !filename.isNull()) {
183 QString abspath = filename.isNull()?project->first("QMAKE_MAKEFILE"):filename;
184 qtMD5(abspath.utf8(), (unsigned char*)(&uuid));
185 validUUID = !uuid.isNull();
186 uuid.data4[0] = (uuid.data4[0] & 0x3F) | 0x80; // UV_DCE variant
187 uuid.data3 = (uuid.data3 & 0x0FFF) | (QUuid::Name<<12);
188 }
189
190 // If still not valid, generate new one, and suggest adding to .pro
191 if (uuid.isNull() || !validUUID) {
192 uuid = QUuid::createUuid();
193 fprintf(stderr,
194 "qmake couldn't create a GUID based on filepath, and we couldn't\nfind a valid GUID in the .pro file (Consider adding\n'GUID = %s' to the .pro file)\n",
195 uuid.toString().upper().latin1());
196 }
197
198 // Store GUID in variable-space
199 project->values("GUID") = uuid.toString().upper();
200 return uuid;
201}
202
132QUuid VcprojGenerator::increaseUUID( const QUuid &id ) 203QUuid VcprojGenerator::increaseUUID( const QUuid &id )
133{ 204{
134 QUuid result( id ); 205 QUuid result( id );
@@ -163,24 +234,17 @@ void VcprojGenerator::writeSubDirs(QTextStream &t)
163 return; 234 return;
164 } 235 }
165 236
166 t << _snlHeader; 237 t << (use_net2003_version() ? _slnHeader71 : _slnHeader70);
167 QUuid solutionGUID;
168#if defined(Q_WS_WIN32)
169 GUID guid;
170 HRESULT h = CoCreateGuid( &guid );
171 if ( h == S_OK )
172 solutionGUID = QUuid( guid );
173#else
174 // Qt doesn't support GUID on other platforms yet,
175 // so we use the all-zero uuid, and increase that.
176#endif
177
178 238
179 QDict<VcsolutionDepend> solution_depends; 239 QDict<VcsolutionDepend> solution_depends;
240
180 QPtrList<VcsolutionDepend> solution_cleanup; 241 QPtrList<VcsolutionDepend> solution_cleanup;
181 solution_cleanup.setAutoDelete(TRUE); 242 solution_cleanup.setAutoDelete(TRUE);
243
244
182 QStringList subdirs = project->variables()["SUBDIRS"]; 245 QStringList subdirs = project->variables()["SUBDIRS"];
183 QString oldpwd = QDir::currentDirPath(); 246 QString oldpwd = QDir::currentDirPath();
247
184 for(QStringList::Iterator it = subdirs.begin(); it != subdirs.end(); ++it) { 248 for(QStringList::Iterator it = subdirs.begin(); it != subdirs.end(); ++it) {
185 QFileInfo fi(Option::fixPathToLocalOS((*it), TRUE)); 249 QFileInfo fi(Option::fixPathToLocalOS((*it), TRUE));
186 if(fi.exists()) { 250 if(fi.exists()) {
@@ -199,8 +263,7 @@ void VcprojGenerator::writeSubDirs(QTextStream &t)
199 } 263 }
200 if(tmp_proj.read(fn, oldpwd)) { 264 if(tmp_proj.read(fn, oldpwd)) {
201 if(tmp_proj.first("TEMPLATE") == "vcsubdirs") { 265 if(tmp_proj.first("TEMPLATE") == "vcsubdirs") {
202 QStringList tmp_subdirs = fileFixify(tmp_proj.variables()["SUBDIRS"]); 266 subdirs += fileFixify(tmp_proj.variables()["SUBDIRS"]);
203 subdirs += tmp_subdirs;
204 } else if(tmp_proj.first("TEMPLATE") == "vcapp" || tmp_proj.first("TEMPLATE") == "vclib") { 267 } else if(tmp_proj.first("TEMPLATE") == "vcapp" || tmp_proj.first("TEMPLATE") == "vclib") {
205 // Initialize a 'fake' project to get the correct variables 268 // Initialize a 'fake' project to get the correct variables
206 // and to be able to extract all the dependencies 269 // and to be able to extract all the dependencies
@@ -223,25 +286,27 @@ void VcprojGenerator::writeSubDirs(QTextStream &t)
223 // If file doesn't exsist, then maybe the users configuration 286 // If file doesn't exsist, then maybe the users configuration
224 // doesn't allow it to be created. Skip to next... 287 // doesn't allow it to be created. Skip to next...
225 if(!QFile::exists(QDir::currentDirPath() + Option::dir_sep + vcproj)) { 288 if(!QFile::exists(QDir::currentDirPath() + Option::dir_sep + vcproj)) {
226 qDebug( "Ignored (not found) '%s'", QString(QDir::currentDirPath() + Option::dir_sep + vcproj).latin1() ); 289 warn_msg(WarnLogic, "Ignored (not found) '%s'", QString(QDir::currentDirPath() + Option::dir_sep + vcproj).latin1() );
227 goto nextfile; // # Dirty! 290 goto nextfile; // # Dirty!
228 } 291 }
229 292
230 VcsolutionDepend *newDep = new VcsolutionDepend; 293 VcsolutionDepend *newDep = new VcsolutionDepend;
231 newDep->vcprojFile = fileFixify(vcproj); 294 newDep->vcprojFile = fileFixify(vcproj);
232 newDep->orig_target = tmp_proj.first("QMAKE_ORIG_TARGET"); 295 newDep->orig_target = tmp_proj.first("QMAKE_ORIG_TARGET");
233 newDep->target = tmp_proj.first("TARGET").section(Option::dir_sep, -1); 296 newDep->target = tmp_proj.first("MSVCPROJ_TARGET").section(Option::dir_sep, -1);
234 newDep->targetType = tmp_vcproj.projectTarget; 297 newDep->targetType = tmp_vcproj.projectTarget;
235 { 298 newDep->debugBuild = tmp_proj.isActiveConfig("debug");
236 static QUuid uuid = solutionGUID; 299 newDep->uuid = getProjectUUID(Option::fixPathToLocalOS(QDir::currentDirPath() + QDir::separator() + vcproj)).toString().upper();
237 uuid = increaseUUID( uuid ); 300
238 newDep->uuid = uuid.toString().upper(); 301 // We want to store it as the .lib name.
239 }
240 if(newDep->target.endsWith(".dll")) 302 if(newDep->target.endsWith(".dll"))
241 newDep->target = newDep->target.left(newDep->target.length()-3) + "lib"; 303 newDep->target = newDep->target.left(newDep->target.length()-3) + "lib";
304
305 // All projects using Forms are dependent on uic.exe
242 if(!tmp_proj.isEmpty("FORMS")) 306 if(!tmp_proj.isEmpty("FORMS"))
243 newDep->dependencies << "uic.exe"; 307 newDep->dependencies << "uic.exe";
244 { 308
309 // Add all unknown libs to the deps
245 QStringList where("QMAKE_LIBS"); 310 QStringList where("QMAKE_LIBS");
246 if(!tmp_proj.isEmpty("QMAKE_INTERNAL_PRL_LIBS")) 311 if(!tmp_proj.isEmpty("QMAKE_INTERNAL_PRL_LIBS"))
247 where = tmp_proj.variables()["QMAKE_INTERNAL_PRL_LIBS"]; 312 where = tmp_proj.variables()["QMAKE_INTERNAL_PRL_LIBS"];
@@ -250,23 +315,38 @@ void VcprojGenerator::writeSubDirs(QTextStream &t)
250 QStringList &l = tmp_proj.variables()[(*wit)]; 315 QStringList &l = tmp_proj.variables()[(*wit)];
251 for(QStringList::Iterator it = l.begin(); it != l.end(); ++it) { 316 for(QStringList::Iterator it = l.begin(); it != l.end(); ++it) {
252 QString opt = (*it); 317 QString opt = (*it);
253 if(!opt.startsWith("/")) //Not a switch 318 if(!opt.startsWith("/") && // Not a switch
319 opt != newDep->target && // Not self
320 opt != "opengl32.lib" && // We don't care about these libs
321 opt != "glu32.lib" && // to make depgen alittle faster
322 opt != "kernel32.lib" &&
323 opt != "user32.lib" &&
324 opt != "gdi32.lib" &&
325 opt != "comdlg32.lib" &&
326 opt != "advapi32.lib" &&
327 opt != "shell32.lib" &&
328 opt != "ole32.lib" &&
329 opt != "oleaut32.lib" &&
330 opt != "uuid.lib" &&
331 opt != "imm32.lib" &&
332 opt != "winmm.lib" &&
333 opt != "wsock32.lib" &&
334 opt != "winspool.lib" &&
335 opt != "delayimp.lib" )
336 {
254 newDep->dependencies << opt.section(Option::dir_sep, -1); 337 newDep->dependencies << opt.section(Option::dir_sep, -1);
255 } 338 }
256 } 339 }
257 } 340 }
341#ifdef DEBUG_SOLUTION_GEN
342 qDebug( "Deps for %20s: [%s]", newDep->target.latin1(), newDep->dependencies.join(" :: " ).latin1() );
343#endif
258 solution_cleanup.append(newDep); 344 solution_cleanup.append(newDep);
259 solution_depends.insert(newDep->target, newDep); 345 solution_depends.insert(newDep->target, newDep);
260 { 346 t << _slnProjectBeg << _slnMSVCvcprojGUID << _slnProjectMid
261 QRegExp libVersion("[0-9]{3,3}\\.lib$");
262 if(libVersion.search(newDep->target) != -1)
263 solution_depends.insert(newDep->target.left(newDep->target.length() -
264 libVersion.matchedLength()) + ".lib", newDep);
265 }
266 t << _snlProjectBeg << _snlMSVCvcprojGUID << _snlProjectMid
267 << "\"" << newDep->orig_target << "\", \"" << newDep->vcprojFile 347 << "\"" << newDep->orig_target << "\", \"" << newDep->vcprojFile
268 << "\", \"" << newDep->uuid << "\""; 348 << "\", \"" << newDep->uuid << "\"";
269 t << _snlProjectEnd; 349 t << _slnProjectEnd;
270 } 350 }
271 } 351 }
272nextfile: 352nextfile:
@@ -274,30 +354,35 @@ nextfile:
274 } 354 }
275 } 355 }
276 } 356 }
277 t << _snlGlobalBeg; 357 t << _slnGlobalBeg;
278 t << _snlSolutionConf; 358 t << _slnSolutionConf;
279 t << _snlProjDepBeg; 359 t << _slnProjDepBeg;
360
361 // Figure out dependencies
280 for(solution_cleanup.first(); solution_cleanup.current(); solution_cleanup.next()) { 362 for(solution_cleanup.first(); solution_cleanup.current(); solution_cleanup.next()) {
363 if(solution_cleanup.current()->targetType == StaticLib)
364 continue; // Shortcut, Static libs are not dep.
281 int cnt = 0; 365 int cnt = 0;
282 for(QStringList::iterator dit = solution_cleanup.current()->dependencies.begin(); 366 for(QStringList::iterator dit = solution_cleanup.current()->dependencies.begin();
283 dit != solution_cleanup.current()->dependencies.end(); 367 dit != solution_cleanup.current()->dependencies.end();
284 ++dit) { 368 ++dit)
285 VcsolutionDepend *vc; 369 {
286 if((vc=solution_depends[*dit])) { 370 VcsolutionDepend *vc = solution_depends[*dit];
287 if(solution_cleanup.current()->targetType != StaticLib || vc->targetType == Application) 371 if(vc)
288 t << "\n\t\t" << solution_cleanup.current()->uuid << "." << cnt++ << " = " << vc->uuid; 372 t << "\n\t\t" << solution_cleanup.current()->uuid << "." << cnt++ << " = " << vc->uuid;
289 } 373 }
290 } 374 }
291 } 375 t << _slnProjDepEnd;
292 t << _snlProjDepEnd; 376 t << _slnProjConfBeg;
293 t << _snlProjConfBeg;
294 for(solution_cleanup.first(); solution_cleanup.current(); solution_cleanup.next()) { 377 for(solution_cleanup.first(); solution_cleanup.current(); solution_cleanup.next()) {
295 t << "\n\t\t" << solution_cleanup.current()->uuid << _snlProjConfTag1; 378 t << "\n\t\t" << solution_cleanup.current()->uuid << _slnProjDbgConfTag1;
296 t << "\n\t\t" << solution_cleanup.current()->uuid << _snlProjConfTag2; 379 t << "\n\t\t" << solution_cleanup.current()->uuid << _slnProjDbgConfTag2;
380 t << "\n\t\t" << solution_cleanup.current()->uuid << _slnProjRelConfTag1;
381 t << "\n\t\t" << solution_cleanup.current()->uuid << _slnProjRelConfTag2;
297 } 382 }
298 t << _snlProjConfEnd; 383 t << _slnProjConfEnd;
299 t << _snlExtSections; 384 t << _slnExtSections;
300 t << _snlGlobalEnd; 385 t << _slnGlobalEnd;
301} 386}
302 387
303// ------------------------------------------------------------------------------------------------ 388// ------------------------------------------------------------------------------------------------
@@ -369,6 +454,24 @@ void VcprojGenerator::init()
369 else 454 else
370 projectTarget = SharedLib; 455 projectTarget = SharedLib;
371 } 456 }
457
458 // Setup PCH variables
459 precompH = project->first("PRECOMPILED_HEADER");
460 usePCH = !precompH.isEmpty() && project->isActiveConfig("precompile_header");
461 if (usePCH) {
462 precompHFilename = QFileInfo(precompH).fileName();
463 // Created files
464 QString origTarget = project->first("QMAKE_ORIG_TARGET");
465 precompObj = origTarget + Option::obj_ext;
466 precompPch = origTarget + ".pch";
467 // Add PRECOMPILED_HEADER to HEADERS
468 if (!project->variables()["HEADERS"].contains(precompH))
469 project->variables()["HEADERS"] += precompH;
470 // Return to variable pool
471 project->variables()["PRECOMPILED_OBJECT"] = precompObj;
472 project->variables()["PRECOMPILED_PCH"] = precompPch;
473 }
474
372 initProject(); // Fills the whole project with proper data 475 initProject(); // Fills the whole project with proper data
373} 476}
374 477
@@ -389,8 +492,9 @@ void VcprojGenerator::initProject()
389 492
390 // Own elements ----------------------------- 493 // Own elements -----------------------------
391 vcProject.Name = project->first("QMAKE_ORIG_TARGET"); 494 vcProject.Name = project->first("QMAKE_ORIG_TARGET");
392 vcProject.Version = "7.00"; 495 vcProject.Version = use_net2003_version() ? "7.10" : "7.00";
393 vcProject.PlatformName = ( vcProject.Configuration.idl.TargetEnvironment == midlTargetWin64 ? "Win64" : "Win32" ); 496 vcProject.ProjectGUID = getProjectUUID().toString().upper();
497 vcProject.PlatformName = ( vcProject.Configuration[0].idl.TargetEnvironment == midlTargetWin64 ? "Win64" : "Win32" );
394 // These are not used by Qt, but may be used by customers 498 // These are not used by Qt, but may be used by customers
395 vcProject.SccProjectName = project->first("SCCPROJECTNAME"); 499 vcProject.SccProjectName = project->first("SCCPROJECTNAME");
396 vcProject.SccLocalPath = project->first("SCCLOCALPATH"); 500 vcProject.SccLocalPath = project->first("SCCLOCALPATH");
@@ -412,35 +516,37 @@ void VcprojGenerator::initConfiguration()
412 QString temp = project->first("BuildBrowserInformation"); 516 QString temp = project->first("BuildBrowserInformation");
413 switch ( projectTarget ) { 517 switch ( projectTarget ) {
414 case SharedLib: 518 case SharedLib:
415 vcProject.Configuration.ConfigurationType = typeDynamicLibrary; 519 vcProject.Configuration[0].ConfigurationType = typeDynamicLibrary;
416 break; 520 break;
417 case StaticLib: 521 case StaticLib:
418 vcProject.Configuration.ConfigurationType = typeStaticLibrary; 522 vcProject.Configuration[0].ConfigurationType = typeStaticLibrary;
419 break; 523 break;
420 case Application: 524 case Application:
421 default: 525 default:
422 vcProject.Configuration.ConfigurationType = typeApplication; 526 vcProject.Configuration[0].ConfigurationType = typeApplication;
423 break; 527 break;
424 } 528 }
425 vcProject.Configuration.Name = ( project->isActiveConfig( "debug" ) ? "Debug|" : "Release|" ); 529
426 vcProject.Configuration.Name += ( vcProject.Configuration.idl.TargetEnvironment == midlTargetWin64 ? "Win64" : "Win32" ); 530 // Release version of the Configuration ---------------
427 vcProject.Configuration.ATLMinimizesCRunTimeLibraryUsage = ( project->first("ATLMinimizesCRunTimeLibraryUsage").isEmpty() ? _False : _True ); 531 VCConfiguration &RConf = vcProject.Configuration[0];
428 vcProject.Configuration.BuildBrowserInformation = triState( temp.isEmpty() ? (short)unset : temp.toShort() ); 532 RConf.Name = "Release";
533 RConf.Name += ( RConf.idl.TargetEnvironment == midlTargetWin64 ? "|Win64" : "|Win32" );
534 RConf.ATLMinimizesCRunTimeLibraryUsage = ( project->first("ATLMinimizesCRunTimeLibraryUsage").isEmpty() ? _False : _True );
535 RConf.BuildBrowserInformation = triState( temp.isEmpty() ? (short)unset : temp.toShort() );
429 temp = project->first("CharacterSet"); 536 temp = project->first("CharacterSet");
430 vcProject.Configuration.CharacterSet = charSet( temp.isEmpty() ? (short)charSetNotSet : temp.toShort() ); 537 RConf.CharacterSet = charSet( temp.isEmpty() ? (short)charSetNotSet : temp.toShort() );
431 vcProject.Configuration.DeleteExtensionsOnClean = project->first("DeleteExtensionsOnClean"); 538 RConf.DeleteExtensionsOnClean = project->first("DeleteExtensionsOnClean");
432 vcProject.Configuration.ImportLibrary = vcProject.Configuration.linker.ImportLibrary; 539 RConf.ImportLibrary = RConf.linker.ImportLibrary;
433 vcProject.Configuration.IntermediateDirectory = project->first("OBJECTS_DIR"); 540 RConf.IntermediateDirectory = project->first("OBJECTS_DIR");
434// temp = (projectTarget == StaticLib) ? project->first("DESTDIR"):project->first("DLLDESTDIR"); 541 RConf.OutputDirectory = ".";
435 vcProject.Configuration.OutputDirectory = "."; //( temp.isEmpty() ? QString(".") : temp ); 542 RConf.PrimaryOutput = project->first("PrimaryOutput");
436 vcProject.Configuration.PrimaryOutput = project->first("PrimaryOutput"); 543 RConf.WholeProgramOptimization = RConf.compiler.WholeProgramOptimization;
437 vcProject.Configuration.WholeProgramOptimization = vcProject.Configuration.compiler.WholeProgramOptimization;
438 temp = project->first("UseOfATL"); 544 temp = project->first("UseOfATL");
439 if ( !temp.isEmpty() ) 545 if ( !temp.isEmpty() )
440 vcProject.Configuration.UseOfATL = useOfATL( temp.toShort() ); 546 RConf.UseOfATL = useOfATL( temp.toShort() );
441 temp = project->first("UseOfMfc"); 547 temp = project->first("UseOfMfc");
442 if ( !temp.isEmpty() ) 548 if ( !temp.isEmpty() )
443 vcProject.Configuration.UseOfMfc = useOfMfc( temp.toShort() ); 549 RConf.UseOfMfc = useOfMfc( temp.toShort() );
444 550
445 // Configuration does not need parameters from 551 // Configuration does not need parameters from
446 // these sub XML items; 552 // these sub XML items;
@@ -448,6 +554,39 @@ void VcprojGenerator::initConfiguration()
448 initPreBuildEventTools(); 554 initPreBuildEventTools();
449 initPostBuildEventTools(); 555 initPostBuildEventTools();
450 initPreLinkEventTools(); 556 initPreLinkEventTools();
557
558 // Debug version of the Configuration -----------------
559 VCConfiguration DConf = vcProject.Configuration[0]; // Create copy configuration for debug
560 DConf.Name = "Debug";
561 DConf.Name += ( DConf.idl.TargetEnvironment == midlTargetWin64 ? "|Win64" : "|Win32" );
562
563 // Set definite values in both configurations
564 DConf.compiler.PreprocessorDefinitions.remove("NDEBUG");
565 RConf.compiler.PreprocessorDefinitions += "NDEBUG";
566 RConf.linker.GenerateDebugInformation = _False;
567 DConf.linker.GenerateDebugInformation = _True;
568
569 // Modify configurations, based on Qt build
570 if ( project->isActiveConfig("debug") ) {
571 RConf.IntermediateDirectory =
572 RConf.compiler.AssemblerListingLocation =
573 RConf.compiler.ObjectFile = "Release\\";
574 RConf.librarian.OutputFile =
575 RConf.linker.OutputFile = RConf.IntermediateDirectory + "\\" + project->first("MSVCPROJ_TARGET");
576 RConf.linker.parseOptions(project->variables()["QMAKE_LFLAGS_RELEASE"]);
577 RConf.compiler.parseOptions(project->variables()["QMAKE_CFLAGS_RELEASE"]);
578 } else {
579 DConf.IntermediateDirectory =
580 DConf.compiler.AssemblerListingLocation =
581 DConf.compiler.ObjectFile = "Debug\\";
582 DConf.librarian.OutputFile =
583 DConf.linker.OutputFile = DConf.IntermediateDirectory + "\\" + project->first("MSVCPROJ_TARGET");
584 DConf.linker.DelayLoadDLLs.clear();
585 DConf.compiler.parseOptions(project->variables()["QMAKE_CFLAGS_DEBUG"]);
586 }
587
588 // Add Debug configuration to project
589 vcProject.Configuration += DConf;
451} 590}
452 591
453void VcprojGenerator::initCompilerTool() 592void VcprojGenerator::initCompilerTool()
@@ -456,109 +595,129 @@ void VcprojGenerator::initCompilerTool()
456 if ( placement.isEmpty() ) 595 if ( placement.isEmpty() )
457 placement = ".\\"; 596 placement = ".\\";
458 597
459 vcProject.Configuration.compiler.AssemblerListingLocation = placement ; 598 VCConfiguration &RConf = vcProject.Configuration[0];
460 vcProject.Configuration.compiler.ProgramDataBaseFileName = placement ; 599 RConf.compiler.AssemblerListingLocation = placement ;
461 vcProject.Configuration.compiler.ObjectFile = placement ; 600 RConf.compiler.ProgramDataBaseFileName = ".\\" ;
462 vcProject.Configuration.compiler.PrecompiledHeaderFile = placement + project->first("QMAKE_ORIG_TARGET") + ".pch"; 601 RConf.compiler.ObjectFile = placement ;
602 // PCH
603 if ( usePCH ) {
604 RConf.compiler.UsePrecompiledHeader = pchUseUsingSpecific;
605 RConf.compiler.PrecompiledHeaderFile = "$(IntDir)\\" + precompPch;
606 RConf.compiler.PrecompiledHeaderThrough = precompHFilename;
607 RConf.compiler.ForcedIncludeFiles = precompHFilename;
608 // Minimal build option triggers an Internal Compiler Error
609 // when used in conjunction with /FI and /Yu, so remove it
610 project->variables()["QMAKE_CFLAGS_DEBUG"].remove("-Gm");
611 project->variables()["QMAKE_CFLAGS_DEBUG"].remove("/Gm");
612 project->variables()["QMAKE_CXXFLAGS_DEBUG"].remove("-Gm");
613 project->variables()["QMAKE_CXXFLAGS_DEBUG"].remove("/Gm");
614 }
463 615
464 if ( project->isActiveConfig("debug") ){ 616 if ( project->isActiveConfig("debug") ){
465 // Debug version 617 // Debug version
466 vcProject.Configuration.compiler.parseOptions( project->variables()["QMAKE_CXXFLAGS"] ); 618 RConf.compiler.parseOptions( project->variables()["QMAKE_CXXFLAGS"] );
467 vcProject.Configuration.compiler.parseOptions( project->variables()["QMAKE_CXXFLAGS_DEBUG"] ); 619 RConf.compiler.parseOptions( project->variables()["QMAKE_CXXFLAGS_DEBUG"] );
468 if ( project->isActiveConfig("thread") ) { 620 if ( project->isActiveConfig("thread") ) {
469 if ( (projectTarget == Application) || (projectTarget == StaticLib) ) 621 if ( (projectTarget == Application) || (projectTarget == StaticLib) )
470 vcProject.Configuration.compiler.parseOptions( project->variables()["QMAKE_CXXFLAGS_MT_DBG"] ); 622 RConf.compiler.parseOptions( project->variables()["QMAKE_CXXFLAGS_MT_DBG"] );
471 else 623 else
472 vcProject.Configuration.compiler.parseOptions( project->variables()["QMAKE_CXXFLAGS_MT_DLLDBG"] ); 624 RConf.compiler.parseOptions( project->variables()["QMAKE_CXXFLAGS_MT_DLLDBG"] );
473 } else { 625 } else {
474 vcProject.Configuration.compiler.parseOptions( project->variables()["QMAKE_CXXFLAGS_ST_DBG"] ); 626 RConf.compiler.parseOptions( project->variables()["QMAKE_CXXFLAGS_MT_DBG"] );
475 } 627 }
476 } else { 628 } else {
477 // Release version 629 // Release version
478 vcProject.Configuration.compiler.parseOptions( project->variables()["QMAKE_CXXFLAGS"] ); 630 RConf.compiler.parseOptions( project->variables()["QMAKE_CXXFLAGS"] );
479 vcProject.Configuration.compiler.parseOptions( project->variables()["QMAKE_CXXFLAGS_RELEASE"] ); 631 RConf.compiler.parseOptions( project->variables()["QMAKE_CXXFLAGS_RELEASE"] );
480 vcProject.Configuration.compiler.PreprocessorDefinitions += "QT_NO_DEBUG"; 632 RConf.compiler.PreprocessorDefinitions += "QT_NO_DEBUG";
481 vcProject.Configuration.compiler.PreprocessorDefinitions += "NDEBUG"; 633 RConf.compiler.PreprocessorDefinitions += "NDEBUG";
482 if ( project->isActiveConfig("thread") ) { 634 if ( project->isActiveConfig("thread") ) {
483 if ( (projectTarget == Application) || (projectTarget == StaticLib) ) 635 if ( (projectTarget == Application) || (projectTarget == StaticLib) )
484 vcProject.Configuration.compiler.parseOptions( project->variables()["QMAKE_CXXFLAGS_MT"] ); 636 RConf.compiler.parseOptions( project->variables()["QMAKE_CXXFLAGS_MT"] );
485 else 637 else
486 vcProject.Configuration.compiler.parseOptions( project->variables()["QMAKE_CXXFLAGS_MT_DLL"] ); 638 RConf.compiler.parseOptions( project->variables()["QMAKE_CXXFLAGS_MT_DLL"] );
487 } else { 639 } else {
488 vcProject.Configuration.compiler.parseOptions( project->variables()["QMAKE_CXXFLAGS_ST"] ); 640 RConf.compiler.parseOptions( project->variables()["QMAKE_CXXFLAGS_MT"] );
489 } 641 }
490 } 642 }
491 643
492 // Common for both release and debug 644 // Common for both release and debug
493 if ( project->isActiveConfig("warn_off") ) 645 if ( project->isActiveConfig("warn_off") )
494 vcProject.Configuration.compiler.parseOptions( project->variables()["QMAKE_CXXFLAGS_WARN_OFF"] ); 646 RConf.compiler.parseOptions( project->variables()["QMAKE_CXXFLAGS_WARN_OFF"] );
495 else if ( project->isActiveConfig("warn_on") ) 647 else if ( project->isActiveConfig("warn_on") )
496 vcProject.Configuration.compiler.parseOptions( project->variables()["QMAKE_CXXFLAGS_WARN_ON"] ); 648 RConf.compiler.parseOptions( project->variables()["QMAKE_CXXFLAGS_WARN_ON"] );
497 if ( project->isActiveConfig("windows") ) 649 if ( project->isActiveConfig("windows") )
498 vcProject.Configuration.compiler.PreprocessorDefinitions += project->variables()["MSVCPROJ_WINCONDEF"]; 650 RConf.compiler.PreprocessorDefinitions += project->variables()["MSVCPROJ_WINCONDEF"];
499 651
500 // Can this be set for ALL configs? 652 // Can this be set for ALL configs?
501 // If so, use qmake.conf! 653 // If so, use qmake.conf!
502 if ( projectTarget == SharedLib ) 654 if ( projectTarget == SharedLib )
503 vcProject.Configuration.compiler.PreprocessorDefinitions += "_WINDOWS"; 655 RConf.compiler.PreprocessorDefinitions += "_WINDOWS";
656
657 RConf.compiler.PreprocessorDefinitions += project->variables()["DEFINES"];
658 RConf.compiler.PreprocessorDefinitions += project->variables()["PRL_EXPORT_DEFINES"];
659 QStringList::iterator it;
660 for(it=RConf.compiler.PreprocessorDefinitions.begin();
661 it!=RConf.compiler.PreprocessorDefinitions.end();
662 ++it)
663 (*it).replace('\"', "&quot;");
504 664
505 vcProject.Configuration.compiler.PreprocessorDefinitions += project->variables()["DEFINES"]; 665 RConf.compiler.parseOptions( project->variables()["MSVCPROJ_INCPATH"] );
506 vcProject.Configuration.compiler.PreprocessorDefinitions += project->variables()["PRL_EXPORT_DEFINES"];
507 vcProject.Configuration.compiler.parseOptions( project->variables()["MSVCPROJ_INCPATH"] );
508} 666}
509 667
510void VcprojGenerator::initLibrarianTool() 668void VcprojGenerator::initLibrarianTool()
511{ 669{
512 vcProject.Configuration.librarian.OutputFile = project->first( "DESTDIR" ); 670 VCConfiguration &RConf = vcProject.Configuration[0];
513 if( vcProject.Configuration.librarian.OutputFile.isEmpty() ) 671 RConf.librarian.OutputFile = project->first( "DESTDIR" );
514 vcProject.Configuration.librarian.OutputFile = ".\\"; 672 if( RConf.librarian.OutputFile.isEmpty() )
673 RConf.librarian.OutputFile = ".\\";
515 674
516 if( !vcProject.Configuration.librarian.OutputFile.endsWith("\\") ) 675 if( !RConf.librarian.OutputFile.endsWith("\\") )
517 vcProject.Configuration.librarian.OutputFile += '\\'; 676 RConf.librarian.OutputFile += '\\';
518 677
519 vcProject.Configuration.librarian.OutputFile += project->first("MSVCPROJ_TARGET"); 678 RConf.librarian.OutputFile += project->first("MSVCPROJ_TARGET");
520} 679}
521 680
522void VcprojGenerator::initLinkerTool() 681void VcprojGenerator::initLinkerTool()
523{ 682{
524 vcProject.Configuration.linker.parseOptions( project->variables()["MSVCPROJ_LFLAGS"] ); 683 VCConfiguration &RConf = vcProject.Configuration[0];
525 vcProject.Configuration.linker.AdditionalDependencies += project->variables()["MSVCPROJ_LIBS"]; 684 RConf.linker.parseOptions( project->variables()["MSVCPROJ_LFLAGS"] );
685 RConf.linker.AdditionalDependencies += project->variables()["MSVCPROJ_LIBS"];
526 686
527 switch ( projectTarget ) { 687 switch ( projectTarget ) {
528 case Application: 688 case Application:
529 vcProject.Configuration.linker.OutputFile = project->first( "DESTDIR" ); 689 RConf.linker.OutputFile = project->first( "DESTDIR" );
530 break; 690 break;
531 case SharedLib: 691 case SharedLib:
532 vcProject.Configuration.linker.parseOptions( project->variables()["MSVCPROJ_LIBOPTIONS"] ); 692 RConf.linker.parseOptions( project->variables()["MSVCPROJ_LIBOPTIONS"] );
533 vcProject.Configuration.linker.OutputFile = project->first( "DLLDESTDIR" ); 693 RConf.linker.OutputFile = project->first( "DESTDIR" );
534 break; 694 break;
535 case StaticLib: //unhandled - added to remove warnings.. 695 case StaticLib: //unhandled - added to remove warnings..
536 break; 696 break;
537 } 697 }
538 698
539 if( vcProject.Configuration.linker.OutputFile.isEmpty() ) 699 if( RConf.linker.OutputFile.isEmpty() )
540 vcProject.Configuration.linker.OutputFile = ".\\"; 700 RConf.linker.OutputFile = ".\\";
541 701
542 if( !vcProject.Configuration.linker.OutputFile.endsWith("\\") ) 702 if( !RConf.linker.OutputFile.endsWith("\\") )
543 vcProject.Configuration.linker.OutputFile += '\\'; 703 RConf.linker.OutputFile += '\\';
544 704
545 vcProject.Configuration.linker.OutputFile += project->first("MSVCPROJ_TARGET"); 705 RConf.linker.OutputFile += project->first("MSVCPROJ_TARGET");
546 vcProject.Configuration.linker.ProgramDatabaseFile = project->first("OBJECTS_DIR") + project->first("QMAKE_ORIG_TARGET") + ".pdb";
547 706
548 if ( project->isActiveConfig("debug") ){ 707 if ( project->isActiveConfig("debug") ){
549 vcProject.Configuration.linker.parseOptions( project->variables()["QMAKE_LFLAGS_DEBUG"] ); 708 RConf.linker.parseOptions( project->variables()["QMAKE_LFLAGS_DEBUG"] );
550 } else { 709 } else {
551 vcProject.Configuration.linker.parseOptions( project->variables()["QMAKE_LFLAGS_RELEASE"] ); 710 RConf.linker.parseOptions( project->variables()["QMAKE_LFLAGS_RELEASE"] );
552 } 711 }
553 712
554 if ( project->isActiveConfig("dll") ){ 713 if ( project->isActiveConfig("dll") ){
555 vcProject.Configuration.linker.parseOptions( project->variables()["QMAKE_LFLAGS_QT_DLL"] ); 714 RConf.linker.parseOptions( project->variables()["QMAKE_LFLAGS_QT_DLL"] );
556 } 715 }
557 716
558 if ( project->isActiveConfig("console") ){ 717 if ( project->isActiveConfig("console") ){
559 vcProject.Configuration.linker.parseOptions( project->variables()["QMAKE_LFLAGS_CONSOLE"] ); 718 RConf.linker.parseOptions( project->variables()["QMAKE_LFLAGS_CONSOLE"] );
560 } else { 719 } else {
561 vcProject.Configuration.linker.parseOptions( project->variables()["QMAKE_LFLAGS_WINDOWS"] ); 720 RConf.linker.parseOptions( project->variables()["QMAKE_LFLAGS_WINDOWS"] );
562 } 721 }
563 722
564} 723}
@@ -573,32 +732,22 @@ void VcprojGenerator::initCustomBuildTool()
573 732
574void VcprojGenerator::initPreBuildEventTools() 733void VcprojGenerator::initPreBuildEventTools()
575{ 734{
576 QString collectionName = project->first("QMAKE_IMAGE_COLLECTION");
577 if( !collectionName.isEmpty() ) {
578 QStringList& list = project->variables()["IMAGES"];
579 vcProject.Configuration.preBuild.Description = "Generate imagecollection";
580 //vcProject.Configuration.preBuild.AdditionalDependencies += list;
581
582 QFile imgs( ".imgcol" );
583 imgs.open( IO_WriteOnly );
584 QTextStream s( &imgs );
585 QStringList::ConstIterator it = list.begin();
586 while( it!=list.end() ) {
587 s << *it << " ";
588 it++;
589 }
590
591 vcProject.Configuration.preBuild.CommandLine = project->first("QMAKE_UIC") + " -embed " + project->first("QMAKE_ORIG_TARGET") + " -f .imgcol -o " + collectionName;
592 //vcProject.Configuration.preBuild.Outputs = collectionName;
593
594 }
595} 735}
596 736
597void VcprojGenerator::initPostBuildEventTools() 737void VcprojGenerator::initPostBuildEventTools()
598{ 738{
739 VCConfiguration &RConf = vcProject.Configuration[0];
599 if ( !project->variables()["QMAKE_POST_LINK"].isEmpty() ) { 740 if ( !project->variables()["QMAKE_POST_LINK"].isEmpty() ) {
600 vcProject.Configuration.postBuild.Description = var("QMAKE_POST_LINK"); 741 RConf.postBuild.Description = var("QMAKE_POST_LINK");
601 vcProject.Configuration.postBuild.CommandLine = var("QMAKE_POST_LINK"); 742 RConf.postBuild.CommandLine = var("QMAKE_POST_LINK");
743 RConf.postBuild.Description.replace(" && ", " &amp;&amp; ");
744 RConf.postBuild.CommandLine.replace(" && ", " &amp;&amp; ");
745 }
746 if ( !project->variables()["MSVCPROJ_COPY_DLL"].isEmpty() ) {
747 if ( !RConf.postBuild.CommandLine.isEmpty() )
748 RConf.postBuild.CommandLine += " &amp;&amp; ";
749 RConf.postBuild.Description += var("MSVCPROJ_COPY_DLL_DESC");
750 RConf.postBuild.CommandLine += var("MSVCPROJ_COPY_DLL");
602 } 751 }
603 if( project->isActiveConfig( "activeqt" ) ) { 752 if( project->isActiveConfig( "activeqt" ) ) {
604 QString name = project->first( "QMAKE_ORIG_TARGET" ); 753 QString name = project->first( "QMAKE_ORIG_TARGET" );
@@ -606,34 +755,30 @@ void VcprojGenerator::initPostBuildEventTools()
606 QString objdir = project->first( "OBJECTS_DIR" ); 755 QString objdir = project->first( "OBJECTS_DIR" );
607 QString idc = project->first( "QMAKE_IDC" ); 756 QString idc = project->first( "QMAKE_IDC" );
608 757
609 vcProject.Configuration.postBuild.Description = "Finalizing ActiveQt server..."; 758 RConf.postBuild.Description = "Finalizing ActiveQt server...";
610 if ( !vcProject.Configuration.postBuild.CommandLine.isEmpty() ) 759 if ( !RConf.postBuild.CommandLine.isEmpty() )
611 vcProject.Configuration.postBuild.CommandLine += " &amp;&amp; "; 760 RConf.postBuild.CommandLine += " &amp;&amp; ";
612 761
613 if( project->isActiveConfig( "dll" ) ) { // In process 762 if( project->isActiveConfig( "dll" ) ) { // In process
614 vcProject.Configuration.postBuild.CommandLine += 763 RConf.postBuild.CommandLine +=
615 // call idc to generate .idl file from .dll 764 // call idc to generate .idl file from .dll
616 idc + " " + vcProject.Configuration.OutputDirectory + "\\" + nameext + " -idl " + objdir + name + ".idl -version 1.0 &amp;&amp; " + 765 idc + " &quot;$(TargetPath)&quot; -idl " + objdir + name + ".idl -version 1.0 &amp;&amp; " +
617 // call midl to create implementations of the .idl file 766 // call midl to create implementations of the .idl file
618 project->first( "QMAKE_IDL" ) + " " + objdir + name + ".idl /nologo /o " + objdir + name + ".midl /tlb " + objdir + name + ".tlb /iid " + objdir + 767 project->first( "QMAKE_IDL" ) + " /nologo " + objdir + name + ".idl /tlb " + objdir + name + ".tlb &amp;&amp; " +
619 "dump.midl /dlldata " + objdir + "dump.midl /cstub " + objdir + "dump.midl /header " + objdir + "dump.midl /proxy " + objdir + "dump.midl /sstub " +
620 objdir + "dump.midl &amp;&amp; " +
621 // call idc to replace tlb... 768 // call idc to replace tlb...
622 idc + " " + vcProject.Configuration.OutputDirectory + "\\" + nameext + " /tlb " + objdir + name + ".tlb &amp;&amp; " + 769 idc + " &quot;$(TargetPath)&quot; /tlb " + objdir + name + ".tlb &amp;&amp; " +
623 // register server 770 // register server
624 idc + " " + vcProject.Configuration.OutputDirectory + "\\" + nameext + " /regserver"; 771 idc + " &quot;$(TargetPath)&quot; /regserver";
625 } else { // out of process 772 } else { // out of process
626 vcProject.Configuration.postBuild.CommandLine = 773 RConf.postBuild.CommandLine =
627 // call application to dump idl 774 // call application to dump idl
628 vcProject.Configuration.OutputDirectory + "\\" + nameext + " -dumpidl " + objdir + name + ".idl -version 1.0 &amp;&amp; " + 775 "&quot;$(TargetPath)&quot; -dumpidl " + objdir + name + ".idl -version 1.0 &amp;&amp; " +
629 // call midl to create implementations of the .idl file 776 // call midl to create implementations of the .idl file
630 project->first( "QMAKE_IDL" ) + " " + objdir + name + ".idl /nologo /o " + objdir + name + ".midl /tlb " + objdir + name + ".tlb /iid " + objdir + 777 project->first( "QMAKE_IDL" ) + " /nologo " + objdir + name + ".idl /tlb " + objdir + name + ".tlb &amp;&amp; " +
631 "dump.midl /dlldata " + objdir + "dump.midl /cstub " + objdir + "dump.midl /header " + objdir + "dump.midl /proxy " + objdir + "dump.midl /sstub " +
632 objdir + "dump.midl &amp;&amp; " +
633 // call idc to replace tlb... 778 // call idc to replace tlb...
634 idc + " " + vcProject.Configuration.OutputDirectory + "\\" + nameext + " /tlb " + objdir + name + ".tlb &amp;&amp; " + 779 idc + " &quot;$(TargetPath)&quot; /tlb " + objdir + name + ".tlb &amp;&amp; " +
635 // call app to register 780 // call app to register
636 vcProject.Configuration.OutputDirectory + "\\" + nameext + " -regserver"; 781 "&quot;$(TargetPath)&quot; -regserver";
637 } 782 }
638 } 783 }
639} 784}
@@ -642,12 +787,88 @@ void VcprojGenerator::initPreLinkEventTools()
642{ 787{
643} 788}
644 789
790
791// ------------------------------------------------------------------
792// Helper functions to do proper sorting of the
793// qstringlists, for both flat and non-flat modes.
794inline bool XLessThanY( QString &x, QString &y, bool flat_mode )
795{
796 if ( flat_mode ) {
797 QString subX = x.mid( x.findRev('\\')+1 );
798 QString subY = y.mid( y.findRev('\\')+1 );
799 return QString::compare(subX, subY) < 0;
800 }
801
802 int xPos = 0;
803 int yPos = 0;
804 int xSlashPos;
805 int ySlashPos;
806 for (;;) {
807 xSlashPos = x.find('\\', xPos);
808 ySlashPos = y.find('\\', yPos);
809
810 if (xSlashPos == -1 && ySlashPos != -1) {
811 return false;
812 } else if (xSlashPos != -1 && ySlashPos == -1) {
813 return true;
814 } else if (xSlashPos == -1 /* && yySlashPos == -1 */) {
815 QString subX = x.mid(xPos);
816 QString subY = y.mid(yPos);
817 return QString::compare(subX, subY) < 0;
818 } else {
819 QString subX = x.mid(xPos, xSlashPos - xPos);
820 QString subY = y.mid(yPos, ySlashPos - yPos);
821 int cmp = QString::compare(subX, subY);
822 if (cmp != 0)
823 return cmp < 0;
824 }
825 xPos = xSlashPos + 1;
826 yPos = ySlashPos + 1;
827 }
828 return false;
829}
830void nonflatDir_BubbleSort( QStringList& list, bool flat_mode )
831{
832 QStringList::Iterator b = list.begin();
833 QStringList::Iterator e = list.end();
834 QStringList::Iterator last = e;
835 --last; // goto last
836 if ( last == b )// shortcut
837 return;
838 while( b != last ) {// sort them
839 bool swapped = FALSE;
840 QStringList::Iterator swap_pos = b;
841 QStringList::Iterator x = e;
842 QStringList::Iterator y = x;
843 --y;
844 QString swap_str;
845 do {
846 --x;
847 --y;
848 if ( XLessThanY(*x,*y, flat_mode) ) {
849 swapped = TRUE;
850 swap_str = (*x); // Swap -------
851 (*x) = (*y);
852 (*y) = swap_str; // ------------
853 swap_pos = y;
854 }
855 } while( y != b );
856 if ( !swapped )
857 return;
858 b = swap_pos;
859 ++b;
860 }
861}
862// ------------------------------------------------------------------
863
645void VcprojGenerator::initSourceFiles() 864void VcprojGenerator::initSourceFiles()
646{ 865{
866 vcProject.SourceFiles.flat_files = project->isActiveConfig("flat");
647 vcProject.SourceFiles.Name = "Source Files"; 867 vcProject.SourceFiles.Name = "Source Files";
648 vcProject.SourceFiles.Filter = "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"; 868 vcProject.SourceFiles.Filter = "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat";
649 vcProject.SourceFiles.Files += project->variables()["SOURCES"]; 869 vcProject.SourceFiles.Files += project->variables()["SOURCES"];
650 vcProject.SourceFiles.Files.sort(); 870 nonflatDir_BubbleSort( vcProject.SourceFiles.Files,
871 vcProject.SourceFiles.flat_files );
651 vcProject.SourceFiles.Project = this; 872 vcProject.SourceFiles.Project = this;
652 vcProject.SourceFiles.Config = &(vcProject.Configuration); 873 vcProject.SourceFiles.Config = &(vcProject.Configuration);
653 vcProject.SourceFiles.CustomBuild = none; 874 vcProject.SourceFiles.CustomBuild = none;
@@ -655,10 +876,16 @@ void VcprojGenerator::initSourceFiles()
655 876
656void VcprojGenerator::initHeaderFiles() 877void VcprojGenerator::initHeaderFiles()
657{ 878{
879 vcProject.HeaderFiles.flat_files = project->isActiveConfig("flat");
658 vcProject.HeaderFiles.Name = "Header Files"; 880 vcProject.HeaderFiles.Name = "Header Files";
659 vcProject.HeaderFiles.Filter = "h;hpp;hxx;hm;inl"; 881 vcProject.HeaderFiles.Filter = "h;hpp;hxx;hm;inl";
660 vcProject.HeaderFiles.Files += project->variables()["HEADERS"]; 882 vcProject.HeaderFiles.Files += project->variables()["HEADERS"];
661 vcProject.HeaderFiles.Files.sort(); 883 if (usePCH) { // Generated PCH cpp file
884 if (!vcProject.HeaderFiles.Files.contains(precompH))
885 vcProject.HeaderFiles.Files += precompH;
886 }
887 nonflatDir_BubbleSort( vcProject.HeaderFiles.Files,
888 vcProject.HeaderFiles.flat_files );
662 vcProject.HeaderFiles.Project = this; 889 vcProject.HeaderFiles.Project = this;
663 vcProject.HeaderFiles.Config = &(vcProject.Configuration); 890 vcProject.HeaderFiles.Config = &(vcProject.Configuration);
664 vcProject.HeaderFiles.CustomBuild = moc; 891 vcProject.HeaderFiles.CustomBuild = moc;
@@ -666,10 +893,12 @@ void VcprojGenerator::initHeaderFiles()
666 893
667void VcprojGenerator::initMOCFiles() 894void VcprojGenerator::initMOCFiles()
668{ 895{
896 vcProject.MOCFiles.flat_files = project->isActiveConfig("flat");
669 vcProject.MOCFiles.Name = "Generated MOC Files"; 897 vcProject.MOCFiles.Name = "Generated MOC Files";
670 vcProject.MOCFiles.Filter = "cpp;c;cxx;moc"; 898 vcProject.MOCFiles.Filter = "cpp;c;cxx;moc";
671 vcProject.MOCFiles.Files += project->variables()["SRCMOC"]; 899 vcProject.MOCFiles.Files += project->variables()["SRCMOC"];
672 vcProject.MOCFiles.Files.sort(); 900 nonflatDir_BubbleSort( vcProject.MOCFiles.Files,
901 vcProject.MOCFiles.flat_files );
673 vcProject.MOCFiles.Project = this; 902 vcProject.MOCFiles.Project = this;
674 vcProject.MOCFiles.Config = &(vcProject.Configuration); 903 vcProject.MOCFiles.Config = &(vcProject.Configuration);
675 vcProject.MOCFiles.CustomBuild = moc; 904 vcProject.MOCFiles.CustomBuild = moc;
@@ -677,23 +906,27 @@ void VcprojGenerator::initMOCFiles()
677 906
678void VcprojGenerator::initUICFiles() 907void VcprojGenerator::initUICFiles()
679{ 908{
680 vcProject.UICFiles.Name = "Generated UI Files"; 909 vcProject.UICFiles.flat_files = project->isActiveConfig("flat");
910 vcProject.UICFiles.Name = "Generated Form Files";
681 vcProject.UICFiles.Filter = "cpp;c;cxx;h;hpp;hxx;"; 911 vcProject.UICFiles.Filter = "cpp;c;cxx;h;hpp;hxx;";
682 vcProject.UICFiles.Project = this; 912 vcProject.UICFiles.Project = this;
683 vcProject.UICFiles.Files += project->variables()["UICDECLS"]; 913 vcProject.UICFiles.Files += project->variables()["UICDECLS"];
684 vcProject.UICFiles.Files += project->variables()["UICIMPLS"]; 914 vcProject.UICFiles.Files += project->variables()["UICIMPLS"];
685 vcProject.UICFiles.Files.sort(); 915 nonflatDir_BubbleSort( vcProject.UICFiles.Files,
916 vcProject.UICFiles.flat_files );
686 vcProject.UICFiles.Config = &(vcProject.Configuration); 917 vcProject.UICFiles.Config = &(vcProject.Configuration);
687 vcProject.UICFiles.CustomBuild = none; 918 vcProject.UICFiles.CustomBuild = none;
688} 919}
689 920
690void VcprojGenerator::initFormsFiles() 921void VcprojGenerator::initFormsFiles()
691{ 922{
923 vcProject.FormFiles.flat_files = project->isActiveConfig("flat");
692 vcProject.FormFiles.Name = "Forms"; 924 vcProject.FormFiles.Name = "Forms";
693 vcProject.FormFiles.ParseFiles = _False; 925 vcProject.FormFiles.ParseFiles = _False;
694 vcProject.FormFiles.Filter = "ui"; 926 vcProject.FormFiles.Filter = "ui";
695 vcProject.FormFiles.Files += project->variables()["FORMS"]; 927 vcProject.FormFiles.Files += project->variables()["FORMS"];
696 vcProject.FormFiles.Files.sort(); 928 nonflatDir_BubbleSort( vcProject.FormFiles.Files,
929 vcProject.FormFiles.flat_files );
697 vcProject.FormFiles.Project = this; 930 vcProject.FormFiles.Project = this;
698 vcProject.FormFiles.Config = &(vcProject.Configuration); 931 vcProject.FormFiles.Config = &(vcProject.Configuration);
699 vcProject.FormFiles.CustomBuild = uic; 932 vcProject.FormFiles.CustomBuild = uic;
@@ -701,11 +934,13 @@ void VcprojGenerator::initFormsFiles()
701 934
702void VcprojGenerator::initTranslationFiles() 935void VcprojGenerator::initTranslationFiles()
703{ 936{
937 vcProject.TranslationFiles.flat_files = project->isActiveConfig("flat");
704 vcProject.TranslationFiles.Name = "Translations Files"; 938 vcProject.TranslationFiles.Name = "Translations Files";
705 vcProject.TranslationFiles.ParseFiles = _False; 939 vcProject.TranslationFiles.ParseFiles = _False;
706 vcProject.TranslationFiles.Filter = "ts"; 940 vcProject.TranslationFiles.Filter = "ts";
707 vcProject.TranslationFiles.Files += project->variables()["TRANSLATIONS"]; 941 vcProject.TranslationFiles.Files += project->variables()["TRANSLATIONS"];
708 vcProject.TranslationFiles.Files.sort(); 942 nonflatDir_BubbleSort( vcProject.TranslationFiles.Files,
943 vcProject.TranslationFiles.flat_files );
709 vcProject.TranslationFiles.Project = this; 944 vcProject.TranslationFiles.Project = this;
710 vcProject.TranslationFiles.Config = &(vcProject.Configuration); 945 vcProject.TranslationFiles.Config = &(vcProject.Configuration);
711 vcProject.TranslationFiles.CustomBuild = none; 946 vcProject.TranslationFiles.CustomBuild = none;
@@ -713,18 +948,22 @@ void VcprojGenerator::initTranslationFiles()
713 948
714void VcprojGenerator::initLexYaccFiles() 949void VcprojGenerator::initLexYaccFiles()
715{ 950{
951 vcProject.LexYaccFiles.flat_files = project->isActiveConfig("flat");
716 vcProject.LexYaccFiles.Name = "Lex / Yacc Files"; 952 vcProject.LexYaccFiles.Name = "Lex / Yacc Files";
717 vcProject.LexYaccFiles.ParseFiles = _False; 953 vcProject.LexYaccFiles.ParseFiles = _False;
718 vcProject.LexYaccFiles.Filter = "l;y"; 954 vcProject.LexYaccFiles.Filter = "l;y";
719 vcProject.LexYaccFiles.Files += project->variables()["LEXSOURCES"]; 955 vcProject.LexYaccFiles.Files += project->variables()["LEXSOURCES"];
720 vcProject.LexYaccFiles.Files += project->variables()["YACCSOURCES"]; 956 vcProject.LexYaccFiles.Files += project->variables()["YACCSOURCES"];
721 vcProject.LexYaccFiles.Files.sort(); 957 nonflatDir_BubbleSort( vcProject.LexYaccFiles.Files,
958 vcProject.LexYaccFiles.flat_files );
722 vcProject.LexYaccFiles.Project = this; 959 vcProject.LexYaccFiles.Project = this;
960 vcProject.LexYaccFiles.Config = &(vcProject.Configuration);
723 vcProject.LexYaccFiles.CustomBuild = lexyacc; 961 vcProject.LexYaccFiles.CustomBuild = lexyacc;
724} 962}
725 963
726void VcprojGenerator::initResourceFiles() 964void VcprojGenerator::initResourceFiles()
727{ 965{
966 vcProject.ResourceFiles.flat_files = project->isActiveConfig("flat");
728 vcProject.ResourceFiles.Name = "Resources"; 967 vcProject.ResourceFiles.Name = "Resources";
729 vcProject.ResourceFiles.ParseFiles = _False; 968 vcProject.ResourceFiles.ParseFiles = _False;
730 vcProject.ResourceFiles.Filter = "cpp;ico;png;jpg;jpeg;gif;xpm;bmp;rc;ts"; 969 vcProject.ResourceFiles.Filter = "cpp;ico;png;jpg;jpeg;gif;xpm;bmp;rc;ts";
@@ -732,9 +971,11 @@ void VcprojGenerator::initResourceFiles()
732 vcProject.ResourceFiles.Files += project->variables()["QMAKE_IMAGE_COLLECTION"]; 971 vcProject.ResourceFiles.Files += project->variables()["QMAKE_IMAGE_COLLECTION"];
733 vcProject.ResourceFiles.Files += project->variables()["IMAGES"]; 972 vcProject.ResourceFiles.Files += project->variables()["IMAGES"];
734 vcProject.ResourceFiles.Files += project->variables()["IDLSOURCES"]; 973 vcProject.ResourceFiles.Files += project->variables()["IDLSOURCES"];
735 vcProject.ResourceFiles.Files.sort(); 974 nonflatDir_BubbleSort( vcProject.ResourceFiles.Files,
975 vcProject.ResourceFiles.flat_files );
736 vcProject.ResourceFiles.Project = this; 976 vcProject.ResourceFiles.Project = this;
737 vcProject.ResourceFiles.CustomBuild = none; 977 vcProject.ResourceFiles.Config = &(vcProject.Configuration);
978 vcProject.ResourceFiles.CustomBuild = resource;
738} 979}
739 980
740/* \internal 981/* \internal
@@ -865,7 +1106,6 @@ void VcprojGenerator::initOld()
865 project->variables()["QMAKE_LIBS_QT_ENTRY"] = "qaxserver.lib"; 1106 project->variables()["QMAKE_LIBS_QT_ENTRY"] = "qaxserver.lib";
866 if ( project->isActiveConfig( "dll" ) ) { 1107 if ( project->isActiveConfig( "dll" ) ) {
867 project->variables()["QMAKE_LIBS"] += project->variables()["QMAKE_LIBS_QT_ENTRY"]; 1108 project->variables()["QMAKE_LIBS"] += project->variables()["QMAKE_LIBS_QT_ENTRY"];
868 project->variables()["MSVCPROJ_LFLAGS"].append("/DEF:"+project->first("DEF_FILE"));
869 } 1109 }
870 } 1110 }
871 if ( !project->isActiveConfig("dll") && !project->isActiveConfig("plugin") ) { 1111 if ( !project->isActiveConfig("dll") && !project->isActiveConfig("plugin") ) {
@@ -939,6 +1179,15 @@ void VcprojGenerator::initOld()
939 if ( project->isActiveConfig("moc") ) 1179 if ( project->isActiveConfig("moc") )
940 setMocAware(TRUE); 1180 setMocAware(TRUE);
941 1181
1182 // /VERSION:x.yz -------------------------------------------------
1183 if ( !project->variables()["VERSION"].isEmpty() ) {
1184 QString version = project->variables()["VERSION"][0];
1185 int firstDot = version.find( "." );
1186 QString major = version.left( firstDot );
1187 QString minor = version.right( version.length() - firstDot - 1 );
1188 minor.replace( ".", "" );
1189 project->variables()["QMAKE_LFLAGS"].append( "/VERSION:" + major + "." + minor );
1190 }
942 1191
943 project->variables()["QMAKE_LIBS"] += project->variables()["LIBS"]; 1192 project->variables()["QMAKE_LIBS"] += project->variables()["LIBS"];
944 // Update -lname to name.lib, and -Ldir to 1193 // Update -lname to name.lib, and -Ldir to
@@ -949,6 +1198,7 @@ void VcprojGenerator::initOld()
949 it = libList.remove( it ); 1198 it = libList.remove( it );
950 it = libList.insert( it, s.mid( 2 ) + ".lib" ); 1199 it = libList.insert( it, s.mid( 2 ) + ".lib" );
951 } else if( s.startsWith( "-L" ) ) { 1200 } else if( s.startsWith( "-L" ) ) {
1201 project->variables()["QMAKE_LIBDIR"] += (*it).mid(2);
952 it = libList.remove( it ); 1202 it = libList.remove( it );
953 } else { 1203 } else {
954 it++; 1204 it++;
@@ -1050,31 +1300,28 @@ void VcprojGenerator::initOld()
1050 if ( project->first("TARGET").startsWith("$(QTDIR)") ) 1300 if ( project->first("TARGET").startsWith("$(QTDIR)") )
1051 dest.replace( QRegExp("\\$\\(QTDIR\\)"), getenv("QTDIR") ); 1301 dest.replace( QRegExp("\\$\\(QTDIR\\)"), getenv("QTDIR") );
1052 project->variables()["MSVCPROJ_TARGET"] = dest; 1302 project->variables()["MSVCPROJ_TARGET"] = dest;
1053 if ( project->isActiveConfig("dll") ) {
1054 QString imp = project->first( "DESTDIR" );
1055 if( !imp.isNull() && !imp.endsWith( "\\" ) )
1056 imp += "\\";
1057 imp += dest;
1058 imp.replace(QRegExp("\\.dll"), ".lib");
1059 project->variables()["MSVCPROJ_LIBOPTIONS"] += QString("/IMPLIB:") + imp;
1060 }
1061 1303
1062 // DLL COPY ------------------------------------------------------ 1304 // DLL COPY ------------------------------------------------------
1063 if ( project->isActiveConfig("dll") && !project->variables()["DLLDESTDIR"].isEmpty() ) { 1305 if ( project->isActiveConfig("dll") && !project->variables()["DLLDESTDIR"].isEmpty() ) {
1064 QStringList dlldirs = project->variables()["DLLDESTDIR"]; 1306 QStringList dlldirs = project->variables()["DLLDESTDIR"];
1065 QString copydll = "# Begin Special Build Tool\n" 1307 QString copydll("");
1066 "TargetPath=" + dest + "\n" 1308 QStringList::Iterator dlldir;
1067 "SOURCE=$(InputPath)\n" 1309 for ( dlldir = dlldirs.begin(); dlldir != dlldirs.end(); ++dlldir ) {
1068 "PostBuild_Desc=Copy DLL to " + project->first("DLLDESTDIR") + "\n" 1310 if ( !copydll.isEmpty() )
1069 "PostBuild_Cmds="; 1311 copydll += " && ";
1312 copydll += "copy &quot;$(TargetPath)&quot; &quot;" + *dlldir + "&quot;";
1313 }
1070 1314
1071 for ( QStringList::Iterator dlldir = dlldirs.begin(); dlldir != dlldirs.end(); ++dlldir ) { 1315 QString deststr( "Copy " + dest + " to " );
1072 copydll += "copy \"" + dest + "\" \"" + *dlldir + "\"\t"; 1316 for ( dlldir = dlldirs.begin(); dlldir != dlldirs.end(); ) {
1317 deststr += *dlldir;
1318 ++dlldir;
1319 if ( dlldir != dlldirs.end() )
1320 deststr += ", ";
1073 } 1321 }
1074 1322
1075 copydll += "\n# End Special Build Tool"; 1323 project->variables()["MSVCPROJ_COPY_DLL"].append( copydll );
1076 project->variables()["MSVCPROJ_COPY_DLL_REL"].append( copydll ); 1324 project->variables()["MSVCPROJ_COPY_DLL_DESC"].append( deststr );
1077 project->variables()["MSVCPROJ_COPY_DLL_DBG"].append( copydll );
1078 } 1325 }
1079 1326
1080 // ACTIVEQT ------------------------------------------------------ 1327 // ACTIVEQT ------------------------------------------------------
@@ -1085,18 +1332,17 @@ void VcprojGenerator::initOld()
1085 if ( version.isEmpty() ) 1332 if ( version.isEmpty() )
1086 version = "1.0"; 1333 version = "1.0";
1087 1334
1088 project->variables()["MSVCPROJ_IDLSOURCES"].append( "tmp\\" + targetfilename + ".idl" ); 1335 QString objdir = project->first( "OBJECTS_DIR" );
1089 project->variables()["MSVCPROJ_IDLSOURCES"].append( "tmp\\" + targetfilename + ".tlb" ); 1336 project->variables()["MSVCPROJ_IDLSOURCES"].append( objdir + targetfilename + ".idl" );
1090 project->variables()["MSVCPROJ_IDLSOURCES"].append( "tmp\\" + targetfilename + ".midl" );
1091 if ( project->isActiveConfig( "dll" ) ) { 1337 if ( project->isActiveConfig( "dll" ) ) {
1092 QString regcmd = "# Begin Special Build Tool\n" 1338 QString regcmd = "# Begin Special Build Tool\n"
1093 "TargetPath=" + targetfilename + "\n" 1339 "TargetPath=" + targetfilename + "\n"
1094 "SOURCE=$(InputPath)\n" 1340 "SOURCE=$(InputPath)\n"
1095 "PostBuild_Desc=Finalizing ActiveQt server...\n" 1341 "PostBuild_Desc=Finalizing ActiveQt server...\n"
1096 "PostBuild_Cmds=" + 1342 "PostBuild_Cmds=" +
1097 idc + " %1 -idl tmp\\" + targetfilename + ".idl -version " + version + 1343 idc + " %1 -idl " + objdir + targetfilename + ".idl -version " + version +
1098 "\t" + idl + " tmp\\" + targetfilename + ".idl /nologo /o tmp\\" + targetfilename + ".midl /tlb tmp\\" + targetfilename + ".tlb /iid tmp\\dump.midl /dlldata tmp\\dump.midl /cstub tmp\\dump.midl /header tmp\\dump.midl /proxy tmp\\dump.midl /sstub tmp\\dump.midl" 1344 "\t" + idl + " /nologo " + objdir + targetfilename + ".idl /tlb " + objdir + targetfilename + ".tlb" +
1099 "\t" + idc + " %1 /tlb tmp\\" + targetfilename + ".tlb" 1345 "\t" + idc + " %1 /tlb " + objdir + targetfilename + ".tlb"
1100 "\tregsvr32 /s %1\n" 1346 "\tregsvr32 /s %1\n"
1101 "# End Special Build Tool"; 1347 "# End Special Build Tool";
1102 1348
@@ -1111,9 +1357,9 @@ void VcprojGenerator::initOld()
1111 "SOURCE=$(InputPath)\n" 1357 "SOURCE=$(InputPath)\n"
1112 "PostBuild_Desc=Finalizing ActiveQt server...\n" 1358 "PostBuild_Desc=Finalizing ActiveQt server...\n"
1113 "PostBuild_Cmds=" 1359 "PostBuild_Cmds="
1114 "%1 -dumpidl tmp\\" + targetfilename + ".idl -version " + version + 1360 "%1 -dumpidl " + objdir + targetfilename + ".idl -version " + version +
1115 "\t" + idl + " tmp\\" + targetfilename + ".idl /nologo /o tmp\\" + targetfilename + ".midl /tlb tmp\\" + targetfilename + ".tlb /iid tmp\\dump.midl /dlldata tmp\\dump.midl /cstub tmp\\dump.midl /header tmp\\dump.midl /proxy tmp\\dump.midl /sstub tmp\\dump.midl" 1361 "\t" + idl + " /nologo " + objdir + targetfilename + ".idl /tlb " + objdir + targetfilename + ".tlb"
1116 "\t" + idc + " %1 /tlb tmp\\" + targetfilename + ".tlb" 1362 "\t" + idc + " %1 /tlb " + objdir + targetfilename + ".tlb"
1117 "\t%1 -regserver\n" 1363 "\t%1 -regserver\n"
1118 "# End Special Build Tool"; 1364 "# End Special Build Tool";
1119 1365
@@ -1123,9 +1369,11 @@ void VcprojGenerator::initOld()
1123 executable = project->variables()["MSVCPROJ_TARGETDIRDEB"].first() + "\\" + project->variables()["TARGET"].first(); 1369 executable = project->variables()["MSVCPROJ_TARGETDIRDEB"].first() + "\\" + project->variables()["TARGET"].first();
1124 project->variables()["MSVCPROJ_REGSVR_DBG"].append( regcmd.arg(executable).arg(executable).arg(executable) ); 1370 project->variables()["MSVCPROJ_REGSVR_DBG"].append( regcmd.arg(executable).arg(executable).arg(executable) );
1125 } 1371 }
1126
1127 } 1372 }
1128 1373
1374 if ( !project->variables()["DEF_FILE"].isEmpty() )
1375 project->variables()["MSVCPROJ_LFLAGS"].append("/DEF:"+project->first("DEF_FILE"));
1376
1129 // FORMS --------------------------------------------------------- 1377 // FORMS ---------------------------------------------------------
1130 QStringList &list = project->variables()["FORMS"]; 1378 QStringList &list = project->variables()["FORMS"];
1131 for( it = list.begin(); it != list.end(); ++it ) { 1379 for( it = list.begin(); it != list.end(); ++it ) {
diff --git a/qmake/generators/win32/msvc_vcproj.h b/qmake/generators/win32/msvc_vcproj.h
index 69e0c02..d1ca666 100644
--- a/qmake/generators/win32/msvc_vcproj.h
+++ b/qmake/generators/win32/msvc_vcproj.h
@@ -1,13 +1,12 @@
1
1/**************************************************************************** 2/****************************************************************************
2** $Id$
3** 3**
4** Definition of VcprojGenerator class.
5** 4**
6** Created : 970521 5** Definition of VcprojGenerator class.
7** 6**
8** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. 7** Copyright (C) 1992-2003 Trolltech AS. All rights reserved.
9** 8**
10** This file is part of the network module of the Qt GUI Toolkit. 9** This file is part of qmake.
11** 10**
12** This file may be distributed under the terms of the Q Public License 11** This file may be distributed under the terms of the Q Public License
13** as defined by Trolltech AS of Norway and appearing in the file 12** as defined by Trolltech AS of Norway and appearing in the file
@@ -34,6 +33,7 @@
34** not clear to you. 33** not clear to you.
35** 34**
36**********************************************************************/ 35**********************************************************************/
36
37#ifndef __MSVC_VCPROJ_H__ 37#ifndef __MSVC_VCPROJ_H__
38#define __MSVC_VCPROJ_H__ 38#define __MSVC_VCPROJ_H__
39 39
@@ -63,6 +63,9 @@ public:
63 63
64 QString defaultMakefile() const; 64 QString defaultMakefile() const;
65 virtual bool doDepends() const { return FALSE; } //never necesary 65 virtual bool doDepends() const { return FALSE; } //never necesary
66 QString precompH, precompHFilename,
67 precompObj, precompPch;
68 bool usePCH;
66 69
67protected: 70protected:
68 virtual bool openOutput(QFile &file) const; 71 virtual bool openOutput(QFile &file) const;
@@ -95,6 +98,7 @@ protected:
95 target projectTarget; 98 target projectTarget;
96 99
97private: 100private:
101 QUuid getProjectUUID(const QString &filename=QString::null);
98 QUuid increaseUUID(const QUuid &id); 102 QUuid increaseUUID(const QUuid &id);
99 friend class VCFilter; 103 friend class VCFilter;
100}; 104};
diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp
index bc3fed9..cd733c6 100644
--- a/qmake/generators/win32/winmakefile.cpp
+++ b/qmake/generators/win32/winmakefile.cpp
@@ -1,13 +1,11 @@
1/**************************************************************************** 1/****************************************************************************
2** $Id$
3** 2**
4** Definition of ________ class.
5** 3**
6** Created : 970521 4** Implementation of Win32MakefileGenerator class.
7** 5**
8** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. 6** Copyright (C) 1992-2003 Trolltech AS. All rights reserved.
9** 7**
10** This file is part of the network module of the Qt GUI Toolkit. 8** This file is part of qmake.
11** 9**
12** This file may be distributed under the terms of the Q Public License 10** This file may be distributed under the terms of the Q Public License
13** as defined by Trolltech AS of Norway and appearing in the file 11** as defined by Trolltech AS of Norway and appearing in the file
@@ -38,6 +36,7 @@
38#include "winmakefile.h" 36#include "winmakefile.h"
39#include "option.h" 37#include "option.h"
40#include "project.h" 38#include "project.h"
39#include "meta.h"
41#include <qtextstream.h> 40#include <qtextstream.h>
42#include <qstring.h> 41#include <qstring.h>
43#include <qdict.h> 42#include <qdict.h>
@@ -97,14 +96,13 @@ Win32MakefileGenerator::writeSubDirs(QTextStream &t)
97 } 96 }
98 QPtrListIterator<SubDir> it(subdirs); 97 QPtrListIterator<SubDir> it(subdirs);
99 98
100 if(!project->isEmpty("MAKEFILE")) 99 t << "MAKEFILE = " << (project->isEmpty("MAKEFILE") ? QString("Makefile") : var("MAKEFILE")) << endl;
101 t << "MAKEFILE=" << var("MAKEFILE") << endl;
102 t << "QMAKE =" << (project->isEmpty("QMAKE_QMAKE") ? QString("qmake") : var("QMAKE_QMAKE")) << endl; 100 t << "QMAKE =" << (project->isEmpty("QMAKE_QMAKE") ? QString("qmake") : var("QMAKE_QMAKE")) << endl;
103 t << "SUBTARGETS= "; 101 t << "SUBTARGETS= ";
104 for( it.toFirst(); it.current(); ++it) 102 for( it.toFirst(); it.current(); ++it)
105 t << " \\\n\t\t" << it.current()->target; 103 t << " \\\n\t\t" << it.current()->target;
106 t << endl << endl; 104 t << endl << endl;
107 t << "all: qmake_all $(SUBTARGETS)" << endl << endl; 105 t << "all: $(MAKEFILE) $(SUBTARGETS)" << endl << endl;
108 106
109 for( it.toFirst(); it.current(); ++it) { 107 for( it.toFirst(); it.current(); ++it) {
110 bool have_dir = !(*it)->directory.isEmpty(); 108 bool have_dir = !(*it)->directory.isEmpty();
@@ -114,8 +112,6 @@ Win32MakefileGenerator::writeSubDirs(QTextStream &t)
114 if(have_dir) 112 if(have_dir)
115 mkfile.prepend((*it)->directory + Option::dir_sep); 113 mkfile.prepend((*it)->directory + Option::dir_sep);
116 t << mkfile << ":"; 114 t << mkfile << ":";
117 if(project->variables()["QMAKE_NOFORCE"].isEmpty())
118 t << " FORCE";
119 if(have_dir) 115 if(have_dir)
120 t << "\n\t" << "cd " << (*it)->directory; 116 t << "\n\t" << "cd " << (*it)->directory;
121 t << "\n\t" << "$(QMAKE) " << (*it)->profile << " " << buildArgs(); 117 t << "\n\t" << "$(QMAKE) " << (*it)->profile << " " << buildArgs();
@@ -145,6 +141,16 @@ Win32MakefileGenerator::writeSubDirs(QTextStream &t)
145 t << endl << endl; 141 t << endl << endl;
146 } 142 }
147 143
144 if (project->isActiveConfig("ordered")) { // generate dependencies
145 for( it.toFirst(); it.current(); ) {
146 QString tar = it.current()->target;
147 ++it;
148 if (it.current())
149 t << it.current()->target << ": " << tar << endl;
150 }
151 t << endl;
152 }
153
148 if(project->variables()["QMAKE_INTERNAL_QMAKE_DEPS"].findIndex("qmake_all") == -1) 154 if(project->variables()["QMAKE_INTERNAL_QMAKE_DEPS"].findIndex("qmake_all") == -1)
149 project->variables()["QMAKE_INTERNAL_QMAKE_DEPS"].append("qmake_all"); 155 project->variables()["QMAKE_INTERNAL_QMAKE_DEPS"].append("qmake_all");
150 writeMakeQmake(t); 156 writeMakeQmake(t);
@@ -175,11 +181,18 @@ Win32MakefileGenerator::writeSubDirs(QTextStream &t)
175 } 181 }
176 t << endl << endl; 182 t << endl << endl;
177 183
178 QString targs[] = { QString("clean"), QString("install"), QString("mocclean"), QString::null }; 184 QStringList targs;
179 for(int x = 0; targs[x] != QString::null; x++) { 185 targs << "clean" << "install_subdirs" << "mocables" << "uicables" << "uiclean" << "mocclean";
180 t << targs[x] << ": qmake_all"; 186 targs += project->values("SUBDIR_TARGETS");
181 if(targs[x] == "clean") 187 for(QStringList::Iterator targ_it = targs.begin(); targ_it != targs.end(); ++targ_it) {
182 t << varGlue("QMAKE_CLEAN","\n\t-del ","\n\t-del ", ""); 188 t << (*targ_it) << ": qmake_all";
189 QString targ = (*targ_it);
190 if(targ == "install_subdirs")
191 targ = "install";
192 else if(targ == "uninstall_subdirs")
193 targ = "uninstall";
194 if(targ == "clean")
195 t << varGlue("QMAKE_CLEAN","\n\t-$(DEL_FILE) ","\n\t-$(DEL_FILE) ", "");
183 if (!subdirs.isEmpty()) { 196 if (!subdirs.isEmpty()) {
184 for( it.toFirst(); it.current(); ++it) { 197 for( it.toFirst(); it.current(); ++it) {
185 int subLevels = (*it)->directory.contains(Option::dir_sep) + 1; 198 int subLevels = (*it)->directory.contains(Option::dir_sep) + 1;
@@ -187,7 +200,7 @@ Win32MakefileGenerator::writeSubDirs(QTextStream &t)
187 if(have_dir) 200 if(have_dir)
188 t << "\n\t" << "cd " << (*it)->directory; 201 t << "\n\t" << "cd " << (*it)->directory;
189 QString in_file = " -f " + (*it)->makefile; 202 QString in_file = " -f " + (*it)->makefile;
190 t << "\n\t" << "$(MAKE) " << in_file << " " << targs[x]; 203 t << "\n\t" << "$(MAKE) " << in_file << " " << targ;
191 if(have_dir) { 204 if(have_dir) {
192 t << "\n\t" << "@cd .."; 205 t << "\n\t" << "@cd ..";
193 for(int i = 1; i < subLevels; i++ ) 206 for(int i = 1; i < subLevels; i++ )
@@ -202,6 +215,32 @@ Win32MakefileGenerator::writeSubDirs(QTextStream &t)
202 t << endl << endl; 215 t << endl << endl;
203 } 216 }
204 217
218 //installations
219 project->variables()["INSTALLDEPS"] += "install_subdirs";
220 project->variables()["UNINSTALLDEPS"] += "uninstall_subdirs";
221 writeInstalls(t, "INSTALLS");
222
223 // user defined targets
224 QStringList &qut = project->variables()["QMAKE_EXTRA_WIN_TARGETS"];
225 for(QStringList::Iterator sit = qut.begin(); sit != qut.end(); ++sit) {
226 QString targ = var((*sit) + ".target"),
227 cmd = var((*sit) + ".commands"), deps;
228 if(targ.isEmpty())
229 targ = (*sit);
230 QStringList &deplist = project->variables()[(*sit) + ".depends"];
231 for(QStringList::Iterator dep_it = deplist.begin(); dep_it != deplist.end(); ++dep_it) {
232 QString dep = var((*dep_it) + ".target");
233 if(dep.isEmpty())
234 dep = (*dep_it);
235 deps += " " + dep;
236 }
237 if(!project->variables()["QMAKE_NOFORCE"].isEmpty() &&
238 project->variables()[(*sit) + ".CONFIG"].findIndex("phony") != -1)
239 deps += QString(" ") + "FORCE";
240 t << "\n\n" << targ << ":" << deps << "\n\t"
241 << cmd;
242 }
243
205 if(project->variables()["QMAKE_NOFORCE"].isEmpty()) 244 if(project->variables()["QMAKE_NOFORCE"].isEmpty())
206 t << "FORCE:" << endl << endl; 245 t << "FORCE:" << endl << endl;
207} 246}
@@ -226,16 +265,50 @@ Win32MakefileGenerator::findHighestVersion(const QString &d, const QString &stem
226 biggest = QMAX(biggest, (regx.cap(1) == dllStem || 265 biggest = QMAX(biggest, (regx.cap(1) == dllStem ||
227 regx.cap(2).isEmpty()) ? -1 : regx.cap(2).toInt()); 266 regx.cap(2).isEmpty()) ? -1 : regx.cap(2).toInt());
228 } 267 }
229 if(dir.exists(dllStem + Option::prl_ext)) { 268 QMakeMetaInfo libinfo;
230 QMakeProject proj; 269 if(libinfo.readLib(bd + dllStem)) {
231 if(proj.read(bd + dllStem + Option::prl_ext, QDir::currentDirPath(), TRUE)) { 270 if(!libinfo.isEmpty("QMAKE_PRL_VERSION"))
232 if(!proj.isEmpty("QMAKE_PRL_VERSION")) 271 biggest = QMAX(biggest, libinfo.first("QMAKE_PRL_VERSION").replace(".", "").toInt());
233 biggest = QMAX(biggest, proj.first("QMAKE_PRL_VERSION").replace(".", "").toInt());
234 }
235 } 272 }
236 return biggest; 273 return biggest;
237} 274}
238 275
276QString
277Win32MakefileGenerator::findDependency(const QString &dep)
278{
279 {
280 QStringList &qut = project->variables()["QMAKE_EXTRA_WIN_TARGETS"];
281 for(QStringList::Iterator it = qut.begin(); it != qut.end(); ++it) {
282 QString targ = var((*it) + ".target");
283 if(targ.isEmpty())
284 targ = (*it);
285 if(targ.endsWith(dep))
286 return targ;
287 }
288 }
289 {
290 QStringList &quc = project->variables()["QMAKE_EXTRA_WIN_COMPILERS"];
291 for(QStringList::Iterator it = quc.begin(); it != quc.end(); ++it) {
292 QString tmp_out = project->variables()[(*it) + ".output"].first();
293 QString tmp_cmd = project->variables()[(*it) + ".commands"].join(" ");
294 if(tmp_out.isEmpty() || tmp_cmd.isEmpty())
295 continue;
296 QStringList &tmp = project->variables()[(*it) + ".input"];
297 for(QStringList::Iterator it2 = tmp.begin(); it2 != tmp.end(); ++it2) {
298 QStringList &inputs = project->variables()[(*it2)];
299 for(QStringList::Iterator input = inputs.begin(); input != inputs.end(); ++input) {
300 QString out = tmp_out;
301 QFileInfo fi(Option::fixPathToLocalOS((*input)));
302 out.replace("${QMAKE_FILE_BASE}", fi.baseName());
303 out.replace("${QMAKE_FILE_NAME}", fi.fileName());
304 if(out.endsWith(dep))
305 return out;
306 }
307 }
308 }
309 }
310 return MakefileGenerator::findDependency(dep);
311}
239 312
240bool 313bool
241Win32MakefileGenerator::findLibraries(const QString &where) 314Win32MakefileGenerator::findLibraries(const QString &where)
@@ -278,7 +351,7 @@ Win32MakefileGenerator::findLibraries(const QString &where)
278 if(ver > 0) 351 if(ver > 0)
279 extension += QString::number(ver); 352 extension += QString::number(ver);
280 extension += ".lib"; 353 extension += ".lib";
281 if(QFile::exists(mdd->local_dir + Option::dir_sep + lib + Option::prl_ext) || 354 if(QMakeMetaInfo::libExists(mdd->local_dir + Option::dir_sep + lib) ||
282 QFile::exists(mdd->local_dir + Option::dir_sep + lib + extension)) { 355 QFile::exists(mdd->local_dir + Option::dir_sep + lib + extension)) {
283 out = mdd->real_dir + Option::dir_sep + lib + extension; 356 out = mdd->real_dir + Option::dir_sep + lib + extension;
284 break; 357 break;
@@ -303,6 +376,7 @@ Win32MakefileGenerator::findLibraries(const QString &where)
303 } else { 376 } else {
304 lib_dirs = dirs; 377 lib_dirs = dirs;
305 } 378 }
379 if (!project->variables()["QMAKE_QT_DLL"].isEmpty()) {
306 if(file.endsWith(".lib")) { 380 if(file.endsWith(".lib")) {
307 file = file.left(file.length() - 4); 381 file = file.left(file.length() - 4);
308 if(!file.at(file.length()-1).isNumber()) { 382 if(!file.at(file.length()-1).isNumber()) {
@@ -328,6 +402,7 @@ Win32MakefileGenerator::findLibraries(const QString &where)
328 } 402 }
329 } 403 }
330 } 404 }
405 }
331 if(remove) { 406 if(remove) {
332 it = l.remove(it); 407 it = l.remove(it);
333 } else { 408 } else {
diff --git a/qmake/generators/win32/winmakefile.h b/qmake/generators/win32/winmakefile.h
index 75ba0e0..dac4a99 100644
--- a/qmake/generators/win32/winmakefile.h
+++ b/qmake/generators/win32/winmakefile.h
@@ -1,13 +1,11 @@
1/**************************************************************************** 1/****************************************************************************
2** $Id$
3** 2**
4** Definition of ________ class.
5** 3**
6** Created : 970521 4** Definition of Win32MakefileGenerator class.
7** 5**
8** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. 6** Copyright (C) 1992-2003 Trolltech AS. All rights reserved.
9** 7**
10** This file is part of the network module of the Qt GUI Toolkit. 8** This file is part of qmake.
11** 9**
12** This file may be distributed under the terms of the Q Public License 10** This file may be distributed under the terms of the Q Public License
13** as defined by Trolltech AS of Norway and appearing in the file 11** as defined by Trolltech AS of Norway and appearing in the file
@@ -34,6 +32,7 @@
34** not clear to you. 32** not clear to you.
35** 33**
36**********************************************************************/ 34**********************************************************************/
35
37#ifndef __WINMAKEFILE_H__ 36#ifndef __WINMAKEFILE_H__
38#define __WINMAKEFILE_H__ 37#define __WINMAKEFILE_H__
39 38
@@ -53,6 +52,7 @@ protected:
53 virtual void writeSubDirs(QTextStream &t); 52 virtual void writeSubDirs(QTextStream &t);
54 int findHighestVersion(const QString &dir, const QString &stem); 53 int findHighestVersion(const QString &dir, const QString &stem);
55 bool findLibraries(const QString &); 54 bool findLibraries(const QString &);
55 QString findDependency(const QString &);
56 virtual bool findLibraries(); 56 virtual bool findLibraries();
57 virtual void processPrlFiles(); 57 virtual void processPrlFiles();
58 58
diff --git a/qmake/include/private/qdir_p.h b/qmake/include/private/qdir_p.h
index a6c7c91..4d9dfc6 100644
--- a/qmake/include/private/qdir_p.h
+++ b/qmake/include/private/qdir_p.h
@@ -1,5 +1,5 @@
1/**************************************************************************** 1/****************************************************************************
2** $Id$ 2**
3** 3**
4** Definition of some private QDir functions. 4** Definition of some private QDir functions.
5** 5**
diff --git a/qmake/include/private/qlocale_p.h b/qmake/include/private/qlocale_p.h
new file mode 100644
index 0000000..26c05c9
--- a/dev/null
+++ b/qmake/include/private/qlocale_p.h
@@ -0,0 +1,128 @@
1/****************************************************************************
2**
3**
4** Declaration of the QLocalePrivate class
5**
6** Copyright (C) 1992-2003 Trolltech AS. All rights reserved.
7**
8** This file is part of the widgets module of the Qt GUI Toolkit.
9**
10** This file may be distributed under the terms of the Q Public License
11** as defined by Trolltech AS of Norway and appearing in the file
12** LICENSE.QPL included in the packaging of this file.
13**
14** This file may be distributed and/or modified under the terms of the
15** GNU General Public License version 2 as published by the Free Software
16** Foundation and appearing in the file LICENSE.GPL included in the
17** packaging of this file.
18**
19** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
20** licenses may use this file in accordance with the Qt Commercial License
21** Agreement provided with the Software.
22**
23** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
24** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
25**
26** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
27** information about Qt Commercial License Agreements.
28** See http://www.trolltech.com/qpl/ for QPL licensing information.
29** See http://www.trolltech.com/gpl/ for GPL licensing information.
30**
31** Contact info@trolltech.com if any conditions of this licensing are
32** not clear to you.
33**
34**********************************************************************/
35
36#ifndef QLOCALE_P_H
37#define QLOCALE_P_H
38
39//
40// W A R N I N G
41// -------------
42//
43// This file is not part of the Qt API. It exists for the convenience
44// of internal files. This header file may change from version to version
45// without notice, or even be removed.
46//
47// We mean it.
48//
49//
50
51#include <qstring.h>
52
53struct QLocalePrivate
54{
55public:
56 const QChar &decimal() const { return (QChar&)m_decimal; }
57 const QChar &group() const { return (QChar&)m_group; }
58 const QChar &list() const { return (QChar&)m_list; }
59 const QChar &percent() const { return (QChar&)m_percent; }
60 const QChar &zero() const { return (QChar&)m_zero; }
61 QChar plus() const { return QChar('+'); }
62 const QChar &minus() const { return (QChar&)m_minus; }
63 const QChar &exponential() const { return (QChar&)m_exponential; }
64 QString infinity() const;
65 QString nan() const;
66
67 Q_UINT32 languageId() const { return m_language_id; }
68 Q_UINT32 countryId() const { return m_country_id; }
69
70 bool isDigit(QChar d) const;
71
72 enum GroupSeparatorMode {
73 FailOnGroupSeparators,
74 ParseGroupSeparators
75 };
76
77 enum DoubleForm {
78 DFExponent = 0, // %e or %E
79 DFDecimal, // %f or %F
80 DFSignificantDigits, // %g or %G
81 _DFMax = DFSignificantDigits
82 };
83
84 enum Flags {
85 NoFlags = 0,
86
87 // These correspond to the options in a printf format string
88 Alternate = 0x01,
89 ZeroPadded = 0x02,
90 LeftAdjusted = 0x04,
91 BlankBeforePositive = 0x08,
92 AlwaysShowSign = 0x10,
93 ThousandsGroup = 0x20,
94 CapitalEorX = 0x40 // %x, %e, %f, %g vs. %X, %E, %F, %G
95 };
96
97 QString doubleToString(double d,
98 int precision = -1,
99 DoubleForm form = DFSignificantDigits,
100 int width = -1,
101 unsigned flags = NoFlags) const;
102 QString longLongToString(Q_LLONG l, int precision = -1,
103 int base = 10,
104 int width = -1,
105 unsigned flags = NoFlags) const;
106 QString unsLongLongToString(Q_ULLONG l, int precision = -1,
107 int base = 10,
108 int width = -1,
109 unsigned flags = NoFlags) const;
110 double stringToDouble(QString num, bool *ok, GroupSeparatorMode group_sep_mode) const;
111 Q_LLONG stringToLongLong(QString num, int base, bool *ok, GroupSeparatorMode group_sep_mode) const;
112 Q_ULLONG stringToUnsLongLong(QString num, int base, bool *ok, GroupSeparatorMode group_sep_mode) const;
113 bool removeGroupSeparators(QString &num_str) const;
114 bool numberToCLocale(QString &locale_num, GroupSeparatorMode group_sep_mode) const;
115
116 Q_UINT32 m_language_id, m_country_id;
117
118 Q_UINT16 m_decimal, m_group, m_list, m_percent,
119 m_zero, m_minus, m_exponential;
120
121 static const QString m_infinity;
122 static const QString m_nan;
123 static const QChar m_plus;
124
125 static const char *systemLocaleName();
126};
127
128#endif
diff --git a/qmake/include/private/qsettings_p.h b/qmake/include/private/qsettings_p.h
index 095291c..4b76f44 100644
--- a/qmake/include/private/qsettings_p.h
+++ b/qmake/include/private/qsettings_p.h
@@ -1,24 +1,34 @@
1/**************************************************************************** 1/****************************************************************************
2** $Id$ 2**
3** 3**
4** Definition of QSettings related classes 4** Definition of QSettings related classes
5** 5**
6** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. 6** Created : 990124
7** 7**
8** This file is part of the tools module of the Qt GUI Toolkit. 8** Copyright (C) 1999-2002 Trolltech AS. All rights reserved.
9** 9**
10** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition 10** This file is part of the kernel module of the Qt GUI Toolkit.
11** licenses for Windows may use this file in accordance with the Qt Commercial
12** License Agreement provided with the Software.
13** 11**
14** This file is not available for use under any other license without 12** This file may be distributed under the terms of the Q Public License
15** express written permission from the copyright holder. 13** as defined by Trolltech AS of Norway and appearing in the file
14** LICENSE.QPL included in the packaging of this file.
15**
16** This file may be distributed and/or modified under the terms of the
17** GNU General Public License version 2 as published by the Free Software
18** Foundation and appearing in the file LICENSE.GPL included in the
19** packaging of this file.
20**
21** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
22** licenses may use this file in accordance with the Qt Commercial License
23** Agreement provided with the Software.
16** 24**
17** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 25** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
18** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 26** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
19** 27**
20** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for 28** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
21** information about Qt Commercial License Agreements. 29** information about Qt Commercial License Agreements.
30** See http://www.trolltech.com/qpl/ for QPL licensing information.
31** See http://www.trolltech.com/gpl/ for GPL licensing information.
22** 32**
23** Contact info@trolltech.com if any conditions of this licensing are 33** Contact info@trolltech.com if any conditions of this licensing are
24** not clear to you. 34** not clear to you.
@@ -46,6 +56,7 @@
46#include "qvaluestack.h" 56#include "qvaluestack.h"
47#endif // QT_H 57#endif // QT_H
48 58
59#ifndef QT_NO_SETTINGS
49class QSettingsSysPrivate; 60class QSettingsSysPrivate;
50 61
51// QSettingsGroup is a map of key/value pairs 62// QSettingsGroup is a map of key/value pairs
@@ -128,6 +139,7 @@ public:
128 voidsysInsertSearchPath( QSettings::System, const QString & ); 139 voidsysInsertSearchPath( QSettings::System, const QString & );
129 voidsysRemoveSearchPath( QSettings::System, const QString & ); 140 voidsysRemoveSearchPath( QSettings::System, const QString & );
130#endif 141#endif
131};
132 142
143};
144#endif //QT_NO_SETTINGS
133#endif // QSETTINGS_P_H 145#endif // QSETTINGS_P_H
diff --git a/qmake/include/qfiledefs_p.h b/qmake/include/qfiledefs_p.h
new file mode 100644
index 0000000..659aaec
--- a/dev/null
+++ b/qmake/include/qfiledefs_p.h
@@ -0,0 +1,64 @@
1/****************************************************************************
2**
3**
4** Common macros and system include files for QFile, QFileInfo and QDir.
5**
6** Created : 930812
7**
8** Copyright (C) 1992-2001 Trolltech AS. All rights reserved.
9**
10** This file is part of the tools module of the Qt GUI Toolkit.
11**
12** This file may be distributed under the terms of the Q Public License
13** as defined by Trolltech AS of Norway and appearing in the file
14** LICENSE.QPL included in the packaging of this file.
15**
16** This file may be distributed and/or modified under the terms of the
17** GNU General Public License version 2 as published by the Free Software
18** Foundation and appearing in the file LICENSE.GPL included in the
19** packaging of this file.
20**
21** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
22** licenses may use this file in accordance with the Qt Commercial License
23** Agreement provided with the Software.
24**
25** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
26** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
27**
28** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
29** information about Qt Commercial License Agreements.
30** See http://www.trolltech.com/qpl/ for QPL licensing information.
31** See http://www.trolltech.com/gpl/ for GPL licensing information.
32**
33** Contact info@trolltech.com if any conditions of this licensing are
34** not clear to you.
35**
36**********************************************************************/
37
38#ifndef QFILEDEFS_P_H
39#define QFILEDEFS_P_H
40
41//
42// W A R N I N G
43// -------------
44//
45// This file is not part of the Qt API. It exists for the convenience
46// of qfileinfo*.cpp. This header file may change from version to version
47// without notice, or even be removed.
48//
49// We mean it.
50//
51//
52
53// Be sure to include qplatformdefs.h first!
54struct QFileInfoCache
55{
56#if defined(Q_WS_WIN)
57 QT_STATBUF st;
58#else
59 struct stat st;
60#endif
61};
62
63
64#endif
diff --git a/qmake/include/qglobal.h b/qmake/include/qglobal.h
index 94e5607..b7e919d 100644
--- a/qmake/include/qglobal.h
+++ b/qmake/include/qglobal.h
@@ -1,11 +1,11 @@
1/**************************************************************************** 1/****************************************************************************
2** $Id$ 2**
3** 3**
4** Global type declarations and definitions 4** Global type declarations and definitions
5** 5**
6** Created : 920529 6** Created : 920529
7** 7**
8** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. 8** Copyright (C) 1992-2003 Trolltech AS. All rights reserved.
9** 9**
10** This file is part of the tools module of the Qt GUI Toolkit. 10** This file is part of the tools module of the Qt GUI Toolkit.
11** 11**
@@ -38,17 +38,18 @@
38#ifndef QGLOBAL_H 38#ifndef QGLOBAL_H
39#define QGLOBAL_H 39#define QGLOBAL_H
40 40
41#define QT_VERSION_STR "3.1.2" 41#define QT_VERSION_STR "3.3.2"
42/* 42/*
43 QT_VERSION is (major << 16) + (minor << 8) + patch. 43 QT_VERSION is (major << 16) + (minor << 8) + patch.
44 */ 44 */
45#define QT_VERSION 0x030102 45#define QT_VERSION 0x030302
46 46
47/* 47/*
48 The operating system, must be one of: (Q_OS_x) 48 The operating system, must be one of: (Q_OS_x)
49 49
50 MACX- Mac OS X 50 MACX- Mac OS X
51 MAC9- Mac OS 9 51 MAC9- Mac OS 9
52 DARWIN - Darwin OS (Without Mac OS X)
52 MSDOS- MS-DOS and Windows 53 MSDOS- MS-DOS and Windows
53 OS2- OS/2 54 OS2- OS/2
54 OS2EMX- XFree86 on OS/2 (not PM) 55 OS2EMX- XFree86 on OS/2 (not PM)
@@ -78,7 +79,9 @@
78 UNIX- Any UNIX BSD/SYSV system 79 UNIX- Any UNIX BSD/SYSV system
79*/ 80*/
80 81
81#if defined(__APPLE__) && defined(__GNUC__) 82#if defined(__DARWIN_X11__)
83# define Q_OS_DARWIN
84#elif defined(__APPLE__) && defined(__GNUC__)
82# define Q_OS_MACX 85# define Q_OS_MACX
83#elif defined(__MACOSX__) 86#elif defined(__MACOSX__)
84# define Q_OS_MACX 87# define Q_OS_MACX
@@ -111,7 +114,7 @@
111# define Q_OS_RELIANT 114# define Q_OS_RELIANT
112#elif defined(__linux__) || defined(__linux) 115#elif defined(__linux__) || defined(__linux)
113# define Q_OS_LINUX 116# define Q_OS_LINUX
114#elif defined(__FreeBSD__) 117#elif defined(__FreeBSD__) || defined(__DragonFly__)
115# define Q_OS_FREEBSD 118# define Q_OS_FREEBSD
116# define Q_OS_BSD4 119# define Q_OS_BSD4
117#elif defined(__NetBSD__) 120#elif defined(__NetBSD__)
@@ -149,22 +152,20 @@
149#elif defined(__svr4__) && defined(i386) /* Open UNIX 8 + GCC */ 152#elif defined(__svr4__) && defined(i386) /* Open UNIX 8 + GCC */
150# define Q_OS_UNIXWARE 153# define Q_OS_UNIXWARE
151# define Q_OS_UNIXWARE7 154# define Q_OS_UNIXWARE7
155#elif defined(__MAKEDEPEND__)
152#else 156#else
153# error "Qt has not been ported to this OS - talk to qt-bugs@trolltech.com" 157# error "Qt has not been ported to this OS - talk to qt-bugs@trolltech.com"
154#endif 158#endif
155 159
160#if defined(Q_OS_WIN32) || defined(Q_OS_WIN64)
161# define Q_OS_WIN
162#endif
163
156#if defined(Q_OS_MAC9) || defined(Q_OS_MACX) 164#if defined(Q_OS_MAC9) || defined(Q_OS_MACX)
157/* This hack forces the generater to compile qmake not for maxosx native. It is 165# define Q_OS_MAC
158 * compiled for Linux and generates usual makefiles..
159 * Does anyone has a better solution for this ? (eilers)
160 */
161// # define Q_OS_MAC
162#define Q_OS_LINUX
163#warning "boeser Hack !! (se)"
164#undef Q_OS_MACX
165#endif 166#endif
166 167
167#if defined(Q_OS_MAC9) || defined(Q_OS_MSDOS) || defined(Q_OS_OS2) || defined(Q_OS_WIN32) || defined(Q_OS_WIN64) 168#if defined(Q_OS_MAC9) || defined(Q_OS_MSDOS) || defined(Q_OS_OS2) || defined(Q_OS_WIN)
168# undef Q_OS_UNIX 169# undef Q_OS_UNIX
169#elif !defined(Q_OS_UNIX) 170#elif !defined(Q_OS_UNIX)
170# define Q_OS_UNIX 171# define Q_OS_UNIX
@@ -177,7 +178,7 @@
177 SYM- Symantec C++ for both PC and Macintosh 178 SYM- Symantec C++ for both PC and Macintosh
178 MPW- MPW C++ 179 MPW- MPW C++
179 MWERKS- Metrowerks CodeWarrior 180 MWERKS- Metrowerks CodeWarrior
180 MSVC- Microsoft Visual C/C++ 181 MSVC- Microsoft Visual C/C++, Intel C++ for Windows
181 BOR- Borland/Turbo C++ 182 BOR- Borland/Turbo C++
182 WAT- Watcom C++ 183 WAT- Watcom C++
183 GNU- GNU C++ 184 GNU- GNU C++
@@ -192,7 +193,7 @@
192 USLC- SCO OUDK, UDK, and UnixWare 2.X C++ 193 USLC- SCO OUDK, UDK, and UnixWare 2.X C++
193 CDS- Reliant C++ 194 CDS- Reliant C++
194 KAI- KAI C++ 195 KAI- KAI C++
195 INTEL- Intel C++ 196 INTEL- Intel C++ for Linux, Intel C++ for Windows
196 HIGHC- MetaWare High C/C++ 197 HIGHC- MetaWare High C/C++
197 PGI- Portland Group C++ 198 PGI- Portland Group C++
198 GHS- Green Hills Optimizing C++ Compilers 199 GHS- Green Hills Optimizing C++ Compilers
@@ -222,7 +223,6 @@
222# define Q_CC_MWERKS 223# define Q_CC_MWERKS
223/* "explicit" recognized since 4.0d1 */ 224/* "explicit" recognized since 4.0d1 */
224# define QMAC_PASCAL pascal 225# define QMAC_PASCAL pascal
225# define Q_NO_USING_KEYWORD /* ### check "using" status */
226 226
227#elif defined(_MSC_VER) 227#elif defined(_MSC_VER)
228# define Q_CC_MSVC 228# define Q_CC_MSVC
@@ -232,11 +232,19 @@
232/* Visual C++.Net issues for _MSC_VER >= 1300 */ 232/* Visual C++.Net issues for _MSC_VER >= 1300 */
233# if _MSC_VER >= 1300 233# if _MSC_VER >= 1300
234# define Q_CC_MSVC_NET 234# define Q_CC_MSVC_NET
235# if _MSC_VER < 1310 235# if _MSC_VER < 1310 || defined(Q_OS_WIN64)
236# define Q_TYPENAME 236# define Q_TYPENAME
237# endif 237# endif
238# endif 238# endif
239/* Intel C++ disguising as Visual C++: the `using' keyword avoids warnings */
240# if defined(__INTEL_COMPILER)
241# define Q_CC_INTEL
242# if !defined(__EXCEPTIONS)
243# define Q_NO_EXCEPTIONS
244# endif
245# else
239# define Q_NO_USING_KEYWORD /* ### check "using" status */ 246# define Q_NO_USING_KEYWORD /* ### check "using" status */
247# endif
240 248
241#elif defined(__BORLANDC__) || defined(__TURBOC__) 249#elif defined(__BORLANDC__) || defined(__TURBOC__)
242# define Q_CC_BOR 250# define Q_CC_BOR
@@ -284,8 +292,17 @@
284# if defined(Q_OS_HPUX) && __GNUC__ == 3 && __GNUC_MINOR__ >= 1 292# if defined(Q_OS_HPUX) && __GNUC__ == 3 && __GNUC_MINOR__ >= 1
285# define Q_WRONG_SB_CTYPE_MACROS 293# define Q_WRONG_SB_CTYPE_MACROS
286# endif 294# endif
295
296/* ARM gcc pads structs to 32 bits, even when they contain a single
297 char, or short. We tell gcc to pack QChars to 16 bits, to avoid
298 QString bloat. However, gcc 3.4 doesn't allow us to create references to
299 members of a packed struct. (Pointers are OK, because then you
300 supposedly know what you are doing.) */
287# if (defined(__arm__) || defined(__ARMEL__)) && !defined(QT_MOC_CPP) 301# if (defined(__arm__) || defined(__ARMEL__)) && !defined(QT_MOC_CPP)
288# define Q_PACKED __attribute__ ((packed)) 302# define Q_PACKED __attribute__ ((packed))
303# if __GNUC__ == 3 && __GNUC_MINOR__ >= 4
304# define Q_NO_PACKED_REFERENCE
305# endif
289# endif 306# endif
290# if !defined(__EXCEPTIONS) 307# if !defined(__EXCEPTIONS)
291# define Q_NO_EXCEPTIONS 308# define Q_NO_EXCEPTIONS
@@ -305,6 +322,8 @@
305 Visual Age C++ 4.0 ... 322 Visual Age C++ 4.0 ...
306 ... ... 323 ... ...
307 Visual Age C++ 5.0 C Compiler 5.0 324 Visual Age C++ 5.0 C Compiler 5.0
325 ... ...
326 Visual Age C++ 6.0 C Compiler 6.0
308 327
309 Now: 328 Now:
310 __xlC__ is the version of the C compiler in hexadecimal notation 329 __xlC__ is the version of the C compiler in hexadecimal notation
@@ -329,7 +348,7 @@
329 Compaq C++ V6.3-002. 348 Compaq C++ V6.3-002.
330 This compiler is different enough from other EDG compilers to handle 349 This compiler is different enough from other EDG compilers to handle
331 it separately anyway. */ 350 it separately anyway. */
332#elif defined(__DECCXX) 351#elif defined(__DECCXX) || defined(__DECC)
333# define Q_CC_DEC 352# define Q_CC_DEC
334/* Compaq C++ V6 compilers are EDG-based but I'm not sure about older 353/* Compaq C++ V6 compilers are EDG-based but I'm not sure about older
335 DEC C++ V5 compilers. */ 354 DEC C++ V5 compilers. */
@@ -370,19 +389,23 @@
370# define Q_NO_BOOL_TYPE 389# define Q_NO_BOOL_TYPE
371# endif 390# endif
372 391
373/* The Portland Group compiler is based on EDG and does define __EDG__ */ 392/* The Comeau compiler is based on EDG and does define __EDG__ */
374# if defined(__COMO__) 393# if defined(__COMO__)
375# define Q_CC_COMEAU 394# define Q_CC_COMEAU
376# define Q_C_CALLBACKS 395# define Q_C_CALLBACKS
377 396
378/* Using the `using' keyword avoids KAI C++ warnings */ 397/* The `using' keyword was introduced to avoid KAI C++ warnings
398 but it's now causing KAI C++ errors instead. The standard is
399 unclear about the use of this keyword, and in practice every
400 compiler is using its own set of rules. Forget it. */
379# elif defined(__KCC) 401# elif defined(__KCC)
380# define Q_CC_KAI 402# define Q_CC_KAI
381# if !defined(_EXCEPTIONS) 403# if !defined(_EXCEPTIONS)
382# define Q_NO_EXCEPTIONS 404# define Q_NO_EXCEPTIONS
383# endif 405# endif
406# define Q_NO_USING_KEYWORD
384 407
385/* Using the `using' keyword avoids Intel C++ warnings */ 408/* Using the `using' keyword avoids Intel C++ for Linux warnings */
386# elif defined(__INTEL_COMPILER) 409# elif defined(__INTEL_COMPILER)
387# define Q_CC_INTEL 410# define Q_CC_INTEL
388# if !defined(__EXCEPTIONS) 411# if !defined(__EXCEPTIONS)
@@ -430,7 +453,6 @@
430# if defined(_MIPS_SIM) && (_MIPS_SIM == _ABIO32) /* o32 ABI */ 453# if defined(_MIPS_SIM) && (_MIPS_SIM == _ABIO32) /* o32 ABI */
431# define Q_TYPENAME 454# define Q_TYPENAME
432# define Q_BROKEN_TEMPLATE_SPECIALIZATION 455# define Q_BROKEN_TEMPLATE_SPECIALIZATION
433# define Q_STRICT_INLINING_RULES
434# define Q_NO_EXPLICIT_KEYWORD 456# define Q_NO_EXPLICIT_KEYWORD
435# define Q_INLINE_TEMPLATES inline 457# define Q_INLINE_TEMPLATES inline
436# elif defined(_COMPILER_VERSION) && (_COMPILER_VERSION < 730) /* 7.2 */ 458# elif defined(_COMPILER_VERSION) && (_COMPILER_VERSION < 730) /* 7.2 */
@@ -438,6 +460,9 @@
438# define Q_BROKEN_TEMPLATE_SPECIALIZATION 460# define Q_BROKEN_TEMPLATE_SPECIALIZATION
439# endif 461# endif
440# define Q_NO_USING_KEYWORD /* ### check "using" status */ 462# define Q_NO_USING_KEYWORD /* ### check "using" status */
463# if defined(_COMPILER_VERSION) && (_COMPILER_VERSION >= 740)
464# pragma set woff 3624,3625, 3649 /* turn off some harmless warnings */
465# endif
441# endif 466# endif
442 467
443/* The older UnixWare 2.X compiler? */ 468/* The older UnixWare 2.X compiler? */
@@ -453,7 +478,7 @@
453#elif defined(__HIGHC__) 478#elif defined(__HIGHC__)
454# define Q_CC_HIGHC 479# define Q_CC_HIGHC
455 480
456#elif defined(__SUNPRO_CC) 481#elif defined(__SUNPRO_CC) || defined(__SUNPRO_C)
457# define Q_CC_SUN 482# define Q_CC_SUN
458/* 5.0 compiler or better 483/* 5.0 compiler or better
459 'bool' is enabled by default but can be disabled using -features=nobool 484 'bool' is enabled by default but can be disabled using -features=nobool
@@ -605,6 +630,13 @@ const bool true = TRUE;
605# endif 630# endif
606#endif 631#endif
607 632
633//
634// Proper for-scoping
635// ### turn on in 4.0
636
637#if 0 && defined(Q_CC_MSVC) && !defined(Q_CC_MSVC_NET)
638# define for if(0){}else for
639#endif
608 640
609// 641//
610// Use the "explicit" keyword on platforms that support it. 642// Use the "explicit" keyword on platforms that support it.
@@ -665,26 +697,31 @@ typedef unsigned short Q_UINT16; // 16 bit unsigned
665 typedef int Q_INT32;// 32 bit signed 697 typedef int Q_INT32;// 32 bit signed
666 typedef unsigned int Q_UINT32;// 32 bit unsigned 698 typedef unsigned int Q_UINT32;// 32 bit unsigned
667#if defined(Q_OS_WIN64) 699#if defined(Q_OS_WIN64)
668// LLP64 64-bit model on Windows
669 typedef __int64 Q_LONG; // word up to 64 bit signed 700 typedef __int64 Q_LONG; // word up to 64 bit signed
670 typedef unsigned __int64 Q_ULONG;// word up to 64 bit unsigned 701 typedef unsigned __int64 Q_ULONG;// word up to 64 bit unsigned
671#else 702#else
672// LP64 64-bit model on Linux 703 typedef long Q_LONG; // word up to 64 bit signed
673 typedef long Q_LONG; 704 typedef unsigned long Q_ULONG;// word up to 64 bit unsigned
674 typedef unsigned long Q_ULONG; 705#endif
675#endif 706#if defined(Q_OS_WIN) && !defined(Q_CC_GNU)
676 707 # define Q_INT64_C(c) c ## i64// signed 64 bit constant
677#if !defined(QT_CLEAN_NAMESPACE) 708 # define Q_UINT64_C(c) c ## ui64// unsigned 64 bit constant
678// mininum size of 64 bits is not guaranteed 709 typedef __int64 Q_INT64;// 64 bit signed
679 #define Q_INT64 Q_LONG 710 typedef unsigned __int64 Q_UINT64;// 64 bit unsigned
680 #define Q_UINT64 Q_ULONG 711#else
712 # define Q_INT64_C(c) c ## LL // signed 64 bit constant
713 # define Q_UINT64_C(c) c ## ULL// unsigned 64 bit constant
714 typedef long long Q_INT64;// 64 bit signed
715 typedef unsigned long long Q_UINT64;// 64 bit unsigned
681#endif 716#endif
717 typedef Q_INT64 Q_LLONG;// signed long long
718 typedef Q_UINT64 Q_ULLONG;// unsigned long long
682 719
683#if defined(Q_OS_MACX) && !defined(QT_LARGEFILE_SUPPORT) 720#if defined(Q_OS_MACX) && !defined(QT_LARGEFILE_SUPPORT)
684# define QT_LARGEFILE_SUPPORT 64 721# define QT_LARGEFILE_SUPPORT 64
685#endif 722#endif
686#if defined(QT_LARGEFILE_SUPPORT) 723#if defined(QT_LARGEFILE_SUPPORT)
687 typedef unsigned long long QtOffset; 724 typedef Q_ULLONG QtOffset;
688#else 725#else
689 typedef Q_ULONG QtOffset; 726 typedef Q_ULONG QtOffset;
690#endif 727#endif
@@ -708,17 +745,17 @@ class QDataStream;
708 745
709#if !defined(QT_MOC) 746#if !defined(QT_MOC)
710#if defined(QCONFIG_LOCAL) 747#if defined(QCONFIG_LOCAL)
711#include <qconfig-local.h> 748#include "qconfig-local.h"
712#elif defined(QCONFIG_MINIMAL) 749#elif defined(QCONFIG_MINIMAL)
713#include <qconfig-minimal.h> 750#include "qconfig-minimal.h"
714#elif defined(QCONFIG_SMALL) 751#elif defined(QCONFIG_SMALL)
715#include <qconfig-small.h> 752#include "qconfig-small.h"
716#elif defined(QCONFIG_MEDIUM) 753#elif defined(QCONFIG_MEDIUM)
717#include <qconfig-medium.h> 754#include "qconfig-medium.h"
718#elif defined(QCONFIG_LARGE) 755#elif defined(QCONFIG_LARGE)
719#include <qconfig-large.h> 756#include "qconfig-large.h"
720#else // everything... 757#else // everything...
721#include <qconfig.h> 758#include "qconfig.h"
722#endif 759#endif
723#endif 760#endif
724 761
@@ -729,6 +766,9 @@ class QDataStream;
729 766
730// prune to local config 767// prune to local config
731#include "qmodules.h" 768#include "qmodules.h"
769#ifndef QT_MODULE_DIALOGS
770# define QT_NO_DIALOG
771#endif
732#ifndef QT_MODULE_ICONVIEW 772#ifndef QT_MODULE_ICONVIEW
733# define QT_NO_ICONVIEW 773# define QT_NO_ICONVIEW
734#endif 774#endif
@@ -781,8 +821,8 @@ class QDataStream;
781#endif 821#endif
782 822
783#ifndef QT_H 823#ifndef QT_H
784#include <qfeatures.h> 824#include "qfeatures.h"
785#endif // QT_H 825#endif /* QT_H */
786 826
787 827
788// 828//
@@ -790,7 +830,7 @@ class QDataStream;
790// or QT_SHARED is defined (Kylix only) 830// or QT_SHARED is defined (Kylix only)
791// 831//
792 832
793#if defined(Q_OS_WIN32) || defined(Q_OS_WIN64) 833#if defined(Q_OS_WIN)
794# if defined(QT_NODLL) 834# if defined(QT_NODLL)
795# undef QT_MAKEDLL 835# undef QT_MAKEDLL
796# undef QT_DLL 836# undef QT_DLL
@@ -850,6 +890,7 @@ extern Q_EXPORT bool qt_winunicode;
850 890
851Q_EXPORT const char *qVersion(); 891Q_EXPORT const char *qVersion();
852Q_EXPORT bool qSysInfo( int *wordSize, bool *bigEndian ); 892Q_EXPORT bool qSysInfo( int *wordSize, bool *bigEndian );
893Q_EXPORT bool qSharedBuild();
853#if defined(Q_OS_MAC) 894#if defined(Q_OS_MAC)
854int qMacVersion(); 895int qMacVersion();
855#elif defined(Q_WS_WIN) 896#elif defined(Q_WS_WIN)
@@ -883,7 +924,6 @@ Q_EXPORT int qWinVersion();
883// 924//
884// Use to avoid "unused parameter" warnings 925// Use to avoid "unused parameter" warnings
885// 926//
886
887#define Q_UNUSED(x) (void)x; 927#define Q_UNUSED(x) (void)x;
888 928
889// 929//
@@ -1015,15 +1055,19 @@ Q_EXPORT const char *qInstallPathLibs();
1015Q_EXPORT const char *qInstallPathBins(); 1055Q_EXPORT const char *qInstallPathBins();
1016Q_EXPORT const char *qInstallPathPlugins(); 1056Q_EXPORT const char *qInstallPathPlugins();
1017Q_EXPORT const char *qInstallPathData(); 1057Q_EXPORT const char *qInstallPathData();
1058Q_EXPORT const char *qInstallPathTranslations();
1059Q_EXPORT const char *qInstallPathSysconf();
1018 1060
1019#endif // __cplusplus 1061#endif /* __cplusplus */
1020 1062
1021// compilers which follow outdated template instantiation rules 1063/*
1022// require a class to have a comparison operator to exist when 1064 compilers which follow outdated template instantiation rules
1023// a QValueList of this type is instantiated. It's not actually 1065 require a class to have a comparison operator to exist when
1024// used in the list, though. Hence the dummy implementation. 1066 a QValueList of this type is instantiated. It's not actually
1025// Just in case other code relies on it we better trigger a warning 1067 used in the list, though. Hence the dummy implementation.
1026// mandating a real implementation. 1068 Just in case other code relies on it we better trigger a warning
1069 mandating a real implementation.
1070*/
1027#ifdef Q_FULL_TEMPLATE_INSTANTIATION 1071#ifdef Q_FULL_TEMPLATE_INSTANTIATION
1028# define Q_DUMMY_COMPARISON_OPERATOR(C) \ 1072# define Q_DUMMY_COMPARISON_OPERATOR(C) \
1029 bool operator==( const C& ) const { \ 1073 bool operator==( const C& ) const { \
@@ -1034,13 +1078,13 @@ Q_EXPORT const char *qInstallPathData();
1034# define Q_DUMMY_COMPARISON_OPERATOR(C) 1078# define Q_DUMMY_COMPARISON_OPERATOR(C)
1035#endif 1079#endif
1036 1080
1037#endif // QGLOBAL_H 1081#endif /* QGLOBAL_H */
1038 1082
1039// 1083/*
1040// Avoid some particularly useless warnings from some stupid compilers. 1084 Avoid some particularly useless warnings from some stupid compilers.
1041// To get ALL C++ compiler warnings, define QT_CC_WARNINGS or comment out 1085 To get ALL C++ compiler warnings, define QT_CC_WARNINGS or comment out
1042// the line "#define QT_NO_WARNINGS" 1086 the line "#define QT_NO_WARNINGS"
1043// 1087*/
1044 1088
1045#if !defined(QT_CC_WARNINGS) 1089#if !defined(QT_CC_WARNINGS)
1046# define QT_NO_WARNINGS 1090# define QT_NO_WARNINGS
@@ -1066,7 +1110,6 @@ Q_EXPORT const char *qInstallPathData();
1066# pragma warn -ccc 1110# pragma warn -ccc
1067# pragma warn -rch 1111# pragma warn -rch
1068# pragma warn -sig 1112# pragma warn -sig
1069# elif defined(Q_CC_MWERKS)
1070# pragma warn_possunwant off
1071# endif 1113# endif
1072#endif 1114#endif
1115
diff --git a/qmake/include/qlocale.h b/qmake/include/qlocale.h
new file mode 100644
index 0000000..20ad03b
--- a/dev/null
+++ b/qmake/include/qlocale.h
@@ -0,0 +1,491 @@
1/****************************************************************************
2**
3**
4** Declaration of the QLocale class
5**
6** Copyright (C) 1992-2003 Trolltech AS. All rights reserved.
7**
8** This file is part of the tools module of the Qt GUI Toolkit.
9**
10** This file may be distributed under the terms of the Q Public License
11** as defined by Trolltech AS of Norway and appearing in the file
12** LICENSE.QPL included in the packaging of this file.
13**
14** This file may be distributed and/or modified under the terms of the
15** GNU General Public License version 2 as published by the Free Software
16** Foundation and appearing in the file LICENSE.GPL included in the
17** packaging of this file.
18**
19** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
20** licenses may use this file in accordance with the Qt Commercial License
21** Agreement provided with the Software.
22**
23** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
24** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
25**
26** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
27** information about Qt Commercial License Agreements.
28** See http://www.trolltech.com/qpl/ for QPL licensing information.
29** See http://www.trolltech.com/gpl/ for GPL licensing information.
30**
31** Contact info@trolltech.com if any conditions of this licensing are
32** not clear to you.
33**
34**********************************************************************/
35
36#ifndef QLOCALE_H
37#define QLOCALE_H
38
39#include "qstring.h"
40
41struct QLocalePrivate;
42
43class Q_EXPORT QLocale
44{
45 friend class QString;
46
47public:
48 enum Language {
49 C = 1,
50 Abkhazian = 2,
51 Afan = 3,
52 Afar = 4,
53 Afrikaans = 5,
54 Albanian = 6,
55 Amharic = 7,
56 Arabic = 8,
57 Armenian = 9,
58 Assamese = 10,
59 Aymara = 11,
60 Azerbaijani = 12,
61 Bashkir = 13,
62 Basque = 14,
63 Bengali = 15,
64 Bhutani = 16,
65 Bihari = 17,
66 Bislama = 18,
67 Breton = 19,
68 Bulgarian = 20,
69 Burmese = 21,
70 Byelorussian = 22,
71 Cambodian = 23,
72 Catalan = 24,
73 Chinese = 25,
74 Corsican = 26,
75 Croatian = 27,
76 Czech = 28,
77 Danish = 29,
78 Dutch = 30,
79 English = 31,
80 Esperanto = 32,
81 Estonian = 33,
82 Faroese = 34,
83 FijiLanguage = 35,
84 Finnish = 36,
85 French = 37,
86 Frisian = 38,
87 Gaelic = 39,
88 Galician = 40,
89 Georgian = 41,
90 German = 42,
91 Greek = 43,
92 Greenlandic = 44,
93 Guarani = 45,
94 Gujarati = 46,
95 Hausa = 47,
96 Hebrew = 48,
97 Hindi = 49,
98 Hungarian = 50,
99 Icelandic = 51,
100 Indonesian = 52,
101 Interlingua = 53,
102 Interlingue = 54,
103 Inuktitut = 55,
104 Inupiak = 56,
105 Irish = 57,
106 Italian = 58,
107 Japanese = 59,
108 Javanese = 60,
109 Kannada = 61,
110 Kashmiri = 62,
111 Kazakh = 63,
112 Kinyarwanda = 64,
113 Kirghiz = 65,
114 Korean = 66,
115 Kurdish = 67,
116 Kurundi = 68,
117 Laothian = 69,
118 Latin = 70,
119 Latvian = 71,
120 Lingala = 72,
121 Lithuanian = 73,
122 Macedonian = 74,
123 Malagasy = 75,
124 Malay = 76,
125 Malayalam = 77,
126 Maltese = 78,
127 Maori = 79,
128 Marathi = 80,
129 Moldavian = 81,
130 Mongolian = 82,
131 NauruLanguage = 83,
132 Nepali = 84,
133 Norwegian = 85,
134 Occitan = 86,
135 Oriya = 87,
136 Pashto = 88,
137 Persian = 89,
138 Polish = 90,
139 Portuguese = 91,
140 Punjabi = 92,
141 Quechua = 93,
142 RhaetoRomance = 94,
143 Romanian = 95,
144 Russian = 96,
145 Samoan = 97,
146 Sangho = 98,
147 Sanskrit = 99,
148 Serbian = 100,
149 SerboCroatian = 101,
150 Sesotho = 102,
151 Setswana = 103,
152 Shona = 104,
153 Sindhi = 105,
154 Singhalese = 106,
155 Siswati = 107,
156 Slovak = 108,
157 Slovenian = 109,
158 Somali = 110,
159 Spanish = 111,
160 Sundanese = 112,
161 Swahili = 113,
162 Swedish = 114,
163 Tagalog = 115,
164 Tajik = 116,
165 Tamil = 117,
166 Tatar = 118,
167 Telugu = 119,
168 Thai = 120,
169 Tibetan = 121,
170 Tigrinya = 122,
171 TongaLanguage = 123,
172 Tsonga = 124,
173 Turkish = 125,
174 Turkmen = 126,
175 Twi = 127,
176 Uigur = 128,
177 Ukrainian = 129,
178 Urdu = 130,
179 Uzbek = 131,
180 Vietnamese = 132,
181 Volapuk = 133,
182 Welsh = 134,
183 Wolof = 135,
184 Xhosa = 136,
185 Yiddish = 137,
186 Yoruba = 138,
187 Zhuang = 139,
188 Zulu = 140,
189 LastLanguage = Zulu
190 };
191
192 enum Country {
193 AnyCountry = 0,
194 Afghanistan = 1,
195 Albania = 2,
196 Algeria = 3,
197 AmericanSamoa = 4,
198 Andorra = 5,
199 Angola = 6,
200 Anguilla = 7,
201 Antarctica = 8,
202 AntiguaAndBarbuda = 9,
203 Argentina = 10,
204 Armenia = 11,
205 Aruba = 12,
206 Australia = 13,
207 Austria = 14,
208 Azerbaijan = 15,
209 Bahamas = 16,
210 Bahrain = 17,
211 Bangladesh = 18,
212 Barbados = 19,
213 Belarus = 20,
214 Belgium = 21,
215 Belize = 22,
216 Benin = 23,
217 Bermuda = 24,
218 Bhutan = 25,
219 Bolivia = 26,
220 BosniaAndHerzegowina = 27,
221 Botswana = 28,
222 BouvetIsland = 29,
223 Brazil = 30,
224 BritishIndianOceanTerritory = 31,
225 BruneiDarussalam = 32,
226 Bulgaria = 33,
227 BurkinaFaso = 34,
228 Burundi = 35,
229 Cambodia = 36,
230 Cameroon = 37,
231 Canada = 38,
232 CapeVerde = 39,
233 CaymanIslands = 40,
234 CentralAfricanRepublic = 41,
235 Chad = 42,
236 Chile = 43,
237 China = 44,
238 ChristmasIsland = 45,
239 CocosIslands = 46,
240 Colombia = 47,
241 Comoros = 48,
242 DemocraticRepublicOfCongo = 49,
243 PeoplesRepublicOfCongo = 50,
244 CookIslands = 51,
245 CostaRica = 52,
246 IvoryCoast = 53,
247 Croatia = 54,
248 Cuba = 55,
249 Cyprus = 56,
250 CzechRepublic = 57,
251 Denmark = 58,
252 Djibouti = 59,
253 Dominica = 60,
254 DominicanRepublic = 61,
255 EastTimor = 62,
256 Ecuador = 63,
257 Egypt = 64,
258 ElSalvador = 65,
259 EquatorialGuinea = 66,
260 Eritrea = 67,
261 Estonia = 68,
262 Ethiopia = 69,
263 FalklandIslands = 70,
264 FaroeIslands = 71,
265 FijiCountry = 72,
266 Finland = 73,
267 France = 74,
268 MetropolitanFrance = 75,
269 FrenchGuiana = 76,
270 FrenchPolynesia = 77,
271 FrenchSouthernTerritories = 78,
272 Gabon = 79,
273 Gambia = 80,
274 Georgia = 81,
275 Germany = 82,
276 Ghana = 83,
277 Gibraltar = 84,
278 Greece = 85,
279 Greenland = 86,
280 Grenada = 87,
281 Guadeloupe = 88,
282 Guam = 89,
283 Guatemala = 90,
284 Guinea = 91,
285 GuineaBissau = 92,
286 Guyana = 93,
287 Haiti = 94,
288 HeardAndMcDonaldIslands = 95,
289 Honduras = 96,
290 HongKong = 97,
291 Hungary = 98,
292 Iceland = 99,
293 India = 100,
294 Indonesia = 101,
295 Iran = 102,
296 Iraq = 103,
297 Ireland = 104,
298 Israel = 105,
299 Italy = 106,
300 Jamaica = 107,
301 Japan = 108,
302 Jordan = 109,
303 Kazakhstan = 110,
304 Kenya = 111,
305 Kiribati = 112,
306 DemocraticRepublicOfKorea = 113,
307 RepublicOfKorea = 114,
308 Kuwait = 115,
309 Kyrgyzstan = 116,
310 Lao = 117,
311 Latvia = 118,
312 Lebanon = 119,
313 Lesotho = 120,
314 Liberia = 121,
315 LibyanArabJamahiriya = 122,
316 Liechtenstein = 123,
317 Lithuania = 124,
318 Luxembourg = 125,
319 Macau = 126,
320 Macedonia = 127,
321 Madagascar = 128,
322 Malawi = 129,
323 Malaysia = 130,
324 Maldives = 131,
325 Mali = 132,
326 Malta = 133,
327 MarshallIslands = 134,
328 Martinique = 135,
329 Mauritania = 136,
330 Mauritius = 137,
331 Mayotte = 138,
332 Mexico = 139,
333 Micronesia = 140,
334 Moldova = 141,
335 Monaco = 142,
336 Mongolia = 143,
337 Montserrat = 144,
338 Morocco = 145,
339 Mozambique = 146,
340 Myanmar = 147,
341 Namibia = 148,
342 NauruCountry = 149,
343 Nepal = 150,
344 Netherlands = 151,
345 NetherlandsAntilles = 152,
346 NewCaledonia = 153,
347 NewZealand = 154,
348 Nicaragua = 155,
349 Niger = 156,
350 Nigeria = 157,
351 Niue = 158,
352 NorfolkIsland = 159,
353 NorthernMarianaIslands = 160,
354 Norway = 161,
355 Oman = 162,
356 Pakistan = 163,
357 Palau = 164,
358 PalestinianTerritory = 165,
359 Panama = 166,
360 PapuaNewGuinea = 167,
361 Paraguay = 168,
362 Peru = 169,
363 Philippines = 170,
364 Pitcairn = 171,
365 Poland = 172,
366 Portugal = 173,
367 PuertoRico = 174,
368 Qatar = 175,
369 Reunion = 176,
370 Romania = 177,
371 RussianFederation = 178,
372 Rwanda = 179,
373 SaintKittsAndNevis = 180,
374 StLucia = 181,
375 StVincentAndTheGrenadines = 182,
376 Samoa = 183,
377 SanMarino = 184,
378 SaoTomeAndPrincipe = 185,
379 SaudiArabia = 186,
380 Senegal = 187,
381 Seychelles = 188,
382 SierraLeone = 189,
383 Singapore = 190,
384 Slovakia = 191,
385 Slovenia = 192,
386 SolomonIslands = 193,
387 Somalia = 194,
388 SouthAfrica = 195,
389 SouthGeorgiaAndTheSouthSandwichIslands = 196,
390 Spain = 197,
391 SriLanka = 198,
392 StHelena = 199,
393 StPierreAndMiquelon = 200,
394 Sudan = 201,
395 Suriname = 202,
396 SvalbardAndJanMayenIslands = 203,
397 Swaziland = 204,
398 Sweden = 205,
399 Switzerland = 206,
400 SyrianArabRepublic = 207,
401 Taiwan = 208,
402 Tajikistan = 209,
403 Tanzania = 210,
404 Thailand = 211,
405 Togo = 212,
406 Tokelau = 213,
407 TongaCountry = 214,
408 TrinidadAndTobago = 215,
409 Tunisia = 216,
410 Turkey = 217,
411 Turkmenistan = 218,
412 TurksAndCaicosIslands = 219,
413 Tuvalu = 220,
414 Uganda = 221,
415 Ukraine = 222,
416 UnitedArabEmirates = 223,
417 UnitedKingdom = 224,
418 UnitedStates = 225,
419 UnitedStatesMinorOutlyingIslands = 226,
420 Uruguay = 227,
421 Uzbekistan = 228,
422 Vanuatu = 229,
423 VaticanCityState = 230,
424 Venezuela = 231,
425 VietNam = 232,
426 BritishVirginIslands = 233,
427 USVirginIslands = 234,
428 WallisAndFutunaIslands = 235,
429 WesternSahara = 236,
430 Yemen = 237,
431 Yugoslavia = 238,
432 Zambia = 239,
433 Zimbabwe = 240,
434 LastCountry = Zimbabwe
435 };
436
437 QLocale();
438 QLocale(const QString &name);
439 QLocale(Language language, Country country = AnyCountry);
440 QLocale(const QLocale &other);
441
442 QLocale &operator=(const QLocale &other);
443
444 Language language() const;
445 Country country() const;
446 QString name() const;
447
448 short toShort(const QString &s, bool *ok = 0) const;
449 ushort toUShort(const QString &s, bool *ok = 0) const;
450 int toInt(const QString &s, bool *ok = 0) const;
451 uint toUInt(const QString &s, bool *ok = 0) const;
452 Q_LONG toLong(const QString &s, bool *ok = 0) const;
453 Q_ULONG toULong(const QString &s, bool *ok = 0) const;
454 Q_LLONG toLongLong(const QString &s, bool *ok = 0) const;
455 Q_ULLONG toULongLong(const QString &s, bool *ok = 0) const;
456 float toFloat(const QString &s, bool *ok = 0) const;
457 double toDouble(const QString &s, bool *ok = 0) const;
458
459 QString toString(short i) const
460 { return toString((Q_LLONG)i); }
461 QString toString(ushort i) const
462 { return toString((Q_ULLONG)i); }
463 QString toString(int i) const
464 { return toString((Q_LLONG)i); }
465 QString toString(uint i) const
466 { return toString((Q_ULLONG)i); }
467#if !defined(Q_OS_WIN64)
468 QString toString(Q_LONG i) const
469 { return toString((Q_LLONG)i); }
470 QString toString(Q_ULONG i) const
471 { return toString((Q_ULLONG)i); }
472#endif
473 QString toString(Q_LLONG i) const;
474 QString toString(Q_ULLONG i) const;
475 QString toString(float i, char f = 'g', int prec = 6) const
476 { return toString((double) i, f, prec); }
477 QString toString(double i, char f = 'g', int prec = 6) const;
478
479 static QString languageToString(Language language);
480 static QString countryToString(Country country);
481 static void setDefault(const QLocale &locale);
482
483 static QLocale c() { return QLocale(C); }
484 static QLocale system();
485
486private:
487 const QLocalePrivate *d;
488 static const QLocalePrivate *default_d;
489};
490
491#endif
diff --git a/qmake/include/qsettings.h b/qmake/include/qsettings.h
new file mode 100644
index 0000000..72f04eb
--- a/dev/null
+++ b/qmake/include/qsettings.h
@@ -0,0 +1,156 @@
1/****************************************************************************
2**
3**
4** Definition of QSettings class
5**
6** Created : 000626
7**
8** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
9**
10** This file is part of the tools module of the Qt GUI Toolkit.
11**
12** This file may be distributed under the terms of the Q Public License
13** as defined by Trolltech AS of Norway and appearing in the file
14** LICENSE.QPL included in the packaging of this file.
15**
16** This file may be distributed and/or modified under the terms of the
17** GNU General Public License version 2 as published by the Free Software
18** Foundation and appearing in the file LICENSE.GPL included in the
19** packaging of this file.
20**
21** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
22** licenses may use this file in accordance with the Qt Commercial License
23** Agreement provided with the Software.
24**
25** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
26** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
27**
28** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
29** information about Qt Commercial License Agreements.
30** See http://www.trolltech.com/qpl/ for QPL licensing information.
31** See http://www.trolltech.com/gpl/ for GPL licensing information.
32**
33** Contact info@trolltech.com if any conditions of this licensing are
34** not clear to you.
35**
36**********************************************************************/
37
38#ifndef QSETTINGS_H
39#define QSETTINGS_H
40
41#ifndef QT_H
42#include "qdatetime.h"
43#include "qstringlist.h"
44#endif // QT_H
45
46#ifndef QT_NO_SETTINGS
47
48class QSettingsPrivate;
49
50
51class Q_EXPORT QSettings
52{
53public:
54 enum Format {
55 Native = 0,
56 Ini
57 };
58 enum System {
59 Unix = 0,
60 Windows,
61 Mac
62 };
63 enum Scope {
64 User,
65 Global
66 };
67
68 QSettings();
69 QSettings( Format format );
70
71 ~QSettings();
72
73#if !defined(Q_NO_BOOL_TYPE)
74 boolwriteEntry( const QString &, bool );
75#endif
76 boolwriteEntry( const QString &, double );
77 boolwriteEntry( const QString &, int );
78 boolwriteEntry( const QString &, const char * );
79 boolwriteEntry( const QString &, const QString & );
80 boolwriteEntry( const QString &, const QStringList & );
81 boolwriteEntry( const QString &, const QStringList &, const QChar& sep );
82
83 QStringList entryList(const QString &) const;
84 QStringList subkeyList(const QString &) const;
85
86 //### remove non const versions in 4.0
87 QStringList readListEntry( const QString &, bool * = 0 );
88 QStringList readListEntry( const QString &, const QChar& sep, bool * = 0 );
89 QStringreadEntry( const QString &, const QString &def = QString::null, bool * = 0 );
90 int readNumEntry( const QString &, int def = 0, bool * = 0 );
91 doublereadDoubleEntry( const QString &, double def = 0, bool * = 0 );
92 boolreadBoolEntry( const QString &, bool def = FALSE, bool * = 0 );
93
94 //### make those non-inlined in 4.0
95 QStringList readListEntry( const QString &key, bool *ok = 0 ) const
96 {
97 QSettings *that = (QSettings*)this;
98 return that->readListEntry( key, ok );
99 }
100 QStringList readListEntry( const QString &key, const QChar& sep, bool *ok = 0 ) const
101 {
102 QSettings *that = (QSettings*)this;
103 return that->readListEntry( key, sep, ok );
104 }
105 QStringreadEntry( const QString &key, const QString &def = QString::null,
106 bool *ok = 0 ) const
107 {
108 QSettings *that = (QSettings*)this;
109 return that->readEntry( key, def, ok );
110 }
111 int readNumEntry( const QString &key, int def = 0, bool *ok = 0 ) const
112 {
113 QSettings *that = (QSettings*)this;
114 return that->readNumEntry( key, def, ok );
115 }
116
117 doublereadDoubleEntry( const QString &key, double def = 0, bool *ok = 0 ) const
118 {
119 QSettings *that = (QSettings*)this;
120 return that->readDoubleEntry( key, def, ok );
121 }
122 boolreadBoolEntry( const QString &key, bool def = FALSE, bool *ok = 0 ) const
123 {
124 QSettings *that = (QSettings*)this;
125 return that->readBoolEntry( key, def, ok );
126 }
127
128 boolremoveEntry( const QString & );
129
130 void insertSearchPath( System, const QString & );
131 void removeSearchPath( System, const QString & );
132
133 void setPath( const QString &domain, const QString &product, Scope = Global );
134
135 void beginGroup( const QString &group );
136 void endGroup();
137 void resetGroup();
138 QString group() const;
139
140 bool sync();
141
142private:
143 QSettingsPrivate *d;
144
145#if defined(Q_DISABLE_COPY)
146 QSettings(const QSettings &);
147 QSettings &operator=(const QSettings &);
148#endif
149
150 QDateTime lastModificationTime( const QString & );
151
152 friend class QApplication;
153};
154
155#endif // QT_NO_SETTINGS
156#endif // QSETTINGS_H
diff --git a/qmake/include/qunicodetables_p.h b/qmake/include/qunicodetables_p.h
new file mode 100644
index 0000000..0e799e4
--- a/dev/null
+++ b/qmake/include/qunicodetables_p.h
@@ -0,0 +1,263 @@
1/****************************************************************************
2**
3**
4** ???
5**
6** Copyright (C) 2003 Trolltech AS. All rights reserved.
7**
8** This file is part of the widgets module of the Qt GUI Toolkit.
9**
10** This file may be distributed under the terms of the Q Public License
11** as defined by Trolltech AS of Norway and appearing in the file
12** LICENSE.QPL included in the packaging of this file.
13**
14** This file may be distributed and/or modified under the terms of the
15** GNU General Public License version 2 as published by the Free Software
16** Foundation and appearing in the file LICENSE.GPL included in the
17** packaging of this file.
18**
19** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
20** licenses may use this file in accordance with the Qt Commercial License
21** Agreement provided with the Software.
22**
23** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
24** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
25**
26** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
27** information about Qt Commercial License Agreements.
28** See http://www.trolltech.com/qpl/ for QPL licensing information.
29** See http://www.trolltech.com/gpl/ for GPL licensing information.
30**
31** Contact info@trolltech.com if any conditions of this licensing are
32** not clear to you.
33**
34**********************************************************************/
35
36#ifndef QUNICODETABLES_P_H
37#define QUNICODETABLES_P_H
38
39//
40// W A R N I N G
41// -------------
42//
43// This file is not part of the Qt API. It exists for the convenience
44// of internal files. This header file may change from version to version
45// without notice, or even be removed.
46//
47// We mean it.
48//
49//
50
51#ifndef QT_H
52#include "qstring.h"
53#endif // QT_H
54
55#ifdef QT_NO_UNICODETABLES
56# include <ctype.h>
57#endif
58
59class QUnicodeTables {
60public:
61 static const Q_UINT8 unicode_info[];
62#ifndef QT_NO_UNICODETABLES
63 static const Q_UINT16 decomposition_map[];
64 static const Q_UINT16 decomposition_info[];
65 static const Q_UINT16 ligature_map[];
66 static const Q_UINT16 ligature_info[];
67 static const Q_UINT8 direction_info[];
68 static const Q_UINT8 combining_info[];
69 static const Q_UINT16 case_info[];
70 static const Q_INT8 decimal_info[];
71 static const Q_UINT16 symmetricPairs[];
72 static const int symmetricPairsSize;
73 static const Q_UINT8 line_break_info[];
74#else
75 static const Q_UINT8 latin1_line_break_info[];
76#endif
77 static const unsigned char otherScripts[];
78 static const unsigned char indicScripts[];
79 static const unsigned char scriptTable[];
80 enum { SCRIPTS_INDIC = 0x7e };
81
82 // see http://www.unicode.org/reports/tr14/tr14-13.html
83 // we don't use the XX and AI properties and map them to AL instead.
84 enum LineBreakClass {
85 LineBreak_OP, LineBreak_CL, LineBreak_QU, LineBreak_GL, LineBreak_NS,
86 LineBreak_EX, LineBreak_SY, LineBreak_IS, LineBreak_PR, LineBreak_PO,
87 LineBreak_NU, LineBreak_AL, LineBreak_ID, LineBreak_IN, LineBreak_HY,
88 LineBreak_BA, LineBreak_BB, LineBreak_B2, LineBreak_ZW, LineBreak_CM,
89 LineBreak_SA, LineBreak_BK, LineBreak_CR, LineBreak_LF, LineBreak_SG,
90 LineBreak_CB, LineBreak_SP
91 };
92};
93
94
95inline QChar::Category category( const QChar &c )
96{
97#ifdef QT_NO_UNICODETABLES
98 if ( c.unicode() > 0xff ) return QChar::Letter_Uppercase; //########
99 return (QChar::Category)QUnicodeTables::unicode_info[c.unicode()];
100#else
101 register int uc = ((int)QUnicodeTables::unicode_info[c.row()]) << 8;
102 uc += c.cell();
103 return (QChar::Category)QUnicodeTables::unicode_info[uc];
104#endif // QT_NO_UNICODETABLES
105}
106
107inline QChar lower( const QChar &c )
108{
109#ifndef QT_NO_UNICODETABLES
110 int row = c.row();
111 int cell = c.cell();
112 register int ci = QUnicodeTables::case_info[row];
113 register int uc = ((int)QUnicodeTables::unicode_info[c.row()]) << 8;
114 uc += c.cell();
115 if (QUnicodeTables::unicode_info[uc] != QChar::Letter_Uppercase || !ci)
116 return c;
117 Q_UINT16 lower = QUnicodeTables::case_info[(ci<<8)+cell];
118 return lower ? QChar(lower) : c;
119#else
120 if ( c.row() )
121 return c;
122 return QChar( tolower((uchar) c.latin1()) );
123#endif
124}
125
126inline QChar upper( const QChar &c )
127{
128#ifndef QT_NO_UNICODETABLES
129 int row = c.row();
130 int cell = c.cell();
131 register int ci = QUnicodeTables::case_info[row];
132 register int uc = ((int)QUnicodeTables::unicode_info[c.row()]) << 8;
133 uc += c.cell();
134 if (QUnicodeTables::unicode_info[uc] != QChar::Letter_Lowercase || !ci)
135 return c;
136 Q_UINT16 upper = QUnicodeTables::case_info[(ci<<8)+cell];
137 return upper ? QChar(upper) : c;
138#else
139 if ( c.row() )
140 return c;
141 return QChar( toupper((uchar) c.latin1()) );
142#endif
143}
144
145inline QChar::Direction direction( const QChar &c )
146{
147#ifndef QT_NO_UNICODETABLES
148 register int pos = QUnicodeTables::direction_info[c.row()];
149 return (QChar::Direction) (QUnicodeTables::direction_info[(pos<<8)+c.cell()] & 0x1f);
150#else
151 Q_UNUSED(c);
152 return QChar::DirL;
153#endif
154}
155
156inline bool mirrored( const QChar &c )
157{
158#ifndef QT_NO_UNICODETABLES
159 register int pos = QUnicodeTables::direction_info[c.row()];
160 return QUnicodeTables::direction_info[(pos<<8)+c.cell()] > 128;
161#else
162 Q_UNUSED(c);
163 return FALSE;
164#endif
165}
166
167
168inline QChar mirroredChar( const QChar &ch )
169{
170#ifndef QT_NO_UNICODETABLES
171 if(!::mirrored( ch ))
172 return ch;
173
174 int i;
175 int c = ch.unicode();
176 for (i = 0; i < QUnicodeTables::symmetricPairsSize; i ++) {
177 if (QUnicodeTables::symmetricPairs[i] == c)
178 return QUnicodeTables::symmetricPairs[(i%2) ? (i-1) : (i+1)];
179 }
180#endif
181 return ch;
182}
183
184inline QChar::Joining joining( const QChar &ch )
185{
186#ifndef QT_NO_UNICODETABLES
187 register int pos = QUnicodeTables::direction_info[ch.row()];
188 return (QChar::Joining) ((QUnicodeTables::direction_info[(pos<<8)+ch.cell()] >> 5) &0x3);
189#else
190 Q_UNUSED(ch);
191 return QChar::OtherJoining;
192#endif
193}
194
195inline bool isMark( const QChar &ch )
196{
197 QChar::Category c = ::category( ch );
198 return c >= QChar::Mark_NonSpacing && c <= QChar::Mark_Enclosing;
199}
200
201inline unsigned char combiningClass( const QChar &ch )
202{
203#ifndef QT_NO_UNICODETABLES
204 const int pos = QUnicodeTables::combining_info[ch.row()];
205 return QUnicodeTables::combining_info[(pos<<8) + ch.cell()];
206#else
207 Q_UNUSED(ch);
208 return 0;
209#endif
210}
211
212inline bool isSpace( const QChar &ch )
213{
214 if( ch.unicode() >= 9 && ch.unicode() <=13 ) return TRUE;
215 QChar::Category c = ::category( ch );
216 return c >= QChar::Separator_Space && c <= QChar::Separator_Paragraph;
217}
218
219inline int lineBreakClass( const QChar &ch )
220{
221#ifdef QT_NO_UNICODETABLES
222 return ch.row() ? QUnicodeTables::LineBreak_AL
223 : QUnicodeTables::latin1_line_break_info[ch.cell()];
224#else
225 register int pos = ((int)QUnicodeTables::line_break_info[ch.row()] << 8) + ch.cell();
226 return QUnicodeTables::line_break_info[pos];
227#endif
228}
229
230inline int scriptForChar( ushort uc )
231{
232 unsigned char script = QUnicodeTables::scriptTable[(uc>>8)];
233 if ( script >= QUnicodeTables::SCRIPTS_INDIC ) {
234 if ( script == QUnicodeTables::SCRIPTS_INDIC ) {
235 script = QUnicodeTables::indicScripts[ (uc-0x0900)>>7 ];
236 } else {
237 // 0x80 + SCRIPTS_xx
238 unsigned char index = script-0x80;
239 unsigned char cell = uc &0xff;
240 while( QUnicodeTables::otherScripts[index++] < cell )
241 index++;
242 script = QUnicodeTables::otherScripts[index];
243 }
244 }
245 return script;
246}
247
248#ifdef Q_WS_X11
249 #define SCRIPT_FOR_CHAR( script, c ) \
250 do { \
251 unsigned short _uc = (c).unicode(); \
252 if ( _uc < 0x100 ) { \
253 script = QFont::Latin; \
254 } else { \
255 script = (QFont::Script)scriptForChar( _uc ); \
256 } \
257} while( FALSE )
258#else
259#define SCRIPT_FOR_CHAR( script, c ) \
260 script = (QFont::Script)scriptForChar( (c).unicode() )
261#endif
262
263#endif
diff --git a/qmake/include/quuid.h b/qmake/include/quuid.h
index 664c149..f5d8a86 100644
--- a/qmake/include/quuid.h
+++ b/qmake/include/quuid.h
@@ -1,5 +1,5 @@
1/**************************************************************************** 1/****************************************************************************
2** $Id$ 2**
3** 3**
4** Definition of QUuid class 4** Definition of QUuid class
5** 5**
@@ -39,7 +39,7 @@
39#define QUUID_H 39#define QUUID_H
40 40
41#ifndef QT_H 41#ifndef QT_H
42#include <qstring.h> 42#include "qstring.h"
43#endif // QT_H 43#endif // QT_H
44 44
45#include <string.h> 45#include <string.h>
@@ -57,8 +57,25 @@ typedef struct _GUID
57#endif 57#endif
58#endif 58#endif
59 59
60
60struct Q_EXPORT QUuid 61struct Q_EXPORT QUuid
61{ 62{
63 enum Variant {
64 VarUnknown=-1,
65 NCS = 0, // 0 - -
66 DCE = 2, // 1 0 -
67 Microsoft= 6, // 1 1 0
68 Reserved= 7 // 1 1 1
69 };
70
71 enum Version {
72 VerUnknown=-1,
73 Time = 1, // 0 0 0 1
74 EmbeddedPOSIX= 2, // 0 0 1 0
75 Name = 3, // 0 0 1 1
76 Random = 4 // 0 1 0 0
77 };
78
62 QUuid() 79 QUuid()
63 { 80 {
64 memset( this, 0, sizeof(QUuid) ); 81 memset( this, 0, sizeof(QUuid) );
@@ -114,6 +131,9 @@ struct Q_EXPORT QUuid
114 return !( *this == orig ); 131 return !( *this == orig );
115 } 132 }
116 133
134 bool operator<(const QUuid &other ) const;
135 bool operator>(const QUuid &other ) const;
136
117#if defined(Q_OS_WIN32) 137#if defined(Q_OS_WIN32)
118 // On Windows we have a type GUID that is used by the platform API, so we 138 // On Windows we have a type GUID that is used by the platform API, so we
119 // provide convenience operators to cast from and to this type. 139 // provide convenience operators to cast from and to this type.
@@ -153,6 +173,9 @@ struct Q_EXPORT QUuid
153 return !( *this == guid ); 173 return !( *this == guid );
154 } 174 }
155#endif 175#endif
176 static QUuid createUuid();
177 QUuid::Variant variant() const;
178 QUuid::Version version() const;
156 179
157 uint data1; 180 uint data1;
158 ushort data2; 181 ushort data2;
diff --git a/qmake/main.cpp b/qmake/main.cpp
index cc2d08a..a731314 100644
--- a/qmake/main.cpp
+++ b/qmake/main.cpp
@@ -1,13 +1,11 @@
1/**************************************************************************** 1/****************************************************************************
2** $Id$
3** 2**
4** Definition of ________ class.
5** 3**
6** Created : 970521 4** ???
7** 5**
8** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. 6** Copyright (C) 1992-2003 Trolltech AS. All rights reserved.
9** 7**
10** This file is part of the network module of the Qt GUI Toolkit. 8** This file is part of qmake.
11** 9**
12** This file may be distributed under the terms of the Q Public License 10** This file may be distributed under the terms of the Q Public License
13** as defined by Trolltech AS of Norway and appearing in the file 11** as defined by Trolltech AS of Norway and appearing in the file
@@ -36,6 +34,7 @@
36**********************************************************************/ 34**********************************************************************/
37 35
38#include "project.h" 36#include "project.h"
37#include "property.h"
39#include "option.h" 38#include "option.h"
40#include "makefile.h" 39#include "makefile.h"
41#include <qnamespace.h> 40#include <qnamespace.h>
@@ -50,6 +49,10 @@
50 49
51// for Borland, main is defined to qMain which breaks qmake 50// for Borland, main is defined to qMain which breaks qmake
52#undef main 51#undef main
52#ifdef Q_OS_MAC
53// for qurl
54bool qt_resolve_symlinks = FALSE;
55#endif
53 56
54int main(int argc, char **argv) 57int main(int argc, char **argv)
55{ 58{
@@ -59,15 +62,36 @@ int main(int argc, char **argv)
59 62
60 QDir sunworkshop42workaround = QDir::current(); 63 QDir sunworkshop42workaround = QDir::current();
61 QString oldpwd = sunworkshop42workaround.currentDirPath(); 64 QString oldpwd = sunworkshop42workaround.currentDirPath();
62 Option::output_dir = oldpwd; //for now this is the output dir
63#ifdef Q_WS_WIN 65#ifdef Q_WS_WIN
64 if ( !(Option::output_dir.length() == 3 && Option::output_dir[0].isLetter() && Option::output_dir.endsWith(":/") ) ) 66 if(!(oldpwd.length() == 3 && oldpwd[0].isLetter() && oldpwd.endsWith(":/") ) )
65#endif 67#endif
66 { 68 {
67 if(Option::output_dir.right(1) != QString(QChar(QDir::separator()))) 69 if(oldpwd.right(1) != QString(QChar(QDir::separator())))
68 Option::output_dir += QDir::separator(); 70 oldpwd += QDir::separator();
69 } 71 }
70 QMakeProject proj; 72 Option::output_dir = oldpwd; //for now this is the output dir
73
74 if(Option::output.name() != "-") {
75 QFileInfo fi(Option::output);
76 QString dir;
77 if(fi.isDir()) {
78 dir = fi.filePath();
79 } else {
80 QString tmp_dir = fi.dirPath();
81 if(!tmp_dir.isEmpty() && QFile::exists(tmp_dir))
82 dir = tmp_dir;
83 }
84 if(!dir.isNull() && dir != ".")
85 Option::output_dir = dir;
86 if(QDir::isRelativePath(Option::output_dir))
87 Option::output_dir.prepend(oldpwd);
88 }
89
90 QMakeProperty prop;
91 if(Option::qmake_mode == Option::QMAKE_QUERY_PROPERTY || Option::qmake_mode == Option::QMAKE_SET_PROPERTY)
92 return prop.exec() ? 0 : 101;
93
94 QMakeProject proj(&prop);
71 int exit_val = 0; 95 int exit_val = 0;
72 QStringList files; 96 QStringList files;
73 if(Option::qmake_mode == Option::QMAKE_GENERATE_PROJECT) 97 if(Option::qmake_mode == Option::QMAKE_GENERATE_PROJECT)
@@ -77,7 +101,7 @@ int main(int argc, char **argv)
77 for(QStringList::Iterator pfile = files.begin(); pfile != files.end(); pfile++) { 101 for(QStringList::Iterator pfile = files.begin(); pfile != files.end(); pfile++) {
78 if(Option::qmake_mode == Option::QMAKE_GENERATE_MAKEFILE || 102 if(Option::qmake_mode == Option::QMAKE_GENERATE_MAKEFILE ||
79 Option::qmake_mode == Option::QMAKE_GENERATE_PRL) { 103 Option::qmake_mode == Option::QMAKE_GENERATE_PRL) {
80 QString fn = (*pfile); 104 QString fn = Option::fixPathToLocalOS((*pfile));
81 105
82 //setup pwd properly 106 //setup pwd properly
83 debug_msg(1, "Resetting dir to: %s", oldpwd.latin1()); 107 debug_msg(1, "Resetting dir to: %s", oldpwd.latin1());
@@ -85,7 +109,7 @@ int main(int argc, char **argv)
85 int di = fn.findRev(Option::dir_sep); 109 int di = fn.findRev(Option::dir_sep);
86 if(di != -1) { 110 if(di != -1) {
87 debug_msg(1, "Changing dir to: %s", fn.left(di).latin1()); 111 debug_msg(1, "Changing dir to: %s", fn.left(di).latin1());
88 if(!QDir::setCurrent(fn.left(fn.findRev(Option::dir_sep)))) 112 if(!QDir::setCurrent(fn.left(di)))
89 fprintf(stderr, "Cannot find directory: %s\n", fn.left(di).latin1()); 113 fprintf(stderr, "Cannot find directory: %s\n", fn.left(di).latin1());
90 fn = fn.right(fn.length() - di - 1); 114 fn = fn.right(fn.length() - di - 1);
91 } 115 }
@@ -123,6 +147,7 @@ int main(int argc, char **argv)
123 } else { 147 } else {
124 if(Option::output.name().isEmpty() && Option::qmake_mode == Option::QMAKE_GENERATE_MAKEFILE) 148 if(Option::output.name().isEmpty() && Option::qmake_mode == Option::QMAKE_GENERATE_MAKEFILE)
125 Option::output.setName(proj.first("QMAKE_MAKEFILE")); 149 Option::output.setName(proj.first("QMAKE_MAKEFILE"));
150 Option::output_dir = oldpwd;
126 if(!mkfile->openOutput(Option::output)) { 151 if(!mkfile->openOutput(Option::output)) {
127 fprintf(stderr, "Failure to open file: %s\n", 152 fprintf(stderr, "Failure to open file: %s\n",
128 Option::output.name().isEmpty() ? "(stdout)" : Option::output.name().latin1()); 153 Option::output.name().isEmpty() ? "(stdout)" : Option::output.name().latin1());
@@ -149,7 +174,7 @@ int main(int argc, char **argv)
149 if(Option::debug_level) { 174 if(Option::debug_level) {
150 QMap<QString, QStringList> &vars = proj.variables(); 175 QMap<QString, QStringList> &vars = proj.variables();
151 for(QMap<QString, QStringList>::Iterator it = vars.begin(); it != vars.end(); ++it) { 176 for(QMap<QString, QStringList>::Iterator it = vars.begin(); it != vars.end(); ++it) {
152 if(it.key().left(1) != "." && !it.data().isEmpty()) 177 if(!it.key().startsWith(".") && !it.data().isEmpty())
153 debug_msg(1, "%s === %s", it.key().latin1(), it.data().join(" :: ").latin1()); 178 debug_msg(1, "%s === %s", it.key().latin1(), it.data().join(" :: ").latin1());
154 } 179 }
155 } 180 }
diff --git a/qmake/meta.cpp b/qmake/meta.cpp
new file mode 100644
index 0000000..f314cb0
--- a/dev/null
+++ b/qmake/meta.cpp
@@ -0,0 +1,192 @@
1/****************************************************************************
2**
3**
4** Implementation of QMakeMetaInfo class.
5**
6** Copyright (C) 1992-2003 Trolltech AS. All rights reserved.
7**
8** This file is part of qmake.
9**
10** This file may be distributed under the terms of the Q Public License
11** as defined by Trolltech AS of Norway and appearing in the file
12** LICENSE.QPL included in the packaging of this file.
13**
14** This file may be distributed and/or modified under the terms of the
15** GNU General Public License version 2 as published by the Free Software
16** Foundation and appearing in the file LICENSE.GPL included in the
17** packaging of this file.
18**
19** Licensees holding valid Qt Enterprise Edition licenses may use this
20** file in accordance with the Qt Commercial License Agreement provided
21** with the Software.
22**
23** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
24** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
25**
26** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
27** information about Qt Commercial License Agreements.
28** See http://www.trolltech.com/qpl/ for QPL licensing information.
29** See http://www.trolltech.com/gpl/ for GPL licensing information.
30**
31** Contact info@trolltech.com if any conditions of this licensing are
32** not clear to you.
33**
34**********************************************************************/
35
36#include "meta.h"
37#include "project.h"
38#include "option.h"
39#include <qdir.h>
40
41QMap<QString, QMap<QString, QStringList> > QMakeMetaInfo::cache_vars;
42
43QMakeMetaInfo::QMakeMetaInfo()
44{
45
46}
47
48
49bool
50QMakeMetaInfo::readLib(const QString &lib)
51{
52 clear();
53 QString meta_file = findLib(lib);
54
55 if(cache_vars.contains(meta_file)) {
56 vars = cache_vars[meta_file];
57 return TRUE;
58 }
59
60 bool ret = FALSE;
61 if(!meta_file.isNull()) {
62 if(meta_file.endsWith(Option::pkgcfg_ext)) {
63 if((ret=readPkgCfgFile(meta_file)))
64 meta_type = "pkgcfg";
65 } else if(meta_file.endsWith(Option::libtool_ext)) {
66 if((ret=readLibtoolFile(meta_file)))
67 meta_type = "libtool";
68 } else if(meta_file.endsWith(Option::prl_ext)) {
69 QMakeProject proj;
70 if(!proj.read(Option::fixPathToLocalOS(meta_file),
71 QDir::currentDirPath(), QMakeProject::ReadProFile))
72 return FALSE;
73 meta_type = "qmake";
74 vars = proj.variables();
75 ret = TRUE;
76 } else {
77 warn_msg(WarnLogic, "QMakeMetaInfo: unknown file format for %s", meta_file.latin1());
78 }
79 }
80 if(ret)
81 cache_vars.insert(meta_file, vars);
82 return ret;
83}
84
85
86void
87QMakeMetaInfo::clear()
88{
89 vars.clear();
90}
91
92
93QString
94QMakeMetaInfo::findLib(const QString &lib)
95{
96 QString ret = QString::null;
97 QString extns[] = { Option::prl_ext, /*Option::pkgcfg_ext, Option::libtool_ext,*/ QString::null };
98 for(int extn = 0; !extns[extn].isNull(); extn++) {
99 if(lib.endsWith(extns[extn]))
100 ret = QFile::exists(lib) ? lib : QString::null;
101 }
102 if(ret.isNull()) {
103 for(int extn = 0; !extns[extn].isNull(); extn++) {
104 if(QFile::exists(lib + extns[extn])) {
105 ret = lib + extns[extn];
106 break;
107 }
108 }
109 }
110 if(ret.isNull())
111 debug_msg(2, "QMakeMetaInfo: Cannot find info file for %s", lib.latin1());
112 else
113 debug_msg(2, "QMakeMetaInfo: Found info file %s for %s", ret.latin1(), lib.latin1());
114 return ret;
115}
116
117
118bool
119QMakeMetaInfo::readLibtoolFile(const QString &f)
120{
121 /* I can just run the .la through the .pro parser since they are compatible.. */
122 QMakeProject proj;
123 if(!proj.read(Option::fixPathToLocalOS(f), QDir::currentDirPath(), QMakeProject::ReadProFile))
124 return FALSE;
125 QString dirf = Option::fixPathToTargetOS(f).section(Option::dir_sep, 0, -2);
126 if(dirf == f)
127 dirf = "";
128 else if(!dirf.isEmpty() && !dirf.endsWith(Option::output_dir))
129 dirf += Option::dir_sep;
130 QMap<QString, QStringList> &v = proj.variables();
131 for(QMap<QString, QStringList>::Iterator it = v.begin(); it != v.end(); ++it) {
132 QStringList lst = it.data();
133 if(lst.count() == 1 && (lst.first().startsWith("'") || lst.first().startsWith("\"")) &&
134 lst.first().endsWith(QString(lst.first()[0])))
135 lst = lst.first().mid(1, lst.first().length() - 2);
136 if(!vars.contains("QMAKE_PRL_TARGET") &&
137 (it.key() == "dlname" || it.key() == "library_names" || it.key() == "old_library")) {
138 QString dir = v["libdir"].first();
139 if((dir.startsWith("'") || dir.startsWith("\"")) && dir.endsWith(QString(dir[0])))
140 dir = dir.mid(1, dir.length() - 2);
141 dir = dir.stripWhiteSpace();
142 if(!dir.isEmpty() && !dir.endsWith(Option::dir_sep))
143 dir += Option::dir_sep;
144 if(lst.count() == 1)
145 lst = QStringList::split(" ", lst.first());
146 for(QStringList::Iterator lst_it = lst.begin(); lst_it != lst.end(); ++lst_it) {
147 bool found = FALSE;
148 QString dirs[] = { "", dir, dirf, dirf + ".libs" + QDir::separator(), "(term)" };
149 for(int i = 0; !found && dirs[i] != "(term)"; i++) {
150 if(QFile::exists(dirs[i] + (*lst_it))) {
151 QString targ = dirs[i] + (*lst_it);
152 if(QDir::isRelativePath(targ))
153 targ.prepend(QDir::currentDirPath() + QDir::separator());
154 vars["QMAKE_PRL_TARGET"] << targ;
155 found = TRUE;
156 }
157 }
158 if(found)
159 break;
160 }
161 } else if(it.key() == "dependency_libs") {
162 if(lst.count() == 1) {
163 QString dep = lst.first();
164 if((dep.startsWith("'") || dep.startsWith("\"")) && dep.endsWith(QString(dep[0])))
165 dep = dep.mid(1, dep.length() - 2);
166 lst = QStringList::split(" ", dep.stripWhiteSpace());
167 }
168 QMakeProject *conf = NULL;
169 for(QStringList::Iterator lit = lst.begin(); lit != lst.end(); ++lit) {
170 if((*lit).startsWith("-R")) {
171 if(!conf) {
172 conf = new QMakeProject;
173 conf->read(QMakeProject::ReadAll ^ QMakeProject::ReadProFile);
174 }
175 if(!conf->isEmpty("QMAKE_RPATH"))
176 (*lit) = conf->first("QMAKE_RPATH") + (*lit).mid(2);
177 }
178 }
179 if(conf)
180 delete conf;
181 vars["QMAKE_PRL_LIBS"] += lst;
182 }
183 }
184 return TRUE;
185}
186
187bool
188QMakeMetaInfo::readPkgCfgFile(const QString &f)
189{
190 fprintf(stderr, "Must implement reading in pkg-config files (%s)!!!\n", f.latin1());
191 return FALSE;
192}
diff --git a/qmake/meta.h b/qmake/meta.h
new file mode 100644
index 0000000..2edbfca
--- a/dev/null
+++ b/qmake/meta.h
@@ -0,0 +1,93 @@
1/****************************************************************************
2**
3**
4** Definition of QMakeMetaInfo class.
5**
6** Copyright (C) 1992-2003 Trolltech AS. All rights reserved.
7**
8** This file is part of qmake.
9**
10** This file may be distributed under the terms of the Q Public License
11** as defined by Trolltech AS of Norway and appearing in the file
12** LICENSE.QPL included in the packaging of this file.
13**
14** This file may be distributed and/or modified under the terms of the
15** GNU General Public License version 2 as published by the Free Software
16** Foundation and appearing in the file LICENSE.GPL included in the
17** packaging of this file.
18**
19** Licensees holding valid Qt Enterprise Edition licenses may use this
20** file in accordance with the Qt Commercial License Agreement provided
21** with the Software.
22**
23** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
24** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
25**
26** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
27** information about Qt Commercial License Agreements.
28** See http://www.trolltech.com/qpl/ for QPL licensing information.
29** See http://www.trolltech.com/gpl/ for GPL licensing information.
30**
31** Contact info@trolltech.com if any conditions of this licensing are
32** not clear to you.
33**
34**********************************************************************/
35
36#ifndef __META_H__
37#define __META_H__
38
39#include <qmap.h>
40#include <qstringlist.h>
41#include <qstring.h>
42
43class QMakeMetaInfo
44{
45 bool readLibtoolFile(const QString &f);
46 bool readPkgCfgFile(const QString &f);
47 QMap<QString, QStringList> vars;
48 QString meta_type;
49 static QMap<QString, QMap<QString, QStringList> > cache_vars;
50 void clear();
51public:
52 QMakeMetaInfo();
53
54 bool readLib(const QString &lib);
55 static QString findLib(const QString &lib);
56 static bool libExists(const QString &lib);
57 QString type() const;
58
59 bool isEmpty(const QString &v);
60 QStringList &values(const QString &v);
61 QString first(const QString &v);
62 QMap<QString, QStringList> &variables();
63};
64
65inline bool QMakeMetaInfo::isEmpty(const QString &v)
66{ return !vars.contains(v) || vars[v].isEmpty(); }
67
68inline QString QMakeMetaInfo::type() const
69{ return meta_type; }
70
71inline QStringList &QMakeMetaInfo::values(const QString &v)
72{ return vars[v]; }
73
74inline QString QMakeMetaInfo::first(const QString &v)
75{
76#if defined(Q_CC_SUN) && (__SUNPRO_CC == 0x500) || defined(Q_CC_HP)
77 // workaround for Sun WorkShop 5.0 bug fixed in Forte 6
78 if (isEmpty(v))
79 return QString("");
80 else
81 return vars[v].first();
82#else
83 return isEmpty(v) ? QString("") : vars[v].first();
84#endif
85}
86
87inline QMap<QString, QStringList> &QMakeMetaInfo::variables()
88{ return vars; }
89
90inline bool QMakeMetaInfo::libExists(const QString &lib)
91{ return !findLib(lib).isNull(); }
92
93#endif /* __META_H__ */
diff --git a/qmake/option.cpp b/qmake/option.cpp
index 8b7e5e8..e6928fa 100644
--- a/qmake/option.cpp
+++ b/qmake/option.cpp
@@ -1,13 +1,11 @@
1/**************************************************************************** 1/****************************************************************************
2** $Id$
3** 2**
4** Definition of ________ class.
5** 3**
6** Created : 970521 4** Implementation of Option class.
7** 5**
8** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. 6** Copyright (C) 1992-2003 Trolltech AS. All rights reserved.
9** 7**
10** This file is part of the network module of the Qt GUI Toolkit. 8** This file is part of qmake.
11** 9**
12** This file may be distributed under the terms of the Q Public License 10** This file may be distributed under the terms of the Q Public License
13** as defined by Trolltech AS of Norway and appearing in the file 11** as defined by Trolltech AS of Norway and appearing in the file
@@ -44,15 +42,19 @@
44//convenience 42//convenience
45QString Option::prf_ext; 43QString Option::prf_ext;
46QString Option::prl_ext; 44QString Option::prl_ext;
45QString Option::libtool_ext;
46QString Option::pkgcfg_ext;
47QString Option::ui_ext; 47QString Option::ui_ext;
48QStringList Option::h_ext; 48QStringList Option::h_ext;
49QString Option::moc_ext; 49QString Option::cpp_moc_ext;
50QString Option::h_moc_ext;
50QStringList Option::cpp_ext; 51QStringList Option::cpp_ext;
51QString Option::obj_ext; 52QString Option::obj_ext;
52QString Option::lex_ext; 53QString Option::lex_ext;
53QString Option::yacc_ext; 54QString Option::yacc_ext;
54QString Option::dir_sep; 55QString Option::dir_sep;
55QString Option::moc_mod; 56QString Option::h_moc_mod;
57QString Option::cpp_moc_mod;
56QString Option::yacc_mod; 58QString Option::yacc_mod;
57QString Option::lex_mod; 59QString Option::lex_mod;
58 60
@@ -80,6 +82,9 @@ Option::TARG_MODE Option::target_mode = Option::TARG_QNX6_MODE;
80Option::TARG_MODE Option::target_mode = Option::TARG_UNIX_MODE; 82Option::TARG_MODE Option::target_mode = Option::TARG_UNIX_MODE;
81#endif 83#endif
82 84
85//QMAKE_*_PROPERTY stuff
86QStringList Option::prop::properties;
87
83//QMAKE_GENERATE_PROJECT stuff 88//QMAKE_GENERATE_PROJECT stuff
84bool Option::projfile::do_pwd = TRUE; 89bool Option::projfile::do_pwd = TRUE;
85bool Option::projfile::do_recursive = TRUE; 90bool Option::projfile::do_recursive = TRUE;
@@ -104,6 +109,8 @@ static Option::QMAKE_MODE default_mode(QString progname)
104 progname = progname.right(progname.length() - (s + 1)); 109 progname = progname.right(progname.length() - (s + 1));
105 if(progname == "qmakegen") 110 if(progname == "qmakegen")
106 return Option::QMAKE_GENERATE_PROJECT; 111 return Option::QMAKE_GENERATE_PROJECT;
112 else if(progname == "qt-config")
113 return Option::QMAKE_QUERY_PROPERTY;
107 return Option::QMAKE_GENERATE_MAKEFILE; 114 return Option::QMAKE_GENERATE_MAKEFILE;
108} 115}
109 116
@@ -161,7 +168,12 @@ bool usage(const char *a0)
161 return FALSE; 168 return FALSE;
162} 169}
163 170
164bool 171enum {
172 QMAKE_CMDLINE_SUCCESS,
173 QMAKE_CMDLINE_SHOW_USAGE,
174 QMAKE_CMDLINE_BAIL
175};
176int
165Option::internalParseCommandLine(int argc, char **argv, int skip) 177Option::internalParseCommandLine(int argc, char **argv, int skip)
166{ 178{
167 bool before = TRUE; 179 bool before = TRUE;
@@ -178,6 +190,10 @@ Option::internalParseCommandLine(int argc, char **argv, int skip)
178 Option::mkfile::do_deps = FALSE; 190 Option::mkfile::do_deps = FALSE;
179 Option::mkfile::do_mocs = FALSE; 191 Option::mkfile::do_mocs = FALSE;
180 Option::qmake_mode = Option::QMAKE_GENERATE_PRL; 192 Option::qmake_mode = Option::QMAKE_GENERATE_PRL;
193 } else if(opt == "set") {
194 Option::qmake_mode = Option::QMAKE_SET_PROPERTY;
195 } else if(opt == "query") {
196 Option::qmake_mode = Option::QMAKE_QUERY_PROPERTY;
181 } else if(opt == "makefile") { 197 } else if(opt == "makefile") {
182 Option::qmake_mode = Option::QMAKE_GENERATE_MAKEFILE; 198 Option::qmake_mode = Option::QMAKE_GENERATE_MAKEFILE;
183 } else { 199 } else {
@@ -208,9 +224,9 @@ Option::internalParseCommandLine(int argc, char **argv, int skip)
208 } else if(opt == "version" || opt == "v" || opt == "-version") { 224 } else if(opt == "version" || opt == "v" || opt == "-version") {
209 fprintf(stderr, "Qmake version: %s (Qt %s)\n", qmake_version(), QT_VERSION_STR); 225 fprintf(stderr, "Qmake version: %s (Qt %s)\n", qmake_version(), QT_VERSION_STR);
210 fprintf(stderr, "Qmake is free software from Trolltech AS.\n"); 226 fprintf(stderr, "Qmake is free software from Trolltech AS.\n");
211 return FALSE; 227 return QMAKE_CMDLINE_BAIL;
212 } else if(opt == "h" || opt == "help") { 228 } else if(opt == "h" || opt == "help") {
213 return FALSE; 229 return QMAKE_CMDLINE_SHOW_USAGE;
214 } else if(opt == "Wall") { 230 } else if(opt == "Wall") {
215 Option::warn_level |= WarnAll; 231 Option::warn_level |= WarnAll;
216 } else if(opt == "Wparser") { 232 } else if(opt == "Wparser") {
@@ -239,7 +255,7 @@ Option::internalParseCommandLine(int argc, char **argv, int skip)
239 Option::mkfile::qmakespec_commandline = argv[x]; 255 Option::mkfile::qmakespec_commandline = argv[x];
240 } else { 256 } else {
241 fprintf(stderr, "***Unknown option -%s\n", opt.latin1()); 257 fprintf(stderr, "***Unknown option -%s\n", opt.latin1());
242 return usage(argv[0]); 258 return QMAKE_CMDLINE_SHOW_USAGE;
243 } 259 }
244 } else if(Option::qmake_mode == Option::QMAKE_GENERATE_PROJECT) { 260 } else if(Option::qmake_mode == Option::QMAKE_GENERATE_PROJECT) {
245 if(opt == "nopwd") { 261 if(opt == "nopwd") {
@@ -250,7 +266,7 @@ Option::internalParseCommandLine(int argc, char **argv, int skip)
250 Option::projfile::do_recursive = FALSE; 266 Option::projfile::do_recursive = FALSE;
251 } else { 267 } else {
252 fprintf(stderr, "***Unknown option -%s\n", opt.latin1()); 268 fprintf(stderr, "***Unknown option -%s\n", opt.latin1());
253 return FALSE; 269 return QMAKE_CMDLINE_SHOW_USAGE;
254 } 270 }
255 } 271 }
256 } 272 }
@@ -262,32 +278,46 @@ Option::internalParseCommandLine(int argc, char **argv, int skip)
262 else 278 else
263 Option::after_user_vars.append(arg); 279 Option::after_user_vars.append(arg);
264 } else { 280 } else {
281 bool handled = TRUE;
282 if(Option::qmake_mode == Option::QMAKE_QUERY_PROPERTY ||
283 Option::qmake_mode == Option::QMAKE_SET_PROPERTY) {
284 Option::prop::properties.append(arg);
285 } else {
265 QFileInfo fi(arg); 286 QFileInfo fi(arg);
266 if(!fi.convertToAbs()) //strange 287 if(!fi.convertToAbs()) //strange
267 arg = fi.filePath(); 288 arg = fi.filePath();
268 if(Option::qmake_mode == Option::QMAKE_GENERATE_MAKEFILE || 289 if(Option::qmake_mode == Option::QMAKE_GENERATE_MAKEFILE ||
269 Option::qmake_mode == Option::QMAKE_GENERATE_PRL) 290 Option::qmake_mode == Option::QMAKE_GENERATE_PRL)
270 Option::mkfile::project_files.append(arg); 291 Option::mkfile::project_files.append(arg);
271 else 292 else if(Option::qmake_mode == Option::QMAKE_GENERATE_PROJECT)
272 Option::projfile::project_dirs.append(arg); 293 Option::projfile::project_dirs.append(arg);
294 else
295 handled = FALSE;
273 } 296 }
297 if(!handled)
298 return QMAKE_CMDLINE_SHOW_USAGE;
274 } 299 }
275 } 300 }
276 return TRUE; 301 }
302 return QMAKE_CMDLINE_SUCCESS;
277} 303}
278 304
279 305
280bool 306bool
281Option::parseCommandLine(int argc, char **argv) 307Option::parseCommandLine(int argc, char **argv)
282{ 308{
283 Option::moc_mod = "moc_"; 309 Option::cpp_moc_mod = "";
310 Option::h_moc_mod = "moc_";
284 Option::lex_mod = "_lex"; 311 Option::lex_mod = "_lex";
285 Option::yacc_mod = "_yacc"; 312 Option::yacc_mod = "_yacc";
286 Option::prl_ext = ".prl"; 313 Option::prl_ext = ".prl";
314 Option::libtool_ext = ".la";
315 Option::pkgcfg_ext = ".pc";
287 Option::prf_ext = ".prf"; 316 Option::prf_ext = ".prf";
288 Option::ui_ext = ".ui"; 317 Option::ui_ext = ".ui";
289 Option::h_ext << ".h" << ".hpp" << ".hh" << ".H" << ".hxx"; 318 Option::h_ext << ".h" << ".hpp" << ".hh" << ".H" << ".hxx";
290 Option::moc_ext = ".moc"; 319 Option::cpp_moc_ext = ".moc";
320 Option::h_moc_ext = ".cpp";
291 Option::cpp_ext << ".cpp" << ".cc" << ".cxx" << ".C"; 321 Option::cpp_ext << ".cpp" << ".cc" << ".cxx" << ".C";
292 Option::lex_ext = ".l"; 322 Option::lex_ext = ".l";
293 Option::yacc_ext = ".y"; 323 Option::yacc_ext = ".y";
@@ -334,8 +364,11 @@ Option::parseCommandLine(int argc, char **argv)
334 } 364 }
335 free(env_argv); 365 free(env_argv);
336 } 366 }
337 if(!internalParseCommandLine(argc, argv, 1)) 367 {
338 return usage(argv[0]); 368 int ret = internalParseCommandLine(argc, argv, 1);
369 if(ret != QMAKE_CMDLINE_SUCCESS)
370 return ret == QMAKE_CMDLINE_SHOW_USAGE ? usage(argv[0]) : FALSE;
371 }
339 372
340 //last chance for defaults 373 //last chance for defaults
341 if(Option::qmake_mode == Option::QMAKE_GENERATE_MAKEFILE || 374 if(Option::qmake_mode == Option::QMAKE_GENERATE_MAKEFILE ||
@@ -381,22 +414,30 @@ bool Option::postProcessProject(QMakeProject *project)
381 if(h_ext.isEmpty()) 414 if(h_ext.isEmpty())
382 h_ext << ".h"; 415 h_ext << ".h";
383 416
417 if(!project->isEmpty("QMAKE_EXT_PKGCONFIG"))
418 Option::pkgcfg_ext = project->first("QMAKE_EXT_PKGCONFIG");
419 if(!project->isEmpty("QMAKE_EXT_LIBTOOL"))
420 Option::libtool_ext = project->first("QMAKE_EXT_LIBTOOL");
384 if(!project->isEmpty("QMAKE_EXT_PRL")) 421 if(!project->isEmpty("QMAKE_EXT_PRL"))
385 Option::prl_ext = project->first("QMAKE_EXT_PRL"); 422 Option::prl_ext = project->first("QMAKE_EXT_PRL");
386 if(!project->isEmpty("QMAKE_EXT_PRF")) 423 if(!project->isEmpty("QMAKE_EXT_PRF"))
387 Option::prf_ext = project->first("QMAKE_EXT_PRF"); 424 Option::prf_ext = project->first("QMAKE_EXT_PRF");
388 if(!project->isEmpty("QMAKE_EXT_UI")) 425 if(!project->isEmpty("QMAKE_EXT_UI"))
389 Option::ui_ext = project->first("QMAKE_EXT_UI"); 426 Option::ui_ext = project->first("QMAKE_EXT_UI");
390 if(!project->isEmpty("QMAKE_EXT_MOC")) 427 if(!project->isEmpty("QMAKE_EXT_CPP_MOC"))
391 Option::moc_ext = project->first("QMAKE_EXT_MOC"); 428 Option::cpp_moc_ext = project->first("QMAKE_EXT_CPP_MOC");
429 if(!project->isEmpty("QMAKE_EXT_H_MOC"))
430 Option::h_moc_ext = project->first("QMAKE_EXT_H_MOC");
392 if(!project->isEmpty("QMAKE_EXT_LEX")) 431 if(!project->isEmpty("QMAKE_EXT_LEX"))
393 Option::lex_ext = project->first("QMAKE_EXT_LEX"); 432 Option::lex_ext = project->first("QMAKE_EXT_LEX");
394 if(!project->isEmpty("QMAKE_EXT_YACC")) 433 if(!project->isEmpty("QMAKE_EXT_YACC"))
395 Option::yacc_ext = project->first("QMAKE_EXT_YACC"); 434 Option::yacc_ext = project->first("QMAKE_EXT_YACC");
396 if(!project->isEmpty("QMAKE_EXT_OBJ")) 435 if(!project->isEmpty("QMAKE_EXT_OBJ"))
397 Option::obj_ext = project->first("QMAKE_EXT_OBJ"); 436 Option::obj_ext = project->first("QMAKE_EXT_OBJ");
398 if(!project->isEmpty("QMAKE_MOD_MOC")) 437 if(!project->isEmpty("QMAKE_H_MOD_MOC"))
399 Option::moc_mod = project->first("QMAKE_MOD_MOC"); 438 Option::h_moc_mod = project->first("QMAKE_H_MOD_MOC");
439 if(!project->isEmpty("QMAKE_CPP_MOD_MOC"))
440 Option::cpp_moc_mod = project->first("QMAKE_CPP_MOD_MOC");
400 if(!project->isEmpty("QMAKE_MOD_LEX")) 441 if(!project->isEmpty("QMAKE_MOD_LEX"))
401 Option::lex_mod = project->first("QMAKE_MOD_LEX"); 442 Option::lex_mod = project->first("QMAKE_MOD_LEX");
402 if(!project->isEmpty("QMAKE_MOD_YACC")) 443 if(!project->isEmpty("QMAKE_MOD_YACC"))
diff --git a/qmake/option.h b/qmake/option.h
index 8bd348e..6197605 100644
--- a/qmake/option.h
+++ b/qmake/option.h
@@ -1,13 +1,11 @@
1/**************************************************************************** 1/****************************************************************************
2** $Id$
3** 2**
4** Definition of ________ class.
5** 3**
6** Created : 970521 4** Definition of Option class.
7** 5**
8** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. 6** Copyright (C) 1992-2003 Trolltech AS. All rights reserved.
9** 7**
10** This file is part of the network module of the Qt GUI Toolkit. 8** This file is part of qmake.
11** 9**
12** This file may be distributed under the terms of the Q Public License 10** This file may be distributed under the terms of the Q Public License
13** as defined by Trolltech AS of Norway and appearing in the file 11** as defined by Trolltech AS of Norway and appearing in the file
@@ -34,6 +32,7 @@
34** not clear to you. 32** not clear to you.
35** 33**
36**********************************************************************/ 34**********************************************************************/
35
37#ifndef __OPTION_H__ 36#ifndef __OPTION_H__
38#define __OPTION_H__ 37#define __OPTION_H__
39 38
@@ -43,7 +42,7 @@
43#include <qfile.h> 42#include <qfile.h>
44 43
45#define QMAKE_VERSION_MAJOR 1 44#define QMAKE_VERSION_MAJOR 1
46#define QMAKE_VERSION_MINOR 5 45#define QMAKE_VERSION_MINOR 7
47#define QMAKE_VERSION_PATCH 0 46#define QMAKE_VERSION_PATCH 0
48const char *qmake_version(); 47const char *qmake_version();
49 48
@@ -60,16 +59,20 @@ void warn_msg(QMakeWarn t, const char *fmt, ...);
60struct Option 59struct Option
61{ 60{
62 //simply global convenience 61 //simply global convenience
62 static QString libtool_ext;
63 static QString pkgcfg_ext;
63 static QString prf_ext; 64 static QString prf_ext;
64 static QString prl_ext; 65 static QString prl_ext;
65 static QString ui_ext; 66 static QString ui_ext;
66 static QStringList h_ext; 67 static QStringList h_ext;
67 static QStringList cpp_ext; 68 static QStringList cpp_ext;
68 static QString moc_ext; 69 static QString h_moc_ext;
70 static QString cpp_moc_ext;
69 static QString obj_ext; 71 static QString obj_ext;
70 static QString lex_ext; 72 static QString lex_ext;
71 static QString yacc_ext; 73 static QString yacc_ext;
72 static QString moc_mod; 74 static QString h_moc_mod;
75 static QString cpp_moc_mod;
73 static QString lex_mod; 76 static QString lex_mod;
74 static QString yacc_mod; 77 static QString yacc_mod;
75 static QString dir_sep; 78 static QString dir_sep;
@@ -83,7 +86,7 @@ struct Option
83 86
84 //global qmake mode, can only be in one mode per invocation! 87 //global qmake mode, can only be in one mode per invocation!
85 enum QMAKE_MODE { QMAKE_GENERATE_NOTHING, QMAKE_GENERATE_PROJECT, QMAKE_GENERATE_MAKEFILE, 88 enum QMAKE_MODE { QMAKE_GENERATE_NOTHING, QMAKE_GENERATE_PROJECT, QMAKE_GENERATE_MAKEFILE,
86 QMAKE_GENERATE_PRL }; 89 QMAKE_GENERATE_PRL, QMAKE_SET_PROPERTY, QMAKE_QUERY_PROPERTY };
87 static QMAKE_MODE qmake_mode; 90 static QMAKE_MODE qmake_mode;
88 91
89 //all modes 92 //all modes
@@ -96,6 +99,12 @@ struct Option
96 static TARG_MODE target_mode; 99 static TARG_MODE target_mode;
97 static QString user_template, user_template_prefix; 100 static QString user_template, user_template_prefix;
98 101
102
103 //QMAKE_*_PROPERTY options
104 struct prop {
105 static QStringList properties;
106 };
107
99 //QMAKE_GENERATE_PROJECT options 108 //QMAKE_GENERATE_PROJECT options
100 struct projfile { 109 struct projfile {
101 static bool do_pwd; 110 static bool do_pwd;
@@ -118,7 +127,7 @@ struct Option
118 }; 127 };
119 128
120private: 129private:
121 static bool internalParseCommandLine(int, char **, int=0); 130 static int internalParseCommandLine(int, char **, int=0);
122}; 131};
123 132
124 133
diff --git a/qmake/project.cpp b/qmake/project.cpp
index 834823d..8aa6ff7 100644
--- a/qmake/project.cpp
+++ b/qmake/project.cpp
@@ -1,13 +1,11 @@
1/**************************************************************************** 1/****************************************************************************
2** $Id$
3** 2**
4** Definition of ________ class.
5** 3**
6** Created : 970521 4** Implementation of QMakeProject class.
7** 5**
8** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. 6** Copyright (C) 1992-2003 Trolltech AS. All rights reserved.
9** 7**
10** This file is part of the network module of the Qt GUI Toolkit. 8** This file is part of qmake.
11** 9**
12** This file may be distributed under the terms of the Q Public License 10** This file may be distributed under the terms of the Q Public License
13** as defined by Trolltech AS of Norway and appearing in the file 11** as defined by Trolltech AS of Norway and appearing in the file
@@ -36,6 +34,7 @@
36**********************************************************************/ 34**********************************************************************/
37 35
38#include "project.h" 36#include "project.h"
37#include "property.h"
39#include "option.h" 38#include "option.h"
40#include <qfile.h> 39#include <qfile.h>
41#include <qdir.h> 40#include <qdir.h>
@@ -58,32 +57,91 @@ struct parser_info {
58 QString file; 57 QString file;
59 int line_no; 58 int line_no;
60} parser; 59} parser;
60
61static void qmake_error_msg(const char *msg) 61static void qmake_error_msg(const char *msg)
62{ 62{
63 fprintf(stderr, "%s:%d: %s\n", parser.file.latin1(), parser.line_no, msg); 63 fprintf(stderr, "%s:%d: %s\n", parser.file.latin1(), parser.line_no, msg);
64} 64}
65 65
66QStringList qmake_mkspec_paths()
67{
68 QStringList ret;
69 const QString concat = QDir::separator() + QString("mkspecs");
70 if(const char *qmakepath = getenv("QMAKEPATH")) {
71#ifdef Q_OS_WIN
72 QStringList lst = QStringList::split(';', qmakepath);
73 for(QStringList::Iterator it = lst.begin(); it != lst.end(); ++it) {
74 QStringList lst2 = QStringList::split(':', (*it));
75 for(QStringList::Iterator it2 = lst2.begin(); it2 != lst2.end(); ++it2)
76 ret << ((*it2) + concat);
77 }
78#else
79 QStringList lst = QStringList::split(':', qmakepath);
80 for(QStringList::Iterator it = lst.begin(); it != lst.end(); ++it)
81 ret << ((*it) + concat);
82#endif
83 }
84 if(const char *qtdir = getenv("QTDIR"))
85 ret << (QString(qtdir) + concat);
86#ifdef QT_INSTALL_PREFIX
87 ret << (QT_INSTALL_PREFIX + concat);
88#endif
89#if defined(HAVE_QCONFIG_CPP)
90 ret << (qInstallPath() + concat);
91#endif
92#ifdef QT_INSTALL_DATA
93 ret << (QT_INSTALL_DATA + concat);
94#endif
95#if defined(HAVE_QCONFIG_CPP)
96 ret << (qInstallPathData() + concat);
97#endif
98
99 /* prefer $QTDIR if it is set */
100 if (getenv("QTDIR"))
101 ret << getenv("QTDIR");
102 ret << qInstallPathData();
103 return ret;
104}
105
66static QString varMap(const QString &x) 106static QString varMap(const QString &x)
67{ 107{
68 QString ret(x); 108 QString ret(x);
69 if(ret.startsWith("TMAKE")) //tmake no more! 109 if(ret.startsWith("TMAKE")) //tmake no more!
70 ret = "QMAKE" + ret.mid(5); 110 ret = "QMAKE" + ret.mid(5);
71 if(ret == "INTERFACES") 111 else if(ret == "INTERFACES")
72 ret = "FORMS"; 112 ret = "FORMS";
73 if(ret == "QMAKE_POST_BUILD") 113 else if(ret == "QMAKE_POST_BUILD")
74 ret = "QMAKE_POST_LINK"; 114 ret = "QMAKE_POST_LINK";
75 if(ret == "TARGETDEPS") 115 else if(ret == "TARGETDEPS")
76 ret = "POST_TARGETDEPS"; 116 ret = "POST_TARGETDEPS";
117 else if(ret == "LIBPATH")
118 ret = "QMAKE_LIBDIR";
119 else if(ret == "QMAKE_EXT_MOC")
120 ret = "QMAKE_EXT_CPP_MOC";
121 else if(ret == "QMAKE_MOD_MOC")
122 ret = "QMAKE_H_MOD_MOC";
123 else if(ret == "QMAKE_LFLAGS_SHAPP")
124 ret = "QMAKE_LFLAGS_APP";
125 else if(ret == "PRECOMPH")
126 ret = "PRECOMPILED_HEADER";
127 else if(ret == "PRECOMPCPP")
128 ret = "PRECOMPILED_SOURCE";
129 else if(ret == "INCPATH")
130 ret = "INCLUDEPATH";
77 return ret; 131 return ret;
78} 132}
79 133
80static QStringList split_arg_list(const QString &params) 134static QStringList split_arg_list(const QString &params)
81{ 135{
82 QStringList args;
83 int last = 0, parens = 0;
84 QChar quote = 0; 136 QChar quote = 0;
85 for(int x = 0; x < (int)params.length(); x++) { 137 QStringList args;
86 if(params[x] == ')') { 138 for(int x = 0, last = 0, parens = 0; x <= (int)params.length(); x++) {
139 if(x == (int)params.length()) {
140 QString mid = params.mid(last, x - last).stripWhiteSpace();
141 if(mid[(int)mid.length()-1] == quote)
142 mid.truncate(1);
143 args << mid;
144 } else if(params[x] == ')') {
87 parens--; 145 parens--;
88 } else if(params[x] == '(') { 146 } else if(params[x] == '(') {
89 parens++; 147 parens++;
@@ -92,45 +150,62 @@ static QStringList split_arg_list(const QString &params)
92 } else if(params[x] == '\'' || params[x] == '"') { 150 } else if(params[x] == '\'' || params[x] == '"') {
93 quote = params[x]; 151 quote = params[x];
94 } else if(!parens && !quote && params[x] == ',') { 152 } else if(!parens && !quote && params[x] == ',') {
95 args << params.mid(last, x - last); 153 args << params.mid(last, x - last).stripWhiteSpace();
96 last = x+1; 154 last = x+1;
97 } 155 }
98 } 156 }
99 if(last != (int)params.length())
100 args << params.mid(last);
101 return args; 157 return args;
102} 158}
103 159
104static QStringList split_value_list(const QString &vals, bool do_semicolon=FALSE) 160static QStringList split_value_list(const QString &vals, bool do_semicolon=FALSE)
105{ 161{
106 int last = 0; 162 QString build;
107 QStringList ret; 163 QStringList ret;
108 QValueStack<QChar> quote; 164 QValueStack<QChar> quote;
109 for(int x = 0; x < (int)vals.length(); x++) { 165 for(int x = 0; x < (int)vals.length(); x++) {
110 if(!quote.isEmpty() && vals[x] == quote.top()) { 166 if(x != (int)vals.length()-1 && vals[x] == '\\' && (vals[x+1] == '\'' || vals[x+1] == '"'))
167 build += vals[x++]; //get that 'escape'
168 else if(!quote.isEmpty() && vals[x] == quote.top())
111 quote.pop(); 169 quote.pop();
112 } else if(vals[x] == '\'' || vals[x] == '"') { 170 else if(vals[x] == '\'' || vals[x] == '"')
113 quote.push(vals[x]); 171 quote.push(vals[x]);
114 } else if(quote.isEmpty() && 172
115 ((do_semicolon && vals[x] == ';') || vals[x] == ' ')) { 173 if(quote.isEmpty() && ((do_semicolon && vals[x] == ';') || vals[x] == ' ')) {
116 ret << vals.mid(last, x - last); 174 ret << build;
117 last = x+1; 175 build = "";
176 } else {
177 build += vals[x];
118 } 178 }
119 } 179 }
120 if(last != (int)vals.length()) 180 if(!build.isEmpty())
121 ret << vals.mid(last); 181 ret << build;
122 return ret; 182 return ret;
123} 183}
124 184
125QMakeProject::QMakeProject() 185QMakeProject::QMakeProject()
126{ 186{
187 prop = NULL;
188}
189
190QMakeProject::QMakeProject(QMakeProperty *p)
191{
192 prop = p;
193}
194
195void
196QMakeProject::reset()
197{
198 /* scope blocks start at true */
199 test_status = TestNone;
200 scope_flag = 0x01;
201 scope_block = 0;
127} 202}
128 203
129bool 204bool
130QMakeProject::parse(const QString &t, QMap<QString, QStringList> &place) 205QMakeProject::parse(const QString &t, QMap<QString, QStringList> &place)
131{ 206{
132 QString s = t.simplifyWhiteSpace(); 207 QString s = t.simplifyWhiteSpace();
133 int hash_mark = s.find('#'); 208 int hash_mark = s.find("#");
134 if(hash_mark != -1) //good bye comments 209 if(hash_mark != -1) //good bye comments
135 s = s.left(hash_mark); 210 s = s.left(hash_mark);
136 if(s.isEmpty()) /* blank_line */ 211 if(s.isEmpty()) /* blank_line */
@@ -147,7 +222,7 @@ QMakeProject::parse(const QString &t, QMap<QString, QStringList> &place)
147 } 222 }
148 if(!(scope_flag & (0x01 << scope_block))) { 223 if(!(scope_flag & (0x01 << scope_block))) {
149 /* adjust scope for each block which appears on a single line */ 224 /* adjust scope for each block which appears on a single line */
150 for(int i = (s.contains('{')-s.contains('}')); i; i--) 225 for(int i = (s.contains('{')-s.contains('}')); i>0; i--)
151 scope_flag &= ~(0x01 << (++scope_block)); 226 scope_flag &= ~(0x01 << (++scope_block));
152 debug_msg(1, "Project Parser: %s:%d : Ignored due to block being false.", 227 debug_msg(1, "Project Parser: %s:%d : Ignored due to block being false.",
153 parser.file.latin1(), parser.line_no); 228 parser.file.latin1(), parser.line_no);
@@ -228,7 +303,7 @@ QMakeProject::parse(const QString &t, QMap<QString, QStringList> &place)
228 return TRUE; /* assume we are done */ 303 return TRUE; /* assume we are done */
229 } 304 }
230 } else { 305 } else {
231 test = isActiveConfig(comp_scope.stripWhiteSpace(), TRUE); 306 test = isActiveConfig(comp_scope.stripWhiteSpace(), TRUE, &place);
232 } 307 }
233 if(invert_test) 308 if(invert_test)
234 test = !test; 309 test = !test;
@@ -248,11 +323,20 @@ QMakeProject::parse(const QString &t, QMap<QString, QStringList> &place)
248 debug_msg(1, "Project Parser: %s:%d : Entering block %d (%d).", parser.file.latin1(), 323 debug_msg(1, "Project Parser: %s:%d : Entering block %d (%d).", parser.file.latin1(),
249 parser.line_no, scope_block, !scope_failed); 324 parser.line_no, scope_block, !scope_failed);
250 } 325 }
326 } else if(!parens && *d == '}') {
327 if(!scope_block) {
328 warn_msg(WarnParser, "Possible braces mismatch %s:%d", parser.file.latin1(), parser.line_no);
329 } else {
330 debug_msg(1, "Project Parser: %s:%d : Leaving block %d", parser.file.latin1(),
331 parser.line_no, scope_block);
332 --scope_block;
333 }
251 } else { 334 } else {
252 var += *d; 335 var += *d;
253 } 336 }
254 d++; 337 d++;
255 } 338 }
339 var = var.stripWhiteSpace();
256 if(!scope_count || (scope_count == 1 && else_line)) 340 if(!scope_count || (scope_count == 1 && else_line))
257 test_status = TestNone; 341 test_status = TestNone;
258 else if(!else_line || test_status != TestFound) 342 else if(!else_line || test_status != TestFound)
@@ -260,13 +344,14 @@ QMakeProject::parse(const QString &t, QMap<QString, QStringList> &place)
260 if(scope_failed) 344 if(scope_failed)
261 return TRUE; /* oh well */ 345 return TRUE; /* oh well */
262 if(!*d) { 346 if(!*d) {
263 if(!var.isEmpty()) 347 if(!var.stripWhiteSpace().isEmpty())
264 qmake_error_msg("Parse Error ('" + s + "')"); 348 qmake_error_msg("Parse Error ('" + s + "')");
265 return var.isEmpty(); /* allow just a scope */ 349 return var.isEmpty(); /* allow just a scope */
266 } 350 }
267 351
268 SKIP_WS(d); 352 SKIP_WS(d);
269 for( ; *d && op.find('=') == -1; op += *(d++)); 353 for( ; *d && op.find('=') == -1; op += *(d++))
354 ;
270 op.replace(QRegExp("\\s"), ""); 355 op.replace(QRegExp("\\s"), "");
271 356
272 SKIP_WS(d); 357 SKIP_WS(d);
@@ -284,16 +369,15 @@ QMakeProject::parse(const QString &t, QMap<QString, QStringList> &place)
284 } 369 }
285 doVariableReplace(vals, place); 370 doVariableReplace(vals, place);
286 371
287 var = var.stripWhiteSpace();
288#undef SKIP_WS 372#undef SKIP_WS
289 373
290 if(!var.isEmpty() && Option::mkfile::do_preprocess) { 374 if(!var.isEmpty() && Option::mkfile::do_preprocess) {
291 static QString last_file("*none*"); 375 static QString last_file("*none*");
292 if(parser.file != last_file) { 376 if(parser.file != last_file) {
293 fprintf(stderr, "#file %s:%d\n", parser.file.latin1(), parser.line_no); 377 fprintf(stdout, "#file %s:%d\n", parser.file.latin1(), parser.line_no);
294 last_file = parser.file; 378 last_file = parser.file;
295 } 379 }
296 fprintf(stderr, "%s %s %s\n", var.latin1(), op.latin1(), vals.latin1()); 380 fprintf(stdout, "%s %s %s\n", var.latin1(), op.latin1(), vals.latin1());
297 } 381 }
298 var = varMap(var); //backwards compatability 382 var = varMap(var); //backwards compatability
299 383
@@ -305,7 +389,7 @@ QMakeProject::parse(const QString &t, QMap<QString, QStringList> &place)
305 389
306 QStringList &varlist = place[var]; /* varlist is the list in the symbol table */ 390 QStringList &varlist = place[var]; /* varlist is the list in the symbol table */
307 debug_msg(1, "Project Parser: %s:%d :%s: :%s: (%s)", parser.file.latin1(), parser.line_no, 391 debug_msg(1, "Project Parser: %s:%d :%s: :%s: (%s)", parser.file.latin1(), parser.line_no,
308 var.latin1(), op.latin1(), vallist.join(" :: ").latin1()); 392 var.latin1(), op.latin1(), vallist.isEmpty() ? "" : vallist.join(" :: ").latin1());
309 393
310 /* now do the operation */ 394 /* now do the operation */
311 if(op == "~=") { 395 if(op == "~=") {
@@ -369,10 +453,7 @@ bool
369QMakeProject::read(const QString &file, QMap<QString, QStringList> &place) 453QMakeProject::read(const QString &file, QMap<QString, QStringList> &place)
370{ 454{
371 parser_info pi = parser; 455 parser_info pi = parser;
372 /* scope blocks start at true */ 456 reset();
373 test_status = TestNone;
374 scope_flag = 0x01;
375 scope_block = 0;
376 457
377 QString filename = Option::fixPathToLocalOS(file); 458 QString filename = Option::fixPathToLocalOS(file);
378 doVariableReplace(filename, place); 459 doVariableReplace(filename, place);
@@ -395,14 +476,15 @@ QMakeProject::read(const QString &file, QMap<QString, QStringList> &place)
395 parser.line_no++; 476 parser.line_no++;
396 line = t.readLine().stripWhiteSpace(); 477 line = t.readLine().stripWhiteSpace();
397 int prelen = line.length(); 478 int prelen = line.length();
398 { 479
399 int hash_mark = line.find('#'); 480 int hash_mark = line.find("#");
400 if(hash_mark != -1) //bye comments 481 if(hash_mark != -1) //good bye comments
401 line = line.left(hash_mark); 482 line = line.left(hash_mark);
402 }
403 if(!line.isEmpty() && line.right(1) == "\\") { 483 if(!line.isEmpty() && line.right(1) == "\\") {
484 if (!line.startsWith("#")) {
404 line.truncate(line.length() - 1); 485 line.truncate(line.length() - 1);
405 s += line + " "; 486 s += line + " ";
487 }
406 } else if(!line.isEmpty() || (line.isEmpty() && !prelen)) { 488 } else if(!line.isEmpty() || (line.isEmpty() && !prelen)) {
407 if(s.isEmpty() && line.isEmpty()) 489 if(s.isEmpty() && line.isEmpty())
408 continue; 490 continue;
@@ -419,19 +501,22 @@ QMakeProject::read(const QString &file, QMap<QString, QStringList> &place)
419 qfile.close(); 501 qfile.close();
420 } 502 }
421 parser = pi; 503 parser = pi;
504 if(scope_block != 0)
505 warn_msg(WarnParser, "%s: Unterminated conditional at end of file.",
506 file.latin1());
422 return ret; 507 return ret;
423} 508}
424 509
425bool 510bool
426QMakeProject::read(const QString &project, const QString &, bool just_project) 511QMakeProject::read(const QString &project, const QString &, uchar cmd)
427{ 512{
428 if(just_project) { //nothing more, nothing less
429 pfile = project; 513 pfile = project;
430 if(pfile != "-" && !QFile::exists(pfile) && pfile.right(4) != ".pro") 514 return read(cmd);
431 pfile += ".pro";
432 return read(pfile, vars);
433 } 515 }
434 516
517bool
518QMakeProject::read(uchar cmd)
519{
435 if(cfile.isEmpty()) { 520 if(cfile.isEmpty()) {
436 // hack to get the Option stuff in there 521 // hack to get the Option stuff in there
437 base_vars["QMAKE_EXT_CPP"] = Option::cpp_ext; 522 base_vars["QMAKE_EXT_CPP"] = Option::cpp_ext;
@@ -439,8 +524,7 @@ QMakeProject::read(const QString &project, const QString &, bool just_project)
439 if(!Option::user_template_prefix.isEmpty()) 524 if(!Option::user_template_prefix.isEmpty())
440 base_vars["TEMPLATE_PREFIX"] = Option::user_template_prefix; 525 base_vars["TEMPLATE_PREFIX"] = Option::user_template_prefix;
441 526
442 /* parse the cache */ 527 if(cmd & ReadCache && Option::mkfile::do_cache) {/* parse the cache */
443 if(Option::mkfile::do_cache) {
444 if(Option::mkfile::cachefile.isEmpty()) { //find it as it has not been specified 528 if(Option::mkfile::cachefile.isEmpty()) { //find it as it has not been specified
445 QString dir = QDir::convertSeparators(Option::output_dir); 529 QString dir = QDir::convertSeparators(Option::output_dir);
446 while(!QFile::exists((Option::mkfile::cachefile = dir + 530 while(!QFile::exists((Option::mkfile::cachefile = dir +
@@ -462,16 +546,11 @@ QMakeProject::read(const QString &project, const QString &, bool just_project)
462 Option::mkfile::qmakespec = cache["QMAKESPEC"].first(); 546 Option::mkfile::qmakespec = cache["QMAKESPEC"].first();
463 } 547 }
464 } 548 }
465 /* parse mkspec */ 549 if(cmd & ReadConf) { /* parse mkspec */
466 QStringList mkspec_roots; 550 QStringList mkspec_roots = qmake_mkspec_paths();
467 /* prefer $QTDIR if it is set */
468 if (getenv("QTDIR"))
469 mkspec_roots << getenv("QTDIR");
470 mkspec_roots << qInstallPathData();
471 if(Option::mkfile::qmakespec.isEmpty()) { 551 if(Option::mkfile::qmakespec.isEmpty()) {
472 for(QStringList::Iterator it = mkspec_roots.begin(); it != mkspec_roots.end(); ++it) { 552 for(QStringList::Iterator it = mkspec_roots.begin(); it != mkspec_roots.end(); ++it) {
473 QString mkspec = (*it) + QDir::separator() + QString("mkspecs") + 553 QString mkspec = (*it) + QDir::separator() + "default";
474 QDir::separator() + "default";
475 if(QFile::exists(mkspec)) { 554 if(QFile::exists(mkspec)) {
476 Option::mkfile::qmakespec = mkspec; 555 Option::mkfile::qmakespec = mkspec;
477 break; 556 break;
@@ -486,8 +565,7 @@ QMakeProject::read(const QString &project, const QString &, bool just_project)
486 if(QDir::isRelativePath(Option::mkfile::qmakespec)) { 565 if(QDir::isRelativePath(Option::mkfile::qmakespec)) {
487 bool found_mkspec = FALSE; 566 bool found_mkspec = FALSE;
488 for(QStringList::Iterator it = mkspec_roots.begin(); it != mkspec_roots.end(); ++it) { 567 for(QStringList::Iterator it = mkspec_roots.begin(); it != mkspec_roots.end(); ++it) {
489 QString mkspec = (*it) + QDir::separator() + QString("mkspecs") + 568 QString mkspec = (*it) + QDir::separator() + Option::mkfile::qmakespec;
490 QDir::separator() + Option::mkfile::qmakespec;
491 if(QFile::exists(mkspec)) { 569 if(QFile::exists(mkspec)) {
492 found_mkspec = TRUE; 570 found_mkspec = TRUE;
493 Option::mkfile::qmakespec = mkspec; 571 Option::mkfile::qmakespec = mkspec;
@@ -502,7 +580,12 @@ QMakeProject::read(const QString &project, const QString &, bool just_project)
502 } 580 }
503 581
504 /* parse qmake configuration */ 582 /* parse qmake configuration */
583 while(Option::mkfile::qmakespec.endsWith(QString(QChar(QDir::separator()))))
584 Option::mkfile::qmakespec.truncate(Option::mkfile::qmakespec.length()-1);
505 QString spec = Option::mkfile::qmakespec + QDir::separator() + "qmake.conf"; 585 QString spec = Option::mkfile::qmakespec + QDir::separator() + "qmake.conf";
586 if(!QFile::exists(spec) &&
587 QFile::exists(Option::mkfile::qmakespec + QDir::separator() + "tmake.conf"))
588 spec = Option::mkfile::qmakespec + QDir::separator() + "tmake.conf";
506 debug_msg(1, "QMAKESPEC conf: reading %s", spec.latin1()); 589 debug_msg(1, "QMAKESPEC conf: reading %s", spec.latin1());
507 if(!read(spec, base_vars)) { 590 if(!read(spec, base_vars)) {
508 fprintf(stderr, "Failure to read QMAKESPEC conf file %s.\n", spec.latin1()); 591 fprintf(stderr, "Failure to read QMAKESPEC conf file %s.\n", spec.latin1());
@@ -512,11 +595,13 @@ QMakeProject::read(const QString &project, const QString &, bool just_project)
512 debug_msg(1, "QMAKECACHE file: reading %s", Option::mkfile::cachefile.latin1()); 595 debug_msg(1, "QMAKECACHE file: reading %s", Option::mkfile::cachefile.latin1());
513 read(Option::mkfile::cachefile, base_vars); 596 read(Option::mkfile::cachefile, base_vars);
514 } 597 }
515 598 }
599 if(cmd & ReadCmdLine) {
516 /* commandline */ 600 /* commandline */
517 cfile = project; 601 cfile = pfile;
518 parser.line_no = 1; //really arg count now.. duh 602 parser.line_no = 1; //really arg count now.. duh
519 parser.file = "(internal)"; 603 parser.file = "(internal)";
604 reset();
520 for(QStringList::Iterator it = Option::before_user_vars.begin(); 605 for(QStringList::Iterator it = Option::before_user_vars.begin();
521 it != Option::before_user_vars.end(); ++it) { 606 it != Option::before_user_vars.end(); ++it) {
522 if(!parse((*it), base_vars)) { 607 if(!parse((*it), base_vars)) {
@@ -526,20 +611,28 @@ QMakeProject::read(const QString &project, const QString &, bool just_project)
526 parser.line_no++; 611 parser.line_no++;
527 } 612 }
528 } 613 }
614 }
529 615
530 /* parse project file */
531 debug_msg(1, "Project file: reading %s", project.latin1());
532 vars = base_vars; /* start with the base */ 616 vars = base_vars; /* start with the base */
533 617
534 pfile = project; 618 if(cmd & ReadProFile) { /* parse project file */
535 if(pfile != "-" && !QFile::exists(pfile) && pfile.right(4) != ".pro") 619 debug_msg(1, "Project file: reading %s", pfile.latin1());
620 if(pfile != "-" && !QFile::exists(pfile) && !pfile.endsWith(".pro"))
536 pfile += ".pro"; 621 pfile += ".pro";
537
538 if(!read(pfile, vars)) 622 if(!read(pfile, vars))
539 return FALSE; 623 return FALSE;
624 }
540 625
626 if(cmd & ReadPostFiles) { /* parse post files */
627 const QStringList l = vars["QMAKE_POST_INCLUDE_FILES"];
628 for(QStringList::ConstIterator it = l.begin(); it != l.end(); ++it)
629 read((*it), vars);
630 }
631
632 if(cmd & ReadCmdLine) {
541 parser.line_no = 1; //really arg count now.. duh 633 parser.line_no = 1; //really arg count now.. duh
542 parser.file = "(internal)"; 634 parser.file = "(internal)";
635 reset();
543 for(QStringList::Iterator it = Option::after_user_vars.begin(); 636 for(QStringList::Iterator it = Option::after_user_vars.begin();
544 it != Option::after_user_vars.end(); ++it) { 637 it != Option::after_user_vars.end(); ++it) {
545 if(!parse((*it), vars)) { 638 if(!parse((*it), vars)) {
@@ -548,10 +641,12 @@ QMakeProject::read(const QString &project, const QString &, bool just_project)
548 } 641 }
549 parser.line_no++; 642 parser.line_no++;
550 } 643 }
644 }
551 645
552 /* now let the user override the template from an option.. */ 646 /* now let the user override the template from an option.. */
553 if(!Option::user_template.isEmpty()) { 647 if(!Option::user_template.isEmpty()) {
554 debug_msg(1, "Overriding TEMPLATE (%s) with: %s", vars["TEMPLATE"].first().latin1(), Option::user_template.latin1()); 648 debug_msg(1, "Overriding TEMPLATE (%s) with: %s", vars["TEMPLATE"].first().latin1(),
649 Option::user_template.latin1());
555 vars["TEMPLATE"].clear(); 650 vars["TEMPLATE"].clear();
556 vars["TEMPLATE"].append(Option::user_template); 651 vars["TEMPLATE"].append(Option::user_template);
557 } 652 }
@@ -561,9 +656,8 @@ QMakeProject::read(const QString &project, const QString &, bool just_project)
561 templ.append(QString("app")); 656 templ.append(QString("app"));
562 else if(vars["TEMPLATE"].first().endsWith(".t")) 657 else if(vars["TEMPLATE"].first().endsWith(".t"))
563 templ = QStringList(templ.first().left(templ.first().length() - 2)); 658 templ = QStringList(templ.first().left(templ.first().length() - 2));
564 if ( !Option::user_template_prefix.isEmpty() ) { 659 if ( !Option::user_template_prefix.isEmpty() )
565 templ.first().prepend(Option::user_template_prefix); 660 templ.first().prepend(Option::user_template_prefix);
566 }
567 661
568 if(vars["TARGET"].isEmpty()) { 662 if(vars["TARGET"].isEmpty()) {
569 // ### why not simply use: 663 // ### why not simply use:
@@ -593,7 +687,7 @@ QMakeProject::read(const QString &project, const QString &, bool just_project)
593} 687}
594 688
595bool 689bool
596QMakeProject::isActiveConfig(const QString &x, bool regex) 690QMakeProject::isActiveConfig(const QString &x, bool regex, QMap<QString, QStringList> *place)
597{ 691{
598 if(x.isEmpty()) 692 if(x.isEmpty())
599 return TRUE; 693 return TRUE;
@@ -637,7 +731,7 @@ QMakeProject::isActiveConfig(const QString &x, bool regex)
637#endif 731#endif
638 732
639 733
640 QStringList &configs = vars["CONFIG"]; 734 QStringList &configs = (place ? (*place)["CONFIG"] : vars["CONFIG"]);
641 for(QStringList::Iterator it = configs.begin(); it != configs.end(); ++it) { 735 for(QStringList::Iterator it = configs.begin(); it != configs.end(); ++it) {
642 if((regex && re.exactMatch((*it))) || (!regex && (*it) == x)) 736 if((regex && re.exactMatch((*it))) || (!regex && (*it) == x))
643 if(re.exactMatch((*it))) 737 if(re.exactMatch((*it)))
@@ -777,7 +871,10 @@ QMakeProject::doProjectTest(const QString& func, QStringList args, QMap<QString,
777 } 871 }
778 return vars[args[0]].isEmpty(); 872 return vars[args[0]].isEmpty();
779 } else if(func == "include" || func == "load") { 873 } else if(func == "include" || func == "load") {
780 if(args.count() != 1) { 874 QString seek_var;
875 if(args.count() == 2 && func == "include") {
876 seek_var = args[1];
877 } else if(args.count() != 1) {
781 QString func_desc = "include(file)"; 878 QString func_desc = "include(file)";
782 if(func == "load") 879 if(func == "load")
783 func_desc = "load(feature)"; 880 func_desc = "load(feature)";
@@ -794,22 +891,50 @@ QMakeProject::doProjectTest(const QString& func, QStringList args, QMap<QString,
794 if(!file.endsWith(Option::prf_ext)) 891 if(!file.endsWith(Option::prf_ext))
795 file += Option::prf_ext; 892 file += Option::prf_ext;
796 if(file.find(Option::dir_sep) == -1 || !QFile::exists(file)) { 893 if(file.find(Option::dir_sep) == -1 || !QFile::exists(file)) {
797 if(QFile::exists(Option::mkfile::qmakespec + QDir::separator() + file)) {
798 file.prepend(Option::mkfile::qmakespec + QDir::separator());
799 } else {
800 bool found = FALSE; 894 bool found = FALSE;
895 const QString concat = QDir::separator() + QString("mkspecs") +
896 QDir::separator() + QString("features");
801 QStringList feature_roots; 897 QStringList feature_roots;
802 if(getenv("QTDIR")) 898 if(const char *mkspec_path = getenv("QMAKEFEATURES")) {
803 feature_roots << getenv("QTDIR"); 899#ifdef Q_OS_WIN
900 QStringList lst = QStringList::split(';', mkspec_path);
901 for(QStringList::Iterator it = lst.begin(); it != lst.end(); ++it)
902 feature_roots += QStringList::split(':', (*it));
903#else
904 feature_roots += QStringList::split(':', mkspec_path);
905#endif
906 }
907 if(const char *qmakepath = getenv("QMAKEPATH")) {
908#ifdef Q_OS_WIN
909 QStringList lst = QStringList::split(';', qmakepath);
910 for(QStringList::Iterator it = lst.begin(); it != lst.end(); ++it) {
911 QStringList lst2 = QStringList::split(':', (*it));
912 for(QStringList::Iterator it2 = lst2.begin(); it2 != lst2.end(); ++it2)
913 feature_roots << ((*it2) + concat);
914 }
915#else
916 QStringList lst = QStringList::split(':', qmakepath);
917 for(QStringList::Iterator it = lst.begin(); it != lst.end(); ++it)
918 feature_roots << ((*it) + concat);
919#endif
920 }
921 feature_roots << Option::mkfile::qmakespec;
922 if(const char *qtdir = getenv("QTDIR"))
923 feature_roots << (qtdir + concat);
804#ifdef QT_INSTALL_PREFIX 924#ifdef QT_INSTALL_PREFIX
805 feature_roots << QT_INSTALL_PREFIX; 925 feature_roots << (QT_INSTALL_PREFIX + concat);
926#endif
927#if defined(HAVE_QCONFIG_CPP)
928 feature_roots << (qInstallPath() + concat);
806#endif 929#endif
807#ifdef QT_INSTALL_DATA 930#ifdef QT_INSTALL_DATA
808 feature_roots << QT_INSTALL_DATA; 931 feature_roots << (QT_INSTALL_DATA + concat);
932#endif
933#if defined(HAVE_QCONFIG_CPP)
934 feature_roots << (qInstallPathData() + concat);
809#endif 935#endif
810 for(QStringList::Iterator it = feature_roots.begin(); it != feature_roots.end(); ++it) { 936 for(QStringList::Iterator it = feature_roots.begin(); it != feature_roots.end(); ++it) {
811 QString prf = (*it) + QDir::separator() + QString("mkspecs") + 937 QString prf = (*it) + QDir::separator() + file;
812 QDir::separator() + QString("features") + QDir::separator() + file;
813 if(QFile::exists(prf)) { 938 if(QFile::exists(prf)) {
814 found = TRUE; 939 found = TRUE;
815 file = prf; 940 file = prf;
@@ -822,23 +947,59 @@ QMakeProject::doProjectTest(const QString& func, QStringList args, QMap<QString,
822 } 947 }
823 } 948 }
824 } 949 }
950 if(QDir::isRelativePath(file)) {
951 QStringList include_roots;
952 include_roots << Option::output_dir;
953 QString pfilewd = QFileInfo(parser.file).dirPath();
954 if(pfilewd.isEmpty())
955 include_roots << pfilewd;
956 if(Option::output_dir != QDir::currentDirPath())
957 include_roots << QDir::currentDirPath();
958 for(QStringList::Iterator it = include_roots.begin(); it != include_roots.end(); ++it) {
959 if(QFile::exists((*it) + QDir::separator() + file)) {
960 file = (*it) + QDir::separator() + file;
961 break;
962 }
963 }
825 } 964 }
826 965
966 if(Option::mkfile::do_preprocess) //nice to see this first..
967 fprintf(stderr, "#switching file %s(%s) - %s:%d\n", func.latin1(), file.latin1(),
968 parser.file.latin1(), parser.line_no);
827 debug_msg(1, "Project Parser: %s'ing file %s.", func.latin1(), file.latin1()); 969 debug_msg(1, "Project Parser: %s'ing file %s.", func.latin1(), file.latin1());
970 QString orig_file = file;
971 int di = file.findRev(Option::dir_sep);
972 QDir sunworkshop42workaround = QDir::current();
973 QString oldpwd = sunworkshop42workaround.currentDirPath();
974 if(di != -1) {
975 if(!QDir::setCurrent(file.left(file.findRev(Option::dir_sep)))) {
976 fprintf(stderr, "Cannot find directory: %s\n", file.left(di).latin1());
977 return FALSE;
978 }
979 file = file.right(file.length() - di - 1);
980 }
828 parser_info pi = parser; 981 parser_info pi = parser;
829 int sb = scope_block; 982 int sb = scope_block;
830 int sf = scope_flag; 983 int sf = scope_flag;
831 TestStatus sc = test_status; 984 TestStatus sc = test_status;
832 bool r = read(file.latin1(), place); 985 bool r = FALSE;
986 if(!seek_var.isNull()) {
987 QMap<QString, QStringList> tmp;
988 if((r = read(file.latin1(), tmp)))
989 place[seek_var] += tmp[seek_var];
990 } else {
991 r = read(file.latin1(), place);
992 }
833 if(r) 993 if(r)
834 vars["QMAKE_INTERNAL_INCLUDED_FILES"].append(file); 994 vars["QMAKE_INTERNAL_INCLUDED_FILES"].append(orig_file);
835 else 995 else
836 warn_msg(WarnParser, "%s:%d: Failure to include file %s.", 996 warn_msg(WarnParser, "%s:%d: Failure to include file %s.",
837 pi.file.latin1(), pi.line_no, file.latin1()); 997 pi.file.latin1(), pi.line_no, orig_file.latin1());
838 parser = pi; 998 parser = pi;
839 test_status = sc; 999 test_status = sc;
840 scope_flag = sf; 1000 scope_flag = sf;
841 scope_block = sb; 1001 scope_block = sb;
1002 QDir::setCurrent(oldpwd);
842 return r; 1003 return r;
843 } else if(func == "error" || func == "message") { 1004 } else if(func == "error" || func == "message") {
844 if(args.count() != 1) { 1005 if(args.count() != 1) {
@@ -854,7 +1015,7 @@ QMakeProject::doProjectTest(const QString& func, QStringList args, QMap<QString,
854 msg.replace(QString("${QMAKE_DATE}"), QDateTime::currentDateTime().toString()); 1015 msg.replace(QString("${QMAKE_DATE}"), QDateTime::currentDateTime().toString());
855 doVariableReplace(msg, place); 1016 doVariableReplace(msg, place);
856 fixEnvVariables(msg); 1017 fixEnvVariables(msg);
857 printf("Project %s: %s\n", func.upper().latin1(), msg.latin1()); 1018 fprintf(stderr, "Project %s: %s\n", func.upper().latin1(), msg.latin1());
858 if(func == "message") 1019 if(func == "message")
859 return TRUE; 1020 return TRUE;
860 exit(2); 1021 exit(2);
@@ -890,7 +1051,7 @@ QMakeProject::doProjectCheckReqs(const QStringList &deps, QMap<QString, QStringL
890 test = doProjectTest(func, chk.mid(lparen+1, rparen - lparen - 1), place); 1051 test = doProjectTest(func, chk.mid(lparen+1, rparen - lparen - 1), place);
891 } 1052 }
892 } else { 1053 } else {
893 test = isActiveConfig(chk, TRUE); 1054 test = isActiveConfig(chk, TRUE, &place);
894 } 1055 }
895 if(invert_test) { 1056 if(invert_test) {
896 chk.prepend("!"); 1057 chk.prepend("!");
@@ -911,7 +1072,7 @@ QString
911QMakeProject::doVariableReplace(QString &str, const QMap<QString, QStringList> &place) 1072QMakeProject::doVariableReplace(QString &str, const QMap<QString, QStringList> &place)
912{ 1073{
913 for(int var_begin, var_last=0; (var_begin = str.find("$$", var_last)) != -1; var_last = var_begin) { 1074 for(int var_begin, var_last=0; (var_begin = str.find("$$", var_last)) != -1; var_last = var_begin) {
914 if(var_begin >= int( str.length() + 2 ) ) { 1075 if(var_begin >= (int)str.length() + 2) {
915 break; 1076 break;
916 } else if(var_begin != 0 && str[var_begin-1] == '\\') { 1077 } else if(var_begin != 0 && str[var_begin-1] == '\\') {
917 str.replace(var_begin-1, 1, ""); 1078 str.replace(var_begin-1, 1, "");
@@ -920,20 +1081,23 @@ QMakeProject::doVariableReplace(QString &str, const QMap<QString, QStringList> &
920 } 1081 }
921 1082
922 int var_incr = var_begin + 2; 1083 int var_incr = var_begin + 2;
923 bool in_braces = FALSE, as_env = FALSE; 1084 bool in_braces = FALSE, as_env = FALSE, as_prop = FALSE;
924 if(str[var_incr] == '{') { 1085 if(str[var_incr] == '{') {
925 in_braces = TRUE; 1086 in_braces = TRUE;
926 var_incr++; 1087 var_incr++;
927 while(var_incr < int( str.length() ) && 1088 while(var_incr < (int)str.length() &&
928 (str[var_incr] == ' ' || str[var_incr] == '\t' || str[var_incr] == '\n')) 1089 (str[var_incr] == ' ' || str[var_incr] == '\t' || str[var_incr] == '\n'))
929 var_incr++; 1090 var_incr++;
930 } 1091 }
931 if(str[var_incr] == '(') { 1092 if(str[var_incr] == '(') {
932 as_env = TRUE; 1093 as_env = TRUE;
933 var_incr++; 1094 var_incr++;
1095 } else if(str[var_incr] == '[') {
1096 as_prop = TRUE;
1097 var_incr++;
934 } 1098 }
935 QString val, args; 1099 QString val, args;
936 while(var_incr < int( str.length() ) && 1100 while(var_incr < (int)str.length() &&
937 (str[var_incr].isLetter() || str[var_incr].isNumber() || str[var_incr] == '.' || str[var_incr] == '_')) 1101 (str[var_incr].isLetter() || str[var_incr].isNumber() || str[var_incr] == '.' || str[var_incr] == '_'))
938 val += str[var_incr++]; 1102 val += str[var_incr++];
939 if(as_env) { 1103 if(as_env) {
@@ -941,13 +1105,24 @@ QMakeProject::doVariableReplace(QString &str, const QMap<QString, QStringList> &
941 var_incr++; 1105 var_incr++;
942 warn_msg(WarnParser, "%s:%d: Unterminated env-variable replacement '%s' (%s)", 1106 warn_msg(WarnParser, "%s:%d: Unterminated env-variable replacement '%s' (%s)",
943 parser.file.latin1(), parser.line_no, 1107 parser.file.latin1(), parser.line_no,
1108 str.mid(var_begin, QMAX(var_incr - var_begin,
1109 (int)str.length())).latin1(), str.latin1());
1110 var_begin += var_incr;
1111 continue;
1112 }
1113 var_incr++;
1114 } else if(as_prop) {
1115 if(str[var_incr] != ']') {
1116 var_incr++;
1117 warn_msg(WarnParser, "%s:%d: Unterminated prop-variable replacement '%s' (%s)",
1118 parser.file.latin1(), parser.line_no,
944 str.mid(var_begin, QMAX(var_incr - var_begin, int(str.length()))).latin1(), str.latin1()); 1119 str.mid(var_begin, QMAX(var_incr - var_begin, int(str.length()))).latin1(), str.latin1());
945 var_begin += var_incr; 1120 var_begin += var_incr;
946 continue; 1121 continue;
947 } 1122 }
948 var_incr++; 1123 var_incr++;
949 } else if(str[var_incr] == '(') { //args 1124 } else if(str[var_incr] == '(') { //args
950 for(int parens = 0; var_incr < int( str.length() ); var_incr++) { 1125 for(int parens = 0; var_incr < (int)str.length(); var_incr++) {
951 if(str[var_incr] == '(') { 1126 if(str[var_incr] == '(') {
952 parens++; 1127 parens++;
953 if(parens == 1) 1128 if(parens == 1)
@@ -962,11 +1137,12 @@ QMakeProject::doVariableReplace(QString &str, const QMap<QString, QStringList> &
962 args += str[var_incr]; 1137 args += str[var_incr];
963 } 1138 }
964 } 1139 }
965 if(var_incr > int( str.length() ) || (in_braces && str[var_incr] != '}')) { 1140 if(var_incr > (int)str.length() || (in_braces && str[var_incr] != '}')) {
966 var_incr++; 1141 var_incr++;
967 warn_msg(WarnParser, "%s:%d: Unterminated variable replacement '%s' (%s)", 1142 warn_msg(WarnParser, "%s:%d: Unterminated variable replacement '%s' (%s)",
968 parser.file.latin1(), parser.line_no, 1143 parser.file.latin1(), parser.line_no,
969 str.mid(var_begin, QMAX(var_incr - var_begin, int( str.length() ))).latin1(), str.latin1()); 1144 str.mid(var_begin, QMAX(var_incr - var_begin,
1145 (int)str.length())).latin1(), str.latin1());
970 var_begin += var_incr; 1146 var_begin += var_incr;
971 continue; 1147 continue;
972 } else if(in_braces) { 1148 } else if(in_braces) {
@@ -976,31 +1152,106 @@ QMakeProject::doVariableReplace(QString &str, const QMap<QString, QStringList> &
976 QString replacement; 1152 QString replacement;
977 if(as_env) { 1153 if(as_env) {
978 replacement = getenv(val); 1154 replacement = getenv(val);
1155 } else if(as_prop) {
1156 if(prop)
1157 replacement = prop->value(val);
979 } else if(args.isEmpty()) { 1158 } else if(args.isEmpty()) {
980 if(val.left(1) == ".") 1159 if(val.left(1) == ".")
981 replacement = ""; 1160 replacement = "";
982 else if(val == "LITERAL_WHITESPACE") 1161 else if(val == "LITERAL_WHITESPACE")
983 replacement = "\t"; 1162 replacement = "\t";
1163 else if(val == "LITERAL_DOLLAR")
1164 replacement = "$";
1165 else if(val == "LITERAL_HASH")
1166 replacement = "#";
1167 else if(val == "PWD")
1168 replacement = QDir::currentDirPath();
1169 else if(val == "DIR_SEPARATOR")
1170 replacement = Option::dir_sep;
984 else 1171 else
985 replacement = place[varMap(val)].join(" "); 1172 replacement = place[varMap(val)].join(" ");
986 } else { 1173 } else {
987 QStringList arg_list = split_arg_list(args); 1174 QStringList arg_list = split_arg_list(doVariableReplace(args, place));
988 for(QStringList::Iterator arit = arg_list.begin(); arit != arg_list.end(); ++arit) {
989 (*arit) = (*arit).stripWhiteSpace(); // blah, get rid of space
990 doVariableReplace((*arit), place);
991 }
992 debug_msg(1, "Running function: %s( %s )", val.latin1(), arg_list.join("::").latin1()); 1175 debug_msg(1, "Running function: %s( %s )", val.latin1(), arg_list.join("::").latin1());
993 if(val.lower() == "member") { 1176 if(val.lower() == "member") {
994 if(arg_list.count() < 1 || arg_list.count() > 2) { 1177 if(arg_list.count() < 1 || arg_list.count() > 3) {
995 fprintf(stderr, "%s:%d: member(var, place) requires two arguments.\n", 1178 fprintf(stderr, "%s:%d: member(var, start, end) requires three arguments.\n",
996 parser.file.latin1(), parser.line_no); 1179 parser.file.latin1(), parser.line_no);
997 } else { 1180 } else {
998 uint pos = 0;
999 if(arg_list.count() == 2)
1000 pos = arg_list[1].toInt();
1001 const QStringList &var = place[varMap(arg_list.first())]; 1181 const QStringList &var = place[varMap(arg_list.first())];
1002 if(var.count() >= pos) 1182 int start = 0;
1003 replacement = var[pos]; 1183 if(arg_list.count() >= 2)
1184 start = arg_list[1].toInt();
1185 if(start < 0)
1186 start += int(var.count());
1187 int end = start;
1188 if(arg_list.count() == 3)
1189 end = arg_list[2].toInt();
1190 if(end < 0)
1191 end += int(var.count());
1192 if(end < start)
1193 end = start;
1194 for(int i = start; i <= end && (int)var.count() >= i; i++) {
1195 if(!replacement.isEmpty())
1196 replacement += " ";
1197 replacement += var[i];
1198 }
1199 }
1200 } else if(val.lower() == "fromfile") {
1201 if(arg_list.count() != 2) {
1202 fprintf(stderr, "%s:%d: fromfile(file, variable) requires two arguments.\n",
1203 parser.file.latin1(), parser.line_no);
1204 } else {
1205 QString file = arg_list[0];
1206 file = Option::fixPathToLocalOS(file);
1207 file.replace("\"", "");
1208
1209 if(QDir::isRelativePath(file)) {
1210 QStringList include_roots;
1211 include_roots << Option::output_dir;
1212 QString pfilewd = QFileInfo(parser.file).dirPath();
1213 if(pfilewd.isEmpty())
1214 include_roots << pfilewd;
1215 if(Option::output_dir != QDir::currentDirPath())
1216 include_roots << QDir::currentDirPath();
1217 for(QStringList::Iterator it = include_roots.begin(); it != include_roots.end(); ++it) {
1218 if(QFile::exists((*it) + QDir::separator() + file)) {
1219 file = (*it) + QDir::separator() + file;
1220 break;
1221 }
1222 }
1223 }
1224 QString orig_file = file;
1225 int di = file.findRev(Option::dir_sep);
1226 QDir sunworkshop42workaround = QDir::current();
1227 QString oldpwd = sunworkshop42workaround.currentDirPath();
1228 if(di != -1 && QDir::setCurrent(file.left(file.findRev(Option::dir_sep))))
1229 file = file.right(file.length() - di - 1);
1230 parser_info pi = parser;
1231 int sb = scope_block;
1232 int sf = scope_flag;
1233 TestStatus sc = test_status;
1234 QMap<QString, QStringList> tmp;
1235 bool r = read(file.latin1(), tmp);
1236 if(r) {
1237 replacement = tmp[arg_list[1]].join(" ");
1238 vars["QMAKE_INTERNAL_INCLUDED_FILES"].append(orig_file);
1239 } else {
1240 warn_msg(WarnParser, "%s:%d: Failure to include file %s.",
1241 pi.file.latin1(), pi.line_no, orig_file.latin1());
1242 }
1243 parser = pi;
1244 test_status = sc;
1245 scope_flag = sf;
1246 scope_block = sb;
1247 QDir::setCurrent(oldpwd);
1248 }
1249 } else if(val.lower() == "eval") {
1250 for(QStringList::ConstIterator arg_it = arg_list.begin();
1251 arg_it != arg_list.end(); ++arg_it) {
1252 if(!replacement.isEmpty())
1253 replacement += " ";
1254 replacement += place[(*arg_it)].join(" ");
1004 } 1255 }
1005 } else if(val.lower() == "list") { 1256 } else if(val.lower() == "list") {
1006 static int x = 0; 1257 static int x = 0;
@@ -1026,6 +1277,24 @@ QMakeProject::doVariableReplace(QString &str, const QMap<QString, QStringList> &
1026 if(!var.isEmpty()) 1277 if(!var.isEmpty())
1027 replacement = before + var.join(glue) + after; 1278 replacement = before + var.join(glue) + after;
1028 } 1279 }
1280 } else if(val.lower() == "split") {
1281 if(arg_list.count() < 2 || arg_list.count() > 3) {
1282 fprintf(stderr, "%s:%d split(var, sep, join) requires three arguments\n",
1283 parser.file.latin1(), parser.line_no);
1284 } else {
1285 QString sep = arg_list[1], join = " ";
1286 if(arg_list.count() == 3)
1287 join = arg_list[2];
1288 QStringList var = place[varMap(arg_list.first())];
1289 for(QStringList::Iterator vit = var.begin(); vit != var.end(); ++vit) {
1290 QStringList lst = QStringList::split(sep, (*vit));
1291 for(QStringList::Iterator spltit = lst.begin(); spltit != lst.end(); ++spltit) {
1292 if(!replacement.isEmpty())
1293 replacement += join;
1294 replacement += (*spltit);
1295 }
1296 }
1297 }
1029 } else if(val.lower() == "find") { 1298 } else if(val.lower() == "find") {
1030 if(arg_list.count() != 2) { 1299 if(arg_list.count() != 2) {
1031 fprintf(stderr, "%s:%d find(var, str) requires two arguments\n", 1300 fprintf(stderr, "%s:%d find(var, str) requires two arguments\n",
@@ -1050,7 +1319,7 @@ QMakeProject::doVariableReplace(QString &str, const QMap<QString, QStringList> &
1050 char buff[256]; 1319 char buff[256];
1051 FILE *proc = QT_POPEN(arg_list.join(" ").latin1(), "r"); 1320 FILE *proc = QT_POPEN(arg_list.join(" ").latin1(), "r");
1052 while(proc && !feof(proc)) { 1321 while(proc && !feof(proc)) {
1053 int read_in = fread(buff, 1, 255, proc); 1322 int read_in = int(fread(buff, 1, 255, proc));
1054 if(!read_in) 1323 if(!read_in)
1055 break; 1324 break;
1056 for(int i = 0; i < read_in; i++) { 1325 for(int i = 0; i < read_in; i++) {
@@ -1061,6 +1330,51 @@ QMakeProject::doVariableReplace(QString &str, const QMap<QString, QStringList> &
1061 replacement += buff; 1330 replacement += buff;
1062 } 1331 }
1063 } 1332 }
1333 } else if(val.lower() == "files") {
1334 if(arg_list.count() != 1) {
1335 fprintf(stderr, "%s:%d files(pattern) requires one argument\n",
1336 parser.file.latin1(), parser.line_no);
1337 } else {
1338 QString dir, regex = arg_list[0];
1339 regex = Option::fixPathToLocalOS(regex);
1340 regex.replace("\"", "");
1341 if(regex.findRev(QDir::separator()) != -1) {
1342 dir = regex.left(regex.findRev(QDir::separator()) + 1);
1343 regex = regex.right(regex.length() - dir.length());
1344 }
1345 QDir d(dir, regex);
1346 for(int i = 0; i < (int)d.count(); i++) {
1347 if(!replacement.isEmpty())
1348 replacement += " ";
1349 replacement += dir + d[i];
1350 }
1351 }
1352 } else if(val.lower() == "prompt") {
1353 if(arg_list.count() != 1) {
1354 fprintf(stderr, "%s:%d prompt(question) requires one argument\n",
1355 parser.file.latin1(), parser.line_no);
1356 } else if(projectFile() == "-") {
1357 fprintf(stderr, "%s:%d prompt(question) cannot be used when '-o -' is used.\n",
1358 parser.file.latin1(), parser.line_no);
1359 } else {
1360 QString msg = arg_list.first();
1361 if((msg.startsWith("\"") || msg.startsWith("'")) && msg.endsWith(msg.left(1)))
1362 msg = msg.mid(1, msg.length()-2);
1363 msg.replace(QString("${QMAKE_FILE}"), parser.file.latin1());
1364 msg.replace(QString("${QMAKE_LINE_NUMBER}"), QString::number(parser.line_no));
1365 msg.replace(QString("${QMAKE_DATE}"), QDateTime::currentDateTime().toString());
1366 doVariableReplace(msg, place);
1367 fixEnvVariables(msg);
1368 if(!msg.endsWith("?"))
1369 msg += "?";
1370 fprintf(stderr, "Project %s: %s ", val.upper().latin1(), msg.latin1());
1371
1372 QFile qfile;
1373 if(qfile.open(IO_ReadOnly, stdin)) {
1374 QTextStream t(&qfile);
1375 replacement = t.readLine();
1376 }
1377 }
1064 } else { 1378 } else {
1065 fprintf(stderr, "%s:%d: Unknown replace function: %s\n", 1379 fprintf(stderr, "%s:%d: Unknown replace function: %s\n",
1066 parser.file.latin1(), parser.line_no, val.latin1()); 1380 parser.file.latin1(), parser.line_no, val.latin1());
diff --git a/qmake/project.h b/qmake/project.h
index ec19f0c..0ca2a92 100644
--- a/qmake/project.h
+++ b/qmake/project.h
@@ -1,13 +1,11 @@
1/**************************************************************************** 1/****************************************************************************
2** $Id$
3** 2**
4** Definition of ________ class.
5** 3**
6** Created : 970521 4** Definition of QMakeProject class.
7** 5**
8** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. 6** Copyright (C) 1992-2003 Trolltech AS. All rights reserved.
9** 7**
10** This file is part of the network module of the Qt GUI Toolkit. 8** This file is part of qmake.
11** 9**
12** This file may be distributed under the terms of the Q Public License 10** This file may be distributed under the terms of the Q Public License
13** as defined by Trolltech AS of Norway and appearing in the file 11** as defined by Trolltech AS of Norway and appearing in the file
@@ -34,6 +32,7 @@
34** not clear to you. 32** not clear to you.
35** 33**
36**********************************************************************/ 34**********************************************************************/
35
37#ifndef __PROJECT_H__ 36#ifndef __PROJECT_H__
38#define __PROJECT_H__ 37#define __PROJECT_H__
39 38
@@ -41,12 +40,16 @@
41#include <qstring.h> 40#include <qstring.h>
42#include <qmap.h> 41#include <qmap.h>
43 42
43class QMakeProperty;
44
44class QMakeProject 45class QMakeProject
45{ 46{
46 enum TestStatus { TestNone, TestFound, TestSeek } test_status; 47 enum TestStatus { TestNone, TestFound, TestSeek } test_status;
47 int scope_block, scope_flag; 48 int scope_block, scope_flag;
48 49
49 QString pfile, cfile; 50 QString pfile, cfile;
51 QMakeProperty *prop;
52 void reset();
50 QMap<QString, QStringList> vars, base_vars, cache; 53 QMap<QString, QStringList> vars, base_vars, cache;
51 bool parse(const QString &text, QMap<QString, QStringList> &place); 54 bool parse(const QString &text, QMap<QString, QStringList> &place);
52 bool doProjectTest(const QString &func, const QString &params, QMap<QString, QStringList> &place); 55 bool doProjectTest(const QString &func, const QString &params, QMap<QString, QStringList> &place);
@@ -56,8 +59,12 @@ class QMakeProject
56 59
57public: 60public:
58 QMakeProject(); 61 QMakeProject();
62 QMakeProject(QMakeProperty *);
63
64 enum { ReadCache=0x01, ReadConf=0x02, ReadCmdLine=0x04, ReadProFile=0x08, ReadPostFiles=0x10, ReadAll=0xFF };
65 bool read(const QString &project, const QString &pwd, uchar cmd=ReadAll);
66 bool read(uchar cmd=ReadAll);
59 67
60 bool read(const QString &project, const QString &pwd, bool just_project=FALSE);
61 QString projectFile(); 68 QString projectFile();
62 QString configFile(); 69 QString configFile();
63 70
@@ -65,7 +72,7 @@ public:
65 QStringList &values(const QString &v); 72 QStringList &values(const QString &v);
66 QString first(const QString &v); 73 QString first(const QString &v);
67 QMap<QString, QStringList> &variables(); 74 QMap<QString, QStringList> &variables();
68 bool isActiveConfig(const QString &x, bool regex=FALSE); 75 bool isActiveConfig(const QString &x, bool regex=FALSE, QMap<QString, QStringList> *place=NULL);
69 76
70protected: 77protected:
71 friend class MakefileGenerator; 78 friend class MakefileGenerator;
diff --git a/qmake/property.cpp b/qmake/property.cpp
new file mode 100644
index 0000000..7ec1b11
--- a/dev/null
+++ b/qmake/property.cpp
@@ -0,0 +1,186 @@
1/****************************************************************************
2**
3**
4** Implementation of QMakeProperty class.
5**
6** Copyright (C) 1992-2003 Trolltech AS. All rights reserved.
7**
8** This file is part of qmake.
9**
10** This file may be distributed under the terms of the Q Public License
11** as defined by Trolltech AS of Norway and appearing in the file
12** LICENSE.QPL included in the packaging of this file.
13**
14** This file may be distributed and/or modified under the terms of the
15** GNU General Public License version 2 as published by the Free Software
16** Foundation and appearing in the file LICENSE.GPL included in the
17** packaging of this file.
18**
19** Licensees holding valid Qt Enterprise Edition licenses may use this
20** file in accordance with the Qt Commercial License Agreement provided
21** with the Software.
22**
23** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
24** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
25**
26** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
27** information about Qt Commercial License Agreements.
28** See http://www.trolltech.com/qpl/ for QPL licensing information.
29** See http://www.trolltech.com/gpl/ for GPL licensing information.
30**
31** Contact info@trolltech.com if any conditions of this licensing are
32** not clear to you.
33**
34**********************************************************************/
35
36#include "property.h"
37#include "option.h"
38#include <qsettings.h>
39#include <qdir.h>
40#include <qmap.h>
41#include <qstringlist.h>
42#include <stdio.h>
43
44QStringList qmake_mkspec_paths(); //project.cpp
45
46QMakeProperty::QMakeProperty() : sett(NULL)
47{
48}
49
50QMakeProperty::~QMakeProperty()
51{
52 delete sett;;
53 sett = NULL;
54}
55
56
57bool QMakeProperty::initSettings()
58{
59 if(sett)
60 return TRUE;
61 sett = new QSettings;
62 return TRUE;
63}
64
65QString
66QMakeProperty::keyBase(bool version) const
67{
68 QString ret = "/QMake/properties/";
69 if(version)
70 ret += QString(qmake_version()) + "/";
71 return ret;
72}
73
74
75QString
76QMakeProperty::value(QString v, bool just_check)
77{
78 if(v == "QT_INSTALL_PREFIX") {
79#ifdef QT_INSTALL_PREFIX
80 return QT_INSTALL_PREFIX;
81#elif defined(HAVE_QCONFIG_CPP)
82 return qInstallPath();
83#endif
84 } else if(v == "QT_INSTALL_DATA") {
85#ifdef QT_INSTALL_DATA
86 return QT_INSTALL_DATA;
87#elif defined(HAVE_QCONFIG_CPP)
88 return qInstallPathData();
89#endif
90 } else if(v == "QMAKE_MKSPECS") {
91 return qmake_mkspec_paths().join(Option::target_mode == Option::TARG_WIN_MODE ? ";" : ":");
92 } else if(v == "QMAKE_VERSION") {
93 return qmake_version();
94 }
95
96 if(initSettings()) {
97 bool ok;
98 int slash = v.findRev('/');
99 QString ret = sett->readEntry(keyBase(slash == -1) + v, QString::null, &ok);
100 if(!ok) {
101 QString version = qmake_version();
102 if(slash != -1) {
103 version = v.left(slash-1);
104 v = v.mid(slash+1);
105 }
106 QStringList subs = sett->subkeyList(keyBase(FALSE));
107 subs.sort();
108 for(QStringList::Iterator it = subs.fromLast(); it != subs.end(); --it) {
109 if((*it).isEmpty() || (*it) > version)
110 continue;
111 ret = sett->readEntry(keyBase(FALSE) + (*it) + "/" + v, QString::null, &ok);
112 if(ok) {
113 if(!just_check)
114 debug_msg(1, "Fell back from %s -> %s for '%s'.", version.latin1(),
115 (*it).latin1(), v.latin1());
116 return ret;
117 }
118 }
119 }
120 return ok ? ret : QString::null;
121 }
122 return QString::null;
123}
124
125bool
126QMakeProperty::hasValue(QString v)
127{
128 if(initSettings())
129 return !value(v, TRUE).isNull();
130 return FALSE;
131}
132
133void
134QMakeProperty::setValue(QString var, const QString &val)
135{
136 if(initSettings())
137 sett->writeEntry(keyBase() + var, val);
138}
139
140bool
141QMakeProperty::exec()
142{
143 bool ret = TRUE;
144 if(Option::qmake_mode == Option::QMAKE_QUERY_PROPERTY) {
145 if(Option::prop::properties.isEmpty() && initSettings()) {
146 QStringList subs = sett->subkeyList(keyBase(FALSE));
147 subs.sort();
148 for(QStringList::Iterator it = subs.fromLast(); it != subs.end(); --it) {
149 if((*it).isEmpty())
150 continue;
151 QStringList keys = sett->entryList(keyBase(FALSE) + (*it));
152 for(QStringList::Iterator it2 = keys.begin(); it2 != keys.end(); it2++) {
153 QString ret = sett->readEntry(keyBase(FALSE) + (*it) + "/" + (*it2));
154 if((*it) != qmake_version())
155 fprintf(stdout, "%s/", (*it).latin1());
156 fprintf(stdout, "%s:%s\n", (*it2).latin1(), ret.latin1());
157 }
158 }
159 return TRUE;
160 }
161 for(QStringList::Iterator it = Option::prop::properties.begin();
162 it != Option::prop::properties.end(); it++) {
163 if(Option::prop::properties.count() > 1)
164 fprintf(stdout, "%s:", (*it).latin1());
165 if(!hasValue((*it))) {
166 ret = FALSE;
167 fprintf(stdout, "**Unknown**\n");
168 } else {
169 fprintf(stdout, "%s\n", value((*it)).latin1());
170 }
171 }
172 } else if(Option::qmake_mode == Option::QMAKE_SET_PROPERTY) {
173 for(QStringList::Iterator it = Option::prop::properties.begin();
174 it != Option::prop::properties.end(); it++) {
175 QString var = (*it);
176 it++;
177 if(it == Option::prop::properties.end()) {
178 ret = FALSE;
179 break;
180 }
181 if(!var.startsWith("."))
182 setValue(var, (*it));
183 }
184 }
185 return ret;
186}
diff --git a/qmake/property.h b/qmake/property.h
new file mode 100644
index 0000000..d69d47f
--- a/dev/null
+++ b/qmake/property.h
@@ -0,0 +1,60 @@
1/****************************************************************************
2**
3**
4** Definition of QMakeProperty class.
5**
6** Copyright (C) 1992-2003 Trolltech AS. All rights reserved.
7**
8** This file is part of qmake.
9**
10** This file may be distributed under the terms of the Q Public License
11** as defined by Trolltech AS of Norway and appearing in the file
12** LICENSE.QPL included in the packaging of this file.
13**
14** This file may be distributed and/or modified under the terms of the
15** GNU General Public License version 2 as published by the Free Software
16** Foundation and appearing in the file LICENSE.GPL included in the
17** packaging of this file.
18**
19** Licensees holding valid Qt Enterprise Edition licenses may use this
20** file in accordance with the Qt Commercial License Agreement provided
21** with the Software.
22**
23** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
24** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
25**
26** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
27** information about Qt Commercial License Agreements.
28** See http://www.trolltech.com/qpl/ for QPL licensing information.
29** See http://www.trolltech.com/gpl/ for GPL licensing information.
30**
31** Contact info@trolltech.com if any conditions of this licensing are
32** not clear to you.
33**
34**********************************************************************/
35
36#ifndef __PROPERTY_H__
37#define __PROPERTY_H__
38
39#include <qstring.h>
40
41class QSettings;
42
43class QMakeProperty
44{
45 QSettings *sett;
46 QString keyBase(bool =TRUE) const;
47 bool initSettings();
48 QString value(QString, bool just_check);
49public:
50 QMakeProperty();
51 ~QMakeProperty();
52
53 bool hasValue(QString);
54 QString value(QString v) { return value(v, FALSE); }
55 void setValue(QString, const QString &);
56
57 bool exec();
58};
59
60#endif /* __PROPERTY_H__ */
diff --git a/qmake/qtmd5.cpp b/qmake/qtmd5.cpp
new file mode 100644
index 0000000..03c60c3
--- a/dev/null
+++ b/qmake/qtmd5.cpp
@@ -0,0 +1,304 @@
1/* derived from the RSA Data Security, Inc. MD5 Message-Digest Algorithm */
2#include <qstring.h>
3#include "qtmd5.h"
4
5typedef unsigned char *POINTER;
6typedef unsigned short int UINT2;
7typedef unsigned long int UINT4;
8
9typedef struct {
10 UINT4 state[4]; // state(ABCD)
11 UINT4 count[2]; // number of bits, modulo 2^64(lsb first)
12 unsigned char buffer[64]; // input buffer
13} MD5_CTX;
14
15static void MD5Init(MD5_CTX *);
16static void MD5Update(MD5_CTX *, unsigned char *, unsigned int);
17static void MD5Final(unsigned char [16], MD5_CTX *);
18static void MD5Transform(UINT4[4], unsigned char[64]);
19static void Encode(unsigned char *, UINT4 *, unsigned int);
20static void Decode(UINT4 *, unsigned char *, unsigned int);
21static void MD5_memset(POINTER, int, unsigned int);
22static void MD5_memcpy(POINTER output,POINTER input,unsigned int len);
23
24// Constants for MD5Transform routine.
25enum {
26 S11 = 7, S12 = 12, S13 = 17, S14 = 22, S21 = 5, S22 = 9, S23 = 14, S24 = 20,
27 S31 = 4, S32 = 11, S33 = 16, S34 = 23, S41 = 6, S42 = 10, S43 = 15, S44 = 21
28};
29
30static unsigned char PADDING[64] = {
31 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
32 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
33 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
34};
35
36// F, G, H and I are basic MD5 functions.
37static inline UINT4 F(UINT4 x, UINT4 y, UINT4 z)
38{
39 return(x & y) |((~x) & z);
40}
41
42static inline UINT4 G(UINT4 x, UINT4 y, UINT4 z)
43{
44 return(x & z) |(y &(~z));
45}
46
47static inline UINT4 H(UINT4 x, UINT4 y, UINT4 z)
48{
49 return x ^ y ^ z;
50}
51
52static inline UINT4 I(UINT4 x, UINT4 y, UINT4 z)
53{
54 return y ^(x |(~z));
55}
56
57static inline UINT4 rotateLeft(UINT4 x, UINT4 n)
58{
59 return(x << n) |(x >>(32-(n)));
60}
61
62// FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4.
63// Rotation is separate from addition to prevent recomputation.
64static inline void FF(UINT4 &a, UINT4 b, UINT4 c, UINT4 d, UINT4 x, UINT4 s, UINT4 ac)
65{
66 a += F(b, c, d) + x + ac;
67 a = rotateLeft(a, s);
68 a += b;
69}
70
71static inline void GG(UINT4 &a, UINT4 b, UINT4 c, UINT4 d, UINT4 x, UINT4 s, UINT4 ac)
72{
73 a += G(b, c, d) + x +(UINT4)(ac);
74 a = rotateLeft(a, s);
75 a += b;
76}
77
78static inline void HH(UINT4 &a, UINT4 b, UINT4 c, UINT4 d, UINT4 x, UINT4 s, UINT4 ac)
79{
80 a += H(b, c, d) + x +(UINT4)(ac);
81 a = rotateLeft(a, s);
82 a += b;
83}
84
85static inline void II(UINT4 &a, UINT4 b, UINT4 c, UINT4 d, UINT4 x, UINT4 s, UINT4 ac)
86{
87 a += I(b, c, d) + x +(UINT4)(ac);
88 a = rotateLeft(a, s);
89 a += b;
90}
91
92// MD5 initialization. Begins an MD5 operation, writing a new context.
93static void MD5Init(MD5_CTX *context)
94{
95 context->count[0] = context->count[1] = 0;
96
97 // Load magic initialization constants.
98 context->state[0] = 0x67452301;
99 context->state[1] = 0xefcdab89;
100 context->state[2] = 0x98badcfe;
101 context->state[3] = 0x10325476;
102}
103
104// MD5 block update operation. Continues an MD5 message-digest
105// operation, processing another message block, and updating the
106// context.
107static void MD5Update(MD5_CTX *context, unsigned char *input, unsigned int inputLen)
108{
109 unsigned int i, index, partLen;
110 // Compute number of bytes mod 64
111 index =(unsigned int)((context->count[0] >> 3) & 0x3F);
112
113 // Update number of bits
114 if ((context->count[0] +=((UINT4)inputLen << 3)) <((UINT4)inputLen << 3))
115 context->count[1]++;
116
117 context->count[1] +=((UINT4)inputLen >> 29);
118 partLen = 64 - index;
119
120 // Transform as many times as possible.
121 if (inputLen >= partLen) {
122 MD5_memcpy((POINTER)&context->buffer[index],(POINTER)input, partLen);
123 MD5Transform(context->state, context->buffer);
124 for (i = partLen; i + 63 < inputLen; i += 64)
125 MD5Transform(context->state, &input[i]);
126 index = 0;
127 } else {
128 i = 0;
129 }
130
131 // Buffer remaining input
132 MD5_memcpy((POINTER)&context->buffer[index],(POINTER)&input[i],
133 inputLen-i);
134}
135
136// MD5 finalization. Ends an MD5 message-digest operation, writing the
137// the message digest and zeroizing the context.
138static void MD5Final(unsigned char digest[16], MD5_CTX *context)
139{
140 unsigned char bits[8];
141 unsigned int index, padLen;
142
143 // Save number of bits
144 Encode(bits, context->count, 8);
145
146 // Pad out to 56 mod 64.
147 index =(unsigned int)((context->count[0] >> 3) & 0x3f);
148 padLen =(index < 56) ?(56 - index) :(120 - index);
149 MD5Update(context, PADDING, padLen);
150
151 // Append length(before padding)
152 MD5Update(context, bits, 8);
153
154 // Store state in digest
155 Encode(digest, context->state, 16);
156
157 // Zeroize sensitive information.
158 MD5_memset((POINTER)context, 0, sizeof(*context));
159}
160
161// MD5 basic transformation. Transforms state based on block.
162static void MD5Transform(UINT4 state[4], unsigned char block[64])
163{
164 UINT4 a = state[0], b = state[1], c = state[2], d = state[3], x[16];
165 Decode(x, block, 64);
166
167 // Round 1
168 FF(a, b, c, d, x[ 0], S11, 0xd76aa478); /* 1 */
169 FF(d, a, b, c, x[ 1], S12, 0xe8c7b756); /* 2 */
170 FF(c, d, a, b, x[ 2], S13, 0x242070db); /* 3 */
171 FF(b, c, d, a, x[ 3], S14, 0xc1bdceee); /* 4 */
172 FF(a, b, c, d, x[ 4], S11, 0xf57c0faf); /* 5 */
173 FF(d, a, b, c, x[ 5], S12, 0x4787c62a); /* 6 */
174 FF(c, d, a, b, x[ 6], S13, 0xa8304613); /* 7 */
175 FF(b, c, d, a, x[ 7], S14, 0xfd469501); /* 8 */
176 FF(a, b, c, d, x[ 8], S11, 0x698098d8); /* 9 */
177 FF(d, a, b, c, x[ 9], S12, 0x8b44f7af); /* 10 */
178 FF(c, d, a, b, x[10], S13, 0xffff5bb1); /* 11 */
179 FF(b, c, d, a, x[11], S14, 0x895cd7be); /* 12 */
180 FF(a, b, c, d, x[12], S11, 0x6b901122); /* 13 */
181 FF(d, a, b, c, x[13], S12, 0xfd987193); /* 14 */
182 FF(c, d, a, b, x[14], S13, 0xa679438e); /* 15 */
183 FF(b, c, d, a, x[15], S14, 0x49b40821); /* 16 */
184
185 // Round 2
186 GG(a, b, c, d, x[ 1], S21, 0xf61e2562); /* 17 */
187 GG(d, a, b, c, x[ 6], S22, 0xc040b340); /* 18 */
188 GG(c, d, a, b, x[11], S23, 0x265e5a51); /* 19 */
189 GG(b, c, d, a, x[ 0], S24, 0xe9b6c7aa); /* 20 */
190 GG(a, b, c, d, x[ 5], S21, 0xd62f105d); /* 21 */
191 GG(d, a, b, c, x[10], S22, 0x2441453); /* 22 */
192 GG(c, d, a, b, x[15], S23, 0xd8a1e681); /* 23 */
193 GG(b, c, d, a, x[ 4], S24, 0xe7d3fbc8); /* 24 */
194 GG(a, b, c, d, x[ 9], S21, 0x21e1cde6); /* 25 */
195 GG(d, a, b, c, x[14], S22, 0xc33707d6); /* 26 */
196 GG(c, d, a, b, x[ 3], S23, 0xf4d50d87); /* 27 */
197 GG(b, c, d, a, x[ 8], S24, 0x455a14ed); /* 28 */
198 GG(a, b, c, d, x[13], S21, 0xa9e3e905); /* 29 */
199 GG(d, a, b, c, x[ 2], S22, 0xfcefa3f8); /* 30 */
200 GG(c, d, a, b, x[ 7], S23, 0x676f02d9); /* 31 */
201 GG(b, c, d, a, x[12], S24, 0x8d2a4c8a); /* 32 */
202
203 // Round 3
204 HH(a, b, c, d, x[ 5], S31, 0xfffa3942); /* 33 */
205 HH(d, a, b, c, x[ 8], S32, 0x8771f681); /* 34 */
206 HH(c, d, a, b, x[11], S33, 0x6d9d6122); /* 35 */
207 HH(b, c, d, a, x[14], S34, 0xfde5380c); /* 36 */
208 HH(a, b, c, d, x[ 1], S31, 0xa4beea44); /* 37 */
209 HH(d, a, b, c, x[ 4], S32, 0x4bdecfa9); /* 38 */
210 HH(c, d, a, b, x[ 7], S33, 0xf6bb4b60); /* 39 */
211 HH(b, c, d, a, x[10], S34, 0xbebfbc70); /* 40 */
212 HH(a, b, c, d, x[13], S31, 0x289b7ec6); /* 41 */
213 HH(d, a, b, c, x[ 0], S32, 0xeaa127fa); /* 42 */
214 HH(c, d, a, b, x[ 3], S33, 0xd4ef3085); /* 43 */
215 HH(b, c, d, a, x[ 6], S34, 0x4881d05); /* 44 */
216 HH(a, b, c, d, x[ 9], S31, 0xd9d4d039); /* 45 */
217 HH(d, a, b, c, x[12], S32, 0xe6db99e5); /* 46 */
218 HH(c, d, a, b, x[15], S33, 0x1fa27cf8); /* 47 */
219 HH(b, c, d, a, x[ 2], S34, 0xc4ac5665); /* 48 */
220
221 // Round 4
222 II(a, b, c, d, x[ 0], S41, 0xf4292244); /* 49 */
223 II(d, a, b, c, x[ 7], S42, 0x432aff97); /* 50 */
224 II(c, d, a, b, x[14], S43, 0xab9423a7); /* 51 */
225 II(b, c, d, a, x[ 5], S44, 0xfc93a039); /* 52 */
226 II(a, b, c, d, x[12], S41, 0x655b59c3); /* 53 */
227 II(d, a, b, c, x[ 3], S42, 0x8f0ccc92); /* 54 */
228 II(c, d, a, b, x[10], S43, 0xffeff47d); /* 55 */
229 II(b, c, d, a, x[ 1], S44, 0x85845dd1); /* 56 */
230 II(a, b, c, d, x[ 8], S41, 0x6fa87e4f); /* 57 */
231 II(d, a, b, c, x[15], S42, 0xfe2ce6e0); /* 58 */
232 II(c, d, a, b, x[ 6], S43, 0xa3014314); /* 59 */
233 II(b, c, d, a, x[13], S44, 0x4e0811a1); /* 60 */
234 II(a, b, c, d, x[ 4], S41, 0xf7537e82); /* 61 */
235 II(d, a, b, c, x[11], S42, 0xbd3af235); /* 62 */
236 II(c, d, a, b, x[ 2], S43, 0x2ad7d2bb); /* 63 */
237 II(b, c, d, a, x[ 9], S44, 0xeb86d391); /* 64 */
238 state[0] += a;
239 state[1] += b;
240 state[2] += c;
241 state[3] += d;
242
243 // Zeroize sensitive information.
244 MD5_memset((POINTER)x, 0, sizeof(x));
245}
246
247// Encodes input(UINT4) into output(unsigned char). Assumes len is a
248// multiple of 4.
249static void Encode(unsigned char *output, UINT4 *input, unsigned int len)
250{
251 unsigned int i, j;
252 for (i = 0, j = 0; j < len; i++, j += 4) {
253 output[j] = (unsigned char) (input[i] & 0xff);
254 output[j+1] = (unsigned char) ((input[i] >> 8) & 0xff);
255 output[j+2] = (unsigned char) ((input[i] >> 16) & 0xff);
256 output[j+3] = (unsigned char) ((input[i] >> 24) & 0xff);
257 }
258}
259
260// Decodes input(unsigned char) into output(UINT4). Assumes len is a
261// multiple of 4.
262static void Decode(UINT4 *output, unsigned char *input, unsigned int len)
263{
264 unsigned int i, j;
265 for (i = 0, j = 0; j < len; i++, j += 4)
266 output[i] =((UINT4)input[j]) |(((UINT4)input[j+1]) << 8) |
267 (((UINT4)input[j+2]) << 16) |(((UINT4)input[j+3]) << 24);
268}
269
270// Note: Replace "for loop" with standard memset if possible.
271static void MD5_memset(POINTER output, int value, unsigned int len)
272{
273 unsigned int i;
274 for (i = 0; i < len; i++)
275 ((char *)output)[i] =(char)value;
276}
277
278// Note: Replace "for loop" with standard memcpy if possible.
279static void MD5_memcpy(POINTER output,POINTER input,unsigned int len)
280{
281 unsigned int i;
282 for (i = 0; i < len; i++)
283 output[i] = input[i];
284}
285
286void qtMD5(const QByteArray &src, unsigned char *digest)
287{
288 MD5_CTX context;
289
290 MD5Init(&context);
291 MD5Update(&context, (unsigned char *) src.data(), src.size());
292 MD5Final(digest, &context);
293}
294
295QString qtMD5(const QByteArray &src)
296{
297 unsigned char digest[16];
298 qtMD5(src, digest);
299
300 QString output, tmp;
301 for (int i = 0; i < 16; ++i)
302 output += tmp.sprintf("%02x", digest[i]);
303 return output;
304}
diff --git a/qmake/qtmd5.h b/qmake/qtmd5.h
new file mode 100644
index 0000000..c8e541b
--- a/dev/null
+++ b/qmake/qtmd5.h
@@ -0,0 +1,11 @@
1#ifndef QTMD5_H
2#define QTMD5_H
3#include <qstring.h>
4#include <qcstring.h>
5
6void qtMD5(const QByteArray &src, unsigned char *digest);
7QString qtMD5(const QByteArray &src);
8
9#endif
10
11
diff --git a/qmake/tools/qconfig.cpp b/qmake/tools/qconfig.cpp
index 5297a4e..1a1b796 100644
--- a/qmake/tools/qconfig.cpp
+++ b/qmake/tools/qconfig.cpp
@@ -1,17 +1,22 @@
1/* Install paths from configure */ 1/* Install paths from configure */
2 2
3static const char QT_INSTALL_PREFIX [256] = "/opt/qt-x11-free-3.1.2"; 3static const char QT_INSTALL_PREFIX [267] = "qt_nstpath=/home/ich/programming/kde/qt-copy";
4static const char QT_INSTALL_BINS [256] = "/opt/qt-x11-free-3.1.2/bin"; 4static const char QT_INSTALL_BINS [267] = "qt_binpath=/home/ich/programming/kde/qt-copy/bin";
5static const char QT_INSTALL_DOCS [256] = "/opt/qt-x11-free-3.1.2/doc"; 5static const char QT_INSTALL_DOCS [267] = "qt_docpath=/home/ich/programming/kde/qt-copy/doc";
6static const char QT_INSTALL_HEADERS[256] = "/opt/qt-x11-free-3.1.2/include"; 6static const char QT_INSTALL_HEADERS [267] = "qt_hdrpath=/home/ich/programming/kde/qt-copy/include";
7static const char QT_INSTALL_LIBS [256] = "/opt/qt-x11-free-3.1.2/lib"; 7static const char QT_INSTALL_LIBS [267] = "qt_libpath=/home/ich/programming/kde/qt-copy/lib";
8static const char QT_INSTALL_PLUGINS[256] = "/opt/qt-x11-free-3.1.2/plugins"; 8static const char QT_INSTALL_PLUGINS [267] = "qt_plgpath=/home/ich/programming/kde/qt-copy/plugins";
9static const char QT_INSTALL_DATA [256] = "/opt/qt-x11-free-3.1.2"; 9static const char QT_INSTALL_DATA [267] = "qt_datpath=/home/ich/programming/kde/qt-copy";
10static const char QT_INSTALL_TRANSLATIONS[267] = "qt_trnpath=/home/ich/programming/kde/qt-copy/translations";
11static const char QT_INSTALL_SYSCONF [267] = "qt_cnfpath=/home/ich/programming/kde/qt-copy/etc/settings";
10 12
11const char *qInstallPath() { return QT_INSTALL_PREFIX; } 13/* strlen( "qt_xxxpath=" ) == 11 */
12const char *qInstallPathDocs() { return QT_INSTALL_DOCS; } 14const char *qInstallPath() { return QT_INSTALL_PREFIX + 11; }
13const char *qInstallPathHeaders() { return QT_INSTALL_HEADERS; } 15const char *qInstallPathDocs() { return QT_INSTALL_DOCS + 11; }
14const char *qInstallPathLibs() { return QT_INSTALL_LIBS; } 16const char *qInstallPathHeaders() { return QT_INSTALL_HEADERS + 11; }
15const char *qInstallPathBins() { return QT_INSTALL_BINS; } 17const char *qInstallPathLibs() { return QT_INSTALL_LIBS + 11; }
16const char *qInstallPathPlugins() { return QT_INSTALL_PLUGINS; } 18const char *qInstallPathBins() { return QT_INSTALL_BINS + 11; }
17const char *qInstallPathData() { return QT_INSTALL_DATA; } 19const char *qInstallPathPlugins() { return QT_INSTALL_PLUGINS + 11; }
20const char *qInstallPathData() { return QT_INSTALL_DATA + 11; }
21const char *qInstallPathTranslations() { return QT_INSTALL_TRANSLATIONS + 11; }
22const char *qInstallPathSysconf() { return QT_INSTALL_SYSCONF + 11; }
diff --git a/qmake/tools/qlocale.cpp b/qmake/tools/qlocale.cpp
new file mode 100644
index 0000000..5c04288
--- a/dev/null
+++ b/qmake/tools/qlocale.cpp
@@ -0,0 +1,6083 @@
1/****************************************************************************
2**
3**
4** Implementation of the QLocale class
5**
6** Copyright (C) 1992-2003 Trolltech AS. All rights reserved.
7**
8** This file is part of the tools module of the Qt GUI Toolkit.
9**
10** This file may be distributed under the terms of the Q Public License
11** as defined by Trolltech AS of Norway and appearing in the file
12** LICENSE.QPL included in the packaging of this file.
13**
14** This file may be distributed and/or modified under the terms of the
15** GNU General Public License version 2 as published by the Free Software
16** Foundation and appearing in the file LICENSE.GPL included in the
17** packaging of this file.
18**
19** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
20** licenses may use this file in accordance with the Qt Commercial License
21** Agreement provided with the Software.
22**
23** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
24** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
25**
26** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
27** information about Qt Commercial License Agreements.
28** See http://www.trolltech.com/qpl/ for QPL licensing information.
29** See http://www.trolltech.com/gpl/ for GPL licensing information.
30**
31** Contact info@trolltech.com if any conditions of this licensing are
32** not clear to you.
33**
34**********************************************************************/
35
36#include <sys/types.h>
37#include <ctype.h>
38#include <float.h>
39#include <limits.h>
40#include <math.h>
41#include <stdlib.h>
42
43#include "qlocale.h"
44#include "qlocale_p.h"
45
46#ifdef QT_QLOCALE_USES_FCVT
47# include <qmutex.h>
48#endif
49
50#if defined (Q_WS_WIN)
51# include <windows.h>
52// mingw defines NAN and INFINITY to 0/0 and x/0
53# if defined(Q_CC_GNU)
54# undef NAN
55# undef INFINITY
56# else
57# define isnan(d) _isnan(d)
58# endif
59#endif
60
61#if !defined( QWS ) && defined( Q_OS_MAC )
62# include <Carbon/Carbon.h>
63#endif
64
65#if defined (Q_OS_SOLARIS)
66# include <ieeefp.h>
67#endif
68
69#if defined (Q_OS_OSF) && (defined(__DECC) || defined(__DECCXX))
70# define INFINITY DBL_INFINITY
71# define NAN DBL_QNAN
72#endif
73
74enum {
75 LittleEndian,
76 BigEndian
77
78#ifdef Q_BYTE_ORDER
79# if Q_BYTE_ORDER == Q_BIG_ENDIAN
80 , ByteOrder = BigEndian
81# elif Q_BYTE_ORDER == Q_LITTLE_ENDIAN
82 , ByteOrder = LittleEndian
83# else
84# error "undefined byte order"
85# endif
86};
87#else
88};
89static const unsigned int one = 1;
90static const bool ByteOrder = ((*((unsigned char *) &one) == 0) ? BigEndian : LittleEndian);
91#endif
92
93#if !defined(INFINITY)
94static const unsigned char be_inf_bytes[] = { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 };
95static const unsigned char le_inf_bytes[] = { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f };
96static inline double inf()
97{
98 return (ByteOrder == BigEndian ?
99 *((const double *) be_inf_bytes) :
100 *((const double *) le_inf_bytes));
101}
102# define INFINITY (::inf())
103#endif
104
105#if !defined(NAN)
106static const unsigned char be_nan_bytes[] = { 0x7f, 0xf8, 0, 0, 0, 0, 0, 0 };
107static const unsigned char le_nan_bytes[] = { 0, 0, 0, 0, 0, 0, 0xf8, 0x7f };
108static inline double nan()
109{
110 return (ByteOrder == BigEndian ?
111 *((const double *) be_nan_bytes) :
112 *((const double *) le_nan_bytes));
113}
114# define NAN (::nan())
115#endif
116
117// Sizes as defined by the ISO C99 standard - fallback
118#ifndef LLONG_MAX
119# define LLONG_MAX Q_INT64_C(9223372036854775807)
120#endif
121#ifndef LLONG_MIN
122# define LLONG_MIN (-LLONG_MAX - Q_INT64_C(1))
123#endif
124#ifndef ULLONG_MAX
125# define ULLONG_MAX Q_UINT64_C(0xffffffffffffffff)
126#endif
127
128#ifndef QT_QLOCALE_USES_FCVT
129static char *qdtoa(double d, int mode, int ndigits, int *decpt,
130 int *sign, char **rve, char **digits_str);
131static double qstrtod(const char *s00, char const **se, bool *ok);
132#endif
133static Q_LLONG qstrtoll(const char *nptr, const char **endptr, register int base, bool *ok);
134static Q_ULLONG qstrtoull(const char *nptr, const char **endptr, register int base, bool *ok);
135
136static const uint locale_index[] = {
137 0, // unused
138 0, // C
139 0, // Abkhazian
140 0, // Afan
141 0, // Afar
142 1, // Afrikaans
143 2, // Albanian
144 0, // Amharic
145 3, // Arabic
146 19, // Armenian
147 0, // Assamese
148 0, // Aymara
149 20, // Azerbaijani
150 0, // Bashkir
151 21, // Basque
152 0, // Bengali
153 0, // Bhutani
154 0, // Bihari
155 0, // Bislama
156 0, // Breton
157 22, // Bulgarian
158 0, // Burmese
159 23, // Byelorussian
160 0, // Cambodian
161 24, // Catalan
162 25, // Chinese
163 0, // Corsican
164 30, // Croatian
165 31, // Czech
166 32, // Danish
167 33, // Dutch
168 35, // English
169 0, // Esperanto
170 47, // Estonian
171 48, // Faroese
172 0, // Fiji
173 49, // Finnish
174 50, // French
175 0, // Frisian
176 0, // Gaelic
177 56, // Galician
178 57, // Georgian
179 58, // German
180 63, // Greek
181 0, // Greenlandic
182 0, // Guarani
183 64, // Gujarati
184 0, // Hausa
185 65, // Hebrew
186 66, // Hindi
187 67, // Hungarian
188 68, // Icelandic
189 69, // Indonesian
190 0, // Interlingua
191 0, // Interlingue
192 0, // Inuktitut
193 0, // Inupiak
194 0, // Irish
195 70, // Italian
196 72, // Japanese
197 0, // Javanese
198 73, // Kannada
199 0, // Kashmiri
200 74, // Kazakh
201 0, // Kinyarwanda
202 75, // Kirghiz
203 76, // Korean
204 0, // Kurdish
205 0, // Kurundi
206 0, // Laothian
207 0, // Latin
208 77, // Latvian
209 0, // Lingala
210 78, // Lithuanian
211 79, // Macedonian
212 0, // Malagasy
213 80, // Malay
214 0, // Malayalam
215 0, // Maltese
216 0, // Maori
217 82, // Marathi
218 0, // Moldavian
219 83, // Mongolian
220 0, // Nauru
221 0, // Nepali
222 84, // Norwegian
223 0, // Occitan
224 0, // Oriya
225 0, // Pashto
226 85, // Persian
227 86, // Polish
228 87, // Portuguese
229 89, // Punjabi
230 0, // Quechua
231 0, // RhaetoRomance
232 90, // Romanian
233 91, // Russian
234 0, // Samoan
235 0, // Sangho
236 92, // Sanskrit
237 0, // Serbian
238 0, // SerboCroatian
239 0, // Sesotho
240 0, // Setswana
241 0, // Shona
242 0, // Sindhi
243 0, // Singhalese
244 0, // Siswati
245 93, // Slovak
246 94, // Slovenian
247 0, // Somali
248 95, // Spanish
249 0, // Sundanese
250 114, // Swahili
251 115, // Swedish
252 0, // Tagalog
253 0, // Tajik
254 117, // Tamil
255 0, // Tatar
256 118, // Telugu
257 119, // Thai
258 0, // Tibetan
259 0, // Tigrinya
260 0, // Tonga
261 0, // Tsonga
262 120, // Turkish
263 0, // Turkmen
264 0, // Twi
265 0, // Uigur
266 121, // Ukrainian
267 122, // Urdu
268 123, // Uzbek
269 124, // Vietnamese
270 0, // Volapuk
271 0, // Welsh
272 0, // Wolof
273 0, // Xhosa
274 0, // Yiddish
275 0, // Yoruba
276 0, // Zhuang
277 0, // Zulu
278 0 // trailing 0
279};
280
281static const QLocalePrivate locale_data[] = {
282// lang terr dec group list prcnt zero minus exp
283 { 1, 0, 46, 44, 59, 37, 48, 45, 101 }, // C/AnyCountry
284 { 5, 195, 46, 44, 44, 37, 48, 45, 101 }, // Afrikaans/SouthAfrica
285 { 6, 2, 44, 46, 59, 37, 48, 45, 101 }, // Albanian/Albania
286 { 8, 186, 46, 44, 59, 37, 1632, 45, 101 }, // Arabic/SaudiArabia
287 { 8, 3, 46, 44, 59, 37, 48, 45, 101 }, // Arabic/Algeria
288 { 8, 17, 46, 44, 59, 37, 1632, 45, 101 }, // Arabic/Bahrain
289 { 8, 64, 46, 44, 59, 37, 1632, 45, 101 }, // Arabic/Egypt
290 { 8, 103, 46, 44, 59, 37, 1632, 45, 101 }, // Arabic/Iraq
291 { 8, 109, 46, 44, 59, 37, 1632, 45, 101 }, // Arabic/Jordan
292 { 8, 115, 46, 44, 59, 37, 1632, 45, 101 }, // Arabic/Kuwait
293 { 8, 119, 46, 44, 59, 37, 1632, 45, 101 }, // Arabic/Lebanon
294 { 8, 122, 46, 44, 59, 37, 48, 45, 101 }, // Arabic/LibyanArabJamahiriya
295 { 8, 145, 46, 44, 59, 37, 48, 45, 101 }, // Arabic/Morocco
296 { 8, 162, 46, 44, 59, 37, 1632, 45, 101 }, // Arabic/Oman
297 { 8, 175, 46, 44, 59, 37, 1632, 45, 101 }, // Arabic/Qatar
298 { 8, 207, 46, 44, 59, 37, 1632, 45, 101 }, // Arabic/SyrianArabRepublic
299 { 8, 216, 46, 44, 59, 37, 48, 45, 101 }, // Arabic/Tunisia
300 { 8, 223, 46, 44, 59, 37, 1632, 45, 101 }, // Arabic/UnitedArabEmirates
301 { 8, 237, 46, 44, 59, 37, 1632, 45, 101 }, // Arabic/Yemen
302 { 9, 11, 46, 44, 44, 37, 48, 45, 101 }, // Armenian/Armenia
303 { 12, 15, 44, 160, 59, 37, 48, 45, 101 }, // Azerbaijani/Azerbaijan
304 { 14, 197, 44, 46, 59, 37, 48, 45, 101 }, // Basque/Spain
305 { 20, 33, 44, 160, 59, 37, 48, 45, 101 }, // Bulgarian/Bulgaria
306 { 22, 20, 44, 160, 59, 37, 48, 45, 101 }, // Byelorussian/Belarus
307 { 24, 197, 44, 46, 59, 37, 48, 45, 101 }, // Catalan/Spain
308 { 25, 44, 46, 44, 44, 37, 48, 45, 101 }, // Chinese/China
309 { 25, 97, 46, 44, 44, 37, 48, 45, 101 }, // Chinese/HongKong
310 { 25, 126, 46, 44, 44, 37, 48, 45, 101 }, // Chinese/Macau
311 { 25, 190, 46, 44, 44, 37, 48, 45, 101 }, // Chinese/Singapore
312 { 25, 208, 46, 44, 44, 37, 48, 45, 101 }, // Chinese/Taiwan
313 { 27, 54, 44, 46, 59, 37, 48, 45, 101 }, // Croatian/Croatia
314 { 28, 57, 44, 160, 59, 37, 48, 45, 101 }, // Czech/CzechRepublic
315 { 29, 58, 44, 46, 59, 37, 48, 45, 101 }, // Danish/Denmark
316 { 30, 151, 44, 46, 59, 37, 48, 45, 101 }, // Dutch/Netherlands
317 { 30, 21, 44, 46, 59, 37, 48, 45, 101 }, // Dutch/Belgium
318 { 31, 225, 46, 44, 44, 37, 48, 45, 101 }, // English/UnitedStates
319 { 31, 13, 46, 44, 44, 37, 48, 45, 101 }, // English/Australia
320 { 31, 22, 46, 44, 59, 37, 48, 45, 101 }, // English/Belize
321 { 31, 38, 46, 44, 44, 37, 48, 45, 101 }, // English/Canada
322 { 31, 104, 46, 44, 44, 37, 48, 45, 101 }, // English/Ireland
323 { 31, 107, 46, 44, 44, 37, 48, 45, 101 }, // English/Jamaica
324 { 31, 154, 46, 44, 44, 37, 48, 45, 101 }, // English/NewZealand
325 { 31, 170, 46, 44, 44, 37, 48, 45, 101 }, // English/Philippines
326 { 31, 195, 46, 44, 44, 37, 48, 45, 101 }, // English/SouthAfrica
327 { 31, 215, 46, 44, 59, 37, 48, 45, 101 }, // English/TrinidadAndTobago
328 { 31, 224, 46, 44, 44, 37, 48, 45, 101 }, // English/UnitedKingdom
329 { 31, 240, 46, 44, 44, 37, 48, 45, 101 }, // English/Zimbabwe
330 { 33, 68, 44, 160, 59, 37, 48, 45, 101 }, // Estonian/Estonia
331 { 34, 71, 44, 46, 59, 37, 48, 45, 101 }, // Faroese/FaroeIslands
332 { 36, 73, 44, 160, 59, 37, 48, 45, 101 }, // Finnish/Finland
333 { 37, 74, 44, 160, 59, 37, 48, 45, 101 }, // French/France
334 { 37, 21, 44, 46, 59, 37, 48, 45, 101 }, // French/Belgium
335 { 37, 38, 44, 160, 59, 37, 48, 45, 101 }, // French/Canada
336 { 37, 125, 44, 160, 59, 37, 48, 45, 101 }, // French/Luxembourg
337 { 37, 142, 44, 160, 59, 37, 48, 45, 101 }, // French/Monaco
338 { 37, 206, 46, 39, 59, 37, 48, 45, 101 }, // French/Switzerland
339 { 40, 197, 44, 46, 44, 37, 48, 45, 101 }, // Galician/Spain
340 { 41, 81, 44, 160, 59, 37, 48, 45, 101 }, // Georgian/Georgia
341 { 42, 82, 44, 46, 59, 37, 48, 45, 101 }, // German/Germany
342 { 42, 14, 44, 46, 59, 37, 48, 45, 101 }, // German/Austria
343 { 42, 123, 46, 39, 59, 37, 48, 45, 101 }, // German/Liechtenstein
344 { 42, 125, 44, 46, 59, 37, 48, 45, 101 }, // German/Luxembourg
345 { 42, 206, 46, 39, 59, 37, 48, 45, 101 }, // German/Switzerland
346 { 43, 85, 44, 46, 59, 37, 48, 45, 101 }, // Greek/Greece
347 { 46, 100, 46, 44, 44, 37, 2790, 45, 101 }, // Gujarati/India
348 { 48, 105, 46, 44, 44, 37, 48, 45, 101 }, // Hebrew/Israel
349 { 49, 100, 46, 44, 44, 37, 48, 45, 101 }, // Hindi/India
350 { 50, 98, 44, 160, 59, 37, 48, 45, 101 }, // Hungarian/Hungary
351 { 51, 99, 44, 46, 59, 37, 48, 45, 101 }, // Icelandic/Iceland
352 { 52, 101, 44, 46, 59, 37, 48, 45, 101 }, // Indonesian/Indonesia
353 { 58, 106, 44, 46, 59, 37, 48, 45, 101 }, // Italian/Italy
354 { 58, 206, 46, 39, 59, 37, 48, 45, 101 }, // Italian/Switzerland
355 { 59, 108, 46, 44, 44, 37, 48, 45, 101 }, // Japanese/Japan
356 { 61, 100, 46, 44, 44, 37, 3302, 45, 101 }, // Kannada/India
357 { 63, 110, 44, 160, 59, 37, 48, 45, 101 }, // Kazakh/Kazakhstan
358 { 65, 116, 44, 160, 59, 37, 48, 45, 101 }, // Kirghiz/Kyrgyzstan
359 { 66, 114, 46, 44, 44, 37, 48, 45, 101 }, // Korean/RepublicOfKorea
360 { 71, 118, 44, 160, 59, 37, 48, 45, 101 }, // Latvian/Latvia
361 { 73, 124, 44, 46, 59, 37, 48, 45, 101 }, // Lithuanian/Lithuania
362 { 74, 127, 44, 46, 59, 37, 48, 45, 101 }, // Macedonian/Macedonia
363 { 76, 130, 44, 46, 59, 37, 48, 45, 101 }, // Malay/Malaysia
364 { 76, 32, 44, 46, 59, 37, 48, 45, 101 }, // Malay/BruneiDarussalam
365 { 80, 100, 46, 44, 44, 37, 2406, 45, 101 }, // Marathi/India
366 { 82, 143, 44, 160, 59, 37, 48, 45, 101 }, // Mongolian/Mongolia
367 { 85, 161, 44, 160, 59, 37, 48, 45, 101 }, // Norwegian/Norway
368 { 89, 102, 46, 44, 59, 37, 1776, 45, 101 }, // Persian/Iran
369 { 90, 172, 44, 160, 59, 37, 48, 45, 101 }, // Polish/Poland
370 { 91, 173, 44, 46, 59, 37, 48, 45, 101 }, // Portuguese/Portugal
371 { 91, 30, 44, 46, 59, 37, 48, 45, 101 }, // Portuguese/Brazil
372 { 92, 100, 46, 44, 44, 37, 2662, 45, 101 }, // Punjabi/India
373 { 95, 177, 44, 46, 59, 37, 48, 45, 101 }, // Romanian/Romania
374 { 96, 178, 44, 160, 59, 37, 48, 45, 101 }, // Russian/RussianFederation
375 { 99, 100, 46, 44, 44, 37, 2406, 45, 101 }, // Sanskrit/India
376 { 108, 191, 44, 160, 59, 37, 48, 45, 101 }, // Slovak/Slovakia
377 { 109, 192, 44, 46, 59, 37, 48, 45, 101 }, // Slovenian/Slovenia
378 { 111, 197, 44, 46, 59, 37, 48, 45, 101 }, // Spanish/Spain
379 { 111, 10, 44, 46, 44, 37, 48, 45, 101 }, // Spanish/Argentina
380 { 111, 26, 44, 46, 44, 37, 48, 45, 101 }, // Spanish/Bolivia
381 { 111, 43, 44, 46, 44, 37, 48, 45, 101 }, // Spanish/Chile
382 { 111, 47, 44, 46, 44, 37, 48, 45, 101 }, // Spanish/Colombia
383 { 111, 52, 44, 46, 44, 37, 48, 45, 101 }, // Spanish/CostaRica
384 { 111, 61, 46, 44, 44, 37, 48, 45, 101 }, // Spanish/DominicanRepublic
385 { 111, 63, 44, 46, 44, 37, 48, 45, 101 }, // Spanish/Ecuador
386 { 111, 65, 46, 44, 44, 37, 48, 45, 101 }, // Spanish/ElSalvador
387 { 111, 90, 46, 44, 44, 37, 48, 45, 101 }, // Spanish/Guatemala
388 { 111, 96, 46, 44, 44, 37, 48, 45, 101 }, // Spanish/Honduras
389 { 111, 139, 46, 44, 44, 37, 48, 45, 101 }, // Spanish/Mexico
390 { 111, 155, 46, 44, 44, 37, 48, 45, 101 }, // Spanish/Nicaragua
391 { 111, 166, 46, 44, 44, 37, 48, 45, 101 }, // Spanish/Panama
392 { 111, 168, 44, 46, 44, 37, 48, 45, 101 }, // Spanish/Paraguay
393 { 111, 169, 46, 44, 44, 37, 48, 45, 101 }, // Spanish/Peru
394 { 111, 174, 46, 44, 44, 37, 48, 45, 101 }, // Spanish/PuertoRico
395 { 111, 227, 44, 46, 44, 37, 48, 45, 101 }, // Spanish/Uruguay
396 { 111, 231, 44, 46, 44, 37, 48, 45, 101 }, // Spanish/Venezuela
397 { 113, 111, 46, 44, 44, 37, 48, 45, 101 }, // Swahili/Kenya
398 { 114, 205, 44, 160, 59, 37, 48, 45, 101 }, // Swedish/Sweden
399 { 114, 73, 44, 160, 59, 37, 48, 45, 101 }, // Swedish/Finland
400 { 117, 100, 46, 44, 44, 37, 48, 45, 101 }, // Tamil/India
401 { 119, 100, 46, 44, 44, 37, 3174, 45, 101 }, // Telugu/India
402 { 120, 211, 46, 44, 44, 37, 3664, 45, 101 }, // Thai/Thailand
403 { 125, 217, 44, 46, 59, 37, 48, 45, 101 }, // Turkish/Turkey
404 { 129, 222, 44, 160, 59, 37, 48, 45, 101 }, // Ukrainian/Ukraine
405 { 130, 163, 46, 44, 59, 37, 1776, 45, 101 }, // Urdu/Pakistan
406 { 131, 228, 44, 160, 59, 37, 48, 45, 101 }, // Uzbek/Uzbekistan
407 { 132, 232, 44, 46, 44, 37, 48, 45, 101 }, // Vietnamese/VietNam
408 { 0, 0, 0, 0, 0, 0, 0, 0, 0 } // trailing 0s
409};
410
411static const char language_name_list[] =
412"Default\0"
413"C\0"
414"Abkhazian\0"
415"Afan\0"
416"Afar\0"
417"Afrikaans\0"
418"Albanian\0"
419"Amharic\0"
420"Arabic\0"
421"Armenian\0"
422"Assamese\0"
423"Aymara\0"
424"Azerbaijani\0"
425"Bashkir\0"
426"Basque\0"
427"Bengali\0"
428"Bhutani\0"
429"Bihari\0"
430"Bislama\0"
431"Breton\0"
432"Bulgarian\0"
433"Burmese\0"
434"Byelorussian\0"
435"Cambodian\0"
436"Catalan\0"
437"Chinese\0"
438"Corsican\0"
439"Croatian\0"
440"Czech\0"
441"Danish\0"
442"Dutch\0"
443"English\0"
444"Esperanto\0"
445"Estonian\0"
446"Faroese\0"
447"Fiji\0"
448"Finnish\0"
449"French\0"
450"Frisian\0"
451"Gaelic\0"
452"Galician\0"
453"Georgian\0"
454"German\0"
455"Greek\0"
456"Greenlandic\0"
457"Guarani\0"
458"Gujarati\0"
459"Hausa\0"
460"Hebrew\0"
461"Hindi\0"
462"Hungarian\0"
463"Icelandic\0"
464"Indonesian\0"
465"Interlingua\0"
466"Interlingue\0"
467"Inuktitut\0"
468"Inupiak\0"
469"Irish\0"
470"Italian\0"
471"Japanese\0"
472"Javanese\0"
473"Kannada\0"
474"Kashmiri\0"
475"Kazakh\0"
476"Kinyarwanda\0"
477"Kirghiz\0"
478"Korean\0"
479"Kurdish\0"
480"Kurundi\0"
481"Laothian\0"
482"Latin\0"
483"Latvian\0"
484"Lingala\0"
485"Lithuanian\0"
486"Macedonian\0"
487"Malagasy\0"
488"Malay\0"
489"Malayalam\0"
490"Maltese\0"
491"Maori\0"
492"Marathi\0"
493"Moldavian\0"
494"Mongolian\0"
495"Nauru\0"
496"Nepali\0"
497"Norwegian\0"
498"Occitan\0"
499"Oriya\0"
500"Pashto\0"
501"Persian\0"
502"Polish\0"
503"Portuguese\0"
504"Punjabi\0"
505"Quechua\0"
506"RhaetoRomance\0"
507"Romanian\0"
508"Russian\0"
509"Samoan\0"
510"Sangho\0"
511"Sanskrit\0"
512"Serbian\0"
513"SerboCroatian\0"
514"Sesotho\0"
515"Setswana\0"
516"Shona\0"
517"Sindhi\0"
518"Singhalese\0"
519"Siswati\0"
520"Slovak\0"
521"Slovenian\0"
522"Somali\0"
523"Spanish\0"
524"Sundanese\0"
525"Swahili\0"
526"Swedish\0"
527"Tagalog\0"
528"Tajik\0"
529"Tamil\0"
530"Tatar\0"
531"Telugu\0"
532"Thai\0"
533"Tibetan\0"
534"Tigrinya\0"
535"Tonga\0"
536"Tsonga\0"
537"Turkish\0"
538"Turkmen\0"
539"Twi\0"
540"Uigur\0"
541"Ukrainian\0"
542"Urdu\0"
543"Uzbek\0"
544"Vietnamese\0"
545"Volapuk\0"
546"Welsh\0"
547"Wolof\0"
548"Xhosa\0"
549"Yiddish\0"
550"Yoruba\0"
551"Zhuang\0"
552"Zulu\0";
553
554static const uint language_name_index[] = {
555 0, // Unused
556 8, // C
557 10, // Abkhazian
558 20, // Afan
559 25, // Afar
560 30, // Afrikaans
561 40, // Albanian
562 49, // Amharic
563 57, // Arabic
564 64, // Armenian
565 73, // Assamese
566 82, // Aymara
567 89, // Azerbaijani
568 101, // Bashkir
569 109, // Basque
570 116, // Bengali
571 124, // Bhutani
572 132, // Bihari
573 139, // Bislama
574 147, // Breton
575 154, // Bulgarian
576 164, // Burmese
577 172, // Byelorussian
578 185, // Cambodian
579 195, // Catalan
580 203, // Chinese
581 211, // Corsican
582 220, // Croatian
583 229, // Czech
584 235, // Danish
585 242, // Dutch
586 248, // English
587 256, // Esperanto
588 266, // Estonian
589 275, // Faroese
590 283, // Fiji
591 288, // Finnish
592 296, // French
593 303, // Frisian
594 311, // Gaelic
595 318, // Galician
596 327, // Georgian
597 336, // German
598 343, // Greek
599 349, // Greenlandic
600 361, // Guarani
601 369, // Gujarati
602 378, // Hausa
603 384, // Hebrew
604 391, // Hindi
605 397, // Hungarian
606 407, // Icelandic
607 417, // Indonesian
608 428, // Interlingua
609 440, // Interlingue
610 452, // Inuktitut
611 462, // Inupiak
612 470, // Irish
613 476, // Italian
614 484, // Japanese
615 493, // Javanese
616 502, // Kannada
617 510, // Kashmiri
618 519, // Kazakh
619 526, // Kinyarwanda
620 538, // Kirghiz
621 546, // Korean
622 553, // Kurdish
623 561, // Kurundi
624 569, // Laothian
625 578, // Latin
626 584, // Latvian
627 592, // Lingala
628 600, // Lithuanian
629 611, // Macedonian
630 622, // Malagasy
631 631, // Malay
632 637, // Malayalam
633 647, // Maltese
634 655, // Maori
635 661, // Marathi
636 669, // Moldavian
637 679, // Mongolian
638 689, // Nauru
639 695, // Nepali
640 702, // Norwegian
641 712, // Occitan
642 720, // Oriya
643 726, // Pashto
644 733, // Persian
645 741, // Polish
646 748, // Portuguese
647 759, // Punjabi
648 767, // Quechua
649 775, // RhaetoRomance
650 789, // Romanian
651 798, // Russian
652 806, // Samoan
653 813, // Sangho
654 820, // Sanskrit
655 829, // Serbian
656 837, // SerboCroatian
657 851, // Sesotho
658 859, // Setswana
659 868, // Shona
660 874, // Sindhi
661 881, // Singhalese
662 892, // Siswati
663 900, // Slovak
664 907, // Slovenian
665 917, // Somali
666 924, // Spanish
667 932, // Sundanese
668 942, // Swahili
669 950, // Swedish
670 958, // Tagalog
671 966, // Tajik
672 972, // Tamil
673 978, // Tatar
674 984, // Telugu
675 991, // Thai
676 996, // Tibetan
677 1004, // Tigrinya
678 1013, // Tonga
679 1019, // Tsonga
680 1026, // Turkish
681 1034, // Turkmen
682 1042, // Twi
683 1046, // Uigur
684 1052, // Ukrainian
685 1062, // Urdu
686 1067, // Uzbek
687 1073, // Vietnamese
688 1084, // Volapuk
689 1092, // Welsh
690 1098, // Wolof
691 1104, // Xhosa
692 1110, // Yiddish
693 1118, // Yoruba
694 1125, // Zhuang
695 1132 // Zulu
696};
697
698static const char country_name_list[] =
699"Default\0"
700"Afghanistan\0"
701"Albania\0"
702"Algeria\0"
703"AmericanSamoa\0"
704"Andorra\0"
705"Angola\0"
706"Anguilla\0"
707"Antarctica\0"
708"AntiguaAndBarbuda\0"
709"Argentina\0"
710"Armenia\0"
711"Aruba\0"
712"Australia\0"
713"Austria\0"
714"Azerbaijan\0"
715"Bahamas\0"
716"Bahrain\0"
717"Bangladesh\0"
718"Barbados\0"
719"Belarus\0"
720"Belgium\0"
721"Belize\0"
722"Benin\0"
723"Bermuda\0"
724"Bhutan\0"
725"Bolivia\0"
726"BosniaAndHerzegowina\0"
727"Botswana\0"
728"BouvetIsland\0"
729"Brazil\0"
730"BritishIndianOceanTerritory\0"
731"BruneiDarussalam\0"
732"Bulgaria\0"
733"BurkinaFaso\0"
734"Burundi\0"
735"Cambodia\0"
736"Cameroon\0"
737"Canada\0"
738"CapeVerde\0"
739"CaymanIslands\0"
740"CentralAfricanRepublic\0"
741"Chad\0"
742"Chile\0"
743"China\0"
744"ChristmasIsland\0"
745"CocosIslands\0"
746"Colombia\0"
747"Comoros\0"
748"DemocraticRepublicOfCongo\0"
749"PeoplesRepublicOfCongo\0"
750"CookIslands\0"
751"CostaRica\0"
752"IvoryCoast\0"
753"Croatia\0"
754"Cuba\0"
755"Cyprus\0"
756"CzechRepublic\0"
757"Denmark\0"
758"Djibouti\0"
759"Dominica\0"
760"DominicanRepublic\0"
761"EastTimor\0"
762"Ecuador\0"
763"Egypt\0"
764"ElSalvador\0"
765"EquatorialGuinea\0"
766"Eritrea\0"
767"Estonia\0"
768"Ethiopia\0"
769"FalklandIslands\0"
770"FaroeIslands\0"
771"Fiji\0"
772"Finland\0"
773"France\0"
774"MetropolitanFrance\0"
775"FrenchGuiana\0"
776"FrenchPolynesia\0"
777"FrenchSouthernTerritories\0"
778"Gabon\0"
779"Gambia\0"
780"Georgia\0"
781"Germany\0"
782"Ghana\0"
783"Gibraltar\0"
784"Greece\0"
785"Greenland\0"
786"Grenada\0"
787"Guadeloupe\0"
788"Guam\0"
789"Guatemala\0"
790"Guinea\0"
791"GuineaBissau\0"
792"Guyana\0"
793"Haiti\0"
794"HeardAndMcDonaldIslands\0"
795"Honduras\0"
796"HongKong\0"
797"Hungary\0"
798"Iceland\0"
799"India\0"
800"Indonesia\0"
801"Iran\0"
802"Iraq\0"
803"Ireland\0"
804"Israel\0"
805"Italy\0"
806"Jamaica\0"
807"Japan\0"
808"Jordan\0"
809"Kazakhstan\0"
810"Kenya\0"
811"Kiribati\0"
812"DemocraticRepublicOfKorea\0"
813"RepublicOfKorea\0"
814"Kuwait\0"
815"Kyrgyzstan\0"
816"Lao\0"
817"Latvia\0"
818"Lebanon\0"
819"Lesotho\0"
820"Liberia\0"
821"LibyanArabJamahiriya\0"
822"Liechtenstein\0"
823"Lithuania\0"
824"Luxembourg\0"
825"Macau\0"
826"Macedonia\0"
827"Madagascar\0"
828"Malawi\0"
829"Malaysia\0"
830"Maldives\0"
831"Mali\0"
832"Malta\0"
833"MarshallIslands\0"
834"Martinique\0"
835"Mauritania\0"
836"Mauritius\0"
837"Mayotte\0"
838"Mexico\0"
839"Micronesia\0"
840"Moldova\0"
841"Monaco\0"
842"Mongolia\0"
843"Montserrat\0"
844"Morocco\0"
845"Mozambique\0"
846"Myanmar\0"
847"Namibia\0"
848"Nauru\0"
849"Nepal\0"
850"Netherlands\0"
851"NetherlandsAntilles\0"
852"NewCaledonia\0"
853"NewZealand\0"
854"Nicaragua\0"
855"Niger\0"
856"Nigeria\0"
857"Niue\0"
858"NorfolkIsland\0"
859"NorthernMarianaIslands\0"
860"Norway\0"
861"Oman\0"
862"Pakistan\0"
863"Palau\0"
864"PalestinianTerritory\0"
865"Panama\0"
866"PapuaNewGuinea\0"
867"Paraguay\0"
868"Peru\0"
869"Philippines\0"
870"Pitcairn\0"
871"Poland\0"
872"Portugal\0"
873"PuertoRico\0"
874"Qatar\0"
875"Reunion\0"
876"Romania\0"
877"RussianFederation\0"
878"Rwanda\0"
879"SaintKittsAndNevis\0"
880"StLucia\0"
881"StVincentAndTheGrenadines\0"
882"Samoa\0"
883"SanMarino\0"
884"SaoTomeAndPrincipe\0"
885"SaudiArabia\0"
886"Senegal\0"
887"Seychelles\0"
888"SierraLeone\0"
889"Singapore\0"
890"Slovakia\0"
891"Slovenia\0"
892"SolomonIslands\0"
893"Somalia\0"
894"SouthAfrica\0"
895"SouthGeorgiaAndTheSouthSandwichIslands\0"
896"Spain\0"
897"SriLanka\0"
898"StHelena\0"
899"StPierreAndMiquelon\0"
900"Sudan\0"
901"Suriname\0"
902"SvalbardAndJanMayenIslands\0"
903"Swaziland\0"
904"Sweden\0"
905"Switzerland\0"
906"SyrianArabRepublic\0"
907"Taiwan\0"
908"Tajikistan\0"
909"Tanzania\0"
910"Thailand\0"
911"Togo\0"
912"Tokelau\0"
913"Tonga\0"
914"TrinidadAndTobago\0"
915"Tunisia\0"
916"Turkey\0"
917"Turkmenistan\0"
918"TurksAndCaicosIslands\0"
919"Tuvalu\0"
920"Uganda\0"
921"Ukraine\0"
922"UnitedArabEmirates\0"
923"UnitedKingdom\0"
924"UnitedStates\0"
925"UnitedStatesMinorOutlyingIslands\0"
926"Uruguay\0"
927"Uzbekistan\0"
928"Vanuatu\0"
929"VaticanCityState\0"
930"Venezuela\0"
931"VietNam\0"
932"BritishVirginIslands\0"
933"USVirginIslands\0"
934"WallisAndFutunaIslands\0"
935"WesternSahara\0"
936"Yemen\0"
937"Yugoslavia\0"
938"Zambia\0"
939"Zimbabwe\0";
940
941static const uint country_name_index[] = {
942 0, // AnyCountry
943 8, // Afghanistan
944 20, // Albania
945 28, // Algeria
946 36, // AmericanSamoa
947 50, // Andorra
948 58, // Angola
949 65, // Anguilla
950 74, // Antarctica
951 85, // AntiguaAndBarbuda
952 103, // Argentina
953 113, // Armenia
954 121, // Aruba
955 127, // Australia
956 137, // Austria
957 145, // Azerbaijan
958 156, // Bahamas
959 164, // Bahrain
960 172, // Bangladesh
961 183, // Barbados
962 192, // Belarus
963 200, // Belgium
964 208, // Belize
965 215, // Benin
966 221, // Bermuda
967 229, // Bhutan
968 236, // Bolivia
969 244, // BosniaAndHerzegowina
970 265, // Botswana
971 274, // BouvetIsland
972 287, // Brazil
973 294, // BritishIndianOceanTerritory
974 322, // BruneiDarussalam
975 339, // Bulgaria
976 348, // BurkinaFaso
977 360, // Burundi
978 368, // Cambodia
979 377, // Cameroon
980 386, // Canada
981 393, // CapeVerde
982 403, // CaymanIslands
983 417, // CentralAfricanRepublic
984 440, // Chad
985 445, // Chile
986 451, // China
987 457, // ChristmasIsland
988 473, // CocosIslands
989 486, // Colombia
990 495, // Comoros
991 503, // DemocraticRepublicOfCongo
992 529, // PeoplesRepublicOfCongo
993 552, // CookIslands
994 564, // CostaRica
995 574, // IvoryCoast
996 585, // Croatia
997 593, // Cuba
998 598, // Cyprus
999 605, // CzechRepublic
1000 619, // Denmark
1001 627, // Djibouti
1002 636, // Dominica
1003 645, // DominicanRepublic
1004 663, // EastTimor
1005 673, // Ecuador
1006 681, // Egypt
1007 687, // ElSalvador
1008 698, // EquatorialGuinea
1009 715, // Eritrea
1010 723, // Estonia
1011 731, // Ethiopia
1012 740, // FalklandIslands
1013 756, // FaroeIslands
1014 769, // Fiji
1015 774, // Finland
1016 782, // France
1017 789, // MetropolitanFrance
1018 808, // FrenchGuiana
1019 821, // FrenchPolynesia
1020 837, // FrenchSouthernTerritories
1021 863, // Gabon
1022 869, // Gambia
1023 876, // Georgia
1024 884, // Germany
1025 892, // Ghana
1026 898, // Gibraltar
1027 908, // Greece
1028 915, // Greenland
1029 925, // Grenada
1030 933, // Guadeloupe
1031 944, // Guam
1032 949, // Guatemala
1033 959, // Guinea
1034 966, // GuineaBissau
1035 979, // Guyana
1036 986, // Haiti
1037 992, // HeardAndMcDonaldIslands
1038 1016, // Honduras
1039 1025, // HongKong
1040 1034, // Hungary
1041 1042, // Iceland
1042 1050, // India
1043 1056, // Indonesia
1044 1066, // Iran
1045 1071, // Iraq
1046 1076, // Ireland
1047 1084, // Israel
1048 1091, // Italy
1049 1097, // Jamaica
1050 1105, // Japan
1051 1111, // Jordan
1052 1118, // Kazakhstan
1053 1129, // Kenya
1054 1135, // Kiribati
1055 1144, // DemocraticRepublicOfKorea
1056 1170, // RepublicOfKorea
1057 1186, // Kuwait
1058 1193, // Kyrgyzstan
1059 1204, // Lao
1060 1208, // Latvia
1061 1215, // Lebanon
1062 1223, // Lesotho
1063 1231, // Liberia
1064 1239, // LibyanArabJamahiriya
1065 1260, // Liechtenstein
1066 1274, // Lithuania
1067 1284, // Luxembourg
1068 1295, // Macau
1069 1301, // Macedonia
1070 1311, // Madagascar
1071 1322, // Malawi
1072 1329, // Malaysia
1073 1338, // Maldives
1074 1347, // Mali
1075 1352, // Malta
1076 1358, // MarshallIslands
1077 1374, // Martinique
1078 1385, // Mauritania
1079 1396, // Mauritius
1080 1406, // Mayotte
1081 1414, // Mexico
1082 1421, // Micronesia
1083 1432, // Moldova
1084 1440, // Monaco
1085 1447, // Mongolia
1086 1456, // Montserrat
1087 1467, // Morocco
1088 1475, // Mozambique
1089 1486, // Myanmar
1090 1494, // Namibia
1091 1502, // Nauru
1092 1508, // Nepal
1093 1514, // Netherlands
1094 1526, // NetherlandsAntilles
1095 1546, // NewCaledonia
1096 1559, // NewZealand
1097 1570, // Nicaragua
1098 1580, // Niger
1099 1586, // Nigeria
1100 1594, // Niue
1101 1599, // NorfolkIsland
1102 1613, // NorthernMarianaIslands
1103 1636, // Norway
1104 1643, // Oman
1105 1648, // Pakistan
1106 1657, // Palau
1107 1663, // PalestinianTerritory
1108 1684, // Panama
1109 1691, // PapuaNewGuinea
1110 1706, // Paraguay
1111 1715, // Peru
1112 1720, // Philippines
1113 1732, // Pitcairn
1114 1741, // Poland
1115 1748, // Portugal
1116 1757, // PuertoRico
1117 1768, // Qatar
1118 1774, // Reunion
1119 1782, // Romania
1120 1790, // RussianFederation
1121 1808, // Rwanda
1122 1815, // SaintKittsAndNevis
1123 1834, // StLucia
1124 1842, // StVincentAndTheGrenadines
1125 1868, // Samoa
1126 1874, // SanMarino
1127 1884, // SaoTomeAndPrincipe
1128 1903, // SaudiArabia
1129 1915, // Senegal
1130 1923, // Seychelles
1131 1934, // SierraLeone
1132 1946, // Singapore
1133 1956, // Slovakia
1134 1965, // Slovenia
1135 1974, // SolomonIslands
1136 1989, // Somalia
1137 1997, // SouthAfrica
1138 2009, // SouthGeorgiaAndTheSouthSandwichIslands
1139 2048, // Spain
1140 2054, // SriLanka
1141 2063, // StHelena
1142 2072, // StPierreAndMiquelon
1143 2092, // Sudan
1144 2098, // Suriname
1145 2107, // SvalbardAndJanMayenIslands
1146 2134, // Swaziland
1147 2144, // Sweden
1148 2151, // Switzerland
1149 2163, // SyrianArabRepublic
1150 2182, // Taiwan
1151 2189, // Tajikistan
1152 2200, // Tanzania
1153 2209, // Thailand
1154 2218, // Togo
1155 2223, // Tokelau
1156 2231, // Tonga
1157 2237, // TrinidadAndTobago
1158 2255, // Tunisia
1159 2263, // Turkey
1160 2270, // Turkmenistan
1161 2283, // TurksAndCaicosIslands
1162 2305, // Tuvalu
1163 2312, // Uganda
1164 2319, // Ukraine
1165 2327, // UnitedArabEmirates
1166 2346, // UnitedKingdom
1167 2360, // UnitedStates
1168 2373, // UnitedStatesMinorOutlyingIslands
1169 2406, // Uruguay
1170 2414, // Uzbekistan
1171 2425, // Vanuatu
1172 2433, // VaticanCityState
1173 2450, // Venezuela
1174 2460, // VietNam
1175 2468, // BritishVirginIslands
1176 2489, // USVirginIslands
1177 2505, // WallisAndFutunaIslands
1178 2528, // WesternSahara
1179 2542, // Yemen
1180 2548, // Yugoslavia
1181 2559, // Zambia
1182 2566 // Zimbabwe
1183};
1184
1185static const char language_code_list[] =
1186" " // Unused
1187" " // C
1188"ab" // Abkhazian
1189"om" // Afan
1190"aa" // Afar
1191"af" // Afrikaans
1192"sq" // Albanian
1193"am" // Amharic
1194"ar" // Arabic
1195"hy" // Armenian
1196"as" // Assamese
1197"ay" // Aymara
1198"az" // Azerbaijani
1199"ba" // Bashkir
1200"eu" // Basque
1201"bn" // Bengali
1202"dz" // Bhutani
1203"bh" // Bihari
1204"bi" // Bislama
1205"br" // Breton
1206"bg" // Bulgarian
1207"my" // Burmese
1208"be" // Byelorussian
1209"km" // Cambodian
1210"ca" // Catalan
1211"zh" // Chinese
1212"co" // Corsican
1213"hr" // Croatian
1214"cs" // Czech
1215"da" // Danish
1216"nl" // Dutch
1217"en" // English
1218"eo" // Esperanto
1219"et" // Estonian
1220"fo" // Faroese
1221"fj" // Fiji
1222"fi" // Finnish
1223"fr" // French
1224"fy" // Frisian
1225"gd" // Gaelic
1226"gl" // Galician
1227"ka" // Georgian
1228"de" // German
1229"el" // Greek
1230"kl" // Greenlandic
1231"gn" // Guarani
1232"gu" // Gujarati
1233"ha" // Hausa
1234"he" // Hebrew
1235"hi" // Hindi
1236"hu" // Hungarian
1237"is" // Icelandic
1238"id" // Indonesian
1239"ia" // Interlingua
1240"ie" // Interlingue
1241"iu" // Inuktitut
1242"ik" // Inupiak
1243"ga" // Irish
1244"it" // Italian
1245"ja" // Japanese
1246"jv" // Javanese
1247"kn" // Kannada
1248"ks" // Kashmiri
1249"kk" // Kazakh
1250"rw" // Kinyarwanda
1251"ky" // Kirghiz
1252"ko" // Korean
1253"ku" // Kurdish
1254"rn" // Kurundi
1255"lo" // Laothian
1256"la" // Latin
1257"lv" // Latvian
1258"ln" // Lingala
1259"lt" // Lithuanian
1260"mk" // Macedonian
1261"mg" // Malagasy
1262"ms" // Malay
1263"ml" // Malayalam
1264"mt" // Maltese
1265"mi" // Maori
1266"mr" // Marathi
1267"mo" // Moldavian
1268"mn" // Mongolian
1269"na" // Nauru
1270"ne" // Nepali
1271"no" // Norwegian
1272"oc" // Occitan
1273"or" // Oriya
1274"ps" // Pashto
1275"fa" // Persian
1276"pl" // Polish
1277"pt" // Portuguese
1278"pa" // Punjabi
1279"qu" // Quechua
1280"rm" // RhaetoRomance
1281"ro" // Romanian
1282"ru" // Russian
1283"sm" // Samoan
1284"sg" // Sangho
1285"sa" // Sanskrit
1286"sr" // Serbian
1287"sh" // SerboCroatian
1288"st" // Sesotho
1289"tn" // Setswana
1290"sn" // Shona
1291"sd" // Sindhi
1292"si" // Singhalese
1293"ss" // Siswati
1294"sk" // Slovak
1295"sl" // Slovenian
1296"so" // Somali
1297"es" // Spanish
1298"su" // Sundanese
1299"sw" // Swahili
1300"sv" // Swedish
1301"tl" // Tagalog
1302"tg" // Tajik
1303"ta" // Tamil
1304"tt" // Tatar
1305"te" // Telugu
1306"th" // Thai
1307"bo" // Tibetan
1308"ti" // Tigrinya
1309"to" // Tonga
1310"ts" // Tsonga
1311"tr" // Turkish
1312"tk" // Turkmen
1313"tw" // Twi
1314"ug" // Uigur
1315"uk" // Ukrainian
1316"ur" // Urdu
1317"uz" // Uzbek
1318"vi" // Vietnamese
1319"vo" // Volapuk
1320"cy" // Welsh
1321"wo" // Wolof
1322"xh" // Xhosa
1323"yi" // Yiddish
1324"yo" // Yoruba
1325"za" // Zhuang
1326"zu" // Zulu
1327;
1328
1329static const char country_code_list[] =
1330" " // AnyLanguage
1331"AF" // Afghanistan
1332"AL" // Albania
1333"DZ" // Algeria
1334"AS" // AmericanSamoa
1335"AD" // Andorra
1336"AO" // Angola
1337"AI" // Anguilla
1338"AQ" // Antarctica
1339"AG" // AntiguaAndBarbuda
1340"AR" // Argentina
1341"AM" // Armenia
1342"AW" // Aruba
1343"AU" // Australia
1344"AT" // Austria
1345"AZ" // Azerbaijan
1346"BS" // Bahamas
1347"BH" // Bahrain
1348"BD" // Bangladesh
1349"BB" // Barbados
1350"BY" // Belarus
1351"BE" // Belgium
1352"BZ" // Belize
1353"BJ" // Benin
1354"BM" // Bermuda
1355"BT" // Bhutan
1356"BO" // Bolivia
1357"BA" // BosniaAndHerzegowina
1358"BW" // Botswana
1359"BV" // BouvetIsland
1360"BR" // Brazil
1361"IO" // BritishIndianOceanTerritory
1362"BN" // BruneiDarussalam
1363"BG" // Bulgaria
1364"BF" // BurkinaFaso
1365"BI" // Burundi
1366"KH" // Cambodia
1367"CM" // Cameroon
1368"CA" // Canada
1369"CV" // CapeVerde
1370"KY" // CaymanIslands
1371"CF" // CentralAfricanRepublic
1372"TD" // Chad
1373"CL" // Chile
1374"CN" // China
1375"CX" // ChristmasIsland
1376"CC" // CocosIslands
1377"CO" // Colombia
1378"KM" // Comoros
1379"CD" // DemocraticRepublicOfCongo
1380"CG" // PeoplesRepublicOfCongo
1381"CK" // CookIslands
1382"CR" // CostaRica
1383"CI" // IvoryCoast
1384"HR" // Croatia
1385"CU" // Cuba
1386"CY" // Cyprus
1387"CZ" // CzechRepublic
1388"DK" // Denmark
1389"DJ" // Djibouti
1390"DM" // Dominica
1391"DO" // DominicanRepublic
1392"TL" // EastTimor
1393"EC" // Ecuador
1394"EG" // Egypt
1395"SV" // ElSalvador
1396"GQ" // EquatorialGuinea
1397"ER" // Eritrea
1398"EE" // Estonia
1399"ET" // Ethiopia
1400"FK" // FalklandIslands
1401"FO" // FaroeIslands
1402"FJ" // Fiji
1403"FI" // Finland
1404"FR" // France
1405"FX" // MetropolitanFrance
1406"GF" // FrenchGuiana
1407"PF" // FrenchPolynesia
1408"TF" // FrenchSouthernTerritories
1409"GA" // Gabon
1410"GM" // Gambia
1411"GE" // Georgia
1412"DE" // Germany
1413"GH" // Ghana
1414"GI" // Gibraltar
1415"GR" // Greece
1416"GL" // Greenland
1417"GD" // Grenada
1418"GP" // Guadeloupe
1419"GU" // Guam
1420"GT" // Guatemala
1421"GN" // Guinea
1422"GW" // GuineaBissau
1423"GY" // Guyana
1424"HT" // Haiti
1425"HM" // HeardAndMcDonaldIslands
1426"HN" // Honduras
1427"HK" // HongKong
1428"HU" // Hungary
1429"IS" // Iceland
1430"IN" // India
1431"ID" // Indonesia
1432"IR" // Iran
1433"IQ" // Iraq
1434"IE" // Ireland
1435"IL" // Israel
1436"IT" // Italy
1437"JM" // Jamaica
1438"JP" // Japan
1439"JO" // Jordan
1440"KZ" // Kazakhstan
1441"KE" // Kenya
1442"KI" // Kiribati
1443"KP" // DemocraticRepublicOfKorea
1444"KR" // RepublicOfKorea
1445"KW" // Kuwait
1446"KG" // Kyrgyzstan
1447"LA" // Lao
1448"LV" // Latvia
1449"LB" // Lebanon
1450"LS" // Lesotho
1451"LR" // Liberia
1452"LY" // LibyanArabJamahiriya
1453"LI" // Liechtenstein
1454"LT" // Lithuania
1455"LU" // Luxembourg
1456"MO" // Macau
1457"MK" // Macedonia
1458"MG" // Madagascar
1459"MW" // Malawi
1460"MY" // Malaysia
1461"MV" // Maldives
1462"ML" // Mali
1463"MT" // Malta
1464"MH" // MarshallIslands
1465"MQ" // Martinique
1466"MR" // Mauritania
1467"MU" // Mauritius
1468"YT" // Mayotte
1469"MX" // Mexico
1470"FM" // Micronesia
1471"MD" // Moldova
1472"MC" // Monaco
1473"MN" // Mongolia
1474"MS" // Montserrat
1475"MA" // Morocco
1476"MZ" // Mozambique
1477"MM" // Myanmar
1478"NA" // Namibia
1479"NR" // Nauru
1480"NP" // Nepal
1481"NL" // Netherlands
1482"AN" // NetherlandsAntilles
1483"NC" // NewCaledonia
1484"NZ" // NewZealand
1485"NI" // Nicaragua
1486"NE" // Niger
1487"NG" // Nigeria
1488"NU" // Niue
1489"NF" // NorfolkIsland
1490"MP" // NorthernMarianaIslands
1491"NO" // Norway
1492"OM" // Oman
1493"PK" // Pakistan
1494"PW" // Palau
1495"PS" // PalestinianTerritory
1496"PA" // Panama
1497"PG" // PapuaNewGuinea
1498"PY" // Paraguay
1499"PE" // Peru
1500"PH" // Philippines
1501"PN" // Pitcairn
1502"PL" // Poland
1503"PT" // Portugal
1504"PR" // PuertoRico
1505"QA" // Qatar
1506"RE" // Reunion
1507"RO" // Romania
1508"RU" // RussianFederation
1509"RW" // Rwanda
1510"KN" // SaintKittsAndNevis
1511"LC" // StLucia
1512"VC" // StVincentAndTheGrenadines
1513"WS" // Samoa
1514"SM" // SanMarino
1515"ST" // SaoTomeAndPrincipe
1516"SA" // SaudiArabia
1517"SN" // Senegal
1518"SC" // Seychelles
1519"SL" // SierraLeone
1520"SG" // Singapore
1521"SK" // Slovakia
1522"SI" // Slovenia
1523"SB" // SolomonIslands
1524"SO" // Somalia
1525"ZA" // SouthAfrica
1526"GS" // SouthGeorgiaAndTheSouthSandwichIslands
1527"ES" // Spain
1528"LK" // SriLanka
1529"SH" // StHelena
1530"PM" // StPierreAndMiquelon
1531"SD" // Sudan
1532"SR" // Suriname
1533"SJ" // SvalbardAndJanMayenIslands
1534"SZ" // Swaziland
1535"SE" // Sweden
1536"CH" // Switzerland
1537"SY" // SyrianArabRepublic
1538"TW" // Taiwan
1539"TJ" // Tajikistan
1540"TZ" // Tanzania
1541"TH" // Thailand
1542"TG" // Togo
1543"TK" // Tokelau
1544"TO" // Tonga
1545"TT" // TrinidadAndTobago
1546"TN" // Tunisia
1547"TR" // Turkey
1548"TM" // Turkmenistan
1549"TC" // TurksAndCaicosIslands
1550"TV" // Tuvalu
1551"UG" // Uganda
1552"UA" // Ukraine
1553"AE" // UnitedArabEmirates
1554"GB" // UnitedKingdom
1555"US" // UnitedStates
1556"UM" // UnitedStatesMinorOutlyingIslands
1557"UY" // Uruguay
1558"UZ" // Uzbekistan
1559"VU" // Vanuatu
1560"VA" // VaticanCityState
1561"VE" // Venezuela
1562"VN" // VietNam
1563"VG" // BritishVirginIslands
1564"VI" // USVirginIslands
1565"WF" // WallisAndFutunaIslands
1566"EH" // WesternSahara
1567"YE" // Yemen
1568"YU" // Yugoslavia
1569"ZM" // Zambia
1570"ZW" // Zimbabwe
1571;
1572
1573static QLocale::Language codeToLanguage(const QString &code)
1574{
1575 if (code.length() != 2)
1576 return QLocale::C;
1577
1578 ushort uc1 = code.unicode()[0].unicode();
1579 ushort uc2 = code.unicode()[1].unicode();
1580
1581 const char *c = language_code_list;
1582 for (; *c != 0; c += 2) {
1583 if (uc1 == (unsigned char)c[0] && uc2 == (unsigned char)c[1])
1584 return (QLocale::Language) ((c - language_code_list)/2);
1585 }
1586
1587 return QLocale::C;
1588}
1589
1590static QLocale::Country codeToCountry(const QString &code)
1591{
1592 if (code.length() != 2)
1593 return QLocale::AnyCountry;
1594
1595 ushort uc1 = code.unicode()[0].unicode();
1596 ushort uc2 = code.unicode()[1].unicode();
1597
1598 const char *c = country_code_list;
1599 for (; *c != 0; c += 2) {
1600 if (uc1 == (unsigned char)c[0] && uc2 == (unsigned char)c[1])
1601 return (QLocale::Country) ((c - country_code_list)/2);
1602 }
1603
1604 return QLocale::AnyCountry;
1605}
1606
1607static QString languageToCode(QLocale::Language language)
1608{
1609 if (language == QLocale::C)
1610 return "C";
1611
1612 QString code;
1613 code.setLength(2);
1614 const char *c = language_code_list + 2*(uint)language;
1615 code[0] = c[0];
1616 code[1] = c[1];
1617 return code;
1618}
1619
1620static QString countryToCode(QLocale::Country country)
1621{
1622 if (country == QLocale::AnyCountry)
1623 return QString::null;
1624
1625 QString code;
1626 code.setLength(2);
1627 const char *c = country_code_list + 2*(uint)country;
1628 code[0] = c[0];
1629 code[1] = c[1];
1630 return code;
1631}
1632
1633const QLocalePrivate *QLocale::default_d = 0;
1634
1635QString QLocalePrivate::infinity() const
1636{
1637 return QString::fromLatin1("inf");
1638}
1639
1640QString QLocalePrivate::nan() const
1641{
1642 return QString::fromLatin1("nan");
1643}
1644
1645const char* QLocalePrivate::systemLocaleName()
1646{
1647 static QCString lang;
1648 lang = getenv( "LANG" );
1649
1650#if !defined( QWS ) && defined( Q_OS_MAC )
1651 if ( !lang.isEmpty() )
1652 return lang;
1653
1654 char mac_ret[255];
1655 if(!LocaleRefGetPartString(NULL, kLocaleLanguageMask | kLocaleRegionMask, 255, mac_ret))
1656 lang = mac_ret;
1657#endif
1658
1659#if defined(Q_WS_WIN)
1660 if ( !lang.isEmpty() )
1661 return lang;
1662
1663 QT_WA( {
1664 wchar_t out[256];
1665 QString language;
1666 QString sublanguage;
1667 if ( GetLocaleInfoW( LOCALE_USER_DEFAULT, LOCALE_SISO639LANGNAME , out, 255 ) )
1668 language = QString::fromUcs2( (ushort*)out );
1669 if ( GetLocaleInfoW( LOCALE_USER_DEFAULT, LOCALE_SISO3166CTRYNAME, out, 255 ) )
1670 sublanguage = QString::fromUcs2( (ushort*)out ).lower();
1671 lang = language;
1672 if ( sublanguage != language && !sublanguage.isEmpty() )
1673 lang += "_" + sublanguage;
1674 } , {
1675 char out[256];
1676 QString language;
1677 QString sublanguage;
1678 if ( GetLocaleInfoA( LOCALE_USER_DEFAULT, LOCALE_SISO639LANGNAME, out, 255 ) )
1679 language = QString::fromLocal8Bit( out );
1680 if ( GetLocaleInfoA( LOCALE_USER_DEFAULT, LOCALE_SISO3166CTRYNAME, out, 255 ) )
1681 sublanguage = QString::fromLocal8Bit( out ).lower();
1682 lang = language;
1683 if ( sublanguage != language && !sublanguage.isEmpty() )
1684 lang += "_" + sublanguage;
1685 } );
1686#endif
1687 if ( lang.isEmpty() )
1688 lang = "C";
1689
1690 return lang;
1691}
1692
1693static const QLocalePrivate *findLocale(QLocale::Language language,
1694 QLocale::Country country)
1695{
1696 unsigned language_id = (unsigned)language;
1697 unsigned country_id = (unsigned)country;
1698
1699 uint idx = locale_index[language_id];
1700
1701 const QLocalePrivate *d = locale_data + idx;
1702
1703 if (idx == 0) // default language has no associated country
1704 return d;
1705
1706 if (country == QLocale::AnyCountry)
1707 return d;
1708
1709 Q_ASSERT(d->languageId() == language_id);
1710
1711 while (d->languageId() == language_id
1712 && d->countryId() != country_id)
1713 ++d;
1714
1715 if (d->countryId() == country_id
1716 && d->languageId() == language_id)
1717 return d;
1718
1719 return locale_data + idx;
1720}
1721
1722/*!
1723 \class QLocale
1724 \brief The QLocale class converts between numbers and their
1725 string representations in various languages.
1726
1727 \reentrant
1728 \ingroup text
1729
1730 It is initialized with a country/language pair in its constructor
1731 and offers number-to-string and string-to-number conversion
1732 functions simmilar to those in QString.
1733
1734 \code
1735 QLocale egyptian(QLocale::Arabic, QLocale::Egypt);
1736 QString s1 = egyptian.toString(1.571429E+07, 'e');
1737 QString s2 = egyptian.toString(10);
1738
1739 double d = egyptian.toDouble(s1);
1740 int s2 = egyptian.toInt(s2);
1741 \endcode
1742
1743 QLocale supports the concept of a default locale, which is
1744 determined from the system's locale settings at application
1745 startup. The default locale can be changed by calling the
1746 static member setDefault(). The default locale has the
1747 following effects:
1748
1749 \list
1750 \i If a QLocale object is constructed with the default constructor,
1751 it will use the default locale's settings.
1752 \i QString::toDouble() interprets the string according to the default
1753 locale. If this fails, it falls back on the "C" locale.
1754 \i QString::arg() uses the default locale to format a number when
1755 its position specifier in the format string contains an 'L',
1756 e.g. "%L1".
1757 \endlist
1758
1759 \code
1760 QLocale::setDefault(QLocale::Hebrew, QLocale::Israel);
1761 QLocale hebrew; // Constructs a default QLocale
1762 QString s1 = hebrew.toString(15714.3, 'e');
1763
1764 bool ok;
1765 double d;
1766
1767 QLocale::setDefault(QLocale::C);
1768 d = QString( "1234,56" ).toDouble(&ok); // ok == false
1769 d = QString( "1234.56" ).toDouble(&ok); // ok == true, d == 1234.56
1770
1771 QLocale::setDefault(QLocale::German);
1772 d = QString( "1234,56" ).toDouble(&ok); // ok == true, d == 1234.56
1773 d = QString( "1234.56" ).toDouble(&ok); // ok == true, d == 1234.56
1774
1775 QLocale::setDefault(QLocale::English, QLocale::UnitedStates);
1776 str = QString( "%1 %L2 %L3" )
1777 .arg( 12345 )
1778 .arg( 12345 )
1779 .arg( 12345, 0, 16 );
1780 // str == "12345 12,345 3039"
1781 \endcode
1782
1783 When a language/country pair is specified in the constructor, one
1784 of three things can happen:
1785
1786 \list
1787 \i If the language/country pair is found in the database, it is used.
1788 \i If the language is found but the country is not, or if the country
1789 is \c AnyCountry, the language is used with the most
1790 appropriate available country (for example, Germany for German),
1791 \i If neither the language nor the country are found, QLocale
1792 defaults to the default locale (see setDefault()).
1793 \endlist
1794
1795 The "C" locale is identical to English/UnitedStates.
1796
1797 Use language() and country() to determine the actual language and
1798 country values used.
1799
1800 An alternative method for constructing a QLocale object is by
1801 specifying the locale name.
1802
1803 \code
1804 QLocale korean("ko");
1805 QLocale swiss("de_CH");
1806 \endcode
1807
1808 This constructor converts the locale name to a language/country
1809 pair; it does not use the system locale database.
1810
1811 All the methods in QLocale, with the exception of setDefault(),
1812 are reentrant.
1813
1814 \sa QString::toDouble() QString::arg()
1815
1816 The double-to-string and string-to-double conversion functions are
1817 covered by the following licenses:
1818
1819 \legalese
1820
1821 Copyright (c) 1991 by AT&T.
1822
1823 Permission to use, copy, modify, and distribute this software for any
1824 purpose without fee is hereby granted, provided that this entire notice
1825 is included in all copies of any software which is or includes a copy
1826 or modification of this software and in all copies of the supporting
1827 documentation for such software.
1828
1829 THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
1830 WARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR AT&T MAKES ANY
1831 REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY
1832 OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
1833
1834 This product includes software developed by the University of
1835 California, Berkeley and its contributors.
1836*/
1837
1838/*!
1839 \enum QLocale::Language
1840
1841 This enumerated type is used to specify a language.
1842
1843 \value C Identical to English/UnitedStates
1844 \value Abkhazian
1845 \value Afan
1846 \value Afar
1847 \value Afrikaans
1848 \value Albanian
1849 \value Amharic
1850 \value Arabic
1851 \value Armenian
1852 \value Assamese
1853 \value Aymara
1854 \value Azerbaijani
1855 \value Bashkir
1856 \value Basque
1857 \value Bengali
1858 \value Bhutani
1859 \value Bihari
1860 \value Bislama
1861 \value Breton
1862 \value Bulgarian
1863 \value Burmese
1864 \value Byelorussian
1865 \value Cambodian
1866 \value Catalan
1867 \value Chinese
1868 \value Corsican
1869 \value Croatian
1870 \value Czech
1871 \value Danish
1872 \value Dutch
1873 \value English
1874 \value Esperanto
1875 \value Estonian
1876 \value Faroese
1877 \value FijiLanguage
1878 \value Finnish
1879 \value French
1880 \value Frisian
1881 \value Gaelic
1882 \value Galician
1883 \value Georgian
1884 \value German
1885 \value Greek
1886 \value Greenlandic
1887 \value Guarani
1888 \value Gujarati
1889 \value Hausa
1890 \value Hebrew
1891 \value Hindi
1892 \value Hungarian
1893 \value Icelandic
1894 \value Indonesian
1895 \value Interlingua
1896 \value Interlingue
1897 \value Inuktitut
1898 \value Inupiak
1899 \value Irish
1900 \value Italian
1901 \value Japanese
1902 \value Javanese
1903 \value Kannada
1904 \value Kashmiri
1905 \value Kazakh
1906 \value Kinyarwanda
1907 \value Kirghiz
1908 \value Korean
1909 \value Kurdish
1910 \value Kurundi
1911 \value Laothian
1912 \value Latin
1913 \value Latvian
1914 \value Lingala
1915 \value Lithuanian
1916 \value Macedonian
1917 \value Malagasy
1918 \value Malay
1919 \value Malayalam
1920 \value Maltese
1921 \value Maori
1922 \value Marathi
1923 \value Moldavian
1924 \value Mongolian
1925 \value NauruLanguage
1926 \value Nepali
1927 \value Norwegian
1928 \value Occitan
1929 \value Oriya
1930 \value Pashto
1931 \value Persian
1932 \value Polish
1933 \value Portuguese
1934 \value Punjabi
1935 \value Quechua
1936 \value RhaetoRomance
1937 \value Romanian
1938 \value Russian
1939 \value Samoan
1940 \value Sangho
1941 \value Sanskrit
1942 \value Serbian
1943 \value SerboCroatian
1944 \value Sesotho
1945 \value Setswana
1946 \value Shona
1947 \value Sindhi
1948 \value Singhalese
1949 \value Siswati
1950 \value Slovak
1951 \value Slovenian
1952 \value Somali
1953 \value Spanish
1954 \value Sundanese
1955 \value Swahili
1956 \value Swedish
1957 \value Tagalog
1958 \value Tajik
1959 \value Tamil
1960 \value Tatar
1961 \value Telugu
1962 \value Thai
1963 \value Tibetan
1964 \value Tigrinya
1965 \value TongaLanguage
1966 \value Tsonga
1967 \value Turkish
1968 \value Turkmen
1969 \value Twi
1970 \value Uigur
1971 \value Ukrainian
1972 \value Urdu
1973 \value Uzbek
1974 \value Vietnamese
1975 \value Volapuk
1976 \value Welsh
1977 \value Wolof
1978 \value Xhosa
1979 \value Yiddish
1980 \value Yoruba
1981 \value Zhuang
1982 \value Zulu
1983*/
1984
1985/*!
1986 \enum QLocale::Country
1987
1988 This enumerated type is used to specify a country.
1989
1990 \value AnyCountry
1991 \value Afghanistan
1992 \value Albania
1993 \value Algeria
1994 \value AmericanSamoa
1995 \value Andorra
1996 \value Angola
1997 \value Anguilla
1998 \value Antarctica
1999 \value AntiguaAndBarbuda
2000 \value Argentina
2001 \value Armenia
2002 \value Aruba
2003 \value Australia
2004 \value Austria
2005 \value Azerbaijan
2006 \value Bahamas
2007 \value Bahrain
2008 \value Bangladesh
2009 \value Barbados
2010 \value Belarus
2011 \value Belgium
2012 \value Belize
2013 \value Benin
2014 \value Bermuda
2015 \value Bhutan
2016 \value Bolivia
2017 \value BosniaAndHerzegowina
2018 \value Botswana
2019 \value BouvetIsland
2020 \value Brazil
2021 \value BritishIndianOceanTerritory
2022 \value BruneiDarussalam
2023 \value Bulgaria
2024 \value BurkinaFaso
2025 \value Burundi
2026 \value Cambodia
2027 \value Cameroon
2028 \value Canada
2029 \value CapeVerde
2030 \value CaymanIslands
2031 \value CentralAfricanRepublic
2032 \value Chad
2033 \value Chile
2034 \value China
2035 \value ChristmasIsland
2036 \value CocosIslands
2037 \value Colombia
2038 \value Comoros
2039 \value DemocraticRepublicOfCongo
2040 \value PeoplesRepublicOfCongo
2041 \value CookIslands
2042 \value CostaRica
2043 \value IvoryCoast
2044 \value Croatia
2045 \value Cuba
2046 \value Cyprus
2047 \value CzechRepublic
2048 \value Denmark
2049 \value Djibouti
2050 \value Dominica
2051 \value DominicanRepublic
2052 \value EastTimor
2053 \value Ecuador
2054 \value Egypt
2055 \value ElSalvador
2056 \value EquatorialGuinea
2057 \value Eritrea
2058 \value Estonia
2059 \value Ethiopia
2060 \value FalklandIslands
2061 \value FaroeIslands
2062 \value FijiCountry
2063 \value Finland
2064 \value France
2065 \value MetropolitanFrance
2066 \value FrenchGuiana
2067 \value FrenchPolynesia
2068 \value FrenchSouthernTerritories
2069 \value Gabon
2070 \value Gambia
2071 \value Georgia
2072 \value Germany
2073 \value Ghana
2074 \value Gibraltar
2075 \value Greece
2076 \value Greenland
2077 \value Grenada
2078 \value Guadeloupe
2079 \value Guam
2080 \value Guatemala
2081 \value Guinea
2082 \value GuineaBissau
2083 \value Guyana
2084 \value Haiti
2085 \value HeardAndMcDonaldIslands
2086 \value Honduras
2087 \value HongKong
2088 \value Hungary
2089 \value Iceland
2090 \value India
2091 \value Indonesia
2092 \value Iran
2093 \value Iraq
2094 \value Ireland
2095 \value Israel
2096 \value Italy
2097 \value Jamaica
2098 \value Japan
2099 \value Jordan
2100 \value Kazakhstan
2101 \value Kenya
2102 \value Kiribati
2103 \value DemocraticRepublicOfKorea
2104 \value RepublicOfKorea
2105 \value Kuwait
2106 \value Kyrgyzstan
2107 \value Lao
2108 \value Latvia
2109 \value Lebanon
2110 \value Lesotho
2111 \value Liberia
2112 \value LibyanArabJamahiriya
2113 \value Liechtenstein
2114 \value Lithuania
2115 \value Luxembourg
2116 \value Macau
2117 \value Macedonia
2118 \value Madagascar
2119 \value Malawi
2120 \value Malaysia
2121 \value Maldives
2122 \value Mali
2123 \value Malta
2124 \value MarshallIslands
2125 \value Martinique
2126 \value Mauritania
2127 \value Mauritius
2128 \value Mayotte
2129 \value Mexico
2130 \value Micronesia
2131 \value Moldova
2132 \value Monaco
2133 \value Mongolia
2134 \value Montserrat
2135 \value Morocco
2136 \value Mozambique
2137 \value Myanmar
2138 \value Namibia
2139 \value NauruCountry
2140 \value Nepal
2141 \value Netherlands
2142 \value NetherlandsAntilles
2143 \value NewCaledonia
2144 \value NewZealand
2145 \value Nicaragua
2146 \value Niger
2147 \value Nigeria
2148 \value Niue
2149 \value NorfolkIsland
2150 \value NorthernMarianaIslands
2151 \value Norway
2152 \value Oman
2153 \value Pakistan
2154 \value Palau
2155 \value PalestinianTerritory
2156 \value Panama
2157 \value PapuaNewGuinea
2158 \value Paraguay
2159 \value Peru
2160 \value Philippines
2161 \value Pitcairn
2162 \value Poland
2163 \value Portugal
2164 \value PuertoRico
2165 \value Qatar
2166 \value Reunion
2167 \value Romania
2168 \value RussianFederation
2169 \value Rwanda
2170 \value SaintKittsAndNevis
2171 \value StLucia
2172 \value StVincentAndTheGrenadines
2173 \value Samoa
2174 \value SanMarino
2175 \value SaoTomeAndPrincipe
2176 \value SaudiArabia
2177 \value Senegal
2178 \value Seychelles
2179 \value SierraLeone
2180 \value Singapore
2181 \value Slovakia
2182 \value Slovenia
2183 \value SolomonIslands
2184 \value Somalia
2185 \value SouthAfrica
2186 \value SouthGeorgiaAndTheSouthSandwichIslands
2187 \value Spain
2188 \value SriLanka
2189 \value StHelena
2190 \value StPierreAndMiquelon
2191 \value Sudan
2192 \value Suriname
2193 \value SvalbardAndJanMayenIslands
2194 \value Swaziland
2195 \value Sweden
2196 \value Switzerland
2197 \value SyrianArabRepublic
2198 \value Taiwan
2199 \value Tajikistan
2200 \value Tanzania
2201 \value Thailand
2202 \value Togo
2203 \value Tokelau
2204 \value TongaCountry
2205 \value TrinidadAndTobago
2206 \value Tunisia
2207 \value Turkey
2208 \value Turkmenistan
2209 \value TurksAndCaicosIslands
2210 \value Tuvalu
2211 \value Uganda
2212 \value Ukraine
2213 \value UnitedArabEmirates
2214 \value UnitedKingdom
2215 \value UnitedStates
2216 \value UnitedStatesMinorOutlyingIslands
2217 \value Uruguay
2218 \value Uzbekistan
2219 \value Vanuatu
2220 \value VaticanCityState
2221 \value Venezuela
2222 \value VietNam
2223 \value BritishVirginIslands
2224 \value USVirginIslands
2225 \value WallisAndFutunaIslands
2226 \value WesternSahara
2227 \value Yemen
2228 \value Yugoslavia
2229 \value Zambia
2230 \value Zimbabwe
2231*/
2232
2233/*!
2234 Constructs a QLocale object with the specified \a name,
2235 which has the format
2236 "language[_country][.codeset][@modifier]" or "C", where:
2237
2238 \list
2239 \i language is a lowercase, two-letter, ISO 639 language code,
2240 \i territory is an uppercase, two-letter, ISO 3166 country code,
2241 \i and codeset and modifier are ignored.
2242 \endlist
2243
2244 If the string violates the locale format, or language is not
2245 a valid ISO 369 code, the "C" locale is used instead. If country
2246 is not present, or is not a valid ISO 3166 code, the most
2247 appropriate country is chosen for the specified language.
2248
2249 The language and country codes are converted to their respective
2250 \c Language and \c Country enums. After this conversion is
2251 performed the constructor behaves exactly like QLocale(Country,
2252 Language).
2253
2254 This constructor is much slower than QLocale(Country, Language).
2255
2256 \sa name()
2257*/
2258
2259QLocale::QLocale(const QString &name)
2260{
2261 Language lang = C;
2262 Country cntry = AnyCountry;
2263
2264 uint l = name.length();
2265
2266 do {
2267 if (l < 2)
2268 break;
2269
2270 const QChar *uc = name.unicode();
2271 if (l > 2
2272 && uc[2] != '_'
2273 && uc[2] != '.'
2274 && uc[2] != '@')
2275 break;
2276
2277 lang = codeToLanguage(name.mid(0, 2));
2278 if (lang == C)
2279 break;
2280
2281 if (l == 2 || uc[2] == '.' || uc[2] == '@')
2282 break;
2283
2284 // we have uc[2] == '_'
2285 if (l < 5)
2286 break;
2287
2288 if (l > 5 && uc[5] != '.' && uc[5] != '@')
2289 break;
2290
2291 cntry = codeToCountry(name.mid(3, 2));
2292 } while (false);
2293
2294 d = findLocale(lang, cntry);
2295}
2296
2297/*!
2298 Constructs a QLocale object initialized with the default locale.
2299
2300 \sa setDefault()
2301*/
2302
2303QLocale::QLocale()
2304{
2305 if (default_d == 0)
2306 default_d = system().d;
2307
2308 d = default_d;
2309}
2310
2311/*!
2312 Constructs a QLocale object with the specified \a language and \a
2313 country.
2314
2315 \list
2316 \i If the language/country pair is found in the database, it is used.
2317 \i If the language is found but the country is not, or if the country
2318 is \c AnyCountry, the language is used with the most
2319 appropriate available country (for example, Germany for German),
2320 \i If neither the language nor the country are found, QLocale
2321 defaults to the default locale (see setDefault()).
2322 \endlist
2323
2324 The language and country that are actually used can be queried
2325 using language() and country().
2326
2327 \sa setDefault() language() country()
2328*/
2329
2330QLocale::QLocale(Language language, Country country)
2331{
2332 d = findLocale(language, country);
2333
2334 // If not found, should default to system
2335 if (d->languageId() == QLocale::C && language != QLocale::C) {
2336 if (default_d == 0)
2337 default_d = system().d;
2338
2339 d = default_d;
2340 }
2341}
2342
2343/*!
2344 Constructs a QLocale object as a copy of \a other.
2345*/
2346
2347QLocale::QLocale(const QLocale &other)
2348{
2349 d = other.d;
2350}
2351
2352/*!
2353 Assigns \a other to this QLocale object and returns a reference
2354 to this QLocale object.
2355*/
2356
2357QLocale &QLocale::operator=(const QLocale &other)
2358{
2359 d = other.d;
2360 return *this;
2361}
2362
2363/*!
2364 \nonreentrant
2365
2366 Sets the global default locale to \a locale. These
2367 values are used when a QLocale object is constructed with
2368 no arguments. If this function is not called, the system's
2369 locale is used.
2370
2371 \warning In a multithreaded application, the default locale
2372 should be set at application startup, before any non-GUI threads
2373 are created.
2374
2375 \sa system() c()
2376*/
2377
2378void QLocale::setDefault(const QLocale &locale)
2379{
2380 default_d = locale.d;
2381}
2382
2383/*!
2384 Returns the language of this locale.
2385
2386 \sa QLocale()
2387*/
2388QLocale::Language QLocale::language() const
2389{
2390 return (Language)d->languageId();
2391}
2392
2393/*!
2394 Returns the country of this locale.
2395
2396 \sa QLocale()
2397*/
2398QLocale::Country QLocale::country() const
2399{
2400 return (Country)d->countryId();
2401}
2402
2403/*!
2404 Returns the language and country of this locale as a
2405 string of the form "language_country", where
2406 language is a lowercase, two-letter ISO 639 language code,
2407 and country is an uppercase, two-letter ISO 3166 country code.
2408
2409 \sa QLocale()
2410*/
2411
2412QString QLocale::name() const
2413{
2414 Language l = language();
2415
2416 QString result = languageToCode(l);
2417
2418 if (l == C)
2419 return result;
2420
2421 Country c = country();
2422 if (c == AnyCountry)
2423 return result;
2424
2425 result.append('_');
2426 result.append(countryToCode(c));
2427
2428 return result;
2429}
2430
2431/*!
2432 Returns a QString containing the name of \a language.
2433*/
2434
2435QString QLocale::languageToString(Language language)
2436{
2437 if ((uint)language > (uint)QLocale::LastLanguage)
2438 return "Unknown";
2439 return language_name_list + language_name_index[(uint)language];
2440}
2441
2442/*!
2443 Returns a QString containing the name of \a country.
2444*/
2445
2446QString QLocale::countryToString(Country country)
2447{
2448 if ((uint)country > (uint)QLocale::LastCountry)
2449 return "Unknown";
2450 return country_name_list + country_name_index[(uint)country];
2451}
2452
2453/*!
2454 Returns the short int represented by the localized string \a s, or
2455 0 if the conversion failed.
2456
2457 If \a ok is not 0, reports failure by setting
2458 *ok to false and success by setting *ok to true.
2459
2460 This function ignores leading and trailing whitespace.
2461
2462 \sa toString()
2463*/
2464
2465short QLocale::toShort(const QString &s, bool *ok) const
2466{
2467 Q_LLONG i = toLongLong(s, ok);
2468 if (i < SHRT_MIN || i > SHRT_MAX) {
2469 if (ok != 0)
2470 *ok = false;
2471 return 0;
2472 }
2473 return (short) i;
2474}
2475
2476/*!
2477 Returns the unsigned short int represented by the localized string
2478 \a s, or 0 if the conversion failed.
2479
2480 If \a ok is not 0, reports failure by setting
2481 *ok to false and success by setting *ok to true.
2482
2483 This function ignores leading and trailing whitespace.
2484
2485 \sa toString()
2486*/
2487
2488ushort QLocale::toUShort(const QString &s, bool *ok) const
2489{
2490 Q_ULLONG i = toULongLong(s, ok);
2491 if (i > USHRT_MAX) {
2492 if (ok != 0)
2493 *ok = false;
2494 return 0;
2495 }
2496 return (ushort) i;
2497}
2498
2499/*!
2500 Returns the int represented by the localized string \a s, or 0 if
2501 the conversion failed.
2502
2503 If \a ok is not 0, reports failure by setting *ok to false and
2504 success by setting *ok to true.
2505
2506 This function ignores leading and trailing whitespace.
2507
2508 \sa toString()
2509*/
2510
2511int QLocale::toInt(const QString &s, bool *ok) const
2512{
2513 Q_LLONG i = toLongLong(s, ok);
2514 if (i < INT_MIN || i > INT_MAX) {
2515 if (ok != 0)
2516 *ok = false;
2517 return 0;
2518 }
2519 return (int) i;
2520}
2521
2522/*!
2523 Returns the unsigned int represented by the localized string \a s,
2524 or 0 if the conversion failed.
2525
2526 If \a ok is not 0, reports failure by setting
2527 *ok to false and success by setting *ok to true.
2528
2529 This function ignores leading and trailing whitespace.
2530
2531 \sa toString()
2532*/
2533
2534uint QLocale::toUInt(const QString &s, bool *ok) const
2535{
2536 Q_ULLONG i = toULongLong(s, ok);
2537 if (i > UINT_MAX) {
2538 if (ok != 0)
2539 *ok = false;
2540 return 0;
2541 }
2542 return (uint) i;
2543}
2544
2545/*!
2546 Returns the long int represented by the localized string \a s, or
2547 0 if the conversion failed.
2548
2549 If \a ok is not 0, reports failure by setting
2550 *ok to false and success by setting *ok to true.
2551
2552 This function ignores leading and trailing whitespace.
2553
2554 \sa toString()
2555*/
2556
2557Q_LONG QLocale::toLong(const QString &s, bool *ok) const
2558{
2559 Q_LLONG i = toLongLong(s, ok);
2560 if (i < LONG_MIN || i > LONG_MAX) {
2561 if (ok != 0)
2562 *ok = false;
2563 return 0;
2564 }
2565 return (Q_LONG) i;
2566}
2567
2568/*!
2569 Returns the unsigned long int represented by the localized string
2570 \a s, or 0 if the conversion failed.
2571
2572 If \a ok is not 0, reports failure by setting
2573 *ok to false and success by setting *ok to true.
2574
2575 This function ignores leading and trailing whitespace.
2576
2577 \sa toString()
2578*/
2579
2580Q_ULONG QLocale::toULong(const QString &s, bool *ok) const
2581{
2582 Q_ULLONG i = toULongLong(s, ok);
2583 if (i > ULONG_MAX) {
2584 if (ok != 0)
2585 *ok = false;
2586 return 0;
2587 }
2588 return (Q_ULONG) i;
2589}
2590
2591/*!
2592 Returns the long long int represented by the localized string \a
2593 s, or 0 if the conversion failed.
2594
2595 If \a ok is not 0, reports failure by setting
2596 *ok to false and success by setting *ok to true.
2597
2598 This function ignores leading and trailing whitespace.
2599
2600 \sa toString()
2601*/
2602
2603
2604Q_LLONG QLocale::toLongLong(const QString &s, bool *ok) const
2605{
2606 return d->stringToLongLong(s, 0, ok, QLocalePrivate::ParseGroupSeparators);
2607}
2608
2609/*!
2610 Returns the unsigned long long int represented by the localized
2611 string \a s, or 0 if the conversion failed.
2612
2613 If \a ok is not 0, reports failure by setting
2614 *ok to false and success by setting *ok to true.
2615
2616 This function ignores leading and trailing whitespace.
2617
2618 \sa toString()
2619*/
2620
2621
2622Q_ULLONG QLocale::toULongLong(const QString &s, bool *ok) const
2623{
2624 return d->stringToUnsLongLong(s, 0, ok, QLocalePrivate::ParseGroupSeparators);
2625}
2626
2627/*!
2628 Returns the float represented by the localized string \a s, or 0.0
2629 if the conversion failed.
2630
2631 If \a ok is not 0, reports failure by setting
2632 *ok to false and success by setting *ok to true.
2633
2634 This function ignores leading and trailing whitespace.
2635
2636 \sa toString()
2637*/
2638
2639float QLocale::toFloat(const QString &s, bool *ok) const
2640{
2641 return (float) toDouble(s, ok);
2642}
2643
2644/*!
2645 Returns the double represented by the localized string \a s, or
2646 0.0 if the conversion failed.
2647
2648 If \a ok is not 0, reports failure by setting
2649 *ok to false and success by setting *ok to true.
2650
2651 Unlike QString::toDouble(), this function does not fall back to
2652 the "C" locale if the string cannot be interpreted in this
2653 locale.
2654
2655 \code
2656 bool ok;
2657 double d;
2658
2659 QLocale c(QLocale::C);
2660 d = c.toDouble( "1234.56", &ok ); // ok == true, d == 1234.56
2661 d = c.toDouble( "1,234.56", &ok ); // ok == true, d == 1234.56
2662 d = c.toDouble( "1234,56", &ok ); // ok == false
2663
2664 QLocale german(QLocale::German);
2665 d = german.toDouble( "1234,56", &ok ); // ok == true, d == 1234.56
2666 d = german.toDouble( "1.234,56", &ok ); // ok == true, d == 1234.56
2667 d = german.toDouble( "1234.56", &ok ); // ok == false
2668
2669 d = german.toDouble( "1.234", &ok ); // ok == true, d == 1234.0
2670 \endcode
2671
2672 Notice that the last conversion returns 1234.0, because '.' is the
2673 thousands group separator in the German locale.
2674
2675 This function ignores leading and trailing whitespace.
2676
2677 \sa toString() QString::toDouble()
2678*/
2679
2680double QLocale::toDouble(const QString &s, bool *ok) const
2681{
2682 return d->stringToDouble(s, ok, QLocalePrivate::ParseGroupSeparators);
2683}
2684
2685/*!
2686 Returns a localized string representation of \a i.
2687
2688 \sa toLongLong()
2689*/
2690
2691QString QLocale::toString(Q_LLONG i) const
2692{
2693 return d->longLongToString(i, -1, 10, QLocalePrivate::ThousandsGroup);
2694}
2695
2696/*!
2697 \overload
2698
2699 \sa toULongLong()
2700*/
2701
2702QString QLocale::toString(Q_ULLONG i) const
2703{
2704 return d->unsLongLongToString(i, -1, 10, QLocalePrivate::ThousandsGroup);
2705}
2706
2707static bool qIsUpper(char c)
2708{
2709 return c >= 'A' && c <= 'Z';
2710}
2711
2712static char qToLower(char c)
2713{
2714 if (c >= 'A' && c <= 'Z')
2715 return c - 'A' + 'a';
2716 else
2717 return c;
2718}
2719
2720/*!
2721 \overload
2722
2723 \a f and \a prec have the same meaning as in QString::number(double, char, int).
2724
2725 \sa toDouble()
2726*/
2727
2728QString QLocale::toString(double i, char f, int prec) const
2729{
2730 QLocalePrivate::DoubleForm form = QLocalePrivate::DFDecimal;
2731 uint flags = 0;
2732
2733 if (qIsUpper(f))
2734 flags = QLocalePrivate::CapitalEorX;
2735 f = qToLower(f);
2736
2737 switch (f) {
2738 case 'f':
2739 form = QLocalePrivate::DFDecimal;
2740 break;
2741 case 'e':
2742 form = QLocalePrivate::DFExponent;
2743 break;
2744 case 'g':
2745 form = QLocalePrivate::DFSignificantDigits;
2746 break;
2747 default:
2748 break;
2749 }
2750
2751 flags |= QLocalePrivate::ThousandsGroup;
2752 return d->doubleToString(i, prec, form, -1, flags);
2753}
2754
2755/*!
2756 \fn QLocale QLocale::c()
2757
2758 Returns a QLocale object initialized to the "C" locale.
2759
2760 \sa system()
2761*/
2762
2763/*!
2764 Returns a QLocale object initialized to the system locale.
2765*/
2766
2767QLocale QLocale::system()
2768{
2769#ifdef Q_OS_UNIX
2770 const char *s = getenv("LC_NUMERIC");
2771 if (s == 0)
2772 s = getenv("LC_ALL");
2773 if (s != 0)
2774 return QLocale(s);
2775#endif
2776 return QLocale(QLocalePrivate::systemLocaleName());
2777}
2778
2779/*!
2780\fn QString QLocale::toString(short i) const
2781
2782\overload
2783
2784\sa toShort()
2785*/
2786
2787/*!
2788\fn QString QLocale::toString(ushort i) const
2789
2790\overload
2791
2792\sa toUShort()
2793*/
2794
2795/*!
2796\fn QString QLocale::toString(int i) const
2797
2798\overload
2799
2800\sa toInt()
2801*/
2802
2803/*!
2804\fn QString QLocale::toString(uint i) const
2805
2806\overload
2807
2808\sa toUInt()
2809*/
2810
2811/*!
2812\fn QString QLocale::toString(Q_LONG i) const
2813
2814\overload
2815
2816\sa toLong()
2817*/
2818
2819/*!
2820\fn QString QLocale::toString(Q_ULONG i) const
2821
2822\overload
2823
2824\sa toULong()
2825*/
2826
2827/*!
2828\fn QString QLocale::toString(float i, char f = 'g', int prec = 6) const
2829
2830\overload
2831
2832\a f and \a prec have the same meaning as in QString::number(double, char, int).
2833
2834\sa toDouble()
2835*/
2836
2837
2838bool QLocalePrivate::isDigit(QChar d) const
2839{
2840 return zero().unicode() <= d.unicode()
2841 && zero().unicode() + 10 > d.unicode();
2842}
2843
2844static char digitToCLocale(QChar zero, QChar d)
2845{
2846 if (zero.unicode() <= d.unicode()
2847 && zero.unicode() + 10 > d.unicode())
2848 return '0' + d.unicode() - zero.unicode();
2849
2850 qWarning("QLocalePrivate::digitToCLocale(): bad digit: row=%d, cell=%d", d.row(), d.cell());
2851 return QChar(0);
2852}
2853
2854static QString qulltoa(Q_ULLONG l, int base, const QLocalePrivate &locale)
2855{
2856 QChar buff[65]; // length of MAX_ULLONG in base 2
2857 QChar *p = buff + 65;
2858
2859 if (base != 10 || locale.zero().unicode() == '0') {
2860 while (l != 0) {
2861 int c = l % base;
2862
2863 --p;
2864
2865 if (c < 10)
2866 *p = '0' + c;
2867 else
2868 *p = c - 10 + 'a';
2869
2870 l /= base;
2871 }
2872 }
2873 else {
2874 while (l != 0) {
2875 int c = l % base;
2876
2877 *(--p) = locale.zero().unicode() + c;
2878
2879 l /= base;
2880 }
2881 }
2882
2883 return QString(p, 65 - (p - buff));
2884}
2885
2886static QString qlltoa(Q_LLONG l, int base, const QLocalePrivate &locale)
2887{
2888 return qulltoa(l < 0 ? -l : l, base, locale);
2889}
2890
2891enum PrecisionMode {
2892 PMDecimalDigits = 0x01,
2893 PMSignificantDigits = 0x02,
2894 PMChopTrailingZeros = 0x03
2895};
2896
2897static QString &decimalForm(QString &digits, int decpt, uint precision,
2898 PrecisionMode pm,
2899 bool always_show_decpt,
2900 bool thousands_group,
2901 const QLocalePrivate &locale)
2902{
2903 if (decpt < 0) {
2904 for (int i = 0; i < -decpt; ++i)
2905 digits.prepend(locale.zero());
2906 decpt = 0;
2907 }
2908 else if ((uint)decpt > digits.length()) {
2909 for (uint i = digits.length(); i < (uint)decpt; ++i)
2910 digits.append(locale.zero());
2911 }
2912
2913 if (pm == PMDecimalDigits) {
2914 uint decimal_digits = digits.length() - decpt;
2915 for (uint i = decimal_digits; i < precision; ++i)
2916 digits.append(locale.zero());
2917 }
2918 else if (pm == PMSignificantDigits) {
2919 for (uint i = digits.length(); i < precision; ++i)
2920 digits.append(locale.zero());
2921 }
2922 else { // pm == PMChopTrailingZeros
2923 }
2924
2925 if (always_show_decpt || (uint)decpt < digits.length())
2926 digits.insert(decpt, locale.decimal());
2927
2928 if (thousands_group) {
2929 for (int i = decpt - 3; i > 0; i -= 3)
2930 digits.insert(i, locale.group());
2931 }
2932
2933 if (decpt == 0)
2934 digits.prepend(locale.zero());
2935
2936 return digits;
2937}
2938
2939static QString &exponentForm(QString &digits, int decpt, uint precision,
2940 PrecisionMode pm,
2941 bool always_show_decpt,
2942 const QLocalePrivate &locale)
2943{
2944 int exp = decpt - 1;
2945
2946 if (pm == PMDecimalDigits) {
2947 for (uint i = digits.length(); i < precision + 1; ++i)
2948 digits.append(locale.zero());
2949 }
2950 else if (pm == PMSignificantDigits) {
2951 for (uint i = digits.length(); i < precision; ++i)
2952 digits.append(locale.zero());
2953 }
2954 else { // pm == PMChopTrailingZeros
2955 }
2956
2957 if (always_show_decpt || digits.length() > 1)
2958 digits.insert(1, locale.decimal());
2959
2960 digits.append(locale.exponential());
2961 digits.append(locale.longLongToString(exp, 2, 10,
2962 -1, QLocalePrivate::AlwaysShowSign));
2963
2964 return digits;
2965}
2966
2967QString QLocalePrivate::doubleToString(double d,
2968 int precision,
2969 DoubleForm form,
2970 int width,
2971 unsigned flags) const
2972{
2973 if (precision == -1)
2974 precision = 6;
2975 if (width == -1)
2976 width = 0;
2977
2978 bool negative = false;
2979 bool special_number = false; // nan, +/-inf
2980 QString num_str;
2981
2982 // Comparing directly to INFINITY gives weird results on some systems.
2983 double tmp_infinity = INFINITY;
2984
2985 // Detect special numbers (nan, +/-inf)
2986 if (d == tmp_infinity || d == -tmp_infinity) {
2987 num_str = infinity();
2988 special_number = true;
2989 negative = d < 0;
2990 } else if (isnan(d)) {
2991 num_str = nan();
2992 special_number = true;
2993 }
2994
2995 // Handle normal numbers
2996 if (!special_number) {
2997 int decpt, sign;
2998 QString digits;
2999
3000#ifdef QT_QLOCALE_USES_FCVT
3001#ifdef QT_THREAD_SUPPORT
3002 static bool dummy_for_mutex;
3003 QMutex *fcvt_mutex = qt_global_mutexpool ? qt_global_mutexpool->get( &dummy_for_mutex ) : 0;
3004# define FCVT_LOCK if (fcvt_mutex) fcvt_mutex->lock()
3005# define FCVT_UNLOCK if (fcvt_mutex) fcvt_mutex->unlock()
3006#else
3007# define FCVT_LOCK
3008# define FCVT_UNLOCK
3009#endif
3010 if (form == DFDecimal) {
3011 FCVT_LOCK;
3012 digits = fcvt(d, precision, &decpt, &sign);
3013 FCVT_UNLOCK;
3014 } else {
3015 int pr = precision;
3016 if (form == DFExponent)
3017 ++pr;
3018 else if (form == DFSignificantDigits && pr == 0)
3019 pr = 1;
3020 FCVT_LOCK;
3021 digits = ecvt(d, pr, &decpt, &sign);
3022 FCVT_UNLOCK;
3023
3024 // Chop trailing zeros
3025 if (digits.length() > 0) {
3026 int last_nonzero_idx = digits.length() - 1;
3027 while (last_nonzero_idx > 0
3028 && digits.unicode()[last_nonzero_idx] == '0')
3029 --last_nonzero_idx;
3030 digits.truncate(last_nonzero_idx + 1);
3031 }
3032
3033 }
3034
3035#else
3036 int mode;
3037 if (form == DFDecimal)
3038 mode = 3;
3039 else
3040 mode = 2;
3041
3042 /* This next bit is a bit quirky. In DFExponent form, the precision
3043 is the number of digits after decpt. So that would suggest using
3044 mode=3 for qdtoa. But qdtoa behaves strangely when mode=3 and
3045 precision=0. So we get around this by using mode=2 and reasoning
3046 that we want precision+1 significant digits, since the decimal
3047 point in this mode is always after the first digit. */
3048 int pr = precision;
3049 if (form == DFExponent)
3050 ++pr;
3051
3052 char *rve = 0;
3053 char *buff = 0;
3054 digits = qdtoa(d, mode, pr, &decpt, &sign, &rve, &buff);
3055 if (buff != 0)
3056 free(buff);
3057#endif // QT_QLOCALE_USES_FCVT
3058
3059 if (zero().unicode() != '0') {
3060 for (uint i = 0; i < digits.length(); ++i)
3061 digits.ref(i).unicode() += zero().unicode() - '0';
3062 }
3063
3064 bool always_show_decpt = flags & Alternate;
3065 switch (form) {
3066 case DFExponent: {
3067 num_str = exponentForm(digits, decpt, precision, PMDecimalDigits,
3068 always_show_decpt, *this);
3069 break;
3070 }
3071 case DFDecimal: {
3072 num_str = decimalForm(digits, decpt, precision, PMDecimalDigits,
3073 always_show_decpt, flags & ThousandsGroup,
3074 *this);
3075 break;
3076 }
3077 case DFSignificantDigits: {
3078 PrecisionMode mode = (flags & Alternate) ?
3079 PMSignificantDigits : PMChopTrailingZeros;
3080
3081 if (decpt != (int)digits.length() && (decpt <= -4 || decpt > (int)precision))
3082 num_str = exponentForm(digits, decpt, precision, mode,
3083 always_show_decpt, *this);
3084 else
3085 num_str = decimalForm(digits, decpt, precision, mode,
3086 always_show_decpt, flags & ThousandsGroup,
3087 *this);
3088 break;
3089 }
3090 }
3091
3092 negative = sign != 0;
3093 }
3094
3095 // pad with zeros. LeftAdjusted overrides this flag). Also, we don't
3096 // pad special numbers
3097 if (flags & QLocalePrivate::ZeroPadded
3098 && !(flags & QLocalePrivate::LeftAdjusted)
3099 && !special_number) {
3100 int num_pad_chars = width - (int)num_str.length();
3101 // leave space for the sign
3102 if (negative
3103 || flags & QLocalePrivate::AlwaysShowSign
3104 || flags & QLocalePrivate::BlankBeforePositive)
3105 --num_pad_chars;
3106
3107 for (int i = 0; i < num_pad_chars; ++i)
3108 num_str.prepend(zero());
3109 }
3110
3111 // add sign
3112 if (negative)
3113 num_str.prepend(minus());
3114 else if (flags & QLocalePrivate::AlwaysShowSign)
3115 num_str.prepend(plus());
3116 else if (flags & QLocalePrivate::BlankBeforePositive)
3117 num_str.prepend(' ');
3118
3119 if (flags & QLocalePrivate::CapitalEorX)
3120 num_str = num_str.upper();
3121
3122 return num_str;
3123}
3124
3125QString QLocalePrivate::longLongToString(Q_LLONG l, int precision,
3126 int base, int width,
3127 unsigned flags) const
3128{
3129 bool precision_not_specified = false;
3130 if (precision == -1) {
3131 precision_not_specified = true;
3132 precision = 1;
3133 }
3134
3135 bool negative = l < 0;
3136 if (base != 10) {
3137 // these are not suported by sprintf for octal and hex
3138 flags &= ~AlwaysShowSign;
3139 flags &= ~BlankBeforePositive;
3140 negative = false; // neither are negative numbers
3141 }
3142
3143 QString num_str;
3144 if (base == 10)
3145 num_str = qlltoa(l, base, *this);
3146 else
3147 num_str = qulltoa(l, base, *this);
3148
3149 uint cnt_thousand_sep = 0;
3150 if (flags & ThousandsGroup && base == 10) {
3151 for (int i = (int)num_str.length() - 3; i > 0; i -= 3) {
3152 num_str.insert(i, group());
3153 ++cnt_thousand_sep;
3154 }
3155 }
3156
3157 for (int i = num_str.length()/* - cnt_thousand_sep*/; i < precision; ++i)
3158 num_str.prepend(base == 10 ? zero() : QChar('0'));
3159
3160 if (flags & Alternate
3161 && base == 8
3162 && (num_str.isEmpty()
3163 || num_str[0].unicode() != '0'))
3164 num_str.prepend('0');
3165
3166 // LeftAdjusted overrides this flag ZeroPadded. sprintf only padds
3167 // when precision is not specified in the format string
3168 bool zero_padded = flags & ZeroPadded
3169 && !(flags & LeftAdjusted)
3170 && precision_not_specified;
3171
3172 if (zero_padded) {
3173 int num_pad_chars = width - (int)num_str.length();
3174
3175 // leave space for the sign
3176 if (negative
3177 || flags & AlwaysShowSign
3178 || flags & BlankBeforePositive)
3179 --num_pad_chars;
3180
3181 // leave space for optional '0x' in hex form
3182 if (base == 16
3183 && flags & Alternate
3184 && l != 0)
3185 num_pad_chars -= 2;
3186
3187 for (int i = 0; i < num_pad_chars; ++i)
3188 num_str.prepend(base == 10 ? zero() : QChar('0'));
3189 }
3190
3191 if (base == 16
3192 && flags & Alternate
3193 && l != 0)
3194 num_str.prepend("0x");
3195
3196 // add sign
3197 if (negative)
3198 num_str.prepend(minus());
3199 else if (flags & AlwaysShowSign)
3200 num_str.prepend(base == 10 ? plus() : QChar('+'));
3201 else if (flags & BlankBeforePositive)
3202 num_str.prepend(' ');
3203
3204 if (flags & CapitalEorX)
3205 num_str = num_str.upper();
3206
3207 return num_str;
3208}
3209
3210QString QLocalePrivate::unsLongLongToString(Q_ULLONG l, int precision,
3211 int base, int width,
3212 unsigned flags) const
3213{
3214 bool precision_not_specified = false;
3215 if (precision == -1) {
3216 precision_not_specified = true;
3217 precision = 1;
3218 }
3219
3220 QString num_str = qulltoa(l, base, *this);
3221
3222 uint cnt_thousand_sep = 0;
3223 if (flags & ThousandsGroup && base == 10) {
3224 for (int i = (int)num_str.length() - 3; i > 0; i -=3) {
3225 num_str.insert(i, group());
3226 ++cnt_thousand_sep;
3227 }
3228 }
3229
3230 for (int i = num_str.length()/* - cnt_thousand_sep*/; i < precision; ++i)
3231 num_str.prepend(base == 10 ? zero() : QChar('0'));
3232
3233 if (flags & Alternate
3234 && base == 8
3235 && (num_str.isEmpty()
3236 || num_str[0].unicode() != '0'))
3237 num_str.prepend('0');
3238
3239 // LeftAdjusted overrides this flag ZeroPadded. sprintf only padds
3240 // when precision is not specified in the format string
3241 bool zero_padded = flags & ZeroPadded
3242 && !(flags & LeftAdjusted)
3243 && precision_not_specified;
3244
3245 if (zero_padded) {
3246 int num_pad_chars = width - (int)num_str.length();
3247
3248 // leave space for optional '0x' in hex form
3249 if (base == 16
3250 && flags & Alternate
3251 && l != 0)
3252 num_pad_chars -= 2;
3253
3254 for (int i = 0; i < num_pad_chars; ++i)
3255 num_str.prepend(base == 10 ? zero() : QChar('0'));
3256 }
3257
3258 if (base == 16
3259 && flags & Alternate
3260 && l != 0)
3261 num_str.prepend("0x");
3262
3263 if (flags & CapitalEorX)
3264 num_str = num_str.upper();
3265
3266 return num_str;
3267}
3268
3269static bool compareSubstr(const QString &s1, uint idx, const QString &s2)
3270{
3271 uint i = 0;
3272 for (; i + idx < s1.length() && i < s2.length(); ++i) {
3273 if (s1.unicode()[i + idx] != s2.unicode()[i])
3274 return false;
3275 }
3276
3277 return i == s2.length();
3278}
3279
3280// Removes thousand-group separators, ie. the ',' in "1,234,567.89e-5"
3281bool QLocalePrivate::removeGroupSeparators(QString &num_str) const
3282{
3283 int group_cnt = 0; // counts number of group chars
3284 int decpt_idx = -1;
3285
3286 // Find the decimal point and check if there are any group chars
3287 uint i = 0;
3288 for (; i < num_str.length(); ++i) {
3289 QChar c = num_str.unicode()[i];
3290
3291 if (c == group()) {
3292 // check that there are digits before and after the separator
3293 if (i == 0 || !isDigit(num_str.unicode()[i - 1]))
3294 return false;
3295 if (i == num_str.length() + 1 || !isDigit(num_str.unicode()[i + 1]))
3296 return false;
3297 ++group_cnt;
3298 }
3299 else if (c == decimal()) {
3300 // Fail if more than one decimal points
3301 if (decpt_idx != -1)
3302 return false;
3303 decpt_idx = i;
3304 } else if (c == exponential() || c == exponential().upper()) {
3305 // an 'e' or 'E' - if we have not encountered a decimal
3306 // point, this is where it "is".
3307 if (decpt_idx == -1)
3308 decpt_idx = i;
3309 }
3310 }
3311
3312 // If no group chars, we're done
3313 if (group_cnt == 0)
3314 return true;
3315
3316 // No decimal point means that it "is" at the end of the string
3317 if (decpt_idx == -1)
3318 decpt_idx = num_str.length();
3319
3320 i = 0;
3321 while (i < num_str.length() && group_cnt > 0) {
3322 QChar c = num_str.unicode()[i];
3323
3324 if (c == group()) {
3325 // Don't allow group chars after the decimal point
3326 if ((int)i > decpt_idx)
3327 return false;
3328
3329 // Check that it is placed correctly relative to the decpt
3330 if ((decpt_idx - i) % 4 != 0)
3331 return false;
3332
3333 // Remove it
3334 num_str.remove(i, 1);
3335
3336 --group_cnt;
3337 --decpt_idx; // adjust decpt_idx
3338 } else {
3339 // Check that we are not missing a separator
3340 if ((int)i < decpt_idx && (decpt_idx - i) % 4 == 0)
3341 return false;
3342 ++i;
3343 }
3344 }
3345
3346 return true;
3347}
3348
3349static void stripWhiteSpaceInPlace(QString &s)
3350{
3351 uint i = 0;
3352 while (i < s.length() && s.unicode()[i].isSpace())
3353 ++i;
3354 if (i > 0)
3355 s.remove(0, i);
3356
3357 i = s.length();
3358
3359 if (i == 0)
3360 return;
3361 --i;
3362 while (i > 0 && s.unicode()[i].isSpace())
3363 --i;
3364 if (i + 1 < s.length())
3365 s.truncate(i + 1);
3366}
3367
3368// Converts a number in locale to its representation in the C locale.
3369bool QLocalePrivate::numberToCLocale(QString &l_num,
3370 GroupSeparatorMode group_sep_mode) const
3371{
3372 stripWhiteSpaceInPlace(l_num);
3373
3374 if (group_sep_mode == ParseGroupSeparators
3375 && !removeGroupSeparators(l_num))
3376 return false;
3377
3378 uint idx = 0;
3379 if (compareSubstr(l_num, idx, nan())) {
3380 idx += nan().length();
3381 return idx == l_num.length();
3382 }
3383 else if (compareSubstr(l_num, idx, nan().upper())) {
3384 for (uint i = idx; i < idx + nan().length(); ++i)
3385 l_num.ref(i) = l_num.unicode()[i].lower();
3386 idx += nan().length();
3387 return idx == l_num.length();
3388 }
3389 QChar &c = l_num.ref(idx);
3390
3391 if (c == plus()) {
3392 c.unicode() = '+';
3393 ++idx;
3394 }
3395 else if (c == minus()) {
3396 c.unicode() = '-';
3397 ++idx;
3398 }
3399
3400 if (compareSubstr(l_num, idx, infinity())) {
3401 idx += infinity().length();
3402 return idx == l_num.length();
3403 }
3404 else if (compareSubstr(l_num, idx, infinity().upper())) {
3405 for (uint i = idx; i < idx + infinity().length(); ++i)
3406 l_num.ref(i) = l_num.unicode()[i].lower();
3407 idx += infinity().length();
3408 return idx == l_num.length();
3409 }
3410
3411 while (idx < l_num.length()) {
3412 QChar &c = l_num.ref(idx);
3413
3414 if (isDigit(c))
3415 c = digitToCLocale(zero(), c);
3416 else if (c == plus())
3417 c = '+';
3418 else if (c == minus())
3419 c = '-';
3420 else if (c == decimal())
3421 c = '.';
3422 else if (c == group())
3423 c = ',';
3424 else if (c == exponential() || c == exponential().upper())
3425 c = 'e';
3426 else if (c.unicode() == 'x' || c.unicode() == 'X') // hex number
3427 c = 'x';
3428 else if (c == list())
3429 c = ';';
3430 else if (c == percent())
3431 c = '%';
3432 else if (c.unicode() >= 'A' && c.unicode() <= 'F')
3433 c = c.upper();
3434 else if (c.unicode() >= 'a' && c.unicode() <= 'f')
3435 ; // do nothing
3436 else
3437 return false;
3438
3439 ++idx;
3440 }
3441
3442 return true;
3443}
3444
3445double QLocalePrivate::stringToDouble(QString num,
3446 bool *ok,
3447 GroupSeparatorMode group_sep_mode) const
3448{
3449 if (!numberToCLocale(num, group_sep_mode)) {
3450 if (ok != 0)
3451 *ok = false;
3452 return 0.0;
3453 }
3454
3455 if (ok != 0)
3456 *ok = true;
3457
3458 if (num == "nan")
3459 return NAN;
3460
3461 if (num == "+inf"
3462 || num == "inf")
3463 return INFINITY;
3464
3465 if (num == "-inf")
3466 return -INFINITY;
3467
3468 bool _ok;
3469 const char *num_buff = num.latin1();
3470
3471#ifdef QT_QLOCALE_USES_FCVT
3472 char *endptr;
3473 double d = strtod(num_buff, &endptr);
3474 _ok = true;
3475#else
3476 const char *endptr;
3477 double d = qstrtod(num_buff, &endptr, &_ok);
3478#endif
3479
3480 if (!_ok || *endptr != '\0') {
3481 if (ok != 0)
3482 *ok = false;
3483 return 0.0;
3484 }
3485 else
3486 return d;
3487}
3488
3489Q_LLONG QLocalePrivate::stringToLongLong(QString num, int base,
3490 bool *ok,
3491 GroupSeparatorMode group_sep_mode) const
3492{
3493 if (!numberToCLocale(num, group_sep_mode)) {
3494 if (ok != 0)
3495 *ok = false;
3496 return 0;
3497 }
3498
3499 bool _ok;
3500 const char *endptr;
3501 const char *num_buff = num.latin1();
3502 Q_LLONG l = qstrtoll(num_buff, &endptr, base, &_ok);
3503
3504 if (!_ok || *endptr != '\0') {
3505 if (ok != 0)
3506 *ok = false;
3507 return 0;
3508 }
3509
3510 if (ok != 0)
3511 *ok = true;
3512 return l;
3513}
3514
3515Q_ULLONG QLocalePrivate::stringToUnsLongLong(QString num, int base,
3516 bool *ok,
3517 GroupSeparatorMode group_sep_mode) const
3518{
3519 if (!numberToCLocale(num, group_sep_mode)) {
3520 if (ok != 0)
3521 *ok = false;
3522 return 0;
3523 }
3524
3525 bool _ok;
3526 const char *endptr;
3527 const char *num_buff = num.latin1();
3528 Q_ULLONG l = qstrtoull(num_buff, &endptr, base, &_ok);
3529
3530 if (!_ok || *endptr != '\0') {
3531 if (ok != 0)
3532 *ok = false;
3533 return 0;
3534 }
3535
3536 if (ok != 0)
3537 *ok = true;
3538 return l;
3539}
3540
3541/*-
3542 * Copyright (c) 1992, 1993
3543 *The Regents of the University of California. All rights reserved.
3544 *
3545 * Redistribution and use in source and binary forms, with or without
3546 * modification, are permitted provided that the following conditions
3547 * are met:
3548 * 1. Redistributions of source code must retain the above copyright
3549 * notice, this list of conditions and the following disclaimer.
3550 * 2. Redistributions in binary form must reproduce the above copyright
3551 * notice, this list of conditions and the following disclaimer in the
3552 * documentation and/or other materials provided with the distribution.
3553 * 3. All advertising materials mentioning features or use of this software
3554 * must display the following acknowledgement:
3555 *This product includes software developed by the University of
3556 *California, Berkeley and its contributors.
3557 * 4. Neither the name of the University nor the names of its contributors
3558 * may be used to endorse or promote products derived from this software
3559 * without specific prior written permission.
3560 *
3561 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
3562 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
3563 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
3564 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
3565 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3566 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
3567 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
3568 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3569 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3570 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3571 * SUCH DAMAGE.
3572 */
3573
3574 // static char sccsid[] = "@(#)strtouq.c8.1 (Berkeley) 6/4/93";
3575// "$FreeBSD: src/lib/libc/stdlib/strtoull.c,v 1.5.2.1 2001/03/02 09:45:20 obrien Exp $";
3576
3577/*
3578 * Convert a string to an Q_ULLONG integer.
3579 *
3580 * Ignores `locale' stuff. Assumes that the upper and lower case
3581 * alphabets and digits are each contiguous.
3582 */
3583static Q_ULLONG qstrtoull(const char *nptr, const char **endptr, register int base, bool *ok)
3584{
3585 register const char *s = nptr;
3586 register Q_ULLONG acc;
3587 register unsigned char c;
3588 register Q_ULLONG qbase, cutoff;
3589 register int neg, any, cutlim;
3590
3591 if (ok != 0)
3592 *ok = true;
3593
3594 /*
3595 * See strtoq for comments as to the logic used.
3596 */
3597 s = nptr;
3598 do {
3599 c = *s++;
3600 } while (isspace(c));
3601 if (c == '-') {
3602 if (ok != 0)
3603 *ok = false;
3604 if (endptr != 0)
3605 *endptr = s - 1;
3606 return 0;
3607 } else {
3608 neg = 0;
3609 if (c == '+')
3610 c = *s++;
3611 }
3612 if ((base == 0 || base == 16) &&
3613 c == '0' && (*s == 'x' || *s == 'X')) {
3614 c = s[1];
3615 s += 2;
3616 base = 16;
3617 }
3618 if (base == 0)
3619 base = c == '0' ? 8 : 10;
3620 qbase = (unsigned)base;
3621 cutoff = (Q_ULLONG)ULLONG_MAX / qbase;
3622 cutlim = (Q_ULLONG)ULLONG_MAX % qbase;
3623 for (acc = 0, any = 0;; c = *s++) {
3624 if (!isascii(c))
3625 break;
3626 if (isdigit(c))
3627 c -= '0';
3628 else if (isalpha(c))
3629 c -= isupper(c) ? 'A' - 10 : 'a' - 10;
3630 else
3631 break;
3632 if (c >= base)
3633 break;
3634 if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim))
3635 any = -1;
3636 else {
3637 any = 1;
3638 acc *= qbase;
3639 acc += c;
3640 }
3641 }
3642 if (any < 0) {
3643 acc = ULLONG_MAX;
3644 if (ok != 0)
3645 *ok = false;
3646 }
3647 else if (neg)
3648 acc = (~acc) + 1;
3649 if (endptr != 0)
3650 *endptr = (char *)(any ? s - 1 : nptr);
3651 return (acc);
3652}
3653
3654
3655// "$FreeBSD: src/lib/libc/stdlib/strtoll.c,v 1.5.2.1 2001/03/02 09:45:20 obrien Exp $";
3656
3657
3658/*
3659 * Convert a string to a Q_LLONG integer.
3660 *
3661 * Ignores `locale' stuff. Assumes that the upper and lower case
3662 * alphabets and digits are each contiguous.
3663 */
3664static Q_LLONG qstrtoll(const char *nptr, const char **endptr, register int base, bool *ok)
3665{
3666 register const char *s;
3667 register Q_ULLONG acc;
3668 register unsigned char c;
3669 register Q_ULLONG qbase, cutoff;
3670 register int neg, any, cutlim;
3671
3672 if (ok != 0)
3673 *ok = true;
3674
3675 /*
3676 * Skip white space and pick up leading +/- sign if any.
3677 * If base is 0, allow 0x for hex and 0 for octal, else
3678 * assume decimal; if base is already 16, allow 0x.
3679 */
3680 s = nptr;
3681 do {
3682 c = *s++;
3683 } while (isspace(c));
3684 if (c == '-') {
3685 neg = 1;
3686 c = *s++;
3687 } else {
3688 neg = 0;
3689 if (c == '+')
3690 c = *s++;
3691 }
3692 if ((base == 0 || base == 16) &&
3693 c == '0' && (*s == 'x' || *s == 'X')) {
3694 c = s[1];
3695 s += 2;
3696 base = 16;
3697 }
3698 if (base == 0)
3699 base = c == '0' ? 8 : 10;
3700
3701 /*
3702 * Compute the cutoff value between legal numbers and illegal
3703 * numbers. That is the largest legal value, divided by the
3704 * base. An input number that is greater than this value, if
3705 * followed by a legal input character, is too big. One that
3706 * is equal to this value may be valid or not; the limit
3707 * between valid and invalid numbers is then based on the last
3708 * digit. For instance, if the range for quads is
3709 * [-9223372036854775808..9223372036854775807] and the input base
3710 * is 10, cutoff will be set to 922337203685477580 and cutlim to
3711 * either 7 (neg==0) or 8 (neg==1), meaning that if we have
3712 * accumulated a value > 922337203685477580, or equal but the
3713 * next digit is > 7 (or 8), the number is too big, and we will
3714 * return a range error.
3715 *
3716 * Set any if any `digits' consumed; make it negative to indicate
3717 * overflow.
3718 */
3719 qbase = (unsigned)base;
3720 cutoff = neg ? (Q_ULLONG)-(LLONG_MIN + LLONG_MAX) + LLONG_MAX
3721 : LLONG_MAX;
3722 cutlim = cutoff % qbase;
3723 cutoff /= qbase;
3724 for (acc = 0, any = 0;; c = *s++) {
3725 if (!isascii(c))
3726 break;
3727 if (isdigit(c))
3728 c -= '0';
3729 else if (isalpha(c))
3730 c -= isupper(c) ? 'A' - 10 : 'a' - 10;
3731 else
3732 break;
3733 if (c >= base)
3734 break;
3735 if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim))
3736 any = -1;
3737 else {
3738 any = 1;
3739 acc *= qbase;
3740 acc += c;
3741 }
3742 }
3743 if (any < 0) {
3744 acc = neg ? LLONG_MIN : LLONG_MAX;
3745 if (ok != 0)
3746 *ok = false;
3747 } else if (neg) {
3748 acc = (~acc) + 1;
3749 }
3750 if (endptr != 0)
3751 *endptr = (char *)(any ? s - 1 : nptr);
3752 return (acc);
3753}
3754
3755#ifndef QT_QLOCALE_USES_FCVT
3756
3757 /*From: NetBSD: strtod.c,v 1.26 1998/02/03 18:44:21 perry Exp */
3758 /* $FreeBSD: src/lib/libc/stdlib/netbsd_strtod.c,v 1.2.2.2 2001/03/02 17:14:15 tegge Exp $*/
3759
3760/* Please send bug reports to
3761 David M. Gay
3762 AT&T Bell Laboratories, Room 2C-463
3763 600 Mountain Avenue
3764 Murray Hill, NJ 07974-2070
3765 U.S.A.
3766 dmg@research.att.com or research!dmg
3767 */
3768
3769/* strtod for IEEE-, VAX-, and IBM-arithmetic machines.
3770 *
3771 * This strtod returns a nearest machine number to the input decimal
3772 * string (or sets errno to ERANGE). With IEEE arithmetic, ties are
3773 * broken by the IEEE round-even rule. Otherwise ties are broken by
3774 * biased rounding (add half and chop).
3775 *
3776 * Inspired loosely by William D. Clinger's paper "How to Read Floating
3777 * Point Numbers Accurately" [Proc. ACM SIGPLAN '90, pp. 92-101].
3778 *
3779 * Modifications:
3780 *
3781 *1. We only require IEEE, IBM, or VAX double-precision
3782 * arithmetic (not IEEE double-extended).
3783 *2. We get by with floating-point arithmetic in a case that
3784 * Clinger missed -- when we're computing d * 10^n
3785 * for a small integer d and the integer n is not too
3786 * much larger than 22 (the maximum integer k for which
3787 * we can represent 10^k exactly), we may be able to
3788 * compute (d*10^k) * 10^(e-k) with just one roundoff.
3789 *3. Rather than a bit-at-a-time adjustment of the binary
3790 * result in the hard case, we use floating-point
3791 * arithmetic to determine the adjustment to within
3792 * one bit; only in really hard cases do we need to
3793 * compute a second residual.
3794 *4. Because of 3., we don't need a large table of powers of 10
3795 * for ten-to-e (just some small tables, e.g. of 10^k
3796 * for 0 <= k <= 22).
3797 */
3798
3799/*
3800 * #define IEEE_LITTLE_ENDIAN for IEEE-arithmetic machines where the least
3801 *significant byte has the lowest address.
3802 * #define IEEE_BIG_ENDIAN for IEEE-arithmetic machines where the most
3803 *significant byte has the lowest address.
3804 * #define Long int on machines with 32-bit ints and 64-bit longs.
3805 * #define Sudden_Underflow for IEEE-format machines without gradual
3806 *underflow (i.e., that flush to zero on underflow).
3807 * #define IBM for IBM mainframe-style floating-point arithmetic.
3808 * #define VAX for VAX-style floating-point arithmetic.
3809 * #define Unsigned_Shifts if >> does treats its left operand as unsigned.
3810 * #define No_leftright to omit left-right logic in fast floating-point
3811 *computation of dtoa.
3812 * #define Check_FLT_ROUNDS if FLT_ROUNDS can assume the values 2 or 3.
3813 * #define RND_PRODQUOT to use rnd_prod and rnd_quot (assembly routines
3814 *that use extended-precision instructions to compute rounded
3815 *products and quotients) with IBM.
3816 * #define ROUND_BIASED for IEEE-format with biased rounding.
3817 * #define Inaccurate_Divide for IEEE-format with correctly rounded
3818 *products but inaccurate quotients, e.g., for Intel i860.
3819 * #define Just_16 to store 16 bits per 32-bit Long when doing high-precision
3820 *integer arithmetic. Whether this speeds things up or slows things
3821 *down depends on the machine and the number being converted.
3822 * #define KR_headers for old-style C function headers.
3823 * #define Bad_float_h if your system lacks a float.h or if it does not
3824 *define some or all of DBL_DIG, DBL_MAX_10_EXP, DBL_MAX_EXP,
3825 *FLT_RADIX, FLT_ROUNDS, and DBL_MAX.
3826 * #define MALLOC your_malloc, where your_malloc(n) acts like malloc(n)
3827 *if memory is available and otherwise does something you deem
3828 *appropriate. If MALLOC is undefined, malloc will be invoked
3829 *directly -- and assumed always to succeed.
3830 */
3831
3832#if defined(LIBC_SCCS) && !defined(lint)
3833__RCSID("$NetBSD: strtod.c,v 1.26 1998/02/03 18:44:21 perry Exp $");
3834#endif /* LIBC_SCCS and not lint */
3835
3836/*
3837#if defined(__m68k__) || defined(__sparc__) || defined(__i386__) || \
3838 defined(__mips__) || defined(__ns32k__) || defined(__alpha__) || \
3839 defined(__powerpc__) || defined(Q_OS_WIN) || defined(Q_OS_DARWIN) || defined(Q_OS_MACX) || \
3840 defined(mips) || defined(Q_OS_AIX) || defined(Q_OS_SOLARIS)
3841 # define IEEE_BIG_OR_LITTLE_ENDIAN 1
3842#endif
3843*/
3844
3845// *All* of our architectures have IEEE arithmetic, don't they?
3846#define IEEE_BIG_OR_LITTLE_ENDIAN 1
3847
3848#ifdef __arm32__
3849/*
3850 * Although the CPU is little endian the FP has different
3851 * byte and word endianness. The byte order is still little endian
3852 * but the word order is big endian.
3853 */
3854#define IEEE_BIG_OR_LITTLE_ENDIAN
3855#endif
3856
3857#ifdef vax
3858#define VAX
3859#endif
3860
3861 #define LongQ_INT32
3862 #define ULongQ_UINT32
3863
3864#define MALLOC malloc
3865#define CONST const
3866
3867#ifdef BSD_QDTOA_DEBUG
3868#include <stdio.h>
3869#define Bug(x) {fprintf(stderr, "%s\n", x); exit(1);}
3870#endif
3871
3872#ifdef Unsigned_Shifts
3873#define Sign_Extend(a,b) if (b < 0) a |= 0xffff0000;
3874#else
3875#define Sign_Extend(a,b) /*no-op*/
3876#endif
3877
3878#if (defined(IEEE_BIG_OR_LITTLE_ENDIAN) + defined(VAX) + defined(IBM)) != 1
3879#error Exactly one of IEEE_BIG_OR_LITTLE_ENDIAN, VAX, or IBM should be defined.
3880#endif
3881
3882
3883#define word0(x) ((volatile ULong *)&x)[ByteOrder == BigEndian ? 0 : 1]
3884#define word1(x) ((volatile ULong *)&x)[ByteOrder == BigEndian ? 1 : 0]
3885
3886
3887/* The following definition of Storeinc is appropriate for MIPS processors.
3888 * An alternative that might be better on some machines is
3889 * #define Storeinc(a,b,c) (*a++ = b << 16 | c & 0xffff)
3890 */
3891
3892/*
3893#if defined(IEEE_LITTLE_ENDIAN) + defined(VAX) + defined(__arm32__)
3894#define Storeinc(a,b,c) (((unsigned short *)a)[1] = (unsigned short)b, \
3895((unsigned short *)a)[0] = (unsigned short)c, a++)
3896#else
3897#define Storeinc(a,b,c) (((unsigned short *)a)[0] = (unsigned short)b, \
3898((unsigned short *)a)[1] = (unsigned short)c, a++)
3899#endif
3900*/
3901
3902static inline void Storeinc(ULong *&a, const ULong &b, const ULong &c)
3903{
3904
3905# if defined(VAX) + defined(__arm32__)
3906 # define USE_LITTLE_ENDIAN 1
3907# else
3908 # define USE_LITTLE_ENDIAN 0
3909# endif
3910
3911# if defined(IEEE_BIG_OR_LITTLE_ENDIAN)
3912 # define USE_IEEE 1
3913# else
3914 # define USE_IEEE 0
3915# endif
3916
3917 if (ByteOrder == LittleEndian && USE_IEEE || USE_LITTLE_ENDIAN) {
3918 ((unsigned short *)a)[1] = (unsigned short)b;
3919 ((unsigned short *)a)[0] = (unsigned short)c;
3920 } else {
3921 ((unsigned short *)a)[0] = (unsigned short)b;
3922 ((unsigned short *)a)[1] = (unsigned short)c;
3923 }
3924
3925 ++a;
3926
3927# undef USE_LITTLE_ENDIAN
3928# undef USE_IEEE
3929}
3930
3931/* #define P DBL_MANT_DIG */
3932/* Ten_pmax = floor(P*log(2)/log(5)) */
3933/* Bletch = (highest power of 2 < DBL_MAX_10_EXP) / 16 */
3934/* Quick_max = floor((P-1)*log(FLT_RADIX)/log(10) - 1) */
3935/* Int_max = floor(P*log(FLT_RADIX)/log(10) - 1) */
3936
3937#if defined(IEEE_BIG_OR_LITTLE_ENDIAN)
3938#define Exp_shift 20
3939#define Exp_shift1 20
3940#define Exp_msk1 0x100000
3941#define Exp_msk11 0x100000
3942#define Exp_mask 0x7ff00000
3943#define P 53
3944#define Bias 1023
3945#define IEEE_Arith
3946#define Emin (-1022)
3947#define Exp_1 0x3ff00000
3948#define Exp_11 0x3ff00000
3949#define Ebits 11
3950#define Frac_mask 0xfffff
3951#define Frac_mask1 0xfffff
3952#define Ten_pmax 22
3953#define Bletch 0x10
3954#define Bndry_mask 0xfffff
3955#define Bndry_mask1 0xfffff
3956#define LSB 1
3957#define Sign_bit 0x80000000
3958#define Log2P 1
3959#define Tiny0 0
3960#define Tiny1 1
3961#define Quick_max 14
3962#define Int_max 14
3963#define Infinite(x) (word0(x) == 0x7ff00000) /* sufficient test for here */
3964#else
3965#undef Sudden_Underflow
3966#define Sudden_Underflow
3967#ifdef IBM
3968#define Exp_shift 24
3969#define Exp_shift1 24
3970#define Exp_msk1 0x1000000
3971#define Exp_msk11 0x1000000
3972#define Exp_mask 0x7f000000
3973#define P 14
3974#define Bias 65
3975#define Exp_1 0x41000000
3976#define Exp_11 0x41000000
3977 #define Ebits 8/* exponent has 7 bits, but 8 is the right value in b2d */
3978#define Frac_mask 0xffffff
3979#define Frac_mask1 0xffffff
3980#define Bletch 4
3981#define Ten_pmax 22
3982#define Bndry_mask 0xefffff
3983#define Bndry_mask1 0xffffff
3984#define LSB 1
3985#define Sign_bit 0x80000000
3986#define Log2P 4
3987#define Tiny0 0x100000
3988#define Tiny1 0
3989#define Quick_max 14
3990#define Int_max 15
3991#else /* VAX */
3992#define Exp_shift 23
3993#define Exp_shift1 7
3994#define Exp_msk1 0x80
3995#define Exp_msk11 0x800000
3996#define Exp_mask 0x7f80
3997#define P 56
3998#define Bias 129
3999#define Exp_1 0x40800000
4000#define Exp_11 0x4080
4001#define Ebits 8
4002#define Frac_mask 0x7fffff
4003#define Frac_mask1 0xffff007f
4004#define Ten_pmax 24
4005#define Bletch 2
4006#define Bndry_mask 0xffff007f
4007#define Bndry_mask1 0xffff007f
4008#define LSB 0x10000
4009#define Sign_bit 0x8000
4010#define Log2P 1
4011#define Tiny0 0x80
4012#define Tiny1 0
4013#define Quick_max 15
4014#define Int_max 15
4015#endif
4016#endif
4017
4018#ifndef IEEE_Arith
4019#define ROUND_BIASED
4020#endif
4021
4022#ifdef RND_PRODQUOT
4023#define rounded_product(a,b) a = rnd_prod(a, b)
4024#define rounded_quotient(a,b) a = rnd_quot(a, b)
4025#ifdef KR_headers
4026extern double rnd_prod(), rnd_quot();
4027#else
4028extern double rnd_prod(double, double), rnd_quot(double, double);
4029#endif
4030#else
4031#define rounded_product(a,b) a *= b
4032#define rounded_quotient(a,b) a /= b
4033#endif
4034
4035#define Big0 (Frac_mask1 | Exp_msk1*(DBL_MAX_EXP+Bias-1))
4036#define Big1 0xffffffff
4037
4038#ifndef Just_16
4039/* When Pack_32 is not defined, we store 16 bits per 32-bit Long.
4040 * This makes some inner loops simpler and sometimes saves work
4041 * during multiplications, but it often seems to make things slightly
4042 * slower. Hence the default is now to store 32 bits per Long.
4043 */
4044#ifndef Pack_32
4045#define Pack_32
4046#endif
4047#endif
4048
4049#define Kmax 15
4050
4051struct
4052Bigint {
4053 struct Bigint *next;
4054 int k, maxwds, sign, wds;
4055 ULong x[1];
4056};
4057
4058 typedef struct Bigint Bigint;
4059
4060static Bigint *Balloc(int k)
4061{
4062 int x;
4063 Bigint *rv;
4064
4065 x = 1 << k;
4066 rv = (Bigint *)MALLOC(sizeof(Bigint) + (x-1)*sizeof(Long));
4067 rv->k = k;
4068 rv->maxwds = x;
4069 rv->sign = rv->wds = 0;
4070 return rv;
4071}
4072
4073static void Bfree(Bigint *v)
4074{
4075 free(v);
4076}
4077
4078#define Bcopy(x,y) memcpy((char *)&x->sign, (char *)&y->sign, \
4079y->wds*sizeof(Long) + 2*sizeof(int))
4080
4081/* multiply by m and add a */
4082static Bigint *multadd(Bigint *b, int m, int a)
4083{
4084 int i, wds;
4085 ULong *x, y;
4086#ifdef Pack_32
4087 ULong xi, z;
4088#endif
4089 Bigint *b1;
4090
4091 wds = b->wds;
4092 x = b->x;
4093 i = 0;
4094 do {
4095#ifdef Pack_32
4096 xi = *x;
4097 y = (xi & 0xffff) * m + a;
4098 z = (xi >> 16) * m + (y >> 16);
4099 a = (int)(z >> 16);
4100 *x++ = (z << 16) + (y & 0xffff);
4101#else
4102 y = *x * m + a;
4103 a = (int)(y >> 16);
4104 *x++ = y & 0xffff;
4105#endif
4106 }
4107 while(++i < wds);
4108 if (a) {
4109 if (wds >= b->maxwds) {
4110 b1 = Balloc(b->k+1);
4111 Bcopy(b1, b);
4112 Bfree(b);
4113 b = b1;
4114 }
4115 b->x[wds++] = a;
4116 b->wds = wds;
4117 }
4118 return b;
4119}
4120
4121static Bigint *s2b(CONST char *s, int nd0, int nd, ULong y9)
4122{
4123 Bigint *b;
4124 int i, k;
4125 Long x, y;
4126
4127 x = (nd + 8) / 9;
4128 for(k = 0, y = 1; x > y; y <<= 1, k++) ;
4129#ifdef Pack_32
4130 b = Balloc(k);
4131 b->x[0] = y9;
4132 b->wds = 1;
4133#else
4134 b = Balloc(k+1);
4135 b->x[0] = y9 & 0xffff;
4136 b->wds = (b->x[1] = y9 >> 16) ? 2 : 1;
4137#endif
4138
4139 i = 9;
4140 if (9 < nd0) {
4141 s += 9;
4142 do b = multadd(b, 10, *s++ - '0');
4143 while(++i < nd0);
4144 s++;
4145 }
4146 else
4147 s += 10;
4148 for(; i < nd; i++)
4149 b = multadd(b, 10, *s++ - '0');
4150 return b;
4151}
4152
4153static int hi0bits(ULong x)
4154{
4155 int k = 0;
4156
4157 if (!(x & 0xffff0000)) {
4158 k = 16;
4159 x <<= 16;
4160 }
4161 if (!(x & 0xff000000)) {
4162 k += 8;
4163 x <<= 8;
4164 }
4165 if (!(x & 0xf0000000)) {
4166 k += 4;
4167 x <<= 4;
4168 }
4169 if (!(x & 0xc0000000)) {
4170 k += 2;
4171 x <<= 2;
4172 }
4173 if (!(x & 0x80000000)) {
4174 k++;
4175 if (!(x & 0x40000000))
4176 return 32;
4177 }
4178 return k;
4179}
4180
4181static int lo0bits(ULong *y)
4182{
4183 int k;
4184 ULong x = *y;
4185
4186 if (x & 7) {
4187 if (x & 1)
4188 return 0;
4189 if (x & 2) {
4190 *y = x >> 1;
4191 return 1;
4192 }
4193 *y = x >> 2;
4194 return 2;
4195 }
4196 k = 0;
4197 if (!(x & 0xffff)) {
4198 k = 16;
4199 x >>= 16;
4200 }
4201 if (!(x & 0xff)) {
4202 k += 8;
4203 x >>= 8;
4204 }
4205 if (!(x & 0xf)) {
4206 k += 4;
4207 x >>= 4;
4208 }
4209 if (!(x & 0x3)) {
4210 k += 2;
4211 x >>= 2;
4212 }
4213 if (!(x & 1)) {
4214 k++;
4215 x >>= 1;
4216 if (!x & 1)
4217 return 32;
4218 }
4219 *y = x;
4220 return k;
4221}
4222
4223static Bigint *i2b(int i)
4224{
4225 Bigint *b;
4226
4227 b = Balloc(1);
4228 b->x[0] = i;
4229 b->wds = 1;
4230 return b;
4231}
4232
4233static Bigint *mult(Bigint *a, Bigint *b)
4234{
4235 Bigint *c;
4236 int k, wa, wb, wc;
4237 ULong carry, y, z;
4238 ULong *x, *xa, *xae, *xb, *xbe, *xc, *xc0;
4239#ifdef Pack_32
4240 ULong z2;
4241#endif
4242
4243 if (a->wds < b->wds) {
4244 c = a;
4245 a = b;
4246 b = c;
4247 }
4248 k = a->k;
4249 wa = a->wds;
4250 wb = b->wds;
4251 wc = wa + wb;
4252 if (wc > a->maxwds)
4253 k++;
4254 c = Balloc(k);
4255 for(x = c->x, xa = x + wc; x < xa; x++)
4256 *x = 0;
4257 xa = a->x;
4258 xae = xa + wa;
4259 xb = b->x;
4260 xbe = xb + wb;
4261 xc0 = c->x;
4262#ifdef Pack_32
4263 for(; xb < xbe; xb++, xc0++) {
4264 if ((y = *xb & 0xffff) != 0) {
4265 x = xa;
4266 xc = xc0;
4267 carry = 0;
4268 do {
4269 z = (*x & 0xffff) * y + (*xc & 0xffff) + carry;
4270 carry = z >> 16;
4271 z2 = (*x++ >> 16) * y + (*xc >> 16) + carry;
4272 carry = z2 >> 16;
4273 Storeinc(xc, z2, z);
4274 }
4275 while(x < xae);
4276 *xc = carry;
4277 }
4278 if ((y = *xb >> 16) != 0) {
4279 x = xa;
4280 xc = xc0;
4281 carry = 0;
4282 z2 = *xc;
4283 do {
4284 z = (*x & 0xffff) * y + (*xc >> 16) + carry;
4285 carry = z >> 16;
4286 Storeinc(xc, z, z2);
4287 z2 = (*x++ >> 16) * y + (*xc & 0xffff) + carry;
4288 carry = z2 >> 16;
4289 }
4290 while(x < xae);
4291 *xc = z2;
4292 }
4293 }
4294#else
4295 for(; xb < xbe; xc0++) {
4296 if (y = *xb++) {
4297 x = xa;
4298 xc = xc0;
4299 carry = 0;
4300 do {
4301 z = *x++ * y + *xc + carry;
4302 carry = z >> 16;
4303 *xc++ = z & 0xffff;
4304 }
4305 while(x < xae);
4306 *xc = carry;
4307 }
4308 }
4309#endif
4310 for(xc0 = c->x, xc = xc0 + wc; wc > 0 && !*--xc; --wc) ;
4311 c->wds = wc;
4312 return c;
4313}
4314
4315static Bigint *p5s;
4316
4317static Bigint *pow5mult(Bigint *b, int k)
4318{
4319 Bigint *b1, *p5, *p51;
4320 int i;
4321 static const int p05[3] = { 5, 25, 125 };
4322
4323 if ((i = k & 3) != 0)
4324 b = multadd(b, p05[i-1], 0);
4325
4326 if (!(k >>= 2))
4327 return b;
4328 if (!(p5 = p5s)) {
4329 /* first time */
4330 p5 = p5s = i2b(625);
4331 p5->next = 0;
4332 }
4333 for(;;) {
4334 if (k & 1) {
4335 b1 = mult(b, p5);
4336 Bfree(b);
4337 b = b1;
4338 }
4339 if (!(k >>= 1))
4340 break;
4341 if (!(p51 = p5->next)) {
4342 p51 = p5->next = mult(p5,p5);
4343 p51->next = 0;
4344 }
4345 p5 = p51;
4346 }
4347 return b;
4348}
4349
4350static Bigint *lshift(Bigint *b, int k)
4351{
4352 int i, k1, n, n1;
4353 Bigint *b1;
4354 ULong *x, *x1, *xe, z;
4355
4356#ifdef Pack_32
4357 n = k >> 5;
4358#else
4359 n = k >> 4;
4360#endif
4361 k1 = b->k;
4362 n1 = n + b->wds + 1;
4363 for(i = b->maxwds; n1 > i; i <<= 1)
4364 k1++;
4365 b1 = Balloc(k1);
4366 x1 = b1->x;
4367 for(i = 0; i < n; i++)
4368 *x1++ = 0;
4369 x = b->x;
4370 xe = x + b->wds;
4371#ifdef Pack_32
4372 if (k &= 0x1f) {
4373 k1 = 32 - k;
4374 z = 0;
4375 do {
4376 *x1++ = *x << k | z;
4377 z = *x++ >> k1;
4378 }
4379 while(x < xe);
4380 if ((*x1 = z) != 0)
4381 ++n1;
4382 }
4383#else
4384 if (k &= 0xf) {
4385 k1 = 16 - k;
4386 z = 0;
4387 do {
4388 *x1++ = *x << k & 0xffff | z;
4389 z = *x++ >> k1;
4390 }
4391 while(x < xe);
4392 if (*x1 = z)
4393 ++n1;
4394 }
4395#endif
4396 else do
4397 *x1++ = *x++;
4398 while(x < xe);
4399 b1->wds = n1 - 1;
4400 Bfree(b);
4401 return b1;
4402}
4403
4404static int cmp(Bigint *a, Bigint *b)
4405{
4406 ULong *xa, *xa0, *xb, *xb0;
4407 int i, j;
4408
4409 i = a->wds;
4410 j = b->wds;
4411#ifdef BSD_QDTOA_DEBUG
4412 if (i > 1 && !a->x[i-1])
4413 Bug("cmp called with a->x[a->wds-1] == 0");
4414 if (j > 1 && !b->x[j-1])
4415 Bug("cmp called with b->x[b->wds-1] == 0");
4416#endif
4417 if (i -= j)
4418 return i;
4419 xa0 = a->x;
4420 xa = xa0 + j;
4421 xb0 = b->x;
4422 xb = xb0 + j;
4423 for(;;) {
4424 if (*--xa != *--xb)
4425 return *xa < *xb ? -1 : 1;
4426 if (xa <= xa0)
4427 break;
4428 }
4429 return 0;
4430}
4431
4432static Bigint *diff(Bigint *a, Bigint *b)
4433{
4434 Bigint *c;
4435 int i, wa, wb;
4436 Long borrow, y;/* We need signed shifts here. */
4437 ULong *xa, *xae, *xb, *xbe, *xc;
4438#ifdef Pack_32
4439 Long z;
4440#endif
4441
4442 i = cmp(a,b);
4443 if (!i) {
4444 c = Balloc(0);
4445 c->wds = 1;
4446 c->x[0] = 0;
4447 return c;
4448 }
4449 if (i < 0) {
4450 c = a;
4451 a = b;
4452 b = c;
4453 i = 1;
4454 }
4455 else
4456 i = 0;
4457 c = Balloc(a->k);
4458 c->sign = i;
4459 wa = a->wds;
4460 xa = a->x;
4461 xae = xa + wa;
4462 wb = b->wds;
4463 xb = b->x;
4464 xbe = xb + wb;
4465 xc = c->x;
4466 borrow = 0;
4467#ifdef Pack_32
4468 do {
4469 y = (*xa & 0xffff) - (*xb & 0xffff) + borrow;
4470 borrow = y >> 16;
4471 Sign_Extend(borrow, y);
4472 z = (*xa++ >> 16) - (*xb++ >> 16) + borrow;
4473 borrow = z >> 16;
4474 Sign_Extend(borrow, z);
4475 Storeinc(xc, z, y);
4476 }
4477 while(xb < xbe);
4478 while(xa < xae) {
4479 y = (*xa & 0xffff) + borrow;
4480 borrow = y >> 16;
4481 Sign_Extend(borrow, y);
4482 z = (*xa++ >> 16) + borrow;
4483 borrow = z >> 16;
4484 Sign_Extend(borrow, z);
4485 Storeinc(xc, z, y);
4486 }
4487#else
4488 do {
4489 y = *xa++ - *xb++ + borrow;
4490 borrow = y >> 16;
4491 Sign_Extend(borrow, y);
4492 *xc++ = y & 0xffff;
4493 }
4494 while(xb < xbe);
4495 while(xa < xae) {
4496 y = *xa++ + borrow;
4497 borrow = y >> 16;
4498 Sign_Extend(borrow, y);
4499 *xc++ = y & 0xffff;
4500 }
4501#endif
4502 while(!*--xc)
4503 wa--;
4504 c->wds = wa;
4505 return c;
4506}
4507
4508static double ulp(volatile double x)
4509{
4510 Long L;
4511 double a;
4512
4513 L = (word0(x) & Exp_mask) - (P-1)*Exp_msk1;
4514#ifndef Sudden_Underflow
4515 if (L > 0) {
4516#endif
4517#ifdef IBM
4518 L |= Exp_msk1 >> 4;
4519#endif
4520 word0(a) = L;
4521 word1(a) = 0;
4522#ifndef Sudden_Underflow
4523 }
4524 else {
4525 L = -L >> Exp_shift;
4526 if (L < Exp_shift) {
4527 word0(a) = 0x80000 >> L;
4528 word1(a) = 0;
4529 }
4530 else {
4531 word0(a) = 0;
4532 L -= Exp_shift;
4533 word1(a) = (L >= 31 ? 1U : 1U << (31 - L));
4534 }
4535 }
4536#endif
4537 return a;
4538}
4539
4540static double b2d(Bigint *a, int *e)
4541{
4542 ULong *xa, *xa0, w, y, z;
4543 int k;
4544 double d;
4545#ifdef VAX
4546 ULong d0, d1;
4547#else
4548#define d0 word0(d)
4549#define d1 word1(d)
4550#endif
4551
4552 xa0 = a->x;
4553 xa = xa0 + a->wds;
4554 y = *--xa;
4555#ifdef BSD_QDTOA_DEBUG
4556 if (!y) Bug("zero y in b2d");
4557#endif
4558 k = hi0bits(y);
4559 *e = 32 - k;
4560#ifdef Pack_32
4561 if (k < Ebits) {
4562 d0 = Exp_1 | y >> (Ebits - k);
4563 w = xa > xa0 ? *--xa : 0;
4564 d1 = y << ((32-Ebits) + k) | w >> (Ebits - k);
4565 goto ret_d;
4566 }
4567 z = xa > xa0 ? *--xa : 0;
4568 if (k -= Ebits) {
4569 d0 = Exp_1 | y << k | z >> (32 - k);
4570 y = xa > xa0 ? *--xa : 0;
4571 d1 = z << k | y >> (32 - k);
4572 }
4573 else {
4574 d0 = Exp_1 | y;
4575 d1 = z;
4576 }
4577#else
4578 if (k < Ebits + 16) {
4579 z = xa > xa0 ? *--xa : 0;
4580 d0 = Exp_1 | y << k - Ebits | z >> Ebits + 16 - k;
4581 w = xa > xa0 ? *--xa : 0;
4582 y = xa > xa0 ? *--xa : 0;
4583 d1 = z << k + 16 - Ebits | w << k - Ebits | y >> 16 + Ebits - k;
4584 goto ret_d;
4585 }
4586 z = xa > xa0 ? *--xa : 0;
4587 w = xa > xa0 ? *--xa : 0;
4588 k -= Ebits + 16;
4589 d0 = Exp_1 | y << k + 16 | z << k | w >> 16 - k;
4590 y = xa > xa0 ? *--xa : 0;
4591 d1 = w << k + 16 | y << k;
4592#endif
4593 ret_d:
4594#ifdef VAX
4595 word0(d) = d0 >> 16 | d0 << 16;
4596 word1(d) = d1 >> 16 | d1 << 16;
4597#else
4598#undef d0
4599#undef d1
4600#endif
4601 return d;
4602}
4603
4604static Bigint *d2b(double d, int *e, int *bits)
4605{
4606 Bigint *b;
4607 int de, i, k;
4608 ULong *x, y, z;
4609#ifdef VAX
4610 ULong d0, d1;
4611 d0 = word0(d) >> 16 | word0(d) << 16;
4612 d1 = word1(d) >> 16 | word1(d) << 16;
4613#else
4614#define d0 word0(d)
4615#define d1 word1(d)
4616#endif
4617
4618#ifdef Pack_32
4619 b = Balloc(1);
4620#else
4621 b = Balloc(2);
4622#endif
4623 x = b->x;
4624
4625 z = d0 & Frac_mask;
4626 d0 &= 0x7fffffff;/* clear sign bit, which we ignore */
4627#ifdef Sudden_Underflow
4628 de = (int)(d0 >> Exp_shift);
4629#ifndef IBM
4630 z |= Exp_msk11;
4631#endif
4632#else
4633 if ((de = (int)(d0 >> Exp_shift)) != 0)
4634 z |= Exp_msk1;
4635#endif
4636#ifdef Pack_32
4637 if ((y = d1) != 0) {
4638 if ((k = lo0bits(&y)) != 0) {
4639 x[0] = y | z << (32 - k);
4640 z >>= k;
4641 }
4642 else
4643 x[0] = y;
4644 i = b->wds = (x[1] = z) ? 2 : 1;
4645 }
4646 else {
4647#ifdef BSD_QDTOA_DEBUG
4648 if (!z)
4649 Bug("Zero passed to d2b");
4650#endif
4651 k = lo0bits(&z);
4652 x[0] = z;
4653 i = b->wds = 1;
4654 k += 32;
4655 }
4656#else
4657 if (y = d1) {
4658 if (k = lo0bits(&y))
4659 if (k >= 16) {
4660 x[0] = y | z << 32 - k & 0xffff;
4661 x[1] = z >> k - 16 & 0xffff;
4662 x[2] = z >> k;
4663 i = 2;
4664 }
4665 else {
4666 x[0] = y & 0xffff;
4667 x[1] = y >> 16 | z << 16 - k & 0xffff;
4668 x[2] = z >> k & 0xffff;
4669 x[3] = z >> k+16;
4670 i = 3;
4671 }
4672 else {
4673 x[0] = y & 0xffff;
4674 x[1] = y >> 16;
4675 x[2] = z & 0xffff;
4676 x[3] = z >> 16;
4677 i = 3;
4678 }
4679 }
4680 else {
4681#ifdef BSD_QDTOA_DEBUG
4682 if (!z)
4683 Bug("Zero passed to d2b");
4684#endif
4685 k = lo0bits(&z);
4686 if (k >= 16) {
4687 x[0] = z;
4688 i = 0;
4689 }
4690 else {
4691 x[0] = z & 0xffff;
4692 x[1] = z >> 16;
4693 i = 1;
4694 }
4695 k += 32;
4696 }
4697 while(!x[i])
4698 --i;
4699 b->wds = i + 1;
4700#endif
4701#ifndef Sudden_Underflow
4702 if (de) {
4703#endif
4704#ifdef IBM
4705 *e = (de - Bias - (P-1) << 2) + k;
4706 *bits = 4*P + 8 - k - hi0bits(word0(d) & Frac_mask);
4707#else
4708 *e = de - Bias - (P-1) + k;
4709 *bits = P - k;
4710#endif
4711#ifndef Sudden_Underflow
4712 }
4713 else {
4714 *e = de - Bias - (P-1) + 1 + k;
4715#ifdef Pack_32
4716 *bits = 32*i - hi0bits(x[i-1]);
4717#else
4718 *bits = (i+2)*16 - hi0bits(x[i]);
4719#endif
4720 }
4721#endif
4722 return b;
4723}
4724#undef d0
4725#undef d1
4726
4727static double ratio(Bigint *a, Bigint *b)
4728{
4729 double da, db;
4730 int k, ka, kb;
4731
4732 da = b2d(a, &ka);
4733 db = b2d(b, &kb);
4734#ifdef Pack_32
4735 k = ka - kb + 32*(a->wds - b->wds);
4736#else
4737 k = ka - kb + 16*(a->wds - b->wds);
4738#endif
4739#ifdef IBM
4740 if (k > 0) {
4741 word0(da) += (k >> 2)*Exp_msk1;
4742 if (k &= 3)
4743 da *= 1 << k;
4744 }
4745 else {
4746 k = -k;
4747 word0(db) += (k >> 2)*Exp_msk1;
4748 if (k &= 3)
4749 db *= 1 << k;
4750 }
4751#else
4752 if (k > 0)
4753 word0(da) += k*Exp_msk1;
4754 else {
4755 k = -k;
4756 word0(db) += k*Exp_msk1;
4757 }
4758#endif
4759 return da / db;
4760}
4761
4762static CONST double tens[] = {
4763 1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9,
4764 1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19,
4765 1e20, 1e21, 1e22
4766#ifdef VAX
4767 , 1e23, 1e24
4768#endif
4769};
4770
4771#ifdef IEEE_Arith
4772static CONST double bigtens[] = { 1e16, 1e32, 1e64, 1e128, 1e256 };
4773static CONST double tinytens[] = { 1e-16, 1e-32, 1e-64, 1e-128, 1e-256 };
4774#define n_bigtens 5
4775#else
4776#ifdef IBM
4777static CONST double bigtens[] = { 1e16, 1e32, 1e64 };
4778static CONST double tinytens[] = { 1e-16, 1e-32, 1e-64 };
4779#define n_bigtens 3
4780#else
4781static CONST double bigtens[] = { 1e16, 1e32 };
4782static CONST double tinytens[] = { 1e-16, 1e-32 };
4783#define n_bigtens 2
4784#endif
4785#endif
4786
4787/*
4788 The pre-release gcc3.3 shipped with SuSE 8.2 has a bug which causes
4789 the comparison 1e-100 == 0.0 to return true. As a workaround, we
4790 compare it to a global variable containing 0.0, which produces
4791 correct assembler output.
4792
4793 ### consider detecting the broken compilers and using the static
4794 ### double for these, and use a #define for all working compilers
4795*/
4796static double g_double_zero = 0.0;
4797
4798static double qstrtod(CONST char *s00, CONST char **se, bool *ok)
4799{
4800 int bb2, bb5, bbe, bd2, bd5, bbbits, bs2, c, dsign,
4801 e, e1, esign, i, j, k, nd, nd0, nf, nz, nz0, sign;
4802 CONST char *s, *s0, *s1;
4803 double aadj, aadj1, adj, rv, rv0;
4804 Long L;
4805 ULong y, z;
4806 Bigint *bb1, *bd0;
4807 Bigint *bb = NULL, *bd = NULL, *bs = NULL, *delta = NULL;/* pacify gcc */
4808
4809 /*
4810 #ifndef KR_headers
4811 CONST char decimal_point = localeconv()->decimal_point[0];
4812 #else
4813 CONST char decimal_point = '.';
4814 #endif */
4815 if (ok != 0)
4816 *ok = true;
4817
4818 CONST char decimal_point = '.';
4819
4820 sign = nz0 = nz = 0;
4821 rv = 0.;
4822
4823
4824 for(s = s00; isspace((unsigned char) *s); s++)
4825 ;
4826
4827 if (*s == '-') {
4828 sign = 1;
4829 s++;
4830 } else if (*s == '+') {
4831 s++;
4832 }
4833
4834 if (*s == '\0') {
4835 s = s00;
4836 goto ret;
4837 }
4838
4839 if (*s == '0') {
4840 nz0 = 1;
4841 while(*++s == '0') ;
4842 if (!*s)
4843 goto ret;
4844 }
4845 s0 = s;
4846 y = z = 0;
4847 for(nd = nf = 0; (c = *s) >= '0' && c <= '9'; nd++, s++)
4848 if (nd < 9)
4849 y = 10*y + c - '0';
4850 else if (nd < 16)
4851 z = 10*z + c - '0';
4852 nd0 = nd;
4853 if (c == decimal_point) {
4854 c = *++s;
4855 if (!nd) {
4856 for(; c == '0'; c = *++s)
4857 nz++;
4858 if (c > '0' && c <= '9') {
4859 s0 = s;
4860 nf += nz;
4861 nz = 0;
4862 goto have_dig;
4863 }
4864 goto dig_done;
4865 }
4866 for(; c >= '0' && c <= '9'; c = *++s) {
4867 have_dig:
4868 nz++;
4869 if (c -= '0') {
4870 nf += nz;
4871 for(i = 1; i < nz; i++)
4872 if (nd++ < 9)
4873 y *= 10;
4874 else if (nd <= DBL_DIG + 1)
4875 z *= 10;
4876 if (nd++ < 9)
4877 y = 10*y + c;
4878 else if (nd <= DBL_DIG + 1)
4879 z = 10*z + c;
4880 nz = 0;
4881 }
4882 }
4883 }
4884 dig_done:
4885 e = 0;
4886 if (c == 'e' || c == 'E') {
4887 if (!nd && !nz && !nz0) {
4888 s = s00;
4889 goto ret;
4890 }
4891 s00 = s;
4892 esign = 0;
4893 switch(c = *++s) {
4894 case '-':
4895 esign = 1;
4896 case '+':
4897 c = *++s;
4898 }
4899 if (c >= '0' && c <= '9') {
4900 while(c == '0')
4901 c = *++s;
4902 if (c > '0' && c <= '9') {
4903 L = c - '0';
4904 s1 = s;
4905 while((c = *++s) >= '0' && c <= '9')
4906 L = 10*L + c - '0';
4907 if (s - s1 > 8 || L > 19999)
4908 /* Avoid confusion from exponents
4909 * so large that e might overflow.
4910 */
4911 e = 19999; /* safe for 16 bit ints */
4912 else
4913 e = (int)L;
4914 if (esign)
4915 e = -e;
4916 }
4917 else
4918 e = 0;
4919 }
4920 else
4921 s = s00;
4922 }
4923 if (!nd) {
4924 if (!nz && !nz0)
4925 s = s00;
4926 goto ret;
4927 }
4928 e1 = e -= nf;
4929
4930 /* Now we have nd0 digits, starting at s0, followed by a
4931 * decimal point, followed by nd-nd0 digits. The number we're
4932 * after is the integer represented by those digits times
4933 * 10**e */
4934
4935 if (!nd0)
4936 nd0 = nd;
4937 k = nd < DBL_DIG + 1 ? nd : DBL_DIG + 1;
4938 rv = y;
4939 if (k > 9)
4940 rv = tens[k - 9] * rv + z;
4941 bd0 = 0;
4942 if (nd <= DBL_DIG
4943#ifndef RND_PRODQUOT
4944 && FLT_ROUNDS == 1
4945#endif
4946 ) {
4947 if (!e)
4948 goto ret;
4949 if (e > 0) {
4950 if (e <= Ten_pmax) {
4951#ifdef VAX
4952 goto vax_ovfl_check;
4953#else
4954 /* rv = */ rounded_product(rv, tens[e]);
4955 goto ret;
4956#endif
4957 }
4958 i = DBL_DIG - nd;
4959 if (e <= Ten_pmax + i) {
4960 /* A fancier test would sometimes let us do
4961 * this for larger i values.
4962 */
4963 e -= i;
4964 rv *= tens[i];
4965#ifdef VAX
4966 /* VAX exponent range is so narrow we must
4967 * worry about overflow here...
4968 */
4969 vax_ovfl_check:
4970 word0(rv) -= P*Exp_msk1;
4971 /* rv = */ rounded_product(rv, tens[e]);
4972 if ((word0(rv) & Exp_mask)
4973 > Exp_msk1*(DBL_MAX_EXP+Bias-1-P))
4974 goto ovfl;
4975 word0(rv) += P*Exp_msk1;
4976#else
4977 /* rv = */ rounded_product(rv, tens[e]);
4978#endif
4979 goto ret;
4980 }
4981 }
4982#ifndef Inaccurate_Divide
4983 else if (e >= -Ten_pmax) {
4984 /* rv = */ rounded_quotient(rv, tens[-e]);
4985 goto ret;
4986 }
4987#endif
4988 }
4989 e1 += nd - k;
4990
4991 /* Get starting approximation = rv * 10**e1 */
4992
4993 if (e1 > 0) {
4994 if ((i = e1 & 15) != 0)
4995 rv *= tens[i];
4996 if (e1 &= ~15) {
4997 if (e1 > DBL_MAX_10_EXP) {
4998 ovfl:
4999 // errno = ERANGE;
5000 if (ok != 0)
5001 *ok = false;
5002#ifdef __STDC__
5003 rv = HUGE_VAL;
5004#else
5005 /* Can't trust HUGE_VAL */
5006#ifdef IEEE_Arith
5007 word0(rv) = Exp_mask;
5008 word1(rv) = 0;
5009#else
5010 word0(rv) = Big0;
5011 word1(rv) = Big1;
5012#endif
5013#endif
5014 if (bd0)
5015 goto retfree;
5016 goto ret;
5017 }
5018 if (e1 >>= 4) {
5019 for(j = 0; e1 > 1; j++, e1 >>= 1)
5020 if (e1 & 1)
5021 rv *= bigtens[j];
5022 /* The last multiplication could overflow. */
5023 word0(rv) -= P*Exp_msk1;
5024 rv *= bigtens[j];
5025 if ((z = word0(rv) & Exp_mask)
5026 > Exp_msk1*(DBL_MAX_EXP+Bias-P))
5027 goto ovfl;
5028 if (z > Exp_msk1*(DBL_MAX_EXP+Bias-1-P)) {
5029 /* set to largest number */
5030 /* (Can't trust DBL_MAX) */
5031 word0(rv) = Big0;
5032 word1(rv) = Big1;
5033 }
5034 else
5035 word0(rv) += P*Exp_msk1;
5036 }
5037
5038 }
5039 }
5040 else if (e1 < 0) {
5041 e1 = -e1;
5042 if ((i = e1 & 15) != 0)
5043 rv /= tens[i];
5044 if (e1 &= ~15) {
5045 e1 >>= 4;
5046 if (e1 >= 1 << n_bigtens)
5047 goto undfl;
5048 for(j = 0; e1 > 1; j++, e1 >>= 1)
5049 if (e1 & 1)
5050 rv *= tinytens[j];
5051 /* The last multiplication could underflow. */
5052 rv0 = rv;
5053 rv *= tinytens[j];
5054 if (rv == g_double_zero)
5055 {
5056 rv = 2.*rv0;
5057 rv *= tinytens[j];
5058 if (rv == g_double_zero)
5059 {
5060 undfl:
5061 rv = 0.;
5062 // errno = ERANGE;
5063 if (ok != 0)
5064 *ok = false;
5065 if (bd0)
5066 goto retfree;
5067 goto ret;
5068 }
5069 word0(rv) = Tiny0;
5070 word1(rv) = Tiny1;
5071 /* The refinement below will clean
5072 * this approximation up.
5073 */
5074 }
5075 }
5076 }
5077
5078 /* Now the hard part -- adjusting rv to the correct value.*/
5079
5080 /* Put digits into bd: true value = bd * 10^e */
5081
5082 bd0 = s2b(s0, nd0, nd, y);
5083
5084 for(;;) {
5085 bd = Balloc(bd0->k);
5086 Bcopy(bd, bd0);
5087 bb = d2b(rv, &bbe, &bbbits);/* rv = bb * 2^bbe */
5088 bs = i2b(1);
5089
5090 if (e >= 0) {
5091 bb2 = bb5 = 0;
5092 bd2 = bd5 = e;
5093 }
5094 else {
5095 bb2 = bb5 = -e;
5096 bd2 = bd5 = 0;
5097 }
5098 if (bbe >= 0)
5099 bb2 += bbe;
5100 else
5101 bd2 -= bbe;
5102 bs2 = bb2;
5103#ifdef Sudden_Underflow
5104#ifdef IBM
5105 j = 1 + 4*P - 3 - bbbits + ((bbe + bbbits - 1) & 3);
5106#else
5107 j = P + 1 - bbbits;
5108#endif
5109#else
5110 i = bbe + bbbits - 1;/* logb(rv) */
5111 if (i < Emin)/* denormal */
5112 j = bbe + (P-Emin);
5113 else
5114 j = P + 1 - bbbits;
5115#endif
5116 bb2 += j;
5117 bd2 += j;
5118 i = bb2 < bd2 ? bb2 : bd2;
5119 if (i > bs2)
5120 i = bs2;
5121 if (i > 0) {
5122 bb2 -= i;
5123 bd2 -= i;
5124 bs2 -= i;
5125 }
5126 if (bb5 > 0) {
5127 bs = pow5mult(bs, bb5);
5128 bb1 = mult(bs, bb);
5129 Bfree(bb);
5130 bb = bb1;
5131 }
5132 if (bb2 > 0)
5133 bb = lshift(bb, bb2);
5134 if (bd5 > 0)
5135 bd = pow5mult(bd, bd5);
5136 if (bd2 > 0)
5137 bd = lshift(bd, bd2);
5138 if (bs2 > 0)
5139 bs = lshift(bs, bs2);
5140 delta = diff(bb, bd);
5141 dsign = delta->sign;
5142 delta->sign = 0;
5143 i = cmp(delta, bs);
5144 if (i < 0) {
5145 /* Error is less than half an ulp -- check for
5146 * special case of mantissa a power of two.
5147 */
5148 if (dsign || word1(rv) || word0(rv) & Bndry_mask)
5149 break;
5150 delta = lshift(delta,Log2P);
5151 if (cmp(delta, bs) > 0)
5152 goto drop_down;
5153 break;
5154 }
5155 if (i == 0) {
5156 /* exactly half-way between */
5157 if (dsign) {
5158 if ((word0(rv) & Bndry_mask1) == Bndry_mask1
5159 && word1(rv) == 0xffffffff) {
5160 /*boundary case -- increment exponent*/
5161 word0(rv) = (word0(rv) & Exp_mask)
5162 + Exp_msk1
5163#ifdef IBM
5164 | Exp_msk1 >> 4
5165#endif
5166 ;
5167 word1(rv) = 0;
5168 break;
5169 }
5170 }
5171 else if (!(word0(rv) & Bndry_mask) && !word1(rv)) {
5172 drop_down:
5173 /* boundary case -- decrement exponent */
5174#ifdef Sudden_Underflow
5175 L = word0(rv) & Exp_mask;
5176#ifdef IBM
5177 if (L < Exp_msk1)
5178#else
5179 if (L <= Exp_msk1)
5180#endif
5181 goto undfl;
5182 L -= Exp_msk1;
5183#else
5184 L = (word0(rv) & Exp_mask) - Exp_msk1;
5185#endif
5186 word0(rv) = L | Bndry_mask1;
5187 word1(rv) = 0xffffffff;
5188#ifdef IBM
5189 goto cont;
5190#else
5191 break;
5192#endif
5193 }
5194#ifndef ROUND_BIASED
5195 if (!(word1(rv) & LSB))
5196 break;
5197#endif
5198 if (dsign)
5199 rv += ulp(rv);
5200#ifndef ROUND_BIASED
5201 else {
5202 rv -= ulp(rv);
5203#ifndef Sudden_Underflow
5204 if (rv == g_double_zero)
5205 goto undfl;
5206#endif
5207 }
5208#endif
5209 break;
5210 }
5211 if ((aadj = ratio(delta, bs)) <= 2.) {
5212 if (dsign)
5213 aadj = aadj1 = 1.;
5214 else if (word1(rv) || word0(rv) & Bndry_mask) {
5215#ifndef Sudden_Underflow
5216 if (word1(rv) == Tiny1 && !word0(rv))
5217 goto undfl;
5218#endif
5219 aadj = 1.;
5220 aadj1 = -1.;
5221 }
5222 else {
5223 /* special case -- power of FLT_RADIX to be */
5224 /* rounded down... */
5225
5226 if (aadj < 2./FLT_RADIX)
5227 aadj = 1./FLT_RADIX;
5228 else
5229 aadj *= 0.5;
5230 aadj1 = -aadj;
5231 }
5232 }
5233 else {
5234 aadj *= 0.5;
5235 aadj1 = dsign ? aadj : -aadj;
5236#ifdef Check_FLT_ROUNDS
5237 switch(FLT_ROUNDS) {
5238 case 2: /* towards +infinity */
5239 aadj1 -= 0.5;
5240 break;
5241 case 0: /* towards 0 */
5242 case 3: /* towards -infinity */
5243 aadj1 += 0.5;
5244 }
5245#else
5246 if (FLT_ROUNDS == 0)
5247 aadj1 += 0.5;
5248#endif
5249 }
5250 y = word0(rv) & Exp_mask;
5251
5252 /* Check for overflow */
5253
5254 if (y == Exp_msk1*(DBL_MAX_EXP+Bias-1)) {
5255 rv0 = rv;
5256 word0(rv) -= P*Exp_msk1;
5257 adj = aadj1 * ulp(rv);
5258 rv += adj;
5259 if ((word0(rv) & Exp_mask) >=
5260 Exp_msk1*(DBL_MAX_EXP+Bias-P)) {
5261 if (word0(rv0) == Big0 && word1(rv0) == Big1)
5262 goto ovfl;
5263 word0(rv) = Big0;
5264 word1(rv) = Big1;
5265 goto cont;
5266 }
5267 else
5268 word0(rv) += P*Exp_msk1;
5269 }
5270 else {
5271#ifdef Sudden_Underflow
5272 if ((word0(rv) & Exp_mask) <= P*Exp_msk1) {
5273 rv0 = rv;
5274 word0(rv) += P*Exp_msk1;
5275 adj = aadj1 * ulp(rv);
5276 rv += adj;
5277#ifdef IBM
5278 if ((word0(rv) & Exp_mask) < P*Exp_msk1)
5279#else
5280 if ((word0(rv) & Exp_mask) <= P*Exp_msk1)
5281#endif
5282 {
5283 if (word0(rv0) == Tiny0
5284 && word1(rv0) == Tiny1)
5285 goto undfl;
5286 word0(rv) = Tiny0;
5287 word1(rv) = Tiny1;
5288 goto cont;
5289 }
5290 else
5291 word0(rv) -= P*Exp_msk1;
5292 }
5293 else {
5294 adj = aadj1 * ulp(rv);
5295 rv += adj;
5296 }
5297#else
5298 /* Compute adj so that the IEEE rounding rules will
5299 * correctly round rv + adj in some half-way cases.
5300 * If rv * ulp(rv) is denormalized (i.e.,
5301 * y <= (P-1)*Exp_msk1), we must adjust aadj to avoid
5302 * trouble from bits lost to denormalization;
5303 * example: 1.2e-307 .
5304 */
5305 if (y <= (P-1)*Exp_msk1 && aadj >= 1.) {
5306 aadj1 = (double)(int)(aadj + 0.5);
5307 if (!dsign)
5308 aadj1 = -aadj1;
5309 }
5310 adj = aadj1 * ulp(rv);
5311 rv += adj;
5312#endif
5313 }
5314 z = word0(rv) & Exp_mask;
5315 if (y == z) {
5316 /* Can we stop now? */
5317 L = (Long) aadj;
5318 aadj -= L;
5319 /* The tolerances below are conservative. */
5320 if (dsign || word1(rv) || word0(rv) & Bndry_mask) {
5321 if (aadj < .4999999 || aadj > .5000001)
5322 break;
5323 }
5324 else if (aadj < .4999999/FLT_RADIX)
5325 break;
5326 }
5327 cont:
5328 Bfree(bb);
5329 Bfree(bd);
5330 Bfree(bs);
5331 Bfree(delta);
5332 }
5333 retfree:
5334 Bfree(bb);
5335 Bfree(bd);
5336 Bfree(bs);
5337 Bfree(bd0);
5338 Bfree(delta);
5339 ret:
5340 if (se)
5341 *se = (char *)s;
5342 return sign ? -rv : rv;
5343}
5344
5345static int quorem(Bigint *b, Bigint *S)
5346{
5347 int n;
5348 Long borrow, y;
5349 ULong carry, q, ys;
5350 ULong *bx, *bxe, *sx, *sxe;
5351#ifdef Pack_32
5352 Long z;
5353 ULong si, zs;
5354#endif
5355
5356 n = S->wds;
5357#ifdef BSD_QDTOA_DEBUG
5358 /*debug*/ if (b->wds > n)
5359 /*debug*/Bug("oversize b in quorem");
5360#endif
5361 if (b->wds < n)
5362 return 0;
5363 sx = S->x;
5364 sxe = sx + --n;
5365 bx = b->x;
5366 bxe = bx + n;
5367 q = *bxe / (*sxe + 1);/* ensure q <= true quotient */
5368#ifdef BSD_QDTOA_DEBUG
5369 /*debug*/ if (q > 9)
5370 /*debug*/Bug("oversized quotient in quorem");
5371#endif
5372 if (q) {
5373 borrow = 0;
5374 carry = 0;
5375 do {
5376#ifdef Pack_32
5377 si = *sx++;
5378 ys = (si & 0xffff) * q + carry;
5379 zs = (si >> 16) * q + (ys >> 16);
5380 carry = zs >> 16;
5381 y = (*bx & 0xffff) - (ys & 0xffff) + borrow;
5382 borrow = y >> 16;
5383 Sign_Extend(borrow, y);
5384 z = (*bx >> 16) - (zs & 0xffff) + borrow;
5385 borrow = z >> 16;
5386 Sign_Extend(borrow, z);
5387 Storeinc(bx, z, y);
5388#else
5389 ys = *sx++ * q + carry;
5390 carry = ys >> 16;
5391 y = *bx - (ys & 0xffff) + borrow;
5392 borrow = y >> 16;
5393 Sign_Extend(borrow, y);
5394 *bx++ = y & 0xffff;
5395#endif
5396 }
5397 while(sx <= sxe);
5398 if (!*bxe) {
5399 bx = b->x;
5400 while(--bxe > bx && !*bxe)
5401 --n;
5402 b->wds = n;
5403 }
5404 }
5405 if (cmp(b, S) >= 0) {
5406 q++;
5407 borrow = 0;
5408 carry = 0;
5409 bx = b->x;
5410 sx = S->x;
5411 do {
5412#ifdef Pack_32
5413 si = *sx++;
5414 ys = (si & 0xffff) + carry;
5415 zs = (si >> 16) + (ys >> 16);
5416 carry = zs >> 16;
5417 y = (*bx & 0xffff) - (ys & 0xffff) + borrow;
5418 borrow = y >> 16;
5419 Sign_Extend(borrow, y);
5420 z = (*bx >> 16) - (zs & 0xffff) + borrow;
5421 borrow = z >> 16;
5422 Sign_Extend(borrow, z);
5423 Storeinc(bx, z, y);
5424#else
5425 ys = *sx++ + carry;
5426 carry = ys >> 16;
5427 y = *bx - (ys & 0xffff) + borrow;
5428 borrow = y >> 16;
5429 Sign_Extend(borrow, y);
5430 *bx++ = y & 0xffff;
5431#endif
5432 }
5433 while(sx <= sxe);
5434 bx = b->x;
5435 bxe = bx + n;
5436 if (!*bxe) {
5437 while(--bxe > bx && !*bxe)
5438 --n;
5439 b->wds = n;
5440 }
5441 }
5442 return q;
5443}
5444
5445/* dtoa for IEEE arithmetic (dmg): convert double to ASCII string.
5446 *
5447 * Inspired by "How to Print Floating-Point Numbers Accurately" by
5448 * Guy L. Steele, Jr. and Jon L. White [Proc. ACM SIGPLAN '90, pp. 92-101].
5449 *
5450 * Modifications:
5451 *1. Rather than iterating, we use a simple numeric overestimate
5452 * to determine k = floor(log10(d)). We scale relevant
5453 * quantities using O(log2(k)) rather than O(k) multiplications.
5454 *2. For some modes > 2 (corresponding to ecvt and fcvt), we don't
5455 * try to generate digits strictly left to right. Instead, we
5456 * compute with fewer bits and propagate the carry if necessary
5457 * when rounding the final digit up. This is often faster.
5458 *3. Under the assumption that input will be rounded nearest,
5459 * mode 0 renders 1e23 as 1e23 rather than 9.999999999999999e22.
5460 * That is, we allow equality in stopping tests when the
5461 * round-nearest rule will give the same floating-point value
5462 * as would satisfaction of the stopping test with strict
5463 * inequality.
5464 *4. We remove common factors of powers of 2 from relevant
5465 * quantities.
5466 *5. When converting floating-point integers less than 1e16,
5467 * we use floating-point arithmetic rather than resorting
5468 * to multiple-precision integers.
5469 *6. When asked to produce fewer than 15 digits, we first try
5470 * to get by with floating-point arithmetic; we resort to
5471 * multiple-precision integer arithmetic only if we cannot
5472 * guarantee that the floating-point calculation has given
5473 * the correctly rounded result. For k requested digits and
5474 * "uniformly" distributed input, the probability is
5475 * something like 10^(k-15) that we must resort to the Long
5476 * calculation.
5477 */
5478
5479
5480/* This actually sometimes returns a pointer to a string literal
5481 cast to a char*. Do NOT try to modify the return value. */
5482
5483static char *qdtoa (volatile double d, int mode, int ndigits, int *decpt, int *sign, char **rve, char **resultp)
5484{
5485 /*
5486 Arguments ndigits, decpt, sign are similar to those
5487 of ecvt and fcvt; trailing zeros are suppressed from
5488 the returned string. If not null, *rve is set to point
5489 to the end of the return value. If d is +-Infinity or NaN,
5490 then *decpt is set to 9999.
5491
5492 mode:
5493 0 ==> shortest string that yields d when read in
5494 and rounded to nearest.
5495 1 ==> like 0, but with Steele & White stopping rule;
5496 e.g. with IEEE P754 arithmetic , mode 0 gives
5497 1e23 whereas mode 1 gives 9.999999999999999e22.
5498 2 ==> max(1,ndigits) significant digits. This gives a
5499 return value similar to that of ecvt, except
5500 that trailing zeros are suppressed.
5501 3 ==> through ndigits past the decimal point. This
5502 gives a return value similar to that from fcvt,
5503 except that trailing zeros are suppressed, and
5504 ndigits can be negative.
5505 4-9 should give the same return values as 2-3, i.e.,
5506 4 <= mode <= 9 ==> same return as mode
5507 2 + (mode & 1). These modes are mainly for
5508 debugging; often they run slower but sometimes
5509 faster than modes 2-3.
5510 4,5,8,9 ==> left-to-right digit generation.
5511 6-9 ==> don't try fast floating-point estimate
5512 (if applicable).
5513
5514 Values of mode other than 0-9 are treated as mode 0.
5515
5516 Sufficient space is allocated to the return value
5517 to hold the suppressed trailing zeros.
5518 */
5519
5520 int bbits, b2, b5, be, dig, i, ieps, ilim0,
5521 j, j1, k, k0, k_check, leftright, m2, m5, s2, s5,
5522 try_quick;
5523 int ilim = 0, ilim1 = 0, spec_case = 0;/* pacify gcc */
5524 Long L;
5525#ifndef Sudden_Underflow
5526 int denorm;
5527 ULong x;
5528#endif
5529 Bigint *b, *b1, *delta, *mhi, *S;
5530 Bigint *mlo = NULL; /* pacify gcc */
5531 volatile double d2;
5532 double ds, eps;
5533 char *s, *s0;
5534
5535 if (word0(d) & Sign_bit) {
5536 /* set sign for everything, including 0's and NaNs */
5537 *sign = 1;
5538 word0(d) &= ~Sign_bit;/* clear sign bit */
5539 }
5540 else
5541 *sign = 0;
5542
5543#if defined(IEEE_Arith) + defined(VAX)
5544#ifdef IEEE_Arith
5545 if ((word0(d) & Exp_mask) == Exp_mask)
5546#else
5547 if (word0(d) == 0x8000)
5548#endif
5549 {
5550 /* Infinity or NaN */
5551 *decpt = 9999;
5552 s =
5553#ifdef IEEE_Arith
5554 !word1(d) && !(word0(d) & 0xfffff) ? (char*)"Infinity" :
5555#endif
5556 (char*)"NaN";
5557 if (rve)
5558 *rve =
5559#ifdef IEEE_Arith
5560 s[3] ? s + 8 :
5561#endif
5562 s + 3;
5563 return s;
5564 }
5565#endif
5566#ifdef IBM
5567 d += 0; /* normalize */
5568#endif
5569 if (d == g_double_zero)
5570 {
5571 *decpt = 1;
5572 s = (char*) "0";
5573 if (rve)
5574 *rve = s + 1;
5575 return s;
5576 }
5577
5578 b = d2b(d, &be, &bbits);
5579#ifdef Sudden_Underflow
5580 i = (int)(word0(d) >> Exp_shift1 & (Exp_mask>>Exp_shift1));
5581#else
5582 if ((i = (int)(word0(d) >> Exp_shift1 & (Exp_mask>>Exp_shift1))) != 0) {
5583#endif
5584 d2 = d;
5585 word0(d2) &= Frac_mask1;
5586 word0(d2) |= Exp_11;
5587#ifdef IBM
5588 if (j = 11 - hi0bits(word0(d2) & Frac_mask))
5589 d2 /= 1 << j;
5590#endif
5591
5592 /* log(x)~=~ log(1.5) + (x-1.5)/1.5
5593 * log10(x) = log(x) / log(10)
5594 * ~=~ log(1.5)/log(10) + (x-1.5)/(1.5*log(10))
5595 * log10(d) = (i-Bias)*log(2)/log(10) + log10(d2)
5596 *
5597 * This suggests computing an approximation k to log10(d) by
5598 *
5599 * k = (i - Bias)*0.301029995663981
5600 *+ ( (d2-1.5)*0.289529654602168 + 0.176091259055681 );
5601 *
5602 * We want k to be too large rather than too small.
5603 * The error in the first-order Taylor series approximation
5604 * is in our favor, so we just round up the constant enough
5605 * to compensate for any error in the multiplication of
5606 * (i - Bias) by 0.301029995663981; since |i - Bias| <= 1077,
5607 * and 1077 * 0.30103 * 2^-52 ~=~ 7.2e-14,
5608 * adding 1e-13 to the constant term more than suffices.
5609 * Hence we adjust the constant term to 0.1760912590558.
5610 * (We could get a more accurate k by invoking log10,
5611 * but this is probably not worthwhile.)
5612 */
5613
5614 i -= Bias;
5615#ifdef IBM
5616 i <<= 2;
5617 i += j;
5618#endif
5619#ifndef Sudden_Underflow
5620 denorm = 0;
5621 }
5622 else {
5623 /* d is denormalized */
5624
5625 i = bbits + be + (Bias + (P-1) - 1);
5626 x = i > 32 ? word0(d) << (64 - i) | word1(d) >> (i - 32)
5627 : word1(d) << (32 - i);
5628 d2 = x;
5629 word0(d2) -= 31*Exp_msk1; /* adjust exponent */
5630 i -= (Bias + (P-1) - 1) + 1;
5631 denorm = 1;
5632 }
5633#endif
5634 ds = (d2-1.5)*0.289529654602168 + 0.1760912590558 + i*0.301029995663981;
5635 k = (int)ds;
5636 if (ds < 0. && ds != k)
5637 k--;/* want k = floor(ds) */
5638 k_check = 1;
5639 if (k >= 0 && k <= Ten_pmax) {
5640 if (d < tens[k])
5641 k--;
5642 k_check = 0;
5643 }
5644 j = bbits - i - 1;
5645 if (j >= 0) {
5646 b2 = 0;
5647 s2 = j;
5648 }
5649 else {
5650 b2 = -j;
5651 s2 = 0;
5652 }
5653 if (k >= 0) {
5654 b5 = 0;
5655 s5 = k;
5656 s2 += k;
5657 }
5658 else {
5659 b2 -= k;
5660 b5 = -k;
5661 s5 = 0;
5662 }
5663 if (mode < 0 || mode > 9)
5664 mode = 0;
5665 try_quick = 1;
5666 if (mode > 5) {
5667 mode -= 4;
5668 try_quick = 0;
5669 }
5670 leftright = 1;
5671 switch(mode) {
5672 case 0:
5673 case 1:
5674 ilim = ilim1 = -1;
5675 i = 18;
5676 ndigits = 0;
5677 break;
5678 case 2:
5679 leftright = 0;
5680 /* no break */
5681 case 4:
5682 if (ndigits <= 0)
5683 ndigits = 1;
5684 ilim = ilim1 = i = ndigits;
5685 break;
5686 case 3:
5687 leftright = 0;
5688 /* no break */
5689 case 5:
5690 i = ndigits + k + 1;
5691 ilim = i;
5692 ilim1 = i - 1;
5693 if (i <= 0)
5694 i = 1;
5695 }
5696 *resultp = (char *) malloc(i + 1);
5697 s = s0 = *resultp;
5698
5699 if (ilim >= 0 && ilim <= Quick_max && try_quick) {
5700
5701 /* Try to get by with floating-point arithmetic. */
5702
5703 i = 0;
5704 d2 = d;
5705 k0 = k;
5706 ilim0 = ilim;
5707 ieps = 2; /* conservative */
5708 if (k > 0) {
5709 ds = tens[k&0xf];
5710 j = k >> 4;
5711 if (j & Bletch) {
5712 /* prevent overflows */
5713 j &= Bletch - 1;
5714 d /= bigtens[n_bigtens-1];
5715 ieps++;
5716 }
5717 for(; j; j >>= 1, i++)
5718 if (j & 1) {
5719 ieps++;
5720 ds *= bigtens[i];
5721 }
5722 d /= ds;
5723 }
5724 else if ((j1 = -k) != 0) {
5725 d *= tens[j1 & 0xf];
5726 for(j = j1 >> 4; j; j >>= 1, i++)
5727 if (j & 1) {
5728 ieps++;
5729 d *= bigtens[i];
5730 }
5731 }
5732 if (k_check && d < 1. && ilim > 0) {
5733 if (ilim1 <= 0)
5734 goto fast_failed;
5735 ilim = ilim1;
5736 k--;
5737 d *= 10.;
5738 ieps++;
5739 }
5740 eps = ieps*d + 7.;
5741 word0(eps) -= (P-1)*Exp_msk1;
5742 if (ilim == 0) {
5743 S = mhi = 0;
5744 d -= 5.;
5745 if (d > eps)
5746 goto one_digit;
5747 if (d < -eps)
5748 goto no_digits;
5749 goto fast_failed;
5750 }
5751#ifndef No_leftright
5752 if (leftright) {
5753 /* Use Steele & White method of only
5754 * generating digits needed.
5755 */
5756 eps = 0.5/tens[ilim-1] - eps;
5757 for(i = 0;;) {
5758 L = (Long)d;
5759 d -= L;
5760 *s++ = '0' + (int)L;
5761 if (d < eps)
5762 goto ret1;
5763 if (1. - d < eps)
5764 goto bump_up;
5765 if (++i >= ilim)
5766 break;
5767 eps *= 10.;
5768 d *= 10.;
5769 }
5770 }
5771 else {
5772#endif
5773 /* Generate ilim digits, then fix them up. */
5774 eps *= tens[ilim-1];
5775 for(i = 1;; i++, d *= 10.) {
5776 L = (Long)d;
5777 d -= L;
5778 *s++ = '0' + (int)L;
5779 if (i == ilim) {
5780 if (d > 0.5 + eps)
5781 goto bump_up;
5782 else if (d < 0.5 - eps) {
5783 while(*--s == '0');
5784 s++;
5785 goto ret1;
5786 }
5787 break;
5788 }
5789 }
5790#ifndef No_leftright
5791 }
5792#endif
5793 fast_failed:
5794 s = s0;
5795 d = d2;
5796 k = k0;
5797 ilim = ilim0;
5798 }
5799
5800 /* Do we have a "small" integer? */
5801
5802 if (be >= 0 && k <= Int_max) {
5803 /* Yes. */
5804 ds = tens[k];
5805 if (ndigits < 0 && ilim <= 0) {
5806 S = mhi = 0;
5807 if (ilim < 0 || d <= 5*ds)
5808 goto no_digits;
5809 goto one_digit;
5810 }
5811 for(i = 1;; i++) {
5812 L = (Long)(d / ds);
5813 d -= L*ds;
5814#ifdef Check_FLT_ROUNDS
5815 /* If FLT_ROUNDS == 2, L will usually be high by 1 */
5816 if (d < 0) {
5817 L--;
5818 d += ds;
5819 }
5820#endif
5821 *s++ = '0' + (int)L;
5822 if (i == ilim) {
5823 d += d;
5824 if (d > ds || (d == ds && L & 1)) {
5825 bump_up:
5826 while(*--s == '9')
5827 if (s == s0) {
5828 k++;
5829 *s = '0';
5830 break;
5831 }
5832 ++*s++;
5833 }
5834 break;
5835 }
5836 if ((d *= 10.) == g_double_zero)
5837 break;
5838 }
5839 goto ret1;
5840 }
5841
5842 m2 = b2;
5843 m5 = b5;
5844 mhi = mlo = 0;
5845 if (leftright) {
5846 if (mode < 2) {
5847 i =
5848#ifndef Sudden_Underflow
5849 denorm ? be + (Bias + (P-1) - 1 + 1) :
5850#endif
5851#ifdef IBM
5852 1 + 4*P - 3 - bbits + ((bbits + be - 1) & 3);
5853#else
5854 1 + P - bbits;
5855#endif
5856 }
5857 else {
5858 j = ilim - 1;
5859 if (m5 >= j)
5860 m5 -= j;
5861 else {
5862 s5 += j -= m5;
5863 b5 += j;
5864 m5 = 0;
5865 }
5866 if ((i = ilim) < 0) {
5867 m2 -= i;
5868 i = 0;
5869 }
5870 }
5871 b2 += i;
5872 s2 += i;
5873 mhi = i2b(1);
5874 }
5875 if (m2 > 0 && s2 > 0) {
5876 i = m2 < s2 ? m2 : s2;
5877 b2 -= i;
5878 m2 -= i;
5879 s2 -= i;
5880 }
5881 if (b5 > 0) {
5882 if (leftright) {
5883 if (m5 > 0) {
5884 mhi = pow5mult(mhi, m5);
5885 b1 = mult(mhi, b);
5886 Bfree(b);
5887 b = b1;
5888 }
5889 if ((j = b5 - m5) != 0)
5890 b = pow5mult(b, j);
5891 }
5892 else
5893 b = pow5mult(b, b5);
5894 }
5895 S = i2b(1);
5896 if (s5 > 0)
5897 S = pow5mult(S, s5);
5898
5899 /* Check for special case that d is a normalized power of 2. */
5900
5901 if (mode < 2) {
5902 if (!word1(d) && !(word0(d) & Bndry_mask)
5903#ifndef Sudden_Underflow
5904 && word0(d) & Exp_mask
5905#endif
5906 ) {
5907 /* The special case */
5908 b2 += Log2P;
5909 s2 += Log2P;
5910 spec_case = 1;
5911 }
5912 else
5913 spec_case = 0;
5914 }
5915
5916 /* Arrange for convenient computation of quotients:
5917 * shift left if necessary so divisor has 4 leading 0 bits.
5918 *
5919 * Perhaps we should just compute leading 28 bits of S once
5920 * and for all and pass them and a shift to quorem, so it
5921 * can do shifts and ors to compute the numerator for q.
5922 */
5923#ifdef Pack_32
5924 if ((i = ((s5 ? 32 - hi0bits(S->x[S->wds-1]) : 1) + s2) & 0x1f) != 0)
5925 i = 32 - i;
5926#else
5927 if (i = ((s5 ? 32 - hi0bits(S->x[S->wds-1]) : 1) + s2) & 0xf)
5928 i = 16 - i;
5929#endif
5930 if (i > 4) {
5931 i -= 4;
5932 b2 += i;
5933 m2 += i;
5934 s2 += i;
5935 }
5936 else if (i < 4) {
5937 i += 28;
5938 b2 += i;
5939 m2 += i;
5940 s2 += i;
5941 }
5942 if (b2 > 0)
5943 b = lshift(b, b2);
5944 if (s2 > 0)
5945 S = lshift(S, s2);
5946 if (k_check) {
5947 if (cmp(b,S) < 0) {
5948 k--;
5949 b = multadd(b, 10, 0);/* we botched the k estimate */
5950 if (leftright)
5951 mhi = multadd(mhi, 10, 0);
5952 ilim = ilim1;
5953 }
5954 }
5955 if (ilim <= 0 && mode > 2) {
5956 if (ilim < 0 || cmp(b,S = multadd(S,5,0)) <= 0) {
5957 /* no digits, fcvt style */
5958 no_digits:
5959 k = -1 - ndigits;
5960 goto ret;
5961 }
5962 one_digit:
5963 *s++ = '1';
5964 k++;
5965 goto ret;
5966 }
5967 if (leftright) {
5968 if (m2 > 0)
5969 mhi = lshift(mhi, m2);
5970
5971 /* Compute mlo -- check for special case
5972 * that d is a normalized power of 2.
5973 */
5974
5975 mlo = mhi;
5976 if (spec_case) {
5977 mhi = Balloc(mhi->k);
5978 Bcopy(mhi, mlo);
5979 mhi = lshift(mhi, Log2P);
5980 }
5981
5982 for(i = 1;;i++) {
5983 dig = quorem(b,S) + '0';
5984 /* Do we yet have the shortest decimal string
5985 * that will round to d?
5986 */
5987 j = cmp(b, mlo);
5988 delta = diff(S, mhi);
5989 j1 = delta->sign ? 1 : cmp(b, delta);
5990 Bfree(delta);
5991#ifndef ROUND_BIASED
5992 if (j1 == 0 && !mode && !(word1(d) & 1)) {
5993 if (dig == '9')
5994 goto round_9_up;
5995 if (j > 0)
5996 dig++;
5997 *s++ = dig;
5998 goto ret;
5999 }
6000#endif
6001 if (j < 0 || (j == 0 && !mode
6002#ifndef ROUND_BIASED
6003 && !(word1(d) & 1)
6004#endif
6005 )) {
6006 if (j1 > 0) {
6007 b = lshift(b, 1);
6008 j1 = cmp(b, S);
6009 if ((j1 > 0 || (j1 == 0 && dig & 1))
6010 && dig++ == '9')
6011 goto round_9_up;
6012 }
6013 *s++ = dig;
6014 goto ret;
6015 }
6016 if (j1 > 0) {
6017 if (dig == '9') { /* possible if i == 1 */
6018 round_9_up:
6019 *s++ = '9';
6020 goto roundoff;
6021 }
6022 *s++ = dig + 1;
6023 goto ret;
6024 }
6025 *s++ = dig;
6026 if (i == ilim)
6027 break;
6028 b = multadd(b, 10, 0);
6029 if (mlo == mhi)
6030 mlo = mhi = multadd(mhi, 10, 0);
6031 else {
6032 mlo = multadd(mlo, 10, 0);
6033 mhi = multadd(mhi, 10, 0);
6034 }
6035 }
6036 }
6037 else
6038 for(i = 1;; i++) {
6039 *s++ = dig = quorem(b,S) + '0';
6040 if (i >= ilim)
6041 break;
6042 b = multadd(b, 10, 0);
6043 }
6044
6045 /* Round off last digit */
6046
6047 b = lshift(b, 1);
6048 j = cmp(b, S);
6049 if (j > 0 || (j == 0 && dig & 1)) {
6050 roundoff:
6051 while(*--s == '9')
6052 if (s == s0) {
6053 k++;
6054 *s++ = '1';
6055 goto ret;
6056 }
6057 ++*s++;
6058 }
6059 else {
6060 while(*--s == '0');
6061 s++;
6062 }
6063 ret:
6064 Bfree(S);
6065 if (mhi) {
6066 if (mlo && mlo != mhi)
6067 Bfree(mlo);
6068 Bfree(mhi);
6069 }
6070 ret1:
6071 Bfree(b);
6072 if (s == s0) { /* don't return empty string */
6073 *s++ = '0';
6074 k = 0;
6075 }
6076 *s = 0;
6077 *decpt = k + 1;
6078 if (rve)
6079 *rve = s;
6080 return s0;
6081}
6082
6083#endif // QT_QLOCALE_USES_FCVT
diff --git a/qmake/tools/qsettings.cpp b/qmake/tools/qsettings.cpp
index 35fc039..598e94b 100644
--- a/qmake/tools/qsettings.cpp
+++ b/qmake/tools/qsettings.cpp
@@ -1,11 +1,11 @@
1/**************************************************************************** 1/****************************************************************************
2** $Id$ 2**
3** 3**
4** Implementation of QSettings class 4** Implementation of QSettings class
5** 5**
6** Created : 000626 6** Created : 000626
7** 7**
8** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. 8** Copyright (C) 2000-2003 Trolltech AS. All rights reserved.
9** 9**
10** This file is part of the tools module of the Qt GUI Toolkit. 10** This file is part of the tools module of the Qt GUI Toolkit.
11** 11**
@@ -60,7 +60,9 @@ static inline int qt_open( const char *pathname, int flags, mode_t mode )
60#include "qtextstream.h" 60#include "qtextstream.h"
61#include "qregexp.h" 61#include "qregexp.h"
62#include <private/qsettings_p.h> 62#include <private/qsettings_p.h>
63#ifndef NO_ERRNO_H
63#include <errno.h> 64#include <errno.h>
65#endif
64 66
65/*! 67/*!
66 \class QSettings 68 \class QSettings
@@ -101,7 +103,8 @@ static inline int qt_open( const char *pathname, int flags, mode_t mode )
101 \endcode 103 \endcode
102 Each line above is a complete key, made up of subkeys. 104 Each line above is a complete key, made up of subkeys.
103 105
104 A typical usage pattern for reading application startup: 106 A typical usage pattern for reading settings at application
107 startup:
105 \code 108 \code
106 QSettings settings; 109 QSettings settings;
107 settings.setPath( "MyCompany.com", "MyApplication" ); 110 settings.setPath( "MyCompany.com", "MyApplication" );
@@ -111,7 +114,8 @@ static inline int qt_open( const char *pathname, int flags, mode_t mode )
111 // ... 114 // ...
112 \endcode 115 \endcode
113 116
114 A typical usage pattern for application exit or 'save preferences': 117 A typical usage pattern for saving settings at application exit or
118 'save preferences':
115 \code 119 \code
116 QSettings settings; 120 QSettings settings;
117 settings.setPath( "MyCompany.com", "MyApplication" ); 121 settings.setPath( "MyCompany.com", "MyApplication" );
@@ -121,8 +125,9 @@ static inline int qt_open( const char *pathname, int flags, mode_t mode )
121 // ... 125 // ...
122 \endcode 126 \endcode
123 127
124 QSettings can build a key prefix that is prepended to all keys. To 128 A key prefix can be prepended to all keys using beginGroup(). The
125 build the key prefix, use beginGroup() and endGroup(). 129 application of the prefix is stopped using endGroup(). For
130 example:
126 \code 131 \code
127 QSettings settings; 132 QSettings settings;
128 133
@@ -154,8 +159,8 @@ static inline int qt_open( const char *pathname, int flags, mode_t mode )
154 // subkeys is empty. 159 // subkeys is empty.
155 \endcode 160 \endcode
156 161
157 Since settings for Windows are stored in the registry there are size 162 Since settings for Windows are stored in the registry there are
158 limits as follows: 163 some size limitations as follows:
159 \list 164 \list
160 \i A subkey may not exceed 255 characters. 165 \i A subkey may not exceed 255 characters.
161 \i An entry's value may not exceed 16,300 characters. 166 \i An entry's value may not exceed 16,300 characters.
@@ -165,22 +170,23 @@ static inline int qt_open( const char *pathname, int flags, mode_t mode )
165 170
166 These limitations are not enforced on Unix or Mac OS X. 171 These limitations are not enforced on Unix or Mac OS X.
167 172
168 If you wish to use a different search path call insertSearchPath() 173 \warning Creating multiple, simultaneous instances of QSettings writing
169 as often as necessary to add your preferred paths. Call 174 to a text file may lead to data loss! This is a known issue which will
170 removeSearchPath() to remove any unwanted paths. 175 be fixed in a future release of Qt.
171 176
172 \section1 Notes for Mac OS X Applications 177 \section1 Notes for Mac OS X Applications
173 178
174 Internal to the CFPreferences API it is not defined (for Mac OS 9 179 The location where settings are stored is not formally defined by
175 support) where the settings will ultimitely be stored. However, at the 180 the CFPreferences API.
176 time of this writing the settings will be stored (either on a global or 181
177 user basis, preferring locally) into a plist file in 182 At the time of writing settings are stored (either on a global or
178 $ROOT/System/Library/Preferences (in XML format). QSettings will create 183 user basis, preferring locally) into a plist file in \c
179 an appropriate plist file (com.<first group name>.plist) out of the 184 $ROOT/System/Library/Preferences (in XML format). QSettings will
180 full path to a key. 185 create an appropriate plist file (\c{com.<first group name>.plist})
186 out of the full path to a key.
181 187
182 For further information on CFPreferences see also 188 For further information on CFPreferences see
183 \link http://developer.apple.com/techpubs/macosx/CoreFoundation/PreferenceServices/preferenceservices_carbon.html 189 \link http://developer.apple.com/documentation/CoreFoundation/Conceptual/CFPreferences/index.html
184 Apple's Specifications\endlink 190 Apple's Specifications\endlink
185 191
186 \section1 Notes for Unix Applications 192 \section1 Notes for Unix Applications
@@ -189,10 +195,10 @@ static inline int qt_open( const char *pathname, int flags, mode_t mode )
189 settings under Unix. In the examples the settings file will be 195 settings under Unix. In the examples the settings file will be
190 searched for in the following directories: 196 searched for in the following directories:
191 \list 1 197 \list 1
192 \i INSTALL/etc/settings 198 \i \c SYSCONF - the default value is \c INSTALL/etc/settings
193 \i /opt/MyCompany/share/etc 199 \i \c /opt/MyCompany/share/etc
194 \i /opt/MyCompany/share/MyApplication/etc 200 \i \c /opt/MyCompany/share/MyApplication/etc
195 \i $HOME/.qt 201 \i \c $HOME/.qt
196 \endlist 202 \endlist
197 When reading settings the files are searched in the order shown 203 When reading settings the files are searched in the order shown
198 above, with later settings overriding earlier settings. Files for 204 above, with later settings overriding earlier settings. Files for
@@ -217,8 +223,8 @@ static inline int qt_open( const char *pathname, int flags, mode_t mode )
217 \c{$HOME/.qt/myapplicationrc} (assuming that the application is 223 \c{$HOME/.qt/myapplicationrc} (assuming that the application is
218 being run by an ordinary user, i.e. not by root). 224 being run by an ordinary user, i.e. not by root).
219 225
220 For cross-platform applications you should ensure that the Windows 226 For cross-platform applications you should ensure that the
221 size limitations are not exceeded. 227 \link #sizelimit Windows size limitations \endlink are not exceeded.
222*/ 228*/
223 229
224/*! 230/*!
@@ -310,45 +316,6 @@ static void closelock( HANDLE fd )
310 316
311 close( fd ); 317 close( fd );
312} 318}
313#elif defined(Q_WS_WIN)
314#define Q_LOCKREAD 1
315#define Q_LOCKWRITE 2
316
317static HANDLE openlock( const QString &name, int /*type*/ )
318{
319 if ( !QFile::exists( name ) )
320 return 0;
321
322 return 0;
323
324 HANDLE fd = 0;
325
326 QT_WA( {
327 fd = CreateFileW( (TCHAR*)name.ucs2(), GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL );
328 } , {
329 fd = CreateFileA( name.local8Bit(), GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL );
330 } );
331
332 if ( !LockFile( fd, 0, 0, (DWORD)-1, (DWORD)-1 ) ) { // ### (DWORD)-1 ???
333#ifdef QT_CHECK_STATE
334 qWarning( "QSettings: openlock failed!" );
335#endif
336 }
337 return fd;
338}
339
340static void closelock( HANDLE fd )
341{
342 if ( !fd )
343 return;
344
345 if ( !UnlockFile( fd, 0, 0, (DWORD)-1, (DWORD)-1 ) ) { // ### (DWORD)-1 ???
346#ifdef QT_CHECK_STATE
347 qWarning( "QSettings: closelock failed!");
348#endif
349 }
350 CloseHandle( fd );
351}
352#endif 319#endif
353 320
354 321
@@ -365,7 +332,9 @@ void QSettingsHeading::read(const QString &filename)
365 if (! QFileInfo(filename).exists()) 332 if (! QFileInfo(filename).exists())
366 return; 333 return;
367 334
335#ifndef Q_WS_WIN
368 HANDLE lockfd = openlock( filename, Q_LOCKREAD ); 336 HANDLE lockfd = openlock( filename, Q_LOCKREAD );
337#endif
369 338
370 QFile file(filename); 339 QFile file(filename);
371 if (! file.open(IO_ReadOnly)) { 340 if (! file.open(IO_ReadOnly)) {
@@ -386,7 +355,9 @@ void QSettingsHeading::read(const QString &filename)
386 355
387 file.close(); 356 file.close();
388 357
358#ifndef Q_WS_WIN
389 closelock( lockfd ); 359 closelock( lockfd );
360#endif
390} 361}
391 362
392 363
@@ -404,7 +375,7 @@ void QSettingsHeading::parseLine(QTextStream &stream)
404 if (line[0] == QChar('[')) { 375 if (line[0] == QChar('[')) {
405 QString gname = line; 376 QString gname = line;
406 377
407 gname = gname.remove(0, 1); 378 gname = gname.remove((uint)0, 1);
408 if (gname[(int)gname.length() - 1] == QChar(']')) 379 if (gname[(int)gname.length() - 1] == QChar(']'))
409 gname = gname.remove(gname.length() - 1, 1); 380 gname = gname.remove(gname.length() - 1, 1);
410 381
@@ -526,11 +497,7 @@ QSettingsPrivate::QSettingsPrivate( QSettings::Format format )
526 } ); 497 } );
527#endif // Q_OS_TEMP 498#endif // Q_OS_TEMP
528#else 499#else
529// for now 500 defPath = qInstallPathSysconf();
530#define QSETTINGS_DEFAULT_PATH_SUFFIX "/etc/settings"
531
532 defPath = qInstallPath();
533 defPath += QSETTINGS_DEFAULT_PATH_SUFFIX;
534#endif 501#endif
535 QDir dir(appSettings); 502 QDir dir(appSettings);
536 if (! dir.exists()) { 503 if (! dir.exists()) {
@@ -701,27 +668,32 @@ QDateTime QSettingsPrivate::modificationTime()
701 668
702bool qt_verify_key( const QString &key ) 669bool qt_verify_key( const QString &key )
703{ 670{
704 if ( key.isEmpty() || key[0] != '/' || key.contains( QRegExp("[=\\\\r\\\\n" ) ) ) 671 if ( key.isEmpty() || key[0] != '/' || key.contains( QRegExp("[=\\r\\n]" ) ) )
705 return FALSE; 672 return FALSE;
706 return TRUE; 673 return TRUE;
707} 674}
708 675
709static inline QString groupKey( const QString &group, const QString &key ) 676static QString groupKey( const QString &group, const QString &key )
710{ 677{
678 QString grp_key;
711 if ( group.isEmpty() || ( group.length() == 1 && group[0] == '/' ) ) { 679 if ( group.isEmpty() || ( group.length() == 1 && group[0] == '/' ) ) {
712 // group is empty, or it contains a single '/', so we just return the key 680 // group is empty, or it contains a single '/', so we just return the key
713 if ( key.startsWith( "/" ) ) 681 if ( key.startsWith( "/" ) )
714 return key; 682 grp_key = key;
715 return "/" + key; 683 else
684 grp_key = "/" + key;
716 } else if ( group.endsWith( "/" ) || key.startsWith( "/" ) ) { 685 } else if ( group.endsWith( "/" ) || key.startsWith( "/" ) ) {
717 return group + key; 686 grp_key = group + key;
687 } else {
688 grp_key = group + "/" + key;
718 } 689 }
719 return group + "/" + key; 690 return grp_key;
720} 691}
721 692
722/*! 693/*!
723 Inserts \a path into the settings search path. The semantics of \a 694 Inserts \a path into the settings search path. The semantics of \a
724 path depends on the system \a s. 695 path depends on the system \a s. It is usually easier and better to
696 use setPath() instead of this function.
725 697
726 When \a s is \e Windows and the execution environment is \e not 698 When \a s is \e Windows and the execution environment is \e not
727 Windows the function does nothing. Similarly when \a s is \e Unix and 699 Windows the function does nothing. Similarly when \a s is \e Unix and
@@ -766,8 +738,9 @@ static inline QString groupKey( const QString &group, const QString &key )
766 two entries in the search path: 738 two entries in the search path:
767 739
768 \list 1 740 \list 1
769 \i INSTALL/etc - where \c INSTALL is the directory where Qt was installed. 741 \i \c SYSCONF - where \c SYSCONF is a directory specified when
770 \i $HOME/.qt/ - where \c $HOME is the user's home directory. 742 configuring Qt; by default it is INSTALL/etc/settings.
743 \i \c $HOME/.qt/ - where \c $HOME is the user's home directory.
771 \endlist 744 \endlist
772 745
773 All insertions into the search path will go before $HOME/.qt/. 746 All insertions into the search path will go before $HOME/.qt/.
@@ -780,7 +753,7 @@ static inline QString groupKey( const QString &group, const QString &key )
780 \endcode 753 \endcode
781 Will result in a search path of: 754 Will result in a search path of:
782 \list 1 755 \list 1
783 \i INSTALL/etc 756 \i SYSCONF
784 \i /opt/MyCompany/share/etc 757 \i /opt/MyCompany/share/etc
785 \i /opt/MyCompany/share/MyApplication/etc 758 \i /opt/MyCompany/share/MyApplication/etc
786 \i $HOME/.qt 759 \i $HOME/.qt
@@ -791,6 +764,9 @@ static inline QString groupKey( const QString &group, const QString &key )
791 settings QSettings works in the order shown above, writing 764 settings QSettings works in the order shown above, writing
792 to the first settings file for which the user has write permission. 765 to the first settings file for which the user has write permission.
793 766
767 Note that paths in the file system are not created by this
768 function, so they must already exist to be useful.
769
794 Settings under Unix are stored in files whose names are based on the 770 Settings under Unix are stored in files whose names are based on the
795 first subkey of the key (not including the search path). The algorithm 771 first subkey of the key (not including the search path). The algorithm
796 for creating names is essentially: lowercase the first subkey, replace 772 for creating names is essentially: lowercase the first subkey, replace
@@ -815,7 +791,7 @@ void QSettings::insertSearchPath( System s, const QString &path)
815 if ( s == Windows ) 791 if ( s == Windows )
816 return; 792 return;
817#endif 793#endif
818#if !defined(Q_WS_WIN) 794#if !defined(Q_OS_MAC)
819 if ( s == Mac ) 795 if ( s == Mac )
820 return; 796 return;
821#endif 797#endif
@@ -964,7 +940,7 @@ bool QSettings::sync()
964 // determine filename 940 // determine filename
965 QSettingsHeading hd(*it); 941 QSettingsHeading hd(*it);
966 QSettingsHeading::Iterator hdit = hd.begin(); 942 QSettingsHeading::Iterator hdit = hd.begin();
967 QFile file; 943 QString filename;
968 944
969 QStringList::Iterator pit = d->searchPaths.begin(); 945 QStringList::Iterator pit = d->searchPaths.begin();
970 if ( !d->globalScope ) 946 if ( !d->globalScope )
@@ -972,18 +948,29 @@ bool QSettings::sync()
972 while (pit != d->searchPaths.end()) { 948 while (pit != d->searchPaths.end()) {
973 QString filebase = it.key().lower().replace(QRegExp("\\s+"), "_"); 949 QString filebase = it.key().lower().replace(QRegExp("\\s+"), "_");
974 QFileInfo di(*pit); 950 QFileInfo di(*pit);
951 if ( !di.exists() ) {
952 QDir dir;
953 dir.mkdir( *pit );
954 }
955
975 QFileInfo fi((*pit++) + "/" + filebase + "rc"); 956 QFileInfo fi((*pit++) + "/" + filebase + "rc");
976 957
977 if ((fi.exists() && fi.isFile() && fi.isWritable()) || 958 if ((fi.exists() && fi.isFile() && fi.isWritable()) ||
978 (! fi.exists() && di.isDir() && di.isWritable())) { 959 (! fi.exists() && di.isDir()
979 file.setName(fi.filePath()); 960#ifndef Q_WS_WIN
961 && di.isWritable()
962#else
963 && ((qWinVersion()&Qt::WV_NT_based) > Qt::WV_2000 || di.isWritable())
964#endif
965 )) {
966 filename = fi.filePath();
980 break; 967 break;
981 } 968 }
982 } 969 }
983 970
984 ++it; 971 ++it;
985 972
986 if ( file.name().isEmpty() ) { 973 if ( filename.isEmpty() ) {
987 974
988#ifdef QT_CHECK_STATE 975#ifdef QT_CHECK_STATE
989 qWarning("QSettings::sync: filename is null/empty"); 976 qWarning("QSettings::sync: filename is null/empty");
@@ -993,8 +980,11 @@ bool QSettings::sync()
993 continue; 980 continue;
994 } 981 }
995 982
996 HANDLE lockfd = openlock( file.name(), Q_LOCKWRITE ); 983#ifndef Q_WS_WIN
984 HANDLE lockfd = openlock( filename, Q_LOCKWRITE );
985#endif
997 986
987 QFile file( filename + ".tmp" );
998 if (! file.open(IO_WriteOnly)) { 988 if (! file.open(IO_WriteOnly)) {
999 989
1000#ifdef QT_CHECK_STATE 990#ifdef QT_CHECK_STATE
@@ -1047,7 +1037,26 @@ bool QSettings::sync()
1047 1037
1048 file.close(); 1038 file.close();
1049 1039
1040 if ( success ) {
1041 QDir dir( QFileInfo( file ).dir( TRUE ) );
1042 if ( dir.exists( filename ) && !dir.remove( filename ) ||
1043 !dir.rename( file.name(), filename, TRUE ) ) {
1044
1045#ifdef QT_CHECK_STATE
1046 qWarning( "QSettings::sync: error writing file '%s'",
1047 QFile::encodeName( filename ).data() );
1048#endif // QT_CHECK_STATE
1049
1050 success = FALSE;
1051 }
1052 }
1053
1054 // remove temporary file
1055 file.remove();
1056
1057#ifndef Q_WS_WIN
1050 closelock( lockfd ); 1058 closelock( lockfd );
1059#endif
1051 } 1060 }
1052 1061
1053 d->modified = FALSE; 1062 d->modified = FALSE;
@@ -1072,9 +1081,10 @@ bool QSettings::sync()
1072*/ 1081*/
1073bool QSettings::readBoolEntry(const QString &key, bool def, bool *ok ) 1082bool QSettings::readBoolEntry(const QString &key, bool def, bool *ok )
1074{ 1083{
1075 if ( !qt_verify_key( key ) ) { 1084 QString grp_key( groupKey( group(), key ) );
1085 if ( !qt_verify_key( grp_key ) ) {
1076#if defined(QT_CHECK_STATE) 1086#if defined(QT_CHECK_STATE)
1077 qWarning( "QSettings::readBoolEntry: Invalid key: '%s'", key.isNull() ? "(null)" : key.latin1() ); 1087 qWarning( "QSettings::readBoolEntry: Invalid key: '%s'", grp_key.isNull() ? "(null)" : grp_key.latin1() );
1078#endif 1088#endif
1079 if ( ok ) 1089 if ( ok )
1080 *ok = FALSE; 1090 *ok = FALSE;
@@ -1084,7 +1094,7 @@ bool QSettings::readBoolEntry(const QString &key, bool def, bool *ok )
1084 1094
1085#if !defined(QWS) && (defined(Q_WS_WIN) || defined(Q_OS_MAC)) 1095#if !defined(QWS) && (defined(Q_WS_WIN) || defined(Q_OS_MAC))
1086 if ( d->sysd ) 1096 if ( d->sysd )
1087 return d->sysReadBoolEntry( groupKey( group(), key ), def, ok ); 1097 return d->sysReadBoolEntry( grp_key, def, ok );
1088#endif 1098#endif
1089 1099
1090 QString value = readEntry( key, ( def ? "true" : "false" ), ok ); 1100 QString value = readEntry( key, ( def ? "true" : "false" ), ok );
@@ -1123,9 +1133,10 @@ bool QSettings::readBoolEntry(const QString &key, bool def, bool *ok )
1123*/ 1133*/
1124double QSettings::readDoubleEntry(const QString &key, double def, bool *ok ) 1134double QSettings::readDoubleEntry(const QString &key, double def, bool *ok )
1125{ 1135{
1126 if ( !qt_verify_key( key ) ) { 1136 QString grp_key( groupKey( group(), key ) );
1137 if ( !qt_verify_key( grp_key ) ) {
1127#if defined(QT_CHECK_STATE) 1138#if defined(QT_CHECK_STATE)
1128 qWarning( "QSettings::readDoubleEntry: Invalid key: '%s'", key.isNull() ? "(null)" : key.latin1() ); 1139 qWarning( "QSettings::readDoubleEntry: Invalid key: '%s'", grp_key.isNull() ? "(null)" : grp_key.latin1() );
1129#endif 1140#endif
1130 if ( ok ) 1141 if ( ok )
1131 *ok = FALSE; 1142 *ok = FALSE;
@@ -1135,7 +1146,7 @@ double QSettings::readDoubleEntry(const QString &key, double def, bool *ok )
1135 1146
1136#if !defined(QWS) && (defined(Q_WS_WIN) || defined(Q_OS_MAC)) 1147#if !defined(QWS) && (defined(Q_WS_WIN) || defined(Q_OS_MAC))
1137 if ( d->sysd ) 1148 if ( d->sysd )
1138 return d->sysReadDoubleEntry( groupKey( group(), key ), def, ok ); 1149 return d->sysReadDoubleEntry( grp_key, def, ok );
1139#endif 1150#endif
1140 1151
1141 QString value = readEntry( key, QString::number(def), ok ); 1152 QString value = readEntry( key, QString::number(def), ok );
@@ -1168,9 +1179,10 @@ double QSettings::readDoubleEntry(const QString &key, double def, bool *ok )
1168*/ 1179*/
1169int QSettings::readNumEntry(const QString &key, int def, bool *ok ) 1180int QSettings::readNumEntry(const QString &key, int def, bool *ok )
1170{ 1181{
1171 if ( !qt_verify_key( key ) ) { 1182 QString grp_key( groupKey( group(), key ) );
1183 if ( !qt_verify_key( grp_key ) ) {
1172#if defined(QT_CHECK_STATE) 1184#if defined(QT_CHECK_STATE)
1173 qWarning( "QSettings::readNumEntry: Invalid key: '%s'", key.isNull() ? "(null)" : key.latin1() ); 1185 qWarning( "QSettings::readNumEntry: Invalid key: '%s'", grp_key.isNull() ? "(null)" : grp_key.latin1() );
1174#endif 1186#endif
1175 if ( ok ) 1187 if ( ok )
1176 *ok = FALSE; 1188 *ok = FALSE;
@@ -1179,7 +1191,7 @@ int QSettings::readNumEntry(const QString &key, int def, bool *ok )
1179 1191
1180#if !defined(QWS) && (defined(Q_WS_WIN) || defined(Q_OS_MAC)) 1192#if !defined(QWS) && (defined(Q_WS_WIN) || defined(Q_OS_MAC))
1181 if ( d->sysd ) 1193 if ( d->sysd )
1182 return d->sysReadNumEntry( groupKey( group(), key ), def, ok ); 1194 return d->sysReadNumEntry( grp_key, def, ok );
1183#endif 1195#endif
1184 1196
1185 QString value = readEntry( key, QString::number( def ), ok ); 1197 QString value = readEntry( key, QString::number( def ), ok );
@@ -1212,9 +1224,10 @@ int QSettings::readNumEntry(const QString &key, int def, bool *ok )
1212*/ 1224*/
1213QString QSettings::readEntry(const QString &key, const QString &def, bool *ok ) 1225QString QSettings::readEntry(const QString &key, const QString &def, bool *ok )
1214{ 1226{
1215 if ( !qt_verify_key( key ) ) { 1227 QString grp_key( groupKey( group(), key ) );
1228 if ( !qt_verify_key( grp_key ) ) {
1216#if defined(QT_CHECK_STATE) 1229#if defined(QT_CHECK_STATE)
1217 qWarning( "QSettings::readEntry: Invalid key: '%s'", key.isNull() ? "(null)" : key.latin1() ); 1230 qWarning( "QSettings::readEntry: Invalid key: '%s'", grp_key.isNull() ? "(null)" : grp_key.latin1() );
1218#endif 1231#endif
1219 if ( ok ) 1232 if ( ok )
1220 *ok = FALSE; 1233 *ok = FALSE;
@@ -1222,11 +1235,9 @@ QString QSettings::readEntry(const QString &key, const QString &def, bool *ok )
1222 return def; 1235 return def;
1223 } 1236 }
1224 1237
1225 QString theKey = groupKey( group(), key );
1226
1227#if !defined(QWS) && (defined(Q_WS_WIN) || defined(Q_OS_MAC)) 1238#if !defined(QWS) && (defined(Q_WS_WIN) || defined(Q_OS_MAC))
1228 if ( d->sysd ) 1239 if ( d->sysd )
1229 return d->sysReadEntry( theKey, def, ok ); 1240 return d->sysReadEntry( grp_key, def, ok );
1230#endif 1241#endif
1231 1242
1232 if ( ok ) // no, everything is not ok 1243 if ( ok ) // no, everything is not ok
@@ -1234,13 +1245,13 @@ QString QSettings::readEntry(const QString &key, const QString &def, bool *ok )
1234 1245
1235 QString realkey; 1246 QString realkey;
1236 1247
1237 if (theKey[0] == '/') { 1248 if (grp_key[0] == '/') {
1238 // parse our key 1249 // parse our key
1239 QStringList list(QStringList::split('/', theKey)); 1250 QStringList list(QStringList::split('/', grp_key));
1240 1251
1241 if (list.count() < 2) { 1252 if (list.count() < 2) {
1242#ifdef QT_CHECK_STATE 1253#ifdef QT_CHECK_STATE
1243 qWarning("QSettings::readEntry: invalid key '%s'", theKey.latin1()); 1254 qWarning("QSettings::readEntry: invalid key '%s'", grp_key.latin1());
1244#endif // QT_CHECK_STATE 1255#endif // QT_CHECK_STATE
1245 if ( ok ) 1256 if ( ok )
1246 *ok = FALSE; 1257 *ok = FALSE;
@@ -1262,8 +1273,9 @@ QString QSettings::readEntry(const QString &key, const QString &def, bool *ok )
1262 1273
1263 realkey = list.join("/"); 1274 realkey = list.join("/");
1264 } 1275 }
1265 } else 1276 } else {
1266 realkey = theKey; 1277 realkey = grp_key;
1278 }
1267 1279
1268 QSettingsGroup grp = d->readGroup(); 1280 QSettingsGroup grp = d->readGroup();
1269 QSettingsGroup::const_iterator it = grp.find( realkey ), end = grp.end(); 1281 QSettingsGroup::const_iterator it = grp.find( realkey ), end = grp.end();
@@ -1290,16 +1302,17 @@ QString QSettings::readEntry(const QString &key, const QString &def, bool *ok )
1290*/ 1302*/
1291bool QSettings::writeEntry(const QString &key, bool value) 1303bool QSettings::writeEntry(const QString &key, bool value)
1292{ 1304{
1293 if ( !qt_verify_key( key ) ) { 1305 QString grp_key( groupKey( group(), key ) );
1306 if ( !qt_verify_key( grp_key ) ) {
1294#if defined(QT_CHECK_STATE) 1307#if defined(QT_CHECK_STATE)
1295 qWarning( "QSettings::writeEntry: Invalid key: '%s'", key.isNull() ? "(null)" : key.latin1() ); 1308 qWarning( "QSettings::writeEntry: Invalid key: '%s'", grp_key.isNull() ? "(null)" : grp_key.latin1() );
1296#endif 1309#endif
1297 return FALSE; 1310 return FALSE;
1298 } 1311 }
1299 1312
1300#if !defined(QWS) && (defined(Q_WS_WIN) || defined(Q_OS_MAC)) 1313#if !defined(QWS) && (defined(Q_WS_WIN) || defined(Q_OS_MAC))
1301 if ( d->sysd ) 1314 if ( d->sysd )
1302 return d->sysWriteEntry( groupKey( group(), key ), value ); 1315 return d->sysWriteEntry( grp_key, value );
1303#endif 1316#endif
1304 QString s(value ? "true" : "false"); 1317 QString s(value ? "true" : "false");
1305 return writeEntry(key, s); 1318 return writeEntry(key, s);
@@ -1320,16 +1333,17 @@ bool QSettings::writeEntry(const QString &key, bool value)
1320*/ 1333*/
1321bool QSettings::writeEntry(const QString &key, double value) 1334bool QSettings::writeEntry(const QString &key, double value)
1322{ 1335{
1323 if ( !qt_verify_key( key ) ) { 1336 QString grp_key( groupKey( group(), key ) );
1337 if ( !qt_verify_key( grp_key ) ) {
1324#if defined(QT_CHECK_STATE) 1338#if defined(QT_CHECK_STATE)
1325 qWarning( "QSettings::writeEntry: Invalid key: '%s'", key.isNull() ? "(null)" : key.latin1() ); 1339 qWarning( "QSettings::writeEntry: Invalid key: '%s'", grp_key.isNull() ? "(null)" : grp_key.latin1() );
1326#endif 1340#endif
1327 return FALSE; 1341 return FALSE;
1328 } 1342 }
1329 1343
1330#if !defined(QWS) && (defined(Q_WS_WIN) || defined(Q_OS_MAC)) 1344#if !defined(QWS) && (defined(Q_WS_WIN) || defined(Q_OS_MAC))
1331 if ( d->sysd ) 1345 if ( d->sysd )
1332 return d->sysWriteEntry( groupKey( group(), key ), value ); 1346 return d->sysWriteEntry( grp_key, value );
1333#endif 1347#endif
1334 QString s(QString::number(value)); 1348 QString s(QString::number(value));
1335 return writeEntry(key, s); 1349 return writeEntry(key, s);
@@ -1349,16 +1363,17 @@ bool QSettings::writeEntry(const QString &key, double value)
1349*/ 1363*/
1350bool QSettings::writeEntry(const QString &key, int value) 1364bool QSettings::writeEntry(const QString &key, int value)
1351{ 1365{
1352 if ( !qt_verify_key( key ) ) { 1366 QString grp_key( groupKey( group(), key ) );
1367 if ( !qt_verify_key( grp_key ) ) {
1353#if defined(QT_CHECK_STATE) 1368#if defined(QT_CHECK_STATE)
1354 qWarning( "QSettings::writeEntry: Invalid key: '%s'", key.isNull() ? "(null)" : key.latin1() ); 1369 qWarning( "QSettings::writeEntry: Invalid key: '%s'", grp_key.isNull() ? "(null)" : grp_key.latin1() );
1355#endif 1370#endif
1356 return FALSE; 1371 return FALSE;
1357 } 1372 }
1358 1373
1359#if !defined(QWS) && (defined(Q_WS_WIN) || defined(Q_OS_MAC)) 1374#if !defined(QWS) && (defined(Q_WS_WIN) || defined(Q_OS_MAC))
1360 if ( d->sysd ) 1375 if ( d->sysd )
1361 return d->sysWriteEntry( groupKey( group(), key ), value ); 1376 return d->sysWriteEntry( grp_key, value );
1362#endif 1377#endif
1363 QString s(QString::number(value)); 1378 QString s(QString::number(value));
1364 return writeEntry(key, s); 1379 return writeEntry(key, s);
@@ -1383,13 +1398,6 @@ bool QSettings::writeEntry(const QString &key, int value)
1383*/ 1398*/
1384bool QSettings::writeEntry(const QString &key, const char *value) 1399bool QSettings::writeEntry(const QString &key, const char *value)
1385{ 1400{
1386 if ( !qt_verify_key( key ) ) {
1387#if defined(QT_CHECK_STATE)
1388 qWarning( "QSettings::writeEntry: Invalid key: '%s'", key.isNull() ? "(null)" : key.latin1() );
1389#endif
1390 return FALSE;
1391 }
1392
1393 return writeEntry(key, QString(value)); 1401 return writeEntry(key, QString(value));
1394} 1402}
1395 1403
@@ -1408,30 +1416,29 @@ bool QSettings::writeEntry(const QString &key, const char *value)
1408*/ 1416*/
1409bool QSettings::writeEntry(const QString &key, const QString &value) 1417bool QSettings::writeEntry(const QString &key, const QString &value)
1410{ 1418{
1411 if ( !qt_verify_key( key ) ) { 1419 QString grp_key( groupKey( group(), key ) );
1420 if ( !qt_verify_key( grp_key ) ) {
1412#if defined(QT_CHECK_STATE) 1421#if defined(QT_CHECK_STATE)
1413 qWarning( "QSettings::writeEntry: Invalid key: '%s'", key.isNull() ? "(null)" : key.latin1() ); 1422 qWarning( "QSettings::writeEntry: Invalid key: '%s'", grp_key.isNull() ? "(null)" : grp_key.latin1() );
1414#endif 1423#endif
1415 return FALSE; 1424 return FALSE;
1416 } 1425 }
1417 1426
1418 QString theKey = groupKey( group(), key );
1419
1420#if !defined(QWS) && (defined(Q_WS_WIN) || defined(Q_OS_MAC)) 1427#if !defined(QWS) && (defined(Q_WS_WIN) || defined(Q_OS_MAC))
1421 if ( d->sysd ) 1428 if ( d->sysd )
1422 return d->sysWriteEntry( theKey, value ); 1429 return d->sysWriteEntry( grp_key, value );
1423#endif 1430#endif
1424 // NOTE: we *do* allow value to be a null/empty string 1431 // NOTE: we *do* allow value to be a null/empty string
1425 1432
1426 QString realkey; 1433 QString realkey;
1427 1434
1428 if (theKey[0] == '/') { 1435 if (grp_key[0] == '/') {
1429 // parse our key 1436 // parse our key
1430 QStringList list(QStringList::split('/', theKey)); 1437 QStringList list(QStringList::split('/', grp_key));
1431 1438
1432 if (list.count() < 2) { 1439 if (list.count() < 2) {
1433#ifdef QT_CHECK_STATE 1440#ifdef QT_CHECK_STATE
1434 qWarning("QSettings::writeEntry: invalid key '%s'", theKey.latin1()); 1441 qWarning("QSettings::writeEntry: invalid key '%s'", grp_key.latin1());
1435#endif // QT_CHECK_STATE 1442#endif // QT_CHECK_STATE
1436 1443
1437 return FALSE; 1444 return FALSE;
@@ -1452,8 +1459,9 @@ bool QSettings::writeEntry(const QString &key, const QString &value)
1452 1459
1453 realkey = list.join("/"); 1460 realkey = list.join("/");
1454 } 1461 }
1455 } else 1462 } else {
1456 realkey = theKey; 1463 realkey = grp_key;
1464 }
1457 1465
1458 d->writeGroup(realkey, value); 1466 d->writeGroup(realkey, value);
1459 return TRUE; 1467 return TRUE;
@@ -1469,29 +1477,27 @@ bool QSettings::writeEntry(const QString &key, const QString &value)
1469*/ 1477*/
1470bool QSettings::removeEntry(const QString &key) 1478bool QSettings::removeEntry(const QString &key)
1471{ 1479{
1472 if ( !qt_verify_key( key ) ) { 1480 QString grp_key( groupKey( group(), key ) );
1481 if ( !qt_verify_key( grp_key ) ) {
1473#if defined(QT_CHECK_STATE) 1482#if defined(QT_CHECK_STATE)
1474 qWarning( "QSettings::removeEntry: Invalid key: '%s'", key.isNull() ? "(null)" : key.latin1() ); 1483 qWarning( "QSettings::removeEntry: Invalid key: '%s'", grp_key.isNull() ? "(null)" : grp_key.latin1() );
1475#endif 1484#endif
1476 return FALSE; 1485 return FALSE;
1477 } 1486 }
1478 1487
1479 QString theKey = groupKey( group(), key );
1480
1481#if !defined(QWS) && (defined(Q_WS_WIN) || defined(Q_OS_MAC)) 1488#if !defined(QWS) && (defined(Q_WS_WIN) || defined(Q_OS_MAC))
1482 if ( d->sysd ) 1489 if ( d->sysd )
1483 return d->sysRemoveEntry( theKey ); 1490 return d->sysRemoveEntry( grp_key );
1484#endif 1491#endif
1485 1492
1486 QString realkey; 1493 QString realkey;
1487 1494 if (grp_key[0] == '/') {
1488 if (theKey[0] == '/') {
1489 // parse our key 1495 // parse our key
1490 QStringList list(QStringList::split('/', theKey)); 1496 QStringList list(QStringList::split('/', grp_key));
1491 1497
1492 if (list.count() < 2) { 1498 if (list.count() < 2) {
1493#ifdef QT_CHECK_STATE 1499#ifdef QT_CHECK_STATE
1494 qWarning("QSettings::removeEntry: invalid key '%s'", theKey.latin1()); 1500 qWarning("QSettings::removeEntry: invalid key '%s'", grp_key.latin1());
1495#endif // QT_CHECK_STATE 1501#endif // QT_CHECK_STATE
1496 1502
1497 return FALSE; 1503 return FALSE;
@@ -1512,8 +1518,9 @@ bool QSettings::removeEntry(const QString &key)
1512 1518
1513 realkey = list.join("/"); 1519 realkey = list.join("/");
1514 } 1520 }
1515 } else 1521 } else {
1516 realkey = theKey; 1522 realkey = grp_key;
1523 }
1517 1524
1518 d->removeGroup(realkey); 1525 d->removeGroup(realkey);
1519 return TRUE; 1526 return TRUE;
@@ -1548,28 +1555,27 @@ bool QSettings::removeEntry(const QString &key)
1548*/ 1555*/
1549QStringList QSettings::entryList(const QString &key) const 1556QStringList QSettings::entryList(const QString &key) const
1550{ 1557{
1551 if ( !qt_verify_key( key ) ) { 1558 QString grp_key( groupKey( group(), key ) );
1559 if ( !qt_verify_key( grp_key ) ) {
1552#if defined(QT_CHECK_STATE) 1560#if defined(QT_CHECK_STATE)
1553 qWarning( "QSettings::entryList: Invalid key: %s", key.isNull() ? "(null)" : key.latin1() ); 1561 qWarning( "QSettings::entryList: Invalid key: %s", grp_key.isNull() ? "(null)" : grp_key.latin1() );
1554#endif 1562#endif
1555 return QStringList(); 1563 return QStringList();
1556 } 1564 }
1557 1565
1558 QString theKey = groupKey( group(), key );
1559
1560#if !defined(QWS) && (defined(Q_WS_WIN) || defined(Q_OS_MAC)) 1566#if !defined(QWS) && (defined(Q_WS_WIN) || defined(Q_OS_MAC))
1561 if ( d->sysd ) 1567 if ( d->sysd )
1562 return d->sysEntryList( theKey ); 1568 return d->sysEntryList( grp_key );
1563#endif 1569#endif
1564 1570
1565 QString realkey; 1571 QString realkey;
1566 if (theKey[0] == '/') { 1572 if (grp_key[0] == '/') {
1567 // parse our key 1573 // parse our key
1568 QStringList list(QStringList::split('/', theKey)); 1574 QStringList list(QStringList::split('/', grp_key));
1569 1575
1570 if (list.count() < 1) { 1576 if (list.count() < 1) {
1571#ifdef QT_CHECK_STATE 1577#ifdef QT_CHECK_STATE
1572 qWarning("QSettings::listEntries: invalid key '%s'", theKey.latin1()); 1578 qWarning("QSettings::listEntries: invalid key '%s'", grp_key.latin1());
1573#endif // QT_CHECK_STATE 1579#endif // QT_CHECK_STATE
1574 1580
1575 return QStringList(); 1581 return QStringList();
@@ -1590,7 +1596,7 @@ QStringList QSettings::entryList(const QString &key) const
1590 realkey = list.join("/"); 1596 realkey = list.join("/");
1591 } 1597 }
1592 } else 1598 } else
1593 realkey = theKey; 1599 realkey = grp_key;
1594 1600
1595 QSettingsGroup grp = d->readGroup(); 1601 QSettingsGroup grp = d->readGroup();
1596 QSettingsGroup::Iterator it = grp.begin(); 1602 QSettingsGroup::Iterator it = grp.begin();
@@ -1645,29 +1651,28 @@ QStringList QSettings::entryList(const QString &key) const
1645*/ 1651*/
1646QStringList QSettings::subkeyList(const QString &key) const 1652QStringList QSettings::subkeyList(const QString &key) const
1647{ 1653{
1648 if ( !qt_verify_key( key ) ) { 1654 QString grp_key( groupKey( group(), key ) );
1655 if ( !qt_verify_key( grp_key ) ) {
1649#if defined(QT_CHECK_STATE) 1656#if defined(QT_CHECK_STATE)
1650 qWarning( "QSettings::subkeyList: Invalid key: %s", key.isNull() ? "(null)" : key.latin1() ); 1657 qWarning( "QSettings::subkeyList: Invalid key: %s", grp_key.isNull() ? "(null)" : grp_key.latin1() );
1651#endif 1658#endif
1652 return QStringList(); 1659 return QStringList();
1653 } 1660 }
1654 1661
1655 QString theKey = groupKey( group(), key );
1656
1657#if !defined(QWS) && (defined(Q_WS_WIN) || defined(Q_OS_MAC)) 1662#if !defined(QWS) && (defined(Q_WS_WIN) || defined(Q_OS_MAC))
1658 if ( d->sysd ) 1663 if ( d->sysd )
1659 return d->sysSubkeyList( theKey ); 1664 return d->sysSubkeyList( grp_key );
1660#endif 1665#endif
1661 1666
1662 QString realkey; 1667 QString realkey;
1663 int subkeycount = 2; 1668 int subkeycount = 2;
1664 if (theKey[0] == '/') { 1669 if (grp_key[0] == '/') {
1665 // parse our key 1670 // parse our key
1666 QStringList list(QStringList::split('/', theKey)); 1671 QStringList list(QStringList::split('/', grp_key));
1667 1672
1668 if (list.count() < 1) { 1673 if (list.count() < 1) {
1669#ifdef QT_CHECK_STATE 1674#ifdef QT_CHECK_STATE
1670 qWarning("QSettings::subkeyList: invalid key '%s'", theKey.latin1()); 1675 qWarning("QSettings::subkeyList: invalid key '%s'", grp_key.latin1());
1671#endif // QT_CHECK_STATE 1676#endif // QT_CHECK_STATE
1672 1677
1673 return QStringList(); 1678 return QStringList();
@@ -1691,7 +1696,7 @@ QStringList QSettings::subkeyList(const QString &key) const
1691 } 1696 }
1692 1697
1693 } else 1698 } else
1694 realkey = theKey; 1699 realkey = grp_key;
1695 1700
1696 QStringList ret; 1701 QStringList ret;
1697 if ( subkeycount == 1 ) { 1702 if ( subkeycount == 1 ) {
@@ -1737,29 +1742,28 @@ QStringList QSettings::subkeyList(const QString &key) const
1737 1742
1738 This function returns the time of last modification for \a key. 1743 This function returns the time of last modification for \a key.
1739*/ 1744*/
1740QDateTime QSettings::lastModficationTime(const QString &key) 1745QDateTime QSettings::lastModificationTime( const QString &key )
1741{ 1746{
1742 if ( !qt_verify_key( key ) ) { 1747 QString grp_key( groupKey( group(), key ) );
1748 if ( !qt_verify_key( grp_key ) ) {
1743#if defined(QT_CHECK_STATE) 1749#if defined(QT_CHECK_STATE)
1744 qWarning( "QSettings::lastModficationTime: Invalid key: '%s'", key.isNull() ? "(null)" : key.latin1() ); 1750 qWarning( "QSettings::lastModificationTime: Invalid key '%s'", grp_key.isNull() ? "(null)" : grp_key.latin1() );
1745#endif 1751#endif
1746 return QDateTime(); 1752 return QDateTime();
1747 } 1753 }
1748 1754
1749 QString theKey = groupKey( group(), key );
1750
1751#if !defined(QWS) && (defined(Q_WS_WIN) || defined(Q_OS_MAC)) 1755#if !defined(QWS) && (defined(Q_WS_WIN) || defined(Q_OS_MAC))
1752 if ( d->sysd ) 1756 if ( d->sysd )
1753 return QDateTime(); 1757 return QDateTime();
1754#endif 1758#endif
1755 1759
1756 if (theKey[0] == '/') { 1760 if (grp_key[0] == '/') {
1757 // parse our key 1761 // parse our key
1758 QStringList list(QStringList::split('/', theKey)); 1762 QStringList list(QStringList::split('/', grp_key));
1759 1763
1760 if (list.count() < 2) { 1764 if (list.count() < 2) {
1761#ifdef QT_CHECK_STATE 1765#ifdef QT_CHECK_STATE
1762 qWarning("QSettings::lastModficationTime: invalid key '%s'", theKey.latin1()); 1766 qWarning("QSettings::lastModificationTime: Invalid key '%s'", grp_key.latin1());
1763#endif // QT_CHECK_STATE 1767#endif // QT_CHECK_STATE
1764 1768
1765 return QDateTime(); 1769 return QDateTime();
@@ -1780,6 +1784,7 @@ QDateTime QSettings::lastModficationTime(const QString &key)
1780 1784
1781/*! 1785/*!
1782 \overload 1786 \overload
1787 \obsolete
1783 1788
1784 Writes the string list entry \a value into key \a key. The \a key 1789 Writes the string list entry \a value into key \a key. The \a key
1785 is created if it doesn't exist. Any previous value is overwritten 1790 is created if it doesn't exist. Any previous value is overwritten
@@ -1796,10 +1801,11 @@ QDateTime QSettings::lastModficationTime(const QString &key)
1796 We recommend using the writeEntry() and readListEntry() overloads 1801 We recommend using the writeEntry() and readListEntry() overloads
1797 that do not take a \a separator argument. 1802 that do not take a \a separator argument.
1798 1803
1804
1799 If an error occurs the settings are left unchanged and FALSE is 1805 If an error occurs the settings are left unchanged and FALSE is
1800 returned; otherwise returns TRUE. 1806 returned; otherwise returns TRUE.
1801 1807
1802 \sa readListEntry(), readNumEntry(), readDoubleEntry(), readBoolEntry(), removeEntry() 1808 \sa readListEntry(), readNumEntry(), readDoubleEntry(), readBoolEntry(), removeEntry(), QStringList::join()
1803*/ 1809*/
1804bool QSettings::writeEntry(const QString &key, const QStringList &value, 1810bool QSettings::writeEntry(const QString &key, const QStringList &value,
1805 const QChar &separator) 1811 const QChar &separator)
@@ -1839,11 +1845,12 @@ bool QSettings::writeEntry(const QString &key, const QStringList &value)
1839 1845
1840/*! 1846/*!
1841 \overload QStringList QSettings::readListEntry(const QString &key, const QChar &separator, bool *ok ) const 1847 \overload QStringList QSettings::readListEntry(const QString &key, const QChar &separator, bool *ok ) const
1848 \obsolete
1842 1849
1843 Reads the entry specified by \a key as a string. The \a separator 1850 Reads the entry specified by \a key as a string. The \a separator
1844 is used to create a QStringList by calling QStringList::split(\a 1851 is used to create a QStringList by calling QStringList::split(\a
1845 separator, entry). If \a ok is not 0: \a *ok is set to TRUE if the 1852 separator, entry). If \a ok is not 0: \a *ok is set to TRUE
1846 key was read, otherwise \a *ok is set to FALSE. 1853 if the key was read, otherwise \a *ok is set to FALSE.
1847 1854
1848 \warning As the documentation states, QStringList::split() will 1855 \warning As the documentation states, QStringList::split() will
1849 omit empty strings from the list. Because of this, it is 1856 omit empty strings from the list. Because of this, it is
@@ -1851,7 +1858,6 @@ bool QSettings::writeEntry(const QString &key, const QStringList &value)
1851 recommend using the readListEntry() and writeEntry() overloads 1858 recommend using the readListEntry() and writeEntry() overloads
1852 that do not take a \a separator argument. 1859 that do not take a \a separator argument.
1853 1860
1854
1855 Note that if you want to iterate over the list, you should iterate 1861 Note that if you want to iterate over the list, you should iterate
1856 over a copy, e.g. 1862 over a copy, e.g.
1857 \code 1863 \code
@@ -1949,8 +1955,7 @@ void qt_setSettingsBasePath(const QString &); //qsettings_mac.cpp
1949 QSettings::Global for system-wide settings (generally 1955 QSettings::Global for system-wide settings (generally
1950 these will be read-only to many users). 1956 these will be read-only to many users).
1951 1957
1952 Not all information is relevant on all systems (e.g. scoping is 1958 Not all information is relevant on all systems.
1953 currently used only if QSettings accesses the Windows registry).
1954*/ 1959*/
1955 1960
1956void QSettings::setPath( const QString &domain, const QString &product, Scope scope ) 1961void QSettings::setPath( const QString &domain, const QString &product, Scope scope )
@@ -1980,13 +1985,19 @@ void QSettings::setPath( const QString &domain, const QString &product, Scope sc
1980 actualSearchPath = "/" + domain.mid( 0, lastDot ) + "/" + product; 1985 actualSearchPath = "/" + domain.mid( 0, lastDot ) + "/" + product;
1981 insertSearchPath( Windows, actualSearchPath ); 1986 insertSearchPath( Windows, actualSearchPath );
1982#elif !defined(QWS) && defined(Q_OS_MAC) 1987#elif !defined(QWS) && defined(Q_OS_MAC)
1988 if(lastDot != -1) {
1983 QString topLevelDomain = domain.right( domain.length() - lastDot - 1 ) + "."; 1989 QString topLevelDomain = domain.right( domain.length() - lastDot - 1 ) + ".";
1984 if ( !topLevelDomain.isEmpty() ) 1990 if ( !topLevelDomain.isEmpty() )
1985 qt_setSettingsBasePath( topLevelDomain ); 1991 qt_setSettingsBasePath( topLevelDomain );
1986 actualSearchPath = "/" + domain.left( lastDot ) + product; 1992 }
1993 actualSearchPath = "/" + domain.left( lastDot ) + "." + product;
1987 insertSearchPath( Mac, actualSearchPath ); 1994 insertSearchPath( Mac, actualSearchPath );
1988#else 1995#else
1989 actualSearchPath = "/" + domain.mid( 0, lastDot ) + "/" + product; 1996 if (scope == User)
1997 actualSearchPath = QDir::homeDirPath() + "/.";
1998 else
1999 actualSearchPath = QString(qInstallPathSysconf()) + "/";
2000 actualSearchPath += domain.mid( 0, lastDot ) + "/" + product;
1990 insertSearchPath( Unix, actualSearchPath ); 2001 insertSearchPath( Unix, actualSearchPath );
1991#endif 2002#endif
1992} 2003}
diff --git a/qmake/tools/qunicodetables.cpp b/qmake/tools/qunicodetables.cpp
new file mode 100644
index 0000000..c3cad4c
--- a/dev/null
+++ b/qmake/tools/qunicodetables.cpp
@@ -0,0 +1,13237 @@
1/****************************************************************************
2**
3**
4** ???
5**
6** Copyright (C) 2002-2003 Trolltech AS. All rights reserved.
7**
8** This file is part of the kernel module of the Qt GUI Toolkit.
9**
10** This file may be distributed under the terms of the Q Public License
11** as defined by Trolltech AS of Norway and appearing in the file
12** LICENSE.QPL included in the packaging of this file.
13**
14** This file may be distributed and/or modified under the terms of the
15** GNU General Public License version 2 as published by the Free Software
16** Foundation and appearing in the file LICENSE.GPL included in the
17** packaging of this file.
18**
19** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
20** licenses may use this file in accordance with the Qt Commercial License
21** Agreement provided with the Software.
22**
23** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
24** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
25**
26** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
27** information about Qt Commercial License Agreements.
28** See http://www.trolltech.com/qpl/ for QPL licensing information.
29** See http://www.trolltech.com/gpl/ for GPL licensing information.
30**
31** Contact info@trolltech.com if any conditions of this licensing are
32** not clear to you.
33**
34**********************************************************************/
35
36#include "qunicodetables_p.h"
37
38/* -------------------------------------------------------------------------
39 * unicode information
40 * these tables are generated from the unicode reference file
41 * ftp://ftp.unicode.org/Public/3.2-Update/UnicodeData.txt
42 *
43 * Lars
44 * -------------------------------------------------------------------------
45 */
46
47/* Perl script to generate (run perl -x tools/qstringdata.cpp)
48
49#!perl
50
51sub numberize
52{
53 my(%r, $n, $id);
54 for $id ( @_ ) {
55 $i = $id;
56 $i="" if $i eq "EMPTY";
57 $r{$i}=$n++;
58 }
59 return %r;
60}
61
62
63sub readUnicodeDataLine {
64 $code = shift @_;
65 for $n (qw{
66 name category combining_class bidi_category
67 character_decomposition decimal_digit_value digit_value
68 numeric_value mirrored oldname comment
69 uppercase lowercase titlecase})
70 {
71 $id = shift @_;
72 $codes = "${n}_code";
73 if ( defined %$codes && defined $$codes{$id} ) {
74 $id = $$codes{$id};
75 }
76 ${$n}{$code}=$id;
77 }
78 $decomp = $character_decomposition{$code};
79 if ( length $decomp == 0 ) {
80 $decomp = "<single>";
81 }
82 if (substr($decomp, 0, 1) ne '<') {
83 $decomp = "<canonical> " . $decomp;
84 }
85 @_ = split(" ", $decomp);
86 $tag = shift @_;
87 $tag = $character_decomposition_tag{$tag};
88 $decomp = join( ", 0x", @_ );
89 $decomp = "0x".$decomp;
90 $decomposition{$code} = $decomp;
91 $decomposition_tag{$code} = $tag;
92 $decomposition_pos{$code} = $position;
93 $len = scalar(@_);
94 $decomposition_len{$code} = $len;
95
96# we use canonical decompositions longer than 1 char
97# we exlude Arabic ligatures from the table
98 if($len > 1 and $tag == 1) {
99# ligature to add...
100 $start = shift @_;
101 $ligature{$start} = $ligature{$start}." ".$code;
102 }
103
104# adjust position
105 if($len != 0) {
106 $position += $len + 3;
107 }
108}
109
110
111# Code to integer mappings...
112#
113%category_code = numberize(qw{
114 EMPTY
115 Mn Mc Me
116 Nd Nl No
117 Zs Zl Zp
118 Cc Cf Cs Co Cn
119
120 Lu Ll Lt Lm Lo
121 Pc Pd Ps Pe Pi Pf Po
122 Sm Sc Sk So
123});
124%bidi_category_code = numberize(qw{
125 L R EN ES ET AN CS B S WS ON LRE LRO AL RLE RLO PDF NSM BN});
126%character_decomposition_tag = numberize(qw{
127 <single> <canonical> <font> <noBreak> <initial> <medial>
128 <final> <isolated> <circle> <super> <sub> <vertical>
129 <wide> <narrow> <small> <square> <compat> <fraction>
130});
131%mirrored_code = numberize(qw{N Y});
132
133%joining_code = numberize(qw{U D R C});
134
135# we map AI and XX to AL for now, as we can't handle them any better
136%line_break_code = numberize(qw{OP CL QU GL NS EX SY
137 IS PR PO NU AL ID IN HY
138 BA BB B2
139 ZW CM
140 SA
141 BK CR LF SG CB SP
142});
143
144# Read data into hashes...
145#
146open IN, "UnicodeData.txt";
147$position = 1;
148while (<IN>) {
149 @fields = split /;/;
150 if ( length($fields[0]) < 5 ) {
151 if ( $fields[1] =~ /, First>/ ) {
152 $codeRangeBegin = $fields[0];
153 } elsif ( $fields[1] =~ /, Last>/ ) {
154 for ( $i=hex($codeRangeBegin); $i<=hex($fields[0]); $i+=1 ) {
155 @fields2 = @fields;
156 $fields2[0] = sprintf "%lX", $i;
157 readUnicodeDataLine @fields2;
158 }
159 } else {
160 readUnicodeDataLine @fields;
161 }
162 }
163}
164
165open IN2, "ArabicShaping.txt";
166$position = 1;
167while (<IN2>) {
168 @fields = split /;/;
169 $code = shift @fields;
170 $dummy = shift @fields;
171 $join = shift @fields;
172 $join =~ s/ //g;
173 $join = $joining_code{$join};
174 $joining{$code}=$join;
175}
176
177open IN3, "LineBreak.txt";
178$position = 1;
179while (<IN3>) {
180 @fields = split /;/;
181 $code = shift @fields;
182 $break = shift @fields;
183 if (length($break) > 0) {
184 chomp $break;
185 $break =~ s/ .*$//;
186
187 $from = $code;
188 $to = $code;
189 if ( length($code) > 5 ) {
190 $from =~ s,\.\..*,,;
191 $to =~ s/......//;
192# print "$from..$to = $break\n";
193 }
194 if($break eq "AI") {
195 $break = "AL";
196 }
197 if($break eq "XX") {
198 $break = "AL";
199 }
200 for ( $i=hex($from); $i<=hex($to); $i+=1 ) {
201 $breaks{sprintf("%04X",$i)}=$line_break_code{$break};
202 }
203 }
204}
205
206# Build pages...
207#
208$rowtable_txt = "";
209$row_txt = "";
210$pos = 1;
211for $row ( 0..255 ) {
212 $nonzero=0;
213 $txt = "";
214 for $cell ( 0..255 ) {
215 $code = sprintf("%02X%02X",$row,$cell);
216 $info = $category{$code};
217 $info = 0 if !defined $info;
218 $txt .= "\n " if $cell%8 == 0;
219 $txt .= "$info, ";
220 }
221 $therow = $row{$txt};
222 if ( !defined $therow ) {
223 $therow = sprintf("%d",$pos);
224 $row_txt = $row_txt."$txt\n";
225 $row{$txt}=$therow;
226 $pos += 1;
227 $size += 256;
228 }
229 $rowtable_txt .= "\n " if $row%8 == 0;
230 $rowtable_txt .= "$therow, ";
231}
232
233print "// START OF GENERATED DATA\n\n";
234print "#ifndef QT_NO_UNICODETABLES\n\n";
235
236# Print pages...
237#
238
239print "const Q_UINT8 QUnicodeTables::unicode_info[] = {";
240print $rowtable_txt;
241$size += 256;
242print "\n\n";
243print $row_txt;
244print "};\n\n";
245print "// $size bytes\n\n";
246
247# Build decomposition tables
248#
249$rowtable_txt = "";
250$row_txt = "";
251$table_txt =
252 "const Q_UINT16 QUnicodeTables::decomposition_map[] = {\n 0,\n";
253$pos = 1;
254for $row ( 0..255 ) {
255 $nonzero=0;
256 $txt = "";
257 for $cell ( 0..255 ) {
258 $code = sprintf("%02X%02X",$row,$cell);
259 $txt .= "\n " if $cell%8 == 0;
260 if( $decomposition_tag{$code} != 0 ) {
261 $txt .= " $decomposition_pos{$code},";
262 $table_txt .= " $decomposition_tag{$code},";
263 $table_txt .= " 0x$code,";
264 $table_txt .= " $decomposition{$code}, 0,\n";
265 $size += 2 * $decomposition_len{$code} + 6;
266 } else {
267 $txt .= " 0,";
268 }
269 }
270 $therow = $row{$txt};
271 if ( !defined $therow ) {
272 $therow = sprintf("%d",$pos);
273 $row_txt = $row_txt."$txt\n";
274 $row{$txt}=$therow;
275 $pos += 1;
276 $size += 512;
277 }
278 $rowtable_txt .= "\n " if $row%8 == 0;
279 $rowtable_txt .= "$therow, ";
280}
281
282# Print decomposition tables
283#
284print "$table_txt\n};\n\n";
285
286print "const Q_UINT16 QUnicodeTables::decomposition_info[] = {";
287print "$rowtable_txt\n";
288$size += 512;
289print $row_txt;
290print "};\n\n";
291print "// $size bytes\n\n";
292
293
294# build ligature tables
295#
296$size = 0;
297$position = 1;
298$pos = 1;
299$rowtable_txt = "";
300$row_txt = "";
301$table_txt =
302 "const Q_UINT16 QUnicodeTables::ligature_map[] = {\n 0,\n";
303for $lig_row ( 0..255 ) {
304 $nonzero=0;
305 $txt = "";
306 for $cell ( 0..255 ) {
307 $code = sprintf("%02X%02X",$lig_row,$cell);
308 $txt .= "\n " if $cell%8 == 0;
309 if( defined $ligature{$code} ) {
310 $txt .= " $position,";
311 @ligature = split(" ", $ligature{$code});
312# we need to sort ligatures according to their length.
313# long ones have to come first!
314 @ligature_sort = sort { $decomposition_len{$b} <=> $decomposition_len{$a} } @ligature;
315# now replace each code by its position in
316# the decomposition map.
317 undef(@lig_pos);
318 for $n (@ligature_sort) {
319 push(@lig_pos, $decomposition_pos{$n});
320 }
321# debug info
322 if( 0 ) {
323 print "ligatures: $ligature{$code}\n";
324 $sort = join(" ", @ligature_sort);
325 print "sorted : $sort\n";
326 }
327 $lig = join(", ", @lig_pos);
328 $table_txt .= " $lig, 0,\n";
329 $size += 2 * scalar(@ligature) + 2;
330 $position += scalar(@ligature) + 1;
331 } else {
332 $txt .= " 0,";
333 }
334 }
335 $therow = $lig_row{$txt};
336 if ( !defined $therow ) {
337 $therow = sprintf("%d",$pos);
338 $row_txt = $row_txt."$txt\n";
339 $lig_row{$txt}=$therow;
340 $pos += 1;
341 $size += 512;
342 }
343 $rowtable_txt .= "\n " if $lig_row%8 == 0;
344 $rowtable_txt .= "$therow, ";
345}
346
347# Print ligature tables
348#
349print "$table_txt\n};\n\n";
350print "const Q_UINT16 QUnicodeTables::ligature_info[] = {";
351print "$rowtable_txt\n\n";
352$size+=512;
353print $row_txt;
354print "};\n\n";
355print "// $size bytes\n\n";
356
357
358
359# Build direction/joining/mirrored pages...
360#
361$rowtable_txt = "";
362$row_txt = "";
363$pos = 1;
364for $dir_row ( 0..255 ) {
365 $txt = "";
366 for $cell ( 0..255 ) {
367 $code = sprintf("%02X%02X",$dir_row,$cell);
368 $dir = $bidi_category{$code};
369 $dir = 0 if !defined $dir;
370 $join = $joining{$code};
371 $join = 0 if !defined $join;
372 $mirr = $mirrored{$code};
373 $mirr = 0 if !defined $mirr;
374 $info = $dir + 32*$join + 128*$mirr;
375 $txt .= "\n " if $cell%8 == 0;
376 $txt .= "$info, ";
377 }
378 $therow = $dir_row{$txt};
379 if ( !defined $therow ) {
380 $therow = sprintf("%d",$pos);
381 $row_txt = $row_txt."$txt\n";
382 $dir_row{$txt}=$therow;
383 $pos += 1;
384 $size+=256;
385 }
386 $rowtable_txt .= "\n " if $dir_row%8 == 0;
387 $rowtable_txt .= "$therow, ";
388}
389
390# Print pages...
391#
392print "const Q_UINT8 QUnicodeTables::direction_info[] = {";
393print "$rowtable_txt\n\n";
394$size+=256;
395print $row_txt;
396print "};\n\n";
397print "// $size bytes\n\n";
398
399# Build table of combining classes
400#
401$rowtable_txt = "";
402$row_txt = "";
403$pos = 1;
404for $combining_row ( 0..255 ) {
405 $txt = "";
406 for $cell ( 0..255 ) {
407 $code = sprintf("%02X%02X",$combining_row,$cell);
408 $info = $combining_class{$code};
409 $info = 0 if !defined $info;
410 $txt .= "\n " if $cell%8 == 0;
411 $txt .= "$info, ";
412 }
413 $therow = $combining_row{$txt};
414 if ( !defined $therow ) {
415 $therow = sprintf("%d",$pos);
416 $row_txt = $row_txt."$txt\n";
417 $combining_row{$txt}=$therow;
418 $pos += 1;
419 $size += 256;
420 }
421 $rowtable_txt .= "\n " if $combining_row%8 == 0;
422 $rowtable_txt .= "$therow, ";
423}
424
425# Print pages...
426#
427print "const Q_UINT8 QUnicodeTables::combining_info[] = {";
428print "$rowtable_txt\n\n";
429$size+=256;
430print $row_txt;
431print "};\n\n";
432print "// $size bytes\n\n";
433
434# Build case info
435#
436$rowtable_txt = "";
437$row_txt = "";
438$pos = 1;
439for $row ( 0..255 ) {
440 $nonzero=0;
441 $txt = "";
442 for $cell ( 0..255 ) {
443 $code = sprintf("%02X%02X",$row,$cell);
444 $info = $uppercase{$code};
445 if ( length( $info ) eq 0 ) {
446 $info = $lowercase{$code};
447 }
448 $info =~ s/^0+//;
449 if ( length( $info ) eq 0 ) {
450 $info = "0";
451 } else {
452 $info = "0x".lc($info);
453 }
454 if ( length( $info ) ne 1 ) {
455 $nonzero = 1;
456 }
457 $txt .= "\n " if $cell%8 == 0;
458 $txt .= "$info, ";
459 }
460 $therow = $case_row{$txt};
461 if ( !defined $therow && $nonzero ne 0 ) {
462 $therow = sprintf("%d",$pos);
463 $row_txt = $row_txt."$txt\n";
464 $case_row{$txt}=$therow;
465 $pos += 1;
466 $size += 512;
467 }
468 $rowtable_txt .= "\n " if $row%8 == 0;
469 if ( $nonzero ne 0 ) {
470 $rowtable_txt .= "$therow, ";
471 } else {
472 $rowtable_txt .= "0, ";
473 }
474}
475
476# Print pages...
477#
478print "const Q_UINT16 QUnicodeTables::case_info[] = {";
479print "$rowtable_txt\n\n";
480$size+=512;
481print $row_txt;
482print "};\n";
483print "// $size bytes\n\n";
484
485# Build decimal info
486#
487$rowtable_txt = "";
488$row_txt = "";
489$pos = 1;
490for $row ( 0..255 ) {
491 $nonzero=0;
492 $txt = "";
493 for $cell ( 0..255 ) {
494 $code = sprintf("%02X%02X",$row,$cell);
495 $info = $digit_value{$code};
496 if ( length( $info ) eq 0 ) {
497 $info = -1;
498 } else {
499 $nonzero = 1;
500 }
501 $txt .= "\n " if $cell%8 == 0;
502 $txt .= "$info, ";
503 }
504 $therow = $decimal_row{$txt};
505 if ( !defined $therow && $nonzero ne 0 ) {
506 $therow = sprintf("%d",$pos);
507 $row_txt = $row_txt."$txt\n";
508 $decimal_row{$txt}=$therow;
509 $pos += 1;
510 $size += 256;
511 }
512 $rowtable_txt .= "\n " if $row%8 == 0;
513 if ( $nonzero ne 0 ) {
514 $rowtable_txt .= "$therow, ";
515 } else {
516 $rowtable_txt .= "0, ";
517 }
518}
519
520# Print pages...
521#
522print "const Q_INT8 QUnicodeTables::decimal_info[] = {";
523print "$rowtable_txt\n\n";
524$size+=512;
525print $row_txt;
526print "};\n";
527print "// $size bytes\n\n";
528
529
530# Build line break info
531#
532$rowtable_txt = "";
533$row_txt = "";
534$pos = 1;
535for $row ( 0..255 ) {
536 $txt = "";
537 for $cell ( 0..255 ) {
538 $code = sprintf("%02X%02X",$row,$cell);
539 $info = $breaks{$code};
540 if ( length( $info ) eq 0 ) {
541 $info = $line_break_code{"AL"};
542 }
543 $txt .= "\n " if $cell%8 == 0;
544 $txt .= "$info, ";
545 }
546 $therow = $lb_row{$txt};
547 if ( !defined $therow ) {
548 $therow = sprintf("%d",$pos);
549 $row_txt = $row_txt."$txt\n";
550 $lb_row{$txt}=$therow;
551 $pos += 1;
552 $size += 256;
553 }
554 $rowtable_txt .= "\n " if $row%8 == 0;
555 $rowtable_txt .= "$therow, ";
556}
557
558# Print pages...
559#
560print "const Q_UINT8 QUnicodeTables::line_break_info[] = {";
561print "$rowtable_txt\n\n";
562$size+=512;
563print $row_txt;
564print "};\n";
565print "// $size bytes\n\n";
566
567
568
569print "#endif\n\n";
570print "// END OF GENERATED DATA\n\n";
571
572
573__END__
574
575*/
576
577// START OF GENERATED DATA
578
579#ifndef QT_NO_UNICODETABLES
580
581const Q_UINT8 QUnicodeTables::unicode_info[] = {
582 1, 2, 3, 4, 5, 6, 7, 8,
583 9, 10, 11, 12, 13, 14, 15, 16,
584 17, 18, 19, 20, 21, 22, 23, 24,
585 25, 9, 9, 9, 9, 9, 26, 27,
586 28, 29, 30, 31, 32, 33, 34, 35,
587 36, 37, 30, 9, 9, 9, 38, 39,
588 40, 41, 42, 43, 22, 22, 22, 22,
589 22, 22, 22, 22, 22, 22, 22, 22,
590 22, 22, 22, 22, 22, 22, 22, 22,
591 22, 22, 22, 22, 22, 44, 22, 22,
592 22, 22, 22, 22, 22, 22, 22, 22,
593 22, 22, 22, 22, 22, 22, 22, 22,
594 22, 22, 22, 22, 22, 22, 22, 22,
595 22, 22, 22, 22, 22, 22, 22, 22,
596 22, 22, 22, 22, 22, 22, 22, 22,
597 22, 22, 22, 22, 22, 22, 22, 22,
598 22, 22, 22, 22, 22, 22, 22, 22,
599 22, 22, 22, 22, 22, 22, 22, 22,
600 22, 22, 22, 22, 22, 22, 22, 22,
601 22, 22, 22, 22, 22, 22, 22, 45,
602 22, 22, 22, 22, 46, 9, 9, 9,
603 9, 9, 9, 9, 22, 22, 22, 22,
604 22, 22, 22, 22, 22, 22, 22, 22,
605 22, 22, 22, 22, 22, 22, 22, 22,
606 22, 22, 22, 22, 22, 22, 22, 22,
607 22, 22, 22, 22, 22, 22, 22, 22,
608 22, 22, 22, 22, 22, 22, 22, 47,
609 48, 48, 48, 48, 48, 48, 48, 48,
610 49, 49, 49, 49, 49, 49, 49, 49,
611 49, 49, 49, 49, 49, 49, 49, 49,
612 49, 49, 49, 49, 49, 49, 49, 49,
613 49, 22, 50, 51, 22, 52, 53, 54,
614
615
616 10, 10, 10, 10, 10, 10, 10, 10,
617 10, 10, 10, 10, 10, 10, 10, 10,
618 10, 10, 10, 10, 10, 10, 10, 10,
619 10, 10, 10, 10, 10, 10, 10, 10,
620 7, 26, 26, 26, 28, 26, 26, 26,
621 22, 23, 26, 27, 26, 21, 26, 26,
622 4, 4, 4, 4, 4, 4, 4, 4,
623 4, 4, 26, 26, 27, 27, 27, 26,
624 26, 15, 15, 15, 15, 15, 15, 15,
625 15, 15, 15, 15, 15, 15, 15, 15,
626 15, 15, 15, 15, 15, 15, 15, 15,
627 15, 15, 15, 22, 26, 23, 29, 20,
628 29, 16, 16, 16, 16, 16, 16, 16,
629 16, 16, 16, 16, 16, 16, 16, 16,
630 16, 16, 16, 16, 16, 16, 16, 16,
631 16, 16, 16, 22, 27, 23, 27, 10,
632 10, 10, 10, 10, 10, 10, 10, 10,
633 10, 10, 10, 10, 10, 10, 10, 10,
634 10, 10, 10, 10, 10, 10, 10, 10,
635 10, 10, 10, 10, 10, 10, 10, 10,
636 7, 26, 28, 28, 28, 28, 30, 30,
637 29, 30, 16, 24, 27, 21, 30, 29,
638 30, 27, 6, 6, 29, 16, 30, 26,
639 29, 6, 16, 25, 6, 6, 6, 26,
640 15, 15, 15, 15, 15, 15, 15, 15,
641 15, 15, 15, 15, 15, 15, 15, 15,
642 15, 15, 15, 15, 15, 15, 15, 27,
643 15, 15, 15, 15, 15, 15, 15, 16,
644 16, 16, 16, 16, 16, 16, 16, 16,
645 16, 16, 16, 16, 16, 16, 16, 16,
646 16, 16, 16, 16, 16, 16, 16, 27,
647 16, 16, 16, 16, 16, 16, 16, 16,
648
649 15, 16, 15, 16, 15, 16, 15, 16,
650 15, 16, 15, 16, 15, 16, 15, 16,
651 15, 16, 15, 16, 15, 16, 15, 16,
652 15, 16, 15, 16, 15, 16, 15, 16,
653 15, 16, 15, 16, 15, 16, 15, 16,
654 15, 16, 15, 16, 15, 16, 15, 16,
655 15, 16, 15, 16, 15, 16, 15, 16,
656 16, 15, 16, 15, 16, 15, 16, 15,
657 16, 15, 16, 15, 16, 15, 16, 15,
658 16, 16, 15, 16, 15, 16, 15, 16,
659 15, 16, 15, 16, 15, 16, 15, 16,
660 15, 16, 15, 16, 15, 16, 15, 16,
661 15, 16, 15, 16, 15, 16, 15, 16,
662 15, 16, 15, 16, 15, 16, 15, 16,
663 15, 16, 15, 16, 15, 16, 15, 16,
664 15, 15, 16, 15, 16, 15, 16, 16,
665 16, 15, 15, 16, 15, 16, 15, 15,
666 16, 15, 15, 15, 16, 16, 15, 15,
667 15, 15, 16, 15, 15, 16, 15, 15,
668 15, 16, 16, 16, 15, 15, 16, 15,
669 15, 16, 15, 16, 15, 16, 15, 15,
670 16, 15, 16, 16, 15, 16, 15, 15,
671 16, 15, 15, 15, 16, 15, 16, 15,
672 15, 16, 16, 19, 15, 16, 16, 16,
673 19, 19, 19, 19, 15, 17, 16, 15,
674 17, 16, 15, 17, 16, 15, 16, 15,
675 16, 15, 16, 15, 16, 15, 16, 15,
676 16, 15, 16, 15, 16, 16, 15, 16,
677 15, 16, 15, 16, 15, 16, 15, 16,
678 15, 16, 15, 16, 15, 16, 15, 16,
679 16, 15, 17, 16, 15, 16, 15, 15,
680 15, 16, 15, 16, 15, 16, 15, 16,
681
682 15, 16, 15, 16, 15, 16, 15, 16,
683 15, 16, 15, 16, 15, 16, 15, 16,
684 15, 16, 15, 16, 15, 16, 15, 16,
685 15, 16, 15, 16, 15, 16, 15, 16,
686 15, 0, 15, 16, 15, 16, 15, 16,
687 15, 16, 15, 16, 15, 16, 15, 16,
688 15, 16, 15, 16, 0, 0, 0, 0,
689 0, 0, 0, 0, 0, 0, 0, 0,
690 0, 0, 0, 0, 0, 0, 0, 0,
691 0, 0, 0, 0, 0, 0, 0, 0,
692 16, 16, 16, 16, 16, 16, 16, 16,
693 16, 16, 16, 16, 16, 16, 16, 16,
694 16, 16, 16, 16, 16, 16, 16, 16,
695 16, 16, 16, 16, 16, 16, 16, 16,
696 16, 16, 16, 16, 16, 16, 16, 16,
697 16, 16, 16, 16, 16, 16, 16, 16,
698 16, 16, 16, 16, 16, 16, 16, 16,
699 16, 16, 16, 16, 16, 16, 16, 16,
700 16, 16, 16, 16, 16, 16, 16, 16,
701 16, 16, 16, 16, 16, 16, 16, 16,
702 16, 16, 16, 16, 16, 16, 16, 16,
703 16, 16, 16, 16, 16, 16, 0, 0,
704 18, 18, 18, 18, 18, 18, 18, 18,
705 18, 29, 29, 18, 18, 18, 18, 18,
706 18, 18, 29, 29, 29, 29, 29, 29,
707 29, 29, 29, 29, 29, 29, 29, 29,
708 18, 18, 29, 29, 29, 29, 29, 29,
709 29, 29, 29, 29, 29, 29, 29, 29,
710 18, 18, 18, 18, 18, 29, 29, 29,
711 29, 29, 29, 29, 29, 29, 18, 0,
712 0, 0, 0, 0, 0, 0, 0, 0,
713 0, 0, 0, 0, 0, 0, 0, 0,
714
715 1, 1, 1, 1, 1, 1, 1, 1,
716 1, 1, 1, 1, 1, 1, 1, 1,
717 1, 1, 1, 1, 1, 1, 1, 1,
718 1, 1, 1, 1, 1, 1, 1, 1,
719 1, 1, 1, 1, 1, 1, 1, 1,
720 1, 1, 1, 1, 1, 1, 1, 1,
721 1, 1, 1, 1, 1, 1, 1, 1,
722 1, 1, 1, 1, 1, 1, 1, 1,
723 1, 1, 1, 1, 1, 1, 1, 1,
724 1, 1, 1, 1, 1, 1, 1, 1,
725 0, 0, 0, 0, 0, 0, 0, 0,
726 0, 0, 0, 0, 0, 0, 0, 0,
727 1, 1, 1, 1, 1, 1, 1, 1,
728 1, 1, 1, 1, 1, 1, 1, 1,
729 0, 0, 0, 0, 29, 29, 0, 0,
730 0, 0, 18, 0, 0, 0, 26, 0,
731 0, 0, 0, 0, 29, 29, 15, 26,
732 15, 15, 15, 0, 15, 0, 15, 15,
733 16, 15, 15, 15, 15, 15, 15, 15,
734 15, 15, 15, 15, 15, 15, 15, 15,
735 15, 15, 0, 15, 15, 15, 15, 15,
736 15, 15, 15, 15, 16, 16, 16, 16,
737 16, 16, 16, 16, 16, 16, 16, 16,
738 16, 16, 16, 16, 16, 16, 16, 16,
739 16, 16, 16, 16, 16, 16, 16, 16,
740 16, 16, 16, 16, 16, 16, 16, 0,
741 16, 16, 15, 15, 15, 16, 16, 16,
742 15, 16, 15, 16, 15, 16, 15, 16,
743 15, 16, 15, 16, 15, 16, 15, 16,
744 15, 16, 15, 16, 15, 16, 15, 16,
745 16, 16, 16, 16, 15, 16, 27, 0,
746 0, 0, 0, 0, 0, 0, 0, 0,
747
748 15, 15, 15, 15, 15, 15, 15, 15,
749 15, 15, 15, 15, 15, 15, 15, 15,
750 15, 15, 15, 15, 15, 15, 15, 15,
751 15, 15, 15, 15, 15, 15, 15, 15,
752 15, 15, 15, 15, 15, 15, 15, 15,
753 15, 15, 15, 15, 15, 15, 15, 15,
754 16, 16, 16, 16, 16, 16, 16, 16,
755 16, 16, 16, 16, 16, 16, 16, 16,
756 16, 16, 16, 16, 16, 16, 16, 16,
757 16, 16, 16, 16, 16, 16, 16, 16,
758 16, 16, 16, 16, 16, 16, 16, 16,
759 16, 16, 16, 16, 16, 16, 16, 16,
760 15, 16, 15, 16, 15, 16, 15, 16,
761 15, 16, 15, 16, 15, 16, 15, 16,
762 15, 16, 15, 16, 15, 16, 15, 16,
763 15, 16, 15, 16, 15, 16, 15, 16,
764 15, 16, 30, 1, 1, 1, 1, 0,
765 3, 3, 15, 16, 15, 16, 15, 16,
766 15, 16, 15, 16, 15, 16, 15, 16,
767 15, 16, 15, 16, 15, 16, 15, 16,
768 15, 16, 15, 16, 15, 16, 15, 16,
769 15, 16, 15, 16, 15, 16, 15, 16,
770 15, 16, 15, 16, 15, 16, 15, 16,
771 15, 16, 15, 16, 15, 16, 15, 16,
772 15, 15, 16, 15, 16, 15, 16, 15,
773 16, 15, 16, 15, 16, 15, 16, 0,
774 15, 16, 15, 16, 15, 16, 15, 16,
775 15, 16, 15, 16, 15, 16, 15, 16,
776 15, 16, 15, 16, 15, 16, 15, 16,
777 15, 16, 15, 16, 15, 16, 15, 16,
778 15, 16, 15, 16, 15, 16, 0, 0,
779 15, 16, 0, 0, 0, 0, 0, 0,
780
781 15, 16, 15, 16, 15, 16, 15, 16,
782 15, 16, 15, 16, 15, 16, 15, 16,
783 0, 0, 0, 0, 0, 0, 0, 0,
784 0, 0, 0, 0, 0, 0, 0, 0,
785 0, 0, 0, 0, 0, 0, 0, 0,
786 0, 0, 0, 0, 0, 0, 0, 0,
787 0, 15, 15, 15, 15, 15, 15, 15,
788 15, 15, 15, 15, 15, 15, 15, 15,
789 15, 15, 15, 15, 15, 15, 15, 15,
790 15, 15, 15, 15, 15, 15, 15, 15,
791 15, 15, 15, 15, 15, 15, 15, 0,
792 0, 18, 26, 26, 26, 26, 26, 26,
793 0, 16, 16, 16, 16, 16, 16, 16,
794 16, 16, 16, 16, 16, 16, 16, 16,
795 16, 16, 16, 16, 16, 16, 16, 16,
796 16, 16, 16, 16, 16, 16, 16, 16,
797 16, 16, 16, 16, 16, 16, 16, 16,
798 0, 26, 21, 0, 0, 0, 0, 0,
799 0, 1, 1, 1, 1, 1, 1, 1,
800 1, 1, 1, 1, 1, 1, 1, 1,
801 1, 1, 0, 1, 1, 1, 1, 1,
802 1, 1, 1, 1, 1, 1, 1, 1,
803 1, 1, 1, 1, 1, 1, 1, 1,
804 1, 1, 0, 1, 1, 1, 26, 1,
805 26, 1, 1, 26, 1, 0, 0, 0,
806 0, 0, 0, 0, 0, 0, 0, 0,
807 19, 19, 19, 19, 19, 19, 19, 19,
808 19, 19, 19, 19, 19, 19, 19, 19,
809 19, 19, 19, 19, 19, 19, 19, 19,
810 19, 19, 19, 0, 0, 0, 0, 0,
811 19, 19, 19, 26, 26, 0, 0, 0,
812 0, 0, 0, 0, 0, 0, 0, 0,
813
814 0, 0, 0, 0, 0, 0, 0, 0,
815 0, 0, 0, 0, 26, 0, 0, 0,
816 0, 0, 0, 0, 0, 0, 0, 0,
817 0, 0, 0, 26, 0, 0, 0, 26,
818 0, 19, 19, 19, 19, 19, 19, 19,
819 19, 19, 19, 19, 19, 19, 19, 19,
820 19, 19, 19, 19, 19, 19, 19, 19,
821 19, 19, 19, 0, 0, 0, 0, 0,
822 18, 19, 19, 19, 19, 19, 19, 19,
823 19, 19, 19, 1, 1, 1, 1, 1,
824 1, 1, 1, 1, 1, 1, 0, 0,
825 0, 0, 0, 0, 0, 0, 0, 0,
826 4, 4, 4, 4, 4, 4, 4, 4,
827 4, 4, 26, 26, 26, 26, 19, 19,
828 1, 19, 19, 19, 19, 19, 19, 19,
829 19, 19, 19, 19, 19, 19, 19, 19,
830 19, 19, 19, 19, 19, 19, 19, 19,
831 19, 19, 19, 19, 19, 19, 19, 19,
832 19, 19, 19, 19, 19, 19, 19, 19,
833 19, 19, 19, 19, 19, 19, 19, 19,
834 19, 19, 19, 19, 19, 19, 19, 19,
835 19, 19, 19, 19, 19, 19, 19, 19,
836 19, 19, 19, 19, 19, 19, 19, 19,
837 19, 19, 19, 19, 19, 19, 19, 19,
838 19, 19, 19, 19, 19, 19, 19, 19,
839 19, 19, 19, 19, 19, 19, 19, 19,
840 19, 19, 19, 19, 26, 19, 1, 1,
841 1, 1, 1, 1, 1, 11, 3, 1,
842 1, 1, 1, 1, 1, 18, 18, 1,
843 1, 30, 1, 1, 1, 1, 0, 0,
844 4, 4, 4, 4, 4, 4, 4, 4,
845 4, 4, 19, 19, 19, 30, 30, 0,
846
847 26, 26, 26, 26, 26, 26, 26, 26,
848 26, 26, 26, 26, 26, 26, 0, 11,
849 19, 1, 19, 19, 19, 19, 19, 19,
850 19, 19, 19, 19, 19, 19, 19, 19,
851 19, 19, 19, 19, 19, 19, 19, 19,
852 19, 19, 19, 19, 19, 0, 0, 0,
853 1, 1, 1, 1, 1, 1, 1, 1,
854 1, 1, 1, 1, 1, 1, 1, 1,
855 1, 1, 1, 1, 1, 1, 1, 1,
856 1, 1, 1, 0, 0, 0, 0, 0,
857 0, 0, 0, 0, 0, 0, 0, 0,
858 0, 0, 0, 0, 0, 0, 0, 0,
859 0, 0, 0, 0, 0, 0, 0, 0,
860 0, 0, 0, 0, 0, 0, 0, 0,
861 0, 0, 0, 0, 0, 0, 0, 0,
862 0, 0, 0, 0, 0, 0, 0, 0,
863 19, 19, 19, 19, 19, 19, 19, 19,
864 19, 19, 19, 19, 19, 19, 19, 19,
865 19, 19, 19, 19, 19, 19, 19, 19,
866 19, 19, 19, 19, 19, 19, 19, 19,
867 19, 19, 19, 19, 19, 19, 1, 1,
868 1, 1, 1, 1, 1, 1, 1, 1,
869 1, 19, 0, 0, 0, 0, 0, 0,
870 0, 0, 0, 0, 0, 0, 0, 0,
871 0, 0, 0, 0, 0, 0, 0, 0,
872 0, 0, 0, 0, 0, 0, 0, 0,
873 0, 0, 0, 0, 0, 0, 0, 0,
874 0, 0, 0, 0, 0, 0, 0, 0,
875 0, 0, 0, 0, 0, 0, 0, 0,
876 0, 0, 0, 0, 0, 0, 0, 0,
877 0, 0, 0, 0, 0, 0, 0, 0,
878 0, 0, 0, 0, 0, 0, 0, 0,
879
880 0, 0, 0, 0, 0, 0, 0, 0,
881 0, 0, 0, 0, 0, 0, 0, 0,
882 0, 0, 0, 0, 0, 0, 0, 0,
883 0, 0, 0, 0, 0, 0, 0, 0,
884 0, 0, 0, 0, 0, 0, 0, 0,
885 0, 0, 0, 0, 0, 0, 0, 0,
886 0, 0, 0, 0, 0, 0, 0, 0,
887 0, 0, 0, 0, 0, 0, 0, 0,
888 0, 0, 0, 0, 0, 0, 0, 0,
889 0, 0, 0, 0, 0, 0, 0, 0,
890 0, 0, 0, 0, 0, 0, 0, 0,
891 0, 0, 0, 0, 0, 0, 0, 0,
892 0, 0, 0, 0, 0, 0, 0, 0,
893 0, 0, 0, 0, 0, 0, 0, 0,
894 0, 0, 0, 0, 0, 0, 0, 0,
895 0, 0, 0, 0, 0, 0, 0, 0,
896 0, 0, 0, 0, 0, 0, 0, 0,
897 0, 0, 0, 0, 0, 0, 0, 0,
898 0, 0, 0, 0, 0, 0, 0, 0,
899 0, 0, 0, 0, 0, 0, 0, 0,
900 0, 0, 0, 0, 0, 0, 0, 0,
901 0, 0, 0, 0, 0, 0, 0, 0,
902 0, 0, 0, 0, 0, 0, 0, 0,
903 0, 0, 0, 0, 0, 0, 0, 0,
904 0, 0, 0, 0, 0, 0, 0, 0,
905 0, 0, 0, 0, 0, 0, 0, 0,
906 0, 0, 0, 0, 0, 0, 0, 0,
907 0, 0, 0, 0, 0, 0, 0, 0,
908 0, 0, 0, 0, 0, 0, 0, 0,
909 0, 0, 0, 0, 0, 0, 0, 0,
910 0, 0, 0, 0, 0, 0, 0, 0,
911 0, 0, 0, 0, 0, 0, 0, 0,
912
913 0, 1, 1, 2, 0, 19, 19, 19,
914 19, 19, 19, 19, 19, 19, 19, 19,
915 19, 19, 19, 19, 19, 19, 19, 19,
916 19, 19, 19, 19, 19, 19, 19, 19,
917 19, 19, 19, 19, 19, 19, 19, 19,
918 19, 19, 19, 19, 19, 19, 19, 19,
919 19, 19, 19, 19, 19, 19, 19, 19,
920 19, 19, 0, 0, 1, 19, 2, 2,
921 2, 1, 1, 1, 1, 1, 1, 1,
922 1, 2, 2, 2, 2, 1, 0, 0,
923 19, 1, 1, 1, 1, 0, 0, 0,
924 19, 19, 19, 19, 19, 19, 19, 19,
925 19, 19, 1, 1, 26, 26, 4, 4,
926 4, 4, 4, 4, 4, 4, 4, 4,
927 26, 0, 0, 0, 0, 0, 0, 0,
928 0, 0, 0, 0, 0, 0, 0, 0,
929 0, 1, 2, 2, 0, 19, 19, 19,
930 19, 19, 19, 19, 19, 0, 0, 19,
931 19, 0, 0, 19, 19, 19, 19, 19,
932 19, 19, 19, 19, 19, 19, 19, 19,
933 19, 19, 19, 19, 19, 19, 19, 19,
934 19, 0, 19, 19, 19, 19, 19, 19,
935 19, 0, 19, 0, 0, 0, 19, 19,
936 19, 19, 0, 0, 1, 0, 2, 2,
937 2, 1, 1, 1, 1, 0, 0, 2,
938 2, 0, 0, 2, 2, 1, 0, 0,
939 0, 0, 0, 0, 0, 0, 0, 2,
940 0, 0, 0, 0, 19, 19, 0, 19,
941 19, 19, 1, 1, 0, 0, 4, 4,
942 4, 4, 4, 4, 4, 4, 4, 4,
943 19, 19, 28, 28, 6, 6, 6, 6,
944 6, 6, 30, 0, 0, 0, 0, 0,
945
946 0, 0, 1, 0, 0, 19, 19, 19,
947 19, 19, 19, 0, 0, 0, 0, 19,
948 19, 0, 0, 19, 19, 19, 19, 19,
949 19, 19, 19, 19, 19, 19, 19, 19,
950 19, 19, 19, 19, 19, 19, 19, 19,
951 19, 0, 19, 19, 19, 19, 19, 19,
952 19, 0, 19, 19, 0, 19, 19, 0,
953 19, 19, 0, 0, 1, 0, 2, 2,
954 2, 1, 1, 0, 0, 0, 0, 1,
955 1, 0, 0, 1, 1, 1, 0, 0,
956 0, 0, 0, 0, 0, 0, 0, 0,
957 0, 19, 19, 19, 19, 0, 19, 0,
958 0, 0, 0, 0, 0, 0, 4, 4,
959 4, 4, 4, 4, 4, 4, 4, 4,
960 1, 1, 19, 19, 19, 0, 0, 0,
961 0, 0, 0, 0, 0, 0, 0, 0,
962 0, 1, 1, 2, 0, 19, 19, 19,
963 19, 19, 19, 19, 0, 19, 0, 19,
964 19, 19, 0, 19, 19, 19, 19, 19,
965 19, 19, 19, 19, 19, 19, 19, 19,
966 19, 19, 19, 19, 19, 19, 19, 19,
967 19, 0, 19, 19, 19, 19, 19, 19,
968 19, 0, 19, 19, 0, 19, 19, 19,
969 19, 19, 0, 0, 1, 19, 2, 2,
970 2, 1, 1, 1, 1, 1, 0, 1,
971 1, 2, 0, 2, 2, 1, 0, 0,
972 19, 0, 0, 0, 0, 0, 0, 0,
973 0, 0, 0, 0, 0, 0, 0, 0,
974 19, 0, 0, 0, 0, 0, 4, 4,
975 4, 4, 4, 4, 4, 4, 4, 4,
976 0, 0, 0, 0, 0, 0, 0, 0,
977 0, 0, 0, 0, 0, 0, 0, 0,
978
979 0, 1, 2, 2, 0, 19, 19, 19,
980 19, 19, 19, 19, 19, 0, 0, 19,
981 19, 0, 0, 19, 19, 19, 19, 19,
982 19, 19, 19, 19, 19, 19, 19, 19,
983 19, 19, 19, 19, 19, 19, 19, 19,
984 19, 0, 19, 19, 19, 19, 19, 19,
985 19, 0, 19, 19, 0, 0, 19, 19,
986 19, 19, 0, 0, 1, 19, 2, 1,
987 2, 1, 1, 1, 0, 0, 0, 2,
988 2, 0, 0, 2, 2, 1, 0, 0,
989 0, 0, 0, 0, 0, 0, 1, 2,
990 0, 0, 0, 0, 19, 19, 0, 19,
991 19, 19, 0, 0, 0, 0, 4, 4,
992 4, 4, 4, 4, 4, 4, 4, 4,
993 30, 0, 0, 0, 0, 0, 0, 0,
994 0, 0, 0, 0, 0, 0, 0, 0,
995 0, 0, 1, 19, 0, 19, 19, 19,
996 19, 19, 19, 0, 0, 0, 19, 19,
997 19, 0, 19, 19, 19, 19, 0, 0,
998 0, 19, 19, 0, 19, 0, 19, 19,
999 0, 0, 0, 19, 19, 0, 0, 0,
1000 19, 19, 19, 0, 0, 0, 19, 19,
1001 19, 19, 19, 19, 19, 19, 0, 19,
1002 19, 19, 0, 0, 0, 0, 2, 2,
1003 1, 2, 2, 0, 0, 0, 2, 2,
1004 2, 0, 2, 2, 2, 1, 0, 0,
1005 0, 0, 0, 0, 0, 0, 0, 2,
1006 0, 0, 0, 0, 0, 0, 0, 0,
1007 0, 0, 0, 0, 0, 0, 0, 4,
1008 4, 4, 4, 4, 4, 4, 4, 4,
1009 6, 6, 6, 0, 0, 0, 0, 0,
1010 0, 0, 0, 0, 0, 0, 0, 0,
1011
1012 0, 2, 2, 2, 0, 19, 19, 19,
1013 19, 19, 19, 19, 19, 0, 19, 19,
1014 19, 0, 19, 19, 19, 19, 19, 19,
1015 19, 19, 19, 19, 19, 19, 19, 19,
1016 19, 19, 19, 19, 19, 19, 19, 19,
1017 19, 0, 19, 19, 19, 19, 19, 19,
1018 19, 19, 19, 19, 0, 19, 19, 19,
1019 19, 19, 0, 0, 0, 0, 1, 1,
1020 1, 2, 2, 2, 2, 0, 1, 1,
1021 1, 0, 1, 1, 1, 1, 0, 0,
1022 0, 0, 0, 0, 0, 1, 1, 0,
1023 0, 0, 0, 0, 0, 0, 0, 0,
1024 19, 19, 0, 0, 0, 0, 4, 4,
1025 4, 4, 4, 4, 4, 4, 4, 4,
1026 0, 0, 0, 0, 0, 0, 0, 0,
1027 0, 0, 0, 0, 0, 0, 0, 0,
1028 0, 0, 2, 2, 0, 19, 19, 19,
1029 19, 19, 19, 19, 19, 0, 19, 19,
1030 19, 0, 19, 19, 19, 19, 19, 19,
1031 19, 19, 19, 19, 19, 19, 19, 19,
1032 19, 19, 19, 19, 19, 19, 19, 19,
1033 19, 0, 19, 19, 19, 19, 19, 19,
1034 19, 19, 19, 19, 0, 19, 19, 19,
1035 19, 19, 0, 0, 0, 0, 2, 1,
1036 2, 2, 2, 2, 2, 0, 1, 2,
1037 2, 0, 2, 2, 1, 1, 0, 0,
1038 0, 0, 0, 0, 0, 2, 2, 0,
1039 0, 0, 0, 0, 0, 0, 19, 0,
1040 19, 19, 0, 0, 0, 0, 4, 4,
1041 4, 4, 4, 4, 4, 4, 4, 4,
1042 0, 0, 0, 0, 0, 0, 0, 0,
1043 0, 0, 0, 0, 0, 0, 0, 0,
1044
1045 0, 0, 2, 2, 0, 19, 19, 19,
1046 19, 19, 19, 19, 19, 0, 19, 19,
1047 19, 0, 19, 19, 19, 19, 19, 19,
1048 19, 19, 19, 19, 19, 19, 19, 19,
1049 19, 19, 19, 19, 19, 19, 19, 19,
1050 19, 0, 19, 19, 19, 19, 19, 19,
1051 19, 19, 19, 19, 19, 19, 19, 19,
1052 19, 19, 0, 0, 0, 0, 2, 2,
1053 2, 1, 1, 1, 0, 0, 2, 2,
1054 2, 0, 2, 2, 2, 1, 0, 0,
1055 0, 0, 0, 0, 0, 0, 0, 2,
1056 0, 0, 0, 0, 0, 0, 0, 0,
1057 19, 19, 0, 0, 0, 0, 4, 4,
1058 4, 4, 4, 4, 4, 4, 4, 4,
1059 0, 0, 0, 0, 0, 0, 0, 0,
1060 0, 0, 0, 0, 0, 0, 0, 0,
1061 0, 0, 2, 2, 0, 19, 19, 19,
1062 19, 19, 19, 19, 19, 19, 19, 19,
1063 19, 19, 19, 19, 19, 19, 19, 0,
1064 0, 0, 19, 19, 19, 19, 19, 19,
1065 19, 19, 19, 19, 19, 19, 19, 19,
1066 19, 19, 19, 19, 19, 19, 19, 19,
1067 19, 19, 0, 19, 19, 19, 19, 19,
1068 19, 19, 19, 19, 0, 19, 0, 0,
1069 19, 19, 19, 19, 19, 19, 19, 0,
1070 0, 0, 1, 0, 0, 0, 0, 2,
1071 2, 2, 1, 1, 1, 0, 1, 0,
1072 2, 2, 2, 2, 2, 2, 2, 2,
1073 0, 0, 0, 0, 0, 0, 0, 0,
1074 0, 0, 0, 0, 0, 0, 0, 0,
1075 0, 0, 2, 2, 26, 0, 0, 0,
1076 0, 0, 0, 0, 0, 0, 0, 0,
1077
1078 0, 19, 19, 19, 19, 19, 19, 19,
1079 19, 19, 19, 19, 19, 19, 19, 19,
1080 19, 19, 19, 19, 19, 19, 19, 19,
1081 19, 19, 19, 19, 19, 19, 19, 19,
1082 19, 19, 19, 19, 19, 19, 19, 19,
1083 19, 19, 19, 19, 19, 19, 19, 19,
1084 19, 1, 19, 19, 1, 1, 1, 1,
1085 1, 1, 1, 0, 0, 0, 0, 28,
1086 19, 19, 19, 19, 19, 19, 18, 1,
1087 1, 1, 1, 1, 1, 1, 1, 26,
1088 4, 4, 4, 4, 4, 4, 4, 4,
1089 4, 4, 26, 26, 0, 0, 0, 0,
1090 0, 0, 0, 0, 0, 0, 0, 0,
1091 0, 0, 0, 0, 0, 0, 0, 0,
1092 0, 0, 0, 0, 0, 0, 0, 0,
1093 0, 0, 0, 0, 0, 0, 0, 0,
1094 0, 19, 19, 0, 19, 0, 0, 19,
1095 19, 0, 19, 0, 0, 19, 0, 0,
1096 0, 0, 0, 0, 19, 19, 19, 19,
1097 0, 19, 19, 19, 19, 19, 19, 19,
1098 0, 19, 19, 19, 0, 19, 0, 19,
1099 0, 0, 19, 19, 0, 19, 19, 19,
1100 19, 1, 19, 19, 1, 1, 1, 1,
1101 1, 1, 0, 1, 1, 19, 0, 0,
1102 19, 19, 19, 19, 19, 0, 18, 0,
1103 1, 1, 1, 1, 1, 1, 0, 0,
1104 4, 4, 4, 4, 4, 4, 4, 4,
1105 4, 4, 0, 0, 19, 19, 0, 0,
1106 0, 0, 0, 0, 0, 0, 0, 0,
1107 0, 0, 0, 0, 0, 0, 0, 0,
1108 0, 0, 0, 0, 0, 0, 0, 0,
1109 0, 0, 0, 0, 0, 0, 0, 0,
1110
1111 19, 30, 30, 30, 26, 26, 26, 26,
1112 26, 26, 26, 26, 26, 26, 26, 26,
1113 26, 26, 26, 30, 30, 30, 30, 30,
1114 1, 1, 30, 30, 30, 30, 30, 30,
1115 4, 4, 4, 4, 4, 4, 4, 4,
1116 4, 4, 6, 6, 6, 6, 6, 6,
1117 6, 6, 6, 6, 30, 1, 30, 1,
1118 30, 1, 22, 23, 22, 23, 2, 2,
1119 19, 19, 19, 19, 19, 19, 19, 19,
1120 0, 19, 19, 19, 19, 19, 19, 19,
1121 19, 19, 19, 19, 19, 19, 19, 19,
1122 19, 19, 19, 19, 19, 19, 19, 19,
1123 19, 19, 19, 19, 19, 19, 19, 19,
1124 19, 19, 19, 0, 0, 0, 0, 0,
1125 0, 1, 1, 1, 1, 1, 1, 1,
1126 1, 1, 1, 1, 1, 1, 1, 2,
1127 1, 1, 1, 1, 1, 26, 1, 1,
1128 19, 19, 19, 19, 0, 0, 0, 0,
1129 1, 1, 1, 1, 1, 1, 1, 1,
1130 0, 1, 1, 1, 1, 1, 1, 1,
1131 1, 1, 1, 1, 1, 1, 1, 1,
1132 1, 1, 1, 1, 1, 1, 1, 1,
1133 1, 1, 1, 1, 1, 1, 1, 1,
1134 1, 1, 1, 1, 1, 0, 30, 30,
1135 30, 30, 30, 30, 30, 30, 1, 30,
1136 30, 30, 30, 30, 30, 0, 0, 30,
1137 0, 0, 0, 0, 0, 0, 0, 0,
1138 0, 0, 0, 0, 0, 0, 0, 0,
1139 0, 0, 0, 0, 0, 0, 0, 0,
1140 0, 0, 0, 0, 0, 0, 0, 0,
1141 0, 0, 0, 0, 0, 0, 0, 0,
1142 0, 0, 0, 0, 0, 0, 0, 0,
1143
1144 19, 19, 19, 19, 19, 19, 19, 19,
1145 19, 19, 19, 19, 19, 19, 19, 19,
1146 19, 19, 19, 19, 19, 19, 19, 19,
1147 19, 19, 19, 19, 19, 19, 19, 19,
1148 19, 19, 0, 19, 19, 19, 19, 19,
1149 0, 19, 19, 0, 2, 1, 1, 1,
1150 1, 2, 1, 0, 0, 0, 1, 1,
1151 2, 1, 0, 0, 0, 0, 0, 0,
1152 4, 4, 4, 4, 4, 4, 4, 4,
1153 4, 4, 26, 26, 26, 26, 26, 26,
1154 19, 19, 19, 19, 19, 19, 2, 2,
1155 1, 1, 0, 0, 0, 0, 0, 0,
1156 0, 0, 0, 0, 0, 0, 0, 0,
1157 0, 0, 0, 0, 0, 0, 0, 0,
1158 0, 0, 0, 0, 0, 0, 0, 0,
1159 0, 0, 0, 0, 0, 0, 0, 0,
1160 0, 0, 0, 0, 0, 0, 0, 0,
1161 0, 0, 0, 0, 0, 0, 0, 0,
1162 0, 0, 0, 0, 0, 0, 0, 0,
1163 0, 0, 0, 0, 0, 0, 0, 0,
1164 15, 15, 15, 15, 15, 15, 15, 15,
1165 15, 15, 15, 15, 15, 15, 15, 15,
1166 15, 15, 15, 15, 15, 15, 15, 15,
1167 15, 15, 15, 15, 15, 15, 15, 15,
1168 15, 15, 15, 15, 15, 15, 0, 0,
1169 0, 0, 0, 0, 0, 0, 0, 0,
1170 19, 19, 19, 19, 19, 19, 19, 19,
1171 19, 19, 19, 19, 19, 19, 19, 19,
1172 19, 19, 19, 19, 19, 19, 19, 19,
1173 19, 19, 19, 19, 19, 19, 19, 19,
1174 19, 19, 19, 19, 19, 19, 19, 19,
1175 19, 0, 0, 26, 0, 0, 0, 0,
1176
1177 19, 19, 19, 19, 19, 19, 19, 19,
1178 19, 19, 19, 19, 19, 19, 19, 19,
1179 19, 19, 19, 19, 19, 19, 19, 19,
1180 19, 19, 19, 19, 19, 19, 19, 19,
1181 19, 19, 19, 19, 19, 19, 19, 19,
1182 19, 19, 19, 19, 19, 19, 19, 19,
1183 19, 19, 19, 19, 19, 19, 19, 19,
1184 19, 19, 19, 19, 19, 19, 19, 19,
1185 19, 19, 19, 19, 19, 19, 19, 19,
1186 19, 19, 19, 19, 19, 19, 19, 19,
1187 19, 19, 19, 19, 19, 19, 19, 19,
1188 19, 19, 0, 0, 0, 0, 0, 19,
1189 19, 19, 19, 19, 19, 19, 19, 19,
1190 19, 19, 19, 19, 19, 19, 19, 19,
1191 19, 19, 19, 19, 19, 19, 19, 19,
1192 19, 19, 19, 19, 19, 19, 19, 19,
1193 19, 19, 19, 19, 19, 19, 19, 19,
1194 19, 19, 19, 19, 19, 19, 19, 19,
1195 19, 19, 19, 19, 19, 19, 19, 19,
1196 19, 19, 19, 19, 19, 19, 19, 19,
1197 19, 19, 19, 0, 0, 0, 0, 0,
1198 19, 19, 19, 19, 19, 19, 19, 19,
1199 19, 19, 19, 19, 19, 19, 19, 19,
1200 19, 19, 19, 19, 19, 19, 19, 19,
1201 19, 19, 19, 19, 19, 19, 19, 19,
1202 19, 19, 19, 19, 19, 19, 19, 19,
1203 19, 19, 19, 19, 19, 19, 19, 19,
1204 19, 19, 19, 19, 19, 19, 19, 19,
1205 19, 19, 19, 19, 19, 19, 19, 19,
1206 19, 19, 19, 19, 19, 19, 19, 19,
1207 19, 19, 19, 19, 19, 19, 19, 19,
1208 19, 19, 0, 0, 0, 0, 0, 0,
1209
1210 19, 19, 19, 19, 19, 19, 19, 0,
1211 19, 19, 19, 19, 19, 19, 19, 19,
1212 19, 19, 19, 19, 19, 19, 19, 19,
1213 19, 19, 19, 19, 19, 19, 19, 19,
1214 19, 19, 19, 19, 19, 19, 19, 19,
1215 19, 19, 19, 19, 19, 19, 19, 19,
1216 19, 19, 19, 19, 19, 19, 19, 19,
1217 19, 19, 19, 19, 19, 19, 19, 19,
1218 19, 19, 19, 19, 19, 19, 19, 0,
1219 19, 0, 19, 19, 19, 19, 0, 0,
1220 19, 19, 19, 19, 19, 19, 19, 0,
1221 19, 0, 19, 19, 19, 19, 0, 0,
1222 19, 19, 19, 19, 19, 19, 19, 19,
1223 19, 19, 19, 19, 19, 19, 19, 19,
1224 19, 19, 19, 19, 19, 19, 19, 19,
1225 19, 19, 19, 19, 19, 19, 19, 19,
1226 19, 19, 19, 19, 19, 19, 19, 0,
1227 19, 0, 19, 19, 19, 19, 0, 0,
1228 19, 19, 19, 19, 19, 19, 19, 19,
1229 19, 19, 19, 19, 19, 19, 19, 19,
1230 19, 19, 19, 19, 19, 19, 19, 19,
1231 19, 19, 19, 19, 19, 19, 19, 0,
1232 19, 0, 19, 19, 19, 19, 0, 0,
1233 19, 19, 19, 19, 19, 19, 19, 0,
1234 19, 0, 19, 19, 19, 19, 0, 0,
1235 19, 19, 19, 19, 19, 19, 19, 0,
1236 19, 19, 19, 19, 19, 19, 19, 0,
1237 19, 19, 19, 19, 19, 19, 19, 19,
1238 19, 19, 19, 19, 19, 19, 19, 19,
1239 19, 19, 19, 19, 19, 19, 19, 0,
1240 19, 19, 19, 19, 19, 19, 19, 19,
1241 19, 19, 19, 19, 19, 19, 19, 19,
1242
1243 19, 19, 19, 19, 19, 19, 19, 19,
1244 19, 19, 19, 19, 19, 19, 19, 0,
1245 19, 0, 19, 19, 19, 19, 0, 0,
1246 19, 19, 19, 19, 19, 19, 19, 0,
1247 19, 19, 19, 19, 19, 19, 19, 19,
1248 19, 19, 19, 19, 19, 19, 19, 19,
1249 19, 19, 19, 19, 19, 19, 19, 19,
1250 19, 19, 19, 19, 19, 19, 19, 19,
1251 19, 19, 19, 19, 19, 19, 19, 0,
1252 19, 19, 19, 19, 19, 19, 19, 19,
1253 19, 19, 19, 19, 19, 19, 19, 19,
1254 19, 19, 19, 0, 0, 0, 0, 0,
1255 0, 26, 26, 26, 26, 26, 26, 26,
1256 26, 4, 4, 4, 4, 4, 4, 4,
1257 4, 4, 6, 6, 6, 6, 6, 6,
1258 6, 6, 6, 6, 6, 0, 0, 0,
1259 0, 0, 0, 0, 0, 0, 0, 0,
1260 0, 0, 0, 0, 0, 0, 0, 0,
1261 0, 0, 0, 0, 0, 0, 0, 0,
1262 0, 0, 0, 0, 0, 0, 0, 0,
1263 19, 19, 19, 19, 19, 19, 19, 19,
1264 19, 19, 19, 19, 19, 19, 19, 19,
1265 19, 19, 19, 19, 19, 19, 19, 19,
1266 19, 19, 19, 19, 19, 19, 19, 19,
1267 19, 19, 19, 19, 19, 19, 19, 19,
1268 19, 19, 19, 19, 19, 19, 19, 19,
1269 19, 19, 19, 19, 19, 19, 19, 19,
1270 19, 19, 19, 19, 19, 19, 19, 19,
1271 19, 19, 19, 19, 19, 19, 19, 19,
1272 19, 19, 19, 19, 19, 19, 19, 19,
1273 19, 19, 19, 19, 19, 0, 0, 0,
1274 0, 0, 0, 0, 0, 0, 0, 0,
1275
1276 0, 19, 19, 19, 19, 19, 19, 19,
1277 19, 19, 19, 19, 19, 19, 19, 19,
1278 19, 19, 19, 19, 19, 19, 19, 19,
1279 19, 19, 19, 19, 19, 19, 19, 19,
1280 19, 19, 19, 19, 19, 19, 19, 19,
1281 19, 19, 19, 19, 19, 19, 19, 19,
1282 19, 19, 19, 19, 19, 19, 19, 19,
1283 19, 19, 19, 19, 19, 19, 19, 19,
1284 19, 19, 19, 19, 19, 19, 19, 19,
1285 19, 19, 19, 19, 19, 19, 19, 19,
1286 19, 19, 19, 19, 19, 19, 19, 19,
1287 19, 19, 19, 19, 19, 19, 19, 19,
1288 19, 19, 19, 19, 19, 19, 19, 19,
1289 19, 19, 19, 19, 19, 19, 19, 19,
1290 19, 19, 19, 19, 19, 19, 19, 19,
1291 19, 19, 19, 19, 19, 19, 19, 19,
1292 19, 19, 19, 19, 19, 19, 19, 19,
1293 19, 19, 19, 19, 19, 19, 19, 19,
1294 19, 19, 19, 19, 19, 19, 19, 19,
1295 19, 19, 19, 19, 19, 19, 19, 19,
1296 19, 19, 19, 19, 19, 19, 19, 19,
1297 19, 19, 19, 19, 19, 19, 19, 19,
1298 19, 19, 19, 19, 19, 19, 19, 19,
1299 19, 19, 19, 19, 19, 19, 19, 19,
1300 19, 19, 19, 19, 19, 19, 19, 19,
1301 19, 19, 19, 19, 19, 19, 19, 19,
1302 19, 19, 19, 19, 19, 19, 19, 19,
1303 19, 19, 19, 19, 19, 19, 19, 19,
1304 19, 19, 19, 19, 19, 19, 19, 19,
1305 19, 19, 19, 19, 19, 19, 19, 19,
1306 19, 19, 19, 19, 19, 19, 19, 19,
1307 19, 19, 19, 19, 19, 19, 19, 19,
1308
1309 19, 19, 19, 19, 19, 19, 19, 19,
1310 19, 19, 19, 19, 19, 19, 19, 19,
1311 19, 19, 19, 19, 19, 19, 19, 19,
1312 19, 19, 19, 19, 19, 19, 19, 19,
1313 19, 19, 19, 19, 19, 19, 19, 19,
1314 19, 19, 19, 19, 19, 19, 19, 19,
1315 19, 19, 19, 19, 19, 19, 19, 19,
1316 19, 19, 19, 19, 19, 19, 19, 19,
1317 19, 19, 19, 19, 19, 19, 19, 19,
1318 19, 19, 19, 19, 19, 19, 19, 19,
1319 19, 19, 19, 19, 19, 19, 19, 19,
1320 19, 19, 19, 19, 19, 19, 19, 19,
1321 19, 19, 19, 19, 19, 19, 19, 19,
1322 19, 19, 19, 19, 19, 19, 19, 19,
1323 19, 19, 19, 19, 19, 19, 19, 19,
1324 19, 19, 19, 19, 19, 19, 19, 19,
1325 19, 19, 19, 19, 19, 19, 19, 19,
1326 19, 19, 19, 19, 19, 19, 19, 19,
1327 19, 19, 19, 19, 19, 19, 19, 19,
1328 19, 19, 19, 19, 19, 19, 19, 19,
1329 19, 19, 19, 19, 19, 19, 19, 19,
1330 19, 19, 19, 19, 19, 19, 19, 19,
1331 19, 19, 19, 19, 19, 19, 19, 19,
1332 19, 19, 19, 19, 19, 19, 19, 19,
1333 19, 19, 19, 19, 19, 19, 19, 19,
1334 19, 19, 19, 19, 19, 19, 19, 19,
1335 19, 19, 19, 19, 19, 19, 19, 19,
1336 19, 19, 19, 19, 19, 19, 19, 19,
1337 19, 19, 19, 19, 19, 19, 19, 19,
1338 19, 19, 19, 19, 19, 19, 19, 19,
1339 19, 19, 19, 19, 19, 19, 19, 19,
1340 19, 19, 19, 19, 19, 19, 19, 19,
1341
1342 19, 19, 19, 19, 19, 19, 19, 19,
1343 19, 19, 19, 19, 19, 19, 19, 19,
1344 19, 19, 19, 19, 19, 19, 19, 19,
1345 19, 19, 19, 19, 19, 19, 19, 19,
1346 19, 19, 19, 19, 19, 19, 19, 19,
1347 19, 19, 19, 19, 19, 19, 19, 19,
1348 19, 19, 19, 19, 19, 19, 19, 19,
1349 19, 19, 19, 19, 19, 19, 19, 19,
1350 19, 19, 19, 19, 19, 19, 19, 19,
1351 19, 19, 19, 19, 19, 19, 19, 19,
1352 19, 19, 19, 19, 19, 19, 19, 19,
1353 19, 19, 19, 19, 19, 19, 19, 19,
1354 19, 19, 19, 19, 19, 19, 19, 19,
1355 19, 19, 19, 19, 19, 26, 26, 19,
1356 19, 19, 19, 19, 19, 19, 19, 0,
1357 0, 0, 0, 0, 0, 0, 0, 0,
1358 7, 19, 19, 19, 19, 19, 19, 19,
1359 19, 19, 19, 19, 19, 19, 19, 19,
1360 19, 19, 19, 19, 19, 19, 19, 19,
1361 19, 19, 19, 22, 23, 0, 0, 0,
1362 19, 19, 19, 19, 19, 19, 19, 19,
1363 19, 19, 19, 19, 19, 19, 19, 19,
1364 19, 19, 19, 19, 19, 19, 19, 19,
1365 19, 19, 19, 19, 19, 19, 19, 19,
1366 19, 19, 19, 19, 19, 19, 19, 19,
1367 19, 19, 19, 19, 19, 19, 19, 19,
1368 19, 19, 19, 19, 19, 19, 19, 19,
1369 19, 19, 19, 19, 19, 19, 19, 19,
1370 19, 19, 19, 19, 19, 19, 19, 19,
1371 19, 19, 19, 26, 26, 26, 5, 5,
1372 5, 0, 0, 0, 0, 0, 0, 0,
1373 0, 0, 0, 0, 0, 0, 0, 0,
1374
1375 19, 19, 19, 19, 19, 19, 19, 19,
1376 19, 19, 19, 19, 19, 0, 19, 19,
1377 19, 19, 1, 1, 1, 0, 0, 0,
1378 0, 0, 0, 0, 0, 0, 0, 0,
1379 19, 19, 19, 19, 19, 19, 19, 19,
1380 19, 19, 19, 19, 19, 19, 19, 19,
1381 19, 19, 1, 1, 1, 26, 26, 0,
1382 0, 0, 0, 0, 0, 0, 0, 0,
1383 19, 19, 19, 19, 19, 19, 19, 19,
1384 19, 19, 19, 19, 19, 19, 19, 19,
1385 19, 19, 1, 1, 0, 0, 0, 0,
1386 0, 0, 0, 0, 0, 0, 0, 0,
1387 19, 19, 19, 19, 19, 19, 19, 19,
1388 19, 19, 19, 19, 19, 0, 19, 19,
1389 19, 0, 1, 1, 0, 0, 0, 0,
1390 0, 0, 0, 0, 0, 0, 0, 0,
1391 19, 19, 19, 19, 19, 19, 19, 19,
1392 19, 19, 19, 19, 19, 19, 19, 19,
1393 19, 19, 19, 19, 19, 19, 19, 19,
1394 19, 19, 19, 19, 19, 19, 19, 19,
1395 19, 19, 19, 19, 19, 19, 19, 19,
1396 19, 19, 19, 19, 19, 19, 19, 19,
1397 19, 19, 19, 19, 2, 2, 2, 1,
1398 1, 1, 1, 1, 1, 1, 2, 2,
1399 2, 2, 2, 2, 2, 2, 1, 2,
1400 2, 1, 1, 1, 1, 1, 1, 1,
1401 1, 1, 1, 1, 26, 26, 26, 18,
1402 26, 26, 26, 28, 19, 0, 0, 0,
1403 4, 4, 4, 4, 4, 4, 4, 4,
1404 4, 4, 0, 0, 0, 0, 0, 0,
1405 0, 0, 0, 0, 0, 0, 0, 0,
1406 0, 0, 0, 0, 0, 0, 0, 0,
1407
1408 26, 26, 26, 26, 26, 26, 21, 26,
1409 26, 26, 26, 1, 1, 1, 11, 0,
1410 4, 4, 4, 4, 4, 4, 4, 4,
1411 4, 4, 0, 0, 0, 0, 0, 0,
1412 19, 19, 19, 19, 19, 19, 19, 19,
1413 19, 19, 19, 19, 19, 19, 19, 19,
1414 19, 19, 19, 19, 19, 19, 19, 19,
1415 19, 19, 19, 19, 19, 19, 19, 19,
1416 19, 19, 19, 18, 19, 19, 19, 19,
1417 19, 19, 19, 19, 19, 19, 19, 19,
1418 19, 19, 19, 19, 19, 19, 19, 19,
1419 19, 19, 19, 19, 19, 19, 19, 19,
1420 19, 19, 19, 19, 19, 19, 19, 19,
1421 19, 19, 19, 19, 19, 19, 19, 19,
1422 19, 19, 19, 19, 19, 19, 19, 19,
1423 0, 0, 0, 0, 0, 0, 0, 0,
1424 19, 19, 19, 19, 19, 19, 19, 19,
1425 19, 19, 19, 19, 19, 19, 19, 19,
1426 19, 19, 19, 19, 19, 19, 19, 19,
1427 19, 19, 19, 19, 19, 19, 19, 19,
1428 19, 19, 19, 19, 19, 19, 19, 19,
1429 19, 1, 0, 0, 0, 0, 0, 0,
1430 0, 0, 0, 0, 0, 0, 0, 0,
1431 0, 0, 0, 0, 0, 0, 0, 0,
1432 0, 0, 0, 0, 0, 0, 0, 0,
1433 0, 0, 0, 0, 0, 0, 0, 0,
1434 0, 0, 0, 0, 0, 0, 0, 0,
1435 0, 0, 0, 0, 0, 0, 0, 0,
1436 0, 0, 0, 0, 0, 0, 0, 0,
1437 0, 0, 0, 0, 0, 0, 0, 0,
1438 0, 0, 0, 0, 0, 0, 0, 0,
1439 0, 0, 0, 0, 0, 0, 0, 0,
1440
1441 15, 16, 15, 16, 15, 16, 15, 16,
1442 15, 16, 15, 16, 15, 16, 15, 16,
1443 15, 16, 15, 16, 15, 16, 15, 16,
1444 15, 16, 15, 16, 15, 16, 15, 16,
1445 15, 16, 15, 16, 15, 16, 15, 16,
1446 15, 16, 15, 16, 15, 16, 15, 16,
1447 15, 16, 15, 16, 15, 16, 15, 16,
1448 15, 16, 15, 16, 15, 16, 15, 16,
1449 15, 16, 15, 16, 15, 16, 15, 16,
1450 15, 16, 15, 16, 15, 16, 15, 16,
1451 15, 16, 15, 16, 15, 16, 15, 16,
1452 15, 16, 15, 16, 15, 16, 15, 16,
1453 15, 16, 15, 16, 15, 16, 15, 16,
1454 15, 16, 15, 16, 15, 16, 15, 16,
1455 15, 16, 15, 16, 15, 16, 15, 16,
1456 15, 16, 15, 16, 15, 16, 15, 16,
1457 15, 16, 15, 16, 15, 16, 15, 16,
1458 15, 16, 15, 16, 15, 16, 15, 16,
1459 15, 16, 15, 16, 15, 16, 16, 16,
1460 16, 16, 16, 16, 0, 0, 0, 0,
1461 15, 16, 15, 16, 15, 16, 15, 16,
1462 15, 16, 15, 16, 15, 16, 15, 16,
1463 15, 16, 15, 16, 15, 16, 15, 16,
1464 15, 16, 15, 16, 15, 16, 15, 16,
1465 15, 16, 15, 16, 15, 16, 15, 16,
1466 15, 16, 15, 16, 15, 16, 15, 16,
1467 15, 16, 15, 16, 15, 16, 15, 16,
1468 15, 16, 15, 16, 15, 16, 15, 16,
1469 15, 16, 15, 16, 15, 16, 15, 16,
1470 15, 16, 15, 16, 15, 16, 15, 16,
1471 15, 16, 15, 16, 15, 16, 15, 16,
1472 15, 16, 0, 0, 0, 0, 0, 0,
1473
1474 16, 16, 16, 16, 16, 16, 16, 16,
1475 15, 15, 15, 15, 15, 15, 15, 15,
1476 16, 16, 16, 16, 16, 16, 0, 0,
1477 15, 15, 15, 15, 15, 15, 0, 0,
1478 16, 16, 16, 16, 16, 16, 16, 16,
1479 15, 15, 15, 15, 15, 15, 15, 15,
1480 16, 16, 16, 16, 16, 16, 16, 16,
1481 15, 15, 15, 15, 15, 15, 15, 15,
1482 16, 16, 16, 16, 16, 16, 0, 0,
1483 15, 15, 15, 15, 15, 15, 0, 0,
1484 16, 16, 16, 16, 16, 16, 16, 16,
1485 0, 15, 0, 15, 0, 15, 0, 15,
1486 16, 16, 16, 16, 16, 16, 16, 16,
1487 15, 15, 15, 15, 15, 15, 15, 15,
1488 16, 16, 16, 16, 16, 16, 16, 16,
1489 16, 16, 16, 16, 16, 16, 0, 0,
1490 16, 16, 16, 16, 16, 16, 16, 16,
1491 17, 17, 17, 17, 17, 17, 17, 17,
1492 16, 16, 16, 16, 16, 16, 16, 16,
1493 17, 17, 17, 17, 17, 17, 17, 17,
1494 16, 16, 16, 16, 16, 16, 16, 16,
1495 17, 17, 17, 17, 17, 17, 17, 17,
1496 16, 16, 16, 16, 16, 0, 16, 16,
1497 15, 15, 15, 15, 17, 29, 16, 29,
1498 29, 29, 16, 16, 16, 0, 16, 16,
1499 15, 15, 15, 15, 17, 29, 29, 29,
1500 16, 16, 16, 16, 0, 0, 16, 16,
1501 15, 15, 15, 15, 0, 29, 29, 29,
1502 16, 16, 16, 16, 16, 16, 16, 16,
1503 15, 15, 15, 15, 15, 29, 29, 29,
1504 0, 0, 16, 16, 16, 0, 16, 16,
1505 15, 15, 15, 15, 17, 29, 29, 0,
1506
1507 7, 7, 7, 7, 7, 7, 7, 7,
1508 7, 7, 7, 7, 11, 11, 11, 11,
1509 21, 21, 21, 21, 21, 21, 26, 26,
1510 24, 25, 22, 24, 24, 25, 22, 24,
1511 26, 26, 26, 26, 26, 26, 26, 26,
1512 8, 9, 11, 11, 11, 11, 11, 7,
1513 26, 26, 26, 26, 26, 26, 26, 26,
1514 26, 24, 25, 26, 26, 26, 26, 20,
1515 20, 26, 26, 26, 27, 22, 23, 26,
1516 26, 26, 26, 26, 26, 26, 26, 26,
1517 26, 26, 27, 0, 0, 0, 0, 26,
1518 0, 0, 0, 0, 0, 0, 0, 7,
1519 11, 11, 11, 11, 0, 0, 0, 0,
1520 0, 0, 11, 11, 11, 11, 11, 11,
1521 6, 16, 0, 0, 6, 6, 6, 6,
1522 6, 6, 27, 27, 27, 22, 23, 16,
1523 6, 6, 6, 6, 6, 6, 6, 6,
1524 6, 6, 27, 27, 27, 22, 23, 0,
1525 0, 0, 0, 0, 0, 0, 0, 0,
1526 0, 0, 0, 0, 0, 0, 0, 0,
1527 28, 28, 28, 28, 28, 28, 28, 28,
1528 28, 28, 28, 28, 28, 28, 28, 28,
1529 28, 28, 0, 0, 0, 0, 0, 0,
1530 0, 0, 0, 0, 0, 0, 0, 0,
1531 0, 0, 0, 0, 0, 0, 0, 0,
1532 0, 0, 0, 0, 0, 0, 0, 0,
1533 1, 1, 1, 1, 1, 1, 1, 1,
1534 1, 1, 1, 1, 1, 3, 3, 3,
1535 3, 1, 3, 3, 3, 1, 1, 1,
1536 1, 1, 1, 0, 0, 0, 0, 0,
1537 0, 0, 0, 0, 0, 0, 0, 0,
1538 0, 0, 0, 0, 0, 0, 0, 0,
1539
1540 30, 30, 15, 30, 30, 30, 30, 15,
1541 30, 30, 16, 15, 15, 15, 16, 16,
1542 15, 15, 15, 16, 30, 15, 30, 30,
1543 30, 15, 15, 15, 15, 15, 30, 30,
1544 30, 30, 30, 30, 15, 30, 15, 30,
1545 15, 30, 15, 15, 15, 15, 30, 16,
1546 15, 15, 30, 15, 16, 19, 19, 19,
1547 19, 16, 30, 0, 0, 16, 15, 15,
1548 27, 27, 27, 27, 27, 15, 16, 16,
1549 16, 16, 30, 27, 0, 0, 0, 0,
1550 0, 0, 0, 6, 6, 6, 6, 6,
1551 6, 6, 6, 6, 6, 6, 6, 6,
1552 5, 5, 5, 5, 5, 5, 5, 5,
1553 5, 5, 5, 5, 5, 5, 5, 5,
1554 5, 5, 5, 5, 5, 5, 5, 5,
1555 5, 5, 5, 5, 5, 5, 5, 5,
1556 5, 5, 5, 5, 0, 0, 0, 0,
1557 0, 0, 0, 0, 0, 0, 0, 0,
1558 27, 27, 27, 27, 27, 30, 30, 30,
1559 30, 30, 27, 27, 30, 30, 30, 30,
1560 27, 30, 30, 27, 30, 30, 27, 30,
1561 30, 30, 30, 30, 30, 30, 27, 30,
1562 30, 30, 30, 30, 30, 30, 30, 30,
1563 30, 30, 30, 30, 30, 30, 30, 30,
1564 30, 30, 30, 30, 30, 30, 30, 30,
1565 30, 30, 30, 30, 30, 30, 27, 27,
1566 30, 30, 27, 30, 27, 30, 30, 30,
1567 30, 30, 30, 30, 30, 30, 30, 30,
1568 30, 30, 30, 30, 30, 30, 30, 30,
1569 30, 30, 30, 30, 30, 30, 30, 30,
1570 30, 30, 30, 30, 27, 27, 27, 27,
1571 27, 27, 27, 27, 27, 27, 27, 27,
1572
1573 27, 27, 27, 27, 27, 27, 27, 27,
1574 27, 27, 27, 27, 27, 27, 27, 27,
1575 27, 27, 27, 27, 27, 27, 27, 27,
1576 27, 27, 27, 27, 27, 27, 27, 27,
1577 27, 27, 27, 27, 27, 27, 27, 27,
1578 27, 27, 27, 27, 27, 27, 27, 27,
1579 27, 27, 27, 27, 27, 27, 27, 27,
1580 27, 27, 27, 27, 27, 27, 27, 27,
1581 27, 27, 27, 27, 27, 27, 27, 27,
1582 27, 27, 27, 27, 27, 27, 27, 27,
1583 27, 27, 27, 27, 27, 27, 27, 27,
1584 27, 27, 27, 27, 27, 27, 27, 27,
1585 27, 27, 27, 27, 27, 27, 27, 27,
1586 27, 27, 27, 27, 27, 27, 27, 27,
1587 27, 27, 27, 27, 27, 27, 27, 27,
1588 27, 27, 27, 27, 27, 27, 27, 27,
1589 27, 27, 27, 27, 27, 27, 27, 27,
1590 27, 27, 27, 27, 27, 27, 27, 27,
1591 27, 27, 27, 27, 27, 27, 27, 27,
1592 27, 27, 27, 27, 27, 27, 27, 27,
1593 27, 27, 27, 27, 27, 27, 27, 27,
1594 27, 27, 27, 27, 27, 27, 27, 27,
1595 27, 27, 27, 27, 27, 27, 27, 27,
1596 27, 27, 27, 27, 27, 27, 27, 27,
1597 27, 27, 27, 27, 27, 27, 27, 27,
1598 27, 27, 27, 27, 27, 27, 27, 27,
1599 27, 27, 27, 27, 27, 27, 27, 27,
1600 27, 27, 27, 27, 27, 27, 27, 27,
1601 27, 27, 27, 27, 27, 27, 27, 27,
1602 27, 27, 27, 27, 27, 27, 27, 27,
1603 27, 27, 27, 27, 27, 27, 27, 27,
1604 27, 27, 27, 27, 27, 27, 27, 27,
1605
1606 30, 30, 30, 30, 30, 30, 30, 30,
1607 27, 27, 27, 27, 30, 30, 30, 30,
1608 30, 30, 30, 30, 30, 30, 30, 30,
1609 30, 30, 30, 30, 30, 30, 30, 30,
1610 27, 27, 30, 30, 30, 30, 30, 30,
1611 30, 22, 23, 30, 30, 30, 30, 30,
1612 30, 30, 30, 30, 30, 30, 30, 30,
1613 30, 30, 30, 30, 30, 30, 30, 30,
1614 30, 30, 30, 30, 30, 30, 30, 30,
1615 30, 30, 30, 30, 30, 30, 30, 30,
1616 30, 30, 30, 30, 30, 30, 30, 30,
1617 30, 30, 30, 30, 30, 30, 30, 30,
1618 30, 30, 30, 30, 30, 30, 30, 30,
1619 30, 30, 30, 30, 30, 30, 30, 30,
1620 30, 30, 30, 30, 30, 30, 30, 30,
1621 30, 30, 30, 30, 27, 30, 30, 30,
1622 30, 30, 30, 30, 30, 30, 30, 30,
1623 30, 30, 30, 30, 30, 30, 30, 30,
1624 30, 30, 30, 30, 30, 30, 30, 30,
1625 30, 30, 30, 27, 27, 27, 27, 27,
1626 27, 27, 27, 27, 27, 27, 27, 27,
1627 27, 27, 27, 27, 27, 27, 27, 27,
1628 27, 27, 27, 27, 22, 23, 26, 30,
1629 30, 30, 30, 30, 30, 30, 30, 30,
1630 30, 30, 30, 30, 30, 30, 30, 30,
1631 30, 30, 30, 30, 30, 30, 30, 0,
1632 0, 0, 0, 0, 0, 0, 0, 0,
1633 0, 0, 0, 0, 0, 0, 0, 0,
1634 0, 0, 0, 0, 0, 0, 0, 0,
1635 0, 0, 0, 0, 0, 0, 0, 0,
1636 0, 0, 0, 0, 0, 0, 0, 0,
1637 0, 0, 0, 0, 0, 0, 0, 0,
1638
1639 30, 30, 30, 30, 30, 30, 30, 30,
1640 30, 30, 30, 30, 30, 30, 30, 30,
1641 30, 30, 30, 30, 30, 30, 30, 30,
1642 30, 30, 30, 30, 30, 30, 30, 30,
1643 30, 30, 30, 30, 30, 30, 30, 0,
1644 0, 0, 0, 0, 0, 0, 0, 0,
1645 0, 0, 0, 0, 0, 0, 0, 0,
1646 0, 0, 0, 0, 0, 0, 0, 0,
1647 30, 30, 30, 30, 30, 30, 30, 30,
1648 30, 30, 30, 0, 0, 0, 0, 0,
1649 0, 0, 0, 0, 0, 0, 0, 0,
1650 0, 0, 0, 0, 0, 0, 0, 0,
1651 6, 6, 6, 6, 6, 6, 6, 6,
1652 6, 6, 6, 6, 6, 6, 6, 6,
1653 6, 6, 6, 6, 6, 6, 6, 6,
1654 6, 6, 6, 6, 6, 6, 6, 6,
1655 6, 6, 6, 6, 6, 6, 6, 6,
1656 6, 6, 6, 6, 6, 6, 6, 6,
1657 6, 6, 6, 6, 6, 6, 6, 6,
1658 6, 6, 6, 6, 30, 30, 30, 30,
1659 30, 30, 30, 30, 30, 30, 30, 30,
1660 30, 30, 30, 30, 30, 30, 30, 30,
1661 30, 30, 30, 30, 30, 30, 30, 30,
1662 30, 30, 30, 30, 30, 30, 30, 30,
1663 30, 30, 30, 30, 30, 30, 30, 30,
1664 30, 30, 30, 30, 30, 30, 30, 30,
1665 30, 30, 30, 30, 30, 30, 30, 30,
1666 30, 30, 30, 30, 30, 30, 30, 30,
1667 30, 30, 30, 30, 30, 30, 30, 30,
1668 30, 30, 6, 6, 6, 6, 6, 6,
1669 6, 6, 6, 6, 6, 6, 6, 6,
1670 6, 6, 6, 6, 6, 6, 6, 0,
1671
1672 30, 30, 30, 30, 30, 30, 30, 30,
1673 30, 30, 30, 30, 30, 30, 30, 30,
1674 30, 30, 30, 30, 30, 30, 30, 30,
1675 30, 30, 30, 30, 30, 30, 30, 30,
1676 30, 30, 30, 30, 30, 30, 30, 30,
1677 30, 30, 30, 30, 30, 30, 30, 30,
1678 30, 30, 30, 30, 30, 30, 30, 30,
1679 30, 30, 30, 30, 30, 30, 30, 30,
1680 30, 30, 30, 30, 30, 30, 30, 30,
1681 30, 30, 30, 30, 30, 30, 30, 30,
1682 30, 30, 30, 30, 30, 30, 30, 30,
1683 30, 30, 30, 30, 30, 30, 30, 30,
1684 30, 30, 30, 30, 30, 30, 30, 30,
1685 30, 30, 30, 30, 30, 30, 30, 30,
1686 30, 30, 30, 30, 30, 30, 30, 30,
1687 30, 30, 30, 30, 30, 30, 30, 30,
1688 30, 30, 30, 30, 30, 30, 30, 30,
1689 30, 30, 30, 30, 30, 30, 30, 30,
1690 30, 30, 30, 30, 30, 30, 30, 30,
1691 30, 30, 30, 30, 30, 30, 30, 30,
1692 30, 30, 30, 30, 30, 30, 30, 30,
1693 30, 30, 30, 30, 30, 30, 30, 30,
1694 30, 30, 30, 30, 30, 30, 30, 27,
1695 30, 30, 30, 30, 30, 30, 30, 30,
1696 30, 27, 30, 30, 30, 30, 30, 30,
1697 30, 30, 30, 30, 30, 30, 30, 30,
1698 30, 30, 30, 30, 30, 30, 30, 30,
1699 30, 30, 30, 30, 30, 30, 30, 30,
1700 30, 30, 30, 30, 30, 30, 30, 30,
1701 30, 30, 30, 30, 30, 30, 30, 30,
1702 30, 30, 30, 30, 30, 30, 30, 30,
1703 27, 27, 27, 27, 27, 27, 27, 27,
1704
1705 30, 30, 30, 30, 30, 30, 30, 30,
1706 30, 30, 30, 30, 30, 30, 30, 30,
1707 30, 30, 30, 30, 0, 0, 30, 30,
1708 0, 30, 30, 30, 30, 30, 30, 30,
1709 30, 30, 30, 30, 30, 30, 30, 30,
1710 30, 30, 30, 30, 30, 30, 30, 30,
1711 30, 30, 30, 30, 30, 30, 30, 30,
1712 30, 30, 30, 30, 30, 30, 30, 30,
1713 30, 30, 30, 30, 30, 30, 30, 30,
1714 30, 30, 30, 30, 30, 30, 30, 30,
1715 30, 30, 30, 30, 30, 30, 30, 30,
1716 30, 30, 30, 30, 30, 30, 30, 30,
1717 30, 30, 30, 30, 30, 30, 30, 30,
1718 30, 30, 30, 30, 30, 30, 30, 27,
1719 30, 30, 30, 30, 30, 30, 30, 30,
1720 30, 30, 30, 30, 30, 30, 0, 0,
1721 30, 30, 30, 30, 30, 30, 30, 30,
1722 30, 30, 0, 0, 0, 0, 0, 0,
1723 0, 0, 0, 0, 0, 0, 0, 0,
1724 0, 0, 0, 0, 0, 0, 0, 0,
1725 0, 0, 0, 0, 0, 0, 0, 0,
1726 0, 0, 0, 0, 0, 0, 0, 0,
1727 0, 0, 0, 0, 0, 0, 0, 0,
1728 0, 0, 0, 0, 0, 0, 0, 0,
1729 0, 0, 0, 0, 0, 0, 0, 0,
1730 0, 0, 0, 0, 0, 0, 0, 0,
1731 0, 0, 0, 0, 0, 0, 0, 0,
1732 0, 0, 0, 0, 0, 0, 0, 0,
1733 0, 0, 0, 0, 0, 0, 0, 0,
1734 0, 0, 0, 0, 0, 0, 0, 0,
1735 0, 0, 0, 0, 0, 0, 0, 0,
1736 0, 0, 0, 0, 0, 0, 0, 0,
1737
1738 0, 30, 30, 30, 30, 0, 30, 30,
1739 30, 30, 0, 0, 30, 30, 30, 30,
1740 30, 30, 30, 30, 30, 30, 30, 30,
1741 30, 30, 30, 30, 30, 30, 30, 30,
1742 30, 30, 30, 30, 30, 30, 30, 30,
1743 0, 30, 30, 30, 30, 30, 30, 30,
1744 30, 30, 30, 30, 30, 30, 30, 30,
1745 30, 30, 30, 30, 30, 30, 30, 30,
1746 30, 30, 30, 30, 30, 30, 30, 30,
1747 30, 30, 30, 30, 0, 30, 0, 30,
1748 30, 30, 30, 0, 0, 0, 30, 0,
1749 30, 30, 30, 30, 30, 30, 30, 0,
1750 0, 30, 30, 30, 30, 30, 30, 30,
1751 22, 23, 22, 23, 22, 23, 22, 23,
1752 22, 23, 22, 23, 22, 23, 6, 6,
1753 6, 6, 6, 6, 6, 6, 6, 6,
1754 6, 6, 6, 6, 6, 6, 6, 6,
1755 6, 6, 6, 6, 6, 6, 6, 6,
1756 6, 6, 6, 6, 30, 0, 0, 0,
1757 30, 30, 30, 30, 30, 30, 30, 30,
1758 30, 30, 30, 30, 30, 30, 30, 30,
1759 30, 30, 30, 30, 30, 30, 30, 30,
1760 0, 30, 30, 30, 30, 30, 30, 30,
1761 30, 30, 30, 30, 30, 30, 30, 0,
1762 0, 0, 0, 0, 0, 0, 0, 0,
1763 0, 0, 0, 0, 0, 0, 0, 0,
1764 27, 27, 27, 27, 27, 27, 27, 27,
1765 27, 27, 27, 27, 27, 27, 27, 27,
1766 27, 27, 27, 27, 27, 27, 22, 23,
1767 22, 23, 22, 23, 0, 0, 0, 0,
1768 27, 27, 27, 27, 27, 27, 27, 27,
1769 27, 27, 27, 27, 27, 27, 27, 27,
1770
1771 30, 30, 30, 30, 30, 30, 30, 30,
1772 30, 30, 30, 30, 30, 30, 30, 30,
1773 30, 30, 30, 30, 30, 30, 30, 30,
1774 30, 30, 30, 30, 30, 30, 30, 30,
1775 30, 30, 30, 30, 30, 30, 30, 30,
1776 30, 30, 30, 30, 30, 30, 30, 30,
1777 30, 30, 30, 30, 30, 30, 30, 30,
1778 30, 30, 30, 30, 30, 30, 30, 30,
1779 30, 30, 30, 30, 30, 30, 30, 30,
1780 30, 30, 30, 30, 30, 30, 30, 30,
1781 30, 30, 30, 30, 30, 30, 30, 30,
1782 30, 30, 30, 30, 30, 30, 30, 30,
1783 30, 30, 30, 30, 30, 30, 30, 30,
1784 30, 30, 30, 30, 30, 30, 30, 30,
1785 30, 30, 30, 30, 30, 30, 30, 30,
1786 30, 30, 30, 30, 30, 30, 30, 30,
1787 30, 30, 30, 30, 30, 30, 30, 30,
1788 30, 30, 30, 30, 30, 30, 30, 30,
1789 30, 30, 30, 30, 30, 30, 30, 30,
1790 30, 30, 30, 30, 30, 30, 30, 30,
1791 30, 30, 30, 30, 30, 30, 30, 30,
1792 30, 30, 30, 30, 30, 30, 30, 30,
1793 30, 30, 30, 30, 30, 30, 30, 30,
1794 30, 30, 30, 30, 30, 30, 30, 30,
1795 30, 30, 30, 30, 30, 30, 30, 30,
1796 30, 30, 30, 30, 30, 30, 30, 30,
1797 30, 30, 30, 30, 30, 30, 30, 30,
1798 30, 30, 30, 30, 30, 30, 30, 30,
1799 30, 30, 30, 30, 30, 30, 30, 30,
1800 30, 30, 30, 30, 30, 30, 30, 30,
1801 30, 30, 30, 30, 30, 30, 30, 30,
1802 30, 30, 30, 30, 30, 30, 30, 30,
1803
1804 27, 27, 27, 27, 27, 27, 27, 27,
1805 27, 27, 27, 27, 27, 27, 27, 27,
1806 27, 27, 27, 27, 27, 27, 27, 27,
1807 27, 27, 27, 27, 27, 27, 27, 27,
1808 27, 27, 27, 27, 27, 27, 27, 27,
1809 27, 27, 27, 27, 27, 27, 27, 27,
1810 27, 27, 27, 27, 27, 27, 27, 27,
1811 27, 27, 27, 27, 27, 27, 27, 27,
1812 27, 27, 27, 27, 27, 27, 27, 27,
1813 27, 27, 27, 27, 27, 27, 27, 27,
1814 27, 27, 27, 27, 27, 27, 27, 27,
1815 27, 27, 27, 27, 27, 27, 27, 27,
1816 27, 27, 27, 27, 27, 27, 27, 27,
1817 27, 27, 27, 27, 27, 27, 27, 27,
1818 27, 27, 27, 27, 27, 27, 27, 27,
1819 27, 27, 27, 27, 27, 27, 27, 27,
1820 27, 27, 27, 22, 23, 22, 23, 22,
1821 23, 22, 23, 22, 23, 22, 23, 22,
1822 23, 22, 23, 22, 23, 22, 23, 22,
1823 23, 27, 27, 27, 27, 27, 27, 27,
1824 27, 27, 27, 27, 27, 27, 27, 27,
1825 27, 27, 27, 27, 27, 27, 27, 27,
1826 27, 27, 27, 27, 27, 27, 27, 27,
1827 27, 27, 27, 27, 27, 27, 27, 27,
1828 27, 27, 27, 27, 27, 27, 27, 27,
1829 27, 27, 27, 27, 27, 27, 27, 27,
1830 27, 27, 27, 27, 27, 27, 27, 27,
1831 22, 23, 22, 23, 27, 27, 27, 27,
1832 27, 27, 27, 27, 27, 27, 27, 27,
1833 27, 27, 27, 27, 27, 27, 27, 27,
1834 27, 27, 27, 27, 27, 27, 27, 27,
1835 27, 27, 27, 27, 22, 23, 27, 27,
1836
1837 0, 0, 0, 0, 0, 0, 0, 0,
1838 0, 0, 0, 0, 0, 0, 0, 0,
1839 0, 0, 0, 0, 0, 0, 0, 0,
1840 0, 0, 0, 0, 0, 0, 0, 0,
1841 0, 0, 0, 0, 0, 0, 0, 0,
1842 0, 0, 0, 0, 0, 0, 0, 0,
1843 0, 0, 0, 0, 0, 0, 0, 0,
1844 0, 0, 0, 0, 0, 0, 0, 0,
1845 0, 0, 0, 0, 0, 0, 0, 0,
1846 0, 0, 0, 0, 0, 0, 0, 0,
1847 0, 0, 0, 0, 0, 0, 0, 0,
1848 0, 0, 0, 0, 0, 0, 0, 0,
1849 0, 0, 0, 0, 0, 0, 0, 0,
1850 0, 0, 0, 0, 0, 0, 0, 0,
1851 0, 0, 0, 0, 0, 0, 0, 0,
1852 0, 0, 0, 0, 0, 0, 0, 0,
1853 30, 30, 30, 30, 30, 30, 30, 30,
1854 30, 30, 30, 30, 30, 30, 30, 30,
1855 30, 30, 30, 30, 30, 30, 30, 30,
1856 30, 30, 0, 30, 30, 30, 30, 30,
1857 30, 30, 30, 30, 30, 30, 30, 30,
1858 30, 30, 30, 30, 30, 30, 30, 30,
1859 30, 30, 30, 30, 30, 30, 30, 30,
1860 30, 30, 30, 30, 30, 30, 30, 30,
1861 30, 30, 30, 30, 30, 30, 30, 30,
1862 30, 30, 30, 30, 30, 30, 30, 30,
1863 30, 30, 30, 30, 30, 30, 30, 30,
1864 30, 30, 30, 30, 30, 30, 30, 30,
1865 30, 30, 30, 30, 30, 30, 30, 30,
1866 30, 30, 30, 30, 30, 30, 30, 30,
1867 30, 30, 30, 30, 0, 0, 0, 0,
1868 0, 0, 0, 0, 0, 0, 0, 0,
1869
1870 30, 30, 30, 30, 30, 30, 30, 30,
1871 30, 30, 30, 30, 30, 30, 30, 30,
1872 30, 30, 30, 30, 30, 30, 30, 30,
1873 30, 30, 30, 30, 30, 30, 30, 30,
1874 30, 30, 30, 30, 30, 30, 30, 30,
1875 30, 30, 30, 30, 30, 30, 30, 30,
1876 30, 30, 30, 30, 30, 30, 30, 30,
1877 30, 30, 30, 30, 30, 30, 30, 30,
1878 30, 30, 30, 30, 30, 30, 30, 30,
1879 30, 30, 30, 30, 30, 30, 30, 30,
1880 30, 30, 30, 30, 30, 30, 30, 30,
1881 30, 30, 30, 30, 30, 30, 30, 30,
1882 30, 30, 30, 30, 30, 30, 30, 30,
1883 30, 30, 30, 30, 30, 30, 30, 30,
1884 30, 30, 30, 30, 30, 30, 30, 30,
1885 30, 30, 30, 30, 30, 30, 30, 30,
1886 30, 30, 30, 30, 30, 30, 30, 30,
1887 30, 30, 30, 30, 30, 30, 30, 30,
1888 30, 30, 30, 30, 30, 30, 30, 30,
1889 30, 30, 30, 30, 30, 30, 30, 30,
1890 30, 30, 30, 30, 30, 30, 30, 30,
1891 30, 30, 30, 30, 30, 30, 30, 30,
1892 30, 30, 30, 30, 30, 30, 30, 30,
1893 30, 30, 30, 30, 30, 30, 30, 30,
1894 30, 30, 30, 30, 30, 30, 30, 30,
1895 30, 30, 30, 30, 30, 30, 30, 30,
1896 30, 30, 30, 30, 30, 30, 0, 0,
1897 0, 0, 0, 0, 0, 0, 0, 0,
1898 0, 0, 0, 0, 0, 0, 0, 0,
1899 0, 0, 0, 0, 0, 0, 0, 0,
1900 30, 30, 30, 30, 30, 30, 30, 30,
1901 30, 30, 30, 30, 0, 0, 0, 0,
1902
1903 7, 26, 26, 26, 30, 18, 19, 5,
1904 22, 23, 22, 23, 22, 23, 22, 23,
1905 22, 23, 30, 30, 22, 23, 22, 23,
1906 22, 23, 22, 23, 21, 22, 23, 23,
1907 30, 5, 5, 5, 5, 5, 5, 5,
1908 5, 5, 1, 1, 1, 1, 1, 1,
1909 21, 18, 18, 18, 18, 18, 30, 30,
1910 5, 5, 5, 18, 19, 26, 30, 30,
1911 0, 19, 19, 19, 19, 19, 19, 19,
1912 19, 19, 19, 19, 19, 19, 19, 19,
1913 19, 19, 19, 19, 19, 19, 19, 19,
1914 19, 19, 19, 19, 19, 19, 19, 19,
1915 19, 19, 19, 19, 19, 19, 19, 19,
1916 19, 19, 19, 19, 19, 19, 19, 19,
1917 19, 19, 19, 19, 19, 19, 19, 19,
1918 19, 19, 19, 19, 19, 19, 19, 19,
1919 19, 19, 19, 19, 19, 19, 19, 19,
1920 19, 19, 19, 19, 19, 19, 19, 19,
1921 19, 19, 19, 19, 19, 19, 19, 0,
1922 0, 1, 1, 29, 29, 18, 18, 19,
1923 21, 19, 19, 19, 19, 19, 19, 19,
1924 19, 19, 19, 19, 19, 19, 19, 19,
1925 19, 19, 19, 19, 19, 19, 19, 19,
1926 19, 19, 19, 19, 19, 19, 19, 19,
1927 19, 19, 19, 19, 19, 19, 19, 19,
1928 19, 19, 19, 19, 19, 19, 19, 19,
1929 19, 19, 19, 19, 19, 19, 19, 19,
1930 19, 19, 19, 19, 19, 19, 19, 19,
1931 19, 19, 19, 19, 19, 19, 19, 19,
1932 19, 19, 19, 19, 19, 19, 19, 19,
1933 19, 19, 19, 19, 19, 19, 19, 19,
1934 19, 19, 19, 20, 18, 18, 18, 19,
1935
1936 0, 0, 0, 0, 0, 19, 19, 19,
1937 19, 19, 19, 19, 19, 19, 19, 19,
1938 19, 19, 19, 19, 19, 19, 19, 19,
1939 19, 19, 19, 19, 19, 19, 19, 19,
1940 19, 19, 19, 19, 19, 19, 19, 19,
1941 19, 19, 19, 19, 19, 0, 0, 0,
1942 0, 19, 19, 19, 19, 19, 19, 19,
1943 19, 19, 19, 19, 19, 19, 19, 19,
1944 19, 19, 19, 19, 19, 19, 19, 19,
1945 19, 19, 19, 19, 19, 19, 19, 19,
1946 19, 19, 19, 19, 19, 19, 19, 19,
1947 19, 19, 19, 19, 19, 19, 19, 19,
1948 19, 19, 19, 19, 19, 19, 19, 19,
1949 19, 19, 19, 19, 19, 19, 19, 19,
1950 19, 19, 19, 19, 19, 19, 19, 19,
1951 19, 19, 19, 19, 19, 19, 19, 19,
1952 19, 19, 19, 19, 19, 19, 19, 19,
1953 19, 19, 19, 19, 19, 19, 19, 0,
1954 30, 30, 6, 6, 6, 6, 30, 30,
1955 30, 30, 30, 30, 30, 30, 30, 30,
1956 19, 19, 19, 19, 19, 19, 19, 19,
1957 19, 19, 19, 19, 19, 19, 19, 19,
1958 19, 19, 19, 19, 19, 19, 19, 19,
1959 0, 0, 0, 0, 0, 0, 0, 0,
1960 0, 0, 0, 0, 0, 0, 0, 0,
1961 0, 0, 0, 0, 0, 0, 0, 0,
1962 0, 0, 0, 0, 0, 0, 0, 0,
1963 0, 0, 0, 0, 0, 0, 0, 0,
1964 0, 0, 0, 0, 0, 0, 0, 0,
1965 0, 0, 0, 0, 0, 0, 0, 0,
1966 19, 19, 19, 19, 19, 19, 19, 19,
1967 19, 19, 19, 19, 19, 19, 19, 19,
1968
1969 30, 30, 30, 30, 30, 30, 30, 30,
1970 30, 30, 30, 30, 30, 30, 30, 30,
1971 30, 30, 30, 30, 30, 30, 30, 30,
1972 30, 30, 30, 30, 30, 0, 0, 0,
1973 6, 6, 6, 6, 6, 6, 6, 6,
1974 6, 6, 30, 30, 30, 30, 30, 30,
1975 30, 30, 30, 30, 30, 30, 30, 30,
1976 30, 30, 30, 30, 30, 30, 30, 30,
1977 30, 30, 30, 30, 0, 0, 0, 0,
1978 0, 0, 0, 0, 0, 0, 0, 0,
1979 0, 6, 6, 6, 6, 6, 6, 6,
1980 6, 6, 6, 6, 6, 6, 6, 6,
1981 30, 30, 30, 30, 30, 30, 30, 30,
1982 30, 30, 30, 30, 30, 30, 30, 30,
1983 30, 30, 30, 30, 30, 30, 30, 30,
1984 30, 30, 30, 30, 0, 0, 0, 30,
1985 6, 6, 6, 6, 6, 6, 6, 6,
1986 6, 6, 30, 30, 30, 30, 30, 30,
1987 30, 30, 30, 30, 30, 30, 30, 30,
1988 30, 30, 30, 30, 30, 30, 30, 30,
1989 30, 30, 30, 30, 30, 30, 30, 30,
1990 30, 30, 30, 30, 30, 30, 30, 30,
1991 30, 6, 6, 6, 6, 6, 6, 6,
1992 6, 6, 6, 6, 6, 6, 6, 6,
1993 30, 30, 30, 30, 30, 30, 30, 30,
1994 30, 30, 30, 30, 0, 0, 0, 0,
1995 30, 30, 30, 30, 30, 30, 30, 30,
1996 30, 30, 30, 30, 30, 30, 30, 30,
1997 30, 30, 30, 30, 30, 30, 30, 30,
1998 30, 30, 30, 30, 30, 30, 30, 30,
1999 30, 30, 30, 30, 30, 30, 30, 30,
2000 30, 30, 30, 30, 30, 30, 30, 0,
2001
2002 30, 30, 30, 30, 30, 30, 30, 30,
2003 30, 30, 30, 30, 30, 30, 30, 30,
2004 30, 30, 30, 30, 30, 30, 30, 30,
2005 30, 30, 30, 30, 30, 30, 30, 30,
2006 30, 30, 30, 30, 30, 30, 30, 30,
2007 30, 30, 30, 30, 30, 30, 30, 30,
2008 30, 30, 30, 30, 30, 30, 30, 30,
2009 30, 30, 30, 30, 30, 30, 30, 30,
2010 30, 30, 30, 30, 30, 30, 30, 30,
2011 30, 30, 30, 30, 30, 30, 30, 30,
2012 30, 30, 30, 30, 30, 30, 30, 30,
2013 30, 30, 30, 30, 30, 30, 30, 30,
2014 30, 30, 30, 30, 30, 30, 30, 30,
2015 30, 30, 30, 30, 30, 30, 30, 30,
2016 30, 30, 30, 30, 30, 30, 30, 0,
2017 0, 0, 0, 30, 30, 30, 30, 30,
2018 30, 30, 30, 30, 30, 30, 30, 30,
2019 30, 30, 30, 30, 30, 30, 30, 30,
2020 30, 30, 30, 30, 30, 30, 30, 30,
2021 30, 30, 30, 30, 30, 30, 30, 30,
2022 30, 30, 30, 30, 30, 30, 30, 30,
2023 30, 30, 30, 30, 30, 30, 30, 30,
2024 30, 30, 30, 30, 30, 30, 30, 30,
2025 30, 30, 30, 30, 30, 30, 30, 30,
2026 30, 30, 30, 30, 30, 30, 30, 30,
2027 30, 30, 30, 30, 30, 30, 30, 30,
2028 30, 30, 30, 30, 30, 30, 30, 30,
2029 30, 30, 30, 30, 30, 30, 0, 0,
2030 30, 30, 30, 30, 30, 30, 30, 30,
2031 30, 30, 30, 30, 30, 30, 30, 30,
2032 30, 30, 30, 30, 30, 30, 30, 30,
2033 30, 30, 30, 30, 30, 30, 30, 0,
2034
2035 19, 19, 19, 19, 19, 19, 19, 19,
2036 19, 19, 19, 19, 19, 19, 19, 19,
2037 19, 19, 19, 19, 19, 19, 19, 19,
2038 19, 19, 19, 19, 19, 19, 19, 19,
2039 19, 19, 19, 19, 19, 19, 19, 19,
2040 19, 19, 19, 19, 19, 19, 19, 19,
2041 19, 19, 19, 19, 19, 19, 19, 19,
2042 19, 19, 19, 19, 19, 19, 19, 19,
2043 19, 19, 19, 19, 19, 19, 19, 19,
2044 19, 19, 19, 19, 19, 19, 19, 19,
2045 19, 19, 19, 19, 19, 19, 19, 19,
2046 19, 19, 19, 19, 19, 19, 19, 19,
2047 19, 19, 19, 19, 19, 19, 19, 19,
2048 19, 19, 19, 19, 19, 19, 19, 19,
2049 19, 19, 19, 19, 19, 19, 19, 19,
2050 19, 19, 19, 19, 19, 19, 19, 19,
2051 19, 19, 19, 19, 19, 19, 19, 19,
2052 19, 19, 19, 19, 19, 19, 19, 19,
2053 19, 19, 19, 19, 19, 19, 19, 19,
2054 19, 19, 19, 19, 19, 19, 19, 19,
2055 19, 19, 19, 19, 19, 19, 19, 19,
2056 19, 19, 19, 19, 19, 19, 19, 19,
2057 19, 19, 19, 19, 19, 19, 0, 0,
2058 0, 0, 0, 0, 0, 0, 0, 0,
2059 0, 0, 0, 0, 0, 0, 0, 0,
2060 0, 0, 0, 0, 0, 0, 0, 0,
2061 0, 0, 0, 0, 0, 0, 0, 0,
2062 0, 0, 0, 0, 0, 0, 0, 0,
2063 0, 0, 0, 0, 0, 0, 0, 0,
2064 0, 0, 0, 0, 0, 0, 0, 0,
2065 0, 0, 0, 0, 0, 0, 0, 0,
2066 0, 0, 0, 0, 0, 0, 0, 0,
2067
2068 19, 19, 19, 19, 19, 19, 19, 19,
2069 19, 19, 19, 19, 19, 19, 19, 19,
2070 19, 19, 19, 19, 19, 19, 19, 19,
2071 19, 19, 19, 19, 19, 19, 19, 19,
2072 19, 19, 19, 19, 19, 19, 19, 19,
2073 19, 19, 19, 19, 19, 19, 19, 19,
2074 19, 19, 19, 19, 19, 19, 19, 19,
2075 19, 19, 19, 19, 19, 19, 19, 19,
2076 19, 19, 19, 19, 19, 19, 19, 19,
2077 19, 19, 19, 19, 19, 19, 19, 19,
2078 19, 19, 19, 19, 19, 19, 19, 19,
2079 19, 19, 19, 19, 19, 19, 19, 19,
2080 19, 19, 19, 19, 19, 19, 19, 19,
2081 19, 19, 19, 19, 19, 19, 19, 19,
2082 19, 19, 19, 19, 19, 19, 19, 19,
2083 19, 19, 19, 19, 19, 19, 19, 19,
2084 19, 19, 19, 19, 19, 19, 19, 19,
2085 19, 19, 19, 19, 19, 19, 19, 19,
2086 19, 19, 19, 19, 19, 19, 19, 19,
2087 19, 19, 19, 19, 19, 19, 19, 19,
2088 19, 19, 19, 19, 19, 19, 0, 0,
2089 0, 0, 0, 0, 0, 0, 0, 0,
2090 0, 0, 0, 0, 0, 0, 0, 0,
2091 0, 0, 0, 0, 0, 0, 0, 0,
2092 0, 0, 0, 0, 0, 0, 0, 0,
2093 0, 0, 0, 0, 0, 0, 0, 0,
2094 0, 0, 0, 0, 0, 0, 0, 0,
2095 0, 0, 0, 0, 0, 0, 0, 0,
2096 0, 0, 0, 0, 0, 0, 0, 0,
2097 0, 0, 0, 0, 0, 0, 0, 0,
2098 0, 0, 0, 0, 0, 0, 0, 0,
2099 0, 0, 0, 0, 0, 0, 0, 0,
2100
2101 19, 19, 19, 19, 19, 19, 19, 19,
2102 19, 19, 19, 19, 19, 19, 19, 19,
2103 19, 19, 19, 19, 19, 19, 19, 19,
2104 19, 19, 19, 19, 19, 19, 19, 19,
2105 19, 19, 19, 19, 19, 19, 19, 19,
2106 19, 19, 19, 19, 19, 19, 19, 19,
2107 19, 19, 19, 19, 19, 19, 19, 19,
2108 19, 19, 19, 19, 19, 19, 19, 19,
2109 19, 19, 19, 19, 19, 19, 19, 19,
2110 19, 19, 19, 19, 19, 19, 19, 19,
2111 19, 19, 19, 19, 19, 19, 19, 19,
2112 19, 19, 19, 19, 19, 19, 19, 19,
2113 19, 19, 19, 19, 19, 19, 19, 19,
2114 19, 19, 19, 19, 19, 19, 19, 19,
2115 19, 19, 19, 19, 19, 19, 19, 19,
2116 19, 19, 19, 19, 19, 19, 19, 19,
2117 19, 19, 19, 19, 19, 19, 19, 19,
2118 19, 19, 19, 19, 19, 0, 0, 0,
2119 30, 30, 30, 30, 30, 30, 30, 30,
2120 30, 30, 30, 30, 30, 30, 30, 30,
2121 30, 30, 30, 30, 30, 30, 30, 30,
2122 30, 30, 30, 30, 30, 30, 30, 30,
2123 30, 30, 30, 30, 30, 30, 30, 30,
2124 30, 30, 30, 30, 30, 30, 30, 30,
2125 30, 30, 30, 30, 30, 30, 30, 0,
2126 0, 0, 0, 0, 0, 0, 0, 0,
2127 0, 0, 0, 0, 0, 0, 0, 0,
2128 0, 0, 0, 0, 0, 0, 0, 0,
2129 0, 0, 0, 0, 0, 0, 0, 0,
2130 0, 0, 0, 0, 0, 0, 0, 0,
2131 0, 0, 0, 0, 0, 0, 0, 0,
2132 0, 0, 0, 0, 0, 0, 0, 0,
2133
2134 19, 19, 19, 19, 19, 19, 19, 19,
2135 19, 19, 19, 19, 19, 19, 19, 19,
2136 19, 19, 19, 19, 19, 19, 19, 19,
2137 19, 19, 19, 19, 19, 19, 19, 19,
2138 19, 19, 19, 19, 19, 19, 19, 19,
2139 19, 19, 19, 19, 19, 19, 19, 19,
2140 19, 19, 19, 19, 19, 19, 19, 19,
2141 19, 19, 19, 19, 19, 19, 19, 19,
2142 19, 19, 19, 19, 19, 19, 19, 19,
2143 19, 19, 19, 19, 19, 19, 19, 19,
2144 19, 19, 19, 19, 19, 19, 19, 19,
2145 19, 19, 19, 19, 19, 19, 19, 19,
2146 19, 19, 19, 19, 19, 19, 19, 19,
2147 19, 19, 19, 19, 19, 19, 19, 19,
2148 19, 19, 19, 19, 19, 19, 19, 19,
2149 19, 19, 19, 19, 19, 19, 19, 19,
2150 19, 19, 19, 19, 19, 19, 19, 19,
2151 19, 19, 19, 19, 19, 19, 19, 19,
2152 19, 19, 19, 19, 19, 19, 19, 19,
2153 19, 19, 19, 19, 19, 19, 19, 19,
2154 19, 19, 19, 19, 0, 0, 0, 0,
2155 0, 0, 0, 0, 0, 0, 0, 0,
2156 0, 0, 0, 0, 0, 0, 0, 0,
2157 0, 0, 0, 0, 0, 0, 0, 0,
2158 0, 0, 0, 0, 0, 0, 0, 0,
2159 0, 0, 0, 0, 0, 0, 0, 0,
2160 0, 0, 0, 0, 0, 0, 0, 0,
2161 0, 0, 0, 0, 0, 0, 0, 0,
2162 0, 0, 0, 0, 0, 0, 0, 0,
2163 0, 0, 0, 0, 0, 0, 0, 0,
2164 0, 0, 0, 0, 0, 0, 0, 0,
2165 0, 0, 0, 0, 0, 0, 0, 0,
2166
2167 12, 12, 12, 12, 12, 12, 12, 12,
2168 12, 12, 12, 12, 12, 12, 12, 12,
2169 12, 12, 12, 12, 12, 12, 12, 12,
2170 12, 12, 12, 12, 12, 12, 12, 12,
2171 12, 12, 12, 12, 12, 12, 12, 12,
2172 12, 12, 12, 12, 12, 12, 12, 12,
2173 12, 12, 12, 12, 12, 12, 12, 12,
2174 12, 12, 12, 12, 12, 12, 12, 12,
2175 12, 12, 12, 12, 12, 12, 12, 12,
2176 12, 12, 12, 12, 12, 12, 12, 12,
2177 12, 12, 12, 12, 12, 12, 12, 12,
2178 12, 12, 12, 12, 12, 12, 12, 12,
2179 12, 12, 12, 12, 12, 12, 12, 12,
2180 12, 12, 12, 12, 12, 12, 12, 12,
2181 12, 12, 12, 12, 12, 12, 12, 12,
2182 12, 12, 12, 12, 12, 12, 12, 12,
2183 12, 12, 12, 12, 12, 12, 12, 12,
2184 12, 12, 12, 12, 12, 12, 12, 12,
2185 12, 12, 12, 12, 12, 12, 12, 12,
2186 12, 12, 12, 12, 12, 12, 12, 12,
2187 12, 12, 12, 12, 12, 12, 12, 12,
2188 12, 12, 12, 12, 12, 12, 12, 12,
2189 12, 12, 12, 12, 12, 12, 12, 12,
2190 12, 12, 12, 12, 12, 12, 12, 12,
2191 12, 12, 12, 12, 12, 12, 12, 12,
2192 12, 12, 12, 12, 12, 12, 12, 12,
2193 12, 12, 12, 12, 12, 12, 12, 12,
2194 12, 12, 12, 12, 12, 12, 12, 12,
2195 12, 12, 12, 12, 12, 12, 12, 12,
2196 12, 12, 12, 12, 12, 12, 12, 12,
2197 12, 12, 12, 12, 12, 12, 12, 12,
2198 12, 12, 12, 12, 12, 12, 12, 12,
2199
2200 13, 13, 13, 13, 13, 13, 13, 13,
2201 13, 13, 13, 13, 13, 13, 13, 13,
2202 13, 13, 13, 13, 13, 13, 13, 13,
2203 13, 13, 13, 13, 13, 13, 13, 13,
2204 13, 13, 13, 13, 13, 13, 13, 13,
2205 13, 13, 13, 13, 13, 13, 13, 13,
2206 13, 13, 13, 13, 13, 13, 13, 13,
2207 13, 13, 13, 13, 13, 13, 13, 13,
2208 13, 13, 13, 13, 13, 13, 13, 13,
2209 13, 13, 13, 13, 13, 13, 13, 13,
2210 13, 13, 13, 13, 13, 13, 13, 13,
2211 13, 13, 13, 13, 13, 13, 13, 13,
2212 13, 13, 13, 13, 13, 13, 13, 13,
2213 13, 13, 13, 13, 13, 13, 13, 13,
2214 13, 13, 13, 13, 13, 13, 13, 13,
2215 13, 13, 13, 13, 13, 13, 13, 13,
2216 13, 13, 13, 13, 13, 13, 13, 13,
2217 13, 13, 13, 13, 13, 13, 13, 13,
2218 13, 13, 13, 13, 13, 13, 13, 13,
2219 13, 13, 13, 13, 13, 13, 13, 13,
2220 13, 13, 13, 13, 13, 13, 13, 13,
2221 13, 13, 13, 13, 13, 13, 13, 13,
2222 13, 13, 13, 13, 13, 13, 13, 13,
2223 13, 13, 13, 13, 13, 13, 13, 13,
2224 13, 13, 13, 13, 13, 13, 13, 13,
2225 13, 13, 13, 13, 13, 13, 13, 13,
2226 13, 13, 13, 13, 13, 13, 13, 13,
2227 13, 13, 13, 13, 13, 13, 13, 13,
2228 13, 13, 13, 13, 13, 13, 13, 13,
2229 13, 13, 13, 13, 13, 13, 13, 13,
2230 13, 13, 13, 13, 13, 13, 13, 13,
2231 13, 13, 13, 13, 13, 13, 13, 13,
2232
2233 19, 19, 19, 19, 19, 19, 19, 19,
2234 19, 19, 19, 19, 19, 19, 19, 19,
2235 19, 19, 19, 19, 19, 19, 19, 19,
2236 19, 19, 19, 19, 19, 19, 19, 19,
2237 19, 19, 19, 19, 19, 19, 19, 19,
2238 19, 19, 19, 19, 19, 19, 0, 0,
2239 19, 19, 19, 19, 19, 19, 19, 19,
2240 19, 19, 19, 19, 19, 19, 19, 19,
2241 19, 19, 19, 19, 19, 19, 19, 19,
2242 19, 19, 19, 19, 19, 19, 19, 19,
2243 19, 19, 19, 19, 19, 19, 19, 19,
2244 19, 19, 19, 19, 19, 19, 19, 19,
2245 19, 19, 19, 19, 19, 19, 19, 19,
2246 19, 19, 19, 0, 0, 0, 0, 0,
2247 0, 0, 0, 0, 0, 0, 0, 0,
2248 0, 0, 0, 0, 0, 0, 0, 0,
2249 0, 0, 0, 0, 0, 0, 0, 0,
2250 0, 0, 0, 0, 0, 0, 0, 0,
2251 0, 0, 0, 0, 0, 0, 0, 0,
2252 0, 0, 0, 0, 0, 0, 0, 0,
2253 0, 0, 0, 0, 0, 0, 0, 0,
2254 0, 0, 0, 0, 0, 0, 0, 0,
2255 0, 0, 0, 0, 0, 0, 0, 0,
2256 0, 0, 0, 0, 0, 0, 0, 0,
2257 0, 0, 0, 0, 0, 0, 0, 0,
2258 0, 0, 0, 0, 0, 0, 0, 0,
2259 0, 0, 0, 0, 0, 0, 0, 0,
2260 0, 0, 0, 0, 0, 0, 0, 0,
2261 0, 0, 0, 0, 0, 0, 0, 0,
2262 0, 0, 0, 0, 0, 0, 0, 0,
2263 0, 0, 0, 0, 0, 0, 0, 0,
2264 0, 0, 0, 0, 0, 0, 0, 0,
2265
2266 16, 16, 16, 16, 16, 16, 16, 0,
2267 0, 0, 0, 0, 0, 0, 0, 0,
2268 0, 0, 0, 16, 16, 16, 16, 16,
2269 0, 0, 0, 0, 0, 19, 1, 19,
2270 19, 19, 19, 19, 19, 19, 19, 19,
2271 19, 27, 19, 19, 19, 19, 19, 19,
2272 19, 19, 19, 19, 19, 19, 19, 0,
2273 19, 19, 19, 19, 19, 0, 19, 0,
2274 19, 19, 0, 19, 19, 0, 19, 19,
2275 19, 19, 19, 19, 19, 19, 19, 19,
2276 19, 19, 19, 19, 19, 19, 19, 19,
2277 19, 19, 19, 19, 19, 19, 19, 19,
2278 19, 19, 19, 19, 19, 19, 19, 19,
2279 19, 19, 19, 19, 19, 19, 19, 19,
2280 19, 19, 19, 19, 19, 19, 19, 19,
2281 19, 19, 19, 19, 19, 19, 19, 19,
2282 19, 19, 19, 19, 19, 19, 19, 19,
2283 19, 19, 19, 19, 19, 19, 19, 19,
2284 19, 19, 19, 19, 19, 19, 19, 19,
2285 19, 19, 19, 19, 19, 19, 19, 19,
2286 19, 19, 19, 19, 19, 19, 19, 19,
2287 19, 19, 19, 19, 19, 19, 19, 19,
2288 19, 19, 0, 0, 0, 0, 0, 0,
2289 0, 0, 0, 0, 0, 0, 0, 0,
2290 0, 0, 0, 0, 0, 0, 0, 0,
2291 0, 0, 0, 0, 0, 0, 0, 0,
2292 0, 0, 0, 19, 19, 19, 19, 19,
2293 19, 19, 19, 19, 19, 19, 19, 19,
2294 19, 19, 19, 19, 19, 19, 19, 19,
2295 19, 19, 19, 19, 19, 19, 19, 19,
2296 19, 19, 19, 19, 19, 19, 19, 19,
2297 19, 19, 19, 19, 19, 19, 19, 19,
2298
2299 19, 19, 19, 19, 19, 19, 19, 19,
2300 19, 19, 19, 19, 19, 19, 19, 19,
2301 19, 19, 19, 19, 19, 19, 19, 19,
2302 19, 19, 19, 19, 19, 19, 19, 19,
2303 19, 19, 19, 19, 19, 19, 19, 19,
2304 19, 19, 19, 19, 19, 19, 19, 19,
2305 19, 19, 19, 19, 19, 19, 19, 19,
2306 19, 19, 19, 19, 19, 19, 22, 23,
2307 0, 0, 0, 0, 0, 0, 0, 0,
2308 0, 0, 0, 0, 0, 0, 0, 0,
2309 19, 19, 19, 19, 19, 19, 19, 19,
2310 19, 19, 19, 19, 19, 19, 19, 19,
2311 19, 19, 19, 19, 19, 19, 19, 19,
2312 19, 19, 19, 19, 19, 19, 19, 19,
2313 19, 19, 19, 19, 19, 19, 19, 19,
2314 19, 19, 19, 19, 19, 19, 19, 19,
2315 19, 19, 19, 19, 19, 19, 19, 19,
2316 19, 19, 19, 19, 19, 19, 19, 19,
2317 0, 0, 19, 19, 19, 19, 19, 19,
2318 19, 19, 19, 19, 19, 19, 19, 19,
2319 19, 19, 19, 19, 19, 19, 19, 19,
2320 19, 19, 19, 19, 19, 19, 19, 19,
2321 19, 19, 19, 19, 19, 19, 19, 19,
2322 19, 19, 19, 19, 19, 19, 19, 19,
2323 19, 19, 19, 19, 19, 19, 19, 19,
2324 0, 0, 0, 0, 0, 0, 0, 0,
2325 0, 0, 0, 0, 0, 0, 0, 0,
2326 0, 0, 0, 0, 0, 0, 0, 0,
2327 0, 0, 0, 0, 0, 0, 0, 0,
2328 0, 0, 0, 0, 0, 0, 0, 0,
2329 19, 19, 19, 19, 19, 19, 19, 19,
2330 19, 19, 19, 19, 28, 0, 0, 0,
2331
2332 1, 1, 1, 1, 1, 1, 1, 1,
2333 1, 1, 1, 1, 1, 1, 1, 1,
2334 0, 0, 0, 0, 0, 0, 0, 0,
2335 0, 0, 0, 0, 0, 0, 0, 0,
2336 1, 1, 1, 1, 0, 0, 0, 0,
2337 0, 0, 0, 0, 0, 0, 0, 0,
2338 26, 21, 21, 20, 20, 22, 23, 22,
2339 23, 22, 23, 22, 23, 22, 23, 22,
2340 23, 22, 23, 22, 23, 26, 26, 0,
2341 0, 26, 26, 26, 26, 20, 20, 20,
2342 26, 26, 26, 0, 26, 26, 26, 26,
2343 21, 22, 23, 22, 23, 22, 23, 26,
2344 26, 26, 27, 21, 27, 27, 27, 0,
2345 26, 28, 26, 26, 0, 0, 0, 0,
2346 19, 19, 19, 19, 19, 0, 19, 19,
2347 19, 19, 19, 19, 19, 19, 19, 19,
2348 19, 19, 19, 19, 19, 19, 19, 19,
2349 19, 19, 19, 19, 19, 19, 19, 19,
2350 19, 19, 19, 19, 19, 19, 19, 19,
2351 19, 19, 19, 19, 19, 19, 19, 19,
2352 19, 19, 19, 19, 19, 19, 19, 19,
2353 19, 19, 19, 19, 19, 19, 19, 19,
2354 19, 19, 19, 19, 19, 19, 19, 19,
2355 19, 19, 19, 19, 19, 19, 19, 19,
2356 19, 19, 19, 19, 19, 19, 19, 19,
2357 19, 19, 19, 19, 19, 19, 19, 19,
2358 19, 19, 19, 19, 19, 19, 19, 19,
2359 19, 19, 19, 19, 19, 19, 19, 19,
2360 19, 19, 19, 19, 19, 19, 19, 19,
2361 19, 19, 19, 19, 19, 19, 19, 19,
2362 19, 19, 19, 19, 19, 19, 19, 19,
2363 19, 19, 19, 19, 19, 0, 0, 11,
2364
2365 0, 26, 26, 26, 28, 26, 26, 26,
2366 22, 23, 26, 27, 26, 21, 26, 26,
2367 4, 4, 4, 4, 4, 4, 4, 4,
2368 4, 4, 26, 26, 27, 27, 27, 26,
2369 26, 15, 15, 15, 15, 15, 15, 15,
2370 15, 15, 15, 15, 15, 15, 15, 15,
2371 15, 15, 15, 15, 15, 15, 15, 15,
2372 15, 15, 15, 22, 26, 23, 29, 20,
2373 29, 16, 16, 16, 16, 16, 16, 16,
2374 16, 16, 16, 16, 16, 16, 16, 16,
2375 16, 16, 16, 16, 16, 16, 16, 16,
2376 16, 16, 16, 22, 27, 23, 27, 22,
2377 23, 26, 22, 23, 26, 20, 19, 19,
2378 19, 19, 19, 19, 19, 19, 19, 19,
2379 18, 19, 19, 19, 19, 19, 19, 19,
2380 19, 19, 19, 19, 19, 19, 19, 19,
2381 19, 19, 19, 19, 19, 19, 19, 19,
2382 19, 19, 19, 19, 19, 19, 19, 19,
2383 19, 19, 19, 19, 19, 19, 19, 19,
2384 19, 19, 19, 19, 19, 19, 18, 18,
2385 19, 19, 19, 19, 19, 19, 19, 19,
2386 19, 19, 19, 19, 19, 19, 19, 19,
2387 19, 19, 19, 19, 19, 19, 19, 19,
2388 19, 19, 19, 19, 19, 19, 19, 0,
2389 0, 0, 19, 19, 19, 19, 19, 19,
2390 0, 0, 19, 19, 19, 19, 19, 19,
2391 0, 0, 19, 19, 19, 19, 19, 19,
2392 0, 0, 19, 19, 19, 0, 0, 0,
2393 28, 28, 27, 29, 30, 28, 28, 0,
2394 30, 27, 27, 27, 27, 30, 30, 0,
2395 0, 0, 0, 0, 0, 0, 0, 0,
2396 0, 11, 11, 11, 30, 30, 0, 0,
2397};
2398
2399// 14080 bytes
2400
2401const Q_UINT16 QUnicodeTables::decomposition_map[] = {
2402 0,
2403 3, 0x00A0, 0x0020, 0,
2404 16, 0x00A8, 0x0020, 0x0308, 0,
2405 9, 0x00AA, 0x0061, 0,
2406 16, 0x00AF, 0x0020, 0x0304, 0,
2407 9, 0x00B2, 0x0032, 0,
2408 9, 0x00B3, 0x0033, 0,
2409 16, 0x00B4, 0x0020, 0x0301, 0,
2410 16, 0x00B5, 0x03BC, 0,
2411 16, 0x00B8, 0x0020, 0x0327, 0,
2412 9, 0x00B9, 0x0031, 0,
2413 9, 0x00BA, 0x006F, 0,
2414 17, 0x00BC, 0x0031, 0x2044, 0x0034, 0,
2415 17, 0x00BD, 0x0031, 0x2044, 0x0032, 0,
2416 17, 0x00BE, 0x0033, 0x2044, 0x0034, 0,
2417 1, 0x00C0, 0x0041, 0x0300, 0,
2418 1, 0x00C1, 0x0041, 0x0301, 0,
2419 1, 0x00C2, 0x0041, 0x0302, 0,
2420 1, 0x00C3, 0x0041, 0x0303, 0,
2421 1, 0x00C4, 0x0041, 0x0308, 0,
2422 1, 0x00C5, 0x0041, 0x030A, 0,
2423 1, 0x00C7, 0x0043, 0x0327, 0,
2424 1, 0x00C8, 0x0045, 0x0300, 0,
2425 1, 0x00C9, 0x0045, 0x0301, 0,
2426 1, 0x00CA, 0x0045, 0x0302, 0,
2427 1, 0x00CB, 0x0045, 0x0308, 0,
2428 1, 0x00CC, 0x0049, 0x0300, 0,
2429 1, 0x00CD, 0x0049, 0x0301, 0,
2430 1, 0x00CE, 0x0049, 0x0302, 0,
2431 1, 0x00CF, 0x0049, 0x0308, 0,
2432 1, 0x00D1, 0x004E, 0x0303, 0,
2433 1, 0x00D2, 0x004F, 0x0300, 0,
2434 1, 0x00D3, 0x004F, 0x0301, 0,
2435 1, 0x00D4, 0x004F, 0x0302, 0,
2436 1, 0x00D5, 0x004F, 0x0303, 0,
2437 1, 0x00D6, 0x004F, 0x0308, 0,
2438 1, 0x00D9, 0x0055, 0x0300, 0,
2439 1, 0x00DA, 0x0055, 0x0301, 0,
2440 1, 0x00DB, 0x0055, 0x0302, 0,
2441 1, 0x00DC, 0x0055, 0x0308, 0,
2442 1, 0x00DD, 0x0059, 0x0301, 0,
2443 1, 0x00E0, 0x0061, 0x0300, 0,
2444 1, 0x00E1, 0x0061, 0x0301, 0,
2445 1, 0x00E2, 0x0061, 0x0302, 0,
2446 1, 0x00E3, 0x0061, 0x0303, 0,
2447 1, 0x00E4, 0x0061, 0x0308, 0,
2448 1, 0x00E5, 0x0061, 0x030A, 0,
2449 1, 0x00E7, 0x0063, 0x0327, 0,
2450 1, 0x00E8, 0x0065, 0x0300, 0,
2451 1, 0x00E9, 0x0065, 0x0301, 0,
2452 1, 0x00EA, 0x0065, 0x0302, 0,
2453 1, 0x00EB, 0x0065, 0x0308, 0,
2454 1, 0x00EC, 0x0069, 0x0300, 0,
2455 1, 0x00ED, 0x0069, 0x0301, 0,
2456 1, 0x00EE, 0x0069, 0x0302, 0,
2457 1, 0x00EF, 0x0069, 0x0308, 0,
2458 1, 0x00F1, 0x006E, 0x0303, 0,
2459 1, 0x00F2, 0x006F, 0x0300, 0,
2460 1, 0x00F3, 0x006F, 0x0301, 0,
2461 1, 0x00F4, 0x006F, 0x0302, 0,
2462 1, 0x00F5, 0x006F, 0x0303, 0,
2463 1, 0x00F6, 0x006F, 0x0308, 0,
2464 1, 0x00F9, 0x0075, 0x0300, 0,
2465 1, 0x00FA, 0x0075, 0x0301, 0,
2466 1, 0x00FB, 0x0075, 0x0302, 0,
2467 1, 0x00FC, 0x0075, 0x0308, 0,
2468 1, 0x00FD, 0x0079, 0x0301, 0,
2469 1, 0x00FF, 0x0079, 0x0308, 0,
2470 1, 0x0100, 0x0041, 0x0304, 0,
2471 1, 0x0101, 0x0061, 0x0304, 0,
2472 1, 0x0102, 0x0041, 0x0306, 0,
2473 1, 0x0103, 0x0061, 0x0306, 0,
2474 1, 0x0104, 0x0041, 0x0328, 0,
2475 1, 0x0105, 0x0061, 0x0328, 0,
2476 1, 0x0106, 0x0043, 0x0301, 0,
2477 1, 0x0107, 0x0063, 0x0301, 0,
2478 1, 0x0108, 0x0043, 0x0302, 0,
2479 1, 0x0109, 0x0063, 0x0302, 0,
2480 1, 0x010A, 0x0043, 0x0307, 0,
2481 1, 0x010B, 0x0063, 0x0307, 0,
2482 1, 0x010C, 0x0043, 0x030C, 0,
2483 1, 0x010D, 0x0063, 0x030C, 0,
2484 1, 0x010E, 0x0044, 0x030C, 0,
2485 1, 0x010F, 0x0064, 0x030C, 0,
2486 1, 0x0112, 0x0045, 0x0304, 0,
2487 1, 0x0113, 0x0065, 0x0304, 0,
2488 1, 0x0114, 0x0045, 0x0306, 0,
2489 1, 0x0115, 0x0065, 0x0306, 0,
2490 1, 0x0116, 0x0045, 0x0307, 0,
2491 1, 0x0117, 0x0065, 0x0307, 0,
2492 1, 0x0118, 0x0045, 0x0328, 0,
2493 1, 0x0119, 0x0065, 0x0328, 0,
2494 1, 0x011A, 0x0045, 0x030C, 0,
2495 1, 0x011B, 0x0065, 0x030C, 0,
2496 1, 0x011C, 0x0047, 0x0302, 0,
2497 1, 0x011D, 0x0067, 0x0302, 0,
2498 1, 0x011E, 0x0047, 0x0306, 0,
2499 1, 0x011F, 0x0067, 0x0306, 0,
2500 1, 0x0120, 0x0047, 0x0307, 0,
2501 1, 0x0121, 0x0067, 0x0307, 0,
2502 1, 0x0122, 0x0047, 0x0327, 0,
2503 1, 0x0123, 0x0067, 0x0327, 0,
2504 1, 0x0124, 0x0048, 0x0302, 0,
2505 1, 0x0125, 0x0068, 0x0302, 0,
2506 1, 0x0128, 0x0049, 0x0303, 0,
2507 1, 0x0129, 0x0069, 0x0303, 0,
2508 1, 0x012A, 0x0049, 0x0304, 0,
2509 1, 0x012B, 0x0069, 0x0304, 0,
2510 1, 0x012C, 0x0049, 0x0306, 0,
2511 1, 0x012D, 0x0069, 0x0306, 0,
2512 1, 0x012E, 0x0049, 0x0328, 0,
2513 1, 0x012F, 0x0069, 0x0328, 0,
2514 1, 0x0130, 0x0049, 0x0307, 0,
2515 16, 0x0132, 0x0049, 0x004A, 0,
2516 16, 0x0133, 0x0069, 0x006A, 0,
2517 1, 0x0134, 0x004A, 0x0302, 0,
2518 1, 0x0135, 0x006A, 0x0302, 0,
2519 1, 0x0136, 0x004B, 0x0327, 0,
2520 1, 0x0137, 0x006B, 0x0327, 0,
2521 1, 0x0139, 0x004C, 0x0301, 0,
2522 1, 0x013A, 0x006C, 0x0301, 0,
2523 1, 0x013B, 0x004C, 0x0327, 0,
2524 1, 0x013C, 0x006C, 0x0327, 0,
2525 1, 0x013D, 0x004C, 0x030C, 0,
2526 1, 0x013E, 0x006C, 0x030C, 0,
2527 16, 0x013F, 0x004C, 0x00B7, 0,
2528 16, 0x0140, 0x006C, 0x00B7, 0,
2529 1, 0x0143, 0x004E, 0x0301, 0,
2530 1, 0x0144, 0x006E, 0x0301, 0,
2531 1, 0x0145, 0x004E, 0x0327, 0,
2532 1, 0x0146, 0x006E, 0x0327, 0,
2533 1, 0x0147, 0x004E, 0x030C, 0,
2534 1, 0x0148, 0x006E, 0x030C, 0,
2535 16, 0x0149, 0x02BC, 0x006E, 0,
2536 1, 0x014C, 0x004F, 0x0304, 0,
2537 1, 0x014D, 0x006F, 0x0304, 0,
2538 1, 0x014E, 0x004F, 0x0306, 0,
2539 1, 0x014F, 0x006F, 0x0306, 0,
2540 1, 0x0150, 0x004F, 0x030B, 0,
2541 1, 0x0151, 0x006F, 0x030B, 0,
2542 1, 0x0154, 0x0052, 0x0301, 0,
2543 1, 0x0155, 0x0072, 0x0301, 0,
2544 1, 0x0156, 0x0052, 0x0327, 0,
2545 1, 0x0157, 0x0072, 0x0327, 0,
2546 1, 0x0158, 0x0052, 0x030C, 0,
2547 1, 0x0159, 0x0072, 0x030C, 0,
2548 1, 0x015A, 0x0053, 0x0301, 0,
2549 1, 0x015B, 0x0073, 0x0301, 0,
2550 1, 0x015C, 0x0053, 0x0302, 0,
2551 1, 0x015D, 0x0073, 0x0302, 0,
2552 1, 0x015E, 0x0053, 0x0327, 0,
2553 1, 0x015F, 0x0073, 0x0327, 0,
2554 1, 0x0160, 0x0053, 0x030C, 0,
2555 1, 0x0161, 0x0073, 0x030C, 0,
2556 1, 0x0162, 0x0054, 0x0327, 0,
2557 1, 0x0163, 0x0074, 0x0327, 0,
2558 1, 0x0164, 0x0054, 0x030C, 0,
2559 1, 0x0165, 0x0074, 0x030C, 0,
2560 1, 0x0168, 0x0055, 0x0303, 0,
2561 1, 0x0169, 0x0075, 0x0303, 0,
2562 1, 0x016A, 0x0055, 0x0304, 0,
2563 1, 0x016B, 0x0075, 0x0304, 0,
2564 1, 0x016C, 0x0055, 0x0306, 0,
2565 1, 0x016D, 0x0075, 0x0306, 0,
2566 1, 0x016E, 0x0055, 0x030A, 0,
2567 1, 0x016F, 0x0075, 0x030A, 0,
2568 1, 0x0170, 0x0055, 0x030B, 0,
2569 1, 0x0171, 0x0075, 0x030B, 0,
2570 1, 0x0172, 0x0055, 0x0328, 0,
2571 1, 0x0173, 0x0075, 0x0328, 0,
2572 1, 0x0174, 0x0057, 0x0302, 0,
2573 1, 0x0175, 0x0077, 0x0302, 0,
2574 1, 0x0176, 0x0059, 0x0302, 0,
2575 1, 0x0177, 0x0079, 0x0302, 0,
2576 1, 0x0178, 0x0059, 0x0308, 0,
2577 1, 0x0179, 0x005A, 0x0301, 0,
2578 1, 0x017A, 0x007A, 0x0301, 0,
2579 1, 0x017B, 0x005A, 0x0307, 0,
2580 1, 0x017C, 0x007A, 0x0307, 0,
2581 1, 0x017D, 0x005A, 0x030C, 0,
2582 1, 0x017E, 0x007A, 0x030C, 0,
2583 16, 0x017F, 0x0073, 0,
2584 1, 0x01A0, 0x004F, 0x031B, 0,
2585 1, 0x01A1, 0x006F, 0x031B, 0,
2586 1, 0x01AF, 0x0055, 0x031B, 0,
2587 1, 0x01B0, 0x0075, 0x031B, 0,
2588 16, 0x01C4, 0x0044, 0x017D, 0,
2589 16, 0x01C5, 0x0044, 0x017E, 0,
2590 16, 0x01C6, 0x0064, 0x017E, 0,
2591 16, 0x01C7, 0x004C, 0x004A, 0,
2592 16, 0x01C8, 0x004C, 0x006A, 0,
2593 16, 0x01C9, 0x006C, 0x006A, 0,
2594 16, 0x01CA, 0x004E, 0x004A, 0,
2595 16, 0x01CB, 0x004E, 0x006A, 0,
2596 16, 0x01CC, 0x006E, 0x006A, 0,
2597 1, 0x01CD, 0x0041, 0x030C, 0,
2598 1, 0x01CE, 0x0061, 0x030C, 0,
2599 1, 0x01CF, 0x0049, 0x030C, 0,
2600 1, 0x01D0, 0x0069, 0x030C, 0,
2601 1, 0x01D1, 0x004F, 0x030C, 0,
2602 1, 0x01D2, 0x006F, 0x030C, 0,
2603 1, 0x01D3, 0x0055, 0x030C, 0,
2604 1, 0x01D4, 0x0075, 0x030C, 0,
2605 1, 0x01D5, 0x00DC, 0x0304, 0,
2606 1, 0x01D6, 0x00FC, 0x0304, 0,
2607 1, 0x01D7, 0x00DC, 0x0301, 0,
2608 1, 0x01D8, 0x00FC, 0x0301, 0,
2609 1, 0x01D9, 0x00DC, 0x030C, 0,
2610 1, 0x01DA, 0x00FC, 0x030C, 0,
2611 1, 0x01DB, 0x00DC, 0x0300, 0,
2612 1, 0x01DC, 0x00FC, 0x0300, 0,
2613 1, 0x01DE, 0x00C4, 0x0304, 0,
2614 1, 0x01DF, 0x00E4, 0x0304, 0,
2615 1, 0x01E0, 0x0226, 0x0304, 0,
2616 1, 0x01E1, 0x0227, 0x0304, 0,
2617 1, 0x01E2, 0x00C6, 0x0304, 0,
2618 1, 0x01E3, 0x00E6, 0x0304, 0,
2619 1, 0x01E6, 0x0047, 0x030C, 0,
2620 1, 0x01E7, 0x0067, 0x030C, 0,
2621 1, 0x01E8, 0x004B, 0x030C, 0,
2622 1, 0x01E9, 0x006B, 0x030C, 0,
2623 1, 0x01EA, 0x004F, 0x0328, 0,
2624 1, 0x01EB, 0x006F, 0x0328, 0,
2625 1, 0x01EC, 0x01EA, 0x0304, 0,
2626 1, 0x01ED, 0x01EB, 0x0304, 0,
2627 1, 0x01EE, 0x01B7, 0x030C, 0,
2628 1, 0x01EF, 0x0292, 0x030C, 0,
2629 1, 0x01F0, 0x006A, 0x030C, 0,
2630 16, 0x01F1, 0x0044, 0x005A, 0,
2631 16, 0x01F2, 0x0044, 0x007A, 0,
2632 16, 0x01F3, 0x0064, 0x007A, 0,
2633 1, 0x01F4, 0x0047, 0x0301, 0,
2634 1, 0x01F5, 0x0067, 0x0301, 0,
2635 1, 0x01F8, 0x004E, 0x0300, 0,
2636 1, 0x01F9, 0x006E, 0x0300, 0,
2637 1, 0x01FA, 0x00C5, 0x0301, 0,
2638 1, 0x01FB, 0x00E5, 0x0301, 0,
2639 1, 0x01FC, 0x00C6, 0x0301, 0,
2640 1, 0x01FD, 0x00E6, 0x0301, 0,
2641 1, 0x01FE, 0x00D8, 0x0301, 0,
2642 1, 0x01FF, 0x00F8, 0x0301, 0,
2643 1, 0x0200, 0x0041, 0x030F, 0,
2644 1, 0x0201, 0x0061, 0x030F, 0,
2645 1, 0x0202, 0x0041, 0x0311, 0,
2646 1, 0x0203, 0x0061, 0x0311, 0,
2647 1, 0x0204, 0x0045, 0x030F, 0,
2648 1, 0x0205, 0x0065, 0x030F, 0,
2649 1, 0x0206, 0x0045, 0x0311, 0,
2650 1, 0x0207, 0x0065, 0x0311, 0,
2651 1, 0x0208, 0x0049, 0x030F, 0,
2652 1, 0x0209, 0x0069, 0x030F, 0,
2653 1, 0x020A, 0x0049, 0x0311, 0,
2654 1, 0x020B, 0x0069, 0x0311, 0,
2655 1, 0x020C, 0x004F, 0x030F, 0,
2656 1, 0x020D, 0x006F, 0x030F, 0,
2657 1, 0x020E, 0x004F, 0x0311, 0,
2658 1, 0x020F, 0x006F, 0x0311, 0,
2659 1, 0x0210, 0x0052, 0x030F, 0,
2660 1, 0x0211, 0x0072, 0x030F, 0,
2661 1, 0x0212, 0x0052, 0x0311, 0,
2662 1, 0x0213, 0x0072, 0x0311, 0,
2663 1, 0x0214, 0x0055, 0x030F, 0,
2664 1, 0x0215, 0x0075, 0x030F, 0,
2665 1, 0x0216, 0x0055, 0x0311, 0,
2666 1, 0x0217, 0x0075, 0x0311, 0,
2667 1, 0x0218, 0x0053, 0x0326, 0,
2668 1, 0x0219, 0x0073, 0x0326, 0,
2669 1, 0x021A, 0x0054, 0x0326, 0,
2670 1, 0x021B, 0x0074, 0x0326, 0,
2671 1, 0x021E, 0x0048, 0x030C, 0,
2672 1, 0x021F, 0x0068, 0x030C, 0,
2673 1, 0x0226, 0x0041, 0x0307, 0,
2674 1, 0x0227, 0x0061, 0x0307, 0,
2675 1, 0x0228, 0x0045, 0x0327, 0,
2676 1, 0x0229, 0x0065, 0x0327, 0,
2677 1, 0x022A, 0x00D6, 0x0304, 0,
2678 1, 0x022B, 0x00F6, 0x0304, 0,
2679 1, 0x022C, 0x00D5, 0x0304, 0,
2680 1, 0x022D, 0x00F5, 0x0304, 0,
2681 1, 0x022E, 0x004F, 0x0307, 0,
2682 1, 0x022F, 0x006F, 0x0307, 0,
2683 1, 0x0230, 0x022E, 0x0304, 0,
2684 1, 0x0231, 0x022F, 0x0304, 0,
2685 1, 0x0232, 0x0059, 0x0304, 0,
2686 1, 0x0233, 0x0079, 0x0304, 0,
2687 9, 0x02B0, 0x0068, 0,
2688 9, 0x02B1, 0x0266, 0,
2689 9, 0x02B2, 0x006A, 0,
2690 9, 0x02B3, 0x0072, 0,
2691 9, 0x02B4, 0x0279, 0,
2692 9, 0x02B5, 0x027B, 0,
2693 9, 0x02B6, 0x0281, 0,
2694 9, 0x02B7, 0x0077, 0,
2695 9, 0x02B8, 0x0079, 0,
2696 16, 0x02D8, 0x0020, 0x0306, 0,
2697 16, 0x02D9, 0x0020, 0x0307, 0,
2698 16, 0x02DA, 0x0020, 0x030A, 0,
2699 16, 0x02DB, 0x0020, 0x0328, 0,
2700 16, 0x02DC, 0x0020, 0x0303, 0,
2701 16, 0x02DD, 0x0020, 0x030B, 0,
2702 9, 0x02E0, 0x0263, 0,
2703 9, 0x02E1, 0x006C, 0,
2704 9, 0x02E2, 0x0073, 0,
2705 9, 0x02E3, 0x0078, 0,
2706 9, 0x02E4, 0x0295, 0,
2707 1, 0x0340, 0x0300, 0,
2708 1, 0x0341, 0x0301, 0,
2709 1, 0x0343, 0x0313, 0,
2710 1, 0x0344, 0x0308, 0x0301, 0,
2711 1, 0x0374, 0x02B9, 0,
2712 16, 0x037A, 0x0020, 0x0345, 0,
2713 1, 0x037E, 0x003B, 0,
2714 16, 0x0384, 0x0020, 0x0301, 0,
2715 1, 0x0385, 0x00A8, 0x0301, 0,
2716 1, 0x0386, 0x0391, 0x0301, 0,
2717 1, 0x0387, 0x00B7, 0,
2718 1, 0x0388, 0x0395, 0x0301, 0,
2719 1, 0x0389, 0x0397, 0x0301, 0,
2720 1, 0x038A, 0x0399, 0x0301, 0,
2721 1, 0x038C, 0x039F, 0x0301, 0,
2722 1, 0x038E, 0x03A5, 0x0301, 0,
2723 1, 0x038F, 0x03A9, 0x0301, 0,
2724 1, 0x0390, 0x03CA, 0x0301, 0,
2725 1, 0x03AA, 0x0399, 0x0308, 0,
2726 1, 0x03AB, 0x03A5, 0x0308, 0,
2727 1, 0x03AC, 0x03B1, 0x0301, 0,
2728 1, 0x03AD, 0x03B5, 0x0301, 0,
2729 1, 0x03AE, 0x03B7, 0x0301, 0,
2730 1, 0x03AF, 0x03B9, 0x0301, 0,
2731 1, 0x03B0, 0x03CB, 0x0301, 0,
2732 1, 0x03CA, 0x03B9, 0x0308, 0,
2733 1, 0x03CB, 0x03C5, 0x0308, 0,
2734 1, 0x03CC, 0x03BF, 0x0301, 0,
2735 1, 0x03CD, 0x03C5, 0x0301, 0,
2736 1, 0x03CE, 0x03C9, 0x0301, 0,
2737 16, 0x03D0, 0x03B2, 0,
2738 16, 0x03D1, 0x03B8, 0,
2739 16, 0x03D2, 0x03A5, 0,
2740 1, 0x03D3, 0x03D2, 0x0301, 0,
2741 1, 0x03D4, 0x03D2, 0x0308, 0,
2742 16, 0x03D5, 0x03C6, 0,
2743 16, 0x03D6, 0x03C0, 0,
2744 16, 0x03F0, 0x03BA, 0,
2745 16, 0x03F1, 0x03C1, 0,
2746 16, 0x03F2, 0x03C2, 0,
2747 16, 0x03F4, 0x0398, 0,
2748 16, 0x03F5, 0x03B5, 0,
2749 1, 0x0400, 0x0415, 0x0300, 0,
2750 1, 0x0401, 0x0415, 0x0308, 0,
2751 1, 0x0403, 0x0413, 0x0301, 0,
2752 1, 0x0407, 0x0406, 0x0308, 0,
2753 1, 0x040C, 0x041A, 0x0301, 0,
2754 1, 0x040D, 0x0418, 0x0300, 0,
2755 1, 0x040E, 0x0423, 0x0306, 0,
2756 1, 0x0419, 0x0418, 0x0306, 0,
2757 1, 0x0439, 0x0438, 0x0306, 0,
2758 1, 0x0450, 0x0435, 0x0300, 0,
2759 1, 0x0451, 0x0435, 0x0308, 0,
2760 1, 0x0453, 0x0433, 0x0301, 0,
2761 1, 0x0457, 0x0456, 0x0308, 0,
2762 1, 0x045C, 0x043A, 0x0301, 0,
2763 1, 0x045D, 0x0438, 0x0300, 0,
2764 1, 0x045E, 0x0443, 0x0306, 0,
2765 1, 0x0476, 0x0474, 0x030F, 0,
2766 1, 0x0477, 0x0475, 0x030F, 0,
2767 1, 0x04C1, 0x0416, 0x0306, 0,
2768 1, 0x04C2, 0x0436, 0x0306, 0,
2769 1, 0x04D0, 0x0410, 0x0306, 0,
2770 1, 0x04D1, 0x0430, 0x0306, 0,
2771 1, 0x04D2, 0x0410, 0x0308, 0,
2772 1, 0x04D3, 0x0430, 0x0308, 0,
2773 1, 0x04D6, 0x0415, 0x0306, 0,
2774 1, 0x04D7, 0x0435, 0x0306, 0,
2775 1, 0x04DA, 0x04D8, 0x0308, 0,
2776 1, 0x04DB, 0x04D9, 0x0308, 0,
2777 1, 0x04DC, 0x0416, 0x0308, 0,
2778 1, 0x04DD, 0x0436, 0x0308, 0,
2779 1, 0x04DE, 0x0417, 0x0308, 0,
2780 1, 0x04DF, 0x0437, 0x0308, 0,
2781 1, 0x04E2, 0x0418, 0x0304, 0,
2782 1, 0x04E3, 0x0438, 0x0304, 0,
2783 1, 0x04E4, 0x0418, 0x0308, 0,
2784 1, 0x04E5, 0x0438, 0x0308, 0,
2785 1, 0x04E6, 0x041E, 0x0308, 0,
2786 1, 0x04E7, 0x043E, 0x0308, 0,
2787 1, 0x04EA, 0x04E8, 0x0308, 0,
2788 1, 0x04EB, 0x04E9, 0x0308, 0,
2789 1, 0x04EC, 0x042D, 0x0308, 0,
2790 1, 0x04ED, 0x044D, 0x0308, 0,
2791 1, 0x04EE, 0x0423, 0x0304, 0,
2792 1, 0x04EF, 0x0443, 0x0304, 0,
2793 1, 0x04F0, 0x0423, 0x0308, 0,
2794 1, 0x04F1, 0x0443, 0x0308, 0,
2795 1, 0x04F2, 0x0423, 0x030B, 0,
2796 1, 0x04F3, 0x0443, 0x030B, 0,
2797 1, 0x04F4, 0x0427, 0x0308, 0,
2798 1, 0x04F5, 0x0447, 0x0308, 0,
2799 1, 0x04F8, 0x042B, 0x0308, 0,
2800 1, 0x04F9, 0x044B, 0x0308, 0,
2801 16, 0x0587, 0x0565, 0x0582, 0,
2802 1, 0x0622, 0x0627, 0x0653, 0,
2803 1, 0x0623, 0x0627, 0x0654, 0,
2804 1, 0x0624, 0x0648, 0x0654, 0,
2805 1, 0x0625, 0x0627, 0x0655, 0,
2806 1, 0x0626, 0x064A, 0x0654, 0,
2807 16, 0x0675, 0x0627, 0x0674, 0,
2808 16, 0x0676, 0x0648, 0x0674, 0,
2809 16, 0x0677, 0x06C7, 0x0674, 0,
2810 16, 0x0678, 0x064A, 0x0674, 0,
2811 1, 0x06C0, 0x06D5, 0x0654, 0,
2812 1, 0x06C2, 0x06C1, 0x0654, 0,
2813 1, 0x06D3, 0x06D2, 0x0654, 0,
2814 1, 0x0929, 0x0928, 0x093C, 0,
2815 1, 0x0931, 0x0930, 0x093C, 0,
2816 1, 0x0934, 0x0933, 0x093C, 0,
2817 1, 0x0958, 0x0915, 0x093C, 0,
2818 1, 0x0959, 0x0916, 0x093C, 0,
2819 1, 0x095A, 0x0917, 0x093C, 0,
2820 1, 0x095B, 0x091C, 0x093C, 0,
2821 1, 0x095C, 0x0921, 0x093C, 0,
2822 1, 0x095D, 0x0922, 0x093C, 0,
2823 1, 0x095E, 0x092B, 0x093C, 0,
2824 1, 0x095F, 0x092F, 0x093C, 0,
2825 1, 0x09CB, 0x09C7, 0x09BE, 0,
2826 1, 0x09CC, 0x09C7, 0x09D7, 0,
2827 1, 0x09DC, 0x09A1, 0x09BC, 0,
2828 1, 0x09DD, 0x09A2, 0x09BC, 0,
2829 1, 0x09DF, 0x09AF, 0x09BC, 0,
2830 1, 0x0A33, 0x0A32, 0x0A3C, 0,
2831 1, 0x0A36, 0x0A38, 0x0A3C, 0,
2832 1, 0x0A59, 0x0A16, 0x0A3C, 0,
2833 1, 0x0A5A, 0x0A17, 0x0A3C, 0,
2834 1, 0x0A5B, 0x0A1C, 0x0A3C, 0,
2835 1, 0x0A5E, 0x0A2B, 0x0A3C, 0,
2836 1, 0x0B48, 0x0B47, 0x0B56, 0,
2837 1, 0x0B4B, 0x0B47, 0x0B3E, 0,
2838 1, 0x0B4C, 0x0B47, 0x0B57, 0,
2839 1, 0x0B5C, 0x0B21, 0x0B3C, 0,
2840 1, 0x0B5D, 0x0B22, 0x0B3C, 0,
2841 1, 0x0B94, 0x0B92, 0x0BD7, 0,
2842 1, 0x0BCA, 0x0BC6, 0x0BBE, 0,
2843 1, 0x0BCB, 0x0BC7, 0x0BBE, 0,
2844 1, 0x0BCC, 0x0BC6, 0x0BD7, 0,
2845 1, 0x0C48, 0x0C46, 0x0C56, 0,
2846 1, 0x0CC0, 0x0CBF, 0x0CD5, 0,
2847 1, 0x0CC7, 0x0CC6, 0x0CD5, 0,
2848 1, 0x0CC8, 0x0CC6, 0x0CD6, 0,
2849 1, 0x0CCA, 0x0CC6, 0x0CC2, 0,
2850 1, 0x0CCB, 0x0CCA, 0x0CD5, 0,
2851 1, 0x0D4A, 0x0D46, 0x0D3E, 0,
2852 1, 0x0D4B, 0x0D47, 0x0D3E, 0,
2853 1, 0x0D4C, 0x0D46, 0x0D57, 0,
2854 1, 0x0DDA, 0x0DD9, 0x0DCA, 0,
2855 1, 0x0DDC, 0x0DD9, 0x0DCF, 0,
2856 1, 0x0DDD, 0x0DDC, 0x0DCA, 0,
2857 1, 0x0DDE, 0x0DD9, 0x0DDF, 0,
2858 16, 0x0E33, 0x0E4D, 0x0E32, 0,
2859 16, 0x0EB3, 0x0ECD, 0x0EB2, 0,
2860 16, 0x0EDC, 0x0EAB, 0x0E99, 0,
2861 16, 0x0EDD, 0x0EAB, 0x0EA1, 0,
2862 3, 0x0F0C, 0x0F0B, 0,
2863 1, 0x0F43, 0x0F42, 0x0FB7, 0,
2864 1, 0x0F4D, 0x0F4C, 0x0FB7, 0,
2865 1, 0x0F52, 0x0F51, 0x0FB7, 0,
2866 1, 0x0F57, 0x0F56, 0x0FB7, 0,
2867 1, 0x0F5C, 0x0F5B, 0x0FB7, 0,
2868 1, 0x0F69, 0x0F40, 0x0FB5, 0,
2869 1, 0x0F73, 0x0F71, 0x0F72, 0,
2870 1, 0x0F75, 0x0F71, 0x0F74, 0,
2871 1, 0x0F76, 0x0FB2, 0x0F80, 0,
2872 16, 0x0F77, 0x0FB2, 0x0F81, 0,
2873 1, 0x0F78, 0x0FB3, 0x0F80, 0,
2874 16, 0x0F79, 0x0FB3, 0x0F81, 0,
2875 1, 0x0F81, 0x0F71, 0x0F80, 0,
2876 1, 0x0F93, 0x0F92, 0x0FB7, 0,
2877 1, 0x0F9D, 0x0F9C, 0x0FB7, 0,
2878 1, 0x0FA2, 0x0FA1, 0x0FB7, 0,
2879 1, 0x0FA7, 0x0FA6, 0x0FB7, 0,
2880 1, 0x0FAC, 0x0FAB, 0x0FB7, 0,
2881 1, 0x0FB9, 0x0F90, 0x0FB5, 0,
2882 1, 0x1026, 0x1025, 0x102E, 0,
2883 1, 0x1E00, 0x0041, 0x0325, 0,
2884 1, 0x1E01, 0x0061, 0x0325, 0,
2885 1, 0x1E02, 0x0042, 0x0307, 0,
2886 1, 0x1E03, 0x0062, 0x0307, 0,
2887 1, 0x1E04, 0x0042, 0x0323, 0,
2888 1, 0x1E05, 0x0062, 0x0323, 0,
2889 1, 0x1E06, 0x0042, 0x0331, 0,
2890 1, 0x1E07, 0x0062, 0x0331, 0,
2891 1, 0x1E08, 0x00C7, 0x0301, 0,
2892 1, 0x1E09, 0x00E7, 0x0301, 0,
2893 1, 0x1E0A, 0x0044, 0x0307, 0,
2894 1, 0x1E0B, 0x0064, 0x0307, 0,
2895 1, 0x1E0C, 0x0044, 0x0323, 0,
2896 1, 0x1E0D, 0x0064, 0x0323, 0,
2897 1, 0x1E0E, 0x0044, 0x0331, 0,
2898 1, 0x1E0F, 0x0064, 0x0331, 0,
2899 1, 0x1E10, 0x0044, 0x0327, 0,
2900 1, 0x1E11, 0x0064, 0x0327, 0,
2901 1, 0x1E12, 0x0044, 0x032D, 0,
2902 1, 0x1E13, 0x0064, 0x032D, 0,
2903 1, 0x1E14, 0x0112, 0x0300, 0,
2904 1, 0x1E15, 0x0113, 0x0300, 0,
2905 1, 0x1E16, 0x0112, 0x0301, 0,
2906 1, 0x1E17, 0x0113, 0x0301, 0,
2907 1, 0x1E18, 0x0045, 0x032D, 0,
2908 1, 0x1E19, 0x0065, 0x032D, 0,
2909 1, 0x1E1A, 0x0045, 0x0330, 0,
2910 1, 0x1E1B, 0x0065, 0x0330, 0,
2911 1, 0x1E1C, 0x0228, 0x0306, 0,
2912 1, 0x1E1D, 0x0229, 0x0306, 0,
2913 1, 0x1E1E, 0x0046, 0x0307, 0,
2914 1, 0x1E1F, 0x0066, 0x0307, 0,
2915 1, 0x1E20, 0x0047, 0x0304, 0,
2916 1, 0x1E21, 0x0067, 0x0304, 0,
2917 1, 0x1E22, 0x0048, 0x0307, 0,
2918 1, 0x1E23, 0x0068, 0x0307, 0,
2919 1, 0x1E24, 0x0048, 0x0323, 0,
2920 1, 0x1E25, 0x0068, 0x0323, 0,
2921 1, 0x1E26, 0x0048, 0x0308, 0,
2922 1, 0x1E27, 0x0068, 0x0308, 0,
2923 1, 0x1E28, 0x0048, 0x0327, 0,
2924 1, 0x1E29, 0x0068, 0x0327, 0,
2925 1, 0x1E2A, 0x0048, 0x032E, 0,
2926 1, 0x1E2B, 0x0068, 0x032E, 0,
2927 1, 0x1E2C, 0x0049, 0x0330, 0,
2928 1, 0x1E2D, 0x0069, 0x0330, 0,
2929 1, 0x1E2E, 0x00CF, 0x0301, 0,
2930 1, 0x1E2F, 0x00EF, 0x0301, 0,
2931 1, 0x1E30, 0x004B, 0x0301, 0,
2932 1, 0x1E31, 0x006B, 0x0301, 0,
2933 1, 0x1E32, 0x004B, 0x0323, 0,
2934 1, 0x1E33, 0x006B, 0x0323, 0,
2935 1, 0x1E34, 0x004B, 0x0331, 0,
2936 1, 0x1E35, 0x006B, 0x0331, 0,
2937 1, 0x1E36, 0x004C, 0x0323, 0,
2938 1, 0x1E37, 0x006C, 0x0323, 0,
2939 1, 0x1E38, 0x1E36, 0x0304, 0,
2940 1, 0x1E39, 0x1E37, 0x0304, 0,
2941 1, 0x1E3A, 0x004C, 0x0331, 0,
2942 1, 0x1E3B, 0x006C, 0x0331, 0,
2943 1, 0x1E3C, 0x004C, 0x032D, 0,
2944 1, 0x1E3D, 0x006C, 0x032D, 0,
2945 1, 0x1E3E, 0x004D, 0x0301, 0,
2946 1, 0x1E3F, 0x006D, 0x0301, 0,
2947 1, 0x1E40, 0x004D, 0x0307, 0,
2948 1, 0x1E41, 0x006D, 0x0307, 0,
2949 1, 0x1E42, 0x004D, 0x0323, 0,
2950 1, 0x1E43, 0x006D, 0x0323, 0,
2951 1, 0x1E44, 0x004E, 0x0307, 0,
2952 1, 0x1E45, 0x006E, 0x0307, 0,
2953 1, 0x1E46, 0x004E, 0x0323, 0,
2954 1, 0x1E47, 0x006E, 0x0323, 0,
2955 1, 0x1E48, 0x004E, 0x0331, 0,
2956 1, 0x1E49, 0x006E, 0x0331, 0,
2957 1, 0x1E4A, 0x004E, 0x032D, 0,
2958 1, 0x1E4B, 0x006E, 0x032D, 0,
2959 1, 0x1E4C, 0x00D5, 0x0301, 0,
2960 1, 0x1E4D, 0x00F5, 0x0301, 0,
2961 1, 0x1E4E, 0x00D5, 0x0308, 0,
2962 1, 0x1E4F, 0x00F5, 0x0308, 0,
2963 1, 0x1E50, 0x014C, 0x0300, 0,
2964 1, 0x1E51, 0x014D, 0x0300, 0,
2965 1, 0x1E52, 0x014C, 0x0301, 0,
2966 1, 0x1E53, 0x014D, 0x0301, 0,
2967 1, 0x1E54, 0x0050, 0x0301, 0,
2968 1, 0x1E55, 0x0070, 0x0301, 0,
2969 1, 0x1E56, 0x0050, 0x0307, 0,
2970 1, 0x1E57, 0x0070, 0x0307, 0,
2971 1, 0x1E58, 0x0052, 0x0307, 0,
2972 1, 0x1E59, 0x0072, 0x0307, 0,
2973 1, 0x1E5A, 0x0052, 0x0323, 0,
2974 1, 0x1E5B, 0x0072, 0x0323, 0,
2975 1, 0x1E5C, 0x1E5A, 0x0304, 0,
2976 1, 0x1E5D, 0x1E5B, 0x0304, 0,
2977 1, 0x1E5E, 0x0052, 0x0331, 0,
2978 1, 0x1E5F, 0x0072, 0x0331, 0,
2979 1, 0x1E60, 0x0053, 0x0307, 0,
2980 1, 0x1E61, 0x0073, 0x0307, 0,
2981 1, 0x1E62, 0x0053, 0x0323, 0,
2982 1, 0x1E63, 0x0073, 0x0323, 0,
2983 1, 0x1E64, 0x015A, 0x0307, 0,
2984 1, 0x1E65, 0x015B, 0x0307, 0,
2985 1, 0x1E66, 0x0160, 0x0307, 0,
2986 1, 0x1E67, 0x0161, 0x0307, 0,
2987 1, 0x1E68, 0x1E62, 0x0307, 0,
2988 1, 0x1E69, 0x1E63, 0x0307, 0,
2989 1, 0x1E6A, 0x0054, 0x0307, 0,
2990 1, 0x1E6B, 0x0074, 0x0307, 0,
2991 1, 0x1E6C, 0x0054, 0x0323, 0,
2992 1, 0x1E6D, 0x0074, 0x0323, 0,
2993 1, 0x1E6E, 0x0054, 0x0331, 0,
2994 1, 0x1E6F, 0x0074, 0x0331, 0,
2995 1, 0x1E70, 0x0054, 0x032D, 0,
2996 1, 0x1E71, 0x0074, 0x032D, 0,
2997 1, 0x1E72, 0x0055, 0x0324, 0,
2998 1, 0x1E73, 0x0075, 0x0324, 0,
2999 1, 0x1E74, 0x0055, 0x0330, 0,
3000 1, 0x1E75, 0x0075, 0x0330, 0,
3001 1, 0x1E76, 0x0055, 0x032D, 0,
3002 1, 0x1E77, 0x0075, 0x032D, 0,
3003 1, 0x1E78, 0x0168, 0x0301, 0,
3004 1, 0x1E79, 0x0169, 0x0301, 0,
3005 1, 0x1E7A, 0x016A, 0x0308, 0,
3006 1, 0x1E7B, 0x016B, 0x0308, 0,
3007 1, 0x1E7C, 0x0056, 0x0303, 0,
3008 1, 0x1E7D, 0x0076, 0x0303, 0,
3009 1, 0x1E7E, 0x0056, 0x0323, 0,
3010 1, 0x1E7F, 0x0076, 0x0323, 0,
3011 1, 0x1E80, 0x0057, 0x0300, 0,
3012 1, 0x1E81, 0x0077, 0x0300, 0,
3013 1, 0x1E82, 0x0057, 0x0301, 0,
3014 1, 0x1E83, 0x0077, 0x0301, 0,
3015 1, 0x1E84, 0x0057, 0x0308, 0,
3016 1, 0x1E85, 0x0077, 0x0308, 0,
3017 1, 0x1E86, 0x0057, 0x0307, 0,
3018 1, 0x1E87, 0x0077, 0x0307, 0,
3019 1, 0x1E88, 0x0057, 0x0323, 0,
3020 1, 0x1E89, 0x0077, 0x0323, 0,
3021 1, 0x1E8A, 0x0058, 0x0307, 0,
3022 1, 0x1E8B, 0x0078, 0x0307, 0,
3023 1, 0x1E8C, 0x0058, 0x0308, 0,
3024 1, 0x1E8D, 0x0078, 0x0308, 0,
3025 1, 0x1E8E, 0x0059, 0x0307, 0,
3026 1, 0x1E8F, 0x0079, 0x0307, 0,
3027 1, 0x1E90, 0x005A, 0x0302, 0,
3028 1, 0x1E91, 0x007A, 0x0302, 0,
3029 1, 0x1E92, 0x005A, 0x0323, 0,
3030 1, 0x1E93, 0x007A, 0x0323, 0,
3031 1, 0x1E94, 0x005A, 0x0331, 0,
3032 1, 0x1E95, 0x007A, 0x0331, 0,
3033 1, 0x1E96, 0x0068, 0x0331, 0,
3034 1, 0x1E97, 0x0074, 0x0308, 0,
3035 1, 0x1E98, 0x0077, 0x030A, 0,
3036 1, 0x1E99, 0x0079, 0x030A, 0,
3037 16, 0x1E9A, 0x0061, 0x02BE, 0,
3038 1, 0x1E9B, 0x017F, 0x0307, 0,
3039 1, 0x1EA0, 0x0041, 0x0323, 0,
3040 1, 0x1EA1, 0x0061, 0x0323, 0,
3041 1, 0x1EA2, 0x0041, 0x0309, 0,
3042 1, 0x1EA3, 0x0061, 0x0309, 0,
3043 1, 0x1EA4, 0x00C2, 0x0301, 0,
3044 1, 0x1EA5, 0x00E2, 0x0301, 0,
3045 1, 0x1EA6, 0x00C2, 0x0300, 0,
3046 1, 0x1EA7, 0x00E2, 0x0300, 0,
3047 1, 0x1EA8, 0x00C2, 0x0309, 0,
3048 1, 0x1EA9, 0x00E2, 0x0309, 0,
3049 1, 0x1EAA, 0x00C2, 0x0303, 0,
3050 1, 0x1EAB, 0x00E2, 0x0303, 0,
3051 1, 0x1EAC, 0x1EA0, 0x0302, 0,
3052 1, 0x1EAD, 0x1EA1, 0x0302, 0,
3053 1, 0x1EAE, 0x0102, 0x0301, 0,
3054 1, 0x1EAF, 0x0103, 0x0301, 0,
3055 1, 0x1EB0, 0x0102, 0x0300, 0,
3056 1, 0x1EB1, 0x0103, 0x0300, 0,
3057 1, 0x1EB2, 0x0102, 0x0309, 0,
3058 1, 0x1EB3, 0x0103, 0x0309, 0,
3059 1, 0x1EB4, 0x0102, 0x0303, 0,
3060 1, 0x1EB5, 0x0103, 0x0303, 0,
3061 1, 0x1EB6, 0x1EA0, 0x0306, 0,
3062 1, 0x1EB7, 0x1EA1, 0x0306, 0,
3063 1, 0x1EB8, 0x0045, 0x0323, 0,
3064 1, 0x1EB9, 0x0065, 0x0323, 0,
3065 1, 0x1EBA, 0x0045, 0x0309, 0,
3066 1, 0x1EBB, 0x0065, 0x0309, 0,
3067 1, 0x1EBC, 0x0045, 0x0303, 0,
3068 1, 0x1EBD, 0x0065, 0x0303, 0,
3069 1, 0x1EBE, 0x00CA, 0x0301, 0,
3070 1, 0x1EBF, 0x00EA, 0x0301, 0,
3071 1, 0x1EC0, 0x00CA, 0x0300, 0,
3072 1, 0x1EC1, 0x00EA, 0x0300, 0,
3073 1, 0x1EC2, 0x00CA, 0x0309, 0,
3074 1, 0x1EC3, 0x00EA, 0x0309, 0,
3075 1, 0x1EC4, 0x00CA, 0x0303, 0,
3076 1, 0x1EC5, 0x00EA, 0x0303, 0,
3077 1, 0x1EC6, 0x1EB8, 0x0302, 0,
3078 1, 0x1EC7, 0x1EB9, 0x0302, 0,
3079 1, 0x1EC8, 0x0049, 0x0309, 0,
3080 1, 0x1EC9, 0x0069, 0x0309, 0,
3081 1, 0x1ECA, 0x0049, 0x0323, 0,
3082 1, 0x1ECB, 0x0069, 0x0323, 0,
3083 1, 0x1ECC, 0x004F, 0x0323, 0,
3084 1, 0x1ECD, 0x006F, 0x0323, 0,
3085 1, 0x1ECE, 0x004F, 0x0309, 0,
3086 1, 0x1ECF, 0x006F, 0x0309, 0,
3087 1, 0x1ED0, 0x00D4, 0x0301, 0,
3088 1, 0x1ED1, 0x00F4, 0x0301, 0,
3089 1, 0x1ED2, 0x00D4, 0x0300, 0,
3090 1, 0x1ED3, 0x00F4, 0x0300, 0,
3091 1, 0x1ED4, 0x00D4, 0x0309, 0,
3092 1, 0x1ED5, 0x00F4, 0x0309, 0,
3093 1, 0x1ED6, 0x00D4, 0x0303, 0,
3094 1, 0x1ED7, 0x00F4, 0x0303, 0,
3095 1, 0x1ED8, 0x1ECC, 0x0302, 0,
3096 1, 0x1ED9, 0x1ECD, 0x0302, 0,
3097 1, 0x1EDA, 0x01A0, 0x0301, 0,
3098 1, 0x1EDB, 0x01A1, 0x0301, 0,
3099 1, 0x1EDC, 0x01A0, 0x0300, 0,
3100 1, 0x1EDD, 0x01A1, 0x0300, 0,
3101 1, 0x1EDE, 0x01A0, 0x0309, 0,
3102 1, 0x1EDF, 0x01A1, 0x0309, 0,
3103 1, 0x1EE0, 0x01A0, 0x0303, 0,
3104 1, 0x1EE1, 0x01A1, 0x0303, 0,
3105 1, 0x1EE2, 0x01A0, 0x0323, 0,
3106 1, 0x1EE3, 0x01A1, 0x0323, 0,
3107 1, 0x1EE4, 0x0055, 0x0323, 0,
3108 1, 0x1EE5, 0x0075, 0x0323, 0,
3109 1, 0x1EE6, 0x0055, 0x0309, 0,
3110 1, 0x1EE7, 0x0075, 0x0309, 0,
3111 1, 0x1EE8, 0x01AF, 0x0301, 0,
3112 1, 0x1EE9, 0x01B0, 0x0301, 0,
3113 1, 0x1EEA, 0x01AF, 0x0300, 0,
3114 1, 0x1EEB, 0x01B0, 0x0300, 0,
3115 1, 0x1EEC, 0x01AF, 0x0309, 0,
3116 1, 0x1EED, 0x01B0, 0x0309, 0,
3117 1, 0x1EEE, 0x01AF, 0x0303, 0,
3118 1, 0x1EEF, 0x01B0, 0x0303, 0,
3119 1, 0x1EF0, 0x01AF, 0x0323, 0,
3120 1, 0x1EF1, 0x01B0, 0x0323, 0,
3121 1, 0x1EF2, 0x0059, 0x0300, 0,
3122 1, 0x1EF3, 0x0079, 0x0300, 0,
3123 1, 0x1EF4, 0x0059, 0x0323, 0,
3124 1, 0x1EF5, 0x0079, 0x0323, 0,
3125 1, 0x1EF6, 0x0059, 0x0309, 0,
3126 1, 0x1EF7, 0x0079, 0x0309, 0,
3127 1, 0x1EF8, 0x0059, 0x0303, 0,
3128 1, 0x1EF9, 0x0079, 0x0303, 0,
3129 1, 0x1F00, 0x03B1, 0x0313, 0,
3130 1, 0x1F01, 0x03B1, 0x0314, 0,
3131 1, 0x1F02, 0x1F00, 0x0300, 0,
3132 1, 0x1F03, 0x1F01, 0x0300, 0,
3133 1, 0x1F04, 0x1F00, 0x0301, 0,
3134 1, 0x1F05, 0x1F01, 0x0301, 0,
3135 1, 0x1F06, 0x1F00, 0x0342, 0,
3136 1, 0x1F07, 0x1F01, 0x0342, 0,
3137 1, 0x1F08, 0x0391, 0x0313, 0,
3138 1, 0x1F09, 0x0391, 0x0314, 0,
3139 1, 0x1F0A, 0x1F08, 0x0300, 0,
3140 1, 0x1F0B, 0x1F09, 0x0300, 0,
3141 1, 0x1F0C, 0x1F08, 0x0301, 0,
3142 1, 0x1F0D, 0x1F09, 0x0301, 0,
3143 1, 0x1F0E, 0x1F08, 0x0342, 0,
3144 1, 0x1F0F, 0x1F09, 0x0342, 0,
3145 1, 0x1F10, 0x03B5, 0x0313, 0,
3146 1, 0x1F11, 0x03B5, 0x0314, 0,
3147 1, 0x1F12, 0x1F10, 0x0300, 0,
3148 1, 0x1F13, 0x1F11, 0x0300, 0,
3149 1, 0x1F14, 0x1F10, 0x0301, 0,
3150 1, 0x1F15, 0x1F11, 0x0301, 0,
3151 1, 0x1F18, 0x0395, 0x0313, 0,
3152 1, 0x1F19, 0x0395, 0x0314, 0,
3153 1, 0x1F1A, 0x1F18, 0x0300, 0,
3154 1, 0x1F1B, 0x1F19, 0x0300, 0,
3155 1, 0x1F1C, 0x1F18, 0x0301, 0,
3156 1, 0x1F1D, 0x1F19, 0x0301, 0,
3157 1, 0x1F20, 0x03B7, 0x0313, 0,
3158 1, 0x1F21, 0x03B7, 0x0314, 0,
3159 1, 0x1F22, 0x1F20, 0x0300, 0,
3160 1, 0x1F23, 0x1F21, 0x0300, 0,
3161 1, 0x1F24, 0x1F20, 0x0301, 0,
3162 1, 0x1F25, 0x1F21, 0x0301, 0,
3163 1, 0x1F26, 0x1F20, 0x0342, 0,
3164 1, 0x1F27, 0x1F21, 0x0342, 0,
3165 1, 0x1F28, 0x0397, 0x0313, 0,
3166 1, 0x1F29, 0x0397, 0x0314, 0,
3167 1, 0x1F2A, 0x1F28, 0x0300, 0,
3168 1, 0x1F2B, 0x1F29, 0x0300, 0,
3169 1, 0x1F2C, 0x1F28, 0x0301, 0,
3170 1, 0x1F2D, 0x1F29, 0x0301, 0,
3171 1, 0x1F2E, 0x1F28, 0x0342, 0,
3172 1, 0x1F2F, 0x1F29, 0x0342, 0,
3173 1, 0x1F30, 0x03B9, 0x0313, 0,
3174 1, 0x1F31, 0x03B9, 0x0314, 0,
3175 1, 0x1F32, 0x1F30, 0x0300, 0,
3176 1, 0x1F33, 0x1F31, 0x0300, 0,
3177 1, 0x1F34, 0x1F30, 0x0301, 0,
3178 1, 0x1F35, 0x1F31, 0x0301, 0,
3179 1, 0x1F36, 0x1F30, 0x0342, 0,
3180 1, 0x1F37, 0x1F31, 0x0342, 0,
3181 1, 0x1F38, 0x0399, 0x0313, 0,
3182 1, 0x1F39, 0x0399, 0x0314, 0,
3183 1, 0x1F3A, 0x1F38, 0x0300, 0,
3184 1, 0x1F3B, 0x1F39, 0x0300, 0,
3185 1, 0x1F3C, 0x1F38, 0x0301, 0,
3186 1, 0x1F3D, 0x1F39, 0x0301, 0,
3187 1, 0x1F3E, 0x1F38, 0x0342, 0,
3188 1, 0x1F3F, 0x1F39, 0x0342, 0,
3189 1, 0x1F40, 0x03BF, 0x0313, 0,
3190 1, 0x1F41, 0x03BF, 0x0314, 0,
3191 1, 0x1F42, 0x1F40, 0x0300, 0,
3192 1, 0x1F43, 0x1F41, 0x0300, 0,
3193 1, 0x1F44, 0x1F40, 0x0301, 0,
3194 1, 0x1F45, 0x1F41, 0x0301, 0,
3195 1, 0x1F48, 0x039F, 0x0313, 0,
3196 1, 0x1F49, 0x039F, 0x0314, 0,
3197 1, 0x1F4A, 0x1F48, 0x0300, 0,
3198 1, 0x1F4B, 0x1F49, 0x0300, 0,
3199 1, 0x1F4C, 0x1F48, 0x0301, 0,
3200 1, 0x1F4D, 0x1F49, 0x0301, 0,
3201 1, 0x1F50, 0x03C5, 0x0313, 0,
3202 1, 0x1F51, 0x03C5, 0x0314, 0,
3203 1, 0x1F52, 0x1F50, 0x0300, 0,
3204 1, 0x1F53, 0x1F51, 0x0300, 0,
3205 1, 0x1F54, 0x1F50, 0x0301, 0,
3206 1, 0x1F55, 0x1F51, 0x0301, 0,
3207 1, 0x1F56, 0x1F50, 0x0342, 0,
3208 1, 0x1F57, 0x1F51, 0x0342, 0,
3209 1, 0x1F59, 0x03A5, 0x0314, 0,
3210 1, 0x1F5B, 0x1F59, 0x0300, 0,
3211 1, 0x1F5D, 0x1F59, 0x0301, 0,
3212 1, 0x1F5F, 0x1F59, 0x0342, 0,
3213 1, 0x1F60, 0x03C9, 0x0313, 0,
3214 1, 0x1F61, 0x03C9, 0x0314, 0,
3215 1, 0x1F62, 0x1F60, 0x0300, 0,
3216 1, 0x1F63, 0x1F61, 0x0300, 0,
3217 1, 0x1F64, 0x1F60, 0x0301, 0,
3218 1, 0x1F65, 0x1F61, 0x0301, 0,
3219 1, 0x1F66, 0x1F60, 0x0342, 0,
3220 1, 0x1F67, 0x1F61, 0x0342, 0,
3221 1, 0x1F68, 0x03A9, 0x0313, 0,
3222 1, 0x1F69, 0x03A9, 0x0314, 0,
3223 1, 0x1F6A, 0x1F68, 0x0300, 0,
3224 1, 0x1F6B, 0x1F69, 0x0300, 0,
3225 1, 0x1F6C, 0x1F68, 0x0301, 0,
3226 1, 0x1F6D, 0x1F69, 0x0301, 0,
3227 1, 0x1F6E, 0x1F68, 0x0342, 0,
3228 1, 0x1F6F, 0x1F69, 0x0342, 0,
3229 1, 0x1F70, 0x03B1, 0x0300, 0,
3230 1, 0x1F71, 0x03AC, 0,
3231 1, 0x1F72, 0x03B5, 0x0300, 0,
3232 1, 0x1F73, 0x03AD, 0,
3233 1, 0x1F74, 0x03B7, 0x0300, 0,
3234 1, 0x1F75, 0x03AE, 0,
3235 1, 0x1F76, 0x03B9, 0x0300, 0,
3236 1, 0x1F77, 0x03AF, 0,
3237 1, 0x1F78, 0x03BF, 0x0300, 0,
3238 1, 0x1F79, 0x03CC, 0,
3239 1, 0x1F7A, 0x03C5, 0x0300, 0,
3240 1, 0x1F7B, 0x03CD, 0,
3241 1, 0x1F7C, 0x03C9, 0x0300, 0,
3242 1, 0x1F7D, 0x03CE, 0,
3243 1, 0x1F80, 0x1F00, 0x0345, 0,
3244 1, 0x1F81, 0x1F01, 0x0345, 0,
3245 1, 0x1F82, 0x1F02, 0x0345, 0,
3246 1, 0x1F83, 0x1F03, 0x0345, 0,
3247 1, 0x1F84, 0x1F04, 0x0345, 0,
3248 1, 0x1F85, 0x1F05, 0x0345, 0,
3249 1, 0x1F86, 0x1F06, 0x0345, 0,
3250 1, 0x1F87, 0x1F07, 0x0345, 0,
3251 1, 0x1F88, 0x1F08, 0x0345, 0,
3252 1, 0x1F89, 0x1F09, 0x0345, 0,
3253 1, 0x1F8A, 0x1F0A, 0x0345, 0,
3254 1, 0x1F8B, 0x1F0B, 0x0345, 0,
3255 1, 0x1F8C, 0x1F0C, 0x0345, 0,
3256 1, 0x1F8D, 0x1F0D, 0x0345, 0,
3257 1, 0x1F8E, 0x1F0E, 0x0345, 0,
3258 1, 0x1F8F, 0x1F0F, 0x0345, 0,
3259 1, 0x1F90, 0x1F20, 0x0345, 0,
3260 1, 0x1F91, 0x1F21, 0x0345, 0,
3261 1, 0x1F92, 0x1F22, 0x0345, 0,
3262 1, 0x1F93, 0x1F23, 0x0345, 0,
3263 1, 0x1F94, 0x1F24, 0x0345, 0,
3264 1, 0x1F95, 0x1F25, 0x0345, 0,
3265 1, 0x1F96, 0x1F26, 0x0345, 0,
3266 1, 0x1F97, 0x1F27, 0x0345, 0,
3267 1, 0x1F98, 0x1F28, 0x0345, 0,
3268 1, 0x1F99, 0x1F29, 0x0345, 0,
3269 1, 0x1F9A, 0x1F2A, 0x0345, 0,
3270 1, 0x1F9B, 0x1F2B, 0x0345, 0,
3271 1, 0x1F9C, 0x1F2C, 0x0345, 0,
3272 1, 0x1F9D, 0x1F2D, 0x0345, 0,
3273 1, 0x1F9E, 0x1F2E, 0x0345, 0,
3274 1, 0x1F9F, 0x1F2F, 0x0345, 0,
3275 1, 0x1FA0, 0x1F60, 0x0345, 0,
3276 1, 0x1FA1, 0x1F61, 0x0345, 0,
3277 1, 0x1FA2, 0x1F62, 0x0345, 0,
3278 1, 0x1FA3, 0x1F63, 0x0345, 0,
3279 1, 0x1FA4, 0x1F64, 0x0345, 0,
3280 1, 0x1FA5, 0x1F65, 0x0345, 0,
3281 1, 0x1FA6, 0x1F66, 0x0345, 0,
3282 1, 0x1FA7, 0x1F67, 0x0345, 0,
3283 1, 0x1FA8, 0x1F68, 0x0345, 0,
3284 1, 0x1FA9, 0x1F69, 0x0345, 0,
3285 1, 0x1FAA, 0x1F6A, 0x0345, 0,
3286 1, 0x1FAB, 0x1F6B, 0x0345, 0,
3287 1, 0x1FAC, 0x1F6C, 0x0345, 0,
3288 1, 0x1FAD, 0x1F6D, 0x0345, 0,
3289 1, 0x1FAE, 0x1F6E, 0x0345, 0,
3290 1, 0x1FAF, 0x1F6F, 0x0345, 0,
3291 1, 0x1FB0, 0x03B1, 0x0306, 0,
3292 1, 0x1FB1, 0x03B1, 0x0304, 0,
3293 1, 0x1FB2, 0x1F70, 0x0345, 0,
3294 1, 0x1FB3, 0x03B1, 0x0345, 0,
3295 1, 0x1FB4, 0x03AC, 0x0345, 0,
3296 1, 0x1FB6, 0x03B1, 0x0342, 0,
3297 1, 0x1FB7, 0x1FB6, 0x0345, 0,
3298 1, 0x1FB8, 0x0391, 0x0306, 0,
3299 1, 0x1FB9, 0x0391, 0x0304, 0,
3300 1, 0x1FBA, 0x0391, 0x0300, 0,
3301 1, 0x1FBB, 0x0386, 0,
3302 1, 0x1FBC, 0x0391, 0x0345, 0,
3303 16, 0x1FBD, 0x0020, 0x0313, 0,
3304 1, 0x1FBE, 0x03B9, 0,
3305 16, 0x1FBF, 0x0020, 0x0313, 0,
3306 16, 0x1FC0, 0x0020, 0x0342, 0,
3307 1, 0x1FC1, 0x00A8, 0x0342, 0,
3308 1, 0x1FC2, 0x1F74, 0x0345, 0,
3309 1, 0x1FC3, 0x03B7, 0x0345, 0,
3310 1, 0x1FC4, 0x03AE, 0x0345, 0,
3311 1, 0x1FC6, 0x03B7, 0x0342, 0,
3312 1, 0x1FC7, 0x1FC6, 0x0345, 0,
3313 1, 0x1FC8, 0x0395, 0x0300, 0,
3314 1, 0x1FC9, 0x0388, 0,
3315 1, 0x1FCA, 0x0397, 0x0300, 0,
3316 1, 0x1FCB, 0x0389, 0,
3317 1, 0x1FCC, 0x0397, 0x0345, 0,
3318 1, 0x1FCD, 0x1FBF, 0x0300, 0,
3319 1, 0x1FCE, 0x1FBF, 0x0301, 0,
3320 1, 0x1FCF, 0x1FBF, 0x0342, 0,
3321 1, 0x1FD0, 0x03B9, 0x0306, 0,
3322 1, 0x1FD1, 0x03B9, 0x0304, 0,
3323 1, 0x1FD2, 0x03CA, 0x0300, 0,
3324 1, 0x1FD3, 0x0390, 0,
3325 1, 0x1FD6, 0x03B9, 0x0342, 0,
3326 1, 0x1FD7, 0x03CA, 0x0342, 0,
3327 1, 0x1FD8, 0x0399, 0x0306, 0,
3328 1, 0x1FD9, 0x0399, 0x0304, 0,
3329 1, 0x1FDA, 0x0399, 0x0300, 0,
3330 1, 0x1FDB, 0x038A, 0,
3331 1, 0x1FDD, 0x1FFE, 0x0300, 0,
3332 1, 0x1FDE, 0x1FFE, 0x0301, 0,
3333 1, 0x1FDF, 0x1FFE, 0x0342, 0,
3334 1, 0x1FE0, 0x03C5, 0x0306, 0,
3335 1, 0x1FE1, 0x03C5, 0x0304, 0,
3336 1, 0x1FE2, 0x03CB, 0x0300, 0,
3337 1, 0x1FE3, 0x03B0, 0,
3338 1, 0x1FE4, 0x03C1, 0x0313, 0,
3339 1, 0x1FE5, 0x03C1, 0x0314, 0,
3340 1, 0x1FE6, 0x03C5, 0x0342, 0,
3341 1, 0x1FE7, 0x03CB, 0x0342, 0,
3342 1, 0x1FE8, 0x03A5, 0x0306, 0,
3343 1, 0x1FE9, 0x03A5, 0x0304, 0,
3344 1, 0x1FEA, 0x03A5, 0x0300, 0,
3345 1, 0x1FEB, 0x038E, 0,
3346 1, 0x1FEC, 0x03A1, 0x0314, 0,
3347 1, 0x1FED, 0x00A8, 0x0300, 0,
3348 1, 0x1FEE, 0x0385, 0,
3349 1, 0x1FEF, 0x0060, 0,
3350 1, 0x1FF2, 0x1F7C, 0x0345, 0,
3351 1, 0x1FF3, 0x03C9, 0x0345, 0,
3352 1, 0x1FF4, 0x03CE, 0x0345, 0,
3353 1, 0x1FF6, 0x03C9, 0x0342, 0,
3354 1, 0x1FF7, 0x1FF6, 0x0345, 0,
3355 1, 0x1FF8, 0x039F, 0x0300, 0,
3356 1, 0x1FF9, 0x038C, 0,
3357 1, 0x1FFA, 0x03A9, 0x0300, 0,
3358 1, 0x1FFB, 0x038F, 0,
3359 1, 0x1FFC, 0x03A9, 0x0345, 0,
3360 1, 0x1FFD, 0x00B4, 0,
3361 16, 0x1FFE, 0x0020, 0x0314, 0,
3362 1, 0x2000, 0x2002, 0,
3363 1, 0x2001, 0x2003, 0,
3364 16, 0x2002, 0x0020, 0,
3365 16, 0x2003, 0x0020, 0,
3366 16, 0x2004, 0x0020, 0,
3367 16, 0x2005, 0x0020, 0,
3368 16, 0x2006, 0x0020, 0,
3369 3, 0x2007, 0x0020, 0,
3370 16, 0x2008, 0x0020, 0,
3371 16, 0x2009, 0x0020, 0,
3372 16, 0x200A, 0x0020, 0,
3373 3, 0x2011, 0x2010, 0,
3374 16, 0x2017, 0x0020, 0x0333, 0,
3375 16, 0x2024, 0x002E, 0,
3376 16, 0x2025, 0x002E, 0x002E, 0,
3377 16, 0x2026, 0x002E, 0x002E, 0x002E, 0,
3378 3, 0x202F, 0x0020, 0,
3379 16, 0x2033, 0x2032, 0x2032, 0,
3380 16, 0x2034, 0x2032, 0x2032, 0x2032, 0,
3381 16, 0x2036, 0x2035, 0x2035, 0,
3382 16, 0x2037, 0x2035, 0x2035, 0x2035, 0,
3383 16, 0x203C, 0x0021, 0x0021, 0,
3384 16, 0x203E, 0x0020, 0x0305, 0,
3385 16, 0x2047, 0x003F, 0x003F, 0,
3386 16, 0x2048, 0x003F, 0x0021, 0,
3387 16, 0x2049, 0x0021, 0x003F, 0,
3388 16, 0x2057, 0x2032, 0x2032, 0x2032, 0x2032, 0,
3389 16, 0x205F, 0x0020, 0,
3390 9, 0x2070, 0x0030, 0,
3391 9, 0x2071, 0x0069, 0,
3392 9, 0x2074, 0x0034, 0,
3393 9, 0x2075, 0x0035, 0,
3394 9, 0x2076, 0x0036, 0,
3395 9, 0x2077, 0x0037, 0,
3396 9, 0x2078, 0x0038, 0,
3397 9, 0x2079, 0x0039, 0,
3398 9, 0x207A, 0x002B, 0,
3399 9, 0x207B, 0x2212, 0,
3400 9, 0x207C, 0x003D, 0,
3401 9, 0x207D, 0x0028, 0,
3402 9, 0x207E, 0x0029, 0,
3403 9, 0x207F, 0x006E, 0,
3404 10, 0x2080, 0x0030, 0,
3405 10, 0x2081, 0x0031, 0,
3406 10, 0x2082, 0x0032, 0,
3407 10, 0x2083, 0x0033, 0,
3408 10, 0x2084, 0x0034, 0,
3409 10, 0x2085, 0x0035, 0,
3410 10, 0x2086, 0x0036, 0,
3411 10, 0x2087, 0x0037, 0,
3412 10, 0x2088, 0x0038, 0,
3413 10, 0x2089, 0x0039, 0,
3414 10, 0x208A, 0x002B, 0,
3415 10, 0x208B, 0x2212, 0,
3416 10, 0x208C, 0x003D, 0,
3417 10, 0x208D, 0x0028, 0,
3418 10, 0x208E, 0x0029, 0,
3419 16, 0x20A8, 0x0052, 0x0073, 0,
3420 16, 0x2100, 0x0061, 0x002F, 0x0063, 0,
3421 16, 0x2101, 0x0061, 0x002F, 0x0073, 0,
3422 2, 0x2102, 0x0043, 0,
3423 16, 0x2103, 0x00B0, 0x0043, 0,
3424 16, 0x2105, 0x0063, 0x002F, 0x006F, 0,
3425 16, 0x2106, 0x0063, 0x002F, 0x0075, 0,
3426 16, 0x2107, 0x0190, 0,
3427 16, 0x2109, 0x00B0, 0x0046, 0,
3428 2, 0x210A, 0x0067, 0,
3429 2, 0x210B, 0x0048, 0,
3430 2, 0x210C, 0x0048, 0,
3431 2, 0x210D, 0x0048, 0,
3432 2, 0x210E, 0x0068, 0,
3433 2, 0x210F, 0x0127, 0,
3434 2, 0x2110, 0x0049, 0,
3435 2, 0x2111, 0x0049, 0,
3436 2, 0x2112, 0x004C, 0,
3437 2, 0x2113, 0x006C, 0,
3438 2, 0x2115, 0x004E, 0,
3439 16, 0x2116, 0x004E, 0x006F, 0,
3440 2, 0x2119, 0x0050, 0,
3441 2, 0x211A, 0x0051, 0,
3442 2, 0x211B, 0x0052, 0,
3443 2, 0x211C, 0x0052, 0,
3444 2, 0x211D, 0x0052, 0,
3445 9, 0x2120, 0x0053, 0x004D, 0,
3446 16, 0x2121, 0x0054, 0x0045, 0x004C, 0,
3447 9, 0x2122, 0x0054, 0x004D, 0,
3448 2, 0x2124, 0x005A, 0,
3449 1, 0x2126, 0x03A9, 0,
3450 2, 0x2128, 0x005A, 0,
3451 1, 0x212A, 0x004B, 0,
3452 1, 0x212B, 0x00C5, 0,
3453 2, 0x212C, 0x0042, 0,
3454 2, 0x212D, 0x0043, 0,
3455 2, 0x212F, 0x0065, 0,
3456 2, 0x2130, 0x0045, 0,
3457 2, 0x2131, 0x0046, 0,
3458 2, 0x2133, 0x004D, 0,
3459 2, 0x2134, 0x006F, 0,
3460 16, 0x2135, 0x05D0, 0,
3461 16, 0x2136, 0x05D1, 0,
3462 16, 0x2137, 0x05D2, 0,
3463 16, 0x2138, 0x05D3, 0,
3464 2, 0x2139, 0x0069, 0,
3465 2, 0x213D, 0x03B3, 0,
3466 2, 0x213E, 0x0393, 0,
3467 2, 0x213F, 0x03A0, 0,
3468 2, 0x2140, 0x2211, 0,
3469 2, 0x2145, 0x0044, 0,
3470 2, 0x2146, 0x0064, 0,
3471 2, 0x2147, 0x0065, 0,
3472 2, 0x2148, 0x0069, 0,
3473 2, 0x2149, 0x006A, 0,
3474 17, 0x2153, 0x0031, 0x2044, 0x0033, 0,
3475 17, 0x2154, 0x0032, 0x2044, 0x0033, 0,
3476 17, 0x2155, 0x0031, 0x2044, 0x0035, 0,
3477 17, 0x2156, 0x0032, 0x2044, 0x0035, 0,
3478 17, 0x2157, 0x0033, 0x2044, 0x0035, 0,
3479 17, 0x2158, 0x0034, 0x2044, 0x0035, 0,
3480 17, 0x2159, 0x0031, 0x2044, 0x0036, 0,
3481 17, 0x215A, 0x0035, 0x2044, 0x0036, 0,
3482 17, 0x215B, 0x0031, 0x2044, 0x0038, 0,
3483 17, 0x215C, 0x0033, 0x2044, 0x0038, 0,
3484 17, 0x215D, 0x0035, 0x2044, 0x0038, 0,
3485 17, 0x215E, 0x0037, 0x2044, 0x0038, 0,
3486 17, 0x215F, 0x0031, 0x2044, 0,
3487 16, 0x2160, 0x0049, 0,
3488 16, 0x2161, 0x0049, 0x0049, 0,
3489 16, 0x2162, 0x0049, 0x0049, 0x0049, 0,
3490 16, 0x2163, 0x0049, 0x0056, 0,
3491 16, 0x2164, 0x0056, 0,
3492 16, 0x2165, 0x0056, 0x0049, 0,
3493 16, 0x2166, 0x0056, 0x0049, 0x0049, 0,
3494 16, 0x2167, 0x0056, 0x0049, 0x0049, 0x0049, 0,
3495 16, 0x2168, 0x0049, 0x0058, 0,
3496 16, 0x2169, 0x0058, 0,
3497 16, 0x216A, 0x0058, 0x0049, 0,
3498 16, 0x216B, 0x0058, 0x0049, 0x0049, 0,
3499 16, 0x216C, 0x004C, 0,
3500 16, 0x216D, 0x0043, 0,
3501 16, 0x216E, 0x0044, 0,
3502 16, 0x216F, 0x004D, 0,
3503 16, 0x2170, 0x0069, 0,
3504 16, 0x2171, 0x0069, 0x0069, 0,
3505 16, 0x2172, 0x0069, 0x0069, 0x0069, 0,
3506 16, 0x2173, 0x0069, 0x0076, 0,
3507 16, 0x2174, 0x0076, 0,
3508 16, 0x2175, 0x0076, 0x0069, 0,
3509 16, 0x2176, 0x0076, 0x0069, 0x0069, 0,
3510 16, 0x2177, 0x0076, 0x0069, 0x0069, 0x0069, 0,
3511 16, 0x2178, 0x0069, 0x0078, 0,
3512 16, 0x2179, 0x0078, 0,
3513 16, 0x217A, 0x0078, 0x0069, 0,
3514 16, 0x217B, 0x0078, 0x0069, 0x0069, 0,
3515 16, 0x217C, 0x006C, 0,
3516 16, 0x217D, 0x0063, 0,
3517 16, 0x217E, 0x0064, 0,
3518 16, 0x217F, 0x006D, 0,
3519 1, 0x219A, 0x2190, 0x0338, 0,
3520 1, 0x219B, 0x2192, 0x0338, 0,
3521 1, 0x21AE, 0x2194, 0x0338, 0,
3522 1, 0x21CD, 0x21D0, 0x0338, 0,
3523 1, 0x21CE, 0x21D4, 0x0338, 0,
3524 1, 0x21CF, 0x21D2, 0x0338, 0,
3525 1, 0x2204, 0x2203, 0x0338, 0,
3526 1, 0x2209, 0x2208, 0x0338, 0,
3527 1, 0x220C, 0x220B, 0x0338, 0,
3528 1, 0x2224, 0x2223, 0x0338, 0,
3529 1, 0x2226, 0x2225, 0x0338, 0,
3530 16, 0x222C, 0x222B, 0x222B, 0,
3531 16, 0x222D, 0x222B, 0x222B, 0x222B, 0,
3532 16, 0x222F, 0x222E, 0x222E, 0,
3533 16, 0x2230, 0x222E, 0x222E, 0x222E, 0,
3534 1, 0x2241, 0x223C, 0x0338, 0,
3535 1, 0x2244, 0x2243, 0x0338, 0,
3536 1, 0x2247, 0x2245, 0x0338, 0,
3537 1, 0x2249, 0x2248, 0x0338, 0,
3538 1, 0x2260, 0x003D, 0x0338, 0,
3539 1, 0x2262, 0x2261, 0x0338, 0,
3540 1, 0x226D, 0x224D, 0x0338, 0,
3541 1, 0x226E, 0x003C, 0x0338, 0,
3542 1, 0x226F, 0x003E, 0x0338, 0,
3543 1, 0x2270, 0x2264, 0x0338, 0,
3544 1, 0x2271, 0x2265, 0x0338, 0,
3545 1, 0x2274, 0x2272, 0x0338, 0,
3546 1, 0x2275, 0x2273, 0x0338, 0,
3547 1, 0x2278, 0x2276, 0x0338, 0,
3548 1, 0x2279, 0x2277, 0x0338, 0,
3549 1, 0x2280, 0x227A, 0x0338, 0,
3550 1, 0x2281, 0x227B, 0x0338, 0,
3551 1, 0x2284, 0x2282, 0x0338, 0,
3552 1, 0x2285, 0x2283, 0x0338, 0,
3553 1, 0x2288, 0x2286, 0x0338, 0,
3554 1, 0x2289, 0x2287, 0x0338, 0,
3555 1, 0x22AC, 0x22A2, 0x0338, 0,
3556 1, 0x22AD, 0x22A8, 0x0338, 0,
3557 1, 0x22AE, 0x22A9, 0x0338, 0,
3558 1, 0x22AF, 0x22AB, 0x0338, 0,
3559 1, 0x22E0, 0x227C, 0x0338, 0,
3560 1, 0x22E1, 0x227D, 0x0338, 0,
3561 1, 0x22E2, 0x2291, 0x0338, 0,
3562 1, 0x22E3, 0x2292, 0x0338, 0,
3563 1, 0x22EA, 0x22B2, 0x0338, 0,
3564 1, 0x22EB, 0x22B3, 0x0338, 0,
3565 1, 0x22EC, 0x22B4, 0x0338, 0,
3566 1, 0x22ED, 0x22B5, 0x0338, 0,
3567 1, 0x2329, 0x3008, 0,
3568 1, 0x232A, 0x3009, 0,
3569 8, 0x2460, 0x0031, 0,
3570 8, 0x2461, 0x0032, 0,
3571 8, 0x2462, 0x0033, 0,
3572 8, 0x2463, 0x0034, 0,
3573 8, 0x2464, 0x0035, 0,
3574 8, 0x2465, 0x0036, 0,
3575 8, 0x2466, 0x0037, 0,
3576 8, 0x2467, 0x0038, 0,
3577 8, 0x2468, 0x0039, 0,
3578 8, 0x2469, 0x0031, 0x0030, 0,
3579 8, 0x246A, 0x0031, 0x0031, 0,
3580 8, 0x246B, 0x0031, 0x0032, 0,
3581 8, 0x246C, 0x0031, 0x0033, 0,
3582 8, 0x246D, 0x0031, 0x0034, 0,
3583 8, 0x246E, 0x0031, 0x0035, 0,
3584 8, 0x246F, 0x0031, 0x0036, 0,
3585 8, 0x2470, 0x0031, 0x0037, 0,
3586 8, 0x2471, 0x0031, 0x0038, 0,
3587 8, 0x2472, 0x0031, 0x0039, 0,
3588 8, 0x2473, 0x0032, 0x0030, 0,
3589 16, 0x2474, 0x0028, 0x0031, 0x0029, 0,
3590 16, 0x2475, 0x0028, 0x0032, 0x0029, 0,
3591 16, 0x2476, 0x0028, 0x0033, 0x0029, 0,
3592 16, 0x2477, 0x0028, 0x0034, 0x0029, 0,
3593 16, 0x2478, 0x0028, 0x0035, 0x0029, 0,
3594 16, 0x2479, 0x0028, 0x0036, 0x0029, 0,
3595 16, 0x247A, 0x0028, 0x0037, 0x0029, 0,
3596 16, 0x247B, 0x0028, 0x0038, 0x0029, 0,
3597 16, 0x247C, 0x0028, 0x0039, 0x0029, 0,
3598 16, 0x247D, 0x0028, 0x0031, 0x0030, 0x0029, 0,
3599 16, 0x247E, 0x0028, 0x0031, 0x0031, 0x0029, 0,
3600 16, 0x247F, 0x0028, 0x0031, 0x0032, 0x0029, 0,
3601 16, 0x2480, 0x0028, 0x0031, 0x0033, 0x0029, 0,
3602 16, 0x2481, 0x0028, 0x0031, 0x0034, 0x0029, 0,
3603 16, 0x2482, 0x0028, 0x0031, 0x0035, 0x0029, 0,
3604 16, 0x2483, 0x0028, 0x0031, 0x0036, 0x0029, 0,
3605 16, 0x2484, 0x0028, 0x0031, 0x0037, 0x0029, 0,
3606 16, 0x2485, 0x0028, 0x0031, 0x0038, 0x0029, 0,
3607 16, 0x2486, 0x0028, 0x0031, 0x0039, 0x0029, 0,
3608 16, 0x2487, 0x0028, 0x0032, 0x0030, 0x0029, 0,
3609 16, 0x2488, 0x0031, 0x002E, 0,
3610 16, 0x2489, 0x0032, 0x002E, 0,
3611 16, 0x248A, 0x0033, 0x002E, 0,
3612 16, 0x248B, 0x0034, 0x002E, 0,
3613 16, 0x248C, 0x0035, 0x002E, 0,
3614 16, 0x248D, 0x0036, 0x002E, 0,
3615 16, 0x248E, 0x0037, 0x002E, 0,
3616 16, 0x248F, 0x0038, 0x002E, 0,
3617 16, 0x2490, 0x0039, 0x002E, 0,
3618 16, 0x2491, 0x0031, 0x0030, 0x002E, 0,
3619 16, 0x2492, 0x0031, 0x0031, 0x002E, 0,
3620 16, 0x2493, 0x0031, 0x0032, 0x002E, 0,
3621 16, 0x2494, 0x0031, 0x0033, 0x002E, 0,
3622 16, 0x2495, 0x0031, 0x0034, 0x002E, 0,
3623 16, 0x2496, 0x0031, 0x0035, 0x002E, 0,
3624 16, 0x2497, 0x0031, 0x0036, 0x002E, 0,
3625 16, 0x2498, 0x0031, 0x0037, 0x002E, 0,
3626 16, 0x2499, 0x0031, 0x0038, 0x002E, 0,
3627 16, 0x249A, 0x0031, 0x0039, 0x002E, 0,
3628 16, 0x249B, 0x0032, 0x0030, 0x002E, 0,
3629 16, 0x249C, 0x0028, 0x0061, 0x0029, 0,
3630 16, 0x249D, 0x0028, 0x0062, 0x0029, 0,
3631 16, 0x249E, 0x0028, 0x0063, 0x0029, 0,
3632 16, 0x249F, 0x0028, 0x0064, 0x0029, 0,
3633 16, 0x24A0, 0x0028, 0x0065, 0x0029, 0,
3634 16, 0x24A1, 0x0028, 0x0066, 0x0029, 0,
3635 16, 0x24A2, 0x0028, 0x0067, 0x0029, 0,
3636 16, 0x24A3, 0x0028, 0x0068, 0x0029, 0,
3637 16, 0x24A4, 0x0028, 0x0069, 0x0029, 0,
3638 16, 0x24A5, 0x0028, 0x006A, 0x0029, 0,
3639 16, 0x24A6, 0x0028, 0x006B, 0x0029, 0,
3640 16, 0x24A7, 0x0028, 0x006C, 0x0029, 0,
3641 16, 0x24A8, 0x0028, 0x006D, 0x0029, 0,
3642 16, 0x24A9, 0x0028, 0x006E, 0x0029, 0,
3643 16, 0x24AA, 0x0028, 0x006F, 0x0029, 0,
3644 16, 0x24AB, 0x0028, 0x0070, 0x0029, 0,
3645 16, 0x24AC, 0x0028, 0x0071, 0x0029, 0,
3646 16, 0x24AD, 0x0028, 0x0072, 0x0029, 0,
3647 16, 0x24AE, 0x0028, 0x0073, 0x0029, 0,
3648 16, 0x24AF, 0x0028, 0x0074, 0x0029, 0,
3649 16, 0x24B0, 0x0028, 0x0075, 0x0029, 0,
3650 16, 0x24B1, 0x0028, 0x0076, 0x0029, 0,
3651 16, 0x24B2, 0x0028, 0x0077, 0x0029, 0,
3652 16, 0x24B3, 0x0028, 0x0078, 0x0029, 0,
3653 16, 0x24B4, 0x0028, 0x0079, 0x0029, 0,
3654 16, 0x24B5, 0x0028, 0x007A, 0x0029, 0,
3655 8, 0x24B6, 0x0041, 0,
3656 8, 0x24B7, 0x0042, 0,
3657 8, 0x24B8, 0x0043, 0,
3658 8, 0x24B9, 0x0044, 0,
3659 8, 0x24BA, 0x0045, 0,
3660 8, 0x24BB, 0x0046, 0,
3661 8, 0x24BC, 0x0047, 0,
3662 8, 0x24BD, 0x0048, 0,
3663 8, 0x24BE, 0x0049, 0,
3664 8, 0x24BF, 0x004A, 0,
3665 8, 0x24C0, 0x004B, 0,
3666 8, 0x24C1, 0x004C, 0,
3667 8, 0x24C2, 0x004D, 0,
3668 8, 0x24C3, 0x004E, 0,
3669 8, 0x24C4, 0x004F, 0,
3670 8, 0x24C5, 0x0050, 0,
3671 8, 0x24C6, 0x0051, 0,
3672 8, 0x24C7, 0x0052, 0,
3673 8, 0x24C8, 0x0053, 0,
3674 8, 0x24C9, 0x0054, 0,
3675 8, 0x24CA, 0x0055, 0,
3676 8, 0x24CB, 0x0056, 0,
3677 8, 0x24CC, 0x0057, 0,
3678 8, 0x24CD, 0x0058, 0,
3679 8, 0x24CE, 0x0059, 0,
3680 8, 0x24CF, 0x005A, 0,
3681 8, 0x24D0, 0x0061, 0,
3682 8, 0x24D1, 0x0062, 0,
3683 8, 0x24D2, 0x0063, 0,
3684 8, 0x24D3, 0x0064, 0,
3685 8, 0x24D4, 0x0065, 0,
3686 8, 0x24D5, 0x0066, 0,
3687 8, 0x24D6, 0x0067, 0,
3688 8, 0x24D7, 0x0068, 0,
3689 8, 0x24D8, 0x0069, 0,
3690 8, 0x24D9, 0x006A, 0,
3691 8, 0x24DA, 0x006B, 0,
3692 8, 0x24DB, 0x006C, 0,
3693 8, 0x24DC, 0x006D, 0,
3694 8, 0x24DD, 0x006E, 0,
3695 8, 0x24DE, 0x006F, 0,
3696 8, 0x24DF, 0x0070, 0,
3697 8, 0x24E0, 0x0071, 0,
3698 8, 0x24E1, 0x0072, 0,
3699 8, 0x24E2, 0x0073, 0,
3700 8, 0x24E3, 0x0074, 0,
3701 8, 0x24E4, 0x0075, 0,
3702 8, 0x24E5, 0x0076, 0,
3703 8, 0x24E6, 0x0077, 0,
3704 8, 0x24E7, 0x0078, 0,
3705 8, 0x24E8, 0x0079, 0,
3706 8, 0x24E9, 0x007A, 0,
3707 8, 0x24EA, 0x0030, 0,
3708 16, 0x2A0C, 0x222B, 0x222B, 0x222B, 0x222B, 0,
3709 16, 0x2A74, 0x003A, 0x003A, 0x003D, 0,
3710 16, 0x2A75, 0x003D, 0x003D, 0,
3711 16, 0x2A76, 0x003D, 0x003D, 0x003D, 0,
3712 1, 0x2ADC, 0x2ADD, 0x0338, 0,
3713 16, 0x2E9F, 0x6BCD, 0,
3714 16, 0x2EF3, 0x9F9F, 0,
3715 16, 0x2F00, 0x4E00, 0,
3716 16, 0x2F01, 0x4E28, 0,
3717 16, 0x2F02, 0x4E36, 0,
3718 16, 0x2F03, 0x4E3F, 0,
3719 16, 0x2F04, 0x4E59, 0,
3720 16, 0x2F05, 0x4E85, 0,
3721 16, 0x2F06, 0x4E8C, 0,
3722 16, 0x2F07, 0x4EA0, 0,
3723 16, 0x2F08, 0x4EBA, 0,
3724 16, 0x2F09, 0x513F, 0,
3725 16, 0x2F0A, 0x5165, 0,
3726 16, 0x2F0B, 0x516B, 0,
3727 16, 0x2F0C, 0x5182, 0,
3728 16, 0x2F0D, 0x5196, 0,
3729 16, 0x2F0E, 0x51AB, 0,
3730 16, 0x2F0F, 0x51E0, 0,
3731 16, 0x2F10, 0x51F5, 0,
3732 16, 0x2F11, 0x5200, 0,
3733 16, 0x2F12, 0x529B, 0,
3734 16, 0x2F13, 0x52F9, 0,
3735 16, 0x2F14, 0x5315, 0,
3736 16, 0x2F15, 0x531A, 0,
3737 16, 0x2F16, 0x5338, 0,
3738 16, 0x2F17, 0x5341, 0,
3739 16, 0x2F18, 0x535C, 0,
3740 16, 0x2F19, 0x5369, 0,
3741 16, 0x2F1A, 0x5382, 0,
3742 16, 0x2F1B, 0x53B6, 0,
3743 16, 0x2F1C, 0x53C8, 0,
3744 16, 0x2F1D, 0x53E3, 0,
3745 16, 0x2F1E, 0x56D7, 0,
3746 16, 0x2F1F, 0x571F, 0,
3747 16, 0x2F20, 0x58EB, 0,
3748 16, 0x2F21, 0x5902, 0,
3749 16, 0x2F22, 0x590A, 0,
3750 16, 0x2F23, 0x5915, 0,
3751 16, 0x2F24, 0x5927, 0,
3752 16, 0x2F25, 0x5973, 0,
3753 16, 0x2F26, 0x5B50, 0,
3754 16, 0x2F27, 0x5B80, 0,
3755 16, 0x2F28, 0x5BF8, 0,
3756 16, 0x2F29, 0x5C0F, 0,
3757 16, 0x2F2A, 0x5C22, 0,
3758 16, 0x2F2B, 0x5C38, 0,
3759 16, 0x2F2C, 0x5C6E, 0,
3760 16, 0x2F2D, 0x5C71, 0,
3761 16, 0x2F2E, 0x5DDB, 0,
3762 16, 0x2F2F, 0x5DE5, 0,
3763 16, 0x2F30, 0x5DF1, 0,
3764 16, 0x2F31, 0x5DFE, 0,
3765 16, 0x2F32, 0x5E72, 0,
3766 16, 0x2F33, 0x5E7A, 0,
3767 16, 0x2F34, 0x5E7F, 0,
3768 16, 0x2F35, 0x5EF4, 0,
3769 16, 0x2F36, 0x5EFE, 0,
3770 16, 0x2F37, 0x5F0B, 0,
3771 16, 0x2F38, 0x5F13, 0,
3772 16, 0x2F39, 0x5F50, 0,
3773 16, 0x2F3A, 0x5F61, 0,
3774 16, 0x2F3B, 0x5F73, 0,
3775 16, 0x2F3C, 0x5FC3, 0,
3776 16, 0x2F3D, 0x6208, 0,
3777 16, 0x2F3E, 0x6236, 0,
3778 16, 0x2F3F, 0x624B, 0,
3779 16, 0x2F40, 0x652F, 0,
3780 16, 0x2F41, 0x6534, 0,
3781 16, 0x2F42, 0x6587, 0,
3782 16, 0x2F43, 0x6597, 0,
3783 16, 0x2F44, 0x65A4, 0,
3784 16, 0x2F45, 0x65B9, 0,
3785 16, 0x2F46, 0x65E0, 0,
3786 16, 0x2F47, 0x65E5, 0,
3787 16, 0x2F48, 0x66F0, 0,
3788 16, 0x2F49, 0x6708, 0,
3789 16, 0x2F4A, 0x6728, 0,
3790 16, 0x2F4B, 0x6B20, 0,
3791 16, 0x2F4C, 0x6B62, 0,
3792 16, 0x2F4D, 0x6B79, 0,
3793 16, 0x2F4E, 0x6BB3, 0,
3794 16, 0x2F4F, 0x6BCB, 0,
3795 16, 0x2F50, 0x6BD4, 0,
3796 16, 0x2F51, 0x6BDB, 0,
3797 16, 0x2F52, 0x6C0F, 0,
3798 16, 0x2F53, 0x6C14, 0,
3799 16, 0x2F54, 0x6C34, 0,
3800 16, 0x2F55, 0x706B, 0,
3801 16, 0x2F56, 0x722A, 0,
3802 16, 0x2F57, 0x7236, 0,
3803 16, 0x2F58, 0x723B, 0,
3804 16, 0x2F59, 0x723F, 0,
3805 16, 0x2F5A, 0x7247, 0,
3806 16, 0x2F5B, 0x7259, 0,
3807 16, 0x2F5C, 0x725B, 0,
3808 16, 0x2F5D, 0x72AC, 0,
3809 16, 0x2F5E, 0x7384, 0,
3810 16, 0x2F5F, 0x7389, 0,
3811 16, 0x2F60, 0x74DC, 0,
3812 16, 0x2F61, 0x74E6, 0,
3813 16, 0x2F62, 0x7518, 0,
3814 16, 0x2F63, 0x751F, 0,
3815 16, 0x2F64, 0x7528, 0,
3816 16, 0x2F65, 0x7530, 0,
3817 16, 0x2F66, 0x758B, 0,
3818 16, 0x2F67, 0x7592, 0,
3819 16, 0x2F68, 0x7676, 0,
3820 16, 0x2F69, 0x767D, 0,
3821 16, 0x2F6A, 0x76AE, 0,
3822 16, 0x2F6B, 0x76BF, 0,
3823 16, 0x2F6C, 0x76EE, 0,
3824 16, 0x2F6D, 0x77DB, 0,
3825 16, 0x2F6E, 0x77E2, 0,
3826 16, 0x2F6F, 0x77F3, 0,
3827 16, 0x2F70, 0x793A, 0,
3828 16, 0x2F71, 0x79B8, 0,
3829 16, 0x2F72, 0x79BE, 0,
3830 16, 0x2F73, 0x7A74, 0,
3831 16, 0x2F74, 0x7ACB, 0,
3832 16, 0x2F75, 0x7AF9, 0,
3833 16, 0x2F76, 0x7C73, 0,
3834 16, 0x2F77, 0x7CF8, 0,
3835 16, 0x2F78, 0x7F36, 0,
3836 16, 0x2F79, 0x7F51, 0,
3837 16, 0x2F7A, 0x7F8A, 0,
3838 16, 0x2F7B, 0x7FBD, 0,
3839 16, 0x2F7C, 0x8001, 0,
3840 16, 0x2F7D, 0x800C, 0,
3841 16, 0x2F7E, 0x8012, 0,
3842 16, 0x2F7F, 0x8033, 0,
3843 16, 0x2F80, 0x807F, 0,
3844 16, 0x2F81, 0x8089, 0,
3845 16, 0x2F82, 0x81E3, 0,
3846 16, 0x2F83, 0x81EA, 0,
3847 16, 0x2F84, 0x81F3, 0,
3848 16, 0x2F85, 0x81FC, 0,
3849 16, 0x2F86, 0x820C, 0,
3850 16, 0x2F87, 0x821B, 0,
3851 16, 0x2F88, 0x821F, 0,
3852 16, 0x2F89, 0x826E, 0,
3853 16, 0x2F8A, 0x8272, 0,
3854 16, 0x2F8B, 0x8278, 0,
3855 16, 0x2F8C, 0x864D, 0,
3856 16, 0x2F8D, 0x866B, 0,
3857 16, 0x2F8E, 0x8840, 0,
3858 16, 0x2F8F, 0x884C, 0,
3859 16, 0x2F90, 0x8863, 0,
3860 16, 0x2F91, 0x897E, 0,
3861 16, 0x2F92, 0x898B, 0,
3862 16, 0x2F93, 0x89D2, 0,
3863 16, 0x2F94, 0x8A00, 0,
3864 16, 0x2F95, 0x8C37, 0,
3865 16, 0x2F96, 0x8C46, 0,
3866 16, 0x2F97, 0x8C55, 0,
3867 16, 0x2F98, 0x8C78, 0,
3868 16, 0x2F99, 0x8C9D, 0,
3869 16, 0x2F9A, 0x8D64, 0,
3870 16, 0x2F9B, 0x8D70, 0,
3871 16, 0x2F9C, 0x8DB3, 0,
3872 16, 0x2F9D, 0x8EAB, 0,
3873 16, 0x2F9E, 0x8ECA, 0,
3874 16, 0x2F9F, 0x8F9B, 0,
3875 16, 0x2FA0, 0x8FB0, 0,
3876 16, 0x2FA1, 0x8FB5, 0,
3877 16, 0x2FA2, 0x9091, 0,
3878 16, 0x2FA3, 0x9149, 0,
3879 16, 0x2FA4, 0x91C6, 0,
3880 16, 0x2FA5, 0x91CC, 0,
3881 16, 0x2FA6, 0x91D1, 0,
3882 16, 0x2FA7, 0x9577, 0,
3883 16, 0x2FA8, 0x9580, 0,
3884 16, 0x2FA9, 0x961C, 0,
3885 16, 0x2FAA, 0x96B6, 0,
3886 16, 0x2FAB, 0x96B9, 0,
3887 16, 0x2FAC, 0x96E8, 0,
3888 16, 0x2FAD, 0x9751, 0,
3889 16, 0x2FAE, 0x975E, 0,
3890 16, 0x2FAF, 0x9762, 0,
3891 16, 0x2FB0, 0x9769, 0,
3892 16, 0x2FB1, 0x97CB, 0,
3893 16, 0x2FB2, 0x97ED, 0,
3894 16, 0x2FB3, 0x97F3, 0,
3895 16, 0x2FB4, 0x9801, 0,
3896 16, 0x2FB5, 0x98A8, 0,
3897 16, 0x2FB6, 0x98DB, 0,
3898 16, 0x2FB7, 0x98DF, 0,
3899 16, 0x2FB8, 0x9996, 0,
3900 16, 0x2FB9, 0x9999, 0,
3901 16, 0x2FBA, 0x99AC, 0,
3902 16, 0x2FBB, 0x9AA8, 0,
3903 16, 0x2FBC, 0x9AD8, 0,
3904 16, 0x2FBD, 0x9ADF, 0,
3905 16, 0x2FBE, 0x9B25, 0,
3906 16, 0x2FBF, 0x9B2F, 0,
3907 16, 0x2FC0, 0x9B32, 0,
3908 16, 0x2FC1, 0x9B3C, 0,
3909 16, 0x2FC2, 0x9B5A, 0,
3910 16, 0x2FC3, 0x9CE5, 0,
3911 16, 0x2FC4, 0x9E75, 0,
3912 16, 0x2FC5, 0x9E7F, 0,
3913 16, 0x2FC6, 0x9EA5, 0,
3914 16, 0x2FC7, 0x9EBB, 0,
3915 16, 0x2FC8, 0x9EC3, 0,
3916 16, 0x2FC9, 0x9ECD, 0,
3917 16, 0x2FCA, 0x9ED1, 0,
3918 16, 0x2FCB, 0x9EF9, 0,
3919 16, 0x2FCC, 0x9EFD, 0,
3920 16, 0x2FCD, 0x9F0E, 0,
3921 16, 0x2FCE, 0x9F13, 0,
3922 16, 0x2FCF, 0x9F20, 0,
3923 16, 0x2FD0, 0x9F3B, 0,
3924 16, 0x2FD1, 0x9F4A, 0,
3925 16, 0x2FD2, 0x9F52, 0,
3926 16, 0x2FD3, 0x9F8D, 0,
3927 16, 0x2FD4, 0x9F9C, 0,
3928 16, 0x2FD5, 0x9FA0, 0,
3929 12, 0x3000, 0x0020, 0,
3930 16, 0x3036, 0x3012, 0,
3931 16, 0x3038, 0x5341, 0,
3932 16, 0x3039, 0x5344, 0,
3933 16, 0x303A, 0x5345, 0,
3934 1, 0x304C, 0x304B, 0x3099, 0,
3935 1, 0x304E, 0x304D, 0x3099, 0,
3936 1, 0x3050, 0x304F, 0x3099, 0,
3937 1, 0x3052, 0x3051, 0x3099, 0,
3938 1, 0x3054, 0x3053, 0x3099, 0,
3939 1, 0x3056, 0x3055, 0x3099, 0,
3940 1, 0x3058, 0x3057, 0x3099, 0,
3941 1, 0x305A, 0x3059, 0x3099, 0,
3942 1, 0x305C, 0x305B, 0x3099, 0,
3943 1, 0x305E, 0x305D, 0x3099, 0,
3944 1, 0x3060, 0x305F, 0x3099, 0,
3945 1, 0x3062, 0x3061, 0x3099, 0,
3946 1, 0x3065, 0x3064, 0x3099, 0,
3947 1, 0x3067, 0x3066, 0x3099, 0,
3948 1, 0x3069, 0x3068, 0x3099, 0,
3949 1, 0x3070, 0x306F, 0x3099, 0,
3950 1, 0x3071, 0x306F, 0x309A, 0,
3951 1, 0x3073, 0x3072, 0x3099, 0,
3952 1, 0x3074, 0x3072, 0x309A, 0,
3953 1, 0x3076, 0x3075, 0x3099, 0,
3954 1, 0x3077, 0x3075, 0x309A, 0,
3955 1, 0x3079, 0x3078, 0x3099, 0,
3956 1, 0x307A, 0x3078, 0x309A, 0,
3957 1, 0x307C, 0x307B, 0x3099, 0,
3958 1, 0x307D, 0x307B, 0x309A, 0,
3959 1, 0x3094, 0x3046, 0x3099, 0,
3960 16, 0x309B, 0x0020, 0x3099, 0,
3961 16, 0x309C, 0x0020, 0x309A, 0,
3962 1, 0x309E, 0x309D, 0x3099, 0,
3963 11, 0x309F, 0x3088, 0x308A, 0,
3964 1, 0x30AC, 0x30AB, 0x3099, 0,
3965 1, 0x30AE, 0x30AD, 0x3099, 0,
3966 1, 0x30B0, 0x30AF, 0x3099, 0,
3967 1, 0x30B2, 0x30B1, 0x3099, 0,
3968 1, 0x30B4, 0x30B3, 0x3099, 0,
3969 1, 0x30B6, 0x30B5, 0x3099, 0,
3970 1, 0x30B8, 0x30B7, 0x3099, 0,
3971 1, 0x30BA, 0x30B9, 0x3099, 0,
3972 1, 0x30BC, 0x30BB, 0x3099, 0,
3973 1, 0x30BE, 0x30BD, 0x3099, 0,
3974 1, 0x30C0, 0x30BF, 0x3099, 0,
3975 1, 0x30C2, 0x30C1, 0x3099, 0,
3976 1, 0x30C5, 0x30C4, 0x3099, 0,
3977 1, 0x30C7, 0x30C6, 0x3099, 0,
3978 1, 0x30C9, 0x30C8, 0x3099, 0,
3979 1, 0x30D0, 0x30CF, 0x3099, 0,
3980 1, 0x30D1, 0x30CF, 0x309A, 0,
3981 1, 0x30D3, 0x30D2, 0x3099, 0,
3982 1, 0x30D4, 0x30D2, 0x309A, 0,
3983 1, 0x30D6, 0x30D5, 0x3099, 0,
3984 1, 0x30D7, 0x30D5, 0x309A, 0,
3985 1, 0x30D9, 0x30D8, 0x3099, 0,
3986 1, 0x30DA, 0x30D8, 0x309A, 0,
3987 1, 0x30DC, 0x30DB, 0x3099, 0,
3988 1, 0x30DD, 0x30DB, 0x309A, 0,
3989 1, 0x30F4, 0x30A6, 0x3099, 0,
3990 1, 0x30F7, 0x30EF, 0x3099, 0,
3991 1, 0x30F8, 0x30F0, 0x3099, 0,
3992 1, 0x30F9, 0x30F1, 0x3099, 0,
3993 1, 0x30FA, 0x30F2, 0x3099, 0,
3994 1, 0x30FE, 0x30FD, 0x3099, 0,
3995 11, 0x30FF, 0x30B3, 0x30C8, 0,
3996 16, 0x3131, 0x1100, 0,
3997 16, 0x3132, 0x1101, 0,
3998 16, 0x3133, 0x11AA, 0,
3999 16, 0x3134, 0x1102, 0,
4000 16, 0x3135, 0x11AC, 0,
4001 16, 0x3136, 0x11AD, 0,
4002 16, 0x3137, 0x1103, 0,
4003 16, 0x3138, 0x1104, 0,
4004 16, 0x3139, 0x1105, 0,
4005 16, 0x313A, 0x11B0, 0,
4006 16, 0x313B, 0x11B1, 0,
4007 16, 0x313C, 0x11B2, 0,
4008 16, 0x313D, 0x11B3, 0,
4009 16, 0x313E, 0x11B4, 0,
4010 16, 0x313F, 0x11B5, 0,
4011 16, 0x3140, 0x111A, 0,
4012 16, 0x3141, 0x1106, 0,
4013 16, 0x3142, 0x1107, 0,
4014 16, 0x3143, 0x1108, 0,
4015 16, 0x3144, 0x1121, 0,
4016 16, 0x3145, 0x1109, 0,
4017 16, 0x3146, 0x110A, 0,
4018 16, 0x3147, 0x110B, 0,
4019 16, 0x3148, 0x110C, 0,
4020 16, 0x3149, 0x110D, 0,
4021 16, 0x314A, 0x110E, 0,
4022 16, 0x314B, 0x110F, 0,
4023 16, 0x314C, 0x1110, 0,
4024 16, 0x314D, 0x1111, 0,
4025 16, 0x314E, 0x1112, 0,
4026 16, 0x314F, 0x1161, 0,
4027 16, 0x3150, 0x1162, 0,
4028 16, 0x3151, 0x1163, 0,
4029 16, 0x3152, 0x1164, 0,
4030 16, 0x3153, 0x1165, 0,
4031 16, 0x3154, 0x1166, 0,
4032 16, 0x3155, 0x1167, 0,
4033 16, 0x3156, 0x1168, 0,
4034 16, 0x3157, 0x1169, 0,
4035 16, 0x3158, 0x116A, 0,
4036 16, 0x3159, 0x116B, 0,
4037 16, 0x315A, 0x116C, 0,
4038 16, 0x315B, 0x116D, 0,
4039 16, 0x315C, 0x116E, 0,
4040 16, 0x315D, 0x116F, 0,
4041 16, 0x315E, 0x1170, 0,
4042 16, 0x315F, 0x1171, 0,
4043 16, 0x3160, 0x1172, 0,
4044 16, 0x3161, 0x1173, 0,
4045 16, 0x3162, 0x1174, 0,
4046 16, 0x3163, 0x1175, 0,
4047 16, 0x3164, 0x1160, 0,
4048 16, 0x3165, 0x1114, 0,
4049 16, 0x3166, 0x1115, 0,
4050 16, 0x3167, 0x11C7, 0,
4051 16, 0x3168, 0x11C8, 0,
4052 16, 0x3169, 0x11CC, 0,
4053 16, 0x316A, 0x11CE, 0,
4054 16, 0x316B, 0x11D3, 0,
4055 16, 0x316C, 0x11D7, 0,
4056 16, 0x316D, 0x11D9, 0,
4057 16, 0x316E, 0x111C, 0,
4058 16, 0x316F, 0x11DD, 0,
4059 16, 0x3170, 0x11DF, 0,
4060 16, 0x3171, 0x111D, 0,
4061 16, 0x3172, 0x111E, 0,
4062 16, 0x3173, 0x1120, 0,
4063 16, 0x3174, 0x1122, 0,
4064 16, 0x3175, 0x1123, 0,
4065 16, 0x3176, 0x1127, 0,
4066 16, 0x3177, 0x1129, 0,
4067 16, 0x3178, 0x112B, 0,
4068 16, 0x3179, 0x112C, 0,
4069 16, 0x317A, 0x112D, 0,
4070 16, 0x317B, 0x112E, 0,
4071 16, 0x317C, 0x112F, 0,
4072 16, 0x317D, 0x1132, 0,
4073 16, 0x317E, 0x1136, 0,
4074 16, 0x317F, 0x1140, 0,
4075 16, 0x3180, 0x1147, 0,
4076 16, 0x3181, 0x114C, 0,
4077 16, 0x3182, 0x11F1, 0,
4078 16, 0x3183, 0x11F2, 0,
4079 16, 0x3184, 0x1157, 0,
4080 16, 0x3185, 0x1158, 0,
4081 16, 0x3186, 0x1159, 0,
4082 16, 0x3187, 0x1184, 0,
4083 16, 0x3188, 0x1185, 0,
4084 16, 0x3189, 0x1188, 0,
4085 16, 0x318A, 0x1191, 0,
4086 16, 0x318B, 0x1192, 0,
4087 16, 0x318C, 0x1194, 0,
4088 16, 0x318D, 0x119E, 0,
4089 16, 0x318E, 0x11A1, 0,
4090 9, 0x3192, 0x4E00, 0,
4091 9, 0x3193, 0x4E8C, 0,
4092 9, 0x3194, 0x4E09, 0,
4093 9, 0x3195, 0x56DB, 0,
4094 9, 0x3196, 0x4E0A, 0,
4095 9, 0x3197, 0x4E2D, 0,
4096 9, 0x3198, 0x4E0B, 0,
4097 9, 0x3199, 0x7532, 0,
4098 9, 0x319A, 0x4E59, 0,
4099 9, 0x319B, 0x4E19, 0,
4100 9, 0x319C, 0x4E01, 0,
4101 9, 0x319D, 0x5929, 0,
4102 9, 0x319E, 0x5730, 0,
4103 9, 0x319F, 0x4EBA, 0,
4104 16, 0x3200, 0x0028, 0x1100, 0x0029, 0,
4105 16, 0x3201, 0x0028, 0x1102, 0x0029, 0,
4106 16, 0x3202, 0x0028, 0x1103, 0x0029, 0,
4107 16, 0x3203, 0x0028, 0x1105, 0x0029, 0,
4108 16, 0x3204, 0x0028, 0x1106, 0x0029, 0,
4109 16, 0x3205, 0x0028, 0x1107, 0x0029, 0,
4110 16, 0x3206, 0x0028, 0x1109, 0x0029, 0,
4111 16, 0x3207, 0x0028, 0x110B, 0x0029, 0,
4112 16, 0x3208, 0x0028, 0x110C, 0x0029, 0,
4113 16, 0x3209, 0x0028, 0x110E, 0x0029, 0,
4114 16, 0x320A, 0x0028, 0x110F, 0x0029, 0,
4115 16, 0x320B, 0x0028, 0x1110, 0x0029, 0,
4116 16, 0x320C, 0x0028, 0x1111, 0x0029, 0,
4117 16, 0x320D, 0x0028, 0x1112, 0x0029, 0,
4118 16, 0x320E, 0x0028, 0x1100, 0x1161, 0x0029, 0,
4119 16, 0x320F, 0x0028, 0x1102, 0x1161, 0x0029, 0,
4120 16, 0x3210, 0x0028, 0x1103, 0x1161, 0x0029, 0,
4121 16, 0x3211, 0x0028, 0x1105, 0x1161, 0x0029, 0,
4122 16, 0x3212, 0x0028, 0x1106, 0x1161, 0x0029, 0,
4123 16, 0x3213, 0x0028, 0x1107, 0x1161, 0x0029, 0,
4124 16, 0x3214, 0x0028, 0x1109, 0x1161, 0x0029, 0,
4125 16, 0x3215, 0x0028, 0x110B, 0x1161, 0x0029, 0,
4126 16, 0x3216, 0x0028, 0x110C, 0x1161, 0x0029, 0,
4127 16, 0x3217, 0x0028, 0x110E, 0x1161, 0x0029, 0,
4128 16, 0x3218, 0x0028, 0x110F, 0x1161, 0x0029, 0,
4129 16, 0x3219, 0x0028, 0x1110, 0x1161, 0x0029, 0,
4130 16, 0x321A, 0x0028, 0x1111, 0x1161, 0x0029, 0,
4131 16, 0x321B, 0x0028, 0x1112, 0x1161, 0x0029, 0,
4132 16, 0x321C, 0x0028, 0x110C, 0x116E, 0x0029, 0,
4133 16, 0x3220, 0x0028, 0x4E00, 0x0029, 0,
4134 16, 0x3221, 0x0028, 0x4E8C, 0x0029, 0,
4135 16, 0x3222, 0x0028, 0x4E09, 0x0029, 0,
4136 16, 0x3223, 0x0028, 0x56DB, 0x0029, 0,
4137 16, 0x3224, 0x0028, 0x4E94, 0x0029, 0,
4138 16, 0x3225, 0x0028, 0x516D, 0x0029, 0,
4139 16, 0x3226, 0x0028, 0x4E03, 0x0029, 0,
4140 16, 0x3227, 0x0028, 0x516B, 0x0029, 0,
4141 16, 0x3228, 0x0028, 0x4E5D, 0x0029, 0,
4142 16, 0x3229, 0x0028, 0x5341, 0x0029, 0,
4143 16, 0x322A, 0x0028, 0x6708, 0x0029, 0,
4144 16, 0x322B, 0x0028, 0x706B, 0x0029, 0,
4145 16, 0x322C, 0x0028, 0x6C34, 0x0029, 0,
4146 16, 0x322D, 0x0028, 0x6728, 0x0029, 0,
4147 16, 0x322E, 0x0028, 0x91D1, 0x0029, 0,
4148 16, 0x322F, 0x0028, 0x571F, 0x0029, 0,
4149 16, 0x3230, 0x0028, 0x65E5, 0x0029, 0,
4150 16, 0x3231, 0x0028, 0x682A, 0x0029, 0,
4151 16, 0x3232, 0x0028, 0x6709, 0x0029, 0,
4152 16, 0x3233, 0x0028, 0x793E, 0x0029, 0,
4153 16, 0x3234, 0x0028, 0x540D, 0x0029, 0,
4154 16, 0x3235, 0x0028, 0x7279, 0x0029, 0,
4155 16, 0x3236, 0x0028, 0x8CA1, 0x0029, 0,
4156 16, 0x3237, 0x0028, 0x795D, 0x0029, 0,
4157 16, 0x3238, 0x0028, 0x52B4, 0x0029, 0,
4158 16, 0x3239, 0x0028, 0x4EE3, 0x0029, 0,
4159 16, 0x323A, 0x0028, 0x547C, 0x0029, 0,
4160 16, 0x323B, 0x0028, 0x5B66, 0x0029, 0,
4161 16, 0x323C, 0x0028, 0x76E3, 0x0029, 0,
4162 16, 0x323D, 0x0028, 0x4F01, 0x0029, 0,
4163 16, 0x323E, 0x0028, 0x8CC7, 0x0029, 0,
4164 16, 0x323F, 0x0028, 0x5354, 0x0029, 0,
4165 16, 0x3240, 0x0028, 0x796D, 0x0029, 0,
4166 16, 0x3241, 0x0028, 0x4F11, 0x0029, 0,
4167 16, 0x3242, 0x0028, 0x81EA, 0x0029, 0,
4168 16, 0x3243, 0x0028, 0x81F3, 0x0029, 0,
4169 8, 0x3251, 0x0032, 0x0031, 0,
4170 8, 0x3252, 0x0032, 0x0032, 0,
4171 8, 0x3253, 0x0032, 0x0033, 0,
4172 8, 0x3254, 0x0032, 0x0034, 0,
4173 8, 0x3255, 0x0032, 0x0035, 0,
4174 8, 0x3256, 0x0032, 0x0036, 0,
4175 8, 0x3257, 0x0032, 0x0037, 0,
4176 8, 0x3258, 0x0032, 0x0038, 0,
4177 8, 0x3259, 0x0032, 0x0039, 0,
4178 8, 0x325A, 0x0033, 0x0030, 0,
4179 8, 0x325B, 0x0033, 0x0031, 0,
4180 8, 0x325C, 0x0033, 0x0032, 0,
4181 8, 0x325D, 0x0033, 0x0033, 0,
4182 8, 0x325E, 0x0033, 0x0034, 0,
4183 8, 0x325F, 0x0033, 0x0035, 0,
4184 8, 0x3260, 0x1100, 0,
4185 8, 0x3261, 0x1102, 0,
4186 8, 0x3262, 0x1103, 0,
4187 8, 0x3263, 0x1105, 0,
4188 8, 0x3264, 0x1106, 0,
4189 8, 0x3265, 0x1107, 0,
4190 8, 0x3266, 0x1109, 0,
4191 8, 0x3267, 0x110B, 0,
4192 8, 0x3268, 0x110C, 0,
4193 8, 0x3269, 0x110E, 0,
4194 8, 0x326A, 0x110F, 0,
4195 8, 0x326B, 0x1110, 0,
4196 8, 0x326C, 0x1111, 0,
4197 8, 0x326D, 0x1112, 0,
4198 8, 0x326E, 0x1100, 0x1161, 0,
4199 8, 0x326F, 0x1102, 0x1161, 0,
4200 8, 0x3270, 0x1103, 0x1161, 0,
4201 8, 0x3271, 0x1105, 0x1161, 0,
4202 8, 0x3272, 0x1106, 0x1161, 0,
4203 8, 0x3273, 0x1107, 0x1161, 0,
4204 8, 0x3274, 0x1109, 0x1161, 0,
4205 8, 0x3275, 0x110B, 0x1161, 0,
4206 8, 0x3276, 0x110C, 0x1161, 0,
4207 8, 0x3277, 0x110E, 0x1161, 0,
4208 8, 0x3278, 0x110F, 0x1161, 0,
4209 8, 0x3279, 0x1110, 0x1161, 0,
4210 8, 0x327A, 0x1111, 0x1161, 0,
4211 8, 0x327B, 0x1112, 0x1161, 0,
4212 8, 0x3280, 0x4E00, 0,
4213 8, 0x3281, 0x4E8C, 0,
4214 8, 0x3282, 0x4E09, 0,
4215 8, 0x3283, 0x56DB, 0,
4216 8, 0x3284, 0x4E94, 0,
4217 8, 0x3285, 0x516D, 0,
4218 8, 0x3286, 0x4E03, 0,
4219 8, 0x3287, 0x516B, 0,
4220 8, 0x3288, 0x4E5D, 0,
4221 8, 0x3289, 0x5341, 0,
4222 8, 0x328A, 0x6708, 0,
4223 8, 0x328B, 0x706B, 0,
4224 8, 0x328C, 0x6C34, 0,
4225 8, 0x328D, 0x6728, 0,
4226 8, 0x328E, 0x91D1, 0,
4227 8, 0x328F, 0x571F, 0,
4228 8, 0x3290, 0x65E5, 0,
4229 8, 0x3291, 0x682A, 0,
4230 8, 0x3292, 0x6709, 0,
4231 8, 0x3293, 0x793E, 0,
4232 8, 0x3294, 0x540D, 0,
4233 8, 0x3295, 0x7279, 0,
4234 8, 0x3296, 0x8CA1, 0,
4235 8, 0x3297, 0x795D, 0,
4236 8, 0x3298, 0x52B4, 0,
4237 8, 0x3299, 0x79D8, 0,
4238 8, 0x329A, 0x7537, 0,
4239 8, 0x329B, 0x5973, 0,
4240 8, 0x329C, 0x9069, 0,
4241 8, 0x329D, 0x512A, 0,
4242 8, 0x329E, 0x5370, 0,
4243 8, 0x329F, 0x6CE8, 0,
4244 8, 0x32A0, 0x9805, 0,
4245 8, 0x32A1, 0x4F11, 0,
4246 8, 0x32A2, 0x5199, 0,
4247 8, 0x32A3, 0x6B63, 0,
4248 8, 0x32A4, 0x4E0A, 0,
4249 8, 0x32A5, 0x4E2D, 0,
4250 8, 0x32A6, 0x4E0B, 0,
4251 8, 0x32A7, 0x5DE6, 0,
4252 8, 0x32A8, 0x53F3, 0,
4253 8, 0x32A9, 0x533B, 0,
4254 8, 0x32AA, 0x5B97, 0,
4255 8, 0x32AB, 0x5B66, 0,
4256 8, 0x32AC, 0x76E3, 0,
4257 8, 0x32AD, 0x4F01, 0,
4258 8, 0x32AE, 0x8CC7, 0,
4259 8, 0x32AF, 0x5354, 0,
4260 8, 0x32B0, 0x591C, 0,
4261 8, 0x32B1, 0x0033, 0x0036, 0,
4262 8, 0x32B2, 0x0033, 0x0037, 0,
4263 8, 0x32B3, 0x0033, 0x0038, 0,
4264 8, 0x32B4, 0x0033, 0x0039, 0,
4265 8, 0x32B5, 0x0034, 0x0030, 0,
4266 8, 0x32B6, 0x0034, 0x0031, 0,
4267 8, 0x32B7, 0x0034, 0x0032, 0,
4268 8, 0x32B8, 0x0034, 0x0033, 0,
4269 8, 0x32B9, 0x0034, 0x0034, 0,
4270 8, 0x32BA, 0x0034, 0x0035, 0,
4271 8, 0x32BB, 0x0034, 0x0036, 0,
4272 8, 0x32BC, 0x0034, 0x0037, 0,
4273 8, 0x32BD, 0x0034, 0x0038, 0,
4274 8, 0x32BE, 0x0034, 0x0039, 0,
4275 8, 0x32BF, 0x0035, 0x0030, 0,
4276 16, 0x32C0, 0x0031, 0x6708, 0,
4277 16, 0x32C1, 0x0032, 0x6708, 0,
4278 16, 0x32C2, 0x0033, 0x6708, 0,
4279 16, 0x32C3, 0x0034, 0x6708, 0,
4280 16, 0x32C4, 0x0035, 0x6708, 0,
4281 16, 0x32C5, 0x0036, 0x6708, 0,
4282 16, 0x32C6, 0x0037, 0x6708, 0,
4283 16, 0x32C7, 0x0038, 0x6708, 0,
4284 16, 0x32C8, 0x0039, 0x6708, 0,
4285 16, 0x32C9, 0x0031, 0x0030, 0x6708, 0,
4286 16, 0x32CA, 0x0031, 0x0031, 0x6708, 0,
4287 16, 0x32CB, 0x0031, 0x0032, 0x6708, 0,
4288 8, 0x32D0, 0x30A2, 0,
4289 8, 0x32D1, 0x30A4, 0,
4290 8, 0x32D2, 0x30A6, 0,
4291 8, 0x32D3, 0x30A8, 0,
4292 8, 0x32D4, 0x30AA, 0,
4293 8, 0x32D5, 0x30AB, 0,
4294 8, 0x32D6, 0x30AD, 0,
4295 8, 0x32D7, 0x30AF, 0,
4296 8, 0x32D8, 0x30B1, 0,
4297 8, 0x32D9, 0x30B3, 0,
4298 8, 0x32DA, 0x30B5, 0,
4299 8, 0x32DB, 0x30B7, 0,
4300 8, 0x32DC, 0x30B9, 0,
4301 8, 0x32DD, 0x30BB, 0,
4302 8, 0x32DE, 0x30BD, 0,
4303 8, 0x32DF, 0x30BF, 0,
4304 8, 0x32E0, 0x30C1, 0,
4305 8, 0x32E1, 0x30C4, 0,
4306 8, 0x32E2, 0x30C6, 0,
4307 8, 0x32E3, 0x30C8, 0,
4308 8, 0x32E4, 0x30CA, 0,
4309 8, 0x32E5, 0x30CB, 0,
4310 8, 0x32E6, 0x30CC, 0,
4311 8, 0x32E7, 0x30CD, 0,
4312 8, 0x32E8, 0x30CE, 0,
4313 8, 0x32E9, 0x30CF, 0,
4314 8, 0x32EA, 0x30D2, 0,
4315 8, 0x32EB, 0x30D5, 0,
4316 8, 0x32EC, 0x30D8, 0,
4317 8, 0x32ED, 0x30DB, 0,
4318 8, 0x32EE, 0x30DE, 0,
4319 8, 0x32EF, 0x30DF, 0,
4320 8, 0x32F0, 0x30E0, 0,
4321 8, 0x32F1, 0x30E1, 0,
4322 8, 0x32F2, 0x30E2, 0,
4323 8, 0x32F3, 0x30E4, 0,
4324 8, 0x32F4, 0x30E6, 0,
4325 8, 0x32F5, 0x30E8, 0,
4326 8, 0x32F6, 0x30E9, 0,
4327 8, 0x32F7, 0x30EA, 0,
4328 8, 0x32F8, 0x30EB, 0,
4329 8, 0x32F9, 0x30EC, 0,
4330 8, 0x32FA, 0x30ED, 0,
4331 8, 0x32FB, 0x30EF, 0,
4332 8, 0x32FC, 0x30F0, 0,
4333 8, 0x32FD, 0x30F1, 0,
4334 8, 0x32FE, 0x30F2, 0,
4335 15, 0x3300, 0x30A2, 0x30D1, 0x30FC, 0x30C8, 0,
4336 15, 0x3301, 0x30A2, 0x30EB, 0x30D5, 0x30A1, 0,
4337 15, 0x3302, 0x30A2, 0x30F3, 0x30DA, 0x30A2, 0,
4338 15, 0x3303, 0x30A2, 0x30FC, 0x30EB, 0,
4339 15, 0x3304, 0x30A4, 0x30CB, 0x30F3, 0x30B0, 0,
4340 15, 0x3305, 0x30A4, 0x30F3, 0x30C1, 0,
4341 15, 0x3306, 0x30A6, 0x30A9, 0x30F3, 0,
4342 15, 0x3307, 0x30A8, 0x30B9, 0x30AF, 0x30FC, 0x30C9, 0,
4343 15, 0x3308, 0x30A8, 0x30FC, 0x30AB, 0x30FC, 0,
4344 15, 0x3309, 0x30AA, 0x30F3, 0x30B9, 0,
4345 15, 0x330A, 0x30AA, 0x30FC, 0x30E0, 0,
4346 15, 0x330B, 0x30AB, 0x30A4, 0x30EA, 0,
4347 15, 0x330C, 0x30AB, 0x30E9, 0x30C3, 0x30C8, 0,
4348 15, 0x330D, 0x30AB, 0x30ED, 0x30EA, 0x30FC, 0,
4349 15, 0x330E, 0x30AC, 0x30ED, 0x30F3, 0,
4350 15, 0x330F, 0x30AC, 0x30F3, 0x30DE, 0,
4351 15, 0x3310, 0x30AE, 0x30AC, 0,
4352 15, 0x3311, 0x30AE, 0x30CB, 0x30FC, 0,
4353 15, 0x3312, 0x30AD, 0x30E5, 0x30EA, 0x30FC, 0,
4354 15, 0x3313, 0x30AE, 0x30EB, 0x30C0, 0x30FC, 0,
4355 15, 0x3314, 0x30AD, 0x30ED, 0,
4356 15, 0x3315, 0x30AD, 0x30ED, 0x30B0, 0x30E9, 0x30E0, 0,
4357 15, 0x3316, 0x30AD, 0x30ED, 0x30E1, 0x30FC, 0x30C8, 0x30EB, 0,
4358 15, 0x3317, 0x30AD, 0x30ED, 0x30EF, 0x30C3, 0x30C8, 0,
4359 15, 0x3318, 0x30B0, 0x30E9, 0x30E0, 0,
4360 15, 0x3319, 0x30B0, 0x30E9, 0x30E0, 0x30C8, 0x30F3, 0,
4361 15, 0x331A, 0x30AF, 0x30EB, 0x30BC, 0x30A4, 0x30ED, 0,
4362 15, 0x331B, 0x30AF, 0x30ED, 0x30FC, 0x30CD, 0,
4363 15, 0x331C, 0x30B1, 0x30FC, 0x30B9, 0,
4364 15, 0x331D, 0x30B3, 0x30EB, 0x30CA, 0,
4365 15, 0x331E, 0x30B3, 0x30FC, 0x30DD, 0,
4366 15, 0x331F, 0x30B5, 0x30A4, 0x30AF, 0x30EB, 0,
4367 15, 0x3320, 0x30B5, 0x30F3, 0x30C1, 0x30FC, 0x30E0, 0,
4368 15, 0x3321, 0x30B7, 0x30EA, 0x30F3, 0x30B0, 0,
4369 15, 0x3322, 0x30BB, 0x30F3, 0x30C1, 0,
4370 15, 0x3323, 0x30BB, 0x30F3, 0x30C8, 0,
4371 15, 0x3324, 0x30C0, 0x30FC, 0x30B9, 0,
4372 15, 0x3325, 0x30C7, 0x30B7, 0,
4373 15, 0x3326, 0x30C9, 0x30EB, 0,
4374 15, 0x3327, 0x30C8, 0x30F3, 0,
4375 15, 0x3328, 0x30CA, 0x30CE, 0,
4376 15, 0x3329, 0x30CE, 0x30C3, 0x30C8, 0,
4377 15, 0x332A, 0x30CF, 0x30A4, 0x30C4, 0,
4378 15, 0x332B, 0x30D1, 0x30FC, 0x30BB, 0x30F3, 0x30C8, 0,
4379 15, 0x332C, 0x30D1, 0x30FC, 0x30C4, 0,
4380 15, 0x332D, 0x30D0, 0x30FC, 0x30EC, 0x30EB, 0,
4381 15, 0x332E, 0x30D4, 0x30A2, 0x30B9, 0x30C8, 0x30EB, 0,
4382 15, 0x332F, 0x30D4, 0x30AF, 0x30EB, 0,
4383 15, 0x3330, 0x30D4, 0x30B3, 0,
4384 15, 0x3331, 0x30D3, 0x30EB, 0,
4385 15, 0x3332, 0x30D5, 0x30A1, 0x30E9, 0x30C3, 0x30C9, 0,
4386 15, 0x3333, 0x30D5, 0x30A3, 0x30FC, 0x30C8, 0,
4387 15, 0x3334, 0x30D6, 0x30C3, 0x30B7, 0x30A7, 0x30EB, 0,
4388 15, 0x3335, 0x30D5, 0x30E9, 0x30F3, 0,
4389 15, 0x3336, 0x30D8, 0x30AF, 0x30BF, 0x30FC, 0x30EB, 0,
4390 15, 0x3337, 0x30DA, 0x30BD, 0,
4391 15, 0x3338, 0x30DA, 0x30CB, 0x30D2, 0,
4392 15, 0x3339, 0x30D8, 0x30EB, 0x30C4, 0,
4393 15, 0x333A, 0x30DA, 0x30F3, 0x30B9, 0,
4394 15, 0x333B, 0x30DA, 0x30FC, 0x30B8, 0,
4395 15, 0x333C, 0x30D9, 0x30FC, 0x30BF, 0,
4396 15, 0x333D, 0x30DD, 0x30A4, 0x30F3, 0x30C8, 0,
4397 15, 0x333E, 0x30DC, 0x30EB, 0x30C8, 0,
4398 15, 0x333F, 0x30DB, 0x30F3, 0,
4399 15, 0x3340, 0x30DD, 0x30F3, 0x30C9, 0,
4400 15, 0x3341, 0x30DB, 0x30FC, 0x30EB, 0,
4401 15, 0x3342, 0x30DB, 0x30FC, 0x30F3, 0,
4402 15, 0x3343, 0x30DE, 0x30A4, 0x30AF, 0x30ED, 0,
4403 15, 0x3344, 0x30DE, 0x30A4, 0x30EB, 0,
4404 15, 0x3345, 0x30DE, 0x30C3, 0x30CF, 0,
4405 15, 0x3346, 0x30DE, 0x30EB, 0x30AF, 0,
4406 15, 0x3347, 0x30DE, 0x30F3, 0x30B7, 0x30E7, 0x30F3, 0,
4407 15, 0x3348, 0x30DF, 0x30AF, 0x30ED, 0x30F3, 0,
4408 15, 0x3349, 0x30DF, 0x30EA, 0,
4409 15, 0x334A, 0x30DF, 0x30EA, 0x30D0, 0x30FC, 0x30EB, 0,
4410 15, 0x334B, 0x30E1, 0x30AC, 0,
4411 15, 0x334C, 0x30E1, 0x30AC, 0x30C8, 0x30F3, 0,
4412 15, 0x334D, 0x30E1, 0x30FC, 0x30C8, 0x30EB, 0,
4413 15, 0x334E, 0x30E4, 0x30FC, 0x30C9, 0,
4414 15, 0x334F, 0x30E4, 0x30FC, 0x30EB, 0,
4415 15, 0x3350, 0x30E6, 0x30A2, 0x30F3, 0,
4416 15, 0x3351, 0x30EA, 0x30C3, 0x30C8, 0x30EB, 0,
4417 15, 0x3352, 0x30EA, 0x30E9, 0,
4418 15, 0x3353, 0x30EB, 0x30D4, 0x30FC, 0,
4419 15, 0x3354, 0x30EB, 0x30FC, 0x30D6, 0x30EB, 0,
4420 15, 0x3355, 0x30EC, 0x30E0, 0,
4421 15, 0x3356, 0x30EC, 0x30F3, 0x30C8, 0x30B2, 0x30F3, 0,
4422 15, 0x3357, 0x30EF, 0x30C3, 0x30C8, 0,
4423 16, 0x3358, 0x0030, 0x70B9, 0,
4424 16, 0x3359, 0x0031, 0x70B9, 0,
4425 16, 0x335A, 0x0032, 0x70B9, 0,
4426 16, 0x335B, 0x0033, 0x70B9, 0,
4427 16, 0x335C, 0x0034, 0x70B9, 0,
4428 16, 0x335D, 0x0035, 0x70B9, 0,
4429 16, 0x335E, 0x0036, 0x70B9, 0,
4430 16, 0x335F, 0x0037, 0x70B9, 0,
4431 16, 0x3360, 0x0038, 0x70B9, 0,
4432 16, 0x3361, 0x0039, 0x70B9, 0,
4433 16, 0x3362, 0x0031, 0x0030, 0x70B9, 0,
4434 16, 0x3363, 0x0031, 0x0031, 0x70B9, 0,
4435 16, 0x3364, 0x0031, 0x0032, 0x70B9, 0,
4436 16, 0x3365, 0x0031, 0x0033, 0x70B9, 0,
4437 16, 0x3366, 0x0031, 0x0034, 0x70B9, 0,
4438 16, 0x3367, 0x0031, 0x0035, 0x70B9, 0,
4439 16, 0x3368, 0x0031, 0x0036, 0x70B9, 0,
4440 16, 0x3369, 0x0031, 0x0037, 0x70B9, 0,
4441 16, 0x336A, 0x0031, 0x0038, 0x70B9, 0,
4442 16, 0x336B, 0x0031, 0x0039, 0x70B9, 0,
4443 16, 0x336C, 0x0032, 0x0030, 0x70B9, 0,
4444 16, 0x336D, 0x0032, 0x0031, 0x70B9, 0,
4445 16, 0x336E, 0x0032, 0x0032, 0x70B9, 0,
4446 16, 0x336F, 0x0032, 0x0033, 0x70B9, 0,
4447 16, 0x3370, 0x0032, 0x0034, 0x70B9, 0,
4448 15, 0x3371, 0x0068, 0x0050, 0x0061, 0,
4449 15, 0x3372, 0x0064, 0x0061, 0,
4450 15, 0x3373, 0x0041, 0x0055, 0,
4451 15, 0x3374, 0x0062, 0x0061, 0x0072, 0,
4452 15, 0x3375, 0x006F, 0x0056, 0,
4453 15, 0x3376, 0x0070, 0x0063, 0,
4454 15, 0x337B, 0x5E73, 0x6210, 0,
4455 15, 0x337C, 0x662D, 0x548C, 0,
4456 15, 0x337D, 0x5927, 0x6B63, 0,
4457 15, 0x337E, 0x660E, 0x6CBB, 0,
4458 15, 0x337F, 0x682A, 0x5F0F, 0x4F1A, 0x793E, 0,
4459 15, 0x3380, 0x0070, 0x0041, 0,
4460 15, 0x3381, 0x006E, 0x0041, 0,
4461 15, 0x3382, 0x03BC, 0x0041, 0,
4462 15, 0x3383, 0x006D, 0x0041, 0,
4463 15, 0x3384, 0x006B, 0x0041, 0,
4464 15, 0x3385, 0x004B, 0x0042, 0,
4465 15, 0x3386, 0x004D, 0x0042, 0,
4466 15, 0x3387, 0x0047, 0x0042, 0,
4467 15, 0x3388, 0x0063, 0x0061, 0x006C, 0,
4468 15, 0x3389, 0x006B, 0x0063, 0x0061, 0x006C, 0,
4469 15, 0x338A, 0x0070, 0x0046, 0,
4470 15, 0x338B, 0x006E, 0x0046, 0,
4471 15, 0x338C, 0x03BC, 0x0046, 0,
4472 15, 0x338D, 0x03BC, 0x0067, 0,
4473 15, 0x338E, 0x006D, 0x0067, 0,
4474 15, 0x338F, 0x006B, 0x0067, 0,
4475 15, 0x3390, 0x0048, 0x007A, 0,
4476 15, 0x3391, 0x006B, 0x0048, 0x007A, 0,
4477 15, 0x3392, 0x004D, 0x0048, 0x007A, 0,
4478 15, 0x3393, 0x0047, 0x0048, 0x007A, 0,
4479 15, 0x3394, 0x0054, 0x0048, 0x007A, 0,
4480 15, 0x3395, 0x03BC, 0x2113, 0,
4481 15, 0x3396, 0x006D, 0x2113, 0,
4482 15, 0x3397, 0x0064, 0x2113, 0,
4483 15, 0x3398, 0x006B, 0x2113, 0,
4484 15, 0x3399, 0x0066, 0x006D, 0,
4485 15, 0x339A, 0x006E, 0x006D, 0,
4486 15, 0x339B, 0x03BC, 0x006D, 0,
4487 15, 0x339C, 0x006D, 0x006D, 0,
4488 15, 0x339D, 0x0063, 0x006D, 0,
4489 15, 0x339E, 0x006B, 0x006D, 0,
4490 15, 0x339F, 0x006D, 0x006D, 0x00B2, 0,
4491 15, 0x33A0, 0x0063, 0x006D, 0x00B2, 0,
4492 15, 0x33A1, 0x006D, 0x00B2, 0,
4493 15, 0x33A2, 0x006B, 0x006D, 0x00B2, 0,
4494 15, 0x33A3, 0x006D, 0x006D, 0x00B3, 0,
4495 15, 0x33A4, 0x0063, 0x006D, 0x00B3, 0,
4496 15, 0x33A5, 0x006D, 0x00B3, 0,
4497 15, 0x33A6, 0x006B, 0x006D, 0x00B3, 0,
4498 15, 0x33A7, 0x006D, 0x2215, 0x0073, 0,
4499 15, 0x33A8, 0x006D, 0x2215, 0x0073, 0x00B2, 0,
4500 15, 0x33A9, 0x0050, 0x0061, 0,
4501 15, 0x33AA, 0x006B, 0x0050, 0x0061, 0,
4502 15, 0x33AB, 0x004D, 0x0050, 0x0061, 0,
4503 15, 0x33AC, 0x0047, 0x0050, 0x0061, 0,
4504 15, 0x33AD, 0x0072, 0x0061, 0x0064, 0,
4505 15, 0x33AE, 0x0072, 0x0061, 0x0064, 0x2215, 0x0073, 0,
4506 15, 0x33AF, 0x0072, 0x0061, 0x0064, 0x2215, 0x0073, 0x00B2, 0,
4507 15, 0x33B0, 0x0070, 0x0073, 0,
4508 15, 0x33B1, 0x006E, 0x0073, 0,
4509 15, 0x33B2, 0x03BC, 0x0073, 0,
4510 15, 0x33B3, 0x006D, 0x0073, 0,
4511 15, 0x33B4, 0x0070, 0x0056, 0,
4512 15, 0x33B5, 0x006E, 0x0056, 0,
4513 15, 0x33B6, 0x03BC, 0x0056, 0,
4514 15, 0x33B7, 0x006D, 0x0056, 0,
4515 15, 0x33B8, 0x006B, 0x0056, 0,
4516 15, 0x33B9, 0x004D, 0x0056, 0,
4517 15, 0x33BA, 0x0070, 0x0057, 0,
4518 15, 0x33BB, 0x006E, 0x0057, 0,
4519 15, 0x33BC, 0x03BC, 0x0057, 0,
4520 15, 0x33BD, 0x006D, 0x0057, 0,
4521 15, 0x33BE, 0x006B, 0x0057, 0,
4522 15, 0x33BF, 0x004D, 0x0057, 0,
4523 15, 0x33C0, 0x006B, 0x03A9, 0,
4524 15, 0x33C1, 0x004D, 0x03A9, 0,
4525 15, 0x33C2, 0x0061, 0x002E, 0x006D, 0x002E, 0,
4526 15, 0x33C3, 0x0042, 0x0071, 0,
4527 15, 0x33C4, 0x0063, 0x0063, 0,
4528 15, 0x33C5, 0x0063, 0x0064, 0,
4529 15, 0x33C6, 0x0043, 0x2215, 0x006B, 0x0067, 0,
4530 15, 0x33C7, 0x0043, 0x006F, 0x002E, 0,
4531 15, 0x33C8, 0x0064, 0x0042, 0,
4532 15, 0x33C9, 0x0047, 0x0079, 0,
4533 15, 0x33CA, 0x0068, 0x0061, 0,
4534 15, 0x33CB, 0x0048, 0x0050, 0,
4535 15, 0x33CC, 0x0069, 0x006E, 0,
4536 15, 0x33CD, 0x004B, 0x004B, 0,
4537 15, 0x33CE, 0x004B, 0x004D, 0,
4538 15, 0x33CF, 0x006B, 0x0074, 0,
4539 15, 0x33D0, 0x006C, 0x006D, 0,
4540 15, 0x33D1, 0x006C, 0x006E, 0,
4541 15, 0x33D2, 0x006C, 0x006F, 0x0067, 0,
4542 15, 0x33D3, 0x006C, 0x0078, 0,
4543 15, 0x33D4, 0x006D, 0x0062, 0,
4544 15, 0x33D5, 0x006D, 0x0069, 0x006C, 0,
4545 15, 0x33D6, 0x006D, 0x006F, 0x006C, 0,
4546 15, 0x33D7, 0x0050, 0x0048, 0,
4547 15, 0x33D8, 0x0070, 0x002E, 0x006D, 0x002E, 0,
4548 15, 0x33D9, 0x0050, 0x0050, 0x004D, 0,
4549 15, 0x33DA, 0x0050, 0x0052, 0,
4550 15, 0x33DB, 0x0073, 0x0072, 0,
4551 15, 0x33DC, 0x0053, 0x0076, 0,
4552 15, 0x33DD, 0x0057, 0x0062, 0,
4553 16, 0x33E0, 0x0031, 0x65E5, 0,
4554 16, 0x33E1, 0x0032, 0x65E5, 0,
4555 16, 0x33E2, 0x0033, 0x65E5, 0,
4556 16, 0x33E3, 0x0034, 0x65E5, 0,
4557 16, 0x33E4, 0x0035, 0x65E5, 0,
4558 16, 0x33E5, 0x0036, 0x65E5, 0,
4559 16, 0x33E6, 0x0037, 0x65E5, 0,
4560 16, 0x33E7, 0x0038, 0x65E5, 0,
4561 16, 0x33E8, 0x0039, 0x65E5, 0,
4562 16, 0x33E9, 0x0031, 0x0030, 0x65E5, 0,
4563 16, 0x33EA, 0x0031, 0x0031, 0x65E5, 0,
4564 16, 0x33EB, 0x0031, 0x0032, 0x65E5, 0,
4565 16, 0x33EC, 0x0031, 0x0033, 0x65E5, 0,
4566 16, 0x33ED, 0x0031, 0x0034, 0x65E5, 0,
4567 16, 0x33EE, 0x0031, 0x0035, 0x65E5, 0,
4568 16, 0x33EF, 0x0031, 0x0036, 0x65E5, 0,
4569 16, 0x33F0, 0x0031, 0x0037, 0x65E5, 0,
4570 16, 0x33F1, 0x0031, 0x0038, 0x65E5, 0,
4571 16, 0x33F2, 0x0031, 0x0039, 0x65E5, 0,
4572 16, 0x33F3, 0x0032, 0x0030, 0x65E5, 0,
4573 16, 0x33F4, 0x0032, 0x0031, 0x65E5, 0,
4574 16, 0x33F5, 0x0032, 0x0032, 0x65E5, 0,
4575 16, 0x33F6, 0x0032, 0x0033, 0x65E5, 0,
4576 16, 0x33F7, 0x0032, 0x0034, 0x65E5, 0,
4577 16, 0x33F8, 0x0032, 0x0035, 0x65E5, 0,
4578 16, 0x33F9, 0x0032, 0x0036, 0x65E5, 0,
4579 16, 0x33FA, 0x0032, 0x0037, 0x65E5, 0,
4580 16, 0x33FB, 0x0032, 0x0038, 0x65E5, 0,
4581 16, 0x33FC, 0x0032, 0x0039, 0x65E5, 0,
4582 16, 0x33FD, 0x0033, 0x0030, 0x65E5, 0,
4583 16, 0x33FE, 0x0033, 0x0031, 0x65E5, 0,
4584 1, 0xF900, 0x8C48, 0,
4585 1, 0xF901, 0x66F4, 0,
4586 1, 0xF902, 0x8ECA, 0,
4587 1, 0xF903, 0x8CC8, 0,
4588 1, 0xF904, 0x6ED1, 0,
4589 1, 0xF905, 0x4E32, 0,
4590 1, 0xF906, 0x53E5, 0,
4591 1, 0xF907, 0x9F9C, 0,
4592 1, 0xF908, 0x9F9C, 0,
4593 1, 0xF909, 0x5951, 0,
4594 1, 0xF90A, 0x91D1, 0,
4595 1, 0xF90B, 0x5587, 0,
4596 1, 0xF90C, 0x5948, 0,
4597 1, 0xF90D, 0x61F6, 0,
4598 1, 0xF90E, 0x7669, 0,
4599 1, 0xF90F, 0x7F85, 0,
4600 1, 0xF910, 0x863F, 0,
4601 1, 0xF911, 0x87BA, 0,
4602 1, 0xF912, 0x88F8, 0,
4603 1, 0xF913, 0x908F, 0,
4604 1, 0xF914, 0x6A02, 0,
4605 1, 0xF915, 0x6D1B, 0,
4606 1, 0xF916, 0x70D9, 0,
4607 1, 0xF917, 0x73DE, 0,
4608 1, 0xF918, 0x843D, 0,
4609 1, 0xF919, 0x916A, 0,
4610 1, 0xF91A, 0x99F1, 0,
4611 1, 0xF91B, 0x4E82, 0,
4612 1, 0xF91C, 0x5375, 0,
4613 1, 0xF91D, 0x6B04, 0,
4614 1, 0xF91E, 0x721B, 0,
4615 1, 0xF91F, 0x862D, 0,
4616 1, 0xF920, 0x9E1E, 0,
4617 1, 0xF921, 0x5D50, 0,
4618 1, 0xF922, 0x6FEB, 0,
4619 1, 0xF923, 0x85CD, 0,
4620 1, 0xF924, 0x8964, 0,
4621 1, 0xF925, 0x62C9, 0,
4622 1, 0xF926, 0x81D8, 0,
4623 1, 0xF927, 0x881F, 0,
4624 1, 0xF928, 0x5ECA, 0,
4625 1, 0xF929, 0x6717, 0,
4626 1, 0xF92A, 0x6D6A, 0,
4627 1, 0xF92B, 0x72FC, 0,
4628 1, 0xF92C, 0x90CE, 0,
4629 1, 0xF92D, 0x4F86, 0,
4630 1, 0xF92E, 0x51B7, 0,
4631 1, 0xF92F, 0x52DE, 0,
4632 1, 0xF930, 0x64C4, 0,
4633 1, 0xF931, 0x6AD3, 0,
4634 1, 0xF932, 0x7210, 0,
4635 1, 0xF933, 0x76E7, 0,
4636 1, 0xF934, 0x8001, 0,
4637 1, 0xF935, 0x8606, 0,
4638 1, 0xF936, 0x865C, 0,
4639 1, 0xF937, 0x8DEF, 0,
4640 1, 0xF938, 0x9732, 0,
4641 1, 0xF939, 0x9B6F, 0,
4642 1, 0xF93A, 0x9DFA, 0,
4643 1, 0xF93B, 0x788C, 0,
4644 1, 0xF93C, 0x797F, 0,
4645 1, 0xF93D, 0x7DA0, 0,
4646 1, 0xF93E, 0x83C9, 0,
4647 1, 0xF93F, 0x9304, 0,
4648 1, 0xF940, 0x9E7F, 0,
4649 1, 0xF941, 0x8AD6, 0,
4650 1, 0xF942, 0x58DF, 0,
4651 1, 0xF943, 0x5F04, 0,
4652 1, 0xF944, 0x7C60, 0,
4653 1, 0xF945, 0x807E, 0,
4654 1, 0xF946, 0x7262, 0,
4655 1, 0xF947, 0x78CA, 0,
4656 1, 0xF948, 0x8CC2, 0,
4657 1, 0xF949, 0x96F7, 0,
4658 1, 0xF94A, 0x58D8, 0,
4659 1, 0xF94B, 0x5C62, 0,
4660 1, 0xF94C, 0x6A13, 0,
4661 1, 0xF94D, 0x6DDA, 0,
4662 1, 0xF94E, 0x6F0F, 0,
4663 1, 0xF94F, 0x7D2F, 0,
4664 1, 0xF950, 0x7E37, 0,
4665 1, 0xF951, 0x964B, 0,
4666 1, 0xF952, 0x52D2, 0,
4667 1, 0xF953, 0x808B, 0,
4668 1, 0xF954, 0x51DC, 0,
4669 1, 0xF955, 0x51CC, 0,
4670 1, 0xF956, 0x7A1C, 0,
4671 1, 0xF957, 0x7DBE, 0,
4672 1, 0xF958, 0x83F1, 0,
4673 1, 0xF959, 0x9675, 0,
4674 1, 0xF95A, 0x8B80, 0,
4675 1, 0xF95B, 0x62CF, 0,
4676 1, 0xF95C, 0x6A02, 0,
4677 1, 0xF95D, 0x8AFE, 0,
4678 1, 0xF95E, 0x4E39, 0,
4679 1, 0xF95F, 0x5BE7, 0,
4680 1, 0xF960, 0x6012, 0,
4681 1, 0xF961, 0x7387, 0,
4682 1, 0xF962, 0x7570, 0,
4683 1, 0xF963, 0x5317, 0,
4684 1, 0xF964, 0x78FB, 0,
4685 1, 0xF965, 0x4FBF, 0,
4686 1, 0xF966, 0x5FA9, 0,
4687 1, 0xF967, 0x4E0D, 0,
4688 1, 0xF968, 0x6CCC, 0,
4689 1, 0xF969, 0x6578, 0,
4690 1, 0xF96A, 0x7D22, 0,
4691 1, 0xF96B, 0x53C3, 0,
4692 1, 0xF96C, 0x585E, 0,
4693 1, 0xF96D, 0x7701, 0,
4694 1, 0xF96E, 0x8449, 0,
4695 1, 0xF96F, 0x8AAA, 0,
4696 1, 0xF970, 0x6BBA, 0,
4697 1, 0xF971, 0x8FB0, 0,
4698 1, 0xF972, 0x6C88, 0,
4699 1, 0xF973, 0x62FE, 0,
4700 1, 0xF974, 0x82E5, 0,
4701 1, 0xF975, 0x63A0, 0,
4702 1, 0xF976, 0x7565, 0,
4703 1, 0xF977, 0x4EAE, 0,
4704 1, 0xF978, 0x5169, 0,
4705 1, 0xF979, 0x51C9, 0,
4706 1, 0xF97A, 0x6881, 0,
4707 1, 0xF97B, 0x7CE7, 0,
4708 1, 0xF97C, 0x826F, 0,
4709 1, 0xF97D, 0x8AD2, 0,
4710 1, 0xF97E, 0x91CF, 0,
4711 1, 0xF97F, 0x52F5, 0,
4712 1, 0xF980, 0x5442, 0,
4713 1, 0xF981, 0x5973, 0,
4714 1, 0xF982, 0x5EEC, 0,
4715 1, 0xF983, 0x65C5, 0,
4716 1, 0xF984, 0x6FFE, 0,
4717 1, 0xF985, 0x792A, 0,
4718 1, 0xF986, 0x95AD, 0,
4719 1, 0xF987, 0x9A6A, 0,
4720 1, 0xF988, 0x9E97, 0,
4721 1, 0xF989, 0x9ECE, 0,
4722 1, 0xF98A, 0x529B, 0,
4723 1, 0xF98B, 0x66C6, 0,
4724 1, 0xF98C, 0x6B77, 0,
4725 1, 0xF98D, 0x8F62, 0,
4726 1, 0xF98E, 0x5E74, 0,
4727 1, 0xF98F, 0x6190, 0,
4728 1, 0xF990, 0x6200, 0,
4729 1, 0xF991, 0x649A, 0,
4730 1, 0xF992, 0x6F23, 0,
4731 1, 0xF993, 0x7149, 0,
4732 1, 0xF994, 0x7489, 0,
4733 1, 0xF995, 0x79CA, 0,
4734 1, 0xF996, 0x7DF4, 0,
4735 1, 0xF997, 0x806F, 0,
4736 1, 0xF998, 0x8F26, 0,
4737 1, 0xF999, 0x84EE, 0,
4738 1, 0xF99A, 0x9023, 0,
4739 1, 0xF99B, 0x934A, 0,
4740 1, 0xF99C, 0x5217, 0,
4741 1, 0xF99D, 0x52A3, 0,
4742 1, 0xF99E, 0x54BD, 0,
4743 1, 0xF99F, 0x70C8, 0,
4744 1, 0xF9A0, 0x88C2, 0,
4745 1, 0xF9A1, 0x8AAA, 0,
4746 1, 0xF9A2, 0x5EC9, 0,
4747 1, 0xF9A3, 0x5FF5, 0,
4748 1, 0xF9A4, 0x637B, 0,
4749 1, 0xF9A5, 0x6BAE, 0,
4750 1, 0xF9A6, 0x7C3E, 0,
4751 1, 0xF9A7, 0x7375, 0,
4752 1, 0xF9A8, 0x4EE4, 0,
4753 1, 0xF9A9, 0x56F9, 0,
4754 1, 0xF9AA, 0x5BE7, 0,
4755 1, 0xF9AB, 0x5DBA, 0,
4756 1, 0xF9AC, 0x601C, 0,
4757 1, 0xF9AD, 0x73B2, 0,
4758 1, 0xF9AE, 0x7469, 0,
4759 1, 0xF9AF, 0x7F9A, 0,
4760 1, 0xF9B0, 0x8046, 0,
4761 1, 0xF9B1, 0x9234, 0,
4762 1, 0xF9B2, 0x96F6, 0,
4763 1, 0xF9B3, 0x9748, 0,
4764 1, 0xF9B4, 0x9818, 0,
4765 1, 0xF9B5, 0x4F8B, 0,
4766 1, 0xF9B6, 0x79AE, 0,
4767 1, 0xF9B7, 0x91B4, 0,
4768 1, 0xF9B8, 0x96B8, 0,
4769 1, 0xF9B9, 0x60E1, 0,
4770 1, 0xF9BA, 0x4E86, 0,
4771 1, 0xF9BB, 0x50DA, 0,
4772 1, 0xF9BC, 0x5BEE, 0,
4773 1, 0xF9BD, 0x5C3F, 0,
4774 1, 0xF9BE, 0x6599, 0,
4775 1, 0xF9BF, 0x6A02, 0,
4776 1, 0xF9C0, 0x71CE, 0,
4777 1, 0xF9C1, 0x7642, 0,
4778 1, 0xF9C2, 0x84FC, 0,
4779 1, 0xF9C3, 0x907C, 0,
4780 1, 0xF9C4, 0x9F8D, 0,
4781 1, 0xF9C5, 0x6688, 0,
4782 1, 0xF9C6, 0x962E, 0,
4783 1, 0xF9C7, 0x5289, 0,
4784 1, 0xF9C8, 0x677B, 0,
4785 1, 0xF9C9, 0x67F3, 0,
4786 1, 0xF9CA, 0x6D41, 0,
4787 1, 0xF9CB, 0x6E9C, 0,
4788 1, 0xF9CC, 0x7409, 0,
4789 1, 0xF9CD, 0x7559, 0,
4790 1, 0xF9CE, 0x786B, 0,
4791 1, 0xF9CF, 0x7D10, 0,
4792 1, 0xF9D0, 0x985E, 0,
4793 1, 0xF9D1, 0x516D, 0,
4794 1, 0xF9D2, 0x622E, 0,
4795 1, 0xF9D3, 0x9678, 0,
4796 1, 0xF9D4, 0x502B, 0,
4797 1, 0xF9D5, 0x5D19, 0,
4798 1, 0xF9D6, 0x6DEA, 0,
4799 1, 0xF9D7, 0x8F2A, 0,
4800 1, 0xF9D8, 0x5F8B, 0,
4801 1, 0xF9D9, 0x6144, 0,
4802 1, 0xF9DA, 0x6817, 0,
4803 1, 0xF9DB, 0x7387, 0,
4804 1, 0xF9DC, 0x9686, 0,
4805 1, 0xF9DD, 0x5229, 0,
4806 1, 0xF9DE, 0x540F, 0,
4807 1, 0xF9DF, 0x5C65, 0,
4808 1, 0xF9E0, 0x6613, 0,
4809 1, 0xF9E1, 0x674E, 0,
4810 1, 0xF9E2, 0x68A8, 0,
4811 1, 0xF9E3, 0x6CE5, 0,
4812 1, 0xF9E4, 0x7406, 0,
4813 1, 0xF9E5, 0x75E2, 0,
4814 1, 0xF9E6, 0x7F79, 0,
4815 1, 0xF9E7, 0x88CF, 0,
4816 1, 0xF9E8, 0x88E1, 0,
4817 1, 0xF9E9, 0x91CC, 0,
4818 1, 0xF9EA, 0x96E2, 0,
4819 1, 0xF9EB, 0x533F, 0,
4820 1, 0xF9EC, 0x6EBA, 0,
4821 1, 0xF9ED, 0x541D, 0,
4822 1, 0xF9EE, 0x71D0, 0,
4823 1, 0xF9EF, 0x7498, 0,
4824 1, 0xF9F0, 0x85FA, 0,
4825 1, 0xF9F1, 0x96A3, 0,
4826 1, 0xF9F2, 0x9C57, 0,
4827 1, 0xF9F3, 0x9E9F, 0,
4828 1, 0xF9F4, 0x6797, 0,
4829 1, 0xF9F5, 0x6DCB, 0,
4830 1, 0xF9F6, 0x81E8, 0,
4831 1, 0xF9F7, 0x7ACB, 0,
4832 1, 0xF9F8, 0x7B20, 0,
4833 1, 0xF9F9, 0x7C92, 0,
4834 1, 0xF9FA, 0x72C0, 0,
4835 1, 0xF9FB, 0x7099, 0,
4836 1, 0xF9FC, 0x8B58, 0,
4837 1, 0xF9FD, 0x4EC0, 0,
4838 1, 0xF9FE, 0x8336, 0,
4839 1, 0xF9FF, 0x523A, 0,
4840 1, 0xFA00, 0x5207, 0,
4841 1, 0xFA01, 0x5EA6, 0,
4842 1, 0xFA02, 0x62D3, 0,
4843 1, 0xFA03, 0x7CD6, 0,
4844 1, 0xFA04, 0x5B85, 0,
4845 1, 0xFA05, 0x6D1E, 0,
4846 1, 0xFA06, 0x66B4, 0,
4847 1, 0xFA07, 0x8F3B, 0,
4848 1, 0xFA08, 0x884C, 0,
4849 1, 0xFA09, 0x964D, 0,
4850 1, 0xFA0A, 0x898B, 0,
4851 1, 0xFA0B, 0x5ED3, 0,
4852 1, 0xFA0C, 0x5140, 0,
4853 1, 0xFA0D, 0x55C0, 0,
4854 1, 0xFA10, 0x585A, 0,
4855 1, 0xFA12, 0x6674, 0,
4856 1, 0xFA15, 0x51DE, 0,
4857 1, 0xFA16, 0x732A, 0,
4858 1, 0xFA17, 0x76CA, 0,
4859 1, 0xFA18, 0x793C, 0,
4860 1, 0xFA19, 0x795E, 0,
4861 1, 0xFA1A, 0x7965, 0,
4862 1, 0xFA1B, 0x798F, 0,
4863 1, 0xFA1C, 0x9756, 0,
4864 1, 0xFA1D, 0x7CBE, 0,
4865 1, 0xFA1E, 0x7FBD, 0,
4866 1, 0xFA20, 0x8612, 0,
4867 1, 0xFA22, 0x8AF8, 0,
4868 1, 0xFA25, 0x9038, 0,
4869 1, 0xFA26, 0x90FD, 0,
4870 1, 0xFA2A, 0x98EF, 0,
4871 1, 0xFA2B, 0x98FC, 0,
4872 1, 0xFA2C, 0x9928, 0,
4873 1, 0xFA2D, 0x9DB4, 0,
4874 1, 0xFA30, 0x4FAE, 0,
4875 1, 0xFA31, 0x50E7, 0,
4876 1, 0xFA32, 0x514D, 0,
4877 1, 0xFA33, 0x52C9, 0,
4878 1, 0xFA34, 0x52E4, 0,
4879 1, 0xFA35, 0x5351, 0,
4880 1, 0xFA36, 0x559D, 0,
4881 1, 0xFA37, 0x5606, 0,
4882 1, 0xFA38, 0x5668, 0,
4883 1, 0xFA39, 0x5840, 0,
4884 1, 0xFA3A, 0x58A8, 0,
4885 1, 0xFA3B, 0x5C64, 0,
4886 1, 0xFA3C, 0x5C6E, 0,
4887 1, 0xFA3D, 0x6094, 0,
4888 1, 0xFA3E, 0x6168, 0,
4889 1, 0xFA3F, 0x618E, 0,
4890 1, 0xFA40, 0x61F2, 0,
4891 1, 0xFA41, 0x654F, 0,
4892 1, 0xFA42, 0x65E2, 0,
4893 1, 0xFA43, 0x6691, 0,
4894 1, 0xFA44, 0x6885, 0,
4895 1, 0xFA45, 0x6D77, 0,
4896 1, 0xFA46, 0x6E1A, 0,
4897 1, 0xFA47, 0x6F22, 0,
4898 1, 0xFA48, 0x716E, 0,
4899 1, 0xFA49, 0x722B, 0,
4900 1, 0xFA4A, 0x7422, 0,
4901 1, 0xFA4B, 0x7891, 0,
4902 1, 0xFA4C, 0x793E, 0,
4903 1, 0xFA4D, 0x7949, 0,
4904 1, 0xFA4E, 0x7948, 0,
4905 1, 0xFA4F, 0x7950, 0,
4906 1, 0xFA50, 0x7956, 0,
4907 1, 0xFA51, 0x795D, 0,
4908 1, 0xFA52, 0x798D, 0,
4909 1, 0xFA53, 0x798E, 0,
4910 1, 0xFA54, 0x7A40, 0,
4911 1, 0xFA55, 0x7A81, 0,
4912 1, 0xFA56, 0x7BC0, 0,
4913 1, 0xFA57, 0x7DF4, 0,
4914 1, 0xFA58, 0x7E09, 0,
4915 1, 0xFA59, 0x7E41, 0,
4916 1, 0xFA5A, 0x7F72, 0,
4917 1, 0xFA5B, 0x8005, 0,
4918 1, 0xFA5C, 0x81ED, 0,
4919 1, 0xFA5D, 0x8279, 0,
4920 1, 0xFA5E, 0x8279, 0,
4921 1, 0xFA5F, 0x8457, 0,
4922 1, 0xFA60, 0x8910, 0,
4923 1, 0xFA61, 0x8996, 0,
4924 1, 0xFA62, 0x8B01, 0,
4925 1, 0xFA63, 0x8B39, 0,
4926 1, 0xFA64, 0x8CD3, 0,
4927 1, 0xFA65, 0x8D08, 0,
4928 1, 0xFA66, 0x8FB6, 0,
4929 1, 0xFA67, 0x9038, 0,
4930 1, 0xFA68, 0x96E3, 0,
4931 1, 0xFA69, 0x97FF, 0,
4932 1, 0xFA6A, 0x983B, 0,
4933 16, 0xFB00, 0x0066, 0x0066, 0,
4934 16, 0xFB01, 0x0066, 0x0069, 0,
4935 16, 0xFB02, 0x0066, 0x006C, 0,
4936 16, 0xFB03, 0x0066, 0x0066, 0x0069, 0,
4937 16, 0xFB04, 0x0066, 0x0066, 0x006C, 0,
4938 16, 0xFB05, 0x017F, 0x0074, 0,
4939 16, 0xFB06, 0x0073, 0x0074, 0,
4940 16, 0xFB13, 0x0574, 0x0576, 0,
4941 16, 0xFB14, 0x0574, 0x0565, 0,
4942 16, 0xFB15, 0x0574, 0x056B, 0,
4943 16, 0xFB16, 0x057E, 0x0576, 0,
4944 16, 0xFB17, 0x0574, 0x056D, 0,
4945 1, 0xFB1D, 0x05D9, 0x05B4, 0,
4946 1, 0xFB1F, 0x05F2, 0x05B7, 0,
4947 2, 0xFB20, 0x05E2, 0,
4948 2, 0xFB21, 0x05D0, 0,
4949 2, 0xFB22, 0x05D3, 0,
4950 2, 0xFB23, 0x05D4, 0,
4951 2, 0xFB24, 0x05DB, 0,
4952 2, 0xFB25, 0x05DC, 0,
4953 2, 0xFB26, 0x05DD, 0,
4954 2, 0xFB27, 0x05E8, 0,
4955 2, 0xFB28, 0x05EA, 0,
4956 2, 0xFB29, 0x002B, 0,
4957 1, 0xFB2A, 0x05E9, 0x05C1, 0,
4958 1, 0xFB2B, 0x05E9, 0x05C2, 0,
4959 1, 0xFB2C, 0xFB49, 0x05C1, 0,
4960 1, 0xFB2D, 0xFB49, 0x05C2, 0,
4961 1, 0xFB2E, 0x05D0, 0x05B7, 0,
4962 1, 0xFB2F, 0x05D0, 0x05B8, 0,
4963 1, 0xFB30, 0x05D0, 0x05BC, 0,
4964 1, 0xFB31, 0x05D1, 0x05BC, 0,
4965 1, 0xFB32, 0x05D2, 0x05BC, 0,
4966 1, 0xFB33, 0x05D3, 0x05BC, 0,
4967 1, 0xFB34, 0x05D4, 0x05BC, 0,
4968 1, 0xFB35, 0x05D5, 0x05BC, 0,
4969 1, 0xFB36, 0x05D6, 0x05BC, 0,
4970 1, 0xFB38, 0x05D8, 0x05BC, 0,
4971 1, 0xFB39, 0x05D9, 0x05BC, 0,
4972 1, 0xFB3A, 0x05DA, 0x05BC, 0,
4973 1, 0xFB3B, 0x05DB, 0x05BC, 0,
4974 1, 0xFB3C, 0x05DC, 0x05BC, 0,
4975 1, 0xFB3E, 0x05DE, 0x05BC, 0,
4976 1, 0xFB40, 0x05E0, 0x05BC, 0,
4977 1, 0xFB41, 0x05E1, 0x05BC, 0,
4978 1, 0xFB43, 0x05E3, 0x05BC, 0,
4979 1, 0xFB44, 0x05E4, 0x05BC, 0,
4980 1, 0xFB46, 0x05E6, 0x05BC, 0,
4981 1, 0xFB47, 0x05E7, 0x05BC, 0,
4982 1, 0xFB48, 0x05E8, 0x05BC, 0,
4983 1, 0xFB49, 0x05E9, 0x05BC, 0,
4984 1, 0xFB4A, 0x05EA, 0x05BC, 0,
4985 1, 0xFB4B, 0x05D5, 0x05B9, 0,
4986 1, 0xFB4C, 0x05D1, 0x05BF, 0,
4987 1, 0xFB4D, 0x05DB, 0x05BF, 0,
4988 1, 0xFB4E, 0x05E4, 0x05BF, 0,
4989 16, 0xFB4F, 0x05D0, 0x05DC, 0,
4990 7, 0xFB50, 0x0671, 0,
4991 6, 0xFB51, 0x0671, 0,
4992 7, 0xFB52, 0x067B, 0,
4993 6, 0xFB53, 0x067B, 0,
4994 4, 0xFB54, 0x067B, 0,
4995 5, 0xFB55, 0x067B, 0,
4996 7, 0xFB56, 0x067E, 0,
4997 6, 0xFB57, 0x067E, 0,
4998 4, 0xFB58, 0x067E, 0,
4999 5, 0xFB59, 0x067E, 0,
5000 7, 0xFB5A, 0x0680, 0,
5001 6, 0xFB5B, 0x0680, 0,
5002 4, 0xFB5C, 0x0680, 0,
5003 5, 0xFB5D, 0x0680, 0,
5004 7, 0xFB5E, 0x067A, 0,
5005 6, 0xFB5F, 0x067A, 0,
5006 4, 0xFB60, 0x067A, 0,
5007 5, 0xFB61, 0x067A, 0,
5008 7, 0xFB62, 0x067F, 0,
5009 6, 0xFB63, 0x067F, 0,
5010 4, 0xFB64, 0x067F, 0,
5011 5, 0xFB65, 0x067F, 0,
5012 7, 0xFB66, 0x0679, 0,
5013 6, 0xFB67, 0x0679, 0,
5014 4, 0xFB68, 0x0679, 0,
5015 5, 0xFB69, 0x0679, 0,
5016 7, 0xFB6A, 0x06A4, 0,
5017 6, 0xFB6B, 0x06A4, 0,
5018 4, 0xFB6C, 0x06A4, 0,
5019 5, 0xFB6D, 0x06A4, 0,
5020 7, 0xFB6E, 0x06A6, 0,
5021 6, 0xFB6F, 0x06A6, 0,
5022 4, 0xFB70, 0x06A6, 0,
5023 5, 0xFB71, 0x06A6, 0,
5024 7, 0xFB72, 0x0684, 0,
5025 6, 0xFB73, 0x0684, 0,
5026 4, 0xFB74, 0x0684, 0,
5027 5, 0xFB75, 0x0684, 0,
5028 7, 0xFB76, 0x0683, 0,
5029 6, 0xFB77, 0x0683, 0,
5030 4, 0xFB78, 0x0683, 0,
5031 5, 0xFB79, 0x0683, 0,
5032 7, 0xFB7A, 0x0686, 0,
5033 6, 0xFB7B, 0x0686, 0,
5034 4, 0xFB7C, 0x0686, 0,
5035 5, 0xFB7D, 0x0686, 0,
5036 7, 0xFB7E, 0x0687, 0,
5037 6, 0xFB7F, 0x0687, 0,
5038 4, 0xFB80, 0x0687, 0,
5039 5, 0xFB81, 0x0687, 0,
5040 7, 0xFB82, 0x068D, 0,
5041 6, 0xFB83, 0x068D, 0,
5042 7, 0xFB84, 0x068C, 0,
5043 6, 0xFB85, 0x068C, 0,
5044 7, 0xFB86, 0x068E, 0,
5045 6, 0xFB87, 0x068E, 0,
5046 7, 0xFB88, 0x0688, 0,
5047 6, 0xFB89, 0x0688, 0,
5048 7, 0xFB8A, 0x0698, 0,
5049 6, 0xFB8B, 0x0698, 0,
5050 7, 0xFB8C, 0x0691, 0,
5051 6, 0xFB8D, 0x0691, 0,
5052 7, 0xFB8E, 0x06A9, 0,
5053 6, 0xFB8F, 0x06A9, 0,
5054 4, 0xFB90, 0x06A9, 0,
5055 5, 0xFB91, 0x06A9, 0,
5056 7, 0xFB92, 0x06AF, 0,
5057 6, 0xFB93, 0x06AF, 0,
5058 4, 0xFB94, 0x06AF, 0,
5059 5, 0xFB95, 0x06AF, 0,
5060 7, 0xFB96, 0x06B3, 0,
5061 6, 0xFB97, 0x06B3, 0,
5062 4, 0xFB98, 0x06B3, 0,
5063 5, 0xFB99, 0x06B3, 0,
5064 7, 0xFB9A, 0x06B1, 0,
5065 6, 0xFB9B, 0x06B1, 0,
5066 4, 0xFB9C, 0x06B1, 0,
5067 5, 0xFB9D, 0x06B1, 0,
5068 7, 0xFB9E, 0x06BA, 0,
5069 6, 0xFB9F, 0x06BA, 0,
5070 7, 0xFBA0, 0x06BB, 0,
5071 6, 0xFBA1, 0x06BB, 0,
5072 4, 0xFBA2, 0x06BB, 0,
5073 5, 0xFBA3, 0x06BB, 0,
5074 7, 0xFBA4, 0x06C0, 0,
5075 6, 0xFBA5, 0x06C0, 0,
5076 7, 0xFBA6, 0x06C1, 0,
5077 6, 0xFBA7, 0x06C1, 0,
5078 4, 0xFBA8, 0x06C1, 0,
5079 5, 0xFBA9, 0x06C1, 0,
5080 7, 0xFBAA, 0x06BE, 0,
5081 6, 0xFBAB, 0x06BE, 0,
5082 4, 0xFBAC, 0x06BE, 0,
5083 5, 0xFBAD, 0x06BE, 0,
5084 7, 0xFBAE, 0x06D2, 0,
5085 6, 0xFBAF, 0x06D2, 0,
5086 7, 0xFBB0, 0x06D3, 0,
5087 6, 0xFBB1, 0x06D3, 0,
5088 7, 0xFBD3, 0x06AD, 0,
5089 6, 0xFBD4, 0x06AD, 0,
5090 4, 0xFBD5, 0x06AD, 0,
5091 5, 0xFBD6, 0x06AD, 0,
5092 7, 0xFBD7, 0x06C7, 0,
5093 6, 0xFBD8, 0x06C7, 0,
5094 7, 0xFBD9, 0x06C6, 0,
5095 6, 0xFBDA, 0x06C6, 0,
5096 7, 0xFBDB, 0x06C8, 0,
5097 6, 0xFBDC, 0x06C8, 0,
5098 7, 0xFBDD, 0x0677, 0,
5099 7, 0xFBDE, 0x06CB, 0,
5100 6, 0xFBDF, 0x06CB, 0,
5101 7, 0xFBE0, 0x06C5, 0,
5102 6, 0xFBE1, 0x06C5, 0,
5103 7, 0xFBE2, 0x06C9, 0,
5104 6, 0xFBE3, 0x06C9, 0,
5105 7, 0xFBE4, 0x06D0, 0,
5106 6, 0xFBE5, 0x06D0, 0,
5107 4, 0xFBE6, 0x06D0, 0,
5108 5, 0xFBE7, 0x06D0, 0,
5109 4, 0xFBE8, 0x0649, 0,
5110 5, 0xFBE9, 0x0649, 0,
5111 7, 0xFBEA, 0x0626, 0x0627, 0,
5112 6, 0xFBEB, 0x0626, 0x0627, 0,
5113 7, 0xFBEC, 0x0626, 0x06D5, 0,
5114 6, 0xFBED, 0x0626, 0x06D5, 0,
5115 7, 0xFBEE, 0x0626, 0x0648, 0,
5116 6, 0xFBEF, 0x0626, 0x0648, 0,
5117 7, 0xFBF0, 0x0626, 0x06C7, 0,
5118 6, 0xFBF1, 0x0626, 0x06C7, 0,
5119 7, 0xFBF2, 0x0626, 0x06C6, 0,
5120 6, 0xFBF3, 0x0626, 0x06C6, 0,
5121 7, 0xFBF4, 0x0626, 0x06C8, 0,
5122 6, 0xFBF5, 0x0626, 0x06C8, 0,
5123 7, 0xFBF6, 0x0626, 0x06D0, 0,
5124 6, 0xFBF7, 0x0626, 0x06D0, 0,
5125 4, 0xFBF8, 0x0626, 0x06D0, 0,
5126 7, 0xFBF9, 0x0626, 0x0649, 0,
5127 6, 0xFBFA, 0x0626, 0x0649, 0,
5128 4, 0xFBFB, 0x0626, 0x0649, 0,
5129 7, 0xFBFC, 0x06CC, 0,
5130 6, 0xFBFD, 0x06CC, 0,
5131 4, 0xFBFE, 0x06CC, 0,
5132 5, 0xFBFF, 0x06CC, 0,
5133 7, 0xFC00, 0x0626, 0x062C, 0,
5134 7, 0xFC01, 0x0626, 0x062D, 0,
5135 7, 0xFC02, 0x0626, 0x0645, 0,
5136 7, 0xFC03, 0x0626, 0x0649, 0,
5137 7, 0xFC04, 0x0626, 0x064A, 0,
5138 7, 0xFC05, 0x0628, 0x062C, 0,
5139 7, 0xFC06, 0x0628, 0x062D, 0,
5140 7, 0xFC07, 0x0628, 0x062E, 0,
5141 7, 0xFC08, 0x0628, 0x0645, 0,
5142 7, 0xFC09, 0x0628, 0x0649, 0,
5143 7, 0xFC0A, 0x0628, 0x064A, 0,
5144 7, 0xFC0B, 0x062A, 0x062C, 0,
5145 7, 0xFC0C, 0x062A, 0x062D, 0,
5146 7, 0xFC0D, 0x062A, 0x062E, 0,
5147 7, 0xFC0E, 0x062A, 0x0645, 0,
5148 7, 0xFC0F, 0x062A, 0x0649, 0,
5149 7, 0xFC10, 0x062A, 0x064A, 0,
5150 7, 0xFC11, 0x062B, 0x062C, 0,
5151 7, 0xFC12, 0x062B, 0x0645, 0,
5152 7, 0xFC13, 0x062B, 0x0649, 0,
5153 7, 0xFC14, 0x062B, 0x064A, 0,
5154 7, 0xFC15, 0x062C, 0x062D, 0,
5155 7, 0xFC16, 0x062C, 0x0645, 0,
5156 7, 0xFC17, 0x062D, 0x062C, 0,
5157 7, 0xFC18, 0x062D, 0x0645, 0,
5158 7, 0xFC19, 0x062E, 0x062C, 0,
5159 7, 0xFC1A, 0x062E, 0x062D, 0,
5160 7, 0xFC1B, 0x062E, 0x0645, 0,
5161 7, 0xFC1C, 0x0633, 0x062C, 0,
5162 7, 0xFC1D, 0x0633, 0x062D, 0,
5163 7, 0xFC1E, 0x0633, 0x062E, 0,
5164 7, 0xFC1F, 0x0633, 0x0645, 0,
5165 7, 0xFC20, 0x0635, 0x062D, 0,
5166 7, 0xFC21, 0x0635, 0x0645, 0,
5167 7, 0xFC22, 0x0636, 0x062C, 0,
5168 7, 0xFC23, 0x0636, 0x062D, 0,
5169 7, 0xFC24, 0x0636, 0x062E, 0,
5170 7, 0xFC25, 0x0636, 0x0645, 0,
5171 7, 0xFC26, 0x0637, 0x062D, 0,
5172 7, 0xFC27, 0x0637, 0x0645, 0,
5173 7, 0xFC28, 0x0638, 0x0645, 0,
5174 7, 0xFC29, 0x0639, 0x062C, 0,
5175 7, 0xFC2A, 0x0639, 0x0645, 0,
5176 7, 0xFC2B, 0x063A, 0x062C, 0,
5177 7, 0xFC2C, 0x063A, 0x0645, 0,
5178 7, 0xFC2D, 0x0641, 0x062C, 0,
5179 7, 0xFC2E, 0x0641, 0x062D, 0,
5180 7, 0xFC2F, 0x0641, 0x062E, 0,
5181 7, 0xFC30, 0x0641, 0x0645, 0,
5182 7, 0xFC31, 0x0641, 0x0649, 0,
5183 7, 0xFC32, 0x0641, 0x064A, 0,
5184 7, 0xFC33, 0x0642, 0x062D, 0,
5185 7, 0xFC34, 0x0642, 0x0645, 0,
5186 7, 0xFC35, 0x0642, 0x0649, 0,
5187 7, 0xFC36, 0x0642, 0x064A, 0,
5188 7, 0xFC37, 0x0643, 0x0627, 0,
5189 7, 0xFC38, 0x0643, 0x062C, 0,
5190 7, 0xFC39, 0x0643, 0x062D, 0,
5191 7, 0xFC3A, 0x0643, 0x062E, 0,
5192 7, 0xFC3B, 0x0643, 0x0644, 0,
5193 7, 0xFC3C, 0x0643, 0x0645, 0,
5194 7, 0xFC3D, 0x0643, 0x0649, 0,
5195 7, 0xFC3E, 0x0643, 0x064A, 0,
5196 7, 0xFC3F, 0x0644, 0x062C, 0,
5197 7, 0xFC40, 0x0644, 0x062D, 0,
5198 7, 0xFC41, 0x0644, 0x062E, 0,
5199 7, 0xFC42, 0x0644, 0x0645, 0,
5200 7, 0xFC43, 0x0644, 0x0649, 0,
5201 7, 0xFC44, 0x0644, 0x064A, 0,
5202 7, 0xFC45, 0x0645, 0x062C, 0,
5203 7, 0xFC46, 0x0645, 0x062D, 0,
5204 7, 0xFC47, 0x0645, 0x062E, 0,
5205 7, 0xFC48, 0x0645, 0x0645, 0,
5206 7, 0xFC49, 0x0645, 0x0649, 0,
5207 7, 0xFC4A, 0x0645, 0x064A, 0,
5208 7, 0xFC4B, 0x0646, 0x062C, 0,
5209 7, 0xFC4C, 0x0646, 0x062D, 0,
5210 7, 0xFC4D, 0x0646, 0x062E, 0,
5211 7, 0xFC4E, 0x0646, 0x0645, 0,
5212 7, 0xFC4F, 0x0646, 0x0649, 0,
5213 7, 0xFC50, 0x0646, 0x064A, 0,
5214 7, 0xFC51, 0x0647, 0x062C, 0,
5215 7, 0xFC52, 0x0647, 0x0645, 0,
5216 7, 0xFC53, 0x0647, 0x0649, 0,
5217 7, 0xFC54, 0x0647, 0x064A, 0,
5218 7, 0xFC55, 0x064A, 0x062C, 0,
5219 7, 0xFC56, 0x064A, 0x062D, 0,
5220 7, 0xFC57, 0x064A, 0x062E, 0,
5221 7, 0xFC58, 0x064A, 0x0645, 0,
5222 7, 0xFC59, 0x064A, 0x0649, 0,
5223 7, 0xFC5A, 0x064A, 0x064A, 0,
5224 7, 0xFC5B, 0x0630, 0x0670, 0,
5225 7, 0xFC5C, 0x0631, 0x0670, 0,
5226 7, 0xFC5D, 0x0649, 0x0670, 0,
5227 7, 0xFC5E, 0x0020, 0x064C, 0x0651, 0,
5228 7, 0xFC5F, 0x0020, 0x064D, 0x0651, 0,
5229 7, 0xFC60, 0x0020, 0x064E, 0x0651, 0,
5230 7, 0xFC61, 0x0020, 0x064F, 0x0651, 0,
5231 7, 0xFC62, 0x0020, 0x0650, 0x0651, 0,
5232 7, 0xFC63, 0x0020, 0x0651, 0x0670, 0,
5233 6, 0xFC64, 0x0626, 0x0631, 0,
5234 6, 0xFC65, 0x0626, 0x0632, 0,
5235 6, 0xFC66, 0x0626, 0x0645, 0,
5236 6, 0xFC67, 0x0626, 0x0646, 0,
5237 6, 0xFC68, 0x0626, 0x0649, 0,
5238 6, 0xFC69, 0x0626, 0x064A, 0,
5239 6, 0xFC6A, 0x0628, 0x0631, 0,
5240 6, 0xFC6B, 0x0628, 0x0632, 0,
5241 6, 0xFC6C, 0x0628, 0x0645, 0,
5242 6, 0xFC6D, 0x0628, 0x0646, 0,
5243 6, 0xFC6E, 0x0628, 0x0649, 0,
5244 6, 0xFC6F, 0x0628, 0x064A, 0,
5245 6, 0xFC70, 0x062A, 0x0631, 0,
5246 6, 0xFC71, 0x062A, 0x0632, 0,
5247 6, 0xFC72, 0x062A, 0x0645, 0,
5248 6, 0xFC73, 0x062A, 0x0646, 0,
5249 6, 0xFC74, 0x062A, 0x0649, 0,
5250 6, 0xFC75, 0x062A, 0x064A, 0,
5251 6, 0xFC76, 0x062B, 0x0631, 0,
5252 6, 0xFC77, 0x062B, 0x0632, 0,
5253 6, 0xFC78, 0x062B, 0x0645, 0,
5254 6, 0xFC79, 0x062B, 0x0646, 0,
5255 6, 0xFC7A, 0x062B, 0x0649, 0,
5256 6, 0xFC7B, 0x062B, 0x064A, 0,
5257 6, 0xFC7C, 0x0641, 0x0649, 0,
5258 6, 0xFC7D, 0x0641, 0x064A, 0,
5259 6, 0xFC7E, 0x0642, 0x0649, 0,
5260 6, 0xFC7F, 0x0642, 0x064A, 0,
5261 6, 0xFC80, 0x0643, 0x0627, 0,
5262 6, 0xFC81, 0x0643, 0x0644, 0,
5263 6, 0xFC82, 0x0643, 0x0645, 0,
5264 6, 0xFC83, 0x0643, 0x0649, 0,
5265 6, 0xFC84, 0x0643, 0x064A, 0,
5266 6, 0xFC85, 0x0644, 0x0645, 0,
5267 6, 0xFC86, 0x0644, 0x0649, 0,
5268 6, 0xFC87, 0x0644, 0x064A, 0,
5269 6, 0xFC88, 0x0645, 0x0627, 0,
5270 6, 0xFC89, 0x0645, 0x0645, 0,
5271 6, 0xFC8A, 0x0646, 0x0631, 0,
5272 6, 0xFC8B, 0x0646, 0x0632, 0,
5273 6, 0xFC8C, 0x0646, 0x0645, 0,
5274 6, 0xFC8D, 0x0646, 0x0646, 0,
5275 6, 0xFC8E, 0x0646, 0x0649, 0,
5276 6, 0xFC8F, 0x0646, 0x064A, 0,
5277 6, 0xFC90, 0x0649, 0x0670, 0,
5278 6, 0xFC91, 0x064A, 0x0631, 0,
5279 6, 0xFC92, 0x064A, 0x0632, 0,
5280 6, 0xFC93, 0x064A, 0x0645, 0,
5281 6, 0xFC94, 0x064A, 0x0646, 0,
5282 6, 0xFC95, 0x064A, 0x0649, 0,
5283 6, 0xFC96, 0x064A, 0x064A, 0,
5284 4, 0xFC97, 0x0626, 0x062C, 0,
5285 4, 0xFC98, 0x0626, 0x062D, 0,
5286 4, 0xFC99, 0x0626, 0x062E, 0,
5287 4, 0xFC9A, 0x0626, 0x0645, 0,
5288 4, 0xFC9B, 0x0626, 0x0647, 0,
5289 4, 0xFC9C, 0x0628, 0x062C, 0,
5290 4, 0xFC9D, 0x0628, 0x062D, 0,
5291 4, 0xFC9E, 0x0628, 0x062E, 0,
5292 4, 0xFC9F, 0x0628, 0x0645, 0,
5293 4, 0xFCA0, 0x0628, 0x0647, 0,
5294 4, 0xFCA1, 0x062A, 0x062C, 0,
5295 4, 0xFCA2, 0x062A, 0x062D, 0,
5296 4, 0xFCA3, 0x062A, 0x062E, 0,
5297 4, 0xFCA4, 0x062A, 0x0645, 0,
5298 4, 0xFCA5, 0x062A, 0x0647, 0,
5299 4, 0xFCA6, 0x062B, 0x0645, 0,
5300 4, 0xFCA7, 0x062C, 0x062D, 0,
5301 4, 0xFCA8, 0x062C, 0x0645, 0,
5302 4, 0xFCA9, 0x062D, 0x062C, 0,
5303 4, 0xFCAA, 0x062D, 0x0645, 0,
5304 4, 0xFCAB, 0x062E, 0x062C, 0,
5305 4, 0xFCAC, 0x062E, 0x0645, 0,
5306 4, 0xFCAD, 0x0633, 0x062C, 0,
5307 4, 0xFCAE, 0x0633, 0x062D, 0,
5308 4, 0xFCAF, 0x0633, 0x062E, 0,
5309 4, 0xFCB0, 0x0633, 0x0645, 0,
5310 4, 0xFCB1, 0x0635, 0x062D, 0,
5311 4, 0xFCB2, 0x0635, 0x062E, 0,
5312 4, 0xFCB3, 0x0635, 0x0645, 0,
5313 4, 0xFCB4, 0x0636, 0x062C, 0,
5314 4, 0xFCB5, 0x0636, 0x062D, 0,
5315 4, 0xFCB6, 0x0636, 0x062E, 0,
5316 4, 0xFCB7, 0x0636, 0x0645, 0,
5317 4, 0xFCB8, 0x0637, 0x062D, 0,
5318 4, 0xFCB9, 0x0638, 0x0645, 0,
5319 4, 0xFCBA, 0x0639, 0x062C, 0,
5320 4, 0xFCBB, 0x0639, 0x0645, 0,
5321 4, 0xFCBC, 0x063A, 0x062C, 0,
5322 4, 0xFCBD, 0x063A, 0x0645, 0,
5323 4, 0xFCBE, 0x0641, 0x062C, 0,
5324 4, 0xFCBF, 0x0641, 0x062D, 0,
5325 4, 0xFCC0, 0x0641, 0x062E, 0,
5326 4, 0xFCC1, 0x0641, 0x0645, 0,
5327 4, 0xFCC2, 0x0642, 0x062D, 0,
5328 4, 0xFCC3, 0x0642, 0x0645, 0,
5329 4, 0xFCC4, 0x0643, 0x062C, 0,
5330 4, 0xFCC5, 0x0643, 0x062D, 0,
5331 4, 0xFCC6, 0x0643, 0x062E, 0,
5332 4, 0xFCC7, 0x0643, 0x0644, 0,
5333 4, 0xFCC8, 0x0643, 0x0645, 0,
5334 4, 0xFCC9, 0x0644, 0x062C, 0,
5335 4, 0xFCCA, 0x0644, 0x062D, 0,
5336 4, 0xFCCB, 0x0644, 0x062E, 0,
5337 4, 0xFCCC, 0x0644, 0x0645, 0,
5338 4, 0xFCCD, 0x0644, 0x0647, 0,
5339 4, 0xFCCE, 0x0645, 0x062C, 0,
5340 4, 0xFCCF, 0x0645, 0x062D, 0,
5341 4, 0xFCD0, 0x0645, 0x062E, 0,
5342 4, 0xFCD1, 0x0645, 0x0645, 0,
5343 4, 0xFCD2, 0x0646, 0x062C, 0,
5344 4, 0xFCD3, 0x0646, 0x062D, 0,
5345 4, 0xFCD4, 0x0646, 0x062E, 0,
5346 4, 0xFCD5, 0x0646, 0x0645, 0,
5347 4, 0xFCD6, 0x0646, 0x0647, 0,
5348 4, 0xFCD7, 0x0647, 0x062C, 0,
5349 4, 0xFCD8, 0x0647, 0x0645, 0,
5350 4, 0xFCD9, 0x0647, 0x0670, 0,
5351 4, 0xFCDA, 0x064A, 0x062C, 0,
5352 4, 0xFCDB, 0x064A, 0x062D, 0,
5353 4, 0xFCDC, 0x064A, 0x062E, 0,
5354 4, 0xFCDD, 0x064A, 0x0645, 0,
5355 4, 0xFCDE, 0x064A, 0x0647, 0,
5356 5, 0xFCDF, 0x0626, 0x0645, 0,
5357 5, 0xFCE0, 0x0626, 0x0647, 0,
5358 5, 0xFCE1, 0x0628, 0x0645, 0,
5359 5, 0xFCE2, 0x0628, 0x0647, 0,
5360 5, 0xFCE3, 0x062A, 0x0645, 0,
5361 5, 0xFCE4, 0x062A, 0x0647, 0,
5362 5, 0xFCE5, 0x062B, 0x0645, 0,
5363 5, 0xFCE6, 0x062B, 0x0647, 0,
5364 5, 0xFCE7, 0x0633, 0x0645, 0,
5365 5, 0xFCE8, 0x0633, 0x0647, 0,
5366 5, 0xFCE9, 0x0634, 0x0645, 0,
5367 5, 0xFCEA, 0x0634, 0x0647, 0,
5368 5, 0xFCEB, 0x0643, 0x0644, 0,
5369 5, 0xFCEC, 0x0643, 0x0645, 0,
5370 5, 0xFCED, 0x0644, 0x0645, 0,
5371 5, 0xFCEE, 0x0646, 0x0645, 0,
5372 5, 0xFCEF, 0x0646, 0x0647, 0,
5373 5, 0xFCF0, 0x064A, 0x0645, 0,
5374 5, 0xFCF1, 0x064A, 0x0647, 0,
5375 5, 0xFCF2, 0x0640, 0x064E, 0x0651, 0,
5376 5, 0xFCF3, 0x0640, 0x064F, 0x0651, 0,
5377 5, 0xFCF4, 0x0640, 0x0650, 0x0651, 0,
5378 7, 0xFCF5, 0x0637, 0x0649, 0,
5379 7, 0xFCF6, 0x0637, 0x064A, 0,
5380 7, 0xFCF7, 0x0639, 0x0649, 0,
5381 7, 0xFCF8, 0x0639, 0x064A, 0,
5382 7, 0xFCF9, 0x063A, 0x0649, 0,
5383 7, 0xFCFA, 0x063A, 0x064A, 0,
5384 7, 0xFCFB, 0x0633, 0x0649, 0,
5385 7, 0xFCFC, 0x0633, 0x064A, 0,
5386 7, 0xFCFD, 0x0634, 0x0649, 0,
5387 7, 0xFCFE, 0x0634, 0x064A, 0,
5388 7, 0xFCFF, 0x062D, 0x0649, 0,
5389 7, 0xFD00, 0x062D, 0x064A, 0,
5390 7, 0xFD01, 0x062C, 0x0649, 0,
5391 7, 0xFD02, 0x062C, 0x064A, 0,
5392 7, 0xFD03, 0x062E, 0x0649, 0,
5393 7, 0xFD04, 0x062E, 0x064A, 0,
5394 7, 0xFD05, 0x0635, 0x0649, 0,
5395 7, 0xFD06, 0x0635, 0x064A, 0,
5396 7, 0xFD07, 0x0636, 0x0649, 0,
5397 7, 0xFD08, 0x0636, 0x064A, 0,
5398 7, 0xFD09, 0x0634, 0x062C, 0,
5399 7, 0xFD0A, 0x0634, 0x062D, 0,
5400 7, 0xFD0B, 0x0634, 0x062E, 0,
5401 7, 0xFD0C, 0x0634, 0x0645, 0,
5402 7, 0xFD0D, 0x0634, 0x0631, 0,
5403 7, 0xFD0E, 0x0633, 0x0631, 0,
5404 7, 0xFD0F, 0x0635, 0x0631, 0,
5405 7, 0xFD10, 0x0636, 0x0631, 0,
5406 6, 0xFD11, 0x0637, 0x0649, 0,
5407 6, 0xFD12, 0x0637, 0x064A, 0,
5408 6, 0xFD13, 0x0639, 0x0649, 0,
5409 6, 0xFD14, 0x0639, 0x064A, 0,
5410 6, 0xFD15, 0x063A, 0x0649, 0,
5411 6, 0xFD16, 0x063A, 0x064A, 0,
5412 6, 0xFD17, 0x0633, 0x0649, 0,
5413 6, 0xFD18, 0x0633, 0x064A, 0,
5414 6, 0xFD19, 0x0634, 0x0649, 0,
5415 6, 0xFD1A, 0x0634, 0x064A, 0,
5416 6, 0xFD1B, 0x062D, 0x0649, 0,
5417 6, 0xFD1C, 0x062D, 0x064A, 0,
5418 6, 0xFD1D, 0x062C, 0x0649, 0,
5419 6, 0xFD1E, 0x062C, 0x064A, 0,
5420 6, 0xFD1F, 0x062E, 0x0649, 0,
5421 6, 0xFD20, 0x062E, 0x064A, 0,
5422 6, 0xFD21, 0x0635, 0x0649, 0,
5423 6, 0xFD22, 0x0635, 0x064A, 0,
5424 6, 0xFD23, 0x0636, 0x0649, 0,
5425 6, 0xFD24, 0x0636, 0x064A, 0,
5426 6, 0xFD25, 0x0634, 0x062C, 0,
5427 6, 0xFD26, 0x0634, 0x062D, 0,
5428 6, 0xFD27, 0x0634, 0x062E, 0,
5429 6, 0xFD28, 0x0634, 0x0645, 0,
5430 6, 0xFD29, 0x0634, 0x0631, 0,
5431 6, 0xFD2A, 0x0633, 0x0631, 0,
5432 6, 0xFD2B, 0x0635, 0x0631, 0,
5433 6, 0xFD2C, 0x0636, 0x0631, 0,
5434 4, 0xFD2D, 0x0634, 0x062C, 0,
5435 4, 0xFD2E, 0x0634, 0x062D, 0,
5436 4, 0xFD2F, 0x0634, 0x062E, 0,
5437 4, 0xFD30, 0x0634, 0x0645, 0,
5438 4, 0xFD31, 0x0633, 0x0647, 0,
5439 4, 0xFD32, 0x0634, 0x0647, 0,
5440 4, 0xFD33, 0x0637, 0x0645, 0,
5441 5, 0xFD34, 0x0633, 0x062C, 0,
5442 5, 0xFD35, 0x0633, 0x062D, 0,
5443 5, 0xFD36, 0x0633, 0x062E, 0,
5444 5, 0xFD37, 0x0634, 0x062C, 0,
5445 5, 0xFD38, 0x0634, 0x062D, 0,
5446 5, 0xFD39, 0x0634, 0x062E, 0,
5447 5, 0xFD3A, 0x0637, 0x0645, 0,
5448 5, 0xFD3B, 0x0638, 0x0645, 0,
5449 6, 0xFD3C, 0x0627, 0x064B, 0,
5450 7, 0xFD3D, 0x0627, 0x064B, 0,
5451 4, 0xFD50, 0x062A, 0x062C, 0x0645, 0,
5452 6, 0xFD51, 0x062A, 0x062D, 0x062C, 0,
5453 4, 0xFD52, 0x062A, 0x062D, 0x062C, 0,
5454 4, 0xFD53, 0x062A, 0x062D, 0x0645, 0,
5455 4, 0xFD54, 0x062A, 0x062E, 0x0645, 0,
5456 4, 0xFD55, 0x062A, 0x0645, 0x062C, 0,
5457 4, 0xFD56, 0x062A, 0x0645, 0x062D, 0,
5458 4, 0xFD57, 0x062A, 0x0645, 0x062E, 0,
5459 6, 0xFD58, 0x062C, 0x0645, 0x062D, 0,
5460 4, 0xFD59, 0x062C, 0x0645, 0x062D, 0,
5461 6, 0xFD5A, 0x062D, 0x0645, 0x064A, 0,
5462 6, 0xFD5B, 0x062D, 0x0645, 0x0649, 0,
5463 4, 0xFD5C, 0x0633, 0x062D, 0x062C, 0,
5464 4, 0xFD5D, 0x0633, 0x062C, 0x062D, 0,
5465 6, 0xFD5E, 0x0633, 0x062C, 0x0649, 0,
5466 6, 0xFD5F, 0x0633, 0x0645, 0x062D, 0,
5467 4, 0xFD60, 0x0633, 0x0645, 0x062D, 0,
5468 4, 0xFD61, 0x0633, 0x0645, 0x062C, 0,
5469 6, 0xFD62, 0x0633, 0x0645, 0x0645, 0,
5470 4, 0xFD63, 0x0633, 0x0645, 0x0645, 0,
5471 6, 0xFD64, 0x0635, 0x062D, 0x062D, 0,
5472 4, 0xFD65, 0x0635, 0x062D, 0x062D, 0,
5473 6, 0xFD66, 0x0635, 0x0645, 0x0645, 0,
5474 6, 0xFD67, 0x0634, 0x062D, 0x0645, 0,
5475 4, 0xFD68, 0x0634, 0x062D, 0x0645, 0,
5476 6, 0xFD69, 0x0634, 0x062C, 0x064A, 0,
5477 6, 0xFD6A, 0x0634, 0x0645, 0x062E, 0,
5478 4, 0xFD6B, 0x0634, 0x0645, 0x062E, 0,
5479 6, 0xFD6C, 0x0634, 0x0645, 0x0645, 0,
5480 4, 0xFD6D, 0x0634, 0x0645, 0x0645, 0,
5481 6, 0xFD6E, 0x0636, 0x062D, 0x0649, 0,
5482 6, 0xFD6F, 0x0636, 0x062E, 0x0645, 0,
5483 4, 0xFD70, 0x0636, 0x062E, 0x0645, 0,
5484 6, 0xFD71, 0x0637, 0x0645, 0x062D, 0,
5485 4, 0xFD72, 0x0637, 0x0645, 0x062D, 0,
5486 4, 0xFD73, 0x0637, 0x0645, 0x0645, 0,
5487 6, 0xFD74, 0x0637, 0x0645, 0x064A, 0,
5488 6, 0xFD75, 0x0639, 0x062C, 0x0645, 0,
5489 6, 0xFD76, 0x0639, 0x0645, 0x0645, 0,
5490 4, 0xFD77, 0x0639, 0x0645, 0x0645, 0,
5491 6, 0xFD78, 0x0639, 0x0645, 0x0649, 0,
5492 6, 0xFD79, 0x063A, 0x0645, 0x0645, 0,
5493 6, 0xFD7A, 0x063A, 0x0645, 0x064A, 0,
5494 6, 0xFD7B, 0x063A, 0x0645, 0x0649, 0,
5495 6, 0xFD7C, 0x0641, 0x062E, 0x0645, 0,
5496 4, 0xFD7D, 0x0641, 0x062E, 0x0645, 0,
5497 6, 0xFD7E, 0x0642, 0x0645, 0x062D, 0,
5498 6, 0xFD7F, 0x0642, 0x0645, 0x0645, 0,
5499 6, 0xFD80, 0x0644, 0x062D, 0x0645, 0,
5500 6, 0xFD81, 0x0644, 0x062D, 0x064A, 0,
5501 6, 0xFD82, 0x0644, 0x062D, 0x0649, 0,
5502 4, 0xFD83, 0x0644, 0x062C, 0x062C, 0,
5503 6, 0xFD84, 0x0644, 0x062C, 0x062C, 0,
5504 6, 0xFD85, 0x0644, 0x062E, 0x0645, 0,
5505 4, 0xFD86, 0x0644, 0x062E, 0x0645, 0,
5506 6, 0xFD87, 0x0644, 0x0645, 0x062D, 0,
5507 4, 0xFD88, 0x0644, 0x0645, 0x062D, 0,
5508 4, 0xFD89, 0x0645, 0x062D, 0x062C, 0,
5509 4, 0xFD8A, 0x0645, 0x062D, 0x0645, 0,
5510 6, 0xFD8B, 0x0645, 0x062D, 0x064A, 0,
5511 4, 0xFD8C, 0x0645, 0x062C, 0x062D, 0,
5512 4, 0xFD8D, 0x0645, 0x062C, 0x0645, 0,
5513 4, 0xFD8E, 0x0645, 0x062E, 0x062C, 0,
5514 4, 0xFD8F, 0x0645, 0x062E, 0x0645, 0,
5515 4, 0xFD92, 0x0645, 0x062C, 0x062E, 0,
5516 4, 0xFD93, 0x0647, 0x0645, 0x062C, 0,
5517 4, 0xFD94, 0x0647, 0x0645, 0x0645, 0,
5518 4, 0xFD95, 0x0646, 0x062D, 0x0645, 0,
5519 6, 0xFD96, 0x0646, 0x062D, 0x0649, 0,
5520 6, 0xFD97, 0x0646, 0x062C, 0x0645, 0,
5521 4, 0xFD98, 0x0646, 0x062C, 0x0645, 0,
5522 6, 0xFD99, 0x0646, 0x062C, 0x0649, 0,
5523 6, 0xFD9A, 0x0646, 0x0645, 0x064A, 0,
5524 6, 0xFD9B, 0x0646, 0x0645, 0x0649, 0,
5525 6, 0xFD9C, 0x064A, 0x0645, 0x0645, 0,
5526 4, 0xFD9D, 0x064A, 0x0645, 0x0645, 0,
5527 6, 0xFD9E, 0x0628, 0x062E, 0x064A, 0,
5528 6, 0xFD9F, 0x062A, 0x062C, 0x064A, 0,
5529 6, 0xFDA0, 0x062A, 0x062C, 0x0649, 0,
5530 6, 0xFDA1, 0x062A, 0x062E, 0x064A, 0,
5531 6, 0xFDA2, 0x062A, 0x062E, 0x0649, 0,
5532 6, 0xFDA3, 0x062A, 0x0645, 0x064A, 0,
5533 6, 0xFDA4, 0x062A, 0x0645, 0x0649, 0,
5534 6, 0xFDA5, 0x062C, 0x0645, 0x064A, 0,
5535 6, 0xFDA6, 0x062C, 0x062D, 0x0649, 0,
5536 6, 0xFDA7, 0x062C, 0x0645, 0x0649, 0,
5537 6, 0xFDA8, 0x0633, 0x062E, 0x0649, 0,
5538 6, 0xFDA9, 0x0635, 0x062D, 0x064A, 0,
5539 6, 0xFDAA, 0x0634, 0x062D, 0x064A, 0,
5540 6, 0xFDAB, 0x0636, 0x062D, 0x064A, 0,
5541 6, 0xFDAC, 0x0644, 0x062C, 0x064A, 0,
5542 6, 0xFDAD, 0x0644, 0x0645, 0x064A, 0,
5543 6, 0xFDAE, 0x064A, 0x062D, 0x064A, 0,
5544 6, 0xFDAF, 0x064A, 0x062C, 0x064A, 0,
5545 6, 0xFDB0, 0x064A, 0x0645, 0x064A, 0,
5546 6, 0xFDB1, 0x0645, 0x0645, 0x064A, 0,
5547 6, 0xFDB2, 0x0642, 0x0645, 0x064A, 0,
5548 6, 0xFDB3, 0x0646, 0x062D, 0x064A, 0,
5549 4, 0xFDB4, 0x0642, 0x0645, 0x062D, 0,
5550 4, 0xFDB5, 0x0644, 0x062D, 0x0645, 0,
5551 6, 0xFDB6, 0x0639, 0x0645, 0x064A, 0,
5552 6, 0xFDB7, 0x0643, 0x0645, 0x064A, 0,
5553 4, 0xFDB8, 0x0646, 0x062C, 0x062D, 0,
5554 6, 0xFDB9, 0x0645, 0x062E, 0x064A, 0,
5555 4, 0xFDBA, 0x0644, 0x062C, 0x0645, 0,
5556 6, 0xFDBB, 0x0643, 0x0645, 0x0645, 0,
5557 6, 0xFDBC, 0x0644, 0x062C, 0x0645, 0,
5558 6, 0xFDBD, 0x0646, 0x062C, 0x062D, 0,
5559 6, 0xFDBE, 0x062C, 0x062D, 0x064A, 0,
5560 6, 0xFDBF, 0x062D, 0x062C, 0x064A, 0,
5561 6, 0xFDC0, 0x0645, 0x062C, 0x064A, 0,
5562 6, 0xFDC1, 0x0641, 0x0645, 0x064A, 0,
5563 6, 0xFDC2, 0x0628, 0x062D, 0x064A, 0,
5564 4, 0xFDC3, 0x0643, 0x0645, 0x0645, 0,
5565 4, 0xFDC4, 0x0639, 0x062C, 0x0645, 0,
5566 4, 0xFDC5, 0x0635, 0x0645, 0x0645, 0,
5567 6, 0xFDC6, 0x0633, 0x062E, 0x064A, 0,
5568 6, 0xFDC7, 0x0646, 0x062C, 0x064A, 0,
5569 7, 0xFDF0, 0x0635, 0x0644, 0x06D2, 0,
5570 7, 0xFDF1, 0x0642, 0x0644, 0x06D2, 0,
5571 7, 0xFDF2, 0x0627, 0x0644, 0x0644, 0x0647, 0,
5572 7, 0xFDF3, 0x0627, 0x0643, 0x0628, 0x0631, 0,
5573 7, 0xFDF4, 0x0645, 0x062D, 0x0645, 0x062F, 0,
5574 7, 0xFDF5, 0x0635, 0x0644, 0x0639, 0x0645, 0,
5575 7, 0xFDF6, 0x0631, 0x0633, 0x0648, 0x0644, 0,
5576 7, 0xFDF7, 0x0639, 0x0644, 0x064A, 0x0647, 0,
5577 7, 0xFDF8, 0x0648, 0x0633, 0x0644, 0x0645, 0,
5578 7, 0xFDF9, 0x0635, 0x0644, 0x0649, 0,
5579 7, 0xFDFA, 0x0635, 0x0644, 0x0649, 0x0020, 0x0627, 0x0644, 0x0644, 0x0647, 0x0020, 0x0639, 0x0644, 0x064A, 0x0647, 0x0020, 0x0648, 0x0633, 0x0644, 0x0645, 0,
5580 7, 0xFDFB, 0x062C, 0x0644, 0x0020, 0x062C, 0x0644, 0x0627, 0x0644, 0x0647, 0,
5581 7, 0xFDFC, 0x0631, 0x06CC, 0x0627, 0x0644, 0,
5582 11, 0xFE30, 0x2025, 0,
5583 11, 0xFE31, 0x2014, 0,
5584 11, 0xFE32, 0x2013, 0,
5585 11, 0xFE33, 0x005F, 0,
5586 11, 0xFE34, 0x005F, 0,
5587 11, 0xFE35, 0x0028, 0,
5588 11, 0xFE36, 0x0029, 0,
5589 11, 0xFE37, 0x007B, 0,
5590 11, 0xFE38, 0x007D, 0,
5591 11, 0xFE39, 0x3014, 0,
5592 11, 0xFE3A, 0x3015, 0,
5593 11, 0xFE3B, 0x3010, 0,
5594 11, 0xFE3C, 0x3011, 0,
5595 11, 0xFE3D, 0x300A, 0,
5596 11, 0xFE3E, 0x300B, 0,
5597 11, 0xFE3F, 0x3008, 0,
5598 11, 0xFE40, 0x3009, 0,
5599 11, 0xFE41, 0x300C, 0,
5600 11, 0xFE42, 0x300D, 0,
5601 11, 0xFE43, 0x300E, 0,
5602 11, 0xFE44, 0x300F, 0,
5603 16, 0xFE49, 0x203E, 0,
5604 16, 0xFE4A, 0x203E, 0,
5605 16, 0xFE4B, 0x203E, 0,
5606 16, 0xFE4C, 0x203E, 0,
5607 16, 0xFE4D, 0x005F, 0,
5608 16, 0xFE4E, 0x005F, 0,
5609 16, 0xFE4F, 0x005F, 0,
5610 14, 0xFE50, 0x002C, 0,
5611 14, 0xFE51, 0x3001, 0,
5612 14, 0xFE52, 0x002E, 0,
5613 14, 0xFE54, 0x003B, 0,
5614 14, 0xFE55, 0x003A, 0,
5615 14, 0xFE56, 0x003F, 0,
5616 14, 0xFE57, 0x0021, 0,
5617 14, 0xFE58, 0x2014, 0,
5618 14, 0xFE59, 0x0028, 0,
5619 14, 0xFE5A, 0x0029, 0,
5620 14, 0xFE5B, 0x007B, 0,
5621 14, 0xFE5C, 0x007D, 0,
5622 14, 0xFE5D, 0x3014, 0,
5623 14, 0xFE5E, 0x3015, 0,
5624 14, 0xFE5F, 0x0023, 0,
5625 14, 0xFE60, 0x0026, 0,
5626 14, 0xFE61, 0x002A, 0,
5627 14, 0xFE62, 0x002B, 0,
5628 14, 0xFE63, 0x002D, 0,
5629 14, 0xFE64, 0x003C, 0,
5630 14, 0xFE65, 0x003E, 0,
5631 14, 0xFE66, 0x003D, 0,
5632 14, 0xFE68, 0x005C, 0,
5633 14, 0xFE69, 0x0024, 0,
5634 14, 0xFE6A, 0x0025, 0,
5635 14, 0xFE6B, 0x0040, 0,
5636 7, 0xFE70, 0x0020, 0x064B, 0,
5637 5, 0xFE71, 0x0640, 0x064B, 0,
5638 7, 0xFE72, 0x0020, 0x064C, 0,
5639 7, 0xFE74, 0x0020, 0x064D, 0,
5640 7, 0xFE76, 0x0020, 0x064E, 0,
5641 5, 0xFE77, 0x0640, 0x064E, 0,
5642 7, 0xFE78, 0x0020, 0x064F, 0,
5643 5, 0xFE79, 0x0640, 0x064F, 0,
5644 7, 0xFE7A, 0x0020, 0x0650, 0,
5645 5, 0xFE7B, 0x0640, 0x0650, 0,
5646 7, 0xFE7C, 0x0020, 0x0651, 0,
5647 5, 0xFE7D, 0x0640, 0x0651, 0,
5648 7, 0xFE7E, 0x0020, 0x0652, 0,
5649 5, 0xFE7F, 0x0640, 0x0652, 0,
5650 7, 0xFE80, 0x0621, 0,
5651 7, 0xFE81, 0x0622, 0,
5652 6, 0xFE82, 0x0622, 0,
5653 7, 0xFE83, 0x0623, 0,
5654 6, 0xFE84, 0x0623, 0,
5655 7, 0xFE85, 0x0624, 0,
5656 6, 0xFE86, 0x0624, 0,
5657 7, 0xFE87, 0x0625, 0,
5658 6, 0xFE88, 0x0625, 0,
5659 7, 0xFE89, 0x0626, 0,
5660 6, 0xFE8A, 0x0626, 0,
5661 4, 0xFE8B, 0x0626, 0,
5662 5, 0xFE8C, 0x0626, 0,
5663 7, 0xFE8D, 0x0627, 0,
5664 6, 0xFE8E, 0x0627, 0,
5665 7, 0xFE8F, 0x0628, 0,
5666 6, 0xFE90, 0x0628, 0,
5667 4, 0xFE91, 0x0628, 0,
5668 5, 0xFE92, 0x0628, 0,
5669 7, 0xFE93, 0x0629, 0,
5670 6, 0xFE94, 0x0629, 0,
5671 7, 0xFE95, 0x062A, 0,
5672 6, 0xFE96, 0x062A, 0,
5673 4, 0xFE97, 0x062A, 0,
5674 5, 0xFE98, 0x062A, 0,
5675 7, 0xFE99, 0x062B, 0,
5676 6, 0xFE9A, 0x062B, 0,
5677 4, 0xFE9B, 0x062B, 0,
5678 5, 0xFE9C, 0x062B, 0,
5679 7, 0xFE9D, 0x062C, 0,
5680 6, 0xFE9E, 0x062C, 0,
5681 4, 0xFE9F, 0x062C, 0,
5682 5, 0xFEA0, 0x062C, 0,
5683 7, 0xFEA1, 0x062D, 0,
5684 6, 0xFEA2, 0x062D, 0,
5685 4, 0xFEA3, 0x062D, 0,
5686 5, 0xFEA4, 0x062D, 0,
5687 7, 0xFEA5, 0x062E, 0,
5688 6, 0xFEA6, 0x062E, 0,
5689 4, 0xFEA7, 0x062E, 0,
5690 5, 0xFEA8, 0x062E, 0,
5691 7, 0xFEA9, 0x062F, 0,
5692 6, 0xFEAA, 0x062F, 0,
5693 7, 0xFEAB, 0x0630, 0,
5694 6, 0xFEAC, 0x0630, 0,
5695 7, 0xFEAD, 0x0631, 0,
5696 6, 0xFEAE, 0x0631, 0,
5697 7, 0xFEAF, 0x0632, 0,
5698 6, 0xFEB0, 0x0632, 0,
5699 7, 0xFEB1, 0x0633, 0,
5700 6, 0xFEB2, 0x0633, 0,
5701 4, 0xFEB3, 0x0633, 0,
5702 5, 0xFEB4, 0x0633, 0,
5703 7, 0xFEB5, 0x0634, 0,
5704 6, 0xFEB6, 0x0634, 0,
5705 4, 0xFEB7, 0x0634, 0,
5706 5, 0xFEB8, 0x0634, 0,
5707 7, 0xFEB9, 0x0635, 0,
5708 6, 0xFEBA, 0x0635, 0,
5709 4, 0xFEBB, 0x0635, 0,
5710 5, 0xFEBC, 0x0635, 0,
5711 7, 0xFEBD, 0x0636, 0,
5712 6, 0xFEBE, 0x0636, 0,
5713 4, 0xFEBF, 0x0636, 0,
5714 5, 0xFEC0, 0x0636, 0,
5715 7, 0xFEC1, 0x0637, 0,
5716 6, 0xFEC2, 0x0637, 0,
5717 4, 0xFEC3, 0x0637, 0,
5718 5, 0xFEC4, 0x0637, 0,
5719 7, 0xFEC5, 0x0638, 0,
5720 6, 0xFEC6, 0x0638, 0,
5721 4, 0xFEC7, 0x0638, 0,
5722 5, 0xFEC8, 0x0638, 0,
5723 7, 0xFEC9, 0x0639, 0,
5724 6, 0xFECA, 0x0639, 0,
5725 4, 0xFECB, 0x0639, 0,
5726 5, 0xFECC, 0x0639, 0,
5727 7, 0xFECD, 0x063A, 0,
5728 6, 0xFECE, 0x063A, 0,
5729 4, 0xFECF, 0x063A, 0,
5730 5, 0xFED0, 0x063A, 0,
5731 7, 0xFED1, 0x0641, 0,
5732 6, 0xFED2, 0x0641, 0,
5733 4, 0xFED3, 0x0641, 0,
5734 5, 0xFED4, 0x0641, 0,
5735 7, 0xFED5, 0x0642, 0,
5736 6, 0xFED6, 0x0642, 0,
5737 4, 0xFED7, 0x0642, 0,
5738 5, 0xFED8, 0x0642, 0,
5739 7, 0xFED9, 0x0643, 0,
5740 6, 0xFEDA, 0x0643, 0,
5741 4, 0xFEDB, 0x0643, 0,
5742 5, 0xFEDC, 0x0643, 0,
5743 7, 0xFEDD, 0x0644, 0,
5744 6, 0xFEDE, 0x0644, 0,
5745 4, 0xFEDF, 0x0644, 0,
5746 5, 0xFEE0, 0x0644, 0,
5747 7, 0xFEE1, 0x0645, 0,
5748 6, 0xFEE2, 0x0645, 0,
5749 4, 0xFEE3, 0x0645, 0,
5750 5, 0xFEE4, 0x0645, 0,
5751 7, 0xFEE5, 0x0646, 0,
5752 6, 0xFEE6, 0x0646, 0,
5753 4, 0xFEE7, 0x0646, 0,
5754 5, 0xFEE8, 0x0646, 0,
5755 7, 0xFEE9, 0x0647, 0,
5756 6, 0xFEEA, 0x0647, 0,
5757 4, 0xFEEB, 0x0647, 0,
5758 5, 0xFEEC, 0x0647, 0,
5759 7, 0xFEED, 0x0648, 0,
5760 6, 0xFEEE, 0x0648, 0,
5761 7, 0xFEEF, 0x0649, 0,
5762 6, 0xFEF0, 0x0649, 0,
5763 7, 0xFEF1, 0x064A, 0,
5764 6, 0xFEF2, 0x064A, 0,
5765 4, 0xFEF3, 0x064A, 0,
5766 5, 0xFEF4, 0x064A, 0,
5767 7, 0xFEF5, 0x0644, 0x0622, 0,
5768 6, 0xFEF6, 0x0644, 0x0622, 0,
5769 7, 0xFEF7, 0x0644, 0x0623, 0,
5770 6, 0xFEF8, 0x0644, 0x0623, 0,
5771 7, 0xFEF9, 0x0644, 0x0625, 0,
5772 6, 0xFEFA, 0x0644, 0x0625, 0,
5773 7, 0xFEFB, 0x0644, 0x0627, 0,
5774 6, 0xFEFC, 0x0644, 0x0627, 0,
5775 12, 0xFF01, 0x0021, 0,
5776 12, 0xFF02, 0x0022, 0,
5777 12, 0xFF03, 0x0023, 0,
5778 12, 0xFF04, 0x0024, 0,
5779 12, 0xFF05, 0x0025, 0,
5780 12, 0xFF06, 0x0026, 0,
5781 12, 0xFF07, 0x0027, 0,
5782 12, 0xFF08, 0x0028, 0,
5783 12, 0xFF09, 0x0029, 0,
5784 12, 0xFF0A, 0x002A, 0,
5785 12, 0xFF0B, 0x002B, 0,
5786 12, 0xFF0C, 0x002C, 0,
5787 12, 0xFF0D, 0x002D, 0,
5788 12, 0xFF0E, 0x002E, 0,
5789 12, 0xFF0F, 0x002F, 0,
5790 12, 0xFF10, 0x0030, 0,
5791 12, 0xFF11, 0x0031, 0,
5792 12, 0xFF12, 0x0032, 0,
5793 12, 0xFF13, 0x0033, 0,
5794 12, 0xFF14, 0x0034, 0,
5795 12, 0xFF15, 0x0035, 0,
5796 12, 0xFF16, 0x0036, 0,
5797 12, 0xFF17, 0x0037, 0,
5798 12, 0xFF18, 0x0038, 0,
5799 12, 0xFF19, 0x0039, 0,
5800 12, 0xFF1A, 0x003A, 0,
5801 12, 0xFF1B, 0x003B, 0,
5802 12, 0xFF1C, 0x003C, 0,
5803 12, 0xFF1D, 0x003D, 0,
5804 12, 0xFF1E, 0x003E, 0,
5805 12, 0xFF1F, 0x003F, 0,
5806 12, 0xFF20, 0x0040, 0,
5807 12, 0xFF21, 0x0041, 0,
5808 12, 0xFF22, 0x0042, 0,
5809 12, 0xFF23, 0x0043, 0,
5810 12, 0xFF24, 0x0044, 0,
5811 12, 0xFF25, 0x0045, 0,
5812 12, 0xFF26, 0x0046, 0,
5813 12, 0xFF27, 0x0047, 0,
5814 12, 0xFF28, 0x0048, 0,
5815 12, 0xFF29, 0x0049, 0,
5816 12, 0xFF2A, 0x004A, 0,
5817 12, 0xFF2B, 0x004B, 0,
5818 12, 0xFF2C, 0x004C, 0,
5819 12, 0xFF2D, 0x004D, 0,
5820 12, 0xFF2E, 0x004E, 0,
5821 12, 0xFF2F, 0x004F, 0,
5822 12, 0xFF30, 0x0050, 0,
5823 12, 0xFF31, 0x0051, 0,
5824 12, 0xFF32, 0x0052, 0,
5825 12, 0xFF33, 0x0053, 0,
5826 12, 0xFF34, 0x0054, 0,
5827 12, 0xFF35, 0x0055, 0,
5828 12, 0xFF36, 0x0056, 0,
5829 12, 0xFF37, 0x0057, 0,
5830 12, 0xFF38, 0x0058, 0,
5831 12, 0xFF39, 0x0059, 0,
5832 12, 0xFF3A, 0x005A, 0,
5833 12, 0xFF3B, 0x005B, 0,
5834 12, 0xFF3C, 0x005C, 0,
5835 12, 0xFF3D, 0x005D, 0,
5836 12, 0xFF3E, 0x005E, 0,
5837 12, 0xFF3F, 0x005F, 0,
5838 12, 0xFF40, 0x0060, 0,
5839 12, 0xFF41, 0x0061, 0,
5840 12, 0xFF42, 0x0062, 0,
5841 12, 0xFF43, 0x0063, 0,
5842 12, 0xFF44, 0x0064, 0,
5843 12, 0xFF45, 0x0065, 0,
5844 12, 0xFF46, 0x0066, 0,
5845 12, 0xFF47, 0x0067, 0,
5846 12, 0xFF48, 0x0068, 0,
5847 12, 0xFF49, 0x0069, 0,
5848 12, 0xFF4A, 0x006A, 0,
5849 12, 0xFF4B, 0x006B, 0,
5850 12, 0xFF4C, 0x006C, 0,
5851 12, 0xFF4D, 0x006D, 0,
5852 12, 0xFF4E, 0x006E, 0,
5853 12, 0xFF4F, 0x006F, 0,
5854 12, 0xFF50, 0x0070, 0,
5855 12, 0xFF51, 0x0071, 0,
5856 12, 0xFF52, 0x0072, 0,
5857 12, 0xFF53, 0x0073, 0,
5858 12, 0xFF54, 0x0074, 0,
5859 12, 0xFF55, 0x0075, 0,
5860 12, 0xFF56, 0x0076, 0,
5861 12, 0xFF57, 0x0077, 0,
5862 12, 0xFF58, 0x0078, 0,
5863 12, 0xFF59, 0x0079, 0,
5864 12, 0xFF5A, 0x007A, 0,
5865 12, 0xFF5B, 0x007B, 0,
5866 12, 0xFF5C, 0x007C, 0,
5867 12, 0xFF5D, 0x007D, 0,
5868 12, 0xFF5E, 0x007E, 0,
5869 12, 0xFF5F, 0x2985, 0,
5870 12, 0xFF60, 0x2986, 0,
5871 13, 0xFF61, 0x3002, 0,
5872 13, 0xFF62, 0x300C, 0,
5873 13, 0xFF63, 0x300D, 0,
5874 13, 0xFF64, 0x3001, 0,
5875 13, 0xFF65, 0x30FB, 0,
5876 13, 0xFF66, 0x30F2, 0,
5877 13, 0xFF67, 0x30A1, 0,
5878 13, 0xFF68, 0x30A3, 0,
5879 13, 0xFF69, 0x30A5, 0,
5880 13, 0xFF6A, 0x30A7, 0,
5881 13, 0xFF6B, 0x30A9, 0,
5882 13, 0xFF6C, 0x30E3, 0,
5883 13, 0xFF6D, 0x30E5, 0,
5884 13, 0xFF6E, 0x30E7, 0,
5885 13, 0xFF6F, 0x30C3, 0,
5886 13, 0xFF70, 0x30FC, 0,
5887 13, 0xFF71, 0x30A2, 0,
5888 13, 0xFF72, 0x30A4, 0,
5889 13, 0xFF73, 0x30A6, 0,
5890 13, 0xFF74, 0x30A8, 0,
5891 13, 0xFF75, 0x30AA, 0,
5892 13, 0xFF76, 0x30AB, 0,
5893 13, 0xFF77, 0x30AD, 0,
5894 13, 0xFF78, 0x30AF, 0,
5895 13, 0xFF79, 0x30B1, 0,
5896 13, 0xFF7A, 0x30B3, 0,
5897 13, 0xFF7B, 0x30B5, 0,
5898 13, 0xFF7C, 0x30B7, 0,
5899 13, 0xFF7D, 0x30B9, 0,
5900 13, 0xFF7E, 0x30BB, 0,
5901 13, 0xFF7F, 0x30BD, 0,
5902 13, 0xFF80, 0x30BF, 0,
5903 13, 0xFF81, 0x30C1, 0,
5904 13, 0xFF82, 0x30C4, 0,
5905 13, 0xFF83, 0x30C6, 0,
5906 13, 0xFF84, 0x30C8, 0,
5907 13, 0xFF85, 0x30CA, 0,
5908 13, 0xFF86, 0x30CB, 0,
5909 13, 0xFF87, 0x30CC, 0,
5910 13, 0xFF88, 0x30CD, 0,
5911 13, 0xFF89, 0x30CE, 0,
5912 13, 0xFF8A, 0x30CF, 0,
5913 13, 0xFF8B, 0x30D2, 0,
5914 13, 0xFF8C, 0x30D5, 0,
5915 13, 0xFF8D, 0x30D8, 0,
5916 13, 0xFF8E, 0x30DB, 0,
5917 13, 0xFF8F, 0x30DE, 0,
5918 13, 0xFF90, 0x30DF, 0,
5919 13, 0xFF91, 0x30E0, 0,
5920 13, 0xFF92, 0x30E1, 0,
5921 13, 0xFF93, 0x30E2, 0,
5922 13, 0xFF94, 0x30E4, 0,
5923 13, 0xFF95, 0x30E6, 0,
5924 13, 0xFF96, 0x30E8, 0,
5925 13, 0xFF97, 0x30E9, 0,
5926 13, 0xFF98, 0x30EA, 0,
5927 13, 0xFF99, 0x30EB, 0,
5928 13, 0xFF9A, 0x30EC, 0,
5929 13, 0xFF9B, 0x30ED, 0,
5930 13, 0xFF9C, 0x30EF, 0,
5931 13, 0xFF9D, 0x30F3, 0,
5932 13, 0xFF9E, 0x3099, 0,
5933 13, 0xFF9F, 0x309A, 0,
5934 13, 0xFFA0, 0x3164, 0,
5935 13, 0xFFA1, 0x3131, 0,
5936 13, 0xFFA2, 0x3132, 0,
5937 13, 0xFFA3, 0x3133, 0,
5938 13, 0xFFA4, 0x3134, 0,
5939 13, 0xFFA5, 0x3135, 0,
5940 13, 0xFFA6, 0x3136, 0,
5941 13, 0xFFA7, 0x3137, 0,
5942 13, 0xFFA8, 0x3138, 0,
5943 13, 0xFFA9, 0x3139, 0,
5944 13, 0xFFAA, 0x313A, 0,
5945 13, 0xFFAB, 0x313B, 0,
5946 13, 0xFFAC, 0x313C, 0,
5947 13, 0xFFAD, 0x313D, 0,
5948 13, 0xFFAE, 0x313E, 0,
5949 13, 0xFFAF, 0x313F, 0,
5950 13, 0xFFB0, 0x3140, 0,
5951 13, 0xFFB1, 0x3141, 0,
5952 13, 0xFFB2, 0x3142, 0,
5953 13, 0xFFB3, 0x3143, 0,
5954 13, 0xFFB4, 0x3144, 0,
5955 13, 0xFFB5, 0x3145, 0,
5956 13, 0xFFB6, 0x3146, 0,
5957 13, 0xFFB7, 0x3147, 0,
5958 13, 0xFFB8, 0x3148, 0,
5959 13, 0xFFB9, 0x3149, 0,
5960 13, 0xFFBA, 0x314A, 0,
5961 13, 0xFFBB, 0x314B, 0,
5962 13, 0xFFBC, 0x314C, 0,
5963 13, 0xFFBD, 0x314D, 0,
5964 13, 0xFFBE, 0x314E, 0,
5965 13, 0xFFC2, 0x314F, 0,
5966 13, 0xFFC3, 0x3150, 0,
5967 13, 0xFFC4, 0x3151, 0,
5968 13, 0xFFC5, 0x3152, 0,
5969 13, 0xFFC6, 0x3153, 0,
5970 13, 0xFFC7, 0x3154, 0,
5971 13, 0xFFCA, 0x3155, 0,
5972 13, 0xFFCB, 0x3156, 0,
5973 13, 0xFFCC, 0x3157, 0,
5974 13, 0xFFCD, 0x3158, 0,
5975 13, 0xFFCE, 0x3159, 0,
5976 13, 0xFFCF, 0x315A, 0,
5977 13, 0xFFD2, 0x315B, 0,
5978 13, 0xFFD3, 0x315C, 0,
5979 13, 0xFFD4, 0x315D, 0,
5980 13, 0xFFD5, 0x315E, 0,
5981 13, 0xFFD6, 0x315F, 0,
5982 13, 0xFFD7, 0x3160, 0,
5983 13, 0xFFDA, 0x3161, 0,
5984 13, 0xFFDB, 0x3162, 0,
5985 13, 0xFFDC, 0x3163, 0,
5986 12, 0xFFE0, 0x00A2, 0,
5987 12, 0xFFE1, 0x00A3, 0,
5988 12, 0xFFE2, 0x00AC, 0,
5989 12, 0xFFE3, 0x00AF, 0,
5990 12, 0xFFE4, 0x00A6, 0,
5991 12, 0xFFE5, 0x00A5, 0,
5992 12, 0xFFE6, 0x20A9, 0,
5993 13, 0xFFE8, 0x2502, 0,
5994 13, 0xFFE9, 0x2190, 0,
5995 13, 0xFFEA, 0x2191, 0,
5996 13, 0xFFEB, 0x2192, 0,
5997 13, 0xFFEC, 0x2193, 0,
5998 13, 0xFFED, 0x25A0, 0,
5999 13, 0xFFEE, 0x25CB, 0,
6000
6001};
6002
6003const Q_UINT16 QUnicodeTables::decomposition_info[] = {
6004 1, 2, 3, 4, 5, 6, 7, 8,
6005 8, 9, 10, 11, 12, 13, 14, 15,
6006 16, 8, 8, 8, 8, 8, 8, 8,
6007 8, 8, 8, 8, 8, 8, 17, 18,
6008 19, 20, 21, 22, 23, 8, 8, 8,
6009 8, 8, 24, 8, 8, 8, 25, 26,
6010 27, 28, 29, 30, 8, 8, 8, 8,
6011 8, 8, 8, 8, 8, 8, 8, 8,
6012 8, 8, 8, 8, 8, 8, 8, 8,
6013 8, 8, 8, 8, 8, 8, 8, 8,
6014 8, 8, 8, 8, 8, 8, 8, 8,
6015 8, 8, 8, 8, 8, 8, 8, 8,
6016 8, 8, 8, 8, 8, 8, 8, 8,
6017 8, 8, 8, 8, 8, 8, 8, 8,
6018 8, 8, 8, 8, 8, 8, 8, 8,
6019 8, 8, 8, 8, 8, 8, 8, 8,
6020 8, 8, 8, 8, 8, 8, 8, 8,
6021 8, 8, 8, 8, 8, 8, 8, 8,
6022 8, 8, 8, 8, 8, 8, 8, 8,
6023 8, 8, 8, 8, 8, 8, 8, 8,
6024 8, 8, 8, 8, 8, 8, 8, 8,
6025 8, 8, 8, 8, 8, 8, 8, 8,
6026 8, 8, 8, 8, 8, 8, 8, 8,
6027 8, 8, 8, 8, 8, 8, 8, 8,
6028 8, 8, 8, 8, 8, 8, 8, 8,
6029 8, 8, 8, 8, 8, 8, 8, 8,
6030 8, 8, 8, 8, 8, 8, 8, 8,
6031 8, 8, 8, 8, 8, 8, 8, 8,
6032 8, 8, 8, 8, 8, 8, 8, 8,
6033 8, 8, 8, 8, 8, 8, 8, 8,
6034 8, 8, 8, 8, 8, 8, 8, 8,
6035 8, 31, 32, 33, 34, 35, 36, 37,
6036
6037 0, 0, 0, 0, 0, 0, 0, 0,
6038 0, 0, 0, 0, 0, 0, 0, 0,
6039 0, 0, 0, 0, 0, 0, 0, 0,
6040 0, 0, 0, 0, 0, 0, 0, 0,
6041 0, 0, 0, 0, 0, 0, 0, 0,
6042 0, 0, 0, 0, 0, 0, 0, 0,
6043 0, 0, 0, 0, 0, 0, 0, 0,
6044 0, 0, 0, 0, 0, 0, 0, 0,
6045 0, 0, 0, 0, 0, 0, 0, 0,
6046 0, 0, 0, 0, 0, 0, 0, 0,
6047 0, 0, 0, 0, 0, 0, 0, 0,
6048 0, 0, 0, 0, 0, 0, 0, 0,
6049 0, 0, 0, 0, 0, 0, 0, 0,
6050 0, 0, 0, 0, 0, 0, 0, 0,
6051 0, 0, 0, 0, 0, 0, 0, 0,
6052 0, 0, 0, 0, 0, 0, 0, 0,
6053 0, 0, 0, 0, 0, 0, 0, 0,
6054 0, 0, 0, 0, 0, 0, 0, 0,
6055 0, 0, 0, 0, 0, 0, 0, 0,
6056 0, 0, 0, 0, 0, 0, 0, 0,
6057 1, 0, 0, 0, 0, 0, 0, 0,
6058 5, 0, 10, 0, 0, 0, 0, 14,
6059 0, 0, 19, 23, 27, 32, 0, 0,
6060 36, 41, 45, 0, 49, 55, 61, 0,
6061 67, 72, 77, 82, 87, 92, 0, 97,
6062 102, 107, 112, 117, 122, 127, 132, 137,
6063 0, 142, 147, 152, 157, 162, 167, 0,
6064 0, 172, 177, 182, 187, 192, 0, 0,
6065 197, 202, 207, 212, 217, 222, 0, 227,
6066 232, 237, 242, 247, 252, 257, 262, 267,
6067 0, 272, 277, 282, 287, 292, 297, 0,
6068 0, 302, 307, 312, 317, 322, 0, 327,
6069
6070 332, 337, 342, 347, 352, 357, 362, 367,
6071 372, 377, 382, 387, 392, 397, 402, 407,
6072 0, 0, 412, 417, 422, 427, 432, 437,
6073 442, 447, 452, 457, 462, 467, 472, 477,
6074 482, 487, 492, 497, 502, 507, 0, 0,
6075 512, 517, 522, 527, 532, 537, 542, 547,
6076 552, 0, 557, 562, 567, 572, 577, 582,
6077 0, 587, 592, 597, 602, 607, 612, 617,
6078 622, 0, 0, 627, 632, 637, 642, 647,
6079 652, 657, 0, 0, 662, 667, 672, 677,
6080 682, 687, 0, 0, 692, 697, 702, 707,
6081 712, 717, 722, 727, 732, 737, 742, 747,
6082 752, 757, 762, 767, 772, 777, 0, 0,
6083 782, 787, 792, 797, 802, 807, 812, 817,
6084 822, 827, 832, 837, 842, 847, 852, 857,
6085 862, 867, 872, 877, 882, 887, 892, 897,
6086 0, 0, 0, 0, 0, 0, 0, 0,
6087 0, 0, 0, 0, 0, 0, 0, 0,
6088 0, 0, 0, 0, 0, 0, 0, 0,
6089 0, 0, 0, 0, 0, 0, 0, 0,
6090 901, 906, 0, 0, 0, 0, 0, 0,
6091 0, 0, 0, 0, 0, 0, 0, 911,
6092 916, 0, 0, 0, 0, 0, 0, 0,
6093 0, 0, 0, 0, 0, 0, 0, 0,
6094 0, 0, 0, 0, 921, 926, 931, 936,
6095 941, 946, 951, 956, 961, 966, 971, 976,
6096 981, 986, 991, 996, 1001, 1006, 1011, 1016,
6097 1021, 1026, 1031, 1036, 1041, 0, 1046, 1051,
6098 1056, 1061, 1066, 1071, 0, 0, 1076, 1081,
6099 1086, 1091, 1096, 1101, 1106, 1111, 1116, 1121,
6100 1126, 1131, 1136, 1141, 1146, 1151, 0, 0,
6101 1156, 1161, 1166, 1171, 1176, 1181, 1186, 1191,
6102
6103 1196, 1201, 1206, 1211, 1216, 1221, 1226, 1231,
6104 1236, 1241, 1246, 1251, 1256, 1261, 1266, 1271,
6105 1276, 1281, 1286, 1291, 1296, 1301, 1306, 1311,
6106 1316, 1321, 1326, 1331, 0, 0, 1336, 1341,
6107 0, 0, 0, 0, 0, 0, 1346, 1351,
6108 1356, 1361, 1366, 1371, 1376, 1381, 1386, 1391,
6109 1396, 1401, 1406, 1411, 0, 0, 0, 0,
6110 0, 0, 0, 0, 0, 0, 0, 0,
6111 0, 0, 0, 0, 0, 0, 0, 0,
6112 0, 0, 0, 0, 0, 0, 0, 0,
6113 0, 0, 0, 0, 0, 0, 0, 0,
6114 0, 0, 0, 0, 0, 0, 0, 0,
6115 0, 0, 0, 0, 0, 0, 0, 0,
6116 0, 0, 0, 0, 0, 0, 0, 0,
6117 0, 0, 0, 0, 0, 0, 0, 0,
6118 0, 0, 0, 0, 0, 0, 0, 0,
6119 0, 0, 0, 0, 0, 0, 0, 0,
6120 0, 0, 0, 0, 0, 0, 0, 0,
6121 0, 0, 0, 0, 0, 0, 0, 0,
6122 0, 0, 0, 0, 0, 0, 0, 0,
6123 0, 0, 0, 0, 0, 0, 0, 0,
6124 0, 0, 0, 0, 0, 0, 0, 0,
6125 1416, 1420, 1424, 1428, 1432, 1436, 1440, 1444,
6126 1448, 0, 0, 0, 0, 0, 0, 0,
6127 0, 0, 0, 0, 0, 0, 0, 0,
6128 0, 0, 0, 0, 0, 0, 0, 0,
6129 0, 0, 0, 0, 0, 0, 0, 0,
6130 1452, 1457, 1462, 1467, 1472, 1477, 0, 0,
6131 1482, 1486, 1490, 1494, 1498, 0, 0, 0,
6132 0, 0, 0, 0, 0, 0, 0, 0,
6133 0, 0, 0, 0, 0, 0, 0, 0,
6134 0, 0, 0, 0, 0, 0, 0, 0,
6135
6136 0, 0, 0, 0, 0, 0, 0, 0,
6137 0, 0, 0, 0, 0, 0, 0, 0,
6138 0, 0, 0, 0, 0, 0, 0, 0,
6139 0, 0, 0, 0, 0, 0, 0, 0,
6140 0, 0, 0, 0, 0, 0, 0, 0,
6141 0, 0, 0, 0, 0, 0, 0, 0,
6142 0, 0, 0, 0, 0, 0, 0, 0,
6143 0, 0, 0, 0, 0, 0, 0, 0,
6144 1502, 1506, 0, 1510, 1514, 0, 0, 0,
6145 0, 0, 0, 0, 0, 0, 0, 0,
6146 0, 0, 0, 0, 0, 0, 0, 0,
6147 0, 0, 0, 0, 0, 0, 0, 0,
6148 0, 0, 0, 0, 0, 0, 0, 0,
6149 0, 0, 0, 0, 0, 0, 0, 0,
6150 0, 0, 0, 0, 1519, 0, 0, 0,
6151 0, 0, 1523, 0, 0, 0, 1528, 0,
6152 0, 0, 0, 0, 1532, 1537, 1542, 1547,
6153 1551, 1556, 1561, 0, 1566, 0, 1571, 1576,
6154 1581, 0, 0, 0, 0, 0, 0, 0,
6155 0, 0, 0, 0, 0, 0, 0, 0,
6156 0, 0, 0, 0, 0, 0, 0, 0,
6157 0, 0, 1586, 1591, 1596, 1601, 1606, 1611,
6158 1616, 0, 0, 0, 0, 0, 0, 0,
6159 0, 0, 0, 0, 0, 0, 0, 0,
6160 0, 0, 0, 0, 0, 0, 0, 0,
6161 0, 0, 1621, 1626, 1631, 1636, 1641, 0,
6162 1646, 1650, 1654, 1658, 1663, 1668, 1672, 0,
6163 0, 0, 0, 0, 0, 0, 0, 0,
6164 0, 0, 0, 0, 0, 0, 0, 0,
6165 0, 0, 0, 0, 0, 0, 0, 0,
6166 1676, 1680, 1684, 0, 1688, 1692, 0, 0,
6167 0, 0, 0, 0, 0, 0, 0, 0,
6168
6169 1696, 1701, 0, 1706, 0, 0, 0, 1711,
6170 0, 0, 0, 0, 1716, 1721, 1726, 0,
6171 0, 0, 0, 0, 0, 0, 0, 0,
6172 0, 1731, 0, 0, 0, 0, 0, 0,
6173 0, 0, 0, 0, 0, 0, 0, 0,
6174 0, 0, 0, 0, 0, 0, 0, 0,
6175 0, 0, 0, 0, 0, 0, 0, 0,
6176 0, 1736, 0, 0, 0, 0, 0, 0,
6177 0, 0, 0, 0, 0, 0, 0, 0,
6178 0, 0, 0, 0, 0, 0, 0, 0,
6179 1741, 1746, 0, 1751, 0, 0, 0, 1756,
6180 0, 0, 0, 0, 1761, 1766, 1771, 0,
6181 0, 0, 0, 0, 0, 0, 0, 0,
6182 0, 0, 0, 0, 0, 0, 0, 0,
6183 0, 0, 0, 0, 0, 0, 1776, 1781,
6184 0, 0, 0, 0, 0, 0, 0, 0,
6185 0, 0, 0, 0, 0, 0, 0, 0,
6186 0, 0, 0, 0, 0, 0, 0, 0,
6187 0, 0, 0, 0, 0, 0, 0, 0,
6188 0, 0, 0, 0, 0, 0, 0, 0,
6189 0, 0, 0, 0, 0, 0, 0, 0,
6190 0, 0, 0, 0, 0, 0, 0, 0,
6191 0, 0, 0, 0, 0, 0, 0, 0,
6192 0, 0, 0, 0, 0, 0, 0, 0,
6193 0, 1786, 1791, 0, 0, 0, 0, 0,
6194 0, 0, 0, 0, 0, 0, 0, 0,
6195 1796, 1801, 1806, 1811, 0, 0, 1816, 1821,
6196 0, 0, 1826, 1831, 1836, 1841, 1846, 1851,
6197 0, 0, 1856, 1861, 1866, 1871, 1876, 1881,
6198 0, 0, 1886, 1891, 1896, 1901, 1906, 1911,
6199 1916, 1921, 1926, 1931, 1936, 1941, 0, 0,
6200 1946, 1951, 0, 0, 0, 0, 0, 0,
6201
6202 0, 0, 0, 0, 0, 0, 0, 0,
6203 0, 0, 0, 0, 0, 0, 0, 0,
6204 0, 0, 0, 0, 0, 0, 0, 0,
6205 0, 0, 0, 0, 0, 0, 0, 0,
6206 0, 0, 0, 0, 0, 0, 0, 0,
6207 0, 0, 0, 0, 0, 0, 0, 0,
6208 0, 0, 0, 0, 0, 0, 0, 0,
6209 0, 0, 0, 0, 0, 0, 0, 0,
6210 0, 0, 0, 0, 0, 0, 0, 0,
6211 0, 0, 0, 0, 0, 0, 0, 0,
6212 0, 0, 0, 0, 0, 0, 0, 0,
6213 0, 0, 0, 0, 0, 0, 0, 0,
6214 0, 0, 0, 0, 0, 0, 0, 0,
6215 0, 0, 0, 0, 0, 0, 0, 0,
6216 0, 0, 0, 0, 0, 0, 0, 0,
6217 0, 0, 0, 0, 0, 0, 0, 0,
6218 0, 0, 0, 0, 0, 0, 0, 1956,
6219 0, 0, 0, 0, 0, 0, 0, 0,
6220 0, 0, 0, 0, 0, 0, 0, 0,
6221 0, 0, 0, 0, 0, 0, 0, 0,
6222 0, 0, 0, 0, 0, 0, 0, 0,
6223 0, 0, 0, 0, 0, 0, 0, 0,
6224 0, 0, 0, 0, 0, 0, 0, 0,
6225 0, 0, 0, 0, 0, 0, 0, 0,
6226 0, 0, 0, 0, 0, 0, 0, 0,
6227 0, 0, 0, 0, 0, 0, 0, 0,
6228 0, 0, 0, 0, 0, 0, 0, 0,
6229 0, 0, 0, 0, 0, 0, 0, 0,
6230 0, 0, 0, 0, 0, 0, 0, 0,
6231 0, 0, 0, 0, 0, 0, 0, 0,
6232 0, 0, 0, 0, 0, 0, 0, 0,
6233 0, 0, 0, 0, 0, 0, 0, 0,
6234
6235 0, 0, 0, 0, 0, 0, 0, 0,
6236 0, 0, 0, 0, 0, 0, 0, 0,
6237 0, 0, 0, 0, 0, 0, 0, 0,
6238 0, 0, 0, 0, 0, 0, 0, 0,
6239 0, 0, 1961, 1966, 1971, 1976, 1981, 0,
6240 0, 0, 0, 0, 0, 0, 0, 0,
6241 0, 0, 0, 0, 0, 0, 0, 0,
6242 0, 0, 0, 0, 0, 0, 0, 0,
6243 0, 0, 0, 0, 0, 0, 0, 0,
6244 0, 0, 0, 0, 0, 0, 0, 0,
6245 0, 0, 0, 0, 0, 0, 0, 0,
6246 0, 0, 0, 0, 0, 0, 0, 0,
6247 0, 0, 0, 0, 0, 0, 0, 0,
6248 0, 0, 0, 0, 0, 0, 0, 0,
6249 0, 0, 0, 0, 0, 1986, 1991, 1996,
6250 2001, 0, 0, 0, 0, 0, 0, 0,
6251 0, 0, 0, 0, 0, 0, 0, 0,
6252 0, 0, 0, 0, 0, 0, 0, 0,
6253 0, 0, 0, 0, 0, 0, 0, 0,
6254 0, 0, 0, 0, 0, 0, 0, 0,
6255 0, 0, 0, 0, 0, 0, 0, 0,
6256 0, 0, 0, 0, 0, 0, 0, 0,
6257 0, 0, 0, 0, 0, 0, 0, 0,
6258 0, 0, 0, 0, 0, 0, 0, 0,
6259 2006, 0, 2011, 0, 0, 0, 0, 0,
6260 0, 0, 0, 0, 0, 0, 0, 0,
6261 0, 0, 0, 2016, 0, 0, 0, 0,
6262 0, 0, 0, 0, 0, 0, 0, 0,
6263 0, 0, 0, 0, 0, 0, 0, 0,
6264 0, 0, 0, 0, 0, 0, 0, 0,
6265 0, 0, 0, 0, 0, 0, 0, 0,
6266 0, 0, 0, 0, 0, 0, 0, 0,
6267
6268 0, 0, 0, 0, 0, 0, 0, 0,
6269 0, 0, 0, 0, 0, 0, 0, 0,
6270 0, 0, 0, 0, 0, 0, 0, 0,
6271 0, 0, 0, 0, 0, 0, 0, 0,
6272 0, 0, 0, 0, 0, 0, 0, 0,
6273 0, 0, 0, 0, 0, 0, 0, 0,
6274 0, 0, 0, 0, 0, 0, 0, 0,
6275 0, 0, 0, 0, 0, 0, 0, 0,
6276 0, 0, 0, 0, 0, 0, 0, 0,
6277 0, 0, 0, 0, 0, 0, 0, 0,
6278 0, 0, 0, 0, 0, 0, 0, 0,
6279 0, 0, 0, 0, 0, 0, 0, 0,
6280 0, 0, 0, 0, 0, 0, 0, 0,
6281 0, 0, 0, 0, 0, 0, 0, 0,
6282 0, 0, 0, 0, 0, 0, 0, 0,
6283 0, 0, 0, 0, 0, 0, 0, 0,
6284 0, 0, 0, 0, 0, 0, 0, 0,
6285 0, 0, 0, 0, 0, 0, 0, 0,
6286 0, 0, 0, 0, 0, 0, 0, 0,
6287 0, 0, 0, 0, 0, 0, 0, 0,
6288 0, 0, 0, 0, 0, 0, 0, 0,
6289 0, 0, 0, 0, 0, 0, 0, 0,
6290 0, 0, 0, 0, 0, 0, 0, 0,
6291 0, 0, 0, 0, 0, 0, 0, 0,
6292 0, 0, 0, 0, 0, 0, 0, 0,
6293 0, 0, 0, 0, 0, 0, 0, 0,
6294 0, 0, 0, 0, 0, 0, 0, 0,
6295 0, 0, 0, 0, 0, 0, 0, 0,
6296 0, 0, 0, 0, 0, 0, 0, 0,
6297 0, 0, 0, 0, 0, 0, 0, 0,
6298 0, 0, 0, 0, 0, 0, 0, 0,
6299 0, 0, 0, 0, 0, 0, 0, 0,
6300
6301 0, 0, 0, 0, 0, 0, 0, 0,
6302 0, 0, 0, 0, 0, 0, 0, 0,
6303 0, 0, 0, 0, 0, 0, 0, 0,
6304 0, 0, 0, 0, 0, 0, 0, 0,
6305 0, 0, 0, 0, 0, 0, 0, 0,
6306 0, 2021, 0, 0, 0, 0, 0, 0,
6307 0, 2026, 0, 0, 2031, 0, 0, 0,
6308 0, 0, 0, 0, 0, 0, 0, 0,
6309 0, 0, 0, 0, 0, 0, 0, 0,
6310 0, 0, 0, 0, 0, 0, 0, 0,
6311 0, 0, 0, 0, 0, 0, 0, 0,
6312 2036, 2041, 2046, 2051, 2056, 2061, 2066, 2071,
6313 0, 0, 0, 0, 0, 0, 0, 0,
6314 0, 0, 0, 0, 0, 0, 0, 0,
6315 0, 0, 0, 0, 0, 0, 0, 0,
6316 0, 0, 0, 0, 0, 0, 0, 0,
6317 0, 0, 0, 0, 0, 0, 0, 0,
6318 0, 0, 0, 0, 0, 0, 0, 0,
6319 0, 0, 0, 0, 0, 0, 0, 0,
6320 0, 0, 0, 0, 0, 0, 0, 0,
6321 0, 0, 0, 0, 0, 0, 0, 0,
6322 0, 0, 0, 0, 0, 0, 0, 0,
6323 0, 0, 0, 0, 0, 0, 0, 0,
6324 0, 0, 0, 0, 0, 0, 0, 0,
6325 0, 0, 0, 0, 0, 0, 0, 0,
6326 0, 0, 0, 2076, 2081, 0, 0, 0,
6327 0, 0, 0, 0, 0, 0, 0, 0,
6328 0, 0, 0, 0, 2086, 2091, 0, 2096,
6329 0, 0, 0, 0, 0, 0, 0, 0,
6330 0, 0, 0, 0, 0, 0, 0, 0,
6331 0, 0, 0, 0, 0, 0, 0, 0,
6332 0, 0, 0, 0, 0, 0, 0, 0,
6333
6334 0, 0, 0, 0, 0, 0, 0, 0,
6335 0, 0, 0, 0, 0, 0, 0, 0,
6336 0, 0, 0, 0, 0, 0, 0, 0,
6337 0, 0, 0, 0, 0, 0, 0, 0,
6338 0, 0, 0, 0, 0, 0, 0, 0,
6339 0, 0, 0, 0, 0, 0, 0, 0,
6340 0, 0, 0, 2101, 0, 0, 2106, 0,
6341 0, 0, 0, 0, 0, 0, 0, 0,
6342 0, 0, 0, 0, 0, 0, 0, 0,
6343 0, 0, 0, 0, 0, 0, 0, 0,
6344 0, 0, 0, 0, 0, 0, 0, 0,
6345 0, 2111, 2116, 2121, 0, 0, 2126, 0,
6346 0, 0, 0, 0, 0, 0, 0, 0,
6347 0, 0, 0, 0, 0, 0, 0, 0,
6348 0, 0, 0, 0, 0, 0, 0, 0,
6349 0, 0, 0, 0, 0, 0, 0, 0,
6350 0, 0, 0, 0, 0, 0, 0, 0,
6351 0, 0, 0, 0, 0, 0, 0, 0,
6352 0, 0, 0, 0, 0, 0, 0, 0,
6353 0, 0, 0, 0, 0, 0, 0, 0,
6354 0, 0, 0, 0, 0, 0, 0, 0,
6355 0, 0, 0, 0, 0, 0, 0, 0,
6356 0, 0, 0, 0, 0, 0, 0, 0,
6357 0, 0, 0, 0, 0, 0, 0, 0,
6358 0, 0, 0, 0, 0, 0, 0, 0,
6359 0, 0, 0, 0, 0, 0, 0, 0,
6360 0, 0, 0, 0, 0, 0, 0, 0,
6361 0, 0, 0, 0, 0, 0, 0, 0,
6362 0, 0, 0, 0, 0, 0, 0, 0,
6363 0, 0, 0, 0, 0, 0, 0, 0,
6364 0, 0, 0, 0, 0, 0, 0, 0,
6365 0, 0, 0, 0, 0, 0, 0, 0,
6366
6367 0, 0, 0, 0, 0, 0, 0, 0,
6368 0, 0, 0, 0, 0, 0, 0, 0,
6369 0, 0, 0, 0, 0, 0, 0, 0,
6370 0, 0, 0, 0, 0, 0, 0, 0,
6371 0, 0, 0, 0, 0, 0, 0, 0,
6372 0, 0, 0, 0, 0, 0, 0, 0,
6373 0, 0, 0, 0, 0, 0, 0, 0,
6374 0, 0, 0, 0, 0, 0, 0, 0,
6375 0, 0, 0, 0, 0, 0, 0, 0,
6376 2131, 0, 0, 2136, 2141, 0, 0, 0,
6377 0, 0, 0, 0, 0, 0, 0, 0,
6378 0, 0, 0, 0, 2146, 2151, 0, 0,
6379 0, 0, 0, 0, 0, 0, 0, 0,
6380 0, 0, 0, 0, 0, 0, 0, 0,
6381 0, 0, 0, 0, 0, 0, 0, 0,
6382 0, 0, 0, 0, 0, 0, 0, 0,
6383 0, 0, 0, 0, 0, 0, 0, 0,
6384 0, 0, 0, 0, 0, 0, 0, 0,
6385 0, 0, 0, 0, 2156, 0, 0, 0,
6386 0, 0, 0, 0, 0, 0, 0, 0,
6387 0, 0, 0, 0, 0, 0, 0, 0,
6388 0, 0, 0, 0, 0, 0, 0, 0,
6389 0, 0, 0, 0, 0, 0, 0, 0,
6390 0, 0, 0, 0, 0, 0, 0, 0,
6391 0, 0, 0, 0, 0, 0, 0, 0,
6392 0, 0, 2161, 2166, 2171, 0, 0, 0,
6393 0, 0, 0, 0, 0, 0, 0, 0,
6394 0, 0, 0, 0, 0, 0, 0, 0,
6395 0, 0, 0, 0, 0, 0, 0, 0,
6396 0, 0, 0, 0, 0, 0, 0, 0,
6397 0, 0, 0, 0, 0, 0, 0, 0,
6398 0, 0, 0, 0, 0, 0, 0, 0,
6399
6400 0, 0, 0, 0, 0, 0, 0, 0,
6401 0, 0, 0, 0, 0, 0, 0, 0,
6402 0, 0, 0, 0, 0, 0, 0, 0,
6403 0, 0, 0, 0, 0, 0, 0, 0,
6404 0, 0, 0, 0, 0, 0, 0, 0,
6405 0, 0, 0, 0, 0, 0, 0, 0,
6406 0, 0, 0, 0, 0, 0, 0, 0,
6407 0, 0, 0, 0, 0, 0, 0, 0,
6408 0, 0, 0, 0, 0, 0, 0, 0,
6409 2176, 0, 0, 0, 0, 0, 0, 0,
6410 0, 0, 0, 0, 0, 0, 0, 0,
6411 0, 0, 0, 0, 0, 0, 0, 0,
6412 0, 0, 0, 0, 0, 0, 0, 0,
6413 0, 0, 0, 0, 0, 0, 0, 0,
6414 0, 0, 0, 0, 0, 0, 0, 0,
6415 0, 0, 0, 0, 0, 0, 0, 0,
6416 0, 0, 0, 0, 0, 0, 0, 0,
6417 0, 0, 0, 0, 0, 0, 0, 0,
6418 0, 0, 0, 0, 0, 0, 0, 0,
6419 0, 0, 0, 0, 0, 0, 0, 0,
6420 0, 0, 0, 0, 0, 0, 0, 0,
6421 0, 0, 0, 0, 0, 0, 0, 0,
6422 0, 0, 0, 0, 0, 0, 0, 0,
6423 0, 0, 0, 0, 0, 0, 0, 0,
6424 2181, 0, 0, 0, 0, 0, 0, 2186,
6425 2191, 0, 2196, 2201, 0, 0, 0, 0,
6426 0, 0, 0, 0, 0, 0, 0, 0,
6427 0, 0, 0, 0, 0, 0, 0, 0,
6428 0, 0, 0, 0, 0, 0, 0, 0,
6429 0, 0, 0, 0, 0, 0, 0, 0,
6430 0, 0, 0, 0, 0, 0, 0, 0,
6431 0, 0, 0, 0, 0, 0, 0, 0,
6432
6433 0, 0, 0, 0, 0, 0, 0, 0,
6434 0, 0, 0, 0, 0, 0, 0, 0,
6435 0, 0, 0, 0, 0, 0, 0, 0,
6436 0, 0, 0, 0, 0, 0, 0, 0,
6437 0, 0, 0, 0, 0, 0, 0, 0,
6438 0, 0, 0, 0, 0, 0, 0, 0,
6439 0, 0, 0, 0, 0, 0, 0, 0,
6440 0, 0, 0, 0, 0, 0, 0, 0,
6441 0, 0, 0, 0, 0, 0, 0, 0,
6442 0, 0, 2206, 2211, 2216, 0, 0, 0,
6443 0, 0, 0, 0, 0, 0, 0, 0,
6444 0, 0, 0, 0, 0, 0, 0, 0,
6445 0, 0, 0, 0, 0, 0, 0, 0,
6446 0, 0, 0, 0, 0, 0, 0, 0,
6447 0, 0, 0, 0, 0, 0, 0, 0,
6448 0, 0, 0, 0, 0, 0, 0, 0,
6449 0, 0, 0, 0, 0, 0, 0, 0,
6450 0, 0, 0, 0, 0, 0, 0, 0,
6451 0, 0, 0, 0, 0, 0, 0, 0,
6452 0, 0, 0, 0, 0, 0, 0, 0,
6453 0, 0, 0, 0, 0, 0, 0, 0,
6454 0, 0, 0, 0, 0, 0, 0, 0,
6455 0, 0, 0, 0, 0, 0, 0, 0,
6456 0, 0, 0, 0, 0, 0, 0, 0,
6457 0, 0, 0, 0, 0, 0, 0, 0,
6458 0, 0, 0, 0, 0, 0, 0, 0,
6459 0, 0, 0, 0, 0, 0, 0, 0,
6460 0, 0, 2221, 0, 2226, 2231, 2236, 0,
6461 0, 0, 0, 0, 0, 0, 0, 0,
6462 0, 0, 0, 0, 0, 0, 0, 0,
6463 0, 0, 0, 0, 0, 0, 0, 0,
6464 0, 0, 0, 0, 0, 0, 0, 0,
6465
6466 0, 0, 0, 0, 0, 0, 0, 0,
6467 0, 0, 0, 0, 0, 0, 0, 0,
6468 0, 0, 0, 0, 0, 0, 0, 0,
6469 0, 0, 0, 0, 0, 0, 0, 0,
6470 0, 0, 0, 0, 0, 0, 0, 0,
6471 0, 0, 0, 0, 0, 0, 0, 0,
6472 0, 0, 0, 2241, 0, 0, 0, 0,
6473 0, 0, 0, 0, 0, 0, 0, 0,
6474 0, 0, 0, 0, 0, 0, 0, 0,
6475 0, 0, 0, 0, 0, 0, 0, 0,
6476 0, 0, 0, 0, 0, 0, 0, 0,
6477 0, 0, 0, 0, 0, 0, 0, 0,
6478 0, 0, 0, 0, 0, 0, 0, 0,
6479 0, 0, 0, 0, 0, 0, 0, 0,
6480 0, 0, 0, 0, 0, 0, 0, 0,
6481 0, 0, 0, 0, 0, 0, 0, 0,
6482 0, 0, 0, 0, 0, 0, 0, 0,
6483 0, 0, 0, 0, 0, 0, 0, 0,
6484 0, 0, 0, 0, 0, 0, 0, 0,
6485 0, 0, 0, 0, 0, 0, 0, 0,
6486 0, 0, 0, 0, 0, 0, 0, 0,
6487 0, 0, 0, 0, 0, 0, 0, 0,
6488 0, 0, 0, 2246, 0, 0, 0, 0,
6489 0, 0, 0, 0, 0, 0, 0, 0,
6490 0, 0, 0, 0, 0, 0, 0, 0,
6491 0, 0, 0, 0, 0, 0, 0, 0,
6492 0, 0, 0, 0, 0, 0, 0, 0,
6493 0, 0, 0, 0, 2251, 2256, 0, 0,
6494 0, 0, 0, 0, 0, 0, 0, 0,
6495 0, 0, 0, 0, 0, 0, 0, 0,
6496 0, 0, 0, 0, 0, 0, 0, 0,
6497 0, 0, 0, 0, 0, 0, 0, 0,
6498
6499 0, 0, 0, 0, 0, 0, 0, 0,
6500 0, 0, 0, 0, 2261, 0, 0, 0,
6501 0, 0, 0, 0, 0, 0, 0, 0,
6502 0, 0, 0, 0, 0, 0, 0, 0,
6503 0, 0, 0, 0, 0, 0, 0, 0,
6504 0, 0, 0, 0, 0, 0, 0, 0,
6505 0, 0, 0, 0, 0, 0, 0, 0,
6506 0, 0, 0, 0, 0, 0, 0, 0,
6507 0, 0, 0, 2265, 0, 0, 0, 0,
6508 0, 0, 0, 0, 0, 2270, 0, 0,
6509 0, 0, 2275, 0, 0, 0, 0, 2280,
6510 0, 0, 0, 0, 2285, 0, 0, 0,
6511 0, 0, 0, 0, 0, 0, 0, 0,
6512 0, 2290, 0, 0, 0, 0, 0, 0,
6513 0, 0, 0, 2295, 0, 2300, 2305, 2310,
6514 2315, 2320, 0, 0, 0, 0, 0, 0,
6515 0, 2325, 0, 0, 0, 0, 0, 0,
6516 0, 0, 0, 0, 0, 0, 0, 0,
6517 0, 0, 0, 2330, 0, 0, 0, 0,
6518 0, 0, 0, 0, 0, 2335, 0, 0,
6519 0, 0, 2340, 0, 0, 0, 0, 2345,
6520 0, 0, 0, 0, 2350, 0, 0, 0,
6521 0, 0, 0, 0, 0, 0, 0, 0,
6522 0, 2355, 0, 0, 0, 0, 0, 0,
6523 0, 0, 0, 0, 0, 0, 0, 0,
6524 0, 0, 0, 0, 0, 0, 0, 0,
6525 0, 0, 0, 0, 0, 0, 0, 0,
6526 0, 0, 0, 0, 0, 0, 0, 0,
6527 0, 0, 0, 0, 0, 0, 0, 0,
6528 0, 0, 0, 0, 0, 0, 0, 0,
6529 0, 0, 0, 0, 0, 0, 0, 0,
6530 0, 0, 0, 0, 0, 0, 0, 0,
6531
6532 0, 0, 0, 0, 0, 0, 0, 0,
6533 0, 0, 0, 0, 0, 0, 0, 0,
6534 0, 0, 0, 0, 0, 0, 0, 0,
6535 0, 0, 0, 0, 0, 0, 0, 0,
6536 0, 0, 0, 0, 0, 0, 2360, 0,
6537 0, 0, 0, 0, 0, 0, 0, 0,
6538 0, 0, 0, 0, 0, 0, 0, 0,
6539 0, 0, 0, 0, 0, 0, 0, 0,
6540 0, 0, 0, 0, 0, 0, 0, 0,
6541 0, 0, 0, 0, 0, 0, 0, 0,
6542 0, 0, 0, 0, 0, 0, 0, 0,
6543 0, 0, 0, 0, 0, 0, 0, 0,
6544 0, 0, 0, 0, 0, 0, 0, 0,
6545 0, 0, 0, 0, 0, 0, 0, 0,
6546 0, 0, 0, 0, 0, 0, 0, 0,
6547 0, 0, 0, 0, 0, 0, 0, 0,
6548 0, 0, 0, 0, 0, 0, 0, 0,
6549 0, 0, 0, 0, 0, 0, 0, 0,
6550 0, 0, 0, 0, 0, 0, 0, 0,
6551 0, 0, 0, 0, 0, 0, 0, 0,
6552 0, 0, 0, 0, 0, 0, 0, 0,
6553 0, 0, 0, 0, 0, 0, 0, 0,
6554 0, 0, 0, 0, 0, 0, 0, 0,
6555 0, 0, 0, 0, 0, 0, 0, 0,
6556 0, 0, 0, 0, 0, 0, 0, 0,
6557 0, 0, 0, 0, 0, 0, 0, 0,
6558 0, 0, 0, 0, 0, 0, 0, 0,
6559 0, 0, 0, 0, 0, 0, 0, 0,
6560 0, 0, 0, 0, 0, 0, 0, 0,
6561 0, 0, 0, 0, 0, 0, 0, 0,
6562 0, 0, 0, 0, 0, 0, 0, 0,
6563 0, 0, 0, 0, 0, 0, 0, 0,
6564
6565 2365, 2370, 2375, 2380, 2385, 2390, 2395, 2400,
6566 2405, 2410, 2415, 2420, 2425, 2430, 2435, 2440,
6567 2445, 2450, 2455, 2460, 2465, 2470, 2475, 2480,
6568 2485, 2490, 2495, 2500, 2505, 2510, 2515, 2520,
6569 2525, 2530, 2535, 2540, 2545, 2550, 2555, 2560,
6570 2565, 2570, 2575, 2580, 2585, 2590, 2595, 2600,
6571 2605, 2610, 2615, 2620, 2625, 2630, 2635, 2640,
6572 2645, 2650, 2655, 2660, 2665, 2670, 2675, 2680,
6573 2685, 2690, 2695, 2700, 2705, 2710, 2715, 2720,
6574 2725, 2730, 2735, 2740, 2745, 2750, 2755, 2760,
6575 2765, 2770, 2775, 2780, 2785, 2790, 2795, 2800,
6576 2805, 2810, 2815, 2820, 2825, 2830, 2835, 2840,
6577 2845, 2850, 2855, 2860, 2865, 2870, 2875, 2880,
6578 2885, 2890, 2895, 2900, 2905, 2910, 2915, 2920,
6579 2925, 2930, 2935, 2940, 2945, 2950, 2955, 2960,
6580 2965, 2970, 2975, 2980, 2985, 2990, 2995, 3000,
6581 3005, 3010, 3015, 3020, 3025, 3030, 3035, 3040,
6582 3045, 3050, 3055, 3060, 3065, 3070, 3075, 3080,
6583 3085, 3090, 3095, 3100, 3105, 3110, 3115, 3120,
6584 3125, 3130, 3135, 3140, 0, 0, 0, 0,
6585 3145, 3150, 3155, 3160, 3165, 3170, 3175, 3180,
6586 3185, 3190, 3195, 3200, 3205, 3210, 3215, 3220,
6587 3225, 3230, 3235, 3240, 3245, 3250, 3255, 3260,
6588 3265, 3270, 3275, 3280, 3285, 3290, 3295, 3300,
6589 3305, 3310, 3315, 3320, 3325, 3330, 3335, 3340,
6590 3345, 3350, 3355, 3360, 3365, 3370, 3375, 3380,
6591 3385, 3390, 3395, 3400, 3405, 3410, 3415, 3420,
6592 3425, 3430, 3435, 3440, 3445, 3450, 3455, 3460,
6593 3465, 3470, 3475, 3480, 3485, 3490, 3495, 3500,
6594 3505, 3510, 3515, 3520, 3525, 3530, 3535, 3540,
6595 3545, 3550, 3555, 3560, 3565, 3570, 3575, 3580,
6596 3585, 3590, 0, 0, 0, 0, 0, 0,
6597
6598 3595, 3600, 3605, 3610, 3615, 3620, 3625, 3630,
6599 3635, 3640, 3645, 3650, 3655, 3660, 3665, 3670,
6600 3675, 3680, 3685, 3690, 3695, 3700, 0, 0,
6601 3705, 3710, 3715, 3720, 3725, 3730, 0, 0,
6602 3735, 3740, 3745, 3750, 3755, 3760, 3765, 3770,
6603 3775, 3780, 3785, 3790, 3795, 3800, 3805, 3810,
6604 3815, 3820, 3825, 3830, 3835, 3840, 3845, 3850,
6605 3855, 3860, 3865, 3870, 3875, 3880, 3885, 3890,
6606 3895, 3900, 3905, 3910, 3915, 3920, 0, 0,
6607 3925, 3930, 3935, 3940, 3945, 3950, 0, 0,
6608 3955, 3960, 3965, 3970, 3975, 3980, 3985, 3990,
6609 0, 3995, 0, 4000, 0, 4005, 0, 4010,
6610 4015, 4020, 4025, 4030, 4035, 4040, 4045, 4050,
6611 4055, 4060, 4065, 4070, 4075, 4080, 4085, 4090,
6612 4095, 4100, 4104, 4109, 4113, 4118, 4122, 4127,
6613 4131, 4136, 4140, 4145, 4149, 4154, 0, 0,
6614 4158, 4163, 4168, 4173, 4178, 4183, 4188, 4193,
6615 4198, 4203, 4208, 4213, 4218, 4223, 4228, 4233,
6616 4238, 4243, 4248, 4253, 4258, 4263, 4268, 4273,
6617 4278, 4283, 4288, 4293, 4298, 4303, 4308, 4313,
6618 4318, 4323, 4328, 4333, 4338, 4343, 4348, 4353,
6619 4358, 4363, 4368, 4373, 4378, 4383, 4388, 4393,
6620 4398, 4403, 4408, 4413, 4418, 0, 4423, 4428,
6621 4433, 4438, 4443, 4448, 4452, 4457, 4462, 4466,
6622 4471, 4476, 4481, 4486, 4491, 0, 4496, 4501,
6623 4506, 4511, 4515, 4520, 4524, 4529, 4534, 4539,
6624 4544, 4549, 4554, 4559, 0, 0, 4563, 4568,
6625 4573, 4578, 4583, 4588, 0, 4592, 4597, 4602,
6626 4607, 4612, 4617, 4622, 4626, 4631, 4636, 4641,
6627 4646, 4651, 4656, 4661, 4665, 4670, 4675, 4679,
6628 0, 0, 4683, 4688, 4693, 0, 4698, 4703,
6629 4708, 4713, 4717, 4722, 4726, 4731, 4735, 0,
6630
6631 4740, 4744, 4748, 4752, 4756, 4760, 4764, 4768,
6632 4772, 4776, 4780, 0, 0, 0, 0, 0,
6633 0, 4784, 0, 0, 0, 0, 0, 4788,
6634 0, 0, 0, 0, 0, 0, 0, 0,
6635 0, 0, 0, 0, 4793, 4797, 4802, 0,
6636 0, 0, 0, 0, 0, 0, 0, 4808,
6637 0, 0, 0, 4812, 4817, 0, 4823, 4828,
6638 0, 0, 0, 0, 4834, 0, 4839, 0,
6639 0, 0, 0, 0, 0, 0, 0, 4844,
6640 4849, 4854, 0, 0, 0, 0, 0, 0,
6641 0, 0, 0, 0, 0, 0, 0, 4859,
6642 0, 0, 0, 0, 0, 0, 0, 4866,
6643 0, 0, 0, 0, 0, 0, 0, 0,
6644 0, 0, 0, 0, 0, 0, 0, 0,
6645 4870, 4874, 0, 0, 4878, 4882, 4886, 4890,
6646 4894, 4898, 4902, 4906, 4910, 4914, 4918, 4922,
6647 4926, 4930, 4934, 4938, 4942, 4946, 4950, 4954,
6648 4958, 4962, 4966, 4970, 4974, 4978, 4982, 0,
6649 0, 0, 0, 0, 0, 0, 0, 0,
6650 0, 0, 0, 0, 0, 0, 0, 0,
6651 0, 0, 0, 0, 0, 0, 0, 0,
6652 4986, 0, 0, 0, 0, 0, 0, 0,
6653 0, 0, 0, 0, 0, 0, 0, 0,
6654 0, 0, 0, 0, 0, 0, 0, 0,
6655 0, 0, 0, 0, 0, 0, 0, 0,
6656 0, 0, 0, 0, 0, 0, 0, 0,
6657 0, 0, 0, 0, 0, 0, 0, 0,
6658 0, 0, 0, 0, 0, 0, 0, 0,
6659 0, 0, 0, 0, 0, 0, 0, 0,
6660 0, 0, 0, 0, 0, 0, 0, 0,
6661 0, 0, 0, 0, 0, 0, 0, 0,
6662 0, 0, 0, 0, 0, 0, 0, 0,
6663
6664 4991, 4997, 5003, 5007, 0, 5012, 5018, 5024,
6665 0, 5028, 5033, 5037, 5041, 5045, 5049, 5053,
6666 5057, 5061, 5065, 5069, 0, 5073, 5077, 0,
6667 0, 5082, 5086, 5090, 5094, 5098, 0, 0,
6668 5102, 5107, 5113, 0, 5118, 0, 5122, 0,
6669 5126, 0, 5130, 5134, 5138, 5142, 0, 5146,
6670 5150, 5154, 0, 5158, 5162, 5166, 5170, 5174,
6671 5178, 5182, 0, 0, 0, 5186, 5190, 5194,
6672 5198, 0, 0, 0, 0, 5202, 5206, 5210,
6673 5214, 5218, 0, 0, 0, 0, 0, 0,
6674 0, 0, 0, 5222, 5228, 5234, 5240, 5246,
6675 5252, 5258, 5264, 5270, 5276, 5282, 5288, 5294,
6676 5299, 5303, 5308, 5314, 5319, 5323, 5328, 5334,
6677 5341, 5346, 5350, 5355, 5361, 5365, 5369, 5373,
6678 5377, 5381, 5386, 5392, 5397, 5401, 5406, 5412,
6679 5419, 5424, 5428, 5433, 5439, 5443, 5447, 5451,
6680 0, 0, 0, 0, 0, 0, 0, 0,
6681 0, 0, 0, 0, 0, 0, 0, 0,
6682 0, 0, 0, 0, 0, 0, 0, 0,
6683 0, 0, 5455, 5460, 0, 0, 0, 0,
6684 0, 0, 0, 0, 0, 0, 0, 0,
6685 0, 0, 0, 0, 0, 0, 5465, 0,
6686 0, 0, 0, 0, 0, 0, 0, 0,
6687 0, 0, 0, 0, 0, 0, 0, 0,
6688 0, 0, 0, 0, 0, 0, 0, 0,
6689 0, 0, 0, 0, 0, 5470, 5475, 5480,
6690 0, 0, 0, 0, 0, 0, 0, 0,
6691 0, 0, 0, 0, 0, 0, 0, 0,
6692 0, 0, 0, 0, 0, 0, 0, 0,
6693 0, 0, 0, 0, 0, 0, 0, 0,
6694 0, 0, 0, 0, 0, 0, 0, 0,
6695 0, 0, 0, 0, 0, 0, 0, 0,
6696
6697 0, 0, 0, 0, 5485, 0, 0, 0,
6698 0, 5490, 0, 0, 5495, 0, 0, 0,
6699 0, 0, 0, 0, 0, 0, 0, 0,
6700 0, 0, 0, 0, 0, 0, 0, 0,
6701 0, 0, 0, 0, 5500, 0, 5505, 0,
6702 0, 0, 0, 0, 5510, 5515, 0, 5521,
6703 5526, 0, 0, 0, 0, 0, 0, 0,
6704 0, 0, 0, 0, 0, 0, 0, 0,
6705 0, 5532, 0, 0, 5537, 0, 0, 5542,
6706 0, 5547, 0, 0, 0, 0, 0, 0,
6707 0, 0, 0, 0, 0, 0, 0, 0,
6708 0, 0, 0, 0, 0, 0, 0, 0,
6709 5552, 0, 5557, 0, 0, 0, 0, 0,
6710 0, 0, 0, 0, 0, 5562, 5567, 5572,
6711 5577, 5582, 0, 0, 5587, 5592, 0, 0,
6712 5597, 5602, 0, 0, 0, 0, 0, 0,
6713 5607, 5612, 0, 0, 5617, 5622, 0, 0,
6714 5627, 5632, 0, 0, 0, 0, 0, 0,
6715 0, 0, 0, 0, 0, 0, 0, 0,
6716 0, 0, 0, 0, 0, 0, 0, 0,
6717 0, 0, 0, 0, 0, 0, 0, 0,
6718 0, 0, 0, 0, 5637, 5642, 5647, 5652,
6719 0, 0, 0, 0, 0, 0, 0, 0,
6720 0, 0, 0, 0, 0, 0, 0, 0,
6721 0, 0, 0, 0, 0, 0, 0, 0,
6722 0, 0, 0, 0, 0, 0, 0, 0,
6723 0, 0, 0, 0, 0, 0, 0, 0,
6724 0, 0, 0, 0, 0, 0, 0, 0,
6725 5657, 5662, 5667, 5672, 0, 0, 0, 0,
6726 0, 0, 5677, 5682, 5687, 5692, 0, 0,
6727 0, 0, 0, 0, 0, 0, 0, 0,
6728 0, 0, 0, 0, 0, 0, 0, 0,
6729
6730 0, 0, 0, 0, 0, 0, 0, 0,
6731 0, 0, 0, 0, 0, 0, 0, 0,
6732 0, 0, 0, 0, 0, 0, 0, 0,
6733 0, 0, 0, 0, 0, 0, 0, 0,
6734 0, 0, 0, 0, 0, 0, 0, 0,
6735 0, 5697, 5701, 0, 0, 0, 0, 0,
6736 0, 0, 0, 0, 0, 0, 0, 0,
6737 0, 0, 0, 0, 0, 0, 0, 0,
6738 0, 0, 0, 0, 0, 0, 0, 0,
6739 0, 0, 0, 0, 0, 0, 0, 0,
6740 0, 0, 0, 0, 0, 0, 0, 0,
6741 0, 0, 0, 0, 0, 0, 0, 0,
6742 0, 0, 0, 0, 0, 0, 0, 0,
6743 0, 0, 0, 0, 0, 0, 0, 0,
6744 0, 0, 0, 0, 0, 0, 0, 0,
6745 0, 0, 0, 0, 0, 0, 0, 0,
6746 0, 0, 0, 0, 0, 0, 0, 0,
6747 0, 0, 0, 0, 0, 0, 0, 0,
6748 0, 0, 0, 0, 0, 0, 0, 0,
6749 0, 0, 0, 0, 0, 0, 0, 0,
6750 0, 0, 0, 0, 0, 0, 0, 0,
6751 0, 0, 0, 0, 0, 0, 0, 0,
6752 0, 0, 0, 0, 0, 0, 0, 0,
6753 0, 0, 0, 0, 0, 0, 0, 0,
6754 0, 0, 0, 0, 0, 0, 0, 0,
6755 0, 0, 0, 0, 0, 0, 0, 0,
6756 0, 0, 0, 0, 0, 0, 0, 0,
6757 0, 0, 0, 0, 0, 0, 0, 0,
6758 0, 0, 0, 0, 0, 0, 0, 0,
6759 0, 0, 0, 0, 0, 0, 0, 0,
6760 0, 0, 0, 0, 0, 0, 0, 0,
6761 0, 0, 0, 0, 0, 0, 0, 0,
6762
6763 0, 0, 0, 0, 0, 0, 0, 0,
6764 0, 0, 0, 0, 0, 0, 0, 0,
6765 0, 0, 0, 0, 0, 0, 0, 0,
6766 0, 0, 0, 0, 0, 0, 0, 0,
6767 0, 0, 0, 0, 0, 0, 0, 0,
6768 0, 0, 0, 0, 0, 0, 0, 0,
6769 0, 0, 0, 0, 0, 0, 0, 0,
6770 0, 0, 0, 0, 0, 0, 0, 0,
6771 0, 0, 0, 0, 0, 0, 0, 0,
6772 0, 0, 0, 0, 0, 0, 0, 0,
6773 0, 0, 0, 0, 0, 0, 0, 0,
6774 0, 0, 0, 0, 0, 0, 0, 0,
6775 5705, 5709, 5713, 5717, 5721, 5725, 5729, 5733,
6776 5737, 5741, 5746, 5751, 5756, 5761, 5766, 5771,
6777 5776, 5781, 5786, 5791, 5796, 5802, 5808, 5814,
6778 5820, 5826, 5832, 5838, 5844, 5850, 5857, 5864,
6779 5871, 5878, 5885, 5892, 5899, 5906, 5913, 5920,
6780 5927, 5932, 5937, 5942, 5947, 5952, 5957, 5962,
6781 5967, 5972, 5978, 5984, 5990, 5996, 6002, 6008,
6782 6014, 6020, 6026, 6032, 6038, 6044, 6050, 6056,
6783 6062, 6068, 6074, 6080, 6086, 6092, 6098, 6104,
6784 6110, 6116, 6122, 6128, 6134, 6140, 6146, 6152,
6785 6158, 6164, 6170, 6176, 6182, 6188, 6194, 6198,
6786 6202, 6206, 6210, 6214, 6218, 6222, 6226, 6230,
6787 6234, 6238, 6242, 6246, 6250, 6254, 6258, 6262,
6788 6266, 6270, 6274, 6278, 6282, 6286, 6290, 6294,
6789 6298, 6302, 6306, 6310, 6314, 6318, 6322, 6326,
6790 6330, 6334, 6338, 6342, 6346, 6350, 6354, 6358,
6791 6362, 6366, 6370, 6374, 6378, 6382, 6386, 6390,
6792 6394, 6398, 6402, 0, 0, 0, 0, 0,
6793 0, 0, 0, 0, 0, 0, 0, 0,
6794 0, 0, 0, 0, 0, 0, 0, 0,
6795
6796 0, 0, 0, 0, 0, 0, 0, 0,
6797 0, 0, 0, 0, 6406, 0, 0, 0,
6798 0, 0, 0, 0, 0, 0, 0, 0,
6799 0, 0, 0, 0, 0, 0, 0, 0,
6800 0, 0, 0, 0, 0, 0, 0, 0,
6801 0, 0, 0, 0, 0, 0, 0, 0,
6802 0, 0, 0, 0, 0, 0, 0, 0,
6803 0, 0, 0, 0, 0, 0, 0, 0,
6804 0, 0, 0, 0, 0, 0, 0, 0,
6805 0, 0, 0, 0, 0, 0, 0, 0,
6806 0, 0, 0, 0, 0, 0, 0, 0,
6807 0, 0, 0, 0, 0, 0, 0, 0,
6808 0, 0, 0, 0, 0, 0, 0, 0,
6809 0, 0, 0, 0, 0, 0, 0, 0,
6810 0, 0, 0, 0, 6413, 6419, 6424, 0,
6811 0, 0, 0, 0, 0, 0, 0, 0,
6812 0, 0, 0, 0, 0, 0, 0, 0,
6813 0, 0, 0, 0, 0, 0, 0, 0,
6814 0, 0, 0, 0, 0, 0, 0, 0,
6815 0, 0, 0, 0, 0, 0, 0, 0,
6816 0, 0, 0, 0, 0, 0, 0, 0,
6817 0, 0, 0, 0, 0, 0, 0, 0,
6818 0, 0, 0, 0, 0, 0, 0, 0,
6819 0, 0, 0, 0, 0, 0, 0, 0,
6820 0, 0, 0, 0, 0, 0, 0, 0,
6821 0, 0, 0, 0, 0, 0, 0, 0,
6822 0, 0, 0, 0, 0, 0, 0, 0,
6823 0, 0, 0, 0, 6430, 0, 0, 0,
6824 0, 0, 0, 0, 0, 0, 0, 0,
6825 0, 0, 0, 0, 0, 0, 0, 0,
6826 0, 0, 0, 0, 0, 0, 0, 0,
6827 0, 0, 0, 0, 0, 0, 0, 0,
6828
6829 0, 0, 0, 0, 0, 0, 0, 0,
6830 0, 0, 0, 0, 0, 0, 0, 0,
6831 0, 0, 0, 0, 0, 0, 0, 0,
6832 0, 0, 0, 0, 0, 0, 0, 0,
6833 0, 0, 0, 0, 0, 0, 0, 0,
6834 0, 0, 0, 0, 0, 0, 0, 0,
6835 0, 0, 0, 0, 0, 0, 0, 0,
6836 0, 0, 0, 0, 0, 0, 0, 0,
6837 0, 0, 0, 0, 0, 0, 0, 0,
6838 0, 0, 0, 0, 0, 0, 0, 0,
6839 0, 0, 0, 0, 0, 0, 0, 0,
6840 0, 0, 0, 0, 0, 0, 0, 0,
6841 0, 0, 0, 0, 0, 0, 0, 0,
6842 0, 0, 0, 0, 0, 0, 0, 0,
6843 0, 0, 0, 0, 0, 0, 0, 0,
6844 0, 0, 0, 0, 0, 0, 0, 0,
6845 0, 0, 0, 0, 0, 0, 0, 0,
6846 0, 0, 0, 0, 0, 0, 0, 0,
6847 0, 0, 0, 0, 0, 0, 0, 0,
6848 0, 0, 0, 0, 0, 0, 0, 6435,
6849 0, 0, 0, 0, 0, 0, 0, 0,
6850 0, 0, 0, 0, 0, 0, 0, 0,
6851 0, 0, 0, 0, 0, 0, 0, 0,
6852 0, 0, 0, 0, 0, 0, 0, 0,
6853 0, 0, 0, 0, 0, 0, 0, 0,
6854 0, 0, 0, 0, 0, 0, 0, 0,
6855 0, 0, 0, 0, 0, 0, 0, 0,
6856 0, 0, 0, 0, 0, 0, 0, 0,
6857 0, 0, 0, 0, 0, 0, 0, 0,
6858 0, 0, 0, 0, 0, 0, 0, 0,
6859 0, 0, 0, 6439, 0, 0, 0, 0,
6860 0, 0, 0, 0, 0, 0, 0, 0,
6861
6862 6443, 6447, 6451, 6455, 6459, 6463, 6467, 6471,
6863 6475, 6479, 6483, 6487, 6491, 6495, 6499, 6503,
6864 6507, 6511, 6515, 6519, 6523, 6527, 6531, 6535,
6865 6539, 6543, 6547, 6551, 6555, 6559, 6563, 6567,
6866 6571, 6575, 6579, 6583, 6587, 6591, 6595, 6599,
6867 6603, 6607, 6611, 6615, 6619, 6623, 6627, 6631,
6868 6635, 6639, 6643, 6647, 6651, 6655, 6659, 6663,
6869 6667, 6671, 6675, 6679, 6683, 6687, 6691, 6695,
6870 6699, 6703, 6707, 6711, 6715, 6719, 6723, 6727,
6871 6731, 6735, 6739, 6743, 6747, 6751, 6755, 6759,
6872 6763, 6767, 6771, 6775, 6779, 6783, 6787, 6791,
6873 6795, 6799, 6803, 6807, 6811, 6815, 6819, 6823,
6874 6827, 6831, 6835, 6839, 6843, 6847, 6851, 6855,
6875 6859, 6863, 6867, 6871, 6875, 6879, 6883, 6887,
6876 6891, 6895, 6899, 6903, 6907, 6911, 6915, 6919,
6877 6923, 6927, 6931, 6935, 6939, 6943, 6947, 6951,
6878 6955, 6959, 6963, 6967, 6971, 6975, 6979, 6983,
6879 6987, 6991, 6995, 6999, 7003, 7007, 7011, 7015,
6880 7019, 7023, 7027, 7031, 7035, 7039, 7043, 7047,
6881 7051, 7055, 7059, 7063, 7067, 7071, 7075, 7079,
6882 7083, 7087, 7091, 7095, 7099, 7103, 7107, 7111,
6883 7115, 7119, 7123, 7127, 7131, 7135, 7139, 7143,
6884 7147, 7151, 7155, 7159, 7163, 7167, 7171, 7175,
6885 7179, 7183, 7187, 7191, 7195, 7199, 7203, 7207,
6886 7211, 7215, 7219, 7223, 7227, 7231, 7235, 7239,
6887 7243, 7247, 7251, 7255, 7259, 7263, 7267, 7271,
6888 7275, 7279, 7283, 7287, 7291, 7295, 0, 0,
6889 0, 0, 0, 0, 0, 0, 0, 0,
6890 0, 0, 0, 0, 0, 0, 0, 0,
6891 0, 0, 0, 0, 0, 0, 0, 0,
6892 0, 0, 0, 0, 0, 0, 0, 0,
6893 0, 0, 0, 0, 0, 0, 0, 0,
6894
6895 7299, 0, 0, 0, 0, 0, 0, 0,
6896 0, 0, 0, 0, 0, 0, 0, 0,
6897 0, 0, 0, 0, 0, 0, 0, 0,
6898 0, 0, 0, 0, 0, 0, 0, 0,
6899 0, 0, 0, 0, 0, 0, 0, 0,
6900 0, 0, 0, 0, 0, 0, 0, 0,
6901 0, 0, 0, 0, 0, 0, 7303, 0,
6902 7307, 7311, 7315, 0, 0, 0, 0, 0,
6903 0, 0, 0, 0, 0, 0, 0, 0,
6904 0, 0, 0, 0, 7319, 0, 7324, 0,
6905 7329, 0, 7334, 0, 7339, 0, 7344, 0,
6906 7349, 0, 7354, 0, 7359, 0, 7364, 0,
6907 7369, 0, 7374, 0, 0, 7379, 0, 7384,
6908 0, 7389, 0, 0, 0, 0, 0, 0,
6909 7394, 7399, 0, 7404, 7409, 0, 7414, 7419,
6910 0, 7424, 7429, 0, 7434, 7439, 0, 0,
6911 0, 0, 0, 0, 0, 0, 0, 0,
6912 0, 0, 0, 0, 0, 0, 0, 0,
6913 0, 0, 0, 0, 7444, 0, 0, 0,
6914 0, 0, 0, 7449, 7454, 0, 7459, 7464,
6915 0, 0, 0, 0, 0, 0, 0, 0,
6916 0, 0, 0, 0, 7469, 0, 7474, 0,
6917 7479, 0, 7484, 0, 7489, 0, 7494, 0,
6918 7499, 0, 7504, 0, 7509, 0, 7514, 0,
6919 7519, 0, 7524, 0, 0, 7529, 0, 7534,
6920 0, 7539, 0, 0, 0, 0, 0, 0,
6921 7544, 7549, 0, 7554, 7559, 0, 7564, 7569,
6922 0, 7574, 7579, 0, 7584, 7589, 0, 0,
6923 0, 0, 0, 0, 0, 0, 0, 0,
6924 0, 0, 0, 0, 0, 0, 0, 0,
6925 0, 0, 0, 0, 7594, 0, 0, 7599,
6926 7604, 7609, 7614, 0, 0, 0, 7619, 7624,
6927
6928 0, 0, 0, 0, 0, 0, 0, 0,
6929 0, 0, 0, 0, 0, 0, 0, 0,
6930 0, 0, 0, 0, 0, 0, 0, 0,
6931 0, 0, 0, 0, 0, 0, 0, 0,
6932 0, 0, 0, 0, 0, 0, 0, 0,
6933 0, 0, 0, 0, 0, 0, 0, 0,
6934 0, 7629, 7633, 7637, 7641, 7645, 7649, 7653,
6935 7657, 7661, 7665, 7669, 7673, 7677, 7681, 7685,
6936 7689, 7693, 7697, 7701, 7705, 7709, 7713, 7717,
6937 7721, 7725, 7729, 7733, 7737, 7741, 7745, 7749,
6938 7753, 7757, 7761, 7765, 7769, 7773, 7777, 7781,
6939 7785, 7789, 7793, 7797, 7801, 7805, 7809, 7813,
6940 7817, 7821, 7825, 7829, 7833, 7837, 7841, 7845,
6941 7849, 7853, 7857, 7861, 7865, 7869, 7873, 7877,
6942 7881, 7885, 7889, 7893, 7897, 7901, 7905, 7909,
6943 7913, 7917, 7921, 7925, 7929, 7933, 7937, 7941,
6944 7945, 7949, 7953, 7957, 7961, 7965, 7969, 7973,
6945 7977, 7981, 7985, 7989, 7993, 7997, 8001, 0,
6946 0, 0, 8005, 8009, 8013, 8017, 8021, 8025,
6947 8029, 8033, 8037, 8041, 8045, 8049, 8053, 8057,
6948 0, 0, 0, 0, 0, 0, 0, 0,
6949 0, 0, 0, 0, 0, 0, 0, 0,
6950 0, 0, 0, 0, 0, 0, 0, 0,
6951 0, 0, 0, 0, 0, 0, 0, 0,
6952 0, 0, 0, 0, 0, 0, 0, 0,
6953 0, 0, 0, 0, 0, 0, 0, 0,
6954 0, 0, 0, 0, 0, 0, 0, 0,
6955 0, 0, 0, 0, 0, 0, 0, 0,
6956 0, 0, 0, 0, 0, 0, 0, 0,
6957 0, 0, 0, 0, 0, 0, 0, 0,
6958 0, 0, 0, 0, 0, 0, 0, 0,
6959 0, 0, 0, 0, 0, 0, 0, 0,
6960
6961 8061, 8067, 8073, 8079, 8085, 8091, 8097, 8103,
6962 8109, 8115, 8121, 8127, 8133, 8139, 8145, 8152,
6963 8159, 8166, 8173, 8180, 8187, 8194, 8201, 8208,
6964 8215, 8222, 8229, 8236, 8243, 0, 0, 0,
6965 8250, 8256, 8262, 8268, 8274, 8280, 8286, 8292,
6966 8298, 8304, 8310, 8316, 8322, 8328, 8334, 8340,
6967 8346, 8352, 8358, 8364, 8370, 8376, 8382, 8388,
6968 8394, 8400, 8406, 8412, 8418, 8424, 8430, 8436,
6969 8442, 8448, 8454, 8460, 0, 0, 0, 0,
6970 0, 0, 0, 0, 0, 0, 0, 0,
6971 0, 8466, 8471, 8476, 8481, 8486, 8491, 8496,
6972 8501, 8506, 8511, 8516, 8521, 8526, 8531, 8536,
6973 8541, 8545, 8549, 8553, 8557, 8561, 8565, 8569,
6974 8573, 8577, 8581, 8585, 8589, 8593, 8597, 8602,
6975 8607, 8612, 8617, 8622, 8627, 8632, 8637, 8642,
6976 8647, 8652, 8657, 8662, 0, 0, 0, 0,
6977 8667, 8671, 8675, 8679, 8683, 8687, 8691, 8695,
6978 8699, 8703, 8707, 8711, 8715, 8719, 8723, 8727,
6979 8731, 8735, 8739, 8743, 8747, 8751, 8755, 8759,
6980 8763, 8767, 8771, 8775, 8779, 8783, 8787, 8791,
6981 8795, 8799, 8803, 8807, 8811, 8815, 8819, 8823,
6982 8827, 8831, 8835, 8839, 8843, 8847, 8851, 8855,
6983 8859, 8863, 8868, 8873, 8878, 8883, 8888, 8893,
6984 8898, 8903, 8908, 8913, 8918, 8923, 8928, 8933,
6985 8938, 8943, 8948, 8953, 8958, 8963, 8968, 8973,
6986 8978, 8983, 8989, 8995, 0, 0, 0, 0,
6987 9001, 9005, 9009, 9013, 9017, 9021, 9025, 9029,
6988 9033, 9037, 9041, 9045, 9049, 9053, 9057, 9061,
6989 9065, 9069, 9073, 9077, 9081, 9085, 9089, 9093,
6990 9097, 9101, 9105, 9109, 9113, 9117, 9121, 9125,
6991 9129, 9133, 9137, 9141, 9145, 9149, 9153, 9157,
6992 9161, 9165, 9169, 9173, 9177, 9181, 9185, 0,
6993
6994 9189, 9196, 9203, 9210, 9216, 9223, 9229, 9235,
6995 9243, 9250, 9256, 9262, 9268, 9275, 9282, 9288,
6996 9294, 9299, 9305, 9312, 9319, 9324, 9332, 9341,
6997 9349, 9355, 9363, 9371, 9378, 9384, 9390, 9396,
6998 9403, 9411, 9418, 9424, 9430, 9436, 9441, 9446,
6999 9451, 9456, 9462, 9468, 9476, 9482, 9489, 9497,
7000 9503, 9508, 9513, 9521, 9528, 9536, 9542, 9550,
7001 9555, 9561, 9567, 9573, 9579, 9585, 9592, 9598,
7002 9603, 9609, 9615, 9621, 9628, 9634, 9640, 9646,
7003 9654, 9661, 9666, 9674, 9679, 9686, 9693, 9699,
7004 9705, 9711, 9718, 9723, 9729, 9736, 9741, 9749,
7005 9755, 9760, 9765, 9770, 9775, 9780, 9785, 9790,
7006 9795, 9800, 9805, 9811, 9817, 9823, 9829, 9835,
7007 9841, 9847, 9853, 9859, 9865, 9871, 9877, 9883,
7008 9889, 9895, 9901, 9906, 9911, 9917, 9922, 0,
7009 0, 0, 0, 9927, 9932, 9937, 9942, 9947,
7010 9954, 9959, 9964, 9969, 9974, 9979, 9984, 9989,
7011 9994, 10000, 10007, 10012, 10017, 10022, 10027, 10032,
7012 10037, 10042, 10048, 10054, 10060, 10066, 10071, 10076,
7013 10081, 10086, 10091, 10096, 10101, 10106, 10111, 10116,
7014 10122, 10128, 10133, 10139, 10145, 10151, 10156, 10162,
7015 10168, 10175, 10180, 10186, 10192, 10198, 10204, 10212,
7016 10221, 10226, 10231, 10236, 10241, 10246, 10251, 10256,
7017 10261, 10266, 10271, 10276, 10281, 10286, 10291, 10296,
7018 10301, 10306, 10311, 10318, 10323, 10328, 10333, 10340,
7019 10346, 10351, 10356, 10361, 10366, 10371, 10376, 10381,
7020 10386, 10391, 10396, 10402, 10407, 10412, 10418, 10424,
7021 10429, 10436, 10442, 10447, 10452, 10457, 0, 0,
7022 10462, 10467, 10472, 10477, 10482, 10487, 10492, 10497,
7023 10502, 10507, 10513, 10519, 10525, 10531, 10537, 10543,
7024 10549, 10555, 10561, 10567, 10573, 10579, 10585, 10591,
7025 10597, 10603, 10609, 10615, 10621, 10627, 10633, 0,
7026
7027 10639, 10643, 10647, 10651, 10655, 10659, 10663, 10667,
7028 10671, 10675, 10679, 10683, 10687, 10691, 10695, 10699,
7029 10703, 10707, 10711, 10715, 10719, 10723, 10727, 10731,
7030 10735, 10739, 10743, 10747, 10751, 10755, 10759, 10763,
7031 10767, 10771, 10775, 10779, 10783, 10787, 10791, 10795,
7032 10799, 10803, 10807, 10811, 10815, 10819, 10823, 10827,
7033 10831, 10835, 10839, 10843, 10847, 10851, 10855, 10859,
7034 10863, 10867, 10871, 10875, 10879, 10883, 10887, 10891,
7035 10895, 10899, 10903, 10907, 10911, 10915, 10919, 10923,
7036 10927, 10931, 10935, 10939, 10943, 10947, 10951, 10955,
7037 10959, 10963, 10967, 10971, 10975, 10979, 10983, 10987,
7038 10991, 10995, 10999, 11003, 11007, 11011, 11015, 11019,
7039 11023, 11027, 11031, 11035, 11039, 11043, 11047, 11051,
7040 11055, 11059, 11063, 11067, 11071, 11075, 11079, 11083,
7041 11087, 11091, 11095, 11099, 11103, 11107, 11111, 11115,
7042 11119, 11123, 11127, 11131, 11135, 11139, 11143, 11147,
7043 11151, 11155, 11159, 11163, 11167, 11171, 11175, 11179,
7044 11183, 11187, 11191, 11195, 11199, 11203, 11207, 11211,
7045 11215, 11219, 11223, 11227, 11231, 11235, 11239, 11243,
7046 11247, 11251, 11255, 11259, 11263, 11267, 11271, 11275,
7047 11279, 11283, 11287, 11291, 11295, 11299, 11303, 11307,
7048 11311, 11315, 11319, 11323, 11327, 11331, 11335, 11339,
7049 11343, 11347, 11351, 11355, 11359, 11363, 11367, 11371,
7050 11375, 11379, 11383, 11387, 11391, 11395, 11399, 11403,
7051 11407, 11411, 11415, 11419, 11423, 11427, 11431, 11435,
7052 11439, 11443, 11447, 11451, 11455, 11459, 11463, 11467,
7053 11471, 11475, 11479, 11483, 11487, 11491, 11495, 11499,
7054 11503, 11507, 11511, 11515, 11519, 11523, 11527, 11531,
7055 11535, 11539, 11543, 11547, 11551, 11555, 11559, 11563,
7056 11567, 11571, 11575, 11579, 11583, 11587, 11591, 11595,
7057 11599, 11603, 11607, 11611, 11615, 11619, 11623, 11627,
7058 11631, 11635, 11639, 11643, 11647, 11651, 11655, 11659,
7059
7060 11663, 11667, 11671, 11675, 11679, 11683, 11687, 11691,
7061 11695, 11699, 11703, 11707, 11711, 11715, 0, 0,
7062 11719, 0, 11723, 0, 0, 11727, 11731, 11735,
7063 11739, 11743, 11747, 11751, 11755, 11759, 11763, 0,
7064 11767, 0, 11771, 0, 0, 11775, 11779, 0,
7065 0, 0, 11783, 11787, 11791, 11795, 0, 0,
7066 11799, 11803, 11807, 11811, 11815, 11819, 11823, 11827,
7067 11831, 11835, 11839, 11843, 11847, 11851, 11855, 11859,
7068 11863, 11867, 11871, 11875, 11879, 11883, 11887, 11891,
7069 11895, 11899, 11903, 11907, 11911, 11915, 11919, 11923,
7070 11927, 11931, 11935, 11939, 11943, 11947, 11951, 11955,
7071 11959, 11963, 11967, 11971, 11975, 11979, 11983, 11987,
7072 11991, 11995, 11999, 12003, 12007, 12011, 12015, 12019,
7073 12023, 12027, 12031, 0, 0, 0, 0, 0,
7074 0, 0, 0, 0, 0, 0, 0, 0,
7075 0, 0, 0, 0, 0, 0, 0, 0,
7076 0, 0, 0, 0, 0, 0, 0, 0,
7077 0, 0, 0, 0, 0, 0, 0, 0,
7078 0, 0, 0, 0, 0, 0, 0, 0,
7079 0, 0, 0, 0, 0, 0, 0, 0,
7080 0, 0, 0, 0, 0, 0, 0, 0,
7081 0, 0, 0, 0, 0, 0, 0, 0,
7082 0, 0, 0, 0, 0, 0, 0, 0,
7083 0, 0, 0, 0, 0, 0, 0, 0,
7084 0, 0, 0, 0, 0, 0, 0, 0,
7085 0, 0, 0, 0, 0, 0, 0, 0,
7086 0, 0, 0, 0, 0, 0, 0, 0,
7087 0, 0, 0, 0, 0, 0, 0, 0,
7088 0, 0, 0, 0, 0, 0, 0, 0,
7089 0, 0, 0, 0, 0, 0, 0, 0,
7090 0, 0, 0, 0, 0, 0, 0, 0,
7091 0, 0, 0, 0, 0, 0, 0, 0,
7092
7093 12035, 12040, 12045, 12050, 12056, 12062, 12067, 0,
7094 0, 0, 0, 0, 0, 0, 0, 0,
7095 0, 0, 0, 12072, 12077, 12082, 12087, 12092,
7096 0, 0, 0, 0, 0, 12097, 0, 12102,
7097 12107, 12111, 12115, 12119, 12123, 12127, 12131, 12135,
7098 12139, 12143, 12147, 12152, 12157, 12162, 12167, 12172,
7099 12177, 12182, 12187, 12192, 12197, 12202, 12207, 0,
7100 12212, 12217, 12222, 12227, 12232, 0, 12237, 0,
7101 12242, 12247, 0, 12252, 12257, 0, 12262, 12267,
7102 12272, 12277, 12282, 12287, 12292, 12297, 12302, 12307,
7103 12312, 12316, 12320, 12324, 12328, 12332, 12336, 12340,
7104 12344, 12348, 12352, 12356, 12360, 12364, 12368, 12372,
7105 12376, 12380, 12384, 12388, 12392, 12396, 12400, 12404,
7106 12408, 12412, 12416, 12420, 12424, 12428, 12432, 12436,
7107 12440, 12444, 12448, 12452, 12456, 12460, 12464, 12468,
7108 12472, 12476, 12480, 12484, 12488, 12492, 12496, 12500,
7109 12504, 12508, 12512, 12516, 12520, 12524, 12528, 12532,
7110 12536, 12540, 12544, 12548, 12552, 12556, 12560, 12564,
7111 12568, 12572, 12576, 12580, 12584, 12588, 12592, 12596,
7112 12600, 12604, 12608, 12612, 12616, 12620, 12624, 12628,
7113 12632, 12636, 12640, 12644, 12648, 12652, 12656, 12660,
7114 12664, 12668, 12672, 12676, 12680, 12684, 12688, 12692,
7115 12696, 12700, 0, 0, 0, 0, 0, 0,
7116 0, 0, 0, 0, 0, 0, 0, 0,
7117 0, 0, 0, 0, 0, 0, 0, 0,
7118 0, 0, 0, 0, 0, 0, 0, 0,
7119 0, 0, 0, 12704, 12708, 12712, 12716, 12720,
7120 12724, 12728, 12732, 12736, 12740, 12744, 12748, 12752,
7121 12756, 12760, 12764, 12768, 12772, 12776, 12780, 12784,
7122 12788, 12792, 12796, 12801, 12806, 12811, 12816, 12821,
7123 12826, 12831, 12836, 12841, 12846, 12851, 12856, 12861,
7124 12866, 12871, 12876, 12881, 12886, 12890, 12894, 12898,
7125
7126 12902, 12907, 12912, 12917, 12922, 12927, 12932, 12937,
7127 12942, 12947, 12952, 12957, 12962, 12967, 12972, 12977,
7128 12982, 12987, 12992, 12997, 13002, 13007, 13012, 13017,
7129 13022, 13027, 13032, 13037, 13042, 13047, 13052, 13057,
7130 13062, 13067, 13072, 13077, 13082, 13087, 13092, 13097,
7131 13102, 13107, 13112, 13117, 13122, 13127, 13132, 13137,
7132 13142, 13147, 13152, 13157, 13162, 13167, 13172, 13177,
7133 13182, 13187, 13192, 13197, 13202, 13207, 13212, 13217,
7134 13222, 13227, 13232, 13237, 13242, 13247, 13252, 13257,
7135 13262, 13267, 13272, 13277, 13282, 13287, 13292, 13297,
7136 13302, 13307, 13312, 13317, 13322, 13327, 13332, 13337,
7137 13342, 13347, 13352, 13357, 13362, 13367, 13372, 13378,
7138 13384, 13390, 13396, 13402, 13408, 13413, 13418, 13423,
7139 13428, 13433, 13438, 13443, 13448, 13453, 13458, 13463,
7140 13468, 13473, 13478, 13483, 13488, 13493, 13498, 13503,
7141 13508, 13513, 13518, 13523, 13528, 13533, 13538, 13543,
7142 13548, 13553, 13558, 13563, 13568, 13573, 13578, 13583,
7143 13588, 13593, 13598, 13603, 13608, 13613, 13618, 13623,
7144 13628, 13633, 13638, 13643, 13648, 13653, 13658, 13663,
7145 13668, 13673, 13678, 13683, 13688, 13693, 13698, 13703,
7146 13708, 13713, 13718, 13723, 13728, 13733, 13738, 13743,
7147 13748, 13753, 13758, 13763, 13768, 13773, 13778, 13783,
7148 13788, 13793, 13798, 13803, 13808, 13813, 13818, 13823,
7149 13828, 13833, 13838, 13843, 13848, 13853, 13858, 13863,
7150 13868, 13873, 13878, 13883, 13888, 13893, 13898, 13903,
7151 13908, 13913, 13918, 13923, 13928, 13933, 13938, 13943,
7152 13948, 13953, 13958, 13963, 13968, 13973, 13978, 13983,
7153 13988, 13993, 13998, 14003, 14008, 14013, 14018, 14023,
7154 14028, 14033, 14038, 14043, 14048, 14053, 14058, 14063,
7155 14068, 14073, 14078, 14083, 14088, 14093, 14098, 14103,
7156 14108, 14113, 14118, 14124, 14130, 14136, 14141, 14146,
7157 14151, 14156, 14161, 14166, 14171, 14176, 14181, 14186,
7158
7159 14191, 14196, 14201, 14206, 14211, 14216, 14221, 14226,
7160 14231, 14236, 14241, 14246, 14251, 14256, 14261, 14266,
7161 14271, 14276, 14281, 14286, 14291, 14296, 14301, 14306,
7162 14311, 14316, 14321, 14326, 14331, 14336, 14341, 14346,
7163 14351, 14356, 14361, 14366, 14371, 14376, 14381, 14386,
7164 14391, 14396, 14401, 14406, 14411, 14416, 14421, 14426,
7165 14431, 14436, 14441, 14446, 14451, 14456, 14461, 14466,
7166 14471, 14476, 14481, 14486, 14491, 14496, 0, 0,
7167 0, 0, 0, 0, 0, 0, 0, 0,
7168 0, 0, 0, 0, 0, 0, 0, 0,
7169 14501, 14507, 14513, 14519, 14525, 14531, 14537, 14543,
7170 14549, 14555, 14561, 14567, 14573, 14579, 14585, 14591,
7171 14597, 14603, 14609, 14615, 14621, 14627, 14633, 14639,
7172 14645, 14651, 14657, 14663, 14669, 14675, 14681, 14687,
7173 14693, 14699, 14705, 14711, 14717, 14723, 14729, 14735,
7174 14741, 14747, 14753, 14759, 14765, 14771, 14777, 14783,
7175 14789, 14795, 14801, 14807, 14813, 14819, 14825, 14831,
7176 14837, 14843, 14849, 14855, 14861, 14867, 14873, 14879,
7177 0, 0, 14885, 14891, 14897, 14903, 14909, 14915,
7178 14921, 14927, 14933, 14939, 14945, 14951, 14957, 14963,
7179 14969, 14975, 14981, 14987, 14993, 14999, 15005, 15011,
7180 15017, 15023, 15029, 15035, 15041, 15047, 15053, 15059,
7181 15065, 15071, 15077, 15083, 15089, 15095, 15101, 15107,
7182 15113, 15119, 15125, 15131, 15137, 15143, 15149, 15155,
7183 15161, 15167, 15173, 15179, 15185, 15191, 15197, 15203,
7184 0, 0, 0, 0, 0, 0, 0, 0,
7185 0, 0, 0, 0, 0, 0, 0, 0,
7186 0, 0, 0, 0, 0, 0, 0, 0,
7187 0, 0, 0, 0, 0, 0, 0, 0,
7188 0, 0, 0, 0, 0, 0, 0, 0,
7189 15209, 15215, 15221, 15228, 15235, 15242, 15249, 15256,
7190 15263, 15270, 15276, 15297, 15308, 0, 0, 0,
7191
7192 0, 0, 0, 0, 0, 0, 0, 0,
7193 0, 0, 0, 0, 0, 0, 0, 0,
7194 0, 0, 0, 0, 0, 0, 0, 0,
7195 0, 0, 0, 0, 0, 0, 0, 0,
7196 0, 0, 0, 0, 0, 0, 0, 0,
7197 0, 0, 0, 0, 0, 0, 0, 0,
7198 15315, 15319, 15323, 15327, 15331, 15335, 15339, 15343,
7199 15347, 15351, 15355, 15359, 15363, 15367, 15371, 15375,
7200 15379, 15383, 15387, 15391, 15395, 0, 0, 0,
7201 0, 15399, 15403, 15407, 15411, 15415, 15419, 15423,
7202 15427, 15431, 15435, 0, 15439, 15443, 15447, 15451,
7203 15455, 15459, 15463, 15467, 15471, 15475, 15479, 15483,
7204 15487, 15491, 15495, 15499, 15503, 15507, 15511, 0,
7205 15515, 15519, 15523, 15527, 0, 0, 0, 0,
7206 15531, 15536, 15541, 0, 15546, 0, 15551, 15556,
7207 15561, 15566, 15571, 15576, 15581, 15586, 15591, 15596,
7208 15601, 15605, 15609, 15613, 15617, 15621, 15625, 15629,
7209 15633, 15637, 15641, 15645, 15649, 15653, 15657, 15661,
7210 15665, 15669, 15673, 15677, 15681, 15685, 15689, 15693,
7211 15697, 15701, 15705, 15709, 15713, 15717, 15721, 15725,
7212 15729, 15733, 15737, 15741, 15745, 15749, 15753, 15757,
7213 15761, 15765, 15769, 15773, 15777, 15781, 15785, 15789,
7214 15793, 15797, 15801, 15805, 15809, 15813, 15817, 15821,
7215 15825, 15829, 15833, 15837, 15841, 15845, 15849, 15853,
7216 15857, 15861, 15865, 15869, 15873, 15877, 15881, 15885,
7217 15889, 15893, 15897, 15901, 15905, 15909, 15913, 15917,
7218 15921, 15925, 15929, 15933, 15937, 15941, 15945, 15949,
7219 15953, 15957, 15961, 15965, 15969, 15973, 15977, 15981,
7220 15985, 15989, 15993, 15997, 16001, 16005, 16009, 16013,
7221 16017, 16021, 16025, 16029, 16033, 16037, 16041, 16045,
7222 16049, 16053, 16057, 16061, 16065, 16069, 16074, 16079,
7223 16084, 16089, 16094, 16099, 16104, 0, 0, 0,
7224
7225 0, 16109, 16113, 16117, 16121, 16125, 16129, 16133,
7226 16137, 16141, 16145, 16149, 16153, 16157, 16161, 16165,
7227 16169, 16173, 16177, 16181, 16185, 16189, 16193, 16197,
7228 16201, 16205, 16209, 16213, 16217, 16221, 16225, 16229,
7229 16233, 16237, 16241, 16245, 16249, 16253, 16257, 16261,
7230 16265, 16269, 16273, 16277, 16281, 16285, 16289, 16293,
7231 16297, 16301, 16305, 16309, 16313, 16317, 16321, 16325,
7232 16329, 16333, 16337, 16341, 16345, 16349, 16353, 16357,
7233 16361, 16365, 16369, 16373, 16377, 16381, 16385, 16389,
7234 16393, 16397, 16401, 16405, 16409, 16413, 16417, 16421,
7235 16425, 16429, 16433, 16437, 16441, 16445, 16449, 16453,
7236 16457, 16461, 16465, 16469, 16473, 16477, 16481, 16485,
7237 16489, 16493, 16497, 16501, 16505, 16509, 16513, 16517,
7238 16521, 16525, 16529, 16533, 16537, 16541, 16545, 16549,
7239 16553, 16557, 16561, 16565, 16569, 16573, 16577, 16581,
7240 16585, 16589, 16593, 16597, 16601, 16605, 16609, 16613,
7241 16617, 16621, 16625, 16629, 16633, 16637, 16641, 16645,
7242 16649, 16653, 16657, 16661, 16665, 16669, 16673, 16677,
7243 16681, 16685, 16689, 16693, 16697, 16701, 16705, 16709,
7244 16713, 16717, 16721, 16725, 16729, 16733, 16737, 16741,
7245 16745, 16749, 16753, 16757, 16761, 16765, 16769, 16773,
7246 16777, 16781, 16785, 16789, 16793, 16797, 16801, 16805,
7247 16809, 16813, 16817, 16821, 16825, 16829, 16833, 16837,
7248 16841, 16845, 16849, 16853, 16857, 16861, 16865, 0,
7249 0, 0, 16869, 16873, 16877, 16881, 16885, 16889,
7250 0, 0, 16893, 16897, 16901, 16905, 16909, 16913,
7251 0, 0, 16917, 16921, 16925, 16929, 16933, 16937,
7252 0, 0, 16941, 16945, 16949, 0, 0, 0,
7253 16953, 16957, 16961, 16965, 16969, 16973, 16977, 0,
7254 16981, 16985, 16989, 16993, 16997, 17001, 17005, 0,
7255 0, 0, 0, 0, 0, 0, 0, 0,
7256 0, 0, 0, 0, 0, 0, 0, 0,
7257};
7258
7259// 67552 bytes
7260
7261const Q_UINT16 QUnicodeTables::ligature_map[] = {
7262 0,
7263 5567, 0,
7264 5552, 0,
7265 5572, 0,
7266 67, 72, 77, 82, 87, 92, 332, 342, 352, 966, 1196, 1206, 1346, 2365, 3145, 3155, 0,
7267 2375, 2385, 2395, 0,
7268 97, 362, 372, 382, 392, 0,
7269 402, 2415, 2425, 2435, 2445, 2455, 0,
7270 102, 107, 112, 117, 412, 422, 432, 442, 452, 1216, 1226, 1356, 2485, 2495, 3265, 3275, 3285, 0,
7271 2515, 0,
7272 462, 472, 482, 492, 1076, 1146, 2525, 0,
7273 502, 1336, 2535, 2545, 2555, 2565, 2575, 0,
7274 122, 127, 132, 137, 512, 522, 532, 542, 552, 976, 1236, 1246, 2585, 3345, 3355, 0,
7275 567, 0,
7276 577, 1086, 2605, 2615, 2625, 0,
7277 587, 597, 607, 2635, 2655, 2665, 0,
7278 2675, 2685, 2695, 0,
7279 142, 627, 637, 647, 1156, 2705, 2715, 2725, 2735, 0,
7280 147, 152, 157, 162, 167, 662, 672, 682, 901, 986, 1096, 1256, 1266, 1386, 3365, 3375, 0,
7281 2785, 2795, 0,
7282 692, 702, 712, 1276, 1286, 2805, 2815, 2835, 0,
7283 722, 732, 742, 752, 1316, 2845, 2855, 0,
7284 762, 772, 1326, 2895, 2905, 2915, 2925, 0,
7285 172, 177, 182, 187, 782, 792, 802, 812, 822, 832, 911, 996, 1296, 1306, 2935, 2945, 2955, 3485, 3495, 0,
7286 2985, 2995, 0,
7287 842, 3005, 3015, 3025, 3035, 3045, 0,
7288 3055, 3065, 0,
7289 192, 852, 862, 1406, 3075, 3555, 3565, 3575, 3585, 0,
7290 867, 877, 887, 3085, 3095, 3105, 0,
7291 197, 202, 207, 212, 217, 222, 337, 347, 357, 971, 1201, 1211, 1351, 2370, 3150, 3160, 0,
7292 2380, 2390, 2400, 0,
7293 227, 367, 377, 387, 397, 0,
7294 407, 2420, 2430, 2440, 2450, 2460, 0,
7295 232, 237, 242, 247, 417, 427, 437, 447, 457, 1221, 1231, 1361, 2490, 2500, 3270, 3280, 3290, 0,
7296 2520, 0,
7297 467, 477, 487, 497, 1081, 1151, 2530, 0,
7298 507, 1341, 2540, 2550, 2560, 2570, 2580, 3115, 0,
7299 252, 257, 262, 267, 517, 527, 537, 547, 981, 1241, 1251, 2590, 3350, 3360, 0,
7300 572, 1126, 0,
7301 582, 1091, 2610, 2620, 2630, 0,
7302 592, 602, 612, 2640, 2660, 2670, 0,
7303 2680, 2690, 2700, 0,
7304 272, 632, 642, 652, 1161, 2710, 2720, 2730, 2740, 0,
7305 277, 282, 287, 292, 297, 667, 677, 687, 906, 991, 1101, 1261, 1271, 1391, 3370, 3380, 0,
7306 2790, 2800, 0,
7307 697, 707, 717, 1281, 1291, 2810, 2820, 2840, 0,
7308 727, 737, 747, 757, 1321, 2850, 2860, 0,
7309 767, 777, 1331, 2900, 2910, 2920, 2930, 3120, 0,
7310 302, 307, 312, 317, 787, 797, 807, 817, 827, 837, 916, 1001, 1301, 1311, 2940, 2950, 2960, 3490, 3500, 0,
7311 2990, 3000, 0,
7312 847, 3010, 3020, 3030, 3040, 3050, 3125, 0,
7313 3060, 3070, 0,
7314 322, 327, 857, 1411, 3080, 3130, 3560, 3570, 3580, 3590, 0,
7315 872, 882, 892, 3090, 3100, 3110, 0,
7316 1537, 4476, 4670, 0,
7317 3165, 3175, 3185, 3195, 0,
7318 1046, 0,
7319 1166, 0,
7320 1066, 1176, 0,
7321 2405, 0,
7322 3295, 3305, 3315, 3325, 0,
7323 2595, 0,
7324 3385, 3395, 3405, 3415, 0,
7325 1376, 2745, 2755, 0,
7326 1366, 0,
7327 1186, 0,
7328 1006, 1016, 1026, 1036, 0,
7329 3170, 3180, 3190, 3200, 0,
7330 1051, 0,
7331 1171, 0,
7332 1071, 1181, 0,
7333 2410, 0,
7334 3300, 3310, 3320, 3330, 0,
7335 2600, 0,
7336 3390, 3400, 3410, 3420, 0,
7337 1381, 2750, 2760, 0,
7338 1371, 0,
7339 1191, 0,
7340 1011, 1021, 1031, 1041, 0,
7341 3215, 3225, 3235, 3245, 0,
7342 3220, 3230, 3240, 3250, 0,
7343 2465, 2475, 0,
7344 2470, 2480, 0,
7345 2765, 2775, 0,
7346 2770, 2780, 0,
7347 2865, 0,
7348 2870, 0,
7349 2875, 0,
7350 2880, 0,
7351 2965, 0,
7352 2970, 0,
7353 2975, 0,
7354 2980, 0,
7355 3140, 0,
7356 3435, 3445, 3455, 3465, 3475, 0,
7357 3440, 3450, 3460, 3470, 3480, 0,
7358 3505, 3515, 3525, 3535, 3545, 0,
7359 3510, 3520, 3530, 3540, 3550, 0,
7360 1116, 0,
7361 1106, 0,
7362 1111, 0,
7363 1056, 0,
7364 1061, 0,
7365 2505, 0,
7366 2510, 0,
7367 1396, 0,
7368 1401, 0,
7369 1121, 0,
7370 1514, 0,
7371 1542, 3635, 3640, 4433, 4438, 4443, 4452, 0,
7372 1551, 3705, 3710, 4506, 0,
7373 1556, 3775, 3780, 4515, 4524, 0,
7374 1561, 1586, 3855, 3860, 4573, 4578, 4583, 0,
7375 1566, 3925, 3930, 4708, 0,
7376 4665, 0,
7377 1571, 1591, 3995, 4646, 4651, 4656, 0,
7378 1576, 4055, 4060, 4717, 4726, 0,
7379 4418, 0,
7380 4491, 0,
7381 1596, 3595, 3600, 4095, 4398, 4403, 4413, 4423, 0,
7382 1601, 3675, 3680, 4104, 0,
7383 1606, 3735, 3740, 4113, 4486, 4496, 0,
7384 1611, 1621, 3815, 3820, 4122, 4544, 4549, 4563, 0,
7385 1631, 3895, 3900, 4131, 0,
7386 4626, 4631, 0,
7387 1626, 1636, 3955, 3960, 4140, 4607, 4612, 4636, 0,
7388 1641, 4015, 4020, 4149, 4688, 4698, 0,
7389 1581, 4554, 4568, 0,
7390 1616, 4617, 4641, 0,
7391 4693, 0,
7392 1658, 1663, 0,
7393 1711, 0,
7394 1796, 1806, 0,
7395 1706, 0,
7396 1696, 1701, 1816, 0,
7397 1786, 1836, 0,
7398 1846, 0,
7399 1721, 1731, 1856, 1866, 0,
7400 1716, 0,
7401 1876, 0,
7402 1726, 1906, 1916, 1926, 0,
7403 1936, 0,
7404 1946, 0,
7405 1896, 0,
7406 1801, 1811, 0,
7407 1751, 0,
7408 1741, 1746, 1821, 0,
7409 1791, 1841, 0,
7410 1851, 0,
7411 1736, 1766, 1861, 1871, 0,
7412 1761, 0,
7413 1881, 0,
7414 1771, 1911, 1921, 1931, 0,
7415 1941, 0,
7416 1951, 0,
7417 1901, 0,
7418 1756, 0,
7419 1776, 0,
7420 1781, 0,
7421 1826, 0,
7422 1831, 0,
7423 1886, 0,
7424 1891, 0,
7425 12167, 12172, 12177, 0,
7426 12182, 12292, 0,
7427 12187, 0,
7428 12192, 0,
7429 12197, 0,
7430 12202, 12287, 0,
7431 12207, 0,
7432 12212, 0,
7433 12097, 12217, 0,
7434 12222, 0,
7435 12227, 12297, 0,
7436 12232, 0,
7437 12237, 0,
7438 12242, 0,
7439 12247, 0,
7440 12252, 0,
7441 12257, 12302, 0,
7442 12262, 0,
7443 12267, 0,
7444 12272, 0,
7445 12147, 12152, 12277, 0,
7446 12282, 0,
7447 12102, 0,
7448 1961, 1966, 1976, 0,
7449 1971, 0,
7450 1981, 0,
7451 2011, 0,
7452 2016, 0,
7453 2006, 0,
7454 2036, 0,
7455 2041, 0,
7456 2046, 0,
7457 2051, 0,
7458 2056, 0,
7459 2061, 0,
7460 2021, 0,
7461 2066, 0,
7462 2071, 0,
7463 2026, 0,
7464 2031, 0,
7465 2086, 0,
7466 2091, 0,
7467 2096, 0,
7468 2076, 2081, 0,
7469 2111, 0,
7470 2116, 0,
7471 2121, 0,
7472 2126, 0,
7473 2101, 0,
7474 2106, 0,
7475 2146, 0,
7476 2151, 0,
7477 2131, 2136, 2141, 0,
7478 2156, 0,
7479 2161, 2171, 0,
7480 2166, 0,
7481 2176, 0,
7482 2181, 0,
7483 2186, 2191, 2196, 0,
7484 2201, 0,
7485 2206, 2216, 0,
7486 2211, 0,
7487 2221, 2226, 2236, 0,
7488 2231, 0,
7489 2290, 0,
7490 2265, 0,
7491 2270, 0,
7492 2275, 0,
7493 2280, 0,
7494 2285, 0,
7495 2295, 2300, 2325, 0,
7496 2355, 0,
7497 2330, 0,
7498 2335, 0,
7499 2340, 0,
7500 2345, 0,
7501 2350, 0,
7502 2305, 0,
7503 2315, 0,
7504 2360, 0,
7505 2645, 0,
7506 2650, 0,
7507 2825, 0,
7508 2830, 0,
7509 2885, 0,
7510 2890, 0,
7511 3205, 3255, 0,
7512 3210, 3260, 0,
7513 3335, 0,
7514 3340, 0,
7515 3425, 0,
7516 3430, 0,
7517 3605, 3615, 3625, 4158, 0,
7518 3610, 3620, 3630, 4163, 0,
7519 4168, 0,
7520 4173, 0,
7521 4178, 0,
7522 4183, 0,
7523 4188, 0,
7524 4193, 0,
7525 3645, 3655, 3665, 4198, 0,
7526 3650, 3660, 3670, 4203, 0,
7527 4208, 0,
7528 4213, 0,
7529 4218, 0,
7530 4223, 0,
7531 4228, 0,
7532 4233, 0,
7533 3685, 3695, 0,
7534 3690, 3700, 0,
7535 3715, 3725, 0,
7536 3720, 3730, 0,
7537 3745, 3755, 3765, 4238, 0,
7538 3750, 3760, 3770, 4243, 0,
7539 4248, 0,
7540 4253, 0,
7541 4258, 0,
7542 4263, 0,
7543 4268, 0,
7544 4273, 0,
7545 3785, 3795, 3805, 4278, 0,
7546 3790, 3800, 3810, 4283, 0,
7547 4288, 0,
7548 4293, 0,
7549 4298, 0,
7550 4303, 0,
7551 4308, 0,
7552 4313, 0,
7553 3825, 3835, 3845, 0,
7554 3830, 3840, 3850, 0,
7555 3865, 3875, 3885, 0,
7556 3870, 3880, 3890, 0,
7557 3905, 3915, 0,
7558 3910, 3920, 0,
7559 3935, 3945, 0,
7560 3940, 3950, 0,
7561 3965, 3975, 3985, 0,
7562 3970, 3980, 3990, 0,
7563 4000, 4005, 4010, 0,
7564 4025, 4035, 4045, 4318, 0,
7565 4030, 4040, 4050, 4323, 0,
7566 4328, 0,
7567 4333, 0,
7568 4338, 0,
7569 4343, 0,
7570 4348, 0,
7571 4353, 0,
7572 4065, 4075, 4085, 4358, 0,
7573 4070, 4080, 4090, 4363, 0,
7574 4368, 0,
7575 4373, 0,
7576 4378, 0,
7577 4383, 0,
7578 4388, 0,
7579 4393, 0,
7580 4408, 0,
7581 4481, 0,
7582 4683, 0,
7583 4428, 0,
7584 4529, 4534, 4539, 0,
7585 4501, 0,
7586 4703, 0,
7587 4592, 4597, 4602, 0,
7588 5455, 0,
7589 5460, 0,
7590 5465, 0,
7591 5470, 0,
7592 5480, 0,
7593 5475, 0,
7594 5485, 0,
7595 5490, 0,
7596 5495, 0,
7597 5500, 0,
7598 5505, 0,
7599 5532, 0,
7600 5537, 0,
7601 5542, 0,
7602 5547, 0,
7603 5562, 0,
7604 5557, 0,
7605 5577, 0,
7606 5582, 0,
7607 5587, 0,
7608 5592, 0,
7609 5597, 0,
7610 5602, 0,
7611 5607, 0,
7612 5612, 0,
7613 5657, 0,
7614 5662, 0,
7615 5617, 0,
7616 5622, 0,
7617 5627, 0,
7618 5632, 0,
7619 5667, 0,
7620 5672, 0,
7621 5637, 0,
7622 5642, 0,
7623 5647, 0,
7624 5652, 0,
7625 5677, 0,
7626 5682, 0,
7627 5687, 0,
7628 5692, 0,
7629 6430, 0,
7630 7444, 0,
7631 7319, 0,
7632 7324, 0,
7633 7329, 0,
7634 7334, 0,
7635 7339, 0,
7636 7344, 0,
7637 7349, 0,
7638 7354, 0,
7639 7359, 0,
7640 7364, 0,
7641 7369, 0,
7642 7374, 0,
7643 7379, 0,
7644 7384, 0,
7645 7389, 0,
7646 7394, 7399, 0,
7647 7404, 7409, 0,
7648 7414, 7419, 0,
7649 7424, 7429, 0,
7650 7434, 7439, 0,
7651 7459, 0,
7652 7594, 0,
7653 7469, 0,
7654 7474, 0,
7655 7479, 0,
7656 7484, 0,
7657 7489, 0,
7658 7494, 0,
7659 7499, 0,
7660 7504, 0,
7661 7509, 0,
7662 7514, 0,
7663 7519, 0,
7664 7524, 0,
7665 7529, 0,
7666 7534, 0,
7667 7539, 0,
7668 7544, 7549, 0,
7669 7554, 7559, 0,
7670 7564, 7569, 0,
7671 7574, 7579, 0,
7672 7584, 7589, 0,
7673 7599, 0,
7674 7604, 0,
7675 7609, 0,
7676 7614, 0,
7677 7619, 0,
7678 12157, 12162, 0,
7679
7680};
7681
7682const Q_UINT16 QUnicodeTables::ligature_info[] = {
7683 1, 2, 3, 4, 5, 6, 7, 8,
7684 8, 9, 10, 11, 12, 13, 8, 14,
7685 15, 8, 8, 8, 8, 8, 8, 8,
7686 8, 8, 8, 8, 8, 8, 16, 17,
7687 8, 18, 19, 8, 8, 8, 8, 8,
7688 8, 8, 20, 8, 8, 8, 8, 8,
7689 21, 8, 8, 8, 8, 8, 8, 8,
7690 8, 8, 8, 8, 8, 8, 8, 8,
7691 8, 8, 8, 8, 8, 8, 8, 8,
7692 8, 8, 8, 8, 8, 8, 8, 8,
7693 8, 8, 8, 8, 8, 8, 8, 8,
7694 8, 8, 8, 8, 8, 8, 8, 8,
7695 8, 8, 8, 8, 8, 8, 8, 8,
7696 8, 8, 8, 8, 8, 8, 8, 8,
7697 8, 8, 8, 8, 8, 8, 8, 8,
7698 8, 8, 8, 8, 8, 8, 8, 8,
7699 8, 8, 8, 8, 8, 8, 8, 8,
7700 8, 8, 8, 8, 8, 8, 8, 8,
7701 8, 8, 8, 8, 8, 8, 8, 8,
7702 8, 8, 8, 8, 8, 8, 8, 8,
7703 8, 8, 8, 8, 8, 8, 8, 8,
7704 8, 8, 8, 8, 8, 8, 8, 8,
7705 8, 8, 8, 8, 8, 8, 8, 8,
7706 8, 8, 8, 8, 8, 8, 8, 8,
7707 8, 8, 8, 8, 8, 8, 8, 8,
7708 8, 8, 8, 8, 8, 8, 8, 8,
7709 8, 8, 8, 8, 8, 8, 8, 8,
7710 8, 8, 8, 8, 8, 8, 8, 8,
7711 8, 8, 8, 8, 8, 8, 8, 8,
7712 8, 8, 8, 8, 8, 8, 8, 8,
7713 8, 8, 8, 8, 8, 8, 8, 8,
7714 8, 8, 8, 22, 8, 8, 8, 8,
7715
7716
7717 0, 0, 0, 0, 0, 0, 0, 0,
7718 0, 0, 0, 0, 0, 0, 0, 0,
7719 0, 0, 0, 0, 0, 0, 0, 0,
7720 0, 0, 0, 0, 0, 0, 0, 0,
7721 0, 0, 0, 0, 0, 0, 0, 0,
7722 0, 0, 0, 0, 0, 0, 0, 0,
7723 0, 0, 0, 0, 0, 0, 0, 0,
7724 0, 0, 0, 0, 1, 3, 5, 0,
7725 0, 7, 24, 28, 34, 41, 59, 61,
7726 69, 77, 93, 95, 101, 108, 112, 122,
7727 139, 0, 142, 151, 159, 167, 187, 190,
7728 197, 200, 210, 0, 0, 0, 0, 0,
7729 0, 217, 234, 238, 244, 251, 269, 271,
7730 279, 288, 303, 306, 312, 319, 323, 333,
7731 350, 0, 353, 362, 370, 379, 399, 402,
7732 410, 413, 424, 0, 0, 0, 0, 0,
7733 0, 0, 0, 0, 0, 0, 0, 0,
7734 0, 0, 0, 0, 0, 0, 0, 0,
7735 0, 0, 0, 0, 0, 0, 0, 0,
7736 0, 0, 0, 0, 0, 0, 0, 0,
7737 0, 0, 0, 0, 0, 0, 0, 0,
7738 431, 0, 0, 0, 0, 0, 0, 0,
7739 0, 0, 0, 0, 0, 0, 0, 0,
7740 0, 0, 0, 0, 0, 0, 0, 0,
7741 0, 0, 435, 0, 440, 442, 444, 447,
7742 0, 0, 449, 0, 0, 0, 0, 454,
7743 0, 0, 0, 0, 456, 461, 465, 0,
7744 467, 0, 0, 0, 469, 0, 0, 0,
7745 0, 0, 474, 0, 479, 481, 483, 486,
7746 0, 0, 488, 0, 0, 0, 0, 493,
7747 0, 0, 0, 0, 495, 500, 504, 0,
7748 506, 0, 0, 0, 508, 0, 0, 0,
7749
7750 0, 0, 513, 518, 0, 0, 0, 0,
7751 0, 0, 0, 0, 0, 0, 0, 0,
7752 0, 0, 523, 526, 0, 0, 0, 0,
7753 0, 0, 0, 0, 0, 0, 0, 0,
7754 0, 0, 0, 0, 0, 0, 0, 0,
7755 0, 0, 0, 0, 0, 0, 0, 0,
7756 0, 0, 0, 0, 0, 0, 0, 0,
7757 0, 0, 0, 0, 0, 0, 0, 0,
7758 0, 0, 0, 0, 0, 0, 0, 0,
7759 0, 0, 0, 0, 529, 532, 0, 0,
7760 0, 0, 0, 0, 0, 0, 0, 0,
7761 0, 0, 535, 537, 0, 0, 0, 0,
7762 539, 541, 0, 0, 0, 0, 0, 0,
7763 543, 545, 547, 549, 0, 0, 0, 0,
7764 0, 0, 0, 0, 0, 0, 0, 0,
7765 0, 0, 0, 0, 0, 0, 0, 551,
7766 0, 0, 0, 0, 0, 0, 0, 0,
7767 0, 0, 0, 0, 0, 0, 0, 0,
7768 0, 0, 0, 0, 0, 0, 0, 0,
7769 0, 0, 0, 0, 0, 0, 0, 0,
7770 553, 559, 0, 0, 0, 0, 0, 0,
7771 0, 0, 0, 0, 0, 0, 0, 565,
7772 571, 0, 0, 0, 0, 0, 0, 577,
7773 0, 0, 0, 0, 0, 0, 0, 0,
7774 0, 0, 0, 0, 0, 0, 0, 0,
7775 0, 0, 0, 0, 0, 0, 0, 0,
7776 0, 0, 0, 0, 0, 0, 0, 0,
7777 0, 0, 0, 0, 0, 0, 0, 0,
7778 0, 0, 0, 0, 0, 0, 0, 0,
7779 0, 0, 579, 581, 0, 0, 0, 0,
7780 0, 0, 0, 0, 0, 0, 0, 0,
7781 0, 0, 0, 0, 0, 0, 0, 0,
7782
7783 0, 0, 0, 0, 0, 0, 0, 0,
7784 0, 0, 0, 0, 0, 0, 0, 0,
7785 0, 0, 0, 0, 0, 0, 0, 0,
7786 0, 0, 0, 0, 0, 0, 0, 0,
7787 0, 0, 0, 0, 0, 0, 583, 585,
7788 587, 589, 0, 0, 0, 0, 591, 593,
7789 0, 0, 0, 0, 0, 0, 0, 0,
7790 0, 0, 0, 0, 0, 0, 0, 0,
7791 0, 0, 0, 0, 0, 0, 0, 0,
7792 0, 0, 0, 0, 0, 0, 0, 0,
7793 0, 0, 0, 0, 0, 0, 0, 0,
7794 0, 0, 0, 0, 0, 0, 0, 0,
7795 0, 0, 0, 0, 0, 0, 0, 0,
7796 0, 0, 0, 0, 0, 0, 0, 0,
7797 0, 0, 0, 0, 0, 0, 0, 0,
7798 0, 0, 0, 0, 0, 0, 0, 0,
7799 0, 0, 0, 0, 0, 0, 0, 0,
7800 0, 0, 0, 0, 0, 0, 0, 0,
7801 0, 0, 595, 0, 0, 0, 0, 0,
7802 0, 0, 0, 0, 0, 0, 0, 0,
7803 0, 0, 0, 0, 0, 0, 0, 0,
7804 0, 0, 0, 0, 0, 0, 0, 0,
7805 0, 0, 0, 0, 0, 0, 0, 0,
7806 0, 0, 0, 0, 0, 0, 0, 0,
7807 0, 0, 0, 0, 0, 0, 0, 0,
7808 0, 0, 0, 0, 0, 0, 0, 0,
7809 0, 0, 0, 0, 0, 0, 0, 0,
7810 0, 0, 0, 0, 0, 0, 0, 0,
7811 0, 0, 0, 0, 0, 0, 0, 0,
7812 0, 0, 0, 0, 0, 0, 0, 0,
7813 0, 0, 0, 0, 0, 0, 0, 0,
7814 0, 0, 0, 0, 0, 0, 0, 0,
7815
7816 0, 0, 0, 0, 0, 0, 0, 0,
7817 597, 0, 0, 0, 0, 0, 0, 0,
7818 0, 0, 0, 0, 0, 0, 0, 0,
7819 0, 0, 0, 0, 0, 0, 0, 0,
7820 0, 0, 0, 0, 0, 0, 0, 0,
7821 0, 0, 0, 0, 0, 0, 0, 0,
7822 0, 0, 0, 0, 0, 0, 0, 0,
7823 0, 0, 0, 0, 0, 0, 0, 0,
7824 0, 0, 0, 0, 0, 0, 0, 0,
7825 0, 0, 0, 0, 0, 0, 0, 0,
7826 0, 0, 0, 0, 0, 0, 0, 0,
7827 0, 0, 0, 0, 0, 0, 0, 0,
7828 0, 0, 0, 0, 0, 0, 0, 0,
7829 0, 0, 0, 0, 0, 0, 0, 0,
7830 0, 0, 0, 0, 0, 0, 0, 0,
7831 0, 0, 0, 0, 0, 0, 0, 0,
7832 0, 0, 0, 0, 0, 0, 0, 0,
7833 0, 0, 0, 0, 0, 0, 0, 0,
7834 0, 599, 0, 0, 0, 607, 0, 612,
7835 0, 618, 0, 0, 0, 0, 0, 626,
7836 0, 631, 0, 0, 0, 633, 0, 0,
7837 0, 640, 0, 0, 646, 0, 648, 0,
7838 0, 650, 0, 0, 0, 659, 0, 664,
7839 0, 671, 0, 0, 0, 0, 0, 680,
7840 0, 685, 0, 0, 0, 688, 0, 0,
7841 0, 697, 704, 708, 0, 0, 712, 0,
7842 0, 0, 714, 0, 0, 0, 0, 0,
7843 0, 0, 0, 0, 0, 0, 0, 0,
7844 0, 0, 0, 0, 0, 0, 0, 0,
7845 0, 0, 0, 0, 0, 0, 0, 0,
7846 0, 0, 0, 0, 0, 0, 0, 0,
7847 0, 0, 0, 0, 0, 0, 0, 0,
7848
7849 0, 0, 0, 0, 0, 0, 717, 0,
7850 0, 0, 0, 0, 0, 0, 0, 0,
7851 719, 0, 0, 722, 0, 724, 728, 731,
7852 733, 0, 738, 0, 0, 0, 740, 0,
7853 0, 0, 0, 742, 0, 0, 0, 747,
7854 0, 0, 0, 749, 0, 751, 0, 0,
7855 753, 0, 0, 756, 0, 758, 762, 765,
7856 767, 0, 772, 0, 0, 0, 774, 0,
7857 0, 0, 0, 776, 0, 0, 0, 781,
7858 0, 0, 0, 783, 0, 785, 0, 0,
7859 0, 0, 0, 0, 0, 0, 787, 0,
7860 0, 0, 0, 0, 0, 0, 0, 0,
7861 0, 0, 0, 0, 0, 0, 0, 0,
7862 0, 0, 0, 0, 0, 0, 0, 0,
7863 0, 0, 0, 0, 789, 791, 0, 0,
7864 0, 0, 0, 0, 0, 0, 0, 0,
7865 0, 0, 0, 0, 0, 0, 0, 0,
7866 0, 0, 0, 0, 0, 0, 0, 0,
7867 0, 0, 0, 0, 0, 0, 0, 0,
7868 0, 0, 0, 0, 0, 0, 0, 0,
7869 0, 0, 0, 0, 0, 0, 0, 0,
7870 0, 0, 0, 0, 0, 0, 0, 0,
7871 0, 0, 0, 0, 0, 0, 0, 0,
7872 0, 0, 0, 0, 0, 0, 0, 0,
7873 0, 0, 0, 0, 0, 0, 0, 0,
7874 0, 0, 0, 0, 0, 0, 0, 0,
7875 0, 0, 0, 0, 0, 0, 0, 0,
7876 793, 795, 0, 0, 0, 0, 0, 0,
7877 0, 0, 0, 0, 0, 0, 0, 0,
7878 797, 799, 0, 0, 0, 0, 0, 0,
7879 0, 0, 0, 0, 0, 0, 0, 0,
7880 0, 0, 0, 0, 0, 0, 0, 0,
7881
7882 0, 0, 0, 0, 0, 0, 0, 0,
7883 0, 0, 0, 0, 0, 0, 0, 0,
7884 0, 0, 0, 0, 0, 0, 0, 0,
7885 0, 0, 0, 0, 0, 0, 0, 0,
7886 0, 0, 0, 0, 0, 0, 0, 0,
7887 0, 0, 0, 0, 0, 0, 0, 0,
7888 0, 0, 0, 0, 0, 0, 0, 0,
7889 0, 0, 0, 0, 0, 0, 0, 0,
7890 0, 0, 0, 0, 0, 0, 0, 0,
7891 0, 0, 0, 0, 0, 0, 0, 0,
7892 0, 0, 0, 0, 0, 0, 0, 0,
7893 0, 0, 0, 0, 0, 0, 0, 0,
7894 0, 0, 0, 0, 0, 0, 0, 0,
7895 0, 0, 0, 0, 0, 0, 0, 0,
7896 0, 0, 0, 0, 0, 0, 0, 0,
7897 0, 0, 0, 0, 0, 0, 0, 0,
7898 0, 0, 0, 0, 0, 0, 0, 0,
7899 0, 0, 0, 0, 0, 0, 0, 0,
7900 0, 0, 0, 0, 0, 0, 0, 0,
7901 0, 0, 0, 0, 0, 0, 0, 0,
7902 0, 0, 0, 0, 0, 0, 0, 0,
7903 0, 0, 0, 0, 0, 0, 0, 0,
7904 0, 0, 0, 0, 0, 0, 0, 0,
7905 0, 0, 0, 0, 0, 0, 0, 0,
7906 0, 0, 0, 0, 0, 0, 0, 0,
7907 0, 0, 0, 0, 0, 0, 0, 0,
7908 801, 805, 808, 810, 812, 814, 817, 0,
7909 819, 821, 824, 826, 829, 0, 831, 0,
7910 833, 835, 0, 837, 839, 0, 842, 844,
7911 846, 848, 852, 0, 0, 0, 0, 0,
7912 0, 0, 854, 0, 0, 0, 0, 0,
7913 0, 0, 0, 0, 0, 0, 0, 0,
7914
7915 0, 0, 0, 0, 0, 0, 0, 0,
7916 0, 0, 0, 0, 0, 0, 0, 0,
7917 0, 0, 0, 0, 0, 0, 0, 0,
7918 0, 0, 0, 0, 0, 0, 0, 0,
7919 0, 0, 0, 0, 0, 0, 0, 856,
7920 0, 0, 0, 0, 0, 0, 0, 0,
7921 0, 0, 0, 0, 0, 0, 0, 0,
7922 0, 0, 0, 0, 0, 0, 0, 0,
7923 0, 0, 0, 0, 0, 0, 0, 0,
7924 860, 0, 862, 0, 0, 0, 0, 0,
7925 0, 0, 0, 0, 0, 0, 0, 0,
7926 0, 0, 0, 0, 0, 0, 0, 0,
7927 0, 0, 0, 0, 0, 0, 0, 0,
7928 0, 0, 0, 0, 0, 0, 0, 0,
7929 0, 0, 0, 0, 0, 0, 0, 0,
7930 0, 0, 0, 0, 0, 0, 0, 0,
7931 0, 0, 0, 0, 0, 0, 0, 0,
7932 0, 0, 0, 0, 0, 0, 0, 0,
7933 0, 0, 0, 0, 0, 0, 0, 0,
7934 0, 0, 0, 0, 0, 0, 0, 0,
7935 0, 0, 0, 0, 0, 0, 0, 0,
7936 0, 0, 0, 0, 0, 0, 0, 0,
7937 0, 0, 0, 0, 0, 0, 0, 0,
7938 0, 0, 0, 0, 0, 0, 0, 0,
7939 0, 864, 0, 0, 0, 0, 0, 0,
7940 0, 0, 0, 0, 0, 0, 0, 0,
7941 0, 0, 866, 0, 0, 868, 0, 0,
7942 0, 0, 0, 0, 0, 0, 0, 0,
7943 0, 0, 0, 0, 0, 0, 0, 0,
7944 0, 0, 0, 0, 0, 0, 0, 0,
7945 0, 0, 0, 0, 0, 0, 0, 0,
7946 0, 0, 0, 0, 0, 0, 0, 0,
7947
7948 0, 0, 0, 0, 0, 0, 0, 0,
7949 0, 0, 0, 0, 0, 0, 0, 0,
7950 0, 0, 0, 0, 0, 0, 0, 0,
7951 0, 0, 0, 0, 0, 0, 0, 0,
7952 0, 0, 0, 0, 0, 0, 0, 0,
7953 0, 0, 0, 0, 0, 0, 0, 0,
7954 0, 0, 0, 0, 0, 0, 0, 0,
7955 0, 0, 0, 0, 0, 0, 0, 0,
7956 0, 0, 0, 0, 0, 0, 0, 0,
7957 0, 0, 0, 0, 0, 0, 0, 0,
7958 0, 0, 0, 0, 0, 0, 0, 0,
7959 0, 0, 0, 0, 0, 0, 0, 0,
7960 0, 0, 0, 0, 0, 0, 0, 0,
7961 0, 0, 0, 0, 0, 0, 0, 0,
7962 0, 0, 0, 0, 0, 0, 0, 0,
7963 0, 0, 0, 0, 0, 0, 0, 0,
7964 0, 0, 0, 0, 0, 0, 0, 0,
7965 0, 0, 0, 0, 0, 0, 0, 0,
7966 0, 0, 0, 0, 0, 0, 0, 0,
7967 0, 0, 0, 0, 0, 0, 0, 0,
7968 0, 0, 0, 0, 0, 0, 0, 0,
7969 0, 0, 0, 0, 0, 0, 0, 0,
7970 0, 0, 0, 0, 0, 0, 0, 0,
7971 0, 0, 0, 0, 0, 0, 0, 0,
7972 0, 0, 0, 0, 0, 0, 0, 0,
7973 0, 0, 0, 0, 0, 0, 0, 0,
7974 0, 0, 0, 0, 0, 0, 0, 0,
7975 0, 0, 0, 0, 0, 0, 0, 0,
7976 0, 0, 0, 0, 0, 0, 0, 0,
7977 0, 0, 0, 0, 0, 0, 0, 0,
7978 0, 0, 0, 0, 0, 0, 0, 0,
7979 0, 0, 0, 0, 0, 0, 0, 0,
7980
7981 0, 0, 0, 0, 0, 0, 0, 0,
7982 0, 0, 0, 0, 0, 0, 0, 0,
7983 0, 0, 0, 0, 0, 870, 872, 874,
7984 0, 0, 0, 0, 876, 0, 0, 0,
7985 0, 878, 880, 0, 0, 0, 0, 0,
7986 882, 0, 0, 884, 0, 0, 0, 886,
7987 888, 0, 0, 890, 0, 0, 0, 0,
7988 0, 0, 0, 0, 0, 0, 0, 0,
7989 0, 0, 0, 0, 0, 0, 0, 0,
7990 0, 0, 0, 0, 0, 0, 0, 0,
7991 0, 0, 0, 0, 0, 0, 0, 0,
7992 0, 0, 0, 0, 0, 0, 0, 0,
7993 0, 0, 0, 0, 0, 0, 0, 0,
7994 0, 0, 0, 0, 0, 0, 0, 0,
7995 0, 0, 0, 0, 0, 0, 0, 0,
7996 0, 0, 0, 0, 0, 0, 0, 0,
7997 0, 0, 0, 0, 0, 0, 0, 0,
7998 0, 0, 0, 0, 0, 0, 0, 0,
7999 0, 0, 0, 0, 0, 0, 0, 0,
8000 0, 0, 0, 0, 0, 0, 0, 0,
8001 0, 892, 894, 0, 0, 0, 0, 0,
8002 0, 0, 0, 0, 0, 0, 0, 896,
8003 0, 0, 0, 0, 0, 0, 0, 0,
8004 0, 0, 0, 0, 0, 0, 0, 0,
8005 0, 0, 0, 0, 0, 0, 0, 898,
8006 0, 0, 0, 0, 0, 0, 0, 0,
8007 0, 0, 0, 0, 0, 0, 0, 0,
8008 0, 0, 0, 0, 0, 0, 0, 0,
8009 0, 0, 0, 0, 0, 0, 0, 0,
8010 0, 0, 0, 0, 0, 0, 0, 0,
8011 0, 0, 0, 0, 0, 0, 0, 0,
8012 0, 0, 0, 0, 0, 0, 0, 0,
8013
8014 0, 0, 0, 0, 0, 0, 0, 0,
8015 0, 0, 0, 0, 0, 0, 0, 0,
8016 0, 0, 0, 0, 0, 0, 901, 903,
8017 0, 0, 0, 0, 905, 0, 0, 0,
8018 0, 0, 0, 0, 0, 0, 0, 0,
8019 0, 0, 0, 907, 0, 0, 0, 0,
8020 0, 0, 909, 0, 0, 0, 0, 0,
8021 911, 0, 0, 0, 0, 0, 0, 0,
8022 0, 0, 0, 0, 0, 0, 0, 0,
8023 0, 0, 0, 0, 0, 0, 0, 0,
8024 0, 0, 0, 0, 0, 0, 0, 0,
8025 0, 0, 0, 0, 0, 0, 0, 0,
8026 0, 0, 0, 0, 0, 0, 0, 0,
8027 0, 0, 0, 0, 0, 0, 0, 0,
8028 0, 0, 0, 0, 0, 0, 0, 0,
8029 0, 0, 0, 0, 0, 0, 0, 0,
8030 0, 0, 0, 0, 0, 0, 0, 0,
8031 0, 0, 0, 0, 0, 0, 0, 0,
8032 0, 0, 0, 0, 0, 0, 0, 0,
8033 0, 0, 0, 0, 0, 0, 0, 0,
8034 0, 0, 0, 0, 0, 0, 0, 0,
8035 0, 0, 0, 0, 0, 0, 0, 0,
8036 0, 0, 0, 0, 0, 0, 0, 0,
8037 0, 0, 0, 0, 0, 0, 0, 0,
8038 0, 0, 0, 0, 0, 0, 0, 0,
8039 0, 0, 0, 0, 0, 0, 0, 0,
8040 0, 0, 0, 0, 0, 0, 0, 0,
8041 0, 0, 0, 0, 0, 0, 0, 0,
8042 0, 0, 0, 0, 0, 0, 0, 0,
8043 0, 0, 0, 0, 0, 0, 0, 0,
8044 0, 0, 0, 0, 0, 0, 0, 0,
8045 0, 0, 0, 0, 0, 0, 0, 0,
8046
8047 0, 0, 0, 0, 0, 0, 0, 0,
8048 0, 0, 0, 0, 0, 0, 0, 0,
8049 0, 0, 0, 0, 0, 0, 0, 0,
8050 0, 0, 0, 0, 0, 0, 0, 0,
8051 0, 913, 915, 0, 0, 0, 0, 0,
8052 0, 0, 0, 0, 0, 0, 0, 0,
8053 0, 0, 0, 0, 0, 0, 0, 0,
8054 0, 0, 0, 0, 0, 0, 0, 0,
8055 0, 0, 0, 0, 0, 0, 0, 917,
8056 0, 0, 0, 0, 0, 0, 0, 0,
8057 0, 0, 0, 0, 0, 0, 0, 0,
8058 0, 0, 0, 0, 0, 0, 0, 0,
8059 0, 0, 0, 0, 0, 0, 0, 0,
8060 0, 0, 0, 0, 0, 0, 0, 0,
8061 0, 0, 0, 0, 0, 0, 0, 0,
8062 0, 0, 0, 0, 0, 0, 0, 0,
8063 0, 0, 0, 0, 0, 0, 0, 0,
8064 0, 0, 0, 0, 0, 0, 0, 0,
8065 0, 0, 921, 0, 0, 0, 0, 0,
8066 0, 0, 0, 0, 0, 0, 0, 0,
8067 0, 0, 0, 0, 0, 0, 0, 0,
8068 0, 0, 0, 0, 0, 0, 0, 0,
8069 0, 0, 0, 0, 0, 0, 0, 0,
8070 0, 0, 0, 0, 0, 0, 0, 0,
8071 0, 0, 0, 0, 0, 0, 923, 926,
8072 0, 0, 0, 0, 0, 0, 0, 0,
8073 0, 0, 0, 0, 0, 0, 0, 0,
8074 0, 0, 0, 0, 0, 0, 0, 0,
8075 0, 0, 0, 0, 0, 0, 0, 0,
8076 0, 0, 0, 0, 0, 0, 0, 0,
8077 0, 0, 0, 0, 0, 0, 0, 0,
8078 0, 0, 0, 0, 0, 0, 0, 0,
8079
8080 0, 0, 0, 0, 0, 0, 0, 0,
8081 0, 0, 0, 0, 0, 0, 0, 0,
8082 0, 0, 0, 0, 0, 0, 0, 0,
8083 0, 0, 0, 0, 0, 0, 0, 0,
8084 0, 0, 0, 0, 0, 0, 0, 0,
8085 0, 0, 0, 0, 0, 0, 0, 0,
8086 0, 0, 0, 0, 0, 0, 0, 0,
8087 0, 0, 0, 0, 0, 0, 0, 0,
8088 0, 0, 0, 0, 0, 0, 928, 0,
8089 0, 0, 0, 0, 0, 0, 0, 0,
8090 0, 0, 0, 0, 0, 0, 0, 0,
8091 0, 0, 0, 0, 0, 0, 0, 0,
8092 0, 0, 0, 0, 0, 0, 0, 0,
8093 0, 0, 0, 0, 0, 0, 0, 0,
8094 0, 0, 0, 0, 0, 0, 0, 0,
8095 0, 0, 0, 0, 0, 0, 0, 0,
8096 0, 0, 0, 0, 0, 0, 0, 0,
8097 0, 0, 0, 0, 0, 0, 0, 0,
8098 0, 0, 0, 0, 0, 0, 0, 0,
8099 0, 0, 0, 0, 0, 0, 0, 0,
8100 0, 0, 0, 0, 0, 0, 0, 0,
8101 0, 0, 0, 0, 0, 0, 0, 0,
8102 0, 0, 0, 0, 0, 0, 0, 0,
8103 0, 0, 0, 0, 0, 0, 0, 930,
8104 0, 0, 0, 0, 0, 0, 932, 0,
8105 0, 0, 936, 0, 0, 0, 0, 0,
8106 0, 0, 0, 0, 0, 0, 0, 0,
8107 0, 0, 0, 0, 0, 0, 0, 0,
8108 0, 0, 0, 0, 0, 0, 0, 0,
8109 0, 0, 0, 0, 0, 0, 0, 0,
8110 0, 0, 0, 0, 0, 0, 0, 0,
8111 0, 0, 0, 0, 0, 0, 0, 0,
8112
8113 0, 0, 0, 0, 0, 0, 0, 0,
8114 0, 0, 0, 0, 0, 0, 0, 0,
8115 0, 0, 0, 0, 0, 0, 0, 0,
8116 0, 0, 0, 0, 0, 0, 0, 0,
8117 0, 0, 0, 0, 0, 0, 0, 0,
8118 0, 0, 0, 0, 0, 0, 0, 0,
8119 0, 0, 0, 0, 0, 0, 0, 0,
8120 0, 0, 0, 0, 0, 0, 0, 0,
8121 0, 0, 0, 0, 0, 0, 938, 941,
8122 0, 0, 0, 0, 0, 0, 0, 0,
8123 0, 0, 0, 0, 0, 0, 0, 0,
8124 0, 0, 0, 0, 0, 0, 0, 0,
8125 0, 0, 0, 0, 0, 0, 0, 0,
8126 0, 0, 0, 0, 0, 0, 0, 0,
8127 0, 0, 0, 0, 0, 0, 0, 0,
8128 0, 0, 0, 0, 0, 0, 0, 0,
8129 0, 0, 0, 0, 0, 0, 0, 0,
8130 0, 0, 0, 0, 0, 0, 0, 0,
8131 0, 0, 0, 0, 0, 0, 0, 0,
8132 0, 0, 0, 0, 0, 0, 0, 0,
8133 0, 0, 0, 0, 0, 0, 0, 0,
8134 0, 0, 0, 0, 0, 0, 0, 0,
8135 0, 0, 0, 0, 0, 0, 0, 0,
8136 0, 0, 0, 0, 0, 0, 0, 0,
8137 0, 0, 0, 0, 0, 0, 0, 0,
8138 0, 0, 0, 0, 0, 0, 0, 0,
8139 0, 0, 0, 0, 0, 0, 0, 0,
8140 0, 943, 0, 0, 947, 0, 0, 0,
8141 0, 0, 0, 0, 0, 0, 0, 0,
8142 0, 0, 0, 0, 0, 0, 0, 0,
8143 0, 0, 0, 0, 0, 0, 0, 0,
8144 0, 0, 0, 0, 0, 0, 0, 0,
8145
8146 0, 0, 0, 0, 0, 0, 0, 0,
8147 0, 0, 0, 0, 0, 0, 0, 0,
8148 0, 0, 0, 0, 0, 0, 0, 0,
8149 0, 0, 0, 0, 0, 0, 0, 0,
8150 0, 0, 0, 0, 0, 0, 0, 0,
8151 0, 0, 0, 0, 0, 0, 0, 0,
8152 0, 0, 0, 0, 0, 0, 0, 0,
8153 0, 0, 0, 0, 0, 0, 0, 0,
8154 949, 0, 951, 0, 0, 0, 0, 0,
8155 0, 0, 0, 0, 953, 0, 0, 0,
8156 0, 955, 0, 0, 0, 0, 957, 0,
8157 0, 0, 0, 959, 0, 0, 0, 0,
8158 0, 0, 0, 0, 0, 0, 0, 0,
8159 0, 0, 0, 0, 0, 0, 0, 0,
8160 0, 961, 0, 0, 0, 0, 0, 0,
8161 0, 0, 0, 0, 0, 0, 0, 0,
8162 0, 0, 0, 0, 0, 0, 0, 0,
8163 0, 0, 0, 0, 0, 0, 0, 0,
8164 965, 0, 967, 0, 0, 0, 0, 0,
8165 0, 0, 0, 0, 969, 0, 0, 0,
8166 0, 971, 0, 0, 0, 0, 973, 0,
8167 0, 0, 0, 975, 0, 0, 0, 0,
8168 0, 0, 977, 979, 0, 0, 0, 0,
8169 0, 0, 0, 0, 0, 0, 0, 0,
8170 0, 0, 0, 0, 0, 0, 0, 0,
8171 0, 0, 0, 0, 0, 0, 0, 0,
8172 0, 0, 0, 0, 0, 0, 0, 0,
8173 0, 0, 0, 0, 0, 0, 0, 0,
8174 0, 0, 0, 0, 0, 0, 0, 0,
8175 0, 0, 0, 0, 0, 0, 0, 0,
8176 0, 0, 0, 0, 0, 0, 0, 0,
8177 0, 0, 0, 0, 0, 0, 0, 0,
8178
8179 0, 0, 0, 0, 0, 0, 0, 0,
8180 0, 0, 0, 0, 0, 0, 0, 0,
8181 0, 0, 0, 0, 0, 0, 0, 0,
8182 0, 0, 0, 0, 0, 0, 0, 0,
8183 0, 0, 0, 0, 0, 981, 0, 0,
8184 0, 0, 0, 0, 0, 0, 0, 0,
8185 0, 0, 0, 0, 0, 0, 0, 0,
8186 0, 0, 0, 0, 0, 0, 0, 0,
8187 0, 0, 0, 0, 0, 0, 0, 0,
8188 0, 0, 0, 0, 0, 0, 0, 0,
8189 0, 0, 0, 0, 0, 0, 0, 0,
8190 0, 0, 0, 0, 0, 0, 0, 0,
8191 0, 0, 0, 0, 0, 0, 0, 0,
8192 0, 0, 0, 0, 0, 0, 0, 0,
8193 0, 0, 0, 0, 0, 0, 0, 0,
8194 0, 0, 0, 0, 0, 0, 0, 0,
8195 0, 0, 0, 0, 0, 0, 0, 0,
8196 0, 0, 0, 0, 0, 0, 0, 0,
8197 0, 0, 0, 0, 0, 0, 0, 0,
8198 0, 0, 0, 0, 0, 0, 0, 0,
8199 0, 0, 0, 0, 0, 0, 0, 0,
8200 0, 0, 0, 0, 0, 0, 0, 0,
8201 0, 0, 0, 0, 0, 0, 0, 0,
8202 0, 0, 0, 0, 0, 0, 0, 0,
8203 0, 0, 0, 0, 0, 0, 0, 0,
8204 0, 0, 0, 0, 0, 0, 0, 0,
8205 0, 0, 0, 0, 0, 0, 0, 0,
8206 0, 0, 0, 0, 0, 0, 0, 0,
8207 0, 0, 0, 0, 0, 0, 0, 0,
8208 0, 0, 0, 0, 0, 0, 0, 0,
8209 0, 0, 0, 0, 0, 0, 0, 0,
8210 0, 0, 0, 0, 0, 0, 0, 0,
8211
8212 0, 0, 0, 0, 0, 0, 0, 0,
8213 0, 0, 0, 0, 0, 0, 0, 0,
8214 0, 0, 0, 0, 0, 0, 0, 0,
8215 0, 0, 0, 0, 0, 0, 0, 0,
8216 0, 0, 0, 0, 0, 0, 0, 0,
8217 0, 0, 0, 0, 0, 0, 0, 0,
8218 0, 0, 0, 0, 0, 0, 983, 985,
8219 0, 0, 0, 0, 0, 0, 0, 0,
8220 0, 0, 0, 0, 0, 0, 0, 0,
8221 0, 0, 0, 0, 0, 0, 0, 0,
8222 0, 0, 0, 0, 0, 0, 0, 0,
8223 0, 0, 987, 989, 0, 0, 0, 0,
8224 0, 0, 991, 993, 0, 0, 0, 0,
8225 0, 0, 0, 0, 0, 0, 0, 0,
8226 0, 0, 0, 0, 0, 0, 0, 0,
8227 0, 0, 0, 0, 0, 0, 0, 0,
8228 0, 0, 0, 0, 0, 0, 0, 0,
8229 0, 0, 0, 0, 0, 0, 0, 0,
8230 0, 0, 0, 0, 0, 0, 0, 0,
8231 0, 0, 0, 0, 0, 0, 0, 0,
8232 995, 998, 0, 0, 0, 0, 0, 0,
8233 0, 0, 0, 0, 0, 0, 0, 0,
8234 0, 0, 0, 0, 0, 0, 0, 0,
8235 1001, 1003, 0, 0, 0, 0, 0, 0,
8236 0, 0, 0, 0, 0, 0, 0, 0,
8237 0, 0, 0, 0, 1005, 1007, 0, 0,
8238 0, 0, 0, 0, 0, 0, 0, 0,
8239 0, 0, 0, 0, 0, 0, 0, 0,
8240 0, 0, 0, 0, 0, 0, 0, 0,
8241 0, 0, 0, 0, 0, 0, 0, 0,
8242 0, 0, 0, 0, 0, 0, 0, 0,
8243 0, 0, 0, 0, 0, 0, 0, 0,
8244
8245 1009, 1014, 1019, 1021, 1023, 1025, 1027, 1029,
8246 1031, 1036, 1041, 1043, 1045, 1047, 1049, 1051,
8247 1053, 1056, 0, 0, 0, 0, 0, 0,
8248 1059, 1062, 0, 0, 0, 0, 0, 0,
8249 1065, 1070, 1075, 1077, 1079, 1081, 1083, 1085,
8250 1087, 1092, 1097, 1099, 1101, 1103, 1105, 1107,
8251 1109, 1113, 0, 0, 0, 0, 0, 0,
8252 1117, 1121, 0, 0, 0, 0, 0, 0,
8253 1125, 1128, 0, 0, 0, 0, 0, 0,
8254 1131, 1134, 0, 0, 0, 0, 0, 0,
8255 1137, 1141, 0, 0, 0, 0, 0, 0,
8256 0, 1145, 0, 0, 0, 0, 0, 0,
8257 1149, 1154, 1159, 1161, 1163, 1165, 1167, 1169,
8258 1171, 1176, 1181, 1183, 1185, 1187, 1189, 1191,
8259 1193, 0, 0, 0, 1195, 0, 0, 0,
8260 0, 0, 0, 0, 1197, 0, 0, 0,
8261 0, 0, 0, 0, 0, 0, 0, 0,
8262 0, 0, 0, 0, 0, 0, 0, 0,
8263 0, 0, 0, 0, 0, 0, 0, 0,
8264 0, 0, 0, 0, 0, 0, 0, 0,
8265 0, 0, 0, 0, 0, 0, 0, 0,
8266 0, 0, 0, 0, 0, 0, 0, 0,
8267 0, 0, 0, 0, 0, 0, 1199, 0,
8268 0, 0, 0, 0, 0, 0, 0, 1201,
8269 0, 0, 0, 0, 0, 0, 1205, 0,
8270 0, 0, 0, 0, 0, 0, 0, 0,
8271 0, 0, 0, 0, 0, 0, 0, 0,
8272 0, 0, 0, 0, 0, 0, 0, 0,
8273 0, 0, 0, 0, 0, 0, 0, 0,
8274 0, 0, 0, 0, 0, 0, 0, 0,
8275 0, 0, 0, 0, 0, 0, 1207, 0,
8276 0, 0, 0, 0, 0, 0, 1209, 0,
8277
8278 0, 0, 0, 0, 0, 0, 0, 0,
8279 0, 0, 0, 0, 0, 0, 0, 0,
8280 0, 0, 0, 0, 0, 0, 0, 0,
8281 0, 0, 0, 0, 0, 0, 0, 0,
8282 0, 0, 0, 0, 0, 0, 0, 0,
8283 0, 0, 0, 0, 0, 0, 0, 0,
8284 0, 0, 0, 0, 0, 0, 0, 0,
8285 0, 0, 0, 0, 0, 0, 0, 0,
8286 0, 0, 0, 0, 0, 0, 0, 0,
8287 0, 0, 0, 0, 0, 0, 0, 0,
8288 0, 0, 0, 0, 0, 0, 0, 0,
8289 0, 0, 0, 0, 0, 0, 0, 0,
8290 0, 0, 0, 0, 0, 0, 0, 0,
8291 0, 0, 0, 0, 0, 0, 0, 0,
8292 0, 0, 0, 0, 0, 0, 0, 0,
8293 0, 0, 0, 0, 0, 0, 0, 0,
8294 0, 0, 0, 0, 0, 0, 0, 0,
8295 0, 0, 0, 0, 0, 0, 0, 0,
8296 1213, 0, 1215, 0, 1217, 0, 0, 0,
8297 0, 0, 0, 0, 0, 0, 0, 0,
8298 0, 0, 0, 0, 0, 0, 0, 0,
8299 0, 0, 0, 0, 0, 0, 0, 0,
8300 0, 0, 0, 0, 0, 0, 0, 0,
8301 0, 0, 0, 0, 0, 0, 0, 0,
8302 0, 0, 0, 0, 0, 0, 0, 0,
8303 0, 0, 0, 0, 0, 0, 0, 0,
8304 1219, 0, 1221, 0, 1223, 0, 0, 0,
8305 0, 0, 0, 0, 0, 0, 0, 0,
8306 0, 0, 0, 0, 0, 0, 0, 0,
8307 0, 0, 0, 0, 0, 0, 0, 0,
8308 0, 0, 0, 0, 0, 0, 0, 0,
8309 0, 0, 0, 0, 0, 0, 0, 0,
8310
8311 0, 0, 0, 1225, 0, 0, 0, 0,
8312 1227, 0, 0, 1229, 0, 0, 0, 0,
8313 0, 0, 0, 0, 0, 0, 0, 0,
8314 0, 0, 0, 0, 0, 0, 0, 0,
8315 0, 0, 0, 1231, 0, 1233, 0, 0,
8316 0, 0, 0, 0, 0, 0, 0, 0,
8317 0, 0, 0, 0, 0, 0, 0, 0,
8318 0, 0, 0, 0, 1235, 0, 0, 0,
8319 0, 0, 0, 1237, 0, 1239, 0, 0,
8320 1241, 0, 0, 0, 0, 1243, 0, 0,
8321 0, 0, 0, 0, 0, 0, 0, 0,
8322 0, 0, 0, 0, 0, 0, 0, 0,
8323 0, 1245, 0, 0, 1247, 1249, 0, 0,
8324 0, 0, 0, 0, 0, 0, 0, 0,
8325 0, 0, 1251, 1253, 0, 0, 1255, 1257,
8326 0, 0, 1259, 1261, 1263, 1265, 0, 0,
8327 0, 0, 1267, 1269, 0, 0, 1271, 1273,
8328 0, 0, 0, 0, 0, 0, 0, 0,
8329 0, 1275, 1277, 0, 0, 0, 0, 0,
8330 0, 0, 0, 0, 0, 0, 0, 0,
8331 0, 0, 1279, 0, 0, 0, 0, 0,
8332 1281, 1283, 0, 1285, 0, 0, 0, 0,
8333 0, 0, 1287, 1289, 1291, 1293, 0, 0,
8334 0, 0, 0, 0, 0, 0, 0, 0,
8335 0, 0, 0, 0, 0, 0, 0, 0,
8336 0, 0, 0, 0, 0, 0, 0, 0,
8337 0, 0, 0, 0, 0, 0, 0, 0,
8338 0, 0, 0, 0, 0, 0, 0, 0,
8339 0, 0, 0, 0, 0, 0, 0, 0,
8340 0, 0, 0, 0, 0, 0, 0, 0,
8341 0, 0, 0, 0, 0, 0, 0, 0,
8342 0, 0, 0, 0, 0, 0, 0, 0,
8343
8344 0, 0, 0, 0, 0, 0, 0, 0,
8345 0, 0, 0, 0, 0, 0, 0, 0,
8346 0, 0, 0, 0, 0, 0, 0, 0,
8347 0, 0, 0, 0, 0, 0, 0, 0,
8348 0, 0, 0, 0, 0, 0, 0, 0,
8349 0, 0, 0, 0, 0, 0, 0, 0,
8350 0, 0, 0, 0, 0, 0, 0, 0,
8351 0, 0, 0, 0, 0, 0, 0, 0,
8352 0, 0, 0, 0, 0, 0, 0, 0,
8353 0, 0, 0, 0, 0, 0, 0, 0,
8354 0, 0, 0, 0, 0, 0, 0, 0,
8355 0, 0, 0, 0, 0, 0, 0, 0,
8356 0, 0, 0, 0, 0, 0, 0, 0,
8357 0, 0, 0, 0, 0, 0, 0, 0,
8358 0, 0, 0, 0, 0, 0, 0, 0,
8359 0, 0, 0, 0, 0, 0, 0, 0,
8360 0, 0, 0, 0, 0, 0, 0, 0,
8361 0, 0, 0, 0, 0, 0, 0, 0,
8362 0, 0, 0, 0, 0, 0, 0, 0,
8363 0, 0, 0, 0, 0, 0, 0, 0,
8364 0, 0, 0, 0, 0, 0, 0, 0,
8365 0, 0, 0, 0, 0, 0, 0, 0,
8366 0, 0, 0, 0, 0, 0, 0, 0,
8367 0, 0, 0, 0, 0, 0, 0, 0,
8368 0, 0, 0, 0, 0, 0, 0, 0,
8369 0, 0, 0, 0, 0, 0, 0, 0,
8370 0, 0, 0, 0, 0, 0, 0, 0,
8371 0, 0, 0, 0, 0, 1295, 0, 0,
8372 0, 0, 0, 0, 0, 0, 0, 0,
8373 0, 0, 0, 0, 0, 0, 0, 0,
8374 0, 0, 0, 0, 0, 0, 0, 0,
8375 0, 0, 0, 0, 0, 0, 0, 0,
8376
8377 0, 0, 0, 0, 0, 0, 0, 0,
8378 0, 0, 0, 0, 0, 0, 0, 0,
8379 0, 0, 0, 0, 0, 0, 0, 0,
8380 0, 0, 0, 0, 0, 0, 0, 0,
8381 0, 0, 0, 0, 0, 0, 0, 0,
8382 0, 0, 0, 0, 0, 0, 0, 0,
8383 0, 0, 0, 0, 0, 0, 0, 0,
8384 0, 0, 0, 0, 0, 0, 0, 0,
8385 0, 0, 0, 0, 0, 0, 1297, 0,
8386 0, 0, 0, 1299, 0, 1301, 0, 1303,
8387 0, 1305, 0, 1307, 0, 1309, 0, 1311,
8388 0, 1313, 0, 1315, 0, 1317, 0, 1319,
8389 0, 1321, 0, 0, 1323, 0, 1325, 0,
8390 1327, 0, 0, 0, 0, 0, 0, 1329,
8391 0, 0, 1332, 0, 0, 1335, 0, 0,
8392 1338, 0, 0, 1341, 0, 0, 0, 0,
8393 0, 0, 0, 0, 0, 0, 0, 0,
8394 0, 0, 0, 0, 0, 0, 0, 0,
8395 0, 0, 0, 0, 0, 0, 0, 0,
8396 0, 0, 0, 0, 0, 1344, 0, 0,
8397 0, 0, 0, 0, 0, 0, 1346, 0,
8398 0, 0, 0, 1348, 0, 1350, 0, 1352,
8399 0, 1354, 0, 1356, 0, 1358, 0, 1360,
8400 0, 1362, 0, 1364, 0, 1366, 0, 1368,
8401 0, 1370, 0, 0, 1372, 0, 1374, 0,
8402 1376, 0, 0, 0, 0, 0, 0, 1378,
8403 0, 0, 1381, 0, 0, 1384, 0, 0,
8404 1387, 0, 0, 1390, 0, 0, 0, 0,
8405 0, 0, 0, 0, 0, 0, 0, 0,
8406 0, 0, 0, 0, 0, 0, 0, 1393,
8407 1395, 1397, 1399, 0, 0, 0, 0, 0,
8408 0, 0, 0, 0, 0, 1401, 0, 0,
8409
8410 0, 0, 0, 0, 0, 0, 0, 0,
8411 0, 0, 0, 0, 0, 0, 0, 0,
8412 0, 0, 0, 0, 0, 0, 0, 0,
8413 0, 0, 0, 0, 0, 0, 0, 0,
8414 0, 0, 0, 0, 0, 0, 0, 0,
8415 0, 0, 0, 0, 0, 0, 0, 0,
8416 0, 0, 0, 0, 0, 0, 0, 0,
8417 0, 0, 0, 0, 0, 0, 0, 0,
8418 0, 0, 0, 0, 0, 0, 0, 0,
8419 0, 1403, 0, 0, 0, 0, 0, 0,
8420 0, 0, 0, 0, 0, 0, 0, 0,
8421 0, 0, 0, 0, 0, 0, 0, 0,
8422 0, 0, 0, 0, 0, 0, 0, 0,
8423 0, 0, 0, 0, 0, 0, 0, 0,
8424 0, 0, 0, 0, 0, 0, 0, 0,
8425 0, 0, 0, 0, 0, 0, 0, 0,
8426 0, 0, 0, 0, 0, 0, 0, 0,
8427 0, 0, 0, 0, 0, 0, 0, 0,
8428 0, 0, 0, 0, 0, 0, 0, 0,
8429 0, 0, 0, 0, 0, 0, 0, 0,
8430 0, 0, 0, 0, 0, 0, 0, 0,
8431 0, 0, 0, 0, 0, 0, 0, 0,
8432 0, 0, 0, 0, 0, 0, 0, 0,
8433 0, 0, 0, 0, 0, 0, 0, 0,
8434 0, 0, 0, 0, 0, 0, 0, 0,
8435 0, 0, 0, 0, 0, 0, 0, 0,
8436 0, 0, 0, 0, 0, 0, 0, 0,
8437 0, 0, 0, 0, 0, 0, 0, 0,
8438 0, 0, 0, 0, 0, 0, 0, 0,
8439 0, 0, 0, 0, 0, 0, 0, 0,
8440 0, 0, 0, 0, 0, 0, 0, 0,
8441 0, 0, 0, 0, 0, 0, 0, 0,
8442};
8443
8444// 14586 bytes
8445
8446const Q_UINT8 QUnicodeTables::direction_info[] = {
8447 1, 2, 3, 4, 5, 6, 7, 8,
8448 2, 9, 10, 11, 12, 13, 14, 15,
8449 16, 2, 2, 2, 2, 2, 17, 18,
8450 19, 2, 2, 2, 2, 2, 2, 20,
8451 21, 22, 23, 24, 25, 26, 27, 28,
8452 26, 29, 30, 2, 2, 2, 31, 32,
8453 33, 2, 34, 2, 2, 2, 2, 2,
8454 2, 2, 2, 2, 2, 2, 2, 2,
8455 2, 2, 2, 2, 2, 2, 2, 2,
8456 2, 2, 2, 2, 2, 2, 2, 2,
8457 2, 2, 2, 2, 2, 2, 2, 2,
8458 2, 2, 2, 2, 2, 2, 2, 2,
8459 2, 2, 2, 2, 2, 2, 2, 2,
8460 2, 2, 2, 2, 2, 2, 2, 2,
8461 2, 2, 2, 2, 2, 2, 2, 2,
8462 2, 2, 2, 2, 2, 2, 2, 2,
8463 2, 2, 2, 2, 2, 2, 2, 2,
8464 2, 2, 2, 2, 2, 2, 2, 2,
8465 2, 2, 2, 2, 2, 2, 2, 2,
8466 2, 2, 2, 2, 2, 2, 2, 2,
8467 2, 2, 2, 2, 35, 2, 2, 2,
8468 2, 2, 2, 2, 2, 2, 2, 2,
8469 2, 2, 2, 2, 2, 2, 2, 2,
8470 2, 2, 2, 2, 2, 2, 2, 2,
8471 2, 2, 2, 2, 2, 2, 2, 2,
8472 2, 2, 2, 2, 2, 2, 2, 2,
8473 2, 2, 2, 2, 2, 2, 2, 2,
8474 2, 2, 2, 2, 2, 2, 2, 2,
8475 2, 2, 2, 2, 2, 2, 2, 2,
8476 2, 2, 2, 2, 2, 2, 2, 2,
8477 2, 2, 2, 2, 2, 2, 2, 2,
8478 2, 2, 2, 36, 37, 38, 39, 40,
8479
8480
8481 18, 18, 18, 18, 18, 18, 18, 18,
8482 18, 8, 7, 8, 9, 7, 18, 18,
8483 18, 18, 18, 18, 18, 18, 18, 18,
8484 18, 18, 18, 18, 7, 7, 7, 8,
8485 9, 10, 10, 4, 4, 4, 10, 10,
8486 138, 138, 10, 4, 6, 4, 6, 3,
8487 2, 2, 2, 2, 2, 2, 2, 2,
8488 2, 2, 6, 10, 138, 10, 138, 10,
8489 10, 0, 0, 0, 0, 0, 0, 0,
8490 0, 0, 0, 0, 0, 0, 0, 0,
8491 0, 0, 0, 0, 0, 0, 0, 0,
8492 0, 0, 0, 138, 10, 138, 10, 10,
8493 10, 0, 0, 0, 0, 0, 0, 0,
8494 0, 0, 0, 0, 0, 0, 0, 0,
8495 0, 0, 0, 0, 0, 0, 0, 0,
8496 0, 0, 0, 138, 10, 138, 10, 18,
8497 18, 18, 18, 18, 18, 7, 18, 18,
8498 18, 18, 18, 18, 18, 18, 18, 18,
8499 18, 18, 18, 18, 18, 18, 18, 18,
8500 18, 18, 18, 18, 18, 18, 18, 18,
8501 6, 10, 4, 4, 4, 4, 10, 10,
8502 10, 10, 0, 138, 10, 10, 10, 10,
8503 4, 4, 2, 2, 10, 0, 10, 10,
8504 10, 2, 0, 138, 10, 10, 10, 10,
8505 0, 0, 0, 0, 0, 0, 0, 0,
8506 0, 0, 0, 0, 0, 0, 0, 0,
8507 0, 0, 0, 0, 0, 0, 0, 10,
8508 0, 0, 0, 0, 0, 0, 0, 0,
8509 0, 0, 0, 0, 0, 0, 0, 0,
8510 0, 0, 0, 0, 0, 0, 0, 0,
8511 0, 0, 0, 0, 0, 0, 0, 10,
8512 0, 0, 0, 0, 0, 0, 0, 0,
8513
8514 0, 0, 0, 0, 0, 0, 0, 0,
8515 0, 0, 0, 0, 0, 0, 0, 0,
8516 0, 0, 0, 0, 0, 0, 0, 0,
8517 0, 0, 0, 0, 0, 0, 0, 0,
8518 0, 0, 0, 0, 0, 0, 0, 0,
8519 0, 0, 0, 0, 0, 0, 0, 0,
8520 0, 0, 0, 0, 0, 0, 0, 0,
8521 0, 0, 0, 0, 0, 0, 0, 0,
8522 0, 0, 0, 0, 0, 0, 0, 0,
8523 0, 0, 0, 0, 0, 0, 0, 0,
8524 0, 0, 0, 0, 0, 0, 0, 0,
8525 0, 0, 0, 0, 0, 0, 0, 0,
8526 0, 0, 0, 0, 0, 0, 0, 0,
8527 0, 0, 0, 0, 0, 0, 0, 0,
8528 0, 0, 0, 0, 0, 0, 0, 0,
8529 0, 0, 0, 0, 0, 0, 0, 0,
8530 0, 0, 0, 0, 0, 0, 0, 0,
8531 0, 0, 0, 0, 0, 0, 0, 0,
8532 0, 0, 0, 0, 0, 0, 0, 0,
8533 0, 0, 0, 0, 0, 0, 0, 0,
8534 0, 0, 0, 0, 0, 0, 0, 0,
8535 0, 0, 0, 0, 0, 0, 0, 0,
8536 0, 0, 0, 0, 0, 0, 0, 0,
8537 0, 0, 0, 0, 0, 0, 0, 0,
8538 0, 0, 0, 0, 0, 0, 0, 0,
8539 0, 0, 0, 0, 0, 0, 0, 0,
8540 0, 0, 0, 0, 0, 0, 0, 0,
8541 0, 0, 0, 0, 0, 0, 0, 0,
8542 0, 0, 0, 0, 0, 0, 0, 0,
8543 0, 0, 0, 0, 0, 0, 0, 0,
8544 0, 0, 0, 0, 0, 0, 0, 0,
8545 0, 0, 0, 0, 0, 0, 0, 0,
8546
8547 0, 0, 0, 0, 0, 0, 0, 0,
8548 0, 0, 0, 0, 0, 0, 0, 0,
8549 0, 0, 0, 0, 0, 0, 0, 0,
8550 0, 0, 0, 0, 0, 0, 0, 0,
8551 0, 0, 0, 0, 0, 0, 0, 0,
8552 0, 0, 0, 0, 0, 0, 0, 0,
8553 0, 0, 0, 0, 0, 0, 0, 0,
8554 0, 0, 0, 0, 0, 0, 0, 0,
8555 0, 0, 0, 0, 0, 0, 0, 0,
8556 0, 0, 0, 0, 0, 0, 0, 0,
8557 0, 0, 0, 0, 0, 0, 0, 0,
8558 0, 0, 0, 0, 0, 0, 0, 0,
8559 0, 0, 0, 0, 0, 0, 0, 0,
8560 0, 0, 0, 0, 0, 0, 0, 0,
8561 0, 0, 0, 0, 0, 0, 0, 0,
8562 0, 0, 0, 0, 0, 0, 0, 0,
8563 0, 0, 0, 0, 0, 0, 0, 0,
8564 0, 0, 0, 0, 0, 0, 0, 0,
8565 0, 0, 0, 0, 0, 0, 0, 0,
8566 0, 0, 0, 0, 0, 0, 0, 0,
8567 0, 0, 0, 0, 0, 0, 0, 0,
8568 0, 0, 0, 0, 0, 0, 0, 0,
8569 0, 0, 0, 0, 0, 0, 0, 0,
8570 0, 10, 10, 0, 0, 0, 0, 0,
8571 0, 0, 10, 10, 10, 10, 10, 10,
8572 10, 10, 10, 10, 10, 10, 10, 10,
8573 0, 0, 10, 10, 10, 10, 10, 10,
8574 10, 10, 10, 10, 10, 10, 10, 10,
8575 0, 0, 0, 0, 0, 10, 10, 10,
8576 10, 10, 10, 10, 10, 10, 0, 0,
8577 0, 0, 0, 0, 0, 0, 0, 0,
8578 0, 0, 0, 0, 0, 0, 0, 0,
8579
8580 17, 17, 17, 17, 17, 17, 17, 17,
8581 17, 17, 17, 17, 17, 17, 17, 17,
8582 17, 17, 17, 17, 17, 17, 17, 17,
8583 17, 17, 17, 17, 17, 17, 17, 17,
8584 17, 17, 17, 17, 17, 17, 17, 17,
8585 17, 17, 17, 17, 17, 17, 17, 17,
8586 17, 17, 17, 17, 17, 17, 17, 17,
8587 17, 17, 17, 17, 17, 17, 17, 17,
8588 17, 17, 17, 17, 17, 17, 17, 17,
8589 17, 17, 17, 17, 17, 17, 17, 17,
8590 0, 0, 0, 0, 0, 0, 0, 0,
8591 0, 0, 0, 0, 0, 0, 0, 0,
8592 17, 17, 17, 17, 17, 17, 17, 17,
8593 17, 17, 17, 17, 17, 17, 17, 17,
8594 0, 0, 0, 0, 10, 10, 0, 0,
8595 0, 0, 0, 0, 0, 0, 10, 0,
8596 0, 0, 0, 0, 10, 10, 0, 10,
8597 0, 0, 0, 0, 0, 0, 0, 0,
8598 0, 0, 0, 0, 0, 0, 0, 0,
8599 0, 0, 0, 0, 0, 0, 0, 0,
8600 0, 0, 0, 0, 0, 0, 0, 0,
8601 0, 0, 0, 0, 0, 0, 0, 0,
8602 0, 0, 0, 0, 0, 0, 0, 0,
8603 0, 0, 0, 0, 0, 0, 0, 0,
8604 0, 0, 0, 0, 0, 0, 0, 0,
8605 0, 0, 0, 0, 0, 0, 0, 0,
8606 0, 0, 0, 0, 0, 0, 0, 0,
8607 0, 0, 0, 0, 0, 0, 0, 0,
8608 0, 0, 0, 0, 0, 0, 0, 0,
8609 0, 0, 0, 0, 0, 0, 0, 0,
8610 0, 0, 0, 0, 0, 0, 10, 0,
8611 0, 0, 0, 0, 0, 0, 0, 0,
8612
8613 0, 0, 0, 0, 0, 0, 0, 0,
8614 0, 0, 0, 0, 0, 0, 0, 0,
8615 0, 0, 0, 0, 0, 0, 0, 0,
8616 0, 0, 0, 0, 0, 0, 0, 0,
8617 0, 0, 0, 0, 0, 0, 0, 0,
8618 0, 0, 0, 0, 0, 0, 0, 0,
8619 0, 0, 0, 0, 0, 0, 0, 0,
8620 0, 0, 0, 0, 0, 0, 0, 0,
8621 0, 0, 0, 0, 0, 0, 0, 0,
8622 0, 0, 0, 0, 0, 0, 0, 0,
8623 0, 0, 0, 0, 0, 0, 0, 0,
8624 0, 0, 0, 0, 0, 0, 0, 0,
8625 0, 0, 0, 0, 0, 0, 0, 0,
8626 0, 0, 0, 0, 0, 0, 0, 0,
8627 0, 0, 0, 0, 0, 0, 0, 0,
8628 0, 0, 0, 0, 0, 0, 0, 0,
8629 0, 0, 0, 17, 17, 17, 17, 0,
8630 17, 17, 0, 0, 0, 0, 0, 0,
8631 0, 0, 0, 0, 0, 0, 0, 0,
8632 0, 0, 0, 0, 0, 0, 0, 0,
8633 0, 0, 0, 0, 0, 0, 0, 0,
8634 0, 0, 0, 0, 0, 0, 0, 0,
8635 0, 0, 0, 0, 0, 0, 0, 0,
8636 0, 0, 0, 0, 0, 0, 0, 0,
8637 0, 0, 0, 0, 0, 0, 0, 0,
8638 0, 0, 0, 0, 0, 0, 0, 0,
8639 0, 0, 0, 0, 0, 0, 0, 0,
8640 0, 0, 0, 0, 0, 0, 0, 0,
8641 0, 0, 0, 0, 0, 0, 0, 0,
8642 0, 0, 0, 0, 0, 0, 0, 0,
8643 0, 0, 0, 0, 0, 0, 0, 0,
8644 0, 0, 0, 0, 0, 0, 0, 0,
8645
8646 0, 0, 0, 0, 0, 0, 0, 0,
8647 0, 0, 0, 0, 0, 0, 0, 0,
8648 0, 0, 0, 0, 0, 0, 0, 0,
8649 0, 0, 0, 0, 0, 0, 0, 0,
8650 0, 0, 0, 0, 0, 0, 0, 0,
8651 0, 0, 0, 0, 0, 0, 0, 0,
8652 0, 0, 0, 0, 0, 0, 0, 0,
8653 0, 0, 0, 0, 0, 0, 0, 0,
8654 0, 0, 0, 0, 0, 0, 0, 0,
8655 0, 0, 0, 0, 0, 0, 0, 0,
8656 0, 0, 0, 0, 0, 0, 0, 0,
8657 0, 0, 0, 0, 0, 0, 0, 0,
8658 0, 0, 0, 0, 0, 0, 0, 0,
8659 0, 0, 0, 0, 0, 0, 0, 0,
8660 0, 0, 0, 0, 0, 0, 0, 0,
8661 0, 0, 0, 0, 0, 0, 0, 0,
8662 0, 0, 0, 0, 0, 0, 0, 0,
8663 0, 0, 10, 0, 0, 0, 0, 0,
8664 0, 17, 17, 17, 17, 17, 17, 17,
8665 17, 17, 17, 17, 17, 17, 17, 17,
8666 17, 17, 0, 17, 17, 17, 17, 17,
8667 17, 17, 17, 17, 17, 17, 17, 17,
8668 17, 17, 17, 17, 17, 17, 17, 17,
8669 17, 17, 0, 17, 17, 17, 1, 17,
8670 1, 17, 17, 1, 17, 0, 0, 0,
8671 0, 0, 0, 0, 0, 0, 0, 0,
8672 1, 1, 1, 1, 1, 1, 1, 1,
8673 1, 1, 1, 1, 1, 1, 1, 1,
8674 1, 1, 1, 1, 1, 1, 1, 1,
8675 1, 1, 1, 0, 0, 0, 0, 0,
8676 1, 1, 1, 1, 1, 0, 0, 0,
8677 0, 0, 0, 0, 0, 0, 0, 0,
8678
8679 0, 0, 0, 0, 0, 0, 0, 0,
8680 0, 0, 0, 0, 6, 0, 0, 0,
8681 0, 0, 0, 0, 0, 0, 0, 0,
8682 0, 0, 0, 13, 0, 0, 0, 13,
8683 0, 13, 77, 77, 77, 77, 45, 77,
8684 45, 77, 45, 45, 45, 45, 45, 77,
8685 77, 77, 77, 45, 45, 45, 45, 45,
8686 45, 45, 45, 0, 0, 0, 0, 0,
8687 109, 45, 45, 45, 45, 45, 45, 45,
8688 77, 45, 45, 17, 17, 17, 17, 17,
8689 17, 17, 17, 17, 17, 17, 0, 0,
8690 0, 0, 0, 0, 0, 0, 0, 0,
8691 5, 5, 5, 5, 5, 5, 5, 5,
8692 5, 5, 4, 5, 5, 13, 45, 45,
8693 17, 77, 77, 77, 13, 77, 77, 77,
8694 45, 45, 45, 45, 45, 45, 45, 45,
8695 45, 45, 45, 45, 45, 45, 45, 45,
8696 77, 77, 77, 77, 77, 77, 77, 77,
8697 77, 77, 77, 77, 77, 77, 77, 77,
8698 77, 77, 45, 45, 45, 45, 45, 45,
8699 45, 45, 45, 45, 45, 45, 45, 45,
8700 45, 45, 45, 45, 45, 45, 45, 45,
8701 45, 45, 45, 45, 45, 45, 45, 45,
8702 45, 45, 45, 45, 45, 45, 45, 45,
8703 77, 45, 77, 77, 77, 77, 77, 77,
8704 77, 77, 77, 77, 45, 77, 45, 77,
8705 45, 45, 77, 77, 13, 77, 17, 17,
8706 17, 17, 17, 17, 17, 13, 17, 17,
8707 17, 17, 17, 17, 17, 13, 13, 17,
8708 17, 10, 17, 17, 17, 17, 0, 0,
8709 2, 2, 2, 2, 2, 2, 2, 2,
8710 2, 2, 45, 45, 45, 13, 13, 0,
8711
8712 13, 13, 13, 13, 13, 13, 13, 13,
8713 13, 13, 13, 13, 13, 13, 0, 18,
8714 77, 17, 45, 45, 45, 77, 77, 77,
8715 77, 77, 45, 45, 45, 45, 77, 45,
8716 45, 45, 45, 45, 45, 45, 45, 45,
8717 77, 45, 77, 45, 77, 0, 0, 0,
8718 17, 17, 17, 17, 17, 17, 17, 17,
8719 17, 17, 17, 17, 17, 17, 17, 17,
8720 17, 17, 17, 17, 17, 17, 17, 17,
8721 17, 17, 17, 0, 0, 0, 0, 0,
8722 0, 0, 0, 0, 0, 0, 0, 0,
8723 0, 0, 0, 0, 0, 0, 0, 0,
8724 0, 0, 0, 0, 0, 0, 0, 0,
8725 0, 0, 0, 0, 0, 0, 0, 0,
8726 0, 0, 0, 0, 0, 0, 0, 0,
8727 0, 0, 0, 0, 0, 0, 0, 0,
8728 13, 13, 13, 13, 13, 13, 13, 13,
8729 13, 13, 13, 13, 13, 13, 13, 13,
8730 13, 13, 13, 13, 13, 13, 13, 13,
8731 13, 13, 13, 13, 13, 13, 13, 13,
8732 13, 13, 13, 13, 13, 13, 17, 17,
8733 17, 17, 17, 17, 17, 17, 17, 17,
8734 17, 13, 0, 0, 0, 0, 0, 0,
8735 0, 0, 0, 0, 0, 0, 0, 0,
8736 0, 0, 0, 0, 0, 0, 0, 0,
8737 0, 0, 0, 0, 0, 0, 0, 0,
8738 0, 0, 0, 0, 0, 0, 0, 0,
8739 0, 0, 0, 0, 0, 0, 0, 0,
8740 0, 0, 0, 0, 0, 0, 0, 0,
8741 0, 0, 0, 0, 0, 0, 0, 0,
8742 0, 0, 0, 0, 0, 0, 0, 0,
8743 0, 0, 0, 0, 0, 0, 0, 0,
8744
8745 0, 17, 17, 0, 0, 0, 0, 0,
8746 0, 0, 0, 0, 0, 0, 0, 0,
8747 0, 0, 0, 0, 0, 0, 0, 0,
8748 0, 0, 0, 0, 0, 0, 0, 0,
8749 0, 0, 0, 0, 0, 0, 0, 0,
8750 0, 0, 0, 0, 0, 0, 0, 0,
8751 0, 0, 0, 0, 0, 0, 0, 0,
8752 0, 0, 0, 0, 17, 0, 0, 0,
8753 0, 17, 17, 17, 17, 17, 17, 17,
8754 17, 0, 0, 0, 0, 17, 0, 0,
8755 0, 17, 17, 17, 17, 0, 0, 0,
8756 0, 0, 0, 0, 0, 0, 0, 0,
8757 0, 0, 17, 17, 0, 0, 0, 0,
8758 0, 0, 0, 0, 0, 0, 0, 0,
8759 0, 0, 0, 0, 0, 0, 0, 0,
8760 0, 0, 0, 0, 0, 0, 0, 0,
8761 0, 17, 0, 0, 0, 0, 0, 0,
8762 0, 0, 0, 0, 0, 0, 0, 0,
8763 0, 0, 0, 0, 0, 0, 0, 0,
8764 0, 0, 0, 0, 0, 0, 0, 0,
8765 0, 0, 0, 0, 0, 0, 0, 0,
8766 0, 0, 0, 0, 0, 0, 0, 0,
8767 0, 0, 0, 0, 0, 0, 0, 0,
8768 0, 0, 0, 0, 17, 0, 0, 0,
8769 0, 17, 17, 17, 17, 0, 0, 0,
8770 0, 0, 0, 0, 0, 17, 0, 0,
8771 0, 0, 0, 0, 0, 0, 0, 0,
8772 0, 0, 0, 0, 0, 0, 0, 0,
8773 0, 0, 17, 17, 0, 0, 0, 0,
8774 0, 0, 0, 0, 0, 0, 0, 0,
8775 0, 0, 4, 4, 0, 0, 0, 0,
8776 0, 0, 0, 0, 0, 0, 0, 0,
8777
8778 0, 0, 17, 0, 0, 0, 0, 0,
8779 0, 0, 0, 0, 0, 0, 0, 0,
8780 0, 0, 0, 0, 0, 0, 0, 0,
8781 0, 0, 0, 0, 0, 0, 0, 0,
8782 0, 0, 0, 0, 0, 0, 0, 0,
8783 0, 0, 0, 0, 0, 0, 0, 0,
8784 0, 0, 0, 0, 0, 0, 0, 0,
8785 0, 0, 0, 0, 17, 0, 0, 0,
8786 0, 17, 17, 0, 0, 0, 0, 17,
8787 17, 0, 0, 17, 17, 17, 0, 0,
8788 0, 0, 0, 0, 0, 0, 0, 0,
8789 0, 0, 0, 0, 0, 0, 0, 0,
8790 0, 0, 0, 0, 0, 0, 0, 0,
8791 0, 0, 0, 0, 0, 0, 0, 0,
8792 17, 17, 0, 0, 0, 0, 0, 0,
8793 0, 0, 0, 0, 0, 0, 0, 0,
8794 0, 17, 17, 0, 0, 0, 0, 0,
8795 0, 0, 0, 0, 0, 0, 0, 0,
8796 0, 0, 0, 0, 0, 0, 0, 0,
8797 0, 0, 0, 0, 0, 0, 0, 0,
8798 0, 0, 0, 0, 0, 0, 0, 0,
8799 0, 0, 0, 0, 0, 0, 0, 0,
8800 0, 0, 0, 0, 0, 0, 0, 0,
8801 0, 0, 0, 0, 17, 0, 0, 0,
8802 0, 17, 17, 17, 17, 17, 0, 17,
8803 17, 0, 0, 0, 0, 17, 0, 0,
8804 0, 0, 0, 0, 0, 0, 0, 0,
8805 0, 0, 0, 0, 0, 0, 0, 0,
8806 0, 0, 0, 0, 0, 0, 0, 0,
8807 0, 0, 0, 0, 0, 0, 0, 0,
8808 0, 0, 0, 0, 0, 0, 0, 0,
8809 0, 0, 0, 0, 0, 0, 0, 0,
8810
8811 0, 17, 0, 0, 0, 0, 0, 0,
8812 0, 0, 0, 0, 0, 0, 0, 0,
8813 0, 0, 0, 0, 0, 0, 0, 0,
8814 0, 0, 0, 0, 0, 0, 0, 0,
8815 0, 0, 0, 0, 0, 0, 0, 0,
8816 0, 0, 0, 0, 0, 0, 0, 0,
8817 0, 0, 0, 0, 0, 0, 0, 0,
8818 0, 0, 0, 0, 17, 0, 0, 17,
8819 0, 17, 17, 17, 0, 0, 0, 0,
8820 0, 0, 0, 0, 0, 17, 0, 0,
8821 0, 0, 0, 0, 0, 0, 17, 0,
8822 0, 0, 0, 0, 0, 0, 0, 0,
8823 0, 0, 0, 0, 0, 0, 0, 0,
8824 0, 0, 0, 0, 0, 0, 0, 0,
8825 0, 0, 0, 0, 0, 0, 0, 0,
8826 0, 0, 0, 0, 0, 0, 0, 0,
8827 0, 0, 17, 0, 0, 0, 0, 0,
8828 0, 0, 0, 0, 0, 0, 0, 0,
8829 0, 0, 0, 0, 0, 0, 0, 0,
8830 0, 0, 0, 0, 0, 0, 0, 0,
8831 0, 0, 0, 0, 0, 0, 0, 0,
8832 0, 0, 0, 0, 0, 0, 0, 0,
8833 0, 0, 0, 0, 0, 0, 0, 0,
8834 0, 0, 0, 0, 0, 0, 0, 0,
8835 17, 0, 0, 0, 0, 0, 0, 0,
8836 0, 0, 0, 0, 0, 17, 0, 0,
8837 0, 0, 0, 0, 0, 0, 0, 0,
8838 0, 0, 0, 0, 0, 0, 0, 0,
8839 0, 0, 0, 0, 0, 0, 0, 0,
8840 0, 0, 0, 0, 0, 0, 0, 0,
8841 0, 0, 0, 0, 0, 0, 0, 0,
8842 0, 0, 0, 0, 0, 0, 0, 0,
8843
8844 0, 0, 0, 0, 0, 0, 0, 0,
8845 0, 0, 0, 0, 0, 0, 0, 0,
8846 0, 0, 0, 0, 0, 0, 0, 0,
8847 0, 0, 0, 0, 0, 0, 0, 0,
8848 0, 0, 0, 0, 0, 0, 0, 0,
8849 0, 0, 0, 0, 0, 0, 0, 0,
8850 0, 0, 0, 0, 0, 0, 0, 0,
8851 0, 0, 0, 0, 0, 0, 17, 17,
8852 17, 0, 0, 0, 0, 0, 17, 17,
8853 17, 0, 17, 17, 17, 17, 0, 0,
8854 0, 0, 0, 0, 0, 17, 17, 0,
8855 0, 0, 0, 0, 0, 0, 0, 0,
8856 0, 0, 0, 0, 0, 0, 0, 0,
8857 0, 0, 0, 0, 0, 0, 0, 0,
8858 0, 0, 0, 0, 0, 0, 0, 0,
8859 0, 0, 0, 0, 0, 0, 0, 0,
8860 0, 0, 0, 0, 0, 0, 0, 0,
8861 0, 0, 0, 0, 0, 0, 0, 0,
8862 0, 0, 0, 0, 0, 0, 0, 0,
8863 0, 0, 0, 0, 0, 0, 0, 0,
8864 0, 0, 0, 0, 0, 0, 0, 0,
8865 0, 0, 0, 0, 0, 0, 0, 0,
8866 0, 0, 0, 0, 0, 0, 0, 0,
8867 0, 0, 0, 0, 0, 0, 0, 17,
8868 0, 0, 0, 0, 0, 0, 17, 0,
8869 0, 0, 0, 0, 17, 17, 0, 0,
8870 0, 0, 0, 0, 0, 0, 0, 0,
8871 0, 0, 0, 0, 0, 0, 0, 0,
8872 0, 0, 0, 0, 0, 0, 0, 0,
8873 0, 0, 0, 0, 0, 0, 0, 0,
8874 0, 0, 0, 0, 0, 0, 0, 0,
8875 0, 0, 0, 0, 0, 0, 0, 0,
8876
8877 0, 0, 0, 0, 0, 0, 0, 0,
8878 0, 0, 0, 0, 0, 0, 0, 0,
8879 0, 0, 0, 0, 0, 0, 0, 0,
8880 0, 0, 0, 0, 0, 0, 0, 0,
8881 0, 0, 0, 0, 0, 0, 0, 0,
8882 0, 0, 0, 0, 0, 0, 0, 0,
8883 0, 0, 0, 0, 0, 0, 0, 0,
8884 0, 0, 0, 0, 0, 0, 0, 0,
8885 0, 17, 17, 17, 0, 0, 0, 0,
8886 0, 0, 0, 0, 0, 17, 0, 0,
8887 0, 0, 0, 0, 0, 0, 0, 0,
8888 0, 0, 0, 0, 0, 0, 0, 0,
8889 0, 0, 0, 0, 0, 0, 0, 0,
8890 0, 0, 0, 0, 0, 0, 0, 0,
8891 0, 0, 0, 0, 0, 0, 0, 0,
8892 0, 0, 0, 0, 0, 0, 0, 0,
8893 0, 0, 0, 0, 0, 0, 0, 0,
8894 0, 0, 0, 0, 0, 0, 0, 0,
8895 0, 0, 0, 0, 0, 0, 0, 0,
8896 0, 0, 0, 0, 0, 0, 0, 0,
8897 0, 0, 0, 0, 0, 0, 0, 0,
8898 0, 0, 0, 0, 0, 0, 0, 0,
8899 0, 0, 0, 0, 0, 0, 0, 0,
8900 0, 0, 0, 0, 0, 0, 0, 0,
8901 0, 0, 0, 0, 0, 0, 0, 0,
8902 0, 0, 17, 0, 0, 0, 0, 0,
8903 0, 0, 17, 17, 17, 0, 17, 0,
8904 0, 0, 0, 0, 0, 0, 0, 0,
8905 0, 0, 0, 0, 0, 0, 0, 0,
8906 0, 0, 0, 0, 0, 0, 0, 0,
8907 0, 0, 0, 0, 0, 0, 0, 0,
8908 0, 0, 0, 0, 0, 0, 0, 0,
8909
8910 0, 0, 0, 0, 0, 0, 0, 0,
8911 0, 0, 0, 0, 0, 0, 0, 0,
8912 0, 0, 0, 0, 0, 0, 0, 0,
8913 0, 0, 0, 0, 0, 0, 0, 0,
8914 0, 0, 0, 0, 0, 0, 0, 0,
8915 0, 0, 0, 0, 0, 0, 0, 0,
8916 0, 17, 0, 0, 17, 17, 17, 17,
8917 17, 17, 17, 0, 0, 0, 0, 4,
8918 0, 0, 0, 0, 0, 0, 0, 17,
8919 17, 17, 17, 17, 17, 17, 17, 0,
8920 0, 0, 0, 0, 0, 0, 0, 0,
8921 0, 0, 0, 0, 0, 0, 0, 0,
8922 0, 0, 0, 0, 0, 0, 0, 0,
8923 0, 0, 0, 0, 0, 0, 0, 0,
8924 0, 0, 0, 0, 0, 0, 0, 0,
8925 0, 0, 0, 0, 0, 0, 0, 0,
8926 0, 0, 0, 0, 0, 0, 0, 0,
8927 0, 0, 0, 0, 0, 0, 0, 0,
8928 0, 0, 0, 0, 0, 0, 0, 0,
8929 0, 0, 0, 0, 0, 0, 0, 0,
8930 0, 0, 0, 0, 0, 0, 0, 0,
8931 0, 0, 0, 0, 0, 0, 0, 0,
8932 0, 17, 0, 0, 17, 17, 17, 17,
8933 17, 17, 0, 17, 17, 0, 0, 0,
8934 0, 0, 0, 0, 0, 0, 0, 0,
8935 17, 17, 17, 17, 17, 17, 0, 0,
8936 0, 0, 0, 0, 0, 0, 0, 0,
8937 0, 0, 0, 0, 0, 0, 0, 0,
8938 0, 0, 0, 0, 0, 0, 0, 0,
8939 0, 0, 0, 0, 0, 0, 0, 0,
8940 0, 0, 0, 0, 0, 0, 0, 0,
8941 0, 0, 0, 0, 0, 0, 0, 0,
8942
8943 0, 0, 0, 0, 0, 0, 0, 0,
8944 0, 0, 0, 0, 0, 0, 0, 0,
8945 0, 0, 0, 0, 0, 0, 0, 0,
8946 17, 17, 0, 0, 0, 0, 0, 0,
8947 0, 0, 0, 0, 0, 0, 0, 0,
8948 0, 0, 0, 0, 0, 0, 0, 0,
8949 0, 0, 0, 0, 0, 17, 0, 17,
8950 0, 17, 10, 10, 10, 10, 0, 0,
8951 0, 0, 0, 0, 0, 0, 0, 0,
8952 0, 0, 0, 0, 0, 0, 0, 0,
8953 0, 0, 0, 0, 0, 0, 0, 0,
8954 0, 0, 0, 0, 0, 0, 0, 0,
8955 0, 0, 0, 0, 0, 0, 0, 0,
8956 0, 0, 0, 0, 0, 0, 0, 0,
8957 0, 17, 17, 17, 17, 17, 17, 17,
8958 17, 17, 17, 17, 17, 17, 17, 0,
8959 17, 17, 17, 17, 17, 0, 17, 17,
8960 0, 0, 0, 0, 0, 0, 0, 0,
8961 17, 17, 17, 17, 17, 17, 17, 17,
8962 0, 17, 17, 17, 17, 17, 17, 17,
8963 17, 17, 17, 17, 17, 17, 17, 17,
8964 17, 17, 17, 17, 17, 17, 17, 17,
8965 17, 17, 17, 17, 17, 17, 17, 17,
8966 17, 17, 17, 17, 17, 0, 0, 0,
8967 0, 0, 0, 0, 0, 0, 17, 0,
8968 0, 0, 0, 0, 0, 0, 0, 0,
8969 0, 0, 0, 0, 0, 0, 0, 0,
8970 0, 0, 0, 0, 0, 0, 0, 0,
8971 0, 0, 0, 0, 0, 0, 0, 0,
8972 0, 0, 0, 0, 0, 0, 0, 0,
8973 0, 0, 0, 0, 0, 0, 0, 0,
8974 0, 0, 0, 0, 0, 0, 0, 0,
8975
8976 0, 0, 0, 0, 0, 0, 0, 0,
8977 0, 0, 0, 0, 0, 0, 0, 0,
8978 0, 0, 0, 0, 0, 0, 0, 0,
8979 0, 0, 0, 0, 0, 0, 0, 0,
8980 0, 0, 0, 0, 0, 0, 0, 0,
8981 0, 0, 0, 0, 0, 17, 17, 17,
8982 17, 0, 17, 0, 0, 0, 17, 17,
8983 0, 17, 0, 0, 0, 0, 0, 0,
8984 0, 0, 0, 0, 0, 0, 0, 0,
8985 0, 0, 0, 0, 0, 0, 0, 0,
8986 0, 0, 0, 0, 0, 0, 0, 0,
8987 17, 17, 0, 0, 0, 0, 0, 0,
8988 0, 0, 0, 0, 0, 0, 0, 0,
8989 0, 0, 0, 0, 0, 0, 0, 0,
8990 0, 0, 0, 0, 0, 0, 0, 0,
8991 0, 0, 0, 0, 0, 0, 0, 0,
8992 0, 0, 0, 0, 0, 0, 0, 0,
8993 0, 0, 0, 0, 0, 0, 0, 0,
8994 0, 0, 0, 0, 0, 0, 0, 0,
8995 0, 0, 0, 0, 0, 0, 0, 0,
8996 0, 0, 0, 0, 0, 0, 0, 0,
8997 0, 0, 0, 0, 0, 0, 0, 0,
8998 0, 0, 0, 0, 0, 0, 0, 0,
8999 0, 0, 0, 0, 0, 0, 0, 0,
9000 0, 0, 0, 0, 0, 0, 0, 0,
9001 0, 0, 0, 0, 0, 0, 0, 0,
9002 0, 0, 0, 0, 0, 0, 0, 0,
9003 0, 0, 0, 0, 0, 0, 0, 0,
9004 0, 0, 0, 0, 0, 0, 0, 0,
9005 0, 0, 0, 0, 0, 0, 0, 0,
9006 0, 0, 0, 0, 0, 0, 0, 0,
9007 0, 0, 0, 0, 0, 0, 0, 0,
9008
9009 0, 0, 0, 0, 0, 0, 0, 0,
9010 0, 0, 0, 0, 0, 0, 0, 0,
9011 0, 0, 0, 0, 0, 0, 0, 0,
9012 0, 0, 0, 0, 0, 0, 0, 0,
9013 0, 0, 0, 0, 0, 0, 0, 0,
9014 0, 0, 0, 0, 0, 0, 0, 0,
9015 0, 0, 0, 0, 0, 0, 0, 0,
9016 0, 0, 0, 0, 0, 0, 0, 0,
9017 0, 0, 0, 0, 0, 0, 0, 0,
9018 0, 0, 0, 0, 0, 0, 0, 0,
9019 0, 0, 0, 0, 0, 0, 0, 0,
9020 0, 0, 0, 0, 0, 0, 0, 0,
9021 0, 0, 0, 0, 0, 0, 0, 0,
9022 0, 0, 0, 0, 0, 0, 0, 0,
9023 0, 0, 0, 0, 0, 0, 0, 0,
9024 0, 0, 0, 0, 0, 0, 0, 0,
9025 9, 0, 0, 0, 0, 0, 0, 0,
9026 0, 0, 0, 0, 0, 0, 0, 0,
9027 0, 0, 0, 0, 0, 0, 0, 0,
9028 0, 0, 0, 10, 10, 0, 0, 0,
9029 0, 0, 0, 0, 0, 0, 0, 0,
9030 0, 0, 0, 0, 0, 0, 0, 0,
9031 0, 0, 0, 0, 0, 0, 0, 0,
9032 0, 0, 0, 0, 0, 0, 0, 0,
9033 0, 0, 0, 0, 0, 0, 0, 0,
9034 0, 0, 0, 0, 0, 0, 0, 0,
9035 0, 0, 0, 0, 0, 0, 0, 0,
9036 0, 0, 0, 0, 0, 0, 0, 0,
9037 0, 0, 0, 0, 0, 0, 0, 0,
9038 0, 0, 0, 0, 0, 0, 0, 0,
9039 0, 0, 0, 0, 0, 0, 0, 0,
9040 0, 0, 0, 0, 0, 0, 0, 0,
9041
9042 0, 0, 0, 0, 0, 0, 0, 0,
9043 0, 0, 0, 0, 0, 0, 0, 0,
9044 0, 0, 17, 17, 17, 0, 0, 0,
9045 0, 0, 0, 0, 0, 0, 0, 0,
9046 0, 0, 0, 0, 0, 0, 0, 0,
9047 0, 0, 0, 0, 0, 0, 0, 0,
9048 0, 0, 17, 17, 17, 0, 0, 0,
9049 0, 0, 0, 0, 0, 0, 0, 0,
9050 0, 0, 0, 0, 0, 0, 0, 0,
9051 0, 0, 0, 0, 0, 0, 0, 0,
9052 0, 0, 17, 17, 0, 0, 0, 0,
9053 0, 0, 0, 0, 0, 0, 0, 0,
9054 0, 0, 0, 0, 0, 0, 0, 0,
9055 0, 0, 0, 0, 0, 0, 0, 0,
9056 0, 0, 17, 17, 0, 0, 0, 0,
9057 0, 0, 0, 0, 0, 0, 0, 0,
9058 0, 0, 0, 0, 0, 0, 0, 0,
9059 0, 0, 0, 0, 0, 0, 0, 0,
9060 0, 0, 0, 0, 0, 0, 0, 0,
9061 0, 0, 0, 0, 0, 0, 0, 0,
9062 0, 0, 0, 0, 0, 0, 0, 0,
9063 0, 0, 0, 0, 0, 0, 0, 0,
9064 0, 0, 0, 0, 0, 0, 0, 17,
9065 17, 17, 17, 17, 17, 17, 0, 0,
9066 0, 0, 0, 0, 0, 0, 17, 0,
9067 0, 17, 17, 17, 17, 17, 17, 17,
9068 17, 17, 17, 17, 0, 0, 0, 0,
9069 0, 0, 0, 4, 0, 0, 0, 0,
9070 0, 0, 0, 0, 0, 0, 0, 0,
9071 0, 0, 0, 0, 0, 0, 0, 0,
9072 0, 0, 0, 0, 0, 0, 0, 0,
9073 0, 0, 0, 0, 0, 0, 0, 0,
9074
9075 10, 10, 10, 10, 10, 10, 10, 10,
9076 10, 10, 10, 17, 17, 17, 18, 0,
9077 0, 0, 0, 0, 0, 0, 0, 0,
9078 0, 0, 0, 0, 0, 0, 0, 0,
9079 0, 0, 0, 0, 0, 0, 0, 0,
9080 0, 0, 0, 0, 0, 0, 0, 0,
9081 0, 0, 0, 0, 0, 0, 0, 0,
9082 0, 0, 0, 0, 0, 0, 0, 0,
9083 0, 0, 0, 0, 0, 0, 0, 0,
9084 0, 0, 0, 0, 0, 0, 0, 0,
9085 0, 0, 0, 0, 0, 0, 0, 0,
9086 0, 0, 0, 0, 0, 0, 0, 0,
9087 0, 0, 0, 0, 0, 0, 0, 0,
9088 0, 0, 0, 0, 0, 0, 0, 0,
9089 0, 0, 0, 0, 0, 0, 0, 0,
9090 0, 0, 0, 0, 0, 0, 0, 0,
9091 0, 0, 0, 0, 0, 0, 0, 0,
9092 0, 0, 0, 0, 0, 0, 0, 0,
9093 0, 0, 0, 0, 0, 0, 0, 0,
9094 0, 0, 0, 0, 0, 0, 0, 0,
9095 0, 0, 0, 0, 0, 0, 0, 0,
9096 0, 17, 0, 0, 0, 0, 0, 0,
9097 0, 0, 0, 0, 0, 0, 0, 0,
9098 0, 0, 0, 0, 0, 0, 0, 0,
9099 0, 0, 0, 0, 0, 0, 0, 0,
9100 0, 0, 0, 0, 0, 0, 0, 0,
9101 0, 0, 0, 0, 0, 0, 0, 0,
9102 0, 0, 0, 0, 0, 0, 0, 0,
9103 0, 0, 0, 0, 0, 0, 0, 0,
9104 0, 0, 0, 0, 0, 0, 0, 0,
9105 0, 0, 0, 0, 0, 0, 0, 0,
9106 0, 0, 0, 0, 0, 0, 0, 0,
9107
9108 0, 0, 0, 0, 0, 0, 0, 0,
9109 0, 0, 0, 0, 0, 0, 0, 0,
9110 0, 0, 0, 0, 0, 0, 0, 0,
9111 0, 0, 0, 0, 0, 0, 0, 0,
9112 0, 0, 0, 0, 0, 0, 0, 0,
9113 0, 0, 0, 0, 0, 0, 0, 0,
9114 0, 0, 0, 0, 0, 0, 0, 0,
9115 0, 0, 0, 0, 0, 0, 0, 0,
9116 0, 0, 0, 0, 0, 0, 0, 0,
9117 0, 0, 0, 0, 0, 0, 0, 0,
9118 0, 0, 0, 0, 0, 0, 0, 0,
9119 0, 0, 0, 0, 0, 0, 0, 0,
9120 0, 0, 0, 0, 0, 0, 0, 0,
9121 0, 0, 0, 0, 0, 0, 0, 0,
9122 0, 0, 0, 0, 0, 0, 0, 0,
9123 0, 0, 0, 0, 0, 0, 0, 0,
9124 0, 0, 0, 0, 0, 0, 0, 0,
9125 0, 0, 0, 0, 0, 0, 0, 0,
9126 0, 0, 0, 0, 0, 0, 0, 0,
9127 0, 0, 0, 0, 0, 0, 0, 0,
9128 0, 0, 0, 0, 0, 0, 0, 0,
9129 0, 0, 0, 0, 0, 0, 0, 0,
9130 0, 0, 0, 0, 0, 0, 0, 0,
9131 0, 0, 0, 0, 0, 10, 0, 10,
9132 10, 10, 0, 0, 0, 0, 0, 0,
9133 0, 0, 0, 0, 0, 10, 10, 10,
9134 0, 0, 0, 0, 0, 0, 0, 0,
9135 0, 0, 0, 0, 0, 10, 10, 10,
9136 0, 0, 0, 0, 0, 0, 0, 0,
9137 0, 0, 0, 0, 0, 10, 10, 10,
9138 0, 0, 0, 0, 0, 0, 0, 0,
9139 0, 0, 0, 0, 0, 10, 10, 0,
9140
9141 9, 9, 9, 9, 9, 9, 9, 9,
9142 9, 9, 9, 18, 18, 114, 0, 1,
9143 10, 10, 10, 10, 10, 10, 10, 10,
9144 10, 10, 10, 10, 10, 10, 10, 10,
9145 10, 10, 10, 10, 10, 10, 10, 10,
9146 9, 7, 11, 14, 16, 12, 15, 9,
9147 4, 4, 4, 4, 4, 10, 10, 10,
9148 10, 138, 138, 10, 10, 10, 10, 10,
9149 10, 10, 10, 10, 10, 138, 138, 10,
9150 10, 10, 10, 10, 10, 10, 10, 10,
9151 10, 10, 10, 0, 0, 0, 0, 10,
9152 0, 0, 0, 0, 0, 0, 0, 9,
9153 18, 18, 18, 18, 0, 0, 0, 0,
9154 0, 0, 18, 18, 18, 18, 18, 18,
9155 2, 0, 0, 0, 2, 2, 2, 2,
9156 2, 2, 4, 4, 10, 138, 138, 0,
9157 2, 2, 2, 2, 2, 2, 2, 2,
9158 2, 2, 4, 4, 10, 138, 138, 0,
9159 0, 0, 0, 0, 0, 0, 0, 0,
9160 0, 0, 0, 0, 0, 0, 0, 0,
9161 4, 4, 4, 4, 4, 4, 4, 4,
9162 4, 4, 4, 4, 4, 4, 4, 4,
9163 4, 4, 0, 0, 0, 0, 0, 0,
9164 0, 0, 0, 0, 0, 0, 0, 0,
9165 0, 0, 0, 0, 0, 0, 0, 0,
9166 0, 0, 0, 0, 0, 0, 0, 0,
9167 17, 17, 17, 17, 17, 17, 17, 17,
9168 17, 17, 17, 17, 17, 17, 17, 17,
9169 17, 17, 17, 17, 17, 17, 17, 17,
9170 17, 17, 17, 0, 0, 0, 0, 0,
9171 0, 0, 0, 0, 0, 0, 0, 0,
9172 0, 0, 0, 0, 0, 0, 0, 0,
9173
9174 10, 10, 0, 10, 10, 10, 10, 0,
9175 10, 10, 0, 0, 0, 0, 0, 0,
9176 0, 0, 0, 0, 10, 0, 10, 10,
9177 10, 0, 0, 0, 0, 0, 10, 10,
9178 10, 10, 10, 10, 0, 10, 0, 10,
9179 0, 10, 0, 0, 0, 0, 4, 0,
9180 0, 0, 10, 0, 0, 0, 0, 0,
9181 0, 0, 10, 0, 0, 0, 0, 0,
9182 138, 10, 10, 10, 10, 0, 0, 0,
9183 0, 0, 10, 10, 0, 0, 0, 0,
9184 0, 0, 0, 10, 10, 10, 10, 10,
9185 10, 10, 10, 10, 10, 10, 10, 10,
9186 0, 0, 0, 0, 0, 0, 0, 0,
9187 0, 0, 0, 0, 0, 0, 0, 0,
9188 0, 0, 0, 0, 0, 0, 0, 0,
9189 0, 0, 0, 0, 0, 0, 0, 0,
9190 0, 0, 0, 0, 0, 0, 0, 0,
9191 0, 0, 0, 0, 0, 0, 0, 0,
9192 10, 10, 10, 10, 10, 10, 10, 10,
9193 10, 10, 10, 10, 10, 10, 10, 10,
9194 10, 10, 10, 10, 10, 10, 10, 10,
9195 10, 10, 10, 10, 10, 10, 10, 10,
9196 10, 10, 10, 10, 10, 10, 10, 10,
9197 10, 10, 10, 10, 10, 10, 10, 10,
9198 10, 10, 10, 10, 10, 10, 10, 10,
9199 10, 10, 10, 10, 10, 10, 10, 10,
9200 10, 10, 10, 10, 10, 10, 10, 10,
9201 10, 10, 10, 10, 10, 10, 10, 10,
9202 10, 10, 10, 10, 10, 10, 10, 10,
9203 10, 10, 10, 10, 10, 10, 10, 10,
9204 10, 10, 10, 10, 10, 10, 10, 10,
9205 10, 10, 10, 10, 10, 10, 10, 10,
9206
9207 10, 138, 138, 138, 138, 10, 10, 10,
9208 138, 138, 138, 138, 138, 138, 10, 10,
9209 10, 138, 4, 4, 10, 138, 138, 10,
9210 10, 10, 138, 138, 138, 138, 10, 138,
9211 138, 138, 138, 10, 138, 10, 138, 10,
9212 10, 10, 10, 138, 138, 138, 138, 138,
9213 138, 138, 138, 138, 10, 10, 10, 10,
9214 10, 138, 10, 138, 138, 138, 138, 138,
9215 138, 138, 138, 138, 138, 138, 138, 138,
9216 138, 138, 138, 138, 138, 10, 10, 10,
9217 10, 10, 138, 138, 138, 138, 10, 10,
9218 10, 10, 10, 10, 10, 10, 10, 138,
9219 138, 10, 138, 10, 138, 138, 138, 138,
9220 138, 138, 138, 138, 10, 10, 138, 138,
9221 138, 138, 138, 138, 138, 138, 138, 138,
9222 138, 138, 138, 138, 138, 138, 138, 138,
9223 138, 138, 138, 138, 138, 138, 138, 138,
9224 138, 138, 138, 138, 138, 10, 10, 138,
9225 138, 138, 138, 10, 10, 10, 10, 10,
9226 138, 10, 10, 10, 10, 10, 10, 10,
9227 10, 10, 138, 138, 10, 10, 138, 138,
9228 138, 138, 138, 138, 138, 138, 138, 138,
9229 138, 138, 138, 138, 138, 138, 138, 138,
9230 138, 10, 10, 10, 10, 10, 138, 138,
9231 10, 10, 10, 10, 10, 10, 10, 10,
9232 10, 138, 138, 138, 138, 138, 10, 10,
9233 138, 138, 10, 10, 10, 10, 138, 138,
9234 138, 138, 138, 138, 138, 138, 138, 138,
9235 138, 138, 138, 138, 138, 138, 138, 138,
9236 138, 138, 138, 138, 138, 138, 10, 10,
9237 138, 138, 138, 138, 138, 138, 138, 138,
9238 138, 138, 138, 138, 138, 138, 138, 138,
9239
9240 10, 10, 10, 10, 10, 10, 10, 10,
9241 138, 138, 138, 138, 10, 10, 10, 10,
9242 10, 10, 10, 10, 10, 10, 10, 10,
9243 10, 10, 10, 10, 10, 10, 10, 10,
9244 138, 138, 10, 10, 10, 10, 10, 10,
9245 10, 138, 138, 10, 10, 10, 10, 10,
9246 10, 10, 10, 10, 10, 10, 0, 0,
9247 0, 0, 0, 0, 0, 0, 0, 0,
9248 0, 0, 0, 0, 0, 0, 0, 0,
9249 0, 0, 0, 0, 0, 0, 0, 0,
9250 0, 0, 0, 0, 0, 0, 0, 0,
9251 0, 0, 0, 0, 0, 0, 0, 0,
9252 0, 0, 0, 0, 0, 0, 0, 0,
9253 0, 0, 0, 0, 0, 0, 0, 0,
9254 0, 0, 0, 0, 0, 0, 0, 0,
9255 0, 0, 0, 10, 10, 10, 10, 10,
9256 10, 10, 10, 10, 10, 10, 10, 10,
9257 10, 10, 10, 10, 10, 10, 10, 10,
9258 10, 10, 10, 10, 10, 0, 10, 10,
9259 10, 10, 10, 10, 10, 10, 10, 10,
9260 10, 10, 10, 10, 10, 10, 10, 10,
9261 10, 10, 10, 10, 10, 10, 10, 10,
9262 10, 10, 10, 10, 10, 10, 10, 10,
9263 10, 10, 10, 10, 10, 10, 10, 10,
9264 10, 10, 10, 10, 10, 10, 10, 10,
9265 10, 10, 10, 10, 10, 10, 10, 0,
9266 0, 0, 0, 0, 0, 0, 0, 0,
9267 0, 0, 0, 0, 0, 0, 0, 0,
9268 0, 0, 0, 0, 0, 0, 0, 0,
9269 0, 0, 0, 0, 0, 0, 0, 0,
9270 0, 0, 0, 0, 0, 0, 0, 0,
9271 0, 0, 0, 0, 0, 0, 0, 0,
9272
9273 10, 10, 10, 10, 10, 10, 10, 10,
9274 10, 10, 10, 10, 10, 10, 10, 10,
9275 10, 10, 10, 10, 10, 10, 10, 10,
9276 10, 10, 10, 10, 10, 10, 10, 10,
9277 10, 10, 10, 10, 10, 10, 10, 0,
9278 0, 0, 0, 0, 0, 0, 0, 0,
9279 0, 0, 0, 0, 0, 0, 0, 0,
9280 0, 0, 0, 0, 0, 0, 0, 0,
9281 10, 10, 10, 10, 10, 10, 10, 10,
9282 10, 10, 10, 0, 0, 0, 0, 0,
9283 0, 0, 0, 0, 0, 0, 0, 0,
9284 0, 0, 0, 0, 0, 0, 0, 0,
9285 2, 2, 2, 2, 2, 2, 2, 2,
9286 2, 2, 2, 2, 2, 2, 2, 2,
9287 2, 2, 2, 2, 2, 2, 2, 2,
9288 2, 2, 2, 2, 2, 2, 2, 2,
9289 2, 2, 2, 2, 2, 2, 2, 2,
9290 2, 2, 2, 2, 2, 2, 2, 2,
9291 2, 2, 2, 2, 2, 2, 2, 2,
9292 2, 2, 2, 2, 0, 0, 0, 0,
9293 0, 0, 0, 0, 0, 0, 0, 0,
9294 0, 0, 0, 0, 0, 0, 0, 0,
9295 0, 0, 0, 0, 0, 0, 0, 0,
9296 0, 0, 0, 0, 0, 0, 0, 0,
9297 0, 0, 0, 0, 0, 0, 0, 0,
9298 0, 0, 0, 0, 0, 0, 0, 0,
9299 0, 0, 0, 0, 0, 0, 0, 0,
9300 0, 0, 0, 0, 0, 0, 0, 0,
9301 0, 0, 0, 0, 0, 0, 0, 0,
9302 0, 0, 2, 10, 10, 10, 10, 10,
9303 10, 10, 10, 10, 10, 10, 10, 10,
9304 10, 10, 10, 10, 10, 10, 10, 0,
9305
9306 10, 10, 10, 10, 10, 10, 10, 10,
9307 10, 10, 10, 10, 10, 10, 10, 10,
9308 10, 10, 10, 10, 10, 10, 10, 10,
9309 10, 10, 10, 10, 10, 10, 10, 10,
9310 10, 10, 10, 10, 10, 10, 10, 10,
9311 10, 10, 10, 10, 10, 10, 10, 10,
9312 10, 10, 10, 10, 10, 10, 10, 10,
9313 10, 10, 10, 10, 10, 10, 10, 10,
9314 10, 10, 10, 10, 10, 10, 10, 10,
9315 10, 10, 10, 10, 10, 10, 10, 10,
9316 10, 10, 10, 10, 10, 10, 10, 10,
9317 10, 10, 10, 10, 10, 10, 10, 10,
9318 10, 10, 10, 10, 10, 10, 10, 10,
9319 10, 10, 10, 10, 10, 10, 10, 10,
9320 10, 10, 10, 10, 10, 10, 10, 10,
9321 10, 10, 10, 10, 10, 10, 10, 10,
9322 10, 10, 10, 10, 10, 10, 10, 10,
9323 10, 10, 10, 10, 10, 10, 10, 10,
9324 10, 10, 10, 10, 10, 10, 10, 10,
9325 10, 10, 10, 10, 10, 10, 10, 10,
9326 10, 10, 10, 10, 10, 10, 10, 10,
9327 10, 10, 10, 10, 10, 10, 10, 10,
9328 10, 10, 10, 10, 10, 10, 10, 10,
9329 10, 10, 10, 10, 10, 10, 10, 10,
9330 10, 10, 10, 10, 10, 10, 10, 10,
9331 10, 10, 10, 10, 10, 10, 10, 10,
9332 10, 10, 10, 10, 10, 10, 10, 10,
9333 10, 10, 10, 10, 10, 10, 10, 10,
9334 10, 10, 10, 10, 10, 10, 10, 10,
9335 10, 10, 10, 10, 10, 10, 10, 10,
9336 10, 10, 10, 10, 10, 10, 10, 10,
9337 10, 10, 10, 10, 10, 10, 10, 10,
9338
9339 10, 10, 10, 10, 10, 10, 10, 10,
9340 10, 10, 10, 10, 10, 10, 10, 10,
9341 10, 10, 10, 10, 0, 0, 10, 10,
9342 0, 10, 10, 10, 10, 10, 10, 10,
9343 10, 10, 10, 10, 10, 10, 10, 10,
9344 10, 10, 10, 10, 10, 10, 10, 10,
9345 10, 10, 10, 10, 10, 10, 10, 10,
9346 10, 10, 10, 10, 10, 10, 10, 10,
9347 10, 10, 10, 10, 10, 10, 10, 10,
9348 10, 10, 10, 10, 10, 10, 10, 10,
9349 10, 10, 10, 10, 10, 10, 10, 10,
9350 10, 10, 10, 10, 10, 10, 10, 10,
9351 10, 10, 10, 10, 10, 10, 10, 10,
9352 10, 10, 10, 10, 10, 10, 10, 10,
9353 10, 10, 10, 10, 10, 10, 10, 10,
9354 10, 10, 10, 10, 10, 10, 0, 0,
9355 10, 10, 10, 10, 10, 10, 10, 10,
9356 10, 10, 0, 0, 0, 0, 0, 0,
9357 0, 0, 0, 0, 0, 0, 0, 0,
9358 0, 0, 0, 0, 0, 0, 0, 0,
9359 0, 0, 0, 0, 0, 0, 0, 0,
9360 0, 0, 0, 0, 0, 0, 0, 0,
9361 0, 0, 0, 0, 0, 0, 0, 0,
9362 0, 0, 0, 0, 0, 0, 0, 0,
9363 0, 0, 0, 0, 0, 0, 0, 0,
9364 0, 0, 0, 0, 0, 0, 0, 0,
9365 0, 0, 0, 0, 0, 0, 0, 0,
9366 0, 0, 0, 0, 0, 0, 0, 0,
9367 0, 0, 0, 0, 0, 0, 0, 0,
9368 0, 0, 0, 0, 0, 0, 0, 0,
9369 0, 0, 0, 0, 0, 0, 0, 0,
9370 0, 0, 0, 0, 0, 0, 0, 0,
9371
9372 0, 10, 10, 10, 10, 0, 10, 10,
9373 10, 10, 0, 0, 10, 10, 10, 10,
9374 10, 10, 10, 10, 10, 10, 10, 10,
9375 10, 10, 10, 10, 10, 10, 10, 10,
9376 10, 10, 10, 10, 10, 10, 10, 10,
9377 0, 10, 10, 10, 10, 10, 10, 10,
9378 10, 10, 10, 10, 10, 10, 10, 10,
9379 10, 10, 10, 10, 10, 10, 10, 10,
9380 10, 10, 10, 10, 10, 10, 10, 10,
9381 10, 10, 10, 10, 0, 10, 0, 10,
9382 10, 10, 10, 0, 0, 0, 10, 0,
9383 10, 10, 10, 10, 10, 10, 10, 0,
9384 0, 10, 10, 10, 10, 10, 10, 10,
9385 138, 138, 138, 138, 138, 138, 138, 138,
9386 138, 138, 138, 138, 138, 138, 10, 10,
9387 10, 10, 10, 10, 10, 10, 10, 10,
9388 10, 10, 10, 10, 10, 10, 10, 10,
9389 10, 10, 10, 10, 10, 10, 10, 10,
9390 10, 10, 10, 10, 10, 0, 0, 0,
9391 10, 10, 10, 10, 10, 10, 10, 10,
9392 10, 10, 10, 10, 10, 10, 10, 10,
9393 10, 10, 10, 10, 10, 10, 10, 10,
9394 0, 10, 10, 10, 10, 10, 10, 10,
9395 10, 10, 10, 10, 10, 10, 10, 0,
9396 0, 0, 0, 0, 0, 0, 0, 0,
9397 0, 0, 0, 0, 0, 0, 0, 0,
9398 10, 10, 10, 138, 138, 138, 138, 10,
9399 10, 10, 10, 10, 138, 138, 138, 10,
9400 10, 10, 138, 138, 138, 138, 138, 138,
9401 138, 138, 138, 138, 0, 0, 0, 0,
9402 10, 10, 10, 10, 10, 10, 10, 10,
9403 10, 10, 10, 10, 10, 10, 10, 10,
9404
9405 10, 10, 10, 10, 10, 10, 10, 10,
9406 10, 10, 10, 10, 10, 10, 10, 10,
9407 10, 10, 10, 10, 10, 10, 10, 10,
9408 10, 10, 10, 10, 10, 10, 10, 10,
9409 10, 10, 10, 10, 10, 10, 10, 10,
9410 10, 10, 10, 10, 10, 10, 10, 10,
9411 10, 10, 10, 10, 10, 10, 10, 10,
9412 10, 10, 10, 10, 10, 10, 10, 10,
9413 10, 10, 10, 10, 10, 10, 10, 10,
9414 10, 10, 10, 10, 10, 10, 10, 10,
9415 10, 10, 10, 10, 10, 10, 10, 10,
9416 10, 10, 10, 10, 10, 10, 10, 10,
9417 10, 10, 10, 10, 10, 10, 10, 10,
9418 10, 10, 10, 10, 10, 10, 10, 10,
9419 10, 10, 10, 10, 10, 10, 10, 10,
9420 10, 10, 10, 10, 10, 10, 10, 10,
9421 10, 10, 10, 138, 138, 138, 138, 138,
9422 138, 138, 138, 138, 138, 138, 138, 138,
9423 138, 138, 138, 138, 138, 138, 138, 138,
9424 138, 10, 10, 138, 138, 138, 138, 138,
9425 138, 138, 138, 138, 138, 138, 138, 138,
9426 138, 138, 138, 138, 138, 138, 138, 138,
9427 10, 10, 10, 10, 10, 10, 10, 10,
9428 138, 10, 10, 10, 10, 10, 10, 10,
9429 138, 138, 138, 138, 138, 138, 10, 10,
9430 10, 138, 10, 10, 10, 10, 138, 138,
9431 138, 138, 138, 10, 138, 138, 10, 10,
9432 138, 138, 138, 138, 138, 10, 10, 10,
9433 10, 138, 10, 138, 138, 138, 10, 10,
9434 138, 138, 10, 10, 10, 10, 10, 10,
9435 10, 10, 10, 10, 138, 138, 138, 138,
9436 138, 138, 10, 10, 138, 138, 10, 10,
9437
9438 10, 10, 10, 10, 10, 10, 10, 10,
9439 10, 10, 138, 138, 138, 138, 138, 138,
9440 138, 138, 138, 138, 138, 138, 138, 138,
9441 138, 138, 138, 138, 138, 10, 138, 138,
9442 138, 138, 10, 10, 138, 10, 138, 10,
9443 10, 138, 10, 138, 138, 138, 138, 10,
9444 10, 10, 10, 10, 138, 138, 10, 10,
9445 10, 10, 10, 10, 138, 138, 138, 10,
9446 10, 10, 10, 10, 10, 10, 10, 10,
9447 10, 10, 10, 10, 10, 10, 10, 10,
9448 10, 10, 10, 10, 10, 10, 10, 138,
9449 138, 10, 10, 10, 10, 10, 10, 10,
9450 10, 10, 10, 10, 138, 138, 10, 10,
9451 10, 10, 138, 138, 138, 138, 10, 138,
9452 138, 10, 10, 138, 138, 10, 10, 10,
9453 10, 138, 138, 138, 138, 138, 138, 138,
9454 138, 138, 138, 138, 138, 138, 138, 138,
9455 138, 138, 138, 138, 138, 138, 138, 138,
9456 138, 138, 138, 138, 138, 138, 138, 138,
9457 138, 138, 138, 138, 138, 138, 138, 138,
9458 138, 138, 138, 138, 10, 10, 138, 138,
9459 138, 138, 138, 138, 138, 138, 10, 138,
9460 138, 138, 138, 138, 138, 138, 138, 138,
9461 138, 138, 138, 138, 138, 138, 138, 138,
9462 138, 138, 138, 138, 138, 138, 138, 138,
9463 138, 138, 138, 138, 138, 138, 138, 138,
9464 138, 138, 138, 138, 138, 138, 138, 10,
9465 10, 10, 10, 10, 138, 10, 138, 10,
9466 10, 10, 138, 138, 138, 138, 138, 10,
9467 10, 10, 10, 10, 138, 138, 138, 10,
9468 10, 10, 10, 138, 10, 10, 10, 138,
9469 138, 138, 138, 138, 10, 138, 10, 10,
9470
9471 0, 0, 0, 0, 0, 0, 0, 0,
9472 0, 0, 0, 0, 0, 0, 0, 0,
9473 0, 0, 0, 0, 0, 0, 0, 0,
9474 0, 0, 0, 0, 0, 0, 0, 0,
9475 0, 0, 0, 0, 0, 0, 0, 0,
9476 0, 0, 0, 0, 0, 0, 0, 0,
9477 0, 0, 0, 0, 0, 0, 0, 0,
9478 0, 0, 0, 0, 0, 0, 0, 0,
9479 0, 0, 0, 0, 0, 0, 0, 0,
9480 0, 0, 0, 0, 0, 0, 0, 0,
9481 0, 0, 0, 0, 0, 0, 0, 0,
9482 0, 0, 0, 0, 0, 0, 0, 0,
9483 0, 0, 0, 0, 0, 0, 0, 0,
9484 0, 0, 0, 0, 0, 0, 0, 0,
9485 0, 0, 0, 0, 0, 0, 0, 0,
9486 0, 0, 0, 0, 0, 0, 0, 0,
9487 10, 10, 10, 10, 10, 10, 10, 10,
9488 10, 10, 10, 10, 10, 10, 10, 10,
9489 10, 10, 10, 10, 10, 10, 10, 10,
9490 10, 10, 0, 10, 10, 10, 10, 10,
9491 10, 10, 10, 10, 10, 10, 10, 10,
9492 10, 10, 10, 10, 10, 10, 10, 10,
9493 10, 10, 10, 10, 10, 10, 10, 10,
9494 10, 10, 10, 10, 10, 10, 10, 10,
9495 10, 10, 10, 10, 10, 10, 10, 10,
9496 10, 10, 10, 10, 10, 10, 10, 10,
9497 10, 10, 10, 10, 10, 10, 10, 10,
9498 10, 10, 10, 10, 10, 10, 10, 10,
9499 10, 10, 10, 10, 10, 10, 10, 10,
9500 10, 10, 10, 10, 10, 10, 10, 10,
9501 10, 10, 10, 10, 0, 0, 0, 0,
9502 0, 0, 0, 0, 0, 0, 0, 0,
9503
9504 10, 10, 10, 10, 10, 10, 10, 10,
9505 10, 10, 10, 10, 10, 10, 10, 10,
9506 10, 10, 10, 10, 10, 10, 10, 10,
9507 10, 10, 10, 10, 10, 10, 10, 10,
9508 10, 10, 10, 10, 10, 10, 10, 10,
9509 10, 10, 10, 10, 10, 10, 10, 10,
9510 10, 10, 10, 10, 10, 10, 10, 10,
9511 10, 10, 10, 10, 10, 10, 10, 10,
9512 10, 10, 10, 10, 10, 10, 10, 10,
9513 10, 10, 10, 10, 10, 10, 10, 10,
9514 10, 10, 10, 10, 10, 10, 10, 10,
9515 10, 10, 10, 10, 10, 10, 10, 10,
9516 10, 10, 10, 10, 10, 10, 10, 10,
9517 10, 10, 10, 10, 10, 10, 10, 10,
9518 10, 10, 10, 10, 10, 10, 10, 10,
9519 10, 10, 10, 10, 10, 10, 10, 10,
9520 10, 10, 10, 10, 10, 10, 10, 10,
9521 10, 10, 10, 10, 10, 10, 10, 10,
9522 10, 10, 10, 10, 10, 10, 10, 10,
9523 10, 10, 10, 10, 10, 10, 10, 10,
9524 10, 10, 10, 10, 10, 10, 10, 10,
9525 10, 10, 10, 10, 10, 10, 10, 10,
9526 10, 10, 10, 10, 10, 10, 10, 10,
9527 10, 10, 10, 10, 10, 10, 10, 10,
9528 10, 10, 10, 10, 10, 10, 10, 10,
9529 10, 10, 10, 10, 10, 10, 10, 10,
9530 10, 10, 10, 10, 10, 10, 0, 0,
9531 0, 0, 0, 0, 0, 0, 0, 0,
9532 0, 0, 0, 0, 0, 0, 0, 0,
9533 0, 0, 0, 0, 0, 0, 0, 0,
9534 10, 10, 10, 10, 10, 10, 10, 10,
9535 10, 10, 10, 10, 0, 0, 0, 0,
9536
9537 9, 10, 10, 10, 10, 0, 0, 0,
9538 138, 138, 138, 138, 138, 138, 138, 138,
9539 138, 138, 10, 10, 138, 138, 138, 138,
9540 138, 138, 138, 138, 10, 10, 10, 10,
9541 10, 0, 0, 0, 0, 0, 0, 0,
9542 0, 0, 17, 17, 17, 17, 17, 17,
9543 10, 0, 0, 0, 0, 0, 10, 10,
9544 0, 0, 0, 0, 0, 10, 10, 10,
9545 0, 0, 0, 0, 0, 0, 0, 0,
9546 0, 0, 0, 0, 0, 0, 0, 0,
9547 0, 0, 0, 0, 0, 0, 0, 0,
9548 0, 0, 0, 0, 0, 0, 0, 0,
9549 0, 0, 0, 0, 0, 0, 0, 0,
9550 0, 0, 0, 0, 0, 0, 0, 0,
9551 0, 0, 0, 0, 0, 0, 0, 0,
9552 0, 0, 0, 0, 0, 0, 0, 0,
9553 0, 0, 0, 0, 0, 0, 0, 0,
9554 0, 0, 0, 0, 0, 0, 0, 0,
9555 0, 0, 0, 0, 0, 0, 0, 0,
9556 0, 17, 17, 10, 10, 0, 0, 0,
9557 10, 0, 0, 0, 0, 0, 0, 0,
9558 0, 0, 0, 0, 0, 0, 0, 0,
9559 0, 0, 0, 0, 0, 0, 0, 0,
9560 0, 0, 0, 0, 0, 0, 0, 0,
9561 0, 0, 0, 0, 0, 0, 0, 0,
9562 0, 0, 0, 0, 0, 0, 0, 0,
9563 0, 0, 0, 0, 0, 0, 0, 0,
9564 0, 0, 0, 0, 0, 0, 0, 0,
9565 0, 0, 0, 0, 0, 0, 0, 0,
9566 0, 0, 0, 0, 0, 0, 0, 0,
9567 0, 0, 0, 0, 0, 0, 0, 0,
9568 0, 0, 0, 10, 0, 0, 0, 0,
9569
9570 0, 0, 0, 0, 0, 0, 0, 0,
9571 0, 0, 0, 0, 0, 0, 0, 0,
9572 0, 0, 0, 0, 0, 0, 0, 0,
9573 0, 0, 0, 0, 0, 0, 0, 0,
9574 0, 0, 0, 0, 0, 0, 0, 0,
9575 0, 0, 0, 0, 0, 0, 0, 0,
9576 0, 0, 0, 0, 0, 0, 0, 0,
9577 0, 0, 0, 0, 0, 0, 0, 0,
9578 0, 0, 0, 0, 0, 0, 0, 0,
9579 0, 0, 0, 0, 0, 0, 0, 0,
9580 0, 10, 10, 10, 10, 10, 10, 10,
9581 10, 10, 10, 10, 10, 10, 10, 10,
9582 0, 0, 0, 0, 0, 0, 0, 0,
9583 0, 0, 0, 0, 0, 0, 0, 0,
9584 0, 0, 0, 0, 0, 0, 0, 0,
9585 0, 0, 0, 0, 0, 0, 0, 0,
9586 0, 0, 0, 0, 0, 0, 0, 0,
9587 0, 0, 0, 0, 0, 0, 0, 0,
9588 0, 0, 0, 0, 0, 0, 0, 0,
9589 0, 0, 0, 0, 0, 0, 0, 0,
9590 0, 0, 0, 0, 0, 0, 0, 0,
9591 0, 0, 0, 0, 0, 0, 0, 0,
9592 0, 10, 10, 10, 10, 10, 10, 10,
9593 10, 10, 10, 10, 10, 10, 10, 10,
9594 0, 0, 0, 0, 0, 0, 0, 0,
9595 0, 0, 0, 0, 0, 0, 0, 0,
9596 0, 0, 0, 0, 0, 0, 0, 0,
9597 0, 0, 0, 0, 0, 0, 0, 0,
9598 0, 0, 0, 0, 0, 0, 0, 0,
9599 0, 0, 0, 0, 0, 0, 0, 0,
9600 0, 0, 0, 0, 0, 0, 0, 0,
9601 0, 0, 0, 0, 0, 0, 0, 0,
9602
9603 0, 0, 0, 0, 0, 0, 0, 0,
9604 0, 0, 0, 0, 0, 0, 0, 0,
9605 0, 0, 0, 0, 0, 0, 0, 0,
9606 0, 0, 0, 0, 0, 0, 0, 0,
9607 0, 0, 0, 0, 0, 0, 0, 0,
9608 0, 0, 0, 0, 0, 0, 0, 0,
9609 0, 0, 0, 0, 0, 0, 0, 0,
9610 0, 0, 0, 0, 0, 0, 0, 0,
9611 0, 0, 0, 0, 0, 0, 0, 0,
9612 0, 0, 0, 0, 0, 0, 0, 0,
9613 0, 0, 0, 0, 0, 0, 0, 0,
9614 0, 0, 0, 0, 0, 0, 0, 0,
9615 0, 0, 0, 0, 0, 0, 0, 0,
9616 0, 0, 0, 0, 0, 0, 0, 0,
9617 0, 0, 0, 0, 0, 0, 0, 0,
9618 0, 0, 0, 0, 0, 0, 0, 0,
9619 0, 0, 0, 0, 0, 0, 0, 0,
9620 0, 0, 0, 0, 0, 0, 0, 0,
9621 10, 10, 10, 10, 10, 10, 10, 10,
9622 10, 10, 10, 10, 10, 10, 10, 10,
9623 10, 10, 10, 10, 10, 10, 10, 10,
9624 10, 10, 10, 10, 10, 10, 10, 10,
9625 10, 10, 10, 10, 10, 10, 10, 10,
9626 10, 10, 10, 10, 10, 10, 10, 10,
9627 10, 10, 10, 10, 10, 10, 10, 0,
9628 0, 0, 0, 0, 0, 0, 0, 0,
9629 0, 0, 0, 0, 0, 0, 0, 0,
9630 0, 0, 0, 0, 0, 0, 0, 0,
9631 0, 0, 0, 0, 0, 0, 0, 0,
9632 0, 0, 0, 0, 0, 0, 0, 0,
9633 0, 0, 0, 0, 0, 0, 0, 0,
9634 0, 0, 0, 0, 0, 0, 0, 0,
9635
9636 0, 0, 0, 0, 0, 0, 0, 0,
9637 0, 0, 0, 0, 0, 0, 0, 0,
9638 0, 0, 0, 0, 0, 0, 0, 0,
9639 0, 0, 0, 0, 0, 1, 17, 1,
9640 1, 1, 1, 1, 1, 1, 1, 1,
9641 1, 4, 1, 1, 1, 1, 1, 1,
9642 1, 1, 1, 1, 1, 1, 1, 0,
9643 1, 1, 1, 1, 1, 0, 1, 0,
9644 1, 1, 0, 1, 1, 0, 1, 1,
9645 1, 1, 1, 1, 1, 1, 1, 1,
9646 13, 13, 13, 13, 13, 13, 13, 13,
9647 13, 13, 13, 13, 13, 13, 13, 13,
9648 13, 13, 13, 13, 13, 13, 13, 13,
9649 13, 13, 13, 13, 13, 13, 13, 13,
9650 13, 13, 13, 13, 13, 13, 13, 13,
9651 13, 13, 13, 13, 13, 13, 13, 13,
9652 13, 13, 13, 13, 13, 13, 13, 13,
9653 13, 13, 13, 13, 13, 13, 13, 13,
9654 13, 13, 13, 13, 13, 13, 13, 13,
9655 13, 13, 13, 13, 13, 13, 13, 13,
9656 13, 13, 13, 13, 13, 13, 13, 13,
9657 13, 13, 13, 13, 13, 13, 13, 13,
9658 13, 13, 0, 0, 0, 0, 0, 0,
9659 0, 0, 0, 0, 0, 0, 0, 0,
9660 0, 0, 0, 0, 0, 0, 0, 0,
9661 0, 0, 0, 0, 0, 0, 0, 0,
9662 0, 0, 0, 13, 13, 13, 13, 13,
9663 13, 13, 13, 13, 13, 13, 13, 13,
9664 13, 13, 13, 13, 13, 13, 13, 13,
9665 13, 13, 13, 13, 13, 13, 13, 13,
9666 13, 13, 13, 13, 13, 13, 13, 13,
9667 13, 13, 13, 13, 13, 13, 13, 13,
9668
9669 13, 13, 13, 13, 13, 13, 13, 13,
9670 13, 13, 13, 13, 13, 13, 13, 13,
9671 13, 13, 13, 13, 13, 13, 13, 13,
9672 13, 13, 13, 13, 13, 13, 13, 13,
9673 13, 13, 13, 13, 13, 13, 13, 13,
9674 13, 13, 13, 13, 13, 13, 13, 13,
9675 13, 13, 13, 13, 13, 13, 13, 13,
9676 13, 13, 13, 13, 13, 13, 13, 13,
9677 13, 13, 13, 13, 13, 13, 13, 13,
9678 13, 13, 13, 13, 13, 13, 13, 13,
9679 13, 13, 13, 13, 13, 13, 13, 13,
9680 13, 13, 13, 13, 13, 13, 13, 13,
9681 13, 13, 13, 13, 13, 13, 13, 13,
9682 13, 13, 13, 13, 13, 13, 13, 13,
9683 13, 13, 13, 13, 13, 13, 13, 13,
9684 13, 13, 13, 13, 13, 13, 13, 13,
9685 13, 13, 13, 13, 13, 13, 13, 13,
9686 13, 13, 13, 13, 13, 13, 13, 13,
9687 13, 13, 13, 13, 13, 13, 13, 13,
9688 13, 13, 13, 13, 13, 13, 13, 13,
9689 13, 13, 13, 13, 13, 13, 13, 13,
9690 13, 13, 13, 13, 13, 13, 13, 13,
9691 13, 13, 13, 13, 13, 13, 13, 13,
9692 13, 13, 13, 13, 13, 13, 13, 13,
9693 13, 13, 13, 13, 13, 13, 13, 13,
9694 13, 13, 13, 13, 13, 13, 13, 13,
9695 13, 13, 13, 13, 13, 13, 13, 13,
9696 13, 13, 13, 13, 13, 13, 13, 13,
9697 13, 13, 13, 13, 13, 13, 13, 13,
9698 13, 13, 13, 13, 13, 13, 13, 13,
9699 13, 13, 13, 13, 13, 13, 13, 13,
9700 13, 13, 13, 13, 13, 13, 13, 13,
9701
9702 13, 13, 13, 13, 13, 13, 13, 13,
9703 13, 13, 13, 13, 13, 13, 13, 13,
9704 13, 13, 13, 13, 13, 13, 13, 13,
9705 13, 13, 13, 13, 13, 13, 13, 13,
9706 13, 13, 13, 13, 13, 13, 13, 13,
9707 13, 13, 13, 13, 13, 13, 13, 13,
9708 13, 13, 13, 13, 13, 13, 13, 13,
9709 13, 13, 13, 13, 13, 13, 10, 10,
9710 0, 0, 0, 0, 0, 0, 0, 0,
9711 0, 0, 0, 0, 0, 0, 0, 0,
9712 13, 13, 13, 13, 13, 13, 13, 13,
9713 13, 13, 13, 13, 13, 13, 13, 13,
9714 13, 13, 13, 13, 13, 13, 13, 13,
9715 13, 13, 13, 13, 13, 13, 13, 13,
9716 13, 13, 13, 13, 13, 13, 13, 13,
9717 13, 13, 13, 13, 13, 13, 13, 13,
9718 13, 13, 13, 13, 13, 13, 13, 13,
9719 13, 13, 13, 13, 13, 13, 13, 13,
9720 0, 0, 13, 13, 13, 13, 13, 13,
9721 13, 13, 13, 13, 13, 13, 13, 13,
9722 13, 13, 13, 13, 13, 13, 13, 13,
9723 13, 13, 13, 13, 13, 13, 13, 13,
9724 13, 13, 13, 13, 13, 13, 13, 13,
9725 13, 13, 13, 13, 13, 13, 13, 13,
9726 13, 13, 13, 13, 13, 13, 13, 13,
9727 0, 0, 0, 0, 0, 0, 0, 0,
9728 0, 0, 0, 0, 0, 0, 0, 0,
9729 0, 0, 0, 0, 0, 0, 0, 0,
9730 0, 0, 0, 0, 0, 0, 0, 0,
9731 0, 0, 0, 0, 0, 0, 0, 0,
9732 13, 13, 13, 13, 13, 13, 13, 13,
9733 13, 13, 13, 13, 13, 0, 0, 0,
9734
9735 17, 17, 17, 17, 17, 17, 17, 17,
9736 17, 17, 17, 17, 17, 17, 17, 17,
9737 0, 0, 0, 0, 0, 0, 0, 0,
9738 0, 0, 0, 0, 0, 0, 0, 0,
9739 17, 17, 17, 17, 0, 0, 0, 0,
9740 0, 0, 0, 0, 0, 0, 0, 0,
9741 10, 10, 10, 10, 10, 10, 10, 10,
9742 10, 10, 10, 10, 10, 10, 10, 10,
9743 10, 10, 10, 10, 10, 10, 10, 0,
9744 0, 10, 10, 10, 10, 10, 10, 10,
9745 6, 10, 6, 0, 10, 6, 10, 10,
9746 10, 10, 10, 10, 10, 10, 10, 4,
9747 10, 10, 4, 4, 10, 10, 10, 0,
9748 10, 4, 4, 10, 0, 0, 0, 0,
9749 13, 13, 13, 13, 13, 0, 13, 13,
9750 13, 13, 13, 13, 13, 13, 13, 13,
9751 13, 13, 13, 13, 13, 13, 13, 13,
9752 13, 13, 13, 13, 13, 13, 13, 13,
9753 13, 13, 13, 13, 13, 13, 13, 13,
9754 13, 13, 13, 13, 13, 13, 13, 13,
9755 13, 13, 13, 13, 13, 13, 13, 13,
9756 13, 13, 13, 13, 13, 13, 13, 13,
9757 13, 13, 13, 13, 13, 13, 13, 13,
9758 13, 13, 13, 13, 13, 13, 13, 13,
9759 13, 13, 13, 13, 13, 13, 13, 13,
9760 13, 13, 13, 13, 13, 13, 13, 13,
9761 13, 13, 13, 13, 13, 13, 13, 13,
9762 13, 13, 13, 13, 13, 13, 13, 13,
9763 13, 13, 13, 13, 13, 13, 13, 13,
9764 13, 13, 13, 13, 13, 13, 13, 13,
9765 13, 13, 13, 13, 13, 13, 13, 13,
9766 13, 13, 13, 13, 13, 0, 0, 18,
9767
9768 0, 10, 10, 4, 4, 4, 10, 10,
9769 138, 138, 10, 4, 6, 4, 6, 3,
9770 2, 2, 2, 2, 2, 2, 2, 2,
9771 2, 2, 6, 10, 138, 10, 138, 10,
9772 10, 0, 0, 0, 0, 0, 0, 0,
9773 0, 0, 0, 0, 0, 0, 0, 0,
9774 0, 0, 0, 0, 0, 0, 0, 0,
9775 0, 0, 0, 138, 10, 138, 10, 10,
9776 10, 0, 0, 0, 0, 0, 0, 0,
9777 0, 0, 0, 0, 0, 0, 0, 0,
9778 0, 0, 0, 0, 0, 0, 0, 0,
9779 0, 0, 0, 138, 10, 138, 10, 138,
9780 138, 10, 138, 138, 10, 10, 0, 0,
9781 0, 0, 0, 0, 0, 0, 0, 0,
9782 0, 0, 0, 0, 0, 0, 0, 0,
9783 0, 0, 0, 0, 0, 0, 0, 0,
9784 0, 0, 0, 0, 0, 0, 0, 0,
9785 0, 0, 0, 0, 0, 0, 0, 0,
9786 0, 0, 0, 0, 0, 0, 0, 0,
9787 0, 0, 0, 0, 0, 0, 0, 0,
9788 0, 0, 0, 0, 0, 0, 0, 0,
9789 0, 0, 0, 0, 0, 0, 0, 0,
9790 0, 0, 0, 0, 0, 0, 0, 0,
9791 0, 0, 0, 0, 0, 0, 0, 0,
9792 0, 0, 0, 0, 0, 0, 0, 0,
9793 0, 0, 0, 0, 0, 0, 0, 0,
9794 0, 0, 0, 0, 0, 0, 0, 0,
9795 0, 0, 0, 0, 0, 0, 0, 0,
9796 4, 4, 10, 10, 10, 4, 4, 0,
9797 10, 10, 10, 10, 10, 10, 10, 0,
9798 0, 0, 0, 0, 0, 0, 0, 0,
9799 0, 18, 18, 18, 10, 10, 0, 0,
9800};
9801
9802// 25082 bytes
9803
9804const Q_UINT8 QUnicodeTables::combining_info[] = {
9805 1, 1, 1, 2, 3, 4, 5, 6,
9806 1, 7, 8, 9, 10, 11, 12, 13,
9807 14, 1, 1, 1, 1, 1, 1, 15,
9808 16, 1, 1, 1, 1, 1, 1, 1,
9809 17, 1, 1, 1, 1, 1, 1, 1,
9810 1, 1, 1, 1, 1, 1, 1, 1,
9811 18, 1, 1, 1, 1, 1, 1, 1,
9812 1, 1, 1, 1, 1, 1, 1, 1,
9813 1, 1, 1, 1, 1, 1, 1, 1,
9814 1, 1, 1, 1, 1, 1, 1, 1,
9815 1, 1, 1, 1, 1, 1, 1, 1,
9816 1, 1, 1, 1, 1, 1, 1, 1,
9817 1, 1, 1, 1, 1, 1, 1, 1,
9818 1, 1, 1, 1, 1, 1, 1, 1,
9819 1, 1, 1, 1, 1, 1, 1, 1,
9820 1, 1, 1, 1, 1, 1, 1, 1,
9821 1, 1, 1, 1, 1, 1, 1, 1,
9822 1, 1, 1, 1, 1, 1, 1, 1,
9823 1, 1, 1, 1, 1, 1, 1, 1,
9824 1, 1, 1, 1, 1, 1, 1, 1,
9825 1, 1, 1, 1, 1, 1, 1, 1,
9826 1, 1, 1, 1, 1, 1, 1, 1,
9827 1, 1, 1, 1, 1, 1, 1, 1,
9828 1, 1, 1, 1, 1, 1, 1, 1,
9829 1, 1, 1, 1, 1, 1, 1, 1,
9830 1, 1, 1, 1, 1, 1, 1, 1,
9831 1, 1, 1, 1, 1, 1, 1, 1,
9832 1, 1, 1, 1, 1, 1, 1, 1,
9833 1, 1, 1, 1, 1, 1, 1, 1,
9834 1, 1, 1, 1, 1, 1, 1, 1,
9835 1, 1, 1, 1, 1, 1, 1, 1,
9836 1, 1, 1, 19, 1, 1, 20, 1,
9837
9838
9839 0, 0, 0, 0, 0, 0, 0, 0,
9840 0, 0, 0, 0, 0, 0, 0, 0,
9841 0, 0, 0, 0, 0, 0, 0, 0,
9842 0, 0, 0, 0, 0, 0, 0, 0,
9843 0, 0, 0, 0, 0, 0, 0, 0,
9844 0, 0, 0, 0, 0, 0, 0, 0,
9845 0, 0, 0, 0, 0, 0, 0, 0,
9846 0, 0, 0, 0, 0, 0, 0, 0,
9847 0, 0, 0, 0, 0, 0, 0, 0,
9848 0, 0, 0, 0, 0, 0, 0, 0,
9849 0, 0, 0, 0, 0, 0, 0, 0,
9850 0, 0, 0, 0, 0, 0, 0, 0,
9851 0, 0, 0, 0, 0, 0, 0, 0,
9852 0, 0, 0, 0, 0, 0, 0, 0,
9853 0, 0, 0, 0, 0, 0, 0, 0,
9854 0, 0, 0, 0, 0, 0, 0, 0,
9855 0, 0, 0, 0, 0, 0, 0, 0,
9856 0, 0, 0, 0, 0, 0, 0, 0,
9857 0, 0, 0, 0, 0, 0, 0, 0,
9858 0, 0, 0, 0, 0, 0, 0, 0,
9859 0, 0, 0, 0, 0, 0, 0, 0,
9860 0, 0, 0, 0, 0, 0, 0, 0,
9861 0, 0, 0, 0, 0, 0, 0, 0,
9862 0, 0, 0, 0, 0, 0, 0, 0,
9863 0, 0, 0, 0, 0, 0, 0, 0,
9864 0, 0, 0, 0, 0, 0, 0, 0,
9865 0, 0, 0, 0, 0, 0, 0, 0,
9866 0, 0, 0, 0, 0, 0, 0, 0,
9867 0, 0, 0, 0, 0, 0, 0, 0,
9868 0, 0, 0, 0, 0, 0, 0, 0,
9869 0, 0, 0, 0, 0, 0, 0, 0,
9870 0, 0, 0, 0, 0, 0, 0, 0,
9871
9872 230, 230, 230, 230, 230, 230, 230, 230,
9873 230, 230, 230, 230, 230, 230, 230, 230,
9874 230, 230, 230, 230, 230, 232, 220, 220,
9875 220, 220, 232, 216, 220, 220, 220, 220,
9876 220, 202, 202, 220, 220, 220, 220, 202,
9877 202, 220, 220, 220, 220, 220, 220, 220,
9878 220, 220, 220, 220, 1, 1, 1, 1,
9879 1, 220, 220, 220, 220, 230, 230, 230,
9880 230, 230, 230, 230, 230, 240, 230, 220,
9881 220, 220, 230, 230, 230, 220, 220, 0,
9882 0, 0, 0, 0, 0, 0, 0, 0,
9883 0, 0, 0, 0, 0, 0, 0, 0,
9884 234, 234, 233, 230, 230, 230, 230, 230,
9885 230, 230, 230, 230, 230, 230, 230, 230,
9886 0, 0, 0, 0, 0, 0, 0, 0,
9887 0, 0, 0, 0, 0, 0, 0, 0,
9888 0, 0, 0, 0, 0, 0, 0, 0,
9889 0, 0, 0, 0, 0, 0, 0, 0,
9890 0, 0, 0, 0, 0, 0, 0, 0,
9891 0, 0, 0, 0, 0, 0, 0, 0,
9892 0, 0, 0, 0, 0, 0, 0, 0,
9893 0, 0, 0, 0, 0, 0, 0, 0,
9894 0, 0, 0, 0, 0, 0, 0, 0,
9895 0, 0, 0, 0, 0, 0, 0, 0,
9896 0, 0, 0, 0, 0, 0, 0, 0,
9897 0, 0, 0, 0, 0, 0, 0, 0,
9898 0, 0, 0, 0, 0, 0, 0, 0,
9899 0, 0, 0, 0, 0, 0, 0, 0,
9900 0, 0, 0, 0, 0, 0, 0, 0,
9901 0, 0, 0, 0, 0, 0, 0, 0,
9902 0, 0, 0, 0, 0, 0, 0, 0,
9903 0, 0, 0, 0, 0, 0, 0, 0,
9904
9905 0, 0, 0, 0, 0, 0, 0, 0,
9906 0, 0, 0, 0, 0, 0, 0, 0,
9907 0, 0, 0, 0, 0, 0, 0, 0,
9908 0, 0, 0, 0, 0, 0, 0, 0,
9909 0, 0, 0, 0, 0, 0, 0, 0,
9910 0, 0, 0, 0, 0, 0, 0, 0,
9911 0, 0, 0, 0, 0, 0, 0, 0,
9912 0, 0, 0, 0, 0, 0, 0, 0,
9913 0, 0, 0, 0, 0, 0, 0, 0,
9914 0, 0, 0, 0, 0, 0, 0, 0,
9915 0, 0, 0, 0, 0, 0, 0, 0,
9916 0, 0, 0, 0, 0, 0, 0, 0,
9917 0, 0, 0, 0, 0, 0, 0, 0,
9918 0, 0, 0, 0, 0, 0, 0, 0,
9919 0, 0, 0, 0, 0, 0, 0, 0,
9920 0, 0, 0, 0, 0, 0, 0, 0,
9921 0, 0, 0, 230, 230, 230, 230, 0,
9922 0, 0, 0, 0, 0, 0, 0, 0,
9923 0, 0, 0, 0, 0, 0, 0, 0,
9924 0, 0, 0, 0, 0, 0, 0, 0,
9925 0, 0, 0, 0, 0, 0, 0, 0,
9926 0, 0, 0, 0, 0, 0, 0, 0,
9927 0, 0, 0, 0, 0, 0, 0, 0,
9928 0, 0, 0, 0, 0, 0, 0, 0,
9929 0, 0, 0, 0, 0, 0, 0, 0,
9930 0, 0, 0, 0, 0, 0, 0, 0,
9931 0, 0, 0, 0, 0, 0, 0, 0,
9932 0, 0, 0, 0, 0, 0, 0, 0,
9933 0, 0, 0, 0, 0, 0, 0, 0,
9934 0, 0, 0, 0, 0, 0, 0, 0,
9935 0, 0, 0, 0, 0, 0, 0, 0,
9936 0, 0, 0, 0, 0, 0, 0, 0,
9937
9938 0, 0, 0, 0, 0, 0, 0, 0,
9939 0, 0, 0, 0, 0, 0, 0, 0,
9940 0, 0, 0, 0, 0, 0, 0, 0,
9941 0, 0, 0, 0, 0, 0, 0, 0,
9942 0, 0, 0, 0, 0, 0, 0, 0,
9943 0, 0, 0, 0, 0, 0, 0, 0,
9944 0, 0, 0, 0, 0, 0, 0, 0,
9945 0, 0, 0, 0, 0, 0, 0, 0,
9946 0, 0, 0, 0, 0, 0, 0, 0,
9947 0, 0, 0, 0, 0, 0, 0, 0,
9948 0, 0, 0, 0, 0, 0, 0, 0,
9949 0, 0, 0, 0, 0, 0, 0, 0,
9950 0, 0, 0, 0, 0, 0, 0, 0,
9951 0, 0, 0, 0, 0, 0, 0, 0,
9952 0, 0, 0, 0, 0, 0, 0, 0,
9953 0, 0, 0, 0, 0, 0, 0, 0,
9954 0, 0, 0, 0, 0, 0, 0, 0,
9955 0, 0, 0, 0, 0, 0, 0, 0,
9956 0, 220, 230, 230, 230, 230, 220, 230,
9957 230, 230, 222, 220, 230, 230, 230, 230,
9958 230, 230, 0, 220, 220, 220, 220, 220,
9959 230, 230, 220, 230, 230, 222, 228, 230,
9960 10, 11, 12, 13, 14, 15, 16, 17,
9961 18, 19, 0, 20, 21, 22, 0, 23,
9962 0, 24, 25, 0, 230, 0, 0, 0,
9963 0, 0, 0, 0, 0, 0, 0, 0,
9964 0, 0, 0, 0, 0, 0, 0, 0,
9965 0, 0, 0, 0, 0, 0, 0, 0,
9966 0, 0, 0, 0, 0, 0, 0, 0,
9967 0, 0, 0, 0, 0, 0, 0, 0,
9968 0, 0, 0, 0, 0, 0, 0, 0,
9969 0, 0, 0, 0, 0, 0, 0, 0,
9970
9971 0, 0, 0, 0, 0, 0, 0, 0,
9972 0, 0, 0, 0, 0, 0, 0, 0,
9973 0, 0, 0, 0, 0, 0, 0, 0,
9974 0, 0, 0, 0, 0, 0, 0, 0,
9975 0, 0, 0, 0, 0, 0, 0, 0,
9976 0, 0, 0, 0, 0, 0, 0, 0,
9977 0, 0, 0, 0, 0, 0, 0, 0,
9978 0, 0, 0, 0, 0, 0, 0, 0,
9979 0, 0, 0, 0, 0, 0, 0, 0,
9980 0, 0, 0, 27, 28, 29, 30, 31,
9981 32, 33, 34, 230, 230, 220, 0, 0,
9982 0, 0, 0, 0, 0, 0, 0, 0,
9983 0, 0, 0, 0, 0, 0, 0, 0,
9984 0, 0, 0, 0, 0, 0, 0, 0,
9985 35, 0, 0, 0, 0, 0, 0, 0,
9986 0, 0, 0, 0, 0, 0, 0, 0,
9987 0, 0, 0, 0, 0, 0, 0, 0,
9988 0, 0, 0, 0, 0, 0, 0, 0,
9989 0, 0, 0, 0, 0, 0, 0, 0,
9990 0, 0, 0, 0, 0, 0, 0, 0,
9991 0, 0, 0, 0, 0, 0, 0, 0,
9992 0, 0, 0, 0, 0, 0, 0, 0,
9993 0, 0, 0, 0, 0, 0, 0, 0,
9994 0, 0, 0, 0, 0, 0, 0, 0,
9995 0, 0, 0, 0, 0, 0, 0, 0,
9996 0, 0, 0, 0, 0, 0, 0, 0,
9997 0, 0, 0, 0, 0, 0, 230, 230,
9998 230, 230, 230, 230, 230, 0, 0, 230,
9999 230, 230, 230, 220, 230, 0, 0, 230,
10000 230, 0, 220, 230, 230, 220, 0, 0,
10001 0, 0, 0, 0, 0, 0, 0, 0,
10002 0, 0, 0, 0, 0, 0, 0, 0,
10003
10004 0, 0, 0, 0, 0, 0, 0, 0,
10005 0, 0, 0, 0, 0, 0, 0, 0,
10006 0, 36, 0, 0, 0, 0, 0, 0,
10007 0, 0, 0, 0, 0, 0, 0, 0,
10008 0, 0, 0, 0, 0, 0, 0, 0,
10009 0, 0, 0, 0, 0, 0, 0, 0,
10010 230, 220, 230, 230, 220, 230, 230, 220,
10011 220, 220, 230, 220, 220, 230, 220, 230,
10012 230, 230, 220, 230, 220, 230, 220, 230,
10013 220, 230, 230, 0, 0, 0, 0, 0,
10014 0, 0, 0, 0, 0, 0, 0, 0,
10015 0, 0, 0, 0, 0, 0, 0, 0,
10016 0, 0, 0, 0, 0, 0, 0, 0,
10017 0, 0, 0, 0, 0, 0, 0, 0,
10018 0, 0, 0, 0, 0, 0, 0, 0,
10019 0, 0, 0, 0, 0, 0, 0, 0,
10020 0, 0, 0, 0, 0, 0, 0, 0,
10021 0, 0, 0, 0, 0, 0, 0, 0,
10022 0, 0, 0, 0, 0, 0, 0, 0,
10023 0, 0, 0, 0, 0, 0, 0, 0,
10024 0, 0, 0, 0, 0, 0, 0, 0,
10025 0, 0, 0, 0, 0, 0, 0, 0,
10026 0, 0, 0, 0, 0, 0, 0, 0,
10027 0, 0, 0, 0, 0, 0, 0, 0,
10028 0, 0, 0, 0, 0, 0, 0, 0,
10029 0, 0, 0, 0, 0, 0, 0, 0,
10030 0, 0, 0, 0, 0, 0, 0, 0,
10031 0, 0, 0, 0, 0, 0, 0, 0,
10032 0, 0, 0, 0, 0, 0, 0, 0,
10033 0, 0, 0, 0, 0, 0, 0, 0,
10034 0, 0, 0, 0, 0, 0, 0, 0,
10035 0, 0, 0, 0, 0, 0, 0, 0,
10036
10037 0, 0, 0, 0, 0, 0, 0, 0,
10038 0, 0, 0, 0, 0, 0, 0, 0,
10039 0, 0, 0, 0, 0, 0, 0, 0,
10040 0, 0, 0, 0, 0, 0, 0, 0,
10041 0, 0, 0, 0, 0, 0, 0, 0,
10042 0, 0, 0, 0, 0, 0, 0, 0,
10043 0, 0, 0, 0, 0, 0, 0, 0,
10044 0, 0, 0, 0, 7, 0, 0, 0,
10045 0, 0, 0, 0, 0, 0, 0, 0,
10046 0, 0, 0, 0, 0, 9, 0, 0,
10047 0, 230, 220, 230, 230, 0, 0, 0,
10048 0, 0, 0, 0, 0, 0, 0, 0,
10049 0, 0, 0, 0, 0, 0, 0, 0,
10050 0, 0, 0, 0, 0, 0, 0, 0,
10051 0, 0, 0, 0, 0, 0, 0, 0,
10052 0, 0, 0, 0, 0, 0, 0, 0,
10053 0, 0, 0, 0, 0, 0, 0, 0,
10054 0, 0, 0, 0, 0, 0, 0, 0,
10055 0, 0, 0, 0, 0, 0, 0, 0,
10056 0, 0, 0, 0, 0, 0, 0, 0,
10057 0, 0, 0, 0, 0, 0, 0, 0,
10058 0, 0, 0, 0, 0, 0, 0, 0,
10059 0, 0, 0, 0, 0, 0, 0, 0,
10060 0, 0, 0, 0, 7, 0, 0, 0,
10061 0, 0, 0, 0, 0, 0, 0, 0,
10062 0, 0, 0, 0, 0, 9, 0, 0,
10063 0, 0, 0, 0, 0, 0, 0, 0,
10064 0, 0, 0, 0, 0, 0, 0, 0,
10065 0, 0, 0, 0, 0, 0, 0, 0,
10066 0, 0, 0, 0, 0, 0, 0, 0,
10067 0, 0, 0, 0, 0, 0, 0, 0,
10068 0, 0, 0, 0, 0, 0, 0, 0,
10069
10070 0, 0, 0, 0, 0, 0, 0, 0,
10071 0, 0, 0, 0, 0, 0, 0, 0,
10072 0, 0, 0, 0, 0, 0, 0, 0,
10073 0, 0, 0, 0, 0, 0, 0, 0,
10074 0, 0, 0, 0, 0, 0, 0, 0,
10075 0, 0, 0, 0, 0, 0, 0, 0,
10076 0, 0, 0, 0, 0, 0, 0, 0,
10077 0, 0, 0, 0, 7, 0, 0, 0,
10078 0, 0, 0, 0, 0, 0, 0, 0,
10079 0, 0, 0, 0, 0, 9, 0, 0,
10080 0, 0, 0, 0, 0, 0, 0, 0,
10081 0, 0, 0, 0, 0, 0, 0, 0,
10082 0, 0, 0, 0, 0, 0, 0, 0,
10083 0, 0, 0, 0, 0, 0, 0, 0,
10084 0, 0, 0, 0, 0, 0, 0, 0,
10085 0, 0, 0, 0, 0, 0, 0, 0,
10086 0, 0, 0, 0, 0, 0, 0, 0,
10087 0, 0, 0, 0, 0, 0, 0, 0,
10088 0, 0, 0, 0, 0, 0, 0, 0,
10089 0, 0, 0, 0, 0, 0, 0, 0,
10090 0, 0, 0, 0, 0, 0, 0, 0,
10091 0, 0, 0, 0, 0, 0, 0, 0,
10092 0, 0, 0, 0, 0, 0, 0, 0,
10093 0, 0, 0, 0, 7, 0, 0, 0,
10094 0, 0, 0, 0, 0, 0, 0, 0,
10095 0, 0, 0, 0, 0, 9, 0, 0,
10096 0, 0, 0, 0, 0, 0, 0, 0,
10097 0, 0, 0, 0, 0, 0, 0, 0,
10098 0, 0, 0, 0, 0, 0, 0, 0,
10099 0, 0, 0, 0, 0, 0, 0, 0,
10100 0, 0, 0, 0, 0, 0, 0, 0,
10101 0, 0, 0, 0, 0, 0, 0, 0,
10102
10103 0, 0, 0, 0, 0, 0, 0, 0,
10104 0, 0, 0, 0, 0, 0, 0, 0,
10105 0, 0, 0, 0, 0, 0, 0, 0,
10106 0, 0, 0, 0, 0, 0, 0, 0,
10107 0, 0, 0, 0, 0, 0, 0, 0,
10108 0, 0, 0, 0, 0, 0, 0, 0,
10109 0, 0, 0, 0, 0, 0, 0, 0,
10110 0, 0, 0, 0, 7, 0, 0, 0,
10111 0, 0, 0, 0, 0, 0, 0, 0,
10112 0, 0, 0, 0, 0, 9, 0, 0,
10113 0, 0, 0, 0, 0, 0, 0, 0,
10114 0, 0, 0, 0, 0, 0, 0, 0,
10115 0, 0, 0, 0, 0, 0, 0, 0,
10116 0, 0, 0, 0, 0, 0, 0, 0,
10117 0, 0, 0, 0, 0, 0, 0, 0,
10118 0, 0, 0, 0, 0, 0, 0, 0,
10119 0, 0, 0, 0, 0, 0, 0, 0,
10120 0, 0, 0, 0, 0, 0, 0, 0,
10121 0, 0, 0, 0, 0, 0, 0, 0,
10122 0, 0, 0, 0, 0, 0, 0, 0,
10123 0, 0, 0, 0, 0, 0, 0, 0,
10124 0, 0, 0, 0, 0, 0, 0, 0,
10125 0, 0, 0, 0, 0, 0, 0, 0,
10126 0, 0, 0, 0, 0, 0, 0, 0,
10127 0, 0, 0, 0, 0, 0, 0, 0,
10128 0, 0, 0, 0, 0, 9, 0, 0,
10129 0, 0, 0, 0, 0, 0, 0, 0,
10130 0, 0, 0, 0, 0, 0, 0, 0,
10131 0, 0, 0, 0, 0, 0, 0, 0,
10132 0, 0, 0, 0, 0, 0, 0, 0,
10133 0, 0, 0, 0, 0, 0, 0, 0,
10134 0, 0, 0, 0, 0, 0, 0, 0,
10135
10136 0, 0, 0, 0, 0, 0, 0, 0,
10137 0, 0, 0, 0, 0, 0, 0, 0,
10138 0, 0, 0, 0, 0, 0, 0, 0,
10139 0, 0, 0, 0, 0, 0, 0, 0,
10140 0, 0, 0, 0, 0, 0, 0, 0,
10141 0, 0, 0, 0, 0, 0, 0, 0,
10142 0, 0, 0, 0, 0, 0, 0, 0,
10143 0, 0, 0, 0, 0, 0, 0, 0,
10144 0, 0, 0, 0, 0, 0, 0, 0,
10145 0, 0, 0, 0, 0, 9, 0, 0,
10146 0, 0, 0, 0, 0, 84, 91, 0,
10147 0, 0, 0, 0, 0, 0, 0, 0,
10148 0, 0, 0, 0, 0, 0, 0, 0,
10149 0, 0, 0, 0, 0, 0, 0, 0,
10150 0, 0, 0, 0, 0, 0, 0, 0,
10151 0, 0, 0, 0, 0, 0, 0, 0,
10152 0, 0, 0, 0, 0, 0, 0, 0,
10153 0, 0, 0, 0, 0, 0, 0, 0,
10154 0, 0, 0, 0, 0, 0, 0, 0,
10155 0, 0, 0, 0, 0, 0, 0, 0,
10156 0, 0, 0, 0, 0, 0, 0, 0,
10157 0, 0, 0, 0, 0, 0, 0, 0,
10158 0, 0, 0, 0, 0, 0, 0, 0,
10159 0, 0, 0, 0, 0, 0, 0, 0,
10160 0, 0, 0, 0, 0, 0, 0, 0,
10161 0, 0, 0, 0, 0, 9, 0, 0,
10162 0, 0, 0, 0, 0, 0, 0, 0,
10163 0, 0, 0, 0, 0, 0, 0, 0,
10164 0, 0, 0, 0, 0, 0, 0, 0,
10165 0, 0, 0, 0, 0, 0, 0, 0,
10166 0, 0, 0, 0, 0, 0, 0, 0,
10167 0, 0, 0, 0, 0, 0, 0, 0,
10168
10169 0, 0, 0, 0, 0, 0, 0, 0,
10170 0, 0, 0, 0, 0, 0, 0, 0,
10171 0, 0, 0, 0, 0, 0, 0, 0,
10172 0, 0, 0, 0, 0, 0, 0, 0,
10173 0, 0, 0, 0, 0, 0, 0, 0,
10174 0, 0, 0, 0, 0, 0, 0, 0,
10175 0, 0, 0, 0, 0, 0, 0, 0,
10176 0, 0, 0, 0, 0, 0, 0, 0,
10177 0, 0, 0, 0, 0, 0, 0, 0,
10178 0, 0, 0, 0, 0, 9, 0, 0,
10179 0, 0, 0, 0, 0, 0, 0, 0,
10180 0, 0, 0, 0, 0, 0, 0, 0,
10181 0, 0, 0, 0, 0, 0, 0, 0,
10182 0, 0, 0, 0, 0, 0, 0, 0,
10183 0, 0, 0, 0, 0, 0, 0, 0,
10184 0, 0, 0, 0, 0, 0, 0, 0,
10185 0, 0, 0, 0, 0, 0, 0, 0,
10186 0, 0, 0, 0, 0, 0, 0, 0,
10187 0, 0, 0, 0, 0, 0, 0, 0,
10188 0, 0, 0, 0, 0, 0, 0, 0,
10189 0, 0, 0, 0, 0, 0, 0, 0,
10190 0, 0, 0, 0, 0, 0, 0, 0,
10191 0, 0, 0, 0, 0, 0, 0, 0,
10192 0, 0, 0, 0, 0, 0, 0, 0,
10193 0, 0, 0, 0, 0, 0, 0, 0,
10194 0, 0, 9, 0, 0, 0, 0, 0,
10195 0, 0, 0, 0, 0, 0, 0, 0,
10196 0, 0, 0, 0, 0, 0, 0, 0,
10197 0, 0, 0, 0, 0, 0, 0, 0,
10198 0, 0, 0, 0, 0, 0, 0, 0,
10199 0, 0, 0, 0, 0, 0, 0, 0,
10200 0, 0, 0, 0, 0, 0, 0, 0,
10201
10202 0, 0, 0, 0, 0, 0, 0, 0,
10203 0, 0, 0, 0, 0, 0, 0, 0,
10204 0, 0, 0, 0, 0, 0, 0, 0,
10205 0, 0, 0, 0, 0, 0, 0, 0,
10206 0, 0, 0, 0, 0, 0, 0, 0,
10207 0, 0, 0, 0, 0, 0, 0, 0,
10208 0, 0, 0, 0, 0, 0, 0, 0,
10209 103, 103, 9, 0, 0, 0, 0, 0,
10210 0, 0, 0, 0, 0, 0, 0, 0,
10211 107, 107, 107, 107, 0, 0, 0, 0,
10212 0, 0, 0, 0, 0, 0, 0, 0,
10213 0, 0, 0, 0, 0, 0, 0, 0,
10214 0, 0, 0, 0, 0, 0, 0, 0,
10215 0, 0, 0, 0, 0, 0, 0, 0,
10216 0, 0, 0, 0, 0, 0, 0, 0,
10217 0, 0, 0, 0, 0, 0, 0, 0,
10218 0, 0, 0, 0, 0, 0, 0, 0,
10219 0, 0, 0, 0, 0, 0, 0, 0,
10220 0, 0, 0, 0, 0, 0, 0, 0,
10221 0, 0, 0, 0, 0, 0, 0, 0,
10222 0, 0, 0, 0, 0, 0, 0, 0,
10223 0, 0, 0, 0, 0, 0, 0, 0,
10224 0, 0, 0, 0, 0, 0, 0, 0,
10225 118, 118, 0, 0, 0, 0, 0, 0,
10226 0, 0, 0, 0, 0, 0, 0, 0,
10227 122, 122, 122, 122, 0, 0, 0, 0,
10228 0, 0, 0, 0, 0, 0, 0, 0,
10229 0, 0, 0, 0, 0, 0, 0, 0,
10230 0, 0, 0, 0, 0, 0, 0, 0,
10231 0, 0, 0, 0, 0, 0, 0, 0,
10232 0, 0, 0, 0, 0, 0, 0, 0,
10233 0, 0, 0, 0, 0, 0, 0, 0,
10234
10235 0, 0, 0, 0, 0, 0, 0, 0,
10236 0, 0, 0, 0, 0, 0, 0, 0,
10237 0, 0, 0, 0, 0, 0, 0, 0,
10238 220, 220, 0, 0, 0, 0, 0, 0,
10239 0, 0, 0, 0, 0, 0, 0, 0,
10240 0, 0, 0, 0, 0, 0, 0, 0,
10241 0, 0, 0, 0, 0, 220, 0, 220,
10242 0, 216, 0, 0, 0, 0, 0, 0,
10243 0, 0, 0, 0, 0, 0, 0, 0,
10244 0, 0, 0, 0, 0, 0, 0, 0,
10245 0, 0, 0, 0, 0, 0, 0, 0,
10246 0, 0, 0, 0, 0, 0, 0, 0,
10247 0, 0, 0, 0, 0, 0, 0, 0,
10248 0, 0, 0, 0, 0, 0, 0, 0,
10249 0, 129, 130, 0, 132, 0, 0, 0,
10250 0, 0, 130, 130, 130, 130, 0, 0,
10251 130, 0, 230, 230, 9, 0, 230, 230,
10252 0, 0, 0, 0, 0, 0, 0, 0,
10253 0, 0, 0, 0, 0, 0, 0, 0,
10254 0, 0, 0, 0, 0, 0, 0, 0,
10255 0, 0, 0, 0, 0, 0, 0, 0,
10256 0, 0, 0, 0, 0, 0, 0, 0,
10257 0, 0, 0, 0, 0, 0, 0, 0,
10258 0, 0, 0, 0, 0, 0, 0, 0,
10259 0, 0, 0, 0, 0, 0, 220, 0,
10260 0, 0, 0, 0, 0, 0, 0, 0,
10261 0, 0, 0, 0, 0, 0, 0, 0,
10262 0, 0, 0, 0, 0, 0, 0, 0,
10263 0, 0, 0, 0, 0, 0, 0, 0,
10264 0, 0, 0, 0, 0, 0, 0, 0,
10265 0, 0, 0, 0, 0, 0, 0, 0,
10266 0, 0, 0, 0, 0, 0, 0, 0,
10267
10268 0, 0, 0, 0, 0, 0, 0, 0,
10269 0, 0, 0, 0, 0, 0, 0, 0,
10270 0, 0, 0, 0, 0, 0, 0, 0,
10271 0, 0, 0, 0, 0, 0, 0, 0,
10272 0, 0, 0, 0, 0, 0, 0, 0,
10273 0, 0, 0, 0, 0, 0, 0, 0,
10274 0, 0, 0, 0, 0, 0, 0, 7,
10275 0, 9, 0, 0, 0, 0, 0, 0,
10276 0, 0, 0, 0, 0, 0, 0, 0,
10277 0, 0, 0, 0, 0, 0, 0, 0,
10278 0, 0, 0, 0, 0, 0, 0, 0,
10279 0, 0, 0, 0, 0, 0, 0, 0,
10280 0, 0, 0, 0, 0, 0, 0, 0,
10281 0, 0, 0, 0, 0, 0, 0, 0,
10282 0, 0, 0, 0, 0, 0, 0, 0,
10283 0, 0, 0, 0, 0, 0, 0, 0,
10284 0, 0, 0, 0, 0, 0, 0, 0,
10285 0, 0, 0, 0, 0, 0, 0, 0,
10286 0, 0, 0, 0, 0, 0, 0, 0,
10287 0, 0, 0, 0, 0, 0, 0, 0,
10288 0, 0, 0, 0, 0, 0, 0, 0,
10289 0, 0, 0, 0, 0, 0, 0, 0,
10290 0, 0, 0, 0, 0, 0, 0, 0,
10291 0, 0, 0, 0, 0, 0, 0, 0,
10292 0, 0, 0, 0, 0, 0, 0, 0,
10293 0, 0, 0, 0, 0, 0, 0, 0,
10294 0, 0, 0, 0, 0, 0, 0, 0,
10295 0, 0, 0, 0, 0, 0, 0, 0,
10296 0, 0, 0, 0, 0, 0, 0, 0,
10297 0, 0, 0, 0, 0, 0, 0, 0,
10298 0, 0, 0, 0, 0, 0, 0, 0,
10299 0, 0, 0, 0, 0, 0, 0, 0,
10300
10301 0, 0, 0, 0, 0, 0, 0, 0,
10302 0, 0, 0, 0, 0, 0, 0, 0,
10303 0, 0, 0, 0, 9, 0, 0, 0,
10304 0, 0, 0, 0, 0, 0, 0, 0,
10305 0, 0, 0, 0, 0, 0, 0, 0,
10306 0, 0, 0, 0, 0, 0, 0, 0,
10307 0, 0, 0, 0, 9, 0, 0, 0,
10308 0, 0, 0, 0, 0, 0, 0, 0,
10309 0, 0, 0, 0, 0, 0, 0, 0,
10310 0, 0, 0, 0, 0, 0, 0, 0,
10311 0, 0, 0, 0, 0, 0, 0, 0,
10312 0, 0, 0, 0, 0, 0, 0, 0,
10313 0, 0, 0, 0, 0, 0, 0, 0,
10314 0, 0, 0, 0, 0, 0, 0, 0,
10315 0, 0, 0, 0, 0, 0, 0, 0,
10316 0, 0, 0, 0, 0, 0, 0, 0,
10317 0, 0, 0, 0, 0, 0, 0, 0,
10318 0, 0, 0, 0, 0, 0, 0, 0,
10319 0, 0, 0, 0, 0, 0, 0, 0,
10320 0, 0, 0, 0, 0, 0, 0, 0,
10321 0, 0, 0, 0, 0, 0, 0, 0,
10322 0, 0, 0, 0, 0, 0, 0, 0,
10323 0, 0, 0, 0, 0, 0, 0, 0,
10324 0, 0, 0, 0, 0, 0, 0, 0,
10325 0, 0, 0, 0, 0, 0, 0, 0,
10326 0, 0, 0, 0, 0, 0, 0, 0,
10327 0, 0, 9, 0, 0, 0, 0, 0,
10328 0, 0, 0, 0, 0, 0, 0, 0,
10329 0, 0, 0, 0, 0, 0, 0, 0,
10330 0, 0, 0, 0, 0, 0, 0, 0,
10331 0, 0, 0, 0, 0, 0, 0, 0,
10332 0, 0, 0, 0, 0, 0, 0, 0,
10333
10334 0, 0, 0, 0, 0, 0, 0, 0,
10335 0, 0, 0, 0, 0, 0, 0, 0,
10336 0, 0, 0, 0, 0, 0, 0, 0,
10337 0, 0, 0, 0, 0, 0, 0, 0,
10338 0, 0, 0, 0, 0, 0, 0, 0,
10339 0, 0, 0, 0, 0, 0, 0, 0,
10340 0, 0, 0, 0, 0, 0, 0, 0,
10341 0, 0, 0, 0, 0, 0, 0, 0,
10342 0, 0, 0, 0, 0, 0, 0, 0,
10343 0, 0, 0, 0, 0, 0, 0, 0,
10344 0, 0, 0, 0, 0, 0, 0, 0,
10345 0, 0, 0, 0, 0, 0, 0, 0,
10346 0, 0, 0, 0, 0, 0, 0, 0,
10347 0, 0, 0, 0, 0, 0, 0, 0,
10348 0, 0, 0, 0, 0, 0, 0, 0,
10349 0, 0, 0, 0, 0, 0, 0, 0,
10350 0, 0, 0, 0, 0, 0, 0, 0,
10351 0, 0, 0, 0, 0, 0, 0, 0,
10352 0, 0, 0, 0, 0, 0, 0, 0,
10353 0, 0, 0, 0, 0, 0, 0, 0,
10354 0, 0, 0, 0, 0, 0, 0, 0,
10355 0, 228, 0, 0, 0, 0, 0, 0,
10356 0, 0, 0, 0, 0, 0, 0, 0,
10357 0, 0, 0, 0, 0, 0, 0, 0,
10358 0, 0, 0, 0, 0, 0, 0, 0,
10359 0, 0, 0, 0, 0, 0, 0, 0,
10360 0, 0, 0, 0, 0, 0, 0, 0,
10361 0, 0, 0, 0, 0, 0, 0, 0,
10362 0, 0, 0, 0, 0, 0, 0, 0,
10363 0, 0, 0, 0, 0, 0, 0, 0,
10364 0, 0, 0, 0, 0, 0, 0, 0,
10365 0, 0, 0, 0, 0, 0, 0, 0,
10366
10367 0, 0, 0, 0, 0, 0, 0, 0,
10368 0, 0, 0, 0, 0, 0, 0, 0,
10369 0, 0, 0, 0, 0, 0, 0, 0,
10370 0, 0, 0, 0, 0, 0, 0, 0,
10371 0, 0, 0, 0, 0, 0, 0, 0,
10372 0, 0, 0, 0, 0, 0, 0, 0,
10373 0, 0, 0, 0, 0, 0, 0, 0,
10374 0, 0, 0, 0, 0, 0, 0, 0,
10375 0, 0, 0, 0, 0, 0, 0, 0,
10376 0, 0, 0, 0, 0, 0, 0, 0,
10377 0, 0, 0, 0, 0, 0, 0, 0,
10378 0, 0, 0, 0, 0, 0, 0, 0,
10379 0, 0, 0, 0, 0, 0, 0, 0,
10380 0, 0, 0, 0, 0, 0, 0, 0,
10381 0, 0, 0, 0, 0, 0, 0, 0,
10382 0, 0, 0, 0, 0, 0, 0, 0,
10383 0, 0, 0, 0, 0, 0, 0, 0,
10384 0, 0, 0, 0, 0, 0, 0, 0,
10385 0, 0, 0, 0, 0, 0, 0, 0,
10386 0, 0, 0, 0, 0, 0, 0, 0,
10387 0, 0, 0, 0, 0, 0, 0, 0,
10388 0, 0, 0, 0, 0, 0, 0, 0,
10389 0, 0, 0, 0, 0, 0, 0, 0,
10390 0, 0, 0, 0, 0, 0, 0, 0,
10391 0, 0, 0, 0, 0, 0, 0, 0,
10392 0, 0, 0, 0, 0, 0, 0, 0,
10393 230, 230, 1, 1, 230, 230, 230, 230,
10394 1, 1, 1, 230, 230, 0, 0, 0,
10395 0, 230, 0, 0, 0, 1, 1, 230,
10396 220, 230, 1, 0, 0, 0, 0, 0,
10397 0, 0, 0, 0, 0, 0, 0, 0,
10398 0, 0, 0, 0, 0, 0, 0, 0,
10399
10400 0, 0, 0, 0, 0, 0, 0, 0,
10401 0, 0, 0, 0, 0, 0, 0, 0,
10402 0, 0, 0, 0, 0, 0, 0, 0,
10403 0, 0, 0, 0, 0, 0, 0, 0,
10404 0, 0, 0, 0, 0, 0, 0, 0,
10405 0, 0, 218, 228, 232, 222, 224, 224,
10406 0, 0, 0, 0, 0, 0, 0, 0,
10407 0, 0, 0, 0, 0, 0, 0, 0,
10408 0, 0, 0, 0, 0, 0, 0, 0,
10409 0, 0, 0, 0, 0, 0, 0, 0,
10410 0, 0, 0, 0, 0, 0, 0, 0,
10411 0, 0, 0, 0, 0, 0, 0, 0,
10412 0, 0, 0, 0, 0, 0, 0, 0,
10413 0, 0, 0, 0, 0, 0, 0, 0,
10414 0, 0, 0, 0, 0, 0, 0, 0,
10415 0, 0, 0, 0, 0, 0, 0, 0,
10416 0, 0, 0, 0, 0, 0, 0, 0,
10417 0, 0, 0, 0, 0, 0, 0, 0,
10418 0, 0, 0, 0, 0, 0, 0, 0,
10419 0, 8, 8, 0, 0, 0, 0, 0,
10420 0, 0, 0, 0, 0, 0, 0, 0,
10421 0, 0, 0, 0, 0, 0, 0, 0,
10422 0, 0, 0, 0, 0, 0, 0, 0,
10423 0, 0, 0, 0, 0, 0, 0, 0,
10424 0, 0, 0, 0, 0, 0, 0, 0,
10425 0, 0, 0, 0, 0, 0, 0, 0,
10426 0, 0, 0, 0, 0, 0, 0, 0,
10427 0, 0, 0, 0, 0, 0, 0, 0,
10428 0, 0, 0, 0, 0, 0, 0, 0,
10429 0, 0, 0, 0, 0, 0, 0, 0,
10430 0, 0, 0, 0, 0, 0, 0, 0,
10431 0, 0, 0, 0, 0, 0, 0, 0,
10432
10433 0, 0, 0, 0, 0, 0, 0, 0,
10434 0, 0, 0, 0, 0, 0, 0, 0,
10435 0, 0, 0, 0, 0, 0, 0, 0,
10436 0, 0, 0, 0, 0, 0, 26, 0,
10437 0, 0, 0, 0, 0, 0, 0, 0,
10438 0, 0, 0, 0, 0, 0, 0, 0,
10439 0, 0, 0, 0, 0, 0, 0, 0,
10440 0, 0, 0, 0, 0, 0, 0, 0,
10441 0, 0, 0, 0, 0, 0, 0, 0,
10442 0, 0, 0, 0, 0, 0, 0, 0,
10443 0, 0, 0, 0, 0, 0, 0, 0,
10444 0, 0, 0, 0, 0, 0, 0, 0,
10445 0, 0, 0, 0, 0, 0, 0, 0,
10446 0, 0, 0, 0, 0, 0, 0, 0,
10447 0, 0, 0, 0, 0, 0, 0, 0,
10448 0, 0, 0, 0, 0, 0, 0, 0,
10449 0, 0, 0, 0, 0, 0, 0, 0,
10450 0, 0, 0, 0, 0, 0, 0, 0,
10451 0, 0, 0, 0, 0, 0, 0, 0,
10452 0, 0, 0, 0, 0, 0, 0, 0,
10453 0, 0, 0, 0, 0, 0, 0, 0,
10454 0, 0, 0, 0, 0, 0, 0, 0,
10455 0, 0, 0, 0, 0, 0, 0, 0,
10456 0, 0, 0, 0, 0, 0, 0, 0,
10457 0, 0, 0, 0, 0, 0, 0, 0,
10458 0, 0, 0, 0, 0, 0, 0, 0,
10459 0, 0, 0, 0, 0, 0, 0, 0,
10460 0, 0, 0, 0, 0, 0, 0, 0,
10461 0, 0, 0, 0, 0, 0, 0, 0,
10462 0, 0, 0, 0, 0, 0, 0, 0,
10463 0, 0, 0, 0, 0, 0, 0, 0,
10464 0, 0, 0, 0, 0, 0, 0, 0,
10465
10466 0, 0, 0, 0, 0, 0, 0, 0,
10467 0, 0, 0, 0, 0, 0, 0, 0,
10468 0, 0, 0, 0, 0, 0, 0, 0,
10469 0, 0, 0, 0, 0, 0, 0, 0,
10470 230, 230, 230, 230, 0, 0, 0, 0,
10471 0, 0, 0, 0, 0, 0, 0, 0,
10472 0, 0, 0, 0, 0, 0, 0, 0,
10473 0, 0, 0, 0, 0, 0, 0, 0,
10474 0, 0, 0, 0, 0, 0, 0, 0,
10475 0, 0, 0, 0, 0, 0, 0, 0,
10476 0, 0, 0, 0, 0, 0, 0, 0,
10477 0, 0, 0, 0, 0, 0, 0, 0,
10478 0, 0, 0, 0, 0, 0, 0, 0,
10479 0, 0, 0, 0, 0, 0, 0, 0,
10480 0, 0, 0, 0, 0, 0, 0, 0,
10481 0, 0, 0, 0, 0, 0, 0, 0,
10482 0, 0, 0, 0, 0, 0, 0, 0,
10483 0, 0, 0, 0, 0, 0, 0, 0,
10484 0, 0, 0, 0, 0, 0, 0, 0,
10485 0, 0, 0, 0, 0, 0, 0, 0,
10486 0, 0, 0, 0, 0, 0, 0, 0,
10487 0, 0, 0, 0, 0, 0, 0, 0,
10488 0, 0, 0, 0, 0, 0, 0, 0,
10489 0, 0, 0, 0, 0, 0, 0, 0,
10490 0, 0, 0, 0, 0, 0, 0, 0,
10491 0, 0, 0, 0, 0, 0, 0, 0,
10492 0, 0, 0, 0, 0, 0, 0, 0,
10493 0, 0, 0, 0, 0, 0, 0, 0,
10494 0, 0, 0, 0, 0, 0, 0, 0,
10495 0, 0, 0, 0, 0, 0, 0, 0,
10496 0, 0, 0, 0, 0, 0, 0, 0,
10497 0, 0, 0, 0, 0, 0, 0, 0,
10498};
10499
10500// 30458 bytes
10501
10502const Q_UINT16 QUnicodeTables::case_info[] = {
10503 1, 2, 3, 4, 5, 6, 0, 0,
10504 0, 0, 0, 0, 0, 0, 0, 0,
10505 0, 0, 0, 0, 0, 0, 0, 0,
10506 0, 0, 0, 0, 0, 0, 7, 8,
10507 0, 9, 0, 0, 10, 0, 0, 0,
10508 0, 0, 0, 0, 0, 0, 0, 0,
10509 0, 0, 0, 0, 0, 0, 0, 0,
10510 0, 0, 0, 0, 0, 0, 0, 0,
10511 0, 0, 0, 0, 0, 0, 0, 0,
10512 0, 0, 0, 0, 0, 0, 0, 0,
10513 0, 0, 0, 0, 0, 0, 0, 0,
10514 0, 0, 0, 0, 0, 0, 0, 0,
10515 0, 0, 0, 0, 0, 0, 0, 0,
10516 0, 0, 0, 0, 0, 0, 0, 0,
10517 0, 0, 0, 0, 0, 0, 0, 0,
10518 0, 0, 0, 0, 0, 0, 0, 0,
10519 0, 0, 0, 0, 0, 0, 0, 0,
10520 0, 0, 0, 0, 0, 0, 0, 0,
10521 0, 0, 0, 0, 0, 0, 0, 0,
10522 0, 0, 0, 0, 0, 0, 0, 0,
10523 0, 0, 0, 0, 0, 0, 0, 0,
10524 0, 0, 0, 0, 0, 0, 0, 0,
10525 0, 0, 0, 0, 0, 0, 0, 0,
10526 0, 0, 0, 0, 0, 0, 0, 0,
10527 0, 0, 0, 0, 0, 0, 0, 0,
10528 0, 0, 0, 0, 0, 0, 0, 0,
10529 0, 0, 0, 0, 0, 0, 0, 0,
10530 0, 0, 0, 0, 0, 0, 0, 0,
10531 0, 0, 0, 0, 0, 0, 0, 0,
10532 0, 0, 0, 0, 0, 0, 0, 0,
10533 0, 0, 0, 0, 0, 0, 0, 0,
10534 0, 0, 0, 0, 0, 0, 0, 11,
10535
10536
10537 0, 0, 0, 0, 0, 0, 0, 0,
10538 0, 0, 0, 0, 0, 0, 0, 0,
10539 0, 0, 0, 0, 0, 0, 0, 0,
10540 0, 0, 0, 0, 0, 0, 0, 0,
10541 0, 0, 0, 0, 0, 0, 0, 0,
10542 0, 0, 0, 0, 0, 0, 0, 0,
10543 0, 0, 0, 0, 0, 0, 0, 0,
10544 0, 0, 0, 0, 0, 0, 0, 0,
10545 0, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
10546 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
10547 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
10548 0x78, 0x79, 0x7a, 0, 0, 0, 0, 0,
10549 0, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
10550 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
10551 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57,
10552 0x58, 0x59, 0x5a, 0, 0, 0, 0, 0,
10553 0, 0, 0, 0, 0, 0, 0, 0,
10554 0, 0, 0, 0, 0, 0, 0, 0,
10555 0, 0, 0, 0, 0, 0, 0, 0,
10556 0, 0, 0, 0, 0, 0, 0, 0,
10557 0, 0, 0, 0, 0, 0, 0, 0,
10558 0, 0, 0, 0, 0, 0, 0, 0,
10559 0, 0, 0, 0, 0, 0x39c, 0, 0,
10560 0, 0, 0, 0, 0, 0, 0, 0,
10561 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7,
10562 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
10563 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0,
10564 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0,
10565 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
10566 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
10567 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0,
10568 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0x178,
10569
10570 0x101, 0x100, 0x103, 0x102, 0x105, 0x104, 0x107, 0x106,
10571 0x109, 0x108, 0x10b, 0x10a, 0x10d, 0x10c, 0x10f, 0x10e,
10572 0x111, 0x110, 0x113, 0x112, 0x115, 0x114, 0x117, 0x116,
10573 0x119, 0x118, 0x11b, 0x11a, 0x11d, 0x11c, 0x11f, 0x11e,
10574 0x121, 0x120, 0x123, 0x122, 0x125, 0x124, 0x127, 0x126,
10575 0x129, 0x128, 0x12b, 0x12a, 0x12d, 0x12c, 0x12f, 0x12e,
10576 0x69, 0x49, 0x133, 0x132, 0x135, 0x134, 0x137, 0x136,
10577 0, 0x13a, 0x139, 0x13c, 0x13b, 0x13e, 0x13d, 0x140,
10578 0x13f, 0x142, 0x141, 0x144, 0x143, 0x146, 0x145, 0x148,
10579 0x147, 0, 0x14b, 0x14a, 0x14d, 0x14c, 0x14f, 0x14e,
10580 0x151, 0x150, 0x153, 0x152, 0x155, 0x154, 0x157, 0x156,
10581 0x159, 0x158, 0x15b, 0x15a, 0x15d, 0x15c, 0x15f, 0x15e,
10582 0x161, 0x160, 0x163, 0x162, 0x165, 0x164, 0x167, 0x166,
10583 0x169, 0x168, 0x16b, 0x16a, 0x16d, 0x16c, 0x16f, 0x16e,
10584 0x171, 0x170, 0x173, 0x172, 0x175, 0x174, 0x177, 0x176,
10585 0xff, 0x17a, 0x179, 0x17c, 0x17b, 0x17e, 0x17d, 0x53,
10586 0, 0x253, 0x183, 0x182, 0x185, 0x184, 0x254, 0x188,
10587 0x187, 0x256, 0x257, 0x18c, 0x18b, 0, 0x1dd, 0x259,
10588 0x25b, 0x192, 0x191, 0x260, 0x263, 0x1f6, 0x269, 0x268,
10589 0x199, 0x198, 0, 0, 0x26f, 0x272, 0x220, 0x275,
10590 0x1a1, 0x1a0, 0x1a3, 0x1a2, 0x1a5, 0x1a4, 0x280, 0x1a8,
10591 0x1a7, 0x283, 0, 0, 0x1ad, 0x1ac, 0x288, 0x1b0,
10592 0x1af, 0x28a, 0x28b, 0x1b4, 0x1b3, 0x1b6, 0x1b5, 0x292,
10593 0x1b9, 0x1b8, 0, 0, 0x1bd, 0x1bc, 0, 0x1f7,
10594 0, 0, 0, 0, 0x1c6, 0x1c4, 0x1c4, 0x1c9,
10595 0x1c7, 0x1c7, 0x1cc, 0x1ca, 0x1ca, 0x1ce, 0x1cd, 0x1d0,
10596 0x1cf, 0x1d2, 0x1d1, 0x1d4, 0x1d3, 0x1d6, 0x1d5, 0x1d8,
10597 0x1d7, 0x1da, 0x1d9, 0x1dc, 0x1db, 0x18e, 0x1df, 0x1de,
10598 0x1e1, 0x1e0, 0x1e3, 0x1e2, 0x1e5, 0x1e4, 0x1e7, 0x1e6,
10599 0x1e9, 0x1e8, 0x1eb, 0x1ea, 0x1ed, 0x1ec, 0x1ef, 0x1ee,
10600 0, 0x1f3, 0x1f1, 0x1f1, 0x1f5, 0x1f4, 0x195, 0x1bf,
10601 0x1f9, 0x1f8, 0x1fb, 0x1fa, 0x1fd, 0x1fc, 0x1ff, 0x1fe,
10602
10603 0x201, 0x200, 0x203, 0x202, 0x205, 0x204, 0x207, 0x206,
10604 0x209, 0x208, 0x20b, 0x20a, 0x20d, 0x20c, 0x20f, 0x20e,
10605 0x211, 0x210, 0x213, 0x212, 0x215, 0x214, 0x217, 0x216,
10606 0x219, 0x218, 0x21b, 0x21a, 0x21d, 0x21c, 0x21f, 0x21e,
10607 0x19e, 0, 0x223, 0x222, 0x225, 0x224, 0x227, 0x226,
10608 0x229, 0x228, 0x22b, 0x22a, 0x22d, 0x22c, 0x22f, 0x22e,
10609 0x231, 0x230, 0x233, 0x232, 0, 0, 0, 0,
10610 0, 0, 0, 0, 0, 0, 0, 0,
10611 0, 0, 0, 0, 0, 0, 0, 0,
10612 0, 0, 0, 0, 0, 0, 0, 0,
10613 0, 0, 0, 0x181, 0x186, 0, 0x189, 0x18a,
10614 0, 0x18f, 0, 0x190, 0, 0, 0, 0,
10615 0x193, 0, 0, 0x194, 0, 0, 0, 0,
10616 0x197, 0x196, 0, 0, 0, 0, 0, 0x19c,
10617 0, 0, 0x19d, 0, 0, 0x19f, 0, 0,
10618 0, 0, 0, 0, 0, 0, 0, 0,
10619 0x1a6, 0, 0, 0x1a9, 0, 0, 0, 0,
10620 0x1ae, 0, 0x1b1, 0x1b2, 0, 0, 0, 0,
10621 0, 0, 0x1b7, 0, 0, 0, 0, 0,
10622 0, 0, 0, 0, 0, 0, 0, 0,
10623 0, 0, 0, 0, 0, 0, 0, 0,
10624 0, 0, 0, 0, 0, 0, 0, 0,
10625 0, 0, 0, 0, 0, 0, 0, 0,
10626 0, 0, 0, 0, 0, 0, 0, 0,
10627 0, 0, 0, 0, 0, 0, 0, 0,
10628 0, 0, 0, 0, 0, 0, 0, 0,
10629 0, 0, 0, 0, 0, 0, 0, 0,
10630 0, 0, 0, 0, 0, 0, 0, 0,
10631 0, 0, 0, 0, 0, 0, 0, 0,
10632 0, 0, 0, 0, 0, 0, 0, 0,
10633 0, 0, 0, 0, 0, 0, 0, 0,
10634 0, 0, 0, 0, 0, 0, 0, 0,
10635
10636 0, 0, 0, 0, 0, 0, 0, 0,
10637 0, 0, 0, 0, 0, 0, 0, 0,
10638 0, 0, 0, 0, 0, 0, 0, 0,
10639 0, 0, 0, 0, 0, 0, 0, 0,
10640 0, 0, 0, 0, 0, 0, 0, 0,
10641 0, 0, 0, 0, 0, 0, 0, 0,
10642 0, 0, 0, 0, 0, 0, 0, 0,
10643 0, 0, 0, 0, 0, 0, 0, 0,
10644 0, 0, 0, 0, 0, 0x399, 0, 0,
10645 0, 0, 0, 0, 0, 0, 0, 0,
10646 0, 0, 0, 0, 0, 0, 0, 0,
10647 0, 0, 0, 0, 0, 0, 0, 0,
10648 0, 0, 0, 0, 0, 0, 0, 0,
10649 0, 0, 0, 0, 0, 0, 0, 0,
10650 0, 0, 0, 0, 0, 0, 0, 0,
10651 0, 0, 0, 0, 0, 0, 0, 0,
10652 0, 0, 0, 0, 0, 0, 0x3ac, 0,
10653 0x3ad, 0x3ae, 0x3af, 0, 0x3cc, 0, 0x3cd, 0x3ce,
10654 0, 0x3b1, 0x3b2, 0x3b3, 0x3b4, 0x3b5, 0x3b6, 0x3b7,
10655 0x3b8, 0x3b9, 0x3ba, 0x3bb, 0x3bc, 0x3bd, 0x3be, 0x3bf,
10656 0x3c0, 0x3c1, 0, 0x3c3, 0x3c4, 0x3c5, 0x3c6, 0x3c7,
10657 0x3c8, 0x3c9, 0x3ca, 0x3cb, 0x386, 0x388, 0x389, 0x38a,
10658 0, 0x391, 0x392, 0x393, 0x394, 0x395, 0x396, 0x397,
10659 0x398, 0x399, 0x39a, 0x39b, 0x39c, 0x39d, 0x39e, 0x39f,
10660 0x3a0, 0x3a1, 0x3a3, 0x3a3, 0x3a4, 0x3a5, 0x3a6, 0x3a7,
10661 0x3a8, 0x3a9, 0x3aa, 0x3ab, 0x38c, 0x38e, 0x38f, 0,
10662 0x392, 0x398, 0, 0, 0, 0x3a6, 0x3a0, 0,
10663 0x3d9, 0x3d8, 0x3db, 0x3da, 0x3dd, 0x3dc, 0x3df, 0x3de,
10664 0x3e1, 0x3e0, 0x3e3, 0x3e2, 0x3e5, 0x3e4, 0x3e7, 0x3e6,
10665 0x3e9, 0x3e8, 0x3eb, 0x3ea, 0x3ed, 0x3ec, 0x3ef, 0x3ee,
10666 0x39a, 0x3a1, 0x3a3, 0, 0x3b8, 0x395, 0, 0,
10667 0, 0, 0, 0, 0, 0, 0, 0,
10668
10669 0x450, 0x451, 0x452, 0x453, 0x454, 0x455, 0x456, 0x457,
10670 0x458, 0x459, 0x45a, 0x45b, 0x45c, 0x45d, 0x45e, 0x45f,
10671 0x430, 0x431, 0x432, 0x433, 0x434, 0x435, 0x436, 0x437,
10672 0x438, 0x439, 0x43a, 0x43b, 0x43c, 0x43d, 0x43e, 0x43f,
10673 0x440, 0x441, 0x442, 0x443, 0x444, 0x445, 0x446, 0x447,
10674 0x448, 0x449, 0x44a, 0x44b, 0x44c, 0x44d, 0x44e, 0x44f,
10675 0x410, 0x411, 0x412, 0x413, 0x414, 0x415, 0x416, 0x417,
10676 0x418, 0x419, 0x41a, 0x41b, 0x41c, 0x41d, 0x41e, 0x41f,
10677 0x420, 0x421, 0x422, 0x423, 0x424, 0x425, 0x426, 0x427,
10678 0x428, 0x429, 0x42a, 0x42b, 0x42c, 0x42d, 0x42e, 0x42f,
10679 0x400, 0x401, 0x402, 0x403, 0x404, 0x405, 0x406, 0x407,
10680 0x408, 0x409, 0x40a, 0x40b, 0x40c, 0x40d, 0x40e, 0x40f,
10681 0x461, 0x460, 0x463, 0x462, 0x465, 0x464, 0x467, 0x466,
10682 0x469, 0x468, 0x46b, 0x46a, 0x46d, 0x46c, 0x46f, 0x46e,
10683 0x471, 0x470, 0x473, 0x472, 0x475, 0x474, 0x477, 0x476,
10684 0x479, 0x478, 0x47b, 0x47a, 0x47d, 0x47c, 0x47f, 0x47e,
10685 0x481, 0x480, 0, 0, 0, 0, 0, 0,
10686 0, 0, 0x48b, 0x48a, 0x48d, 0x48c, 0x48f, 0x48e,
10687 0x491, 0x490, 0x493, 0x492, 0x495, 0x494, 0x497, 0x496,
10688 0x499, 0x498, 0x49b, 0x49a, 0x49d, 0x49c, 0x49f, 0x49e,
10689 0x4a1, 0x4a0, 0x4a3, 0x4a2, 0x4a5, 0x4a4, 0x4a7, 0x4a6,
10690 0x4a9, 0x4a8, 0x4ab, 0x4aa, 0x4ad, 0x4ac, 0x4af, 0x4ae,
10691 0x4b1, 0x4b0, 0x4b3, 0x4b2, 0x4b5, 0x4b4, 0x4b7, 0x4b6,
10692 0x4b9, 0x4b8, 0x4bb, 0x4ba, 0x4bd, 0x4bc, 0x4bf, 0x4be,
10693 0, 0x4c2, 0x4c1, 0x4c4, 0x4c3, 0x4c6, 0x4c5, 0x4c8,
10694 0x4c7, 0x4ca, 0x4c9, 0x4cc, 0x4cb, 0x4ce, 0x4cd, 0,
10695 0x4d1, 0x4d0, 0x4d3, 0x4d2, 0x4d5, 0x4d4, 0x4d7, 0x4d6,
10696 0x4d9, 0x4d8, 0x4db, 0x4da, 0x4dd, 0x4dc, 0x4df, 0x4de,
10697 0x4e1, 0x4e0, 0x4e3, 0x4e2, 0x4e5, 0x4e4, 0x4e7, 0x4e6,
10698 0x4e9, 0x4e8, 0x4eb, 0x4ea, 0x4ed, 0x4ec, 0x4ef, 0x4ee,
10699 0x4f1, 0x4f0, 0x4f3, 0x4f2, 0x4f5, 0x4f4, 0, 0,
10700 0x4f9, 0x4f8, 0, 0, 0, 0, 0, 0,
10701
10702 0x501, 0x500, 0x503, 0x502, 0x505, 0x504, 0x507, 0x506,
10703 0x509, 0x508, 0x50b, 0x50a, 0x50d, 0x50c, 0x50f, 0x50e,
10704 0, 0, 0, 0, 0, 0, 0, 0,
10705 0, 0, 0, 0, 0, 0, 0, 0,
10706 0, 0, 0, 0, 0, 0, 0, 0,
10707 0, 0, 0, 0, 0, 0, 0, 0,
10708 0, 0x561, 0x562, 0x563, 0x564, 0x565, 0x566, 0x567,
10709 0x568, 0x569, 0x56a, 0x56b, 0x56c, 0x56d, 0x56e, 0x56f,
10710 0x570, 0x571, 0x572, 0x573, 0x574, 0x575, 0x576, 0x577,
10711 0x578, 0x579, 0x57a, 0x57b, 0x57c, 0x57d, 0x57e, 0x57f,
10712 0x580, 0x581, 0x582, 0x583, 0x584, 0x585, 0x586, 0,
10713 0, 0, 0, 0, 0, 0, 0, 0,
10714 0, 0x531, 0x532, 0x533, 0x534, 0x535, 0x536, 0x537,
10715 0x538, 0x539, 0x53a, 0x53b, 0x53c, 0x53d, 0x53e, 0x53f,
10716 0x540, 0x541, 0x542, 0x543, 0x544, 0x545, 0x546, 0x547,
10717 0x548, 0x549, 0x54a, 0x54b, 0x54c, 0x54d, 0x54e, 0x54f,
10718 0x550, 0x551, 0x552, 0x553, 0x554, 0x555, 0x556, 0,
10719 0, 0, 0, 0, 0, 0, 0, 0,
10720 0, 0, 0, 0, 0, 0, 0, 0,
10721 0, 0, 0, 0, 0, 0, 0, 0,
10722 0, 0, 0, 0, 0, 0, 0, 0,
10723 0, 0, 0, 0, 0, 0, 0, 0,
10724 0, 0, 0, 0, 0, 0, 0, 0,
10725 0, 0, 0, 0, 0, 0, 0, 0,
10726 0, 0, 0, 0, 0, 0, 0, 0,
10727 0, 0, 0, 0, 0, 0, 0, 0,
10728 0, 0, 0, 0, 0, 0, 0, 0,
10729 0, 0, 0, 0, 0, 0, 0, 0,
10730 0, 0, 0, 0, 0, 0, 0, 0,
10731 0, 0, 0, 0, 0, 0, 0, 0,
10732 0, 0, 0, 0, 0, 0, 0, 0,
10733 0, 0, 0, 0, 0, 0, 0, 0,
10734
10735 0x1e01, 0x1e00, 0x1e03, 0x1e02, 0x1e05, 0x1e04, 0x1e07, 0x1e06,
10736 0x1e09, 0x1e08, 0x1e0b, 0x1e0a, 0x1e0d, 0x1e0c, 0x1e0f, 0x1e0e,
10737 0x1e11, 0x1e10, 0x1e13, 0x1e12, 0x1e15, 0x1e14, 0x1e17, 0x1e16,
10738 0x1e19, 0x1e18, 0x1e1b, 0x1e1a, 0x1e1d, 0x1e1c, 0x1e1f, 0x1e1e,
10739 0x1e21, 0x1e20, 0x1e23, 0x1e22, 0x1e25, 0x1e24, 0x1e27, 0x1e26,
10740 0x1e29, 0x1e28, 0x1e2b, 0x1e2a, 0x1e2d, 0x1e2c, 0x1e2f, 0x1e2e,
10741 0x1e31, 0x1e30, 0x1e33, 0x1e32, 0x1e35, 0x1e34, 0x1e37, 0x1e36,
10742 0x1e39, 0x1e38, 0x1e3b, 0x1e3a, 0x1e3d, 0x1e3c, 0x1e3f, 0x1e3e,
10743 0x1e41, 0x1e40, 0x1e43, 0x1e42, 0x1e45, 0x1e44, 0x1e47, 0x1e46,
10744 0x1e49, 0x1e48, 0x1e4b, 0x1e4a, 0x1e4d, 0x1e4c, 0x1e4f, 0x1e4e,
10745 0x1e51, 0x1e50, 0x1e53, 0x1e52, 0x1e55, 0x1e54, 0x1e57, 0x1e56,
10746 0x1e59, 0x1e58, 0x1e5b, 0x1e5a, 0x1e5d, 0x1e5c, 0x1e5f, 0x1e5e,
10747 0x1e61, 0x1e60, 0x1e63, 0x1e62, 0x1e65, 0x1e64, 0x1e67, 0x1e66,
10748 0x1e69, 0x1e68, 0x1e6b, 0x1e6a, 0x1e6d, 0x1e6c, 0x1e6f, 0x1e6e,
10749 0x1e71, 0x1e70, 0x1e73, 0x1e72, 0x1e75, 0x1e74, 0x1e77, 0x1e76,
10750 0x1e79, 0x1e78, 0x1e7b, 0x1e7a, 0x1e7d, 0x1e7c, 0x1e7f, 0x1e7e,
10751 0x1e81, 0x1e80, 0x1e83, 0x1e82, 0x1e85, 0x1e84, 0x1e87, 0x1e86,
10752 0x1e89, 0x1e88, 0x1e8b, 0x1e8a, 0x1e8d, 0x1e8c, 0x1e8f, 0x1e8e,
10753 0x1e91, 0x1e90, 0x1e93, 0x1e92, 0x1e95, 0x1e94, 0, 0,
10754 0, 0, 0, 0x1e60, 0, 0, 0, 0,
10755 0x1ea1, 0x1ea0, 0x1ea3, 0x1ea2, 0x1ea5, 0x1ea4, 0x1ea7, 0x1ea6,
10756 0x1ea9, 0x1ea8, 0x1eab, 0x1eaa, 0x1ead, 0x1eac, 0x1eaf, 0x1eae,
10757 0x1eb1, 0x1eb0, 0x1eb3, 0x1eb2, 0x1eb5, 0x1eb4, 0x1eb7, 0x1eb6,
10758 0x1eb9, 0x1eb8, 0x1ebb, 0x1eba, 0x1ebd, 0x1ebc, 0x1ebf, 0x1ebe,
10759 0x1ec1, 0x1ec0, 0x1ec3, 0x1ec2, 0x1ec5, 0x1ec4, 0x1ec7, 0x1ec6,
10760 0x1ec9, 0x1ec8, 0x1ecb, 0x1eca, 0x1ecd, 0x1ecc, 0x1ecf, 0x1ece,
10761 0x1ed1, 0x1ed0, 0x1ed3, 0x1ed2, 0x1ed5, 0x1ed4, 0x1ed7, 0x1ed6,
10762 0x1ed9, 0x1ed8, 0x1edb, 0x1eda, 0x1edd, 0x1edc, 0x1edf, 0x1ede,
10763 0x1ee1, 0x1ee0, 0x1ee3, 0x1ee2, 0x1ee5, 0x1ee4, 0x1ee7, 0x1ee6,
10764 0x1ee9, 0x1ee8, 0x1eeb, 0x1eea, 0x1eed, 0x1eec, 0x1eef, 0x1eee,
10765 0x1ef1, 0x1ef0, 0x1ef3, 0x1ef2, 0x1ef5, 0x1ef4, 0x1ef7, 0x1ef6,
10766 0x1ef9, 0x1ef8, 0, 0, 0, 0, 0, 0,
10767
10768 0x1f08, 0x1f09, 0x1f0a, 0x1f0b, 0x1f0c, 0x1f0d, 0x1f0e, 0x1f0f,
10769 0x1f00, 0x1f01, 0x1f02, 0x1f03, 0x1f04, 0x1f05, 0x1f06, 0x1f07,
10770 0x1f18, 0x1f19, 0x1f1a, 0x1f1b, 0x1f1c, 0x1f1d, 0, 0,
10771 0x1f10, 0x1f11, 0x1f12, 0x1f13, 0x1f14, 0x1f15, 0, 0,
10772 0x1f28, 0x1f29, 0x1f2a, 0x1f2b, 0x1f2c, 0x1f2d, 0x1f2e, 0x1f2f,
10773 0x1f20, 0x1f21, 0x1f22, 0x1f23, 0x1f24, 0x1f25, 0x1f26, 0x1f27,
10774 0x1f38, 0x1f39, 0x1f3a, 0x1f3b, 0x1f3c, 0x1f3d, 0x1f3e, 0x1f3f,
10775 0x1f30, 0x1f31, 0x1f32, 0x1f33, 0x1f34, 0x1f35, 0x1f36, 0x1f37,
10776 0x1f48, 0x1f49, 0x1f4a, 0x1f4b, 0x1f4c, 0x1f4d, 0, 0,
10777 0x1f40, 0x1f41, 0x1f42, 0x1f43, 0x1f44, 0x1f45, 0, 0,
10778 0, 0x1f59, 0, 0x1f5b, 0, 0x1f5d, 0, 0x1f5f,
10779 0, 0x1f51, 0, 0x1f53, 0, 0x1f55, 0, 0x1f57,
10780 0x1f68, 0x1f69, 0x1f6a, 0x1f6b, 0x1f6c, 0x1f6d, 0x1f6e, 0x1f6f,
10781 0x1f60, 0x1f61, 0x1f62, 0x1f63, 0x1f64, 0x1f65, 0x1f66, 0x1f67,
10782 0x1fba, 0x1fbb, 0x1fc8, 0x1fc9, 0x1fca, 0x1fcb, 0x1fda, 0x1fdb,
10783 0x1ff8, 0x1ff9, 0x1fea, 0x1feb, 0x1ffa, 0x1ffb, 0, 0,
10784 0x1f88, 0x1f89, 0x1f8a, 0x1f8b, 0x1f8c, 0x1f8d, 0x1f8e, 0x1f8f,
10785 0x1f80, 0x1f81, 0x1f82, 0x1f83, 0x1f84, 0x1f85, 0x1f86, 0x1f87,
10786 0x1f98, 0x1f99, 0x1f9a, 0x1f9b, 0x1f9c, 0x1f9d, 0x1f9e, 0x1f9f,
10787 0x1f90, 0x1f91, 0x1f92, 0x1f93, 0x1f94, 0x1f95, 0x1f96, 0x1f97,
10788 0x1fa8, 0x1fa9, 0x1faa, 0x1fab, 0x1fac, 0x1fad, 0x1fae, 0x1faf,
10789 0x1fa0, 0x1fa1, 0x1fa2, 0x1fa3, 0x1fa4, 0x1fa5, 0x1fa6, 0x1fa7,
10790 0x1fb8, 0x1fb9, 0, 0x1fbc, 0, 0, 0, 0,
10791 0x1fb0, 0x1fb1, 0x1f70, 0x1f71, 0x1fb3, 0, 0x399, 0,
10792 0, 0, 0, 0x1fcc, 0, 0, 0, 0,
10793 0x1f72, 0x1f73, 0x1f74, 0x1f75, 0x1fc3, 0, 0, 0,
10794 0x1fd8, 0x1fd9, 0, 0, 0, 0, 0, 0,
10795 0x1fd0, 0x1fd1, 0x1f76, 0x1f77, 0, 0, 0, 0,
10796 0x1fe8, 0x1fe9, 0, 0, 0, 0x1fec, 0, 0,
10797 0x1fe0, 0x1fe1, 0x1f7a, 0x1f7b, 0x1fe5, 0, 0, 0,
10798 0, 0, 0, 0x1ffc, 0, 0, 0, 0,
10799 0x1f78, 0x1f79, 0x1f7c, 0x1f7d, 0x1ff3, 0, 0, 0,
10800
10801 0, 0, 0, 0, 0, 0, 0, 0,
10802 0, 0, 0, 0, 0, 0, 0, 0,
10803 0, 0, 0, 0, 0, 0, 0, 0,
10804 0, 0, 0, 0, 0, 0, 0, 0,
10805 0, 0, 0, 0, 0, 0, 0x3c9, 0,
10806 0, 0, 0x6b, 0xe5, 0, 0, 0, 0,
10807 0, 0, 0, 0, 0, 0, 0, 0,
10808 0, 0, 0, 0, 0, 0, 0, 0,
10809 0, 0, 0, 0, 0, 0, 0, 0,
10810 0, 0, 0, 0, 0, 0, 0, 0,
10811 0, 0, 0, 0, 0, 0, 0, 0,
10812 0, 0, 0, 0, 0, 0, 0, 0,
10813 0x2170, 0x2171, 0x2172, 0x2173, 0x2174, 0x2175, 0x2176, 0x2177,
10814 0x2178, 0x2179, 0x217a, 0x217b, 0x217c, 0x217d, 0x217e, 0x217f,
10815 0x2160, 0x2161, 0x2162, 0x2163, 0x2164, 0x2165, 0x2166, 0x2167,
10816 0x2168, 0x2169, 0x216a, 0x216b, 0x216c, 0x216d, 0x216e, 0x216f,
10817 0, 0, 0, 0, 0, 0, 0, 0,
10818 0, 0, 0, 0, 0, 0, 0, 0,
10819 0, 0, 0, 0, 0, 0, 0, 0,
10820 0, 0, 0, 0, 0, 0, 0, 0,
10821 0, 0, 0, 0, 0, 0, 0, 0,
10822 0, 0, 0, 0, 0, 0, 0, 0,
10823 0, 0, 0, 0, 0, 0, 0, 0,
10824 0, 0, 0, 0, 0, 0, 0, 0,
10825 0, 0, 0, 0, 0, 0, 0, 0,
10826 0, 0, 0, 0, 0, 0, 0, 0,
10827 0, 0, 0, 0, 0, 0, 0, 0,
10828 0, 0, 0, 0, 0, 0, 0, 0,
10829 0, 0, 0, 0, 0, 0, 0, 0,
10830 0, 0, 0, 0, 0, 0, 0, 0,
10831 0, 0, 0, 0, 0, 0, 0, 0,
10832 0, 0, 0, 0, 0, 0, 0, 0,
10833
10834 0, 0, 0, 0, 0, 0, 0, 0,
10835 0, 0, 0, 0, 0, 0, 0, 0,
10836 0, 0, 0, 0, 0, 0, 0, 0,
10837 0, 0, 0, 0, 0, 0, 0, 0,
10838 0, 0, 0, 0, 0, 0, 0, 0,
10839 0, 0, 0, 0, 0, 0, 0, 0,
10840 0, 0, 0, 0, 0, 0, 0, 0,
10841 0, 0, 0, 0, 0, 0, 0, 0,
10842 0, 0, 0, 0, 0, 0, 0, 0,
10843 0, 0, 0, 0, 0, 0, 0, 0,
10844 0, 0, 0, 0, 0, 0, 0, 0,
10845 0, 0, 0, 0, 0, 0, 0, 0,
10846 0, 0, 0, 0, 0, 0, 0, 0,
10847 0, 0, 0, 0, 0, 0, 0, 0,
10848 0, 0, 0, 0, 0, 0, 0, 0,
10849 0, 0, 0, 0, 0, 0, 0, 0,
10850 0, 0, 0, 0, 0, 0, 0, 0,
10851 0, 0, 0, 0, 0, 0, 0, 0,
10852 0, 0, 0, 0, 0, 0, 0, 0,
10853 0, 0, 0, 0, 0, 0, 0, 0,
10854 0, 0, 0, 0, 0, 0, 0, 0,
10855 0, 0, 0, 0, 0, 0, 0, 0,
10856 0, 0, 0, 0, 0, 0, 0x24d0, 0x24d1,
10857 0x24d2, 0x24d3, 0x24d4, 0x24d5, 0x24d6, 0x24d7, 0x24d8, 0x24d9,
10858 0x24da, 0x24db, 0x24dc, 0x24dd, 0x24de, 0x24df, 0x24e0, 0x24e1,
10859 0x24e2, 0x24e3, 0x24e4, 0x24e5, 0x24e6, 0x24e7, 0x24e8, 0x24e9,
10860 0x24b6, 0x24b7, 0x24b8, 0x24b9, 0x24ba, 0x24bb, 0x24bc, 0x24bd,
10861 0x24be, 0x24bf, 0x24c0, 0x24c1, 0x24c2, 0x24c3, 0x24c4, 0x24c5,
10862 0x24c6, 0x24c7, 0x24c8, 0x24c9, 0x24ca, 0x24cb, 0x24cc, 0x24cd,
10863 0x24ce, 0x24cf, 0, 0, 0, 0, 0, 0,
10864 0, 0, 0, 0, 0, 0, 0, 0,
10865 0, 0, 0, 0, 0, 0, 0, 0,
10866
10867 0, 0, 0, 0, 0, 0, 0, 0,
10868 0, 0, 0, 0, 0, 0, 0, 0,
10869 0, 0, 0, 0, 0, 0, 0, 0,
10870 0, 0, 0, 0, 0, 0, 0, 0,
10871 0, 0xff41, 0xff42, 0xff43, 0xff44, 0xff45, 0xff46, 0xff47,
10872 0xff48, 0xff49, 0xff4a, 0xff4b, 0xff4c, 0xff4d, 0xff4e, 0xff4f,
10873 0xff50, 0xff51, 0xff52, 0xff53, 0xff54, 0xff55, 0xff56, 0xff57,
10874 0xff58, 0xff59, 0xff5a, 0, 0, 0, 0, 0,
10875 0, 0xff21, 0xff22, 0xff23, 0xff24, 0xff25, 0xff26, 0xff27,
10876 0xff28, 0xff29, 0xff2a, 0xff2b, 0xff2c, 0xff2d, 0xff2e, 0xff2f,
10877 0xff30, 0xff31, 0xff32, 0xff33, 0xff34, 0xff35, 0xff36, 0xff37,
10878 0xff38, 0xff39, 0xff3a, 0, 0, 0, 0, 0,
10879 0, 0, 0, 0, 0, 0, 0, 0,
10880 0, 0, 0, 0, 0, 0, 0, 0,
10881 0, 0, 0, 0, 0, 0, 0, 0,
10882 0, 0, 0, 0, 0, 0, 0, 0,
10883 0, 0, 0, 0, 0, 0, 0, 0,
10884 0, 0, 0, 0, 0, 0, 0, 0,
10885 0, 0, 0, 0, 0, 0, 0, 0,
10886 0, 0, 0, 0, 0, 0, 0, 0,
10887 0, 0, 0, 0, 0, 0, 0, 0,
10888 0, 0, 0, 0, 0, 0, 0, 0,
10889 0, 0, 0, 0, 0, 0, 0, 0,
10890 0, 0, 0, 0, 0, 0, 0, 0,
10891 0, 0, 0, 0, 0, 0, 0, 0,
10892 0, 0, 0, 0, 0, 0, 0, 0,
10893 0, 0, 0, 0, 0, 0, 0, 0,
10894 0, 0, 0, 0, 0, 0, 0, 0,
10895 0, 0, 0, 0, 0, 0, 0, 0,
10896 0, 0, 0, 0, 0, 0, 0, 0,
10897 0, 0, 0, 0, 0, 0, 0, 0,
10898 0, 0, 0, 0, 0, 0, 0, 0,
10899};
10900// 36602 bytes
10901
10902const Q_INT8 QUnicodeTables::decimal_info[] = {
10903 1, 0, 0, 0, 0, 0, 2, 0,
10904 0, 3, 3, 4, 3, 5, 6, 7,
10905 8, 0, 0, 9, 0, 0, 0, 10,
10906 11, 0, 0, 0, 0, 0, 0, 0,
10907 12, 0, 0, 0, 13, 0, 0, 14,
10908 0, 0, 0, 0, 0, 0, 0, 0,
10909 0, 0, 0, 0, 0, 0, 0, 0,
10910 0, 0, 0, 0, 0, 0, 0, 0,
10911 0, 0, 0, 0, 0, 0, 0, 0,
10912 0, 0, 0, 0, 0, 0, 0, 0,
10913 0, 0, 0, 0, 0, 0, 0, 0,
10914 0, 0, 0, 0, 0, 0, 0, 0,
10915 0, 0, 0, 0, 0, 0, 0, 0,
10916 0, 0, 0, 0, 0, 0, 0, 0,
10917 0, 0, 0, 0, 0, 0, 0, 0,
10918 0, 0, 0, 0, 0, 0, 0, 0,
10919 0, 0, 0, 0, 0, 0, 0, 0,
10920 0, 0, 0, 0, 0, 0, 0, 0,
10921 0, 0, 0, 0, 0, 0, 0, 0,
10922 0, 0, 0, 0, 0, 0, 0, 0,
10923 0, 0, 0, 0, 0, 0, 0, 0,
10924 0, 0, 0, 0, 0, 0, 0, 0,
10925 0, 0, 0, 0, 0, 0, 0, 0,
10926 0, 0, 0, 0, 0, 0, 0, 0,
10927 0, 0, 0, 0, 0, 0, 0, 0,
10928 0, 0, 0, 0, 0, 0, 0, 0,
10929 0, 0, 0, 0, 0, 0, 0, 0,
10930 0, 0, 0, 0, 0, 0, 0, 0,
10931 0, 0, 0, 0, 0, 0, 0, 0,
10932 0, 0, 0, 0, 0, 0, 0, 0,
10933 0, 0, 0, 0, 0, 0, 0, 0,
10934 0, 0, 0, 0, 0, 0, 0, 11,
10935
10936
10937 -1, -1, -1, -1, -1, -1, -1, -1,
10938 -1, -1, -1, -1, -1, -1, -1, -1,
10939 -1, -1, -1, -1, -1, -1, -1, -1,
10940 -1, -1, -1, -1, -1, -1, -1, -1,
10941 -1, -1, -1, -1, -1, -1, -1, -1,
10942 -1, -1, -1, -1, -1, -1, -1, -1,
10943 0, 1, 2, 3, 4, 5, 6, 7,
10944 8, 9, -1, -1, -1, -1, -1, -1,
10945 -1, -1, -1, -1, -1, -1, -1, -1,
10946 -1, -1, -1, -1, -1, -1, -1, -1,
10947 -1, -1, -1, -1, -1, -1, -1, -1,
10948 -1, -1, -1, -1, -1, -1, -1, -1,
10949 -1, -1, -1, -1, -1, -1, -1, -1,
10950 -1, -1, -1, -1, -1, -1, -1, -1,
10951 -1, -1, -1, -1, -1, -1, -1, -1,
10952 -1, -1, -1, -1, -1, -1, -1, -1,
10953 -1, -1, -1, -1, -1, -1, -1, -1,
10954 -1, -1, -1, -1, -1, -1, -1, -1,
10955 -1, -1, -1, -1, -1, -1, -1, -1,
10956 -1, -1, -1, -1, -1, -1, -1, -1,
10957 -1, -1, -1, -1, -1, -1, -1, -1,
10958 -1, -1, -1, -1, -1, -1, -1, -1,
10959 -1, -1, 2, 3, -1, -1, -1, -1,
10960 -1, 1, -1, -1, -1, -1, -1, -1,
10961 -1, -1, -1, -1, -1, -1, -1, -1,
10962 -1, -1, -1, -1, -1, -1, -1, -1,
10963 -1, -1, -1, -1, -1, -1, -1, -1,
10964 -1, -1, -1, -1, -1, -1, -1, -1,
10965 -1, -1, -1, -1, -1, -1, -1, -1,
10966 -1, -1, -1, -1, -1, -1, -1, -1,
10967 -1, -1, -1, -1, -1, -1, -1, -1,
10968 -1, -1, -1, -1, -1, -1, -1, -1,
10969
10970 -1, -1, -1, -1, -1, -1, -1, -1,
10971 -1, -1, -1, -1, -1, -1, -1, -1,
10972 -1, -1, -1, -1, -1, -1, -1, -1,
10973 -1, -1, -1, -1, -1, -1, -1, -1,
10974 -1, -1, -1, -1, -1, -1, -1, -1,
10975 -1, -1, -1, -1, -1, -1, -1, -1,
10976 -1, -1, -1, -1, -1, -1, -1, -1,
10977 -1, -1, -1, -1, -1, -1, -1, -1,
10978 -1, -1, -1, -1, -1, -1, -1, -1,
10979 -1, -1, -1, -1, -1, -1, -1, -1,
10980 -1, -1, -1, -1, -1, -1, -1, -1,
10981 -1, -1, -1, -1, -1, -1, -1, -1,
10982 0, 1, 2, 3, 4, 5, 6, 7,
10983 8, 9, -1, -1, -1, -1, -1, -1,
10984 -1, -1, -1, -1, -1, -1, -1, -1,
10985 -1, -1, -1, -1, -1, -1, -1, -1,
10986 -1, -1, -1, -1, -1, -1, -1, -1,
10987 -1, -1, -1, -1, -1, -1, -1, -1,
10988 -1, -1, -1, -1, -1, -1, -1, -1,
10989 -1, -1, -1, -1, -1, -1, -1, -1,
10990 -1, -1, -1, -1, -1, -1, -1, -1,
10991 -1, -1, -1, -1, -1, -1, -1, -1,
10992 -1, -1, -1, -1, -1, -1, -1, -1,
10993 -1, -1, -1, -1, -1, -1, -1, -1,
10994 -1, -1, -1, -1, -1, -1, -1, -1,
10995 -1, -1, -1, -1, -1, -1, -1, -1,
10996 -1, -1, -1, -1, -1, -1, -1, -1,
10997 -1, -1, -1, -1, -1, -1, -1, -1,
10998 -1, -1, -1, -1, -1, -1, -1, -1,
10999 -1, -1, -1, -1, -1, -1, -1, -1,
11000 0, 1, 2, 3, 4, 5, 6, 7,
11001 8, 9, -1, -1, -1, -1, -1, -1,
11002
11003 -1, -1, -1, -1, -1, -1, -1, -1,
11004 -1, -1, -1, -1, -1, -1, -1, -1,
11005 -1, -1, -1, -1, -1, -1, -1, -1,
11006 -1, -1, -1, -1, -1, -1, -1, -1,
11007 -1, -1, -1, -1, -1, -1, -1, -1,
11008 -1, -1, -1, -1, -1, -1, -1, -1,
11009 -1, -1, -1, -1, -1, -1, -1, -1,
11010 -1, -1, -1, -1, -1, -1, -1, -1,
11011 -1, -1, -1, -1, -1, -1, -1, -1,
11012 -1, -1, -1, -1, -1, -1, -1, -1,
11013 -1, -1, -1, -1, -1, -1, -1, -1,
11014 -1, -1, -1, -1, -1, -1, -1, -1,
11015 -1, -1, -1, -1, -1, -1, 0, 1,
11016 2, 3, 4, 5, 6, 7, 8, 9,
11017 -1, -1, -1, -1, -1, -1, -1, -1,
11018 -1, -1, -1, -1, -1, -1, -1, -1,
11019 -1, -1, -1, -1, -1, -1, -1, -1,
11020 -1, -1, -1, -1, -1, -1, -1, -1,
11021 -1, -1, -1, -1, -1, -1, -1, -1,
11022 -1, -1, -1, -1, -1, -1, -1, -1,
11023 -1, -1, -1, -1, -1, -1, -1, -1,
11024 -1, -1, -1, -1, -1, -1, -1, -1,
11025 -1, -1, -1, -1, -1, -1, -1, -1,
11026 -1, -1, -1, -1, -1, -1, -1, -1,
11027 -1, -1, -1, -1, -1, -1, -1, -1,
11028 -1, -1, -1, -1, -1, -1, -1, -1,
11029 -1, -1, -1, -1, -1, -1, -1, -1,
11030 -1, -1, -1, -1, -1, -1, -1, -1,
11031 -1, -1, -1, -1, -1, -1, 0, 1,
11032 2, 3, 4, 5, 6, 7, 8, 9,
11033 -1, -1, -1, -1, -1, -1, -1, -1,
11034 -1, -1, -1, -1, -1, -1, -1, -1,
11035
11036 -1, -1, -1, -1, -1, -1, -1, -1,
11037 -1, -1, -1, -1, -1, -1, -1, -1,
11038 -1, -1, -1, -1, -1, -1, -1, -1,
11039 -1, -1, -1, -1, -1, -1, -1, -1,
11040 -1, -1, -1, -1, -1, -1, -1, -1,
11041 -1, -1, -1, -1, -1, -1, -1, -1,
11042 -1, -1, -1, -1, -1, -1, -1, -1,
11043 -1, -1, -1, -1, -1, -1, -1, -1,
11044 -1, -1, -1, -1, -1, -1, -1, -1,
11045 -1, -1, -1, -1, -1, -1, -1, -1,
11046 -1, -1, -1, -1, -1, -1, -1, -1,
11047 -1, -1, -1, -1, -1, -1, -1, -1,
11048 -1, -1, -1, -1, -1, -1, 0, 1,
11049 2, 3, 4, 5, 6, 7, 8, 9,
11050 -1, -1, -1, -1, -1, -1, -1, -1,
11051 -1, -1, -1, -1, -1, -1, -1, -1,
11052 -1, -1, -1, -1, -1, -1, -1, -1,
11053 -1, -1, -1, -1, -1, -1, -1, -1,
11054 -1, -1, -1, -1, -1, -1, -1, -1,
11055 -1, -1, -1, -1, -1, -1, -1, -1,
11056 -1, -1, -1, -1, -1, -1, -1, -1,
11057 -1, -1, -1, -1, -1, -1, -1, -1,
11058 -1, -1, -1, -1, -1, -1, -1, -1,
11059 -1, -1, -1, -1, -1, -1, -1, -1,
11060 -1, -1, -1, -1, -1, -1, -1, -1,
11061 -1, -1, -1, -1, -1, -1, -1, -1,
11062 -1, -1, -1, -1, -1, -1, -1, -1,
11063 -1, -1, -1, -1, -1, -1, -1, -1,
11064 -1, -1, -1, -1, -1, -1, -1, 1,
11065 2, 3, 4, 5, 6, 7, 8, 9,
11066 -1, -1, -1, -1, -1, -1, -1, -1,
11067 -1, -1, -1, -1, -1, -1, -1, -1,
11068
11069 -1, -1, -1, -1, -1, -1, -1, -1,
11070 -1, -1, -1, -1, -1, -1, -1, -1,
11071 -1, -1, -1, -1, -1, -1, -1, -1,
11072 -1, -1, -1, -1, -1, -1, -1, -1,
11073 -1, -1, -1, -1, -1, -1, -1, -1,
11074 -1, -1, -1, -1, -1, -1, -1, -1,
11075 -1, -1, -1, -1, -1, -1, -1, -1,
11076 -1, -1, -1, -1, -1, -1, -1, -1,
11077 -1, -1, -1, -1, -1, -1, -1, -1,
11078 -1, -1, -1, -1, -1, -1, -1, -1,
11079 -1, -1, -1, -1, -1, -1, -1, -1,
11080 -1, -1, -1, -1, -1, -1, -1, -1,
11081 -1, -1, -1, -1, -1, -1, 0, 1,
11082 2, 3, 4, 5, 6, 7, 8, 9,
11083 -1, -1, -1, -1, -1, -1, -1, -1,
11084 -1, -1, -1, -1, -1, -1, -1, -1,
11085 -1, -1, -1, -1, -1, -1, -1, -1,
11086 -1, -1, -1, -1, -1, -1, -1, -1,
11087 -1, -1, -1, -1, -1, -1, -1, -1,
11088 -1, -1, -1, -1, -1, -1, -1, -1,
11089 -1, -1, -1, -1, -1, -1, -1, -1,
11090 -1, -1, -1, -1, -1, -1, -1, -1,
11091 -1, -1, -1, -1, -1, -1, -1, -1,
11092 -1, -1, -1, -1, -1, -1, -1, -1,
11093 -1, -1, -1, -1, -1, -1, -1, -1,
11094 -1, -1, -1, -1, -1, -1, -1, -1,
11095 -1, -1, -1, -1, -1, -1, -1, -1,
11096 -1, -1, -1, -1, -1, -1, -1, -1,
11097 -1, -1, -1, -1, -1, -1, -1, -1,
11098 -1, -1, -1, -1, -1, -1, -1, -1,
11099 -1, -1, -1, -1, -1, -1, -1, -1,
11100 -1, -1, -1, -1, -1, -1, -1, -1,
11101
11102 -1, -1, -1, -1, -1, -1, -1, -1,
11103 -1, -1, -1, -1, -1, -1, -1, -1,
11104 -1, -1, -1, -1, -1, -1, -1, -1,
11105 -1, -1, -1, -1, -1, -1, -1, -1,
11106 -1, -1, -1, -1, -1, -1, -1, -1,
11107 -1, -1, -1, -1, -1, -1, -1, -1,
11108 -1, -1, -1, -1, -1, -1, -1, -1,
11109 -1, -1, -1, -1, -1, -1, -1, -1,
11110 -1, -1, -1, -1, -1, -1, -1, -1,
11111 -1, -1, -1, -1, -1, -1, -1, -1,
11112 0, 1, 2, 3, 4, 5, 6, 7,
11113 8, 9, -1, -1, -1, -1, -1, -1,
11114 -1, -1, -1, -1, -1, -1, -1, -1,
11115 -1, -1, -1, -1, -1, -1, -1, -1,
11116 -1, -1, -1, -1, -1, -1, -1, -1,
11117 -1, -1, -1, -1, -1, -1, -1, -1,
11118 -1, -1, -1, -1, -1, -1, -1, -1,
11119 -1, -1, -1, -1, -1, -1, -1, -1,
11120 -1, -1, -1, -1, -1, -1, -1, -1,
11121 -1, -1, -1, -1, -1, -1, -1, -1,
11122 -1, -1, -1, -1, -1, -1, -1, -1,
11123 -1, -1, -1, -1, -1, -1, -1, -1,
11124 -1, -1, -1, -1, -1, -1, -1, -1,
11125 -1, -1, -1, -1, -1, -1, -1, -1,
11126 -1, -1, -1, -1, -1, -1, -1, -1,
11127 -1, -1, -1, -1, -1, -1, -1, -1,
11128 0, 1, 2, 3, 4, 5, 6, 7,
11129 8, 9, -1, -1, -1, -1, -1, -1,
11130 -1, -1, -1, -1, -1, -1, -1, -1,
11131 -1, -1, -1, -1, -1, -1, -1, -1,
11132 -1, -1, -1, -1, -1, -1, -1, -1,
11133 -1, -1, -1, -1, -1, -1, -1, -1,
11134
11135 -1, -1, -1, -1, -1, -1, -1, -1,
11136 -1, -1, -1, -1, -1, -1, -1, -1,
11137 -1, -1, -1, -1, -1, -1, -1, -1,
11138 -1, -1, -1, -1, -1, -1, -1, -1,
11139 0, 1, 2, 3, 4, 5, 6, 7,
11140 8, 9, -1, -1, -1, -1, -1, -1,
11141 -1, -1, -1, -1, -1, -1, -1, -1,
11142 -1, -1, -1, -1, -1, -1, -1, -1,
11143 -1, -1, -1, -1, -1, -1, -1, -1,
11144 -1, -1, -1, -1, -1, -1, -1, -1,
11145 -1, -1, -1, -1, -1, -1, -1, -1,
11146 -1, -1, -1, -1, -1, -1, -1, -1,
11147 -1, -1, -1, -1, -1, -1, -1, -1,
11148 -1, -1, -1, -1, -1, -1, -1, -1,
11149 -1, -1, -1, -1, -1, -1, -1, -1,
11150 -1, -1, -1, -1, -1, -1, -1, -1,
11151 -1, -1, -1, -1, -1, -1, -1, -1,
11152 -1, -1, -1, -1, -1, -1, -1, -1,
11153 -1, -1, -1, -1, -1, -1, -1, -1,
11154 -1, -1, -1, -1, -1, -1, -1, -1,
11155 -1, -1, -1, -1, -1, -1, -1, -1,
11156 -1, -1, -1, -1, -1, -1, -1, -1,
11157 -1, -1, -1, -1, -1, -1, -1, -1,
11158 -1, -1, -1, -1, -1, -1, -1, -1,
11159 -1, -1, -1, -1, -1, -1, -1, -1,
11160 -1, -1, -1, -1, -1, -1, -1, -1,
11161 -1, -1, -1, -1, -1, -1, -1, -1,
11162 -1, -1, -1, -1, -1, -1, -1, -1,
11163 -1, -1, -1, -1, -1, -1, -1, -1,
11164 -1, -1, -1, -1, -1, -1, -1, -1,
11165 -1, -1, -1, -1, -1, -1, -1, -1,
11166 -1, -1, -1, -1, -1, -1, -1, -1,
11167
11168 -1, -1, -1, -1, -1, -1, -1, -1,
11169 -1, -1, -1, -1, -1, -1, -1, -1,
11170 -1, -1, -1, -1, -1, -1, -1, -1,
11171 -1, -1, -1, -1, -1, -1, -1, -1,
11172 -1, -1, -1, -1, -1, -1, -1, -1,
11173 -1, -1, -1, -1, -1, -1, -1, -1,
11174 -1, -1, -1, -1, -1, -1, -1, -1,
11175 -1, -1, -1, -1, -1, -1, -1, -1,
11176 0, 1, 2, 3, 4, 5, 6, 7,
11177 8, 9, -1, -1, -1, -1, -1, -1,
11178 -1, -1, -1, -1, -1, -1, -1, -1,
11179 -1, -1, -1, -1, -1, -1, -1, -1,
11180 -1, -1, -1, -1, -1, -1, -1, -1,
11181 -1, -1, -1, -1, -1, -1, -1, -1,
11182 -1, -1, -1, -1, -1, -1, -1, -1,
11183 -1, -1, -1, -1, -1, -1, -1, -1,
11184 -1, -1, -1, -1, -1, -1, -1, -1,
11185 -1, -1, -1, -1, -1, -1, -1, -1,
11186 -1, -1, -1, -1, -1, -1, -1, -1,
11187 -1, -1, -1, -1, -1, -1, -1, -1,
11188 -1, -1, -1, -1, -1, -1, -1, -1,
11189 -1, -1, -1, -1, -1, -1, -1, -1,
11190 -1, -1, -1, -1, -1, -1, -1, -1,
11191 -1, -1, -1, -1, -1, -1, -1, -1,
11192 -1, -1, -1, -1, -1, -1, -1, -1,
11193 -1, -1, -1, -1, -1, -1, -1, -1,
11194 -1, -1, -1, -1, -1, -1, -1, -1,
11195 -1, -1, -1, -1, -1, -1, -1, -1,
11196 -1, -1, -1, -1, -1, -1, -1, -1,
11197 -1, -1, -1, -1, -1, -1, -1, -1,
11198 -1, -1, -1, -1, -1, -1, -1, -1,
11199 -1, -1, -1, -1, -1, -1, -1, -1,
11200
11201 -1, -1, -1, -1, -1, -1, -1, -1,
11202 -1, -1, -1, -1, -1, -1, -1, -1,
11203 -1, -1, -1, -1, -1, -1, -1, -1,
11204 -1, -1, -1, -1, -1, -1, -1, -1,
11205 -1, -1, -1, -1, -1, -1, -1, -1,
11206 -1, -1, -1, -1, -1, -1, -1, -1,
11207 -1, -1, -1, -1, -1, -1, -1, -1,
11208 -1, -1, -1, -1, -1, -1, -1, -1,
11209 -1, -1, -1, -1, -1, -1, -1, -1,
11210 -1, -1, -1, -1, -1, -1, -1, -1,
11211 -1, -1, -1, -1, -1, -1, -1, -1,
11212 -1, -1, -1, -1, -1, -1, -1, -1,
11213 -1, -1, -1, -1, -1, -1, -1, -1,
11214 -1, 1, 2, 3, 4, 5, 6, 7,
11215 8, 9, -1, -1, -1, -1, -1, -1,
11216 -1, -1, -1, -1, -1, -1, -1, -1,
11217 -1, -1, -1, -1, -1, -1, -1, -1,
11218 -1, -1, -1, -1, -1, -1, -1, -1,
11219 -1, -1, -1, -1, -1, -1, -1, -1,
11220 -1, -1, -1, -1, -1, -1, -1, -1,
11221 -1, -1, -1, -1, -1, -1, -1, -1,
11222 -1, -1, -1, -1, -1, -1, -1, -1,
11223 -1, -1, -1, -1, -1, -1, -1, -1,
11224 -1, -1, -1, -1, -1, -1, -1, -1,
11225 -1, -1, -1, -1, -1, -1, -1, -1,
11226 -1, -1, -1, -1, -1, -1, -1, -1,
11227 -1, -1, -1, -1, -1, -1, -1, -1,
11228 -1, -1, -1, -1, -1, -1, -1, -1,
11229 -1, -1, -1, -1, -1, -1, -1, -1,
11230 -1, -1, -1, -1, -1, -1, -1, -1,
11231 -1, -1, -1, -1, -1, -1, -1, -1,
11232 -1, -1, -1, -1, -1, -1, -1, -1,
11233
11234 -1, -1, -1, -1, -1, -1, -1, -1,
11235 -1, -1, -1, -1, -1, -1, -1, -1,
11236 -1, -1, -1, -1, -1, -1, -1, -1,
11237 -1, -1, -1, -1, -1, -1, -1, -1,
11238 -1, -1, -1, -1, -1, -1, -1, -1,
11239 -1, -1, -1, -1, -1, -1, -1, -1,
11240 -1, -1, -1, -1, -1, -1, -1, -1,
11241 -1, -1, -1, -1, -1, -1, -1, -1,
11242 -1, -1, -1, -1, -1, -1, -1, -1,
11243 -1, -1, -1, -1, -1, -1, -1, -1,
11244 -1, -1, -1, -1, -1, -1, -1, -1,
11245 -1, -1, -1, -1, -1, -1, -1, -1,
11246 -1, -1, -1, -1, -1, -1, -1, -1,
11247 -1, -1, -1, -1, -1, -1, -1, -1,
11248 -1, -1, -1, -1, -1, -1, -1, -1,
11249 -1, -1, -1, -1, -1, -1, -1, -1,
11250 -1, -1, -1, -1, -1, -1, -1, -1,
11251 -1, -1, -1, -1, -1, -1, -1, -1,
11252 -1, -1, -1, -1, -1, -1, -1, -1,
11253 -1, -1, -1, -1, -1, -1, -1, -1,
11254 -1, -1, -1, -1, -1, -1, -1, -1,
11255 -1, -1, -1, -1, -1, -1, -1, -1,
11256 -1, -1, -1, -1, -1, -1, -1, -1,
11257 -1, -1, -1, -1, -1, -1, -1, -1,
11258 -1, -1, -1, -1, -1, -1, -1, -1,
11259 -1, -1, -1, -1, -1, -1, -1, -1,
11260 -1, -1, -1, -1, -1, -1, -1, -1,
11261 -1, -1, -1, -1, -1, -1, -1, -1,
11262 0, 1, 2, 3, 4, 5, 6, 7,
11263 8, 9, -1, -1, -1, -1, -1, -1,
11264 -1, -1, -1, -1, -1, -1, -1, -1,
11265 -1, -1, -1, -1, -1, -1, -1, -1,
11266
11267 -1, -1, -1, -1, -1, -1, -1, -1,
11268 -1, -1, -1, -1, -1, -1, -1, -1,
11269 0, 1, 2, 3, 4, 5, 6, 7,
11270 8, 9, -1, -1, -1, -1, -1, -1,
11271 -1, -1, -1, -1, -1, -1, -1, -1,
11272 -1, -1, -1, -1, -1, -1, -1, -1,
11273 -1, -1, -1, -1, -1, -1, -1, -1,
11274 -1, -1, -1, -1, -1, -1, -1, -1,
11275 -1, -1, -1, -1, -1, -1, -1, -1,
11276 -1, -1, -1, -1, -1, -1, -1, -1,
11277 -1, -1, -1, -1, -1, -1, -1, -1,
11278 -1, -1, -1, -1, -1, -1, -1, -1,
11279 -1, -1, -1, -1, -1, -1, -1, -1,
11280 -1, -1, -1, -1, -1, -1, -1, -1,
11281 -1, -1, -1, -1, -1, -1, -1, -1,
11282 -1, -1, -1, -1, -1, -1, -1, -1,
11283 -1, -1, -1, -1, -1, -1, -1, -1,
11284 -1, -1, -1, -1, -1, -1, -1, -1,
11285 -1, -1, -1, -1, -1, -1, -1, -1,
11286 -1, -1, -1, -1, -1, -1, -1, -1,
11287 -1, -1, -1, -1, -1, -1, -1, -1,
11288 -1, -1, -1, -1, -1, -1, -1, -1,
11289 -1, -1, -1, -1, -1, -1, -1, -1,
11290 -1, -1, -1, -1, -1, -1, -1, -1,
11291 -1, -1, -1, -1, -1, -1, -1, -1,
11292 -1, -1, -1, -1, -1, -1, -1, -1,
11293 -1, -1, -1, -1, -1, -1, -1, -1,
11294 -1, -1, -1, -1, -1, -1, -1, -1,
11295 -1, -1, -1, -1, -1, -1, -1, -1,
11296 -1, -1, -1, -1, -1, -1, -1, -1,
11297 -1, -1, -1, -1, -1, -1, -1, -1,
11298 -1, -1, -1, -1, -1, -1, -1, -1,
11299
11300 -1, -1, -1, -1, -1, -1, -1, -1,
11301 -1, -1, -1, -1, -1, -1, -1, -1,
11302 -1, -1, -1, -1, -1, -1, -1, -1,
11303 -1, -1, -1, -1, -1, -1, -1, -1,
11304 -1, -1, -1, -1, -1, -1, -1, -1,
11305 -1, -1, -1, -1, -1, -1, -1, -1,
11306 -1, -1, -1, -1, -1, -1, -1, -1,
11307 -1, -1, -1, -1, -1, -1, -1, -1,
11308 -1, -1, -1, -1, -1, -1, -1, -1,
11309 -1, -1, -1, -1, -1, -1, -1, -1,
11310 -1, -1, -1, -1, -1, -1, -1, -1,
11311 -1, -1, -1, -1, -1, -1, -1, -1,
11312 -1, -1, -1, -1, -1, -1, -1, -1,
11313 -1, -1, -1, -1, -1, -1, -1, -1,
11314 0, -1, -1, -1, 4, 5, 6, 7,
11315 8, 9, -1, -1, -1, -1, -1, -1,
11316 0, 1, 2, 3, 4, 5, 6, 7,
11317 8, 9, -1, -1, -1, -1, -1, -1,
11318 -1, -1, -1, -1, -1, -1, -1, -1,
11319 -1, -1, -1, -1, -1, -1, -1, -1,
11320 -1, -1, -1, -1, -1, -1, -1, -1,
11321 -1, -1, -1, -1, -1, -1, -1, -1,
11322 -1, -1, -1, -1, -1, -1, -1, -1,
11323 -1, -1, -1, -1, -1, -1, -1, -1,
11324 -1, -1, -1, -1, -1, -1, -1, -1,
11325 -1, -1, -1, -1, -1, -1, -1, -1,
11326 -1, -1, -1, -1, -1, -1, -1, -1,
11327 -1, -1, -1, -1, -1, -1, -1, -1,
11328 -1, -1, -1, -1, -1, -1, -1, -1,
11329 -1, -1, -1, -1, -1, -1, -1, -1,
11330 -1, -1, -1, -1, -1, -1, -1, -1,
11331 -1, -1, -1, -1, -1, -1, -1, -1,
11332
11333 -1, -1, -1, -1, -1, -1, -1, -1,
11334 -1, -1, -1, -1, -1, -1, -1, -1,
11335 -1, -1, -1, -1, -1, -1, -1, -1,
11336 -1, -1, -1, -1, -1, -1, -1, -1,
11337 -1, -1, -1, -1, -1, -1, -1, -1,
11338 -1, -1, -1, -1, -1, -1, -1, -1,
11339 -1, -1, -1, -1, -1, -1, -1, -1,
11340 -1, -1, -1, -1, -1, -1, -1, -1,
11341 -1, -1, -1, -1, -1, -1, -1, -1,
11342 -1, -1, -1, -1, -1, -1, -1, -1,
11343 -1, -1, -1, -1, -1, -1, -1, -1,
11344 -1, -1, -1, -1, -1, -1, -1, -1,
11345 1, 2, 3, 4, 5, 6, 7, 8,
11346 9, -1, -1, -1, -1, -1, -1, -1,
11347 -1, -1, -1, -1, 1, 2, 3, 4,
11348 5, 6, 7, 8, 9, -1, -1, -1,
11349 -1, -1, -1, -1, -1, -1, -1, -1,
11350 1, 2, 3, 4, 5, 6, 7, 8,
11351 9, -1, -1, -1, -1, -1, -1, -1,
11352 -1, -1, -1, -1, -1, -1, -1, -1,
11353 -1, -1, -1, -1, -1, -1, -1, -1,
11354 -1, -1, -1, -1, -1, -1, -1, -1,
11355 -1, -1, -1, -1, -1, -1, -1, -1,
11356 -1, -1, -1, -1, -1, -1, -1, -1,
11357 -1, -1, -1, -1, -1, -1, -1, -1,
11358 -1, -1, -1, -1, -1, -1, -1, -1,
11359 -1, -1, -1, -1, -1, -1, -1, -1,
11360 -1, -1, -1, -1, -1, -1, -1, -1,
11361 -1, -1, -1, -1, -1, -1, -1, -1,
11362 -1, -1, 0, -1, -1, -1, -1, -1,
11363 -1, -1, -1, -1, -1, 1, 2, 3,
11364 4, 5, 6, 7, 8, 9, -1, -1,
11365
11366 -1, -1, -1, -1, -1, -1, -1, -1,
11367 -1, -1, -1, -1, -1, -1, -1, -1,
11368 -1, -1, -1, -1, -1, -1, -1, -1,
11369 -1, -1, -1, -1, -1, -1, -1, -1,
11370 -1, -1, -1, -1, -1, -1, -1, -1,
11371 -1, -1, -1, -1, -1, -1, -1, -1,
11372 -1, -1, -1, -1, -1, -1, -1, -1,
11373 -1, -1, -1, -1, -1, -1, -1, -1,
11374 -1, -1, -1, -1, -1, -1, -1, -1,
11375 -1, -1, -1, -1, -1, -1, -1, -1,
11376 -1, -1, -1, -1, -1, -1, -1, -1,
11377 -1, -1, -1, -1, -1, -1, -1, -1,
11378 -1, -1, -1, -1, -1, -1, -1, -1,
11379 -1, -1, -1, -1, -1, -1, -1, -1,
11380 -1, -1, -1, -1, -1, -1, 1, 2,
11381 3, 4, 5, 6, 7, 8, 9, -1,
11382 1, 2, 3, 4, 5, 6, 7, 8,
11383 9, -1, 1, 2, 3, 4, 5, 6,
11384 7, 8, 9, -1, -1, -1, -1, -1,
11385 -1, -1, -1, -1, -1, -1, -1, -1,
11386 -1, -1, -1, -1, -1, -1, -1, -1,
11387 -1, -1, -1, -1, -1, -1, -1, -1,
11388 -1, -1, -1, -1, -1, -1, -1, -1,
11389 -1, -1, -1, -1, -1, -1, -1, -1,
11390 -1, -1, -1, -1, -1, -1, -1, -1,
11391 -1, -1, -1, -1, -1, -1, -1, -1,
11392 -1, -1, -1, -1, -1, -1, -1, -1,
11393 -1, -1, -1, -1, -1, -1, -1, -1,
11394 -1, -1, -1, -1, -1, -1, -1, -1,
11395 -1, -1, -1, -1, -1, -1, -1, -1,
11396 -1, -1, -1, -1, -1, -1, -1, -1,
11397 -1, -1, -1, -1, -1, -1, -1, -1,
11398};
11399// 40698 bytes
11400
11401#endif
11402
11403#ifdef QT_NO_UNICODETABLES
11404
11405const Q_UINT8 QUnicodeTables::latin1_line_break_info[] = {
11406 19, 19, 19, 19, 19, 19, 19, 19,
11407 19, 15, 23, 19, 21, 22, 19, 19,
11408 19, 19, 19, 19, 19, 19, 19, 19,
11409 19, 19, 19, 19, 19, 19, 19, 19,
11410 26, 5, 2, 11, 8, 9, 11, 2,
11411 0, 1, 11, 8, 7, 14, 7, 6,
11412 10, 10, 10, 10, 10, 10, 10, 10,
11413 10, 10, 7, 7, 11, 11, 11, 5,
11414 11, 11, 11, 11, 11, 11, 11, 11,
11415 11, 11, 11, 11, 11, 11, 11, 11,
11416 11, 11, 11, 11, 11, 11, 11, 11,
11417 11, 11, 11, 0, 8, 1, 11, 11,
11418 11, 11, 11, 11, 11, 11, 11, 11,
11419 11, 11, 11, 11, 11, 11, 11, 11,
11420 11, 11, 11, 11, 11, 11, 11, 11,
11421 11, 11, 11, 0, 15, 1, 11, 19,
11422 19, 19, 19, 19, 19, 19, 19, 19,
11423 19, 19, 19, 19, 19, 19, 19, 19,
11424 19, 19, 19, 19, 19, 19, 19, 19,
11425 19, 19, 19, 19, 19, 19, 19, 19,
11426 3, 11, 9, 8, 8, 8, 11, 11,
11427 11, 11, 11, 2, 11, 15, 11, 11,
11428 9, 8, 11, 11, 16, 11, 11, 11,
11429 11, 11, 11, 2, 11, 11, 11, 11,
11430 11, 11, 11, 11, 11, 11, 11, 11,
11431 11, 11, 11, 11, 11, 11, 11, 11,
11432 11, 11, 11, 11, 11, 11, 11, 11,
11433 11, 11, 11, 11, 11, 11, 11, 11,
11434 11, 11, 11, 11, 11, 11, 11, 11,
11435 11, 11, 11, 11, 11, 11, 11, 11,
11436 11, 11, 11, 11, 11, 11, 11, 11,
11437 11, 11, 11, 11, 11, 11, 11, 11,
11438};
11439
11440#else
11441
11442const Q_UINT8 QUnicodeTables::line_break_info[] = {
11443 1, 2, 3, 4, 5, 6, 7, 8,
11444 2, 9, 10, 11, 12, 13, 14, 15,
11445 16, 17, 2, 18, 2, 2, 19, 20,
11446 21, 2, 2, 2, 2, 2, 2, 2,
11447 22, 23, 24, 25, 2, 2, 2, 26,
11448 2, 27, 2, 2, 2, 2, 28, 29,
11449 30, 31, 32, 33, 34, 34, 34, 34,
11450 34, 34, 34, 34, 34, 34, 34, 34,
11451 34, 34, 34, 34, 34, 34, 34, 34,
11452 34, 34, 34, 34, 34, 35, 34, 34,
11453 34, 34, 34, 34, 34, 34, 34, 34,
11454 34, 34, 34, 34, 34, 34, 34, 34,
11455 34, 34, 34, 34, 34, 34, 34, 34,
11456 34, 34, 34, 34, 34, 34, 34, 34,
11457 34, 34, 34, 34, 34, 34, 34, 34,
11458 34, 34, 34, 34, 34, 34, 34, 34,
11459 34, 34, 34, 34, 34, 34, 34, 34,
11460 34, 34, 34, 34, 34, 34, 34, 34,
11461 34, 34, 34, 34, 34, 34, 34, 34,
11462 34, 34, 34, 34, 34, 34, 34, 36,
11463 34, 34, 34, 34, 37, 2, 2, 2,
11464 2, 2, 2, 2, 34, 34, 34, 34,
11465 34, 34, 34, 34, 34, 34, 34, 34,
11466 34, 34, 34, 34, 34, 34, 34, 34,
11467 34, 34, 34, 34, 34, 34, 34, 34,
11468 34, 34, 34, 34, 34, 34, 34, 34,
11469 34, 34, 34, 34, 34, 34, 34, 38,
11470 39, 39, 39, 39, 39, 39, 39, 39,
11471 2, 2, 2, 2, 2, 2, 2, 2,
11472 2, 2, 2, 2, 2, 2, 2, 2,
11473 2, 2, 2, 2, 2, 2, 2, 2,
11474 2, 34, 40, 41, 2, 42, 43, 44,
11475
11476
11477 19, 19, 19, 19, 19, 19, 19, 19,
11478 19, 15, 23, 19, 21, 22, 19, 19,
11479 19, 19, 19, 19, 19, 19, 19, 19,
11480 19, 19, 19, 19, 19, 19, 19, 19,
11481 26, 5, 2, 11, 8, 9, 11, 2,
11482 0, 1, 11, 8, 7, 14, 7, 6,
11483 10, 10, 10, 10, 10, 10, 10, 10,
11484 10, 10, 7, 7, 11, 11, 11, 5,
11485 11, 11, 11, 11, 11, 11, 11, 11,
11486 11, 11, 11, 11, 11, 11, 11, 11,
11487 11, 11, 11, 11, 11, 11, 11, 11,
11488 11, 11, 11, 0, 8, 1, 11, 11,
11489 11, 11, 11, 11, 11, 11, 11, 11,
11490 11, 11, 11, 11, 11, 11, 11, 11,
11491 11, 11, 11, 11, 11, 11, 11, 11,
11492 11, 11, 11, 0, 15, 1, 11, 19,
11493 19, 19, 19, 19, 19, 19, 19, 19,
11494 19, 19, 19, 19, 19, 19, 19, 19,
11495 19, 19, 19, 19, 19, 19, 19, 19,
11496 19, 19, 19, 19, 19, 19, 19, 19,
11497 3, 11, 9, 8, 8, 8, 11, 11,
11498 11, 11, 11, 2, 11, 15, 11, 11,
11499 9, 8, 11, 11, 16, 11, 11, 11,
11500 11, 11, 11, 2, 11, 11, 11, 11,
11501 11, 11, 11, 11, 11, 11, 11, 11,
11502 11, 11, 11, 11, 11, 11, 11, 11,
11503 11, 11, 11, 11, 11, 11, 11, 11,
11504 11, 11, 11, 11, 11, 11, 11, 11,
11505 11, 11, 11, 11, 11, 11, 11, 11,
11506 11, 11, 11, 11, 11, 11, 11, 11,
11507 11, 11, 11, 11, 11, 11, 11, 11,
11508 11, 11, 11, 11, 11, 11, 11, 11,
11509
11510 11, 11, 11, 11, 11, 11, 11, 11,
11511 11, 11, 11, 11, 11, 11, 11, 11,
11512 11, 11, 11, 11, 11, 11, 11, 11,
11513 11, 11, 11, 11, 11, 11, 11, 11,
11514 11, 11, 11, 11, 11, 11, 11, 11,
11515 11, 11, 11, 11, 11, 11, 11, 11,
11516 11, 11, 11, 11, 11, 11, 11, 11,
11517 11, 11, 11, 11, 11, 11, 11, 11,
11518 11, 11, 11, 11, 11, 11, 11, 11,
11519 11, 11, 11, 11, 11, 11, 11, 11,
11520 11, 11, 11, 11, 11, 11, 11, 11,
11521 11, 11, 11, 11, 11, 11, 11, 11,
11522 11, 11, 11, 11, 11, 11, 11, 11,
11523 11, 11, 11, 11, 11, 11, 11, 11,
11524 11, 11, 11, 11, 11, 11, 11, 11,
11525 11, 11, 11, 11, 11, 11, 11, 11,
11526 11, 11, 11, 11, 11, 11, 11, 11,
11527 11, 11, 11, 11, 11, 11, 11, 11,
11528 11, 11, 11, 11, 11, 11, 11, 11,
11529 11, 11, 11, 11, 11, 11, 11, 11,
11530 11, 11, 11, 11, 11, 11, 11, 11,
11531 11, 11, 11, 11, 11, 11, 11, 11,
11532 11, 11, 11, 11, 11, 11, 11, 11,
11533 11, 11, 11, 11, 11, 11, 11, 11,
11534 11, 11, 11, 11, 11, 11, 11, 11,
11535 11, 11, 11, 11, 11, 11, 11, 11,
11536 11, 11, 11, 11, 11, 11, 11, 11,
11537 11, 11, 11, 11, 11, 11, 11, 11,
11538 11, 11, 11, 11, 11, 11, 11, 11,
11539 11, 11, 11, 11, 11, 11, 11, 11,
11540 11, 11, 11, 11, 11, 11, 11, 11,
11541 11, 11, 11, 11, 11, 11, 11, 11,
11542
11543 11, 11, 11, 11, 11, 11, 11, 11,
11544 11, 11, 11, 11, 11, 11, 11, 11,
11545 11, 11, 11, 11, 11, 11, 11, 11,
11546 11, 11, 11, 11, 11, 11, 11, 11,
11547 11, 11, 11, 11, 11, 11, 11, 11,
11548 11, 11, 11, 11, 11, 11, 11, 11,
11549 11, 11, 11, 11, 11, 11, 11, 11,
11550 11, 11, 11, 11, 11, 11, 11, 11,
11551 11, 11, 11, 11, 11, 11, 11, 11,
11552 11, 11, 11, 11, 11, 11, 11, 11,
11553 11, 11, 11, 11, 11, 11, 11, 11,
11554 11, 11, 11, 11, 11, 11, 11, 11,
11555 11, 11, 11, 11, 11, 11, 11, 11,
11556 11, 11, 11, 11, 11, 11, 11, 11,
11557 11, 11, 11, 11, 11, 11, 11, 11,
11558 11, 11, 11, 11, 11, 11, 11, 11,
11559 11, 11, 11, 11, 11, 11, 11, 11,
11560 11, 11, 11, 11, 11, 11, 11, 11,
11561 11, 11, 11, 11, 11, 11, 11, 11,
11562 11, 11, 11, 11, 11, 11, 11, 11,
11563 11, 11, 11, 11, 11, 11, 11, 11,
11564 11, 11, 11, 11, 11, 11, 11, 11,
11565 11, 11, 11, 11, 11, 11, 11, 11,
11566 11, 11, 11, 11, 11, 11, 11, 11,
11567 11, 11, 11, 11, 11, 11, 11, 11,
11568 16, 11, 11, 11, 16, 11, 11, 11,
11569 11, 11, 11, 11, 11, 11, 11, 11,
11570 11, 11, 11, 11, 11, 11, 11, 11,
11571 11, 11, 11, 11, 11, 11, 11, 11,
11572 11, 11, 11, 11, 11, 11, 11, 11,
11573 11, 11, 11, 11, 11, 11, 11, 11,
11574 11, 11, 11, 11, 11, 11, 11, 11,
11575
11576 19, 19, 19, 19, 19, 19, 19, 19,
11577 19, 19, 19, 19, 19, 19, 19, 19,
11578 19, 19, 19, 19, 19, 19, 19, 19,
11579 19, 19, 19, 19, 19, 19, 19, 19,
11580 19, 19, 19, 19, 19, 19, 19, 19,
11581 19, 19, 19, 19, 19, 19, 19, 19,
11582 19, 19, 19, 19, 19, 19, 19, 19,
11583 19, 19, 19, 19, 19, 19, 19, 19,
11584 19, 19, 19, 19, 19, 19, 19, 19,
11585 19, 19, 19, 19, 19, 19, 19, 19,
11586 11, 11, 11, 11, 11, 11, 11, 11,
11587 11, 11, 11, 11, 11, 11, 11, 11,
11588 19, 19, 19, 19, 19, 19, 19, 19,
11589 19, 19, 19, 19, 19, 19, 19, 19,
11590 11, 11, 11, 11, 11, 11, 11, 11,
11591 11, 11, 11, 11, 11, 11, 11, 11,
11592 11, 11, 11, 11, 11, 11, 11, 11,
11593 11, 11, 11, 11, 11, 11, 11, 11,
11594 11, 11, 11, 11, 11, 11, 11, 11,
11595 11, 11, 11, 11, 11, 11, 11, 11,
11596 11, 11, 11, 11, 11, 11, 11, 11,
11597 11, 11, 11, 11, 11, 11, 11, 11,
11598 11, 11, 11, 11, 11, 11, 11, 11,
11599 11, 11, 11, 11, 11, 11, 11, 11,
11600 11, 11, 11, 11, 11, 11, 11, 11,
11601 11, 11, 11, 11, 11, 11, 11, 11,
11602 11, 11, 11, 11, 11, 11, 11, 11,
11603 11, 11, 11, 11, 11, 11, 11, 11,
11604 11, 11, 11, 11, 11, 11, 11, 11,
11605 11, 11, 11, 11, 11, 11, 11, 11,
11606 11, 11, 11, 11, 11, 11, 11, 11,
11607 11, 11, 11, 11, 11, 11, 11, 11,
11608
11609 11, 11, 11, 11, 11, 11, 11, 11,
11610 11, 11, 11, 11, 11, 11, 11, 11,
11611 11, 11, 11, 11, 11, 11, 11, 11,
11612 11, 11, 11, 11, 11, 11, 11, 11,
11613 11, 11, 11, 11, 11, 11, 11, 11,
11614 11, 11, 11, 11, 11, 11, 11, 11,
11615 11, 11, 11, 11, 11, 11, 11, 11,
11616 11, 11, 11, 11, 11, 11, 11, 11,
11617 11, 11, 11, 11, 11, 11, 11, 11,
11618 11, 11, 11, 11, 11, 11, 11, 11,
11619 11, 11, 11, 11, 11, 11, 11, 11,
11620 11, 11, 11, 11, 11, 11, 11, 11,
11621 11, 11, 11, 11, 11, 11, 11, 11,
11622 11, 11, 11, 11, 11, 11, 11, 11,
11623 11, 11, 11, 11, 11, 11, 11, 11,
11624 11, 11, 11, 11, 11, 11, 11, 11,
11625 11, 11, 11, 19, 19, 19, 19, 11,
11626 19, 19, 11, 11, 11, 11, 11, 11,
11627 11, 11, 11, 11, 11, 11, 11, 11,
11628 11, 11, 11, 11, 11, 11, 11, 11,
11629 11, 11, 11, 11, 11, 11, 11, 11,
11630 11, 11, 11, 11, 11, 11, 11, 11,
11631 11, 11, 11, 11, 11, 11, 11, 11,
11632 11, 11, 11, 11, 11, 11, 11, 11,
11633 11, 11, 11, 11, 11, 11, 11, 11,
11634 11, 11, 11, 11, 11, 11, 11, 11,
11635 11, 11, 11, 11, 11, 11, 11, 11,
11636 11, 11, 11, 11, 11, 11, 11, 11,
11637 11, 11, 11, 11, 11, 11, 11, 11,
11638 11, 11, 11, 11, 11, 11, 11, 11,
11639 11, 11, 11, 11, 11, 11, 11, 11,
11640 11, 11, 11, 11, 11, 11, 11, 11,
11641
11642 11, 11, 11, 11, 11, 11, 11, 11,
11643 11, 11, 11, 11, 11, 11, 11, 11,
11644 11, 11, 11, 11, 11, 11, 11, 11,
11645 11, 11, 11, 11, 11, 11, 11, 11,
11646 11, 11, 11, 11, 11, 11, 11, 11,
11647 11, 11, 11, 11, 11, 11, 11, 11,
11648 11, 11, 11, 11, 11, 11, 11, 11,
11649 11, 11, 11, 11, 11, 11, 11, 11,
11650 11, 11, 11, 11, 11, 11, 11, 11,
11651 11, 11, 11, 11, 11, 11, 11, 11,
11652 11, 11, 11, 11, 11, 11, 11, 11,
11653 11, 11, 11, 11, 11, 11, 11, 11,
11654 11, 11, 11, 11, 11, 11, 11, 11,
11655 11, 11, 11, 11, 11, 11, 11, 11,
11656 11, 11, 11, 11, 11, 11, 11, 11,
11657 11, 11, 11, 11, 11, 11, 11, 11,
11658 11, 11, 11, 11, 11, 11, 11, 11,
11659 11, 7, 15, 11, 11, 11, 11, 11,
11660 11, 19, 19, 19, 19, 19, 19, 19,
11661 19, 19, 19, 19, 19, 19, 19, 19,
11662 19, 19, 11, 19, 19, 19, 19, 19,
11663 19, 19, 19, 19, 19, 19, 19, 19,
11664 19, 19, 19, 19, 19, 19, 19, 19,
11665 19, 19, 11, 19, 19, 19, 11, 19,
11666 11, 19, 19, 11, 19, 11, 11, 11,
11667 11, 11, 11, 11, 11, 11, 11, 11,
11668 11, 11, 11, 11, 11, 11, 11, 11,
11669 11, 11, 11, 11, 11, 11, 11, 11,
11670 11, 11, 11, 11, 11, 11, 11, 11,
11671 11, 11, 11, 11, 11, 11, 11, 11,
11672 11, 11, 11, 11, 11, 11, 11, 11,
11673 11, 11, 11, 11, 11, 11, 11, 11,
11674
11675 11, 11, 11, 11, 11, 11, 11, 11,
11676 11, 11, 11, 11, 11, 11, 11, 11,
11677 11, 11, 11, 11, 11, 11, 11, 11,
11678 11, 11, 11, 11, 11, 11, 11, 11,
11679 11, 11, 11, 11, 11, 11, 11, 11,
11680 11, 11, 11, 11, 11, 11, 11, 11,
11681 11, 11, 11, 11, 11, 11, 11, 11,
11682 11, 11, 11, 11, 11, 11, 11, 11,
11683 11, 11, 11, 11, 11, 11, 11, 11,
11684 11, 11, 11, 19, 19, 19, 19, 19,
11685 19, 19, 19, 19, 19, 19, 11, 11,
11686 11, 11, 11, 11, 11, 11, 11, 11,
11687 10, 10, 10, 10, 10, 10, 10, 10,
11688 10, 10, 11, 11, 11, 11, 11, 11,
11689 19, 11, 11, 11, 11, 11, 11, 11,
11690 11, 11, 11, 11, 11, 11, 11, 11,
11691 11, 11, 11, 11, 11, 11, 11, 11,
11692 11, 11, 11, 11, 11, 11, 11, 11,
11693 11, 11, 11, 11, 11, 11, 11, 11,
11694 11, 11, 11, 11, 11, 11, 11, 11,
11695 11, 11, 11, 11, 11, 11, 11, 11,
11696 11, 11, 11, 11, 11, 11, 11, 11,
11697 11, 11, 11, 11, 11, 11, 11, 11,
11698 11, 11, 11, 11, 11, 11, 11, 11,
11699 11, 11, 11, 11, 11, 11, 11, 11,
11700 11, 11, 11, 11, 11, 11, 11, 11,
11701 11, 11, 11, 11, 11, 11, 19, 19,
11702 19, 19, 19, 19, 19, 19, 19, 19,
11703 19, 19, 19, 19, 19, 11, 11, 19,
11704 19, 11, 19, 19, 19, 19, 11, 11,
11705 10, 10, 10, 10, 10, 10, 10, 10,
11706 10, 10, 11, 11, 11, 11, 11, 11,
11707
11708 11, 11, 11, 11, 11, 11, 11, 11,
11709 11, 11, 11, 11, 11, 11, 11, 19,
11710 11, 19, 11, 11, 11, 11, 11, 11,
11711 11, 11, 11, 11, 11, 11, 11, 11,
11712 11, 11, 11, 11, 11, 11, 11, 11,
11713 11, 11, 11, 11, 11, 11, 11, 11,
11714 19, 19, 19, 19, 19, 19, 19, 19,
11715 19, 19, 19, 19, 19, 19, 19, 19,
11716 19, 19, 19, 19, 19, 19, 19, 19,
11717 19, 19, 19, 11, 11, 11, 11, 11,
11718 11, 11, 11, 11, 11, 11, 11, 11,
11719 11, 11, 11, 11, 11, 11, 11, 11,
11720 11, 11, 11, 11, 11, 11, 11, 11,
11721 11, 11, 11, 11, 11, 11, 11, 11,
11722 11, 11, 11, 11, 11, 11, 11, 11,
11723 11, 11, 11, 11, 11, 11, 11, 11,
11724 11, 11, 11, 11, 11, 11, 11, 11,
11725 11, 11, 11, 11, 11, 11, 11, 11,
11726 11, 11, 11, 11, 11, 11, 11, 11,
11727 11, 11, 11, 11, 11, 11, 11, 11,
11728 11, 11, 11, 11, 11, 11, 19, 19,
11729 19, 19, 19, 19, 19, 19, 19, 19,
11730 19, 11, 11, 11, 11, 11, 11, 11,
11731 11, 11, 11, 11, 11, 11, 11, 11,
11732 11, 11, 11, 11, 11, 11, 11, 11,
11733 11, 11, 11, 11, 11, 11, 11, 11,
11734 11, 11, 11, 11, 11, 11, 11, 11,
11735 11, 11, 11, 11, 11, 11, 11, 11,
11736 11, 11, 11, 11, 11, 11, 11, 11,
11737 11, 11, 11, 11, 11, 11, 11, 11,
11738 11, 11, 11, 11, 11, 11, 11, 11,
11739 11, 11, 11, 11, 11, 11, 11, 11,
11740
11741 11, 19, 19, 19, 11, 11, 11, 11,
11742 11, 11, 11, 11, 11, 11, 11, 11,
11743 11, 11, 11, 11, 11, 11, 11, 11,
11744 11, 11, 11, 11, 11, 11, 11, 11,
11745 11, 11, 11, 11, 11, 11, 11, 11,
11746 11, 11, 11, 11, 11, 11, 11, 11,
11747 11, 11, 11, 11, 11, 11, 11, 11,
11748 11, 11, 11, 11, 19, 11, 19, 19,
11749 19, 19, 19, 19, 19, 19, 19, 19,
11750 19, 19, 19, 19, 19, 19, 11, 11,
11751 11, 19, 19, 19, 19, 11, 11, 11,
11752 11, 11, 11, 11, 11, 11, 11, 11,
11753 11, 11, 19, 19, 11, 11, 10, 10,
11754 10, 10, 10, 10, 10, 10, 10, 10,
11755 11, 11, 11, 11, 11, 11, 11, 11,
11756 11, 11, 11, 11, 11, 11, 11, 11,
11757 11, 19, 19, 19, 11, 11, 11, 11,
11758 11, 11, 11, 11, 11, 11, 11, 11,
11759 11, 11, 11, 11, 11, 11, 11, 11,
11760 11, 11, 11, 11, 11, 11, 11, 11,
11761 11, 11, 11, 11, 11, 11, 11, 11,
11762 11, 11, 11, 11, 11, 11, 11, 11,
11763 11, 11, 11, 11, 11, 11, 11, 11,
11764 11, 11, 11, 11, 19, 11, 19, 19,
11765 19, 19, 19, 19, 19, 11, 11, 19,
11766 19, 11, 11, 19, 19, 19, 11, 11,
11767 11, 11, 11, 11, 11, 11, 11, 19,
11768 11, 11, 11, 11, 11, 11, 11, 11,
11769 11, 11, 19, 19, 11, 11, 10, 10,
11770 10, 10, 10, 10, 10, 10, 10, 10,
11771 11, 11, 8, 8, 11, 11, 11, 11,
11772 11, 11, 11, 11, 11, 11, 11, 11,
11773
11774 11, 11, 19, 11, 11, 11, 11, 11,
11775 11, 11, 11, 11, 11, 11, 11, 11,
11776 11, 11, 11, 11, 11, 11, 11, 11,
11777 11, 11, 11, 11, 11, 11, 11, 11,
11778 11, 11, 11, 11, 11, 11, 11, 11,
11779 11, 11, 11, 11, 11, 11, 11, 11,
11780 11, 11, 11, 11, 11, 11, 11, 11,
11781 11, 11, 11, 11, 19, 11, 19, 19,
11782 19, 19, 19, 11, 11, 11, 11, 19,
11783 19, 11, 11, 19, 19, 19, 11, 11,
11784 11, 11, 11, 11, 11, 11, 11, 11,
11785 11, 11, 11, 11, 11, 11, 11, 11,
11786 11, 11, 11, 11, 11, 11, 10, 10,
11787 10, 10, 10, 10, 10, 10, 10, 10,
11788 19, 19, 11, 11, 11, 11, 11, 11,
11789 11, 11, 11, 11, 11, 11, 11, 11,
11790 11, 19, 19, 19, 11, 11, 11, 11,
11791 11, 11, 11, 11, 11, 11, 11, 11,
11792 11, 11, 11, 11, 11, 11, 11, 11,
11793 11, 11, 11, 11, 11, 11, 11, 11,
11794 11, 11, 11, 11, 11, 11, 11, 11,
11795 11, 11, 11, 11, 11, 11, 11, 11,
11796 11, 11, 11, 11, 11, 11, 11, 11,
11797 11, 11, 11, 11, 19, 11, 19, 19,
11798 19, 19, 19, 19, 19, 19, 11, 19,
11799 19, 19, 11, 19, 19, 19, 11, 11,
11800 11, 11, 11, 11, 11, 11, 11, 11,
11801 11, 11, 11, 11, 11, 11, 11, 11,
11802 11, 11, 11, 11, 11, 11, 10, 10,
11803 10, 10, 10, 10, 10, 10, 10, 10,
11804 11, 11, 11, 11, 11, 11, 11, 11,
11805 11, 11, 11, 11, 11, 11, 11, 11,
11806
11807 11, 19, 19, 19, 11, 11, 11, 11,
11808 11, 11, 11, 11, 11, 11, 11, 11,
11809 11, 11, 11, 11, 11, 11, 11, 11,
11810 11, 11, 11, 11, 11, 11, 11, 11,
11811 11, 11, 11, 11, 11, 11, 11, 11,
11812 11, 11, 11, 11, 11, 11, 11, 11,
11813 11, 11, 11, 11, 11, 11, 11, 11,
11814 11, 11, 11, 11, 19, 11, 19, 19,
11815 19, 19, 19, 19, 11, 11, 11, 19,
11816 19, 11, 11, 19, 19, 19, 11, 11,
11817 11, 11, 11, 11, 11, 11, 19, 19,
11818 11, 11, 11, 11, 11, 11, 11, 11,
11819 11, 11, 11, 11, 11, 11, 10, 10,
11820 10, 10, 10, 10, 10, 10, 10, 10,
11821 11, 11, 11, 11, 11, 11, 11, 11,
11822 11, 11, 11, 11, 11, 11, 11, 11,
11823 11, 11, 19, 11, 11, 11, 11, 11,
11824 11, 11, 11, 11, 11, 11, 11, 11,
11825 11, 11, 11, 11, 11, 11, 11, 11,
11826 11, 11, 11, 11, 11, 11, 11, 11,
11827 11, 11, 11, 11, 11, 11, 11, 11,
11828 11, 11, 11, 11, 11, 11, 11, 11,
11829 11, 11, 11, 11, 11, 11, 11, 11,
11830 11, 11, 11, 11, 11, 11, 19, 19,
11831 19, 19, 19, 11, 11, 11, 19, 19,
11832 19, 11, 19, 19, 19, 19, 11, 11,
11833 11, 11, 11, 11, 11, 11, 11, 19,
11834 11, 11, 11, 11, 11, 11, 11, 11,
11835 11, 11, 11, 11, 11, 11, 11, 10,
11836 10, 10, 10, 10, 10, 10, 10, 10,
11837 11, 11, 11, 11, 11, 11, 11, 11,
11838 11, 11, 11, 11, 11, 11, 11, 11,
11839
11840 11, 19, 19, 19, 11, 11, 11, 11,
11841 11, 11, 11, 11, 11, 11, 11, 11,
11842 11, 11, 11, 11, 11, 11, 11, 11,
11843 11, 11, 11, 11, 11, 11, 11, 11,
11844 11, 11, 11, 11, 11, 11, 11, 11,
11845 11, 11, 11, 11, 11, 11, 11, 11,
11846 11, 11, 11, 11, 11, 11, 11, 11,
11847 11, 11, 11, 11, 11, 11, 19, 19,
11848 19, 19, 19, 19, 19, 11, 19, 19,
11849 19, 11, 19, 19, 19, 19, 11, 11,
11850 11, 11, 11, 11, 11, 19, 19, 11,
11851 11, 11, 11, 11, 11, 11, 11, 11,
11852 11, 11, 11, 11, 11, 11, 10, 10,
11853 10, 10, 10, 10, 10, 10, 10, 10,
11854 11, 11, 11, 11, 11, 11, 11, 11,
11855 11, 11, 11, 11, 11, 11, 11, 11,
11856 11, 11, 19, 19, 11, 11, 11, 11,
11857 11, 11, 11, 11, 11, 11, 11, 11,
11858 11, 11, 11, 11, 11, 11, 11, 11,
11859 11, 11, 11, 11, 11, 11, 11, 11,
11860 11, 11, 11, 11, 11, 11, 11, 11,
11861 11, 11, 11, 11, 11, 11, 11, 11,
11862 11, 11, 11, 11, 11, 11, 11, 11,
11863 11, 11, 11, 11, 11, 11, 19, 19,
11864 19, 19, 19, 19, 19, 11, 19, 19,
11865 19, 11, 19, 19, 19, 19, 11, 11,
11866 11, 11, 11, 11, 11, 19, 19, 11,
11867 11, 11, 11, 11, 11, 11, 11, 11,
11868 11, 11, 11, 11, 11, 11, 10, 10,
11869 10, 10, 10, 10, 10, 10, 10, 10,
11870 11, 11, 11, 11, 11, 11, 11, 11,
11871 11, 11, 11, 11, 11, 11, 11, 11,
11872
11873 11, 11, 19, 19, 11, 11, 11, 11,
11874 11, 11, 11, 11, 11, 11, 11, 11,
11875 11, 11, 11, 11, 11, 11, 11, 11,
11876 11, 11, 11, 11, 11, 11, 11, 11,
11877 11, 11, 11, 11, 11, 11, 11, 11,
11878 11, 11, 11, 11, 11, 11, 11, 11,
11879 11, 11, 11, 11, 11, 11, 11, 11,
11880 11, 11, 11, 11, 11, 11, 19, 19,
11881 19, 19, 19, 19, 11, 11, 19, 19,
11882 19, 11, 19, 19, 19, 19, 11, 11,
11883 11, 11, 11, 11, 11, 11, 11, 19,
11884 11, 11, 11, 11, 11, 11, 11, 11,
11885 11, 11, 11, 11, 11, 11, 10, 10,
11886 10, 10, 10, 10, 10, 10, 10, 10,
11887 11, 11, 11, 11, 11, 11, 11, 11,
11888 11, 11, 11, 11, 11, 11, 11, 11,
11889 11, 11, 19, 19, 11, 11, 11, 11,
11890 11, 11, 11, 11, 11, 11, 11, 11,
11891 11, 11, 11, 11, 11, 11, 11, 11,
11892 11, 11, 11, 11, 11, 11, 11, 11,
11893 11, 11, 11, 11, 11, 11, 11, 11,
11894 11, 11, 11, 11, 11, 11, 11, 11,
11895 11, 11, 11, 11, 11, 11, 11, 11,
11896 11, 11, 11, 11, 11, 11, 11, 11,
11897 11, 11, 11, 11, 11, 11, 11, 11,
11898 11, 11, 19, 11, 11, 11, 11, 19,
11899 19, 19, 19, 19, 19, 11, 19, 11,
11900 19, 19, 19, 19, 19, 19, 19, 19,
11901 11, 11, 11, 11, 11, 11, 11, 11,
11902 11, 11, 11, 11, 11, 11, 11, 11,
11903 11, 11, 19, 19, 11, 11, 11, 11,
11904 11, 11, 11, 11, 11, 11, 11, 11,
11905
11906 11, 20, 20, 20, 20, 20, 20, 20,
11907 20, 20, 20, 20, 20, 20, 20, 20,
11908 20, 20, 20, 20, 20, 20, 20, 20,
11909 20, 20, 20, 20, 20, 20, 20, 20,
11910 20, 20, 20, 20, 20, 20, 20, 20,
11911 20, 20, 20, 20, 20, 20, 20, 20,
11912 20, 19, 20, 20, 19, 19, 19, 19,
11913 19, 19, 19, 11, 11, 11, 11, 8,
11914 20, 20, 20, 20, 20, 20, 20, 19,
11915 19, 19, 19, 19, 19, 19, 19, 11,
11916 10, 10, 10, 10, 10, 10, 10, 10,
11917 10, 10, 4, 4, 11, 11, 11, 11,
11918 11, 11, 11, 11, 11, 11, 11, 11,
11919 11, 11, 11, 11, 11, 11, 11, 11,
11920 11, 11, 11, 11, 11, 11, 11, 11,
11921 11, 11, 11, 11, 11, 11, 11, 11,
11922 11, 20, 20, 11, 20, 11, 11, 20,
11923 20, 11, 20, 11, 11, 20, 11, 11,
11924 11, 11, 11, 11, 20, 20, 20, 20,
11925 11, 20, 20, 20, 20, 20, 20, 20,
11926 11, 20, 20, 20, 11, 20, 11, 20,
11927 11, 11, 20, 20, 11, 20, 20, 20,
11928 20, 19, 20, 20, 19, 19, 19, 19,
11929 19, 19, 11, 19, 19, 20, 11, 11,
11930 20, 20, 20, 20, 20, 11, 20, 11,
11931 19, 19, 19, 19, 19, 19, 11, 11,
11932 10, 10, 10, 10, 10, 10, 10, 10,
11933 10, 10, 11, 11, 20, 20, 11, 11,
11934 11, 11, 11, 11, 11, 11, 11, 11,
11935 11, 11, 11, 11, 11, 11, 11, 11,
11936 11, 11, 11, 11, 11, 11, 11, 11,
11937 11, 11, 11, 11, 11, 11, 11, 11,
11938
11939 11, 11, 11, 11, 11, 11, 11, 11,
11940 11, 11, 11, 15, 3, 11, 11, 11,
11941 11, 11, 11, 11, 11, 11, 11, 11,
11942 19, 19, 11, 11, 11, 11, 11, 11,
11943 10, 10, 10, 10, 10, 10, 10, 10,
11944 10, 10, 11, 11, 11, 11, 11, 11,
11945 11, 11, 11, 11, 11, 19, 11, 19,
11946 11, 19, 0, 1, 0, 1, 19, 19,
11947 11, 11, 11, 11, 11, 11, 11, 11,
11948 11, 11, 11, 11, 11, 11, 11, 11,
11949 11, 11, 11, 11, 11, 11, 11, 11,
11950 11, 11, 11, 11, 11, 11, 11, 11,
11951 11, 11, 11, 11, 11, 11, 11, 11,
11952 11, 11, 11, 11, 11, 11, 11, 11,
11953 11, 19, 19, 19, 19, 19, 19, 19,
11954 19, 19, 19, 19, 19, 19, 19, 19,
11955 19, 19, 19, 19, 19, 11, 19, 19,
11956 11, 11, 11, 11, 11, 11, 11, 11,
11957 19, 19, 19, 19, 19, 19, 19, 19,
11958 11, 19, 19, 19, 19, 19, 19, 19,
11959 19, 19, 19, 19, 19, 19, 19, 19,
11960 19, 19, 19, 19, 19, 19, 19, 19,
11961 19, 19, 19, 19, 19, 19, 19, 19,
11962 19, 19, 19, 19, 19, 11, 11, 11,
11963 11, 11, 11, 11, 11, 11, 19, 11,
11964 11, 11, 11, 11, 11, 11, 11, 11,
11965 11, 11, 11, 11, 11, 11, 11, 11,
11966 11, 11, 11, 11, 11, 11, 11, 11,
11967 11, 11, 11, 11, 11, 11, 11, 11,
11968 11, 11, 11, 11, 11, 11, 11, 11,
11969 11, 11, 11, 11, 11, 11, 11, 11,
11970 11, 11, 11, 11, 11, 11, 11, 11,
11971
11972 20, 20, 20, 20, 20, 20, 20, 20,
11973 20, 20, 20, 20, 20, 20, 20, 20,
11974 20, 20, 20, 20, 20, 20, 20, 20,
11975 20, 20, 20, 20, 20, 20, 20, 20,
11976 20, 20, 11, 20, 20, 20, 20, 20,
11977 11, 20, 20, 11, 19, 19, 19, 19,
11978 19, 19, 19, 11, 11, 11, 19, 19,
11979 19, 19, 11, 11, 11, 11, 11, 11,
11980 10, 10, 10, 10, 10, 10, 10, 10,
11981 10, 10, 11, 11, 11, 11, 11, 11,
11982 20, 20, 20, 20, 20, 20, 19, 19,
11983 19, 19, 11, 11, 11, 11, 11, 11,
11984 11, 11, 11, 11, 11, 11, 11, 11,
11985 11, 11, 11, 11, 11, 11, 11, 11,
11986 11, 11, 11, 11, 11, 11, 11, 11,
11987 11, 11, 11, 11, 11, 11, 11, 11,
11988 11, 11, 11, 11, 11, 11, 11, 11,
11989 11, 11, 11, 11, 11, 11, 11, 11,
11990 11, 11, 11, 11, 11, 11, 11, 11,
11991 11, 11, 11, 11, 11, 11, 11, 11,
11992 11, 11, 11, 11, 11, 11, 11, 11,
11993 11, 11, 11, 11, 11, 11, 11, 11,
11994 11, 11, 11, 11, 11, 11, 11, 11,
11995 11, 11, 11, 11, 11, 11, 11, 11,
11996 11, 11, 11, 11, 11, 11, 11, 11,
11997 11, 11, 11, 11, 11, 11, 11, 11,
11998 11, 11, 11, 11, 11, 11, 11, 11,
11999 11, 11, 11, 11, 11, 11, 11, 11,
12000 11, 11, 11, 11, 11, 11, 11, 11,
12001 11, 11, 11, 11, 11, 11, 11, 11,
12002 11, 11, 11, 11, 11, 11, 11, 11,
12003 11, 11, 11, 11, 11, 11, 11, 11,
12004
12005 12, 12, 12, 12, 12, 12, 12, 12,
12006 12, 12, 12, 12, 12, 12, 12, 12,
12007 12, 12, 12, 12, 12, 12, 12, 12,
12008 12, 12, 12, 12, 12, 12, 12, 12,
12009 12, 12, 12, 12, 12, 12, 12, 12,
12010 12, 12, 12, 12, 12, 12, 12, 12,
12011 12, 12, 12, 12, 12, 12, 12, 12,
12012 12, 12, 12, 12, 12, 12, 12, 12,
12013 12, 12, 12, 12, 12, 12, 12, 12,
12014 12, 12, 12, 12, 12, 12, 12, 12,
12015 12, 12, 12, 12, 12, 12, 12, 12,
12016 12, 12, 11, 11, 11, 11, 11, 12,
12017 19, 19, 19, 19, 19, 19, 19, 19,
12018 19, 19, 19, 19, 19, 19, 19, 19,
12019 19, 19, 19, 19, 19, 19, 19, 19,
12020 19, 19, 19, 19, 19, 19, 19, 19,
12021 19, 19, 19, 19, 19, 19, 19, 19,
12022 19, 19, 19, 19, 19, 19, 19, 19,
12023 19, 19, 19, 19, 19, 19, 19, 19,
12024 19, 19, 19, 19, 19, 19, 19, 19,
12025 19, 19, 19, 11, 11, 11, 11, 11,
12026 19, 19, 19, 19, 19, 19, 19, 19,
12027 19, 19, 19, 19, 19, 19, 19, 19,
12028 19, 19, 19, 19, 19, 19, 19, 19,
12029 19, 19, 19, 19, 19, 19, 19, 19,
12030 19, 19, 19, 19, 19, 19, 19, 19,
12031 19, 19, 19, 19, 19, 19, 19, 19,
12032 19, 19, 19, 19, 19, 19, 19, 19,
12033 19, 19, 19, 19, 19, 19, 19, 19,
12034 19, 19, 19, 19, 19, 19, 19, 19,
12035 19, 19, 19, 19, 19, 19, 19, 19,
12036 19, 19, 11, 11, 11, 11, 11, 11,
12037
12038 11, 11, 11, 11, 11, 11, 11, 11,
12039 11, 11, 11, 11, 11, 11, 11, 11,
12040 11, 11, 11, 11, 11, 11, 11, 11,
12041 11, 11, 11, 11, 11, 11, 11, 11,
12042 11, 11, 11, 11, 11, 11, 11, 11,
12043 11, 11, 11, 11, 11, 11, 11, 11,
12044 11, 11, 11, 11, 11, 11, 11, 11,
12045 11, 11, 11, 11, 11, 11, 11, 11,
12046 11, 11, 11, 11, 11, 11, 11, 11,
12047 11, 11, 11, 11, 11, 11, 11, 11,
12048 11, 11, 11, 11, 11, 11, 11, 11,
12049 11, 11, 11, 11, 11, 11, 11, 11,
12050 11, 15, 11, 11, 11, 11, 11, 11,
12051 11, 10, 10, 10, 10, 10, 10, 10,
12052 10, 10, 11, 11, 11, 11, 11, 11,
12053 11, 11, 11, 11, 11, 11, 11, 11,
12054 11, 11, 11, 11, 11, 11, 11, 11,
12055 11, 11, 11, 11, 11, 11, 11, 11,
12056 11, 11, 11, 11, 11, 11, 11, 11,
12057 11, 11, 11, 11, 11, 11, 11, 11,
12058 11, 11, 11, 11, 11, 11, 11, 11,
12059 11, 11, 11, 11, 11, 11, 11, 11,
12060 11, 11, 11, 11, 11, 11, 11, 11,
12061 11, 11, 11, 11, 11, 11, 11, 11,
12062 11, 11, 11, 11, 11, 11, 11, 11,
12063 11, 11, 11, 11, 11, 11, 11, 11,
12064 11, 11, 11, 11, 11, 11, 11, 11,
12065 11, 11, 11, 11, 11, 11, 11, 11,
12066 11, 11, 11, 11, 11, 11, 11, 11,
12067 11, 11, 11, 11, 11, 11, 11, 11,
12068 11, 11, 11, 11, 11, 11, 11, 11,
12069 11, 11, 11, 11, 11, 11, 11, 11,
12070
12071 11, 11, 11, 11, 11, 11, 11, 11,
12072 11, 11, 11, 11, 11, 11, 11, 11,
12073 11, 11, 11, 11, 11, 11, 11, 11,
12074 11, 11, 11, 11, 11, 11, 11, 11,
12075 11, 11, 11, 11, 11, 11, 11, 11,
12076 11, 11, 11, 11, 11, 11, 11, 11,
12077 11, 11, 11, 11, 11, 11, 11, 11,
12078 11, 11, 11, 11, 11, 11, 11, 11,
12079 11, 11, 11, 11, 11, 11, 11, 11,
12080 11, 11, 11, 11, 11, 11, 11, 11,
12081 11, 11, 11, 11, 11, 11, 11, 11,
12082 11, 11, 11, 11, 11, 11, 11, 11,
12083 11, 11, 11, 11, 11, 11, 11, 11,
12084 11, 11, 11, 11, 11, 11, 11, 11,
12085 11, 11, 11, 11, 11, 11, 11, 11,
12086 11, 11, 11, 11, 11, 11, 11, 11,
12087 15, 11, 11, 11, 11, 11, 11, 11,
12088 11, 11, 11, 11, 11, 11, 11, 11,
12089 11, 11, 11, 11, 11, 11, 11, 11,
12090 11, 11, 11, 0, 1, 11, 11, 11,
12091 11, 11, 11, 11, 11, 11, 11, 11,
12092 11, 11, 11, 11, 11, 11, 11, 11,
12093 11, 11, 11, 11, 11, 11, 11, 11,
12094 11, 11, 11, 11, 11, 11, 11, 11,
12095 11, 11, 11, 11, 11, 11, 11, 11,
12096 11, 11, 11, 11, 11, 11, 11, 11,
12097 11, 11, 11, 11, 11, 11, 11, 11,
12098 11, 11, 11, 11, 11, 11, 11, 11,
12099 11, 11, 11, 11, 11, 11, 11, 11,
12100 11, 11, 11, 11, 11, 11, 11, 11,
12101 11, 11, 11, 11, 11, 11, 11, 11,
12102 11, 11, 11, 11, 11, 11, 11, 11,
12103
12104 11, 11, 11, 11, 11, 11, 11, 11,
12105 11, 11, 11, 11, 11, 11, 11, 11,
12106 11, 11, 19, 19, 19, 11, 11, 11,
12107 11, 11, 11, 11, 11, 11, 11, 11,
12108 11, 11, 11, 11, 11, 11, 11, 11,
12109 11, 11, 11, 11, 11, 11, 11, 11,
12110 11, 11, 19, 19, 19, 11, 11, 11,
12111 11, 11, 11, 11, 11, 11, 11, 11,
12112 11, 11, 11, 11, 11, 11, 11, 11,
12113 11, 11, 11, 11, 11, 11, 11, 11,
12114 11, 11, 19, 19, 11, 11, 11, 11,
12115 11, 11, 11, 11, 11, 11, 11, 11,
12116 11, 11, 11, 11, 11, 11, 11, 11,
12117 11, 11, 11, 11, 11, 11, 11, 11,
12118 11, 11, 19, 19, 11, 11, 11, 11,
12119 11, 11, 11, 11, 11, 11, 11, 11,
12120 20, 20, 20, 20, 20, 20, 20, 20,
12121 20, 20, 20, 20, 20, 20, 20, 20,
12122 20, 20, 20, 20, 20, 20, 20, 20,
12123 20, 20, 20, 20, 20, 20, 20, 20,
12124 20, 20, 20, 20, 20, 20, 20, 20,
12125 20, 20, 20, 20, 20, 20, 20, 20,
12126 20, 20, 20, 20, 19, 19, 19, 19,
12127 19, 19, 19, 19, 19, 19, 19, 19,
12128 19, 19, 19, 19, 19, 19, 19, 19,
12129 19, 19, 19, 19, 19, 19, 19, 19,
12130 19, 19, 19, 19, 4, 15, 4, 4,
12131 4, 4, 4, 8, 11, 11, 11, 11,
12132 10, 10, 10, 10, 10, 10, 10, 10,
12133 10, 10, 11, 11, 11, 11, 11, 11,
12134 11, 11, 11, 11, 11, 11, 11, 11,
12135 11, 11, 11, 11, 11, 11, 11, 11,
12136
12137 11, 11, 11, 11, 11, 11, 16, 11,
12138 11, 11, 11, 19, 19, 19, 19, 11,
12139 10, 10, 10, 10, 10, 10, 10, 10,
12140 10, 10, 11, 11, 11, 11, 11, 11,
12141 11, 11, 11, 11, 11, 11, 11, 11,
12142 11, 11, 11, 11, 11, 11, 11, 11,
12143 11, 11, 11, 11, 11, 11, 11, 11,
12144 11, 11, 11, 11, 11, 11, 11, 11,
12145 11, 11, 11, 11, 11, 11, 11, 11,
12146 11, 11, 11, 11, 11, 11, 11, 11,
12147 11, 11, 11, 11, 11, 11, 11, 11,
12148 11, 11, 11, 11, 11, 11, 11, 11,
12149 11, 11, 11, 11, 11, 11, 11, 11,
12150 11, 11, 11, 11, 11, 11, 11, 11,
12151 11, 11, 11, 11, 11, 11, 11, 11,
12152 11, 11, 11, 11, 11, 11, 11, 11,
12153 11, 11, 11, 11, 11, 11, 11, 11,
12154 11, 11, 11, 11, 11, 11, 11, 11,
12155 11, 11, 11, 11, 11, 11, 11, 11,
12156 11, 11, 11, 11, 11, 11, 11, 11,
12157 11, 11, 11, 11, 11, 11, 11, 11,
12158 11, 19, 11, 11, 11, 11, 11, 11,
12159 11, 11, 11, 11, 11, 11, 11, 11,
12160 11, 11, 11, 11, 11, 11, 11, 11,
12161 11, 11, 11, 11, 11, 11, 11, 11,
12162 11, 11, 11, 11, 11, 11, 11, 11,
12163 11, 11, 11, 11, 11, 11, 11, 11,
12164 11, 11, 11, 11, 11, 11, 11, 11,
12165 11, 11, 11, 11, 11, 11, 11, 11,
12166 11, 11, 11, 11, 11, 11, 11, 11,
12167 11, 11, 11, 11, 11, 11, 11, 11,
12168 11, 11, 11, 11, 11, 11, 11, 11,
12169
12170 15, 15, 15, 15, 15, 15, 15, 3,
12171 15, 15, 15, 18, 19, 19, 19, 19,
12172 15, 3, 15, 15, 17, 11, 11, 11,
12173 2, 2, 0, 2, 2, 2, 0, 2,
12174 11, 11, 11, 11, 13, 13, 13, 15,
12175 21, 21, 19, 19, 19, 19, 19, 3,
12176 9, 9, 9, 9, 9, 9, 9, 9,
12177 11, 2, 2, 11, 4, 11, 11, 11,
12178 11, 11, 11, 11, 4, 0, 1, 11,
12179 11, 11, 11, 11, 11, 11, 11, 11,
12180 11, 11, 11, 11, 11, 11, 11, 11,
12181 11, 11, 11, 11, 11, 11, 11, 15,
12182 3, 11, 11, 11, 11, 11, 11, 11,
12183 11, 11, 19, 19, 19, 19, 19, 19,
12184 11, 11, 11, 11, 11, 11, 11, 11,
12185 11, 11, 11, 11, 11, 0, 1, 11,
12186 11, 11, 11, 11, 11, 11, 11, 11,
12187 11, 11, 11, 11, 11, 0, 1, 11,
12188 11, 11, 11, 11, 11, 11, 11, 11,
12189 11, 11, 11, 11, 11, 11, 11, 11,
12190 8, 8, 8, 8, 8, 8, 8, 9,
12191 8, 8, 8, 8, 8, 8, 8, 8,
12192 8, 8, 11, 11, 11, 11, 11, 11,
12193 11, 11, 11, 11, 11, 11, 11, 11,
12194 11, 11, 11, 11, 11, 11, 11, 11,
12195 11, 11, 11, 11, 11, 11, 11, 11,
12196 19, 19, 19, 19, 19, 19, 19, 19,
12197 19, 19, 19, 19, 19, 19, 19, 19,
12198 19, 19, 19, 19, 19, 19, 19, 19,
12199 19, 19, 19, 11, 11, 11, 11, 11,
12200 11, 11, 11, 11, 11, 11, 11, 11,
12201 11, 11, 11, 11, 11, 11, 11, 11,
12202
12203 11, 11, 11, 9, 11, 11, 11, 11,
12204 11, 9, 11, 11, 11, 11, 11, 11,
12205 11, 11, 11, 11, 11, 11, 8, 11,
12206 11, 11, 11, 11, 11, 11, 11, 11,
12207 11, 11, 11, 11, 11, 11, 9, 11,
12208 11, 11, 11, 11, 11, 11, 11, 11,
12209 11, 11, 11, 11, 11, 11, 11, 11,
12210 11, 11, 11, 11, 11, 11, 11, 11,
12211 11, 11, 11, 11, 11, 11, 11, 11,
12212 11, 11, 11, 11, 11, 11, 11, 11,
12213 11, 11, 11, 11, 11, 11, 11, 11,
12214 11, 11, 11, 11, 11, 11, 11, 11,
12215 11, 11, 11, 11, 11, 11, 11, 11,
12216 11, 11, 11, 11, 11, 11, 11, 11,
12217 11, 11, 11, 11, 11, 11, 11, 11,
12218 11, 11, 11, 11, 11, 11, 11, 11,
12219 11, 11, 11, 11, 11, 11, 11, 11,
12220 11, 11, 11, 11, 11, 11, 11, 11,
12221 11, 11, 11, 11, 11, 11, 11, 11,
12222 11, 11, 11, 11, 11, 11, 11, 11,
12223 11, 11, 11, 11, 11, 11, 11, 11,
12224 11, 11, 11, 11, 11, 11, 11, 11,
12225 11, 11, 11, 11, 11, 11, 11, 11,
12226 11, 11, 11, 11, 11, 11, 11, 11,
12227 11, 11, 11, 11, 11, 11, 11, 11,
12228 11, 11, 11, 11, 11, 11, 11, 11,
12229 11, 11, 11, 11, 11, 11, 11, 11,
12230 11, 11, 11, 11, 11, 11, 11, 11,
12231 11, 11, 11, 11, 11, 11, 11, 11,
12232 11, 11, 11, 11, 11, 11, 11, 11,
12233 11, 11, 11, 11, 11, 11, 11, 11,
12234 11, 11, 11, 11, 11, 11, 11, 11,
12235
12236 11, 11, 11, 11, 11, 11, 11, 11,
12237 11, 11, 11, 11, 11, 11, 11, 11,
12238 11, 11, 8, 8, 11, 11, 11, 11,
12239 11, 11, 11, 11, 11, 11, 11, 11,
12240 11, 11, 11, 11, 11, 11, 11, 11,
12241 11, 11, 11, 11, 11, 11, 11, 11,
12242 11, 11, 11, 11, 11, 11, 11, 11,
12243 11, 11, 11, 11, 11, 11, 11, 11,
12244 11, 11, 11, 11, 11, 11, 11, 11,
12245 11, 11, 11, 11, 11, 11, 11, 11,
12246 11, 11, 11, 11, 11, 11, 11, 11,
12247 11, 11, 11, 11, 11, 11, 11, 11,
12248 11, 11, 11, 11, 11, 11, 11, 11,
12249 11, 11, 11, 11, 11, 11, 11, 11,
12250 11, 11, 11, 11, 11, 11, 11, 11,
12251 11, 11, 11, 11, 11, 11, 11, 11,
12252 11, 11, 11, 11, 11, 11, 11, 11,
12253 11, 11, 11, 11, 11, 11, 11, 11,
12254 11, 11, 11, 11, 11, 11, 11, 11,
12255 11, 11, 11, 11, 11, 11, 11, 11,
12256 11, 11, 11, 11, 11, 11, 11, 11,
12257 11, 11, 11, 11, 11, 11, 11, 11,
12258 11, 11, 11, 11, 11, 11, 11, 11,
12259 11, 11, 11, 11, 11, 11, 11, 11,
12260 11, 11, 11, 11, 11, 11, 11, 11,
12261 11, 11, 11, 11, 11, 11, 11, 11,
12262 11, 11, 11, 11, 11, 11, 11, 11,
12263 11, 11, 11, 11, 11, 11, 11, 11,
12264 11, 11, 11, 11, 11, 11, 11, 11,
12265 11, 11, 11, 11, 11, 11, 11, 11,
12266 11, 11, 11, 11, 11, 11, 11, 11,
12267 11, 11, 11, 11, 11, 11, 11, 11,
12268
12269 11, 11, 11, 11, 11, 11, 11, 11,
12270 11, 11, 11, 11, 11, 11, 11, 11,
12271 11, 11, 11, 11, 11, 11, 11, 11,
12272 11, 11, 11, 11, 11, 11, 11, 11,
12273 11, 11, 11, 11, 11, 11, 11, 11,
12274 11, 0, 1, 11, 11, 11, 11, 11,
12275 11, 11, 11, 11, 11, 11, 11, 11,
12276 11, 11, 11, 11, 11, 11, 11, 11,
12277 11, 11, 11, 11, 11, 11, 11, 11,
12278 11, 11, 11, 11, 11, 11, 11, 11,
12279 11, 11, 11, 11, 11, 11, 11, 11,
12280 11, 11, 11, 11, 11, 11, 11, 11,
12281 11, 11, 11, 11, 11, 11, 11, 11,
12282 11, 11, 11, 11, 11, 11, 11, 11,
12283 11, 11, 11, 11, 11, 11, 11, 11,
12284 11, 11, 11, 11, 11, 11, 11, 11,
12285 11, 11, 11, 11, 11, 11, 11, 11,
12286 11, 11, 11, 11, 11, 11, 11, 11,
12287 11, 11, 11, 11, 11, 11, 11, 11,
12288 11, 11, 11, 11, 11, 11, 11, 11,
12289 11, 11, 11, 11, 11, 11, 11, 11,
12290 11, 11, 11, 11, 11, 11, 11, 11,
12291 11, 11, 11, 11, 0, 1, 2, 11,
12292 11, 11, 11, 11, 11, 11, 11, 11,
12293 11, 11, 11, 11, 11, 11, 11, 11,
12294 11, 11, 11, 11, 11, 11, 11, 11,
12295 11, 11, 11, 11, 11, 11, 11, 11,
12296 11, 11, 11, 11, 11, 11, 11, 11,
12297 11, 11, 11, 11, 11, 11, 11, 11,
12298 11, 11, 11, 11, 11, 11, 11, 11,
12299 11, 11, 11, 11, 11, 11, 11, 11,
12300 11, 11, 11, 11, 11, 11, 11, 11,
12301
12302 11, 11, 11, 11, 11, 11, 11, 11,
12303 11, 11, 11, 11, 11, 11, 11, 11,
12304 11, 11, 11, 11, 11, 11, 11, 11,
12305 11, 11, 11, 11, 11, 11, 11, 11,
12306 11, 11, 11, 11, 11, 11, 11, 11,
12307 11, 11, 11, 11, 11, 11, 11, 11,
12308 11, 11, 11, 11, 11, 11, 11, 11,
12309 11, 11, 11, 11, 11, 11, 11, 11,
12310 11, 11, 11, 11, 11, 11, 11, 11,
12311 11, 11, 11, 11, 11, 11, 11, 11,
12312 11, 11, 11, 11, 11, 11, 11, 11,
12313 11, 11, 11, 2, 2, 2, 2, 11,
12314 11, 11, 5, 5, 11, 11, 11, 11,
12315 0, 1, 0, 1, 0, 1, 0, 1,
12316 0, 1, 0, 1, 0, 1, 11, 11,
12317 11, 11, 11, 11, 11, 11, 11, 11,
12318 11, 11, 11, 11, 11, 11, 11, 11,
12319 11, 11, 11, 11, 11, 11, 11, 11,
12320 11, 11, 11, 11, 11, 11, 11, 11,
12321 11, 11, 11, 11, 11, 11, 11, 11,
12322 11, 11, 11, 11, 11, 11, 11, 11,
12323 11, 11, 11, 11, 11, 11, 11, 11,
12324 11, 11, 11, 11, 11, 11, 11, 11,
12325 11, 11, 11, 11, 11, 11, 11, 11,
12326 11, 11, 11, 11, 11, 11, 11, 11,
12327 11, 11, 11, 11, 11, 11, 11, 11,
12328 11, 11, 11, 11, 11, 11, 11, 11,
12329 11, 11, 11, 11, 11, 11, 11, 11,
12330 11, 11, 11, 11, 11, 11, 0, 1,
12331 0, 1, 0, 1, 11, 11, 11, 11,
12332 11, 11, 11, 11, 11, 11, 11, 11,
12333 11, 11, 11, 11, 11, 11, 11, 11,
12334
12335 11, 11, 11, 11, 11, 11, 11, 11,
12336 11, 11, 11, 11, 11, 11, 11, 11,
12337 11, 11, 11, 11, 11, 11, 11, 11,
12338 11, 11, 11, 11, 11, 11, 11, 11,
12339 11, 11, 11, 11, 11, 11, 11, 11,
12340 11, 11, 11, 11, 11, 11, 11, 11,
12341 11, 11, 11, 11, 11, 11, 11, 11,
12342 11, 11, 11, 11, 11, 11, 11, 11,
12343 11, 11, 11, 11, 11, 11, 11, 11,
12344 11, 11, 11, 11, 11, 11, 11, 11,
12345 11, 11, 11, 11, 11, 11, 11, 11,
12346 11, 11, 11, 11, 11, 11, 11, 11,
12347 11, 11, 11, 11, 11, 11, 11, 11,
12348 11, 11, 11, 11, 11, 11, 11, 11,
12349 11, 11, 11, 11, 11, 11, 11, 11,
12350 11, 11, 11, 11, 11, 11, 11, 11,
12351 11, 11, 11, 0, 1, 0, 1, 0,
12352 1, 0, 1, 0, 1, 0, 1, 0,
12353 1, 0, 1, 0, 1, 0, 1, 0,
12354 1, 11, 11, 11, 11, 11, 11, 11,
12355 11, 11, 11, 11, 11, 11, 11, 11,
12356 11, 11, 11, 11, 11, 11, 11, 11,
12357 11, 11, 11, 11, 11, 11, 11, 11,
12358 11, 11, 11, 11, 11, 11, 11, 11,
12359 11, 11, 11, 11, 11, 11, 11, 11,
12360 11, 11, 11, 11, 11, 11, 11, 11,
12361 11, 11, 11, 11, 11, 11, 11, 11,
12362 0, 1, 0, 1, 11, 11, 11, 11,
12363 11, 11, 11, 11, 11, 11, 11, 11,
12364 11, 11, 11, 11, 11, 11, 11, 11,
12365 11, 11, 11, 11, 11, 11, 11, 11,
12366 11, 11, 11, 11, 0, 1, 11, 11,
12367
12368 11, 11, 11, 11, 11, 11, 11, 11,
12369 11, 11, 11, 11, 11, 11, 11, 11,
12370 11, 11, 11, 11, 11, 11, 11, 11,
12371 11, 11, 11, 11, 11, 11, 11, 11,
12372 11, 11, 11, 11, 11, 11, 11, 11,
12373 11, 11, 11, 11, 11, 11, 11, 11,
12374 11, 11, 11, 11, 11, 11, 11, 11,
12375 11, 11, 11, 11, 11, 11, 11, 11,
12376 11, 11, 11, 11, 11, 11, 11, 11,
12377 11, 11, 11, 11, 11, 11, 11, 11,
12378 11, 11, 11, 11, 11, 11, 11, 11,
12379 11, 11, 11, 11, 11, 11, 11, 11,
12380 11, 11, 11, 11, 11, 11, 11, 11,
12381 11, 11, 11, 11, 11, 11, 11, 11,
12382 11, 11, 11, 11, 11, 11, 11, 11,
12383 11, 11, 11, 11, 11, 11, 11, 11,
12384 12, 12, 12, 12, 12, 12, 12, 12,
12385 12, 12, 12, 12, 12, 12, 12, 12,
12386 12, 12, 12, 12, 12, 12, 12, 12,
12387 12, 12, 11, 12, 12, 12, 12, 12,
12388 12, 12, 12, 12, 12, 12, 12, 12,
12389 12, 12, 12, 12, 12, 12, 12, 12,
12390 12, 12, 12, 12, 12, 12, 12, 12,
12391 12, 12, 12, 12, 12, 12, 12, 12,
12392 12, 12, 12, 12, 12, 12, 12, 12,
12393 12, 12, 12, 12, 12, 12, 12, 12,
12394 12, 12, 12, 12, 12, 12, 12, 12,
12395 12, 12, 12, 12, 12, 12, 12, 12,
12396 12, 12, 12, 12, 12, 12, 12, 12,
12397 12, 12, 12, 12, 12, 12, 12, 12,
12398 12, 12, 12, 12, 11, 11, 11, 11,
12399 11, 11, 11, 11, 11, 11, 11, 11,
12400
12401 12, 12, 12, 12, 12, 12, 12, 12,
12402 12, 12, 12, 12, 12, 12, 12, 12,
12403 12, 12, 12, 12, 12, 12, 12, 12,
12404 12, 12, 12, 12, 12, 12, 12, 12,
12405 12, 12, 12, 12, 12, 12, 12, 12,
12406 12, 12, 12, 12, 12, 12, 12, 12,
12407 12, 12, 12, 12, 12, 12, 12, 12,
12408 12, 12, 12, 12, 12, 12, 12, 12,
12409 12, 12, 12, 12, 12, 12, 12, 12,
12410 12, 12, 12, 12, 12, 12, 12, 12,
12411 12, 12, 12, 12, 12, 12, 12, 12,
12412 12, 12, 12, 12, 12, 12, 12, 12,
12413 12, 12, 12, 12, 12, 12, 12, 12,
12414 12, 12, 12, 12, 12, 12, 12, 12,
12415 12, 12, 12, 12, 12, 12, 12, 12,
12416 12, 12, 12, 12, 12, 12, 12, 12,
12417 12, 12, 12, 12, 12, 12, 12, 12,
12418 12, 12, 12, 12, 12, 12, 12, 12,
12419 12, 12, 12, 12, 12, 12, 12, 12,
12420 12, 12, 12, 12, 12, 12, 12, 12,
12421 12, 12, 12, 12, 12, 12, 12, 12,
12422 12, 12, 12, 12, 12, 12, 12, 12,
12423 12, 12, 12, 12, 12, 12, 12, 12,
12424 12, 12, 12, 12, 12, 12, 12, 12,
12425 12, 12, 12, 12, 12, 12, 12, 12,
12426 12, 12, 12, 12, 12, 12, 12, 12,
12427 12, 12, 12, 12, 12, 12, 11, 11,
12428 11, 11, 11, 11, 11, 11, 11, 11,
12429 11, 11, 11, 11, 11, 11, 11, 11,
12430 11, 11, 11, 11, 11, 11, 11, 11,
12431 12, 12, 12, 12, 12, 12, 12, 12,
12432 12, 12, 12, 12, 11, 11, 11, 11,
12433
12434 12, 1, 1, 12, 12, 4, 12, 12,
12435 0, 1, 0, 1, 0, 1, 0, 1,
12436 0, 1, 12, 12, 0, 1, 0, 1,
12437 0, 1, 0, 1, 4, 0, 1, 1,
12438 12, 12, 12, 12, 12, 12, 12, 12,
12439 12, 12, 19, 19, 19, 19, 19, 19,
12440 12, 12, 12, 12, 12, 12, 12, 12,
12441 12, 12, 12, 4, 4, 12, 12, 12,
12442 11, 4, 12, 4, 12, 4, 12, 4,
12443 12, 4, 12, 12, 12, 12, 12, 12,
12444 12, 12, 12, 12, 12, 12, 12, 12,
12445 12, 12, 12, 12, 12, 12, 12, 12,
12446 12, 12, 12, 4, 12, 12, 12, 12,
12447 12, 12, 12, 12, 12, 12, 12, 12,
12448 12, 12, 12, 12, 12, 12, 12, 12,
12449 12, 12, 12, 12, 12, 12, 12, 12,
12450 12, 12, 12, 4, 12, 4, 12, 4,
12451 12, 12, 12, 12, 12, 12, 4, 12,
12452 12, 12, 12, 12, 12, 4, 4, 11,
12453 11, 19, 19, 4, 4, 4, 4, 12,
12454 4, 4, 12, 4, 12, 4, 12, 4,
12455 12, 4, 12, 12, 12, 12, 12, 12,
12456 12, 12, 12, 12, 12, 12, 12, 12,
12457 12, 12, 12, 12, 12, 12, 12, 12,
12458 12, 12, 12, 4, 12, 12, 12, 12,
12459 12, 12, 12, 12, 12, 12, 12, 12,
12460 12, 12, 12, 12, 12, 12, 12, 12,
12461 12, 12, 12, 12, 12, 12, 12, 12,
12462 12, 12, 12, 4, 12, 4, 12, 4,
12463 12, 12, 12, 12, 12, 12, 4, 12,
12464 12, 12, 12, 12, 12, 4, 4, 12,
12465 12, 12, 12, 4, 12, 4, 12, 12,
12466
12467 11, 11, 11, 11, 11, 12, 12, 12,
12468 12, 12, 12, 12, 12, 12, 12, 12,
12469 12, 12, 12, 12, 12, 12, 12, 12,
12470 12, 12, 12, 12, 12, 12, 12, 12,
12471 12, 12, 12, 12, 12, 12, 12, 12,
12472 12, 12, 12, 12, 12, 11, 11, 11,
12473 11, 12, 12, 12, 12, 12, 12, 12,
12474 12, 12, 12, 12, 12, 12, 12, 12,
12475 12, 12, 12, 12, 12, 12, 12, 12,
12476 12, 12, 12, 12, 12, 12, 12, 12,
12477 12, 12, 12, 12, 12, 12, 12, 12,
12478 12, 12, 12, 12, 12, 12, 12, 12,
12479 12, 12, 12, 12, 12, 12, 12, 12,
12480 12, 12, 12, 12, 12, 12, 12, 12,
12481 12, 12, 12, 12, 12, 12, 12, 12,
12482 12, 12, 12, 12, 12, 12, 12, 12,
12483 12, 12, 12, 12, 12, 12, 12, 12,
12484 12, 12, 12, 12, 12, 12, 12, 11,
12485 12, 12, 12, 12, 12, 12, 12, 12,
12486 12, 12, 12, 12, 12, 12, 12, 12,
12487 12, 12, 12, 12, 12, 12, 12, 12,
12488 12, 12, 12, 12, 12, 12, 12, 12,
12489 12, 12, 12, 12, 12, 12, 12, 12,
12490 11, 11, 11, 11, 11, 11, 11, 11,
12491 11, 11, 11, 11, 11, 11, 11, 11,
12492 11, 11, 11, 11, 11, 11, 11, 11,
12493 11, 11, 11, 11, 11, 11, 11, 11,
12494 11, 11, 11, 11, 11, 11, 11, 11,
12495 11, 11, 11, 11, 11, 11, 11, 11,
12496 11, 11, 11, 11, 11, 11, 11, 11,
12497 4, 4, 4, 4, 4, 4, 4, 4,
12498 4, 4, 4, 4, 4, 4, 4, 4,
12499
12500 12, 12, 12, 12, 12, 12, 12, 12,
12501 12, 12, 12, 12, 12, 12, 12, 12,
12502 12, 12, 12, 12, 12, 12, 12, 12,
12503 12, 12, 12, 12, 12, 11, 11, 11,
12504 12, 12, 12, 12, 12, 12, 12, 12,
12505 12, 12, 12, 12, 12, 12, 12, 12,
12506 12, 12, 12, 12, 12, 12, 12, 12,
12507 12, 12, 12, 12, 12, 12, 12, 12,
12508 12, 12, 12, 12, 11, 11, 11, 11,
12509 11, 11, 11, 11, 11, 11, 11, 11,
12510 11, 12, 12, 12, 12, 12, 12, 12,
12511 12, 12, 12, 12, 12, 12, 12, 12,
12512 12, 12, 12, 12, 12, 12, 12, 12,
12513 12, 12, 12, 12, 12, 12, 12, 12,
12514 12, 12, 12, 12, 12, 12, 12, 12,
12515 12, 12, 12, 12, 11, 11, 11, 12,
12516 12, 12, 12, 12, 12, 12, 12, 12,
12517 12, 12, 12, 12, 12, 12, 12, 12,
12518 12, 12, 12, 12, 12, 12, 12, 12,
12519 12, 12, 12, 12, 12, 12, 12, 12,
12520 12, 12, 12, 12, 12, 12, 12, 12,
12521 12, 12, 12, 12, 12, 12, 12, 12,
12522 12, 12, 12, 12, 12, 12, 12, 12,
12523 12, 12, 12, 12, 12, 12, 12, 12,
12524 12, 12, 12, 12, 12, 12, 12, 12,
12525 12, 12, 12, 12, 11, 11, 11, 11,
12526 12, 12, 12, 12, 12, 12, 12, 12,
12527 12, 12, 12, 12, 12, 12, 12, 12,
12528 12, 12, 12, 12, 12, 12, 12, 12,
12529 12, 12, 12, 12, 12, 12, 12, 12,
12530 12, 12, 12, 12, 12, 12, 12, 12,
12531 12, 12, 12, 12, 12, 12, 12, 11,
12532
12533 12, 12, 12, 12, 12, 12, 12, 12,
12534 12, 12, 12, 12, 12, 12, 12, 12,
12535 12, 12, 12, 12, 12, 12, 12, 12,
12536 12, 12, 12, 12, 12, 12, 12, 12,
12537 12, 12, 12, 12, 12, 12, 12, 12,
12538 12, 12, 12, 12, 12, 12, 12, 12,
12539 12, 12, 12, 12, 12, 12, 12, 12,
12540 12, 12, 12, 12, 12, 12, 12, 12,
12541 12, 12, 12, 12, 12, 12, 12, 12,
12542 12, 12, 12, 12, 12, 12, 12, 12,
12543 12, 12, 12, 12, 12, 12, 12, 12,
12544 12, 12, 12, 12, 12, 12, 12, 12,
12545 12, 12, 12, 12, 12, 12, 12, 12,
12546 12, 12, 12, 12, 12, 12, 12, 12,
12547 12, 12, 12, 12, 12, 12, 12, 11,
12548 11, 11, 11, 12, 12, 12, 12, 12,
12549 12, 12, 12, 12, 12, 12, 12, 12,
12550 12, 12, 12, 12, 12, 12, 12, 12,
12551 12, 12, 12, 12, 12, 12, 12, 12,
12552 12, 12, 12, 12, 12, 12, 12, 12,
12553 12, 12, 12, 12, 12, 12, 12, 12,
12554 12, 12, 12, 12, 12, 12, 12, 12,
12555 12, 12, 12, 12, 12, 12, 12, 12,
12556 12, 12, 12, 12, 12, 12, 12, 12,
12557 12, 12, 12, 12, 12, 12, 12, 12,
12558 12, 12, 12, 12, 12, 12, 12, 12,
12559 12, 12, 12, 12, 12, 12, 12, 12,
12560 12, 12, 12, 12, 12, 12, 11, 11,
12561 12, 12, 12, 12, 12, 12, 12, 12,
12562 12, 12, 12, 12, 12, 12, 12, 12,
12563 12, 12, 12, 12, 12, 12, 12, 12,
12564 12, 12, 12, 12, 12, 12, 12, 11,
12565
12566 12, 12, 12, 12, 12, 12, 12, 12,
12567 12, 12, 12, 12, 12, 12, 12, 12,
12568 12, 12, 12, 12, 12, 12, 12, 12,
12569 12, 12, 12, 12, 12, 12, 12, 12,
12570 12, 12, 12, 12, 12, 12, 12, 12,
12571 12, 12, 12, 12, 12, 12, 12, 12,
12572 12, 12, 12, 12, 12, 12, 12, 12,
12573 12, 12, 12, 12, 12, 12, 12, 12,
12574 12, 12, 12, 12, 12, 12, 12, 12,
12575 12, 12, 12, 12, 12, 12, 12, 12,
12576 12, 12, 12, 12, 12, 12, 12, 12,
12577 12, 12, 12, 12, 12, 12, 12, 12,
12578 12, 12, 12, 12, 12, 12, 12, 12,
12579 12, 12, 12, 12, 12, 12, 12, 12,
12580 12, 12, 12, 12, 12, 12, 12, 12,
12581 12, 12, 12, 12, 12, 12, 12, 12,
12582 12, 12, 12, 12, 12, 12, 12, 12,
12583 12, 12, 12, 12, 12, 12, 12, 12,
12584 12, 12, 12, 12, 12, 12, 12, 12,
12585 12, 12, 12, 12, 12, 12, 12, 12,
12586 12, 12, 12, 12, 12, 12, 12, 12,
12587 12, 12, 12, 12, 12, 12, 12, 12,
12588 12, 12, 12, 12, 12, 12, 12, 12,
12589 12, 12, 12, 12, 12, 12, 12, 12,
12590 12, 12, 12, 12, 12, 12, 12, 12,
12591 12, 12, 12, 12, 12, 12, 12, 12,
12592 12, 12, 12, 12, 12, 12, 12, 12,
12593 12, 12, 12, 12, 12, 12, 12, 12,
12594 12, 12, 12, 12, 12, 12, 12, 12,
12595 12, 12, 12, 12, 12, 12, 12, 12,
12596 12, 12, 12, 12, 12, 12, 12, 12,
12597 12, 12, 12, 12, 12, 12, 12, 12,
12598
12599 12, 12, 12, 12, 12, 12, 12, 12,
12600 12, 12, 12, 12, 12, 12, 12, 12,
12601 12, 12, 12, 12, 12, 12, 12, 12,
12602 12, 12, 12, 12, 12, 12, 12, 12,
12603 12, 12, 12, 12, 12, 12, 12, 12,
12604 12, 12, 12, 12, 12, 12, 12, 12,
12605 12, 12, 12, 12, 12, 12, 12, 12,
12606 12, 12, 12, 12, 12, 12, 12, 12,
12607 12, 12, 12, 12, 12, 12, 12, 12,
12608 12, 12, 12, 12, 12, 12, 12, 12,
12609 12, 12, 12, 12, 12, 12, 12, 12,
12610 12, 12, 12, 12, 12, 12, 12, 12,
12611 12, 12, 12, 12, 12, 12, 12, 12,
12612 12, 12, 12, 12, 12, 12, 12, 12,
12613 12, 12, 12, 12, 12, 12, 12, 12,
12614 12, 12, 12, 12, 12, 12, 12, 12,
12615 12, 12, 12, 12, 12, 12, 12, 12,
12616 12, 12, 12, 12, 12, 12, 12, 12,
12617 12, 12, 12, 12, 12, 12, 12, 12,
12618 12, 12, 12, 12, 12, 12, 12, 12,
12619 12, 12, 12, 12, 12, 12, 12, 12,
12620 12, 12, 12, 12, 12, 12, 12, 12,
12621 12, 12, 12, 12, 12, 12, 11, 11,
12622 11, 11, 11, 11, 11, 11, 11, 11,
12623 11, 11, 11, 11, 11, 11, 11, 11,
12624 11, 11, 11, 11, 11, 11, 11, 11,
12625 11, 11, 11, 11, 11, 11, 11, 11,
12626 11, 11, 11, 11, 11, 11, 11, 11,
12627 11, 11, 11, 11, 11, 11, 11, 11,
12628 11, 11, 11, 11, 11, 11, 11, 11,
12629 11, 11, 11, 11, 11, 11, 11, 11,
12630 11, 11, 11, 11, 11, 11, 11, 11,
12631
12632 12, 12, 12, 12, 12, 12, 12, 12,
12633 12, 12, 12, 12, 12, 12, 12, 12,
12634 12, 12, 12, 12, 12, 12, 12, 12,
12635 12, 12, 12, 12, 12, 12, 12, 12,
12636 12, 12, 12, 12, 12, 12, 12, 12,
12637 12, 12, 12, 12, 12, 12, 12, 12,
12638 12, 12, 12, 12, 12, 12, 12, 12,
12639 12, 12, 12, 12, 12, 12, 12, 12,
12640 12, 12, 12, 12, 12, 12, 12, 12,
12641 12, 12, 12, 12, 12, 12, 12, 12,
12642 12, 12, 12, 12, 12, 12, 12, 12,
12643 12, 12, 12, 12, 12, 12, 12, 12,
12644 12, 12, 12, 12, 12, 12, 12, 12,
12645 12, 12, 12, 12, 12, 12, 12, 12,
12646 12, 12, 12, 12, 12, 12, 12, 12,
12647 12, 12, 12, 12, 12, 12, 12, 12,
12648 12, 12, 12, 12, 12, 12, 12, 12,
12649 12, 12, 12, 12, 12, 12, 12, 12,
12650 12, 12, 12, 12, 12, 12, 12, 12,
12651 12, 12, 12, 12, 12, 12, 12, 12,
12652 12, 12, 12, 12, 12, 12, 11, 11,
12653 11, 11, 11, 11, 11, 11, 11, 11,
12654 11, 11, 11, 11, 11, 11, 11, 11,
12655 11, 11, 11, 11, 11, 11, 11, 11,
12656 11, 11, 11, 11, 11, 11, 11, 11,
12657 11, 11, 11, 11, 11, 11, 11, 11,
12658 11, 11, 11, 11, 11, 11, 11, 11,
12659 11, 11, 11, 11, 11, 11, 11, 11,
12660 11, 11, 11, 11, 11, 11, 11, 11,
12661 11, 11, 11, 11, 11, 11, 11, 11,
12662 11, 11, 11, 11, 11, 11, 11, 11,
12663 11, 11, 11, 11, 11, 11, 11, 11,
12664
12665 12, 12, 12, 12, 12, 12, 12, 12,
12666 12, 12, 12, 12, 12, 12, 12, 12,
12667 12, 12, 12, 12, 12, 12, 12, 12,
12668 12, 12, 12, 12, 12, 12, 12, 12,
12669 12, 12, 12, 12, 12, 12, 12, 12,
12670 12, 12, 12, 12, 12, 12, 12, 12,
12671 12, 12, 12, 12, 12, 12, 12, 12,
12672 12, 12, 12, 12, 12, 12, 12, 12,
12673 12, 12, 12, 12, 12, 12, 12, 12,
12674 12, 12, 12, 12, 12, 12, 12, 12,
12675 12, 12, 12, 12, 12, 12, 12, 12,
12676 12, 12, 12, 12, 12, 12, 12, 12,
12677 12, 12, 12, 12, 12, 12, 12, 12,
12678 12, 12, 12, 12, 12, 12, 12, 12,
12679 12, 12, 12, 12, 12, 12, 12, 12,
12680 12, 12, 12, 12, 12, 12, 12, 12,
12681 12, 12, 12, 12, 12, 12, 12, 12,
12682 12, 12, 12, 12, 12, 11, 11, 11,
12683 12, 12, 12, 12, 12, 12, 12, 12,
12684 12, 12, 12, 12, 12, 12, 12, 12,
12685 12, 12, 12, 12, 12, 12, 12, 12,
12686 12, 12, 12, 12, 12, 12, 12, 12,
12687 12, 12, 12, 12, 12, 12, 12, 12,
12688 12, 12, 12, 12, 12, 12, 12, 12,
12689 12, 12, 12, 12, 12, 12, 12, 11,
12690 11, 11, 11, 11, 11, 11, 11, 11,
12691 11, 11, 11, 11, 11, 11, 11, 11,
12692 11, 11, 11, 11, 11, 11, 11, 11,
12693 11, 11, 11, 11, 11, 11, 11, 11,
12694 11, 11, 11, 11, 11, 11, 11, 11,
12695 11, 11, 11, 11, 11, 11, 11, 11,
12696 11, 11, 11, 11, 11, 11, 11, 11,
12697
12698 12, 12, 12, 12, 12, 12, 12, 12,
12699 12, 12, 12, 12, 12, 12, 12, 12,
12700 12, 12, 12, 12, 12, 12, 12, 12,
12701 12, 12, 12, 12, 12, 12, 12, 12,
12702 12, 12, 12, 12, 12, 12, 12, 12,
12703 12, 12, 12, 12, 12, 12, 12, 12,
12704 12, 12, 12, 12, 12, 12, 12, 12,
12705 12, 12, 12, 12, 12, 12, 12, 12,
12706 12, 12, 12, 12, 12, 12, 12, 12,
12707 12, 12, 12, 12, 12, 12, 12, 12,
12708 12, 12, 12, 12, 12, 12, 12, 12,
12709 12, 12, 12, 12, 12, 12, 12, 12,
12710 12, 12, 12, 12, 12, 12, 12, 12,
12711 12, 12, 12, 12, 12, 12, 12, 12,
12712 12, 12, 12, 12, 12, 12, 12, 12,
12713 12, 12, 12, 12, 12, 12, 12, 12,
12714 12, 12, 12, 12, 12, 12, 12, 12,
12715 12, 12, 12, 12, 12, 12, 12, 12,
12716 12, 12, 12, 12, 12, 12, 12, 12,
12717 12, 12, 12, 12, 12, 12, 12, 12,
12718 12, 12, 12, 12, 11, 11, 11, 11,
12719 11, 11, 11, 11, 11, 11, 11, 11,
12720 11, 11, 11, 11, 11, 11, 11, 11,
12721 11, 11, 11, 11, 11, 11, 11, 11,
12722 11, 11, 11, 11, 11, 11, 11, 11,
12723 11, 11, 11, 11, 11, 11, 11, 11,
12724 11, 11, 11, 11, 11, 11, 11, 11,
12725 11, 11, 11, 11, 11, 11, 11, 11,
12726 11, 11, 11, 11, 11, 11, 11, 11,
12727 11, 11, 11, 11, 11, 11, 11, 11,
12728 11, 11, 11, 11, 11, 11, 11, 11,
12729 11, 11, 11, 11, 11, 11, 11, 11,
12730
12731 24, 24, 24, 24, 24, 24, 24, 24,
12732 24, 24, 24, 24, 24, 24, 24, 24,
12733 24, 24, 24, 24, 24, 24, 24, 24,
12734 24, 24, 24, 24, 24, 24, 24, 24,
12735 24, 24, 24, 24, 24, 24, 24, 24,
12736 24, 24, 24, 24, 24, 24, 24, 24,
12737 24, 24, 24, 24, 24, 24, 24, 24,
12738 24, 24, 24, 24, 24, 24, 24, 24,
12739 24, 24, 24, 24, 24, 24, 24, 24,
12740 24, 24, 24, 24, 24, 24, 24, 24,
12741 24, 24, 24, 24, 24, 24, 24, 24,
12742 24, 24, 24, 24, 24, 24, 24, 24,
12743 24, 24, 24, 24, 24, 24, 24, 24,
12744 24, 24, 24, 24, 24, 24, 24, 24,
12745 24, 24, 24, 24, 24, 24, 24, 24,
12746 24, 24, 24, 24, 24, 24, 24, 24,
12747 24, 24, 24, 24, 24, 24, 24, 24,
12748 24, 24, 24, 24, 24, 24, 24, 24,
12749 24, 24, 24, 24, 24, 24, 24, 24,
12750 24, 24, 24, 24, 24, 24, 24, 24,
12751 24, 24, 24, 24, 24, 24, 24, 24,
12752 24, 24, 24, 24, 24, 24, 24, 24,
12753 24, 24, 24, 24, 24, 24, 24, 24,
12754 24, 24, 24, 24, 24, 24, 24, 24,
12755 24, 24, 24, 24, 24, 24, 24, 24,
12756 24, 24, 24, 24, 24, 24, 24, 24,
12757 24, 24, 24, 24, 24, 24, 24, 24,
12758 24, 24, 24, 24, 24, 24, 24, 24,
12759 24, 24, 24, 24, 24, 24, 24, 24,
12760 24, 24, 24, 24, 24, 24, 24, 24,
12761 24, 24, 24, 24, 24, 24, 24, 24,
12762 24, 24, 24, 24, 24, 24, 24, 24,
12763
12764 12, 12, 12, 12, 12, 12, 12, 12,
12765 12, 12, 12, 12, 12, 12, 12, 12,
12766 12, 12, 12, 12, 12, 12, 12, 12,
12767 12, 12, 12, 12, 12, 12, 12, 12,
12768 12, 12, 12, 12, 12, 12, 12, 12,
12769 12, 12, 12, 12, 12, 12, 11, 11,
12770 12, 12, 12, 12, 12, 12, 12, 12,
12771 12, 12, 12, 12, 12, 12, 12, 12,
12772 12, 12, 12, 12, 12, 12, 12, 12,
12773 12, 12, 12, 12, 12, 12, 12, 12,
12774 12, 12, 12, 12, 12, 12, 12, 12,
12775 12, 12, 12, 12, 12, 12, 12, 12,
12776 12, 12, 12, 12, 12, 12, 12, 12,
12777 12, 12, 12, 11, 11, 11, 11, 11,
12778 11, 11, 11, 11, 11, 11, 11, 11,
12779 11, 11, 11, 11, 11, 11, 11, 11,
12780 11, 11, 11, 11, 11, 11, 11, 11,
12781 11, 11, 11, 11, 11, 11, 11, 11,
12782 11, 11, 11, 11, 11, 11, 11, 11,
12783 11, 11, 11, 11, 11, 11, 11, 11,
12784 11, 11, 11, 11, 11, 11, 11, 11,
12785 11, 11, 11, 11, 11, 11, 11, 11,
12786 11, 11, 11, 11, 11, 11, 11, 11,
12787 11, 11, 11, 11, 11, 11, 11, 11,
12788 11, 11, 11, 11, 11, 11, 11, 11,
12789 11, 11, 11, 11, 11, 11, 11, 11,
12790 11, 11, 11, 11, 11, 11, 11, 11,
12791 11, 11, 11, 11, 11, 11, 11, 11,
12792 11, 11, 11, 11, 11, 11, 11, 11,
12793 11, 11, 11, 11, 11, 11, 11, 11,
12794 11, 11, 11, 11, 11, 11, 11, 11,
12795 11, 11, 11, 11, 11, 11, 11, 11,
12796
12797 11, 11, 11, 11, 11, 11, 11, 11,
12798 11, 11, 11, 11, 11, 11, 11, 11,
12799 11, 11, 11, 11, 11, 11, 11, 11,
12800 11, 11, 11, 11, 11, 11, 19, 11,
12801 11, 11, 11, 11, 11, 11, 11, 11,
12802 11, 11, 11, 11, 11, 11, 11, 11,
12803 11, 11, 11, 11, 11, 11, 11, 11,
12804 11, 11, 11, 11, 11, 11, 11, 11,
12805 11, 11, 11, 11, 11, 11, 11, 11,
12806 11, 11, 11, 11, 11, 11, 11, 11,
12807 11, 11, 11, 11, 11, 11, 11, 11,
12808 11, 11, 11, 11, 11, 11, 11, 11,
12809 11, 11, 11, 11, 11, 11, 11, 11,
12810 11, 11, 11, 11, 11, 11, 11, 11,
12811 11, 11, 11, 11, 11, 11, 11, 11,
12812 11, 11, 11, 11, 11, 11, 11, 11,
12813 11, 11, 11, 11, 11, 11, 11, 11,
12814 11, 11, 11, 11, 11, 11, 11, 11,
12815 11, 11, 11, 11, 11, 11, 11, 11,
12816 11, 11, 11, 11, 11, 11, 11, 11,
12817 11, 11, 11, 11, 11, 11, 11, 11,
12818 11, 11, 11, 11, 11, 11, 11, 11,
12819 11, 11, 11, 11, 11, 11, 11, 11,
12820 11, 11, 11, 11, 11, 11, 11, 11,
12821 11, 11, 11, 11, 11, 11, 11, 11,
12822 11, 11, 11, 11, 11, 11, 11, 11,
12823 11, 11, 11, 11, 11, 11, 11, 11,
12824 11, 11, 11, 11, 11, 11, 11, 11,
12825 11, 11, 11, 11, 11, 11, 11, 11,
12826 11, 11, 11, 11, 11, 11, 11, 11,
12827 11, 11, 11, 11, 11, 11, 11, 11,
12828 11, 11, 11, 11, 11, 11, 11, 11,
12829
12830 11, 11, 11, 11, 11, 11, 11, 11,
12831 11, 11, 11, 11, 11, 11, 11, 11,
12832 11, 11, 11, 11, 11, 11, 11, 11,
12833 11, 11, 11, 11, 11, 11, 11, 11,
12834 11, 11, 11, 11, 11, 11, 11, 11,
12835 11, 11, 11, 11, 11, 11, 11, 11,
12836 11, 11, 11, 11, 11, 11, 11, 11,
12837 11, 11, 11, 11, 11, 11, 0, 1,
12838 11, 11, 11, 11, 11, 11, 11, 11,
12839 11, 11, 11, 11, 11, 11, 11, 11,
12840 11, 11, 11, 11, 11, 11, 11, 11,
12841 11, 11, 11, 11, 11, 11, 11, 11,
12842 11, 11, 11, 11, 11, 11, 11, 11,
12843 11, 11, 11, 11, 11, 11, 11, 11,
12844 11, 11, 11, 11, 11, 11, 11, 11,
12845 11, 11, 11, 11, 11, 11, 11, 11,
12846 11, 11, 11, 11, 11, 11, 11, 11,
12847 11, 11, 11, 11, 11, 11, 11, 11,
12848 11, 11, 11, 11, 11, 11, 11, 11,
12849 11, 11, 11, 11, 11, 11, 11, 11,
12850 11, 11, 11, 11, 11, 11, 11, 11,
12851 11, 11, 11, 11, 11, 11, 11, 11,
12852 11, 11, 11, 11, 11, 11, 11, 11,
12853 11, 11, 11, 11, 11, 11, 11, 11,
12854 11, 11, 11, 11, 11, 11, 11, 11,
12855 11, 11, 11, 11, 11, 11, 11, 11,
12856 11, 11, 11, 11, 11, 11, 11, 11,
12857 11, 11, 11, 11, 11, 11, 11, 11,
12858 11, 11, 11, 11, 11, 11, 11, 11,
12859 11, 11, 11, 11, 11, 11, 11, 11,
12860 11, 11, 11, 11, 11, 11, 11, 11,
12861 11, 11, 11, 11, 9, 11, 11, 11,
12862
12863 19, 19, 19, 19, 19, 19, 19, 19,
12864 19, 19, 19, 19, 19, 19, 19, 19,
12865 11, 11, 11, 11, 11, 11, 11, 11,
12866 11, 11, 11, 11, 11, 11, 11, 11,
12867 19, 19, 19, 19, 11, 11, 11, 11,
12868 11, 11, 11, 11, 11, 11, 11, 11,
12869 12, 12, 12, 12, 12, 0, 1, 0,
12870 1, 0, 1, 0, 1, 0, 1, 0,
12871 1, 0, 1, 0, 1, 12, 12, 11,
12872 11, 12, 12, 12, 12, 12, 12, 12,
12873 1, 12, 1, 11, 4, 4, 5, 5,
12874 12, 0, 1, 0, 1, 0, 1, 12,
12875 12, 12, 12, 12, 12, 12, 12, 11,
12876 12, 8, 9, 12, 11, 11, 11, 11,
12877 11, 11, 11, 11, 11, 11, 11, 11,
12878 11, 11, 11, 11, 11, 11, 11, 11,
12879 11, 11, 11, 11, 11, 11, 11, 11,
12880 11, 11, 11, 11, 11, 11, 11, 11,
12881 11, 11, 11, 11, 11, 11, 11, 11,
12882 11, 11, 11, 11, 11, 11, 11, 11,
12883 11, 11, 11, 11, 11, 11, 11, 11,
12884 11, 11, 11, 11, 11, 11, 11, 11,
12885 11, 11, 11, 11, 11, 11, 11, 11,
12886 11, 11, 11, 11, 11, 11, 11, 11,
12887 11, 11, 11, 11, 11, 11, 11, 11,
12888 11, 11, 11, 11, 11, 11, 11, 11,
12889 11, 11, 11, 11, 11, 11, 11, 11,
12890 11, 11, 11, 11, 11, 11, 11, 11,
12891 11, 11, 11, 11, 11, 11, 11, 11,
12892 11, 11, 11, 11, 11, 11, 11, 11,
12893 11, 11, 11, 11, 11, 11, 11, 11,
12894 11, 11, 11, 11, 11, 11, 11, 3,
12895
12896 11, 5, 12, 12, 8, 9, 12, 12,
12897 0, 1, 12, 12, 1, 12, 1, 12,
12898 12, 12, 12, 12, 12, 12, 12, 12,
12899 12, 12, 4, 4, 12, 12, 12, 5,
12900 12, 12, 12, 12, 12, 12, 12, 12,
12901 12, 12, 12, 12, 12, 12, 12, 12,
12902 12, 12, 12, 12, 12, 12, 12, 12,
12903 12, 12, 12, 0, 12, 1, 12, 12,
12904 12, 12, 12, 12, 12, 12, 12, 12,
12905 12, 12, 12, 12, 12, 12, 12, 12,
12906 12, 12, 12, 12, 12, 12, 12, 12,
12907 12, 12, 12, 0, 12, 1, 12, 0,
12908 1, 1, 0, 1, 1, 4, 11, 4,
12909 4, 4, 4, 4, 4, 4, 4, 4,
12910 4, 11, 11, 11, 11, 11, 11, 11,
12911 11, 11, 11, 11, 11, 11, 11, 11,
12912 11, 11, 11, 11, 11, 11, 11, 11,
12913 11, 11, 11, 11, 11, 11, 11, 11,
12914 11, 11, 11, 11, 11, 11, 11, 11,
12915 11, 11, 11, 11, 11, 11, 4, 4,
12916 11, 11, 11, 11, 11, 11, 11, 11,
12917 11, 11, 11, 11, 11, 11, 11, 11,
12918 11, 11, 11, 11, 11, 11, 11, 11,
12919 11, 11, 11, 11, 11, 11, 11, 11,
12920 11, 11, 11, 11, 11, 11, 11, 11,
12921 11, 11, 11, 11, 11, 11, 11, 11,
12922 11, 11, 11, 11, 11, 11, 11, 11,
12923 11, 11, 11, 11, 11, 11, 11, 11,
12924 9, 8, 12, 12, 12, 8, 8, 11,
12925 11, 11, 11, 11, 11, 11, 11, 11,
12926 11, 11, 11, 11, 11, 11, 11, 11,
12927 11, 19, 19, 19, 25, 11, 11, 11,
12928};
12929// 52474 bytes
12930
12931// END OF GENERATED DATA
12932#endif
12933
12934
12935
12936#ifndef QT_NO_UNICODETABLES
12937const Q_UINT16 QUnicodeTables::symmetricPairs[] = {
12938 0x0028, 0x0029, 0x003C, 0x003E, 0x005B, 0x005D, 0x007B, 0x007D,
12939 0x00AB, 0x00BB, 0x2039, 0x203A, 0x2045, 0x2046, 0x207D, 0x207E,
12940 0x208D, 0x208E, 0x2208, 0x220B, 0x2209, 0x220C, 0x220A, 0x220D,
12941 0x2215, 0x29F5, 0x223C, 0x223D, 0x2243, 0x22CD, 0x2252, 0x2253,
12942 0x2254, 0x2255, 0x2264, 0x2265, 0x2266, 0x2267, 0x2268, 0x2269,
12943 0x226A, 0x226B, 0x226E, 0x226F, 0x2270, 0x2271, 0x2272, 0x2273,
12944 0x2274, 0x2275, 0x2276, 0x2277, 0x2278, 0x2279, 0x227A, 0x227B,
12945 0x227C, 0x227D, 0x227E, 0x227F, 0x2280, 0x2281, 0x2282, 0x2283,
12946 0x2284, 0x2285, 0x2286, 0x2287, 0x2288, 0x2289, 0x228A, 0x228B,
12947 0x228F, 0x2290, 0x2291, 0x2292, 0x2298, 0x29B8, 0x22A2, 0x22A3,
12948 0x22A6, 0x2ADE, 0x22A8, 0x2AE4, 0x22A9, 0x2AE3, 0x22AB, 0x2AE5,
12949 0x22B0, 0x22B1, 0x22B2, 0x22B3, 0x22B4, 0x22B5, 0x22B6, 0x22B7,
12950 0x22C9, 0x22CA, 0x22CB, 0x22CC, 0x22D0, 0x22D1, 0x22D6, 0x22D7,
12951 0x22D8, 0x22D9, 0x22DA, 0x22DB, 0x22DC, 0x22DD, 0x22DE, 0x22DF,
12952 0x22E0, 0x22E1, 0x22E2, 0x22E3, 0x22E4, 0x22E5, 0x22E6, 0x22E7,
12953 0x22E8, 0x22E9, 0x22EA, 0x22EB, 0x22EC, 0x22ED, 0x22F0, 0x22F1,
12954 0x22F2, 0x22FA, 0x22F3, 0x22FB, 0x22F4, 0x22FC, 0x22F6, 0x22FD,
12955 0x22F7, 0x22FE, 0x2308, 0x2309, 0x230A, 0x230B, 0x2329, 0x232A,
12956 0x2768, 0x2769, 0x276A, 0x276B, 0x276C, 0x276D, 0x276E, 0x276F,
12957 0x2770, 0x2771, 0x2772, 0x2773, 0x2774, 0x2775, 0x27D5, 0x27D6,
12958 0x27DD, 0x27DE, 0x27E2, 0x27E3, 0x27E4, 0x27E5, 0x27E6, 0x27E7,
12959 0x27E8, 0x27E9, 0x27EA, 0x27EB, 0x2983, 0x2984, 0x2985, 0x2986,
12960 0x2987, 0x2988, 0x2989, 0x298A, 0x298B, 0x298C, 0x298D, 0x2990,
12961 0x298E, 0x298F, 0x2991, 0x2992, 0x2993, 0x2994, 0x2995, 0x2996,
12962 0x2997, 0x2998, 0x29C0, 0x29C1, 0x29C4, 0x29C5, 0x29CF, 0x29D0,
12963 0x29D1, 0x29D2, 0x29D4, 0x29D5, 0x29D8, 0x29D9, 0x29DA, 0x29DB,
12964 0x29F8, 0x29F9, 0x29FC, 0x29FD, 0x2A2B, 0x2A2C, 0x2A34, 0x2A35,
12965 0x2A3C, 0x2A3D, 0x2A64, 0x2A65, 0x2A79, 0x2A7A, 0x2A7D, 0x2A7E,
12966 0x2A7F, 0x2A80, 0x2A81, 0x2A82, 0x2A83, 0x2A84, 0x2A8B, 0x2A8C,
12967 0x2A91, 0x2A92, 0x2A93, 0x2A94, 0x2A95, 0x2A96, 0x2A97, 0x2A98,
12968 0x2A99, 0x2A9A, 0x2A9B, 0x2A9C, 0x2AA1, 0x2AA2, 0x2AA6, 0x2AA7,
12969 0x2AA8, 0x2AA9, 0x2AAA, 0x2AAB, 0x2AAC, 0x2AAD, 0x2AAF, 0x2AB0,
12970 0x2AB3, 0x2AB4, 0x2ABB, 0x2ABC, 0x2ABD, 0x2ABE, 0x2ABF, 0x2AC0,
12971 0x2AC1, 0x2AC2, 0x2AC3, 0x2AC4, 0x2AC5, 0x2AC6, 0x2ACD, 0x2ACE,
12972 0x2ACF, 0x2AD0, 0x2AD1, 0x2AD2, 0x2AD3, 0x2AD4, 0x2AD5, 0x2AD6,
12973 0x2AEC, 0x2AED, 0x2AF7, 0x2AF8, 0x2AF9, 0x2AFA, 0x3008, 0x3009,
12974 0x300A, 0x300B, 0x300C, 0x300D, 0x300E, 0x300F, 0x3010, 0x3011,
12975 0x3014, 0x3015, 0x3016, 0x3017, 0x3018, 0x3019, 0x301A, 0x301B,
12976 0xFF08, 0xFF09, 0xFF1C, 0xFF1E, 0xFF3B, 0xFF3D, 0xFF5B, 0xFF5D,
12977 0xFF5F, 0xFF60, 0xFF62, 0xFF63,
12978};
12979
12980// ### shouldn't this be const?
12981const int QUnicodeTables::symmetricPairsSize =
12982 sizeof(symmetricPairs)/sizeof(symmetricPairs[0]);
12983
12984#else
12985
12986/*
12987 only include info for the first unicode range (latin1) when building
12988 without unicode tables.
12989*/
12990const Q_UINT8 QUnicodeTables::unicode_info[] = {
12991 10, 10, 10, 10, 10, 10, 10, 10,
12992 10, 10, 10, 10, 10, 10, 10, 10,
12993 10, 10, 10, 10, 10, 10, 10, 10,
12994 10, 10, 10, 10, 10, 10, 10, 10,
12995 7, 26, 26, 26, 28, 26, 26, 26,
12996 22, 23, 26, 27, 26, 21, 26, 26,
12997 4, 4, 4, 4, 4, 4, 4, 4,
12998 4, 4, 26, 26, 27, 27, 27, 26,
12999 26, 15, 15, 15, 15, 15, 15, 15,
13000 15, 15, 15, 15, 15, 15, 15, 15,
13001 15, 15, 15, 15, 15, 15, 15, 15,
13002 15, 15, 15, 22, 26, 23, 29, 20,
13003 29, 16, 16, 16, 16, 16, 16, 16,
13004 16, 16, 16, 16, 16, 16, 16, 16,
13005 16, 16, 16, 16, 16, 16, 16, 16,
13006 16, 16, 16, 22, 27, 23, 27, 10,
13007 10, 10, 10, 10, 10, 10, 10, 10,
13008 10, 10, 10, 10, 10, 10, 10, 10,
13009 10, 10, 10, 10, 10, 10, 10, 10,
13010 10, 10, 10, 10, 10, 10, 10, 10,
13011 7, 26, 28, 28, 28, 28, 30, 30,
13012 29, 30, 16, 24, 27, 21, 30, 29,
13013 30, 27, 6, 6, 29, 16, 30, 26,
13014 29, 6, 16, 25, 6, 6, 6, 26,
13015 15, 15, 15, 15, 15, 15, 15, 15,
13016 15, 15, 15, 15, 15, 15, 15, 15,
13017 15, 15, 15, 15, 15, 15, 15, 27,
13018 15, 15, 15, 15, 15, 15, 15, 16,
13019 16, 16, 16, 16, 16, 16, 16, 16,
13020 16, 16, 16, 16, 16, 16, 16, 16,
13021 16, 16, 16, 16, 16, 16, 16, 27,
13022 16, 16, 16, 16, 16, 16, 16, 16
13023};
13024
13025#endif
13026
13027/*
13028 * ----------------------------------------------------------------------
13029 * End of unicode tables
13030 * ----------------------------------------------------------------------
13031 */
13032
13033enum Script {
13034 // European Alphabetic Scripts
13035 Latin,
13036 Greek,
13037 Cyrillic,
13038 Armenian,
13039 Georgian,
13040 Runic,
13041 Ogham,
13042 SpacingModifiers,
13043 CombiningMarks,
13044
13045 // Middle Eastern Scripts
13046 Hebrew,
13047 Arabic,
13048 Syriac,
13049 Thaana,
13050
13051 // South and Southeast Asian Scripts
13052 Devanagari,
13053 Bengali,
13054 Gurmukhi,
13055 Gujarati,
13056 Oriya,
13057 Tamil,
13058 Telugu,
13059 Kannada,
13060 Malayalam,
13061 Sinhala,
13062 Thai,
13063 Lao,
13064 Tibetan,
13065 Myanmar,
13066 Khmer,
13067
13068 // East Asian Scripts
13069 Han,
13070 Hiragana,
13071 Katakana,
13072 Hangul,
13073 Bopomofo,
13074 Yi,
13075
13076 // Additional Scripts
13077 Ethiopic,
13078 Cherokee,
13079 CanadianAboriginal,
13080 Mongolian,
13081
13082 // Symbols
13083 CurrencySymbols,
13084 LetterlikeSymbols,
13085 NumberForms,
13086 MathematicalOperators,
13087 TechnicalSymbols,
13088 GeometricSymbols,
13089 MiscellaneousSymbols,
13090 EnclosedAndSquare,
13091 Braille,
13092
13093 Unicode,
13094
13095 // some scripts added in Unicode 3.2
13096 Tagalog,
13097 Hanunoo,
13098 Buhid,
13099 Tagbanwa,
13100
13101 KatakanaHalfWidth, // from JIS X 0201
13102
13103 // from Unicode 4.0
13104 Limbu,
13105 TaiLe,
13106
13107 // End
13108 NScripts,
13109 UnknownScript = NScripts
13110};
13111
13112// copied form qfont.h, as we can't include it in tools. Do not modify without
13113// changing the script enum in qfont.h aswell.
13114const unsigned char QUnicodeTables::otherScripts [128] = {
13115#define SCRIPTS_02 0
13116 0xaf, Latin, 0xff, SpacingModifiers, // row 0x02, index 0
13117#define SCRIPTS_03 4
13118 0x6f, CombiningMarks, 0xff, Greek, // row 0x03, index 4
13119#define SCRIPTS_05 8
13120 0x2f, Cyrillic, 0x8f, Armenian, 0xff, Hebrew,// row 0x05, index 8
13121#define SCRIPTS_07 14
13122 0x4f, Syriac, 0x7f, Unicode, 0xbf, Thaana,
13123 0xff, Unicode, // row 0x07, index 14
13124#define SCRIPTS_10 22
13125 0x9f, Myanmar, 0xff, Georgian, // row 0x10, index 20
13126#define SCRIPTS_13 26
13127 0x7f, Ethiopic, 0x9f, Unicode, 0xff, Cherokee,// row 0x13, index 24
13128#define SCRIPTS_16 32
13129 0x7f, CanadianAboriginal, 0x9f, Ogham,
13130 0xff, Runic, // row 0x16 index 30
13131#define SCRIPTS_17 38
13132 0x1f, Tagalog, 0x3f, Hanunoo, 0x5f, Buhid,
13133 0x7f, Tagbanwa, 0xff, Khmer, // row 0x17, index 36
13134#define SCRIPTS_18 48
13135 0xaf, Mongolian, 0xff, Unicode, // row 0x18, index 46
13136#define SCRIPTS_19 52
13137 0x4f, Limbu, 0x7f, TaiLe, 0xdf, Unicode, 0xff, Khmer,
13138#define SCRIPTS_20 60
13139 0x0b, Unicode, 0x0d, UnknownScript, 0x6f, Unicode, 0x9f, NumberForms,
13140 0xab, CurrencySymbols, 0xac, Latin,
13141 0xcf, CurrencySymbols, 0xff, CombiningMarks, // row 0x20, index 50
13142#define SCRIPTS_21 76
13143 0x4f, LetterlikeSymbols, 0x8f, NumberForms,
13144 0xff, MathematicalOperators, // row 0x21, index 62
13145#define SCRIPTS_24 82
13146 0x5f, TechnicalSymbols, 0xff, EnclosedAndSquare,// row 0x24, index 68
13147#define SCRIPTS_2e 86
13148 0x7f, Unicode, 0xff, Han, // row 0x2e, index 72
13149#define SCRIPTS_30 90
13150 0x3f, Han, 0x9f, Hiragana, 0xff, Katakana,// row 0x30, index 76
13151#define SCRIPTS_31 96
13152 0x2f, Bopomofo, 0x8f, Hangul, 0x9f, Han,
13153 0xff, Unicode, // row 0x31, index 82
13154#define SCRIPTS_fb 104
13155 0x06, Latin, 0x1c, Unicode, 0x4f, Hebrew,
13156 0xff, Arabic, // row 0xfb, index 90
13157#define SCRIPTS_fe 112
13158 0x1f, Unicode, 0x2f, CombiningMarks, 0x6f, Unicode,
13159 0xff, Arabic, // row 0xfe, index 98
13160#define SCRIPTS_ff 120
13161 0x5e, Katakana, 0x60, Unicode, // row 0xff, index 106
13162 0x9f, KatakanaHalfWidth, 0xff, Unicode
13163};
13164
13165// (uc-0x0900)>>7
13166const unsigned char QUnicodeTables::indicScripts [] =
13167{
13168 Devanagari, Bengali,
13169 Gurmukhi, Gujarati,
13170 Oriya, Tamil,
13171 Telugu, Kannada,
13172 Malayalam, Sinhala,
13173 Thai, Lao
13174};
13175
13176
13177// 0x80 + x: x is the offset into the otherScripts table
13178const unsigned char QUnicodeTables::scriptTable[256] =
13179{
13180 Latin, Latin, 0x80+SCRIPTS_02, 0x80+SCRIPTS_03,
13181 Cyrillic, 0x80+SCRIPTS_05, Arabic, 0x80+SCRIPTS_07,
13182 Unicode, SCRIPTS_INDIC, SCRIPTS_INDIC, SCRIPTS_INDIC,
13183 SCRIPTS_INDIC, SCRIPTS_INDIC, SCRIPTS_INDIC, Tibetan,
13184
13185 0x80+SCRIPTS_10, Hangul, Ethiopic, 0x80+SCRIPTS_13,
13186 CanadianAboriginal, CanadianAboriginal, 0x80+SCRIPTS_16, 0x80+SCRIPTS_17,
13187 0x80+SCRIPTS_18, 0x80+SCRIPTS_19, Unicode, Unicode,
13188 Unicode, Unicode, Latin, Greek,
13189
13190 0x80+SCRIPTS_20, 0x80+SCRIPTS_21, MathematicalOperators, TechnicalSymbols,
13191 0x80+SCRIPTS_24, GeometricSymbols, MiscellaneousSymbols, MiscellaneousSymbols,
13192 Braille, Unicode, Unicode, Unicode,
13193 Unicode, Unicode, 0x80+SCRIPTS_2e, Han,
13194
13195 0x80+SCRIPTS_30, 0x80+SCRIPTS_31, EnclosedAndSquare, EnclosedAndSquare,
13196 Han, Han, Han, Han,
13197 Han, Han, Han, Han,
13198 Han, Han, Han, Han,
13199
13200 Han, Han, Han, Han, Han, Han, Han, Han,
13201 Han, Han, Han, Han, Han, Han, Han, Han,
13202
13203 Han, Han, Han, Han, Han, Han, Han, Han,
13204 Han, Han, Han, Han, Han, Han, Han, Han,
13205
13206 Han, Han, Han, Han, Han, Han, Han, Han,
13207 Han, Han, Han, Han, Han, Han, Han, Han,
13208
13209 Han, Han, Han, Han, Han, Han, Han, Han,
13210 Han, Han, Han, Han, Han, Han, Han, Han,
13211
13212
13213 Han, Han, Han, Han, Han, Han, Han, Han,
13214 Han, Han, Han, Han, Han, Han, Han, Han,
13215
13216 Han, Han, Han, Han, Han, Han, Han, Han,
13217 Han, Han, Han, Han, Han, Han, Han, Han,
13218
13219 Yi, Yi, Yi, Yi, Yi, Unicode, Unicode, Unicode,
13220 Unicode, Unicode, Unicode, Unicode, Hangul, Hangul, Hangul, Hangul,
13221
13222 Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul,
13223 Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul,
13224
13225 Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul,
13226 Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul,
13227
13228 Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul,
13229 Unicode, Unicode, Unicode, Unicode, Unicode, Unicode, Unicode, Unicode,
13230
13231 Unicode, Unicode, Unicode, Unicode, Unicode, Unicode, Unicode, Unicode,
13232 Unicode, Unicode, Unicode, Unicode, Unicode, Unicode, Unicode, Unicode,
13233
13234 Unicode, Unicode, Unicode, Unicode, Unicode, Unicode, Unicode, Unicode,
13235 Unicode, Han, Han, 0x80+SCRIPTS_fb, Arabic, Arabic, 0x80+SCRIPTS_fe, 0x80+SCRIPTS_ff
13236};
13237
diff --git a/qmake/tools/quuid.cpp b/qmake/tools/quuid.cpp
index fd99abf..199bfa5 100644
--- a/qmake/tools/quuid.cpp
+++ b/qmake/tools/quuid.cpp
@@ -1,5 +1,5 @@
1/**************************************************************************** 1/****************************************************************************
2** $Id$ 2**
3** 3**
4** Implementation of QUuid class 4** Implementation of QUuid class
5** 5**
@@ -35,25 +35,31 @@
35 35
36#include "quuid.h" 36#include "quuid.h"
37 37
38#include <qdatastream.h> 38#include "qdatastream.h"
39 39
40/*! 40/*!
41 \class QUuid quuid.h 41 \class QUuid quuid.h
42 \reentrant
43 \brief The QUuid class defines a Universally Unique Identifier (UUID). 42 \brief The QUuid class defines a Universally Unique Identifier (UUID).
44 43
45 \internal 44 \reentrant
45
46 For objects or declarations that must be uniquely identified,
47 UUIDs (also known as GUIDs) are widely used in order to assign a
48 fixed and easy to compare value to the object or declaration. The
49 128-bit value of a UUID is generated by an algorithm that
50 guarantees that the value is unique.
46 51
47 For objects or declarations that need to be identified uniquely, UUIDs (also known as GUIDs) are widely 52 In Qt, UUIDs are wrapped by the QUuid struct which provides
48 used in order to assign a fixed and easy to compare value to this object or declaration. The 128bit value 53 convenience functions for handling UUIDs. Most platforms provide a
49 of an UUID is generated by an algorithm that guarantees a value that is unique in time and space. 54 tool to generate new UUIDs, for example, uuidgen and guidgen.
50 55
51 In Qt, UUIDs are wrapped by the QUuid struct which provides convenience functions for comparing and coping 56 UUIDs generated by QUuid, are based on the \c Random version of the
52 this value. The QUuid struct is used in Qt's component model to identify interfaces. Most platforms provide a tool to 57 \c DCE (Distributed Computing Environment) standard.
53 generate new UUIDs (uuidgen, guidgen), and the Qt distribution includes a graphical tool \e quuidgen that generates
54 the UUIDs in a programmer friendly format.
55 58
56 \sa QUnknownInterface 59 UUIDs can be constructed from numeric values or from strings, or
60 using the static createUuid() function. They can be converted to a
61 string with toString(). UUIDs have a variant() and a version(),
62 and null UUIDs return TRUE from isNull().
57*/ 63*/
58 64
59/*! 65/*!
@@ -65,8 +71,9 @@
65/*! 71/*!
66 \fn QUuid::QUuid( uint l, ushort w1, ushort w2, uchar b1, uchar b2, uchar b3, uchar b4, uchar b5, uchar b6, uchar b7, uchar b8 ) 72 \fn QUuid::QUuid( uint l, ushort w1, ushort w2, uchar b1, uchar b2, uchar b3, uchar b4, uchar b5, uchar b6, uchar b7, uchar b8 )
67 73
68 Creates an UUID with the value specified by the parameters, \a l, \a 74 Creates a UUID with the value specified by the parameters, \a l,
69 w1, \a w2, \a b1, \a b2, \a b3, \a b4, \a b5, \a b6, \a b7, \a b8. 75 \a w1, \a w2, \a b1, \a b2, \a b3, \a b4, \a b5, \a b6, \a b7, \a
76 b8.
70 77
71 Example: 78 Example:
72 \code 79 \code
@@ -82,14 +89,23 @@
82*/ 89*/
83#ifndef QT_NO_QUUID_STRING 90#ifndef QT_NO_QUUID_STRING
84/*! 91/*!
85 Creates a QUuid object from the string \a text. Right now, the function 92 Creates a QUuid object from the string \a text. The function can
86 can only convert the format {12345678-1234-1234-1234-123456789ABC} and 93 only convert a string in the format
87 will create the null UUID when the conversion fails. 94 {HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH} (where 'H' stands for a hex
95 digit). If the conversion fails a null UUID is created.
88*/ 96*/
89QUuid::QUuid( const QString &text ) 97QUuid::QUuid( const QString &text )
90{ 98{
91 bool ok; 99 bool ok;
100 if ( text.isEmpty() ) {
101 *this = QUuid();
102 return;
103 }
92 QString temp = text.upper(); 104 QString temp = text.upper();
105 if ( temp[0] != '{' )
106 temp = "{" + text;
107 if ( text[(int)text.length()-1] != '}' )
108 temp += "}";
93 109
94 data1 = temp.mid( 1, 8 ).toULong( &ok, 16 ); 110 data1 = temp.mid( 1, 8 ).toULong( &ok, 16 );
95 if ( !ok ) { 111 if ( !ok ) {
@@ -127,7 +143,7 @@ QUuid::QUuid( const QString &text )
127} 143}
128 144
129/*! 145/*!
130 \overload 146 \internal
131*/ 147*/
132QUuid::QUuid( const char *text ) 148QUuid::QUuid( const char *text )
133{ 149{
@@ -143,13 +159,15 @@ QUuid::QUuid( const char *text )
143/*! 159/*!
144 \fn bool QUuid::operator==(const QUuid &other) const 160 \fn bool QUuid::operator==(const QUuid &other) const
145 161
146 Returns TRUE if this QUuid and the \a other QUuid are identical, otherwise returns FALSE. 162 Returns TRUE if this QUuid and the \a other QUuid are identical;
163 otherwise returns FALSE.
147*/ 164*/
148 165
149/*! 166/*!
150 \fn bool QUuid::operator!=(const QUuid &other) const 167 \fn bool QUuid::operator!=(const QUuid &other) const
151 168
152 Returns TRUE if this QUuid and the \a other QUuid are different, otherwise returns FALSE. 169 Returns TRUE if this QUuid and the \a other QUuid are different;
170 otherwise returns FALSE.
153*/ 171*/
154#ifndef QT_NO_QUUID_STRING 172#ifndef QT_NO_QUUID_STRING
155/*! 173/*!
@@ -184,7 +202,7 @@ QString QUuid::toString() const
184#ifndef QT_NO_DATASTREAM 202#ifndef QT_NO_DATASTREAM
185/*! 203/*!
186 \relates QUuid 204 \relates QUuid
187 Writes the \a id to the datastream \a s. 205 Writes the uuid \a id to the datastream \a s.
188*/ 206*/
189QDataStream &operator<<( QDataStream &s, const QUuid &id ) 207QDataStream &operator<<( QDataStream &s, const QUuid &id )
190{ 208{
@@ -198,7 +216,7 @@ QDataStream &operator<<( QDataStream &s, const QUuid &id )
198 216
199/*! 217/*!
200 \relates QUuid 218 \relates QUuid
201 Reads a universally unique id from from the stream \a s into \a id. 219 Reads uuid from from the stream \a s into \a id.
202*/ 220*/
203QDataStream &operator>>( QDataStream &s, QUuid &id ) 221QDataStream &operator>>( QDataStream &s, QUuid &id )
204{ 222{
@@ -220,7 +238,8 @@ QDataStream &operator>>( QDataStream &s, QUuid &id )
220#endif 238#endif
221 239
222/*! 240/*!
223 Returns TRUE if this is the null UUID {00000000-0000-0000-0000-000000000000}, otherwise returns FALSE. 241 Returns TRUE if this is the null UUID
242 {00000000-0000-0000-0000-000000000000}; otherwise returns FALSE.
224*/ 243*/
225bool QUuid::isNull() const 244bool QUuid::isNull() const
226{ 245{
@@ -228,3 +247,172 @@ bool QUuid::isNull() const
228 data4[4] == 0 && data4[5] == 0 && data4[6] == 0 && data4[7] == 0 && 247 data4[4] == 0 && data4[5] == 0 && data4[6] == 0 && data4[7] == 0 &&
229 data1 == 0 && data2 == 0 && data3 == 0; 248 data1 == 0 && data2 == 0 && data3 == 0;
230} 249}
250
251/*!
252 \enum QUuid::Variant
253
254 This enum defines the variant of the UUID, which is the scheme
255 which defines the layout of the 128-bits value.
256
257 \value VarUnknown Variant is unknown
258 \value NCS Reserved for NCS (Network Computing System) backward compatibility
259 \value DCE Distributed Computing Environment, the scheme used by QUuid
260 \value Microsoft Reserved for Microsoft backward compatibility (GUID)
261 \value Reserved Reserved for future definition
262*/
263
264/*!
265 \enum QUuid::Version
266
267 This enum defines the version of the UUID.
268
269 \value VerUnknown Version is unknown
270 \value Time Time-based, by using timestamp, clock sequence, and
271 MAC network card address (if available) for the node sections
272 \value EmbeddedPOSIX DCE Security version, with embedded POSIX UUIDs
273 \value Name Name-based, by using values from a name for all sections
274 \value Random Random-based, by using random numbers for all sections
275*/
276
277/*!
278 \fn QUuid::Variant QUuid::variant() const
279
280 Returns the variant of the UUID.
281 The null UUID is considered to be of an unknown variant.
282
283 \sa version()
284*/
285QUuid::Variant QUuid::variant() const
286{
287 if ( isNull() )
288 return VarUnknown;
289 // Check the 3 MSB of data4[0]
290 if ( (data4[0] & 0x80) == 0x00 ) return NCS;
291 else if ( (data4[0] & 0xC0) == 0x80 ) return DCE;
292 else if ( (data4[0] & 0xE0) == 0xC0 ) return Microsoft;
293 else if ( (data4[0] & 0xE0) == 0xE0 ) return Reserved;
294 return VarUnknown;
295}
296
297/*!
298 \fn QUuid::Version QUuid::version() const
299
300 Returns the version of the UUID, if the UUID is of the DCE
301 variant; otherwise returns VerUnknown.
302
303 \sa variant()
304*/
305QUuid::Version QUuid::version() const
306{
307 // Check the 4 MSB of data3
308 Version ver = (Version)(data3>>12);
309 if ( isNull()
310 || (variant() != DCE)
311 || ver < Time
312 || ver > Random )
313 return VerUnknown;
314 return ver;
315}
316
317/*!
318 \fn bool QUuid::operator<(const QUuid &other) const
319
320 Returns TRUE if this QUuid is of the same variant,
321 and lexicographically before the \a other QUuid;
322 otherwise returns FALSE.
323
324 \sa variant()
325*/
326#define ISLESS(f1, f2) if (f1!=f2) return (f1<f2);
327bool QUuid::operator<(const QUuid &other ) const
328{
329 if ( variant() != other.variant() )
330 return FALSE;
331
332 ISLESS( data1, other.data1 );
333 ISLESS( data2, other.data2 );
334 ISLESS( data3, other.data3 );
335 for ( int n = 0; n < 8; n++ ) {
336 ISLESS( data4[n], other.data4[n] );
337 }
338 return FALSE;
339}
340
341/*!
342 \fn bool QUuid::operator>(const QUuid &other) const
343
344 Returns TRUE if this QUuid is of the same variant,
345 and lexicographically after the \a other QUuid;
346 otherwise returns FALSE.
347
348 \sa variant()
349*/
350#define ISMORE(f1, f2) if (f1!=f2) return (f1>f2);
351bool QUuid::operator>(const QUuid &other ) const
352{
353 if ( variant() != other.variant() )
354 return FALSE;
355
356 ISMORE( data1, other.data1 );
357 ISMORE( data2, other.data2 );
358 ISMORE( data3, other.data3 );
359 for ( int n = 0; n < 8; n++ ) {
360 ISMORE( data4[n], other.data4[n] );
361 }
362 return FALSE;
363}
364
365/*!
366 \fn QUuid QUuid::createUuid()
367
368 Returns a new UUID of \c DCE variant, and \c Random type. The
369 UUIDs generated are based on the platform specific pseudo-random
370 generator, which is usually not a cryptographic-quality random
371 number generator. Therefore, a UUID is not guaranteed to be unique
372 cross application instances.
373
374 On Windows, the new UUID is extremely likely to be unique on the
375 same or any other system, networked or not.
376
377 \sa variant(), version()
378*/
379#if defined(Q_OS_WIN32)
380#include <objbase.h> // For CoCreateGuid
381QUuid QUuid::createUuid()
382{
383 GUID guid;
384 CoCreateGuid( &guid );
385 QUuid result = guid;
386 return result;
387}
388#else // !Q_OS_WIN32
389#include "qdatetime.h"
390#include "stdlib.h" // For srand/rand
391QUuid QUuid::createUuid()
392{
393 static const int intbits = sizeof(int)*8;
394 static int randbits = 0;
395 if ( !randbits ) {
396 int max = RAND_MAX;
397 do { ++randbits; } while ( (max=max>>1) );
398 srand( (uint)QDateTime::currentDateTime().toTime_t() );
399 rand(); // Skip first
400 }
401
402 QUuid result;
403 uint *data = &(result.data1);
404 int chunks = 16 / sizeof(uint);
405 while ( chunks-- ) {
406 uint randNumber = 0;
407 for ( int filled = 0; filled < intbits; filled += randbits )
408 randNumber |= rand()<<filled;
409 *(data+chunks) = randNumber;
410 }
411
412 result.data4[0] = (result.data4[0] & 0x3F) | 0x80;// UV_DCE
413 result.data3 = (result.data3 & 0x0FFF) | 0x4000;// UV_Random
414
415 return result;
416}
417#endif // !Q_OS_WIN32
418