]> git.wh0rd.org Git - ICEs.git/blob - 200324/foo.ii
initial import
[ICEs.git] / 200324 / foo.ii
1 // /usr/libexec/gcc/x86_64-pc-linux-gnu/4.1.2/cc1plus -quiet -I. -Igenerators -Igenerators/unix -Igenerators/win32 -Igenerators/mac -I/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/src/corelib/arch/generic -I/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include -I/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore -I/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include -I/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore -I/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/src/corelib/global -I/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/src/script -I/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/mkspecs/linux-g++ -D_GNU_SOURCE -DQMAKE_OPENSOURCE_EDITION -DQT_NO_PCRE -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_STL -DQT_BUILD_QMAKE -DQT_NO_COMPRESS -DHAVE_QCONFIG_CPP -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT generators/unix/unixmake2.cpp -quiet -dumpbase unixmake2.cpp -march=athlon64 -auxbase-strip unixmake2.o -O2 -o - -frandom-seed=0
2 # 1 "generators/unix/unixmake2.cpp"
3 # 1 "<built-in>"
4 # 1 "<command line>"
5 # 1 "generators/unix/unixmake2.cpp"
6 # 39 "generators/unix/unixmake2.cpp"
7 # 1 "generators/unix/unixmake.h" 1
8 # 42 "generators/unix/unixmake.h"
9 # 1 "generators/makefile.h" 1
10 # 42 "generators/makefile.h"
11 # 1 "./option.h" 1
12 # 42 "./option.h"
13 # 1 "./project.h" 1
14 # 42 "./project.h"
15 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qstringlist.h" 1
16 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qstringlist.h" 1
17 # 42 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qstringlist.h"
18 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qalgorithms.h" 1
19 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qalgorithms.h" 1
20 # 42 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qalgorithms.h"
21 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qglobal.h" 1
22 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/global/qglobal.h" 1
23 # 42 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/global/qglobal.h"
24 # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4
25 # 152 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/stddef.h" 3 4
26 typedef long int ptrdiff_t;
27 # 214 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/stddef.h" 3 4
28 typedef long unsigned int size_t;
29 # 43 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/global/qglobal.h" 2
30 # 57 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/global/qglobal.h"
31 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qconfig.h" 1
32 # 58 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/global/qglobal.h" 2
33 # 609 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/global/qglobal.h"
34 typedef signed char qint8;
35 typedef unsigned char quint8;
36 typedef short qint16;
37 typedef unsigned short quint16;
38 typedef int qint32;
39 typedef unsigned int quint32;
40 # 623 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/global/qglobal.h"
41 typedef long long qint64;
42 typedef unsigned long long quint64;
43
44
45 typedef qint64 qlonglong;
46 typedef quint64 qulonglong;
47 # 653 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/global/qglobal.h"
48 template <int> class QUintForSize { private: typedef void Type; };
49 template <> class QUintForSize<4> { public: typedef quint32 Type; };
50 template <> class QUintForSize<8> { public: typedef quint64 Type; };
51 template <typename T> class QUintForType : public QUintForSize<sizeof(T)> { };
52 typedef QUintForType<void *>::Type quintptr;
53
54 template <int> class QIntForSize { private: typedef void Type; };
55 template <> class QIntForSize<4> { public: typedef qint32 Type; };
56 template <> class QIntForSize<8> { public: typedef qint64 Type; };
57 template <typename T> class QIntForType : public QIntForSize<sizeof(T)> { };
58 typedef QIntForType<void *>::Type qptrdiff;
59
60
61
62
63
64 typedef unsigned char uchar;
65 typedef unsigned short ushort;
66 typedef unsigned int uint;
67 typedef unsigned long ulong;
68 # 697 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/global/qglobal.h"
69
70 # 837 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/global/qglobal.h"
71 typedef int QNoImplicitBoolCast;
72 # 848 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/global/qglobal.h"
73 typedef double qreal;
74
75
76
77
78
79
80 template <typename T>
81 inline T qAbs(const T &t) { return t >= 0 ? t : -t; }
82
83 inline int qRound(qreal d)
84 { return d >= 0.0 ? int(d + 0.5) : int(d - int(d-1) + 0.5) + int(d-1); }
85
86 inline qint64 qRound64(qreal d)
87 { return d >= 0.0 ? qint64(d + 0.5) : qint64(d - qint64(d-1) + 0.5) + qint64(d-1); }
88
89 template <typename T>
90 inline const T &qMin(const T &a, const T &b) { if (a < b) return a; return b; }
91 template <typename T>
92 inline const T &qMax(const T &a, const T &b) { if (a < b) return b; return a; }
93 template <typename T>
94 inline const T &qBound(const T &min, const T &val, const T &max)
95 { return qMax(min, qMin(max, val)); }
96 # 901 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/global/qglobal.h"
97 class QDataStream;
98 # 937 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/global/qglobal.h"
99 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qfeatures.h" 1
100 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/global/qfeatures.h" 1
101 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qfeatures.h" 2
102 # 938 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/global/qglobal.h" 2
103 # 1104 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/global/qglobal.h"
104 class QString;
105 class QSysInfo {
106 public:
107     enum Sizes {
108         WordSize = (sizeof(void *)<<3)
109     };
110
111
112     enum Endian {
113         BigEndian,
114         LittleEndian
115     };
116
117     static const int ByteOrder;
118 # 1180 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/global/qglobal.h"
119 };
120
121  const char *qVersion();
122  bool qSharedBuild();
123 # 1251 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/global/qglobal.h"
124  void qDebug(const char *, ...)
125
126     __attribute__ ((format (printf, 1, 2)))
127
128 ;
129
130  void qWarning(const char *, ...)
131
132     __attribute__ ((format (printf, 1, 2)))
133
134 ;
135
136 class QString;
137  QString qt_error_string(int errorCode = -1);
138  void qCritical(const char *, ...)
139
140     __attribute__ ((format (printf, 1, 2)))
141
142 ;
143  void qFatal(const char *, ...)
144
145     __attribute__ ((format (printf, 1, 2)))
146
147 ;
148
149
150
151
152  void qErrnoWarning(int code, const char *msg, ...);
153  void qErrnoWarning(const char *msg, ...);
154 # 1291 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/global/qglobal.h"
155 class QDebug;
156 class QNoDebug;
157
158  inline QDebug qDebug();
159  inline QDebug qWarning();
160  inline QDebug qCritical();
161 # 1310 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/global/qglobal.h"
162 inline void qt_noop() {}
163
164  void qt_assert(const char *assertion, const char *file, int line);
165 # 1326 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/global/qglobal.h"
166  void qt_assert_x(const char *where, const char *what, const char *file, int line);
167 # 1336 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/global/qglobal.h"
168  void qt_check_pointer(const char *, int);
169 # 1371 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/global/qglobal.h"
170 enum QtMsgType { QtDebugMsg, QtWarningMsg, QtCriticalMsg, QtFatalMsg, QtSystemMsg = QtCriticalMsg };
171
172  void qt_message_output(QtMsgType, const char *buf);
173
174 typedef void (*QtMsgHandler)(QtMsgType, const char *);
175  QtMsgHandler qInstallMsgHandler(QtMsgHandler);
176 # 1385 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/global/qglobal.h"
177 template <typename T>
178 class QGlobalStatic
179 {
180 public:
181     T *pointer;
182     inline QGlobalStatic(T *p) : pointer(p) { }
183     inline ~QGlobalStatic() { pointer = 0; }
184 };
185 # 1481 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/global/qglobal.h"
186 class QBool
187 {
188     bool b;
189
190 public:
191     inline explicit QBool(bool B) : b(B) {}
192     inline operator const void *() const
193     { return b ? static_cast<const void *>(this) : static_cast<const void *>(0); }
194 };
195
196 inline bool operator==(QBool b1, bool b2) { return !b1 == !b2; }
197 inline bool operator==(bool b1, QBool b2) { return !b1 == !b2; }
198 inline bool operator==(QBool b1, QBool b2) { return !b1 == !b2; }
199 inline bool operator!=(QBool b1, bool b2) { return !b1 != !b2; }
200 inline bool operator!=(bool b1, QBool b2) { return !b1 != !b2; }
201 inline bool operator!=(QBool b1, QBool b2) { return !b1 != !b2; }
202
203 static inline bool qFuzzyCompare(double p1, double p2)
204 {
205     return qAbs(p1 - p2) < 0.00000000001;
206 }
207
208 static inline bool qFuzzyCompare(float p1, float p2)
209 {
210     return qAbs(p1 - p2) < 0.000001;
211 }
212
213
214
215
216
217
218 static inline bool qIsNull(double d)
219 {
220     union U {
221         double d;
222         quint64 u;
223     };
224     U val;
225     val.d = d;
226     return val.u == quint64(0);
227 }
228
229
230
231
232
233
234 static inline bool qIsNull(float f)
235 {
236     union U {
237         float f;
238         quint32 u;
239     };
240     U val;
241     val.f = f;
242     return val.u == 0u;
243 }
244 # 1571 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/global/qglobal.h"
245 template <typename T> inline bool qIsDetached(T &) { return true; }
246
247 template <typename T>
248 class QTypeInfo
249 {
250 public:
251     enum {
252         isPointer = false,
253         isComplex = true,
254         isStatic = true,
255         isLarge = (sizeof(T)>sizeof(void*)),
256         isDummy = false
257     };
258 };
259
260 template <typename T>
261 class QTypeInfo<T*>
262 {
263 public:
264     enum {
265         isPointer = true,
266         isComplex = false,
267         isStatic = false,
268         isLarge = false,
269         isDummy = false
270     };
271 };
272 # 1629 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/global/qglobal.h"
273 enum {
274     Q_COMPLEX_TYPE = 0,
275     Q_PRIMITIVE_TYPE = 0x1,
276     Q_STATIC_TYPE = 0,
277     Q_MOVABLE_TYPE = 0x2,
278     Q_DUMMY_TYPE = 0x4
279 };
280 # 1692 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/global/qglobal.h"
281 template <> class QTypeInfo<bool> { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(bool)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "bool"; } };
282 template <> class QTypeInfo<char> { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(char)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "char"; } };
283 template <> class QTypeInfo<signed char> { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(signed char)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "signed char"; } };
284 template <> class QTypeInfo<uchar> { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(uchar)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "uchar"; } };
285 template <> class QTypeInfo<short> { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(short)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "short"; } };
286 template <> class QTypeInfo<ushort> { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(ushort)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "ushort"; } };
287 template <> class QTypeInfo<int> { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(int)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "int"; } };
288 template <> class QTypeInfo<uint> { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(uint)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "uint"; } };
289 template <> class QTypeInfo<long> { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(long)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "long"; } };
290 template <> class QTypeInfo<ulong> { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(ulong)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "ulong"; } };
291 template <> class QTypeInfo<qint64> { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(qint64)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "qint64"; } };
292 template <> class QTypeInfo<quint64> { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(quint64)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "quint64"; } };
293 template <> class QTypeInfo<float> { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(float)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "float"; } };
294 template <> class QTypeInfo<double> { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(double)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "double"; } };
295
296 template <> class QTypeInfo<long double> { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(long double)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "long double"; } };
297
298
299
300
301
302
303  void *qMalloc(size_t size);
304  void qFree(void *ptr);
305  void *qRealloc(void *ptr, size_t size);
306  void *qMemCopy(void *dest, const void *src, size_t n);
307  void *qMemSet(void *dest, int c, size_t n);
308 # 1755 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/global/qglobal.h"
309 class QFlag
310 {
311     int i;
312 public:
313     inline QFlag(int i);
314     inline operator int() const { return i; }
315 };
316
317 inline QFlag::QFlag(int ai) : i(ai) {}
318
319
320
321
322 template<typename Enum>
323 class QFlags
324 {
325     typedef void **Zero;
326     int i;
327 public:
328     typedef Enum enum_type;
329     inline QFlags(const QFlags &f) : i(f.i) {}
330     inline QFlags(Enum f) : i(f) {}
331     inline QFlags(Zero = 0) : i(0) {}
332     inline QFlags(QFlag f) : i(f) {}
333
334     inline QFlags &operator=(const QFlags &f) { i = f.i; return *this; }
335     inline QFlags &operator&=(int mask) { i &= mask; return *this; }
336     inline QFlags &operator&=(uint mask) { i &= mask; return *this; }
337     inline QFlags &operator|=(QFlags f) { i |= f.i; return *this; }
338     inline QFlags &operator|=(Enum f) { i |= f; return *this; }
339     inline QFlags &operator^=(QFlags f) { i ^= f.i; return *this; }
340     inline QFlags &operator^=(Enum f) { i ^= f; return *this; }
341
342     inline operator int() const { return i; }
343
344     inline QFlags operator|(QFlags f) const { QFlags g; g.i = i | f.i; return g; }
345     inline QFlags operator|(Enum f) const { QFlags g; g.i = i | f; return g; }
346     inline QFlags operator^(QFlags f) const { QFlags g; g.i = i ^ f.i; return g; }
347     inline QFlags operator^(Enum f) const { QFlags g; g.i = i ^ f; return g; }
348     inline QFlags operator&(int mask) const { QFlags g; g.i = i & mask; return g; }
349     inline QFlags operator&(uint mask) const { QFlags g; g.i = i & mask; return g; }
350     inline QFlags operator&(Enum f) const { QFlags g; g.i = i & f; return g; }
351     inline QFlags operator~() const { QFlags g; g.i = ~i; return g; }
352
353     inline bool operator!() const { return !i; }
354
355     inline bool testFlag(Enum f) const { return i & f; }
356
357 private:
358
359
360
361 };
362 # 1827 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/global/qglobal.h"
363 template <typename T>
364 class QForeachContainer {
365 public:
366     inline QForeachContainer(const T& t) : c(t), brk(0), i(c.begin()), e(c.end()) { }
367     const T c;
368     int brk;
369     typename T::const_iterator i, e;
370 };
371 # 1939 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/global/qglobal.h"
372 class QByteArray;
373  QByteArray qgetenv(const char *varName);
374
375 inline int qIntCast(double f) { return int(f); }
376 inline int qIntCast(float f) { return int(f); }
377
378
379
380
381  void qsrand(uint seed);
382  int qrand();
383 # 2031 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/global/qglobal.h"
384 enum QtValidLicenseForCoreModule { LicensedCore = true };
385
386
387 enum QtValidLicenseForGuiModule { LicensedGui = true };
388
389
390 enum QtValidLicenseForNetworkModule { LicensedNetwork = true };
391
392
393 enum QtValidLicenseForOpenGLModule { LicensedOpenGL = true };
394
395
396 enum QtValidLicenseForSqlModule { LicensedSql = true };
397
398
399 enum QtValidLicenseForXmlModule { LicensedXml = true };
400
401
402 enum QtValidLicenseForScriptModule { LicensedScript = true };
403
404
405 enum QtValidLicenseForQt3SupportLightModule { LicensedQt3SupportLight = true };
406
407
408 enum QtValidLicenseForQt3SupportModule { LicensedQt3Support = true };
409
410
411 enum QtValidLicenseForSvgModule { LicensedSvg = true };
412
413
414 enum QtValidLicenseForActiveQtModule { LicensedActiveQt = true };
415
416
417
418
419
420
421 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qglobal.h" 2
422 # 43 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qalgorithms.h" 2
423
424
425
426 typedef QtValidLicenseForCoreModule QtCoreModule;
427
428
429
430
431
432 namespace QAlgorithmsPrivate {
433
434 template <typename RandomAccessIterator, typename T, typename LessThan>
435  void qSortHelper(RandomAccessIterator start, RandomAccessIterator end, const T &t, LessThan lessThan);
436 template <typename RandomAccessIterator, typename T>
437 inline void qSortHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &dummy);
438
439 template <typename RandomAccessIterator, typename T, typename LessThan>
440  void qStableSortHelper(RandomAccessIterator start, RandomAccessIterator end, const T &t, LessThan lessThan);
441 template <typename RandomAccessIterator, typename T>
442 inline void qStableSortHelper(RandomAccessIterator, RandomAccessIterator, const T &);
443
444 template <typename RandomAccessIterator, typename T, typename LessThan>
445  RandomAccessIterator qLowerBoundHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan);
446 template <typename RandomAccessIterator, typename T, typename LessThan>
447  RandomAccessIterator qUpperBoundHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan);
448 template <typename RandomAccessIterator, typename T, typename LessThan>
449  RandomAccessIterator qBinaryFindHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan);
450
451 }
452
453 template <typename InputIterator, typename OutputIterator>
454 inline OutputIterator qCopy(InputIterator begin, InputIterator end, OutputIterator dest)
455 {
456     while (begin != end)
457         *dest++ = *begin++;
458     return dest;
459 }
460
461 template <typename BiIterator1, typename BiIterator2>
462 inline BiIterator2 qCopyBackward(BiIterator1 begin, BiIterator1 end, BiIterator2 dest)
463 {
464     while (begin != end)
465         *--dest = *--end;
466     return dest;
467 }
468
469 template <typename InputIterator1, typename InputIterator2>
470 inline bool qEqual(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2)
471 {
472     for (; first1 != last1; ++first1, ++first2)
473         if (!(*first1 == *first2))
474             return false;
475     return true;
476 }
477
478 template <typename ForwardIterator, typename T>
479 inline void qFill(ForwardIterator first, ForwardIterator last, const T &val)
480 {
481     for (; first != last; ++first)
482         *first = val;
483 }
484
485 template <typename Container, typename T>
486 inline void qFill(Container &container, const T &val)
487 {
488     qFill(container.begin(), container.end(), val);
489 }
490
491 template <typename InputIterator, typename T>
492 inline InputIterator qFind(InputIterator first, InputIterator last, const T &val)
493 {
494     while (first != last && !(*first == val))
495         ++first;
496     return first;
497 }
498
499 template <typename Container, typename T>
500 inline typename Container::const_iterator qFind(const Container &container, const T &val)
501 {
502     return qFind(container.constBegin(), container.constEnd(), val);
503 }
504
505 template <typename InputIterator, typename T, typename Size>
506 inline void qCount(InputIterator first, InputIterator last, const T &value, Size &n)
507 {
508     for (; first != last; ++first)
509         if (*first == value)
510             ++n;
511 }
512
513 template <typename Container, typename T, typename Size>
514 inline void qCount(const Container &container, const T &value, Size &n)
515 {
516     qCount(container.constBegin(), container.constEnd(), value, n);
517 }
518 # 147 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qalgorithms.h"
519 template <typename T>
520 inline void qSwap(T &value1, T &value2)
521 {
522     T t = value1;
523     value1 = value2;
524     value2 = t;
525 }
526 # 167 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qalgorithms.h"
527 template <typename T>
528 class qLess
529 {
530 public:
531     inline bool operator()(const T &t1, const T &t2) const
532     {
533         return (t1 < t2);
534     }
535 };
536
537 template <typename T>
538 class qGreater
539 {
540 public:
541     inline bool operator()(const T &t1, const T &t2) const
542     {
543         return (t2 < t1);
544     }
545 };
546
547
548 template <typename RandomAccessIterator>
549 inline void qSort(RandomAccessIterator start, RandomAccessIterator end)
550 {
551     if (start != end)
552         QAlgorithmsPrivate::qSortHelper(start, end, *start);
553 }
554
555 template <typename RandomAccessIterator, typename LessThan>
556 inline void qSort(RandomAccessIterator start, RandomAccessIterator end, LessThan lessThan)
557 {
558     if (start != end)
559         QAlgorithmsPrivate::qSortHelper(start, end, *start, lessThan);
560 }
561
562 template<typename Container>
563 inline void qSort(Container &c)
564 {
565
566
567
568
569     if (!c.empty())
570         QAlgorithmsPrivate::qSortHelper(c.begin(), c.end(), *c.begin());
571 }
572
573 template <typename RandomAccessIterator>
574 inline void qStableSort(RandomAccessIterator start, RandomAccessIterator end)
575 {
576     if (start != end)
577         QAlgorithmsPrivate::qStableSortHelper(start, end, *start);
578 }
579
580 template <typename RandomAccessIterator, typename LessThan>
581 inline void qStableSort(RandomAccessIterator start, RandomAccessIterator end, LessThan lessThan)
582 {
583     if (start != end)
584         QAlgorithmsPrivate::qStableSortHelper(start, end, *start, lessThan);
585 }
586
587 template<typename Container>
588 inline void qStableSort(Container &c)
589 {
590
591
592
593
594     if (!c.empty())
595         QAlgorithmsPrivate::qStableSortHelper(c.begin(), c.end(), *c.begin());
596 }
597
598 template <typename RandomAccessIterator, typename T>
599  RandomAccessIterator qLowerBound(RandomAccessIterator begin, RandomAccessIterator end, const T &value)
600 {
601
602
603
604     RandomAccessIterator middle;
605     int n = end - begin;
606     int half;
607
608     while (n > 0) {
609         half = n >> 1;
610         middle = begin + half;
611         if (*middle < value) {
612             begin = middle + 1;
613             n -= half + 1;
614         } else {
615             n = half;
616         }
617     }
618     return begin;
619 }
620
621 template <typename RandomAccessIterator, typename T, typename LessThan>
622  RandomAccessIterator qLowerBound(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan)
623 {
624     return QAlgorithmsPrivate::qLowerBoundHelper(begin, end, value, lessThan);
625 }
626
627 template <typename Container, typename T>
628  typename Container::const_iterator qLowerBound(const Container &container, const T &value)
629 {
630     return QAlgorithmsPrivate::qLowerBoundHelper(container.constBegin(), container.constEnd(), value, qLess<T>());
631 }
632
633 template <typename RandomAccessIterator, typename T>
634  RandomAccessIterator qUpperBound(RandomAccessIterator begin, RandomAccessIterator end, const T &value)
635 {
636
637     RandomAccessIterator middle;
638     int n = end - begin;
639     int half;
640
641     while (n > 0) {
642         half = n >> 1;
643         middle = begin + half;
644         if (value < *middle) {
645             n = half;
646         } else {
647             begin = middle + 1;
648             n -= half + 1;
649         }
650     }
651     return begin;
652 }
653
654 template <typename RandomAccessIterator, typename T, typename LessThan>
655  RandomAccessIterator qUpperBound(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan)
656 {
657     return QAlgorithmsPrivate::qUpperBoundHelper(begin, end, value, lessThan);
658 }
659
660 template <typename Container, typename T>
661  typename Container::const_iterator qUpperBound(const Container &container, const T &value)
662 {
663     return QAlgorithmsPrivate::qUpperBoundHelper(container.constBegin(), container.constEnd(), value, qLess<T>());
664 }
665
666 template <typename RandomAccessIterator, typename T>
667  RandomAccessIterator qBinaryFind(RandomAccessIterator begin, RandomAccessIterator end, const T &value)
668 {
669
670     int l = 0;
671     int r = end - begin - 1;
672     if (r < 0)
673         return end;
674     int i = (l + r + 1) / 2;
675
676     while (r != l) {
677         if (value < begin[i])
678             r = i - 1;
679         else
680             l = i;
681         i = (l + r + 1) / 2;
682     }
683     if (begin[i] < value || value < begin[i])
684         return end;
685     else
686         return begin + i;
687 }
688
689 template <typename RandomAccessIterator, typename T, typename LessThan>
690  RandomAccessIterator qBinaryFind(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan)
691 {
692     return QAlgorithmsPrivate::qBinaryFindHelper(begin, end, value, lessThan);
693 }
694
695 template <typename Container, typename T>
696  typename Container::const_iterator qBinaryFind(const Container &container, const T &value)
697 {
698     return QAlgorithmsPrivate::qBinaryFindHelper(container.constBegin(), container.constEnd(), value, qLess<T>());
699 }
700
701 template <typename ForwardIterator>
702  void qDeleteAll(ForwardIterator begin, ForwardIterator end)
703 {
704     while (begin != end) {
705         delete *begin;
706         ++begin;
707     }
708 }
709
710 template <typename Container>
711 inline void qDeleteAll(const Container &c)
712 {
713     qDeleteAll(c.begin(), c.end());
714 }
715
716
717
718
719
720 namespace QAlgorithmsPrivate {
721
722 template <typename RandomAccessIterator, typename T, typename LessThan>
723  void qSortHelper(RandomAccessIterator start, RandomAccessIterator end, const T &t, LessThan lessThan)
724 {
725 top:
726     int span = end - start;
727     if (span < 2)
728         return;
729
730     --end;
731     RandomAccessIterator low = start, high = end - 1;
732     RandomAccessIterator pivot = start + span / 2;
733
734     if (lessThan(*end, *start))
735         qSwap(*end, *start);
736     if (span == 2)
737         return;
738
739     if (lessThan(*pivot, *start))
740         qSwap(*pivot, *start);
741     if (lessThan(*end, *pivot))
742         qSwap(*end, *pivot);
743     if (span == 3)
744         return;
745
746     qSwap(*pivot, *end);
747
748     while (low < high) {
749         while (low < high && lessThan(*low, *end))
750             ++low;
751
752         while (high > low && lessThan(*end, *high))
753             --high;
754
755         if (low < high) {
756             qSwap(*low, *high);
757             ++low;
758             --high;
759         } else {
760             break;
761         }
762     }
763
764     if (lessThan(*low, *end))
765         ++low;
766
767     qSwap(*end, *low);
768     qSortHelper(start, low, t, lessThan);
769
770     start = low + 1;
771     ++end;
772     goto top;
773 }
774
775 template <typename RandomAccessIterator, typename T>
776 inline void qSortHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &dummy)
777 {
778     qSortHelper(begin, end, dummy, qLess<T>());
779 }
780
781 template <typename RandomAccessIterator>
782  void qReverse(RandomAccessIterator begin, RandomAccessIterator end)
783 {
784     --end;
785     while (begin < end)
786         qSwap(*begin++, *end--);
787 }
788
789 template <typename RandomAccessIterator>
790  void qRotate(RandomAccessIterator begin, RandomAccessIterator middle, RandomAccessIterator end)
791 {
792     qReverse(begin, middle);
793     qReverse(middle, end);
794     qReverse(begin, end);
795 }
796
797 template <typename RandomAccessIterator, typename T, typename LessThan>
798  void qMerge(RandomAccessIterator begin, RandomAccessIterator pivot, RandomAccessIterator end, T &t, LessThan lessThan)
799 {
800     const int len1 = pivot - begin;
801     const int len2 = end - pivot;
802
803     if (len1 == 0 || len2 == 0)
804         return;
805
806     if (len1 + len2 == 2) {
807         if (lessThan(*(begin + 1), *(begin)))
808             qSwap(*begin, *(begin + 1));
809         return;
810     }
811
812     RandomAccessIterator firstCut;
813     RandomAccessIterator secondCut;
814     int len2Half;
815     if (len1 > len2) {
816         const int len1Half = len1 / 2;
817         firstCut = begin + len1Half;
818         secondCut = qLowerBound(pivot, end, *firstCut, lessThan);
819         len2Half = secondCut - pivot;
820     } else {
821         len2Half = len2 / 2;
822         secondCut = pivot + len2Half;
823         firstCut = qUpperBound(begin, pivot, *secondCut, lessThan);
824     }
825
826     qRotate(firstCut, pivot, secondCut);
827     const RandomAccessIterator newPivot = firstCut + len2Half;
828     qMerge(begin, firstCut, newPivot, t, lessThan);
829     qMerge(newPivot, secondCut, end, t, lessThan);
830 }
831
832 template <typename RandomAccessIterator, typename T, typename LessThan>
833  void qStableSortHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &t, LessThan lessThan)
834 {
835     const int span = end - begin;
836     if (span < 2)
837        return;
838
839     const RandomAccessIterator middle = begin + span / 2;
840     qStableSortHelper(begin, middle, t, lessThan);
841     qStableSortHelper(middle, end, t, lessThan);
842     qMerge(begin, middle, end, t, lessThan);
843 }
844
845 template <typename RandomAccessIterator, typename T>
846 inline void qStableSortHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &dummy)
847 {
848     qStableSortHelper(begin, end, dummy, qLess<T>());
849 }
850
851 template <typename RandomAccessIterator, typename T, typename LessThan>
852  RandomAccessIterator qLowerBoundHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan)
853 {
854     RandomAccessIterator middle;
855     int n = end - begin;
856     int half;
857
858     while (n > 0) {
859         half = n >> 1;
860         middle = begin + half;
861         if (lessThan(*middle, value)) {
862             begin = middle + 1;
863             n -= half + 1;
864         } else {
865             n = half;
866         }
867     }
868     return begin;
869 }
870
871
872 template <typename RandomAccessIterator, typename T, typename LessThan>
873  RandomAccessIterator qUpperBoundHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan)
874 {
875     RandomAccessIterator middle;
876     int n = end - begin;
877     int half;
878
879     while (n > 0) {
880         half = n >> 1;
881         middle = begin + half;
882         if (lessThan(value, *middle)) {
883             n = half;
884         } else {
885             begin = middle + 1;
886             n -= half + 1;
887         }
888     }
889     return begin;
890 }
891
892 template <typename RandomAccessIterator, typename T, typename LessThan>
893  RandomAccessIterator qBinaryFindHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan)
894 {
895     int l = 0;
896     int r = end - begin - 1;
897     if (r < 0)
898         return end;
899     int i = (l + r + 1) / 2;
900
901     while (r != l) {
902         if (lessThan(value, begin[i]))
903             r = i - 1;
904         else
905             l = i;
906         i = (l + r + 1) / 2;
907     }
908     if (lessThan(begin[i], value) || lessThan(value, begin[i]))
909         return end;
910     else
911         return begin + i;
912 }
913
914 }
915
916
917 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qalgorithms.h" 2
918 # 43 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qstringlist.h" 2
919 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qdatastream.h" 1
920 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/io/qdatastream.h" 1
921 # 42 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/io/qdatastream.h"
922 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qiodevice.h" 1
923 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/io/qiodevice.h" 1
924 # 45 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/io/qiodevice.h"
925 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qobjectdefs.h" 1
926 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/kernel/qobjectdefs.h" 1
927 # 42 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/kernel/qobjectdefs.h"
928 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qnamespace.h" 1
929 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/global/qnamespace.h" 1
930 # 42 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/global/qnamespace.h"
931 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qglobal.h" 1
932 # 43 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/global/qnamespace.h" 2
933
934
935
936 typedef QtValidLicenseForCoreModule QtCoreModule;
937
938
939 namespace
940
941
942
943 Qt {
944 # 75 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/global/qnamespace.h"
945     enum GlobalColor {
946         color0,
947         color1,
948         black,
949         white,
950         darkGray,
951         gray,
952         lightGray,
953         red,
954         green,
955         blue,
956         cyan,
957         magenta,
958         yellow,
959         darkRed,
960         darkGreen,
961         darkBlue,
962         darkCyan,
963         darkMagenta,
964         darkYellow,
965         transparent
966     };
967
968     enum KeyboardModifier {
969         NoModifier = 0x00000000,
970         ShiftModifier = 0x02000000,
971         ControlModifier = 0x04000000,
972         AltModifier = 0x08000000,
973         MetaModifier = 0x10000000,
974         KeypadModifier = 0x20000000,
975         GroupSwitchModifier = 0x40000000,
976
977         KeyboardModifierMask = 0xfe000000
978     };
979     typedef QFlags<KeyboardModifier> KeyboardModifiers;
980
981
982     enum Modifier {
983         META = Qt::MetaModifier,
984         SHIFT = Qt::ShiftModifier,
985         CTRL = Qt::ControlModifier,
986         ALT = Qt::AltModifier,
987         MODIFIER_MASK = KeyboardModifierMask,
988         UNICODE_ACCEL = 0x00000000
989     };
990
991     enum MouseButton {
992         NoButton = 0x00000000,
993         LeftButton = 0x00000001,
994         RightButton = 0x00000002,
995         MidButton = 0x00000004,
996         XButton1 = 0x00000008,
997         XButton2 = 0x00000010,
998         MouseButtonMask = 0x000000ff
999     };
1000     typedef QFlags<MouseButton> MouseButtons;
1001 # 144 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/global/qnamespace.h"
1002     enum Orientation {
1003         Horizontal = 0x1,
1004         Vertical = 0x2
1005     };
1006
1007     typedef QFlags<Orientation> Orientations;
1008
1009     enum FocusPolicy {
1010         NoFocus = 0,
1011         TabFocus = 0x1,
1012         ClickFocus = 0x2,
1013         StrongFocus = TabFocus | ClickFocus | 0x8,
1014         WheelFocus = StrongFocus | 0x4
1015     };
1016
1017     enum SortOrder {
1018         AscendingOrder,
1019         DescendingOrder
1020
1021
1022
1023
1024     };
1025
1026
1027
1028
1029
1030     enum AlignmentFlag {
1031         AlignLeft = 0x0001,
1032         AlignLeading = AlignLeft,
1033         AlignRight = 0x0002,
1034         AlignTrailing = AlignRight,
1035         AlignHCenter = 0x0004,
1036         AlignJustify = 0x0008,
1037         AlignAbsolute = 0x0010,
1038         AlignHorizontal_Mask = AlignLeft | AlignRight | AlignHCenter | AlignJustify | AlignAbsolute,
1039
1040         AlignTop = 0x0020,
1041         AlignBottom = 0x0040,
1042         AlignVCenter = 0x0080,
1043         AlignVertical_Mask = AlignTop | AlignBottom | AlignVCenter,
1044
1045         AlignCenter = AlignVCenter | AlignHCenter
1046
1047
1048
1049     };
1050
1051     typedef QFlags<AlignmentFlag> Alignment;
1052
1053     enum TextFlag {
1054         TextSingleLine = 0x0100,
1055         TextDontClip = 0x0200,
1056         TextExpandTabs = 0x0400,
1057         TextShowMnemonic = 0x0800,
1058         TextWordWrap = 0x1000,
1059         TextWrapAnywhere = 0x2000,
1060         TextDontPrint = 0x4000,
1061         TextIncludeTrailingSpaces = 0x08000000,
1062         TextHideMnemonic = 0x8000,
1063         TextJustificationForced = 0x10000
1064 # 218 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/global/qnamespace.h"
1065     };
1066
1067
1068
1069
1070     enum TextElideMode {
1071         ElideLeft,
1072         ElideRight,
1073         ElideMiddle,
1074         ElideNone
1075     };
1076
1077     enum WindowType {
1078         Widget = 0x00000000,
1079         Window = 0x00000001,
1080         Dialog = 0x00000002 | Window,
1081         Sheet = 0x00000004 | Window,
1082         Drawer = 0x00000006 | Window,
1083         Popup = 0x00000008 | Window,
1084         Tool = 0x0000000a | Window,
1085         ToolTip = 0x0000000c | Window,
1086         SplashScreen = 0x0000000e | Window,
1087         Desktop = 0x00000010 | Window,
1088         SubWindow = 0x00000012,
1089
1090         WindowType_Mask = 0x000000ff,
1091         MSWindowsFixedSizeDialogHint = 0x00000100,
1092         MSWindowsOwnDC = 0x00000200,
1093         X11BypassWindowManagerHint = 0x00000400,
1094         FramelessWindowHint = 0x00000800,
1095         WindowTitleHint = 0x00001000,
1096         WindowSystemMenuHint = 0x00002000,
1097         WindowMinimizeButtonHint = 0x00004000,
1098         WindowMaximizeButtonHint = 0x00008000,
1099         WindowMinMaxButtonsHint = WindowMinimizeButtonHint | WindowMaximizeButtonHint,
1100         WindowContextHelpButtonHint = 0x00010000,
1101         WindowShadeButtonHint = 0x00020000,
1102         WindowStaysOnTopHint = 0x00040000,
1103         CustomizeWindowHint = 0x02000000
1104 # 307 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/global/qnamespace.h"
1105     };
1106
1107     typedef QFlags<WindowType> WindowFlags;
1108
1109     enum WindowState {
1110         WindowNoState = 0x00000000,
1111         WindowMinimized = 0x00000001,
1112         WindowMaximized = 0x00000002,
1113         WindowFullScreen = 0x00000004,
1114         WindowActive = 0x00000008
1115     };
1116
1117     typedef QFlags<WindowState> WindowStates;
1118
1119     enum WidgetAttribute {
1120         WA_Disabled = 0,
1121         WA_UnderMouse = 1,
1122         WA_MouseTracking = 2,
1123         WA_ContentsPropagated = 3,
1124         WA_OpaquePaintEvent = 4,
1125         WA_NoBackground = WA_OpaquePaintEvent,
1126         WA_StaticContents = 5,
1127         WA_LaidOut = 7,
1128         WA_PaintOnScreen = 8,
1129         WA_NoSystemBackground = 9,
1130         WA_UpdatesDisabled = 10,
1131         WA_Mapped = 11,
1132         WA_MacNoClickThrough = 12,
1133         WA_PaintOutsidePaintEvent = 13,
1134         WA_InputMethodEnabled = 14,
1135         WA_WState_Visible = 15,
1136         WA_WState_Hidden = 16,
1137
1138         WA_ForceDisabled = 32,
1139         WA_KeyCompression = 33,
1140         WA_PendingMoveEvent = 34,
1141         WA_PendingResizeEvent = 35,
1142         WA_SetPalette = 36,
1143         WA_SetFont = 37,
1144         WA_SetCursor = 38,
1145         WA_NoChildEventsFromChildren = 39,
1146         WA_WindowModified = 41,
1147         WA_Resized = 42,
1148         WA_Moved = 43,
1149         WA_PendingUpdate = 44,
1150         WA_InvalidSize = 45,
1151         WA_MacBrushedMetal = 46,
1152         WA_MacMetalStyle = WA_MacBrushedMetal,
1153         WA_CustomWhatsThis = 47,
1154         WA_LayoutOnEntireRect = 48,
1155         WA_OutsideWSRange = 49,
1156         WA_GrabbedShortcut = 50,
1157         WA_TransparentForMouseEvents = 51,
1158         WA_PaintUnclipped = 52,
1159         WA_SetWindowIcon = 53,
1160         WA_NoMouseReplay = 54,
1161         WA_DeleteOnClose = 55,
1162         WA_RightToLeft = 56,
1163         WA_SetLayoutDirection = 57,
1164         WA_NoChildEventsForParent = 58,
1165         WA_ForceUpdatesDisabled = 59,
1166
1167         WA_WState_Created = 60,
1168         WA_WState_CompressKeys = 61,
1169         WA_WState_InPaintEvent = 62,
1170         WA_WState_Reparented = 63,
1171         WA_WState_ConfigPending = 64,
1172         WA_WState_Polished = 66,
1173         WA_WState_DND = 67,
1174         WA_WState_OwnSizePolicy = 68,
1175         WA_WState_ExplicitShowHide = 69,
1176
1177         WA_ShowModal = 70,
1178         WA_MouseNoMask = 71,
1179         WA_GroupLeader = 72,
1180         WA_NoMousePropagation = 73,
1181         WA_Hover = 74,
1182         WA_InputMethodTransparent = 75,
1183         WA_QuitOnClose = 76,
1184
1185         WA_KeyboardFocusChange = 77,
1186
1187         WA_AcceptDrops = 78,
1188         WA_DropSiteRegistered = 79,
1189         WA_ForceAcceptDrops = WA_DropSiteRegistered,
1190
1191         WA_WindowPropagation = 80,
1192
1193         WA_NoX11EventCompression = 81,
1194         WA_TintedBackground = 82,
1195         WA_X11OpenGLOverlay = 83,
1196         WA_AlwaysShowToolTips = 84,
1197         WA_MacOpaqueSizeGrip = 85,
1198         WA_SetStyle = 86,
1199
1200         WA_SetLocale = 87,
1201         WA_MacShowFocusRect = 88,
1202
1203         WA_MacNormalSize = 89,
1204         WA_MacSmallSize = 90,
1205         WA_MacMiniSize = 91,
1206
1207         WA_LayoutUsesWidgetRect = 92,
1208         WA_StyledBackground = 93,
1209         WA_MSWindowsUseDirect3D = 94,
1210         WA_CanHostQMdiSubWindowTitleBar = 95,
1211
1212         WA_MacAlwaysShowToolWindow = 96,
1213
1214         WA_StyleSheet = 97,
1215
1216
1217         WA_AttributeCount
1218     };
1219
1220     enum ApplicationAttribute
1221     {
1222         AA_ImmediateWidgetCreation = 0,
1223         AA_MSWindowsUseDirect3DByDefault = 1,
1224
1225
1226         AA_AttributeCount
1227     };
1228
1229
1230
1231
1232
1233     enum ImageConversionFlag {
1234         ColorMode_Mask = 0x00000003,
1235         AutoColor = 0x00000000,
1236         ColorOnly = 0x00000003,
1237         MonoOnly = 0x00000002,
1238
1239
1240         AlphaDither_Mask = 0x0000000c,
1241         ThresholdAlphaDither = 0x00000000,
1242         OrderedAlphaDither = 0x00000004,
1243         DiffuseAlphaDither = 0x00000008,
1244         NoAlpha = 0x0000000c,
1245
1246         Dither_Mask = 0x00000030,
1247         DiffuseDither = 0x00000000,
1248         OrderedDither = 0x00000010,
1249         ThresholdDither = 0x00000020,
1250
1251
1252         DitherMode_Mask = 0x000000c0,
1253         AutoDither = 0x00000000,
1254         PreferDither = 0x00000040,
1255         AvoidDither = 0x00000080
1256     };
1257     typedef QFlags<ImageConversionFlag> ImageConversionFlags;
1258
1259     enum BGMode {
1260         TransparentMode,
1261         OpaqueMode
1262     };
1263 # 485 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/global/qnamespace.h"
1264     enum Key {
1265         Key_Escape = 0x01000000,
1266         Key_Tab = 0x01000001,
1267         Key_Backtab = 0x01000002,
1268
1269
1270
1271         Key_Backspace = 0x01000003,
1272
1273
1274
1275         Key_Return = 0x01000004,
1276         Key_Enter = 0x01000005,
1277         Key_Insert = 0x01000006,
1278         Key_Delete = 0x01000007,
1279         Key_Pause = 0x01000008,
1280         Key_Print = 0x01000009,
1281         Key_SysReq = 0x0100000a,
1282         Key_Clear = 0x0100000b,
1283         Key_Home = 0x01000010,
1284         Key_End = 0x01000011,
1285         Key_Left = 0x01000012,
1286         Key_Up = 0x01000013,
1287         Key_Right = 0x01000014,
1288         Key_Down = 0x01000015,
1289         Key_PageUp = 0x01000016,
1290
1291
1292
1293         Key_PageDown = 0x01000017,
1294
1295
1296
1297         Key_Shift = 0x01000020,
1298         Key_Control = 0x01000021,
1299         Key_Meta = 0x01000022,
1300         Key_Alt = 0x01000023,
1301         Key_CapsLock = 0x01000024,
1302         Key_NumLock = 0x01000025,
1303         Key_ScrollLock = 0x01000026,
1304         Key_F1 = 0x01000030,
1305         Key_F2 = 0x01000031,
1306         Key_F3 = 0x01000032,
1307         Key_F4 = 0x01000033,
1308         Key_F5 = 0x01000034,
1309         Key_F6 = 0x01000035,
1310         Key_F7 = 0x01000036,
1311         Key_F8 = 0x01000037,
1312         Key_F9 = 0x01000038,
1313         Key_F10 = 0x01000039,
1314         Key_F11 = 0x0100003a,
1315         Key_F12 = 0x0100003b,
1316         Key_F13 = 0x0100003c,
1317         Key_F14 = 0x0100003d,
1318         Key_F15 = 0x0100003e,
1319         Key_F16 = 0x0100003f,
1320         Key_F17 = 0x01000040,
1321         Key_F18 = 0x01000041,
1322         Key_F19 = 0x01000042,
1323         Key_F20 = 0x01000043,
1324         Key_F21 = 0x01000044,
1325         Key_F22 = 0x01000045,
1326         Key_F23 = 0x01000046,
1327         Key_F24 = 0x01000047,
1328         Key_F25 = 0x01000048,
1329         Key_F26 = 0x01000049,
1330         Key_F27 = 0x0100004a,
1331         Key_F28 = 0x0100004b,
1332         Key_F29 = 0x0100004c,
1333         Key_F30 = 0x0100004d,
1334         Key_F31 = 0x0100004e,
1335         Key_F32 = 0x0100004f,
1336         Key_F33 = 0x01000050,
1337         Key_F34 = 0x01000051,
1338         Key_F35 = 0x01000052,
1339         Key_Super_L = 0x01000053,
1340         Key_Super_R = 0x01000054,
1341         Key_Menu = 0x01000055,
1342         Key_Hyper_L = 0x01000056,
1343         Key_Hyper_R = 0x01000057,
1344         Key_Help = 0x01000058,
1345         Key_Direction_L = 0x01000059,
1346         Key_Direction_R = 0x01000060,
1347         Key_Space = 0x20,
1348         Key_Any = Key_Space,
1349         Key_Exclam = 0x21,
1350         Key_QuoteDbl = 0x22,
1351         Key_NumberSign = 0x23,
1352         Key_Dollar = 0x24,
1353         Key_Percent = 0x25,
1354         Key_Ampersand = 0x26,
1355         Key_Apostrophe = 0x27,
1356         Key_ParenLeft = 0x28,
1357         Key_ParenRight = 0x29,
1358         Key_Asterisk = 0x2a,
1359         Key_Plus = 0x2b,
1360         Key_Comma = 0x2c,
1361         Key_Minus = 0x2d,
1362         Key_Period = 0x2e,
1363         Key_Slash = 0x2f,
1364         Key_0 = 0x30,
1365         Key_1 = 0x31,
1366         Key_2 = 0x32,
1367         Key_3 = 0x33,
1368         Key_4 = 0x34,
1369         Key_5 = 0x35,
1370         Key_6 = 0x36,
1371         Key_7 = 0x37,
1372         Key_8 = 0x38,
1373         Key_9 = 0x39,
1374         Key_Colon = 0x3a,
1375         Key_Semicolon = 0x3b,
1376         Key_Less = 0x3c,
1377         Key_Equal = 0x3d,
1378         Key_Greater = 0x3e,
1379         Key_Question = 0x3f,
1380         Key_At = 0x40,
1381         Key_A = 0x41,
1382         Key_B = 0x42,
1383         Key_C = 0x43,
1384         Key_D = 0x44,
1385         Key_E = 0x45,
1386         Key_F = 0x46,
1387         Key_G = 0x47,
1388         Key_H = 0x48,
1389         Key_I = 0x49,
1390         Key_J = 0x4a,
1391         Key_K = 0x4b,
1392         Key_L = 0x4c,
1393         Key_M = 0x4d,
1394         Key_N = 0x4e,
1395         Key_O = 0x4f,
1396         Key_P = 0x50,
1397         Key_Q = 0x51,
1398         Key_R = 0x52,
1399         Key_S = 0x53,
1400         Key_T = 0x54,
1401         Key_U = 0x55,
1402         Key_V = 0x56,
1403         Key_W = 0x57,
1404         Key_X = 0x58,
1405         Key_Y = 0x59,
1406         Key_Z = 0x5a,
1407         Key_BracketLeft = 0x5b,
1408         Key_Backslash = 0x5c,
1409         Key_BracketRight = 0x5d,
1410         Key_AsciiCircum = 0x5e,
1411         Key_Underscore = 0x5f,
1412         Key_QuoteLeft = 0x60,
1413         Key_BraceLeft = 0x7b,
1414         Key_Bar = 0x7c,
1415         Key_BraceRight = 0x7d,
1416         Key_AsciiTilde = 0x7e,
1417
1418         Key_nobreakspace = 0x0a0,
1419         Key_exclamdown = 0x0a1,
1420         Key_cent = 0x0a2,
1421         Key_sterling = 0x0a3,
1422         Key_currency = 0x0a4,
1423         Key_yen = 0x0a5,
1424         Key_brokenbar = 0x0a6,
1425         Key_section = 0x0a7,
1426         Key_diaeresis = 0x0a8,
1427         Key_copyright = 0x0a9,
1428         Key_ordfeminine = 0x0aa,
1429         Key_guillemotleft = 0x0ab,
1430         Key_notsign = 0x0ac,
1431         Key_hyphen = 0x0ad,
1432         Key_registered = 0x0ae,
1433         Key_macron = 0x0af,
1434         Key_degree = 0x0b0,
1435         Key_plusminus = 0x0b1,
1436         Key_twosuperior = 0x0b2,
1437         Key_threesuperior = 0x0b3,
1438         Key_acute = 0x0b4,
1439         Key_mu = 0x0b5,
1440         Key_paragraph = 0x0b6,
1441         Key_periodcentered = 0x0b7,
1442         Key_cedilla = 0x0b8,
1443         Key_onesuperior = 0x0b9,
1444         Key_masculine = 0x0ba,
1445         Key_guillemotright = 0x0bb,
1446         Key_onequarter = 0x0bc,
1447         Key_onehalf = 0x0bd,
1448         Key_threequarters = 0x0be,
1449         Key_questiondown = 0x0bf,
1450         Key_Agrave = 0x0c0,
1451         Key_Aacute = 0x0c1,
1452         Key_Acircumflex = 0x0c2,
1453         Key_Atilde = 0x0c3,
1454         Key_Adiaeresis = 0x0c4,
1455         Key_Aring = 0x0c5,
1456         Key_AE = 0x0c6,
1457         Key_Ccedilla = 0x0c7,
1458         Key_Egrave = 0x0c8,
1459         Key_Eacute = 0x0c9,
1460         Key_Ecircumflex = 0x0ca,
1461         Key_Ediaeresis = 0x0cb,
1462         Key_Igrave = 0x0cc,
1463         Key_Iacute = 0x0cd,
1464         Key_Icircumflex = 0x0ce,
1465         Key_Idiaeresis = 0x0cf,
1466         Key_ETH = 0x0d0,
1467         Key_Ntilde = 0x0d1,
1468         Key_Ograve = 0x0d2,
1469         Key_Oacute = 0x0d3,
1470         Key_Ocircumflex = 0x0d4,
1471         Key_Otilde = 0x0d5,
1472         Key_Odiaeresis = 0x0d6,
1473         Key_multiply = 0x0d7,
1474         Key_Ooblique = 0x0d8,
1475         Key_Ugrave = 0x0d9,
1476         Key_Uacute = 0x0da,
1477         Key_Ucircumflex = 0x0db,
1478         Key_Udiaeresis = 0x0dc,
1479         Key_Yacute = 0x0dd,
1480         Key_THORN = 0x0de,
1481         Key_ssharp = 0x0df,
1482 # 728 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/global/qnamespace.h"
1483         Key_division = 0x0f7,
1484 # 738 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/global/qnamespace.h"
1485         Key_ydiaeresis = 0x0ff,
1486
1487
1488
1489
1490
1491
1492         Key_AltGr = 0x01001103,
1493         Key_Multi_key = 0x01001120,
1494         Key_Codeinput = 0x01001137,
1495         Key_SingleCandidate = 0x0100113c,
1496         Key_MultipleCandidate = 0x0100113d,
1497         Key_PreviousCandidate = 0x0100113e,
1498
1499
1500         Key_Mode_switch = 0x0100117e,
1501
1502
1503
1504         Key_Kanji = 0x01001121,
1505         Key_Muhenkan = 0x01001122,
1506
1507         Key_Henkan = 0x01001123,
1508         Key_Romaji = 0x01001124,
1509         Key_Hiragana = 0x01001125,
1510         Key_Katakana = 0x01001126,
1511         Key_Hiragana_Katakana = 0x01001127,
1512         Key_Zenkaku = 0x01001128,
1513         Key_Hankaku = 0x01001129,
1514         Key_Zenkaku_Hankaku = 0x0100112a,
1515         Key_Touroku = 0x0100112b,
1516         Key_Massyo = 0x0100112c,
1517         Key_Kana_Lock = 0x0100112d,
1518         Key_Kana_Shift = 0x0100112e,
1519         Key_Eisu_Shift = 0x0100112f,
1520         Key_Eisu_toggle = 0x01001130,
1521 # 783 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/global/qnamespace.h"
1522         Key_Hangul = 0x01001131,
1523         Key_Hangul_Start = 0x01001132,
1524         Key_Hangul_End = 0x01001133,
1525         Key_Hangul_Hanja = 0x01001134,
1526         Key_Hangul_Jamo = 0x01001135,
1527         Key_Hangul_Romaja = 0x01001136,
1528
1529         Key_Hangul_Jeonja = 0x01001138,
1530         Key_Hangul_Banja = 0x01001139,
1531         Key_Hangul_PreHanja = 0x0100113a,
1532         Key_Hangul_PostHanja = 0x0100113b,
1533
1534
1535
1536         Key_Hangul_Special = 0x0100113f,
1537
1538
1539
1540         Key_Dead_Grave = 0x01001250,
1541         Key_Dead_Acute = 0x01001251,
1542         Key_Dead_Circumflex = 0x01001252,
1543         Key_Dead_Tilde = 0x01001253,
1544         Key_Dead_Macron = 0x01001254,
1545         Key_Dead_Breve = 0x01001255,
1546         Key_Dead_Abovedot = 0x01001256,
1547         Key_Dead_Diaeresis = 0x01001257,
1548         Key_Dead_Abovering = 0x01001258,
1549         Key_Dead_Doubleacute = 0x01001259,
1550         Key_Dead_Caron = 0x0100125a,
1551         Key_Dead_Cedilla = 0x0100125b,
1552         Key_Dead_Ogonek = 0x0100125c,
1553         Key_Dead_Iota = 0x0100125d,
1554         Key_Dead_Voiced_Sound = 0x0100125e,
1555         Key_Dead_Semivoiced_Sound = 0x0100125f,
1556         Key_Dead_Belowdot = 0x01001260,
1557         Key_Dead_Hook = 0x01001261,
1558         Key_Dead_Horn = 0x01001262,
1559
1560
1561
1562         Key_Back = 0x01000061,
1563         Key_Forward = 0x01000062,
1564         Key_Stop = 0x01000063,
1565         Key_Refresh = 0x01000064,
1566
1567         Key_VolumeDown = 0x01000070,
1568         Key_VolumeMute = 0x01000071,
1569         Key_VolumeUp = 0x01000072,
1570         Key_BassBoost = 0x01000073,
1571         Key_BassUp = 0x01000074,
1572         Key_BassDown = 0x01000075,
1573         Key_TrebleUp = 0x01000076,
1574         Key_TrebleDown = 0x01000077,
1575
1576         Key_MediaPlay = 0x01000080,
1577         Key_MediaStop = 0x01000081,
1578         Key_MediaPrevious = 0x01000082,
1579
1580
1581
1582         Key_MediaNext = 0x01000083,
1583         Key_MediaRecord = 0x01000084,
1584
1585         Key_HomePage = 0x01000090,
1586         Key_Favorites = 0x01000091,
1587         Key_Search = 0x01000092,
1588         Key_Standby = 0x01000093,
1589         Key_OpenUrl = 0x01000094,
1590
1591         Key_LaunchMail = 0x010000a0,
1592         Key_LaunchMedia = 0x010000a1,
1593         Key_Launch0 = 0x010000a2,
1594         Key_Launch1 = 0x010000a3,
1595         Key_Launch2 = 0x010000a4,
1596         Key_Launch3 = 0x010000a5,
1597         Key_Launch4 = 0x010000a6,
1598         Key_Launch5 = 0x010000a7,
1599         Key_Launch6 = 0x010000a8,
1600         Key_Launch7 = 0x010000a9,
1601         Key_Launch8 = 0x010000aa,
1602         Key_Launch9 = 0x010000ab,
1603         Key_LaunchA = 0x010000ac,
1604         Key_LaunchB = 0x010000ad,
1605         Key_LaunchC = 0x010000ae,
1606         Key_LaunchD = 0x010000af,
1607         Key_LaunchE = 0x010000b0,
1608         Key_LaunchF = 0x010000b1,
1609
1610         Key_MediaLast = 0x0100ffff,
1611
1612
1613         Key_Select = 0x01010000,
1614         Key_Yes = 0x01010001,
1615         Key_No = 0x01010002,
1616
1617
1618         Key_Cancel = 0x01020001,
1619         Key_Printer = 0x01020002,
1620         Key_Execute = 0x01020003,
1621         Key_Sleep = 0x01020004,
1622         Key_Play = 0x01020005,
1623         Key_Zoom = 0x01020006,
1624
1625
1626
1627
1628
1629         Key_Context1 = 0x01100000,
1630         Key_Context2 = 0x01100001,
1631         Key_Context3 = 0x01100002,
1632         Key_Context4 = 0x01100003,
1633         Key_Call = 0x01100004,
1634         Key_Hangup = 0x01100005,
1635         Key_Flip = 0x01100006,
1636
1637         Key_unknown = 0x01ffffff
1638     };
1639
1640     enum ArrowType {
1641         NoArrow,
1642         UpArrow,
1643         DownArrow,
1644         LeftArrow,
1645         RightArrow
1646     };
1647
1648     enum PenStyle {
1649         NoPen,
1650         SolidLine,
1651         DashLine,
1652         DotLine,
1653         DashDotLine,
1654         DashDotDotLine,
1655         CustomDashLine
1656
1657         , MPenStyle = 0x0f
1658
1659     };
1660
1661     enum PenCapStyle {
1662         FlatCap = 0x00,
1663         SquareCap = 0x10,
1664         RoundCap = 0x20,
1665         MPenCapStyle = 0x30
1666     };
1667
1668     enum PenJoinStyle {
1669         MiterJoin = 0x00,
1670         BevelJoin = 0x40,
1671         RoundJoin = 0x80,
1672         SvgMiterJoin = 0x100,
1673         MPenJoinStyle = 0x1c0
1674     };
1675
1676     enum BrushStyle {
1677         NoBrush,
1678         SolidPattern,
1679         Dense1Pattern,
1680         Dense2Pattern,
1681         Dense3Pattern,
1682         Dense4Pattern,
1683         Dense5Pattern,
1684         Dense6Pattern,
1685         Dense7Pattern,
1686         HorPattern,
1687         VerPattern,
1688         CrossPattern,
1689         BDiagPattern,
1690         FDiagPattern,
1691         DiagCrossPattern,
1692         LinearGradientPattern,
1693         RadialGradientPattern,
1694         ConicalGradientPattern,
1695         TexturePattern = 24
1696
1697
1698
1699     };
1700 # 1020 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/global/qnamespace.h"
1701     enum UIEffect {
1702         UI_General,
1703         UI_AnimateMenu,
1704         UI_FadeMenu,
1705         UI_AnimateCombo,
1706         UI_AnimateTooltip,
1707         UI_FadeTooltip,
1708         UI_AnimateToolBox
1709     };
1710
1711     enum CursorShape {
1712         ArrowCursor,
1713         UpArrowCursor,
1714         CrossCursor,
1715         WaitCursor,
1716         IBeamCursor,
1717         SizeVerCursor,
1718         SizeHorCursor,
1719         SizeBDiagCursor,
1720         SizeFDiagCursor,
1721         SizeAllCursor,
1722         BlankCursor,
1723         SplitVCursor,
1724         SplitHCursor,
1725         PointingHandCursor,
1726         ForbiddenCursor,
1727         WhatsThisCursor,
1728         BusyCursor,
1729         OpenHandCursor,
1730         ClosedHandCursor,
1731         LastCursor = ClosedHandCursor,
1732         BitmapCursor = 24,
1733         CustomCursor = 25
1734 # 1073 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/global/qnamespace.h"
1735     };
1736
1737     enum TextFormat {
1738         PlainText,
1739         RichText,
1740         AutoText,
1741         LogText
1742     };
1743
1744     enum AspectRatioMode {
1745         IgnoreAspectRatio,
1746         KeepAspectRatio,
1747         KeepAspectRatioByExpanding
1748
1749
1750
1751
1752
1753     };
1754
1755
1756
1757
1758     enum AnchorAttribute {
1759         AnchorName,
1760         AnchorHref
1761     };
1762
1763     enum DockWidgetArea {
1764         LeftDockWidgetArea = 0x1,
1765         RightDockWidgetArea = 0x2,
1766         TopDockWidgetArea = 0x4,
1767         BottomDockWidgetArea = 0x8,
1768
1769         DockWidgetArea_Mask = 0xf,
1770         AllDockWidgetAreas = DockWidgetArea_Mask,
1771         NoDockWidgetArea = 0
1772     };
1773     enum DockWidgetAreaSizes {
1774         NDockWidgetAreas = 4
1775     };
1776
1777     typedef QFlags<DockWidgetArea> DockWidgetAreas;
1778
1779     enum ToolBarArea {
1780         LeftToolBarArea = 0x1,
1781         RightToolBarArea = 0x2,
1782         TopToolBarArea = 0x4,
1783         BottomToolBarArea = 0x8,
1784
1785         ToolBarArea_Mask = 0xf,
1786         AllToolBarAreas = ToolBarArea_Mask,
1787         NoToolBarArea = 0
1788     };
1789
1790     enum ToolBarAreaSizes {
1791         NToolBarAreas = 4
1792     };
1793
1794     typedef QFlags<ToolBarArea> ToolBarAreas;
1795 # 1156 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/global/qnamespace.h"
1796     enum DateFormat {
1797         TextDate,
1798         ISODate,
1799         SystemLocaleDate,
1800         LocalDate = SystemLocaleDate,
1801         LocaleDate
1802     };
1803
1804     enum TimeSpec {
1805         LocalTime,
1806         UTC
1807     };
1808
1809     enum DayOfWeek {
1810         Monday = 1,
1811         Tuesday = 2,
1812         Wednesday = 3,
1813         Thursday = 4,
1814         Friday = 5,
1815         Saturday = 6,
1816         Sunday = 7
1817     };
1818
1819     enum ScrollBarPolicy {
1820         ScrollBarAsNeeded,
1821         ScrollBarAlwaysOff,
1822         ScrollBarAlwaysOn
1823     };
1824 # 1210 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/global/qnamespace.h"
1825     enum CaseSensitivity {
1826         CaseInsensitive,
1827         CaseSensitive
1828     };
1829
1830     enum Corner {
1831         TopLeftCorner = 0x00000,
1832         TopRightCorner = 0x00001,
1833         BottomLeftCorner = 0x00002,
1834         BottomRightCorner = 0x00003
1835
1836
1837
1838
1839
1840
1841     };
1842
1843     enum ConnectionType {
1844         AutoConnection,
1845         DirectConnection,
1846         QueuedConnection,
1847         AutoCompatConnection,
1848         BlockingQueuedConnection
1849     };
1850
1851     enum ShortcutContext {
1852         WidgetShortcut,
1853         WindowShortcut,
1854         ApplicationShortcut
1855     };
1856
1857     enum FillRule {
1858         OddEvenFill,
1859         WindingFill
1860     };
1861
1862     enum MaskMode {
1863         MaskInColor,
1864         MaskOutColor
1865     };
1866
1867     enum ClipOperation {
1868         NoClip,
1869         ReplaceClip,
1870         IntersectClip,
1871         UniteClip
1872     };
1873
1874
1875     enum ItemSelectionMode {
1876         ContainsItemShape = 0x0,
1877         IntersectsItemShape = 0x1,
1878         ContainsItemBoundingRect = 0x2,
1879         IntersectsItemBoundingRect = 0x3
1880     };
1881
1882     enum TransformationMode {
1883         FastTransformation,
1884         SmoothTransformation
1885     };
1886
1887     enum Axis {
1888         XAxis,
1889         YAxis,
1890         ZAxis
1891     };
1892
1893     enum FocusReason {
1894         MouseFocusReason,
1895         TabFocusReason,
1896         BacktabFocusReason,
1897         ActiveWindowFocusReason,
1898         PopupFocusReason,
1899         ShortcutFocusReason,
1900         MenuBarFocusReason,
1901         OtherFocusReason,
1902         NoFocusReason
1903     };
1904
1905     enum ContextMenuPolicy {
1906         NoContextMenu,
1907         DefaultContextMenu,
1908         ActionsContextMenu,
1909         CustomContextMenu,
1910         PreventContextMenu
1911     };
1912
1913     enum InputMethodQuery {
1914         ImMicroFocus,
1915         ImFont,
1916         ImCursorPosition,
1917         ImSurroundingText,
1918         ImCurrentSelection
1919     };
1920
1921     enum ToolButtonStyle {
1922         ToolButtonIconOnly,
1923         ToolButtonTextOnly,
1924         ToolButtonTextBesideIcon,
1925         ToolButtonTextUnderIcon
1926     };
1927
1928     enum LayoutDirection {
1929         LeftToRight,
1930         RightToLeft
1931     };
1932
1933     enum DropAction {
1934         CopyAction = 0x1,
1935         MoveAction = 0x2,
1936         LinkAction = 0x4,
1937         ActionMask = 0xff,
1938         TargetMoveAction = 0x8002,
1939         IgnoreAction = 0x0
1940     };
1941     typedef QFlags<DropAction> DropActions;
1942
1943     enum CheckState {
1944         Unchecked,
1945         PartiallyChecked,
1946         Checked
1947     };
1948
1949     enum ItemDataRole {
1950         DisplayRole = 0,
1951         DecorationRole = 1,
1952         EditRole = 2,
1953         ToolTipRole = 3,
1954         StatusTipRole = 4,
1955         WhatsThisRole = 5,
1956
1957         FontRole = 6,
1958         TextAlignmentRole = 7,
1959         BackgroundColorRole = 8,
1960         BackgroundRole = 8,
1961         TextColorRole = 9,
1962         ForegroundRole = 9,
1963         CheckStateRole = 10,
1964
1965         AccessibleTextRole = 11,
1966         AccessibleDescriptionRole = 12,
1967
1968         SizeHintRole = 13,
1969
1970         UserRole = 32
1971     };
1972
1973     enum ItemFlag {
1974         ItemIsSelectable = 1,
1975         ItemIsEditable = 2,
1976         ItemIsDragEnabled = 4,
1977         ItemIsDropEnabled = 8,
1978         ItemIsUserCheckable = 16,
1979         ItemIsEnabled = 32,
1980         ItemIsTristate = 64
1981     };
1982     typedef QFlags<ItemFlag> ItemFlags;
1983
1984     enum MatchFlag {
1985         MatchExactly = 0,
1986         MatchContains = 1,
1987         MatchStartsWith = 2,
1988         MatchEndsWith = 3,
1989         MatchRegExp = 4,
1990         MatchWildcard = 5,
1991         MatchFixedString = 8,
1992         MatchCaseSensitive = 16,
1993         MatchWrap = 32,
1994         MatchRecursive = 64
1995     };
1996     typedef QFlags<MatchFlag> MatchFlags;
1997
1998
1999
2000
2001
2002
2003     typedef unsigned long HANDLE;
2004
2005
2006
2007     typedef WindowFlags WFlags;
2008
2009     enum WindowModality {
2010         NonModal,
2011         WindowModal,
2012         ApplicationModal
2013     };
2014
2015     enum TextInteractionFlag {
2016         NoTextInteraction = 0,
2017         TextSelectableByMouse = 1,
2018         TextSelectableByKeyboard = 2,
2019         LinksAccessibleByMouse = 4,
2020         LinksAccessibleByKeyboard = 8,
2021         TextEditable = 16,
2022
2023         TextEditorInteraction = TextSelectableByMouse | TextSelectableByKeyboard | TextEditable,
2024         TextBrowserInteraction = TextSelectableByMouse | LinksAccessibleByMouse | LinksAccessibleByKeyboard
2025     };
2026     typedef QFlags<TextInteractionFlag> TextInteractionFlags;
2027
2028     enum EventPriority {
2029         HighEventPriority = 1,
2030         NormalEventPriority = 0,
2031         LowEventPriority = -1
2032     };
2033 }
2034
2035
2036
2037
2038
2039 inline QFlags<Qt::MouseButtons::enum_type> operator|(Qt::MouseButtons::enum_type f1, Qt::MouseButtons::enum_type f2) { return QFlags<Qt::MouseButtons::enum_type>(f1) | f2; } inline QFlags<Qt::MouseButtons::enum_type> operator|(Qt::MouseButtons::enum_type f1, QFlags<Qt::MouseButtons::enum_type> f2) { return f2 | f1; }
2040 inline QFlags<Qt::Orientations::enum_type> operator|(Qt::Orientations::enum_type f1, Qt::Orientations::enum_type f2) { return QFlags<Qt::Orientations::enum_type>(f1) | f2; } inline QFlags<Qt::Orientations::enum_type> operator|(Qt::Orientations::enum_type f1, QFlags<Qt::Orientations::enum_type> f2) { return f2 | f1; }
2041 inline QFlags<Qt::KeyboardModifiers::enum_type> operator|(Qt::KeyboardModifiers::enum_type f1, Qt::KeyboardModifiers::enum_type f2) { return QFlags<Qt::KeyboardModifiers::enum_type>(f1) | f2; } inline QFlags<Qt::KeyboardModifiers::enum_type> operator|(Qt::KeyboardModifiers::enum_type f1, QFlags<Qt::KeyboardModifiers::enum_type> f2) { return f2 | f1; }
2042 inline QFlags<Qt::WindowFlags::enum_type> operator|(Qt::WindowFlags::enum_type f1, Qt::WindowFlags::enum_type f2) { return QFlags<Qt::WindowFlags::enum_type>(f1) | f2; } inline QFlags<Qt::WindowFlags::enum_type> operator|(Qt::WindowFlags::enum_type f1, QFlags<Qt::WindowFlags::enum_type> f2) { return f2 | f1; }
2043 inline QFlags<Qt::Alignment::enum_type> operator|(Qt::Alignment::enum_type f1, Qt::Alignment::enum_type f2) { return QFlags<Qt::Alignment::enum_type>(f1) | f2; } inline QFlags<Qt::Alignment::enum_type> operator|(Qt::Alignment::enum_type f1, QFlags<Qt::Alignment::enum_type> f2) { return f2 | f1; }
2044 inline QFlags<Qt::ImageConversionFlags::enum_type> operator|(Qt::ImageConversionFlags::enum_type f1, Qt::ImageConversionFlags::enum_type f2) { return QFlags<Qt::ImageConversionFlags::enum_type>(f1) | f2; } inline QFlags<Qt::ImageConversionFlags::enum_type> operator|(Qt::ImageConversionFlags::enum_type f1, QFlags<Qt::ImageConversionFlags::enum_type> f2) { return f2 | f1; }
2045 inline QFlags<Qt::DockWidgetAreas::enum_type> operator|(Qt::DockWidgetAreas::enum_type f1, Qt::DockWidgetAreas::enum_type f2) { return QFlags<Qt::DockWidgetAreas::enum_type>(f1) | f2; } inline QFlags<Qt::DockWidgetAreas::enum_type> operator|(Qt::DockWidgetAreas::enum_type f1, QFlags<Qt::DockWidgetAreas::enum_type> f2) { return f2 | f1; }
2046 inline QFlags<Qt::ToolBarAreas::enum_type> operator|(Qt::ToolBarAreas::enum_type f1, Qt::ToolBarAreas::enum_type f2) { return QFlags<Qt::ToolBarAreas::enum_type>(f1) | f2; } inline QFlags<Qt::ToolBarAreas::enum_type> operator|(Qt::ToolBarAreas::enum_type f1, QFlags<Qt::ToolBarAreas::enum_type> f2) { return f2 | f1; }
2047 inline QFlags<Qt::WindowStates::enum_type> operator|(Qt::WindowStates::enum_type f1, Qt::WindowStates::enum_type f2) { return QFlags<Qt::WindowStates::enum_type>(f1) | f2; } inline QFlags<Qt::WindowStates::enum_type> operator|(Qt::WindowStates::enum_type f1, QFlags<Qt::WindowStates::enum_type> f2) { return f2 | f1; }
2048 inline QFlags<Qt::DropActions::enum_type> operator|(Qt::DropActions::enum_type f1, Qt::DropActions::enum_type f2) { return QFlags<Qt::DropActions::enum_type>(f1) | f2; } inline QFlags<Qt::DropActions::enum_type> operator|(Qt::DropActions::enum_type f1, QFlags<Qt::DropActions::enum_type> f2) { return f2 | f1; }
2049 inline QFlags<Qt::ItemFlags::enum_type> operator|(Qt::ItemFlags::enum_type f1, Qt::ItemFlags::enum_type f2) { return QFlags<Qt::ItemFlags::enum_type>(f1) | f2; } inline QFlags<Qt::ItemFlags::enum_type> operator|(Qt::ItemFlags::enum_type f1, QFlags<Qt::ItemFlags::enum_type> f2) { return f2 | f1; }
2050 inline QFlags<Qt::MatchFlags::enum_type> operator|(Qt::MatchFlags::enum_type f1, Qt::MatchFlags::enum_type f2) { return QFlags<Qt::MatchFlags::enum_type>(f1) | f2; } inline QFlags<Qt::MatchFlags::enum_type> operator|(Qt::MatchFlags::enum_type f1, QFlags<Qt::MatchFlags::enum_type> f2) { return f2 | f1; }
2051 inline QFlags<Qt::TextInteractionFlags::enum_type> operator|(Qt::TextInteractionFlags::enum_type f1, Qt::TextInteractionFlags::enum_type f2) { return QFlags<Qt::TextInteractionFlags::enum_type>(f1) | f2; } inline QFlags<Qt::TextInteractionFlags::enum_type> operator|(Qt::TextInteractionFlags::enum_type f1, QFlags<Qt::TextInteractionFlags::enum_type> f2) { return f2 | f1; }
2052
2053 typedef bool (*qInternalCallback)(void **);
2054
2055 class QInternal {
2056 public:
2057     enum PaintDeviceFlags {
2058         UnknownDevice = 0x00,
2059         Widget = 0x01,
2060         Pixmap = 0x02,
2061         Image = 0x03,
2062         Printer = 0x04,
2063         Picture = 0x05,
2064         Pbuffer = 0x06,
2065         FramebufferObject = 0x07,
2066         CustomRaster = 0x08
2067     };
2068     enum RelayoutType {
2069         RelayoutNormal,
2070         RelayoutDragging,
2071         RelayoutDropped
2072     };
2073
2074
2075     enum Callback {
2076         ConnectCallback,
2077         DisconnectCallback,
2078         AdoptCurrentThread,
2079         EventNotifyCallback,
2080         LastCallback
2081     };
2082
2083     enum InternalFunction {
2084         CreateThreadForAdoption,
2085         RefAdoptedThread,
2086         DerefAdoptedThread,
2087         SetCurrentThreadToMainThread,
2088         LastInternalFunction
2089     };
2090
2091     enum DockPosition {
2092         LeftDock,
2093         RightDock,
2094         TopDock,
2095         BottomDock,
2096         DockCount
2097     };
2098
2099     static bool registerCallback(Callback, qInternalCallback);
2100     static bool unregisterCallback(Callback, qInternalCallback);
2101
2102     static bool activateCallbacks(Callback, void **);
2103     static bool callFunction(InternalFunction func, void **);
2104 };
2105 # 1499 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/global/qnamespace.h"
2106
2107 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qnamespace.h" 2
2108 # 43 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/kernel/qobjectdefs.h" 2
2109
2110
2111
2112 typedef QtValidLicenseForCoreModule QtCoreModule;
2113
2114 class QString;
2115
2116 class QByteArray;
2117 # 133 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/kernel/qobjectdefs.h"
2118 template <typename T>
2119 inline int qYouForgotTheQ_OBJECT_Macro(T, T) { return 0; }
2120
2121 template <typename T1, typename T2>
2122 inline void qYouForgotTheQ_OBJECT_Macro(T1, T2) {}
2123 # 209 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/kernel/qobjectdefs.h"
2124 class QObject;
2125 class QMetaMethod;
2126 class QMetaEnum;
2127 class QMetaProperty;
2128 class QMetaClassInfo;
2129
2130
2131 class QGenericArgument
2132 {
2133 public:
2134     inline QGenericArgument(const char *aName = 0, const void *aData = 0)
2135         : _data(aData), _name(aName) {}
2136     inline void *data() const { return const_cast<void *>(_data); }
2137     inline const char *name() const { return _name; }
2138
2139 private:
2140     const void *_data;
2141     const char *_name;
2142 };
2143
2144 class QGenericReturnArgument: public QGenericArgument
2145 {
2146 public:
2147     inline QGenericReturnArgument(const char *aName = 0, void *aData = 0)
2148         : QGenericArgument(aName, aData)
2149         {}
2150 };
2151
2152 template <class T>
2153 class QArgument: public QGenericArgument
2154 {
2155 public:
2156     inline QArgument(const char *aName, const T &aData)
2157         : QGenericArgument(aName, static_cast<const void *>(&aData))
2158         {}
2159 };
2160
2161
2162 template <typename T>
2163 class QReturnArgument: public QGenericReturnArgument
2164 {
2165 public:
2166     inline QReturnArgument(const char *aName, T &aData)
2167         : QGenericReturnArgument(aName, static_cast<void *>(&aData))
2168         {}
2169 };
2170
2171 struct QMetaObject
2172 {
2173     const char *className() const;
2174     const QMetaObject *superClass() const;
2175
2176     QObject *cast(QObject *obj) const;
2177
2178
2179
2180     QString tr(const char *s, const char *c) const;
2181     QString trUtf8(const char *s, const char *c) const;
2182     QString tr(const char *s, const char *c, int n) const;
2183     QString trUtf8(const char *s, const char *c, int n) const;
2184
2185
2186     int methodOffset() const;
2187     int enumeratorOffset() const;
2188     int propertyOffset() const;
2189     int classInfoOffset() const;
2190
2191     int methodCount() const;
2192     int enumeratorCount() const;
2193     int propertyCount() const;
2194     int classInfoCount() const;
2195
2196     int indexOfMethod(const char *method) const;
2197     int indexOfSignal(const char *signal) const;
2198     int indexOfSlot(const char *slot) const;
2199     int indexOfEnumerator(const char *name) const;
2200     int indexOfProperty(const char *name) const;
2201     int indexOfClassInfo(const char *name) const;
2202
2203     QMetaMethod method(int index) const;
2204     QMetaEnum enumerator(int index) const;
2205     QMetaProperty property(int index) const;
2206     QMetaClassInfo classInfo(int index) const;
2207     QMetaProperty userProperty() const;
2208
2209     static bool checkConnectArgs(const char *signal, const char *method);
2210     static QByteArray normalizedSignature(const char *method);
2211     static QByteArray normalizedType(const char *type);
2212
2213
2214     static bool connect(const QObject *sender, int signal_index,
2215                         const QObject *receiver, int method_index,
2216                         int type = 0, int *types = 0);
2217
2218     static bool disconnect(const QObject *sender, int signal_index,
2219                            const QObject *receiver, int method_index);
2220
2221     static void connectSlotsByName(QObject *o);
2222
2223
2224     static void activate(QObject *sender, int signal_index, void **argv);
2225     static void activate(QObject *sender, int from_signal_index, int to_signal_index, void **argv);
2226     static void activate(QObject *sender, const QMetaObject *, int local_signal_index, void **argv);
2227     static void activate(QObject *sender, const QMetaObject *, int from_local_signal_index, int to_local_signal_index, void **argv);
2228
2229     static void addGuard(QObject **ptr);
2230     static void removeGuard(QObject **ptr);
2231     static void changeGuard(QObject **ptr, QObject *o);
2232
2233     static bool invokeMethod(QObject *obj, const char *member,
2234                              Qt::ConnectionType,
2235                              QGenericReturnArgument ret,
2236                              QGenericArgument val0 = QGenericArgument(0),
2237                              QGenericArgument val1 = QGenericArgument(),
2238                              QGenericArgument val2 = QGenericArgument(),
2239                              QGenericArgument val3 = QGenericArgument(),
2240                              QGenericArgument val4 = QGenericArgument(),
2241                              QGenericArgument val5 = QGenericArgument(),
2242                              QGenericArgument val6 = QGenericArgument(),
2243                              QGenericArgument val7 = QGenericArgument(),
2244                              QGenericArgument val8 = QGenericArgument(),
2245                              QGenericArgument val9 = QGenericArgument());
2246
2247     static inline bool invokeMethod(QObject *obj, const char *member,
2248                              QGenericReturnArgument ret,
2249                              QGenericArgument val0 = QGenericArgument(0),
2250                              QGenericArgument val1 = QGenericArgument(),
2251                              QGenericArgument val2 = QGenericArgument(),
2252                              QGenericArgument val3 = QGenericArgument(),
2253                              QGenericArgument val4 = QGenericArgument(),
2254                              QGenericArgument val5 = QGenericArgument(),
2255                              QGenericArgument val6 = QGenericArgument(),
2256                              QGenericArgument val7 = QGenericArgument(),
2257                              QGenericArgument val8 = QGenericArgument(),
2258                              QGenericArgument val9 = QGenericArgument())
2259     {
2260         return invokeMethod(obj, member, Qt::AutoConnection, ret, val0, val1, val2, val3,
2261                 val4, val5, val6, val7, val8, val9);
2262     }
2263
2264     static inline bool invokeMethod(QObject *obj, const char *member,
2265                              Qt::ConnectionType type,
2266                              QGenericArgument val0 = QGenericArgument(0),
2267                              QGenericArgument val1 = QGenericArgument(),
2268                              QGenericArgument val2 = QGenericArgument(),
2269                              QGenericArgument val3 = QGenericArgument(),
2270                              QGenericArgument val4 = QGenericArgument(),
2271                              QGenericArgument val5 = QGenericArgument(),
2272                              QGenericArgument val6 = QGenericArgument(),
2273                              QGenericArgument val7 = QGenericArgument(),
2274                              QGenericArgument val8 = QGenericArgument(),
2275                              QGenericArgument val9 = QGenericArgument())
2276     {
2277         return invokeMethod(obj, member, type, QGenericReturnArgument(), val0, val1, val2,
2278                                  val3, val4, val5, val6, val7, val8, val9);
2279     }
2280
2281
2282     static inline bool invokeMethod(QObject *obj, const char *member,
2283                              QGenericArgument val0 = QGenericArgument(0),
2284                              QGenericArgument val1 = QGenericArgument(),
2285                              QGenericArgument val2 = QGenericArgument(),
2286                              QGenericArgument val3 = QGenericArgument(),
2287                              QGenericArgument val4 = QGenericArgument(),
2288                              QGenericArgument val5 = QGenericArgument(),
2289                              QGenericArgument val6 = QGenericArgument(),
2290                              QGenericArgument val7 = QGenericArgument(),
2291                              QGenericArgument val8 = QGenericArgument(),
2292                              QGenericArgument val9 = QGenericArgument())
2293     {
2294         return invokeMethod(obj, member, Qt::AutoConnection, QGenericReturnArgument(), val0,
2295                 val1, val2, val3, val4, val5, val6, val7, val8, val9);
2296     }
2297
2298     enum Call {
2299         InvokeMetaMethod,
2300         ReadProperty,
2301         WriteProperty,
2302         ResetProperty,
2303         QueryPropertyDesignable,
2304         QueryPropertyScriptable,
2305         QueryPropertyStored,
2306         QueryPropertyEditable,
2307         QueryPropertyUser
2308     };
2309
2310
2311
2312
2313
2314     struct {
2315         const QMetaObject *superdata;
2316         const char *stringdata;
2317         const uint *data;
2318         const QMetaObject **extradata;
2319     } d;
2320 };
2321
2322 inline const char *QMetaObject::className() const
2323 { return d.stringdata; }
2324
2325 inline const QMetaObject *QMetaObject::superClass() const
2326 { return d.superdata; }
2327
2328
2329
2330
2331
2332
2333
2334 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qobjectdefs.h" 2
2335 # 46 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/io/qiodevice.h" 2
2336
2337 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qstring.h" 1
2338 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qstring.h" 1
2339 # 42 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qstring.h"
2340 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qchar.h" 1
2341 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qchar.h" 1
2342 # 42 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qchar.h"
2343 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qglobal.h" 1
2344 # 43 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qchar.h" 2
2345
2346
2347
2348 typedef QtValidLicenseForCoreModule QtCoreModule;
2349
2350 class QString;
2351
2352 struct QLatin1Char
2353 {
2354 public:
2355     inline explicit QLatin1Char(char c) : ch(c) {}
2356     inline const char toLatin1() const { return ch; }
2357     inline const ushort unicode() const { return ushort(uchar(ch)); }
2358
2359 private:
2360     char ch;
2361 };
2362
2363
2364 class QChar {
2365 public:
2366     QChar();
2367
2368     QChar(char c);
2369     QChar(uchar c);
2370
2371     QChar(QLatin1Char ch);
2372     QChar(uchar c, uchar r);
2373     inline QChar(ushort rc) : ucs(rc){}
2374     QChar(short rc);
2375     QChar(uint rc);
2376     QChar(int rc);
2377     enum SpecialCharacter {
2378         Null = 0x0000,
2379         Nbsp = 0x00a0,
2380         ReplacementCharacter = 0xfffd,
2381         ObjectReplacementCharacter = 0xfffc,
2382         ByteOrderMark = 0xfeff,
2383         ByteOrderSwapped = 0xfffe,
2384
2385
2386
2387
2388
2389
2390
2391         ParagraphSeparator = 0x2029,
2392         LineSeparator = 0x2028
2393     };
2394     QChar(SpecialCharacter sc);
2395
2396
2397
2398     enum Category
2399     {
2400         NoCategory,
2401
2402         Mark_NonSpacing,
2403         Mark_SpacingCombining,
2404         Mark_Enclosing,
2405
2406         Number_DecimalDigit,
2407         Number_Letter,
2408         Number_Other,
2409
2410         Separator_Space,
2411         Separator_Line,
2412         Separator_Paragraph,
2413
2414         Other_Control,
2415         Other_Format,
2416         Other_Surrogate,
2417         Other_PrivateUse,
2418         Other_NotAssigned,
2419
2420         Letter_Uppercase,
2421         Letter_Lowercase,
2422         Letter_Titlecase,
2423         Letter_Modifier,
2424         Letter_Other,
2425
2426         Punctuation_Connector,
2427         Punctuation_Dash,
2428         Punctuation_Open,
2429         Punctuation_Close,
2430         Punctuation_InitialQuote,
2431         Punctuation_FinalQuote,
2432         Punctuation_Other,
2433
2434         Symbol_Math,
2435         Symbol_Currency,
2436         Symbol_Modifier,
2437         Symbol_Other,
2438
2439         Punctuation_Dask = Punctuation_Dash
2440     };
2441
2442     enum Direction
2443     {
2444         DirL, DirR, DirEN, DirES, DirET, DirAN, DirCS, DirB, DirS, DirWS, DirON,
2445         DirLRE, DirLRO, DirAL, DirRLE, DirRLO, DirPDF, DirNSM, DirBN
2446     };
2447
2448     enum Decomposition
2449     {
2450         NoDecomposition,
2451         Canonical,
2452         Font,
2453         NoBreak,
2454         Initial,
2455         Medial,
2456         Final,
2457         Isolated,
2458         Circle,
2459         Super,
2460         Sub,
2461         Vertical,
2462         Wide,
2463         Narrow,
2464         Small,
2465         Square,
2466         Compat,
2467         Fraction
2468
2469
2470
2471
2472     };
2473
2474     enum Joining
2475     {
2476         OtherJoining, Dual, Right, Center
2477     };
2478
2479     enum CombiningClass
2480     {
2481         Combining_BelowLeftAttached = 200,
2482         Combining_BelowAttached = 202,
2483         Combining_BelowRightAttached = 204,
2484         Combining_LeftAttached = 208,
2485         Combining_RightAttached = 210,
2486         Combining_AboveLeftAttached = 212,
2487         Combining_AboveAttached = 214,
2488         Combining_AboveRightAttached = 216,
2489
2490         Combining_BelowLeft = 218,
2491         Combining_Below = 220,
2492         Combining_BelowRight = 222,
2493         Combining_Left = 224,
2494         Combining_Right = 226,
2495         Combining_AboveLeft = 228,
2496         Combining_Above = 230,
2497         Combining_AboveRight = 232,
2498
2499         Combining_DoubleBelow = 233,
2500         Combining_DoubleAbove = 234,
2501         Combining_IotaSubscript = 240
2502     };
2503
2504     enum UnicodeVersion {
2505         Unicode_Unassigned,
2506         Unicode_1_1,
2507         Unicode_2_0,
2508         Unicode_2_1_2,
2509         Unicode_3_0,
2510         Unicode_3_1,
2511         Unicode_3_2,
2512         Unicode_4_0,
2513         Unicode_4_1,
2514         Unicode_5_0
2515     };
2516
2517
2518     Category category() const;
2519     Direction direction() const;
2520     Joining joining() const;
2521     bool hasMirrored() const;
2522     unsigned char combiningClass() const;
2523
2524     QChar mirroredChar() const;
2525     QString decomposition() const;
2526     Decomposition decompositionTag() const;
2527
2528     int digitValue() const;
2529     QChar toLower() const;
2530     QChar toUpper() const;
2531     QChar toTitleCase() const;
2532     QChar toCaseFolded() const;
2533
2534     UnicodeVersion unicodeVersion() const;
2535
2536     const char toAscii() const;
2537     inline const char toLatin1() const;
2538     inline const ushort unicode() const { return ucs; }
2539
2540
2541
2542     inline ushort &unicode() { return ucs; }
2543
2544
2545     static QChar fromAscii(char c);
2546     static QChar fromLatin1(char c);
2547
2548     inline bool isNull() const { return ucs == 0; }
2549     bool isPrint() const;
2550     bool isPunct() const;
2551     bool isSpace() const;
2552     bool isMark() const;
2553     bool isLetter() const;
2554     bool isNumber() const;
2555     bool isLetterOrNumber() const;
2556     bool isDigit() const;
2557     bool isSymbol() const;
2558     inline bool isLower() const { return category() == Letter_Lowercase; }
2559     inline bool isUpper() const { return category() == Letter_Uppercase; }
2560     inline bool isTitleCase() const { return category() == Letter_Titlecase; }
2561
2562     inline bool isHighSurrogate() const {
2563         return ((ucs & 0xfc00) == 0xd800);
2564     }
2565     inline bool isLowSurrogate() const {
2566         return ((ucs & 0xfc00) == 0xdc00);
2567     }
2568
2569     inline uchar cell() const { return uchar(ucs & 0xff); }
2570     inline uchar row() const { return uchar((ucs>>8)&0xff); }
2571     inline void setCell(uchar cell);
2572     inline void setRow(uchar row);
2573
2574     static inline uint surrogateToUcs4(ushort high, ushort low) {
2575         return (uint(high)<<10) + low - 0x35fdc00;
2576     }
2577     static inline uint surrogateToUcs4(QChar high, QChar low) {
2578         return (uint(high.ucs)<<10) + low.ucs - 0x35fdc00;
2579     }
2580     static inline ushort highSurrogate(uint ucs4) {
2581         return (ucs4>>10) + 0xd7c0;
2582     }
2583     static inline ushort lowSurrogate(uint ucs4) {
2584         return ucs4%0x400 + 0xdc00;
2585     }
2586
2587     static Category category(uint ucs4);
2588     static Category category(ushort ucs2);
2589     static Direction direction(uint ucs4);
2590     static Direction direction(ushort ucs2);
2591     static Joining joining(uint ucs4);
2592     static Joining joining(ushort ucs2);
2593     static unsigned char combiningClass(uint ucs4);
2594     static unsigned char combiningClass(ushort ucs2);
2595
2596     static uint mirroredChar(uint ucs4);
2597     static ushort mirroredChar(ushort ucs2);
2598     static Decomposition decompositionTag(uint ucs4);
2599
2600     static int digitValue(uint ucs4);
2601     static int digitValue(ushort ucs2);
2602     static uint toLower(uint ucs4);
2603     static ushort toLower(ushort ucs2);
2604     static uint toUpper(uint ucs4);
2605     static ushort toUpper(ushort ucs2);
2606     static uint toTitleCase(uint ucs4);
2607     static ushort toTitleCase(ushort ucs2);
2608     static uint toCaseFolded(uint ucs4);
2609     static ushort toCaseFolded(ushort ucs2);
2610
2611     static UnicodeVersion unicodeVersion(uint ucs4);
2612     static UnicodeVersion unicodeVersion(ushort ucs2);
2613
2614     static QString decomposition(uint ucs4);
2615 # 325 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qchar.h"
2616 private:
2617
2618
2619
2620
2621     ushort ucs;
2622 } ;
2623
2624 template <> class QTypeInfo<QChar> { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QChar)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QChar"; } };
2625
2626 inline QChar::QChar() : ucs(0) {}
2627
2628 inline const char QChar::toLatin1() const { return ucs > 0xff ? '\0' : char(ucs); }
2629 inline QChar QChar::fromLatin1(char c) { return QChar(ushort(uchar(c))); }
2630
2631 inline QChar::QChar(uchar c, uchar r) : ucs((r << 8) | c){}
2632 inline QChar::QChar(short rc) : ucs(ushort(rc)){}
2633 inline QChar::QChar(uint rc) : ucs(ushort(rc & 0xffff)){}
2634 inline QChar::QChar(int rc) : ucs(ushort(rc & 0xffff)){}
2635 inline QChar::QChar(SpecialCharacter s) : ucs(ushort(s)) {}
2636 inline QChar::QChar(QLatin1Char ch) : ucs(ch.unicode()) {}
2637
2638 inline void QChar::setCell(uchar acell)
2639 { ucs = (ucs & 0xff00) + acell; }
2640 inline void QChar::setRow(uchar arow)
2641 { ucs = (ushort(arow)<<8) + (ucs&0xff); }
2642
2643 inline bool operator==(QChar c1, QChar c2) { return c1.unicode() == c2.unicode(); }
2644 inline bool operator!=(QChar c1, QChar c2) { return c1.unicode() != c2.unicode(); }
2645 inline bool operator<=(QChar c1, QChar c2) { return c1.unicode() <= c2.unicode(); }
2646 inline bool operator>=(QChar c1, QChar c2) { return c1.unicode() >= c2.unicode(); }
2647 inline bool operator<(QChar c1, QChar c2) { return c1.unicode() < c2.unicode(); }
2648 inline bool operator>(QChar c1, QChar c2) { return c1.unicode() > c2.unicode(); }
2649
2650
2651  QDataStream &operator<<(QDataStream &, const QChar &);
2652  QDataStream &operator>>(QDataStream &, QChar &);
2653
2654
2655
2656 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qchar.h" 2
2657 # 43 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qstring.h" 2
2658 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qbytearray.h" 1
2659 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qbytearray.h" 1
2660 # 42 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qbytearray.h"
2661 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qglobal.h" 1
2662 # 43 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qbytearray.h" 2
2663 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qatomic.h" 1
2664 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/thread/qatomic.h" 1
2665 # 43 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/thread/qatomic.h"
2666 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qatomic_generic.h" 1
2667 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/arch/qatomic_generic.h" 1
2668 # 42 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/arch/qatomic_generic.h"
2669 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qglobal.h" 1
2670 # 43 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/arch/qatomic_generic.h" 2
2671
2672
2673
2674 inline int q_atomic_test_and_set_int(volatile int *ptr, int expected, int newval)
2675 {
2676     if (*ptr == expected) {
2677         *ptr = newval;
2678         return 1;
2679     }
2680     return 0;
2681 }
2682
2683 inline int q_atomic_test_and_set_acquire_int(volatile int *ptr, int expected, int newval)
2684 {
2685     return q_atomic_test_and_set_int(ptr, expected, newval);
2686 }
2687
2688 inline int q_atomic_test_and_set_release_int(volatile int *ptr, int expected, int newval)
2689 {
2690     return q_atomic_test_and_set_int(ptr, expected, newval);
2691 }
2692
2693 inline int q_atomic_test_and_set_ptr(volatile void *ptr, void *expected, void *newval)
2694 {
2695     if (*reinterpret_cast<void * volatile *>(ptr) == expected) {
2696         *reinterpret_cast<void * volatile *>(ptr) = newval;
2697         return 1;
2698     }
2699     return 0;
2700 }
2701
2702 inline int q_atomic_increment(volatile int *ptr)
2703 { return ++(*ptr); }
2704
2705 inline int q_atomic_decrement(volatile int *ptr)
2706 { return --(*ptr); }
2707
2708 inline int q_atomic_set_int(volatile int *ptr, int newval)
2709 {
2710     register int ret = *ptr;
2711     *ptr = newval;
2712     return ret;
2713 }
2714
2715 inline void *q_atomic_set_ptr(volatile void *ptr, void *newval)
2716 {
2717     register void *ret = *reinterpret_cast<void * volatile *>(ptr);
2718     *reinterpret_cast<void * volatile *>(ptr) = newval;
2719     return ret;
2720 }
2721
2722 inline int q_atomic_fetch_and_add_int(volatile int *ptr, int value)
2723 {
2724     int originalValue = *ptr;
2725     *ptr += value;
2726     return originalValue;
2727 }
2728
2729 inline int q_atomic_fetch_and_add_acquire_int(volatile int *ptr, int value)
2730 {
2731     return q_atomic_fetch_and_add_int(ptr, value);
2732 }
2733
2734 inline int q_atomic_fetch_and_add_release_int(volatile int *ptr, int value)
2735 {
2736     return q_atomic_fetch_and_add_int(ptr, value);
2737 }
2738
2739
2740 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qatomic_generic.h" 2
2741 # 44 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/thread/qatomic.h" 2
2742
2743
2744
2745 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qglobal.h" 1
2746 # 48 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/thread/qatomic.h" 2
2747
2748
2749
2750 typedef QtValidLicenseForCoreModule QtCoreModule;
2751 # 83 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/thread/qatomic.h"
2752 struct QBasicAtomic {
2753     volatile int value;
2754
2755     void init(int x = 0)
2756     { value = x; }
2757
2758     inline bool ref()
2759     { return q_atomic_increment(&value) != 0; }
2760
2761     inline bool deref()
2762     { return q_atomic_decrement(&value) != 0; }
2763
2764     inline bool operator==(int x) const
2765     { return value == x; }
2766
2767     inline bool operator!=(int x) const
2768     { return value != x; }
2769
2770     inline bool operator!() const
2771     { return value == 0; }
2772
2773     inline operator int() const
2774     { return value; }
2775
2776     inline QBasicAtomic &operator=(int x)
2777     {
2778         value = x;
2779         return *this;
2780     }
2781
2782     inline bool testAndSet(int expected, int newval)
2783     { return q_atomic_test_and_set_int(&value, expected, newval) != 0; }
2784
2785     inline bool testAndSetAcquire(int expected, int newval)
2786     { return q_atomic_test_and_set_acquire_int(&value, expected, newval) != 0; }
2787
2788     inline bool testAndSetRelease(int expected, int newval)
2789     { return q_atomic_test_and_set_release_int(&value, expected, newval) != 0; }
2790
2791     inline int exchange(int newval)
2792     { return q_atomic_set_int(&value, newval); }
2793
2794     inline int fetchAndAdd(int aValue)
2795     { return q_atomic_fetch_and_add_int(&value, aValue); }
2796
2797     inline int fetchAndAddAcquire(int aValue)
2798     { return q_atomic_fetch_and_add_acquire_int(&value, aValue); }
2799
2800     inline int fetchAndAddRelease(int aValue)
2801     { return q_atomic_fetch_and_add_release_int(&value, aValue); }
2802 };
2803
2804 template <typename T>
2805 struct QBasicAtomicPointer
2806 {
2807     volatile T *value;
2808
2809     void init(T *t = 0)
2810     { value = t; }
2811
2812     inline bool operator==(T *t) const
2813     { return value == t; }
2814
2815     inline bool operator!=(T *t) const
2816     { return !operator==(t); }
2817
2818     inline bool operator!() const
2819     { return operator==(0); }
2820
2821     inline operator T *() const
2822     { return const_cast<T *>(value); }
2823
2824     inline T *operator->() const
2825     { return const_cast<T *>(value); }
2826
2827     inline QBasicAtomicPointer<T> &operator=(T *t)
2828     {
2829         value = t;
2830         return *this;
2831     }
2832
2833     inline bool testAndSet(T *expected, T *newval)
2834     { return q_atomic_test_and_set_ptr(&value, expected, newval); }
2835
2836     inline T *exchange(T * newval)
2837     { return static_cast<T *>(q_atomic_set_ptr(&value, newval)); }
2838 };
2839
2840
2841
2842
2843
2844 template <typename T>
2845 inline T qAtomicSetPtr(volatile T *ptr, T newval)
2846 { return static_cast<T>(q_atomic_set_ptr(ptr, newval)); }
2847
2848
2849 class QAtomic : public QBasicAtomic
2850 {
2851 public:
2852     inline QAtomic(int x = 0)
2853     { init(x); }
2854     inline QAtomic(const QAtomic &copy)
2855     { init(copy); }
2856
2857     inline QAtomic &operator=(int x)
2858     {
2859         (void) QBasicAtomic::operator=(x);
2860         return *this;
2861     }
2862
2863     inline QAtomic &operator=(const QAtomic &copy)
2864     {
2865         (void) QBasicAtomic::operator=(copy);
2866         return *this;
2867     }
2868 };
2869
2870
2871 template <typename T>
2872 class QAtomicPointer : public QBasicAtomicPointer<T>
2873 {
2874 public:
2875     inline QAtomicPointer(T *t = 0)
2876     { init(t); }
2877     inline QAtomicPointer(const QAtomicPointer<T> &copy)
2878     { init(copy); }
2879
2880     inline QAtomicPointer<T> &operator=(T *t)
2881     {
2882         (void) QBasicAtomicPointer<T>::operator=(t);
2883         return *this;
2884     }
2885
2886     inline QAtomicPointer<T> &operator=(const QAtomicPointer<T> &copy)
2887     {
2888         (void) QBasicAtomicPointer<T>::operator=(copy);
2889         return *this;
2890     }
2891 };
2892 # 233 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/thread/qatomic.h"
2893 template <typename T>
2894 inline void qAtomicAssign(T *&d, T *x)
2895 {
2896     if (d == x)
2897         return;
2898     x->ref.ref();
2899     if (!d->ref.deref())
2900         delete d;
2901     d = x;
2902 }
2903 # 255 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/thread/qatomic.h"
2904 template <typename T>
2905 inline void qAtomicDetach(T *&d)
2906 {
2907     if (d->ref == 1)
2908         return;
2909     T *x = d;
2910     d = new T(*d);
2911     if (!x->ref.deref())
2912         delete x;
2913 }
2914
2915
2916 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qatomic.h" 2
2917 # 44 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qbytearray.h" 2
2918
2919 # 1 "/usr/include/string.h" 1 3 4
2920
2921
2922
2923
2924
2925
2926
2927 # 1 "/usr/include/gentoo-multilib/amd64/string.h" 1 3 4
2928 # 26 "/usr/include/gentoo-multilib/amd64/string.h" 3 4
2929 # 1 "/usr/include/features.h" 1 3 4
2930
2931
2932
2933
2934
2935
2936
2937 # 1 "/usr/include/gentoo-multilib/amd64/features.h" 1 3 4
2938 # 322 "/usr/include/gentoo-multilib/amd64/features.h" 3 4
2939 # 1 "/usr/include/sys/cdefs.h" 1 3 4
2940
2941
2942
2943
2944
2945
2946
2947 # 1 "/usr/include/gentoo-multilib/amd64/sys/cdefs.h" 1 3 4
2948 # 324 "/usr/include/gentoo-multilib/amd64/sys/cdefs.h" 3 4
2949 # 1 "/usr/include/bits/wordsize.h" 1 3 4
2950
2951
2952
2953
2954
2955
2956
2957 # 1 "/usr/include/gentoo-multilib/amd64/bits/wordsize.h" 1 3 4
2958 # 9 "/usr/include/bits/wordsize.h" 2 3 4
2959 # 325 "/usr/include/gentoo-multilib/amd64/sys/cdefs.h" 2 3 4
2960 # 9 "/usr/include/sys/cdefs.h" 2 3 4
2961 # 323 "/usr/include/gentoo-multilib/amd64/features.h" 2 3 4
2962 # 345 "/usr/include/gentoo-multilib/amd64/features.h" 3 4
2963 # 1 "/usr/include/gnu/stubs.h" 1 3 4
2964
2965
2966
2967
2968
2969
2970
2971 # 1 "/usr/include/gentoo-multilib/amd64/gnu/stubs.h" 1 3 4
2972
2973
2974
2975 # 1 "/usr/include/bits/wordsize.h" 1 3 4
2976
2977
2978
2979
2980
2981
2982
2983 # 1 "/usr/include/gentoo-multilib/amd64/bits/wordsize.h" 1 3 4
2984 # 9 "/usr/include/bits/wordsize.h" 2 3 4
2985 # 5 "/usr/include/gentoo-multilib/amd64/gnu/stubs.h" 2 3 4
2986
2987
2988
2989
2990 # 1 "/usr/include/gnu/stubs-64.h" 1 3 4
2991
2992
2993
2994 # 1 "/usr/include/gentoo-multilib/amd64/gnu/stubs-64.h" 1 3 4
2995 # 5 "/usr/include/gnu/stubs-64.h" 2 3 4
2996 # 10 "/usr/include/gentoo-multilib/amd64/gnu/stubs.h" 2 3 4
2997 # 9 "/usr/include/gnu/stubs.h" 2 3 4
2998 # 346 "/usr/include/gentoo-multilib/amd64/features.h" 2 3 4
2999 # 9 "/usr/include/features.h" 2 3 4
3000 # 27 "/usr/include/gentoo-multilib/amd64/string.h" 2 3 4
3001
3002 extern "C" {
3003
3004
3005
3006
3007 # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4
3008 # 34 "/usr/include/gentoo-multilib/amd64/string.h" 2 3 4
3009
3010
3011
3012
3013 extern void *memcpy (void *__restrict __dest,
3014        __const void *__restrict __src, size_t __n)
3015      throw () __attribute__ ((__nonnull__ (1, 2)));
3016
3017
3018 extern void *memmove (void *__dest, __const void *__src, size_t __n)
3019      throw () __attribute__ ((__nonnull__ (1, 2)));
3020
3021
3022
3023
3024
3025
3026 extern void *memccpy (void *__restrict __dest, __const void *__restrict __src,
3027         int __c, size_t __n)
3028      throw () __attribute__ ((__nonnull__ (1, 2)));
3029
3030
3031
3032
3033
3034 extern void *memset (void *__s, int __c, size_t __n) throw () __attribute__ ((__nonnull__ (1)));
3035
3036
3037 extern int memcmp (__const void *__s1, __const void *__s2, size_t __n)
3038      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
3039
3040
3041 extern void *memchr (__const void *__s, int __c, size_t __n)
3042       throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
3043
3044
3045
3046
3047
3048 extern void *rawmemchr (__const void *__s, int __c)
3049      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
3050
3051
3052 extern void *memrchr (__const void *__s, int __c, size_t __n)
3053       throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
3054
3055
3056
3057
3058
3059 extern char *strcpy (char *__restrict __dest, __const char *__restrict __src)
3060      throw () __attribute__ ((__nonnull__ (1, 2)));
3061
3062 extern char *strncpy (char *__restrict __dest,
3063         __const char *__restrict __src, size_t __n)
3064      throw () __attribute__ ((__nonnull__ (1, 2)));
3065
3066
3067 extern char *strcat (char *__restrict __dest, __const char *__restrict __src)
3068      throw () __attribute__ ((__nonnull__ (1, 2)));
3069
3070 extern char *strncat (char *__restrict __dest, __const char *__restrict __src,
3071         size_t __n) throw () __attribute__ ((__nonnull__ (1, 2)));
3072
3073
3074 extern int strcmp (__const char *__s1, __const char *__s2)
3075      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
3076
3077 extern int strncmp (__const char *__s1, __const char *__s2, size_t __n)
3078      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
3079
3080
3081 extern int strcoll (__const char *__s1, __const char *__s2)
3082      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
3083
3084 extern size_t strxfrm (char *__restrict __dest,
3085          __const char *__restrict __src, size_t __n)
3086      throw () __attribute__ ((__nonnull__ (2)));
3087
3088
3089
3090
3091
3092
3093 # 1 "/usr/include/xlocale.h" 1 3 4
3094
3095
3096
3097
3098
3099
3100
3101 # 1 "/usr/include/gentoo-multilib/amd64/xlocale.h" 1 3 4
3102 # 28 "/usr/include/gentoo-multilib/amd64/xlocale.h" 3 4
3103 typedef struct __locale_struct
3104 {
3105
3106   struct locale_data *__locales[13];
3107
3108
3109   const unsigned short int *__ctype_b;
3110   const int *__ctype_tolower;
3111   const int *__ctype_toupper;
3112
3113
3114   const char *__names[13];
3115 } *__locale_t;
3116 # 9 "/usr/include/xlocale.h" 2 3 4
3117 # 119 "/usr/include/gentoo-multilib/amd64/string.h" 2 3 4
3118
3119
3120 extern int strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l)
3121      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3)));
3122
3123 extern size_t strxfrm_l (char *__dest, __const char *__src, size_t __n,
3124     __locale_t __l) throw () __attribute__ ((__nonnull__ (2, 4)));
3125
3126
3127
3128
3129 extern char *strdup (__const char *__s)
3130      throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
3131
3132
3133
3134
3135
3136
3137 extern char *strndup (__const char *__string, size_t __n)
3138      throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
3139 # 165 "/usr/include/gentoo-multilib/amd64/string.h" 3 4
3140
3141
3142 extern char *strchr (__const char *__s, int __c)
3143      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
3144
3145 extern char *strrchr (__const char *__s, int __c)
3146      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
3147
3148
3149
3150
3151
3152 extern char *strchrnul (__const char *__s, int __c)
3153      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
3154
3155
3156
3157
3158
3159 extern size_t strcspn (__const char *__s, __const char *__reject)
3160      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
3161
3162
3163 extern size_t strspn (__const char *__s, __const char *__accept)
3164      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
3165
3166 extern char *strpbrk (__const char *__s, __const char *__accept)
3167      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
3168
3169 extern char *strstr (__const char *__haystack, __const char *__needle)
3170      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
3171
3172
3173
3174 extern char *strtok (char *__restrict __s, __const char *__restrict __delim)
3175      throw () __attribute__ ((__nonnull__ (2)));
3176
3177
3178
3179
3180 extern char *__strtok_r (char *__restrict __s,
3181     __const char *__restrict __delim,
3182     char **__restrict __save_ptr)
3183      throw () __attribute__ ((__nonnull__ (2, 3)));
3184
3185 extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim,
3186          char **__restrict __save_ptr)
3187      throw () __attribute__ ((__nonnull__ (2, 3)));
3188
3189
3190
3191
3192 extern char *strcasestr (__const char *__haystack, __const char *__needle)
3193      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
3194
3195
3196
3197
3198
3199
3200 extern void *memmem (__const void *__haystack, size_t __haystacklen,
3201        __const void *__needle, size_t __needlelen)
3202      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3)));
3203
3204
3205
3206 extern void *__mempcpy (void *__restrict __dest,
3207    __const void *__restrict __src, size_t __n)
3208      throw () __attribute__ ((__nonnull__ (1, 2)));
3209 extern void *mempcpy (void *__restrict __dest,
3210         __const void *__restrict __src, size_t __n)
3211      throw () __attribute__ ((__nonnull__ (1, 2)));
3212
3213
3214
3215
3216
3217 extern size_t strlen (__const char *__s)
3218      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
3219
3220
3221
3222
3223
3224 extern size_t strnlen (__const char *__string, size_t __maxlen)
3225      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
3226
3227
3228
3229
3230
3231 extern char *strerror (int __errnum) throw ();
3232
3233 # 281 "/usr/include/gentoo-multilib/amd64/string.h" 3 4
3234 extern char *strerror_r (int __errnum, char *__buf, size_t __buflen)
3235      throw () __attribute__ ((__nonnull__ (2)));
3236
3237
3238
3239
3240
3241 extern char *strerror_l (int __errnum, __locale_t __l) throw ();
3242
3243
3244
3245
3246
3247 extern void __bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1)));
3248
3249
3250
3251 extern void bcopy (__const void *__src, void *__dest, size_t __n)
3252      throw () __attribute__ ((__nonnull__ (1, 2)));
3253
3254
3255 extern void bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1)));
3256
3257
3258 extern int bcmp (__const void *__s1, __const void *__s2, size_t __n)
3259      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
3260
3261
3262 extern char *index (__const char *__s, int __c)
3263      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
3264
3265
3266 extern char *rindex (__const char *__s, int __c)
3267      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
3268
3269
3270
3271 extern int ffs (int __i) throw () __attribute__ ((__const__));
3272
3273
3274
3275
3276 extern int ffsl (long int __l) throw () __attribute__ ((__const__));
3277
3278 __extension__ extern int ffsll (long long int __ll)
3279      throw () __attribute__ ((__const__));
3280
3281
3282
3283
3284 extern int strcasecmp (__const char *__s1, __const char *__s2)
3285      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
3286
3287
3288 extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n)
3289      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
3290
3291
3292
3293
3294
3295 extern int strcasecmp_l (__const char *__s1, __const char *__s2,
3296     __locale_t __loc)
3297      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3)));
3298
3299 extern int strncasecmp_l (__const char *__s1, __const char *__s2,
3300      size_t __n, __locale_t __loc)
3301      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4)));
3302
3303
3304
3305
3306
3307 extern char *strsep (char **__restrict __stringp,
3308        __const char *__restrict __delim)
3309      throw () __attribute__ ((__nonnull__ (1, 2)));
3310
3311
3312
3313
3314 extern int strverscmp (__const char *__s1, __const char *__s2)
3315      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
3316
3317
3318 extern char *strsignal (int __sig) throw ();
3319
3320
3321 extern char *__stpcpy (char *__restrict __dest, __const char *__restrict __src)
3322      throw () __attribute__ ((__nonnull__ (1, 2)));
3323 extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src)
3324      throw () __attribute__ ((__nonnull__ (1, 2)));
3325
3326
3327
3328 extern char *__stpncpy (char *__restrict __dest,
3329    __const char *__restrict __src, size_t __n)
3330      throw () __attribute__ ((__nonnull__ (1, 2)));
3331 extern char *stpncpy (char *__restrict __dest,
3332         __const char *__restrict __src, size_t __n)
3333      throw () __attribute__ ((__nonnull__ (1, 2)));
3334
3335
3336 extern char *strfry (char *__string) throw () __attribute__ ((__nonnull__ (1)));
3337
3338
3339 extern void *memfrob (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1)));
3340
3341
3342
3343
3344
3345
3346 extern char *basename (__const char *__filename) throw () __attribute__ ((__nonnull__ (1)));
3347 # 432 "/usr/include/gentoo-multilib/amd64/string.h" 3 4
3348 }
3349 # 9 "/usr/include/string.h" 2 3 4
3350 # 46 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qbytearray.h" 2
3351 # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/stdarg.h" 1 3 4
3352 # 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/stdarg.h" 3 4
3353 typedef __builtin_va_list __gnuc_va_list;
3354 # 105 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/stdarg.h" 3 4
3355 typedef __gnuc_va_list va_list;
3356 # 47 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qbytearray.h" 2
3357
3358
3359
3360
3361
3362
3363
3364 typedef QtValidLicenseForCoreModule QtCoreModule;
3365
3366
3367
3368
3369
3370  char *qstrdup(const char *);
3371
3372 inline uint qstrlen(const char *str)
3373 { return str ? uint(strlen(str)) : 0; }
3374
3375 inline uint qstrnlen(const char *str, uint maxlen)
3376 {
3377     uint length = 0;
3378     if (str) {
3379         while (length < maxlen && *str++)
3380             length++;
3381     }
3382     return length;
3383 }
3384
3385  char *qstrcpy(char *dst, const char *src);
3386  char *qstrncpy(char *dst, const char *src, uint len);
3387
3388  int qstrcmp(const char *str1, const char *str2);
3389
3390 inline int qstrncmp(const char *str1, const char *str2, uint len)
3391 {
3392     return (str1 && str2) ? strncmp(str1, str2, len)
3393         : (str1 ? 1 : (str2 ? -1 : 0));
3394 }
3395  int qstricmp(const char *, const char *);
3396  int qstrnicmp(const char *, const char *, uint len);
3397
3398
3399  int qvsnprintf(char *str, size_t n, const char *fmt, va_list ap);
3400  int qsnprintf(char *str, size_t n, const char *fmt, ...);
3401 # 107 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qbytearray.h"
3402  quint16 qChecksum(const char *s, uint len);
3403
3404 class QByteRef;
3405 class QString;
3406 class QDataStream;
3407 template <typename T> class QList;
3408
3409 class QByteArray
3410 {
3411 public:
3412     inline QByteArray();
3413     QByteArray(const char *);
3414     QByteArray(const char *, int size);
3415     QByteArray(int size, char c);
3416     inline QByteArray(const QByteArray &);
3417     inline ~QByteArray();
3418
3419     QByteArray &operator=(const QByteArray &);
3420     QByteArray &operator=(const char *str);
3421
3422     inline int size() const;
3423     bool isEmpty() const;
3424     void resize(int size);
3425
3426     QByteArray &fill(char c, int size = -1);
3427
3428     int capacity() const;
3429     void reserve(int size);
3430     void squeeze();
3431
3432     operator const char *() const;
3433     operator const void *() const;
3434     char *data();
3435     const char *data() const;
3436     inline const char *constData() const;
3437     inline void detach();
3438     bool isDetached() const;
3439     void clear();
3440
3441     const char at(int i) const;
3442     const char operator[](int i) const;
3443     QByteRef operator[](int i);
3444     const char operator[](uint i) const;
3445     QByteRef operator[](uint i);
3446
3447     int indexOf(char c, int from = 0) const;
3448     inline int indexOf(const char *c, int from = 0) const;
3449     int indexOf(const QByteArray &a, int from = 0) const;
3450     int lastIndexOf(char c, int from = -1) const;
3451     inline int lastIndexOf(const char *c, int from = -1) const;
3452     int lastIndexOf(const QByteArray &a, int from = -1) const;
3453
3454     QBool contains(char c) const;
3455     QBool contains(const char *a) const;
3456     QBool contains(const QByteArray &a) const;
3457     int count(char c) const;
3458     int count(const char *a) const;
3459     int count(const QByteArray &a) const;
3460
3461     QByteArray left(int len) const;
3462     QByteArray right(int len) const;
3463     QByteArray mid(int index, int len = -1) const;
3464
3465     bool startsWith(const QByteArray &a) const;
3466     bool startsWith(char c) const;
3467     bool startsWith(const char *c) const;
3468
3469     bool endsWith(const QByteArray &a) const;
3470     bool endsWith(char c) const;
3471     bool endsWith(const char *c) const;
3472
3473     void truncate(int pos);
3474     void chop(int n);
3475
3476     QByteArray toLower() const;
3477     QByteArray toUpper() const;
3478
3479     QByteArray trimmed() const;
3480     QByteArray simplified() const;
3481     QByteArray leftJustified(int width, char fill = ' ', bool truncate = false) const;
3482     QByteArray rightJustified(int width, char fill = ' ', bool truncate = false) const;
3483 # 196 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qbytearray.h"
3484     QByteArray &prepend(char c);
3485     QByteArray &prepend(const char *s);
3486     QByteArray &prepend(const QByteArray &a);
3487     QByteArray &append(char c);
3488     QByteArray &append(const char *s);
3489     QByteArray &append(const QByteArray &a);
3490     QByteArray &insert(int i, char c);
3491     QByteArray &insert(int i, const char *s);
3492     QByteArray &insert(int i, const QByteArray &a);
3493     QByteArray &remove(int index, int len);
3494     QByteArray &replace(int index, int len, const char *s);
3495     QByteArray &replace(int index, int len, const QByteArray &s);
3496     QByteArray &replace(char before, const char *after);
3497     QByteArray &replace(char before, const QByteArray &after);
3498     QByteArray &replace(const char *before, const char *after);
3499     QByteArray &replace(const QByteArray &before, const QByteArray &after);
3500     QByteArray &replace(const QByteArray &before, const char *after);
3501     QByteArray &replace(const char *before, const QByteArray &after);
3502     QByteArray &replace(char before, char after);
3503     QByteArray &operator+=(char c);
3504     QByteArray &operator+=(const char *s);
3505     QByteArray &operator+=(const QByteArray &a);
3506
3507     QList<QByteArray> split(char sep) const;
3508
3509
3510     QByteArray &append(const QString &s);
3511     QByteArray &insert(int i, const QString &s);
3512     QByteArray &replace(const QString &before, const char *after);
3513     QByteArray &replace(char c, const QString &after);
3514     QByteArray &replace(const QString &before, const QByteArray &after);
3515
3516     QByteArray &operator+=(const QString &s);
3517     int indexOf(const QString &s, int from = 0) const;
3518     int lastIndexOf(const QString &s, int from = -1) const;
3519
3520
3521     inline bool operator==(const QString &s2) const;
3522     inline bool operator!=(const QString &s2) const;
3523     inline bool operator<(const QString &s2) const;
3524     inline bool operator>(const QString &s2) const;
3525     inline bool operator<=(const QString &s2) const;
3526     inline bool operator>=(const QString &s2) const;
3527
3528
3529     short toShort(bool *ok = 0, int base = 10) const;
3530     ushort toUShort(bool *ok = 0, int base = 10) const;
3531     int toInt(bool *ok = 0, int base = 10) const;
3532     uint toUInt(bool *ok = 0, int base = 10) const;
3533     long toLong(bool *ok = 0, int base = 10) const;
3534     ulong toULong(bool *ok = 0, int base = 10) const;
3535     qlonglong toLongLong(bool *ok = 0, int base = 10) const;
3536     qulonglong toULongLong(bool *ok = 0, int base = 10) const;
3537     float toFloat(bool *ok = 0) const;
3538     double toDouble(bool *ok = 0) const;
3539     QByteArray toBase64() const;
3540     QByteArray toHex() const;
3541
3542     QByteArray &setNum(short, int base = 10);
3543     QByteArray &setNum(ushort, int base = 10);
3544     QByteArray &setNum(int, int base = 10);
3545     QByteArray &setNum(uint, int base = 10);
3546     QByteArray &setNum(qlonglong, int base = 10);
3547     QByteArray &setNum(qulonglong, int base = 10);
3548     QByteArray &setNum(float, char f = 'g', int prec = 6);
3549     QByteArray &setNum(double, char f = 'g', int prec = 6);
3550
3551     static QByteArray number(int, int base = 10);
3552     static QByteArray number(uint, int base = 10);
3553     static QByteArray number(qlonglong, int base = 10);
3554     static QByteArray number(qulonglong, int base = 10);
3555     static QByteArray number(double, char f = 'g', int prec = 6);
3556     static QByteArray fromRawData(const char *, int size);
3557     static QByteArray fromBase64(const QByteArray &base64);
3558     static QByteArray fromHex(const QByteArray &hexEncoded);
3559
3560     typedef char *iterator;
3561     typedef const char *const_iterator;
3562     typedef iterator Iterator;
3563     typedef const_iterator ConstIterator;
3564     iterator begin();
3565     const_iterator begin() const;
3566     const_iterator constBegin() const;
3567     iterator end();
3568     const_iterator end() const;
3569     const_iterator constEnd() const;
3570
3571
3572     typedef const char & const_reference;
3573     typedef char & reference;
3574     void push_back(char c);
3575     void push_back(const char *c);
3576     void push_back(const QByteArray &a);
3577     void push_front(char c);
3578     void push_front(const char *c);
3579     void push_front(const QByteArray &a);
3580
3581     inline int count() const { return d->size; }
3582     int length() const { return d->size; }
3583     bool isNull() const;
3584 # 322 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qbytearray.h"
3585 private:
3586     operator QNoImplicitBoolCast() const;
3587     struct Data {
3588         QBasicAtomic ref;
3589         int alloc, size;
3590         char *data;
3591         char array[1];
3592     };
3593     static Data shared_null;
3594     static Data shared_empty;
3595     Data *d;
3596     QByteArray(Data *dd, int , int ) : d(dd) {}
3597     void realloc(int alloc);
3598     void expand(int i);
3599
3600     friend class QByteRef;
3601     friend class QString;
3602 public:
3603     typedef Data * DataPtr;
3604     inline DataPtr &data_ptr() { return d; }
3605 };
3606
3607 inline QByteArray::QByteArray(): d(&shared_null) { d->ref.ref(); }
3608 inline QByteArray::~QByteArray() { if (!d->ref.deref()) qFree(d); }
3609 inline int QByteArray::size() const
3610 { return d->size; }
3611 inline const char QByteArray::at(int i) const
3612 { do {if(!(i >= 0 && i < size()))qt_assert("i >= 0 && i < size()","/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qbytearray.h",349);} while (0); return d->data[i]; }
3613 inline const char QByteArray::operator[](int i) const
3614 { do {if(!(i >= 0 && i < size()))qt_assert("i >= 0 && i < size()","/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qbytearray.h",351);} while (0); return d->data[i]; }
3615 inline const char QByteArray::operator[](uint i) const
3616 { do {if(!(i < uint(size())))qt_assert("i < uint(size())","/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qbytearray.h",353);} while (0); return d->data[i]; }
3617 inline bool QByteArray::isEmpty() const
3618 { return d->size == 0; }
3619 inline QByteArray::operator const char *() const
3620 { return d->data; }
3621 inline QByteArray::operator const void *() const
3622 { return d->data; }
3623 inline char *QByteArray::data()
3624 { detach(); return d->data; }
3625 inline const char *QByteArray::data() const
3626 { return d->data; }
3627 inline const char *QByteArray::constData() const
3628 { return d->data; }
3629 inline void QByteArray::detach()
3630 { if (d->ref != 1 || d->data != d->array) realloc(d->size); }
3631 inline bool QByteArray::isDetached() const
3632 { return d->ref == 1; }
3633 inline QByteArray::QByteArray(const QByteArray &a) : d(a.d)
3634 { d->ref.ref(); }
3635
3636
3637
3638
3639
3640 inline int QByteArray::capacity() const
3641 { return d->alloc; }
3642
3643 inline void QByteArray::reserve(int asize)
3644 { if (d->ref != 1 || asize > d->alloc) realloc(asize); }
3645
3646 inline void QByteArray::squeeze()
3647 { if (d->size < d->alloc) realloc(d->size); }
3648
3649 class QByteRef {
3650     QByteArray &a;
3651     int i;
3652     inline QByteRef(QByteArray &array, int idx)
3653         : a(array),i(idx) {}
3654     friend class QByteArray;
3655 public:
3656     inline operator const char() const
3657         { return i < a.d->size ? a.d->data[i] : 0; }
3658     inline QByteRef &operator=(char c)
3659         { if (a.d->ref != 1 || i >= a.d->size) a.expand(i);
3660           a.d->data[i] = c; return *this; }
3661     inline QByteRef &operator=(const QByteRef &c)
3662         { if (a.d->ref != 1 || i >= a.d->size) a.expand(i);
3663           a.d->data[i] = c.a.d->data[c.i]; return *this; }
3664     inline bool operator==(char c) const
3665     { return a.d->data[i] == c; }
3666     inline bool operator!=(char c) const
3667     { return a.d->data[i] != c; }
3668     inline bool operator>(char c) const
3669     { return a.d->data[i] > c; }
3670     inline bool operator>=(char c) const
3671     { return a.d->data[i] >= c; }
3672     inline bool operator<(char c) const
3673     { return a.d->data[i] < c; }
3674     inline bool operator<=(char c) const
3675     { return a.d->data[i] <= c; }
3676 };
3677
3678 inline QByteRef QByteArray::operator[](int i)
3679 { do {if(!(i >= 0))qt_assert("i >= 0","/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qbytearray.h",416);} while (0); return QByteRef(*this, i); }
3680 inline QByteRef QByteArray::operator[](uint i)
3681 { return QByteRef(*this, i); }
3682 inline QByteArray::iterator QByteArray::begin()
3683 { detach(); return d->data; }
3684 inline QByteArray::const_iterator QByteArray::begin() const
3685 { return d->data; }
3686 inline QByteArray::const_iterator QByteArray::constBegin() const
3687 { return d->data; }
3688 inline QByteArray::iterator QByteArray::end()
3689 { detach(); return d->data + d->size; }
3690 inline QByteArray::const_iterator QByteArray::end() const
3691 { return d->data + d->size; }
3692 inline QByteArray::const_iterator QByteArray::constEnd() const
3693 { return d->data + d->size; }
3694 inline QByteArray &QByteArray::operator+=(char c)
3695 { return append(c); }
3696 inline QByteArray &QByteArray::operator+=(const char *s)
3697 { return append(s); }
3698 inline QByteArray &QByteArray::operator+=(const QByteArray &a)
3699 { return append(a); }
3700 inline void QByteArray::push_back(char c)
3701 { append(c); }
3702 inline void QByteArray::push_back(const char *c)
3703 { append(c); }
3704 inline void QByteArray::push_back(const QByteArray &a)
3705 { append(a); }
3706 inline void QByteArray::push_front(char c)
3707 { prepend(c); }
3708 inline void QByteArray::push_front(const char *c)
3709 { prepend(c); }
3710 inline void QByteArray::push_front(const QByteArray &a)
3711 { prepend(a); }
3712 inline QBool QByteArray::contains(const QByteArray &a) const
3713 { return QBool(indexOf(a) != -1); }
3714 inline QBool QByteArray::contains(char c) const
3715 { return QBool(indexOf(c) != -1); }
3716 inline bool operator==(const QByteArray &a1, const QByteArray &a2)
3717 { return (a1.size() == a2.size()) && (memcmp(a1, a2, a1.size())==0); }
3718 inline bool operator==(const QByteArray &a1, const char *a2)
3719 { return a2 ? strcmp(a1,a2) == 0 : a1.isEmpty(); }
3720 inline bool operator==(const char *a1, const QByteArray &a2)
3721 { return a1 ? strcmp(a1,a2) == 0 : a2.isEmpty(); }
3722 inline bool operator!=(const QByteArray &a1, const QByteArray &a2)
3723 { return !(a1==a2); }
3724 inline bool operator!=(const QByteArray &a1, const char *a2)
3725 { return a2 ? strcmp(a1,a2) != 0 : !a1.isEmpty(); }
3726 inline bool operator!=(const char *a1, const QByteArray &a2)
3727 { return a1 ? strcmp(a1,a2) != 0 : !a2.isEmpty(); }
3728 inline bool operator<(const QByteArray &a1, const QByteArray &a2)
3729 { return strcmp(a1, a2) < 0; }
3730  inline bool operator<(const QByteArray &a1, const char *a2)
3731 { return qstrcmp(a1, a2) < 0; }
3732 inline bool operator<(const char *a1, const QByteArray &a2)
3733 { return qstrcmp(a1, a2) < 0; }
3734 inline bool operator<=(const QByteArray &a1, const QByteArray &a2)
3735 { return strcmp(a1, a2) <= 0; }
3736 inline bool operator<=(const QByteArray &a1, const char *a2)
3737 { return qstrcmp(a1, a2) <= 0; }
3738 inline bool operator<=(const char *a1, const QByteArray &a2)
3739 { return qstrcmp(a1, a2) <= 0; }
3740 inline bool operator>(const QByteArray &a1, const QByteArray &a2)
3741 { return strcmp(a1, a2) > 0; }
3742 inline bool operator>(const QByteArray &a1, const char *a2)
3743 { return qstrcmp(a1, a2) > 0; }
3744 inline bool operator>(const char *a1, const QByteArray &a2)
3745 { return qstrcmp(a1, a2) > 0; }
3746 inline bool operator>=(const QByteArray &a1, const QByteArray &a2)
3747 { return strcmp(a1, a2) >= 0; }
3748 inline bool operator>=(const QByteArray &a1, const char *a2)
3749 { return qstrcmp(a1, a2) >= 0; }
3750 inline bool operator>=(const char *a1, const QByteArray &a2)
3751 { return qstrcmp(a1, a2) >= 0; }
3752 inline const QByteArray operator+(const QByteArray &a1, const QByteArray &a2)
3753 { return QByteArray(a1) += a2; }
3754 inline const QByteArray operator+(const QByteArray &a1, const char *a2)
3755 { return QByteArray(a1) += a2; }
3756 inline const QByteArray operator+(const QByteArray &a1, char a2)
3757 { return QByteArray(a1) += a2; }
3758 inline const QByteArray operator+(const char *a1, const QByteArray &a2)
3759 { return QByteArray(a1) += a2; }
3760 inline const QByteArray operator+(char a1, const QByteArray &a2)
3761 { return QByteArray(&a1, 1) += a2; }
3762 inline int QByteArray::indexOf(const char *c, int i) const
3763 { return indexOf(fromRawData(c, qstrlen(c)), i); }
3764 inline int QByteArray::lastIndexOf(const char *c, int i) const
3765 { return lastIndexOf(fromRawData(c, qstrlen(c)), i); }
3766 inline QBool QByteArray::contains(const char *c) const
3767 { return contains(fromRawData(c, qstrlen(c))); }
3768 inline QByteArray &QByteArray::replace(int index, int len, const char *c)
3769 { return replace(index, len, fromRawData(c, qstrlen(c))); }
3770 inline QByteArray &QByteArray::replace(char before, const char *c)
3771 { return replace(before, fromRawData(c, qstrlen(c))); }
3772 inline QByteArray &QByteArray::replace(const QByteArray &before, const char *c)
3773 { return replace(before, fromRawData(c, qstrlen(c))); }
3774 inline QByteArray &QByteArray::replace(const char *c, const QByteArray &after)
3775 { return replace(fromRawData(c, qstrlen(c)), after); }
3776 inline QByteArray &QByteArray::replace(const char *before, const char *after)
3777 { return replace(fromRawData(before, qstrlen(before)), fromRawData(after, qstrlen(after))); }
3778
3779 inline QByteArray &QByteArray::setNum(short n, int base)
3780 { return setNum(qlonglong(n), base); }
3781 inline QByteArray &QByteArray::setNum(ushort n, int base)
3782 { return setNum(qulonglong(n), base); }
3783 inline QByteArray &QByteArray::setNum(int n, int base)
3784 { return setNum(qlonglong(n), base); }
3785 inline QByteArray &QByteArray::setNum(uint n, int base)
3786 { return setNum(qulonglong(n), base); }
3787 inline QByteArray &QByteArray::setNum(float n, char f, int prec)
3788 { return setNum(double(n),f,prec); }
3789
3790
3791
3792  QDataStream &operator<<(QDataStream &, const QByteArray &);
3793  QDataStream &operator>>(QDataStream &, QByteArray &);
3794 # 542 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qbytearray.h"
3795 template <> class QTypeInfo<QByteArray> { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QByteArray)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QByteArray"; } };
3796 template <> inline bool qIsDetached<QByteArray>(QByteArray &t) { return t.isDetached(); } template <typename T> inline void qSwap(T &, T &); template <> inline void qSwap<QByteArray>(QByteArray &value1, QByteArray &value2) { const QByteArray::DataPtr t = value1.data_ptr(); value1.data_ptr() = value2.data_ptr(); value2.data_ptr() = t; }
3797
3798
3799 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qbytearray.h" 2
3800 # 44 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qstring.h" 2
3801 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qatomic.h" 1
3802 # 45 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qstring.h" 2
3803 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qnamespace.h" 1
3804 # 46 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qstring.h" 2
3805 # 73 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qstring.h"
3806
3807
3808 typedef QtValidLicenseForCoreModule QtCoreModule;
3809
3810 class QCharRef;
3811 class QRegExp;
3812 class QStringList;
3813 class QTextCodec;
3814 class QLatin1String;
3815 class QStringRef;
3816 template <typename T> class QVector;
3817
3818 class QString
3819 {
3820 public:
3821     inline QString();
3822     QString(const QChar *unicode, int size);
3823     QString(QChar c);
3824     QString(int size, QChar c);
3825     inline QString(const QLatin1String &latin1);
3826     inline QString(const QString &);
3827     inline ~QString();
3828     QString &operator=(QChar c);
3829     QString &operator=(const QString &);
3830     inline QString &operator=(const QLatin1String &);
3831
3832     inline int size() const { return d->size; }
3833     inline int count() const { return d->size; }
3834     inline int length() const;
3835     inline bool isEmpty() const;
3836     void resize(int size);
3837
3838     QString &fill(QChar c, int size = -1);
3839     void truncate(int pos);
3840     void chop(int n);
3841
3842     int capacity() const;
3843     inline void reserve(int size);
3844     inline void squeeze() { if (d->size < d->alloc) realloc(); d->capacity = 0;}
3845
3846     inline const QChar *unicode() const;
3847     inline QChar *data();
3848     inline const QChar *data() const;
3849     inline const QChar *constData() const;
3850
3851     inline void detach();
3852     inline bool isDetached() const;
3853     void clear();
3854
3855     inline const QChar at(int i) const;
3856     const QChar operator[](int i) const;
3857     QCharRef operator[](int i);
3858     const QChar operator[](uint i) const;
3859     QCharRef operator[](uint i);
3860
3861     QString arg(qlonglong a, int fieldwidth=0, int base=10,
3862                 const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result));
3863     QString arg(qulonglong a, int fieldwidth=0, int base=10,
3864                 const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result));
3865     QString arg(long a, int fieldwidth=0, int base=10,
3866                 const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result));
3867     QString arg(ulong a, int fieldwidth=0, int base=10,
3868                 const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result));
3869     QString arg(int a, int fieldWidth = 0, int base = 10,
3870                 const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result));
3871     QString arg(uint a, int fieldWidth = 0, int base = 10,
3872                 const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result));
3873     QString arg(short a, int fieldWidth = 0, int base = 10,
3874                 const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result));
3875     QString arg(ushort a, int fieldWidth = 0, int base = 10,
3876                 const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result));
3877     QString arg(double a, int fieldWidth = 0, char fmt = 'g', int prec = -1,
3878                 const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result));
3879     QString arg(char a, int fieldWidth = 0,
3880                 const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result));
3881     QString arg(QChar a, int fieldWidth = 0,
3882                 const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result));
3883     QString arg(const QString &a, int fieldWidth = 0,
3884                 const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result));
3885     QString arg(const QString &a1, const QString &a2) const __attribute__ ((warn_unused_result));
3886     QString arg(const QString &a1, const QString &a2, const QString &a3) const __attribute__ ((warn_unused_result));
3887     QString arg(const QString &a1, const QString &a2, const QString &a3,
3888                 const QString &a4) const __attribute__ ((warn_unused_result));
3889     QString arg(const QString &a1, const QString &a2, const QString &a3,
3890                 const QString &a4, const QString &a5) const __attribute__ ((warn_unused_result));
3891     QString arg(const QString &a1, const QString &a2, const QString &a3,
3892                 const QString &a4, const QString &a5, const QString &a6) const __attribute__ ((warn_unused_result));
3893     QString arg(const QString &a1, const QString &a2, const QString &a3,
3894                 const QString &a4, const QString &a5, const QString &a6,
3895                 const QString &a7) const __attribute__ ((warn_unused_result));
3896     QString arg(const QString &a1, const QString &a2, const QString &a3,
3897                 const QString &a4, const QString &a5, const QString &a6,
3898                 const QString &a7, const QString &a8) const __attribute__ ((warn_unused_result));
3899     QString arg(const QString &a1, const QString &a2, const QString &a3,
3900                 const QString &a4, const QString &a5, const QString &a6,
3901                 const QString &a7, const QString &a8, const QString &a9) const __attribute__ ((warn_unused_result));
3902
3903     QString &vsprintf(const char *format, va_list ap);
3904     QString &sprintf(const char *format, ...)
3905
3906         __attribute__ ((format (printf, 2, 3)))
3907
3908         ;
3909
3910     int indexOf(QChar c, int from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
3911     int indexOf(const QString &s, int from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
3912     int lastIndexOf(QChar c, int from = -1, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
3913     int lastIndexOf(const QString &s, int from = -1, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
3914
3915     inline QBool contains(QChar c, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
3916     inline QBool contains(const QString &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
3917     int count(QChar c, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
3918     int count(const QString &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
3919
3920
3921     int indexOf(const QRegExp &, int from = 0) const;
3922     int lastIndexOf(const QRegExp &, int from = -1) const;
3923     inline QBool contains(const QRegExp &rx) const { return QBool(indexOf(rx) != -1); }
3924     int count(const QRegExp &) const;
3925
3926
3927     enum SectionFlag {
3928         SectionDefault = 0x00,
3929         SectionSkipEmpty = 0x01,
3930         SectionIncludeLeadingSep = 0x02,
3931         SectionIncludeTrailingSep = 0x04,
3932         SectionCaseInsensitiveSeps = 0x08
3933     };
3934     typedef QFlags<SectionFlag> SectionFlags;
3935
3936     QString section(QChar sep, int start, int end = -1, SectionFlags flags = SectionDefault) const;
3937     QString section(const QString &in_sep, int start, int end = -1, SectionFlags flags = SectionDefault) const;
3938
3939     QString section(const QRegExp &reg, int start, int end = -1, SectionFlags flags = SectionDefault) const;
3940
3941
3942     QString left(int n) const __attribute__ ((warn_unused_result));
3943     QString right(int n) const __attribute__ ((warn_unused_result));
3944     QString mid(int position, int n = -1) const __attribute__ ((warn_unused_result));
3945
3946     bool startsWith(const QString &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
3947     bool startsWith(const QLatin1String &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
3948     bool startsWith(const QChar &c, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
3949     bool endsWith(const QString &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
3950     bool endsWith(const QLatin1String &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
3951     bool endsWith(const QChar &c, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
3952
3953     QString leftJustified(int width, QChar fill = QLatin1Char(' '), bool trunc = false) const __attribute__ ((warn_unused_result));
3954     QString rightJustified(int width, QChar fill = QLatin1Char(' '), bool trunc = false) const __attribute__ ((warn_unused_result));
3955
3956     QString toLower() const __attribute__ ((warn_unused_result));
3957     QString toUpper() const __attribute__ ((warn_unused_result));
3958     QString toCaseFolded() const __attribute__ ((warn_unused_result));
3959
3960     QString trimmed() const __attribute__ ((warn_unused_result));
3961     QString simplified() const __attribute__ ((warn_unused_result));
3962
3963     QString &insert(int i, QChar c);
3964     QString &insert(int i, const QChar *uc, int len);
3965     inline QString &insert(int i, const QString &s) { return insert(i, s.constData(), s.length()); }
3966     QString &insert(int i, const QLatin1String &s);
3967     QString &append(QChar c);
3968     QString &append(const QString &s);
3969     QString &append(const QLatin1String &s);
3970     inline QString &prepend(QChar c) { return insert(0, c); }
3971     inline QString &prepend(const QString &s) { return insert(0, s); }
3972     inline QString &prepend(const QLatin1String &s) { return insert(0, s); }
3973     inline QString &operator+=(QChar c) { return append(c); }
3974     inline QString &operator+=(QChar::SpecialCharacter c) { return append(QChar(c)); }
3975     inline QString &operator+=(const QString &s) { return append(s); }
3976     inline QString &operator+=(const QLatin1String &s) { return append(s); }
3977
3978     QString &remove(int i, int len);
3979     QString &remove(QChar c, Qt::CaseSensitivity cs = Qt::CaseSensitive);
3980     QString &remove(const QString &s, Qt::CaseSensitivity cs = Qt::CaseSensitive);
3981     QString &replace(int i, int len, QChar after);
3982     QString &replace(int i, int len, const QChar *s, int slen);
3983     QString &replace(int i, int len, const QString &after);
3984     QString &replace(QChar before, QChar after, Qt::CaseSensitivity cs = Qt::CaseSensitive);
3985     QString &replace(QChar c, const QString &after, Qt::CaseSensitivity cs = Qt::CaseSensitive);
3986     QString &replace(const QString &before, const QString &after,
3987                      Qt::CaseSensitivity cs = Qt::CaseSensitive);
3988
3989     QString &replace(const QRegExp &rx, const QString &after);
3990     inline QString &remove(const QRegExp &rx)
3991     { return replace(rx, QString()); }
3992
3993
3994     enum SplitBehavior { KeepEmptyParts, SkipEmptyParts };
3995
3996     QStringList split(const QString &sep, SplitBehavior behavior = KeepEmptyParts,
3997                       Qt::CaseSensitivity cs = Qt::CaseSensitive) const __attribute__ ((warn_unused_result));
3998     QStringList split(const QChar &sep, SplitBehavior behavior = KeepEmptyParts,
3999                       Qt::CaseSensitivity cs = Qt::CaseSensitive) const __attribute__ ((warn_unused_result));
4000
4001     QStringList split(const QRegExp &sep, SplitBehavior behavior = KeepEmptyParts) const __attribute__ ((warn_unused_result));
4002
4003
4004     enum NormalizationForm {
4005         NormalizationForm_D,
4006         NormalizationForm_C,
4007         NormalizationForm_KD,
4008         NormalizationForm_KC
4009     };
4010     QString normalized(NormalizationForm mode) const __attribute__ ((warn_unused_result));
4011     QString normalized(NormalizationForm mode, QChar::UnicodeVersion version) const __attribute__ ((warn_unused_result));
4012
4013     const ushort *utf16() const;
4014
4015     QByteArray toAscii() const __attribute__ ((warn_unused_result));
4016     QByteArray toLatin1() const __attribute__ ((warn_unused_result));
4017     QByteArray toUtf8() const __attribute__ ((warn_unused_result));
4018     QByteArray toLocal8Bit() const __attribute__ ((warn_unused_result));
4019     QVector<uint> toUcs4() const __attribute__ ((warn_unused_result));
4020
4021     static QString fromAscii(const char *, int size = -1);
4022     static QString fromLatin1(const char *, int size = -1);
4023     static QString fromUtf8(const char *, int size = -1);
4024     static QString fromLocal8Bit(const char *, int size = -1);
4025     static QString fromUtf16(const ushort *, int size = -1);
4026     static QString fromUcs4(const uint *, int size = -1);
4027     static QString fromRawData(const QChar *, int size);
4028
4029     int toWCharArray(wchar_t *array) const;
4030     static QString fromWCharArray(const wchar_t *, int size = -1);
4031
4032     QString &setUnicode(const QChar *unicode, int size);
4033     inline QString &setUtf16(const ushort *utf16, int size);
4034
4035
4036     int compare(const QString &s) const;
4037     int compare(const QString &s, Qt::CaseSensitivity cs) const;
4038
4039     int compare(const QLatin1String &other, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
4040
4041
4042     static inline int compare(const QString &s1, const QString &s2)
4043     { return s1.compare(s2); }
4044     static inline int compare(const QString &s1, const QString &s2, Qt::CaseSensitivity cs)
4045     { return s1.compare(s2, cs); }
4046
4047     static inline int compare(const QString& s1, const QLatin1String &s2,
4048                               Qt::CaseSensitivity cs = Qt::CaseSensitive)
4049     { return s1.compare(s2, cs); }
4050     static inline int compare(const QLatin1String& s1, const QString &s2,
4051                               Qt::CaseSensitivity cs = Qt::CaseSensitive)
4052     { return -s2.compare(s1, cs); }
4053
4054     int localeAwareCompare(const QString& s) const;
4055     static int localeAwareCompare(const QString& s1, const QString& s2)
4056     { return s1.localeAwareCompare(s2); }
4057
4058     short toShort(bool *ok=0, int base=10) const;
4059     ushort toUShort(bool *ok=0, int base=10) const;
4060     int toInt(bool *ok=0, int base=10) const;
4061     uint toUInt(bool *ok=0, int base=10) const;
4062     long toLong(bool *ok=0, int base=10) const;
4063     ulong toULong(bool *ok=0, int base=10) const;
4064     qlonglong toLongLong(bool *ok=0, int base=10) const;
4065     qulonglong toULongLong(bool *ok=0, int base=10) const;
4066     float toFloat(bool *ok=0) const;
4067     double toDouble(bool *ok=0) const;
4068
4069     QString &setNum(short, int base=10);
4070     QString &setNum(ushort, int base=10);
4071     QString &setNum(int, int base=10);
4072     QString &setNum(uint, int base=10);
4073     QString &setNum(long, int base=10);
4074     QString &setNum(ulong, int base=10);
4075     QString &setNum(qlonglong, int base=10);
4076     QString &setNum(qulonglong, int base=10);
4077     QString &setNum(float, char f='g', int prec=6);
4078     QString &setNum(double, char f='g', int prec=6);
4079
4080     static QString number(int, int base=10);
4081     static QString number(uint, int base=10);
4082     static QString number(long, int base=10);
4083     static QString number(ulong, int base=10);
4084     static QString number(qlonglong, int base=10);
4085     static QString number(qulonglong, int base=10);
4086     static QString number(double, char f='g', int prec=6);
4087
4088     bool operator==(const QString &s) const;
4089     bool operator<(const QString &s) const;
4090     inline bool operator>(const QString &s) const { return s < *this; }
4091     inline bool operator!=(const QString &s) const { return !operator==(s); }
4092     inline bool operator<=(const QString &s) const { return !operator>(s); }
4093     inline bool operator>=(const QString &s) const { return !operator<(s); }
4094
4095     bool operator==(const QLatin1String &s) const;
4096     bool operator<(const QLatin1String &s) const;
4097     bool operator>(const QLatin1String &s) const;
4098     inline bool operator!=(const QLatin1String &s) const { return !operator==(s); }
4099     inline bool operator<=(const QLatin1String &s) const { return !operator>(s); }
4100     inline bool operator>=(const QLatin1String &s) const { return !operator<(s); }
4101
4102
4103
4104     inline QString(const char *ch) : d(fromAscii_helper(ch))
4105     {}
4106     inline QString(const QByteArray &a)
4107         : d(fromAscii_helper(a.constData(), qstrnlen(a.constData(), a.size())))
4108     {}
4109     inline QString &operator=(const char *ch)
4110     { return (*this = fromAscii(ch)); }
4111     inline QString &operator=(const QByteArray &a)
4112     { return (*this = fromAscii(a.constData(), qstrnlen(a.constData(), a.size()))); }
4113     inline QString &operator=(char c)
4114     { return (*this = QChar::fromAscii(c)); }
4115
4116
4117     inline QString &prepend(const char *s)
4118     { return prepend(QString::fromAscii(s)); }
4119     inline QString &prepend(const QByteArray &s)
4120     { return prepend(QString::fromAscii(s.constData(), qstrnlen(s.constData(), s.size()))); }
4121     inline QString &append(const char *s)
4122     { return append(QString::fromAscii(s)); }
4123     inline QString &append(const QByteArray &s)
4124     { return append(QString::fromAscii(s.constData(), qstrnlen(s.constData(), s.size()))); }
4125     inline QString &operator+=(const char *s)
4126     { return append(QString::fromAscii(s)); }
4127     inline QString &operator+=(const QByteArray &s)
4128     { return append(QString::fromAscii(s.constData(), qstrnlen(s.constData(), s.size()))); }
4129     inline QString &operator+=(char c)
4130     { return append(QChar::fromAscii(c)); }
4131
4132     inline bool operator==(const char *s) const;
4133     inline bool operator!=(const char *s) const;
4134     inline bool operator<(const char *s) const;
4135     inline bool operator<=(const char *s2) const;
4136     inline bool operator>(const char *s2) const;
4137     inline bool operator>=(const char *s2) const;
4138
4139     inline bool operator==(const QByteArray &s) const;
4140     inline bool operator!=(const QByteArray &s) const;
4141     inline bool operator<(const QByteArray &s) const
4142     { return *this < QString::fromAscii(s.constData(), s.size()); }
4143     inline bool operator>(const QByteArray &s) const
4144     { return *this > QString::fromAscii(s.constData(), s.size()); }
4145     inline bool operator<=(const QByteArray &s) const
4146     { return *this <= QString::fromAscii(s.constData(), s.size()); }
4147     inline bool operator>=(const QByteArray &s) const
4148     { return *this >= QString::fromAscii(s.constData(), s.size()); }
4149
4150
4151     typedef QChar *iterator;
4152     typedef const QChar *const_iterator;
4153     typedef iterator Iterator;
4154     typedef const_iterator ConstIterator;
4155     iterator begin();
4156     const_iterator begin() const;
4157     const_iterator constBegin() const;
4158     iterator end();
4159     const_iterator end() const;
4160     const_iterator constEnd() const;
4161
4162     inline QString &inline_append(QChar ch) {
4163         if (d->ref != 1 || d->size + 1 > d->alloc)
4164             realloc(grow(d->size + 1));
4165         d->data[d->size++] = ch.unicode();
4166         d->data[d->size] = '\0';
4167         return *this;
4168     }
4169
4170
4171     inline void push_back(QChar c) { append(c); }
4172     inline void push_back(const QString &s) { append(s); }
4173     inline void push_front(QChar c) { prepend(c); }
4174     inline void push_front(const QString &s) { prepend(s); }
4175 # 458 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qstring.h"
4176     struct Null { };
4177     static const Null null;
4178     inline QString(const Null &): d(&shared_null) { d->ref.ref(); }
4179     inline QString &operator=(const Null &) { *this = QString(); return *this; }
4180     inline bool isNull() const { return d == &shared_null; }
4181 # 541 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qstring.h"
4182     bool isSimpleText() const { if (!d->clean) updateProperties(); return d->simpletext; }
4183     bool isRightToLeft() const { if (!d->clean) updateProperties(); return d->righttoleft; }
4184
4185 private:
4186 # 554 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qstring.h"
4187     struct Data {
4188         QBasicAtomic ref;
4189         int alloc, size;
4190         ushort *data;
4191         ushort clean : 1;
4192         ushort simpletext : 1;
4193         ushort righttoleft : 1;
4194         ushort asciiCache : 1;
4195         ushort capacity : 1;
4196         ushort reserved : 11;
4197         ushort array[1];
4198     };
4199     static Data shared_null;
4200     static Data shared_empty;
4201     Data *d;
4202     QString(Data *dd, int ) : d(dd) {}
4203
4204
4205
4206     static int grow(int);
4207     static void free(Data *);
4208     void realloc();
4209     void realloc(int alloc);
4210     void expand(int i);
4211     void updateProperties() const;
4212     QString multiArg(int numArgs, const QString **args) const;
4213     static Data *fromLatin1_helper(const char *str, int size = -1);
4214     static Data *fromAscii_helper(const char *str, int size = -1);
4215     friend class QCharRef;
4216     friend class QTextCodec;
4217     friend class QStringRef;
4218     friend inline bool qStringComparisonHelper(const QString &s1, const char *s2);
4219     friend inline bool qStringComparisonHelper(const QStringRef &s1, const char *s2);
4220 public:
4221     typedef Data * DataPtr;
4222     inline DataPtr &data_ptr() { return d; }
4223 };
4224
4225
4226 class QLatin1String
4227 {
4228 public:
4229     inline explicit QLatin1String(const char *s) : chars(s) {}
4230     inline QLatin1String &operator=(const QLatin1String &other)
4231     { chars = other.chars; return *this; }
4232
4233     inline const char *latin1() const { return chars; }
4234
4235     inline bool operator==(const QString &s) const
4236     { return s == *this; }
4237     inline bool operator!=(const QString &s) const
4238     { return s != *this; }
4239     inline bool operator>(const QString &s) const
4240     { return s < *this; }
4241     inline bool operator<(const QString &s) const
4242     { return s > *this; }
4243     inline bool operator>=(const QString &s) const
4244     { return s <= *this; }
4245     inline bool operator<=(const QString &s) const
4246     { return s >= *this; }
4247
4248     inline bool operator==(const char *s) const
4249         { return QString::fromAscii(s) == *this; }
4250     inline bool operator!=(const char *s) const
4251         { return QString::fromAscii(s) != *this; }
4252     inline bool operator<(const char *s) const
4253         { return QString::fromAscii(s) > *this; }
4254     inline bool operator>(const char *s) const
4255         { return QString::fromAscii(s) < *this; }
4256     inline bool operator<=(const char *s) const
4257         { return QString::fromAscii(s) >= *this; }
4258     inline bool operator>=(const char *s) const
4259         { return QString::fromAscii(s) <= *this; }
4260 private:
4261     const char *chars;
4262 };
4263
4264
4265
4266 inline QString::QString(const QLatin1String &latin1) : d(fromLatin1_helper(latin1.latin1()))
4267 { }
4268 inline int QString::length() const
4269 { return d->size; }
4270 inline const QChar QString::at(int i) const
4271 { do {if(!(i >= 0 && i < size()))qt_assert("i >= 0 && i < size()","/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qstring.h",638);} while (0); return d->data[i]; }
4272 inline const QChar QString::operator[](int i) const
4273 { do {if(!(i >= 0 && i < size()))qt_assert("i >= 0 && i < size()","/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qstring.h",640);} while (0); return d->data[i]; }
4274 inline const QChar QString::operator[](uint i) const
4275 { do {if(!(i < uint(size())))qt_assert("i < uint(size())","/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qstring.h",642);} while (0); return d->data[i]; }
4276 inline bool QString::isEmpty() const
4277 { return d->size == 0; }
4278 inline const QChar *QString::unicode() const
4279 { return reinterpret_cast<const QChar*>(d->data); }
4280 inline const QChar *QString::data() const
4281 { return reinterpret_cast<const QChar*>(d->data); }
4282 inline QChar *QString::data()
4283 { detach(); return reinterpret_cast<QChar*>(d->data); }
4284 inline const QChar *QString::constData() const
4285 { return reinterpret_cast<const QChar*>(d->data); }
4286 inline void QString::detach()
4287 { if (d->ref != 1 || d->data != d->array) realloc(); }
4288 inline bool QString::isDetached() const
4289 { return d->ref == 1; }
4290 inline QString &QString::operator=(const QLatin1String &s)
4291 {
4292     *this = fromLatin1(s.latin1());
4293     return *this;
4294 }
4295 inline void QString::clear()
4296 { if (!isNull()) *this = QString(); }
4297 inline QString::QString(const QString &other) : d(other.d)
4298 { do {if(!(&other != this))qt_assert("&other != this","/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qstring.h",665);} while (0); d->ref.ref(); }
4299 inline int QString::capacity() const
4300 { return d->alloc; }
4301 inline QString &QString::setNum(short n, int base)
4302 { return setNum(qlonglong(n), base); }
4303 inline QString &QString::setNum(ushort n, int base)
4304 { return setNum(qulonglong(n), base); }
4305 inline QString &QString::setNum(int n, int base)
4306 { return setNum(qlonglong(n), base); }
4307 inline QString &QString::setNum(uint n, int base)
4308 { return setNum(qulonglong(n), base); }
4309 inline QString &QString::setNum(long n, int base)
4310 { return setNum(qlonglong(n), base); }
4311 inline QString &QString::setNum(ulong n, int base)
4312 { return setNum(qulonglong(n), base); }
4313 inline QString &QString::setNum(float n, char f, int prec)
4314 { return setNum(double(n),f,prec); }
4315 inline QString QString::arg(int a, int fieldWidth, int base, const QChar &fillChar) const
4316 { return arg(qlonglong(a), fieldWidth, base, fillChar); }
4317 inline QString QString::arg(uint a, int fieldWidth, int base, const QChar &fillChar) const
4318 { return arg(qulonglong(a), fieldWidth, base, fillChar); }
4319 inline QString QString::arg(long a, int fieldWidth, int base, const QChar &fillChar) const
4320 { return arg(qlonglong(a), fieldWidth, base, fillChar); }
4321 inline QString QString::arg(ulong a, int fieldWidth, int base, const QChar &fillChar) const
4322 { return arg(qulonglong(a), fieldWidth, base, fillChar); }
4323 inline QString QString::arg(short a, int fieldWidth, int base, const QChar &fillChar) const
4324 { return arg(qlonglong(a), fieldWidth, base, fillChar); }
4325 inline QString QString::arg(ushort a, int fieldWidth, int base, const QChar &fillChar) const
4326 { return arg(qulonglong(a), fieldWidth, base, fillChar); }
4327 inline QString QString::arg(const QString &a1, const QString &a2) const
4328 { const QString *args[2] = { &a1, &a2 }; return multiArg(2, args); }
4329 inline QString QString::arg(const QString &a1, const QString &a2, const QString &a3) const
4330 { const QString *args[3] = { &a1, &a2, &a3 }; return multiArg(3, args); }
4331 inline QString QString::arg(const QString &a1, const QString &a2, const QString &a3,
4332                             const QString &a4) const
4333 { const QString *args[4] = { &a1, &a2, &a3, &a4 }; return multiArg(4, args); }
4334 inline QString QString::arg(const QString &a1, const QString &a2, const QString &a3,
4335                             const QString &a4, const QString &a5) const
4336 { const QString *args[5] = { &a1, &a2, &a3, &a4, &a5 }; return multiArg(5, args); }
4337 inline QString QString::arg(const QString &a1, const QString &a2, const QString &a3,
4338                             const QString &a4, const QString &a5, const QString &a6) const
4339 { const QString *args[6] = { &a1, &a2, &a3, &a4, &a5, &a6 }; return multiArg(6, args); }
4340 inline QString QString::arg(const QString &a1, const QString &a2, const QString &a3,
4341                             const QString &a4, const QString &a5, const QString &a6,
4342                             const QString &a7) const
4343 { const QString *args[7] = { &a1, &a2, &a3, &a4, &a5, &a6, &a7 }; return multiArg(7, args); }
4344 inline QString QString::arg(const QString &a1, const QString &a2, const QString &a3,
4345                             const QString &a4, const QString &a5, const QString &a6,
4346                             const QString &a7, const QString &a8) const
4347 { const QString *args[8] = { &a1, &a2, &a3, &a4, &a5, &a6, &a7, &a8 }; return multiArg(8, args); }
4348 inline QString QString::arg(const QString &a1, const QString &a2, const QString &a3,
4349                             const QString &a4, const QString &a5, const QString &a6,
4350                             const QString &a7, const QString &a8, const QString &a9) const
4351 { const QString *args[9] = { &a1, &a2, &a3, &a4, &a5, &a6, &a7, &a8, &a9 }; return multiArg(9, args); }
4352
4353 inline QString QString::section(QChar asep, int astart, int aend, SectionFlags aflags) const
4354 { return section(QString(asep), astart, aend, aflags); }
4355
4356
4357 class QCharRef {
4358     QString &s;
4359     int i;
4360     inline QCharRef(QString &str, int idx)
4361         : s(str),i(idx) {}
4362     friend class QString;
4363 public:
4364
4365
4366
4367
4368     inline operator QChar() const
4369         { return i < s.d->size ? s.d->data[i] : 0; }
4370     inline QCharRef &operator=(const QChar &c)
4371         { if (s.d->ref != 1 || i >= s.d->size) s.expand(i);
4372           s.d->data[i] = c.unicode(); return *this; }
4373
4374
4375
4376     inline QCharRef &operator=(char c)
4377     { return operator=(QChar::fromAscii(c)); }
4378     inline QCharRef &operator=(uchar c)
4379     { return operator=(QChar::fromAscii(c)); }
4380
4381     inline QCharRef &operator=(const QCharRef &c) { return operator=(QChar(c)); }
4382     inline QCharRef &operator=(ushort rc) { return operator=(QChar(rc)); }
4383     inline QCharRef &operator=(short rc) { return operator=(QChar(rc)); }
4384     inline QCharRef &operator=(uint rc) { return operator=(QChar(rc)); }
4385     inline QCharRef &operator=(int rc) { return operator=(QChar(rc)); }
4386
4387
4388     inline bool isNull() const { return QChar(*this).isNull(); }
4389     inline bool isPrint() const { return QChar(*this).isPrint(); }
4390     inline bool isPunct() const { return QChar(*this).isPunct(); }
4391     inline bool isSpace() const { return QChar(*this).isSpace(); }
4392     inline bool isMark() const { return QChar(*this).isMark(); }
4393     inline bool isLetter() const { return QChar(*this).isLetter(); }
4394     inline bool isNumber() const { return QChar(*this).isNumber(); }
4395     inline bool isLetterOrNumber() { return QChar(*this).isLetterOrNumber(); }
4396     inline bool isDigit() const { return QChar(*this).isDigit(); }
4397     inline bool isLower() const { return QChar(*this).isLower(); }
4398     inline bool isUpper() const { return QChar(*this).isUpper(); }
4399     inline bool isTitleCase() const { return QChar(*this).isTitleCase(); }
4400
4401     inline int digitValue() const { return QChar(*this).digitValue(); }
4402     QChar toLower() const { return QChar(*this).toLower(); }
4403     QChar toUpper() const { return QChar(*this).toUpper(); }
4404     QChar toTitleCase () const { return QChar(*this).toTitleCase(); }
4405
4406     QChar::Category category() const { return QChar(*this).category(); }
4407     QChar::Direction direction() const { return QChar(*this).direction(); }
4408     QChar::Joining joining() const { return QChar(*this).joining(); }
4409     bool hasMirrored() const { return QChar(*this).hasMirrored(); }
4410     QChar mirroredChar() const { return QChar(*this).mirroredChar(); }
4411     QString decomposition() const { return QChar(*this).decomposition(); }
4412     QChar::Decomposition decompositionTag() const { return QChar(*this).decompositionTag(); }
4413     uchar combiningClass() const { return QChar(*this).combiningClass(); }
4414
4415     QChar::UnicodeVersion unicodeVersion() const { return QChar(*this).unicodeVersion(); }
4416
4417     inline uchar cell() const { return QChar(*this).cell(); }
4418     inline uchar row() const { return QChar(*this).row(); }
4419     inline void setCell(uchar cell);
4420     inline void setRow(uchar row);
4421
4422     const char toAscii() const { return QChar(*this).toAscii(); }
4423     const char toLatin1() const { return QChar(*this).toLatin1(); }
4424     const ushort unicode() const { return QChar(*this).unicode(); }
4425 # 800 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qstring.h"
4426 };
4427
4428 inline void QCharRef::setRow(uchar arow) { QChar(*this).setRow(arow); }
4429 inline void QCharRef::setCell(uchar acell) { QChar(*this).setCell(acell); }
4430
4431
4432 inline QString::QString() : d(&shared_null) { d->ref.ref(); }
4433 inline QString::~QString() { if (!d->ref.deref()) free(d); }
4434 inline void QString::reserve(int asize) { if (d->ref != 1 || asize > d->alloc) realloc(asize); d->capacity = 1;}
4435 inline QString &QString::setUtf16(const ushort *autf16, int asize)
4436 { return setUnicode(reinterpret_cast<const QChar *>(autf16), asize); }
4437 inline QCharRef QString::operator[](int i)
4438 { do {if(!(i >= 0))qt_assert("i >= 0","/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qstring.h",812);} while (0); return QCharRef(*this, i); }
4439 inline QCharRef QString::operator[](uint i)
4440 { return QCharRef(*this, i); }
4441 inline QString::iterator QString::begin()
4442 { detach(); return reinterpret_cast<QChar*>(d->data); }
4443 inline QString::const_iterator QString::begin() const
4444 { return reinterpret_cast<const QChar*>(d->data); }
4445 inline QString::const_iterator QString::constBegin() const
4446 { return reinterpret_cast<const QChar*>(d->data); }
4447 inline QString::iterator QString::end()
4448 { detach(); return reinterpret_cast<QChar*>(d->data + d->size); }
4449 inline QString::const_iterator QString::end() const
4450 { return reinterpret_cast<const QChar*>(d->data + d->size); }
4451 inline QString::const_iterator QString::constEnd() const
4452 { return reinterpret_cast<const QChar*>(d->data + d->size); }
4453 inline QBool QString::contains(const QString &s, Qt::CaseSensitivity cs) const
4454 { return QBool(indexOf(s, 0, cs) != -1); }
4455 inline QBool QString::contains(QChar c, Qt::CaseSensitivity cs) const
4456 { return QBool(indexOf(c, 0, cs) != -1); }
4457
4458
4459 inline bool operator==(QString::Null, QString::Null) { return true; }
4460 inline bool operator==(QString::Null, const QString &s) { return s.isNull(); }
4461 inline bool operator==(const QString &s, QString::Null) { return s.isNull(); }
4462 inline bool operator!=(QString::Null, QString::Null) { return false; }
4463 inline bool operator!=(QString::Null, const QString &s) { return !s.isNull(); }
4464 inline bool operator!=(const QString &s, QString::Null) { return !s.isNull(); }
4465
4466
4467 inline bool qStringComparisonHelper(const QString &s1, const char *s2)
4468 {
4469
4470
4471
4472     return (s1 == QLatin1String(s2));
4473 }
4474 inline bool QString::operator==(const char *s) const
4475 { return qStringComparisonHelper(*this, s); }
4476 inline bool QString::operator!=(const char *s) const
4477 { return !qStringComparisonHelper(*this, s); }
4478 inline bool QString::operator<(const char *s) const
4479 { return *this < QString::fromAscii(s); }
4480 inline bool QString::operator>(const char *s) const
4481 { return *this > QString::fromAscii(s); }
4482 inline bool QString::operator<=(const char *s) const
4483 { return *this <= QString::fromAscii(s); }
4484 inline bool QString::operator>=(const char *s) const
4485 { return *this >= QString::fromAscii(s); }
4486
4487 inline bool operator==(const char *s1, const QString &s2)
4488 { return qStringComparisonHelper(s2, s1); }
4489 inline bool operator!=(const char *s1, const QString &s2)
4490 { return !qStringComparisonHelper(s2, s1); }
4491 inline bool operator<(const char *s1, const QString &s2)
4492 { return (QString::fromAscii(s1) < s2); }
4493 inline bool operator>(const char *s1, const QString &s2)
4494 { return (QString::fromAscii(s1) > s2); }
4495 inline bool operator<=(const char *s1, const QString &s2)
4496 { return (QString::fromAscii(s1) <= s2); }
4497 inline bool operator>=(const char *s1, const QString &s2)
4498 { return (QString::fromAscii(s1) >= s2); }
4499
4500 inline bool operator==(const char *s1, const QLatin1String &s2)
4501 { return QString::fromAscii(s1) == s2; }
4502 inline bool operator!=(const char *s1, const QLatin1String &s2)
4503 { return QString::fromAscii(s1) != s2; }
4504 inline bool operator<(const char *s1, const QLatin1String &s2)
4505 { return (QString::fromAscii(s1) < s2); }
4506 inline bool operator>(const char *s1, const QLatin1String &s2)
4507 { return (QString::fromAscii(s1) > s2); }
4508 inline bool operator<=(const char *s1, const QLatin1String &s2)
4509 { return (QString::fromAscii(s1) <= s2); }
4510 inline bool operator>=(const char *s1, const QLatin1String &s2)
4511 { return (QString::fromAscii(s1) >= s2); }
4512
4513 inline bool operator==(const QLatin1String &s1, const QLatin1String &s2)
4514 { return (qstrcmp(s1.latin1(), s2.latin1()) == 0); }
4515 inline bool operator!=(const QLatin1String &s1, const QLatin1String &s2)
4516 { return (qstrcmp(s1.latin1(), s2.latin1()) != 0); }
4517 inline bool operator<(const QLatin1String &s1, const QLatin1String &s2)
4518 { return (qstrcmp(s1.latin1(), s2.latin1()) < 0); }
4519 inline bool operator<=(const QLatin1String &s1, const QLatin1String &s2)
4520 { return (qstrcmp(s1.latin1(), s2.latin1()) <= 0); }
4521 inline bool operator>(const QLatin1String &s1, const QLatin1String &s2)
4522 { return (qstrcmp(s1.latin1(), s2.latin1()) > 0); }
4523 inline bool operator>=(const QLatin1String &s1, const QLatin1String &s2)
4524 { return (qstrcmp(s1.latin1(), s2.latin1()) >= 0); }
4525
4526
4527 inline bool QString::operator==(const QByteArray &s) const
4528 { return qStringComparisonHelper(*this, s.constData()); }
4529 inline bool QString::operator!=(const QByteArray &s) const
4530 { return !qStringComparisonHelper(*this, s.constData()); }
4531
4532 inline bool QByteArray::operator==(const QString &s) const
4533 { return qStringComparisonHelper(s, constData()); }
4534 inline bool QByteArray::operator!=(const QString &s) const
4535 { return !qStringComparisonHelper(s, constData()); }
4536 inline bool QByteArray::operator<(const QString &s) const
4537 { return QString::fromAscii(constData(), size()) < s; }
4538 inline bool QByteArray::operator>(const QString &s) const
4539 { return QString::fromAscii(constData(), size()) > s; }
4540 inline bool QByteArray::operator<=(const QString &s) const
4541 { return QString::fromAscii(constData(), size()) <= s; }
4542 inline bool QByteArray::operator>=(const QString &s) const
4543 { return QString::fromAscii(constData(), size()) >= s; }
4544
4545
4546
4547 inline QByteArray &QByteArray::append(const QString &s)
4548 { return append(s.toAscii()); }
4549 inline QByteArray &QByteArray::insert(int i, const QString &s)
4550 { return insert(i, s.toAscii()); }
4551 inline QByteArray &QByteArray::replace(char c, const QString &after)
4552 { return replace(c, after.toAscii()); }
4553 inline QByteArray &QByteArray::replace(const QString &before, const char *after)
4554 { return replace(before.toAscii(), after); }
4555 inline QByteArray &QByteArray::replace(const QString &before, const QByteArray &after)
4556 { return replace(before.toAscii(), after); }
4557 inline QByteArray &QByteArray::operator+=(const QString &s)
4558 { return operator+=(s.toAscii()); }
4559 inline int QByteArray::indexOf(const QString &s, int from) const
4560 { return indexOf(s.toAscii(), from); }
4561 inline int QByteArray::lastIndexOf(const QString &s, int from) const
4562 { return lastIndexOf(s.toAscii(), from); }
4563 # 945 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qstring.h"
4564 inline const QString operator+(const QString &s1, const QString &s2)
4565 { QString t(s1); t += s2; return t; }
4566 inline const QString operator+(const QString &s1, QChar s2)
4567 { QString t(s1); t += s2; return t; }
4568 inline const QString operator+(QChar s1, const QString &s2)
4569 { QString t(s1); t += s2; return t; }
4570
4571 inline const QString operator+(const QString &s1, const char *s2)
4572 { QString t(s1); t += QString::fromAscii(s2); return t; }
4573 inline const QString operator+(const char *s1, const QString &s2)
4574 { QString t = QString::fromAscii(s1); t += s2; return t; }
4575 inline const QString operator+(char c, const QString &s)
4576 { QString t = s; t.prepend(QChar::fromAscii(c)); return t; }
4577 inline const QString operator+(const QString &s, char c)
4578 { QString t = s; t += QChar::fromAscii(c); return t; }
4579 inline const QString operator+(const QByteArray &ba, const QString &s)
4580 { QString t = QString::fromAscii(ba.constData(), qstrnlen(ba.constData(), ba.size())); t += s; return t; }
4581 inline const QString operator+(const QString &s, const QByteArray &ba)
4582 { QString t(s); t += QString::fromAscii(ba.constData(), qstrnlen(ba.constData(), ba.size())); return t; }
4583 # 1003 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qstring.h"
4584  QDataStream &operator<<(QDataStream &, const QString &);
4585  QDataStream &operator>>(QDataStream &, QString &);
4586 # 1017 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qstring.h"
4587 template <> class QTypeInfo<QString> { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QString)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QString"; } };
4588 template <> inline bool qIsDetached<QString>(QString &t) { return t.isDetached(); } template <typename T> inline void qSwap(T &, T &); template <> inline void qSwap<QString>(QString &value1, QString &value2) { const QString::DataPtr t = value1.data_ptr(); value1.data_ptr() = value2.data_ptr(); value2.data_ptr() = t; }
4589 inline QFlags<QString::SectionFlags::enum_type> operator|(QString::SectionFlags::enum_type f1, QString::SectionFlags::enum_type f2) { return QFlags<QString::SectionFlags::enum_type>(f1) | f2; } inline QFlags<QString::SectionFlags::enum_type> operator|(QString::SectionFlags::enum_type f1, QFlags<QString::SectionFlags::enum_type> f2) { return f2 | f1; }
4590 # 1028 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qstring.h"
4591 class QStringRef {
4592     const QString *m_string;
4593     int m_position;
4594     int m_size;
4595 public:
4596     inline QStringRef():m_string(0), m_position(0), m_size(0){}
4597     inline QStringRef(const QString *string, int position, int size);
4598     inline QStringRef(const QString *string);
4599     inline QStringRef(const QStringRef &other)
4600         :m_string(other.m_string), m_position(other.m_position), m_size(other.m_size)
4601         {}
4602
4603     inline ~QStringRef(){}
4604     inline const QString *string() const { return m_string; }
4605     inline int position() const { return m_position; }
4606     inline int size() const { return m_size; }
4607     inline int count() const { return m_size; }
4608     inline int length() const { return m_size; }
4609
4610     inline QStringRef &operator=(const QStringRef &other) {
4611         m_string = other.m_string; m_position = other.m_position;
4612         m_size = other.m_size; return *this;
4613     }
4614
4615     inline QStringRef &operator=(const QString *string);
4616
4617     inline const QChar *unicode() const {
4618         if (!m_string)
4619             return reinterpret_cast<const QChar *>(QString::shared_null.data);
4620         return m_string->unicode() + m_position;
4621     }
4622     inline const QChar *data() const { return unicode(); }
4623     inline const QChar *constData() const { return unicode(); }
4624
4625     inline void clear() { m_string = 0; m_position = m_size = 0; }
4626     QString toString() const;
4627     inline bool isEmpty() const { return m_size == 0; }
4628     inline bool isNull() const { return m_string == 0 || m_string->isNull(); }
4629
4630     QStringRef appendTo(QString *string) const;
4631
4632     inline const QChar at(int i) const
4633         { do {if(!(i >= 0 && i < size()))qt_assert("i >= 0 && i < size()","/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qstring.h",1070);} while (0); return m_string->at(i + m_position); }
4634
4635 };
4636
4637 inline QStringRef &QStringRef::operator=(const QString *aString)
4638 { m_string = aString; m_position = 0; m_size = aString?aString->size():0; return *this; }
4639
4640 inline QStringRef::QStringRef(const QString *aString, int aPosition, int aSize)
4641         :m_string(aString), m_position(aPosition), m_size(aSize){}
4642
4643 inline QStringRef::QStringRef(const QString *aString)
4644     :m_string(aString), m_position(0), m_size(aString?aString->size() : 0){}
4645
4646  bool operator==(const QStringRef &s1,const QStringRef &s2);
4647 inline bool operator!=(const QStringRef &s1,const QStringRef &s2)
4648 { return !(s1 == s2); }
4649  bool operator==(const QString &s1,const QStringRef &s2);
4650 inline bool operator!=(const QString &s1,const QStringRef &s2)
4651 { return !(s1 == s2); }
4652 inline bool operator==(const QStringRef &s1,const QString &s2)
4653 { return s2 == s1; }
4654 inline bool operator!=(const QStringRef &s1,const QString &s2)
4655 { return s2 != s1; }
4656  bool operator==(const QLatin1String &s1, const QStringRef &s2);
4657 inline bool operator!=(const QLatin1String &s1,const QStringRef &s2)
4658 { return !(s1 == s2); }
4659 inline bool operator==(const QStringRef &s1,const QLatin1String &s2)
4660 { return s2 == s1; }
4661 inline bool operator!=(const QStringRef &s1,const QLatin1String &s2)
4662 { return s2 != s1; }
4663
4664  bool operator<(const QStringRef &s1,const QStringRef &s2);
4665 inline bool operator>(const QStringRef &s1, const QStringRef &s2)
4666 { return s2 < s1; }
4667 inline bool operator<=(const QStringRef &s1, const QStringRef &s2)
4668 { return !(s1 > s2); }
4669 inline bool operator>=(const QStringRef &s1, const QStringRef &s2)
4670 { return !(s1 < s2); }
4671
4672 inline bool qStringComparisonHelper(const QStringRef &s1, const char *s2)
4673 {
4674
4675
4676
4677     return (s1 == QLatin1String(s2));
4678 }
4679
4680 inline bool operator==(const char *s1, const QStringRef &s2)
4681 { return qStringComparisonHelper(s2, s1); }
4682 inline bool operator==(const QStringRef &s1, const char *s2)
4683 { return qStringComparisonHelper(s1, s2); }
4684 inline bool operator!=(const char *s1, const QStringRef &s2)
4685 { return !qStringComparisonHelper(s2, s1); }
4686 inline bool operator!=(const QStringRef &s1, const char *s2)
4687 { return !qStringComparisonHelper(s1, s2); }
4688
4689
4690
4691 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qstring.h" 2
4692 # 48 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/io/qiodevice.h" 2
4693
4694
4695
4696
4697
4698
4699
4700 typedef QtValidLicenseForCoreModule QtCoreModule;
4701
4702 class QByteArray;
4703 class QIODevicePrivate;
4704
4705 class QIODevice
4706
4707
4708
4709 {
4710
4711
4712
4713 public:
4714     enum OpenModeFlag {
4715         NotOpen = 0x0000,
4716         ReadOnly = 0x0001,
4717         WriteOnly = 0x0002,
4718         ReadWrite = ReadOnly | WriteOnly,
4719         Append = 0x0004,
4720         Truncate = 0x0008,
4721         Text = 0x0010,
4722         Unbuffered = 0x0020
4723     };
4724     typedef QFlags<OpenModeFlag> OpenMode;
4725
4726     QIODevice();
4727
4728
4729
4730     virtual ~QIODevice();
4731
4732     OpenMode openMode() const;
4733
4734     void setTextModeEnabled(bool enabled);
4735     bool isTextModeEnabled() const;
4736
4737     bool isOpen() const;
4738     bool isReadable() const;
4739     bool isWritable() const;
4740     virtual bool isSequential() const;
4741
4742     virtual bool open(OpenMode mode);
4743     virtual void close();
4744
4745
4746
4747     virtual qint64 pos() const;
4748     virtual qint64 size() const;
4749     virtual bool seek(qint64 pos);
4750     virtual bool atEnd() const;
4751     virtual bool reset();
4752
4753     virtual qint64 bytesAvailable() const;
4754     virtual qint64 bytesToWrite() const;
4755
4756     qint64 read(char *data, qint64 maxlen);
4757     QByteArray read(qint64 maxlen);
4758     QByteArray readAll();
4759     qint64 readLine(char *data, qint64 maxlen);
4760     QByteArray readLine(qint64 maxlen = 0);
4761     virtual bool canReadLine() const;
4762
4763     qint64 write(const char *data, qint64 len);
4764     inline qint64 write(const QByteArray &data)
4765     { return write(data.constData(), data.size()); }
4766
4767     qint64 peek(char *data, qint64 maxlen);
4768     QByteArray peek(qint64 maxlen);
4769
4770     virtual bool waitForReadyRead(int msecs);
4771     virtual bool waitForBytesWritten(int msecs);
4772
4773     void ungetChar(char c);
4774     bool putChar(char c);
4775     bool getChar(char *c);
4776
4777     QString errorString() const;
4778 # 141 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/io/qiodevice.h"
4779 protected:
4780
4781     QIODevice(QIODevicePrivate &dd);
4782
4783
4784
4785     virtual qint64 readData(char *data, qint64 maxlen) = 0;
4786     virtual qint64 readLineData(char *data, qint64 maxlen);
4787     virtual qint64 writeData(const char *data, qint64 len) = 0;
4788
4789     void setOpenMode(OpenMode openMode);
4790
4791     void setErrorString(const QString &errorString);
4792
4793
4794     QIODevicePrivate *d_ptr;
4795
4796
4797 private:
4798     inline QIODevicePrivate* d_func() { return reinterpret_cast<QIODevicePrivate *>(d_ptr); } inline const QIODevicePrivate* d_func() const { return reinterpret_cast<const QIODevicePrivate *>(d_ptr); } friend class QIODevicePrivate;
4799     QIODevice(const QIODevice &); QIODevice &operator=(const QIODevice &);
4800 # 196 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/io/qiodevice.h"
4801 };
4802
4803 inline QFlags<QIODevice::OpenMode::enum_type> operator|(QIODevice::OpenMode::enum_type f1, QIODevice::OpenMode::enum_type f2) { return QFlags<QIODevice::OpenMode::enum_type>(f1) | f2; } inline QFlags<QIODevice::OpenMode::enum_type> operator|(QIODevice::OpenMode::enum_type f1, QFlags<QIODevice::OpenMode::enum_type> f2) { return f2 | f1; }
4804 # 238 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/io/qiodevice.h"
4805 class QDebug;
4806  QDebug operator<<(QDebug debug, QIODevice::OpenMode modes);
4807
4808
4809
4810 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qiodevice.h" 2
4811 # 43 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/io/qdatastream.h" 2
4812 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qglobal.h" 1
4813 # 44 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/io/qdatastream.h" 2
4814
4815
4816
4817
4818
4819
4820
4821 typedef QtValidLicenseForCoreModule QtCoreModule;
4822
4823 class QByteArray;
4824 class QIODevice;
4825
4826 template <typename T> class QList;
4827 template <typename T> class QLinkedList;
4828 template <typename T> class QVector;
4829 template <typename T> class QSet;
4830 template <class Key, class T> class QHash;
4831 template <class Key, class T> class QMap;
4832
4833 class QDataStreamPrivate;
4834
4835
4836 class QDataStream
4837 {
4838 public:
4839     enum Version {
4840         Qt_1_0 = 1,
4841         Qt_2_0 = 2,
4842         Qt_2_1 = 3,
4843         Qt_3_0 = 4,
4844         Qt_3_1 = 5,
4845         Qt_3_3 = 6,
4846         Qt_4_0 = 7,
4847         Qt_4_1 = Qt_4_0,
4848         Qt_4_2 = 8,
4849         Qt_4_3 = 9
4850
4851
4852
4853     };
4854
4855     enum ByteOrder {
4856         BigEndian = QSysInfo::BigEndian,
4857         LittleEndian = QSysInfo::LittleEndian
4858     };
4859
4860     enum Status {
4861         Ok,
4862         ReadPastEnd,
4863  ReadCorruptData
4864     };
4865
4866     QDataStream();
4867     explicit QDataStream(QIODevice *);
4868
4869
4870
4871     QDataStream(QByteArray *, QIODevice::OpenMode flags);
4872     QDataStream(const QByteArray &);
4873     virtual ~QDataStream();
4874
4875     QIODevice *device() const;
4876     void setDevice(QIODevice *);
4877     void unsetDevice();
4878
4879     bool atEnd() const;
4880
4881
4882
4883
4884     Status status() const;
4885     void setStatus(Status status);
4886     void resetStatus();
4887
4888     ByteOrder byteOrder() const;
4889     void setByteOrder(ByteOrder);
4890
4891     int version() const;
4892     void setVersion(int);
4893
4894     QDataStream &operator>>(qint8 &i);
4895     QDataStream &operator>>(quint8 &i);
4896     QDataStream &operator>>(qint16 &i);
4897     QDataStream &operator>>(quint16 &i);
4898     QDataStream &operator>>(qint32 &i);
4899     QDataStream &operator>>(quint32 &i);
4900     QDataStream &operator>>(qint64 &i);
4901     QDataStream &operator>>(quint64 &i);
4902
4903     QDataStream &operator>>(bool &i);
4904     QDataStream &operator>>(float &f);
4905     QDataStream &operator>>(double &f);
4906     QDataStream &operator>>(char *&str);
4907
4908     QDataStream &operator<<(qint8 i);
4909     QDataStream &operator<<(quint8 i);
4910     QDataStream &operator<<(qint16 i);
4911     QDataStream &operator<<(quint16 i);
4912     QDataStream &operator<<(qint32 i);
4913     QDataStream &operator<<(quint32 i);
4914     QDataStream &operator<<(qint64 i);
4915     QDataStream &operator<<(quint64 i);
4916     QDataStream &operator<<(bool i);
4917     QDataStream &operator<<(float f);
4918     QDataStream &operator<<(double f);
4919     QDataStream &operator<<(const char *str);
4920
4921     QDataStream &readBytes(char *&, uint &len);
4922     int readRawData(char *, int len);
4923
4924     QDataStream &writeBytes(const char *, uint len);
4925     int writeRawData(const char *, int len);
4926
4927     int skipRawData(int len);
4928 # 168 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/io/qdatastream.h"
4929 private:
4930     QDataStream(const QDataStream &); QDataStream &operator=(const QDataStream &);
4931
4932     QDataStreamPrivate *d;
4933
4934     QIODevice *dev;
4935     bool owndev;
4936     bool noswap;
4937     ByteOrder byteorder;
4938     int ver;
4939     Status q_status;
4940 };
4941
4942
4943
4944
4945
4946
4947 inline QIODevice *QDataStream::device() const
4948 { return dev; }
4949
4950 inline QDataStream::ByteOrder QDataStream::byteOrder() const
4951 { return byteorder; }
4952
4953 inline int QDataStream::version() const
4954 { return ver; }
4955
4956 inline void QDataStream::setVersion(int v)
4957 { ver = v; }
4958
4959 inline QDataStream &QDataStream::operator>>(quint8 &i)
4960 { return *this >> reinterpret_cast<qint8&>(i); }
4961
4962 inline QDataStream &QDataStream::operator>>(quint16 &i)
4963 { return *this >> reinterpret_cast<qint16&>(i); }
4964
4965 inline QDataStream &QDataStream::operator>>(quint32 &i)
4966 { return *this >> reinterpret_cast<qint32&>(i); }
4967
4968 inline QDataStream &QDataStream::operator>>(quint64 &i)
4969 { return *this >> reinterpret_cast<qint64&>(i); }
4970
4971 inline QDataStream &QDataStream::operator<<(quint8 i)
4972 { return *this << qint8(i); }
4973
4974 inline QDataStream &QDataStream::operator<<(quint16 i)
4975 { return *this << qint16(i); }
4976
4977 inline QDataStream &QDataStream::operator<<(quint32 i)
4978 { return *this << qint32(i); }
4979
4980 inline QDataStream &QDataStream::operator<<(quint64 i)
4981 { return *this << qint64(i); }
4982
4983 template <typename T>
4984 QDataStream& operator>>(QDataStream& s, QList<T>& l)
4985 {
4986     l.clear();
4987     quint32 c;
4988     s >> c;
4989     for(quint32 i = 0; i < c; ++i)
4990     {
4991         T t;
4992         s >> t;
4993         l.append(t);
4994         if (s.atEnd())
4995             break;
4996     }
4997     return s;
4998 }
4999
5000 template <typename T>
5001 QDataStream& operator<<(QDataStream& s, const QList<T>& l)
5002 {
5003     s << quint32(l.size());
5004     for (int i = 0; i < l.size(); ++i)
5005         s << l.at(i);
5006     return s;
5007 }
5008
5009 template <typename T>
5010 QDataStream& operator>>(QDataStream& s, QLinkedList<T>& l)
5011 {
5012     l.clear();
5013     quint32 c;
5014     s >> c;
5015     for(quint32 i = 0; i < c; ++i)
5016     {
5017         T t;
5018         s >> t;
5019         l.append(t);
5020         if (s.atEnd())
5021             break;
5022     }
5023     return s;
5024 }
5025
5026 template <typename T>
5027 QDataStream& operator<<(QDataStream& s, const QLinkedList<T>& l)
5028 {
5029     s << quint32(l.size());
5030     typename QLinkedList<T>::ConstIterator it = l.constBegin();
5031     for(; it != l.constEnd(); ++it)
5032         s << *it;
5033     return s;
5034 }
5035
5036 template<typename T>
5037 QDataStream& operator>>(QDataStream& s, QVector<T>& v)
5038 {
5039     v.clear();
5040     quint32 c;
5041     s >> c;
5042     v.resize(c);
5043     for(quint32 i = 0; i < c; ++i) {
5044         T t;
5045         s >> t;
5046         v[i] = t;
5047     }
5048     return s;
5049 }
5050
5051 template<typename T>
5052 QDataStream& operator<<(QDataStream& s, const QVector<T>& v)
5053 {
5054     s << quint32(v.size());
5055     for (typename QVector<T>::const_iterator it = v.begin(); it != v.end(); ++it)
5056         s << *it;
5057     return s;
5058 }
5059
5060 template <typename T>
5061 QDataStream &operator>>(QDataStream &in, QSet<T> &set)
5062 {
5063     set.clear();
5064     quint32 c;
5065     in >> c;
5066     for (quint32 i = 0; i < c; ++i) {
5067         T t;
5068         in >> t;
5069         set << t;
5070         if (in.atEnd())
5071             break;
5072     }
5073     return in;
5074 }
5075
5076 template <typename T>
5077 QDataStream& operator<<(QDataStream &out, const QSet<T> &set)
5078 {
5079     out << quint32(set.size());
5080     typename QSet<T>::const_iterator i = set.constBegin();
5081     while (i != set.constEnd()) {
5082         out << *i;
5083         ++i;
5084     }
5085     return out;
5086 }
5087
5088 template <class Key, class T>
5089  QDataStream &operator>>(QDataStream &in, QHash<Key, T> &hash)
5090 {
5091     QDataStream::Status oldStatus = in.status();
5092     in.resetStatus();
5093     hash.clear();
5094
5095     quint32 n;
5096     in >> n;
5097
5098     for (quint32 i = 0; i < n; ++i) {
5099         if (in.status() != QDataStream::Ok)
5100             break;
5101
5102         Key k;
5103         T t;
5104         in >> k >> t;
5105         hash.insertMulti(k, t);
5106     }
5107
5108     if (in.status() != QDataStream::Ok)
5109         hash.clear();
5110     if (oldStatus != QDataStream::Ok)
5111         in.setStatus(oldStatus);
5112     return in;
5113 }
5114
5115 template <class Key, class T>
5116  QDataStream &operator<<(QDataStream &out, const QHash<Key, T>& hash)
5117 {
5118     out << quint32(hash.size());
5119     typename QHash<Key, T>::ConstIterator it = hash.end();
5120     typename QHash<Key, T>::ConstIterator begin = hash.begin();
5121     while (it != begin) {
5122         --it;
5123         out << it.key() << it.value();
5124     }
5125     return out;
5126 }
5127
5128
5129
5130
5131 template <class aKey, class aT>
5132  QDataStream &operator>>(QDataStream &in, QMap<aKey, aT> &map)
5133
5134 {
5135     QDataStream::Status oldStatus = in.status();
5136     in.resetStatus();
5137     map.clear();
5138
5139     quint32 n;
5140     in >> n;
5141
5142     map.detach();
5143     map.setInsertInOrder(true);
5144     for (quint32 i = 0; i < n; ++i) {
5145         if (in.status() != QDataStream::Ok)
5146             break;
5147
5148         aKey key;
5149         aT value;
5150         in >> key >> value;
5151         map.insertMulti(key, value);
5152     }
5153     map.setInsertInOrder(false);
5154     if (in.status() != QDataStream::Ok)
5155         map.clear();
5156     if (oldStatus != QDataStream::Ok)
5157         in.setStatus(oldStatus);
5158     return in;
5159 }
5160
5161 template <class Key, class T>
5162  QDataStream &operator<<(QDataStream &out, const QMap<Key, T> &map)
5163 {
5164     out << quint32(map.size());
5165     typename QMap<Key, T>::ConstIterator it = map.end();
5166     typename QMap<Key, T>::ConstIterator begin = map.begin();
5167     while (it != begin) {
5168         --it;
5169         out << it.key() << it.value();
5170     }
5171     return out;
5172 }
5173
5174
5175
5176
5177 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qdatastream.h" 2
5178 # 44 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qstringlist.h" 2
5179 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qlist.h" 1
5180 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qlist.h" 1
5181 # 42 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qlist.h"
5182 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qiterator.h" 1
5183 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qiterator.h" 1
5184 # 42 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qiterator.h"
5185 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qglobal.h" 1
5186 # 43 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qiterator.h" 2
5187
5188
5189
5190 typedef QtValidLicenseForCoreModule QtCoreModule;
5191
5192 namespace std { struct bidirectional_iterator_tag; struct random_access_iterator_tag; }
5193 # 190 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qiterator.h"
5194
5195 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qiterator.h" 2
5196 # 43 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qlist.h" 2
5197 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qatomic.h" 1
5198 # 44 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qlist.h" 2
5199 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qalgorithms.h" 1
5200 # 45 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qlist.h" 2
5201
5202
5203
5204
5205
5206
5207 # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/g++-v4/new" 1 3
5208 # 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/g++-v4/new" 3
5209 # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/g++-v4/cstddef" 1 3
5210 # 48 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/g++-v4/cstddef" 3
5211        
5212 # 49 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/g++-v4/cstddef" 3
5213 #pragma GCC visibility push(default)
5214
5215 # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4
5216 # 52 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/g++-v4/cstddef" 2 3
5217
5218 namespace std
5219 {
5220   using ::ptrdiff_t;
5221   using ::size_t;
5222 }
5223
5224 #pragma GCC visibility pop
5225 # 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/g++-v4/new" 2 3
5226 # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/g++-v4/exception" 1 3
5227 # 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/g++-v4/exception" 3
5228 #pragma GCC visibility push(default)
5229
5230 extern "C++" {
5231
5232 namespace std
5233 {
5234 # 54 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/g++-v4/exception" 3
5235   class exception
5236   {
5237   public:
5238     exception() throw() { }
5239     virtual ~exception() throw();
5240
5241
5242     virtual const char* what() const throw();
5243   };
5244
5245
5246
5247   class bad_exception : public exception
5248   {
5249   public:
5250     bad_exception() throw() { }
5251
5252
5253     virtual ~bad_exception() throw();
5254   };
5255
5256
5257   typedef void (*terminate_handler) ();
5258
5259   typedef void (*unexpected_handler) ();
5260
5261
5262   terminate_handler set_terminate(terminate_handler) throw();
5263
5264
5265   void terminate() __attribute__ ((__noreturn__));
5266
5267
5268   unexpected_handler set_unexpected(unexpected_handler) throw();
5269
5270
5271   void unexpected() __attribute__ ((__noreturn__));
5272 # 102 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/g++-v4/exception" 3
5273   bool uncaught_exception() throw();
5274 }
5275
5276 namespace __gnu_cxx
5277 {
5278 # 117 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/g++-v4/exception" 3
5279   void __verbose_terminate_handler ();
5280 }
5281
5282 }
5283
5284 #pragma GCC visibility pop
5285 # 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/g++-v4/new" 2 3
5286
5287 #pragma GCC visibility push(default)
5288
5289 extern "C++" {
5290
5291 namespace std
5292 {
5293
5294
5295
5296
5297
5298   class bad_alloc : public exception
5299   {
5300   public:
5301     bad_alloc() throw() { }
5302
5303
5304     virtual ~bad_alloc() throw();
5305   };
5306
5307   struct nothrow_t { };
5308   extern const nothrow_t nothrow;
5309
5310
5311   typedef void (*new_handler)();
5312
5313   new_handler set_new_handler(new_handler) throw();
5314 }
5315 # 84 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/g++-v4/new" 3
5316 void* operator new(std::size_t) throw (std::bad_alloc);
5317 void* operator new[](std::size_t) throw (std::bad_alloc);
5318 void operator delete(void*) throw();
5319 void operator delete[](void*) throw();
5320 void* operator new(std::size_t, const std::nothrow_t&) throw();
5321 void* operator new[](std::size_t, const std::nothrow_t&) throw();
5322 void operator delete(void*, const std::nothrow_t&) throw();
5323 void operator delete[](void*, const std::nothrow_t&) throw();
5324
5325
5326 inline void* operator new(std::size_t, void* __p) throw() { return __p; }
5327 inline void* operator new[](std::size_t, void* __p) throw() { return __p; }
5328
5329
5330 inline void operator delete (void*, void*) throw() { }
5331 inline void operator delete[](void*, void*) throw() { }
5332
5333 }
5334
5335 #pragma GCC visibility pop
5336 # 52 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qlist.h" 2
5337
5338
5339
5340 typedef QtValidLicenseForCoreModule QtCoreModule;
5341
5342 template <typename T> class QVector;
5343 template <typename T> class QSet;
5344
5345 struct QListData {
5346     struct Data {
5347         QBasicAtomic ref;
5348         int alloc, begin, end;
5349         uint sharable : 1;
5350         void *array[1];
5351     };
5352     enum { DataHeaderSize = sizeof(Data) - sizeof(void *) };
5353
5354     Data *detach();
5355     Data *detach2();
5356     void realloc(int alloc);
5357     static Data shared_null;
5358     Data *d;
5359     void **erase(void **xi);
5360     void **append();
5361     void **append(const QListData &l);
5362     void **prepend();
5363     void **insert(int i);
5364     void remove(int i);
5365     void remove(int i, int n);
5366     void move(int from, int to);
5367     inline int size() const { return d->end - d->begin; }
5368     inline bool isEmpty() const { return d->end == d->begin; }
5369     inline void **at(int i) const { return d->array + d->begin + i; }
5370     inline void **begin() const { return d->array + d->begin; }
5371     inline void **end() const { return d->array + d->end; }
5372 };
5373
5374 template <typename T>
5375 class QList
5376 {
5377     struct Node { void *v;
5378
5379
5380
5381         inline T &t()
5382         { return *reinterpret_cast<T*>(QTypeInfo<T>::isLarge || QTypeInfo<T>::isStatic
5383                                        ? v : this); }
5384
5385     };
5386
5387     union { QListData p; QListData::Data *d; };
5388
5389 public:
5390     inline QList() : d(&QListData::shared_null) { d->ref.ref(); }
5391     inline QList(const QList<T> &l) : d(l.d) { d->ref.ref(); if (!d->sharable) detach_helper(); }
5392     ~QList();
5393     QList<T> &operator=(const QList<T> &l);
5394     bool operator==(const QList<T> &l) const;
5395     inline bool operator!=(const QList<T> &l) const { return !(*this == l); }
5396
5397     inline int size() const { return p.size(); }
5398
5399     inline void detach() { if (d->ref != 1) detach_helper(); }
5400     inline bool isDetached() const { return d->ref == 1; }
5401     inline void setSharable(bool sharable) { if (!sharable) detach(); d->sharable = sharable; }
5402
5403     inline bool isEmpty() const { return p.isEmpty(); }
5404
5405     void clear();
5406
5407     const T &at(int i) const;
5408     const T &operator[](int i) const;
5409     T &operator[](int i);
5410
5411     void append(const T &t);
5412     void prepend(const T &t);
5413     void insert(int i, const T &t);
5414     void replace(int i, const T &t);
5415     void removeAt(int i);
5416     int removeAll(const T &t);
5417     T takeAt(int i);
5418     T takeFirst();
5419     T takeLast();
5420     void move(int from, int to);
5421     void swap(int i, int j);
5422     int indexOf(const T &t, int from = 0) const;
5423     int lastIndexOf(const T &t, int from = -1) const;
5424     QBool contains(const T &t) const;
5425     int count(const T &t) const;
5426
5427     class const_iterator;
5428
5429     class iterator {
5430     public:
5431         Node *i;
5432         typedef std::random_access_iterator_tag iterator_category;
5433         typedef ptrdiff_t difference_type;
5434         typedef T value_type;
5435         typedef T *pointer;
5436         typedef T &reference;
5437
5438         inline iterator() : i(0) {}
5439         inline iterator(Node *n) : i(n) {}
5440         inline iterator(const iterator &o): i(o.i){}
5441         inline T &operator*() const { return i->t(); }
5442         inline T *operator->() const { return &i->t(); }
5443         inline T &operator[](int j) const { return i[j].t(); }
5444         inline bool operator==(const iterator &o) const { return i == o.i; }
5445         inline bool operator!=(const iterator &o) const { return i != o.i; }
5446         inline bool operator<(const iterator& other) const { return i < other.i; }
5447         inline bool operator<=(const iterator& other) const { return i <= other.i; }
5448         inline bool operator>(const iterator& other) const { return i > other.i; }
5449         inline bool operator>=(const iterator& other) const { return i >= other.i; }
5450
5451         inline bool operator==(const const_iterator &o) const
5452             { return i == reinterpret_cast<const iterator &>(o).i; }
5453         inline bool operator!=(const const_iterator &o) const
5454             { return i != reinterpret_cast<const iterator &>(o).i; }
5455         inline bool operator<(const const_iterator& other) const
5456             { return i < reinterpret_cast<const iterator &>(other).i; }
5457         inline bool operator<=(const const_iterator& other) const
5458             { return i <= reinterpret_cast<const iterator &>(other).i; }
5459         inline bool operator>(const const_iterator& other) const
5460             { return i > reinterpret_cast<const iterator &>(other).i; }
5461         inline bool operator>=(const const_iterator& other) const
5462             { return i >= reinterpret_cast<const iterator &>(other).i; }
5463
5464         inline iterator &operator++() { ++i; return *this; }
5465         inline iterator operator++(int) { Node *n = i; ++i; return n; }
5466         inline iterator &operator--() { i--; return *this; }
5467         inline iterator operator--(int) { Node *n = i; i--; return n; }
5468         inline iterator &operator+=(int j) { i+=j; return *this; }
5469         inline iterator &operator-=(int j) { i-=j; return *this; }
5470         inline iterator operator+(int j) const { return iterator(i+j); }
5471         inline iterator operator-(int j) const { return iterator(i-j); }
5472         inline int operator-(iterator j) const { return i - j.i; }
5473     };
5474     friend class iterator;
5475
5476     class const_iterator {
5477     public:
5478         Node *i;
5479         typedef std::random_access_iterator_tag iterator_category;
5480         typedef ptrdiff_t difference_type;
5481         typedef T value_type;
5482         typedef const T *pointer;
5483         typedef const T &reference;
5484
5485         inline const_iterator() : i(0) {}
5486         inline const_iterator(Node *n) : i(n) {}
5487         inline const_iterator(const const_iterator &o): i(o.i) {}
5488
5489
5490
5491         inline const_iterator(const iterator &o): i(o.i) {}
5492
5493         inline const T &operator*() const { return i->t(); }
5494         inline const T *operator->() const { return &i->t(); }
5495         inline const T &operator[](int j) const { return i[j].t(); }
5496         inline bool operator==(const const_iterator &o) const { return i == o.i; }
5497         inline bool operator!=(const const_iterator &o) const { return i != o.i; }
5498         inline bool operator<(const const_iterator& other) const { return i < other.i; }
5499         inline bool operator<=(const const_iterator& other) const { return i <= other.i; }
5500         inline bool operator>(const const_iterator& other) const { return i > other.i; }
5501         inline bool operator>=(const const_iterator& other) const { return i >= other.i; }
5502         inline const_iterator &operator++() { ++i; return *this; }
5503         inline const_iterator operator++(int) { Node *n = i; ++i; return n; }
5504         inline const_iterator &operator--() { i--; return *this; }
5505         inline const_iterator operator--(int) { Node *n = i; i--; return n; }
5506         inline const_iterator &operator+=(int j) { i+=j; return *this; }
5507         inline const_iterator &operator-=(int j) { i-=j; return *this; }
5508         inline const_iterator operator+(int j) const { return const_iterator(i+j); }
5509         inline const_iterator operator-(int j) const { return const_iterator(i-j); }
5510         inline int operator-(const_iterator j) const { return i - j.i; }
5511     };
5512     friend class const_iterator;
5513
5514
5515     inline iterator begin() { detach(); return reinterpret_cast<Node *>(p.begin()); }
5516     inline const_iterator begin() const { return reinterpret_cast<Node *>(p.begin()); }
5517     inline const_iterator constBegin() const { return reinterpret_cast<Node *>(p.begin()); }
5518     inline iterator end() { detach(); return reinterpret_cast<Node *>(p.end()); }
5519     inline const_iterator end() const { return reinterpret_cast<Node *>(p.end()); }
5520     inline const_iterator constEnd() const { return reinterpret_cast<Node *>(p.end()); }
5521     iterator insert(iterator before, const T &t);
5522     iterator erase(iterator pos);
5523     iterator erase(iterator first, iterator last);
5524
5525
5526     typedef iterator Iterator;
5527     typedef const_iterator ConstIterator;
5528     inline int count() const { return p.size(); }
5529     inline T& first() { do {if(!(!isEmpty()))qt_assert("!isEmpty()","/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qlist.h",244);} while (0); return *begin(); }
5530     inline const T& first() const { do {if(!(!isEmpty()))qt_assert("!isEmpty()","/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qlist.h",245);} while (0); return *begin(); }
5531     T& last() { do {if(!(!isEmpty()))qt_assert("!isEmpty()","/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qlist.h",246);} while (0); return *(--end()); }
5532     const T& last() const { do {if(!(!isEmpty()))qt_assert("!isEmpty()","/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qlist.h",247);} while (0); return *(--end()); }
5533     inline void removeFirst() { do {if(!(!isEmpty()))qt_assert("!isEmpty()","/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qlist.h",248);} while (0); erase(begin()); }
5534     inline void removeLast() { do {if(!(!isEmpty()))qt_assert("!isEmpty()","/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qlist.h",249);} while (0); erase(--end()); }
5535     QList<T> mid(int pos, int length = -1) const;
5536
5537     T value(int i) const;
5538     T value(int i, const T &defaultValue) const;
5539
5540
5541     inline void push_back(const T &t) { append(t); }
5542     inline void push_front(const T &t) { prepend(t); }
5543     inline T& front() { return first(); }
5544     inline const T& front() const { return first(); }
5545     inline T& back() { return last(); }
5546     inline const T& back() const { return last(); }
5547     inline void pop_front() { removeFirst(); }
5548     inline void pop_back() { removeLast(); }
5549     inline bool empty() const { return isEmpty(); }
5550     typedef int size_type;
5551     typedef T value_type;
5552     typedef value_type *pointer;
5553     typedef const value_type *const_pointer;
5554     typedef value_type &reference;
5555     typedef const value_type &const_reference;
5556     typedef ptrdiff_t difference_type;
5557 # 288 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qlist.h"
5558     QList<T> &operator+=(const QList<T> &l);
5559     inline QList<T> operator+(const QList<T> &l) const
5560     { QList n = *this; n += l; return n; }
5561     inline QList<T> &operator+=(const T &t)
5562     { append(t); return *this; }
5563     inline QList<T> &operator<< (const T &t)
5564     { append(t); return *this; }
5565     inline QList<T> &operator<<(const QList<T> &l)
5566     { *this += l; return *this; }
5567
5568     QVector<T> toVector() const;
5569     QSet<T> toSet() const;
5570
5571     static QList<T> fromVector(const QVector<T> &vector);
5572     static QList<T> fromSet(const QSet<T> &set);
5573 # 311 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qlist.h"
5574 private:
5575     void detach_helper();
5576     void free(QListData::Data *d);
5577
5578     void node_construct(Node *n, const T &t);
5579     void node_destruct(Node *n);
5580     void node_copy(Node *from, Node *to, Node *src);
5581     void node_destruct(Node *from, Node *to);
5582 };
5583
5584
5585
5586
5587
5588
5589
5590 template <typename T>
5591 inline void QList<T>::node_construct(Node *n, const T &t)
5592 {
5593     if (QTypeInfo<T>::isLarge || QTypeInfo<T>::isStatic) n->v = new T(t);
5594     else if (QTypeInfo<T>::isComplex) new (n) T(t);
5595     else *reinterpret_cast<T*>(n) = t;
5596 }
5597
5598 template <typename T>
5599 inline void QList<T>::node_destruct(Node *n)
5600 {
5601     if (QTypeInfo<T>::isLarge || QTypeInfo<T>::isStatic) delete reinterpret_cast<T*>(n->v);
5602     else if (QTypeInfo<T>::isComplex) reinterpret_cast<T*>(n)->~T();
5603 }
5604
5605 template <typename T>
5606 inline void QList<T>::node_copy(Node *from, Node *to, Node *src)
5607 {
5608     if (QTypeInfo<T>::isLarge || QTypeInfo<T>::isStatic)
5609         while(from != to)
5610             (from++)->v = new T(*reinterpret_cast<T*>((src++)->v));
5611     else if (QTypeInfo<T>::isComplex)
5612         while(from != to)
5613             new (from++) T(*reinterpret_cast<T*>(src++));
5614 }
5615
5616 template <typename T>
5617 inline void QList<T>::node_destruct(Node *from, Node *to)
5618 {
5619     if (QTypeInfo<T>::isLarge || QTypeInfo<T>::isStatic)
5620         while(from != to) --to, delete reinterpret_cast<T*>(to->v);
5621     else if (QTypeInfo<T>::isComplex)
5622         while (from != to) --to, reinterpret_cast<T*>(to)->~T();
5623 }
5624
5625 template <typename T>
5626 inline QList<T> &QList<T>::operator=(const QList<T> &l)
5627 {
5628     if (d != l.d) {
5629         QListData::Data *x = l.d;
5630         x->ref.ref();
5631         x = qAtomicSetPtr(&d, x);
5632         if (!x->ref.deref())
5633             free(x);
5634         if (!d->sharable)
5635             detach_helper();
5636     }
5637     return *this;
5638 }
5639 template <typename T>
5640 inline typename QList<T>::iterator QList<T>::insert(iterator before, const T &t)
5641 { Node *n = reinterpret_cast<Node *>(p.insert(before.i-reinterpret_cast<Node *>(p.begin())));
5642  node_construct(n,t); return n; }
5643 template <typename T>
5644 inline typename QList<T>::iterator QList<T>::erase(iterator it)
5645 { node_destruct(it.i);
5646  return reinterpret_cast<Node *>(p.erase(reinterpret_cast<void**>(it.i))); }
5647 template <typename T>
5648 inline const T &QList<T>::at(int i) const
5649 { do {if(!(i >= 0 && i < p.size()))qt_assert_x("QList<T>::at", "index out of range","/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qlist.h",386);} while (0);
5650  return reinterpret_cast<Node *>(p.at(i))->t(); }
5651 template <typename T>
5652 inline const T &QList<T>::operator[](int i) const
5653 { do {if(!(i >= 0 && i < p.size()))qt_assert_x("QList<T>::operator[]", "index out of range","/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qlist.h",390);} while (0);
5654  return reinterpret_cast<Node *>(p.at(i))->t(); }
5655 template <typename T>
5656 inline T &QList<T>::operator[](int i)
5657 { do {if(!(i >= 0 && i < p.size()))qt_assert_x("QList<T>::operator[]", "index out of range","/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qlist.h",394);} while (0);
5658   detach(); return reinterpret_cast<Node *>(p.at(i))->t(); }
5659 template <typename T>
5660 inline void QList<T>::removeAt(int i)
5661 { if(i >= 0 && i < p.size()) { detach();
5662  node_destruct(reinterpret_cast<Node *>(p.at(i))); p.remove(i); } }
5663 template <typename T>
5664 inline T QList<T>::takeAt(int i)
5665 { do {if(!(i >= 0 && i < p.size()))qt_assert_x("QList<T>::take", "index out of range","/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qlist.h",402);} while (0);
5666  detach(); Node *n = reinterpret_cast<Node *>(p.at(i)); T t = n->t(); node_destruct(n);
5667  p.remove(i); return t; }
5668 template <typename T>
5669 inline T QList<T>::takeFirst()
5670 { T t = first(); removeFirst(); return t; }
5671 template <typename T>
5672 inline T QList<T>::takeLast()
5673 { T t = last(); removeLast(); return t; }
5674
5675 template <typename T>
5676  void QList<T>::append(const T &t)
5677 {
5678     detach();
5679     if (QTypeInfo<T>::isLarge || QTypeInfo<T>::isStatic) {
5680         node_construct(reinterpret_cast<Node *>(p.append()), t);
5681     } else {
5682         const T cpy(t);
5683         node_construct(reinterpret_cast<Node *>(p.append()), cpy);
5684     }
5685 }
5686
5687 template <typename T>
5688 inline void QList<T>::prepend(const T &t)
5689 {
5690     detach();
5691     if (QTypeInfo<T>::isLarge || QTypeInfo<T>::isStatic) {
5692         node_construct(reinterpret_cast<Node *>(p.prepend()), t);
5693     } else {
5694         const T cpy(t);
5695         node_construct(reinterpret_cast<Node *>(p.prepend()), cpy);
5696     }
5697 }
5698
5699 template <typename T>
5700 inline void QList<T>::insert(int i, const T &t)
5701 {
5702     detach();
5703     if (QTypeInfo<T>::isLarge || QTypeInfo<T>::isStatic) {
5704         node_construct(reinterpret_cast<Node *>(p.insert(i)), t);
5705     } else {
5706         const T cpy(t);
5707         node_construct(reinterpret_cast<Node *>(p.insert(i)), cpy);
5708     }
5709 }
5710
5711 template <typename T>
5712 inline void QList<T>::replace(int i, const T &t)
5713 {
5714     do {if(!(i >= 0 && i < p.size()))qt_assert_x("QList<T>::replace", "index out of range","/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qlist.h",451);} while (0);
5715     detach();
5716     if (QTypeInfo<T>::isLarge || QTypeInfo<T>::isStatic) {
5717         reinterpret_cast<Node *>(p.at(i))->t() = t;
5718     } else {
5719         const T cpy(t);
5720         reinterpret_cast<Node *>(p.at(i))->t() = cpy;
5721     }
5722 }
5723
5724 template <typename T>
5725 inline void QList<T>::swap(int i, int j)
5726 {
5727     do {if(!(i >= 0 && i < p.size() && j >= 0 && j < p.size()))qt_assert_x("QList<T>::swap", "index out of range","/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qlist.h",465);} while (0);
5728
5729     detach();
5730     void *t = d->array[d->begin + i];
5731     d->array[d->begin + i] = d->array[d->begin + j];
5732     d->array[d->begin + j] = t;
5733 }
5734
5735 template <typename T>
5736 inline void QList<T>::move(int from, int to)
5737 {
5738     do {if(!(from >= 0 && from < p.size() && to >= 0 && to < p.size()))qt_assert_x("QList<T>::move", "index out of range","/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qlist.h",476);} while (0);
5739
5740     detach();
5741     p.move(from, to);
5742 }
5743
5744 template<typename T>
5745  QList<T> QList<T>::mid(int pos, int length) const
5746 {
5747     if (length < 0)
5748         length = size() - pos;
5749     if (pos == 0 && length == size())
5750         return *this;
5751     QList<T> cpy;
5752     if (pos + length > size())
5753         length = size() - pos;
5754     for (int i = pos; i < pos + length; ++i)
5755         cpy += at(i);
5756     return cpy;
5757 }
5758
5759 template<typename T>
5760  T QList<T>::value(int i) const
5761 {
5762     if (i < 0 || i >= p.size()) {
5763         return T();
5764     }
5765     return reinterpret_cast<Node *>(p.at(i))->t();
5766 }
5767
5768 template<typename T>
5769  T QList<T>::value(int i, const T& defaultValue) const
5770 {
5771     return ((i < 0 || i >= p.size()) ? defaultValue : reinterpret_cast<Node *>(p.at(i))->t());
5772 }
5773
5774 template <typename T>
5775  void QList<T>::detach_helper()
5776 {
5777     Node *n = reinterpret_cast<Node *>(p.begin());
5778     QListData::Data *x = p.detach2();
5779     node_copy(reinterpret_cast<Node *>(p.begin()), reinterpret_cast<Node *>(p.end()), n);
5780     if (!x->ref.deref())
5781         free(x);
5782 }
5783
5784 template <typename T>
5785  QList<T>::~QList()
5786 {
5787     if (!d)
5788         return;
5789     QListData::Data *x = &QListData::shared_null;
5790     x = qAtomicSetPtr(&d, x);
5791     if (!x->ref.deref())
5792         free(x);
5793 }
5794
5795 template <typename T>
5796  bool QList<T>::operator==(const QList<T> &l) const
5797 {
5798     if (p.size() != l.p.size())
5799         return false;
5800     if (d == l.d)
5801         return true;
5802     Node *i = reinterpret_cast<Node *>(p.end());
5803     Node *b = reinterpret_cast<Node *>(p.begin());
5804     Node *li = reinterpret_cast<Node *>(l.p.end());
5805     while (i != b) {
5806         --i; --li;
5807         if (!(i->t() == li->t()))
5808             return false;
5809     }
5810     return true;
5811 }
5812
5813
5814 template <typename T>
5815  void QList<T>::free(QListData::Data *data)
5816 {
5817     node_destruct(reinterpret_cast<Node *>(data->array + data->begin),
5818                   reinterpret_cast<Node *>(data->array + data->end));
5819     if (data->ref == 0)
5820         qFree(data);
5821 }
5822
5823
5824 template <typename T>
5825  void QList<T>::clear()
5826 {
5827     *this = QList<T>();
5828 }
5829
5830 template <typename T>
5831  int QList<T>::removeAll(const T &_t)
5832 {
5833     detach();
5834     const T t = _t;
5835     int removedCount=0, i=0;
5836     Node *n;
5837     while (i < p.size())
5838         if ((n = reinterpret_cast<Node *>(p.at(i)))->t() == t) {
5839             node_destruct(n);
5840             p.remove(i);
5841             ++removedCount;
5842         } else {
5843             ++i;
5844         }
5845     return removedCount;
5846 }
5847
5848 template <typename T>
5849  typename QList<T>::iterator QList<T>::erase(typename QList<T>::iterator afirst,
5850                                                                  typename QList<T>::iterator alast)
5851 {
5852     for (Node *n = afirst.i; n < alast.i; ++n)
5853         node_destruct(n);
5854     int idx = afirst - begin();
5855     p.remove(idx, alast - afirst);
5856     return begin() + idx;
5857 }
5858
5859 template <typename T>
5860  QList<T> &QList<T>::operator+=(const QList<T> &l)
5861 {
5862     detach();
5863     Node *n = reinterpret_cast<Node *>(p.append(l.p));
5864     node_copy(n, reinterpret_cast<Node *>(p.end()), reinterpret_cast<Node *>(l.p.begin()));
5865     return *this;
5866 }
5867
5868 template <typename T>
5869  int QList<T>::indexOf(const T &t, int from) const
5870 {
5871     if (from < 0)
5872         from = qMax(from + p.size(), 0);
5873     if (from < p.size()) {
5874         Node *n = reinterpret_cast<Node *>(p.at(from -1));
5875         Node *e = reinterpret_cast<Node *>(p.end());
5876         while (++n != e)
5877             if (n->t() == t)
5878                 return n - reinterpret_cast<Node *>(p.begin());
5879     }
5880     return -1;
5881 }
5882
5883 template <typename T>
5884  int QList<T>::lastIndexOf(const T &t, int from) const
5885 {
5886     if (from < 0)
5887         from += p.size();
5888     else if (from >= p.size())
5889         from = p.size()-1;
5890     if (from >= 0) {
5891         Node *b = reinterpret_cast<Node *>(p.begin());
5892         Node *n = reinterpret_cast<Node *>(p.at(from + 1));
5893         while (n-- != b) {
5894             if (n->t() == t)
5895                 return n - b;
5896         }
5897     }
5898     return -1;
5899 }
5900
5901 template <typename T>
5902  QBool QList<T>::contains(const T &t) const
5903 {
5904     Node *b = reinterpret_cast<Node *>(p.begin());
5905     Node *i = reinterpret_cast<Node *>(p.end());
5906     while (i-- != b)
5907         if (i->t() == t)
5908             return QBool(true);
5909     return QBool(false);
5910 }
5911
5912 template <typename T>
5913  int QList<T>::count(const T &t) const
5914 {
5915     int c = 0;
5916     Node *b = reinterpret_cast<Node *>(p.begin());
5917     Node *i = reinterpret_cast<Node *>(p.end());
5918     while (i-- != b)
5919         if (i->t() == t)
5920             ++c;
5921     return c;
5922 }
5923
5924 template <class T> class QListIterator { typedef typename QList<T>::const_iterator const_iterator; QList<T> c; const_iterator i; public: inline QListIterator(const QList<T> &container) : c(container), i(c.constBegin()) {} inline QListIterator &operator=(const QList<T> &container) { c = container; i = c.constBegin(); return *this; } inline void toFront() { i = c.constBegin(); } inline void toBack() { i = c.constEnd(); } inline bool hasNext() const { return i != c.constEnd(); } inline const T &next() { return *i++; } inline const T &peekNext() const { return *i; } inline bool hasPrevious() const { return i != c.constBegin(); } inline const T &previous() { return *--i; } inline const T &peekPrevious() const { const_iterator p = i; return *--p; } inline bool findNext(const T &t) { while (i != c.constEnd()) if (*i++ == t) return true; return false; } inline bool findPrevious(const T &t) { while (i != c.constBegin()) if (*(--i) == t) return true; return false; } };
5925 template <class T> class QMutableListIterator { typedef typename QList<T>::iterator iterator; typedef typename QList<T>::const_iterator const_iterator; QList<T> *c; iterator i, n; inline bool item_exists() const { return const_iterator(n) != c->constEnd(); } public: inline QMutableListIterator(QList<T> &container) : c(&container) { c->setSharable(false); i = c->begin(); n = c->end(); } inline ~QMutableListIterator() { c->setSharable(true); } inline QMutableListIterator &operator=(QList<T> &container) { c->setSharable(true); c = &container; c->setSharable(false); i = c->begin(); n = c->end(); return *this; } inline void toFront() { i = c->begin(); n = c->end(); } inline void toBack() { i = c->end(); n = i; } inline bool hasNext() const { return c->constEnd() != const_iterator(i); } inline T &next() { n = i++; return *n; } inline T &peekNext() const { return *i; } inline bool hasPrevious() const { return c->constBegin() != const_iterator(i); } inline T &previous() { n = --i; return *n; } inline T &peekPrevious() const { iterator p = i; return *--p; } inline void remove() { if (c->constEnd() != const_iterator(n)) { i = c->erase(n); n = c->end(); } } inline void setValue(const T &t) const { if (c->constEnd() != const_iterator(n)) *n = t; } inline T &value() { do {if(!(item_exists()))qt_assert("item_exists()","/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qlist.h",662);} while (0); return *n; } inline const T &value() const { do {if(!(item_exists()))qt_assert("item_exists()","/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qlist.h",662);} while (0); return *n; } inline void insert(const T &t) { n = i = c->insert(i, t); ++i; } inline bool findNext(const T &t) { while (c->constEnd() != const_iterator(n = i)) if (*i++ == t) return true; return false; } inline bool findPrevious(const T &t) { while (c->constBegin() != const_iterator(i)) if (*(n = --i) == t) return true; n = c->end(); return false; } };
5926
5927
5928 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qlist.h" 2
5929 # 45 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qstringlist.h" 2
5930 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qregexp.h" 1
5931 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qregexp.h" 1
5932 # 44 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qregexp.h"
5933 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qstring.h" 1
5934 # 45 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qregexp.h" 2
5935
5936
5937
5938
5939
5940
5941 typedef QtValidLicenseForCoreModule QtCoreModule;
5942
5943 struct QRegExpPrivate;
5944 class QStringList;
5945
5946 class QRegExp
5947 {
5948 public:
5949     enum PatternSyntax { RegExp, Wildcard, FixedString, RegExp2 };
5950     enum CaretMode { CaretAtZero, CaretAtOffset, CaretWontMatch };
5951
5952     QRegExp();
5953     explicit QRegExp(const QString &pattern, Qt::CaseSensitivity cs = Qt::CaseSensitive,
5954        PatternSyntax syntax = RegExp);
5955     QRegExp(const QRegExp &rx);
5956     ~QRegExp();
5957     QRegExp &operator=(const QRegExp &rx);
5958
5959     bool operator==(const QRegExp &rx) const;
5960     inline bool operator!=(const QRegExp &rx) const { return !operator==(rx); }
5961
5962     bool isEmpty() const;
5963     bool isValid() const;
5964     QString pattern() const;
5965     void setPattern(const QString &pattern);
5966     Qt::CaseSensitivity caseSensitivity() const;
5967     void setCaseSensitivity(Qt::CaseSensitivity cs);
5968
5969
5970
5971
5972
5973     PatternSyntax patternSyntax() const;
5974     void setPatternSyntax(PatternSyntax syntax);
5975
5976
5977
5978
5979
5980
5981     bool isMinimal() const;
5982     void setMinimal(bool minimal);
5983
5984
5985
5986
5987     bool exactMatch(const QString &str) const;
5988
5989     int indexIn(const QString &str, int offset = 0, CaretMode caretMode = CaretAtZero) const;
5990     int lastIndexIn(const QString &str, int offset = -1, CaretMode caretMode = CaretAtZero) const;
5991 # 109 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qregexp.h"
5992     int matchedLength() const;
5993
5994     int numCaptures() const;
5995     QStringList capturedTexts();
5996     QString cap(int nth = 0);
5997     int pos(int nth = 0);
5998     QString errorString();
5999
6000
6001     static QString escape(const QString &str);
6002 # 129 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qregexp.h"
6003 private:
6004     QRegExpPrivate *priv;
6005 };
6006
6007 template <> class QTypeInfo<QRegExp> { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QRegExp)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QRegExp"; } };
6008
6009
6010  QDataStream &operator<<(QDataStream &out, const QRegExp &regExp);
6011  QDataStream &operator>>(QDataStream &in, QRegExp &regExp);
6012
6013
6014
6015 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qregexp.h" 2
6016 # 46 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qstringlist.h" 2
6017 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qstring.h" 1
6018 # 47 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qstringlist.h" 2
6019 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qstringmatcher.h" 1
6020 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qstringmatcher.h" 1
6021 # 42 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qstringmatcher.h"
6022 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qstring.h" 1
6023 # 43 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qstringmatcher.h" 2
6024
6025
6026
6027 typedef QtValidLicenseForCoreModule QtCoreModule;
6028
6029 class QStringMatcherPrivate;
6030
6031 class QStringMatcher
6032 {
6033 public:
6034     QStringMatcher();
6035     QStringMatcher(const QString &pattern,
6036                    Qt::CaseSensitivity cs = Qt::CaseSensitive);
6037     QStringMatcher(const QStringMatcher &other);
6038     ~QStringMatcher();
6039
6040     QStringMatcher &operator=(const QStringMatcher &other);
6041
6042     void setPattern(const QString &pattern);
6043     void setCaseSensitivity(Qt::CaseSensitivity cs);
6044
6045     int indexIn(const QString &str, int from = 0) const;
6046     inline QString pattern() const { return q_pattern; }
6047     inline Qt::CaseSensitivity caseSensitivity() const { return q_cs; }
6048
6049 private:
6050     QStringMatcherPrivate *d_ptr;
6051     QString q_pattern;
6052     Qt::CaseSensitivity q_cs;
6053     uint q_skiptable[256];
6054 };
6055
6056
6057 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qstringmatcher.h" 2
6058 # 48 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qstringlist.h" 2
6059
6060
6061
6062
6063
6064
6065 typedef QtValidLicenseForCoreModule QtCoreModule;
6066
6067 class QRegExp;
6068
6069 typedef QListIterator<QString> QStringListIterator;
6070 typedef QMutableListIterator<QString> QMutableStringListIterator;
6071
6072 class QStringList : public QList<QString>
6073 {
6074 public:
6075     inline QStringList() { }
6076     inline explicit QStringList(const QString &i) { append(i); }
6077     inline QStringList(const QStringList &l) : QList<QString>(l) { }
6078     inline QStringList(const QList<QString> &l) : QList<QString>(l) { }
6079
6080     inline void sort();
6081
6082     inline QString join(const QString &sep) const;
6083
6084     inline QStringList filter(const QString &str, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
6085     inline QBool contains(const QString &str, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
6086
6087     inline QStringList &replaceInStrings(const QString &before, const QString &after, Qt::CaseSensitivity cs = Qt::CaseSensitive);
6088
6089     inline QStringList operator+(const QStringList &other) const
6090     { QStringList n = *this; n += other; return n; }
6091     inline QStringList &operator<<(const QString &str)
6092     { append(str); return *this; }
6093     inline QStringList &operator<<(const QStringList &l)
6094     { *this += l; return *this; }
6095
6096
6097     inline QStringList filter(const QRegExp &rx) const;
6098     inline QStringList &replaceInStrings(const QRegExp &rx, const QString &after);
6099     inline int indexOf(const QRegExp &rx, int from = 0) const;
6100     inline int lastIndexOf(const QRegExp &rx, int from = -1) const;
6101
6102
6103     using QList<QString>::indexOf;
6104     using QList<QString>::lastIndexOf;
6105 # 118 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qstringlist.h"
6106 };
6107
6108 namespace QtPrivate {
6109     void QStringList_sort(QStringList *that);
6110     QString QStringList_join(const QStringList *that, const QString &sep);
6111     QStringList QStringList_filter(const QStringList *that, const QString &str,
6112                                                Qt::CaseSensitivity cs);
6113
6114     QBool QStringList_contains(const QStringList *that, const QString &str, Qt::CaseSensitivity cs);
6115     void QStringList_replaceInStrings(QStringList *that, const QString &before, const QString &after,
6116                                       Qt::CaseSensitivity cs);
6117
6118
6119     void QStringList_replaceInStrings(QStringList *that, const QRegExp &rx, const QString &after);
6120     QStringList QStringList_filter(const QStringList *that, const QRegExp &re);
6121     int QStringList_indexOf(const QStringList *that, const QRegExp &rx, int from);
6122     int QStringList_lastIndexOf(const QStringList *that, const QRegExp &rx, int from);
6123
6124 }
6125
6126 inline void QStringList::sort()
6127 {
6128     QtPrivate::QStringList_sort(this);
6129 }
6130
6131 inline QString QStringList::join(const QString &sep) const
6132 {
6133     return QtPrivate::QStringList_join(this, sep);
6134 }
6135
6136 inline QStringList QStringList::filter(const QString &str, Qt::CaseSensitivity cs) const
6137 {
6138     return QtPrivate::QStringList_filter(this, str, cs);
6139 }
6140
6141 inline QBool QStringList::contains(const QString &str, Qt::CaseSensitivity cs) const
6142 {
6143     return QtPrivate::QStringList_contains(this, str, cs);
6144 }
6145
6146 inline QStringList &QStringList::replaceInStrings(const QString &before, const QString &after, Qt::CaseSensitivity cs)
6147 {
6148     QtPrivate::QStringList_replaceInStrings(this, before, after, cs);
6149     return *this;
6150 }
6151
6152
6153 inline QStringList &QStringList::replaceInStrings(const QRegExp &rx, const QString &after)
6154 {
6155     QtPrivate::QStringList_replaceInStrings(this, rx, after);
6156     return *this;
6157 }
6158
6159 inline QStringList QStringList::filter(const QRegExp &rx) const
6160 {
6161     return QtPrivate::QStringList_filter(this, rx);
6162 }
6163
6164 inline int QStringList::indexOf(const QRegExp &rx, int from) const
6165 {
6166     return QtPrivate::QStringList_indexOf(this, rx, from);
6167 }
6168
6169 inline int QStringList::lastIndexOf(const QRegExp &rx, int from) const
6170 {
6171     return QtPrivate::QStringList_lastIndexOf(this, rx, from);
6172 }
6173 # 219 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qstringlist.h"
6174 inline QDataStream &operator>>(QDataStream &in, QStringList &list)
6175 {
6176     return operator>>(in, static_cast<QList<QString> &>(list));
6177 }
6178 inline QDataStream &operator<<(QDataStream &out, const QStringList &list)
6179 {
6180     return operator<<(out, static_cast<const QList<QString> &>(list));
6181 }
6182
6183
6184
6185 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qstringlist.h" 2
6186 # 43 "./project.h" 2
6187 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qtextstream.h" 1
6188 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/io/qtextstream.h" 1
6189 # 42 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/io/qtextstream.h"
6190 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qiodevice.h" 1
6191 # 43 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/io/qtextstream.h" 2
6192 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qstring.h" 1
6193 # 44 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/io/qtextstream.h" 2
6194 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qchar.h" 1
6195 # 45 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/io/qtextstream.h" 2
6196
6197
6198
6199
6200
6201
6202
6203 # 1 "/usr/include/stdio.h" 1 3 4
6204
6205
6206
6207
6208
6209
6210
6211 # 1 "/usr/include/gentoo-multilib/amd64/stdio.h" 1 3 4
6212 # 28 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
6213 # 1 "/usr/include/features.h" 1 3 4
6214 # 29 "/usr/include/gentoo-multilib/amd64/stdio.h" 2 3 4
6215
6216 extern "C" {
6217
6218
6219
6220 # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4
6221 # 35 "/usr/include/gentoo-multilib/amd64/stdio.h" 2 3 4
6222
6223 # 1 "/usr/include/bits/types.h" 1 3 4
6224
6225
6226
6227
6228
6229
6230
6231 # 1 "/usr/include/gentoo-multilib/amd64/bits/types.h" 1 3 4
6232 # 27 "/usr/include/gentoo-multilib/amd64/bits/types.h" 3 4
6233 # 1 "/usr/include/features.h" 1 3 4
6234 # 28 "/usr/include/gentoo-multilib/amd64/bits/types.h" 2 3 4
6235 # 1 "/usr/include/bits/wordsize.h" 1 3 4
6236
6237
6238
6239
6240
6241
6242
6243 # 1 "/usr/include/gentoo-multilib/amd64/bits/wordsize.h" 1 3 4
6244 # 9 "/usr/include/bits/wordsize.h" 2 3 4
6245 # 29 "/usr/include/gentoo-multilib/amd64/bits/types.h" 2 3 4
6246
6247
6248 # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4
6249 # 32 "/usr/include/gentoo-multilib/amd64/bits/types.h" 2 3 4
6250
6251
6252 typedef unsigned char __u_char;
6253 typedef unsigned short int __u_short;
6254 typedef unsigned int __u_int;
6255 typedef unsigned long int __u_long;
6256
6257
6258 typedef signed char __int8_t;
6259 typedef unsigned char __uint8_t;
6260 typedef signed short int __int16_t;
6261 typedef unsigned short int __uint16_t;
6262 typedef signed int __int32_t;
6263 typedef unsigned int __uint32_t;
6264
6265 typedef signed long int __int64_t;
6266 typedef unsigned long int __uint64_t;
6267
6268
6269
6270
6271
6272
6273
6274 typedef long int __quad_t;
6275 typedef unsigned long int __u_quad_t;
6276 # 134 "/usr/include/gentoo-multilib/amd64/bits/types.h" 3 4
6277 # 1 "/usr/include/bits/typesizes.h" 1 3 4
6278
6279
6280
6281
6282
6283
6284
6285 # 1 "/usr/include/gentoo-multilib/amd64/bits/typesizes.h" 1 3 4
6286 # 9 "/usr/include/bits/typesizes.h" 2 3 4
6287 # 135 "/usr/include/gentoo-multilib/amd64/bits/types.h" 2 3 4
6288
6289
6290 typedef unsigned long int __dev_t;
6291 typedef unsigned int __uid_t;
6292 typedef unsigned int __gid_t;
6293 typedef unsigned long int __ino_t;
6294 typedef unsigned long int __ino64_t;
6295 typedef unsigned int __mode_t;
6296 typedef unsigned long int __nlink_t;
6297 typedef long int __off_t;
6298 typedef long int __off64_t;
6299 typedef int __pid_t;
6300 typedef struct { int __val[2]; } __fsid_t;
6301 typedef long int __clock_t;
6302 typedef unsigned long int __rlim_t;
6303 typedef unsigned long int __rlim64_t;
6304 typedef unsigned int __id_t;
6305 typedef long int __time_t;
6306 typedef unsigned int __useconds_t;
6307 typedef long int __suseconds_t;
6308
6309 typedef int __daddr_t;
6310 typedef long int __swblk_t;
6311 typedef int __key_t;
6312
6313
6314 typedef int __clockid_t;
6315
6316
6317 typedef void * __timer_t;
6318
6319
6320 typedef long int __blksize_t;
6321
6322
6323
6324
6325 typedef long int __blkcnt_t;
6326 typedef long int __blkcnt64_t;
6327
6328
6329 typedef unsigned long int __fsblkcnt_t;
6330 typedef unsigned long int __fsblkcnt64_t;
6331
6332
6333 typedef unsigned long int __fsfilcnt_t;
6334 typedef unsigned long int __fsfilcnt64_t;
6335
6336 typedef long int __ssize_t;
6337
6338
6339
6340 typedef __off64_t __loff_t;
6341 typedef __quad_t *__qaddr_t;
6342 typedef char *__caddr_t;
6343
6344
6345 typedef long int __intptr_t;
6346
6347
6348 typedef unsigned int __socklen_t;
6349 # 9 "/usr/include/bits/types.h" 2 3 4
6350 # 37 "/usr/include/gentoo-multilib/amd64/stdio.h" 2 3 4
6351 # 45 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
6352 struct _IO_FILE;
6353
6354
6355
6356 typedef struct _IO_FILE FILE;
6357
6358
6359
6360
6361
6362 # 65 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
6363 typedef struct _IO_FILE __FILE;
6364 # 75 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
6365 # 1 "/usr/include/libio.h" 1 3 4
6366
6367
6368
6369
6370
6371
6372
6373 # 1 "/usr/include/gentoo-multilib/amd64/libio.h" 1 3 4
6374 # 32 "/usr/include/gentoo-multilib/amd64/libio.h" 3 4
6375 # 1 "/usr/include/_G_config.h" 1 3 4
6376
6377
6378
6379
6380
6381
6382
6383 # 1 "/usr/include/gentoo-multilib/amd64/_G_config.h" 1 3 4
6384 # 9 "/usr/include/gentoo-multilib/amd64/_G_config.h" 3 4
6385 # 1 "/usr/include/bits/types.h" 1 3 4
6386 # 10 "/usr/include/gentoo-multilib/amd64/_G_config.h" 2 3 4
6387
6388
6389
6390
6391 # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4
6392 # 355 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/stddef.h" 3 4
6393 typedef unsigned int wint_t;
6394 # 15 "/usr/include/gentoo-multilib/amd64/_G_config.h" 2 3 4
6395 # 24 "/usr/include/gentoo-multilib/amd64/_G_config.h" 3 4
6396 # 1 "/usr/include/wchar.h" 1 3 4
6397
6398
6399
6400
6401
6402
6403
6404 # 1 "/usr/include/gentoo-multilib/amd64/wchar.h" 1 3 4
6405 # 48 "/usr/include/gentoo-multilib/amd64/wchar.h" 3 4
6406 # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4
6407 # 49 "/usr/include/gentoo-multilib/amd64/wchar.h" 2 3 4
6408
6409 # 1 "/usr/include/bits/wchar.h" 1 3 4
6410
6411
6412
6413
6414
6415
6416
6417 # 1 "/usr/include/gentoo-multilib/amd64/bits/wchar.h" 1 3 4
6418 # 9 "/usr/include/bits/wchar.h" 2 3 4
6419 # 51 "/usr/include/gentoo-multilib/amd64/wchar.h" 2 3 4
6420 # 76 "/usr/include/gentoo-multilib/amd64/wchar.h" 3 4
6421 typedef struct
6422 {
6423   int __count;
6424   union
6425   {
6426     wint_t __wch;
6427     char __wchb[4];
6428   } __value;
6429 } __mbstate_t;
6430 # 9 "/usr/include/wchar.h" 2 3 4
6431 # 25 "/usr/include/gentoo-multilib/amd64/_G_config.h" 2 3 4
6432
6433 typedef struct
6434 {
6435   __off_t __pos;
6436   __mbstate_t __state;
6437 } _G_fpos_t;
6438 typedef struct
6439 {
6440   __off64_t __pos;
6441   __mbstate_t __state;
6442 } _G_fpos64_t;
6443 # 44 "/usr/include/gentoo-multilib/amd64/_G_config.h" 3 4
6444 # 1 "/usr/include/gconv.h" 1 3 4
6445
6446
6447
6448
6449
6450
6451
6452 # 1 "/usr/include/gentoo-multilib/amd64/gconv.h" 1 3 4
6453 # 26 "/usr/include/gentoo-multilib/amd64/gconv.h" 3 4
6454 # 1 "/usr/include/features.h" 1 3 4
6455 # 27 "/usr/include/gentoo-multilib/amd64/gconv.h" 2 3 4
6456
6457 # 1 "/usr/include/wchar.h" 1 3 4
6458
6459
6460
6461
6462
6463
6464
6465 # 1 "/usr/include/gentoo-multilib/amd64/wchar.h" 1 3 4
6466 # 48 "/usr/include/gentoo-multilib/amd64/wchar.h" 3 4
6467 # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4
6468 # 49 "/usr/include/gentoo-multilib/amd64/wchar.h" 2 3 4
6469
6470 # 1 "/usr/include/bits/wchar.h" 1 3 4
6471 # 51 "/usr/include/gentoo-multilib/amd64/wchar.h" 2 3 4
6472 # 9 "/usr/include/wchar.h" 2 3 4
6473 # 29 "/usr/include/gentoo-multilib/amd64/gconv.h" 2 3 4
6474
6475
6476 # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4
6477 # 32 "/usr/include/gentoo-multilib/amd64/gconv.h" 2 3 4
6478
6479
6480
6481
6482
6483 enum
6484 {
6485   __GCONV_OK = 0,
6486   __GCONV_NOCONV,
6487   __GCONV_NODB,
6488   __GCONV_NOMEM,
6489
6490   __GCONV_EMPTY_INPUT,
6491   __GCONV_FULL_OUTPUT,
6492   __GCONV_ILLEGAL_INPUT,
6493   __GCONV_INCOMPLETE_INPUT,
6494
6495   __GCONV_ILLEGAL_DESCRIPTOR,
6496   __GCONV_INTERNAL_ERROR
6497 };
6498
6499
6500
6501 enum
6502 {
6503   __GCONV_IS_LAST = 0x0001,
6504   __GCONV_IGNORE_ERRORS = 0x0002
6505 };
6506
6507
6508
6509 struct __gconv_step;
6510 struct __gconv_step_data;
6511 struct __gconv_loaded_object;
6512 struct __gconv_trans_data;
6513
6514
6515
6516 typedef int (*__gconv_fct) (struct __gconv_step *, struct __gconv_step_data *,
6517        __const unsigned char **, __const unsigned char *,
6518        unsigned char **, size_t *, int, int);
6519
6520
6521 typedef wint_t (*__gconv_btowc_fct) (struct __gconv_step *, unsigned char);
6522
6523
6524 typedef int (*__gconv_init_fct) (struct __gconv_step *);
6525 typedef void (*__gconv_end_fct) (struct __gconv_step *);
6526
6527
6528
6529 typedef int (*__gconv_trans_fct) (struct __gconv_step *,
6530       struct __gconv_step_data *, void *,
6531       __const unsigned char *,
6532       __const unsigned char **,
6533       __const unsigned char *, unsigned char **,
6534       size_t *);
6535
6536
6537 typedef int (*__gconv_trans_context_fct) (void *, __const unsigned char *,
6538        __const unsigned char *,
6539        unsigned char *, unsigned char *);
6540
6541
6542 typedef int (*__gconv_trans_query_fct) (__const char *, __const char ***,
6543      size_t *);
6544
6545
6546 typedef int (*__gconv_trans_init_fct) (void **, const char *);
6547 typedef void (*__gconv_trans_end_fct) (void *);
6548
6549 struct __gconv_trans_data
6550 {
6551
6552   __gconv_trans_fct __trans_fct;
6553   __gconv_trans_context_fct __trans_context_fct;
6554   __gconv_trans_end_fct __trans_end_fct;
6555   void *__data;
6556   struct __gconv_trans_data *__next;
6557 };
6558
6559
6560
6561 struct __gconv_step
6562 {
6563   struct __gconv_loaded_object *__shlib_handle;
6564   __const char *__modname;
6565
6566   int __counter;
6567
6568   char *__from_name;
6569   char *__to_name;
6570
6571   __gconv_fct __fct;
6572   __gconv_btowc_fct __btowc_fct;
6573   __gconv_init_fct __init_fct;
6574   __gconv_end_fct __end_fct;
6575
6576
6577
6578   int __min_needed_from;
6579   int __max_needed_from;
6580   int __min_needed_to;
6581   int __max_needed_to;
6582
6583
6584   int __stateful;
6585
6586   void *__data;
6587 };
6588
6589
6590
6591 struct __gconv_step_data
6592 {
6593   unsigned char *__outbuf;
6594   unsigned char *__outbufend;
6595
6596
6597
6598   int __flags;
6599
6600
6601
6602   int __invocation_counter;
6603
6604
6605
6606   int __internal_use;
6607
6608   __mbstate_t *__statep;
6609   __mbstate_t __state;
6610
6611
6612
6613   struct __gconv_trans_data *__trans;
6614 };
6615
6616
6617
6618 typedef struct __gconv_info
6619 {
6620   size_t __nsteps;
6621   struct __gconv_step *__steps;
6622   __extension__ struct __gconv_step_data __data [];
6623 } *__gconv_t;
6624 # 9 "/usr/include/gconv.h" 2 3 4
6625 # 45 "/usr/include/gentoo-multilib/amd64/_G_config.h" 2 3 4
6626 typedef union
6627 {
6628   struct __gconv_info __cd;
6629   struct
6630   {
6631     struct __gconv_info __cd;
6632     struct __gconv_step_data __data;
6633   } __combined;
6634 } _G_iconv_t;
6635
6636 typedef int _G_int16_t __attribute__ ((__mode__ (__HI__)));
6637 typedef int _G_int32_t __attribute__ ((__mode__ (__SI__)));
6638 typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__)));
6639 typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__)));
6640 # 9 "/usr/include/_G_config.h" 2 3 4
6641 # 33 "/usr/include/gentoo-multilib/amd64/libio.h" 2 3 4
6642 # 167 "/usr/include/gentoo-multilib/amd64/libio.h" 3 4
6643 struct _IO_jump_t; struct _IO_FILE;
6644 # 177 "/usr/include/gentoo-multilib/amd64/libio.h" 3 4
6645 typedef void _IO_lock_t;
6646
6647
6648
6649
6650
6651 struct _IO_marker {
6652   struct _IO_marker *_next;
6653   struct _IO_FILE *_sbuf;
6654
6655
6656
6657   int _pos;
6658 # 200 "/usr/include/gentoo-multilib/amd64/libio.h" 3 4
6659 };
6660
6661
6662 enum __codecvt_result
6663 {
6664   __codecvt_ok,
6665   __codecvt_partial,
6666   __codecvt_error,
6667   __codecvt_noconv
6668 };
6669 # 268 "/usr/include/gentoo-multilib/amd64/libio.h" 3 4
6670 struct _IO_FILE {
6671   int _flags;
6672
6673
6674
6675
6676   char* _IO_read_ptr;
6677   char* _IO_read_end;
6678   char* _IO_read_base;
6679   char* _IO_write_base;
6680   char* _IO_write_ptr;
6681   char* _IO_write_end;
6682   char* _IO_buf_base;
6683   char* _IO_buf_end;
6684
6685   char *_IO_save_base;
6686   char *_IO_backup_base;
6687   char *_IO_save_end;
6688
6689   struct _IO_marker *_markers;
6690
6691   struct _IO_FILE *_chain;
6692
6693   int _fileno;
6694
6695
6696
6697   int _flags2;
6698
6699   __off_t _old_offset;
6700
6701
6702
6703   unsigned short _cur_column;
6704   signed char _vtable_offset;
6705   char _shortbuf[1];
6706
6707
6708
6709   _IO_lock_t *_lock;
6710 # 316 "/usr/include/gentoo-multilib/amd64/libio.h" 3 4
6711   __off64_t _offset;
6712 # 325 "/usr/include/gentoo-multilib/amd64/libio.h" 3 4
6713   void *__pad1;
6714   void *__pad2;
6715   void *__pad3;
6716   void *__pad4;
6717   size_t __pad5;
6718
6719   int _mode;
6720
6721   char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)];
6722
6723 };
6724
6725
6726
6727
6728
6729 struct _IO_FILE_plus;
6730
6731 extern struct _IO_FILE_plus _IO_2_1_stdin_;
6732 extern struct _IO_FILE_plus _IO_2_1_stdout_;
6733 extern struct _IO_FILE_plus _IO_2_1_stderr_;
6734 # 361 "/usr/include/gentoo-multilib/amd64/libio.h" 3 4
6735 typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes);
6736
6737
6738
6739
6740
6741
6742
6743 typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf,
6744      size_t __n);
6745
6746
6747
6748
6749
6750
6751
6752 typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w);
6753
6754
6755 typedef int __io_close_fn (void *__cookie);
6756
6757
6758
6759
6760 typedef __io_read_fn cookie_read_function_t;
6761 typedef __io_write_fn cookie_write_function_t;
6762 typedef __io_seek_fn cookie_seek_function_t;
6763 typedef __io_close_fn cookie_close_function_t;
6764
6765
6766 typedef struct
6767 {
6768   __io_read_fn *read;
6769   __io_write_fn *write;
6770   __io_seek_fn *seek;
6771   __io_close_fn *close;
6772 } _IO_cookie_io_functions_t;
6773 typedef _IO_cookie_io_functions_t cookie_io_functions_t;
6774
6775 struct _IO_cookie_file;
6776
6777
6778 extern void _IO_cookie_init (struct _IO_cookie_file *__cfile, int __read_write,
6779         void *__cookie, _IO_cookie_io_functions_t __fns);
6780
6781
6782
6783
6784 extern "C" {
6785
6786
6787 extern int __underflow (_IO_FILE *);
6788 extern int __uflow (_IO_FILE *);
6789 extern int __overflow (_IO_FILE *, int);
6790 extern wint_t __wunderflow (_IO_FILE *);
6791 extern wint_t __wuflow (_IO_FILE *);
6792 extern wint_t __woverflow (_IO_FILE *, wint_t);
6793 # 451 "/usr/include/gentoo-multilib/amd64/libio.h" 3 4
6794 extern int _IO_getc (_IO_FILE *__fp);
6795 extern int _IO_putc (int __c, _IO_FILE *__fp);
6796 extern int _IO_feof (_IO_FILE *__fp) throw ();
6797 extern int _IO_ferror (_IO_FILE *__fp) throw ();
6798
6799 extern int _IO_peekc_locked (_IO_FILE *__fp);
6800
6801
6802
6803
6804
6805 extern void _IO_flockfile (_IO_FILE *) throw ();
6806 extern void _IO_funlockfile (_IO_FILE *) throw ();
6807 extern int _IO_ftrylockfile (_IO_FILE *) throw ();
6808 # 481 "/usr/include/gentoo-multilib/amd64/libio.h" 3 4
6809 extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict,
6810    __gnuc_va_list, int *__restrict);
6811 extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict,
6812     __gnuc_va_list);
6813 extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t);
6814 extern size_t _IO_sgetn (_IO_FILE *, void *, size_t);
6815
6816 extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int);
6817 extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int);
6818
6819 extern void _IO_free_backup_area (_IO_FILE *) throw ();
6820 # 543 "/usr/include/gentoo-multilib/amd64/libio.h" 3 4
6821 }
6822 # 9 "/usr/include/libio.h" 2 3 4
6823 # 76 "/usr/include/gentoo-multilib/amd64/stdio.h" 2 3 4
6824 # 89 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
6825
6826
6827 typedef _G_fpos_t fpos_t;
6828
6829
6830
6831
6832
6833 typedef _G_fpos64_t fpos64_t;
6834 # 141 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
6835 # 1 "/usr/include/bits/stdio_lim.h" 1 3 4
6836
6837
6838
6839
6840
6841
6842
6843 # 1 "/usr/include/gentoo-multilib/amd64/bits/stdio_lim.h" 1 3 4
6844 # 9 "/usr/include/bits/stdio_lim.h" 2 3 4
6845 # 142 "/usr/include/gentoo-multilib/amd64/stdio.h" 2 3 4
6846
6847
6848
6849 extern struct _IO_FILE *stdin;
6850 extern struct _IO_FILE *stdout;
6851 extern struct _IO_FILE *stderr;
6852
6853
6854
6855
6856
6857
6858
6859 extern int remove (__const char *__filename) throw ();
6860
6861 extern int rename (__const char *__old, __const char *__new) throw ();
6862
6863
6864
6865
6866 extern int renameat (int __oldfd, __const char *__old, int __newfd,
6867        __const char *__new) throw ();
6868
6869
6870
6871
6872
6873
6874
6875
6876 extern FILE *tmpfile (void) ;
6877 # 182 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
6878 extern FILE *tmpfile64 (void) ;
6879
6880
6881
6882 extern char *tmpnam (char *__s) throw () ;
6883
6884
6885
6886
6887
6888 extern char *tmpnam_r (char *__s) throw () ;
6889 # 204 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
6890 extern char *tempnam (__const char *__dir, __const char *__pfx)
6891      throw () __attribute__ ((__malloc__)) ;
6892
6893
6894
6895
6896
6897
6898
6899
6900 extern int fclose (FILE *__stream);
6901
6902
6903
6904
6905 extern int fflush (FILE *__stream);
6906
6907 # 229 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
6908 extern int fflush_unlocked (FILE *__stream);
6909 # 239 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
6910 extern int fcloseall (void);
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920 extern FILE *fopen (__const char *__restrict __filename,
6921       __const char *__restrict __modes) ;
6922
6923
6924
6925
6926 extern FILE *freopen (__const char *__restrict __filename,
6927         __const char *__restrict __modes,
6928         FILE *__restrict __stream) ;
6929 # 272 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
6930
6931
6932 extern FILE *fopen64 (__const char *__restrict __filename,
6933         __const char *__restrict __modes) ;
6934 extern FILE *freopen64 (__const char *__restrict __filename,
6935    __const char *__restrict __modes,
6936    FILE *__restrict __stream) ;
6937
6938
6939
6940
6941 extern FILE *fdopen (int __fd, __const char *__modes) throw () ;
6942
6943
6944
6945
6946
6947 extern FILE *fopencookie (void *__restrict __magic_cookie,
6948      __const char *__restrict __modes,
6949      _IO_cookie_io_functions_t __io_funcs) throw () ;
6950
6951
6952 extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes)
6953   throw () ;
6954
6955
6956
6957
6958 extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) throw () ;
6959
6960
6961
6962
6963
6964
6965 extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) throw ();
6966
6967
6968
6969 extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,
6970       int __modes, size_t __n) throw ();
6971
6972
6973
6974
6975
6976 extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf,
6977          size_t __size) throw ();
6978
6979
6980 extern void setlinebuf (FILE *__stream) throw ();
6981
6982
6983
6984
6985
6986
6987
6988
6989 extern int fprintf (FILE *__restrict __stream,
6990       __const char *__restrict __format, ...);
6991
6992
6993
6994
6995 extern int printf (__const char *__restrict __format, ...);
6996
6997 extern int sprintf (char *__restrict __s,
6998       __const char *__restrict __format, ...) throw ();
6999
7000
7001
7002
7003
7004 extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format,
7005        __gnuc_va_list __arg);
7006
7007
7008
7009
7010 extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg);
7011
7012 extern int vsprintf (char *__restrict __s, __const char *__restrict __format,
7013        __gnuc_va_list __arg) throw ();
7014
7015
7016
7017
7018
7019 extern int snprintf (char *__restrict __s, size_t __maxlen,
7020        __const char *__restrict __format, ...)
7021      throw () __attribute__ ((__format__ (__printf__, 3, 4)));
7022
7023 extern int vsnprintf (char *__restrict __s, size_t __maxlen,
7024         __const char *__restrict __format, __gnuc_va_list __arg)
7025      throw () __attribute__ ((__format__ (__printf__, 3, 0)));
7026
7027
7028
7029
7030
7031
7032 extern int vasprintf (char **__restrict __ptr, __const char *__restrict __f,
7033         __gnuc_va_list __arg)
7034      throw () __attribute__ ((__format__ (__printf__, 2, 0))) ;
7035 extern int __asprintf (char **__restrict __ptr,
7036          __const char *__restrict __fmt, ...)
7037      throw () __attribute__ ((__format__ (__printf__, 2, 3))) ;
7038 extern int asprintf (char **__restrict __ptr,
7039        __const char *__restrict __fmt, ...)
7040      throw () __attribute__ ((__format__ (__printf__, 2, 3))) ;
7041
7042
7043
7044
7045
7046
7047
7048 extern int vdprintf (int __fd, __const char *__restrict __fmt,
7049        __gnuc_va_list __arg)
7050      __attribute__ ((__format__ (__printf__, 2, 0)));
7051 extern int dprintf (int __fd, __const char *__restrict __fmt, ...)
7052      __attribute__ ((__format__ (__printf__, 2, 3)));
7053
7054
7055
7056
7057
7058
7059
7060
7061 extern int fscanf (FILE *__restrict __stream,
7062      __const char *__restrict __format, ...) ;
7063
7064
7065
7066
7067 extern int scanf (__const char *__restrict __format, ...) ;
7068
7069 extern int sscanf (__const char *__restrict __s,
7070      __const char *__restrict __format, ...) throw ();
7071
7072
7073
7074
7075
7076
7077
7078
7079 extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format,
7080       __gnuc_va_list __arg)
7081      __attribute__ ((__format__ (__scanf__, 2, 0))) ;
7082
7083
7084
7085
7086
7087 extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg)
7088      __attribute__ ((__format__ (__scanf__, 1, 0))) ;
7089
7090
7091 extern int vsscanf (__const char *__restrict __s,
7092       __const char *__restrict __format, __gnuc_va_list __arg)
7093      throw () __attribute__ ((__format__ (__scanf__, 2, 0)));
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103 extern int fgetc (FILE *__stream);
7104 extern int getc (FILE *__stream);
7105
7106
7107
7108
7109
7110 extern int getchar (void);
7111
7112 # 464 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
7113 extern int getc_unlocked (FILE *__stream);
7114 extern int getchar_unlocked (void);
7115 # 475 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
7116 extern int fgetc_unlocked (FILE *__stream);
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128 extern int fputc (int __c, FILE *__stream);
7129 extern int putc (int __c, FILE *__stream);
7130
7131
7132
7133
7134
7135 extern int putchar (int __c);
7136
7137 # 508 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
7138 extern int fputc_unlocked (int __c, FILE *__stream);
7139
7140
7141
7142
7143
7144
7145
7146 extern int putc_unlocked (int __c, FILE *__stream);
7147 extern int putchar_unlocked (int __c);
7148
7149
7150
7151
7152
7153
7154 extern int getw (FILE *__stream);
7155
7156
7157 extern int putw (int __w, FILE *__stream);
7158
7159
7160
7161
7162
7163
7164
7165
7166 extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
7167      ;
7168
7169
7170
7171
7172
7173
7174 extern char *gets (char *__s) ;
7175
7176 # 554 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
7177 extern char *fgets_unlocked (char *__restrict __s, int __n,
7178         FILE *__restrict __stream) ;
7179 # 570 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
7180 extern __ssize_t __getdelim (char **__restrict __lineptr,
7181           size_t *__restrict __n, int __delimiter,
7182           FILE *__restrict __stream) ;
7183 extern __ssize_t getdelim (char **__restrict __lineptr,
7184         size_t *__restrict __n, int __delimiter,
7185         FILE *__restrict __stream) ;
7186
7187
7188
7189
7190
7191
7192
7193 extern __ssize_t getline (char **__restrict __lineptr,
7194        size_t *__restrict __n,
7195        FILE *__restrict __stream) ;
7196
7197
7198
7199
7200
7201
7202
7203
7204 extern int fputs (__const char *__restrict __s, FILE *__restrict __stream);
7205
7206
7207
7208
7209
7210 extern int puts (__const char *__s);
7211
7212
7213
7214
7215
7216
7217 extern int ungetc (int __c, FILE *__stream);
7218
7219
7220
7221
7222
7223
7224 extern size_t fread (void *__restrict __ptr, size_t __size,
7225        size_t __n, FILE *__restrict __stream) ;
7226
7227
7228
7229
7230 extern size_t fwrite (__const void *__restrict __ptr, size_t __size,
7231         size_t __n, FILE *__restrict __s) ;
7232
7233 # 631 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
7234 extern int fputs_unlocked (__const char *__restrict __s,
7235       FILE *__restrict __stream);
7236 # 642 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
7237 extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
7238          size_t __n, FILE *__restrict __stream) ;
7239 extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size,
7240           size_t __n, FILE *__restrict __stream) ;
7241
7242
7243
7244
7245
7246
7247
7248
7249 extern int fseek (FILE *__stream, long int __off, int __whence);
7250
7251
7252
7253
7254 extern long int ftell (FILE *__stream) ;
7255
7256
7257
7258
7259 extern void rewind (FILE *__stream);
7260
7261 # 678 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
7262 extern int fseeko (FILE *__stream, __off_t __off, int __whence);
7263
7264
7265
7266
7267 extern __off_t ftello (FILE *__stream) ;
7268 # 697 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
7269
7270
7271
7272
7273
7274
7275 extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos);
7276
7277
7278
7279
7280 extern int fsetpos (FILE *__stream, __const fpos_t *__pos);
7281 # 720 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
7282
7283
7284
7285 extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence);
7286 extern __off64_t ftello64 (FILE *__stream) ;
7287 extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos);
7288 extern int fsetpos64 (FILE *__stream, __const fpos64_t *__pos);
7289
7290
7291
7292
7293 extern void clearerr (FILE *__stream) throw ();
7294
7295 extern int feof (FILE *__stream) throw () ;
7296
7297 extern int ferror (FILE *__stream) throw () ;
7298
7299
7300
7301
7302 extern void clearerr_unlocked (FILE *__stream) throw ();
7303 extern int feof_unlocked (FILE *__stream) throw () ;
7304 extern int ferror_unlocked (FILE *__stream) throw () ;
7305
7306
7307
7308
7309
7310
7311
7312
7313 extern void perror (__const char *__s);
7314
7315
7316
7317
7318
7319
7320 # 1 "/usr/include/bits/sys_errlist.h" 1 3 4
7321
7322
7323
7324
7325
7326
7327
7328 # 1 "/usr/include/gentoo-multilib/amd64/bits/sys_errlist.h" 1 3 4
7329 # 27 "/usr/include/gentoo-multilib/amd64/bits/sys_errlist.h" 3 4
7330 extern int sys_nerr;
7331 extern __const char *__const sys_errlist[];
7332
7333
7334 extern int _sys_nerr;
7335 extern __const char *__const _sys_errlist[];
7336 # 9 "/usr/include/bits/sys_errlist.h" 2 3 4
7337 # 759 "/usr/include/gentoo-multilib/amd64/stdio.h" 2 3 4
7338
7339
7340
7341
7342 extern int fileno (FILE *__stream) throw () ;
7343
7344
7345
7346
7347 extern int fileno_unlocked (FILE *__stream) throw () ;
7348 # 778 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
7349 extern FILE *popen (__const char *__command, __const char *__modes) ;
7350
7351
7352
7353
7354
7355 extern int pclose (FILE *__stream);
7356
7357
7358
7359
7360
7361 extern char *ctermid (char *__s) throw ();
7362
7363
7364
7365
7366
7367 extern char *cuserid (char *__s);
7368
7369
7370
7371
7372 struct obstack;
7373
7374
7375 extern int obstack_printf (struct obstack *__restrict __obstack,
7376       __const char *__restrict __format, ...)
7377      throw () __attribute__ ((__format__ (__printf__, 2, 3)));
7378 extern int obstack_vprintf (struct obstack *__restrict __obstack,
7379        __const char *__restrict __format,
7380        __gnuc_va_list __args)
7381      throw () __attribute__ ((__format__ (__printf__, 2, 0)));
7382
7383
7384
7385
7386
7387
7388
7389 extern void flockfile (FILE *__stream) throw ();
7390
7391
7392
7393 extern int ftrylockfile (FILE *__stream) throw () ;
7394
7395
7396 extern void funlockfile (FILE *__stream) throw ();
7397 # 839 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
7398 # 1 "/usr/include/bits/stdio.h" 1 3 4
7399
7400
7401
7402
7403
7404
7405
7406 # 1 "/usr/include/gentoo-multilib/amd64/bits/stdio.h" 1 3 4
7407 # 33 "/usr/include/gentoo-multilib/amd64/bits/stdio.h" 3 4
7408 inline int
7409 vprintf (__const char *__restrict __fmt, __gnuc_va_list __arg)
7410 {
7411   return vfprintf (stdout, __fmt, __arg);
7412 }
7413
7414
7415 inline int
7416 getchar (void)
7417 {
7418   return _IO_getc (stdin);
7419 }
7420
7421
7422
7423
7424 inline int
7425 fgetc_unlocked (FILE *__fp)
7426 {
7427   return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++);
7428 }
7429
7430
7431
7432
7433
7434 inline int
7435 getc_unlocked (FILE *__fp)
7436 {
7437   return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++);
7438 }
7439
7440
7441 inline int
7442 getchar_unlocked (void)
7443 {
7444   return (__builtin_expect (((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end), 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++);
7445 }
7446
7447
7448
7449
7450 inline int
7451 putchar (int __c)
7452 {
7453   return _IO_putc (__c, stdout);
7454 }
7455
7456
7457
7458
7459 inline int
7460 fputc_unlocked (int __c, FILE *__stream)
7461 {
7462   return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c)));
7463 }
7464
7465
7466
7467
7468
7469 inline int
7470 putc_unlocked (int __c, FILE *__stream)
7471 {
7472   return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c)));
7473 }
7474
7475
7476 inline int
7477 putchar_unlocked (int __c)
7478 {
7479   return (__builtin_expect (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end), 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c)));
7480 }
7481
7482
7483
7484
7485
7486 inline __ssize_t
7487 getline (char **__lineptr, size_t *__n, FILE *__stream)
7488 {
7489   return __getdelim (__lineptr, __n, '\n', __stream);
7490 }
7491
7492
7493
7494
7495
7496 inline int
7497 feof_unlocked (FILE *__stream) throw ()
7498 {
7499   return (((__stream)->_flags & 0x10) != 0);
7500 }
7501
7502
7503 inline int
7504 ferror_unlocked (FILE *__stream) throw ()
7505 {
7506   return (((__stream)->_flags & 0x20) != 0);
7507 }
7508 # 9 "/usr/include/bits/stdio.h" 2 3 4
7509 # 840 "/usr/include/gentoo-multilib/amd64/stdio.h" 2 3 4
7510 # 848 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
7511 }
7512 # 9 "/usr/include/stdio.h" 2 3 4
7513 # 53 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/io/qtextstream.h" 2
7514
7515
7516
7517
7518
7519
7520
7521 typedef QtValidLicenseForCoreModule QtCoreModule;
7522
7523 class QTextCodec;
7524 class QTextDecoder;
7525
7526 class QTextStreamPrivate;
7527 class QTextStream
7528 {
7529     inline QTextStreamPrivate* d_func() { return reinterpret_cast<QTextStreamPrivate *>(d_ptr); } inline const QTextStreamPrivate* d_func() const { return reinterpret_cast<const QTextStreamPrivate *>(d_ptr); } friend class QTextStreamPrivate;
7530
7531 public:
7532     enum RealNumberNotation {
7533         SmartNotation,
7534         FixedNotation,
7535         ScientificNotation
7536     };
7537     enum FieldAlignment {
7538         AlignLeft,
7539         AlignRight,
7540         AlignCenter,
7541         AlignAccountingStyle
7542     };
7543     enum Status {
7544         Ok,
7545         ReadPastEnd,
7546         ReadCorruptData
7547     };
7548     enum NumberFlag {
7549         ShowBase = 0x1,
7550         ForcePoint = 0x2,
7551         ForceSign = 0x4,
7552         UppercaseBase = 0x8,
7553         UppercaseDigits = 0x10
7554     };
7555     typedef QFlags<NumberFlag> NumberFlags;
7556
7557     QTextStream();
7558     explicit QTextStream(QIODevice *device);
7559     explicit QTextStream(FILE *fileHandle, QIODevice::OpenMode openMode = QIODevice::ReadWrite);
7560     explicit QTextStream(QString *string, QIODevice::OpenMode openMode = QIODevice::ReadWrite);
7561     explicit QTextStream(QByteArray *array, QIODevice::OpenMode openMode = QIODevice::ReadWrite);
7562     explicit QTextStream(const QByteArray &array, QIODevice::OpenMode openMode = QIODevice::ReadOnly);
7563     virtual ~QTextStream();
7564 # 114 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/io/qtextstream.h"
7565     void setDevice(QIODevice *device);
7566     QIODevice *device() const;
7567
7568     void setString(QString *string, QIODevice::OpenMode openMode = QIODevice::ReadWrite);
7569     QString *string() const;
7570
7571     Status status() const;
7572     void setStatus(Status status);
7573     void resetStatus();
7574
7575     bool atEnd() const;
7576     void reset();
7577     void flush();
7578     bool seek(qint64 pos);
7579     qint64 pos() const;
7580
7581     void skipWhiteSpace();
7582
7583     QString readLine(qint64 maxlen = 0);
7584     QString readAll();
7585     QString read(qint64 maxlen);
7586
7587     void setFieldAlignment(FieldAlignment alignment);
7588     FieldAlignment fieldAlignment() const;
7589
7590     void setPadChar(QChar ch);
7591     QChar padChar() const;
7592
7593     void setFieldWidth(int width);
7594     int fieldWidth() const;
7595
7596     void setNumberFlags(NumberFlags flags);
7597     NumberFlags numberFlags() const;
7598
7599     void setIntegerBase(int base);
7600     int integerBase() const;
7601
7602     void setRealNumberNotation(RealNumberNotation notation);
7603     RealNumberNotation realNumberNotation() const;
7604
7605     void setRealNumberPrecision(int precision);
7606     int realNumberPrecision() const;
7607
7608     QTextStream &operator>>(QChar &ch);
7609     QTextStream &operator>>(char &ch);
7610     QTextStream &operator>>(signed short &i);
7611     QTextStream &operator>>(unsigned short &i);
7612     QTextStream &operator>>(signed int &i);
7613     QTextStream &operator>>(unsigned int &i);
7614     QTextStream &operator>>(signed long &i);
7615     QTextStream &operator>>(unsigned long &i);
7616     QTextStream &operator>>(qlonglong &i);
7617     QTextStream &operator>>(qulonglong &i);
7618     QTextStream &operator>>(float &f);
7619     QTextStream &operator>>(double &f);
7620     QTextStream &operator>>(QString &s);
7621     QTextStream &operator>>(QByteArray &array);
7622     QTextStream &operator>>(char *c);
7623
7624     QTextStream &operator<<(QBool b);
7625     QTextStream &operator<<(QChar ch);
7626     QTextStream &operator<<(char ch);
7627     QTextStream &operator<<(signed short i);
7628     QTextStream &operator<<(unsigned short i);
7629     QTextStream &operator<<(signed int i);
7630     QTextStream &operator<<(unsigned int i);
7631     QTextStream &operator<<(signed long i);
7632     QTextStream &operator<<(unsigned long i);
7633     QTextStream &operator<<(qlonglong i);
7634     QTextStream &operator<<(qulonglong i);
7635     QTextStream &operator<<(float f);
7636     QTextStream &operator<<(double f);
7637     QTextStream &operator<<(const QString &s);
7638     QTextStream &operator<<(const QByteArray &array);
7639     QTextStream &operator<<(const char *c);
7640     QTextStream &operator<<(const void *ptr);
7641 # 242 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/io/qtextstream.h"
7642 private:
7643
7644
7645
7646
7647
7648     QTextStream(const QTextStream &); QTextStream &operator=(const QTextStream &);
7649
7650     QTextStreamPrivate *d_ptr;
7651 };
7652
7653 inline QFlags<QTextStream::NumberFlags::enum_type> operator|(QTextStream::NumberFlags::enum_type f1, QTextStream::NumberFlags::enum_type f2) { return QFlags<QTextStream::NumberFlags::enum_type>(f1) | f2; } inline QFlags<QTextStream::NumberFlags::enum_type> operator|(QTextStream::NumberFlags::enum_type f1, QFlags<QTextStream::NumberFlags::enum_type> f2) { return f2 | f1; }
7654
7655
7656
7657
7658
7659 typedef QTextStream & (*QTextStreamFunction)(QTextStream &);
7660 typedef void (QTextStream::*QTSMFI)(int);
7661 typedef void (QTextStream::*QTSMFC)(QChar);
7662
7663 class QTextStreamManipulator
7664 {
7665 public:
7666     QTextStreamManipulator(QTSMFI m, int a) { mf = m; mc = 0; arg = a; }
7667     QTextStreamManipulator(QTSMFC m, QChar c) { mf = 0; mc = m; ch = c; }
7668     void exec(QTextStream &s) { if (mf) { (s.*mf)(arg); } else { (s.*mc)(ch); } }
7669
7670 private:
7671     QTSMFI mf;
7672     QTSMFC mc;
7673     int arg;
7674     QChar ch;
7675 };
7676
7677 inline QTextStream &operator>>(QTextStream &s, QTextStreamFunction f)
7678 { return (*f)(s); }
7679
7680 inline QTextStream &operator<<(QTextStream &s, QTextStreamFunction f)
7681 { return (*f)(s); }
7682
7683 inline QTextStream &operator<<(QTextStream &s, QTextStreamManipulator m)
7684 { m.exec(s); return s; }
7685
7686  QTextStream &bin(QTextStream &s);
7687  QTextStream &oct(QTextStream &s);
7688  QTextStream &dec(QTextStream &s);
7689  QTextStream &hex(QTextStream &s);
7690
7691  QTextStream &showbase(QTextStream &s);
7692  QTextStream &forcesign(QTextStream &s);
7693  QTextStream &forcepoint(QTextStream &s);
7694  QTextStream &noshowbase(QTextStream &s);
7695  QTextStream &noforcesign(QTextStream &s);
7696  QTextStream &noforcepoint(QTextStream &s);
7697
7698  QTextStream &uppercasebase(QTextStream &s);
7699  QTextStream &uppercasedigits(QTextStream &s);
7700  QTextStream &lowercasebase(QTextStream &s);
7701  QTextStream &lowercasedigits(QTextStream &s);
7702
7703  QTextStream &fixed(QTextStream &s);
7704  QTextStream &scientific(QTextStream &s);
7705
7706  QTextStream &left(QTextStream &s);
7707  QTextStream &right(QTextStream &s);
7708  QTextStream &center(QTextStream &s);
7709
7710  QTextStream &endl(QTextStream &s);
7711  QTextStream &flush(QTextStream &s);
7712  QTextStream &reset(QTextStream &s);
7713
7714  QTextStream &bom(QTextStream &s);
7715
7716  QTextStream &ws(QTextStream &s);
7717
7718 inline QTextStreamManipulator qSetFieldWidth(int width)
7719 {
7720     QTSMFI func = &QTextStream::setFieldWidth;
7721     return QTextStreamManipulator(func,width);
7722 }
7723
7724 inline QTextStreamManipulator qSetPadChar(QChar ch)
7725 {
7726     QTSMFC func = &QTextStream::setPadChar;
7727     return QTextStreamManipulator(func, ch);
7728 }
7729
7730 inline QTextStreamManipulator qSetRealNumberPrecision(int precision)
7731 {
7732     QTSMFI func = &QTextStream::setRealNumberPrecision;
7733     return QTextStreamManipulator(func, precision);
7734 }
7735 # 362 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/io/qtextstream.h"
7736
7737 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qtextstream.h" 2
7738 # 44 "./project.h" 2
7739 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qstring.h" 1
7740 # 45 "./project.h" 2
7741 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qstack.h" 1
7742 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qstack.h" 1
7743 # 42 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qstack.h"
7744 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qvector.h" 1
7745 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qvector.h" 1
7746 # 42 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qvector.h"
7747 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qiterator.h" 1
7748 # 43 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qvector.h" 2
7749 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qatomic.h" 1
7750 # 44 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qvector.h" 2
7751 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qalgorithms.h" 1
7752 # 45 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qvector.h" 2
7753 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qlist.h" 1
7754 # 46 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qvector.h" 2
7755
7756
7757
7758
7759
7760 # 1 "/usr/include/stdlib.h" 1 3 4
7761
7762
7763
7764
7765
7766
7767
7768 # 1 "/usr/include/gentoo-multilib/amd64/stdlib.h" 1 3 4
7769 # 25 "/usr/include/gentoo-multilib/amd64/stdlib.h" 3 4
7770 # 1 "/usr/include/features.h" 1 3 4
7771 # 26 "/usr/include/gentoo-multilib/amd64/stdlib.h" 2 3 4
7772
7773
7774
7775
7776
7777
7778
7779 # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4
7780 # 34 "/usr/include/gentoo-multilib/amd64/stdlib.h" 2 3 4
7781
7782 extern "C" {
7783
7784
7785
7786
7787
7788
7789 # 1 "/usr/include/bits/waitflags.h" 1 3 4
7790
7791
7792
7793
7794
7795
7796
7797 # 1 "/usr/include/gentoo-multilib/amd64/bits/waitflags.h" 1 3 4
7798 # 9 "/usr/include/bits/waitflags.h" 2 3 4
7799 # 43 "/usr/include/gentoo-multilib/amd64/stdlib.h" 2 3 4
7800 # 1 "/usr/include/bits/waitstatus.h" 1 3 4
7801
7802
7803
7804
7805
7806
7807
7808 # 1 "/usr/include/gentoo-multilib/amd64/bits/waitstatus.h" 1 3 4
7809 # 65 "/usr/include/gentoo-multilib/amd64/bits/waitstatus.h" 3 4
7810 # 1 "/usr/include/endian.h" 1 3 4
7811
7812
7813
7814
7815
7816
7817
7818 # 1 "/usr/include/gentoo-multilib/amd64/endian.h" 1 3 4
7819 # 22 "/usr/include/gentoo-multilib/amd64/endian.h" 3 4
7820 # 1 "/usr/include/features.h" 1 3 4
7821 # 23 "/usr/include/gentoo-multilib/amd64/endian.h" 2 3 4
7822 # 37 "/usr/include/gentoo-multilib/amd64/endian.h" 3 4
7823 # 1 "/usr/include/bits/endian.h" 1 3 4
7824
7825
7826
7827
7828
7829
7830
7831 # 1 "/usr/include/gentoo-multilib/amd64/bits/endian.h" 1 3 4
7832 # 9 "/usr/include/bits/endian.h" 2 3 4
7833 # 38 "/usr/include/gentoo-multilib/amd64/endian.h" 2 3 4
7834 # 9 "/usr/include/endian.h" 2 3 4
7835 # 66 "/usr/include/gentoo-multilib/amd64/bits/waitstatus.h" 2 3 4
7836
7837 union wait
7838   {
7839     int w_status;
7840     struct
7841       {
7842
7843  unsigned int __w_termsig:7;
7844  unsigned int __w_coredump:1;
7845  unsigned int __w_retcode:8;
7846  unsigned int:16;
7847
7848
7849
7850
7851
7852
7853
7854       } __wait_terminated;
7855     struct
7856       {
7857
7858  unsigned int __w_stopval:8;
7859  unsigned int __w_stopsig:8;
7860  unsigned int:16;
7861
7862
7863
7864
7865
7866
7867       } __wait_stopped;
7868   };
7869 # 9 "/usr/include/bits/waitstatus.h" 2 3 4
7870 # 44 "/usr/include/gentoo-multilib/amd64/stdlib.h" 2 3 4
7871 # 96 "/usr/include/gentoo-multilib/amd64/stdlib.h" 3 4
7872
7873
7874 typedef struct
7875   {
7876     int quot;
7877     int rem;
7878   } div_t;
7879
7880
7881
7882 typedef struct
7883   {
7884     long int quot;
7885     long int rem;
7886   } ldiv_t;
7887
7888
7889
7890
7891
7892
7893
7894 __extension__ typedef struct
7895   {
7896     long long int quot;
7897     long long int rem;
7898   } lldiv_t;
7899
7900
7901 # 140 "/usr/include/gentoo-multilib/amd64/stdlib.h" 3 4
7902 extern size_t __ctype_get_mb_cur_max (void) throw () ;
7903
7904
7905
7906
7907 extern double atof (__const char *__nptr)
7908      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
7909
7910 extern int atoi (__const char *__nptr)
7911      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
7912
7913 extern long int atol (__const char *__nptr)
7914      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
7915
7916
7917
7918
7919
7920 __extension__ extern long long int atoll (__const char *__nptr)
7921      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
7922
7923
7924
7925
7926
7927 extern double strtod (__const char *__restrict __nptr,
7928         char **__restrict __endptr)
7929      throw () __attribute__ ((__nonnull__ (1))) ;
7930
7931
7932
7933
7934
7935 extern float strtof (__const char *__restrict __nptr,
7936        char **__restrict __endptr) throw () __attribute__ ((__nonnull__ (1))) ;
7937
7938 extern long double strtold (__const char *__restrict __nptr,
7939        char **__restrict __endptr)
7940      throw () __attribute__ ((__nonnull__ (1))) ;
7941
7942
7943
7944
7945
7946 extern long int strtol (__const char *__restrict __nptr,
7947    char **__restrict __endptr, int __base)
7948      throw () __attribute__ ((__nonnull__ (1))) ;
7949
7950 extern unsigned long int strtoul (__const char *__restrict __nptr,
7951       char **__restrict __endptr, int __base)
7952      throw () __attribute__ ((__nonnull__ (1))) ;
7953
7954
7955
7956
7957 __extension__
7958 extern long long int strtoq (__const char *__restrict __nptr,
7959         char **__restrict __endptr, int __base)
7960      throw () __attribute__ ((__nonnull__ (1))) ;
7961
7962 __extension__
7963 extern unsigned long long int strtouq (__const char *__restrict __nptr,
7964            char **__restrict __endptr, int __base)
7965      throw () __attribute__ ((__nonnull__ (1))) ;
7966
7967
7968
7969
7970
7971 __extension__
7972 extern long long int strtoll (__const char *__restrict __nptr,
7973          char **__restrict __endptr, int __base)
7974      throw () __attribute__ ((__nonnull__ (1))) ;
7975
7976 __extension__
7977 extern unsigned long long int strtoull (__const char *__restrict __nptr,
7978      char **__restrict __endptr, int __base)
7979      throw () __attribute__ ((__nonnull__ (1))) ;
7980
7981 # 236 "/usr/include/gentoo-multilib/amd64/stdlib.h" 3 4
7982 # 1 "/usr/include/xlocale.h" 1 3 4
7983 # 237 "/usr/include/gentoo-multilib/amd64/stdlib.h" 2 3 4
7984
7985
7986
7987 extern long int strtol_l (__const char *__restrict __nptr,
7988      char **__restrict __endptr, int __base,
7989      __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 4))) ;
7990
7991 extern unsigned long int strtoul_l (__const char *__restrict __nptr,
7992         char **__restrict __endptr,
7993         int __base, __locale_t __loc)
7994      throw () __attribute__ ((__nonnull__ (1, 4))) ;
7995
7996 __extension__
7997 extern long long int strtoll_l (__const char *__restrict __nptr,
7998     char **__restrict __endptr, int __base,
7999     __locale_t __loc)
8000      throw () __attribute__ ((__nonnull__ (1, 4))) ;
8001
8002 __extension__
8003 extern unsigned long long int strtoull_l (__const char *__restrict __nptr,
8004        char **__restrict __endptr,
8005        int __base, __locale_t __loc)
8006      throw () __attribute__ ((__nonnull__ (1, 4))) ;
8007
8008 extern double strtod_l (__const char *__restrict __nptr,
8009    char **__restrict __endptr, __locale_t __loc)
8010      throw () __attribute__ ((__nonnull__ (1, 3))) ;
8011
8012 extern float strtof_l (__const char *__restrict __nptr,
8013          char **__restrict __endptr, __locale_t __loc)
8014      throw () __attribute__ ((__nonnull__ (1, 3))) ;
8015
8016 extern long double strtold_l (__const char *__restrict __nptr,
8017          char **__restrict __endptr,
8018          __locale_t __loc)
8019      throw () __attribute__ ((__nonnull__ (1, 3))) ;
8020
8021
8022
8023
8024
8025
8026 extern double __strtod_internal (__const char *__restrict __nptr,
8027      char **__restrict __endptr, int __group)
8028      throw () __attribute__ ((__nonnull__ (1))) ;
8029 extern float __strtof_internal (__const char *__restrict __nptr,
8030     char **__restrict __endptr, int __group)
8031      throw () __attribute__ ((__nonnull__ (1))) ;
8032 extern long double __strtold_internal (__const char *__restrict __nptr,
8033            char **__restrict __endptr,
8034            int __group)
8035      throw () __attribute__ ((__nonnull__ (1))) ;
8036
8037 extern long int __strtol_internal (__const char *__restrict __nptr,
8038        char **__restrict __endptr,
8039        int __base, int __group)
8040      throw () __attribute__ ((__nonnull__ (1))) ;
8041
8042
8043
8044 extern unsigned long int __strtoul_internal (__const char *__restrict __nptr,
8045           char **__restrict __endptr,
8046           int __base, int __group)
8047      throw () __attribute__ ((__nonnull__ (1))) ;
8048
8049
8050
8051
8052 __extension__
8053 extern long long int __strtoll_internal (__const char *__restrict __nptr,
8054       char **__restrict __endptr,
8055       int __base, int __group)
8056      throw () __attribute__ ((__nonnull__ (1))) ;
8057
8058
8059
8060 __extension__
8061 extern unsigned long long int __strtoull_internal (__const char *
8062          __restrict __nptr,
8063          char **__restrict __endptr,
8064          int __base, int __group)
8065      throw () __attribute__ ((__nonnull__ (1))) ;
8066
8067
8068
8069
8070
8071
8072
8073
8074 extern __inline double
8075 strtod (__const char *__restrict __nptr, char **__restrict __endptr) throw ()
8076 {
8077   return __strtod_internal (__nptr, __endptr, 0);
8078 }
8079 extern __inline long int
8080 strtol (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw ()
8081
8082 {
8083   return __strtol_internal (__nptr, __endptr, __base, 0);
8084 }
8085 extern __inline unsigned long int
8086 strtoul (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw ()
8087
8088 {
8089   return __strtoul_internal (__nptr, __endptr, __base, 0);
8090 }
8091
8092
8093
8094
8095 extern __inline float
8096 strtof (__const char *__restrict __nptr, char **__restrict __endptr) throw ()
8097 {
8098   return __strtof_internal (__nptr, __endptr, 0);
8099 }
8100
8101 extern __inline long double
8102 strtold (__const char *__restrict __nptr, char **__restrict __endptr) throw ()
8103 {
8104   return __strtold_internal (__nptr, __endptr, 0);
8105 }
8106
8107
8108
8109
8110
8111 __extension__ extern __inline long long int
8112 strtoq (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw ()
8113
8114 {
8115   return __strtoll_internal (__nptr, __endptr, __base, 0);
8116 }
8117 __extension__ extern __inline unsigned long long int
8118 strtouq (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw ()
8119
8120 {
8121   return __strtoull_internal (__nptr, __endptr, __base, 0);
8122 }
8123
8124
8125
8126
8127 __extension__ extern __inline long long int
8128 strtoll (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw ()
8129
8130 {
8131   return __strtoll_internal (__nptr, __endptr, __base, 0);
8132 }
8133 __extension__ extern __inline unsigned long long int
8134 strtoull (__const char * __restrict __nptr, char **__restrict __endptr, int __base) throw ()
8135
8136 {
8137   return __strtoull_internal (__nptr, __endptr, __base, 0);
8138 }
8139
8140
8141
8142
8143 extern __inline double
8144 atof (__const char *__nptr) throw ()
8145 {
8146   return strtod (__nptr, (char **) __null);
8147 }
8148 extern __inline int
8149 atoi (__const char *__nptr) throw ()
8150 {
8151   return (int) strtol (__nptr, (char **) __null, 10);
8152 }
8153 extern __inline long int
8154 atol (__const char *__nptr) throw ()
8155 {
8156   return strtol (__nptr, (char **) __null, 10);
8157 }
8158
8159
8160
8161
8162 __extension__ extern __inline long long int
8163 atoll (__const char *__nptr) throw ()
8164 {
8165   return strtoll (__nptr, (char **) __null, 10);
8166 }
8167
8168 # 429 "/usr/include/gentoo-multilib/amd64/stdlib.h" 3 4
8169 extern char *l64a (long int __n) throw () ;
8170
8171
8172 extern long int a64l (__const char *__s)
8173      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
8174
8175
8176
8177
8178 # 1 "/usr/include/sys/types.h" 1 3 4
8179
8180
8181
8182
8183
8184
8185
8186 # 1 "/usr/include/gentoo-multilib/amd64/sys/types.h" 1 3 4
8187 # 27 "/usr/include/gentoo-multilib/amd64/sys/types.h" 3 4
8188 # 1 "/usr/include/features.h" 1 3 4
8189 # 28 "/usr/include/gentoo-multilib/amd64/sys/types.h" 2 3 4
8190
8191 extern "C" {
8192
8193 # 1 "/usr/include/bits/types.h" 1 3 4
8194 # 32 "/usr/include/gentoo-multilib/amd64/sys/types.h" 2 3 4
8195
8196
8197
8198 typedef __u_char u_char;
8199 typedef __u_short u_short;
8200 typedef __u_int u_int;
8201 typedef __u_long u_long;
8202 typedef __quad_t quad_t;
8203 typedef __u_quad_t u_quad_t;
8204 typedef __fsid_t fsid_t;
8205
8206
8207
8208
8209 typedef __loff_t loff_t;
8210
8211
8212
8213 typedef __ino_t ino_t;
8214
8215
8216
8217
8218
8219
8220 typedef __ino64_t ino64_t;
8221
8222
8223
8224
8225 typedef __dev_t dev_t;
8226
8227
8228
8229
8230 typedef __gid_t gid_t;
8231
8232
8233
8234
8235 typedef __mode_t mode_t;
8236
8237
8238
8239
8240 typedef __nlink_t nlink_t;
8241
8242
8243
8244
8245 typedef __uid_t uid_t;
8246
8247
8248
8249
8250
8251 typedef __off_t off_t;
8252
8253
8254
8255
8256
8257
8258 typedef __off64_t off64_t;
8259
8260
8261
8262
8263 typedef __pid_t pid_t;
8264
8265
8266
8267
8268 typedef __id_t id_t;
8269
8270
8271
8272
8273 typedef __ssize_t ssize_t;
8274
8275
8276
8277
8278
8279 typedef __daddr_t daddr_t;
8280 typedef __caddr_t caddr_t;
8281
8282
8283
8284
8285
8286 typedef __key_t key_t;
8287 # 133 "/usr/include/gentoo-multilib/amd64/sys/types.h" 3 4
8288 # 1 "/usr/include/time.h" 1 3 4
8289
8290
8291
8292
8293
8294
8295
8296 # 1 "/usr/include/gentoo-multilib/amd64/time.h" 1 3 4
8297 # 57 "/usr/include/gentoo-multilib/amd64/time.h" 3 4
8298 # 1 "/usr/include/bits/types.h" 1 3 4
8299 # 58 "/usr/include/gentoo-multilib/amd64/time.h" 2 3 4
8300
8301
8302
8303 typedef __clock_t clock_t;
8304
8305
8306
8307 # 73 "/usr/include/gentoo-multilib/amd64/time.h" 3 4
8308 # 1 "/usr/include/bits/types.h" 1 3 4
8309 # 74 "/usr/include/gentoo-multilib/amd64/time.h" 2 3 4
8310
8311
8312
8313 typedef __time_t time_t;
8314
8315
8316
8317 # 90 "/usr/include/gentoo-multilib/amd64/time.h" 3 4
8318 # 1 "/usr/include/bits/types.h" 1 3 4
8319 # 91 "/usr/include/gentoo-multilib/amd64/time.h" 2 3 4
8320
8321
8322 typedef __clockid_t clockid_t;
8323 # 102 "/usr/include/gentoo-multilib/amd64/time.h" 3 4
8324 # 1 "/usr/include/bits/types.h" 1 3 4
8325 # 103 "/usr/include/gentoo-multilib/amd64/time.h" 2 3 4
8326
8327
8328 typedef __timer_t timer_t;
8329 # 9 "/usr/include/time.h" 2 3 4
8330 # 134 "/usr/include/gentoo-multilib/amd64/sys/types.h" 2 3 4
8331
8332
8333
8334 typedef __useconds_t useconds_t;
8335
8336
8337
8338 typedef __suseconds_t suseconds_t;
8339
8340
8341
8342
8343
8344 # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4
8345 # 148 "/usr/include/gentoo-multilib/amd64/sys/types.h" 2 3 4
8346
8347
8348
8349 typedef unsigned long int ulong;
8350 typedef unsigned short int ushort;
8351 typedef unsigned int uint;
8352 # 195 "/usr/include/gentoo-multilib/amd64/sys/types.h" 3 4
8353 typedef int int8_t __attribute__ ((__mode__ (__QI__)));
8354 typedef int int16_t __attribute__ ((__mode__ (__HI__)));
8355 typedef int int32_t __attribute__ ((__mode__ (__SI__)));
8356 typedef int int64_t __attribute__ ((__mode__ (__DI__)));
8357
8358
8359 typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__)));
8360 typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__)));
8361 typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__)));
8362 typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__)));
8363
8364 typedef int register_t __attribute__ ((__mode__ (__word__)));
8365 # 217 "/usr/include/gentoo-multilib/amd64/sys/types.h" 3 4
8366 # 1 "/usr/include/endian.h" 1 3 4
8367 # 218 "/usr/include/gentoo-multilib/amd64/sys/types.h" 2 3 4
8368
8369
8370 # 1 "/usr/include/sys/select.h" 1 3 4
8371
8372
8373
8374
8375
8376
8377
8378 # 1 "/usr/include/gentoo-multilib/amd64/sys/select.h" 1 3 4
8379 # 25 "/usr/include/gentoo-multilib/amd64/sys/select.h" 3 4
8380 # 1 "/usr/include/features.h" 1 3 4
8381 # 26 "/usr/include/gentoo-multilib/amd64/sys/select.h" 2 3 4
8382
8383
8384 # 1 "/usr/include/bits/types.h" 1 3 4
8385 # 29 "/usr/include/gentoo-multilib/amd64/sys/select.h" 2 3 4
8386
8387
8388 # 1 "/usr/include/bits/select.h" 1 3 4
8389
8390
8391
8392
8393
8394
8395
8396 # 1 "/usr/include/gentoo-multilib/amd64/bits/select.h" 1 3 4
8397 # 9 "/usr/include/bits/select.h" 2 3 4
8398 # 32 "/usr/include/gentoo-multilib/amd64/sys/select.h" 2 3 4
8399
8400
8401 # 1 "/usr/include/bits/sigset.h" 1 3 4
8402
8403
8404
8405
8406
8407
8408
8409 # 1 "/usr/include/gentoo-multilib/amd64/bits/sigset.h" 1 3 4
8410 # 24 "/usr/include/gentoo-multilib/amd64/bits/sigset.h" 3 4
8411 typedef int __sig_atomic_t;
8412
8413
8414
8415
8416 typedef struct
8417   {
8418     unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];
8419   } __sigset_t;
8420 # 9 "/usr/include/bits/sigset.h" 2 3 4
8421 # 35 "/usr/include/gentoo-multilib/amd64/sys/select.h" 2 3 4
8422
8423
8424
8425 typedef __sigset_t sigset_t;
8426
8427
8428
8429
8430
8431 # 1 "/usr/include/time.h" 1 3 4
8432
8433
8434
8435
8436
8437
8438
8439 # 1 "/usr/include/gentoo-multilib/amd64/time.h" 1 3 4
8440 # 117 "/usr/include/gentoo-multilib/amd64/time.h" 3 4
8441 # 1 "/usr/include/bits/types.h" 1 3 4
8442 # 118 "/usr/include/gentoo-multilib/amd64/time.h" 2 3 4
8443
8444
8445
8446 struct timespec
8447   {
8448     __time_t tv_sec;
8449     long int tv_nsec;
8450   };
8451 # 9 "/usr/include/time.h" 2 3 4
8452 # 45 "/usr/include/gentoo-multilib/amd64/sys/select.h" 2 3 4
8453
8454 # 1 "/usr/include/bits/time.h" 1 3 4
8455
8456
8457
8458
8459
8460
8461
8462 # 1 "/usr/include/gentoo-multilib/amd64/bits/time.h" 1 3 4
8463 # 65 "/usr/include/gentoo-multilib/amd64/bits/time.h" 3 4
8464 # 1 "/usr/include/bits/types.h" 1 3 4
8465 # 66 "/usr/include/gentoo-multilib/amd64/bits/time.h" 2 3 4
8466
8467
8468
8469 struct timeval
8470   {
8471     __time_t tv_sec;
8472     __suseconds_t tv_usec;
8473   };
8474 # 9 "/usr/include/bits/time.h" 2 3 4
8475 # 47 "/usr/include/gentoo-multilib/amd64/sys/select.h" 2 3 4
8476 # 55 "/usr/include/gentoo-multilib/amd64/sys/select.h" 3 4
8477 typedef long int __fd_mask;
8478 # 67 "/usr/include/gentoo-multilib/amd64/sys/select.h" 3 4
8479 typedef struct
8480   {
8481
8482
8483
8484     __fd_mask fds_bits[1024 / (8 * sizeof (__fd_mask))];
8485
8486
8487
8488
8489
8490   } fd_set;
8491
8492
8493
8494
8495
8496
8497 typedef __fd_mask fd_mask;
8498 # 99 "/usr/include/gentoo-multilib/amd64/sys/select.h" 3 4
8499 extern "C" {
8500 # 109 "/usr/include/gentoo-multilib/amd64/sys/select.h" 3 4
8501 extern int select (int __nfds, fd_set *__restrict __readfds,
8502      fd_set *__restrict __writefds,
8503      fd_set *__restrict __exceptfds,
8504      struct timeval *__restrict __timeout);
8505 # 121 "/usr/include/gentoo-multilib/amd64/sys/select.h" 3 4
8506 extern int pselect (int __nfds, fd_set *__restrict __readfds,
8507       fd_set *__restrict __writefds,
8508       fd_set *__restrict __exceptfds,
8509       const struct timespec *__restrict __timeout,
8510       const __sigset_t *__restrict __sigmask);
8511
8512
8513 }
8514 # 9 "/usr/include/sys/select.h" 2 3 4
8515 # 221 "/usr/include/gentoo-multilib/amd64/sys/types.h" 2 3 4
8516
8517
8518 # 1 "/usr/include/sys/sysmacros.h" 1 3 4
8519
8520
8521
8522
8523
8524
8525
8526 # 1 "/usr/include/gentoo-multilib/amd64/sys/sysmacros.h" 1 3 4
8527 # 24 "/usr/include/gentoo-multilib/amd64/sys/sysmacros.h" 3 4
8528 # 1 "/usr/include/features.h" 1 3 4
8529 # 25 "/usr/include/gentoo-multilib/amd64/sys/sysmacros.h" 2 3 4
8530
8531
8532
8533
8534
8535 __extension__
8536 extern __inline unsigned int gnu_dev_major (unsigned long long int __dev)
8537      throw ();
8538 __extension__
8539 extern __inline unsigned int gnu_dev_minor (unsigned long long int __dev)
8540      throw ();
8541 __extension__
8542 extern __inline unsigned long long int gnu_dev_makedev (unsigned int __major,
8543        unsigned int __minor)
8544      throw ();
8545
8546
8547 __extension__ extern __inline unsigned int
8548 gnu_dev_major (unsigned long long int __dev) throw ()
8549 {
8550   return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff);
8551 }
8552
8553 __extension__ extern __inline unsigned int
8554 gnu_dev_minor (unsigned long long int __dev) throw ()
8555 {
8556   return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff);
8557 }
8558
8559 __extension__ extern __inline unsigned long long int
8560 gnu_dev_makedev (unsigned int __major, unsigned int __minor) throw ()
8561 {
8562   return ((__minor & 0xff) | ((__major & 0xfff) << 8)
8563    | (((unsigned long long int) (__minor & ~0xff)) << 12)
8564    | (((unsigned long long int) (__major & ~0xfff)) << 32));
8565 }
8566 # 9 "/usr/include/sys/sysmacros.h" 2 3 4
8567 # 224 "/usr/include/gentoo-multilib/amd64/sys/types.h" 2 3 4
8568
8569
8570
8571
8572 typedef __blksize_t blksize_t;
8573
8574
8575
8576
8577
8578
8579 typedef __blkcnt_t blkcnt_t;
8580
8581
8582
8583 typedef __fsblkcnt_t fsblkcnt_t;
8584
8585
8586
8587 typedef __fsfilcnt_t fsfilcnt_t;
8588 # 262 "/usr/include/gentoo-multilib/amd64/sys/types.h" 3 4
8589 typedef __blkcnt64_t blkcnt64_t;
8590 typedef __fsblkcnt64_t fsblkcnt64_t;
8591 typedef __fsfilcnt64_t fsfilcnt64_t;
8592
8593
8594
8595
8596
8597 # 1 "/usr/include/bits/pthreadtypes.h" 1 3 4
8598
8599
8600
8601
8602
8603
8604
8605 # 1 "/usr/include/gentoo-multilib/amd64/bits/pthreadtypes.h" 1 3 4
8606 # 23 "/usr/include/gentoo-multilib/amd64/bits/pthreadtypes.h" 3 4
8607 # 1 "/usr/include/bits/wordsize.h" 1 3 4
8608
8609
8610
8611
8612
8613
8614
8615 # 1 "/usr/include/gentoo-multilib/amd64/bits/wordsize.h" 1 3 4
8616 # 9 "/usr/include/bits/wordsize.h" 2 3 4
8617 # 24 "/usr/include/gentoo-multilib/amd64/bits/pthreadtypes.h" 2 3 4
8618 # 50 "/usr/include/gentoo-multilib/amd64/bits/pthreadtypes.h" 3 4
8619 typedef unsigned long int pthread_t;
8620
8621
8622 typedef union
8623 {
8624   char __size[56];
8625   long int __align;
8626 } pthread_attr_t;
8627
8628
8629
8630 typedef struct __pthread_internal_list
8631 {
8632   struct __pthread_internal_list *__prev;
8633   struct __pthread_internal_list *__next;
8634 } __pthread_list_t;
8635 # 76 "/usr/include/gentoo-multilib/amd64/bits/pthreadtypes.h" 3 4
8636 typedef union
8637 {
8638   struct __pthread_mutex_s
8639   {
8640     int __lock;
8641     unsigned int __count;
8642     int __owner;
8643
8644     unsigned int __nusers;
8645
8646
8647
8648     int __kind;
8649
8650     int __spins;
8651     __pthread_list_t __list;
8652 # 101 "/usr/include/gentoo-multilib/amd64/bits/pthreadtypes.h" 3 4
8653   } __data;
8654   char __size[40];
8655   long int __align;
8656 } pthread_mutex_t;
8657
8658 typedef union
8659 {
8660   char __size[4];
8661   int __align;
8662 } pthread_mutexattr_t;
8663
8664
8665
8666
8667 typedef union
8668 {
8669   struct
8670   {
8671     int __lock;
8672     unsigned int __futex;
8673     __extension__ unsigned long long int __total_seq;
8674     __extension__ unsigned long long int __wakeup_seq;
8675     __extension__ unsigned long long int __woken_seq;
8676     void *__mutex;
8677     unsigned int __nwaiters;
8678     unsigned int __broadcast_seq;
8679   } __data;
8680   char __size[48];
8681   __extension__ long long int __align;
8682 } pthread_cond_t;
8683
8684 typedef union
8685 {
8686   char __size[4];
8687   int __align;
8688 } pthread_condattr_t;
8689
8690
8691
8692 typedef unsigned int pthread_key_t;
8693
8694
8695
8696 typedef int pthread_once_t;
8697
8698
8699
8700
8701
8702 typedef union
8703 {
8704
8705   struct
8706   {
8707     int __lock;
8708     unsigned int __nr_readers;
8709     unsigned int __readers_wakeup;
8710     unsigned int __writer_wakeup;
8711     unsigned int __nr_readers_queued;
8712     unsigned int __nr_writers_queued;
8713     int __writer;
8714     int __pad1;
8715     unsigned long int __pad2;
8716     unsigned long int __pad3;
8717
8718
8719     unsigned int __flags;
8720   } __data;
8721 # 184 "/usr/include/gentoo-multilib/amd64/bits/pthreadtypes.h" 3 4
8722   char __size[56];
8723   long int __align;
8724 } pthread_rwlock_t;
8725
8726 typedef union
8727 {
8728   char __size[8];
8729   long int __align;
8730 } pthread_rwlockattr_t;
8731
8732
8733
8734
8735
8736 typedef volatile int pthread_spinlock_t;
8737
8738
8739
8740
8741 typedef union
8742 {
8743   char __size[32];
8744   long int __align;
8745 } pthread_barrier_t;
8746
8747 typedef union
8748 {
8749   char __size[4];
8750   int __align;
8751 } pthread_barrierattr_t;
8752 # 9 "/usr/include/bits/pthreadtypes.h" 2 3 4
8753 # 271 "/usr/include/gentoo-multilib/amd64/sys/types.h" 2 3 4
8754
8755
8756 }
8757 # 9 "/usr/include/sys/types.h" 2 3 4
8758 # 439 "/usr/include/gentoo-multilib/amd64/stdlib.h" 2 3 4
8759
8760
8761
8762
8763
8764
8765 extern long int random (void) throw ();
8766
8767
8768 extern void srandom (unsigned int __seed) throw ();
8769
8770
8771
8772
8773
8774 extern char *initstate (unsigned int __seed, char *__statebuf,
8775    size_t __statelen) throw () __attribute__ ((__nonnull__ (2)));
8776
8777
8778
8779 extern char *setstate (char *__statebuf) throw () __attribute__ ((__nonnull__ (1)));
8780
8781
8782
8783
8784
8785
8786
8787 struct random_data
8788   {
8789     int32_t *fptr;
8790     int32_t *rptr;
8791     int32_t *state;
8792     int rand_type;
8793     int rand_deg;
8794     int rand_sep;
8795     int32_t *end_ptr;
8796   };
8797
8798 extern int random_r (struct random_data *__restrict __buf,
8799        int32_t *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2)));
8800
8801 extern int srandom_r (unsigned int __seed, struct random_data *__buf)
8802      throw () __attribute__ ((__nonnull__ (2)));
8803
8804 extern int initstate_r (unsigned int __seed, char *__restrict __statebuf,
8805    size_t __statelen,
8806    struct random_data *__restrict __buf)
8807      throw () __attribute__ ((__nonnull__ (2, 4)));
8808
8809 extern int setstate_r (char *__restrict __statebuf,
8810          struct random_data *__restrict __buf)
8811      throw () __attribute__ ((__nonnull__ (1, 2)));
8812
8813
8814
8815
8816
8817
8818 extern int rand (void) throw ();
8819
8820 extern void srand (unsigned int __seed) throw ();
8821
8822
8823
8824
8825 extern int rand_r (unsigned int *__seed) throw ();
8826
8827
8828
8829
8830
8831
8832
8833 extern double drand48 (void) throw ();
8834 extern double erand48 (unsigned short int __xsubi[3]) throw () __attribute__ ((__nonnull__ (1)));
8835
8836
8837 extern long int lrand48 (void) throw ();
8838 extern long int nrand48 (unsigned short int __xsubi[3])
8839      throw () __attribute__ ((__nonnull__ (1)));
8840
8841
8842 extern long int mrand48 (void) throw ();
8843 extern long int jrand48 (unsigned short int __xsubi[3])
8844      throw () __attribute__ ((__nonnull__ (1)));
8845
8846
8847 extern void srand48 (long int __seedval) throw ();
8848 extern unsigned short int *seed48 (unsigned short int __seed16v[3])
8849      throw () __attribute__ ((__nonnull__ (1)));
8850 extern void lcong48 (unsigned short int __param[7]) throw () __attribute__ ((__nonnull__ (1)));
8851
8852
8853
8854
8855
8856 struct drand48_data
8857   {
8858     unsigned short int __x[3];
8859     unsigned short int __old_x[3];
8860     unsigned short int __c;
8861     unsigned short int __init;
8862     unsigned long long int __a;
8863   };
8864
8865
8866 extern int drand48_r (struct drand48_data *__restrict __buffer,
8867         double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2)));
8868 extern int erand48_r (unsigned short int __xsubi[3],
8869         struct drand48_data *__restrict __buffer,
8870         double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2)));
8871
8872
8873 extern int lrand48_r (struct drand48_data *__restrict __buffer,
8874         long int *__restrict __result)
8875      throw () __attribute__ ((__nonnull__ (1, 2)));
8876 extern int nrand48_r (unsigned short int __xsubi[3],
8877         struct drand48_data *__restrict __buffer,
8878         long int *__restrict __result)
8879      throw () __attribute__ ((__nonnull__ (1, 2)));
8880
8881
8882 extern int mrand48_r (struct drand48_data *__restrict __buffer,
8883         long int *__restrict __result)
8884      throw () __attribute__ ((__nonnull__ (1, 2)));
8885 extern int jrand48_r (unsigned short int __xsubi[3],
8886         struct drand48_data *__restrict __buffer,
8887         long int *__restrict __result)
8888      throw () __attribute__ ((__nonnull__ (1, 2)));
8889
8890
8891 extern int srand48_r (long int __seedval, struct drand48_data *__buffer)
8892      throw () __attribute__ ((__nonnull__ (2)));
8893
8894 extern int seed48_r (unsigned short int __seed16v[3],
8895        struct drand48_data *__buffer) throw () __attribute__ ((__nonnull__ (1, 2)));
8896
8897 extern int lcong48_r (unsigned short int __param[7],
8898         struct drand48_data *__buffer)
8899      throw () __attribute__ ((__nonnull__ (1, 2)));
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909 extern void *malloc (size_t __size) throw () __attribute__ ((__malloc__)) ;
8910
8911 extern void *calloc (size_t __nmemb, size_t __size)
8912      throw () __attribute__ ((__malloc__)) ;
8913
8914
8915
8916
8917
8918
8919
8920 extern void *realloc (void *__ptr, size_t __size)
8921      throw () __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__));
8922
8923 extern void free (void *__ptr) throw ();
8924
8925
8926
8927
8928 extern void cfree (void *__ptr) throw ();
8929
8930
8931
8932 # 1 "/usr/include/alloca.h" 1 3 4
8933
8934
8935
8936
8937
8938
8939
8940 # 1 "/usr/include/gentoo-multilib/amd64/alloca.h" 1 3 4
8941 # 22 "/usr/include/gentoo-multilib/amd64/alloca.h" 3 4
8942 # 1 "/usr/include/features.h" 1 3 4
8943 # 23 "/usr/include/gentoo-multilib/amd64/alloca.h" 2 3 4
8944
8945
8946 # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4
8947 # 26 "/usr/include/gentoo-multilib/amd64/alloca.h" 2 3 4
8948
8949 extern "C" {
8950
8951
8952
8953
8954
8955 extern void *alloca (size_t __size) throw ();
8956
8957
8958
8959
8960
8961 }
8962 # 9 "/usr/include/alloca.h" 2 3 4
8963 # 613 "/usr/include/gentoo-multilib/amd64/stdlib.h" 2 3 4
8964
8965
8966
8967
8968 extern void *valloc (size_t __size) throw () __attribute__ ((__malloc__)) ;
8969
8970
8971
8972
8973 extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size)
8974      throw () __attribute__ ((__nonnull__ (1))) ;
8975
8976
8977
8978
8979 extern void abort (void) throw () __attribute__ ((__noreturn__));
8980
8981
8982
8983 extern int atexit (void (*__func) (void)) throw () __attribute__ ((__nonnull__ (1)));
8984
8985
8986
8987
8988
8989 extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg)
8990      throw () __attribute__ ((__nonnull__ (1)));
8991
8992
8993
8994
8995
8996
8997 extern void exit (int __status) throw () __attribute__ ((__noreturn__));
8998
8999
9000
9001
9002
9003
9004 extern void _Exit (int __status) throw () __attribute__ ((__noreturn__));
9005
9006
9007
9008
9009
9010
9011 extern char *getenv (__const char *__name) throw () __attribute__ ((__nonnull__ (1))) ;
9012
9013
9014
9015
9016 extern char *__secure_getenv (__const char *__name)
9017      throw () __attribute__ ((__nonnull__ (1))) ;
9018
9019
9020
9021
9022
9023 extern int putenv (char *__string) throw () __attribute__ ((__nonnull__ (1)));
9024
9025
9026
9027
9028
9029 extern int setenv (__const char *__name, __const char *__value, int __replace)
9030      throw () __attribute__ ((__nonnull__ (2)));
9031
9032
9033 extern int unsetenv (__const char *__name) throw ();
9034
9035
9036
9037
9038
9039
9040 extern int clearenv (void) throw ();
9041 # 698 "/usr/include/gentoo-multilib/amd64/stdlib.h" 3 4
9042 extern char *mktemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) ;
9043 # 709 "/usr/include/gentoo-multilib/amd64/stdlib.h" 3 4
9044 extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) ;
9045 # 719 "/usr/include/gentoo-multilib/amd64/stdlib.h" 3 4
9046 extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) ;
9047 # 729 "/usr/include/gentoo-multilib/amd64/stdlib.h" 3 4
9048 extern char *mkdtemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) ;
9049
9050
9051
9052
9053
9054
9055
9056
9057 extern int system (__const char *__command) ;
9058
9059
9060
9061
9062
9063
9064 extern char *canonicalize_file_name (__const char *__name)
9065      throw () __attribute__ ((__nonnull__ (1))) ;
9066 # 755 "/usr/include/gentoo-multilib/amd64/stdlib.h" 3 4
9067 extern char *realpath (__const char *__restrict __name,
9068          char *__restrict __resolved) throw () ;
9069
9070
9071
9072
9073
9074
9075 typedef int (*__compar_fn_t) (__const void *, __const void *);
9076
9077
9078 typedef __compar_fn_t comparison_fn_t;
9079
9080
9081
9082
9083
9084
9085 extern void *bsearch (__const void *__key, __const void *__base,
9086         size_t __nmemb, size_t __size, __compar_fn_t __compar)
9087      __attribute__ ((__nonnull__ (1, 2, 5))) ;
9088
9089
9090
9091 extern void qsort (void *__base, size_t __nmemb, size_t __size,
9092      __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4)));
9093
9094
9095
9096 extern int abs (int __x) throw () __attribute__ ((__const__)) ;
9097 extern long int labs (long int __x) throw () __attribute__ ((__const__)) ;
9098
9099
9100
9101 __extension__ extern long long int llabs (long long int __x)
9102      throw () __attribute__ ((__const__)) ;
9103
9104
9105
9106
9107
9108
9109
9110 extern div_t div (int __numer, int __denom)
9111      throw () __attribute__ ((__const__)) ;
9112 extern ldiv_t ldiv (long int __numer, long int __denom)
9113      throw () __attribute__ ((__const__)) ;
9114
9115
9116
9117
9118 __extension__ extern lldiv_t lldiv (long long int __numer,
9119         long long int __denom)
9120      throw () __attribute__ ((__const__)) ;
9121
9122 # 820 "/usr/include/gentoo-multilib/amd64/stdlib.h" 3 4
9123 extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt,
9124      int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) ;
9125
9126
9127
9128
9129 extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt,
9130      int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) ;
9131
9132
9133
9134
9135 extern char *gcvt (double __value, int __ndigit, char *__buf)
9136      throw () __attribute__ ((__nonnull__ (3))) ;
9137
9138
9139
9140
9141 extern char *qecvt (long double __value, int __ndigit,
9142       int *__restrict __decpt, int *__restrict __sign)
9143      throw () __attribute__ ((__nonnull__ (3, 4))) ;
9144 extern char *qfcvt (long double __value, int __ndigit,
9145       int *__restrict __decpt, int *__restrict __sign)
9146      throw () __attribute__ ((__nonnull__ (3, 4))) ;
9147 extern char *qgcvt (long double __value, int __ndigit, char *__buf)
9148      throw () __attribute__ ((__nonnull__ (3))) ;
9149
9150
9151
9152
9153 extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt,
9154      int *__restrict __sign, char *__restrict __buf,
9155      size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5)));
9156 extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
9157      int *__restrict __sign, char *__restrict __buf,
9158      size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5)));
9159
9160 extern int qecvt_r (long double __value, int __ndigit,
9161       int *__restrict __decpt, int *__restrict __sign,
9162       char *__restrict __buf, size_t __len)
9163      throw () __attribute__ ((__nonnull__ (3, 4, 5)));
9164 extern int qfcvt_r (long double __value, int __ndigit,
9165       int *__restrict __decpt, int *__restrict __sign,
9166       char *__restrict __buf, size_t __len)
9167      throw () __attribute__ ((__nonnull__ (3, 4, 5)));
9168
9169
9170
9171
9172
9173
9174
9175 extern int mblen (__const char *__s, size_t __n) throw () ;
9176
9177
9178 extern int mbtowc (wchar_t *__restrict __pwc,
9179      __const char *__restrict __s, size_t __n) throw () ;
9180
9181
9182 extern int wctomb (char *__s, wchar_t __wchar) throw () ;
9183
9184
9185
9186 extern size_t mbstowcs (wchar_t *__restrict __pwcs,
9187    __const char *__restrict __s, size_t __n) throw ();
9188
9189 extern size_t wcstombs (char *__restrict __s,
9190    __const wchar_t *__restrict __pwcs, size_t __n)
9191      throw ();
9192
9193
9194
9195
9196
9197
9198
9199
9200 extern int rpmatch (__const char *__response) throw () __attribute__ ((__nonnull__ (1))) ;
9201 # 908 "/usr/include/gentoo-multilib/amd64/stdlib.h" 3 4
9202 extern int getsubopt (char **__restrict __optionp,
9203         char *__const *__restrict __tokens,
9204         char **__restrict __valuep)
9205      throw () __attribute__ ((__nonnull__ (1, 2, 3))) ;
9206
9207
9208
9209
9210
9211 extern void setkey (__const char *__key) throw () __attribute__ ((__nonnull__ (1)));
9212
9213
9214
9215
9216
9217
9218
9219 extern int posix_openpt (int __oflag) ;
9220
9221
9222
9223
9224
9225
9226
9227 extern int grantpt (int __fd) throw ();
9228
9229
9230
9231 extern int unlockpt (int __fd) throw ();
9232
9233
9234
9235
9236 extern char *ptsname (int __fd) throw () ;
9237
9238
9239
9240
9241
9242
9243 extern int ptsname_r (int __fd, char *__buf, size_t __buflen)
9244      throw () __attribute__ ((__nonnull__ (2)));
9245
9246
9247 extern int getpt (void);
9248
9249
9250
9251
9252
9253
9254 extern int getloadavg (double __loadavg[], int __nelem)
9255      throw () __attribute__ ((__nonnull__ (1)));
9256 # 976 "/usr/include/gentoo-multilib/amd64/stdlib.h" 3 4
9257 }
9258 # 9 "/usr/include/stdlib.h" 2 3 4
9259 # 52 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qvector.h" 2
9260 # 1 "/usr/include/string.h" 1 3 4
9261 # 53 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qvector.h" 2
9262
9263
9264
9265 typedef QtValidLicenseForCoreModule QtCoreModule;
9266
9267 struct QVectorData
9268 {
9269     QBasicAtomic ref;
9270     int alloc;
9271     int size;
9272
9273
9274
9275
9276
9277     uint sharable : 1;
9278     uint capacity : 1;
9279
9280
9281     static QVectorData shared_null;
9282     static QVectorData *malloc(int sizeofTypedData, int size, int sizeofT, QVectorData *init);
9283     static int grow(int sizeofTypedData, int size, int sizeofT, bool excessive);
9284 };
9285
9286 template <typename T>
9287 struct QVectorTypedData
9288 {
9289     QBasicAtomic ref;
9290     int alloc;
9291     int size;
9292
9293
9294
9295
9296
9297     uint sharable : 1;
9298     uint capacity : 1;
9299
9300     T array[1];
9301 };
9302
9303 template <typename T>
9304 class QVector
9305 {
9306     typedef QVectorTypedData<T> Data;
9307     union { QVectorData *p; QVectorTypedData<T> *d; };
9308
9309 public:
9310     inline QVector() : p(&QVectorData::shared_null) { d->ref.ref(); }
9311     explicit QVector(int size);
9312     QVector(int size, const T &t);
9313     inline QVector(const QVector<T> &v) : d(v.d) { d->ref.ref(); if (!d->sharable) detach_helper(); }
9314     inline ~QVector() { if (!d) return; if (!d->ref.deref()) free(d); }
9315     QVector<T> &operator=(const QVector<T> &v);
9316     bool operator==(const QVector<T> &v) const;
9317     inline bool operator!=(const QVector<T> &v) const { return !(*this == v); }
9318
9319     inline int size() const { return d->size; }
9320
9321     inline bool isEmpty() const { return d->size == 0; }
9322
9323     void resize(int size);
9324
9325     inline int capacity() const { return d->alloc; }
9326     void reserve(int size);
9327     inline void squeeze() { realloc(d->size, d->size); d->capacity = 0; }
9328
9329     inline void detach() { if (d->ref != 1) detach_helper(); }
9330     inline bool isDetached() const { return d->ref == 1; }
9331     inline void setSharable(bool sharable) { if (!sharable) detach(); d->sharable = sharable; }
9332
9333     inline T *data() { detach(); return d->array; }
9334     inline const T *data() const { return d->array; }
9335     inline const T *constData() const { return d->array; }
9336     void clear();
9337
9338     const T &at(int i) const;
9339     T &operator[](int i);
9340     const T &operator[](int i) const;
9341     void append(const T &t);
9342     void prepend(const T &t);
9343     void insert(int i, const T &t);
9344     void insert(int i, int n, const T &t);
9345     void replace(int i, const T &t);
9346     void remove(int i);
9347     void remove(int i, int n);
9348
9349     QVector<T> &fill(const T &t, int size = -1);
9350
9351     int indexOf(const T &t, int from = 0) const;
9352     int lastIndexOf(const T &t, int from = -1) const;
9353     bool contains(const T &t) const;
9354     int count(const T &t) const;
9355 # 216 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qvector.h"
9356     typedef T* iterator;
9357     typedef const T* const_iterator;
9358
9359     inline iterator begin() { detach(); return d->array; }
9360     inline const_iterator begin() const { return d->array; }
9361     inline const_iterator constBegin() const { return d->array; }
9362     inline iterator end() { detach(); return d->array + d->size; }
9363     inline const_iterator end() const { return d->array + d->size; }
9364     inline const_iterator constEnd() const { return d->array + d->size; }
9365     iterator insert(iterator before, int n, const T &x);
9366     inline iterator insert(iterator before, const T &x) { return insert(before, 1, x); }
9367     iterator erase(iterator begin, iterator end);
9368     inline iterator erase(iterator pos) { return erase(pos, pos+1); }
9369
9370
9371     inline int count() const { return d->size; }
9372     inline T& first() { do {if(!(!isEmpty()))qt_assert("!isEmpty()","/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qvector.h",232);} while (0); return *begin(); }
9373     inline const T &first() const { do {if(!(!isEmpty()))qt_assert("!isEmpty()","/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qvector.h",233);} while (0); return *begin(); }
9374     inline T& last() { do {if(!(!isEmpty()))qt_assert("!isEmpty()","/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qvector.h",234);} while (0); return *(end()-1); }
9375     inline const T &last() const { do {if(!(!isEmpty()))qt_assert("!isEmpty()","/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qvector.h",235);} while (0); return *(end()-1); }
9376     QVector<T> mid(int pos, int length = -1) const;
9377
9378     T value(int i) const;
9379     T value(int i, const T &defaultValue) const;
9380
9381
9382     typedef T value_type;
9383     typedef value_type* pointer;
9384     typedef const value_type* const_pointer;
9385     typedef value_type& reference;
9386     typedef const value_type& const_reference;
9387
9388
9389
9390     typedef int difference_type;
9391
9392     typedef iterator Iterator;
9393     typedef const_iterator ConstIterator;
9394     typedef int size_type;
9395     inline void push_back(const T &t) { append(t); }
9396     inline void push_front(const T &t) { prepend(t); }
9397     void pop_back() { do {if(!(!isEmpty()))qt_assert("!isEmpty()","/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qvector.h",257);} while (0); erase(end()-1); }
9398     void pop_front() { do {if(!(!isEmpty()))qt_assert("!isEmpty()","/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qvector.h",258);} while (0); erase(begin()); }
9399     inline bool empty() const
9400     { return d->size == 0; }
9401     inline T& front() { return first(); }
9402     inline const_reference front() const { return first(); }
9403     inline reference back() { return last(); }
9404     inline const_reference back() const { return last(); }
9405
9406
9407     QVector<T> &operator+=(const QVector<T> &l);
9408     inline QVector<T> operator+(const QVector<T> &l) const
9409     { QVector n = *this; n += l; return n; }
9410     inline QVector<T> &operator+=(const T &t)
9411     { append(t); return *this; }
9412     inline QVector<T> &operator<< (const T &t)
9413     { append(t); return *this; }
9414     inline QVector<T> &operator<<(const QVector<T> &l)
9415     { *this += l; return *this; }
9416
9417     QList<T> toList() const;
9418
9419     static QVector<T> fromList(const QList<T> &list);
9420 # 288 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qvector.h"
9421 private:
9422     void detach_helper();
9423     QVectorData *malloc(int alloc);
9424     void realloc(int size, int alloc);
9425     void free(Data *d);
9426 };
9427
9428 template <typename T>
9429 void QVector<T>::detach_helper()
9430 { realloc(d->size, d->alloc); }
9431 template <typename T>
9432 void QVector<T>::reserve(int asize)
9433 { if (asize > d->alloc) realloc(d->size, asize); d->capacity = 1; }
9434 template <typename T>
9435 void QVector<T>::resize(int asize)
9436 { realloc(asize, (asize > d->alloc || (!d->capacity && asize < d->size && asize < (d->alloc >> 1))) ?
9437           QVectorData::grow(sizeof(Data), asize, sizeof(T), QTypeInfo<T>::isStatic)
9438           : d->alloc); }
9439 template <typename T>
9440 inline void QVector<T>::clear()
9441 { *this = QVector<T>(); }
9442 template <typename T>
9443 inline const T &QVector<T>::at(int i) const
9444 { do {if(!(i >= 0 && i < d->size))qt_assert_x("QVector<T>::at", "index out of range","/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qvector.h",311);} while (0);
9445   return d->array[i]; }
9446 template <typename T>
9447 inline const T &QVector<T>::operator[](int i) const
9448 { do {if(!(i >= 0 && i < d->size))qt_assert_x("QVector<T>::operator[]", "index out of range","/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qvector.h",315);} while (0);
9449   return d->array[i]; }
9450 template <typename T>
9451 inline T &QVector<T>::operator[](int i)
9452 { do {if(!(i >= 0 && i < d->size))qt_assert_x("QVector<T>::operator[]", "index out of range","/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qvector.h",319);} while (0);
9453   return data()[i]; }
9454 template <typename T>
9455 inline void QVector<T>::insert(int i, const T &t)
9456 { do {if(!(i >= 0 && i <= d->size))qt_assert_x("QVector<T>::insert", "index out of range","/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qvector.h",323);} while (0);
9457   insert(begin() + i, 1, t); }
9458 template <typename T>
9459 inline void QVector<T>::insert(int i, int n, const T &t)
9460 { do {if(!(i >= 0 && i <= d->size))qt_assert_x("QVector<T>::insert", "index out of range","/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qvector.h",327);} while (0);
9461   insert(begin() + i, n, t); }
9462 template <typename T>
9463 inline void QVector<T>::remove(int i, int n)
9464 { do {if(!(i >= 0 && n >= 0 && i + n <= d->size))qt_assert_x("QVector<T>::remove", "index out of range","/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qvector.h",331);} while (0);
9465   erase(begin() + i, begin() + i + n); }
9466 template <typename T>
9467 inline void QVector<T>::remove(int i)
9468 { do {if(!(i >= 0 && i < d->size))qt_assert_x("QVector<T>::remove", "index out of range","/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qvector.h",335);} while (0);
9469   erase(begin() + i, begin() + i + 1); }
9470 template <typename T>
9471 inline void QVector<T>::prepend(const T &t)
9472 { insert(begin(), 1, t); }
9473
9474 template <typename T>
9475 inline void QVector<T>::replace(int i, const T &t)
9476 {
9477     do {if(!(i >= 0 && i < d->size))qt_assert_x("QVector<T>::replace", "index out of range","/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qvector.h",344);} while (0);
9478     const T copy(t);
9479     data()[i] = copy;
9480 }
9481
9482 template <typename T>
9483 QVector<T> &QVector<T>::operator=(const QVector<T> &v)
9484 {
9485     typename QVector::Data *x = v.d;
9486     x->ref.ref();
9487     x = qAtomicSetPtr(&d, x);
9488     if (!x->ref.deref())
9489         free(x);
9490     if (!d->sharable)
9491         detach_helper();
9492     return *this;
9493 }
9494
9495 template <typename T>
9496 inline QVectorData *QVector<T>::malloc(int aalloc)
9497 {
9498     return static_cast<QVectorData *>(qMalloc(sizeof(Data) + (aalloc - 1) * sizeof(T)));
9499 }
9500
9501 template <typename T>
9502 QVector<T>::QVector(int asize)
9503 {
9504     p = malloc(asize);
9505     d->ref.init(1);
9506     d->alloc = d->size = asize;
9507     d->sharable = true;
9508     d->capacity = false;
9509     if (QTypeInfo<T>::isComplex) {
9510         T* b = d->array;
9511         T* i = d->array + d->size;
9512         while (i != b)
9513             new (--i) T;
9514     } else {
9515         qMemSet(d->array, 0, asize * sizeof(T));
9516     }
9517 }
9518
9519 template <typename T>
9520 QVector<T>::QVector(int asize, const T &t)
9521 {
9522     p = malloc(asize);
9523     d->ref.init(1);
9524     d->alloc = d->size = asize;
9525     d->sharable = true;
9526     d->capacity = false;
9527     T* i = d->array + d->size;
9528     while (i != d->array)
9529         new (--i) T(t);
9530 }
9531
9532 template <typename T>
9533 void QVector<T>::free(Data *x)
9534 {
9535     if (QTypeInfo<T>::isComplex) {
9536         T* b = x->array;
9537         T* i = b + x->size;
9538         while (i-- != b)
9539              i->~T();
9540     }
9541     qFree(x);
9542 }
9543
9544 template <typename T>
9545 void QVector<T>::realloc(int asize, int aalloc)
9546 {
9547     T *j, *i, *b;
9548     union { QVectorData *p; Data *d; } x;
9549     x.d = d;
9550
9551     if (QTypeInfo<T>::isComplex && aalloc == d->alloc && d->ref == 1) {
9552
9553         i = d->array + d->size;
9554         j = d->array + asize;
9555         if (i > j) {
9556             while (i-- != j)
9557                 i->~T();
9558         } else {
9559             while (j-- != i)
9560                 new (j) T;
9561         }
9562         d->size = asize;
9563         return;
9564     }
9565
9566     if (aalloc != d->alloc || d->ref != 1) {
9567
9568
9569         if (QTypeInfo<T>::isStatic) {
9570             x.p = malloc(aalloc);
9571         } else if (d->ref != 1) {
9572             x.p = QVectorData::malloc(sizeof(Data), aalloc, sizeof(T), p);
9573         } else {
9574             if (QTypeInfo<T>::isComplex) {
9575
9576
9577                 if (asize < d->size) {
9578                     j = d->array + asize;
9579                     i = d->array + d->size;
9580                     while (i-- != j)
9581                         i->~T();
9582                     i = d->array + asize;
9583                 }
9584             }
9585             x.p = p = static_cast<QVectorData *>(qRealloc(p, sizeof(Data) + (aalloc - 1) * sizeof(T)));
9586         }
9587         x.d->ref.init(1);
9588         x.d->sharable = true;
9589         x.d->capacity = d->capacity;
9590
9591     }
9592     if (QTypeInfo<T>::isComplex) {
9593         if (asize < d->size) {
9594             j = d->array + asize;
9595             i = x.d->array + asize;
9596         } else {
9597
9598             i = x.d->array + asize;
9599             j = x.d->array + d->size;
9600             while (i != j)
9601                 new (--i) T;
9602             j = d->array + d->size;
9603         }
9604         if (i != j) {
9605
9606             b = x.d->array;
9607             while (i != b)
9608                 new (--i) T(*--j);
9609         }
9610     } else if (asize > d->size) {
9611
9612         qMemSet(x.d->array + d->size, 0, (asize - d->size) * sizeof(T));
9613     }
9614     x.d->size = asize;
9615     x.d->alloc = aalloc;
9616     if (d != x.d) {
9617         x.d = qAtomicSetPtr(&d, x.d);
9618         if (!x.d->ref.deref())
9619             free(x.d);
9620     }
9621 }
9622
9623 template<typename T>
9624  T QVector<T>::value(int i) const
9625 {
9626     if (i < 0 || i >= p->size) {
9627         return T();
9628     }
9629     return d->array[i];
9630 }
9631 template<typename T>
9632  T QVector<T>::value(int i, const T &defaultValue) const
9633 {
9634     return ((i < 0 || i >= p->size) ? defaultValue : d->array[i]);
9635 }
9636
9637 template <typename T>
9638 void QVector<T>::append(const T &t)
9639 {
9640     if (d->ref != 1 || d->size + 1 > d->alloc) {
9641         const T copy(t);
9642         realloc(d->size, QVectorData::grow(sizeof(Data), d->size + 1, sizeof(T),
9643                                            QTypeInfo<T>::isStatic));
9644         if (QTypeInfo<T>::isComplex)
9645             new (d->array + d->size) T(copy);
9646         else
9647             d->array[d->size] = copy;
9648     } else {
9649         if (QTypeInfo<T>::isComplex)
9650             new (d->array + d->size) T(t);
9651         else
9652             d->array[d->size] = t;
9653     }
9654     ++d->size;
9655 }
9656
9657 template <typename T>
9658 typename QVector<T>::iterator QVector<T>::insert(iterator before, size_type n, const T &t)
9659 {
9660     int offset = before - d->array;
9661     if (n != 0) {
9662         const T copy(t);
9663         if (d->ref != 1 || d->size + n > d->alloc)
9664             realloc(d->size, QVectorData::grow(sizeof(Data), d->size + n, sizeof(T),
9665                                                QTypeInfo<T>::isStatic));
9666         if (QTypeInfo<T>::isStatic) {
9667             T *b = d->array + d->size;
9668             T *i = d->array + d->size + n;
9669             while (i != b)
9670                 new (--i) T;
9671             i = d->array + d->size;
9672             T *j = i + n;
9673             b = d->array + offset;
9674             while (i != b)
9675                 *--j = *--i;
9676             i = b+n;
9677             while (i != b)
9678                 *--i = copy;
9679         } else {
9680             T *b = d->array + offset;
9681             T *i = b + n;
9682             memmove(i, b, (d->size - offset) * sizeof(T));
9683             while (i != b)
9684                 new (--i) T(copy);
9685         }
9686         d->size += n;
9687     }
9688     return d->array + offset;
9689 }
9690
9691 template <typename T>
9692 typename QVector<T>::iterator QVector<T>::erase(iterator abegin, iterator aend)
9693 {
9694     int f = abegin - d->array;
9695     int l = aend - d->array;
9696     int n = l - f;
9697     detach();
9698     if (QTypeInfo<T>::isComplex) {
9699         qCopy(d->array+l, d->array+d->size, d->array+f);
9700         T *i = d->array+d->size;
9701         T* b = d->array+d->size-n;
9702         while (i != b) {
9703             --i;
9704             i->~T();
9705         }
9706     } else {
9707         memmove(d->array + f, d->array + l, (d->size-l)*sizeof(T));
9708     }
9709     d->size -= n;
9710     return d->array + f;
9711 }
9712
9713 template <typename T>
9714 bool QVector<T>::operator==(const QVector<T> &v) const
9715 {
9716     if (d->size != v.d->size)
9717         return false;
9718     if (d == v.d)
9719         return true;
9720     T* b = d->array;
9721     T* i = b + d->size;
9722     T* j = v.d->array + d->size;
9723     while (i != b)
9724         if (!(*--i == *--j))
9725             return false;
9726     return true;
9727 }
9728
9729 template <typename T>
9730 QVector<T> &QVector<T>::fill(const T &from, int asize)
9731 {
9732     const T copy(from);
9733     resize(asize < 0 ? d->size : asize);
9734     if (d->size) {
9735         T *i = d->array + d->size;
9736         T *b = d->array;
9737         while (i != b)
9738             *--i = copy;
9739     }
9740     return *this;
9741 }
9742
9743 template <typename T>
9744 QVector<T> &QVector<T>::operator+=(const QVector &l)
9745 {
9746     int newSize = d->size + l.d->size;
9747     realloc(d->size, newSize);
9748
9749     T *w = d->array + newSize;
9750     T *i = l.d->array + l.d->size;
9751     T *b = l.d->array;
9752     while (i != b) {
9753         if (QTypeInfo<T>::isComplex)
9754             new (--w) T(*--i);
9755         else
9756             *--w = *--i;
9757     }
9758     d->size = newSize;
9759     return *this;
9760 }
9761
9762 template <typename T>
9763 int QVector<T>::indexOf(const T &t, int from) const
9764 {
9765     if (from < 0)
9766         from = qMax(from + d->size, 0);
9767     if (from < d->size) {
9768         T* n = d->array + from - 1;
9769         T* e = d->array + d->size;
9770         while (++n != e)
9771             if (*n == t)
9772                 return n - d->array;
9773     }
9774     return -1;
9775 }
9776
9777 template <typename T>
9778 int QVector<T>::lastIndexOf(const T &t, int from) const
9779 {
9780     if (from < 0)
9781         from += d->size;
9782     else if (from >= d->size)
9783         from = d->size-1;
9784     if (from >= 0) {
9785         T* b = d->array;
9786         T* n = d->array + from + 1;
9787         while (n != b) {
9788             if (*--n == t)
9789                 return n - b;
9790         }
9791     }
9792     return -1;
9793 }
9794
9795 template <typename T>
9796 bool QVector<T>::contains(const T &t) const
9797 {
9798     T* b = d->array;
9799     T* i = d->array + d->size;
9800     while (i != b)
9801         if (*--i == t)
9802             return true;
9803     return false;
9804 }
9805
9806 template <typename T>
9807 int QVector<T>::count(const T &t) const
9808 {
9809     int c = 0;
9810     T* b = d->array;
9811     T* i = d->array + d->size;
9812     while (i != b)
9813         if (*--i == t)
9814             ++c;
9815     return c;
9816 }
9817
9818 template <typename T>
9819  QVector<T> QVector<T>::mid(int pos, int length) const
9820 {
9821     if (length < 0)
9822         length = size() - pos;
9823     if (pos == 0 && length == size())
9824         return *this;
9825     QVector<T> copy;
9826     if (pos + length > size())
9827         length = size() - pos;
9828     for (int i = pos; i < pos + length; ++i)
9829         copy += at(i);
9830     return copy;
9831 }
9832
9833 template <typename T>
9834  QList<T> QVector<T>::toList() const
9835 {
9836     QList<T> result;
9837     for (int i = 0; i < size(); ++i)
9838         result.append(at(i));
9839     return result;
9840 }
9841
9842 template <typename T>
9843  QVector<T> QList<T>::toVector() const
9844 {
9845     QVector<T> result(size());
9846     for (int i = 0; i < size(); ++i)
9847         result[i] = at(i);
9848     return result;
9849 }
9850
9851 template <typename T>
9852 QVector<T> QVector<T>::fromList(const QList<T> &list)
9853 {
9854     return list.toVector();
9855 }
9856
9857 template <typename T>
9858 QList<T> QList<T>::fromVector(const QVector<T> &vector)
9859 {
9860     return vector.toList();
9861 }
9862
9863 template <class T> class QVectorIterator { typedef typename QVector<T>::const_iterator const_iterator; QVector<T> c; const_iterator i; public: inline QVectorIterator(const QVector<T> &container) : c(container), i(c.constBegin()) {} inline QVectorIterator &operator=(const QVector<T> &container) { c = container; i = c.constBegin(); return *this; } inline void toFront() { i = c.constBegin(); } inline void toBack() { i = c.constEnd(); } inline bool hasNext() const { return i != c.constEnd(); } inline const T &next() { return *i++; } inline const T &peekNext() const { return *i; } inline bool hasPrevious() const { return i != c.constBegin(); } inline const T &previous() { return *--i; } inline const T &peekPrevious() const { const_iterator p = i; return *--p; } inline bool findNext(const T &t) { while (i != c.constEnd()) if (*i++ == t) return true; return false; } inline bool findPrevious(const T &t) { while (i != c.constBegin()) if (*(--i) == t) return true; return false; } };
9864 template <class T> class QMutableVectorIterator { typedef typename QVector<T>::iterator iterator; typedef typename QVector<T>::const_iterator const_iterator; QVector<T> *c; iterator i, n; inline bool item_exists() const { return const_iterator(n) != c->constEnd(); } public: inline QMutableVectorIterator(QVector<T> &container) : c(&container) { c->setSharable(false); i = c->begin(); n = c->end(); } inline ~QMutableVectorIterator() { c->setSharable(true); } inline QMutableVectorIterator &operator=(QVector<T> &container) { c->setSharable(true); c = &container; c->setSharable(false); i = c->begin(); n = c->end(); return *this; } inline void toFront() { i = c->begin(); n = c->end(); } inline void toBack() { i = c->end(); n = i; } inline bool hasNext() const { return c->constEnd() != const_iterator(i); } inline T &next() { n = i++; return *n; } inline T &peekNext() const { return *i; } inline bool hasPrevious() const { return c->constBegin() != const_iterator(i); } inline T &previous() { n = --i; return *n; } inline T &peekPrevious() const { iterator p = i; return *--p; } inline void remove() { if (c->constEnd() != const_iterator(n)) { i = c->erase(n); n = c->end(); } } inline void setValue(const T &t) const { if (c->constEnd() != const_iterator(n)) *n = t; } inline T &value() { do {if(!(item_exists()))qt_assert("item_exists()","/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qvector.h",731);} while (0); return *n; } inline const T &value() const { do {if(!(item_exists()))qt_assert("item_exists()","/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qvector.h",731);} while (0); return *n; } inline void insert(const T &t) { n = i = c->insert(i, t); ++i; } inline bool findNext(const T &t) { while (c->constEnd() != const_iterator(n = i)) if (*i++ == t) return true; return false; } inline bool findPrevious(const T &t) { while (c->constBegin() != const_iterator(i)) if (*(n = --i) == t) return true; n = c->end(); return false; } };
9865 # 754 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qvector.h"
9866
9867 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qvector.h" 2
9868 # 43 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qstack.h" 2
9869
9870
9871
9872 typedef QtValidLicenseForCoreModule QtCoreModule;
9873
9874 template<class T>
9875 class QStack : public QVector<T>
9876 {
9877 public:
9878     inline QStack() {}
9879     inline ~QStack() {}
9880     inline void push(const T &t) { QVector<T>::append(t); }
9881     T pop();
9882     T &top();
9883     const T &top() const;
9884 };
9885
9886 template<class T>
9887 inline T QStack<T>::pop()
9888 { do {if(!(!this->isEmpty()))qt_assert("!this->isEmpty()","/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qstack.h",62);} while (0); T t = this->data()[this->size() -1];
9889   this->resize(this->size()-1); return t; }
9890
9891 template<class T>
9892 inline T &QStack<T>::top()
9893 { do {if(!(!this->isEmpty()))qt_assert("!this->isEmpty()","/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qstack.h",67);} while (0); this->detach(); return this->data()[this->size()-1]; }
9894
9895 template<class T>
9896 inline const T &QStack<T>::top() const
9897 { do {if(!(!this->isEmpty()))qt_assert("!this->isEmpty()","/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qstack.h",71);} while (0); return this->data()[this->size()-1]; }
9898
9899
9900 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qstack.h" 2
9901 # 46 "./project.h" 2
9902 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qmap.h" 1
9903 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qmap.h" 1
9904 # 42 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qmap.h"
9905 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qatomic.h" 1
9906 # 43 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qmap.h" 2
9907 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qiterator.h" 1
9908 # 44 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qmap.h" 2
9909 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qlist.h" 1
9910 # 45 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qmap.h" 2
9911 # 53 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qmap.h"
9912
9913
9914 typedef QtValidLicenseForCoreModule QtCoreModule;
9915
9916 struct QMapData
9917 {
9918     struct Node {
9919         Node *backward;
9920         Node *forward[1];
9921     };
9922     enum { LastLevel = 11, Sparseness = 3 };
9923
9924     QMapData *backward;
9925     QMapData *forward[QMapData::LastLevel + 1];
9926     QBasicAtomic ref;
9927     int topLevel;
9928     int size;
9929     uint randomBits;
9930     uint insertInOrder : 1;
9931     uint sharable : 1;
9932
9933     static QMapData *createData();
9934     void continueFreeData(int offset);
9935     Node *node_create(Node *update[], int offset);
9936     void node_delete(Node *update[], int offset, Node *node);
9937
9938
9939
9940
9941
9942     static QMapData shared_null;
9943 };
9944 # 97 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qmap.h"
9945 template <class Key> inline bool qMapLessThanKey(const Key &key1, const Key &key2)
9946 {
9947     return key1 < key2;
9948 }
9949
9950
9951 template <class Ptr> inline bool qMapLessThanKey(Ptr *key1, Ptr *key2)
9952 {
9953     do {if(!(sizeof(ulong) == sizeof(Ptr *)))qt_assert("sizeof(ulong) == sizeof(Ptr *)","/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qmap.h",105);} while (0);
9954     return reinterpret_cast<ulong>(key1) < reinterpret_cast<ulong>(key2);
9955 }
9956
9957 template <class Ptr> inline bool qMapLessThanKey(const Ptr *key1, const Ptr *key2)
9958 {
9959     do {if(!(sizeof(ulong) == sizeof(const Ptr *)))qt_assert("sizeof(ulong) == sizeof(const Ptr *)","/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qmap.h",111);} while (0);
9960     return reinterpret_cast<ulong>(key1) < reinterpret_cast<ulong>(key2);
9961 }
9962
9963
9964 template <class Key, class T>
9965 class QMap
9966 {
9967     struct Node {
9968         Key key;
9969         T value;
9970         QMapData::Node *backward;
9971         QMapData::Node *forward[1];
9972     };
9973     union {
9974         QMapData *d;
9975         QMapData::Node *e;
9976     };
9977
9978     struct PayloadNode
9979     {
9980         Key key;
9981         T value;
9982         QMapData::Node *backward;
9983     };
9984
9985     static inline int payload() { return sizeof(PayloadNode) - sizeof(QMapData::Node *); }
9986     static inline Node *concrete(QMapData::Node *node) {
9987         return reinterpret_cast<Node *>(reinterpret_cast<char *>(node) - payload());
9988     }
9989
9990 public:
9991     inline QMap() : d(&QMapData::shared_null) { d->ref.ref(); }
9992     inline QMap(const QMap<Key, T> &other) : d(other.d)
9993     { d->ref.ref(); if (!d->sharable) detach(); }
9994     inline ~QMap() { if (!d) return; if (!d->ref.deref()) freeData(d); }
9995
9996     QMap<Key, T> &operator=(const QMap<Key, T> &other);
9997
9998
9999
10000
10001
10002     bool operator==(const QMap<Key, T> &other) const;
10003     inline bool operator!=(const QMap<Key, T> &other) const { return !(*this == other); }
10004
10005     inline int size() const { return d->size; }
10006
10007     inline bool isEmpty() const { return d->size == 0; }
10008
10009     inline void detach() { if (d->ref != 1) detach_helper(); }
10010     inline bool isDetached() const { return d->ref == 1; }
10011     inline void setSharable(bool sharable) { if (!sharable) detach(); d->sharable = sharable; }
10012     inline void setInsertInOrder(bool ordered) { d->insertInOrder = ordered; }
10013
10014     void clear();
10015
10016     int remove(const Key &key);
10017     T take(const Key &key);
10018
10019     bool contains(const Key &key) const;
10020     const Key key(const T &value) const;
10021     const Key key(const T &value, const Key &defaultKey) const;
10022     const T value(const Key &key) const;
10023     const T value(const Key &key, const T &defaultValue) const;
10024     T &operator[](const Key &key);
10025     const T operator[](const Key &key) const;
10026
10027     QList<Key> uniqueKeys() const;
10028     QList<Key> keys() const;
10029     QList<Key> keys(const T &value) const;
10030     QList<T> values() const;
10031     QList<T> values(const Key &key) const;
10032     int count(const Key &key) const;
10033
10034     class const_iterator;
10035
10036     class iterator
10037     {
10038         QMapData::Node *i;
10039
10040     public:
10041         typedef std::bidirectional_iterator_tag iterator_category;
10042         typedef ptrdiff_t difference_type;
10043         typedef T value_type;
10044         typedef T *pointer;
10045         typedef T &reference;
10046
10047
10048         inline operator QMapData::Node *() const { return i; }
10049         inline iterator() : i(0) { }
10050         inline iterator(QMapData::Node *node) : i(node) { }
10051
10052         inline const Key &key() const { return concrete(i)->key; }
10053         inline T &value() const { return concrete(i)->value; }
10054
10055
10056
10057         inline T &operator*() const { return concrete(i)->value; }
10058         inline T *operator->() const { return &concrete(i)->value; }
10059         inline bool operator==(const iterator &o) const { return i == o.i; }
10060         inline bool operator!=(const iterator &o) const { return i != o.i; }
10061
10062         inline iterator &operator++() {
10063             i = i->forward[0];
10064             return *this;
10065         }
10066         inline iterator operator++(int) {
10067             iterator r = *this;
10068             i = i->forward[0];
10069             return r;
10070         }
10071         inline iterator &operator--() {
10072             i = i->backward;
10073             return *this;
10074         }
10075         inline iterator operator--(int) {
10076             iterator r = *this;
10077             i = i->backward;
10078             return r;
10079         }
10080         inline iterator operator+(int j) const
10081         { iterator r = *this; if (j > 0) while (j--) ++r; else while (j++) --r; return r; }
10082         inline iterator operator-(int j) const { return operator+(-j); }
10083         inline iterator &operator+=(int j) { return *this = *this + j; }
10084         inline iterator &operator-=(int j) { return *this = *this - j; }
10085
10086
10087
10088
10089
10090     public:
10091
10092         inline bool operator==(const const_iterator &o) const
10093             { return i == reinterpret_cast<const iterator &>(o).i; }
10094         inline bool operator!=(const const_iterator &o) const
10095             { return i != reinterpret_cast<const iterator &>(o).i; }
10096
10097     private:
10098
10099         inline operator bool() const { return false; }
10100     };
10101     friend class iterator;
10102
10103     class const_iterator
10104     {
10105         QMapData::Node *i;
10106
10107     public:
10108         typedef std::bidirectional_iterator_tag iterator_category;
10109         typedef ptrdiff_t difference_type;
10110         typedef T value_type;
10111         typedef const T *pointer;
10112         typedef const T &reference;
10113
10114
10115         inline operator QMapData::Node *() const { return i; }
10116         inline const_iterator() : i(0) { }
10117         inline const_iterator(QMapData::Node *node) : i(node) { }
10118
10119
10120
10121         inline const_iterator(const iterator &o)
10122
10123         { i = reinterpret_cast<const const_iterator &>(o).i; }
10124
10125         inline const Key &key() const { return concrete(i)->key; }
10126         inline const T &value() const { return concrete(i)->value; }
10127
10128
10129
10130         inline const T &operator*() const { return concrete(i)->value; }
10131         inline const T *operator->() const { return &concrete(i)->value; }
10132         inline bool operator==(const const_iterator &o) const { return i == o.i; }
10133         inline bool operator!=(const const_iterator &o) const { return i != o.i; }
10134
10135         inline const_iterator &operator++() {
10136             i = i->forward[0];
10137             return *this;
10138         }
10139         inline const_iterator operator++(int) {
10140             const_iterator r = *this;
10141             i = i->forward[0];
10142             return r;
10143         }
10144         inline const_iterator &operator--() {
10145             i = i->backward;
10146             return *this;
10147         }
10148         inline const_iterator operator--(int) {
10149             const_iterator r = *this;
10150             i = i->backward;
10151             return r;
10152         }
10153         inline const_iterator operator+(int j) const
10154         { const_iterator r = *this; if (j > 0) while (j--) ++r; else while (j++) --r; return r; }
10155         inline const_iterator operator-(int j) const { return operator+(-j); }
10156         inline const_iterator &operator+=(int j) { return *this = *this + j; }
10157         inline const_iterator &operator-=(int j) { return *this = *this - j; }
10158 # 318 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qmap.h"
10159     private:
10160
10161         inline operator bool() const { return false; }
10162     };
10163     friend class const_iterator;
10164
10165
10166     inline iterator begin() { detach(); return iterator(e->forward[0]); }
10167     inline const_iterator begin() const { return const_iterator(e->forward[0]); }
10168     inline const_iterator constBegin() const { return const_iterator(e->forward[0]); }
10169     inline iterator end() {
10170         detach();
10171         return iterator(e);
10172     }
10173     inline const_iterator end() const { return const_iterator(e); }
10174     inline const_iterator constEnd() const { return const_iterator(e); }
10175     iterator erase(iterator it);
10176
10177
10178
10179
10180
10181
10182     typedef iterator Iterator;
10183     typedef const_iterator ConstIterator;
10184     inline int count() const { return d->size; }
10185     iterator find(const Key &key);
10186     const_iterator find(const Key &key) const;
10187     const_iterator constFind(const Key &key) const;
10188     iterator lowerBound(const Key &key);
10189     const_iterator lowerBound(const Key &key) const;
10190     iterator upperBound(const Key &key);
10191     const_iterator upperBound(const Key &key) const;
10192     iterator insert(const Key &key, const T &value);
10193
10194
10195
10196     iterator insertMulti(const Key &key, const T &value);
10197
10198
10199
10200     QMap<Key, T> &unite(const QMap<Key, T> &other);
10201
10202
10203     typedef Key key_type;
10204     typedef T mapped_type;
10205     typedef ptrdiff_t difference_type;
10206     typedef int size_type;
10207     inline bool empty() const { return isEmpty(); }
10208
10209
10210
10211
10212
10213 private:
10214     void detach_helper();
10215     void freeData(QMapData *d);
10216     QMapData::Node *findNode(const Key &key) const;
10217     QMapData::Node *mutableFindNode(QMapData::Node *update[], const Key &key) const;
10218     QMapData::Node *node_create(QMapData *d, QMapData::Node *update[], const Key &key,
10219                                 const T &value);
10220 };
10221
10222 template <class Key, class T>
10223 inline QMap<Key, T> &QMap<Key, T>::operator=(const QMap<Key, T> &other)
10224 {
10225     if (d != other.d) {
10226         QMapData *x = other.d;
10227         x->ref.ref();
10228         x = qAtomicSetPtr(&d, x);
10229         if (!x->ref.deref())
10230             freeData(x);
10231         if (!d->sharable)
10232             detach_helper();
10233     }
10234     return *this;
10235 }
10236
10237 template <class Key, class T>
10238 inline void QMap<Key, T>::clear()
10239 {
10240     *this = QMap<Key, T>();
10241 }
10242
10243 template <class Key, class T>
10244 inline typename QMapData::Node *
10245 QMap<Key, T>::node_create(QMapData *adt, QMapData::Node *aupdate[], const Key &akey, const T &avalue)
10246 {
10247     QMapData::Node *abstractNode = adt->node_create(aupdate, payload());
10248     Node *concreteNode = concrete(abstractNode);
10249     new (&concreteNode->key) Key(akey);
10250     new (&concreteNode->value) T(avalue);
10251     return abstractNode;
10252 }
10253
10254 template <class Key, class T>
10255 inline QMapData::Node *QMap<Key, T>::findNode(const Key &akey) const
10256 {
10257     QMapData::Node *cur = e;
10258     QMapData::Node *next = e;
10259
10260     for (int i = d->topLevel; i >= 0; i--) {
10261         while ((next = cur->forward[i]) != e && qMapLessThanKey<Key>(concrete(next)->key, akey))
10262             cur = next;
10263     }
10264
10265     if (next != e && !qMapLessThanKey<Key>(akey, concrete(next)->key)) {
10266         return next;
10267     } else {
10268         return e;
10269     }
10270 }
10271
10272 template <class Key, class T>
10273 inline const T QMap<Key, T>::value(const Key &akey) const
10274 {
10275     QMapData::Node *node;
10276     if (d->size == 0 || (node = findNode(akey)) == e) {
10277         return T();
10278     } else {
10279         return concrete(node)->value;
10280     }
10281 }
10282
10283 template <class Key, class T>
10284 inline const T QMap<Key, T>::value(const Key &akey, const T &adefaultValue) const
10285 {
10286     QMapData::Node *node;
10287     if (d->size == 0 || (node = findNode(akey)) == e) {
10288         return adefaultValue;
10289     } else {
10290         return concrete(node)->value;
10291     }
10292 }
10293
10294 template <class Key, class T>
10295 inline const T QMap<Key, T>::operator[](const Key &akey) const
10296 {
10297     return value(akey);
10298 }
10299
10300 template <class Key, class T>
10301 inline T &QMap<Key, T>::operator[](const Key &akey)
10302 {
10303     detach();
10304
10305     QMapData::Node *update[QMapData::LastLevel + 1];
10306     QMapData::Node *node = mutableFindNode(update, akey);
10307     if (node == e)
10308         node = node_create(d, update, akey, T());
10309     return concrete(node)->value;
10310 }
10311
10312 template <class Key, class T>
10313 inline int QMap<Key, T>::count(const Key &akey) const
10314 {
10315     int cnt = 0;
10316     QMapData::Node *node = findNode(akey);
10317     if (node != e) {
10318         do {
10319             ++cnt;
10320             node = node->forward[0];
10321         } while (node != e && !qMapLessThanKey<Key>(akey, concrete(node)->key));
10322     }
10323     return cnt;
10324 }
10325
10326 template <class Key, class T>
10327 inline bool QMap<Key, T>::contains(const Key &akey) const
10328 {
10329     return findNode(akey) != e;
10330 }
10331
10332 template <class Key, class T>
10333 inline typename QMap<Key, T>::iterator QMap<Key, T>::insert(const Key &akey,
10334                                                                        const T &avalue)
10335 {
10336     detach();
10337
10338     QMapData::Node *update[QMapData::LastLevel + 1];
10339     QMapData::Node *node = mutableFindNode(update, akey);
10340     if (node == e) {
10341         node = node_create(d, update, akey, avalue);
10342     } else {
10343         concrete(node)->value = avalue;
10344     }
10345     return iterator(node);
10346 }
10347 # 527 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qmap.h"
10348 template <class Key, class T>
10349 inline typename QMap<Key, T>::iterator QMap<Key, T>::insertMulti(const Key &akey,
10350                                                                             const T &avalue)
10351 {
10352     detach();
10353
10354     QMapData::Node *update[QMapData::LastLevel + 1];
10355     mutableFindNode(update, akey);
10356     return iterator(node_create(d, update, akey, avalue));
10357 }
10358
10359 template <class Key, class T>
10360 inline typename QMap<Key, T>::const_iterator QMap<Key, T>::find(const Key &akey) const
10361 {
10362     return const_iterator(findNode(akey));
10363 }
10364
10365 template <class Key, class T>
10366 inline typename QMap<Key, T>::const_iterator QMap<Key, T>::constFind(const Key &akey) const
10367 {
10368     return const_iterator(findNode(akey));
10369 }
10370
10371 template <class Key, class T>
10372 inline typename QMap<Key, T>::iterator QMap<Key, T>::find(const Key &akey)
10373 {
10374     detach();
10375     return iterator(findNode(akey));
10376 }
10377
10378 template <class Key, class T>
10379 inline QMap<Key, T> &QMap<Key, T>::unite(const QMap<Key, T> &other)
10380 {
10381     QMap<Key, T> copy(other);
10382     const_iterator it = copy.constEnd();
10383     const const_iterator b = copy.constBegin();
10384     while (it != b) {
10385         --it;
10386         insertMulti(it.key(), it.value());
10387     }
10388     return *this;
10389 }
10390
10391 template <class Key, class T>
10392  void QMap<Key, T>::freeData(QMapData *x)
10393 {
10394     if (QTypeInfo<Key>::isComplex || QTypeInfo<T>::isComplex) {
10395         QMapData::Node *y = reinterpret_cast<QMapData::Node *>(x);
10396         QMapData::Node *cur = y;
10397         QMapData::Node *next = cur->forward[0];
10398         while (next != y) {
10399             cur = next;
10400             next = cur->forward[0];
10401
10402
10403
10404             Node *concreteNode = concrete(cur);
10405             concreteNode->key.~Key();
10406             concreteNode->value.~T();
10407
10408
10409
10410         }
10411     }
10412     x->continueFreeData(payload());
10413 }
10414
10415 template <class Key, class T>
10416  int QMap<Key, T>::remove(const Key &akey)
10417 {
10418     detach();
10419
10420     QMapData::Node *update[QMapData::LastLevel + 1];
10421     QMapData::Node *cur = e;
10422     QMapData::Node *next = e;
10423     int oldSize = d->size;
10424
10425     for (int i = d->topLevel; i >= 0; i--) {
10426         while ((next = cur->forward[i]) != e && qMapLessThanKey<Key>(concrete(next)->key, akey))
10427             cur = next;
10428         update[i] = cur;
10429     }
10430
10431     if (next != e && !qMapLessThanKey<Key>(akey, concrete(next)->key)) {
10432         bool deleteNext = true;
10433         do {
10434             cur = next;
10435             next = cur->forward[0];
10436             deleteNext = (next != e && !qMapLessThanKey<Key>(concrete(cur)->key, concrete(next)->key));
10437             concrete(cur)->key.~Key();
10438             concrete(cur)->value.~T();
10439             d->node_delete(update, payload(), cur);
10440         } while (deleteNext);
10441     }
10442     return oldSize - d->size;
10443 }
10444
10445 template <class Key, class T>
10446  T QMap<Key, T>::take(const Key &akey)
10447 {
10448     detach();
10449
10450     QMapData::Node *update[QMapData::LastLevel + 1];
10451     QMapData::Node *cur = e;
10452     QMapData::Node *next = e;
10453
10454     for (int i = d->topLevel; i >= 0; i--) {
10455         while ((next = cur->forward[i]) != e && qMapLessThanKey<Key>(concrete(next)->key, akey))
10456             cur = next;
10457         update[i] = cur;
10458     }
10459
10460     if (next != e && !qMapLessThanKey<Key>(akey, concrete(next)->key)) {
10461         T t = concrete(next)->value;
10462         concrete(next)->key.~Key();
10463         concrete(next)->value.~T();
10464         d->node_delete(update, payload(), next);
10465         return t;
10466     }
10467     return T();
10468 }
10469
10470 template <class Key, class T>
10471  typename QMap<Key, T>::iterator QMap<Key, T>::erase(iterator it)
10472 {
10473     QMapData::Node *update[QMapData::LastLevel + 1];
10474     QMapData::Node *cur = e;
10475     QMapData::Node *next = e;
10476
10477     if (it == iterator(e))
10478         return it;
10479
10480     for (int i = d->topLevel; i >= 0; i--) {
10481         while ((next = cur->forward[i]) != e && qMapLessThanKey<Key>(concrete(next)->key, it.key()))
10482             cur = next;
10483         update[i] = cur;
10484     }
10485
10486     while (next != e) {
10487         cur = next;
10488         next = cur->forward[0];
10489         if (cur == it) {
10490             concrete(cur)->key.~Key();
10491             concrete(cur)->value.~T();
10492             d->node_delete(update, payload(), cur);
10493             return iterator(next);
10494         }
10495
10496         for (int i = 0; i <= d->topLevel; ++i) {
10497             if (update[i]->forward[i] != cur)
10498                 break;
10499             update[i] = cur;
10500         }
10501     }
10502     return end();
10503 }
10504
10505 template <class Key, class T>
10506  void QMap<Key, T>::detach_helper()
10507 {
10508     union { QMapData *d; QMapData::Node *e; } x;
10509     x.d = QMapData::createData();
10510     if (d->size) {
10511         x.d->insertInOrder = true;
10512         QMapData::Node *update[QMapData::LastLevel + 1];
10513         QMapData::Node *cur = e->forward[0];
10514         update[0] = x.e;
10515         while (cur != e) {
10516             Node *concreteNode = concrete(cur);
10517             node_create(x.d, update, concreteNode->key, concreteNode->value);
10518             cur = cur->forward[0];
10519         }
10520         x.d->insertInOrder = false;
10521     }
10522     x.d = qAtomicSetPtr(&d, x.d);
10523     if (!x.d->ref.deref())
10524         freeData(x.d);
10525 }
10526
10527 template <class Key, class T>
10528  QMapData::Node *QMap<Key, T>::mutableFindNode(QMapData::Node *aupdate[],
10529                                                                    const Key &akey) const
10530 {
10531     QMapData::Node *cur = e;
10532     QMapData::Node *next = e;
10533
10534     for (int i = d->topLevel; i >= 0; i--) {
10535         while ((next = cur->forward[i]) != e && qMapLessThanKey<Key>(concrete(next)->key, akey))
10536             cur = next;
10537         aupdate[i] = cur;
10538     }
10539     if (next != e && !qMapLessThanKey<Key>(akey, concrete(next)->key)) {
10540         return next;
10541     } else {
10542         return e;
10543     }
10544 }
10545
10546 template <class Key, class T>
10547  QList<Key> QMap<Key, T>::uniqueKeys() const
10548 {
10549     QList<Key> res;
10550     const_iterator i = begin();
10551     if (i != end()) {
10552         for (;;) {
10553             const Key &aKey = i.key();
10554             res.append(aKey);
10555             do {
10556                 if (++i == end())
10557                     goto break_out_of_outer_loop;
10558             } while (!(aKey < i.key()));
10559         }
10560     }
10561 break_out_of_outer_loop:
10562     return res;
10563 }
10564
10565 template <class Key, class T>
10566  QList<Key> QMap<Key, T>::keys() const
10567 {
10568     QList<Key> res;
10569     const_iterator i = begin();
10570     while (i != end()) {
10571         res.append(i.key());
10572         ++i;
10573     }
10574     return res;
10575 }
10576
10577 template <class Key, class T>
10578  QList<Key> QMap<Key, T>::keys(const T &avalue) const
10579 {
10580     QList<Key> res;
10581     const_iterator i = begin();
10582     while (i != end()) {
10583         if (i.value() == avalue)
10584             res.append(i.key());
10585         ++i;
10586     }
10587     return res;
10588 }
10589
10590 template <class Key, class T>
10591  const Key QMap<Key, T>::key(const T &avalue) const
10592 {
10593     return key(avalue, Key());
10594 }
10595
10596 template <class Key, class T>
10597  const Key QMap<Key, T>::key(const T &avalue, const Key &defaultKey) const
10598 {
10599     const_iterator i = begin();
10600     while (i != end()) {
10601         if (i.value() == avalue)
10602             return i.key();
10603         ++i;
10604     }
10605
10606     return defaultKey;
10607 }
10608
10609 template <class Key, class T>
10610  QList<T> QMap<Key, T>::values() const
10611 {
10612     QList<T> res;
10613     const_iterator i = begin();
10614     while (i != end()) {
10615         res.append(i.value());
10616         ++i;
10617     }
10618     return res;
10619 }
10620
10621 template <class Key, class T>
10622  QList<T> QMap<Key, T>::values(const Key &akey) const
10623 {
10624     QList<T> res;
10625     QMapData::Node *node = findNode(akey);
10626     if (node != e) {
10627         do {
10628             res.append(concrete(node)->value);
10629             node = node->forward[0];
10630         } while (node != e && !qMapLessThanKey<Key>(akey, concrete(node)->key));
10631     }
10632     return res;
10633 }
10634
10635 template <class Key, class T>
10636 inline typename QMap<Key, T>::const_iterator
10637 QMap<Key, T>::lowerBound(const Key &akey) const
10638 {
10639     QMapData::Node *update[QMapData::LastLevel + 1];
10640     mutableFindNode(update, akey);
10641     return const_iterator(update[0]->forward[0]);
10642 }
10643
10644 template <class Key, class T>
10645 inline typename QMap<Key, T>::iterator QMap<Key, T>::lowerBound(const Key &akey)
10646 {
10647     detach();
10648     return static_cast<QMapData::Node *>(const_cast<const QMap *>(this)->lowerBound(akey));
10649 }
10650
10651 template <class Key, class T>
10652 inline typename QMap<Key, T>::const_iterator
10653 QMap<Key, T>::upperBound(const Key &akey) const
10654 {
10655     QMapData::Node *update[QMapData::LastLevel + 1];
10656     mutableFindNode(update, akey);
10657     QMapData::Node *node = update[0]->forward[0];
10658     while (node != e && !qMapLessThanKey<Key>(akey, concrete(node)->key))
10659         node = node->forward[0];
10660     return const_iterator(node);
10661 }
10662
10663 template <class Key, class T>
10664 inline typename QMap<Key, T>::iterator QMap<Key, T>::upperBound(const Key &akey)
10665 {
10666     detach();
10667     return static_cast<QMapData::Node *>(const_cast<const QMap *>(this)->upperBound(akey));
10668 }
10669
10670 template <class Key, class T>
10671  bool QMap<Key, T>::operator==(const QMap<Key, T> &other) const
10672 {
10673     if (size() != other.size())
10674         return false;
10675     if (d == other.d)
10676         return true;
10677
10678     const_iterator it1 = begin();
10679     const_iterator it2 = other.begin();
10680
10681     while (it1 != end()) {
10682         if (!(it1.value() == it2.value()) || qMapLessThanKey(it1.key(), it2.key()) || qMapLessThanKey(it2.key(), it1.key()))
10683             return false;
10684         ++it2;
10685         ++it1;
10686     }
10687     return true;
10688 }
10689 # 897 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qmap.h"
10690 template <class Key, class T>
10691 class QMultiMap : public QMap<Key, T>
10692 {
10693 public:
10694     QMultiMap() {}
10695     QMultiMap(const QMap<Key, T> &other) : QMap<Key, T>(other) {}
10696
10697     inline typename QMap<Key, T>::iterator replace(const Key &key, const T &value)
10698     { return QMap<Key, T>::insert(key, value); }
10699     inline typename QMap<Key, T>::iterator insert(const Key &key, const T &value)
10700     { return QMap<Key, T>::insertMulti(key, value); }
10701
10702     inline QMultiMap &operator+=(const QMultiMap &other)
10703     { unite(other); return *this; }
10704     inline QMultiMap operator+(const QMultiMap &other) const
10705     { QMultiMap result = *this; result += other; return result; }
10706
10707
10708     using QMap<Key, T>::contains;
10709     using QMap<Key, T>::remove;
10710     using QMap<Key, T>::count;
10711     using QMap<Key, T>::find;
10712     using QMap<Key, T>::constFind;
10713 # 937 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qmap.h"
10714     bool contains(const Key &key, const T &value) const;
10715
10716     int remove(const Key &key, const T &value);
10717
10718     int count(const Key &key, const T &value) const;
10719
10720     typename QMap<Key, T>::iterator find(const Key &key, const T &value) {
10721         typename QMap<Key, T>::iterator i(find(key));
10722         typename QMap<Key, T>::iterator end(this->end());
10723         while (i != end && !qMapLessThanKey<Key>(key, i.key())) {
10724             if (i.value() == value)
10725                 return i;
10726             ++i;
10727         }
10728         return end;
10729     }
10730     typename QMap<Key, T>::const_iterator find(const Key &key, const T &value) const {
10731         typename QMap<Key, T>::const_iterator i(constFind(key));
10732         typename QMap<Key, T>::const_iterator end(QMap<Key, T>::constEnd());
10733         while (i != end && !qMapLessThanKey<Key>(key, i.key())) {
10734             if (i.value() == value)
10735                 return i;
10736             ++i;
10737         }
10738         return end;
10739     }
10740     typename QMap<Key, T>::const_iterator constFind(const Key &key, const T &value) const
10741         { return find(key, value); }
10742 private:
10743     T &operator[](const Key &key);
10744     const T operator[](const Key &key) const;
10745 };
10746
10747 template <class Key, class T>
10748 inline bool QMultiMap<Key, T>::contains(const Key &key, const T &value) const
10749 {
10750     return constFind(key, value) != QMap<Key, T>::constEnd();
10751 }
10752
10753 template <class Key, class T>
10754 inline int QMultiMap<Key, T>::remove(const Key &key, const T &value)
10755 {
10756     int n = 0;
10757     typename QMap<Key, T>::iterator i(find(key));
10758     typename QMap<Key, T>::const_iterator end(QMap<Key, T>::constEnd());
10759     while (i != end && !qMapLessThanKey<Key>(key, i.key())) {
10760         if (i.value() == value) {
10761             i = erase(i);
10762             ++n;
10763         } else {
10764             ++i;
10765         }
10766     }
10767     return n;
10768 }
10769
10770 template <class Key, class T>
10771 inline int QMultiMap<Key, T>::count(const Key &key, const T &value) const
10772 {
10773     int n = 0;
10774     typename QMap<Key, T>::const_iterator i(constFind(key));
10775     typename QMap<Key, T>::const_iterator end(QMap<Key, T>::constEnd());
10776     while (i != end && !qMapLessThanKey<Key>(key, i.key())) {
10777         if (i.value() == value)
10778             ++n;
10779         ++i;
10780     }
10781     return n;
10782 }
10783
10784 template <class Key, class T> class QMapIterator { typedef typename QMap<Key,T>::const_iterator const_iterator; typedef const_iterator Item; QMap<Key,T> c; const_iterator i, n; inline bool item_exists() const { return n != c.constEnd(); } public: inline QMapIterator(const QMap<Key,T> &container) : c(container), i(c.constBegin()), n(c.constEnd()) {} inline QMapIterator &operator=(const QMap<Key,T> &container) { c = container; i = c.constBegin(); n = c.constEnd(); return *this; } inline void toFront() { i = c.constBegin(); n = c.constEnd(); } inline void toBack() { i = c.constEnd(); n = c.constEnd(); } inline bool hasNext() const { return i != c.constEnd(); } inline Item next() { n = i++; return n; } inline Item peekNext() const { return i; } inline bool hasPrevious() const { return i != c.constBegin(); } inline Item previous() { n = --i; return n; } inline Item peekPrevious() const { const_iterator p = i; return --p; } inline const T &value() const { do {if(!(item_exists()))qt_assert("item_exists()","/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qmap.h",1007);} while (0); return *n; } inline const Key &key() const { do {if(!(item_exists()))qt_assert("item_exists()","/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qmap.h",1007);} while (0); return n.key(); } inline bool findNext(const T &t) { while ((n = i) != c.constEnd()) if (*i++ == t) return true; return false; } inline bool findPrevious(const T &t) { while (i != c.constBegin()) if (*(n = --i) == t) return true; n = c.constEnd(); return false; } };
10785 template <class Key, class T> class QMutableMapIterator { typedef typename QMap<Key,T>::iterator iterator; typedef typename QMap<Key,T>::const_iterator const_iterator; typedef iterator Item; QMap<Key,T> *c; iterator i, n; inline bool item_exists() const { return const_iterator(n) != c->constEnd(); } public: inline QMutableMapIterator(QMap<Key,T> &container) : c(&container) { c->setSharable(false); i = c->begin(); n = c->end(); } inline ~QMutableMapIterator() { c->setSharable(true); } inline QMutableMapIterator &operator=(QMap<Key,T> &container) { c->setSharable(true); c = &container; c->setSharable(false); i = c->begin(); n = c->end(); return *this; } inline void toFront() { i = c->begin(); n = c->end(); } inline void toBack() { i = c->end(); n = c->end(); } inline bool hasNext() const { return const_iterator(i) != c->constEnd(); } inline Item next() { n = i++; return n; } inline Item peekNext() const { return i; } inline bool hasPrevious() const { return const_iterator(i) != c->constBegin(); } inline Item previous() { n = --i; return n; } inline Item peekPrevious() const { iterator p = i; return --p; } inline void remove() { if (const_iterator(n) != c->constEnd()) { i = c->erase(n); n = c->end(); } } inline void setValue(const T &t) { if (const_iterator(n) != c->constEnd()) *n = t; } inline T &value() { do {if(!(item_exists()))qt_assert("item_exists()","/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qmap.h",1008);} while (0); return *n; } inline const T &value() const { do {if(!(item_exists()))qt_assert("item_exists()","/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qmap.h",1008);} while (0); return *n; } inline const Key &key() const { do {if(!(item_exists()))qt_assert("item_exists()","/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qmap.h",1008);} while (0); return n.key(); } inline bool findNext(const T &t) { while (const_iterator(n = i) != c->constEnd()) if (*i++ == t) return true; return false; } inline bool findPrevious(const T &t) { while (const_iterator(i) != c->constBegin()) if (*(n = --i) == t) return true; n = c->end(); return false; } };
10786
10787
10788 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qmap.h" 2
10789 # 47 "./project.h" 2
10790 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qmetatype.h" 1
10791 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/kernel/qmetatype.h" 1
10792 # 42 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/kernel/qmetatype.h"
10793 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qglobal.h" 1
10794 # 43 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/kernel/qmetatype.h" 2
10795 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qatomic.h" 1
10796 # 44 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/kernel/qmetatype.h" 2
10797
10798
10799 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qdatastream.h" 1
10800 # 47 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/kernel/qmetatype.h" 2
10801
10802
10803
10804
10805
10806
10807
10808
10809 typedef QtValidLicenseForCoreModule QtCoreModule;
10810
10811 class QMetaType {
10812 public:
10813     enum Type {
10814
10815         Void = 0, Bool = 1, Int = 2, UInt = 3, LongLong = 4, ULongLong = 5,
10816         Double = 6, QChar = 7, QVariantMap = 8, QVariantList = 9,
10817         QString = 10, QStringList = 11, QByteArray = 12,
10818         QBitArray = 13, QDate = 14, QTime = 15, QDateTime = 16, QUrl = 17,
10819         QLocale = 18, QRect = 19, QRectF = 20, QSize = 21, QSizeF = 22,
10820         QLine = 23, QLineF = 24, QPoint = 25, QPointF = 26, QRegExp = 27,
10821         LastCoreType = 27 ,
10822
10823         FirstGuiType = 63 ,
10824
10825
10826
10827         QFont = 64, QPixmap = 65, QBrush = 66, QColor = 67, QPalette = 68,
10828         QIcon = 69, QImage = 70, QPolygon = 71, QRegion = 72, QBitmap = 73,
10829         QCursor = 74, QSizePolicy = 75, QKeySequence = 76, QPen = 77,
10830         QTextLength = 78, QTextFormat = 79, QMatrix = 80, QTransform = 81,
10831         LastGuiType = 81 ,
10832
10833         FirstCoreExtType = 128 ,
10834         VoidStar = 128, Long = 129, Short = 130, Char = 131, ULong = 132,
10835         UShort = 133, UChar = 134, Float = 135, QObjectStar = 136, QWidgetStar = 137,
10836         LastCoreExtType = 137 ,
10837
10838         User = 256
10839     };
10840
10841     typedef void (*Destructor)(void *);
10842     typedef void *(*Constructor)(const void *);
10843
10844
10845     typedef void (*SaveOperator)(QDataStream &, const void *);
10846     typedef void (*LoadOperator)(QDataStream &, void *);
10847     static void registerStreamOperators(const char *typeName, SaveOperator saveOp,
10848                                         LoadOperator loadOp);
10849
10850     static int registerType(const char *typeName, Destructor destructor,
10851                             Constructor constructor);
10852     static int type(const char *typeName);
10853     static const char *typeName(int type);
10854     static bool isRegistered(int type);
10855     static void *construct(int type, const void *copy = 0);
10856     static void destroy(int type, void *data);
10857
10858
10859     static bool save(QDataStream &stream, int type, const void *data);
10860     static bool load(QDataStream &stream, int type, void *data);
10861
10862 };
10863
10864 template <typename T>
10865 void qMetaTypeDeleteHelper(T *t)
10866 {
10867     delete t;
10868 }
10869
10870 template <typename T>
10871 void *qMetaTypeConstructHelper(const T *t)
10872 {
10873     if (!t)
10874         return new T;
10875     return new T(*static_cast<const T*>(t));
10876 }
10877
10878
10879 template <typename T>
10880 void qMetaTypeSaveHelper(QDataStream &stream, const T *t)
10881 {
10882     stream << *t;
10883 }
10884
10885 template <typename T>
10886 void qMetaTypeLoadHelper(QDataStream &stream, T *t)
10887 {
10888     stream >> *t;
10889 }
10890
10891
10892 template <typename T>
10893 int qRegisterMetaType(const char *typeName
10894
10895     , T * = 0
10896
10897 )
10898 {
10899     typedef void*(*ConstructPtr)(const T*);
10900     ConstructPtr cptr = qMetaTypeConstructHelper<T>;
10901     typedef void(*DeletePtr)(T*);
10902     DeletePtr dptr = qMetaTypeDeleteHelper<T>;
10903
10904     return QMetaType::registerType(typeName, reinterpret_cast<QMetaType::Destructor>(dptr),
10905                                    reinterpret_cast<QMetaType::Constructor>(cptr));
10906 }
10907
10908
10909 template <typename T>
10910 void qRegisterMetaTypeStreamOperators(const char *typeName
10911
10912     , T * = 0
10913
10914 )
10915 {
10916     typedef void(*SavePtr)(QDataStream &, const T *);
10917     typedef void(*LoadPtr)(QDataStream &, T *);
10918     SavePtr sptr = qMetaTypeSaveHelper<T>;
10919     LoadPtr lptr = qMetaTypeLoadHelper<T>;
10920
10921     qRegisterMetaType<T>(typeName);
10922     QMetaType::registerStreamOperators(typeName, reinterpret_cast<QMetaType::SaveOperator>(sptr),
10923                                        reinterpret_cast<QMetaType::LoadOperator>(lptr));
10924 }
10925
10926
10927 template <typename T>
10928 struct QMetaTypeId
10929 {
10930     enum { Defined = 0 };
10931 };
10932
10933 template <typename T>
10934 struct QMetaTypeId2
10935 {
10936     enum { Defined = QMetaTypeId<T>::Defined };
10937     static inline int qt_metatype_id() { return QMetaTypeId<T>::qt_metatype_id(); }
10938 };
10939
10940 template <typename T>
10941 inline int qMetaTypeId(
10942
10943     T * = 0
10944
10945 )
10946 {
10947     return QMetaTypeId2<T>::qt_metatype_id();
10948 }
10949
10950 template <typename T>
10951 inline int qRegisterMetaType(
10952
10953     T * dummy = 0
10954
10955 )
10956 {
10957
10958
10959
10960     return qMetaTypeId(dummy);
10961
10962 }
10963 # 231 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/kernel/qmetatype.h"
10964 class QString;
10965 class QByteArray;
10966 class QChar;
10967 class QStringList;
10968 class QBitArray;
10969 class QDate;
10970 class QTime;
10971 class QDateTime;
10972 class QUrl;
10973 class QLocale;
10974 class QRect;
10975 class QRectF;
10976 class QSize;
10977 class QSizeF;
10978 class QLine;
10979 class QLineF;
10980 class QPoint;
10981 class QPointF;
10982
10983 class QRegExp;
10984
10985 class QWidget;
10986 class QObject;
10987
10988
10989
10990
10991 class QFont;
10992 class QPixmap;
10993 class QBrush;
10994 class QColor;
10995 class QPalette;
10996 class QIcon;
10997 class QImage;
10998 class QPolygon;
10999 class QRegion;
11000 class QBitmap;
11001 class QCursor;
11002 class QSizePolicy;
11003 class QKeySequence;
11004 class QPen;
11005 class QTextLength;
11006 class QTextFormat;
11007 class QMatrix;
11008 class QTransform;
11009
11010 template<> struct QMetaTypeId2<QString> { enum { Defined = 1, MetaType = QMetaType::QString }; static inline int qt_metatype_id() { return QMetaType::QString; } };
11011 template<> struct QMetaTypeId2<int> { enum { Defined = 1, MetaType = QMetaType::Int }; static inline int qt_metatype_id() { return QMetaType::Int; } };
11012 template<> struct QMetaTypeId2<uint> { enum { Defined = 1, MetaType = QMetaType::UInt }; static inline int qt_metatype_id() { return QMetaType::UInt; } };
11013 template<> struct QMetaTypeId2<bool> { enum { Defined = 1, MetaType = QMetaType::Bool }; static inline int qt_metatype_id() { return QMetaType::Bool; } };
11014 template<> struct QMetaTypeId2<double> { enum { Defined = 1, MetaType = QMetaType::Double }; static inline int qt_metatype_id() { return QMetaType::Double; } };
11015 template<> struct QMetaTypeId2<QByteArray> { enum { Defined = 1, MetaType = QMetaType::QByteArray }; static inline int qt_metatype_id() { return QMetaType::QByteArray; } };
11016 template<> struct QMetaTypeId2<QChar> { enum { Defined = 1, MetaType = QMetaType::QChar }; static inline int qt_metatype_id() { return QMetaType::QChar; } };
11017 template<> struct QMetaTypeId2<long> { enum { Defined = 1, MetaType = QMetaType::Long }; static inline int qt_metatype_id() { return QMetaType::Long; } };
11018 template<> struct QMetaTypeId2<short> { enum { Defined = 1, MetaType = QMetaType::Short }; static inline int qt_metatype_id() { return QMetaType::Short; } };
11019 template<> struct QMetaTypeId2<char> { enum { Defined = 1, MetaType = QMetaType::Char }; static inline int qt_metatype_id() { return QMetaType::Char; } };
11020 template<> struct QMetaTypeId2<ulong> { enum { Defined = 1, MetaType = QMetaType::ULong }; static inline int qt_metatype_id() { return QMetaType::ULong; } };
11021 template<> struct QMetaTypeId2<ushort> { enum { Defined = 1, MetaType = QMetaType::UShort }; static inline int qt_metatype_id() { return QMetaType::UShort; } };
11022 template<> struct QMetaTypeId2<uchar> { enum { Defined = 1, MetaType = QMetaType::UChar }; static inline int qt_metatype_id() { return QMetaType::UChar; } };
11023 template<> struct QMetaTypeId2<float> { enum { Defined = 1, MetaType = QMetaType::Float }; static inline int qt_metatype_id() { return QMetaType::Float; } };
11024 template<> struct QMetaTypeId2<QObject *> { enum { Defined = 1, MetaType = QMetaType::QObjectStar }; static inline int qt_metatype_id() { return QMetaType::QObjectStar; } };
11025 template<> struct QMetaTypeId2<QWidget *> { enum { Defined = 1, MetaType = QMetaType::QWidgetStar }; static inline int qt_metatype_id() { return QMetaType::QWidgetStar; } };
11026 template<> struct QMetaTypeId2<void *> { enum { Defined = 1, MetaType = QMetaType::VoidStar }; static inline int qt_metatype_id() { return QMetaType::VoidStar; } };
11027 template<> struct QMetaTypeId2<qlonglong> { enum { Defined = 1, MetaType = QMetaType::LongLong }; static inline int qt_metatype_id() { return QMetaType::LongLong; } };
11028 template<> struct QMetaTypeId2<qulonglong> { enum { Defined = 1, MetaType = QMetaType::ULongLong }; static inline int qt_metatype_id() { return QMetaType::ULongLong; } };
11029 template<> struct QMetaTypeId2<QStringList> { enum { Defined = 1, MetaType = QMetaType::QStringList }; static inline int qt_metatype_id() { return QMetaType::QStringList; } };
11030 template<> struct QMetaTypeId2<QBitArray> { enum { Defined = 1, MetaType = QMetaType::QBitArray }; static inline int qt_metatype_id() { return QMetaType::QBitArray; } };
11031 template<> struct QMetaTypeId2<QDate> { enum { Defined = 1, MetaType = QMetaType::QDate }; static inline int qt_metatype_id() { return QMetaType::QDate; } };
11032 template<> struct QMetaTypeId2<QTime> { enum { Defined = 1, MetaType = QMetaType::QTime }; static inline int qt_metatype_id() { return QMetaType::QTime; } };
11033 template<> struct QMetaTypeId2<QDateTime> { enum { Defined = 1, MetaType = QMetaType::QDateTime }; static inline int qt_metatype_id() { return QMetaType::QDateTime; } };
11034 template<> struct QMetaTypeId2<QUrl> { enum { Defined = 1, MetaType = QMetaType::QUrl }; static inline int qt_metatype_id() { return QMetaType::QUrl; } };
11035 template<> struct QMetaTypeId2<QLocale> { enum { Defined = 1, MetaType = QMetaType::QLocale }; static inline int qt_metatype_id() { return QMetaType::QLocale; } };
11036 template<> struct QMetaTypeId2<QRect> { enum { Defined = 1, MetaType = QMetaType::QRect }; static inline int qt_metatype_id() { return QMetaType::QRect; } };
11037 template<> struct QMetaTypeId2<QRectF> { enum { Defined = 1, MetaType = QMetaType::QRectF }; static inline int qt_metatype_id() { return QMetaType::QRectF; } };
11038 template<> struct QMetaTypeId2<QSize> { enum { Defined = 1, MetaType = QMetaType::QSize }; static inline int qt_metatype_id() { return QMetaType::QSize; } };
11039 template<> struct QMetaTypeId2<QSizeF> { enum { Defined = 1, MetaType = QMetaType::QSizeF }; static inline int qt_metatype_id() { return QMetaType::QSizeF; } };
11040 template<> struct QMetaTypeId2<QLine> { enum { Defined = 1, MetaType = QMetaType::QLine }; static inline int qt_metatype_id() { return QMetaType::QLine; } };
11041 template<> struct QMetaTypeId2<QLineF> { enum { Defined = 1, MetaType = QMetaType::QLineF }; static inline int qt_metatype_id() { return QMetaType::QLineF; } };
11042 template<> struct QMetaTypeId2<QPoint> { enum { Defined = 1, MetaType = QMetaType::QPoint }; static inline int qt_metatype_id() { return QMetaType::QPoint; } };
11043 template<> struct QMetaTypeId2<QPointF> { enum { Defined = 1, MetaType = QMetaType::QPointF }; static inline int qt_metatype_id() { return QMetaType::QPointF; } };
11044
11045 template<> struct QMetaTypeId2<QRegExp> { enum { Defined = 1, MetaType = QMetaType::QRegExp }; static inline int qt_metatype_id() { return QMetaType::QRegExp; } };
11046
11047
11048
11049
11050
11051 template<> struct QMetaTypeId2<QFont> { enum { Defined = 1, MetaType = QMetaType::QFont }; static inline int qt_metatype_id() { return QMetaType::QFont; } };
11052 template<> struct QMetaTypeId2<QPixmap> { enum { Defined = 1, MetaType = QMetaType::QPixmap }; static inline int qt_metatype_id() { return QMetaType::QPixmap; } };
11053 template<> struct QMetaTypeId2<QBrush> { enum { Defined = 1, MetaType = QMetaType::QBrush }; static inline int qt_metatype_id() { return QMetaType::QBrush; } };
11054 template<> struct QMetaTypeId2<QColor> { enum { Defined = 1, MetaType = QMetaType::QColor }; static inline int qt_metatype_id() { return QMetaType::QColor; } };
11055 template<> struct QMetaTypeId2<QPalette> { enum { Defined = 1, MetaType = QMetaType::QPalette }; static inline int qt_metatype_id() { return QMetaType::QPalette; } };
11056 template<> struct QMetaTypeId2<QIcon> { enum { Defined = 1, MetaType = QMetaType::QIcon }; static inline int qt_metatype_id() { return QMetaType::QIcon; } };
11057 template<> struct QMetaTypeId2<QImage> { enum { Defined = 1, MetaType = QMetaType::QImage }; static inline int qt_metatype_id() { return QMetaType::QImage; } };
11058 template<> struct QMetaTypeId2<QPolygon> { enum { Defined = 1, MetaType = QMetaType::QPolygon }; static inline int qt_metatype_id() { return QMetaType::QPolygon; } };
11059 template<> struct QMetaTypeId2<QRegion> { enum { Defined = 1, MetaType = QMetaType::QRegion }; static inline int qt_metatype_id() { return QMetaType::QRegion; } };
11060 template<> struct QMetaTypeId2<QBitmap> { enum { Defined = 1, MetaType = QMetaType::QBitmap }; static inline int qt_metatype_id() { return QMetaType::QBitmap; } };
11061 template<> struct QMetaTypeId2<QCursor> { enum { Defined = 1, MetaType = QMetaType::QCursor }; static inline int qt_metatype_id() { return QMetaType::QCursor; } };
11062 template<> struct QMetaTypeId2<QSizePolicy> { enum { Defined = 1, MetaType = QMetaType::QSizePolicy }; static inline int qt_metatype_id() { return QMetaType::QSizePolicy; } };
11063 template<> struct QMetaTypeId2<QKeySequence> { enum { Defined = 1, MetaType = QMetaType::QKeySequence }; static inline int qt_metatype_id() { return QMetaType::QKeySequence; } };
11064 template<> struct QMetaTypeId2<QPen> { enum { Defined = 1, MetaType = QMetaType::QPen }; static inline int qt_metatype_id() { return QMetaType::QPen; } };
11065 template<> struct QMetaTypeId2<QTextLength> { enum { Defined = 1, MetaType = QMetaType::QTextLength }; static inline int qt_metatype_id() { return QMetaType::QTextLength; } };
11066 template<> struct QMetaTypeId2<QTextFormat> { enum { Defined = 1, MetaType = QMetaType::QTextFormat }; static inline int qt_metatype_id() { return QMetaType::QTextFormat; } };
11067 template<> struct QMetaTypeId2<QMatrix> { enum { Defined = 1, MetaType = QMetaType::QMatrix }; static inline int qt_metatype_id() { return QMetaType::QMatrix; } };
11068 template<> struct QMetaTypeId2<QTransform> { enum { Defined = 1, MetaType = QMetaType::QTransform }; static inline int qt_metatype_id() { return QMetaType::QTransform; } };
11069
11070
11071 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qmetatype.h" 2
11072 # 48 "./project.h" 2
11073
11074
11075
11076
11077 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/src/script/qscriptengine.h" 1
11078 # 42 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/src/script/qscriptengine.h"
11079 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qmetatype.h" 1
11080 # 43 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/src/script/qscriptengine.h" 2
11081
11082
11083
11084 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qvariant.h" 1
11085 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/kernel/qvariant.h" 1
11086 # 42 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/kernel/qvariant.h"
11087 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qatomic.h" 1
11088 # 43 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/kernel/qvariant.h" 2
11089 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qbytearray.h" 1
11090 # 44 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/kernel/qvariant.h" 2
11091 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qlist.h" 1
11092 # 45 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/kernel/qvariant.h" 2
11093 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qmetatype.h" 1
11094 # 46 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/kernel/qvariant.h" 2
11095 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qmap.h" 1
11096 # 47 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/kernel/qvariant.h" 2
11097 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qstring.h" 1
11098 # 48 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/kernel/qvariant.h" 2
11099
11100
11101
11102 typedef QtValidLicenseForCoreModule QtCoreModule;
11103
11104 class QBitArray;
11105 class QDataStream;
11106 class QDate;
11107 class QDateTime;
11108 class QLine;
11109 class QLineF;
11110 class QLocale;
11111 class QMatrix;
11112 class QTransform;
11113 class QStringList;
11114 class QTime;
11115 class QPoint;
11116 class QPointF;
11117 class QSize;
11118 class QSizeF;
11119 class QRect;
11120 class QRectF;
11121
11122 class QRegExp;
11123
11124 class QTextFormat;
11125 class QTextLength;
11126 class QUrl;
11127 class QVariant;
11128 class QVariantComparisonHelper;
11129
11130
11131 template <typename T>
11132 inline QVariant qVariantFromValue(const T &);
11133
11134 template <typename T>
11135 inline void qVariantSetValue(QVariant &, const T &);
11136
11137 template<typename T>
11138 inline T qVariantValue(const QVariant &);
11139
11140 template<typename T>
11141 inline bool qVariantCanConvert(const QVariant &);
11142
11143
11144 class QVariant
11145 {
11146  public:
11147     enum Type {
11148         Invalid = 0,
11149
11150         Bool = 1,
11151         Int = 2,
11152         UInt = 3,
11153         LongLong = 4,
11154         ULongLong = 5,
11155         Double = 6,
11156         Char = 7,
11157         Map = 8,
11158         List = 9,
11159         String = 10,
11160         StringList = 11,
11161         ByteArray = 12,
11162         BitArray = 13,
11163         Date = 14,
11164         Time = 15,
11165         DateTime = 16,
11166         Url = 17,
11167         Locale = 18,
11168         Rect = 19,
11169         RectF = 20,
11170         Size = 21,
11171         SizeF = 22,
11172         Line = 23,
11173         LineF = 24,
11174         Point = 25,
11175         PointF = 26,
11176  RegExp = 27,
11177         LastCoreType = RegExp,
11178
11179
11180
11181
11182
11183         Font = 64,
11184         Pixmap = 65,
11185         Brush = 66,
11186         Color = 67,
11187         Palette = 68,
11188         Icon = 69,
11189         Image = 70,
11190         Polygon = 71,
11191         Region = 72,
11192         Bitmap = 73,
11193         Cursor = 74,
11194         SizePolicy = 75,
11195         KeySequence = 76,
11196         Pen = 77,
11197         TextLength = 78,
11198         TextFormat = 79,
11199         Matrix = 80,
11200         Transform = 81,
11201         LastGuiType = Transform,
11202
11203         UserType = 127,
11204
11205
11206
11207
11208
11209         LastType = 0xffffffff
11210     };
11211
11212     inline QVariant();
11213     ~QVariant();
11214     QVariant(Type type);
11215     QVariant(int typeOrUserType, const void *copy);
11216     QVariant(const QVariant &other);
11217
11218
11219     QVariant(QDataStream &s);
11220
11221
11222     QVariant(int i);
11223     QVariant(uint ui);
11224     QVariant(qlonglong ll);
11225     QVariant(qulonglong ull);
11226     QVariant(bool b);
11227     QVariant(double d);
11228
11229     QVariant(const char *str);
11230
11231
11232     QVariant(const QByteArray &bytearray);
11233     QVariant(const QBitArray &bitarray);
11234     QVariant(const QString &string);
11235     QVariant(const QLatin1String &string);
11236     QVariant(const QStringList &stringlist);
11237     QVariant(const QChar &qchar);
11238     QVariant(const QDate &date);
11239     QVariant(const QTime &time);
11240     QVariant(const QDateTime &datetime);
11241     QVariant(const QList<QVariant> &list);
11242     QVariant(const QMap<QString,QVariant> &map);
11243 # 202 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/kernel/qvariant.h"
11244     QVariant(const QUrl &url);
11245     QVariant(const QLocale &locale);
11246
11247     QVariant(const QRegExp &regExp);
11248
11249     QVariant(Qt::GlobalColor color);
11250
11251     QVariant& operator=(const QVariant &other);
11252
11253     Type type() const;
11254     int userType() const;
11255     const char *typeName() const;
11256
11257     bool canConvert(Type t) const;
11258     bool convert(Type t);
11259 # 225 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/kernel/qvariant.h"
11260     inline bool isValid() const;
11261     bool isNull() const;
11262
11263     void clear();
11264
11265     void detach();
11266     inline bool isDetached() const;
11267
11268     int toInt(bool *ok = 0) const;
11269     uint toUInt(bool *ok = 0) const;
11270     qlonglong toLongLong(bool *ok = 0) const;
11271     qulonglong toULongLong(bool *ok = 0) const;
11272     bool toBool() const;
11273     double toDouble(bool *ok = 0) const;
11274     QByteArray toByteArray() const;
11275     QBitArray toBitArray() const;
11276     QString toString() const;
11277     QStringList toStringList() const;
11278     QChar toChar() const;
11279     QDate toDate() const;
11280     QTime toTime() const;
11281     QDateTime toDateTime() const;
11282     QList<QVariant> toList() const;
11283     QMap<QString, QVariant> toMap() const;
11284 # 260 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/kernel/qvariant.h"
11285     QUrl toUrl() const;
11286     QLocale toLocale() const;
11287
11288     QRegExp toRegExp() const;
11289 # 288 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/kernel/qvariant.h"
11290     void load(QDataStream &ds);
11291     void save(QDataStream &ds) const;
11292
11293     static const char *typeToName(Type type);
11294     static Type nameToType(const char *name);
11295
11296
11297
11298
11299
11300
11301
11302     void *data();
11303     const void *constData() const;
11304     inline const void *data() const { return constData(); }
11305
11306
11307     template<typename T>
11308     inline void setValue(const T &value);
11309
11310     template<typename T>
11311     inline T value() const
11312     { return qVariantValue<T>(*this); }
11313
11314     template<typename T>
11315     static inline QVariant fromValue(const T &value)
11316     { return qVariantFromValue(value); }
11317
11318     template<typename T>
11319     bool canConvert() const
11320     { return qVariantCanConvert<T>(*this); }
11321
11322
11323  public:
11324
11325     struct PrivateShared
11326     {
11327         inline PrivateShared() : ref(1) { }
11328         inline PrivateShared(void *v) : ptr(v), ref(1) { }
11329         void *ptr;
11330         QAtomic ref;
11331     };
11332     struct Private
11333     {
11334         inline Private(): type(Invalid), is_shared(false), is_null(true) { data.ptr = 0; }
11335         inline Private(const Private &other)
11336             : data(other.data), type(other.type),
11337               is_shared(other.is_shared), is_null(other.is_null)
11338         {}
11339         union Data
11340         {
11341             char c;
11342             int i;
11343             uint u;
11344             bool b;
11345             double d;
11346             qlonglong ll;
11347             qulonglong ull;
11348             void *ptr;
11349             PrivateShared *shared;
11350         } data;
11351         uint type : 30;
11352         uint is_shared : 1;
11353         uint is_null : 1;
11354     };
11355  public:
11356     typedef void (*f_construct)(Private *, const void *);
11357     typedef void (*f_clear)(Private *);
11358     typedef bool (*f_null)(const Private *);
11359
11360     typedef void (*f_load)(Private *, QDataStream &);
11361     typedef void (*f_save)(const Private *, QDataStream &);
11362
11363     typedef bool (*f_compare)(const Private *, const Private *);
11364     typedef bool (*f_convert)(const QVariant::Private *d, Type t, void *, bool *);
11365     typedef bool (*f_canConvert)(const QVariant::Private *d, Type t);
11366     typedef void (*f_debugStream)(QDebug, const QVariant &);
11367     struct Handler {
11368         f_construct construct;
11369         f_clear clear;
11370         f_null isNull;
11371
11372         f_load load;
11373         f_save save;
11374
11375         f_compare compare;
11376         f_convert convert;
11377         f_canConvert canConvert;
11378         f_debugStream debugStream;
11379     };
11380
11381
11382     inline bool operator==(const QVariant &v) const
11383     { return cmp(v); }
11384     inline bool operator!=(const QVariant &v) const
11385     { return !cmp(v); }
11386
11387 protected:
11388     friend inline bool qvariant_cast_helper(const QVariant &, QVariant::Type, void *);
11389     friend int qRegisterGuiVariant();
11390     friend int qUnregisterGuiVariant();
11391     friend inline bool operator==(const QVariant &, const QVariantComparisonHelper &);
11392
11393     friend QDebug operator<<(QDebug, const QVariant &);
11394
11395     Private d;
11396
11397     static const Handler *handler;
11398
11399     void create(int type, const void *copy);
11400
11401
11402
11403     bool cmp(const QVariant &other) const;
11404
11405 private:
11406
11407
11408
11409
11410
11411
11412     inline QVariant(bool, int) { do {if(!(false))qt_assert("false","/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/kernel/qvariant.h",410);} while (0); }
11413
11414 public:
11415     typedef Private DataPtr;
11416     inline DataPtr &data_ptr() { return d; }
11417 };
11418
11419 typedef QList<QVariant> QVariantList;
11420 typedef QMap<QString, QVariant> QVariantMap;
11421
11422 template<> struct QMetaTypeId2<QVariantList> { enum { Defined = 1, MetaType = QMetaType::QVariantList }; static inline int qt_metatype_id() { return QMetaType::QVariantList; } };
11423 template<> struct QMetaTypeId2<QVariantMap> { enum { Defined = 1, MetaType = QMetaType::QVariantMap }; static inline int qt_metatype_id() { return QMetaType::QVariantMap; } };
11424
11425 inline bool qvariant_cast_helper(const QVariant &v, QVariant::Type tp, void *ptr)
11426 { return QVariant::handler->convert(&v.d, tp, ptr, 0); }
11427
11428 template <typename T>
11429 inline QVariant qVariantFromValue(const T &t)
11430 {
11431     return QVariant(qMetaTypeId<T>(reinterpret_cast<T *>(0)), &t);
11432 }
11433
11434 template <>
11435 inline QVariant qVariantFromValue(const QVariant &t) { return t; }
11436
11437 template <typename T>
11438 inline void qVariantSetValue(QVariant &v, const T &t)
11439 {
11440     v = QVariant(qMetaTypeId<T>(reinterpret_cast<T *>(0)), &t);
11441 }
11442
11443 inline QVariant::QVariant() {}
11444 inline bool QVariant::isValid() const { return d.type != Invalid; }
11445 # 484 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/kernel/qvariant.h"
11446 template<typename T>
11447 inline void QVariant::setValue(const T &avalue)
11448 { qVariantSetValue(*this, avalue); }
11449
11450
11451
11452  QDataStream& operator>> (QDataStream& s, QVariant& p);
11453  QDataStream& operator<< (QDataStream& s, const QVariant& p);
11454  QDataStream& operator>> (QDataStream& s, QVariant::Type& p);
11455  QDataStream& operator<< (QDataStream& s, const QVariant::Type p);
11456
11457
11458 inline bool QVariant::isDetached() const
11459 { return !d.is_shared || d.data.shared->ref == 1; }
11460 # 508 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/kernel/qvariant.h"
11461 class QVariantComparisonHelper
11462 {
11463 public:
11464     inline QVariantComparisonHelper(const QVariant &var)
11465         : v(&var) {}
11466 private:
11467     friend inline bool operator==(const QVariant &, const QVariantComparisonHelper &);
11468     const QVariant *v;
11469 };
11470
11471 inline bool operator==(const QVariant &v1, const QVariantComparisonHelper &v2)
11472 {
11473     return v1.cmp(*v2.v);
11474 }
11475
11476 inline bool operator!=(const QVariant &v1, const QVariantComparisonHelper &v2)
11477 {
11478     return !operator==(v1, v2);
11479 }
11480 # 556 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/kernel/qvariant.h"
11481 template<typename T> T qvariant_cast(const QVariant &v)
11482 {
11483     const int vid = qMetaTypeId<T>(static_cast<T *>(0));
11484     if (vid == v.userType())
11485         return *reinterpret_cast<const T *>(v.constData());
11486     if (vid < int(QMetaType::User)) {
11487         T t;
11488         if (qvariant_cast_helper(v, QVariant::Type(vid), &t))
11489             return t;
11490     }
11491     return T();
11492 }
11493
11494 template<typename T>
11495 inline T qVariantValue(const QVariant &variant)
11496 { return qvariant_cast<T>(variant); }
11497
11498 template<typename T>
11499 inline bool qVariantCanConvert(const QVariant &variant)
11500 {
11501     return variant.canConvert(static_cast<QVariant::Type>(
11502                 qMetaTypeId<T>(static_cast<T *>(0))));
11503 }
11504
11505
11506 template <> inline bool qIsDetached<QVariant>(QVariant &t) { return t.isDetached(); } template <typename T> inline void qSwap(T &, T &); template <> inline void qSwap<QVariant>(QVariant &value1, QVariant &value2) { const QVariant::DataPtr t = value1.data_ptr(); value1.data_ptr() = value2.data_ptr(); value2.data_ptr() = t; }
11507 template <> class QTypeInfo<QVariant> { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QVariant)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QVariant"; } };
11508
11509
11510  QDebug operator<<(QDebug, const QVariant &);
11511  QDebug operator<<(QDebug, const QVariant::Type);
11512
11513
11514
11515 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qvariant.h" 2
11516 # 47 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/src/script/qscriptengine.h" 2
11517
11518
11519
11520
11521 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qobjectdefs.h" 1
11522 # 52 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/src/script/qscriptengine.h" 2
11523
11524
11525 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtScript/qscriptvalue.h" 1
11526 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtScript/../../src/script/qscriptvalue.h" 1
11527 # 42 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtScript/../../src/script/qscriptvalue.h"
11528 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qstring.h" 1
11529 # 43 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtScript/../../src/script/qscriptvalue.h" 2
11530
11531
11532
11533 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qlist.h" 1
11534 # 47 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtScript/../../src/script/qscriptvalue.h" 2
11535
11536
11537
11538 typedef QtValidLicenseForScriptModule QtScriptModule;
11539
11540 class QScriptValue;
11541 class QScriptEngine;
11542 class QVariant;
11543 class QObject;
11544 struct QMetaObject;
11545 class QDateTime;
11546
11547 class QRegExp;
11548
11549
11550 typedef QList<QScriptValue> QScriptValueList;
11551
11552 typedef double qsreal;
11553
11554 class QScriptValuePrivate;
11555 class QScriptValue
11556 {
11557 public:
11558     enum ResolveFlag {
11559         ResolveLocal = 0x00,
11560         ResolvePrototype = 0x01,
11561         ResolveScope = 0x02,
11562         ResolveFull = ResolvePrototype | ResolveScope
11563     };
11564
11565     typedef QFlags<ResolveFlag> ResolveFlags;
11566
11567     enum PropertyFlag {
11568         ReadOnly = 0x00000001,
11569         Undeletable = 0x00000002,
11570         SkipInEnumeration = 0x00000004,
11571
11572         PropertyGetter = 0x00000008,
11573         PropertySetter = 0x00000010,
11574
11575         QObjectMember = 0x00000020,
11576
11577         KeepExistingFlags = 0x00000800,
11578
11579         UserRange = 0xff000000
11580     };
11581     typedef QFlags<PropertyFlag> PropertyFlags;
11582
11583     enum SpecialValue {
11584         NullValue,
11585         UndefinedValue
11586     };
11587
11588 public:
11589     QScriptValue();
11590     ~QScriptValue();
11591     QScriptValue(const QScriptValue &other);
11592     QScriptValue(QScriptEngine *engine, SpecialValue val);
11593     QScriptValue(QScriptEngine *engine, bool val);
11594     QScriptValue(QScriptEngine *engine, int val);
11595     QScriptValue(QScriptEngine *engine, uint val);
11596     QScriptValue(QScriptEngine *engine, qsreal val);
11597     QScriptValue(QScriptEngine *engine, const QString &val);
11598
11599
11600     QScriptValue(QScriptEngine *engine, const char *val);
11601
11602
11603     QScriptValue &operator=(const QScriptValue &other);
11604
11605     QScriptEngine *engine() const;
11606
11607     bool isValid() const;
11608     bool isBoolean() const;
11609     bool isNumber() const;
11610     bool isFunction() const;
11611     bool isNull() const;
11612     bool isString() const;
11613     bool isUndefined() const;
11614     bool isVariant() const;
11615     bool isQObject() const;
11616     bool isQMetaObject() const;
11617     bool isObject() const;
11618     bool isDate() const;
11619     bool isRegExp() const;
11620     bool isArray() const;
11621     bool isError() const;
11622
11623     QString toString() const;
11624     qsreal toNumber() const;
11625     bool toBoolean() const;
11626     qsreal toInteger() const;
11627     qint32 toInt32() const;
11628     quint32 toUInt32() const;
11629     quint16 toUInt16() const;
11630     QVariant toVariant() const;
11631     QObject *toQObject() const;
11632     const QMetaObject *toQMetaObject() const;
11633     QScriptValue toObject() const;
11634     QDateTime toDateTime() const;
11635
11636     QRegExp toRegExp() const;
11637
11638
11639     bool instanceOf(const QScriptValue &other) const;
11640
11641     bool lessThan(const QScriptValue &other) const;
11642     bool equals(const QScriptValue &other) const;
11643     bool strictlyEquals(const QScriptValue &other) const;
11644
11645     QScriptValue prototype() const;
11646     void setPrototype(const QScriptValue &prototype);
11647
11648     QScriptValue scope() const;
11649     void setScope(const QScriptValue &scope);
11650
11651     QScriptValue property(const QString &name,
11652                           const ResolveFlags &mode = ResolvePrototype) const;
11653     void setProperty(const QString &name, const QScriptValue &value,
11654                      const PropertyFlags &flags = KeepExistingFlags);
11655
11656     QScriptValue property(quint32 arrayIndex,
11657                           const ResolveFlags &mode = ResolvePrototype) const;
11658     void setProperty(quint32 arrayIndex, const QScriptValue &value,
11659                      const PropertyFlags &flags = KeepExistingFlags);
11660
11661     QScriptValue::PropertyFlags propertyFlags(
11662         const QString &name, const ResolveFlags &mode = ResolvePrototype) const;
11663
11664     QScriptValue call(const QScriptValue &thisObject = QScriptValue(),
11665                       const QScriptValueList &args = QScriptValueList());
11666     QScriptValue call(const QScriptValue &thisObject,
11667                       const QScriptValue &arguments);
11668     QScriptValue construct(const QScriptValueList &args = QScriptValueList());
11669     QScriptValue construct(const QScriptValue &arguments);
11670
11671 private:
11672     QScriptValuePrivate *d_ptr;
11673
11674     inline QScriptValuePrivate* d_func() { return reinterpret_cast<QScriptValuePrivate *>(d_ptr); } inline const QScriptValuePrivate* d_func() const { return reinterpret_cast<const QScriptValuePrivate *>(d_ptr); } friend class QScriptValuePrivate;
11675 };
11676
11677 inline QFlags<QScriptValue::ResolveFlags::enum_type> operator|(QScriptValue::ResolveFlags::enum_type f1, QScriptValue::ResolveFlags::enum_type f2) { return QFlags<QScriptValue::ResolveFlags::enum_type>(f1) | f2; } inline QFlags<QScriptValue::ResolveFlags::enum_type> operator|(QScriptValue::ResolveFlags::enum_type f1, QFlags<QScriptValue::ResolveFlags::enum_type> f2) { return f2 | f1; }
11678 inline QFlags<QScriptValue::PropertyFlags::enum_type> operator|(QScriptValue::PropertyFlags::enum_type f1, QScriptValue::PropertyFlags::enum_type f2) { return QFlags<QScriptValue::PropertyFlags::enum_type>(f1) | f2; } inline QFlags<QScriptValue::PropertyFlags::enum_type> operator|(QScriptValue::PropertyFlags::enum_type f1, QFlags<QScriptValue::PropertyFlags::enum_type> f2) { return f2 | f1; }
11679
11680
11681 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtScript/qscriptvalue.h" 2
11682 # 55 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/src/script/qscriptengine.h" 2
11683 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtScript/qscriptcontext.h" 1
11684 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtScript/../../src/script/qscriptcontext.h" 1
11685 # 42 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtScript/../../src/script/qscriptcontext.h"
11686 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qobjectdefs.h" 1
11687 # 43 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtScript/../../src/script/qscriptcontext.h" 2
11688
11689
11690
11691 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtScript/qscriptvalue.h" 1
11692 # 47 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtScript/../../src/script/qscriptcontext.h" 2
11693
11694
11695
11696 typedef QtValidLicenseForScriptModule QtScriptModule;
11697
11698 class QScriptContextPrivate;
11699
11700 class QScriptContext
11701 {
11702 public:
11703     enum ExecutionState {
11704         NormalState,
11705         ExceptionState
11706     };
11707
11708     enum Error {
11709         UnknownError,
11710         ReferenceError,
11711         SyntaxError,
11712         TypeError,
11713         RangeError,
11714         URIError
11715     };
11716
11717     ~QScriptContext();
11718
11719     QScriptContext *parentContext() const;
11720     QScriptEngine *engine() const;
11721
11722     ExecutionState state() const;
11723     QScriptValue callee() const;
11724
11725     int argumentCount() const;
11726     QScriptValue argument(int index) const;
11727     QScriptValue argumentsObject() const;
11728
11729     QScriptValue returnValue() const;
11730     void setReturnValue(const QScriptValue &result);
11731
11732     QScriptValue activationObject() const;
11733     void setActivationObject(const QScriptValue &activation);
11734
11735     QScriptValue thisObject() const;
11736     void setThisObject(const QScriptValue &thisObject);
11737
11738     bool isCalledAsConstructor() const;
11739
11740     QScriptValue throwValue(const QScriptValue &value);
11741     QScriptValue throwError(Error error, const QString &text);
11742     QScriptValue throwError(const QString &text);
11743
11744     QStringList backtrace() const;
11745
11746 private:
11747     QScriptContext();
11748
11749     QScriptContextPrivate *d_ptr;
11750
11751     inline QScriptContextPrivate* d_func() { return reinterpret_cast<QScriptContextPrivate *>(d_ptr); } inline const QScriptContextPrivate* d_func() const { return reinterpret_cast<const QScriptContextPrivate *>(d_ptr); } friend class QScriptContextPrivate;
11752     QScriptContext(const QScriptContext &); QScriptContext &operator=(const QScriptContext &);
11753 };
11754
11755
11756 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtScript/qscriptcontext.h" 2
11757 # 56 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/src/script/qscriptengine.h" 2
11758
11759
11760
11761 typedef QtValidLicenseForScriptModule QtScriptModule;
11762
11763 class QDateTime;
11764 class QScriptEnginePrivate;
11765 # 80 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/src/script/qscriptengine.h"
11766 class QRegExp;
11767
11768
11769
11770 template <typename T>
11771 inline QScriptValue qScriptValueFromValue(QScriptEngine *, const T &);
11772
11773 template <typename T>
11774 inline T qScriptValueToValue(const QScriptValue &);
11775
11776
11777 class QScriptEngine
11778
11779
11780
11781 {
11782
11783
11784
11785 public:
11786     enum ValueOwnership {
11787         QtOwnership,
11788         ScriptOwnership,
11789         AutoOwnership
11790     };
11791
11792     enum QObjectWrapOption {
11793         ExcludeChildObjects = 0x0001,
11794         ExcludeSuperClassMethods = 0x0002,
11795         ExcludeSuperClassProperties = 0x0004,
11796
11797         AutoCreateDynamicProperties = 0x0100
11798     };
11799     typedef QFlags<QObjectWrapOption> QObjectWrapOptions;
11800
11801     QScriptEngine();
11802
11803
11804
11805     virtual ~QScriptEngine();
11806
11807     QScriptValue globalObject() const;
11808     QScriptContext *currentContext() const;
11809     QScriptContext *pushContext();
11810     void popContext();
11811
11812     bool canEvaluate(const QString &program) const;
11813
11814     QScriptValue evaluate(const QString &program, const QString &fileName = QString(), int lineNumber = 1);
11815
11816     bool hasUncaughtException() const;
11817     QScriptValue uncaughtException() const;
11818     int uncaughtExceptionLineNumber() const;
11819     QStringList uncaughtExceptionBacktrace() const;
11820
11821     QScriptValue nullValue();
11822     QScriptValue undefinedValue();
11823
11824     typedef QScriptValue (*FunctionSignature)(QScriptContext *, QScriptEngine *);
11825
11826     QScriptValue newFunction(FunctionSignature signature, int length = 0);
11827     QScriptValue newFunction(FunctionSignature signature, const QScriptValue &prototype, int length = 0);
11828     QScriptValue newVariant(const QVariant &value);
11829
11830
11831     QScriptValue newRegExp(const QRegExp &regexp);
11832
11833
11834     QScriptValue newObject();
11835     QScriptValue newArray(uint length = 0);
11836     QScriptValue newRegExp(const QString &pattern, const QString &flags);
11837     QScriptValue newDate(qsreal value);
11838     QScriptValue newDate(const QDateTime &value);
11839     QScriptValue newActivationObject();
11840 # 171 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/src/script/qscriptengine.h"
11841     QScriptValue defaultPrototype(int metaTypeId) const;
11842     void setDefaultPrototype(int metaTypeId, const QScriptValue &prototype);
11843
11844
11845     typedef QScriptValue (*MarshalFunction)(QScriptEngine *, const void *);
11846     typedef void (*DemarshalFunction)(const QScriptValue &, void *);
11847
11848
11849
11850
11851     template <typename T>
11852     inline QScriptValue toScriptValue(const T &value)
11853     {
11854         return qScriptValueFromValue(this, value);
11855     }
11856     template <typename T>
11857     inline T fromScriptValue(const QScriptValue &value)
11858     {
11859         return qScriptValueToValue<T>(value);
11860     }
11861
11862
11863     QScriptValue importExtension(const QString &extension);
11864
11865     void collectGarbage();
11866
11867     void setProcessEventsInterval(int interval);
11868     int processEventsInterval() const;
11869
11870 private:
11871     QScriptValue create(int type, const void *ptr);
11872
11873     bool convert(const QScriptValue &value, int type, void *ptr);
11874
11875     void registerCustomType(int type, MarshalFunction mf, DemarshalFunction df,
11876                             const QScriptValue &prototype);
11877
11878     friend inline void qScriptRegisterMetaType_helper(QScriptEngine *,
11879         int, MarshalFunction, DemarshalFunction, const QScriptValue &);
11880
11881     friend inline QScriptValue qScriptValueFromValue_helper(QScriptEngine *, int, const void *);
11882
11883     friend inline bool qscriptvalue_cast_helper(const QScriptValue &, int, void *);
11884
11885 protected:
11886
11887     QScriptEnginePrivate *d_ptr;
11888
11889     QScriptEngine(QScriptEnginePrivate &dd);
11890
11891
11892
11893
11894 private:
11895     inline QScriptEnginePrivate* d_func() { return reinterpret_cast<QScriptEnginePrivate *>(d_ptr); } inline const QScriptEnginePrivate* d_func() const { return reinterpret_cast<const QScriptEnginePrivate *>(d_ptr); } friend class QScriptEnginePrivate;
11896     QScriptEngine(const QScriptEngine &); QScriptEngine &operator=(const QScriptEngine &);
11897 };
11898 # 249 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/src/script/qscriptengine.h"
11899 inline QScriptValue qScriptValueFromValue_helper(QScriptEngine *engine, int type, const void *ptr)
11900 {
11901     if (!engine)
11902         return QScriptValue();
11903
11904     return engine->create(type, ptr);
11905 }
11906
11907 template <typename T>
11908 inline QScriptValue qScriptValueFromValue(QScriptEngine *engine, const T &t)
11909 {
11910     return qScriptValueFromValue_helper(engine, qMetaTypeId<T>(), &t);
11911 }
11912
11913 inline bool qscriptvalue_cast_helper(const QScriptValue &value, int type, void *ptr)
11914 {
11915     if (QScriptEngine *eng = value.engine())
11916         return eng->convert(value, type, ptr);
11917
11918     return false;
11919 }
11920
11921 template<typename T>
11922 T qscriptvalue_cast(const QScriptValue &value
11923
11924 , T * = 0
11925
11926     )
11927 {
11928     T t;
11929     const int id = qMetaTypeId<T>();
11930
11931     if (qscriptvalue_cast_helper(value, id, &t))
11932         return t;
11933     else if (value.isVariant())
11934         return qvariant_cast<T>(value.toVariant());
11935
11936     return T();
11937 }
11938
11939 template <typename T>
11940 inline T qScriptValueToValue(const QScriptValue &value)
11941 {
11942     return qscriptvalue_cast<T>(value);
11943 }
11944
11945 inline void qScriptRegisterMetaType_helper(QScriptEngine *eng, int type,
11946                                            QScriptEngine::MarshalFunction mf,
11947                                            QScriptEngine::DemarshalFunction df,
11948                                            const QScriptValue &prototype)
11949 {
11950     eng->registerCustomType(type, mf, df, prototype);
11951 }
11952
11953 template<typename T>
11954 int qScriptRegisterMetaType(
11955     QScriptEngine *eng,
11956     QScriptValue (*toScriptValue)(QScriptEngine *, const T &t),
11957     void (*fromScriptValue)(const QScriptValue &, T &t),
11958     const QScriptValue &prototype = QScriptValue()
11959
11960     , T * = 0
11961
11962 )
11963 {
11964     const int id = qRegisterMetaType<T>();
11965
11966     qScriptRegisterMetaType_helper(
11967         eng, id, reinterpret_cast<QScriptEngine::MarshalFunction>(toScriptValue),
11968         reinterpret_cast<QScriptEngine::DemarshalFunction>(fromScriptValue),
11969         prototype);
11970
11971     return id;
11972 }
11973
11974 template <class Container>
11975 QScriptValue qScriptValueFromSequence(QScriptEngine *eng, const Container &cont)
11976 {
11977     QScriptValue a = eng->newArray();
11978     typename Container::const_iterator begin = cont.begin();
11979     typename Container::const_iterator end = cont.end();
11980     typename Container::const_iterator it;
11981     quint32 i;
11982     for (it = begin, i = 0; it != end; ++it, ++i)
11983         a.setProperty(i, qScriptValueFromValue(eng, *it));
11984     return a;
11985 }
11986
11987 template <class Container>
11988 void qScriptValueToSequence(const QScriptValue &value, Container &cont)
11989 {
11990     quint32 len = value.property(QLatin1String("length")).toUInt32();
11991     for (quint32 i = 0; i < len; ++i) {
11992         QScriptValue item = value.property(i);
11993
11994
11995
11996         cont.push_back(qscriptvalue_cast<typename Container::value_type>(item));
11997
11998     }
11999 }
12000
12001 template<typename T>
12002 int qScriptRegisterSequenceMetaType(
12003     QScriptEngine *engine,
12004     const QScriptValue &prototype = QScriptValue()
12005
12006     , T * = 0
12007
12008 )
12009 {
12010     return qScriptRegisterMetaType<T>(engine, qScriptValueFromSequence,
12011                                       qScriptValueToSequence, prototype);
12012 }
12013
12014 inline QFlags<QScriptEngine::QObjectWrapOptions::enum_type> operator|(QScriptEngine::QObjectWrapOptions::enum_type f1, QScriptEngine::QObjectWrapOptions::enum_type f2) { return QFlags<QScriptEngine::QObjectWrapOptions::enum_type>(f1) | f2; } inline QFlags<QScriptEngine::QObjectWrapOptions::enum_type> operator|(QScriptEngine::QObjectWrapOptions::enum_type f1, QFlags<QScriptEngine::QObjectWrapOptions::enum_type> f2) { return f2 | f1; }
12015
12016
12017 # 53 "./project.h" 2
12018
12019
12020 class QMakeProperty;
12021
12022 struct ParsableBlock;
12023 struct IteratorBlock;
12024 struct FunctionBlock;
12025
12026 class QMakeProject
12027 {
12028     struct ScopeBlock
12029     {
12030         enum TestStatus { TestNone, TestFound, TestSeek };
12031         ScopeBlock() : iterate(0), ignore(false), else_status(TestNone) { }
12032         ScopeBlock(bool i) : iterate(0), ignore(i), else_status(TestNone) { }
12033         ~ScopeBlock();
12034         IteratorBlock *iterate;
12035         uint ignore : 1, else_status : 2;
12036     };
12037     friend struct ParsableBlock;
12038     friend struct IteratorBlock;
12039     friend struct FunctionBlock;
12040
12041
12042     QScriptEngine eng;
12043
12044     QStack<ScopeBlock> scope_blocks;
12045     QStack<FunctionBlock *> function_blocks;
12046     IteratorBlock *iterator;
12047     FunctionBlock *function;
12048     QMap<QString, FunctionBlock*> testFunctions, replaceFunctions;
12049
12050     bool own_prop;
12051     QString pfile, cfile;
12052     QMakeProperty *prop;
12053     void reset();
12054     QMap<QString, QStringList> vars, base_vars, cache;
12055     bool parse(const QString &text, QMap<QString, QStringList> &place, int line_count=1);
12056
12057     enum IncludeStatus {
12058         IncludeSuccess,
12059         IncludeFeatureAlreadyLoaded,
12060         IncludeFailure,
12061         IncludeNoExist,
12062         IncludeParseFailure
12063     };
12064     enum IncludeFlags {
12065         IncludeFlagNone = 0x00,
12066         IncludeFlagFeature = 0x01,
12067         IncludeFlagNewParser = 0x02,
12068         IncludeFlagNewProject = 0x04
12069     };
12070     IncludeStatus doProjectInclude(QString file, uchar flags, QMap<QString, QStringList> &place);
12071
12072     bool doProjectCheckReqs(const QStringList &deps, QMap<QString, QStringList> &place);
12073     bool doVariableReplace(QString &str, QMap<QString, QStringList> &place);
12074     QStringList doVariableReplaceExpand(const QString &str, QMap<QString, QStringList> &place, bool *ok=0);
12075     void init(QMakeProperty *, const QMap<QString, QStringList> *);
12076     QStringList &values(const QString &v, QMap<QString, QStringList> &place);
12077
12078 public:
12079     QMakeProject() { init(0, 0); }
12080     QMakeProject(QMakeProperty *p) { init(p, 0); }
12081     QMakeProject(QMakeProject *p, const QMap<QString, QStringList> *nvars=0);
12082     QMakeProject(const QMap<QString, QStringList> &nvars) { init(0, &nvars); }
12083     QMakeProject(QMakeProperty *p, const QMap<QString, QStringList> &nvars) { init(p, &nvars); }
12084     ~QMakeProject();
12085
12086     enum { ReadCache=0x01, ReadConf=0x02, ReadCmdLine=0x04, ReadProFile=0x08,
12087            ReadPostFiles=0x10, ReadFeatures=0x20, ReadConfigs=0x40, ReadAll=0xFF };
12088     inline bool parse(const QString &text) { return parse(text, vars); }
12089     bool read(const QString &project, uchar cmd=ReadAll);
12090     bool read(uchar cmd=ReadAll);
12091
12092     QStringList userExpandFunctions() { return replaceFunctions.keys(); }
12093     QStringList userTestFunctions() { return testFunctions.keys(); }
12094
12095     QString projectFile();
12096     QString configFile();
12097     inline QMakeProperty *properties() { return prop; }
12098
12099     bool doProjectTest(QString str, QMap<QString, QStringList> &place);
12100     bool doProjectTest(QString func, const QString &params,
12101                        QMap<QString, QStringList> &place);
12102     bool doProjectTest(QString func, QStringList args,
12103                        QMap<QString, QStringList> &place);
12104     bool doProjectTest(QString func, QList<QStringList> args,
12105                        QMap<QString, QStringList> &place);
12106     QStringList doProjectExpand(QString func, const QString &params,
12107                                 QMap<QString, QStringList> &place);
12108     QStringList doProjectExpand(QString func, QStringList args,
12109                                 QMap<QString, QStringList> &place);
12110     QStringList doProjectExpand(QString func, QList<QStringList> args,
12111                                 QMap<QString, QStringList> &place);
12112
12113     QStringList expand(const QString &v);
12114     QStringList expand(const QString &func, const QList<QStringList> &args);
12115     bool test(const QString &v);
12116     bool test(const QString &func, const QList<QStringList> &args);
12117     bool isActiveConfig(const QString &x, bool regex=false,
12118                         QMap<QString, QStringList> *place=__null);
12119
12120     bool isSet(const QString &v);
12121     bool isEmpty(const QString &v);
12122     QStringList &values(const QString &v);
12123     QString first(const QString &v);
12124     QMap<QString, QStringList> &variables();
12125
12126 protected:
12127     friend class MakefileGenerator;
12128     bool read(const QString &file, QMap<QString, QStringList> &place);
12129     bool read(QTextStream &file, QMap<QString, QStringList> &place);
12130
12131 };
12132 template <> struct QMetaTypeId< QMakeProject* > { enum { Defined = 1 }; static int qt_metatype_id() { static QBasicAtomic metatype_id = { (0) }; if (!metatype_id) metatype_id = qRegisterMetaType< QMakeProject* >("QMakeProject*"); return metatype_id; } };
12133
12134 inline QString QMakeProject::projectFile()
12135 {
12136     if (pfile == "-")
12137         return QString("(stdin)");
12138     return pfile;
12139 }
12140
12141 inline QString QMakeProject::configFile()
12142 { return cfile; }
12143
12144 inline QStringList &QMakeProject::values(const QString &v)
12145 { return values(v, vars); }
12146
12147 inline bool QMakeProject::isEmpty(const QString &v)
12148 { return !isSet(v) || values(v).isEmpty(); }
12149
12150 inline bool QMakeProject::isSet(const QString &v)
12151 { return vars.contains(v); }
12152
12153 inline QString QMakeProject::first(const QString &v)
12154 {
12155     const QStringList vals = values(v);
12156     if(vals.isEmpty())
12157         return QString("");
12158     return vals.first();
12159 }
12160
12161 inline QMap<QString, QStringList> &QMakeProject::variables()
12162 { return vars; }
12163 # 43 "./option.h" 2
12164 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qstring.h" 1
12165 # 44 "./option.h" 2
12166 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qstringlist.h" 1
12167 # 45 "./option.h" 2
12168 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qfile.h" 1
12169 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/io/qfile.h" 1
12170 # 42 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/io/qfile.h"
12171 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qiodevice.h" 1
12172 # 43 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/io/qfile.h" 2
12173 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qstring.h" 1
12174 # 44 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/io/qfile.h" 2
12175 # 1 "/usr/include/stdio.h" 1 3 4
12176 # 45 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/io/qfile.h" 2
12177
12178
12179
12180
12181
12182
12183
12184 typedef QtValidLicenseForCoreModule QtCoreModule;
12185
12186 class QAbstractFileEngine;
12187 class QFilePrivate;
12188
12189 class QFile : public QIODevice
12190 {
12191
12192
12193
12194     inline QFilePrivate* d_func() { return reinterpret_cast<QFilePrivate *>(d_ptr); } inline const QFilePrivate* d_func() const { return reinterpret_cast<const QFilePrivate *>(d_ptr); } friend class QFilePrivate;
12195
12196 public:
12197
12198     enum FileError {
12199         NoError = 0,
12200         ReadError = 1,
12201         WriteError = 2,
12202         FatalError = 3,
12203         ResourceError = 4,
12204         OpenError = 5,
12205         AbortError = 6,
12206         TimeOutError = 7,
12207         UnspecifiedError = 8,
12208         RemoveError = 9,
12209         RenameError = 10,
12210         PositionError = 11,
12211         ResizeError = 12,
12212         PermissionsError = 13,
12213         CopyError = 14
12214
12215
12216
12217     };
12218
12219     enum Permission {
12220         ReadOwner = 0x4000, WriteOwner = 0x2000, ExeOwner = 0x1000,
12221         ReadUser = 0x0400, WriteUser = 0x0200, ExeUser = 0x0100,
12222         ReadGroup = 0x0040, WriteGroup = 0x0020, ExeGroup = 0x0010,
12223         ReadOther = 0x0004, WriteOther = 0x0002, ExeOther = 0x0001
12224     };
12225     typedef QFlags<Permission> Permissions;
12226
12227     QFile();
12228     QFile(const QString &name);
12229
12230
12231
12232
12233     ~QFile();
12234
12235     FileError error() const;
12236     void unsetError();
12237
12238     QString fileName() const;
12239     void setFileName(const QString &name);
12240
12241     typedef QByteArray (*EncoderFn)(const QString &fileName);
12242     typedef QString (*DecoderFn)(const QByteArray &localfileName);
12243     static QByteArray encodeName(const QString &fileName);
12244     static QString decodeName(const QByteArray &localFileName);
12245     inline static QString decodeName(const char *localFileName)
12246         { return decodeName(QByteArray(localFileName)); };
12247     static void setEncodingFunction(EncoderFn);
12248     static void setDecodingFunction(DecoderFn);
12249
12250     bool exists() const;
12251     static bool exists(const QString &fileName);
12252
12253     QString readLink() const;
12254     static QString readLink(const QString &fileName);
12255     inline QString symLinkTarget() const { return readLink(); }
12256     inline static QString symLinkTarget(const QString &fileName) { return readLink(fileName); }
12257
12258     bool remove();
12259     static bool remove(const QString &fileName);
12260
12261     bool rename(const QString &newName);
12262     static bool rename(const QString &oldName, const QString &newName);
12263
12264     bool link(const QString &newName);
12265     static bool link(const QString &oldname, const QString &newName);
12266
12267     bool copy(const QString &newName);
12268     static bool copy(const QString &fileName, const QString &newName);
12269
12270     bool isSequential() const;
12271
12272     bool open(OpenMode flags);
12273     bool open(FILE *f, OpenMode flags);
12274     bool open(int fd, OpenMode flags);
12275     virtual void close();
12276
12277     qint64 size() const;
12278     qint64 pos() const;
12279     bool seek(qint64 offset);
12280     bool atEnd() const;
12281     bool flush();
12282
12283     bool resize(qint64 sz);
12284     static bool resize(const QString &filename, qint64 sz);
12285
12286     Permissions permissions() const;
12287     static Permissions permissions(const QString &filename);
12288     bool setPermissions(Permissions permissionSpec);
12289     static bool setPermissions(const QString &filename, Permissions permissionSpec);
12290
12291     int handle() const;
12292
12293     virtual QAbstractFileEngine *fileEngine() const;
12294 # 171 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/io/qfile.h"
12295 protected:
12296
12297     QFile(QFilePrivate &dd);
12298
12299
12300
12301
12302     qint64 readData(char *data, qint64 maxlen);
12303     qint64 writeData(const char *data, qint64 len);
12304     qint64 readLineData(char *data, qint64 maxlen);
12305
12306 private:
12307     QFile(const QFile &); QFile &operator=(const QFile &);
12308 };
12309
12310 inline QFlags<QFile::Permissions::enum_type> operator|(QFile::Permissions::enum_type f1, QFile::Permissions::enum_type f2) { return QFlags<QFile::Permissions::enum_type>(f1) | f2; } inline QFlags<QFile::Permissions::enum_type> operator|(QFile::Permissions::enum_type f1, QFlags<QFile::Permissions::enum_type> f2) { return f2 | f1; }
12311
12312
12313 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qfile.h" 2
12314 # 46 "./option.h" 2
12315
12316
12317
12318
12319 const char *qmake_version();
12320
12321 QString qmake_getpwd();
12322 bool qmake_setpwd(const QString &p);
12323
12324
12325 void debug_msg_internal(int level, const char *fmt, ...);
12326 enum QMakeWarn {
12327     WarnNone = 0x00,
12328     WarnParser = 0x01,
12329     WarnLogic = 0x02,
12330     WarnAll = 0xFF
12331 };
12332 void warn_msg(QMakeWarn t, const char *fmt, ...);
12333
12334 struct Option
12335 {
12336
12337     static QString js_ext;
12338     static QString libtool_ext;
12339     static QString pkgcfg_ext;
12340     static QString prf_ext;
12341     static QString prl_ext;
12342     static QString ui_ext;
12343     static QStringList h_ext;
12344     static QStringList cpp_ext;
12345     static QStringList c_ext;
12346     static QString h_moc_ext;
12347     static QString cpp_moc_ext;
12348     static QString obj_ext;
12349     static QString lex_ext;
12350     static QString yacc_ext;
12351     static QString h_moc_mod;
12352     static QString cpp_moc_mod;
12353     static QString lex_mod;
12354     static QString yacc_mod;
12355     static QString dir_sep;
12356     static QString dirlist_sep;
12357     static QString sysenv_mod;
12358     static QString pro_ext;
12359     static QString res_ext;
12360     static char field_sep;
12361     static const char *application_argv0;
12362
12363     enum CmdLineFlags {
12364         QMAKE_CMDLINE_SUCCESS = 0x00,
12365         QMAKE_CMDLINE_SHOW_USAGE = 0x01,
12366         QMAKE_CMDLINE_BAIL = 0x02,
12367         QMAKE_CMDLINE_ERROR = 0x04
12368     };
12369
12370
12371     static int init(int argc=0, char **argv=0);
12372     static bool postProcessProject(QMakeProject *);
12373
12374     enum StringFixFlags {
12375         FixNone = 0x00,
12376         FixEnvVars = 0x01,
12377         FixPathCanonicalize = 0x02,
12378         FixPathToLocalSeparators = 0x04,
12379         FixPathToTargetSeparators = 0x08
12380     };
12381     static QString fixString(QString string, uchar flags);
12382
12383
12384     inline static QString fixPathToLocalOS(const QString &in, bool fix_env=true, bool canonical=true)
12385     {
12386         uchar flags = FixPathToLocalSeparators;
12387         if(fix_env)
12388             flags |= FixEnvVars;
12389         if(canonical)
12390             flags |= FixPathCanonicalize;
12391         return fixString(in, flags);
12392     }
12393     inline static QString fixPathToTargetOS(const QString &in, bool fix_env=true, bool canonical=true)
12394     {
12395         uchar flags = FixPathToTargetSeparators;
12396         if(fix_env)
12397             flags |= FixEnvVars;
12398         if(canonical)
12399             flags |= FixPathCanonicalize;
12400         return fixString(in, flags);
12401     }
12402
12403
12404     enum QMAKE_MODE { QMAKE_GENERATE_NOTHING, QMAKE_GENERATE_PROJECT, QMAKE_GENERATE_MAKEFILE,
12405                       QMAKE_GENERATE_PRL, QMAKE_SET_PROPERTY, QMAKE_QUERY_PROPERTY };
12406     static QMAKE_MODE qmake_mode;
12407
12408
12409     static QString qmake_abslocation;
12410     static QFile output;
12411     static QString output_dir;
12412     static int debug_level;
12413     static int warn_level;
12414     static bool recursive;
12415     static QStringList before_user_vars, after_user_vars, user_configs, after_user_configs;
12416     enum TARG_MODE { TARG_UNIX_MODE, TARG_WIN_MODE, TARG_MACX_MODE, TARG_MAC9_MODE, TARG_QNX6_MODE };
12417     static TARG_MODE target_mode;
12418     static QString user_template, user_template_prefix;
12419     static QStringList shellPath;
12420
12421
12422     struct prop {
12423         static QStringList properties;
12424     };
12425
12426
12427     struct projfile {
12428         static bool do_pwd;
12429         static QStringList project_dirs;
12430     };
12431
12432
12433     struct mkfile {
12434         static QString qmakespec;
12435         static bool do_cache;
12436         static bool do_deps;
12437         static bool do_mocs;
12438         static bool do_dep_heuristics;
12439         static bool do_preprocess;
12440         static bool do_stub_makefile;
12441         static QString cachefile;
12442         static int cachefile_depth;
12443         static QStringList project_files;
12444         static QString qmakespec_commandline;
12445     };
12446
12447 private:
12448     static int parseCommandLine(int, char **, int=0);
12449 };
12450
12451 inline QString fixEnvVariables(const QString &x) { return Option::fixString(x, Option::FixEnvVars); }
12452 inline QStringList splitPathList(const QString paths) { return paths.split(Option::dirlist_sep); }
12453
12454
12455
12456 class QLibraryInfo
12457 {
12458 public:
12459     enum LibraryLocation
12460     {
12461         PrefixPath,
12462         DocumentationPath,
12463         HeadersPath,
12464         LibrariesPath,
12465         BinariesPath,
12466         PluginsPath,
12467         DataPath,
12468         TranslationsPath,
12469         SettingsPath,
12470         DemosPath,
12471         ExamplesPath
12472     };
12473     static QString location(LibraryLocation);
12474 };
12475 # 43 "generators/makefile.h" 2
12476 # 1 "./project.h" 1
12477 # 44 "generators/makefile.h" 2
12478 # 1 "generators/makefiledeps.h" 1
12479 # 42 "generators/makefiledeps.h"
12480 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qstringlist.h" 1
12481 # 43 "generators/makefiledeps.h" 2
12482 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qfileinfo.h" 1
12483 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/io/qfileinfo.h" 1
12484 # 42 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/io/qfileinfo.h"
12485 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qfile.h" 1
12486 # 43 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/io/qfileinfo.h" 2
12487 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qlist.h" 1
12488 # 44 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/io/qfileinfo.h" 2
12489
12490
12491
12492 typedef QtValidLicenseForCoreModule QtCoreModule;
12493
12494 class QDir;
12495 class QDateTime;
12496 class QFileInfoPrivate;
12497
12498 class QFileInfo
12499 {
12500 public:
12501     QFileInfo();
12502     QFileInfo(const QString &file);
12503     QFileInfo(const QFile &file);
12504     QFileInfo(const QDir &dir, const QString &file);
12505     QFileInfo(const QFileInfo &fileinfo);
12506     ~QFileInfo();
12507
12508     QFileInfo &operator=(const QFileInfo &fileinfo);
12509     bool operator==(const QFileInfo &fileinfo);
12510     bool operator==(const QFileInfo &fileinfo) const;
12511     inline bool operator!=(const QFileInfo &fileinfo) { return !(operator==(fileinfo)); }
12512     inline bool operator!=(const QFileInfo &fileinfo) const { return !(operator==(fileinfo)); }
12513
12514     void setFile(const QString &file);
12515     void setFile(const QFile &file);
12516     void setFile(const QDir &dir, const QString &file);
12517     bool exists() const;
12518     void refresh();
12519
12520     QString filePath() const;
12521     QString absoluteFilePath() const;
12522     QString canonicalFilePath() const;
12523     QString fileName() const;
12524     QString baseName() const;
12525     QString completeBaseName() const;
12526     QString suffix() const;
12527     QString bundleName() const;
12528     QString completeSuffix() const;
12529
12530     QString path() const;
12531     QString absolutePath() const;
12532     QString canonicalPath() const;
12533     QDir dir() const;
12534     QDir absoluteDir() const;
12535
12536     bool isReadable() const;
12537     bool isWritable() const;
12538     bool isExecutable() const;
12539     bool isHidden() const;
12540
12541     bool isRelative() const;
12542     inline bool isAbsolute() const { return !isRelative(); }
12543     bool makeAbsolute();
12544
12545     bool isFile() const;
12546     bool isDir() const;
12547     bool isSymLink() const;
12548     bool isRoot() const;
12549     bool isBundle() const;
12550
12551     QString readLink() const;
12552     inline QString symLinkTarget() const { return readLink(); }
12553
12554     QString owner() const;
12555     uint ownerId() const;
12556     QString group() const;
12557     uint groupId() const;
12558
12559     bool permission(QFile::Permissions permissions) const;
12560     QFile::Permissions permissions() const;
12561
12562     qint64 size() const;
12563
12564     QDateTime created() const;
12565     QDateTime lastModified() const;
12566     QDateTime lastRead() const;
12567
12568     void detach();
12569
12570     bool caching() const;
12571     void setCaching(bool on);
12572 # 162 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/io/qfileinfo.h"
12573 protected:
12574     QFileInfoPrivate *d_ptr;
12575 private:
12576     inline QFileInfoPrivate* d_func() { return reinterpret_cast<QFileInfoPrivate *>(d_ptr); } inline const QFileInfoPrivate* d_func() const { return reinterpret_cast<const QFileInfoPrivate *>(d_ptr); } friend class QFileInfoPrivate;
12577 };
12578 template <> class QTypeInfo<QFileInfo> { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QFileInfo)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QFileInfo"; } };
12579
12580
12581
12582
12583
12584 typedef QList<QFileInfo> QFileInfoList;
12585
12586
12587
12588
12589
12590 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qfileinfo.h" 2
12591 # 44 "generators/makefiledeps.h" 2
12592
12593 struct SourceFile;
12594 struct SourceDependChildren;
12595 class SourceFiles;
12596
12597 class QMakeLocalFileName {
12598     uint is_null : 1;
12599     mutable QString real_name, local_name;
12600 public:
12601     QMakeLocalFileName() : is_null(1) { }
12602     QMakeLocalFileName(const QString &);
12603     bool isNull() const { return is_null; }
12604     inline const QString &real() const { return real_name; }
12605     const QString &local() const;
12606
12607     bool operator==(const QMakeLocalFileName &other) {
12608         return (this->real_name == other.real_name);
12609     }
12610     bool operator!=(const QMakeLocalFileName &other) {
12611         return !(*this == other);
12612     }
12613 };
12614
12615 class QMakeSourceFileInfo
12616 {
12617 private:
12618
12619     SourceFiles *files, *includes;
12620     bool files_changed;
12621     QList<QMakeLocalFileName> depdirs;
12622
12623
12624     char *spare_buffer;
12625     int spare_buffer_size;
12626     char *getBuffer(int s);
12627
12628
12629     bool findMocs(SourceFile *);
12630     bool findDeps(SourceFile *);
12631     void dependTreeWalker(SourceFile *, SourceDependChildren *);
12632
12633
12634     QString cachefile;
12635
12636 protected:
12637     virtual QMakeLocalFileName fixPathForFile(const QMakeLocalFileName &, bool forOpen=false);
12638     virtual QMakeLocalFileName findFileForDep(const QMakeLocalFileName &, const QMakeLocalFileName &);
12639     virtual QFileInfo findFileInfo(const QMakeLocalFileName &);
12640
12641 public:
12642     QMakeSourceFileInfo(const QString &cachefile="");
12643     virtual ~QMakeSourceFileInfo();
12644
12645     QList<QMakeLocalFileName> dependencyPaths() const { return depdirs; }
12646     void setDependencyPaths(const QList<QMakeLocalFileName> &);
12647
12648     enum DependencyMode { Recursive, NonRecursive };
12649     inline void setDependencyMode(DependencyMode mode) { dep_mode = mode; }
12650     inline DependencyMode dependencyMode() const { return dep_mode; }
12651
12652     enum SourceFileType { TYPE_UNKNOWN, TYPE_C, TYPE_UI, TYPE_QRC };
12653     enum SourceFileSeek { SEEK_DEPS=0x01, SEEK_MOCS=0x02 };
12654     void addSourceFiles(const QStringList &, uchar seek, SourceFileType type=TYPE_C);
12655     void addSourceFile(const QString &, uchar seek, SourceFileType type=TYPE_C);
12656     bool containsSourceFile(const QString &, SourceFileType type=TYPE_C);
12657
12658     int included(const QString &file);
12659     QStringList dependencies(const QString &file);
12660
12661     bool mocable(const QString &file);
12662
12663     virtual QMap<QString, QStringList> getCacheVerification();
12664     virtual bool verifyCache(const QMap<QString, QStringList> &);
12665     void setCacheFile(const QString &cachefile);
12666     void loadCache(const QString &cf);
12667     void saveCache(const QString &cf);
12668
12669 private:
12670     DependencyMode dep_mode;
12671 };
12672 # 45 "generators/makefile.h" 2
12673 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qtextstream.h" 1
12674 # 46 "generators/makefile.h" 2
12675 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qlist.h" 1
12676 # 47 "generators/makefile.h" 2
12677 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qhash.h" 1
12678 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qhash.h" 1
12679 # 42 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qhash.h"
12680 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qatomic.h" 1
12681 # 43 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qhash.h" 2
12682 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qchar.h" 1
12683 # 44 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qhash.h" 2
12684 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qiterator.h" 1
12685 # 45 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qhash.h" 2
12686 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qlist.h" 1
12687 # 46 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qhash.h" 2
12688 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qpair.h" 1
12689 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qpair.h" 1
12690 # 42 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qpair.h"
12691 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qdatastream.h" 1
12692 # 43 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qpair.h" 2
12693
12694
12695
12696 typedef QtValidLicenseForCoreModule QtCoreModule;
12697
12698 template <class T1, class T2>
12699 struct QPair
12700 {
12701     typedef T1 first_type;
12702     typedef T2 second_type;
12703
12704     QPair() : first(T1()), second(T2()) {}
12705     QPair(const T1 &t1, const T2 &t2) : first(t1), second(t2) {}
12706
12707     QPair<T1, T2> &operator=(const QPair<T1, T2> &other)
12708     { first = other.first; second = other.second; return *this; }
12709
12710     T1 first;
12711     T2 second;
12712 };
12713
12714 template <class T1, class T2>
12715 inline bool operator==(const QPair<T1, T2> &p1, const QPair<T1, T2> &p2)
12716 { return p1.first == p2.first && p1.second == p2.second; }
12717
12718 template <class T1, class T2>
12719 inline bool operator!=(const QPair<T1, T2> &p1, const QPair<T1, T2> &p2)
12720 { return !(p1 == p2); }
12721
12722 template <class T1, class T2>
12723 inline bool operator<(const QPair<T1, T2> &p1, const QPair<T1, T2> &p2)
12724 {
12725     return p1.first < p2.first || (!(p2.first < p1.first) && p1.second < p2.second);
12726 }
12727
12728 template <class T1, class T2>
12729 inline bool operator>(const QPair<T1, T2> &p1, const QPair<T1, T2> &p2)
12730 {
12731     return p2 < p1;
12732 }
12733
12734 template <class T1, class T2>
12735 inline bool operator<=(const QPair<T1, T2> &p1, const QPair<T1, T2> &p2)
12736 {
12737     return !(p2 < p1);
12738 }
12739
12740 template <class T1, class T2>
12741 inline bool operator>=(const QPair<T1, T2> &p1, const QPair<T1, T2> &p2)
12742 {
12743     return !(p1 < p2);
12744 }
12745
12746 template <class T1, class T2>
12747  QPair<T1, T2> qMakePair(const T1 &x, const T2 &y)
12748 {
12749     return QPair<T1, T2>(x, y);
12750 }
12751
12752
12753 template <class T1, class T2>
12754 inline QDataStream& operator>>(QDataStream& s, QPair<T1, T2>& p)
12755 {
12756     s >> p.first >> p.second;
12757     return s;
12758 }
12759
12760 template <class T1, class T2>
12761 inline QDataStream& operator<<(QDataStream& s, const QPair<T1, T2>& p)
12762 {
12763     s << p.first << p.second;
12764     return s;
12765 }
12766
12767
12768
12769 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qpair.h" 2
12770 # 47 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qhash.h" 2
12771
12772
12773
12774
12775 typedef QtValidLicenseForCoreModule QtCoreModule;
12776
12777 class QBitArray;
12778 class QByteArray;
12779 class QString;
12780 class QStringRef;
12781
12782 inline uint qHash(char key) { return uint(key); }
12783 inline uint qHash(uchar key) { return uint(key); }
12784 inline uint qHash(signed char key) { return uint(key); }
12785 inline uint qHash(ushort key) { return uint(key); }
12786 inline uint qHash(short key) { return uint(key); }
12787 inline uint qHash(uint key) { return key; }
12788 inline uint qHash(int key) { return uint(key); }
12789 inline uint qHash(ulong key)
12790 {
12791     if (sizeof(ulong) > sizeof(uint)) {
12792         return uint((key >> (8 * sizeof(uint) - 1)) ^ key);
12793     } else {
12794         return uint(key);
12795     }
12796 }
12797 inline uint qHash(long key) { return qHash(ulong(key)); }
12798 inline uint qHash(quint64 key)
12799 {
12800     if (sizeof(quint64) > sizeof(uint)) {
12801         return uint((key >> (8 * sizeof(uint) - 1)) ^ key);
12802     } else {
12803         return uint(key);
12804     }
12805 }
12806 inline uint qHash(qint64 key) { return qHash(quint64(key)); }
12807 inline uint qHash(QChar key) { return qHash(key.unicode()); }
12808  uint qHash(const QByteArray &key);
12809  uint qHash(const QString &key);
12810  uint qHash(const QStringRef &key);
12811  uint qHash(const QBitArray &key);
12812
12813
12814
12815
12816
12817 template <class T> inline uint qHash(const T *key)
12818 {
12819     if (sizeof(const T *) > sizeof(uint))
12820         return qHash(reinterpret_cast<quint64>(key));
12821     else
12822         return uint(reinterpret_cast<ulong>(key));
12823 }
12824
12825
12826
12827
12828 template <typename T1, typename T2> inline uint qHash(const QPair<T1, T2> &key)
12829 {
12830     uint h1 = qHash(key.first);
12831     uint h2 = qHash(key.second);
12832     return ((h1 << 16) | (h1 >> 16)) ^ h2;
12833 }
12834
12835 struct QHashData
12836 {
12837     struct Node {
12838         Node *next;
12839         uint h;
12840     };
12841
12842     Node *fakeNext;
12843     Node **buckets;
12844     QBasicAtomic ref;
12845     int size;
12846     int nodeSize;
12847     short userNumBits;
12848     short numBits;
12849     int numBuckets;
12850     uint sharable : 1;
12851
12852     void *allocateNode();
12853     void freeNode(void *node);
12854     QHashData *detach_helper(void (*node_duplicate)(Node *, void *), int nodeSize);
12855     void mightGrow();
12856     void hasShrunk();
12857     void rehash(int hint);
12858     void destroyAndFree();
12859     Node *firstNode();
12860
12861
12862
12863
12864     static Node *nextNode(Node *node);
12865     static Node *previousNode(Node *node);
12866
12867     static QHashData shared_null;
12868 };
12869
12870 inline void QHashData::mightGrow()
12871 {
12872     if (size >= numBuckets)
12873         rehash(numBits + 1);
12874 }
12875
12876 inline void QHashData::hasShrunk()
12877 {
12878     if (size <= (numBuckets >> 3) && numBits > userNumBits)
12879         rehash(qMax(int(numBits) - 2, int(userNumBits)));
12880 }
12881
12882 inline QHashData::Node *QHashData::firstNode()
12883 {
12884     Node *e = reinterpret_cast<Node *>(this);
12885     Node **bucket = buckets;
12886     int n = numBuckets;
12887     while (n--) {
12888         if (*bucket != e)
12889             return *bucket;
12890         ++bucket;
12891     }
12892     return e;
12893 }
12894
12895 struct QHashDummyValue
12896 {
12897 };
12898
12899 inline bool operator==(const QHashDummyValue & , const QHashDummyValue & )
12900 {
12901     return true;
12902 }
12903
12904 template <> class QTypeInfo<QHashDummyValue> { public: enum { isComplex = (((Q_MOVABLE_TYPE | Q_DUMMY_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE | Q_DUMMY_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QHashDummyValue)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE | Q_DUMMY_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QHashDummyValue"; } };
12905
12906 template <class Key, class T>
12907 struct QHashDummyNode
12908 {
12909     QHashDummyNode *next;
12910     uint h;
12911     Key key;
12912
12913     inline QHashDummyNode(const Key &key0) : key(key0) {}
12914 };
12915
12916 template <class Key, class T>
12917 struct QHashNode
12918 {
12919     QHashNode *next;
12920     uint h;
12921     Key key;
12922     T value;
12923
12924     inline QHashNode(const Key &key0) : key(key0) {}
12925     inline QHashNode(const Key &key0, const T &value0) : key(key0), value(value0) {}
12926     inline bool same_key(uint h0, const Key &key0) { return h0 == h && key0 == key; }
12927 };
12928 # 230 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qhash.h"
12929 template <class T> struct QHashDummyNode<int, T> { QHashDummyNode *next; union { uint h; int key; }; inline QHashDummyNode(int ) {} }; template <class T> struct QHashNode<int, T> { QHashNode *next; union { uint h; int key; }; T value; inline QHashNode(int ) {} inline QHashNode(int , const T &value0) : value(value0) {} inline bool same_key(uint h0, int) { return h0 == h; } };
12930 template <class T> struct QHashDummyNode<uint, T> { QHashDummyNode *next; union { uint h; uint key; }; inline QHashDummyNode(uint ) {} }; template <class T> struct QHashNode<uint, T> { QHashNode *next; union { uint h; uint key; }; T value; inline QHashNode(uint ) {} inline QHashNode(uint , const T &value0) : value(value0) {} inline bool same_key(uint h0, uint) { return h0 == h; } };
12931
12932
12933
12934 template <class Key, class T>
12935 class QHash
12936 {
12937     typedef QHashDummyNode<Key, T> DummyNode;
12938     typedef QHashNode<Key, T> Node;
12939
12940     union {
12941         QHashData *d;
12942         QHashNode<Key, T> *e;
12943     };
12944
12945     static inline Node *concrete(QHashData::Node *node) {
12946         return reinterpret_cast<Node *>(node);
12947     }
12948
12949 public:
12950     inline QHash() : d(&QHashData::shared_null) { d->ref.ref(); }
12951     inline QHash(const QHash<Key, T> &other) : d(other.d) { d->ref.ref(); if (!d->sharable) detach(); }
12952     inline ~QHash() { if (!d->ref.deref()) freeData(d); }
12953
12954     QHash<Key, T> &operator=(const QHash<Key, T> &other);
12955
12956     bool operator==(const QHash<Key, T> &other) const;
12957     inline bool operator!=(const QHash<Key, T> &other) const { return !(*this == other); }
12958
12959     inline int size() const { return d->size; }
12960
12961     inline bool isEmpty() const { return d->size == 0; }
12962
12963     inline int capacity() const { return d->numBuckets; }
12964     void reserve(int size);
12965     inline void squeeze() { reserve(1); }
12966
12967     inline void detach() { if (d->ref != 1) detach_helper(); }
12968     inline bool isDetached() const { return d->ref == 1; }
12969     inline void setSharable(bool sharable) { if (!sharable) detach(); d->sharable = sharable; }
12970
12971     void clear();
12972
12973     int remove(const Key &key);
12974     T take(const Key &key);
12975
12976     bool contains(const Key &key) const;
12977     const Key key(const T &value) const;
12978     const Key key(const T &value, const Key &defaultKey) const;
12979     const T value(const Key &key) const;
12980     const T value(const Key &key, const T &defaultValue) const;
12981     T &operator[](const Key &key);
12982     const T operator[](const Key &key) const;
12983
12984     QList<Key> uniqueKeys() const;
12985     QList<Key> keys() const;
12986     QList<Key> keys(const T &value) const;
12987     QList<T> values() const;
12988     QList<T> values(const Key &key) const;
12989     int count(const Key &key) const;
12990
12991     class const_iterator;
12992
12993     class iterator
12994     {
12995         QHashData::Node *i;
12996
12997     public:
12998         typedef std::bidirectional_iterator_tag iterator_category;
12999         typedef ptrdiff_t difference_type;
13000         typedef T value_type;
13001         typedef T *pointer;
13002         typedef T &reference;
13003
13004
13005         inline operator Node *() const { return concrete(i); }
13006         inline iterator() : i(0) { }
13007         explicit inline iterator(void *node) : i(reinterpret_cast<QHashData::Node *>(node)) { }
13008
13009         inline const Key &key() const { return concrete(i)->key; }
13010         inline T &value() const { return concrete(i)->value; }
13011         inline T &operator*() const { return concrete(i)->value; }
13012         inline T *operator->() const { return &concrete(i)->value; }
13013         inline bool operator==(const iterator &o) const { return i == o.i; }
13014         inline bool operator!=(const iterator &o) const { return i != o.i; }
13015
13016         inline iterator &operator++() {
13017             i = QHashData::nextNode(i);
13018             return *this;
13019         }
13020         inline iterator operator++(int) {
13021             iterator r = *this;
13022             i = QHashData::nextNode(i);
13023             return r;
13024         }
13025         inline iterator &operator--() {
13026             i = QHashData::previousNode(i);
13027             return *this;
13028         }
13029         inline iterator operator--(int) {
13030             iterator r = *this;
13031             i = QHashData::previousNode(i);
13032             return r;
13033         }
13034         inline iterator operator+(int j) const
13035         { iterator r = *this; if (j > 0) while (j--) ++r; else while (j++) --r; return r; }
13036         inline iterator operator-(int j) const { return operator+(-j); }
13037         inline iterator &operator+=(int j) { return *this = *this + j; }
13038         inline iterator &operator-=(int j) { return *this = *this - j; }
13039
13040
13041
13042
13043
13044     public:
13045
13046         inline bool operator==(const const_iterator &o) const
13047             { return i == reinterpret_cast<const iterator &>(o).i; }
13048         inline bool operator!=(const const_iterator &o) const
13049             { return i != reinterpret_cast<const iterator &>(o).i; }
13050
13051     private:
13052
13053         inline operator bool() const { return false; }
13054     };
13055     friend class iterator;
13056
13057     class const_iterator
13058     {
13059         QHashData::Node *i;
13060
13061     public:
13062         typedef std::bidirectional_iterator_tag iterator_category;
13063         typedef ptrdiff_t difference_type;
13064         typedef T value_type;
13065         typedef const T *pointer;
13066         typedef const T &reference;
13067
13068
13069         inline operator Node *() const { return concrete(i); }
13070         inline const_iterator() : i(0) { }
13071         explicit inline const_iterator(void *node)
13072             : i(reinterpret_cast<QHashData::Node *>(node)) { }
13073
13074
13075
13076         inline const_iterator(const iterator &o)
13077
13078         { i = reinterpret_cast<const const_iterator &>(o).i; }
13079
13080         inline const Key &key() const { return concrete(i)->key; }
13081         inline const T &value() const { return concrete(i)->value; }
13082         inline const T &operator*() const { return concrete(i)->value; }
13083         inline const T *operator->() const { return &concrete(i)->value; }
13084         inline bool operator==(const const_iterator &o) const { return i == o.i; }
13085         inline bool operator!=(const const_iterator &o) const { return i != o.i; }
13086
13087         inline const_iterator &operator++() {
13088             i = QHashData::nextNode(i);
13089             return *this;
13090         }
13091         inline const_iterator operator++(int) {
13092             const_iterator r = *this;
13093             i = QHashData::nextNode(i);
13094             return r;
13095         }
13096         inline const_iterator &operator--() {
13097             i = QHashData::previousNode(i);
13098             return *this;
13099         }
13100         inline const_iterator operator--(int) {
13101             const_iterator r = *this;
13102             i = QHashData::previousNode(i);
13103             return r;
13104         }
13105         inline const_iterator operator+(int j) const
13106         { const_iterator r = *this; if (j > 0) while (j--) ++r; else while (j++) --r; return r; }
13107         inline const_iterator operator-(int j) const { return operator+(-j); }
13108         inline const_iterator &operator+=(int j) { return *this = *this + j; }
13109         inline const_iterator &operator-=(int j) { return *this = *this - j; }
13110 # 419 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qhash.h"
13111     private:
13112
13113         inline operator bool() const { return false; }
13114     };
13115     friend class const_iterator;
13116
13117
13118     inline iterator begin() { detach(); return iterator(d->firstNode()); }
13119     inline const_iterator begin() const { return const_iterator(d->firstNode()); }
13120     inline const_iterator constBegin() const { return const_iterator(d->firstNode()); }
13121     inline iterator end() { detach(); return iterator(e); }
13122     inline const_iterator end() const { return const_iterator(e); }
13123     inline const_iterator constEnd() const { return const_iterator(e); }
13124     iterator erase(iterator it);
13125
13126
13127     typedef iterator Iterator;
13128     typedef const_iterator ConstIterator;
13129     inline int count() const { return d->size; }
13130     iterator find(const Key &key);
13131     const_iterator find(const Key &key) const;
13132     const_iterator constFind(const Key &key) const;
13133     iterator insert(const Key &key, const T &value);
13134     iterator insertMulti(const Key &key, const T &value);
13135     QHash<Key, T> &unite(const QHash<Key, T> &other);
13136
13137
13138     typedef T mapped_type;
13139     typedef Key key_type;
13140     typedef ptrdiff_t difference_type;
13141     typedef int size_type;
13142
13143     inline bool empty() const { return isEmpty(); }
13144
13145
13146
13147
13148
13149
13150 private:
13151     void detach_helper();
13152     void freeData(QHashData *d);
13153     Node **findNode(const Key &key, uint *hp = 0) const;
13154     Node *createNode(uint h, const Key &key, const T &value, Node **nextNode);
13155     void deleteNode(Node *node);
13156
13157     static void duplicateNode(QHashData::Node *originalNode, void *newNode);
13158 };
13159
13160 template <class Key, class T>
13161 inline void QHash<Key, T>::deleteNode(Node *node)
13162 {
13163
13164
13165
13166
13167
13168     node->~Node();
13169
13170     d->freeNode(node);
13171 }
13172
13173 template <class Key, class T>
13174 inline void QHash<Key, T>::duplicateNode(QHashData::Node *node, void *newNode)
13175 {
13176     Node *concreteNode = concrete(node);
13177     if (QTypeInfo<T>::isDummy) {
13178         (void) new (newNode) DummyNode(concreteNode->key);
13179     } else {
13180         (void) new (newNode) Node(concreteNode->key, concreteNode->value);
13181     }
13182 }
13183
13184 template <class Key, class T>
13185 inline typename QHash<Key, T>::Node *
13186 QHash<Key, T>::createNode(uint ah, const Key &akey, const T &avalue, Node **anextNode)
13187 {
13188     Node *node;
13189
13190     if (QTypeInfo<T>::isDummy) {
13191         node = reinterpret_cast<Node *>(new (d->allocateNode()) DummyNode(akey));
13192     } else {
13193         node = new (d->allocateNode()) Node(akey, avalue);
13194     }
13195
13196     node->h = ah;
13197     node->next = *anextNode;
13198     *anextNode = node;
13199     ++d->size;
13200     return node;
13201 }
13202
13203 template <class Key, class T>
13204 inline QHash<Key, T> &QHash<Key, T>::unite(const QHash<Key, T> &other)
13205 {
13206     QHash<Key, T> copy(other);
13207     const_iterator it = copy.constEnd();
13208     while (it != copy.constBegin()) {
13209         --it;
13210         insertMulti(it.key(), it.value());
13211     }
13212     return *this;
13213 }
13214
13215 template <class Key, class T>
13216  void QHash<Key, T>::freeData(QHashData *x)
13217 {
13218     Node *e_for_x = reinterpret_cast<Node *>(x);
13219     Node **bucket = reinterpret_cast<Node **>(x->buckets);
13220     int n = x->numBuckets;
13221     while (n--) {
13222         Node *cur = *bucket++;
13223         while (cur != e_for_x) {
13224             Node *next = cur->next;
13225             deleteNode(cur);
13226             cur = next;
13227         }
13228     }
13229     x->destroyAndFree();
13230 }
13231
13232 template <class Key, class T>
13233 inline void QHash<Key, T>::clear()
13234 {
13235     *this = QHash<Key,T>();
13236 }
13237
13238 template <class Key, class T>
13239  void QHash<Key, T>::detach_helper()
13240 {
13241     QHashData *x = d->detach_helper(duplicateNode,
13242         QTypeInfo<T>::isDummy ? sizeof(DummyNode) : sizeof(Node));
13243     x = qAtomicSetPtr(&d, x);
13244     if (!x->ref.deref())
13245         freeData(x);
13246 }
13247
13248 template <class Key, class T>
13249 inline QHash<Key, T> &QHash<Key, T>::operator=(const QHash<Key, T> &other)
13250 {
13251     if (d != other.d) {
13252         QHashData *x = other.d;
13253         x->ref.ref();
13254         x = qAtomicSetPtr(&d, x);
13255         if (!x->ref.deref())
13256             freeData(x);
13257         if (!d->sharable)
13258             detach_helper();
13259     }
13260     return *this;
13261 }
13262
13263 template <class Key, class T>
13264 inline const T QHash<Key, T>::value(const Key &akey) const
13265 {
13266     Node *node;
13267     if (d->size == 0 || (node = *findNode(akey)) == e) {
13268         return T();
13269     } else {
13270         return node->value;
13271     }
13272 }
13273
13274 template <class Key, class T>
13275 inline const T QHash<Key, T>::value(const Key &akey, const T &adefaultValue) const
13276 {
13277     Node *node;
13278     if (d->size == 0 || (node = *findNode(akey)) == e) {
13279         return adefaultValue;
13280     } else {
13281         return node->value;
13282     }
13283 }
13284
13285 template <class Key, class T>
13286  QList<Key> QHash<Key, T>::uniqueKeys() const
13287 {
13288     QList<Key> res;
13289     const_iterator i = begin();
13290     if (i != end()) {
13291         for (;;) {
13292             const Key &aKey = i.key();
13293             res.append(aKey);
13294             do {
13295                 if (++i == end())
13296                     goto break_out_of_outer_loop;
13297             } while (aKey == i.key());
13298         }
13299     }
13300 break_out_of_outer_loop:
13301     return res;
13302 }
13303
13304 template <class Key, class T>
13305  QList<Key> QHash<Key, T>::keys() const
13306 {
13307     QList<Key> res;
13308     const_iterator i = begin();
13309     while (i != end()) {
13310         res.append(i.key());
13311         ++i;
13312     }
13313     return res;
13314 }
13315
13316 template <class Key, class T>
13317  QList<Key> QHash<Key, T>::keys(const T &avalue) const
13318 {
13319     QList<Key> res;
13320     const_iterator i = begin();
13321     while (i != end()) {
13322         if (i.value() == avalue)
13323             res.append(i.key());
13324         ++i;
13325     }
13326     return res;
13327 }
13328
13329 template <class Key, class T>
13330  const Key QHash<Key, T>::key(const T &avalue) const
13331 {
13332     return key(avalue, Key());
13333 }
13334
13335 template <class Key, class T>
13336  const Key QHash<Key, T>::key(const T &avalue, const Key &defaultValue) const
13337 {
13338     const_iterator i = begin();
13339     while (i != end()) {
13340         if (i.value() == avalue)
13341             return i.key();
13342         ++i;
13343     }
13344
13345     return defaultValue;
13346 }
13347
13348 template <class Key, class T>
13349  QList<T> QHash<Key, T>::values() const
13350 {
13351     QList<T> res;
13352     const_iterator i = begin();
13353     while (i != end()) {
13354         res.append(i.value());
13355         ++i;
13356     }
13357     return res;
13358 }
13359
13360 template <class Key, class T>
13361  QList<T> QHash<Key, T>::values(const Key &akey) const
13362 {
13363     QList<T> res;
13364     Node *node = *findNode(akey);
13365     if (node != e) {
13366         do {
13367             res.append(node->value);
13368         } while ((node = node->next) != e && node->key == akey);
13369     }
13370     return res;
13371 }
13372
13373 template <class Key, class T>
13374  int QHash<Key, T>::count(const Key &akey) const
13375 {
13376     int cnt = 0;
13377     Node *node = *findNode(akey);
13378     if (node != e) {
13379         do {
13380             ++cnt;
13381         } while ((node = node->next) != e && node->key == akey);
13382     }
13383     return cnt;
13384 }
13385
13386 template <class Key, class T>
13387 inline const T QHash<Key, T>::operator[](const Key &akey) const
13388 {
13389     return value(akey);
13390 }
13391
13392 template <class Key, class T>
13393 inline T &QHash<Key, T>::operator[](const Key &akey)
13394 {
13395     detach();
13396     d->mightGrow();
13397
13398     uint h;
13399     Node **node = findNode(akey, &h);
13400     if (*node == e)
13401         return createNode(h, akey, T(), node)->value;
13402     return (*node)->value;
13403 }
13404
13405 template <class Key, class T>
13406 inline typename QHash<Key, T>::iterator QHash<Key, T>::insert(const Key &akey,
13407                                                                          const T &avalue)
13408 {
13409     detach();
13410     d->mightGrow();
13411
13412     uint h;
13413     Node **node = findNode(akey, &h);
13414     if (*node == e)
13415         return iterator(createNode(h, akey, avalue, node));
13416
13417     if (!QTypeInfo<T>::isDummy)
13418         (*node)->value = avalue;
13419     return iterator(*node);
13420 }
13421
13422 template <class Key, class T>
13423 inline typename QHash<Key, T>::iterator QHash<Key, T>::insertMulti(const Key &akey,
13424                                                                               const T &avalue)
13425 {
13426     detach();
13427     d->mightGrow();
13428
13429     uint h;
13430     Node **nextNode = findNode(akey, &h);
13431     return iterator(createNode(h, akey, avalue, nextNode));
13432 }
13433
13434 template <class Key, class T>
13435  int QHash<Key, T>::remove(const Key &akey)
13436 {
13437     detach();
13438
13439     int oldSize = d->size;
13440     Node **node = findNode(akey);
13441     if (*node != e) {
13442         bool deleteNext = true;
13443         do {
13444             Node *next = (*node)->next;
13445             deleteNext = (next != e && next->key == (*node)->key);
13446             deleteNode(*node);
13447             *node = next;
13448             --d->size;
13449         } while (deleteNext);
13450         d->hasShrunk();
13451     }
13452     return oldSize - d->size;
13453 }
13454
13455 template <class Key, class T>
13456  T QHash<Key, T>::take(const Key &akey)
13457 {
13458     detach();
13459
13460     Node **node = findNode(akey);
13461     if (*node != e) {
13462         T t = (*node)->value;
13463         Node *next = (*node)->next;
13464         deleteNode(*node);
13465         *node = next;
13466         --d->size;
13467         d->hasShrunk();
13468         return t;
13469     }
13470     return T();
13471 }
13472
13473 template <class Key, class T>
13474  typename QHash<Key, T>::iterator QHash<Key, T>::erase(iterator it)
13475 {
13476     if (it == iterator(e))
13477         return it;
13478
13479     iterator ret = it;
13480     ++ret;
13481
13482     Node *node = it;
13483     Node **node_ptr = reinterpret_cast<Node **>(&d->buckets[node->h % d->numBuckets]);
13484     while (*node_ptr != node)
13485         node_ptr = &(*node_ptr)->next;
13486     *node_ptr = node->next;
13487     deleteNode(node);
13488     --d->size;
13489     return ret;
13490 }
13491
13492 template <class Key, class T>
13493 inline void QHash<Key, T>::reserve(int asize)
13494 {
13495     detach();
13496     d->rehash(-qMax(asize, 1));
13497 }
13498
13499 template <class Key, class T>
13500 inline typename QHash<Key, T>::const_iterator QHash<Key, T>::find(const Key &akey) const
13501 {
13502     return const_iterator(*findNode(akey));
13503 }
13504
13505 template <class Key, class T>
13506 inline typename QHash<Key, T>::const_iterator QHash<Key, T>::constFind(const Key &akey) const
13507 {
13508     return const_iterator(*findNode(akey));
13509 }
13510
13511 template <class Key, class T>
13512 inline typename QHash<Key, T>::iterator QHash<Key, T>::find(const Key &akey)
13513 {
13514     detach();
13515     return iterator(*findNode(akey));
13516 }
13517
13518 template <class Key, class T>
13519 inline bool QHash<Key, T>::contains(const Key &akey) const
13520 {
13521     return *findNode(akey) != e;
13522 }
13523
13524 template <class Key, class T>
13525  typename QHash<Key, T>::Node **QHash<Key, T>::findNode(const Key &akey,
13526                                                                             uint *ahp) const
13527 {
13528     Node **node;
13529     uint h = qHash(akey);
13530
13531     if (d->numBuckets) {
13532         node = reinterpret_cast<Node **>(&d->buckets[h % d->numBuckets]);
13533         do {if(!(*node == e || (*node)->next))qt_assert("*node == e || (*node)->next","/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qhash.h",841);} while (0);
13534         while (*node != e && !(*node)->same_key(h, akey))
13535             node = &(*node)->next;
13536     } else {
13537         node = const_cast<Node **>(reinterpret_cast<const Node * const *>(&e));
13538     }
13539     if (ahp)
13540         *ahp = h;
13541     return node;
13542 }
13543
13544 template <class Key, class T>
13545  bool QHash<Key, T>::operator==(const QHash<Key, T> &other) const
13546 {
13547     if (size() != other.size())
13548         return false;
13549     if (d == other.d)
13550         return true;
13551
13552     const_iterator it = begin();
13553
13554     while (it != end()) {
13555         const Key &akey = it.key();
13556
13557         const_iterator it2 = other.find(akey);
13558         do {
13559             if (it2 == other.end() || !(it2.key() == akey))
13560                 return false;
13561             if (!QTypeInfo<T>::isDummy && !(it.value() == it2.value()))
13562                 return false;
13563             ++it;
13564             ++it2;
13565         } while (it != end() && it.key() == akey);
13566     }
13567     return true;
13568 }
13569
13570 template <class Key, class T>
13571 class QMultiHash : public QHash<Key, T>
13572 {
13573 public:
13574     QMultiHash() {}
13575     QMultiHash(const QHash<Key, T> &other) : QHash<Key, T>(other) {}
13576
13577     inline typename QHash<Key, T>::iterator replace(const Key &key, const T &value)
13578     { return QHash<Key, T>::insert(key, value); }
13579
13580     inline typename QHash<Key, T>::iterator insert(const Key &key, const T &value)
13581     { return QHash<Key, T>::insertMulti(key, value); }
13582
13583     inline QMultiHash &operator+=(const QMultiHash &other)
13584     { unite(other); return *this; }
13585     inline QMultiHash operator+(const QMultiHash &other) const
13586     { QMultiHash result = *this; result += other; return result; }
13587
13588
13589     using QHash<Key, T>::contains;
13590     using QHash<Key, T>::remove;
13591     using QHash<Key, T>::count;
13592     using QHash<Key, T>::find;
13593     using QHash<Key, T>::constFind;
13594 # 919 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qhash.h"
13595     bool contains(const Key &key, const T &value) const;
13596
13597     int remove(const Key &key, const T &value);
13598
13599     int count(const Key &key, const T &value) const;
13600
13601     typename QHash<Key, T>::iterator find(const Key &key, const T &value) {
13602         typename QHash<Key, T>::iterator i(find(key));
13603         typename QHash<Key, T>::iterator end(this->end());
13604         while (i != end && i.key() == key) {
13605             if (i.value() == value)
13606                 return i;
13607             ++i;
13608         }
13609         return end;
13610     }
13611     typename QHash<Key, T>::const_iterator find(const Key &key, const T &value) const {
13612         typename QHash<Key, T>::const_iterator i(constFind(key));
13613         typename QHash<Key, T>::const_iterator end(QHash<Key, T>::constEnd());
13614         while (i != end && i.key() == key) {
13615             if (i.value() == value)
13616                 return i;
13617             ++i;
13618         }
13619         return end;
13620     }
13621     typename QHash<Key, T>::const_iterator constFind(const Key &key, const T &value) const
13622         { return find(key, value); }
13623 private:
13624     T &operator[](const Key &key);
13625     const T operator[](const Key &key) const;
13626 };
13627
13628 template <class Key, class T>
13629 inline bool QMultiHash<Key, T>::contains(const Key &key, const T &value) const
13630 {
13631     return constFind(key, value) != QHash<Key, T>::constEnd();
13632 }
13633
13634 template <class Key, class T>
13635 inline int QMultiHash<Key, T>::remove(const Key &key, const T &value)
13636 {
13637     int n = 0;
13638     typename QHash<Key, T>::iterator i(find(key));
13639     typename QHash<Key, T>::const_iterator end(QHash<Key, T>::constEnd());
13640     while (i != end && i.key() == key) {
13641         if (i.value() == value) {
13642             i = erase(i);
13643             ++n;
13644         } else {
13645             ++i;
13646         }
13647     }
13648     return n;
13649 }
13650
13651 template <class Key, class T>
13652 inline int QMultiHash<Key, T>::count(const Key &key, const T &value) const
13653 {
13654     int n = 0;
13655     typename QHash<Key, T>::const_iterator i(constFind(key));
13656     typename QHash<Key, T>::const_iterator end(QHash<Key, T>::constEnd());
13657     while (i != end && i.key() == key) {
13658         if (i.value() == value)
13659             ++n;
13660         ++i;
13661     }
13662     return n;
13663 }
13664
13665 template <class Key, class T> class QHashIterator { typedef typename QHash<Key,T>::const_iterator const_iterator; typedef const_iterator Item; QHash<Key,T> c; const_iterator i, n; inline bool item_exists() const { return n != c.constEnd(); } public: inline QHashIterator(const QHash<Key,T> &container) : c(container), i(c.constBegin()), n(c.constEnd()) {} inline QHashIterator &operator=(const QHash<Key,T> &container) { c = container; i = c.constBegin(); n = c.constEnd(); return *this; } inline void toFront() { i = c.constBegin(); n = c.constEnd(); } inline void toBack() { i = c.constEnd(); n = c.constEnd(); } inline bool hasNext() const { return i != c.constEnd(); } inline Item next() { n = i++; return n; } inline Item peekNext() const { return i; } inline bool hasPrevious() const { return i != c.constBegin(); } inline Item previous() { n = --i; return n; } inline Item peekPrevious() const { const_iterator p = i; return --p; } inline const T &value() const { do {if(!(item_exists()))qt_assert("item_exists()","/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qhash.h",989);} while (0); return *n; } inline const Key &key() const { do {if(!(item_exists()))qt_assert("item_exists()","/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qhash.h",989);} while (0); return n.key(); } inline bool findNext(const T &t) { while ((n = i) != c.constEnd()) if (*i++ == t) return true; return false; } inline bool findPrevious(const T &t) { while (i != c.constBegin()) if (*(n = --i) == t) return true; n = c.constEnd(); return false; } };
13666 template <class Key, class T> class QMutableHashIterator { typedef typename QHash<Key,T>::iterator iterator; typedef typename QHash<Key,T>::const_iterator const_iterator; typedef iterator Item; QHash<Key,T> *c; iterator i, n; inline bool item_exists() const { return const_iterator(n) != c->constEnd(); } public: inline QMutableHashIterator(QHash<Key,T> &container) : c(&container) { c->setSharable(false); i = c->begin(); n = c->end(); } inline ~QMutableHashIterator() { c->setSharable(true); } inline QMutableHashIterator &operator=(QHash<Key,T> &container) { c->setSharable(true); c = &container; c->setSharable(false); i = c->begin(); n = c->end(); return *this; } inline void toFront() { i = c->begin(); n = c->end(); } inline void toBack() { i = c->end(); n = c->end(); } inline bool hasNext() const { return const_iterator(i) != c->constEnd(); } inline Item next() { n = i++; return n; } inline Item peekNext() const { return i; } inline bool hasPrevious() const { return const_iterator(i) != c->constBegin(); } inline Item previous() { n = --i; return n; } inline Item peekPrevious() const { iterator p = i; return --p; } inline void remove() { if (const_iterator(n) != c->constEnd()) { i = c->erase(n); n = c->end(); } } inline void setValue(const T &t) { if (const_iterator(n) != c->constEnd()) *n = t; } inline T &value() { do {if(!(item_exists()))qt_assert("item_exists()","/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qhash.h",990);} while (0); return *n; } inline const T &value() const { do {if(!(item_exists()))qt_assert("item_exists()","/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qhash.h",990);} while (0); return *n; } inline const Key &key() const { do {if(!(item_exists()))qt_assert("item_exists()","/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qhash.h",990);} while (0); return n.key(); } inline bool findNext(const T &t) { while (const_iterator(n = i) != c->constEnd()) if (*i++ == t) return true; return false; } inline bool findPrevious(const T &t) { while (const_iterator(i) != c->constBegin()) if (*(n = --i) == t) return true; n = c->end(); return false; } };
13667
13668
13669 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qhash.h" 2
13670 # 48 "generators/makefile.h" 2
13671 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qfileinfo.h" 1
13672 # 49 "generators/makefile.h" 2
13673
13674
13675
13676
13677
13678
13679
13680 struct ReplaceExtraCompilerCacheKey
13681 {
13682     mutable uint hash;
13683     QString var, in, out, pwd;
13684     ReplaceExtraCompilerCacheKey(const QString &v, const QStringList &i, const QStringList &o);
13685     bool operator==(const ReplaceExtraCompilerCacheKey &f) const;
13686     inline uint hashCode() const {
13687         if(!hash)
13688             hash = qHash(var) | qHash(in) | qHash(out) ;
13689         return hash;
13690     }
13691 };
13692 inline uint qHash(const ReplaceExtraCompilerCacheKey &f) { return f.hashCode(); }
13693
13694 struct ReplaceExtraCompilerCacheKey;
13695
13696 class MakefileGenerator : protected QMakeSourceFileInfo
13697 {
13698     QString spec;
13699     bool init_opath_already, init_already, no_io;
13700     QHash<QString, bool> init_compiler_already;
13701     QString build_args(const QString &outdir=QString());
13702     void checkMultipleDefinition(const QString &, const QString &);
13703
13704
13705     mutable QHash<QString, QMakeLocalFileName> depHeuristicsCache;
13706     mutable QHash<QString, QStringList> dependsCache;
13707     mutable QHash<ReplaceExtraCompilerCacheKey, QString> extraCompilerVariablesCache;
13708
13709 protected:
13710     QStringList createObjectList(const QStringList &sources);
13711
13712
13713     void writeObj(QTextStream &, const QString &src);
13714     void writeInstalls(QTextStream &t, const QString &installs, bool noBuild=false);
13715     void writeHeader(QTextStream &t);
13716     void writeSubDirs(QTextStream &t);
13717     void writeMakeQmake(QTextStream &t);
13718     void writeExtraVariables(QTextStream &t);
13719     void writeExtraTargets(QTextStream &t);
13720     void writeExtraCompilerTargets(QTextStream &t);
13721     void writeExtraCompilerVariables(QTextStream &t);
13722     virtual bool writeStubMakefile(QTextStream &t);
13723     virtual bool writeMakefile(QTextStream &t);
13724
13725
13726     struct SubTarget
13727     {
13728         QString name;
13729  QString in_directory, out_directory;
13730         QString profile, target, makefile;
13731         QStringList depends;
13732     };
13733     enum SubTargetFlags {
13734         SubTargetInstalls=0x01,
13735         SubTargetOrdered=0x02,
13736
13737         SubTargetsNoFlags=0x00
13738     };
13739     void writeSubTargets(QTextStream &t, QList<SubTarget*> subtargets, int flags);
13740
13741
13742     bool verifyExtraCompiler(const QString &c, const QString &f);
13743     virtual QString replaceExtraCompilerVariables(const QString &, const QStringList &, const QStringList &);
13744     inline QString replaceExtraCompilerVariables(const QString &val, const QString &in, const QString &out)
13745     { return replaceExtraCompilerVariables(val, QStringList(in), QStringList(out)); }
13746
13747
13748     QMakeLocalFileName fixPathForFile(const QMakeLocalFileName &, bool);
13749     QMakeLocalFileName findFileForDep(const QMakeLocalFileName &, const QMakeLocalFileName &);
13750     QFileInfo findFileInfo(const QMakeLocalFileName &);
13751     QMakeProject *project;
13752
13753
13754     virtual QString unescapeFilePath(const QString &path) const;
13755     virtual QStringList unescapeFilePaths(const QStringList &path) const;
13756     virtual QString escapeFilePath(const QString &path) const { return path; }
13757     QStringList escapeFilePaths(const QStringList &paths) const;
13758
13759
13760     void verifyCompilers();
13761     virtual void init();
13762     void initOutPaths();
13763     struct Compiler
13764     {
13765         QString variable_in;
13766         enum CompilerFlag {
13767             CompilerNoFlags = 0x00,
13768             CompilerBuiltin = 0x01,
13769             CompilerNoCheckDeps = 0x02,
13770             CompilerRemoveNoExist = 0x04
13771         };
13772         uint flags, type;
13773     };
13774     void initCompiler(const Compiler &comp);
13775     enum VPATHFlag {
13776         VPATH_NoFlag = 0x00,
13777         VPATH_WarnMissingFiles = 0x01,
13778         VPATH_RemoveMissingFiles = 0x02,
13779         VPATH_NoFixify = 0x04
13780     };
13781     QStringList findFilesInVPATH(QStringList l, uchar flags, const QString &var="");
13782
13783     inline int findExecutable(const QStringList &cmdline)
13784     { int ret; canExecute(cmdline, &ret); return ret; }
13785     bool canExecute(const QStringList &cmdline, int *argv0) const;
13786     inline bool canExecute(const QString &cmdline) const
13787     { return canExecute(cmdline.split(' '), 0); }
13788
13789     bool mkdir(const QString &dir) const;
13790     QString mkdir_p_asstring(const QString &dir, bool escape=true) const;
13791
13792
13793     QString buildArgs(const QString &outdir=QString());
13794     QString specdir(const QString &outdir=QString());
13795
13796     virtual QStringList &findDependencies(const QString &file);
13797     virtual bool doDepends() const { return Option::mkfile::do_deps; }
13798
13799     void filterIncludedFiles(const QString &);
13800     virtual void processSources() { filterIncludedFiles("SOURCES"); filterIncludedFiles("GENERATED_SOURCES"); }
13801
13802
13803     virtual void usePlatformDir();
13804
13805
13806     virtual QString defaultInstall(const QString &);
13807
13808
13809     QString prlFileName(bool fixify=true);
13810     void writePrlFile();
13811     bool processPrlFile(QString &);
13812     virtual void processPrlVariable(const QString &, const QStringList &);
13813     virtual void processPrlFiles();
13814     virtual void writePrlFile(QTextStream &);
13815
13816
13817     virtual bool findLibraries();
13818
13819
13820     virtual QString var(const QString &var);
13821     QString varGlue(const QString &var, const QString &before, const QString &glue, const QString &after);
13822     QString varList(const QString &var);
13823     QString val(const QStringList &varList);
13824     QString valGlue(const QStringList &varList, const QString &before, const QString &glue, const QString &after);
13825     QString valList(const QStringList &varList);
13826
13827     QString filePrefixRoot(const QString &, const QString &);
13828
13829
13830     enum FileFixifyType { FileFixifyAbsolute, FileFixifyRelative, FileFixifyDefault };
13831     QString fileFixify(const QString& file, const QString &out_dir=QString(),
13832                        const QString &in_dir=QString(), FileFixifyType fix=FileFixifyDefault, bool canon=true) const;
13833     inline QString fileFixify(const QString& file, FileFixifyType fix, bool canon=true) const
13834     { return fileFixify(file, QString(), QString(), fix, canon); }
13835     QStringList fileFixify(const QStringList& files, const QString &out_dir=QString(),
13836                            const QString &in_dir=QString(), FileFixifyType fix=FileFixifyDefault, bool canon=true) const;
13837     inline QStringList fileFixify(const QStringList& files, FileFixifyType fix, bool canon=true) const
13838     { return fileFixify(files, QString(), QString(), fix, canon); }
13839
13840 public:
13841     MakefileGenerator();
13842     virtual ~MakefileGenerator();
13843     QMakeProject *projectFile() const;
13844     void setProjectFile(QMakeProject *p);
13845
13846     void setNoIO(bool o);
13847     bool noIO() const;
13848
13849     inline bool exists(QString file) const { return fileInfo(file).exists(); }
13850     QFileInfo fileInfo(QString file) const;
13851
13852     static MakefileGenerator *create(QMakeProject *);
13853     virtual bool write();
13854     virtual bool writeProjectMakefile();
13855     virtual bool supportsMetaBuild() { return true; }
13856     virtual bool supportsMergedBuilds() { return false; }
13857     virtual bool mergeBuildProject(MakefileGenerator * ) { return false; }
13858     virtual bool openOutput(QFile &, const QString &build) const;
13859     virtual bool isWindowsShell() const { return Option::target_mode == Option::TARG_WIN_MODE; }
13860 };
13861
13862 inline void MakefileGenerator::setNoIO(bool o)
13863 { no_io = o; }
13864
13865 inline bool MakefileGenerator::noIO() const
13866 { return no_io; }
13867
13868 inline QString MakefileGenerator::defaultInstall(const QString &)
13869 { return QString(""); }
13870
13871 inline bool MakefileGenerator::findLibraries()
13872 { return true; }
13873
13874 inline MakefileGenerator::~MakefileGenerator()
13875 { }
13876 # 43 "generators/unix/unixmake.h" 2
13877
13878 class UnixMakefileGenerator : public MakefileGenerator
13879 {
13880     bool init_flag, include_deps;
13881     bool writeMakefile(QTextStream &);
13882     QString libtoolFileName(bool fixify=true);
13883     void writeLibtoolFile();
13884     QString pkgConfigPrefix() const;
13885     QString pkgConfigFileName(bool fixify=true);
13886     QString pkgConfigFixPath(QString) const;
13887     void writePkgConfigFile();
13888     void writePrlFile(QTextStream &);
13889
13890 public:
13891     UnixMakefileGenerator();
13892     ~UnixMakefileGenerator();
13893
13894 protected:
13895     virtual bool doPrecompiledHeaders() const { return project->isActiveConfig("precompile_header"); }
13896     virtual bool doDepends() const { return !include_deps && !Option::mkfile::do_stub_makefile && MakefileGenerator::doDepends(); }
13897     virtual QString defaultInstall(const QString &);
13898     virtual void processPrlVariable(const QString &, const QStringList &);
13899     virtual void processPrlFiles();
13900
13901     virtual bool findLibraries();
13902     virtual QString escapeFilePath(const QString &path) const;
13903     virtual QStringList &findDependencies(const QString &);
13904     virtual void init();
13905
13906     void writeMakeParts(QTextStream &);
13907
13908 private:
13909     void init2();
13910 };
13911
13912 inline UnixMakefileGenerator::~UnixMakefileGenerator()
13913 { }
13914 # 40 "generators/unix/unixmake2.cpp" 2
13915 # 1 "./option.h" 1
13916 # 41 "generators/unix/unixmake2.cpp" 2
13917 # 1 "./meta.h" 1
13918 # 42 "./meta.h"
13919 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qmap.h" 1
13920 # 43 "./meta.h" 2
13921 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qstringlist.h" 1
13922 # 44 "./meta.h" 2
13923 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qstring.h" 1
13924 # 45 "./meta.h" 2
13925
13926 class QMakeMetaInfo
13927 {
13928     bool readLibtoolFile(const QString &f);
13929     bool readPkgCfgFile(const QString &f);
13930     QMap<QString, QStringList> vars;
13931     QString meta_type;
13932     static QMap<QString, QMap<QString, QStringList> > cache_vars;
13933     void clear();
13934 public:
13935     QMakeMetaInfo();
13936
13937     bool readLib(QString lib);
13938     static QString findLib(QString lib);
13939     static bool libExists(QString lib);
13940     QString type() const;
13941
13942     bool isEmpty(const QString &v);
13943     QStringList &values(const QString &v);
13944     QString first(const QString &v);
13945     QMap<QString, QStringList> &variables();
13946 };
13947
13948 inline bool QMakeMetaInfo::isEmpty(const QString &v)
13949 { return !vars.contains(v) || vars[v].isEmpty(); }
13950
13951 inline QString QMakeMetaInfo::type() const
13952 { return meta_type; }
13953
13954 inline QStringList &QMakeMetaInfo::values(const QString &v)
13955 { return vars[v]; }
13956
13957 inline QString QMakeMetaInfo::first(const QString &v)
13958 {
13959
13960
13961
13962
13963
13964
13965
13966     return isEmpty(v) ? QString("") : vars[v].first();
13967
13968 }
13969
13970 inline QMap<QString, QStringList> &QMakeMetaInfo::variables()
13971 { return vars; }
13972
13973 inline bool QMakeMetaInfo::libExists(QString lib)
13974 { return !findLib(lib).isNull(); }
13975 # 42 "generators/unix/unixmake2.cpp" 2
13976 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qregexp.h" 1
13977 # 43 "generators/unix/unixmake2.cpp" 2
13978 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qbytearray.h" 1
13979 # 44 "generators/unix/unixmake2.cpp" 2
13980 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qfile.h" 1
13981 # 45 "generators/unix/unixmake2.cpp" 2
13982 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qdir.h" 1
13983 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/io/qdir.h" 1
13984 # 42 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/io/qdir.h"
13985 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qstring.h" 1
13986 # 43 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/io/qdir.h" 2
13987 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qfileinfo.h" 1
13988 # 44 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/io/qdir.h" 2
13989 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qstringlist.h" 1
13990 # 45 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/io/qdir.h" 2
13991
13992
13993
13994 typedef QtValidLicenseForCoreModule QtCoreModule;
13995
13996 class QDirPrivate;
13997
13998 class QDir
13999 {
14000 protected:
14001     QDirPrivate *d_ptr;
14002 private:
14003     inline QDirPrivate* d_func() { return reinterpret_cast<QDirPrivate *>(d_ptr); } inline const QDirPrivate* d_func() const { return reinterpret_cast<const QDirPrivate *>(d_ptr); } friend class QDirPrivate;
14004 public:
14005     enum Filter { Dirs = 0x001,
14006                   Files = 0x002,
14007                   Drives = 0x004,
14008                   NoSymLinks = 0x008,
14009                   AllEntries = Dirs | Files | Drives,
14010                   TypeMask = 0x00f,
14011
14012
14013
14014
14015                   Readable = 0x010,
14016                   Writable = 0x020,
14017                   Executable = 0x040,
14018                   PermissionMask = 0x070,
14019
14020
14021
14022
14023                   Modified = 0x080,
14024                   Hidden = 0x100,
14025                   System = 0x200,
14026
14027                   AccessMask = 0x3F0,
14028
14029                   AllDirs = 0x400,
14030                   CaseSensitive = 0x800,
14031                   NoDotAndDotDot = 0x1000,
14032
14033                   NoFilter = -1
14034
14035
14036
14037     };
14038     typedef QFlags<Filter> Filters;
14039
14040
14041
14042
14043     enum SortFlag { Name = 0x00,
14044                     Time = 0x01,
14045                     Size = 0x02,
14046                     Unsorted = 0x03,
14047                     SortByMask = 0x03,
14048
14049                     DirsFirst = 0x04,
14050                     Reversed = 0x08,
14051                     IgnoreCase = 0x10,
14052                     DirsLast = 0x20,
14053                     LocaleAware = 0x40,
14054                     Type = 0x80,
14055                     NoSort = -1
14056
14057
14058
14059     };
14060     typedef QFlags<SortFlag> SortFlags;
14061
14062     QDir(const QDir &);
14063     QDir(const QString &path = QString());
14064     QDir(const QString &path, const QString &nameFilter,
14065          SortFlags sort = SortFlags(Name | IgnoreCase), Filters filter = AllEntries);
14066     ~QDir();
14067
14068     QDir &operator=(const QDir &);
14069     QDir &operator=(const QString &path);
14070
14071     void setPath(const QString &path);
14072     QString path() const;
14073     QString absolutePath() const;
14074     QString canonicalPath() const;
14075
14076     static void addResourceSearchPath(const QString &path);
14077
14078     static void setSearchPaths(const QString &prefix, const QStringList &searchPaths);
14079     static void addSearchPath(const QString &prefix, const QString &path);
14080     static QStringList searchPaths(const QString &prefix);
14081
14082     QString dirName() const;
14083     QString filePath(const QString &fileName) const;
14084     QString absoluteFilePath(const QString &fileName) const;
14085     QString relativeFilePath(const QString &fileName) const;
14086
14087
14088     static QString convertSeparators(const QString &pathName);
14089
14090     static QString toNativeSeparators(const QString &pathName);
14091     static QString fromNativeSeparators(const QString &pathName);
14092
14093     bool cd(const QString &dirName);
14094     bool cdUp();
14095
14096     QStringList nameFilters() const;
14097     void setNameFilters(const QStringList &nameFilters);
14098
14099     Filters filter() const;
14100     void setFilter(Filters filter);
14101     SortFlags sorting() const;
14102     void setSorting(SortFlags sort);
14103
14104     uint count() const;
14105     QString operator[](int) const;
14106
14107     static QStringList nameFiltersFromString(const QString &nameFilter);
14108
14109     QStringList entryList(Filters filters = NoFilter, SortFlags sort = NoSort) const;
14110     QStringList entryList(const QStringList &nameFilters, Filters filters = NoFilter,
14111                           SortFlags sort = NoSort) const;
14112
14113     QFileInfoList entryInfoList(Filters filters = NoFilter, SortFlags sort = NoSort) const;
14114     QFileInfoList entryInfoList(const QStringList &nameFilters, Filters filters = NoFilter,
14115                                 SortFlags sort = NoSort) const;
14116
14117     bool mkdir(const QString &dirName) const;
14118     bool rmdir(const QString &dirName) const;
14119     bool mkpath(const QString &dirPath) const;
14120     bool rmpath(const QString &dirPath) const;
14121
14122     bool isReadable() const;
14123     bool exists() const;
14124     bool isRoot() const;
14125
14126     static bool isRelativePath(const QString &path);
14127     inline static bool isAbsolutePath(const QString &path) { return !isRelativePath(path); }
14128     bool isRelative() const;
14129     inline bool isAbsolute() const { return !isRelative(); }
14130     bool makeAbsolute();
14131
14132     bool operator==(const QDir &dir) const;
14133     inline bool operator!=(const QDir &dir) const { return !operator==(dir); }
14134
14135     bool remove(const QString &fileName);
14136     bool rename(const QString &oldName, const QString &newName);
14137     bool exists(const QString &name) const;
14138
14139     static QFileInfoList drives();
14140
14141     static QChar separator();
14142
14143     static bool setCurrent(const QString &path);
14144     static inline QDir current() { return QDir(currentPath()); }
14145     static QString currentPath();
14146
14147     static inline QDir home() { return QDir(homePath()); }
14148     static QString homePath();
14149     static inline QDir root() { return QDir(rootPath()); }
14150     static QString rootPath();
14151     static inline QDir temp() { return QDir(tempPath()); }
14152     static QString tempPath();
14153
14154
14155     static bool match(const QStringList &filters, const QString &fileName);
14156     static bool match(const QString &filter, const QString &fileName);
14157
14158     static QString cleanPath(const QString &path);
14159     void refresh() const;
14160 # 244 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/io/qdir.h"
14161 };
14162
14163 inline QFlags<QDir::Filters::enum_type> operator|(QDir::Filters::enum_type f1, QDir::Filters::enum_type f2) { return QFlags<QDir::Filters::enum_type>(f1) | f2; } inline QFlags<QDir::Filters::enum_type> operator|(QDir::Filters::enum_type f1, QFlags<QDir::Filters::enum_type> f2) { return f2 | f1; }
14164 inline QFlags<QDir::SortFlags::enum_type> operator|(QDir::SortFlags::enum_type f1, QDir::SortFlags::enum_type f2) { return QFlags<QDir::SortFlags::enum_type>(f1) | f2; } inline QFlags<QDir::SortFlags::enum_type> operator|(QDir::SortFlags::enum_type f1, QFlags<QDir::SortFlags::enum_type> f2) { return f2 | f1; }
14165
14166
14167 class QDebug;
14168  QDebug operator<<(QDebug debug, QDir::Filters filters);
14169  QDebug operator<<(QDebug debug, const QDir &dir);
14170
14171
14172
14173 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qdir.h" 2
14174 # 46 "generators/unix/unixmake2.cpp" 2
14175 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qdatetime.h" 1
14176 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qdatetime.h" 1
14177 # 42 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qdatetime.h"
14178 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qstring.h" 1
14179 # 43 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qdatetime.h" 2
14180 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qnamespace.h" 1
14181 # 44 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qdatetime.h" 2
14182
14183
14184
14185 typedef QtValidLicenseForCoreModule QtCoreModule;
14186
14187 class QDate
14188 {
14189 public:
14190     QDate() { jd = 0; }
14191     QDate(int y, int m, int d);
14192
14193     bool isNull() const { return jd == 0; }
14194     bool isValid() const;
14195
14196     int year() const;
14197     int month() const;
14198     int day() const;
14199     int dayOfWeek() const;
14200     int dayOfYear() const;
14201     int daysInMonth() const;
14202     int daysInYear() const;
14203     int weekNumber(int *yearNum = 0) const;
14204
14205
14206
14207
14208
14209
14210     static QString shortMonthName(int month);
14211     static QString shortDayName(int weekday);
14212     static QString longMonthName(int month);
14213     static QString longDayName(int weekday);
14214
14215
14216     QString toString(Qt::DateFormat f = Qt::TextDate) const;
14217     QString toString(const QString &format) const;
14218
14219     bool setYMD(int y, int m, int d);
14220     bool setDate(int year, int month, int date);
14221
14222     QDate addDays(int days) const;
14223     QDate addMonths(int months) const;
14224     QDate addYears(int years) const;
14225     int daysTo(const QDate &) const;
14226
14227     bool operator==(const QDate &other) const { return jd == other.jd; }
14228     bool operator!=(const QDate &other) const { return jd != other.jd; }
14229     bool operator<(const QDate &other) const { return jd < other.jd; }
14230     bool operator<=(const QDate &other) const { return jd <= other.jd; }
14231     bool operator>(const QDate &other) const { return jd > other.jd; }
14232     bool operator>=(const QDate &other) const { return jd >= other.jd; }
14233
14234     static QDate currentDate();
14235
14236     static QDate fromString(const QString &s, Qt::DateFormat f = Qt::TextDate);
14237     static QDate fromString(const QString &s, const QString &format);
14238
14239     static bool isValid(int y, int m, int d);
14240     static bool isLeapYear(int year);
14241
14242
14243
14244
14245
14246     static uint gregorianToJulian(int y, int m, int d);
14247     static void julianToGregorian(uint jd, int &y, int &m, int &d);
14248
14249
14250
14251
14252
14253     static inline QDate fromJulianDay(int jd) { QDate d; d.jd = jd; return d; }
14254     inline int toJulianDay() const { return jd; }
14255
14256 private:
14257     uint jd;
14258
14259     friend class QDateTime;
14260     friend class QDateTimePrivate;
14261
14262     friend QDataStream &operator<<(QDataStream &, const QDate &);
14263     friend QDataStream &operator>>(QDataStream &, QDate &);
14264
14265 };
14266 template <> class QTypeInfo<QDate> { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QDate)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QDate"; } };
14267
14268 class QTime
14269 {
14270 public:
14271     QTime(): mds(NullTime) {}
14272     QTime(int h, int m, int s = 0, int ms = 0);
14273
14274     bool isNull() const { return mds == NullTime; }
14275     bool isValid() const;
14276
14277     int hour() const;
14278     int minute() const;
14279     int second() const;
14280     int msec() const;
14281
14282     QString toString(Qt::DateFormat f = Qt::TextDate) const;
14283     QString toString(const QString &format) const;
14284
14285     bool setHMS(int h, int m, int s, int ms = 0);
14286
14287     QTime addSecs(int secs) const;
14288     int secsTo(const QTime &) const;
14289     QTime addMSecs(int ms) const;
14290     int msecsTo(const QTime &) const;
14291
14292     bool operator==(const QTime &other) const { return mds == other.mds; }
14293     bool operator!=(const QTime &other) const { return mds != other.mds; }
14294     bool operator<(const QTime &other) const { return mds < other.mds; }
14295     bool operator<=(const QTime &other) const { return mds <= other.mds; }
14296     bool operator>(const QTime &other) const { return mds > other.mds; }
14297     bool operator>=(const QTime &other) const { return mds >= other.mds; }
14298
14299     static QTime currentTime();
14300
14301     static QTime fromString(const QString &s, Qt::DateFormat f = Qt::TextDate);
14302     static QTime fromString(const QString &s, const QString &format);
14303
14304     static bool isValid(int h, int m, int s, int ms = 0);
14305
14306
14307
14308
14309
14310     void start();
14311     int restart();
14312     int elapsed() const;
14313 private:
14314     enum TimeFlag { NullTime = -1 };
14315     inline int ds() const { return mds == -1 ? 0 : mds; }
14316     int mds;
14317
14318     friend class QDateTime;
14319     friend class QDateTimePrivate;
14320
14321     friend QDataStream &operator<<(QDataStream &, const QTime &);
14322     friend QDataStream &operator>>(QDataStream &, QTime &);
14323
14324 };
14325 template <> class QTypeInfo<QTime> { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QTime)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QTime"; } };
14326
14327 class QDateTimePrivate;
14328
14329 class QDateTime
14330 {
14331 public:
14332     QDateTime();
14333     explicit QDateTime(const QDate &);
14334     QDateTime(const QDate &, const QTime &, Qt::TimeSpec spec = Qt::LocalTime);
14335     QDateTime(const QDateTime &other);
14336     ~QDateTime();
14337
14338     QDateTime &operator=(const QDateTime &other);
14339
14340     bool isNull() const;
14341     bool isValid() const;
14342
14343     QDate date() const;
14344     QTime time() const;
14345     Qt::TimeSpec timeSpec() const;
14346     uint toTime_t() const;
14347     void setDate(const QDate &date);
14348     void setTime(const QTime &time);
14349     void setTimeSpec(Qt::TimeSpec spec);
14350     void setTime_t(uint secsSince1Jan1970UTC);
14351
14352     QString toString(Qt::DateFormat f = Qt::TextDate) const;
14353     QString toString(const QString &format) const;
14354
14355     QDateTime addDays(int days) const;
14356     QDateTime addMonths(int months) const;
14357     QDateTime addYears(int years) const;
14358     QDateTime addSecs(int secs) const;
14359     QDateTime addMSecs(qint64 msecs) const;
14360     QDateTime toTimeSpec(Qt::TimeSpec spec) const;
14361     inline QDateTime toLocalTime() const { return toTimeSpec(Qt::LocalTime); }
14362     inline QDateTime toUTC() const { return toTimeSpec(Qt::UTC); }
14363     int daysTo(const QDateTime &) const;
14364     int secsTo(const QDateTime &) const;
14365
14366     bool operator==(const QDateTime &other) const;
14367     inline bool operator!=(const QDateTime &other) const { return !(*this == other); }
14368     bool operator<(const QDateTime &other) const;
14369     inline bool operator<=(const QDateTime &other) const { return !(other < *this); }
14370     inline bool operator>(const QDateTime &other) const { return other < *this; }
14371     inline bool operator>=(const QDateTime &other) const { return !(*this < other); }
14372
14373     static QDateTime currentDateTime();
14374
14375     static QDateTime fromString(const QString &s, Qt::DateFormat f = Qt::TextDate);
14376     static QDateTime fromString(const QString &s, const QString &format);
14377
14378     static QDateTime fromTime_t(uint secsSince1Jan1970UTC);
14379 # 256 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qdatetime.h"
14380 private:
14381     friend class QDateTimePrivate;
14382     void detach();
14383     QDateTimePrivate *d;
14384
14385
14386     friend QDataStream &operator<<(QDataStream &, const QDateTime &);
14387     friend QDataStream &operator>>(QDataStream &, QDateTime &);
14388
14389 };
14390 template <> class QTypeInfo<QDateTime> { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QDateTime)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QDateTime"; } };
14391 # 287 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qdatetime.h"
14392  QDataStream &operator<<(QDataStream &, const QDate &);
14393  QDataStream &operator>>(QDataStream &, QDate &);
14394  QDataStream &operator<<(QDataStream &, const QTime &);
14395  QDataStream &operator>>(QDataStream &, QTime &);
14396  QDataStream &operator<<(QDataStream &, const QDateTime &);
14397  QDataStream &operator>>(QDataStream &, QDateTime &);
14398
14399
14400
14401  QDebug operator<<(QDebug, const QDate &);
14402  QDebug operator<<(QDebug, const QTime &);
14403  QDebug operator<<(QDebug, const QDateTime &);
14404
14405
14406
14407 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qdatetime.h" 2
14408 # 47 "generators/unix/unixmake2.cpp" 2
14409 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qdebug.h" 1
14410 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/io/qdebug.h" 1
14411 # 42 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/io/qdebug.h"
14412 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qalgorithms.h" 1
14413 # 43 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/io/qdebug.h" 2
14414 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qhash.h" 1
14415 # 44 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/io/qdebug.h" 2
14416 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qlist.h" 1
14417 # 45 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/io/qdebug.h" 2
14418 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qmap.h" 1
14419 # 46 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/io/qdebug.h" 2
14420 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qpair.h" 1
14421 # 47 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/io/qdebug.h" 2
14422 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qtextstream.h" 1
14423 # 48 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/io/qdebug.h" 2
14424 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qstring.h" 1
14425 # 49 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/io/qdebug.h" 2
14426 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qvector.h" 1
14427 # 50 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/io/qdebug.h" 2
14428 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qset.h" 1
14429 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qset.h" 1
14430 # 42 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qset.h"
14431 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qhash.h" 1
14432 # 43 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qset.h" 2
14433
14434
14435
14436 typedef QtValidLicenseForCoreModule QtCoreModule;
14437
14438 template <class T>
14439 class QSet
14440 {
14441     typedef QHash<T, QHashDummyValue> Hash;
14442
14443 public:
14444     inline QSet() {}
14445     inline QSet(const QSet<T> &other) : q_hash(other.q_hash) {}
14446
14447     inline QSet<T> &operator=(const QSet<T> &other)
14448         { q_hash = other.q_hash; return *this; }
14449
14450     inline bool operator==(const QSet<T> &other) const
14451         { return q_hash == other.q_hash; }
14452     inline bool operator!=(const QSet<T> &other) const
14453         { return q_hash != other.q_hash; }
14454
14455     inline int size() const { return q_hash.size(); }
14456
14457     inline bool isEmpty() const { return q_hash.isEmpty(); }
14458
14459     inline int capacity() const { return q_hash.capacity(); }
14460     inline void reserve(int size);
14461     inline void squeeze() { q_hash.squeeze(); }
14462
14463     inline void detach() { q_hash.detach(); }
14464     inline bool isDetached() const { return q_hash.isDetached(); }
14465     inline void setSharable(bool sharable) { q_hash.setSharable(sharable); }
14466
14467     inline void clear() { q_hash.clear(); }
14468
14469     inline bool remove(const T &value) { return q_hash.remove(value) != 0; }
14470
14471     inline bool contains(const T &value) const { return q_hash.contains(value); }
14472
14473     class const_iterator;
14474
14475     class iterator
14476     {
14477         typedef QHash<T, QHashDummyValue> Hash;
14478         typename Hash::iterator i;
14479
14480     public:
14481         typedef std::bidirectional_iterator_tag iterator_category;
14482         typedef ptrdiff_t difference_type;
14483         typedef T value_type;
14484         typedef const T *pointer;
14485         typedef const T &reference;
14486
14487         inline iterator() {}
14488         inline iterator(typename Hash::iterator o) : i(o) {}
14489         inline iterator(const iterator &o) : i(o.i) {}
14490         inline iterator &operator=(const iterator &o) { i = o.i; return *this; }
14491         inline const T &operator*() const { return i.key(); }
14492         inline const T *operator->() const { return &i.key(); }
14493         inline bool operator==(const iterator &o) const { return i == o.i; }
14494         inline bool operator!=(const iterator &o) const { return i != o.i; }
14495         inline bool operator==(const const_iterator &o) const
14496             { return i == reinterpret_cast<const iterator &>(o).i; }
14497         inline bool operator!=(const const_iterator &o) const
14498             { return i != reinterpret_cast<const iterator &>(o).i; }
14499         inline iterator &operator++() { ++i; return *this; }
14500         inline iterator operator++(int) { iterator r = *this; ++i; return r; }
14501         inline iterator &operator--() { --i; return *this; }
14502         inline iterator operator--(int) { iterator r = *this; --i; return r; }
14503         inline iterator operator+(int j) const { return i + j; }
14504         inline iterator operator-(int j) const { return i - j; }
14505         inline iterator &operator+=(int j) { i += j; return *this; }
14506         inline iterator &operator-=(int j) { i -= j; return *this; }
14507     };
14508
14509     class const_iterator
14510     {
14511         typedef QHash<T, QHashDummyValue> Hash;
14512         typename Hash::const_iterator i;
14513
14514     public:
14515         typedef std::bidirectional_iterator_tag iterator_category;
14516         typedef ptrdiff_t difference_type;
14517         typedef T value_type;
14518         typedef const T *pointer;
14519         typedef const T &reference;
14520
14521         inline const_iterator() {}
14522         inline const_iterator(typename Hash::const_iterator o) : i(o) {}
14523         inline const_iterator(const const_iterator &o) : i(o.i) {}
14524         inline const_iterator(const iterator &o)
14525             : i(reinterpret_cast<const const_iterator &>(o).i) {}
14526         inline const_iterator &operator=(const const_iterator &o) { i = o.i; return *this; }
14527         inline const T &operator*() const { return i.key(); }
14528         inline const T *operator->() const { return &i.key(); }
14529         inline bool operator==(const const_iterator &o) const { return i == o.i; }
14530         inline bool operator!=(const const_iterator &o) const { return i != o.i; }
14531         inline const_iterator &operator++() { ++i; return *this; }
14532         inline const_iterator operator++(int) { const_iterator r = *this; ++i; return r; }
14533         inline const_iterator &operator--() { --i; return *this; }
14534         inline const_iterator operator--(int) { const_iterator r = *this; --i; return r; }
14535         inline const_iterator operator+(int j) const { return i + j; }
14536         inline const_iterator operator-(int j) const { return i - j; }
14537         inline const_iterator &operator+=(int j) { i += j; return *this; }
14538         inline const_iterator &operator-=(int j) { i -= j; return *this; }
14539     };
14540
14541
14542     inline iterator begin() { return q_hash.begin(); }
14543     inline const_iterator begin() const { return q_hash.begin(); }
14544     inline const_iterator constBegin() const { return q_hash.constBegin(); }
14545     inline iterator end() { return q_hash.end(); }
14546     inline const_iterator end() const { return q_hash.end(); }
14547     inline const_iterator constEnd() const { return q_hash.constEnd(); }
14548     iterator erase(iterator i)
14549         { return q_hash.erase(reinterpret_cast<typename Hash::iterator &>(i)); }
14550
14551
14552     typedef iterator Iterator;
14553     typedef const_iterator ConstIterator;
14554     inline int count() const { return q_hash.count(); }
14555     inline const_iterator insert(const T &value)
14556         { return static_cast<typename Hash::const_iterator>(q_hash.insert(value,
14557                                                                           QHashDummyValue())); }
14558     iterator find(const T &value) { return q_hash.find(value); }
14559     const_iterator find(const T &value) const { return q_hash.find(value); }
14560     inline const_iterator constFind(const T &value) const { return find(value); }
14561     QSet<T> &unite(const QSet<T> &other);
14562     QSet<T> &intersect(const QSet<T> &other);
14563     QSet<T> &subtract(const QSet<T> &other);
14564
14565
14566     typedef T key_type;
14567     typedef T value_type;
14568     typedef value_type *pointer;
14569     typedef const value_type *const_pointer;
14570     typedef value_type &reference;
14571     typedef const value_type &const_reference;
14572     typedef ptrdiff_t difference_type;
14573     typedef int size_type;
14574
14575     inline bool empty() const { return isEmpty(); }
14576
14577
14578     inline QSet<T> &operator<<(const T &value) { insert(value); return *this; }
14579     inline QSet<T> &operator|=(const QSet<T> &other) { unite(other); return *this; }
14580     inline QSet<T> &operator|=(const T &value) { insert(value); return *this; }
14581     inline QSet<T> &operator&=(const QSet<T> &other) { intersect(other); return *this; }
14582     inline QSet<T> &operator&=(const T &value)
14583         { QSet<T> result; if (contains(value)) result.insert(value); return (*this = result); }
14584     inline QSet<T> &operator+=(const QSet<T> &other) { unite(other); return *this; }
14585     inline QSet<T> &operator+=(const T &value) { insert(value); return *this; }
14586     inline QSet<T> &operator-=(const QSet<T> &other) { subtract(other); return *this; }
14587     inline QSet<T> &operator-=(const T &value) { remove(value); return *this; }
14588     inline QSet<T> operator|(const QSet<T> &other) const
14589         { QSet<T> result = *this; result |= other; return result; }
14590     inline QSet<T> operator&(const QSet<T> &other) const
14591         { QSet<T> result = *this; result &= other; return result; }
14592     inline QSet<T> operator+(const QSet<T> &other) const
14593         { QSet<T> result = *this; result += other; return result; }
14594     inline QSet<T> operator-(const QSet<T> &other) const
14595         { QSet<T> result = *this; result -= other; return result; }
14596
14597
14598     inline QSet<T> operator|(const QSet<T> &other)
14599         { QSet<T> result = *this; result |= other; return result; }
14600     inline QSet<T> operator&(const QSet<T> &other)
14601         { QSet<T> result = *this; result &= other; return result; }
14602     inline QSet<T> operator+(const QSet<T> &other)
14603         { QSet<T> result = *this; result += other; return result; }
14604     inline QSet<T> operator-(const QSet<T> &other)
14605         { QSet<T> result = *this; result -= other; return result; }
14606
14607
14608     QList<T> toList() const;
14609     inline QList<T> values() const { return toList(); }
14610
14611     static QSet<T> fromList(const QList<T> &list);
14612
14613 private:
14614     Hash q_hash;
14615 };
14616
14617 template <class T>
14618 inline void QSet<T>::reserve(int asize) { q_hash.reserve(asize); }
14619
14620 template <class T>
14621 inline QSet<T> &QSet<T>::unite(const QSet<T> &other)
14622 {
14623     QSet<T> copy(other);
14624     typename QSet<T>::const_iterator i = copy.constEnd();
14625     while (i != copy.constBegin()) {
14626         --i;
14627         insert(*i);
14628     }
14629     return *this;
14630 }
14631
14632 template <class T>
14633 inline QSet<T> &QSet<T>::intersect(const QSet<T> &other)
14634 {
14635     QSet<T> copy1(*this);
14636     QSet<T> copy2(other);
14637     typename QSet<T>::const_iterator i = copy1.constEnd();
14638     while (i != copy1.constBegin()) {
14639         --i;
14640         if (!copy2.contains(*i))
14641             remove(*i);
14642     }
14643     return *this;
14644 }
14645
14646 template <class T>
14647 inline QSet<T> &QSet<T>::subtract(const QSet<T> &other)
14648 {
14649     QSet<T> copy1(*this);
14650     QSet<T> copy2(other);
14651     typename QSet<T>::const_iterator i = copy1.constEnd();
14652     while (i != copy1.constBegin()) {
14653         --i;
14654         if (copy2.contains(*i))
14655             remove(*i);
14656     }
14657     return *this;
14658 }
14659
14660 template <typename T>
14661  QList<T> QSet<T>::toList() const
14662 {
14663     QList<T> result;
14664     typename QSet<T>::const_iterator i = constBegin();
14665     while (i != constEnd()) {
14666         result.append(*i);
14667         ++i;
14668     }
14669     return result;
14670 }
14671
14672 template <typename T>
14673  QSet<T> QList<T>::toSet() const
14674 {
14675     QSet<T> result;
14676     result.reserve(size());
14677     for (int i = 0; i < size(); ++i)
14678         result.insert(at(i));
14679     return result;
14680 }
14681
14682 template <typename T>
14683 QSet<T> QSet<T>::fromList(const QList<T> &list)
14684 {
14685     return list.toSet();
14686 }
14687
14688 template <typename T>
14689 QList<T> QList<T>::fromSet(const QSet<T> &set)
14690 {
14691     return set.toList();
14692 }
14693
14694 template <class T> class QSetIterator { typedef typename QSet<T>::const_iterator const_iterator; QSet<T> c; const_iterator i; public: inline QSetIterator(const QSet<T> &container) : c(container), i(c.constBegin()) {} inline QSetIterator &operator=(const QSet<T> &container) { c = container; i = c.constBegin(); return *this; } inline void toFront() { i = c.constBegin(); } inline void toBack() { i = c.constEnd(); } inline bool hasNext() const { return i != c.constEnd(); } inline const T &next() { return *i++; } inline const T &peekNext() const { return *i; } inline bool hasPrevious() const { return i != c.constBegin(); } inline const T &previous() { return *--i; } inline const T &peekPrevious() const { const_iterator p = i; return *--p; } inline bool findNext(const T &t) { while (i != c.constEnd()) if (*i++ == t) return true; return false; } inline bool findPrevious(const T &t) { while (i != c.constBegin()) if (*(--i) == t) return true; return false; } };
14695
14696 template <typename T>
14697 class QMutableSetIterator
14698 {
14699     typedef typename QSet<T>::iterator iterator;
14700     QSet<T> *c;
14701     iterator i, n;
14702     inline bool item_exists() const { return n != c->constEnd(); }
14703
14704 public:
14705     inline QMutableSetIterator(QSet<T> &container)
14706         : c(&container)
14707     { c->setSharable(false); i = c->begin(); n = c->end(); }
14708     inline ~QMutableSetIterator()
14709     { c->setSharable(true); }
14710     inline QMutableSetIterator &operator=(QSet<T> &container)
14711     { c->setSharable(true); c = &container; c->setSharable(false);
14712       i = c->begin(); n = c->end(); return *this; }
14713     inline void toFront() { i = c->begin(); n = c->end(); }
14714     inline void toBack() { i = c->end(); n = i; }
14715     inline bool hasNext() const { return c->constEnd() != i; }
14716     inline const T &next() { n = i++; return *n; }
14717     inline const T &peekNext() const { return *i; }
14718     inline bool hasPrevious() const { return c->constBegin() != i; }
14719     inline const T &previous() { n = --i; return *n; }
14720     inline const T &peekPrevious() const { iterator p = i; return *--p; }
14721     inline void remove()
14722     { if (c->constEnd() != n) { i = c->erase(n); n = c->end(); } }
14723     inline const T &value() const { do {if(!(item_exists()))qt_assert("item_exists()","/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/tools/qset.h",333);} while (0); return *n; }
14724     inline bool findNext(const T &t)
14725     { while (c->constEnd() != (n = i)) if (*i++ == t) return true; return false; }
14726     inline bool findPrevious(const T &t)
14727     { while (c->constBegin() != i) if (*(n = --i) == t) return true;
14728       n = c->end(); return false; }
14729 };
14730
14731
14732 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qset.h" 2
14733 # 51 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/io/qdebug.h" 2
14734
14735
14736
14737 typedef QtValidLicenseForCoreModule QtCoreModule;
14738
14739 class QDebug
14740 {
14741     struct Stream {
14742         Stream(QIODevice *device) : ts(device), ref(1), type(QtDebugMsg), space(true), message_output(false) {}
14743         Stream(QString *string) : ts(string, QIODevice::WriteOnly), ref(1), type(QtDebugMsg), space(true), message_output(false) {}
14744         Stream(QtMsgType t) : ts(&buffer, QIODevice::WriteOnly), ref(1), type(t), space(true), message_output(true) {}
14745         QTextStream ts;
14746         QString buffer;
14747         int ref;
14748         QtMsgType type;
14749         bool space;
14750         bool message_output;
14751     } *stream;
14752 public:
14753     inline QDebug(QIODevice *device) : stream(new Stream(device)) {}
14754     inline QDebug(QString *string) : stream(new Stream(string)) {}
14755     inline QDebug(QtMsgType t) : stream(new Stream(t)) {}
14756     inline QDebug(const QDebug &o):stream(o.stream) { ++stream->ref; }
14757     inline QDebug &operator=(const QDebug &other);
14758     inline ~QDebug() {
14759         if (!--stream->ref) {
14760             if(stream->message_output)
14761                 qt_message_output(stream->type, stream->buffer.toLocal8Bit().data());
14762             delete stream;
14763         }
14764     }
14765     inline QDebug &space() { stream->space = true; stream->ts << " "; return *this; }
14766     inline QDebug &nospace() { stream->space = false; return *this; }
14767     inline QDebug &maybeSpace() { if (stream->space) stream->ts << " "; return *this; }
14768
14769     inline QDebug &operator<<(QChar t) { stream->ts << "\'" << t << "\'"; return maybeSpace(); }
14770     inline QDebug &operator<<(bool t) { stream->ts << (t ? "true" : "false"); return maybeSpace(); }
14771     inline QDebug &operator<<(char t) { stream->ts << t; return maybeSpace(); }
14772     inline QDebug &operator<<(signed short t) { stream->ts << t; return maybeSpace(); }
14773     inline QDebug &operator<<(unsigned short t) { stream->ts << t; return maybeSpace(); }
14774     inline QDebug &operator<<(signed int t) { stream->ts << t; return maybeSpace(); }
14775     inline QDebug &operator<<(unsigned int t) { stream->ts << t; return maybeSpace(); }
14776     inline QDebug &operator<<(signed long t) { stream->ts << t; return maybeSpace(); }
14777     inline QDebug &operator<<(unsigned long t) { stream->ts << t; return maybeSpace(); }
14778     inline QDebug &operator<<(qint64 t)
14779         { stream->ts << QString::number(t); return maybeSpace(); }
14780     inline QDebug &operator<<(quint64 t)
14781         { stream->ts << QString::number(t); return maybeSpace(); }
14782     inline QDebug &operator<<(float t) { stream->ts << t; return maybeSpace(); }
14783     inline QDebug &operator<<(double t) { stream->ts << t; return maybeSpace(); }
14784     inline QDebug &operator<<(const char* t) { stream->ts << QString::fromAscii(t); return maybeSpace(); }
14785     inline QDebug &operator<<(const QString & t) { stream->ts << "\"" << t << "\""; return maybeSpace(); }
14786     inline QDebug &operator<<(const QLatin1String &t) { stream->ts << "\"" << t.latin1() << "\""; return maybeSpace(); }
14787     inline QDebug &operator<<(const QByteArray & t) { stream->ts << "\"" << t << "\""; return maybeSpace(); }
14788     inline QDebug &operator<<(const void * t) { stream->ts << t; return maybeSpace(); }
14789     inline QDebug &operator<<(QTextStreamFunction f) {
14790         stream->ts << f;
14791         return *this;
14792     }
14793
14794     inline QDebug &operator<<(QTextStreamManipulator m)
14795     { stream->ts << m; return *this; }
14796 };
14797
14798  inline QDebug qWarning() { return QDebug(QtWarningMsg); }
14799  inline QDebug qCritical() { return QDebug(QtCriticalMsg); }
14800
14801 inline QDebug &QDebug::operator=(const QDebug &other)
14802 {
14803     if (this != &other) {
14804         QDebug copy(other);
14805         qSwap(stream, copy.stream);
14806     }
14807     return *this;
14808 }
14809
14810
14811
14812
14813
14814 template <class T>
14815 inline QDebug operator<<(QDebug debug, const QList<T> &list)
14816
14817 {
14818     debug.nospace() << "(";
14819     for (typename QList<T>::size_type i = 0; i < list.count(); ++i) {
14820         if (i)
14821             debug << ", ";
14822         debug << list.at(i);
14823     }
14824     debug << ")";
14825     return debug.space();
14826 }
14827
14828
14829
14830
14831
14832 template <typename T>
14833 inline QDebug operator<<(QDebug debug, const QVector<T> &vec)
14834
14835 {
14836     debug.nospace() << "QVector";
14837     return operator<<(debug, vec.toList());
14838 }
14839
14840
14841
14842
14843
14844 template <class aKey, class aT>
14845 inline QDebug operator<<(QDebug debug, const QMap<aKey, aT> &map)
14846
14847 {
14848     debug.nospace() << "QMap(";
14849     for (typename QMap<aKey, aT>::const_iterator it = map.constBegin();
14850          it != map.constEnd(); ++it) {
14851         debug << "(" << it.key() << ", " << it.value() << ")";
14852     }
14853     debug << ")";
14854     return debug.space();
14855 }
14856
14857
14858
14859
14860
14861 template <class aKey, class aT>
14862 inline QDebug operator<<(QDebug debug, const QHash<aKey, aT> &hash)
14863
14864 {
14865     debug.nospace() << "QHash(";
14866     for (typename QHash<aKey, aT>::const_iterator it = hash.constBegin();
14867             it != hash.constEnd(); ++it)
14868         debug << "(" << it.key() << ", " << it.value() << ")";
14869     debug << ")";
14870     return debug.space();
14871 }
14872
14873
14874
14875
14876
14877 template <class T1, class T2>
14878 inline QDebug operator<<(QDebug debug, const QPair<T1, T2> &pair)
14879
14880 {
14881     debug.nospace() << "QPair(" << pair.first << "," << pair.second << ")";
14882     return debug.space();
14883 }
14884
14885 template <typename T>
14886 inline QDebug operator<<(QDebug debug, const QSet<T> &set)
14887 {
14888     debug.nospace() << "QSet";
14889     return operator<<(debug, set.toList());
14890 }
14891
14892
14893  inline QDebug qDebug() { return QDebug(QtDebugMsg); }
14894 # 244 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/io/qdebug.h"
14895
14896 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qdebug.h" 2
14897 # 48 "generators/unix/unixmake2.cpp" 2
14898 # 1 "/usr/include/time.h" 1 3 4
14899
14900
14901
14902
14903
14904
14905
14906 # 1 "/usr/include/gentoo-multilib/amd64/time.h" 1 3 4
14907 # 29 "/usr/include/gentoo-multilib/amd64/time.h" 3 4
14908 # 1 "/usr/include/features.h" 1 3 4
14909 # 30 "/usr/include/gentoo-multilib/amd64/time.h" 2 3 4
14910
14911 extern "C" {
14912
14913
14914
14915
14916
14917
14918
14919 # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4
14920 # 40 "/usr/include/gentoo-multilib/amd64/time.h" 2 3 4
14921
14922
14923
14924 # 1 "/usr/include/bits/time.h" 1 3 4
14925
14926
14927
14928
14929
14930
14931
14932 # 1 "/usr/include/gentoo-multilib/amd64/bits/time.h" 1 3 4
14933 # 9 "/usr/include/bits/time.h" 2 3 4
14934 # 44 "/usr/include/gentoo-multilib/amd64/time.h" 2 3 4
14935 # 132 "/usr/include/gentoo-multilib/amd64/time.h" 3 4
14936
14937
14938 struct tm
14939 {
14940   int tm_sec;
14941   int tm_min;
14942   int tm_hour;
14943   int tm_mday;
14944   int tm_mon;
14945   int tm_year;
14946   int tm_wday;
14947   int tm_yday;
14948   int tm_isdst;
14949
14950
14951   long int tm_gmtoff;
14952   __const char *tm_zone;
14953
14954
14955
14956
14957 };
14958
14959
14960
14961
14962
14963
14964
14965
14966 struct itimerspec
14967   {
14968     struct timespec it_interval;
14969     struct timespec it_value;
14970   };
14971
14972
14973 struct sigevent;
14974 # 181 "/usr/include/gentoo-multilib/amd64/time.h" 3 4
14975
14976
14977
14978 extern clock_t clock (void) throw ();
14979
14980
14981 extern time_t time (time_t *__timer) throw ();
14982
14983
14984 extern double difftime (time_t __time1, time_t __time0)
14985      throw () __attribute__ ((__const__));
14986
14987
14988 extern time_t mktime (struct tm *__tp) throw ();
14989
14990
14991
14992
14993
14994 extern size_t strftime (char *__restrict __s, size_t __maxsize,
14995    __const char *__restrict __format,
14996    __const struct tm *__restrict __tp) throw ();
14997
14998
14999
15000
15001
15002 extern char *strptime (__const char *__restrict __s,
15003          __const char *__restrict __fmt, struct tm *__tp)
15004      throw ();
15005
15006
15007
15008
15009
15010 # 1 "/usr/include/xlocale.h" 1 3 4
15011 # 217 "/usr/include/gentoo-multilib/amd64/time.h" 2 3 4
15012
15013 extern size_t strftime_l (char *__restrict __s, size_t __maxsize,
15014      __const char *__restrict __format,
15015      __const struct tm *__restrict __tp,
15016      __locale_t __loc) throw ();
15017
15018 extern char *strptime_l (__const char *__restrict __s,
15019     __const char *__restrict __fmt, struct tm *__tp,
15020     __locale_t __loc) throw ();
15021
15022
15023
15024
15025
15026
15027 extern struct tm *gmtime (__const time_t *__timer) throw ();
15028
15029
15030
15031 extern struct tm *localtime (__const time_t *__timer) throw ();
15032
15033
15034
15035
15036
15037 extern struct tm *gmtime_r (__const time_t *__restrict __timer,
15038        struct tm *__restrict __tp) throw ();
15039
15040
15041
15042 extern struct tm *localtime_r (__const time_t *__restrict __timer,
15043           struct tm *__restrict __tp) throw ();
15044
15045
15046
15047
15048
15049 extern char *asctime (__const struct tm *__tp) throw ();
15050
15051
15052 extern char *ctime (__const time_t *__timer) throw ();
15053
15054
15055
15056
15057
15058
15059
15060 extern char *asctime_r (__const struct tm *__restrict __tp,
15061    char *__restrict __buf) throw ();
15062
15063
15064 extern char *ctime_r (__const time_t *__restrict __timer,
15065         char *__restrict __buf) throw ();
15066
15067
15068
15069
15070 extern char *__tzname[2];
15071 extern int __daylight;
15072 extern long int __timezone;
15073
15074
15075
15076
15077 extern char *tzname[2];
15078
15079
15080
15081 extern void tzset (void) throw ();
15082
15083
15084
15085 extern int daylight;
15086 extern long int timezone;
15087
15088
15089
15090
15091
15092 extern int stime (__const time_t *__when) throw ();
15093 # 312 "/usr/include/gentoo-multilib/amd64/time.h" 3 4
15094 extern time_t timegm (struct tm *__tp) throw ();
15095
15096
15097 extern time_t timelocal (struct tm *__tp) throw ();
15098
15099
15100 extern int dysize (int __year) throw () __attribute__ ((__const__));
15101 # 327 "/usr/include/gentoo-multilib/amd64/time.h" 3 4
15102 extern int nanosleep (__const struct timespec *__requested_time,
15103         struct timespec *__remaining);
15104
15105
15106
15107 extern int clock_getres (clockid_t __clock_id, struct timespec *__res) throw ();
15108
15109
15110 extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) throw ();
15111
15112
15113 extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp)
15114      throw ();
15115
15116
15117
15118
15119
15120
15121 extern int clock_nanosleep (clockid_t __clock_id, int __flags,
15122        __const struct timespec *__req,
15123        struct timespec *__rem);
15124
15125
15126 extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) throw ();
15127
15128
15129
15130
15131 extern int timer_create (clockid_t __clock_id,
15132     struct sigevent *__restrict __evp,
15133     timer_t *__restrict __timerid) throw ();
15134
15135
15136 extern int timer_delete (timer_t __timerid) throw ();
15137
15138
15139 extern int timer_settime (timer_t __timerid, int __flags,
15140      __const struct itimerspec *__restrict __value,
15141      struct itimerspec *__restrict __ovalue) throw ();
15142
15143
15144 extern int timer_gettime (timer_t __timerid, struct itimerspec *__value)
15145      throw ();
15146
15147
15148 extern int timer_getoverrun (timer_t __timerid) throw ();
15149 # 389 "/usr/include/gentoo-multilib/amd64/time.h" 3 4
15150 extern int getdate_err;
15151 # 398 "/usr/include/gentoo-multilib/amd64/time.h" 3 4
15152 extern struct tm *getdate (__const char *__string);
15153 # 412 "/usr/include/gentoo-multilib/amd64/time.h" 3 4
15154 extern int getdate_r (__const char *__restrict __string,
15155         struct tm *__restrict __resbufp);
15156
15157
15158 }
15159 # 9 "/usr/include/time.h" 2 3 4
15160 # 49 "generators/unix/unixmake2.cpp" 2
15161
15162 UnixMakefileGenerator::UnixMakefileGenerator() : MakefileGenerator(), init_flag(false), include_deps(false)
15163 {
15164
15165 }
15166
15167 void
15168 UnixMakefileGenerator::writePrlFile(QTextStream &t)
15169 {
15170     MakefileGenerator::writePrlFile(t);
15171
15172
15173     if(project->isActiveConfig("create_libtool") && project->first("TEMPLATE") == "lib") {
15174         if(project->isActiveConfig("compile_libtool"))
15175             warn_msg(WarnLogic, "create_libtool specified with compile_libtool can lead to conflicting .la\n"
15176                      "formats, create_libtool has been disabled\n");
15177         else
15178             writeLibtoolFile();
15179     }
15180
15181     if(project->isActiveConfig("create_pc") && project->first("TEMPLATE") == "lib")
15182         writePkgConfigFile();
15183 }
15184
15185 bool
15186 UnixMakefileGenerator::writeMakefile(QTextStream &t)
15187 {
15188
15189     writeHeader(t);
15190     if(!project->values("QMAKE_FAILED_REQUIREMENTS").isEmpty()) {
15191         t << "QMAKE    = " << (project->isEmpty("QMAKE_QMAKE") ? QString("qmake") : var("QMAKE_QMAKE")) << endl;
15192         QStringList &qut = project->values("QMAKE_EXTRA_TARGETS");
15193         for(QStringList::ConstIterator it = qut.begin(); it != qut.end(); ++it)
15194             t << *it << " ";
15195         t << "first all clean install distclean uninstall qmake_all:" << "\n\t"
15196           << "@echo \"Some of the required modules ("
15197           << var("QMAKE_FAILED_REQUIREMENTS") << ") are not available.\"" << "\n\t"
15198           << "@echo \"Skipped.\"" << endl << endl;
15199         writeMakeQmake(t);
15200         if(project->isEmpty("QMAKE_NOFORCE"))
15201             t << "FORCE:" << endl << endl;
15202         return true;
15203     }
15204
15205     if (project->values("TEMPLATE").first() == "app" ||
15206         project->values("TEMPLATE").first() == "lib") {
15207         if(Option::mkfile::do_stub_makefile && MakefileGenerator::writeStubMakefile(t))
15208             return true;
15209         writeMakeParts(t);
15210         return MakefileGenerator::writeMakefile(t);
15211     } else if(project->values("TEMPLATE").first() == "subdirs") {
15212         MakefileGenerator::writeSubDirs(t);
15213         return true;
15214     }
15215     return false;
15216 }
15217
15218 void
15219 UnixMakefileGenerator::writeMakeParts(QTextStream &t)
15220 {
15221     QString deps = fileFixify(Option::output.fileName()), target_deps, prl;
15222     bool do_incremental = (project->isActiveConfig("incremental") &&
15223                            !project->values("QMAKE_INCREMENTAL").isEmpty() &&
15224                            (!project->values("QMAKE_APP_FLAG").isEmpty() ||
15225                             (!project->isActiveConfig("staticlib")))),
15226          src_incremental=false;
15227
15228     t << "####### Compiler, tools and options" << endl << endl;
15229     t << "CC            = " << var("QMAKE_CC") << endl;
15230     t << "CXX           = " << var("QMAKE_CXX") << endl;
15231     t << "DEFINES       = "
15232       << varGlue("PRL_EXPORT_DEFINES","-D"," -D"," ")
15233       << varGlue("DEFINES","-D"," -D","") << endl;
15234     t << "CFLAGS        = " << var("QMAKE_CFLAGS") << " $(DEFINES)" << endl;
15235     t << "CXXFLAGS      = " << var("QMAKE_CXXFLAGS") << " $(DEFINES)" << endl;
15236     t << "INCPATH       = " << "-I" << specdir();
15237     if(!project->isActiveConfig("no_include_pwd")) {
15238         QString pwd = escapeFilePath(fileFixify(qmake_getpwd()));
15239         if(pwd.isEmpty())
15240             pwd = ".";
15241         t << " -I" << pwd;
15242     }
15243     {
15244         const QStringList &incs = project->values("INCLUDEPATH");
15245         for(int i = 0; i < incs.size(); ++i) {
15246             QString inc = escapeFilePath(incs.at(i));
15247             if(!inc.isEmpty())
15248                 t << " " << "-I" << inc;
15249         }
15250     }
15251     if(!project->isEmpty("QMAKE_FRAMEWORKPATH_FLAGS"))
15252        t << " " << var("QMAKE_FRAMEWORKPATH_FLAGS");
15253     t << endl;
15254
15255     if(!project->isActiveConfig("staticlib")) {
15256         t << "LINK          = " << var("QMAKE_LINK") << endl;
15257         t << "LFLAGS        = " << var("QMAKE_LFLAGS") << endl;
15258         t << "LIBS          = " << "$(SUBLIBS) " << var("QMAKE_FRAMEWORKDIR_FLAGS") << " "
15259           << var("QMAKE_LIBDIR_FLAGS") << " " << var("QMAKE_LIBS") << endl;
15260     }
15261
15262     t << "AR            = " << var("QMAKE_AR") << endl;
15263     t << "RANLIB        = " << var("QMAKE_RANLIB") << endl;
15264     t << "QMAKE         = " << (project->isEmpty("QMAKE_QMAKE") ? QString("qmake") : var("QMAKE_QMAKE")) << endl;
15265     t << "TAR           = " << var("QMAKE_TAR") << endl;
15266     t << "COMPRESS      = " << var("QMAKE_GZIP") << endl;
15267     if(project->isActiveConfig("compile_libtool"))
15268         t << "LIBTOOL       = " << var("QMAKE_LIBTOOL") << endl;
15269     t << "COPY          = " << var("QMAKE_COPY") << endl;
15270     t << "SED           = " << var("QMAKE_STREAM_EDITOR") << endl;
15271     t << "COPY_FILE     = " << var("QMAKE_COPY_FILE") << endl;
15272     t << "COPY_DIR      = " << var("QMAKE_COPY_DIR") << endl;
15273     t << "INSTALL_FILE  = " << var("QMAKE_INSTALL_FILE") << endl;
15274     t << "INSTALL_DIR   = " << var("QMAKE_INSTALL_DIR") << endl;
15275     t << "INSTALL_PROGRAM = " << var("QMAKE_INSTALL_PROGRAM") << endl;
15276
15277     t << "DEL_FILE      = " << var("QMAKE_DEL_FILE") << endl;
15278     t << "SYMLINK       = " << var("QMAKE_SYMBOLIC_LINK") << endl;
15279     t << "DEL_DIR       = " << var("QMAKE_DEL_DIR") << endl;
15280     t << "MOVE          = " << var("QMAKE_MOVE") << endl;
15281     t << "CHK_DIR_EXISTS= " << var("QMAKE_CHK_DIR_EXISTS") << endl;
15282     t << "MKDIR         = " << var("QMAKE_MKDIR") << endl;
15283     if(!project->isEmpty("QMAKE_MACOSX_DEPLOYMENT_TARGET"))
15284         t << "export MACOSX_DEPLOYMENT_TARGET = "
15285           << project->first("QMAKE_MACOSX_DEPLOYMENT_TARGET") << endl;
15286     t << endl;
15287
15288     t << "####### Output directory" << endl << endl;
15289     if (! project->values("OBJECTS_DIR").isEmpty())
15290         t << "OBJECTS_DIR   = " << var("OBJECTS_DIR") << endl;
15291     else
15292         t << "OBJECTS_DIR   = ./" << endl;
15293     t << endl;
15294
15295
15296     t << "####### Files" << endl << endl;
15297     t << "SOURCES       = " << valList(escapeFilePaths(project->values("SOURCES"))) << " "
15298       << valList(escapeFilePaths(project->values("GENERATED_SOURCES"))) << endl;
15299     if(do_incremental) {
15300         QStringList &objs = project->values("OBJECTS"), &incrs = project->values("QMAKE_INCREMENTAL"), incrs_out;
15301         t << "OBJECTS       = ";
15302         for(QStringList::Iterator objit = objs.begin(); objit != objs.end(); ++objit) {
15303             bool increment = false;
15304             for(QStringList::Iterator incrit = incrs.begin(); incrit != incrs.end(); ++incrit) {
15305                 if((*objit).indexOf(QRegExp((*incrit), Qt::CaseSensitive,
15306                                     QRegExp::Wildcard)) != -1) {
15307                     increment = true;
15308                     incrs_out.append((*objit));
15309                     break;
15310                 }
15311             }
15312             if(!increment)
15313                 t << "\\\n\t\t" << (*objit);
15314         }
15315         if(incrs_out.count() == objs.count()) {
15316             t << escapeFilePaths(incrs_out).join(" \\\n\t\t") << endl;
15317         } else if(!incrs_out.count()) {
15318             t << endl;
15319         } else {
15320             src_incremental = true;
15321             t << endl;
15322             t << "INCREMENTAL_OBJECTS = " << escapeFilePaths(incrs_out).join(" \\\n\t\t") << endl;
15323         }
15324     } else {
15325         t << "OBJECTS       = " << valList(escapeFilePaths(project->values("OBJECTS"))) << endl;
15326     }
15327     if(do_incremental && !src_incremental)
15328         do_incremental = false;
15329     t << "DIST          = " << valList(fileFixify(project->values("DISTFILES"))) << endl;
15330     t << "QMAKE_TARGET  = " << var("QMAKE_ORIG_TARGET") << endl;
15331     t << "DESTDIR       = " << var("DESTDIR") << endl;
15332     if(project->isActiveConfig("compile_libtool"))
15333         t << "TARGETL       = " << var("TARGET_la") << endl;
15334     t << "TARGET        = " << escapeFilePath(var("TARGET")) << endl;
15335     if(project->isActiveConfig("plugin")) {
15336         t << "TARGETD       = " << escapeFilePath(var("TARGET")) << endl;
15337     } else if(!project->isActiveConfig("staticlib") && project->values("QMAKE_APP_FLAG").isEmpty()) {
15338         t << "TARGETA       = " << escapeFilePath(var("TARGETA")) << endl;
15339         if(!project->isEmpty("QMAKE_BUNDLE")) {
15340             t << "TARGETD       = " << escapeFilePath(var("TARGET_x.y")) << endl;
15341             t << "TARGET0       = " << escapeFilePath(var("TARGET_")) << endl;
15342         } else if(project->isEmpty("QMAKE_HPUX_SHLIB")) {
15343             t << "TARGETD       = " << escapeFilePath(var("TARGET_x.y.z")) << endl;
15344             t << "TARGET0       = " << escapeFilePath(var("TARGET_")) << endl;
15345             t << "TARGET1       = " << escapeFilePath(var("TARGET_x")) << endl;
15346             t << "TARGET2       = " << escapeFilePath(var("TARGET_x.y")) << endl;
15347         } else {
15348             t << "TARGETD       = " << escapeFilePath(var("TARGET_x")) << endl;
15349             t << "TARGET0       = " << escapeFilePath(var("TARGET_")) << endl;
15350         }
15351     }
15352     writeExtraCompilerVariables(t);
15353     writeExtraVariables(t);
15354     t << endl;
15355
15356
15357     QStringList &qeui = project->values("QMAKE_EXTRA_INCLUDES");
15358     QStringList::Iterator it;
15359     for(it = qeui.begin(); it != qeui.end(); ++it)
15360         t << "include " << (*it) << endl;
15361
15362
15363     t << "first: all" << endl;
15364     t << "####### Implicit rules" << endl << endl;
15365     t << ".SUFFIXES: " << Option::obj_ext;
15366     for(QStringList::Iterator cit = Option::c_ext.begin(); cit != Option::c_ext.end(); ++cit)
15367         t << " " << (*cit);
15368     for(QStringList::Iterator cppit = Option::cpp_ext.begin(); cppit != Option::cpp_ext.end(); ++cppit)
15369         t << " " << (*cppit);
15370     t << endl << endl;
15371     for(QStringList::Iterator cppit = Option::cpp_ext.begin(); cppit != Option::cpp_ext.end(); ++cppit)
15372         t << (*cppit) << Option::obj_ext << ":\n\t" << var("QMAKE_RUN_CXX_IMP") << endl << endl;
15373     for(QStringList::Iterator cit = Option::c_ext.begin(); cit != Option::c_ext.end(); ++cit)
15374         t << (*cit) << Option::obj_ext << ":\n\t" << var("QMAKE_RUN_CC_IMP") << endl << endl;
15375
15376     if(include_deps) {
15377         QString cmd=var("QMAKE_CFLAGS_DEPS") + " ";
15378         cmd += varGlue("DEFINES","-D"," -D","") + varGlue("PRL_EXPORT_DEFINES"," -D"," -D","");
15379         if(!project->isEmpty("QMAKE_ABSOLUTE_SOURCE_PATH"))
15380             cmd += " -I" + project->first("QMAKE_ABSOLUTE_SOURCE_PATH") + " ";
15381         cmd += " $(INCPATH) " + varGlue("DEPENDPATH", "-I", " -I", "");
15382         QString odir;
15383         if(!project->values("OBJECTS_DIR").isEmpty())
15384             odir = project->first("OBJECTS_DIR");
15385         t << "###### Dependencies" << endl << endl;
15386         t << odir << ".deps/%.d: %.cpp\n\t";
15387         if(project->isActiveConfig("echo_depend_creation"))
15388             t << "@echo Creating depend for $<" << "\n\t";
15389         t << mkdir_p_asstring("$(@D)") << "\n\t"
15390           << "@$(CXX) " << cmd << " $< | sed \"s,^\\($(*F).o\\):," << odir << "\\1:,g\" >$@" << endl << endl;
15391
15392         t << odir << ".deps/%.d: %.c\n\t";
15393         if(project->isActiveConfig("echo_depend_creation"))
15394             t << "@echo Creating depend for $<" << "\n\t";
15395         t << mkdir_p_asstring("$(@D)") << "\n\t"
15396           << "@$(CC) " << cmd << " $< | sed \"s,^\\($(*F).o\\):," << odir << "\\1:,g\" >$@" << endl << endl;
15397
15398         QString src[] = { "SOURCES", "GENERATED_SOURCES", QString() };
15399         for(int x = 0; !src[x].isNull(); x++) {
15400             QStringList &l = project->values(src[x]);
15401             for(QStringList::Iterator it = l.begin(); it != l.end(); ++it) {
15402                 if(!(*it).isEmpty()) {
15403                     QString d_file;
15404                     for(QStringList::Iterator cit = Option::c_ext.begin();
15405                         cit != Option::c_ext.end(); ++cit) {
15406                         if((*it).endsWith((*cit))) {
15407                             d_file = (*it).left((*it).length() - (*cit).length());
15408                             break;
15409                         }
15410                     }
15411                     if(d_file.isEmpty()) {
15412                         for(QStringList::Iterator cppit = Option::cpp_ext.begin();
15413                             cppit != Option::cpp_ext.end(); ++cppit) {
15414                             if((*it).endsWith((*cppit))) {
15415                                 d_file = (*it).left((*it).length() - (*cppit).length());
15416                                 break;
15417                             }
15418                         }
15419                     }
15420                     if(!d_file.isEmpty()) {
15421                         d_file = odir + ".deps/" + d_file + ".d";
15422                         QStringList deps = findDependencies((*it)).filter(QRegExp(Option::cpp_moc_ext + "$"));
15423                         if(!deps.isEmpty())
15424                             t << d_file << ": " << deps.join(" ") << endl;
15425                         t << "-include " << d_file << endl;
15426                         project->values("QMAKE_DISTCLEAN") += d_file;
15427                     }
15428                 }
15429             }
15430         }
15431     }
15432
15433     t << "####### Build rules" << endl << endl;
15434     if(!project->values("SUBLIBS").isEmpty()) {
15435         QString libdir = "tmp/";
15436         if(!project->isEmpty("SUBLIBS_DIR"))
15437             libdir = project->first("SUBLIBS_DIR");
15438         t << "SUBLIBS       = ";
15439         QStringList &l = project->values("SUBLIBS");
15440         for(QStringList::Iterator it = l.begin(); it != l.end(); ++it)
15441             t << libdir << "lib" << (*it) << ".a ";
15442         t << endl << endl;
15443     }
15444     if(project->isActiveConfig("depend_prl") && !project->isEmpty("QMAKE_PRL_INTERNAL_FILES")) {
15445         QStringList &l = project->values("QMAKE_PRL_INTERNAL_FILES");
15446         QStringList::Iterator it;
15447         for(it = l.begin(); it != l.end(); ++it) {
15448             QMakeMetaInfo libinfo;
15449             if(libinfo.readLib((*it)) && !libinfo.isEmpty("QMAKE_PRL_BUILD_DIR")) {
15450                 QString dir;
15451                 int slsh = (*it).lastIndexOf(Option::dir_sep);
15452                 if(slsh != -1)
15453                     dir = (*it).left(slsh + 1);
15454                 QString targ = dir + libinfo.first("QMAKE_PRL_TARGET");
15455                 target_deps += " " + targ;
15456                 t << targ << ":" << "\n\t"
15457                   << "@echo \"Creating '" << targ << "'\"" << "\n\t"
15458                   << "(cd " << libinfo.first("QMAKE_PRL_BUILD_DIR") << ";"
15459                   << "$(MAKE))" << endl;
15460             }
15461         }
15462     }
15463     if(!project->values("QMAKE_APP_FLAG").isEmpty()) {
15464         QString destdir = project->first("DESTDIR");
15465         if(!project->isEmpty("QMAKE_BUNDLE")) {
15466             QString bundle_loc = project->first("QMAKE_BUNDLE_LOCATION");
15467             if(!bundle_loc.isEmpty() && !bundle_loc.startsWith("/"))
15468                 bundle_loc.prepend("/");
15469             if(!bundle_loc.endsWith("/"))
15470                 bundle_loc += "/";
15471             destdir += project->first("QMAKE_BUNDLE") + bundle_loc;
15472         }
15473         if(do_incremental) {
15474
15475             QString incr_target = var("TARGET") + "_incremental";
15476             if(incr_target.indexOf(Option::dir_sep) != -1)
15477                 incr_target = incr_target.right(incr_target.length() -
15478                                                 (incr_target.lastIndexOf(Option::dir_sep) + 1));
15479             QString incr_deps, incr_objs;
15480             if(project->first("QMAKE_INCREMENTAL_STYLE") == "ld") {
15481                 QString incr_target_dir = var("OBJECTS_DIR") + incr_target + Option::obj_ext;
15482
15483                 t << incr_target_dir << ": $(OBJECTS)" << "\n\t"
15484                   << "ld -r  -o "<< incr_target_dir << " $(OBJECTS)" << endl;
15485
15486                 deps.prepend(incr_target_dir + " ");
15487                 incr_deps = "$(INCREMENTAL_OBJECTS)";
15488                 if(!incr_objs.isEmpty())
15489                     incr_objs += " ";
15490                 incr_objs += incr_target_dir;
15491             } else {
15492
15493                 QString incr_target_dir = var("DESTDIR") + "lib" + incr_target + "." +
15494                                           project->values("QMAKE_EXTENSION_SHLIB").first();
15495                 QString incr_lflags = var("QMAKE_LFLAGS_SHLIB") + " ";
15496                 if(project->isActiveConfig("debug"))
15497                     incr_lflags += var("QMAKE_LFLAGS_DEBUG");
15498                 else
15499                     incr_lflags += var("QMAKE_LFLAGS_RELEASE");
15500                 t << incr_target_dir << ": $(INCREMENTAL_OBJECTS)" << "\n\t";
15501                 if(!destdir.isEmpty())
15502                     t << "\n\t" << mkdir_p_asstring(destdir) << "\n\t";
15503                 t << "$(LINK) " << incr_lflags << " -o "<< incr_target_dir <<
15504                     " $(INCREMENTAL_OBJECTS)" << endl;
15505
15506                 if(!destdir.isEmpty()) {
15507                     if(!incr_objs.isEmpty())
15508                         incr_objs += " ";
15509                     incr_objs += "-L" + destdir;
15510                 } else {
15511                     if(!incr_objs.isEmpty())
15512                         incr_objs += " ";
15513                     incr_objs += "-L" + qmake_getpwd();
15514                 }
15515                 if(!incr_objs.isEmpty())
15516                     incr_objs += " ";
15517                 incr_objs += " -l" + incr_target;
15518                 deps.prepend(incr_target_dir + " ");
15519                 incr_deps = "$(OBJECTS)";
15520             }
15521             t << "all: " << deps << " " << valGlue(escapeFilePaths(project->values("ALL_DEPS")),""," "," ") << "$(TARGET)"
15522               << endl << endl;
15523
15524
15525             t << var("TARGET") << ": " << var("PRE_TARGETDEPS") << " " << incr_deps << " " << target_deps
15526               << " " << var("POST_TARGETDEPS") << "\n\t";
15527             if(!destdir.isEmpty())
15528                 t << "\n\t" << mkdir_p_asstring(destdir) << "\n\t";
15529             if(!project->isEmpty("QMAKE_PRE_LINK"))
15530                 t << var("QMAKE_PRE_LINK") << "\n\t";
15531             t << "$(LINK) $(LFLAGS) -o $(TARGET) " << incr_deps << " " << incr_objs << " $(OBJCOMP) $(LIBS)";
15532             if(!project->isEmpty("QMAKE_POST_LINK"))
15533                 t << "\n\t" << var("QMAKE_POST_LINK");
15534             t << endl << endl;
15535         } else {
15536             t << "all: " << deps << " " << valGlue(escapeFilePaths(project->values("ALL_DEPS")),""," "," ") << "$(TARGET)"
15537               << endl << endl;
15538
15539             t << "$(TARGET): " << var("PRE_TARGETDEPS") << " $(OBJECTS) "
15540               << target_deps << " " << var("POST_TARGETDEPS") << "\n\t";
15541             if(!destdir.isEmpty())
15542                 t << mkdir_p_asstring(destdir) << "\n\t";
15543             if(!project->isEmpty("QMAKE_PRE_LINK"))
15544                 t << var("QMAKE_PRE_LINK") << "\n\t";
15545             t << "$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)";
15546             if(!project->isEmpty("QMAKE_POST_LINK"))
15547                 t << "\n\t" << var("QMAKE_POST_LINK");
15548             t << endl << endl;
15549         }
15550     } else if(!project->isActiveConfig("staticlib")) {
15551         QString destdir = unescapeFilePath(project->first("DESTDIR")), incr_deps;
15552         if(!project->isEmpty("QMAKE_BUNDLE")) {
15553             QString bundle_loc = project->first("QMAKE_BUNDLE_LOCATION");
15554             if(!bundle_loc.isEmpty() && !bundle_loc.startsWith("/"))
15555                 bundle_loc.prepend("/");
15556             if(!bundle_loc.endsWith("/"))
15557                 bundle_loc += "/";
15558             destdir += project->first("QMAKE_BUNDLE") + bundle_loc;
15559         }
15560         destdir = escapeFilePath(destdir);
15561
15562         if(do_incremental) {
15563             QString s_ext = project->values("QMAKE_EXTENSION_SHLIB").first();
15564             QString incr_target = var("QMAKE_ORIG_TARGET").replace(
15565                 QRegExp("\\." + s_ext), "").replace(QRegExp("^lib"), "") + "_incremental";
15566             if(incr_target.indexOf(Option::dir_sep) != -1)
15567                 incr_target = incr_target.right(incr_target.length() -
15568                                                 (incr_target.lastIndexOf(Option::dir_sep) + 1));
15569             incr_target = escapeFilePath(incr_target);
15570
15571             if(project->first("QMAKE_INCREMENTAL_STYLE") == "ld") {
15572                 QString incr_target_dir = escapeFilePath(var("OBJECTS_DIR") + incr_target + Option::obj_ext);
15573
15574                 const QString link_deps = "$(OBJECTS) ";
15575                 t << incr_target_dir << ": " << link_deps << "\n\t"
15576                   << "ld -r  -o " << incr_target_dir << " " << link_deps << endl;
15577
15578                 QStringList &cmd = project->values("QMAKE_LINK_SHLIB_CMD");
15579                 cmd.first().replace("$(OBJECTS) ", "$(INCREMENTAL_OBJECTS)");
15580                 cmd.append(incr_target_dir);
15581                 deps.prepend(incr_target_dir + " ");
15582                 incr_deps = "$(INCREMENTAL_OBJECTS)";
15583             } else {
15584
15585                 QString incr_target_dir = escapeFilePath(destdir + "lib" + incr_target + "." + s_ext);
15586                 QString incr_lflags = var("QMAKE_LFLAGS_SHLIB") + " ";
15587                 if(!project->isEmpty("QMAKE_LFLAGS_INCREMENTAL"))
15588                     incr_lflags += var("QMAKE_LFLAGS_INCREMENTAL") + " ";
15589                 if(project->isActiveConfig("debug"))
15590                     incr_lflags += var("QMAKE_LFLAGS_DEBUG");
15591                 else
15592                     incr_lflags += var("QMAKE_LFLAGS_RELEASE");
15593                 t << incr_target_dir << ": $(INCREMENTAL_OBJECTS)" << "\n\t";
15594                 if(!destdir.isEmpty())
15595                     t << mkdir_p_asstring(destdir) << "\n\t";
15596                 t << "$(LINK) " << incr_lflags << " -o "<< incr_target_dir <<
15597                     " $(INCREMENTAL_OBJECTS)" << endl;
15598
15599                 QStringList &cmd = project->values("QMAKE_LINK_SHLIB_CMD");
15600                 if(!destdir.isEmpty())
15601                     cmd.append(" -L" + destdir);
15602                 cmd.append(" -l" + incr_target);
15603                 deps.prepend(incr_target_dir + " ");
15604                 incr_deps = "$(OBJECTS)";
15605             }
15606
15607             t << "all: " << " " << deps << " " << valGlue(escapeFilePaths(project->values("ALL_DEPS")),""," "," ")
15608               << " " << destdir << "$(TARGET)" << endl << endl;
15609
15610
15611             t << destdir << "$(TARGET): " << var("PRE_TARGETDEPS") << " "
15612               << incr_deps << " $(SUBLIBS) " << target_deps << " " << var("POST_TARGETDEPS");
15613         } else {
15614             t << "all: " << deps << " " << valGlue(escapeFilePaths(project->values("ALL_DEPS")),""," "," ") << " " <<
15615                 destdir << "$(TARGET)" << endl << endl;
15616             t << destdir << "$(TARGET): " << var("PRE_TARGETDEPS")
15617               << " $(OBJECTS) $(SUBLIBS) $(OBJCOMP) " << target_deps
15618               << " " << var("POST_TARGETDEPS");
15619         }
15620         if(!destdir.isEmpty())
15621             t << "\n\t" << mkdir_p_asstring(destdir);
15622         if(!project->isEmpty("QMAKE_PRE_LINK"))
15623             t << "\n\t" << var("QMAKE_PRE_LINK");
15624
15625         if(project->isActiveConfig("compile_libtool")) {
15626             t << "\n\t"
15627               << var("QMAKE_LINK_SHLIB_CMD");
15628         } else if(project->isActiveConfig("plugin")) {
15629             t << "\n\t"
15630               << "-$(DEL_FILE) $(TARGET)" << "\n\t"
15631               << var("QMAKE_LINK_SHLIB_CMD");
15632             if(!destdir.isEmpty())
15633                 t << "\n\t"
15634                   << "-$(MOVE) $(TARGET) " << destdir;
15635             if(!project->isEmpty("QMAKE_POST_LINK"))
15636                 t << "\n\t" << var("QMAKE_POST_LINK") << "\n\t";
15637             t << endl << endl;
15638         } else if(!project->isEmpty("QMAKE_BUNDLE")) {
15639             t << "\n\t"
15640               << "-$(DEL_FILE) $(TARGET) $(TARGET0) $(DESTDIR)$(TARGET0)" << "\n\t"
15641               << var("QMAKE_LINK_SHLIB_CMD") << "\n\t"
15642               << mkdir_p_asstring("\"`dirname $(DESTDIR)$(TARGETD)`\"", false) << "\n\t"
15643               << "-$(MOVE) $(TARGET) $(DESTDIR)$(TARGETD)" << "\n\t"
15644               << mkdir_p_asstring("\"`dirname $(DESTDIR)$(TARGET0)`\"", false) << "\n\t"
15645               << varGlue("QMAKE_LN_SHLIB","-"," "," Versions/" +
15646                          project->first("QMAKE_FRAMEWORK_VERSION") +
15647                          "/$(TARGET) $(DESTDIR)$(TARGET0)") << "\n\t"
15648               << "-$(DEL_FILE) " << destdir << "Versions/Current" << "\n\t"
15649               << varGlue("QMAKE_LN_SHLIB","-"," ", " " + project->first("QMAKE_FRAMEWORK_VERSION") +
15650                          " " + destdir + "Versions/Current") << "\n\t";
15651             if(!project->isEmpty("QMAKE_POST_LINK"))
15652                 t << "\n\t" << var("QMAKE_POST_LINK");
15653             t << endl << endl;
15654         } else if(project->isEmpty("QMAKE_HPUX_SHLIB")) {
15655             t << "\n\t"
15656               << "-$(DEL_FILE) $(TARGET) $(TARGET0) $(TARGET1) $(TARGET2)" << "\n\t"
15657               << var("QMAKE_LINK_SHLIB_CMD") << "\n\t";
15658             t << varGlue("QMAKE_LN_SHLIB","-"," "," $(TARGET) $(TARGET0)") << "\n\t"
15659               << varGlue("QMAKE_LN_SHLIB","-"," "," $(TARGET) $(TARGET1)") << "\n\t"
15660               << varGlue("QMAKE_LN_SHLIB","-"," "," $(TARGET) $(TARGET2)");
15661             if(!destdir.isEmpty())
15662                 t << "\n\t"
15663                   << "-$(DEL_FILE) " << destdir << "$(TARGET)\n\t"
15664                   << "-$(DEL_FILE) " << destdir << "$(TARGET0)\n\t"
15665                   << "-$(DEL_FILE) " << destdir << "$(TARGET1)\n\t"
15666                   << "-$(DEL_FILE) " << destdir << "$(TARGET2)\n\t"
15667                   << "-$(MOVE) $(TARGET) $(TARGET0) $(TARGET1) $(TARGET2) " << destdir;
15668             if(!project->isEmpty("QMAKE_POST_LINK"))
15669                 t << "\n\t" << var("QMAKE_POST_LINK");
15670             t << endl << endl;
15671         } else {
15672             t << "\n\t"
15673               << "-$(DEL_FILE) $(TARGET) $(TARGET0)" << "\n\t"
15674               << var("QMAKE_LINK_SHLIB_CMD") << "\n\t";
15675             t << varGlue("QMAKE_LN_SHLIB",""," "," $(TARGET) $(TARGET0)");
15676             if(!destdir.isEmpty())
15677                 t << "\n\t"
15678                    << "-$(DEL_FILE) " << destdir << "$(TARGET)\n\t"
15679                    << "-$(DEL_FILE) " << destdir << "$(TARGET0)\n\t"
15680                    << "-$(MOVE) $(TARGET) $(TARGET0) " << destdir;
15681             if(!project->isEmpty("QMAKE_POST_LINK"))
15682                 t << "\n\t" << var("QMAKE_POST_LINK");
15683             t << endl << endl;
15684         }
15685         t << endl << endl;
15686
15687         if (! project->isActiveConfig("plugin")) {
15688             t << "staticlib: $(TARGETA)" << endl << endl;
15689             t << "$(TARGETA): " << var("PRE_TARGETDEPS") << " $(OBJECTS) $(OBJCOMP)";
15690             if(do_incremental)
15691                 t << " $(INCREMENTAL_OBJECTS)";
15692             t << " " << var("POST_TARGETDEPS") << "\n\t"
15693               << "-$(DEL_FILE) $(TARGETA) " << "\n\t"
15694               << var("QMAKE_AR_CMD");
15695             if(do_incremental)
15696                 t << " $(INCREMENTAL_OBJECTS)";
15697             if(!project->isEmpty("QMAKE_RANLIB"))
15698                 t << "\n\t" << "$(RANLIB) $(TARGETA)";
15699             t << endl << endl;
15700         }
15701     } else {
15702         QString destdir = project->first("DESTDIR");
15703         t << "all: " << deps << " " << valGlue(escapeFilePaths(project->values("ALL_DEPS")),""," "," ") << destdir << "$(TARGET) "
15704           << varGlue("QMAKE_AR_SUBLIBS", destdir, " " + destdir, "") << "\n\n"
15705           << "staticlib: " << destdir << "$(TARGET)" << "\n\n";
15706         if(project->isEmpty("QMAKE_AR_SUBLIBS")) {
15707             t << destdir << "$(TARGET): " << var("PRE_TARGETDEPS")
15708               << " $(OBJECTS) $(OBJCOMP) " << var("POST_TARGETDEPS") << "\n\t";
15709             if(!destdir.isEmpty())
15710                 t << mkdir_p_asstring(destdir) << "\n\t";
15711             t << "-$(DEL_FILE) $(TARGET)" << "\n\t"
15712               << var("QMAKE_AR_CMD") << "\n";
15713             if(!project->isEmpty("QMAKE_POST_LINK"))
15714                 t << "\t" << var("QMAKE_POST_LINK") << "\n";
15715             if(!project->isEmpty("QMAKE_RANLIB"))
15716                 t << "\t" << "$(RANLIB) $(TARGET)" << "\n";
15717             if(!destdir.isEmpty())
15718                 t << "\t" << "-$(DEL_FILE) " << destdir << "$(TARGET)" << "\n"
15719                   << "\t" << "-$(MOVE) $(TARGET) " << destdir << "\n";
15720         } else {
15721             int max_files = project->first("QMAKE_MAX_FILES_PER_AR").toInt();
15722             QStringList objs = project->values("OBJECTS") + project->values("OBJCOMP"),
15723                         libs = project->values("QMAKE_AR_SUBLIBS");
15724             libs.prepend("$(TARGET)");
15725             for(QStringList::Iterator libit = libs.begin(), objit = objs.begin();
15726                 libit != libs.end(); ++libit) {
15727                 QStringList build;
15728                 for(int cnt = 0; cnt < max_files && objit != objs.end(); ++objit, cnt++)
15729                     build << (*objit);
15730                 QString ar;
15731                 if((*libit) == "$(TARGET)") {
15732                     t << destdir << "$(TARGET): " << var("PRE_TARGETDEPS")
15733                       << " " << var("POST_TARGETDEPS") << valList(build) << "\n\t";
15734                     ar = project->values("QMAKE_AR_CMD").first();
15735                     ar = ar.replace("$(OBJECTS)", build.join(" "));
15736                 } else {
15737                     t << (*libit) << ": " << valList(build) << "\n\t";
15738                     ar = "$(AR) " + (*libit) + " " + build.join(" ");
15739                 }
15740                 if(!destdir.isEmpty())
15741                     t << mkdir_p_asstring(destdir) << "\n\t";
15742                 t << "-$(DEL_FILE) " << (*libit) << "\n\t"
15743                   << ar << "\n";
15744                 if(!project->isEmpty("QMAKE_POST_LINK"))
15745                     t << "\t" << var("QMAKE_POST_LINK") << "\n";
15746                 if(!project->isEmpty("QMAKE_RANLIB"))
15747                     t << "\t" << "$(RANLIB) " << (*libit) << "\n";
15748                 if(!destdir.isEmpty())
15749                     t << "\t" << "-$(DEL_FILE) " << destdir << (*libit) << "\n"
15750                       << "\t" << "-$(MOVE) " << (*libit) << " " << destdir << "\n";
15751             }
15752         }
15753         t << endl << endl;
15754     }
15755
15756     writeMakeQmake(t);
15757     if(project->isEmpty("QMAKE_FAILED_REQUIREMENTS") && !project->isActiveConfig("no_autoqmake")) {
15758         QString meta_files;
15759         if(project->isActiveConfig("create_libtool") && project->first("TEMPLATE") == "lib" &&
15760            !project->isActiveConfig("compile_libtool")) {
15761             if(!meta_files.isEmpty())
15762                 meta_files += " ";
15763             meta_files += libtoolFileName();
15764         }
15765         if(project->isActiveConfig("create_pc") && project->first("TEMPLATE") == "lib") {
15766             if(!meta_files.isEmpty())
15767                 meta_files += " ";
15768             meta_files += pkgConfigFileName();
15769         }
15770         if(!meta_files.isEmpty())
15771             t << meta_files << ": " << "\n\t"
15772               << "@$(QMAKE) -prl " << buildArgs() << " " << project->projectFile() << endl;
15773     }
15774
15775     if(!project->first("QMAKE_PKGINFO").isEmpty()) {
15776         QString pkginfo = escapeFilePath(project->first("QMAKE_PKGINFO"));
15777         QString destdir = escapeFilePath(project->first("DESTDIR") + project->first("QMAKE_BUNDLE") + "/Contents");
15778         t << pkginfo << ": " << "\n\t";
15779         if(!destdir.isEmpty())
15780             t << mkdir_p_asstring(destdir) << "\n\t";
15781         t << "@$(DEL_FILE) " << pkginfo << "\n\t"
15782           << "@echo \"APPL"
15783           << (project->isEmpty("QMAKE_PKGINFO_TYPEINFO") ? QString::fromLatin1("????") : project->first("QMAKE_PKGINFO_TYPEINFO").left(4))
15784           << "\" >" << pkginfo << endl;
15785     }
15786     if(!project->isEmpty("QMAKE_BUNDLE")) {
15787
15788         QString info_plist = escapeFilePath(fileFixify(project->first("QMAKE_INFO_PLIST"))),
15789             info_plist_out = escapeFilePath(project->first("QMAKE_INFO_PLIST_OUT"));
15790         QString destdir = info_plist_out.section(Option::dir_sep, 0, -2);
15791         t << info_plist_out << ": " << "\n\t";
15792         if(!destdir.isEmpty())
15793             t << mkdir_p_asstring(destdir) << "\n\t";
15794         if(project->first("TEMPLATE") == "app") {
15795             QString icon = fileFixify(var("ICON"));
15796             t << "@$(DEL_FILE) " << info_plist_out << "\n\t"
15797               << "@sed "
15798               << "-e \"s,@ICON@," << icon.section(Option::dir_sep, -1) << ",g\" "
15799               << "-e \"s,@EXECUTABLE@," << var("QMAKE_ORIG_TARGET") << ",g\" "
15800               << "-e \"s,@TYPEINFO@,"<< (project->isEmpty("QMAKE_PKGINFO_TYPEINFO") ?
15801                          QString::fromLatin1("????") : project->first("QMAKE_PKGINFO_TYPEINFO").left(4)) << ",g\" "
15802               << "" << info_plist << " >" << info_plist_out << endl;
15803
15804             if(!project->isEmpty("ICON")) {
15805                 QString dir = project->first("DESTDIR") + project->first("QMAKE_BUNDLE") + "/Contents/Resources/";
15806                 const QString icon_path = escapeFilePath(dir + icon.section(Option::dir_sep, -1));
15807                 t << icon_path << ": " << icon << "\n\t"
15808                   << mkdir_p_asstring(dir) << "\n\t"
15809                   << "@$(DEL_FILE) " << icon_path << "\n\t"
15810                   << "@$(COPY_FILE) " << escapeFilePath(icon) << " " << icon_path << endl;
15811             }
15812         } else {
15813             t << "@$(DEL_FILE) " << info_plist_out << "\n\t"
15814               << "@sed "
15815               << "-e \"s,@LIBRARY@," << var("QMAKE_ORIG_TARGET") << ",g\" "
15816               << "-e \"s,@SHORT_VERSION@," << project->first("VER_MAJ") << "." << project->first("VER_MIN") << ",g\" "
15817               << "-e \"s,@TYPEINFO@,"
15818               << (project->isEmpty("QMAKE_PKGINFO_TYPEINFO") ?
15819                   QString::fromLatin1("????") : project->first("QMAKE_PKGINFO_TYPEINFO").left(4)) << ",g\" "
15820               << "" << info_plist << " >" << info_plist_out << endl;
15821         }
15822
15823         if(!project->isEmpty("QMAKE_BUNDLE_DATA")) {
15824             QString bundle_dir = project->first("DESTDIR") + project->first("QMAKE_BUNDLE") + "/";
15825             const QStringList &bundle_data = project->values("QMAKE_BUNDLE_DATA");
15826             for(int i = 0; i < bundle_data.count(); i++) {
15827                 const QStringList &files = project->values(bundle_data[i] + ".files");
15828                 QString path = bundle_dir;
15829                 if(!project->isEmpty(bundle_data[i] + ".version")) {
15830                     QString version = project->first(bundle_data[i] + ".version") + "/" +
15831                                       project->first("QMAKE_FRAMEWORK_VERSION") + "/";
15832                     t << Option::fixPathToLocalOS(path + project->first(bundle_data[i] + ".path")) << ": " << "\n\t"
15833                       << mkdir_p_asstring(path) << "\n\t"
15834                       << "@$(SYMLINK) " << version << project->first(bundle_data[i] + ".path") << " " << path << endl;
15835                     path += version;
15836                 }
15837                 path += project->first(bundle_data[i] + ".path");
15838                 path = Option::fixPathToLocalOS(path);
15839                 for(int file = 0; file < files.count(); file++) {
15840                     const QString dst = path + Option::dir_sep + fileInfo(files[file]).fileName();
15841                     t << dst << ": " << files[file] << "\n\t"
15842                       << mkdir_p_asstring(path) << "\n\t";
15843                     QFileInfo fi(fileInfo(files[file]));
15844                     if(fi.isDir())
15845                         t << "@$(DEL_FILE) -r " << dst << "\n\t"
15846                           << "@$(COPY_DIR) " << files[file] << " " << dst << endl;
15847                     else
15848                         t << "@$(DEL_FILE) " << dst << "\n\t"
15849                           << "@$(COPY_FILE) " << files[file] << " " << dst << endl;
15850                 }
15851             }
15852         }
15853     }
15854
15855     QString ddir;
15856     QString packageName(project->first("QMAKE_ORIG_TARGET"));
15857     if(!project->isActiveConfig("no_dist_version"))
15858         packageName += var("VERSION");
15859     if (project->isEmpty("QMAKE_DISTDIR"))
15860         ddir = packageName;
15861     else
15862         ddir = project->first("QMAKE_DISTDIR");
15863
15864     QString ddir_c = escapeFilePath(fileFixify((project->isEmpty("OBJECTS_DIR") ? QString(".tmp/") :
15865                                                 project->first("OBJECTS_DIR")) + ddir));
15866     t << "dist: " << "\n\t"
15867       << mkdir_p_asstring(ddir_c) << "\n\t"
15868       << "$(COPY_FILE) --parents $(SOURCES) $(DIST) " << ddir_c << Option::dir_sep << " && ";
15869     if(!project->isEmpty("QMAKE_EXTRA_COMPILERS")) {
15870         const QStringList &quc = project->values("QMAKE_EXTRA_COMPILERS");
15871         for(QStringList::ConstIterator it = quc.begin(); it != quc.end(); ++it) {
15872             const QStringList &var = project->values((*it)+".input");
15873             for(QStringList::ConstIterator var_it = var.begin(); var_it != var.end(); ++var_it) {
15874                 const QStringList &val = project->values((*var_it));
15875                 if(val.isEmpty())
15876                     continue;
15877                 t << "$(COPY_FILE) --parents " << val.join(" ") << " " << ddir_c << Option::dir_sep << " && ";
15878             }
15879         }
15880     }
15881     if(!project->isEmpty("TRANSLATIONS"))
15882         t << "$(COPY_FILE) --parents " << var("TRANSLATIONS") << " " << ddir_c << Option::dir_sep << " && ";
15883     t << "(cd `dirname " << ddir_c << "` && "
15884       << "$(TAR) " << packageName << ".tar " << ddir << " && "
15885       << "$(COMPRESS) " << packageName << ".tar) && "
15886       << "$(MOVE) `dirname " << ddir_c << "`" << Option::dir_sep << packageName << ".tar.gz . && "
15887       << "$(DEL_FILE) -r " << ddir_c
15888       << endl << endl;
15889
15890     t << endl;
15891
15892     QString clean_targets = "compiler_clean " + var("CLEAN_DEPS");
15893     if(do_incremental) {
15894         t << "incrclean:" << "\n";
15895         if(src_incremental)
15896             t << "\t-$(DEL_FILE) $(INCREMENTAL_OBJECTS)" << "\n";
15897         t << endl;
15898     }
15899
15900     t << "clean:" << clean_targets << "\n\t";
15901     if(!project->isEmpty("OBJECTS")) {
15902         if(project->isActiveConfig("compile_libtool"))
15903             t << "-$(LIBTOOL) --mode=clean $(DEL_FILE) $(OBJECTS)" << "\n\t";
15904         else
15905             t << "-$(DEL_FILE) $(OBJECTS)" << "\n\t";
15906     }
15907     if(doPrecompiledHeaders() && !project->isEmpty("PRECOMPILED_HEADER")) {
15908         QStringList precomp_files;
15909         QString precomph_out_dir;
15910
15911         if(!project->isEmpty("PRECOMPILED_DIR"))
15912             precomph_out_dir = project->first("PRECOMPILED_DIR");
15913         precomph_out_dir += project->first("QMAKE_ORIG_TARGET") + project->first("QMAKE_PCH_OUTPUT_EXT");
15914
15915         if (project->isActiveConfig("icc_pch_style")) {
15916
15917             QString pchBaseName = project->first("QMAKE_ORIG_TARGET");
15918             QString pchOutput;
15919             if(!project->isEmpty("PRECOMPILED_DIR"))
15920                 pchOutput = project->first("PRECOMPILED_DIR");
15921             pchOutput += pchBaseName + project->first("QMAKE_PCH_OUTPUT_EXT");
15922             QString sourceFile = pchOutput + Option::cpp_ext.first();
15923             QString objectFile = createObjectList(QStringList(sourceFile)).first();
15924
15925             precomp_files << precomph_out_dir << sourceFile << objectFile;
15926         } else {
15927
15928             precomph_out_dir += Option::dir_sep;
15929
15930             QString header_prefix = project->first("QMAKE_PRECOMP_PREFIX");
15931             if(!project->isEmpty("QMAKE_CFLAGS_PRECOMPILE"))
15932                 precomp_files += precomph_out_dir + header_prefix + "c";
15933             if(!project->isEmpty("QMAKE_CXXFLAGS_PRECOMPILE"))
15934                 precomp_files += precomph_out_dir + header_prefix + "c++";
15935             if(project->isActiveConfig("objective_c")) {
15936                 if(!project->isEmpty("QMAKE_OBJCFLAGS_PRECOMPILE"))
15937                     precomp_files += precomph_out_dir + header_prefix + "objective-c";
15938                 if(!project->isEmpty("QMAKE_OBJCXXFLAGS_PRECOMPILE"))
15939                     precomp_files += precomph_out_dir + header_prefix + "objective-c++";
15940             }
15941         }
15942         t << "-$(DEL_FILE) " << precomp_files.join(" ") << "\n\t";
15943     }
15944     if(!project->isEmpty("IMAGES"))
15945         t << varGlue("QMAKE_IMAGE_COLLECTION", "\t-$(DEL_FILE) ", " ", "") << "\n\t";
15946     if(src_incremental)
15947         t << "-$(DEL_FILE) $(INCREMENTAL_OBJECTS)" << "\n\t";
15948     t << varGlue("QMAKE_CLEAN","-$(DEL_FILE) "," ","\n\t")
15949       << "-$(DEL_FILE) *~ core *.core" << "\n"
15950       << varGlue("CLEAN_FILES","\t-$(DEL_FILE) "," ","") << endl << endl;
15951     t << "####### Sub-libraries" << endl << endl;
15952     if (!project->values("SUBLIBS").isEmpty()) {
15953         QString libdir = "tmp/";
15954         if(!project->isEmpty("SUBLIBS_DIR"))
15955             libdir = project->first("SUBLIBS_DIR");
15956         QStringList &l = project->values("SUBLIBS");
15957         for(it = l.begin(); it != l.end(); ++it)
15958             t << libdir << "lib" << (*it) << ".a" << ":\n\t"
15959               << var(QString("MAKELIB") + (*it)) << endl << endl;
15960     }
15961
15962     QString destdir = project->first("DESTDIR");
15963     if(!destdir.isEmpty() && destdir.right(1) != Option::dir_sep)
15964         destdir += Option::dir_sep;
15965     t << "distclean: " << "clean\n";
15966     if(!project->isEmpty("QMAKE_BUNDLE")) {
15967         QString bundlePath = escapeFilePath(destdir + project->first("QMAKE_BUNDLE"));
15968         t << "\t-$(DEL_FILE) -r " << bundlePath << endl;
15969     } else if(project->isActiveConfig("compile_libtool")) {
15970         t << "\t-$(LIBTOOL) --mode=clean $(DEL_FILE) " << "$(TARGET)" << endl;
15971     } else if(!project->isActiveConfig("staticlib") && project->values("QMAKE_APP_FLAG").isEmpty() &&
15972        !project->isActiveConfig("plugin")) {
15973         t << "\t-$(DEL_FILE) " << destdir << "$(TARGET)" << " " << endl
15974           << "\t-$(DEL_FILE) " << destdir << "$(TARGET0) " << destdir << "$(TARGET1) "
15975           << destdir << "$(TARGET2) $(TARGETA)" << endl;
15976     } else {
15977         t << "\t-$(DEL_FILE) " << "$(TARGET)" << " " << endl;
15978     }
15979     t << varGlue("QMAKE_DISTCLEAN","\t-$(DEL_FILE) "," ","\n");
15980     {
15981         QString ofile = Option::fixPathToTargetOS(fileFixify(Option::output.fileName()));
15982         if(!ofile.isEmpty())
15983             t << "\t-$(DEL_FILE) " << ofile << endl;
15984     }
15985     t << endl << endl;
15986
15987     if(doPrecompiledHeaders() && !project->isEmpty("PRECOMPILED_HEADER")) {
15988         QString pchInput = project->first("PRECOMPILED_HEADER");
15989         t << "###### Prefix headers" << endl;
15990         QString comps[] = { "C", "CXX", "OBJC", "OBJCXX", QString() };
15991         for(int i = 0; !comps[i].isNull(); i++) {
15992             QString pchFlags = var("QMAKE_" + comps[i] + "FLAGS_PRECOMPILE");
15993             if(pchFlags.isEmpty())
15994                 continue;
15995
15996             QString cflags;
15997             if(comps[i] == "OBJC" || comps[i] == "OBJCXX")
15998                 cflags += " $(CFLAGS)";
15999             else
16000                 cflags += " $(" + comps[i] + "FLAGS)";
16001
16002             QString pchBaseName = project->first("QMAKE_ORIG_TARGET");
16003             QString pchOutput;
16004             if(!project->isEmpty("PRECOMPILED_DIR"))
16005                 pchOutput = project->first("PRECOMPILED_DIR");
16006             pchOutput += pchBaseName + project->first("QMAKE_PCH_OUTPUT_EXT");
16007
16008             if (project->isActiveConfig("icc_pch_style")) {
16009
16010                 QString sourceFile = pchOutput + Option::cpp_ext.first();
16011                 QString objectFile = createObjectList(QStringList(sourceFile)).first();
16012                 t << pchOutput << ": " << pchInput << " " << findDependencies(pchInput).join(" \\\n\t\t")
16013                   << "\n\techo \"// Automatically generated, do not modify\" > " << sourceFile
16014                   << "\n\trm -f " << pchOutput;
16015
16016                 pchFlags = pchFlags.replace("${QMAKE_PCH_TEMP_SOURCE}", sourceFile)
16017                            .replace("${QMAKE_PCH_TEMP_OBJECT}", objectFile);
16018             } else {
16019
16020                 QString header_prefix = project->first("QMAKE_PRECOMP_PREFIX");
16021
16022                 pchOutput += Option::dir_sep;
16023                 QString pchOutputDir = pchOutput, pchOutputFile;
16024
16025                 if(comps[i] == "C") {
16026                     pchOutputFile = "c";
16027                 } else if(comps[i] == "CXX") {
16028                     pchOutputFile = "c++";
16029                 } else if(project->isActiveConfig("objective_c")) {
16030                     if(comps[i] == "OBJC")
16031                         pchOutputFile = "objective-c";
16032                     else if(comps[i] == "OBJCXX")
16033                         pchOutputFile = "objective-c++";
16034                 }
16035                 if(pchOutputFile.isEmpty())
16036                     continue;
16037                 pchOutput += header_prefix + pchOutputFile;
16038
16039                 t << pchOutput << ": " << pchInput << " " << findDependencies(pchInput).join(" \\\n\t\t")
16040                   << "\n\t" << mkdir_p_asstring(pchOutputDir);
16041             }
16042             pchFlags = pchFlags.replace("${QMAKE_PCH_INPUT}", pchInput)
16043                        .replace("${QMAKE_PCH_OUTPUT_BASE}", pchBaseName)
16044                        .replace("${QMAKE_PCH_OUTPUT}", pchOutput);
16045
16046             QString compiler;
16047             if(comps[i] == "C" || comps[i] == "OBJC" || comps[i] == "OBJCXX")
16048                 compiler = "$(CC)";
16049             else
16050                 compiler = "$(CXX)";
16051
16052
16053             t << "\n\t" << compiler << cflags << " $(INCPATH) " << pchFlags << endl << endl;
16054         }
16055     }
16056
16057     writeExtraTargets(t);
16058     writeExtraCompilerTargets(t);
16059 }
16060
16061 void UnixMakefileGenerator::init2()
16062 {
16063
16064     if(project->isEmpty("VERSION"))
16065         project->values("VERSION").append("1.0." +
16066                                                (project->isEmpty("VER_PAT") ? QString("0") :
16067                                                 project->first("VER_PAT")));
16068     QStringList l = project->first("VERSION").split('.');
16069     l << "0" << "0";
16070     project->values("VER_MAJ").append(l[0]);
16071     project->values("VER_MIN").append(l[1]);
16072     project->values("VER_PAT").append(l[2]);
16073     if(project->isEmpty("QMAKE_FRAMEWORK_VERSION"))
16074         project->values("QMAKE_FRAMEWORK_VERSION").append(project->values("VER_MAJ").first());
16075
16076     if (!project->values("QMAKE_APP_FLAG").isEmpty()) {
16077         if(!project->isEmpty("QMAKE_BUNDLE")) {
16078             QString bundle_loc = project->first("QMAKE_BUNDLE_LOCATION");
16079             if(!bundle_loc.isEmpty() && !bundle_loc.startsWith("/"))
16080                 bundle_loc.prepend("/");
16081             if(!bundle_loc.endsWith("/"))
16082                 bundle_loc += "/";
16083             project->values("TARGET").first().prepend(project->first("QMAKE_BUNDLE") + bundle_loc);
16084         }
16085         if(!project->isEmpty("TARGET"))
16086             project->values("TARGET").first().prepend(project->first("DESTDIR"));
16087        if (!project->values("QMAKE_CYGWIN_EXE").isEmpty())
16088             project->values("TARGET_EXT").append(".exe");
16089     } else if (project->isActiveConfig("staticlib")) {
16090         project->values("TARGET").first().prepend("lib");
16091         project->values("TARGET").first() += ".a";
16092         if(project->values("QMAKE_AR_CMD").isEmpty())
16093             project->values("QMAKE_AR_CMD").append("$(AR) $(TARGET) $(OBJECTS)");
16094     } else {
16095         project->values("TARGETA").append(project->first("DESTDIR") + "lib" + project->first("TARGET") + ".a");
16096         if(project->isActiveConfig("compile_libtool"))
16097             project->values("TARGET_la") = QStringList(project->first("DESTDIR") + "lib" + project->first("TARGET") + Option::libtool_ext);
16098
16099         if (!project->values("QMAKE_AR_CMD").isEmpty())
16100             project->values("QMAKE_AR_CMD").first().replace("(TARGET)","(TARGETA)");
16101         else
16102             project->values("QMAKE_AR_CMD").append("$(AR) $(TARGETA) $(OBJECTS)");
16103         if(project->isActiveConfig("compile_libtool")) {
16104             project->values("TARGET") = project->values("TARGET_la");
16105         } else if(!project->isEmpty("QMAKE_BUNDLE")) {
16106             QString bundle_loc = project->first("QMAKE_BUNDLE_LOCATION");
16107             if(!bundle_loc.isEmpty() && !bundle_loc.startsWith("/"))
16108                 bundle_loc.prepend("/");
16109             if(!bundle_loc.endsWith("/"))
16110                 bundle_loc += "/";
16111             project->values("TARGET_").append(project->first("QMAKE_BUNDLE") +
16112                                                    bundle_loc + unescapeFilePath(project->first("TARGET")));
16113             project->values("TARGET_x.y").append(project->first("QMAKE_BUNDLE") +
16114                                                       "/Versions/" +
16115                                                       project->first("QMAKE_FRAMEWORK_VERSION") +
16116                                                       bundle_loc + unescapeFilePath(project->first("TARGET")));
16117         } else if(project->isActiveConfig("plugin")) {
16118             QString prefix;
16119             if(!project->isActiveConfig("no_plugin_name_prefix"))
16120                 prefix = "lib";
16121             project->values("TARGET_x.y.z").append(prefix +
16122                                                         project->first("TARGET") + "." +
16123                                                         project->first("QMAKE_EXTENSION_PLUGIN"));
16124             if(project->isActiveConfig("lib_version_first"))
16125                 project->values("TARGET_x").append(prefix + project->first("TARGET") + "." +
16126                                                         project->first("VER_MAJ") + "." +
16127                                                         project->first("QMAKE_EXTENSION_PLUGIN"));
16128             else
16129                 project->values("TARGET_x").append(prefix + project->first("TARGET") + "." +
16130                                                         project->first("QMAKE_EXTENSION_PLUGIN") +
16131                                                         "." + project->first("VER_MAJ"));
16132             project->values("TARGET") = project->values("TARGET_x.y.z");
16133         } else if (!project->isEmpty("QMAKE_HPUX_SHLIB")) {
16134             project->values("TARGET_").append("lib" + project->first("TARGET") + ".sl");
16135             if(project->isActiveConfig("lib_version_first"))
16136                 project->values("TARGET_x").append("lib" + project->first("VER_MAJ") + "." +
16137                                                         project->first("TARGET"));
16138             else
16139                 project->values("TARGET_x").append("lib" + project->first("TARGET") + "." +
16140                                                         project->first("VER_MAJ"));
16141             project->values("TARGET") = project->values("TARGET_x");
16142         } else if (!project->isEmpty("QMAKE_AIX_SHLIB")) {
16143             project->values("TARGET_").append("lib" + project->first("TARGET") + ".a");
16144             if(project->isActiveConfig("lib_version_first")) {
16145                 project->values("TARGET_x").append("lib" + project->first("TARGET") + "." +
16146                                                         project->first("VER_MAJ") + "." +
16147                                                         project->first("QMAKE_EXTENSION_SHLIB"));
16148                 project->values("TARGET_x.y").append("lib" + project->first("TARGET") + "." +
16149                                                           project->first("VER_MAJ") +
16150                                                           "." + project->first("VER_MIN") + "." +
16151                                                           project->first("QMAKE_EXTENSION_SHLIB"));
16152                 project->values("TARGET_x.y.z").append("lib" + project->first("TARGET") + "." +
16153                                                             project->first("VER_MAJ") + "." +
16154                                                             project->first("VER_MIN") + "." +
16155                                                             project->first("VER_PAT") + "." +
16156                                                             project->first("QMAKE_EXTENSION_SHLIB"));
16157             } else {
16158                 project->values("TARGET_x").append("lib" + project->first("TARGET") + "." +
16159                                                         project->first("QMAKE_EXTENSION_SHLIB") +
16160                                                         "." + project->first("VER_MAJ"));
16161                 project->values("TARGET_x.y").append("lib" + project->first("TARGET") + "." +
16162                                                           project->first("QMAKE_EXTENSION_SHLIB") +
16163                                                           "." + project->first("VER_MAJ") +
16164                                                           "." + project->first("VER_MIN"));
16165                 project->values("TARGET_x.y.z").append("lib" + project->first("TARGET") + "." +
16166                                                             project->first("QMAKE_EXTENSION_SHLIB") + "." +
16167                                                             project->first("VER_MAJ") + "." +
16168                                                             project->first("VER_MIN") + "." +
16169                                                             project->first("VER_PAT"));
16170             }
16171             project->values("TARGET") = project->values("TARGET_x.y.z");
16172         } else {
16173             project->values("TARGET_").append("lib" + project->first("TARGET") + "." +
16174                                                    project->first("QMAKE_EXTENSION_SHLIB"));
16175             if(project->isActiveConfig("lib_version_first")) {
16176                 project->values("TARGET_x").append("lib" + project->first("TARGET") + "." +
16177                                                         project->first("VER_MAJ") + "." +
16178                                                         project->first("QMAKE_EXTENSION_SHLIB"));
16179                 project->values("TARGET_x.y").append("lib" + project->first("TARGET") + "." +
16180                                                           project->first("VER_MAJ") +
16181                                                           "." + project->first("VER_MIN") + "." +
16182                                                           project->first("QMAKE_EXTENSION_SHLIB"));
16183                 project->values("TARGET_x.y.z").append("lib" + project->first("TARGET") + "." +
16184                                                             project->first("VER_MAJ") + "." +
16185                                                             project->first("VER_MIN") + "." +
16186                                                             project->first("VER_PAT") + "." +
16187                                                             project->values("QMAKE_EXTENSION_SHLIB").first());
16188             } else {
16189                 project->values("TARGET_x").append("lib" + project->first("TARGET") + "." +
16190                                                         project->first("QMAKE_EXTENSION_SHLIB") +
16191                                                         "." + project->first("VER_MAJ"));
16192                 project->values("TARGET_x.y").append("lib" + project->first("TARGET") + "." +
16193                                                       project->first("QMAKE_EXTENSION_SHLIB")
16194                                                       + "." + project->first("VER_MAJ") +
16195                                                       "." + project->first("VER_MIN"));
16196                 project->values("TARGET_x.y.z").append("lib" + project->first("TARGET") +
16197                                                             "." +
16198                                                             project->values(
16199                                                                 "QMAKE_EXTENSION_SHLIB").first() + "." +
16200                                                             project->first("VER_MAJ") + "." +
16201                                                             project->first("VER_MIN") + "." +
16202                                                             project->first("VER_PAT"));
16203             }
16204             project->values("TARGET") = project->values("TARGET_x.y.z");
16205         }
16206         if(project->isEmpty("QMAKE_LN_SHLIB"))
16207             project->values("QMAKE_LN_SHLIB").append("ln -s");
16208         if (!project->values("QMAKE_LFLAGS_SONAME").isEmpty()) {
16209             QString soname;
16210             if(project->isActiveConfig("plugin")) {
16211                 if(!project->values("TARGET").isEmpty())
16212                     soname += project->first("TARGET");
16213             } else if(!project->isEmpty("QMAKE_BUNDLE")) {
16214                 soname += project->first("TARGET_x.y");
16215             } else if(!project->values("TARGET_x").isEmpty()) {
16216                 soname += project->first("TARGET_x");
16217             }
16218             if(!soname.isEmpty()) {
16219                 if(project->isActiveConfig("absolute_library_soname") &&
16220                    project->values("INSTALLS").indexOf("target") != -1 &&
16221                    !project->isEmpty("target.path")) {
16222                     QString instpath = Option::fixPathToTargetOS(project->first("target.path"));
16223                     if(!instpath.endsWith(Option::dir_sep))
16224                         instpath += Option::dir_sep;
16225                     soname.prepend(instpath);
16226                 }
16227                 project->values("QMAKE_LFLAGS_SONAME").first() += escapeFilePath(soname);
16228             }
16229         }
16230         if (project->values("QMAKE_LINK_SHLIB_CMD").isEmpty())
16231             project->values("QMAKE_LINK_SHLIB_CMD").append(
16232                 "$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS) $(OBJCOMP)");
16233     }
16234     if (!project->values("QMAKE_APP_FLAG").isEmpty()) {
16235         project->values("QMAKE_CFLAGS") += project->values("QMAKE_CFLAGS_APP");
16236         project->values("QMAKE_CXXFLAGS") += project->values("QMAKE_CXXFLAGS_APP");
16237         project->values("QMAKE_LFLAGS") += project->values("QMAKE_LFLAGS_APP");
16238     } else if (project->isActiveConfig("dll")) {
16239         if(!project->isActiveConfig("plugin") || !project->isActiveConfig("plugin_no_share_shlib_cflags")) {
16240             project->values("QMAKE_CFLAGS") += project->values("QMAKE_CFLAGS_SHLIB");
16241             project->values("QMAKE_CXXFLAGS") += project->values("QMAKE_CXXFLAGS_SHLIB");
16242         }
16243         if (project->isActiveConfig("plugin")) {
16244             project->values("QMAKE_CFLAGS") += project->values("QMAKE_CFLAGS_PLUGIN");
16245             project->values("QMAKE_CXXFLAGS") += project->values("QMAKE_CXXFLAGS_PLUGIN");
16246             project->values("QMAKE_LFLAGS") += project->values("QMAKE_LFLAGS_PLUGIN");
16247             if(project->isActiveConfig("plugin_with_soname") && !project->isActiveConfig("compile_libtool"))
16248                 project->values("QMAKE_LFLAGS") += project->values("QMAKE_LFLAGS_SONAME");
16249         } else {
16250             project->values("QMAKE_LFLAGS") += project->values("QMAKE_LFLAGS_SHLIB");
16251             if(!project->isEmpty("QMAKE_LFLAGS_COMPAT_VERSION")) {
16252                 if(project->isEmpty("COMPAT_VERSION"))
16253                     project->values("QMAKE_LFLAGS") += QString(project->first("QMAKE_LFLAGS_COMPAT_VERSION") +
16254                                                                     project->first("VER_MAJ") + "." +
16255                                                                     project->first("VER_MIN"));
16256                 else
16257                     project->values("QMAKE_LFLAGS") += QString(project->first("QMAKE_LFLAGS_COMPAT_VERSION") +
16258                                                                     project->first("COMPATIBILITY_VERSION"));
16259             }
16260             if(!project->isEmpty("QMAKE_LFLAGS_VERSION")) {
16261                 project->values("QMAKE_LFLAGS") += QString(project->first("QMAKE_LFLAGS_VERSION") +
16262                                                                 project->first("VER_MAJ") + "." +
16263                                                                 project->first("VER_MIN") + "." +
16264                                                                 project->first("VER_PAT"));
16265             }
16266             if(!project->isActiveConfig("compile_libtool"))
16267                 project->values("QMAKE_LFLAGS") += project->values("QMAKE_LFLAGS_SONAME");
16268         }
16269     }
16270
16271     if(!project->isEmpty("QMAKE_BUNDLE")) {
16272         QString plist = fileFixify(project->first("QMAKE_INFO_PLIST"));
16273         if(plist.isEmpty())
16274             plist = specdir() + QDir::separator() + "Info.plist." + project->first("TEMPLATE");
16275         if(exists(Option::fixPathToLocalOS(plist))) {
16276             if(project->isEmpty("QMAKE_INFO_PLIST"))
16277                 project->values("QMAKE_INFO_PLIST").append(plist);
16278             project->values("QMAKE_INFO_PLIST_OUT").append(project->first("DESTDIR") +
16279                                                                 project->first("QMAKE_BUNDLE") +
16280                                                                 "/Contents/Info.plist");
16281             project->values("ALL_DEPS") += project->first("QMAKE_INFO_PLIST_OUT");
16282             if(!project->isEmpty("ICON") && project->first("TEMPLATE") == "app")
16283                 project->values("ALL_DEPS") += project->first("DESTDIR") +
16284                                                     project->first("QMAKE_BUNDLE") +
16285                                                     "/Contents/Resources/" + project->first("ICON").section('/', -1);
16286             if(!project->isEmpty("QMAKE_BUNDLE_DATA")) {
16287                 QString bundle_dir = project->first("DESTDIR") + project->first("QMAKE_BUNDLE") + "/";
16288                 QStringList &alldeps = project->values("ALL_DEPS");
16289                 const QStringList &bundle_data = project->values("QMAKE_BUNDLE_DATA");
16290                 for(int i = 0; i < bundle_data.count(); i++) {
16291                     const QStringList &files = project->values(bundle_data[i] + ".files");
16292                     QString path = bundle_dir;
16293                     if(!project->isEmpty(bundle_data[i] + ".version")) {
16294                         alldeps += Option::fixPathToLocalOS(path + Option::dir_sep +
16295                                                             project->first(bundle_data[i] + ".path"));
16296                         path += project->first(bundle_data[i] + ".version") + "/" +
16297                                 project->first("QMAKE_FRAMEWORK_VERSION") + "/";
16298                     }
16299                     path += project->first(bundle_data[i] + ".path");
16300                     path = Option::fixPathToLocalOS(path);
16301                     for(int file = 0; file < files.count(); file++)
16302                         alldeps += path + Option::dir_sep + fileInfo(files[file]).fileName();
16303                 }
16304             }
16305         }
16306     }
16307 }
16308
16309 QString
16310 UnixMakefileGenerator::libtoolFileName(bool fixify)
16311 {
16312     QString ret = var("TARGET");
16313     int slsh = ret.lastIndexOf(Option::dir_sep);
16314     if(slsh != -1)
16315         ret = ret.right(ret.length() - slsh - 1);
16316     int dot = ret.indexOf('.');
16317     if(dot != -1)
16318         ret = ret.left(dot);
16319     ret += Option::libtool_ext;
16320     if(!project->isEmpty("QMAKE_LIBTOOL_DESTDIR"))
16321         ret.prepend(project->first("QMAKE_LIBTOOL_DESTDIR") + Option::dir_sep);
16322     if(fixify) {
16323         if(QDir::isRelativePath(ret) && !project->isEmpty("DESTDIR"))
16324             ret.prepend(project->first("DESTDIR"));
16325         ret = Option::fixPathToLocalOS(fileFixify(ret, qmake_getpwd(), Option::output_dir));
16326     }
16327     return ret;
16328 }
16329
16330 void
16331 UnixMakefileGenerator::writeLibtoolFile()
16332 {
16333     QString fname = libtoolFileName(), lname = fname;
16334     mkdir(fileInfo(fname).path());
16335     int slsh = lname.lastIndexOf(Option::dir_sep);
16336     if(slsh != -1)
16337         lname = lname.right(lname.length() - slsh - 1);
16338     QFile ft(fname);
16339     if(!ft.open(QIODevice::WriteOnly))
16340         return;
16341     project->values("ALL_DEPS").append(fileFixify(fname));
16342
16343     QTextStream t(&ft);
16344     t << "# " << lname << " - a libtool library file\n";
16345     t << "# Generated by qmake/libtool (" << qmake_version() << ") (Qt "
16346       << "4.3.2" << ") on: " << QDateTime::currentDateTime().toString();
16347  t << "\n";
16348
16349     t << "# The name that we can dlopen(3).\n"
16350       << "dlname='" << var(project->isActiveConfig("plugin") ? "TARGET" : "TARGET_x")
16351       << "'\n\n";
16352
16353     t << "# Names of this library.\n";
16354     t << "library_names='";
16355     if(project->isActiveConfig("plugin")) {
16356         t << var("TARGET");
16357     } else {
16358         if (project->isEmpty("QMAKE_HPUX_SHLIB"))
16359             t << var("TARGET_x.y.z") << " ";
16360         t << var("TARGET_x") << " " << var("TARGET_");
16361     }
16362     t << "'\n\n";
16363
16364     t << "# The name of the static archive.\n"
16365       << "old_library='" << lname.left(lname.length()-Option::libtool_ext.length()) << ".a'\n\n";
16366
16367     t << "# Libraries that this one depends upon.\n";
16368     QStringList libs;
16369     if(!project->isEmpty("QMAKE_INTERNAL_PRL_LIBS"))
16370         libs = project->values("QMAKE_INTERNAL_PRL_LIBS");
16371     else
16372         libs << "QMAKE_LIBS";
16373     t << "dependency_libs='";
16374     for(QStringList::ConstIterator it = libs.begin(); it != libs.end(); ++it)
16375         t << project->values((*it)).join(" ") << " ";
16376     t << "'\n\n";
16377
16378     t << "# Version information for " << lname << "\n";
16379     int maj = project->first("VER_MAJ").toInt();
16380     int min = project->first("VER_MIN").toInt();
16381     int pat = project->first("VER_PAT").toInt();
16382     t << "current=" << (10*maj + min) << "\n"
16383       << "age=0\n"
16384       << "revision=" << pat << "\n\n";
16385
16386     t << "# Is this an already installed library.\n"
16387         "installed=yes\n\n";
16388
16389     t << "# Files to dlopen/dlpreopen.\n"
16390         "dlopen=''\n"
16391         "dlpreopen=''\n\n";
16392
16393     QString install_dir = project->first("QMAKE_LIBTOOL_LIBDIR");
16394     if(install_dir.isEmpty())
16395         install_dir = project->first("target.path");
16396     if(install_dir.isEmpty())
16397         install_dir = project->first("DESTDIR");
16398     t << "# Directory that this library needs to be installed in:\n"
16399         "libdir='" << Option::fixPathToTargetOS(install_dir, false) << "'\n";
16400 }
16401
16402 QString
16403 UnixMakefileGenerator::pkgConfigFileName(bool fixify)
16404 {
16405     QString ret = var("TARGET");
16406     int slsh = ret.lastIndexOf(Option::dir_sep);
16407     if(slsh != -1)
16408         ret = ret.right(ret.length() - slsh - 1);
16409     if(ret.startsWith("lib"))
16410         ret = ret.mid(3);
16411     int dot = ret.indexOf('.');
16412     if(dot != -1)
16413         ret = ret.left(dot);
16414     ret += Option::pkgcfg_ext;
16415     if(!project->isEmpty("QMAKE_PKGCONFIG_DESTDIR"))
16416         ret.prepend(project->first("QMAKE_PKGCONFIG_DESTDIR") + Option::dir_sep);
16417     if(fixify) {
16418         if(QDir::isRelativePath(ret) && !project->isEmpty("DESTDIR"))
16419             ret.prepend(project->first("DESTDIR"));
16420         ret = Option::fixPathToLocalOS(fileFixify(ret, qmake_getpwd(), Option::output_dir));
16421     }
16422     return ret;
16423 }
16424
16425 QString
16426 UnixMakefileGenerator::pkgConfigPrefix() const
16427 {
16428     if(!project->isEmpty("QMAKE_PKGCONFIG_PREFIX"))
16429         return project->first("QMAKE_PKGCONFIG_PREFIX");
16430     return QLibraryInfo::location(QLibraryInfo::PrefixPath);
16431 }
16432
16433 QString
16434 UnixMakefileGenerator::pkgConfigFixPath(QString path) const
16435 {
16436     QString prefix = pkgConfigPrefix();
16437     if(path.startsWith(prefix))
16438         path = path.replace(prefix, "${prefix}");
16439     return path;
16440 }
16441
16442 void
16443 UnixMakefileGenerator::writePkgConfigFile()
16444 {
16445     QString fname = pkgConfigFileName(), lname = fname;
16446     mkdir(fileInfo(fname).path());
16447     int slsh = lname.lastIndexOf(Option::dir_sep);
16448     if(slsh != -1)
16449         lname = lname.right(lname.length() - slsh - 1);
16450     QFile ft(fname);
16451     if(!ft.open(QIODevice::WriteOnly))
16452         return;
16453     project->values("ALL_DEPS").append(fileFixify(fname));
16454     QTextStream t(&ft);
16455
16456     QString prefix = pkgConfigPrefix();
16457     QString libDir = project->first("QMAKE_PKGCONFIG_LIBDIR");
16458     if(libDir.isEmpty())
16459         libDir = prefix + Option::dir_sep + "lib" + Option::dir_sep;
16460     QString includeDir = project->first("QMAKE_PKGCONFIG_INCDIR");
16461     if(includeDir.isEmpty())
16462         includeDir = prefix + "/include";
16463
16464     t << "prefix=" << prefix << endl;
16465     t << "exec_prefix=${prefix}\n"
16466       << "libdir=" << pkgConfigFixPath(libDir) << "\n"
16467       << "includedir=" << pkgConfigFixPath(includeDir) << endl;
16468
16469
16470     t << varGlue("CONFIG", "qt_config=", " ", "") << endl;
16471
16472
16473     const QStringList &pkgconfig_vars = project->values("QMAKE_PKGCONFIG_VARIABLES");
16474     for(int i = 0; i < pkgconfig_vars.size(); ++i) {
16475         QString var = project->first(pkgconfig_vars.at(i) + ".name"),
16476                 val = project->values(pkgconfig_vars.at(i) + ".value").join(" ");
16477         if(var.isEmpty())
16478             continue;
16479         if(val.isEmpty()) {
16480             const QStringList &var_vars = project->values(pkgconfig_vars.at(i) + ".variable");
16481             for(int v = 0; v < var_vars.size(); ++v) {
16482                 const QStringList &vars = project->values(var_vars.at(v));
16483                 for(int var = 0; var < vars.size(); ++var) {
16484                     if(!val.isEmpty())
16485                         val += " ";
16486                     val += pkgConfigFixPath(vars.at(var));
16487                 }
16488             }
16489         }
16490         t << var << "=" << val << endl;
16491     }
16492
16493     t << endl;
16494
16495     QString name = project->first("QMAKE_PKGCONFIG_NAME");
16496     if(name.isEmpty()) {
16497         name = project->first("QMAKE_ORIG_TARGET").toLower();
16498         name.replace(0, 1, name[0].toUpper());
16499     }
16500     t << "Name: " << name << endl;
16501     QString desc = project->values("QMAKE_PKGCONFIG_DESCRIPTION").join(" ");
16502     if(desc.isEmpty()) {
16503         if(name.isEmpty()) {
16504             desc = project->first("QMAKE_ORIG_TARGET").toLower();
16505             desc.replace(0, 1, desc[0].toUpper());
16506         } else {
16507             desc = name;
16508         }
16509         if(project->first("TEMPLATE") == "lib") {
16510             if(project->isActiveConfig("plugin"))
16511                desc += " Plugin";
16512             else
16513                desc += " Library";
16514         } else if(project->first("TEMPLATE") == "app") {
16515             desc += " Application";
16516         }
16517     }
16518     t << "Description: " << desc << endl;
16519     t << "Version: " << project->first("VERSION") << endl;
16520
16521
16522     QStringList libs;
16523     if(!project->isEmpty("QMAKE_INTERNAL_PRL_LIBS"))
16524         libs = project->values("QMAKE_INTERNAL_PRL_LIBS");
16525     else
16526         libs << "QMAKE_LIBS";
16527     libs << "QMAKE_LFLAGS_THREAD";
16528     t << "Libs: -L${libdir} -l" << lname.left(lname.length()-Option::libtool_ext.length()) << " ";
16529     for(QStringList::ConstIterator it = libs.begin(); it != libs.end(); ++it)
16530         t << project->values((*it)).join(" ") << " ";
16531     t << endl;
16532
16533
16534
16535     t << "Cflags: "
16536
16537       << varGlue("PRL_EXPORT_DEFINES","-D"," -D"," ")
16538       << project->values("PRL_EXPORT_CXXFLAGS").join(" ")
16539       << project->values("QMAKE_PKGCONFIG_CFLAGS").join(" ")
16540
16541       << " -I${includedir}" << endl;
16542     t << endl;
16543 }