]> git.wh0rd.org Git - ICEs.git/blob - 200324/blah.ii
initial import
[ICEs.git] / 200324 / blah.ii
1 // /usr/libexec/gcc/x86_64-pc-linux-gnu/4.1.2/cc1plus -fpreprocessed blah.ii -quiet -dumpbase blah.ii -march=athlon64 -auxbase blah -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
8 # 1 "generators/unix/unixmake.h" 1
9 # 42 "generators/unix/unixmake.h"
10
11 # 1 "generators/makefile.h" 1
12 # 42 "generators/makefile.h"
13
14 # 1 "./option.h" 1
15 # 42 "./option.h"
16
17 # 1 "./project.h" 1
18 # 42 "./project.h"
19
20 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qstringlist.h" 1
21
22 # 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
23 # 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"
24
25 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qalgorithms.h" 1
26
27 # 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
28 # 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"
29
30 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qglobal.h" 1
31
32 # 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
33 # 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"
34
35 # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4
36 # 152 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/stddef.h" 3 4
37 typedef long int ptrdiff_t;
38 # 214 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/stddef.h" 3 4
39 typedef long unsigned int size_t;
40 # 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
41 # 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"
42
43 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qconfig.h" 1
44 # 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
45 # 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"
46 typedef signed char qint8;
47 typedef unsigned char quint8;
48 typedef short qint16;
49 typedef unsigned short quint16;
50 typedef int qint32;
51 typedef unsigned int quint32;
52 # 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"
53 typedef long long qint64;
54 typedef unsigned long long quint64;
55
56
57 typedef qint64 qlonglong;
58 typedef quint64 qulonglong;
59 # 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"
60 template <int> class QUintForSize { private: typedef void Type; };
61 template <> class QUintForSize<4> { public: typedef quint32 Type; };
62 template <> class QUintForSize<8> { public: typedef quint64 Type; };
63 template <typename T> class QUintForType : public QUintForSize<sizeof(T)> { };
64 typedef QUintForType<void *>::Type quintptr;
65
66 template <int> class QIntForSize { private: typedef void Type; };
67 template <> class QIntForSize<4> { public: typedef qint32 Type; };
68 template <> class QIntForSize<8> { public: typedef qint64 Type; };
69 template <typename T> class QIntForType : public QIntForSize<sizeof(T)> { };
70 typedef QIntForType<void *>::Type qptrdiff;
71
72
73
74
75
76 typedef unsigned char uchar;
77 typedef unsigned short ushort;
78 typedef unsigned int uint;
79 typedef unsigned long ulong;
80 # 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"
81 # 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"
82 typedef int QNoImplicitBoolCast;
83 # 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"
84 typedef double qreal;
85
86
87
88
89
90
91 template <typename T>
92 inline T qAbs(const T &t) { return t >= 0 ? t : -t; }
93
94 inline int qRound(qreal d)
95 { return d >= 0.0 ? int(d + 0.5) : int(d - int(d-1) + 0.5) + int(d-1); }
96
97 inline qint64 qRound64(qreal d)
98 { return d >= 0.0 ? qint64(d + 0.5) : qint64(d - qint64(d-1) + 0.5) + qint64(d-1); }
99
100 template <typename T>
101 inline const T &qMin(const T &a, const T &b) { if (a < b) return a; return b; }
102 template <typename T>
103 inline const T &qMax(const T &a, const T &b) { if (a < b) return b; return a; }
104 template <typename T>
105 inline const T &qBound(const T &min, const T &val, const T &max)
106 { return qMax(min, qMin(max, val)); }
107 # 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"
108 class QDataStream;
109 # 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"
110
111 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qfeatures.h" 1
112
113 # 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
114 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qfeatures.h" 2
115 # 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
116 # 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"
117 class QString;
118 class QSysInfo {
119 public:
120     enum Sizes {
121         WordSize = (sizeof(void *)<<3)
122     };
123
124
125     enum Endian {
126         BigEndian,
127         LittleEndian
128     };
129
130     static const int ByteOrder;
131 # 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"
132 };
133
134  const char *qVersion();
135  bool qSharedBuild();
136 # 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"
137  void qDebug(const char *, ...)
138
139     __attribute__ ((format (printf, 1, 2)))
140
141 ;
142
143  void qWarning(const char *, ...)
144
145     __attribute__ ((format (printf, 1, 2)))
146
147 ;
148
149 class QString;
150  QString qt_error_string(int errorCode = -1);
151  void qCritical(const char *, ...)
152
153     __attribute__ ((format (printf, 1, 2)))
154
155 ;
156  void qFatal(const char *, ...)
157
158     __attribute__ ((format (printf, 1, 2)))
159
160 ;
161
162
163
164
165  void qErrnoWarning(int code, const char *msg, ...);
166  void qErrnoWarning(const char *msg, ...);
167 # 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"
168 class QDebug;
169 class QNoDebug;
170
171  inline QDebug qDebug();
172  inline QDebug qWarning();
173  inline QDebug qCritical();
174 # 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"
175 inline void qt_noop() {}
176
177  void qt_assert(const char *assertion, const char *file, int line);
178 # 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"
179  void qt_assert_x(const char *where, const char *what, const char *file, int line);
180 # 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"
181  void qt_check_pointer(const char *, int);
182 # 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"
183 enum QtMsgType { QtDebugMsg, QtWarningMsg, QtCriticalMsg, QtFatalMsg, QtSystemMsg = QtCriticalMsg };
184
185  void qt_message_output(QtMsgType, const char *buf);
186
187 typedef void (*QtMsgHandler)(QtMsgType, const char *);
188  QtMsgHandler qInstallMsgHandler(QtMsgHandler);
189 # 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"
190 template <typename T>
191 class QGlobalStatic
192 {
193 public:
194     T *pointer;
195     inline QGlobalStatic(T *p) : pointer(p) { }
196     inline ~QGlobalStatic() { pointer = 0; }
197 };
198 # 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"
199 class QBool
200 {
201     bool b;
202
203 public:
204     inline explicit QBool(bool B) : b(B) {}
205     inline operator const void *() const
206     { return b ? static_cast<const void *>(this) : static_cast<const void *>(0); }
207 };
208
209 inline bool operator==(QBool b1, bool b2) { return !b1 == !b2; }
210 inline bool operator==(bool b1, QBool b2) { return !b1 == !b2; }
211 inline bool operator==(QBool b1, QBool b2) { return !b1 == !b2; }
212 inline bool operator!=(QBool b1, bool b2) { return !b1 != !b2; }
213 inline bool operator!=(bool b1, QBool b2) { return !b1 != !b2; }
214 inline bool operator!=(QBool b1, QBool b2) { return !b1 != !b2; }
215
216 static inline bool qFuzzyCompare(double p1, double p2)
217 {
218     return qAbs(p1 - p2) < 0.00000000001;
219 }
220
221 static inline bool qFuzzyCompare(float p1, float p2)
222 {
223     return qAbs(p1 - p2) < 0.000001;
224 }
225
226
227
228
229
230
231 static inline bool qIsNull(double d)
232 {
233     union U {
234         double d;
235         quint64 u;
236     };
237     U val;
238     val.d = d;
239     return val.u == quint64(0);
240 }
241
242
243
244
245
246
247 static inline bool qIsNull(float f)
248 {
249     union U {
250         float f;
251         quint32 u;
252     };
253     U val;
254     val.f = f;
255     return val.u == 0u;
256 }
257 # 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"
258 template <typename T> inline bool qIsDetached(T &) { return true; }
259
260 template <typename T>
261 class QTypeInfo
262 {
263 public:
264     enum {
265         isPointer = false,
266         isComplex = true,
267         isStatic = true,
268         isLarge = (sizeof(T)>sizeof(void*)),
269         isDummy = false
270     };
271 };
272
273 template <typename T>
274 class QTypeInfo<T*>
275 {
276 public:
277     enum {
278         isPointer = true,
279         isComplex = false,
280         isStatic = false,
281         isLarge = false,
282         isDummy = false
283     };
284 };
285 # 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"
286 enum {
287     Q_COMPLEX_TYPE = 0,
288     Q_PRIMITIVE_TYPE = 0x1,
289     Q_STATIC_TYPE = 0,
290     Q_MOVABLE_TYPE = 0x2,
291     Q_DUMMY_TYPE = 0x4
292 };
293 # 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"
294 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"; } };
295 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"; } };
296 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"; } };
297 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"; } };
298 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"; } };
299 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"; } };
300 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"; } };
301 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"; } };
302 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"; } };
303 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"; } };
304 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"; } };
305 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"; } };
306 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"; } };
307 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"; } };
308
309 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"; } };
310
311
312
313
314
315
316  void *qMalloc(size_t size);
317  void qFree(void *ptr);
318  void *qRealloc(void *ptr, size_t size);
319  void *qMemCopy(void *dest, const void *src, size_t n);
320  void *qMemSet(void *dest, int c, size_t n);
321 # 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"
322 class QFlag
323 {
324     int i;
325 public:
326     inline QFlag(int i);
327     inline operator int() const { return i; }
328 };
329
330 inline QFlag::QFlag(int ai) : i(ai) {}
331
332
333
334
335 template<typename Enum>
336 class QFlags
337 {
338     typedef void **Zero;
339     int i;
340 public:
341     typedef Enum enum_type;
342     inline QFlags(const QFlags &f) : i(f.i) {}
343     inline QFlags(Enum f) : i(f) {}
344     inline QFlags(Zero = 0) : i(0) {}
345     inline QFlags(QFlag f) : i(f) {}
346
347     inline QFlags &operator=(const QFlags &f) { i = f.i; return *this; }
348     inline QFlags &operator&=(int mask) { i &= mask; return *this; }
349     inline QFlags &operator&=(uint mask) { i &= mask; return *this; }
350     inline QFlags &operator|=(QFlags f) { i |= f.i; return *this; }
351     inline QFlags &operator|=(Enum f) { i |= f; return *this; }
352     inline QFlags &operator^=(QFlags f) { i ^= f.i; return *this; }
353     inline QFlags &operator^=(Enum f) { i ^= f; return *this; }
354
355     inline operator int() const { return i; }
356
357     inline QFlags operator|(QFlags f) const { QFlags g; g.i = i | f.i; return g; }
358     inline QFlags operator|(Enum f) const { QFlags g; g.i = i | f; return g; }
359     inline QFlags operator^(QFlags f) const { QFlags g; g.i = i ^ f.i; return g; }
360     inline QFlags operator^(Enum f) const { QFlags g; g.i = i ^ f; return g; }
361     inline QFlags operator&(int mask) const { QFlags g; g.i = i & mask; return g; }
362     inline QFlags operator&(uint mask) const { QFlags g; g.i = i & mask; return g; }
363     inline QFlags operator&(Enum f) const { QFlags g; g.i = i & f; return g; }
364     inline QFlags operator~() const { QFlags g; g.i = ~i; return g; }
365
366     inline bool operator!() const { return !i; }
367
368     inline bool testFlag(Enum f) const { return i & f; }
369
370 private:
371
372
373
374 };
375 # 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"
376 template <typename T>
377 class QForeachContainer {
378 public:
379     inline QForeachContainer(const T& t) : c(t), brk(0), i(c.begin()), e(c.end()) { }
380     const T c;
381     int brk;
382     typename T::const_iterator i, e;
383 };
384 # 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"
385 class QByteArray;
386  QByteArray qgetenv(const char *varName);
387
388 inline int qIntCast(double f) { return int(f); }
389 inline int qIntCast(float f) { return int(f); }
390
391
392
393
394  void qsrand(uint seed);
395  int qrand();
396 # 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"
397 enum QtValidLicenseForCoreModule { LicensedCore = true };
398
399
400 enum QtValidLicenseForGuiModule { LicensedGui = true };
401
402
403 enum QtValidLicenseForNetworkModule { LicensedNetwork = true };
404
405
406 enum QtValidLicenseForOpenGLModule { LicensedOpenGL = true };
407
408
409 enum QtValidLicenseForSqlModule { LicensedSql = true };
410
411
412 enum QtValidLicenseForXmlModule { LicensedXml = true };
413
414
415 enum QtValidLicenseForScriptModule { LicensedScript = true };
416
417
418 enum QtValidLicenseForQt3SupportLightModule { LicensedQt3SupportLight = true };
419
420
421 enum QtValidLicenseForQt3SupportModule { LicensedQt3Support = true };
422
423
424 enum QtValidLicenseForSvgModule { LicensedSvg = true };
425
426
427 enum QtValidLicenseForActiveQtModule { LicensedActiveQt = true };
428 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qglobal.h" 2
429 # 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
430
431
432
433 typedef QtValidLicenseForCoreModule QtCoreModule;
434
435
436
437
438
439 namespace QAlgorithmsPrivate {
440
441 template <typename RandomAccessIterator, typename T, typename LessThan>
442  void qSortHelper(RandomAccessIterator start, RandomAccessIterator end, const T &t, LessThan lessThan);
443 template <typename RandomAccessIterator, typename T>
444 inline void qSortHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &dummy);
445
446 template <typename RandomAccessIterator, typename T, typename LessThan>
447  void qStableSortHelper(RandomAccessIterator start, RandomAccessIterator end, const T &t, LessThan lessThan);
448 template <typename RandomAccessIterator, typename T>
449 inline void qStableSortHelper(RandomAccessIterator, RandomAccessIterator, const T &);
450
451 template <typename RandomAccessIterator, typename T, typename LessThan>
452  RandomAccessIterator qLowerBoundHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan);
453 template <typename RandomAccessIterator, typename T, typename LessThan>
454  RandomAccessIterator qUpperBoundHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan);
455 template <typename RandomAccessIterator, typename T, typename LessThan>
456  RandomAccessIterator qBinaryFindHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan);
457
458 }
459
460 template <typename InputIterator, typename OutputIterator>
461 inline OutputIterator qCopy(InputIterator begin, InputIterator end, OutputIterator dest)
462 {
463     while (begin != end)
464         *dest++ = *begin++;
465     return dest;
466 }
467
468 template <typename BiIterator1, typename BiIterator2>
469 inline BiIterator2 qCopyBackward(BiIterator1 begin, BiIterator1 end, BiIterator2 dest)
470 {
471     while (begin != end)
472         *--dest = *--end;
473     return dest;
474 }
475
476 template <typename InputIterator1, typename InputIterator2>
477 inline bool qEqual(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2)
478 {
479     for (; first1 != last1; ++first1, ++first2)
480         if (!(*first1 == *first2))
481             return false;
482     return true;
483 }
484
485 template <typename ForwardIterator, typename T>
486 inline void qFill(ForwardIterator first, ForwardIterator last, const T &val)
487 {
488     for (; first != last; ++first)
489         *first = val;
490 }
491
492 template <typename Container, typename T>
493 inline void qFill(Container &container, const T &val)
494 {
495     qFill(container.begin(), container.end(), val);
496 }
497
498 template <typename InputIterator, typename T>
499 inline InputIterator qFind(InputIterator first, InputIterator last, const T &val)
500 {
501     while (first != last && !(*first == val))
502         ++first;
503     return first;
504 }
505
506 template <typename Container, typename T>
507 inline typename Container::const_iterator qFind(const Container &container, const T &val)
508 {
509     return qFind(container.constBegin(), container.constEnd(), val);
510 }
511
512 template <typename InputIterator, typename T, typename Size>
513 inline void qCount(InputIterator first, InputIterator last, const T &value, Size &n)
514 {
515     for (; first != last; ++first)
516         if (*first == value)
517             ++n;
518 }
519
520 template <typename Container, typename T, typename Size>
521 inline void qCount(const Container &container, const T &value, Size &n)
522 {
523     qCount(container.constBegin(), container.constEnd(), value, n);
524 }
525 # 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"
526 template <typename T>
527 inline void qSwap(T &value1, T &value2)
528 {
529     T t = value1;
530     value1 = value2;
531     value2 = t;
532 }
533 # 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"
534 template <typename T>
535 class qLess
536 {
537 public:
538     inline bool operator()(const T &t1, const T &t2) const
539     {
540         return (t1 < t2);
541     }
542 };
543
544 template <typename T>
545 class qGreater
546 {
547 public:
548     inline bool operator()(const T &t1, const T &t2) const
549     {
550         return (t2 < t1);
551     }
552 };
553
554
555 template <typename RandomAccessIterator>
556 inline void qSort(RandomAccessIterator start, RandomAccessIterator end)
557 {
558     if (start != end)
559         QAlgorithmsPrivate::qSortHelper(start, end, *start);
560 }
561
562 template <typename RandomAccessIterator, typename LessThan>
563 inline void qSort(RandomAccessIterator start, RandomAccessIterator end, LessThan lessThan)
564 {
565     if (start != end)
566         QAlgorithmsPrivate::qSortHelper(start, end, *start, lessThan);
567 }
568
569 template<typename Container>
570 inline void qSort(Container &c)
571 {
572
573
574
575
576     if (!c.empty())
577         QAlgorithmsPrivate::qSortHelper(c.begin(), c.end(), *c.begin());
578 }
579
580 template <typename RandomAccessIterator>
581 inline void qStableSort(RandomAccessIterator start, RandomAccessIterator end)
582 {
583     if (start != end)
584         QAlgorithmsPrivate::qStableSortHelper(start, end, *start);
585 }
586
587 template <typename RandomAccessIterator, typename LessThan>
588 inline void qStableSort(RandomAccessIterator start, RandomAccessIterator end, LessThan lessThan)
589 {
590     if (start != end)
591         QAlgorithmsPrivate::qStableSortHelper(start, end, *start, lessThan);
592 }
593
594 template<typename Container>
595 inline void qStableSort(Container &c)
596 {
597
598
599
600
601     if (!c.empty())
602         QAlgorithmsPrivate::qStableSortHelper(c.begin(), c.end(), *c.begin());
603 }
604
605 template <typename RandomAccessIterator, typename T>
606  RandomAccessIterator qLowerBound(RandomAccessIterator begin, RandomAccessIterator end, const T &value)
607 {
608
609
610
611     RandomAccessIterator middle;
612     int n = end - begin;
613     int half;
614
615     while (n > 0) {
616         half = n >> 1;
617         middle = begin + half;
618         if (*middle < value) {
619             begin = middle + 1;
620             n -= half + 1;
621         } else {
622             n = half;
623         }
624     }
625     return begin;
626 }
627
628 template <typename RandomAccessIterator, typename T, typename LessThan>
629  RandomAccessIterator qLowerBound(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan)
630 {
631     return QAlgorithmsPrivate::qLowerBoundHelper(begin, end, value, lessThan);
632 }
633
634 template <typename Container, typename T>
635  typename Container::const_iterator qLowerBound(const Container &container, const T &value)
636 {
637     return QAlgorithmsPrivate::qLowerBoundHelper(container.constBegin(), container.constEnd(), value, qLess<T>());
638 }
639
640 template <typename RandomAccessIterator, typename T>
641  RandomAccessIterator qUpperBound(RandomAccessIterator begin, RandomAccessIterator end, const T &value)
642 {
643
644     RandomAccessIterator middle;
645     int n = end - begin;
646     int half;
647
648     while (n > 0) {
649         half = n >> 1;
650         middle = begin + half;
651         if (value < *middle) {
652             n = half;
653         } else {
654             begin = middle + 1;
655             n -= half + 1;
656         }
657     }
658     return begin;
659 }
660
661 template <typename RandomAccessIterator, typename T, typename LessThan>
662  RandomAccessIterator qUpperBound(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan)
663 {
664     return QAlgorithmsPrivate::qUpperBoundHelper(begin, end, value, lessThan);
665 }
666
667 template <typename Container, typename T>
668  typename Container::const_iterator qUpperBound(const Container &container, const T &value)
669 {
670     return QAlgorithmsPrivate::qUpperBoundHelper(container.constBegin(), container.constEnd(), value, qLess<T>());
671 }
672
673 template <typename RandomAccessIterator, typename T>
674  RandomAccessIterator qBinaryFind(RandomAccessIterator begin, RandomAccessIterator end, const T &value)
675 {
676
677     int l = 0;
678     int r = end - begin - 1;
679     if (r < 0)
680         return end;
681     int i = (l + r + 1) / 2;
682
683     while (r != l) {
684         if (value < begin[i])
685             r = i - 1;
686         else
687             l = i;
688         i = (l + r + 1) / 2;
689     }
690     if (begin[i] < value || value < begin[i])
691         return end;
692     else
693         return begin + i;
694 }
695
696 template <typename RandomAccessIterator, typename T, typename LessThan>
697  RandomAccessIterator qBinaryFind(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan)
698 {
699     return QAlgorithmsPrivate::qBinaryFindHelper(begin, end, value, lessThan);
700 }
701
702 template <typename Container, typename T>
703  typename Container::const_iterator qBinaryFind(const Container &container, const T &value)
704 {
705     return QAlgorithmsPrivate::qBinaryFindHelper(container.constBegin(), container.constEnd(), value, qLess<T>());
706 }
707
708 template <typename ForwardIterator>
709  void qDeleteAll(ForwardIterator begin, ForwardIterator end)
710 {
711     while (begin != end) {
712         delete *begin;
713         ++begin;
714     }
715 }
716
717 template <typename Container>
718 inline void qDeleteAll(const Container &c)
719 {
720     qDeleteAll(c.begin(), c.end());
721 }
722
723
724
725
726
727 namespace QAlgorithmsPrivate {
728
729 template <typename RandomAccessIterator, typename T, typename LessThan>
730  void qSortHelper(RandomAccessIterator start, RandomAccessIterator end, const T &t, LessThan lessThan)
731 {
732 top:
733     int span = end - start;
734     if (span < 2)
735         return;
736
737     --end;
738     RandomAccessIterator low = start, high = end - 1;
739     RandomAccessIterator pivot = start + span / 2;
740
741     if (lessThan(*end, *start))
742         qSwap(*end, *start);
743     if (span == 2)
744         return;
745
746     if (lessThan(*pivot, *start))
747         qSwap(*pivot, *start);
748     if (lessThan(*end, *pivot))
749         qSwap(*end, *pivot);
750     if (span == 3)
751         return;
752
753     qSwap(*pivot, *end);
754
755     while (low < high) {
756         while (low < high && lessThan(*low, *end))
757             ++low;
758
759         while (high > low && lessThan(*end, *high))
760             --high;
761
762         if (low < high) {
763             qSwap(*low, *high);
764             ++low;
765             --high;
766         } else {
767             break;
768         }
769     }
770
771     if (lessThan(*low, *end))
772         ++low;
773
774     qSwap(*end, *low);
775     qSortHelper(start, low, t, lessThan);
776
777     start = low + 1;
778     ++end;
779     goto top;
780 }
781
782 template <typename RandomAccessIterator, typename T>
783 inline void qSortHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &dummy)
784 {
785     qSortHelper(begin, end, dummy, qLess<T>());
786 }
787
788 template <typename RandomAccessIterator>
789  void qReverse(RandomAccessIterator begin, RandomAccessIterator end)
790 {
791     --end;
792     while (begin < end)
793         qSwap(*begin++, *end--);
794 }
795
796 template <typename RandomAccessIterator>
797  void qRotate(RandomAccessIterator begin, RandomAccessIterator middle, RandomAccessIterator end)
798 {
799     qReverse(begin, middle);
800     qReverse(middle, end);
801     qReverse(begin, end);
802 }
803
804 template <typename RandomAccessIterator, typename T, typename LessThan>
805  void qMerge(RandomAccessIterator begin, RandomAccessIterator pivot, RandomAccessIterator end, T &t, LessThan lessThan)
806 {
807     const int len1 = pivot - begin;
808     const int len2 = end - pivot;
809
810     if (len1 == 0 || len2 == 0)
811         return;
812
813     if (len1 + len2 == 2) {
814         if (lessThan(*(begin + 1), *(begin)))
815             qSwap(*begin, *(begin + 1));
816         return;
817     }
818
819     RandomAccessIterator firstCut;
820     RandomAccessIterator secondCut;
821     int len2Half;
822     if (len1 > len2) {
823         const int len1Half = len1 / 2;
824         firstCut = begin + len1Half;
825         secondCut = qLowerBound(pivot, end, *firstCut, lessThan);
826         len2Half = secondCut - pivot;
827     } else {
828         len2Half = len2 / 2;
829         secondCut = pivot + len2Half;
830         firstCut = qUpperBound(begin, pivot, *secondCut, lessThan);
831     }
832
833     qRotate(firstCut, pivot, secondCut);
834     const RandomAccessIterator newPivot = firstCut + len2Half;
835     qMerge(begin, firstCut, newPivot, t, lessThan);
836     qMerge(newPivot, secondCut, end, t, lessThan);
837 }
838
839 template <typename RandomAccessIterator, typename T, typename LessThan>
840  void qStableSortHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &t, LessThan lessThan)
841 {
842     const int span = end - begin;
843     if (span < 2)
844        return;
845
846     const RandomAccessIterator middle = begin + span / 2;
847     qStableSortHelper(begin, middle, t, lessThan);
848     qStableSortHelper(middle, end, t, lessThan);
849     qMerge(begin, middle, end, t, lessThan);
850 }
851
852 template <typename RandomAccessIterator, typename T>
853 inline void qStableSortHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &dummy)
854 {
855     qStableSortHelper(begin, end, dummy, qLess<T>());
856 }
857
858 template <typename RandomAccessIterator, typename T, typename LessThan>
859  RandomAccessIterator qLowerBoundHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan)
860 {
861     RandomAccessIterator middle;
862     int n = end - begin;
863     int half;
864
865     while (n > 0) {
866         half = n >> 1;
867         middle = begin + half;
868         if (lessThan(*middle, value)) {
869             begin = middle + 1;
870             n -= half + 1;
871         } else {
872             n = half;
873         }
874     }
875     return begin;
876 }
877
878
879 template <typename RandomAccessIterator, typename T, typename LessThan>
880  RandomAccessIterator qUpperBoundHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan)
881 {
882     RandomAccessIterator middle;
883     int n = end - begin;
884     int half;
885
886     while (n > 0) {
887         half = n >> 1;
888         middle = begin + half;
889         if (lessThan(value, *middle)) {
890             n = half;
891         } else {
892             begin = middle + 1;
893             n -= half + 1;
894         }
895     }
896     return begin;
897 }
898
899 template <typename RandomAccessIterator, typename T, typename LessThan>
900  RandomAccessIterator qBinaryFindHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan)
901 {
902     int l = 0;
903     int r = end - begin - 1;
904     if (r < 0)
905         return end;
906     int i = (l + r + 1) / 2;
907
908     while (r != l) {
909         if (lessThan(value, begin[i]))
910             r = i - 1;
911         else
912             l = i;
913         i = (l + r + 1) / 2;
914     }
915     if (lessThan(begin[i], value) || lessThan(value, begin[i]))
916         return end;
917     else
918         return begin + i;
919 }
920
921 }
922 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qalgorithms.h" 2
923 # 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
924
925 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qdatastream.h" 1
926
927 # 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
928 # 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"
929
930 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qiodevice.h" 1
931
932 # 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
933 # 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"
934
935 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qobjectdefs.h" 1
936
937 # 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
938 # 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"
939
940 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qnamespace.h" 1
941
942 # 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
943 # 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"
944
945 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qglobal.h" 1
946 # 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
947
948
949
950 typedef QtValidLicenseForCoreModule QtCoreModule;
951
952
953 namespace
954
955
956
957 Qt {
958 # 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"
959     enum GlobalColor {
960         color0,
961         color1,
962         black,
963         white,
964         darkGray,
965         gray,
966         lightGray,
967         red,
968         green,
969         blue,
970         cyan,
971         magenta,
972         yellow,
973         darkRed,
974         darkGreen,
975         darkBlue,
976         darkCyan,
977         darkMagenta,
978         darkYellow,
979         transparent
980     };
981
982     enum KeyboardModifier {
983         NoModifier = 0x00000000,
984         ShiftModifier = 0x02000000,
985         ControlModifier = 0x04000000,
986         AltModifier = 0x08000000,
987         MetaModifier = 0x10000000,
988         KeypadModifier = 0x20000000,
989         GroupSwitchModifier = 0x40000000,
990
991         KeyboardModifierMask = 0xfe000000
992     };
993     typedef QFlags<KeyboardModifier> KeyboardModifiers;
994
995
996     enum Modifier {
997         META = Qt::MetaModifier,
998         SHIFT = Qt::ShiftModifier,
999         CTRL = Qt::ControlModifier,
1000         ALT = Qt::AltModifier,
1001         MODIFIER_MASK = KeyboardModifierMask,
1002         UNICODE_ACCEL = 0x00000000
1003     };
1004
1005     enum MouseButton {
1006         NoButton = 0x00000000,
1007         LeftButton = 0x00000001,
1008         RightButton = 0x00000002,
1009         MidButton = 0x00000004,
1010         XButton1 = 0x00000008,
1011         XButton2 = 0x00000010,
1012         MouseButtonMask = 0x000000ff
1013     };
1014     typedef QFlags<MouseButton> MouseButtons;
1015 # 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"
1016     enum Orientation {
1017         Horizontal = 0x1,
1018         Vertical = 0x2
1019     };
1020
1021     typedef QFlags<Orientation> Orientations;
1022
1023     enum FocusPolicy {
1024         NoFocus = 0,
1025         TabFocus = 0x1,
1026         ClickFocus = 0x2,
1027         StrongFocus = TabFocus | ClickFocus | 0x8,
1028         WheelFocus = StrongFocus | 0x4
1029     };
1030
1031     enum SortOrder {
1032         AscendingOrder,
1033         DescendingOrder
1034
1035
1036
1037
1038     };
1039
1040
1041
1042
1043
1044     enum AlignmentFlag {
1045         AlignLeft = 0x0001,
1046         AlignLeading = AlignLeft,
1047         AlignRight = 0x0002,
1048         AlignTrailing = AlignRight,
1049         AlignHCenter = 0x0004,
1050         AlignJustify = 0x0008,
1051         AlignAbsolute = 0x0010,
1052         AlignHorizontal_Mask = AlignLeft | AlignRight | AlignHCenter | AlignJustify | AlignAbsolute,
1053
1054         AlignTop = 0x0020,
1055         AlignBottom = 0x0040,
1056         AlignVCenter = 0x0080,
1057         AlignVertical_Mask = AlignTop | AlignBottom | AlignVCenter,
1058
1059         AlignCenter = AlignVCenter | AlignHCenter
1060
1061
1062
1063     };
1064
1065     typedef QFlags<AlignmentFlag> Alignment;
1066
1067     enum TextFlag {
1068         TextSingleLine = 0x0100,
1069         TextDontClip = 0x0200,
1070         TextExpandTabs = 0x0400,
1071         TextShowMnemonic = 0x0800,
1072         TextWordWrap = 0x1000,
1073         TextWrapAnywhere = 0x2000,
1074         TextDontPrint = 0x4000,
1075         TextIncludeTrailingSpaces = 0x08000000,
1076         TextHideMnemonic = 0x8000,
1077         TextJustificationForced = 0x10000
1078 # 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"
1079     };
1080
1081
1082
1083
1084     enum TextElideMode {
1085         ElideLeft,
1086         ElideRight,
1087         ElideMiddle,
1088         ElideNone
1089     };
1090
1091     enum WindowType {
1092         Widget = 0x00000000,
1093         Window = 0x00000001,
1094         Dialog = 0x00000002 | Window,
1095         Sheet = 0x00000004 | Window,
1096         Drawer = 0x00000006 | Window,
1097         Popup = 0x00000008 | Window,
1098         Tool = 0x0000000a | Window,
1099         ToolTip = 0x0000000c | Window,
1100         SplashScreen = 0x0000000e | Window,
1101         Desktop = 0x00000010 | Window,
1102         SubWindow = 0x00000012,
1103
1104         WindowType_Mask = 0x000000ff,
1105         MSWindowsFixedSizeDialogHint = 0x00000100,
1106         MSWindowsOwnDC = 0x00000200,
1107         X11BypassWindowManagerHint = 0x00000400,
1108         FramelessWindowHint = 0x00000800,
1109         WindowTitleHint = 0x00001000,
1110         WindowSystemMenuHint = 0x00002000,
1111         WindowMinimizeButtonHint = 0x00004000,
1112         WindowMaximizeButtonHint = 0x00008000,
1113         WindowMinMaxButtonsHint = WindowMinimizeButtonHint | WindowMaximizeButtonHint,
1114         WindowContextHelpButtonHint = 0x00010000,
1115         WindowShadeButtonHint = 0x00020000,
1116         WindowStaysOnTopHint = 0x00040000,
1117         CustomizeWindowHint = 0x02000000
1118 # 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"
1119     };
1120
1121     typedef QFlags<WindowType> WindowFlags;
1122
1123     enum WindowState {
1124         WindowNoState = 0x00000000,
1125         WindowMinimized = 0x00000001,
1126         WindowMaximized = 0x00000002,
1127         WindowFullScreen = 0x00000004,
1128         WindowActive = 0x00000008
1129     };
1130
1131     typedef QFlags<WindowState> WindowStates;
1132
1133     enum WidgetAttribute {
1134         WA_Disabled = 0,
1135         WA_UnderMouse = 1,
1136         WA_MouseTracking = 2,
1137         WA_ContentsPropagated = 3,
1138         WA_OpaquePaintEvent = 4,
1139         WA_NoBackground = WA_OpaquePaintEvent,
1140         WA_StaticContents = 5,
1141         WA_LaidOut = 7,
1142         WA_PaintOnScreen = 8,
1143         WA_NoSystemBackground = 9,
1144         WA_UpdatesDisabled = 10,
1145         WA_Mapped = 11,
1146         WA_MacNoClickThrough = 12,
1147         WA_PaintOutsidePaintEvent = 13,
1148         WA_InputMethodEnabled = 14,
1149         WA_WState_Visible = 15,
1150         WA_WState_Hidden = 16,
1151
1152         WA_ForceDisabled = 32,
1153         WA_KeyCompression = 33,
1154         WA_PendingMoveEvent = 34,
1155         WA_PendingResizeEvent = 35,
1156         WA_SetPalette = 36,
1157         WA_SetFont = 37,
1158         WA_SetCursor = 38,
1159         WA_NoChildEventsFromChildren = 39,
1160         WA_WindowModified = 41,
1161         WA_Resized = 42,
1162         WA_Moved = 43,
1163         WA_PendingUpdate = 44,
1164         WA_InvalidSize = 45,
1165         WA_MacBrushedMetal = 46,
1166         WA_MacMetalStyle = WA_MacBrushedMetal,
1167         WA_CustomWhatsThis = 47,
1168         WA_LayoutOnEntireRect = 48,
1169         WA_OutsideWSRange = 49,
1170         WA_GrabbedShortcut = 50,
1171         WA_TransparentForMouseEvents = 51,
1172         WA_PaintUnclipped = 52,
1173         WA_SetWindowIcon = 53,
1174         WA_NoMouseReplay = 54,
1175         WA_DeleteOnClose = 55,
1176         WA_RightToLeft = 56,
1177         WA_SetLayoutDirection = 57,
1178         WA_NoChildEventsForParent = 58,
1179         WA_ForceUpdatesDisabled = 59,
1180
1181         WA_WState_Created = 60,
1182         WA_WState_CompressKeys = 61,
1183         WA_WState_InPaintEvent = 62,
1184         WA_WState_Reparented = 63,
1185         WA_WState_ConfigPending = 64,
1186         WA_WState_Polished = 66,
1187         WA_WState_DND = 67,
1188         WA_WState_OwnSizePolicy = 68,
1189         WA_WState_ExplicitShowHide = 69,
1190
1191         WA_ShowModal = 70,
1192         WA_MouseNoMask = 71,
1193         WA_GroupLeader = 72,
1194         WA_NoMousePropagation = 73,
1195         WA_Hover = 74,
1196         WA_InputMethodTransparent = 75,
1197         WA_QuitOnClose = 76,
1198
1199         WA_KeyboardFocusChange = 77,
1200
1201         WA_AcceptDrops = 78,
1202         WA_DropSiteRegistered = 79,
1203         WA_ForceAcceptDrops = WA_DropSiteRegistered,
1204
1205         WA_WindowPropagation = 80,
1206
1207         WA_NoX11EventCompression = 81,
1208         WA_TintedBackground = 82,
1209         WA_X11OpenGLOverlay = 83,
1210         WA_AlwaysShowToolTips = 84,
1211         WA_MacOpaqueSizeGrip = 85,
1212         WA_SetStyle = 86,
1213
1214         WA_SetLocale = 87,
1215         WA_MacShowFocusRect = 88,
1216
1217         WA_MacNormalSize = 89,
1218         WA_MacSmallSize = 90,
1219         WA_MacMiniSize = 91,
1220
1221         WA_LayoutUsesWidgetRect = 92,
1222         WA_StyledBackground = 93,
1223         WA_MSWindowsUseDirect3D = 94,
1224         WA_CanHostQMdiSubWindowTitleBar = 95,
1225
1226         WA_MacAlwaysShowToolWindow = 96,
1227
1228         WA_StyleSheet = 97,
1229
1230
1231         WA_AttributeCount
1232     };
1233
1234     enum ApplicationAttribute
1235     {
1236         AA_ImmediateWidgetCreation = 0,
1237         AA_MSWindowsUseDirect3DByDefault = 1,
1238
1239
1240         AA_AttributeCount
1241     };
1242
1243
1244
1245
1246
1247     enum ImageConversionFlag {
1248         ColorMode_Mask = 0x00000003,
1249         AutoColor = 0x00000000,
1250         ColorOnly = 0x00000003,
1251         MonoOnly = 0x00000002,
1252
1253
1254         AlphaDither_Mask = 0x0000000c,
1255         ThresholdAlphaDither = 0x00000000,
1256         OrderedAlphaDither = 0x00000004,
1257         DiffuseAlphaDither = 0x00000008,
1258         NoAlpha = 0x0000000c,
1259
1260         Dither_Mask = 0x00000030,
1261         DiffuseDither = 0x00000000,
1262         OrderedDither = 0x00000010,
1263         ThresholdDither = 0x00000020,
1264
1265
1266         DitherMode_Mask = 0x000000c0,
1267         AutoDither = 0x00000000,
1268         PreferDither = 0x00000040,
1269         AvoidDither = 0x00000080
1270     };
1271     typedef QFlags<ImageConversionFlag> ImageConversionFlags;
1272
1273     enum BGMode {
1274         TransparentMode,
1275         OpaqueMode
1276     };
1277 # 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"
1278     enum Key {
1279         Key_Escape = 0x01000000,
1280         Key_Tab = 0x01000001,
1281         Key_Backtab = 0x01000002,
1282
1283
1284
1285         Key_Backspace = 0x01000003,
1286
1287
1288
1289         Key_Return = 0x01000004,
1290         Key_Enter = 0x01000005,
1291         Key_Insert = 0x01000006,
1292         Key_Delete = 0x01000007,
1293         Key_Pause = 0x01000008,
1294         Key_Print = 0x01000009,
1295         Key_SysReq = 0x0100000a,
1296         Key_Clear = 0x0100000b,
1297         Key_Home = 0x01000010,
1298         Key_End = 0x01000011,
1299         Key_Left = 0x01000012,
1300         Key_Up = 0x01000013,
1301         Key_Right = 0x01000014,
1302         Key_Down = 0x01000015,
1303         Key_PageUp = 0x01000016,
1304
1305
1306
1307         Key_PageDown = 0x01000017,
1308
1309
1310
1311         Key_Shift = 0x01000020,
1312         Key_Control = 0x01000021,
1313         Key_Meta = 0x01000022,
1314         Key_Alt = 0x01000023,
1315         Key_CapsLock = 0x01000024,
1316         Key_NumLock = 0x01000025,
1317         Key_ScrollLock = 0x01000026,
1318         Key_F1 = 0x01000030,
1319         Key_F2 = 0x01000031,
1320         Key_F3 = 0x01000032,
1321         Key_F4 = 0x01000033,
1322         Key_F5 = 0x01000034,
1323         Key_F6 = 0x01000035,
1324         Key_F7 = 0x01000036,
1325         Key_F8 = 0x01000037,
1326         Key_F9 = 0x01000038,
1327         Key_F10 = 0x01000039,
1328         Key_F11 = 0x0100003a,
1329         Key_F12 = 0x0100003b,
1330         Key_F13 = 0x0100003c,
1331         Key_F14 = 0x0100003d,
1332         Key_F15 = 0x0100003e,
1333         Key_F16 = 0x0100003f,
1334         Key_F17 = 0x01000040,
1335         Key_F18 = 0x01000041,
1336         Key_F19 = 0x01000042,
1337         Key_F20 = 0x01000043,
1338         Key_F21 = 0x01000044,
1339         Key_F22 = 0x01000045,
1340         Key_F23 = 0x01000046,
1341         Key_F24 = 0x01000047,
1342         Key_F25 = 0x01000048,
1343         Key_F26 = 0x01000049,
1344         Key_F27 = 0x0100004a,
1345         Key_F28 = 0x0100004b,
1346         Key_F29 = 0x0100004c,
1347         Key_F30 = 0x0100004d,
1348         Key_F31 = 0x0100004e,
1349         Key_F32 = 0x0100004f,
1350         Key_F33 = 0x01000050,
1351         Key_F34 = 0x01000051,
1352         Key_F35 = 0x01000052,
1353         Key_Super_L = 0x01000053,
1354         Key_Super_R = 0x01000054,
1355         Key_Menu = 0x01000055,
1356         Key_Hyper_L = 0x01000056,
1357         Key_Hyper_R = 0x01000057,
1358         Key_Help = 0x01000058,
1359         Key_Direction_L = 0x01000059,
1360         Key_Direction_R = 0x01000060,
1361         Key_Space = 0x20,
1362         Key_Any = Key_Space,
1363         Key_Exclam = 0x21,
1364         Key_QuoteDbl = 0x22,
1365         Key_NumberSign = 0x23,
1366         Key_Dollar = 0x24,
1367         Key_Percent = 0x25,
1368         Key_Ampersand = 0x26,
1369         Key_Apostrophe = 0x27,
1370         Key_ParenLeft = 0x28,
1371         Key_ParenRight = 0x29,
1372         Key_Asterisk = 0x2a,
1373         Key_Plus = 0x2b,
1374         Key_Comma = 0x2c,
1375         Key_Minus = 0x2d,
1376         Key_Period = 0x2e,
1377         Key_Slash = 0x2f,
1378         Key_0 = 0x30,
1379         Key_1 = 0x31,
1380         Key_2 = 0x32,
1381         Key_3 = 0x33,
1382         Key_4 = 0x34,
1383         Key_5 = 0x35,
1384         Key_6 = 0x36,
1385         Key_7 = 0x37,
1386         Key_8 = 0x38,
1387         Key_9 = 0x39,
1388         Key_Colon = 0x3a,
1389         Key_Semicolon = 0x3b,
1390         Key_Less = 0x3c,
1391         Key_Equal = 0x3d,
1392         Key_Greater = 0x3e,
1393         Key_Question = 0x3f,
1394         Key_At = 0x40,
1395         Key_A = 0x41,
1396         Key_B = 0x42,
1397         Key_C = 0x43,
1398         Key_D = 0x44,
1399         Key_E = 0x45,
1400         Key_F = 0x46,
1401         Key_G = 0x47,
1402         Key_H = 0x48,
1403         Key_I = 0x49,
1404         Key_J = 0x4a,
1405         Key_K = 0x4b,
1406         Key_L = 0x4c,
1407         Key_M = 0x4d,
1408         Key_N = 0x4e,
1409         Key_O = 0x4f,
1410         Key_P = 0x50,
1411         Key_Q = 0x51,
1412         Key_R = 0x52,
1413         Key_S = 0x53,
1414         Key_T = 0x54,
1415         Key_U = 0x55,
1416         Key_V = 0x56,
1417         Key_W = 0x57,
1418         Key_X = 0x58,
1419         Key_Y = 0x59,
1420         Key_Z = 0x5a,
1421         Key_BracketLeft = 0x5b,
1422         Key_Backslash = 0x5c,
1423         Key_BracketRight = 0x5d,
1424         Key_AsciiCircum = 0x5e,
1425         Key_Underscore = 0x5f,
1426         Key_QuoteLeft = 0x60,
1427         Key_BraceLeft = 0x7b,
1428         Key_Bar = 0x7c,
1429         Key_BraceRight = 0x7d,
1430         Key_AsciiTilde = 0x7e,
1431
1432         Key_nobreakspace = 0x0a0,
1433         Key_exclamdown = 0x0a1,
1434         Key_cent = 0x0a2,
1435         Key_sterling = 0x0a3,
1436         Key_currency = 0x0a4,
1437         Key_yen = 0x0a5,
1438         Key_brokenbar = 0x0a6,
1439         Key_section = 0x0a7,
1440         Key_diaeresis = 0x0a8,
1441         Key_copyright = 0x0a9,
1442         Key_ordfeminine = 0x0aa,
1443         Key_guillemotleft = 0x0ab,
1444         Key_notsign = 0x0ac,
1445         Key_hyphen = 0x0ad,
1446         Key_registered = 0x0ae,
1447         Key_macron = 0x0af,
1448         Key_degree = 0x0b0,
1449         Key_plusminus = 0x0b1,
1450         Key_twosuperior = 0x0b2,
1451         Key_threesuperior = 0x0b3,
1452         Key_acute = 0x0b4,
1453         Key_mu = 0x0b5,
1454         Key_paragraph = 0x0b6,
1455         Key_periodcentered = 0x0b7,
1456         Key_cedilla = 0x0b8,
1457         Key_onesuperior = 0x0b9,
1458         Key_masculine = 0x0ba,
1459         Key_guillemotright = 0x0bb,
1460         Key_onequarter = 0x0bc,
1461         Key_onehalf = 0x0bd,
1462         Key_threequarters = 0x0be,
1463         Key_questiondown = 0x0bf,
1464         Key_Agrave = 0x0c0,
1465         Key_Aacute = 0x0c1,
1466         Key_Acircumflex = 0x0c2,
1467         Key_Atilde = 0x0c3,
1468         Key_Adiaeresis = 0x0c4,
1469         Key_Aring = 0x0c5,
1470         Key_AE = 0x0c6,
1471         Key_Ccedilla = 0x0c7,
1472         Key_Egrave = 0x0c8,
1473         Key_Eacute = 0x0c9,
1474         Key_Ecircumflex = 0x0ca,
1475         Key_Ediaeresis = 0x0cb,
1476         Key_Igrave = 0x0cc,
1477         Key_Iacute = 0x0cd,
1478         Key_Icircumflex = 0x0ce,
1479         Key_Idiaeresis = 0x0cf,
1480         Key_ETH = 0x0d0,
1481         Key_Ntilde = 0x0d1,
1482         Key_Ograve = 0x0d2,
1483         Key_Oacute = 0x0d3,
1484         Key_Ocircumflex = 0x0d4,
1485         Key_Otilde = 0x0d5,
1486         Key_Odiaeresis = 0x0d6,
1487         Key_multiply = 0x0d7,
1488         Key_Ooblique = 0x0d8,
1489         Key_Ugrave = 0x0d9,
1490         Key_Uacute = 0x0da,
1491         Key_Ucircumflex = 0x0db,
1492         Key_Udiaeresis = 0x0dc,
1493         Key_Yacute = 0x0dd,
1494         Key_THORN = 0x0de,
1495         Key_ssharp = 0x0df,
1496 # 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"
1497         Key_division = 0x0f7,
1498 # 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"
1499         Key_ydiaeresis = 0x0ff,
1500
1501
1502
1503
1504
1505
1506         Key_AltGr = 0x01001103,
1507         Key_Multi_key = 0x01001120,
1508         Key_Codeinput = 0x01001137,
1509         Key_SingleCandidate = 0x0100113c,
1510         Key_MultipleCandidate = 0x0100113d,
1511         Key_PreviousCandidate = 0x0100113e,
1512
1513
1514         Key_Mode_switch = 0x0100117e,
1515
1516
1517
1518         Key_Kanji = 0x01001121,
1519         Key_Muhenkan = 0x01001122,
1520
1521         Key_Henkan = 0x01001123,
1522         Key_Romaji = 0x01001124,
1523         Key_Hiragana = 0x01001125,
1524         Key_Katakana = 0x01001126,
1525         Key_Hiragana_Katakana = 0x01001127,
1526         Key_Zenkaku = 0x01001128,
1527         Key_Hankaku = 0x01001129,
1528         Key_Zenkaku_Hankaku = 0x0100112a,
1529         Key_Touroku = 0x0100112b,
1530         Key_Massyo = 0x0100112c,
1531         Key_Kana_Lock = 0x0100112d,
1532         Key_Kana_Shift = 0x0100112e,
1533         Key_Eisu_Shift = 0x0100112f,
1534         Key_Eisu_toggle = 0x01001130,
1535 # 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"
1536         Key_Hangul = 0x01001131,
1537         Key_Hangul_Start = 0x01001132,
1538         Key_Hangul_End = 0x01001133,
1539         Key_Hangul_Hanja = 0x01001134,
1540         Key_Hangul_Jamo = 0x01001135,
1541         Key_Hangul_Romaja = 0x01001136,
1542
1543         Key_Hangul_Jeonja = 0x01001138,
1544         Key_Hangul_Banja = 0x01001139,
1545         Key_Hangul_PreHanja = 0x0100113a,
1546         Key_Hangul_PostHanja = 0x0100113b,
1547
1548
1549
1550         Key_Hangul_Special = 0x0100113f,
1551
1552
1553
1554         Key_Dead_Grave = 0x01001250,
1555         Key_Dead_Acute = 0x01001251,
1556         Key_Dead_Circumflex = 0x01001252,
1557         Key_Dead_Tilde = 0x01001253,
1558         Key_Dead_Macron = 0x01001254,
1559         Key_Dead_Breve = 0x01001255,
1560         Key_Dead_Abovedot = 0x01001256,
1561         Key_Dead_Diaeresis = 0x01001257,
1562         Key_Dead_Abovering = 0x01001258,
1563         Key_Dead_Doubleacute = 0x01001259,
1564         Key_Dead_Caron = 0x0100125a,
1565         Key_Dead_Cedilla = 0x0100125b,
1566         Key_Dead_Ogonek = 0x0100125c,
1567         Key_Dead_Iota = 0x0100125d,
1568         Key_Dead_Voiced_Sound = 0x0100125e,
1569         Key_Dead_Semivoiced_Sound = 0x0100125f,
1570         Key_Dead_Belowdot = 0x01001260,
1571         Key_Dead_Hook = 0x01001261,
1572         Key_Dead_Horn = 0x01001262,
1573
1574
1575
1576         Key_Back = 0x01000061,
1577         Key_Forward = 0x01000062,
1578         Key_Stop = 0x01000063,
1579         Key_Refresh = 0x01000064,
1580
1581         Key_VolumeDown = 0x01000070,
1582         Key_VolumeMute = 0x01000071,
1583         Key_VolumeUp = 0x01000072,
1584         Key_BassBoost = 0x01000073,
1585         Key_BassUp = 0x01000074,
1586         Key_BassDown = 0x01000075,
1587         Key_TrebleUp = 0x01000076,
1588         Key_TrebleDown = 0x01000077,
1589
1590         Key_MediaPlay = 0x01000080,
1591         Key_MediaStop = 0x01000081,
1592         Key_MediaPrevious = 0x01000082,
1593
1594
1595
1596         Key_MediaNext = 0x01000083,
1597         Key_MediaRecord = 0x01000084,
1598
1599         Key_HomePage = 0x01000090,
1600         Key_Favorites = 0x01000091,
1601         Key_Search = 0x01000092,
1602         Key_Standby = 0x01000093,
1603         Key_OpenUrl = 0x01000094,
1604
1605         Key_LaunchMail = 0x010000a0,
1606         Key_LaunchMedia = 0x010000a1,
1607         Key_Launch0 = 0x010000a2,
1608         Key_Launch1 = 0x010000a3,
1609         Key_Launch2 = 0x010000a4,
1610         Key_Launch3 = 0x010000a5,
1611         Key_Launch4 = 0x010000a6,
1612         Key_Launch5 = 0x010000a7,
1613         Key_Launch6 = 0x010000a8,
1614         Key_Launch7 = 0x010000a9,
1615         Key_Launch8 = 0x010000aa,
1616         Key_Launch9 = 0x010000ab,
1617         Key_LaunchA = 0x010000ac,
1618         Key_LaunchB = 0x010000ad,
1619         Key_LaunchC = 0x010000ae,
1620         Key_LaunchD = 0x010000af,
1621         Key_LaunchE = 0x010000b0,
1622         Key_LaunchF = 0x010000b1,
1623
1624         Key_MediaLast = 0x0100ffff,
1625
1626
1627         Key_Select = 0x01010000,
1628         Key_Yes = 0x01010001,
1629         Key_No = 0x01010002,
1630
1631
1632         Key_Cancel = 0x01020001,
1633         Key_Printer = 0x01020002,
1634         Key_Execute = 0x01020003,
1635         Key_Sleep = 0x01020004,
1636         Key_Play = 0x01020005,
1637         Key_Zoom = 0x01020006,
1638
1639
1640
1641
1642
1643         Key_Context1 = 0x01100000,
1644         Key_Context2 = 0x01100001,
1645         Key_Context3 = 0x01100002,
1646         Key_Context4 = 0x01100003,
1647         Key_Call = 0x01100004,
1648         Key_Hangup = 0x01100005,
1649         Key_Flip = 0x01100006,
1650
1651         Key_unknown = 0x01ffffff
1652     };
1653
1654     enum ArrowType {
1655         NoArrow,
1656         UpArrow,
1657         DownArrow,
1658         LeftArrow,
1659         RightArrow
1660     };
1661
1662     enum PenStyle {
1663         NoPen,
1664         SolidLine,
1665         DashLine,
1666         DotLine,
1667         DashDotLine,
1668         DashDotDotLine,
1669         CustomDashLine
1670
1671         , MPenStyle = 0x0f
1672
1673     };
1674
1675     enum PenCapStyle {
1676         FlatCap = 0x00,
1677         SquareCap = 0x10,
1678         RoundCap = 0x20,
1679         MPenCapStyle = 0x30
1680     };
1681
1682     enum PenJoinStyle {
1683         MiterJoin = 0x00,
1684         BevelJoin = 0x40,
1685         RoundJoin = 0x80,
1686         SvgMiterJoin = 0x100,
1687         MPenJoinStyle = 0x1c0
1688     };
1689
1690     enum BrushStyle {
1691         NoBrush,
1692         SolidPattern,
1693         Dense1Pattern,
1694         Dense2Pattern,
1695         Dense3Pattern,
1696         Dense4Pattern,
1697         Dense5Pattern,
1698         Dense6Pattern,
1699         Dense7Pattern,
1700         HorPattern,
1701         VerPattern,
1702         CrossPattern,
1703         BDiagPattern,
1704         FDiagPattern,
1705         DiagCrossPattern,
1706         LinearGradientPattern,
1707         RadialGradientPattern,
1708         ConicalGradientPattern,
1709         TexturePattern = 24
1710
1711
1712
1713     };
1714 # 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"
1715     enum UIEffect {
1716         UI_General,
1717         UI_AnimateMenu,
1718         UI_FadeMenu,
1719         UI_AnimateCombo,
1720         UI_AnimateTooltip,
1721         UI_FadeTooltip,
1722         UI_AnimateToolBox
1723     };
1724
1725     enum CursorShape {
1726         ArrowCursor,
1727         UpArrowCursor,
1728         CrossCursor,
1729         WaitCursor,
1730         IBeamCursor,
1731         SizeVerCursor,
1732         SizeHorCursor,
1733         SizeBDiagCursor,
1734         SizeFDiagCursor,
1735         SizeAllCursor,
1736         BlankCursor,
1737         SplitVCursor,
1738         SplitHCursor,
1739         PointingHandCursor,
1740         ForbiddenCursor,
1741         WhatsThisCursor,
1742         BusyCursor,
1743         OpenHandCursor,
1744         ClosedHandCursor,
1745         LastCursor = ClosedHandCursor,
1746         BitmapCursor = 24,
1747         CustomCursor = 25
1748 # 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"
1749     };
1750
1751     enum TextFormat {
1752         PlainText,
1753         RichText,
1754         AutoText,
1755         LogText
1756     };
1757
1758     enum AspectRatioMode {
1759         IgnoreAspectRatio,
1760         KeepAspectRatio,
1761         KeepAspectRatioByExpanding
1762
1763
1764
1765
1766
1767     };
1768
1769
1770
1771
1772     enum AnchorAttribute {
1773         AnchorName,
1774         AnchorHref
1775     };
1776
1777     enum DockWidgetArea {
1778         LeftDockWidgetArea = 0x1,
1779         RightDockWidgetArea = 0x2,
1780         TopDockWidgetArea = 0x4,
1781         BottomDockWidgetArea = 0x8,
1782
1783         DockWidgetArea_Mask = 0xf,
1784         AllDockWidgetAreas = DockWidgetArea_Mask,
1785         NoDockWidgetArea = 0
1786     };
1787     enum DockWidgetAreaSizes {
1788         NDockWidgetAreas = 4
1789     };
1790
1791     typedef QFlags<DockWidgetArea> DockWidgetAreas;
1792
1793     enum ToolBarArea {
1794         LeftToolBarArea = 0x1,
1795         RightToolBarArea = 0x2,
1796         TopToolBarArea = 0x4,
1797         BottomToolBarArea = 0x8,
1798
1799         ToolBarArea_Mask = 0xf,
1800         AllToolBarAreas = ToolBarArea_Mask,
1801         NoToolBarArea = 0
1802     };
1803
1804     enum ToolBarAreaSizes {
1805         NToolBarAreas = 4
1806     };
1807
1808     typedef QFlags<ToolBarArea> ToolBarAreas;
1809 # 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"
1810     enum DateFormat {
1811         TextDate,
1812         ISODate,
1813         SystemLocaleDate,
1814         LocalDate = SystemLocaleDate,
1815         LocaleDate
1816     };
1817
1818     enum TimeSpec {
1819         LocalTime,
1820         UTC
1821     };
1822
1823     enum DayOfWeek {
1824         Monday = 1,
1825         Tuesday = 2,
1826         Wednesday = 3,
1827         Thursday = 4,
1828         Friday = 5,
1829         Saturday = 6,
1830         Sunday = 7
1831     };
1832
1833     enum ScrollBarPolicy {
1834         ScrollBarAsNeeded,
1835         ScrollBarAlwaysOff,
1836         ScrollBarAlwaysOn
1837     };
1838 # 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"
1839     enum CaseSensitivity {
1840         CaseInsensitive,
1841         CaseSensitive
1842     };
1843
1844     enum Corner {
1845         TopLeftCorner = 0x00000,
1846         TopRightCorner = 0x00001,
1847         BottomLeftCorner = 0x00002,
1848         BottomRightCorner = 0x00003
1849
1850
1851
1852
1853
1854
1855     };
1856
1857     enum ConnectionType {
1858         AutoConnection,
1859         DirectConnection,
1860         QueuedConnection,
1861         AutoCompatConnection,
1862         BlockingQueuedConnection
1863     };
1864
1865     enum ShortcutContext {
1866         WidgetShortcut,
1867         WindowShortcut,
1868         ApplicationShortcut
1869     };
1870
1871     enum FillRule {
1872         OddEvenFill,
1873         WindingFill
1874     };
1875
1876     enum MaskMode {
1877         MaskInColor,
1878         MaskOutColor
1879     };
1880
1881     enum ClipOperation {
1882         NoClip,
1883         ReplaceClip,
1884         IntersectClip,
1885         UniteClip
1886     };
1887
1888
1889     enum ItemSelectionMode {
1890         ContainsItemShape = 0x0,
1891         IntersectsItemShape = 0x1,
1892         ContainsItemBoundingRect = 0x2,
1893         IntersectsItemBoundingRect = 0x3
1894     };
1895
1896     enum TransformationMode {
1897         FastTransformation,
1898         SmoothTransformation
1899     };
1900
1901     enum Axis {
1902         XAxis,
1903         YAxis,
1904         ZAxis
1905     };
1906
1907     enum FocusReason {
1908         MouseFocusReason,
1909         TabFocusReason,
1910         BacktabFocusReason,
1911         ActiveWindowFocusReason,
1912         PopupFocusReason,
1913         ShortcutFocusReason,
1914         MenuBarFocusReason,
1915         OtherFocusReason,
1916         NoFocusReason
1917     };
1918
1919     enum ContextMenuPolicy {
1920         NoContextMenu,
1921         DefaultContextMenu,
1922         ActionsContextMenu,
1923         CustomContextMenu,
1924         PreventContextMenu
1925     };
1926
1927     enum InputMethodQuery {
1928         ImMicroFocus,
1929         ImFont,
1930         ImCursorPosition,
1931         ImSurroundingText,
1932         ImCurrentSelection
1933     };
1934
1935     enum ToolButtonStyle {
1936         ToolButtonIconOnly,
1937         ToolButtonTextOnly,
1938         ToolButtonTextBesideIcon,
1939         ToolButtonTextUnderIcon
1940     };
1941
1942     enum LayoutDirection {
1943         LeftToRight,
1944         RightToLeft
1945     };
1946
1947     enum DropAction {
1948         CopyAction = 0x1,
1949         MoveAction = 0x2,
1950         LinkAction = 0x4,
1951         ActionMask = 0xff,
1952         TargetMoveAction = 0x8002,
1953         IgnoreAction = 0x0
1954     };
1955     typedef QFlags<DropAction> DropActions;
1956
1957     enum CheckState {
1958         Unchecked,
1959         PartiallyChecked,
1960         Checked
1961     };
1962
1963     enum ItemDataRole {
1964         DisplayRole = 0,
1965         DecorationRole = 1,
1966         EditRole = 2,
1967         ToolTipRole = 3,
1968         StatusTipRole = 4,
1969         WhatsThisRole = 5,
1970
1971         FontRole = 6,
1972         TextAlignmentRole = 7,
1973         BackgroundColorRole = 8,
1974         BackgroundRole = 8,
1975         TextColorRole = 9,
1976         ForegroundRole = 9,
1977         CheckStateRole = 10,
1978
1979         AccessibleTextRole = 11,
1980         AccessibleDescriptionRole = 12,
1981
1982         SizeHintRole = 13,
1983
1984         UserRole = 32
1985     };
1986
1987     enum ItemFlag {
1988         ItemIsSelectable = 1,
1989         ItemIsEditable = 2,
1990         ItemIsDragEnabled = 4,
1991         ItemIsDropEnabled = 8,
1992         ItemIsUserCheckable = 16,
1993         ItemIsEnabled = 32,
1994         ItemIsTristate = 64
1995     };
1996     typedef QFlags<ItemFlag> ItemFlags;
1997
1998     enum MatchFlag {
1999         MatchExactly = 0,
2000         MatchContains = 1,
2001         MatchStartsWith = 2,
2002         MatchEndsWith = 3,
2003         MatchRegExp = 4,
2004         MatchWildcard = 5,
2005         MatchFixedString = 8,
2006         MatchCaseSensitive = 16,
2007         MatchWrap = 32,
2008         MatchRecursive = 64
2009     };
2010     typedef QFlags<MatchFlag> MatchFlags;
2011
2012
2013
2014
2015
2016
2017     typedef unsigned long HANDLE;
2018
2019
2020
2021     typedef WindowFlags WFlags;
2022
2023     enum WindowModality {
2024         NonModal,
2025         WindowModal,
2026         ApplicationModal
2027     };
2028
2029     enum TextInteractionFlag {
2030         NoTextInteraction = 0,
2031         TextSelectableByMouse = 1,
2032         TextSelectableByKeyboard = 2,
2033         LinksAccessibleByMouse = 4,
2034         LinksAccessibleByKeyboard = 8,
2035         TextEditable = 16,
2036
2037         TextEditorInteraction = TextSelectableByMouse | TextSelectableByKeyboard | TextEditable,
2038         TextBrowserInteraction = TextSelectableByMouse | LinksAccessibleByMouse | LinksAccessibleByKeyboard
2039     };
2040     typedef QFlags<TextInteractionFlag> TextInteractionFlags;
2041
2042     enum EventPriority {
2043         HighEventPriority = 1,
2044         NormalEventPriority = 0,
2045         LowEventPriority = -1
2046     };
2047 }
2048
2049
2050
2051
2052
2053 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; }
2054 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; }
2055 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; }
2056 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; }
2057 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; }
2058 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; }
2059 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; }
2060 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; }
2061 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; }
2062 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; }
2063 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; }
2064 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; }
2065 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; }
2066
2067 typedef bool (*qInternalCallback)(void **);
2068
2069 class QInternal {
2070 public:
2071     enum PaintDeviceFlags {
2072         UnknownDevice = 0x00,
2073         Widget = 0x01,
2074         Pixmap = 0x02,
2075         Image = 0x03,
2076         Printer = 0x04,
2077         Picture = 0x05,
2078         Pbuffer = 0x06,
2079         FramebufferObject = 0x07,
2080         CustomRaster = 0x08
2081     };
2082     enum RelayoutType {
2083         RelayoutNormal,
2084         RelayoutDragging,
2085         RelayoutDropped
2086     };
2087
2088
2089     enum Callback {
2090         ConnectCallback,
2091         DisconnectCallback,
2092         AdoptCurrentThread,
2093         EventNotifyCallback,
2094         LastCallback
2095     };
2096
2097     enum InternalFunction {
2098         CreateThreadForAdoption,
2099         RefAdoptedThread,
2100         DerefAdoptedThread,
2101         SetCurrentThreadToMainThread,
2102         LastInternalFunction
2103     };
2104
2105     enum DockPosition {
2106         LeftDock,
2107         RightDock,
2108         TopDock,
2109         BottomDock,
2110         DockCount
2111     };
2112
2113     static bool registerCallback(Callback, qInternalCallback);
2114     static bool unregisterCallback(Callback, qInternalCallback);
2115
2116     static bool activateCallbacks(Callback, void **);
2117     static bool callFunction(InternalFunction func, void **);
2118 };
2119 # 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"
2120 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qnamespace.h" 2
2121 # 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
2122
2123
2124
2125 typedef QtValidLicenseForCoreModule QtCoreModule;
2126
2127 class QString;
2128
2129 class QByteArray;
2130 # 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"
2131 template <typename T>
2132 inline int qYouForgotTheQ_OBJECT_Macro(T, T) { return 0; }
2133
2134 template <typename T1, typename T2>
2135 inline void qYouForgotTheQ_OBJECT_Macro(T1, T2) {}
2136 # 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"
2137 class QObject;
2138 class QMetaMethod;
2139 class QMetaEnum;
2140 class QMetaProperty;
2141 class QMetaClassInfo;
2142
2143
2144 class QGenericArgument
2145 {
2146 public:
2147     inline QGenericArgument(const char *aName = 0, const void *aData = 0)
2148         : _data(aData), _name(aName) {}
2149     inline void *data() const { return const_cast<void *>(_data); }
2150     inline const char *name() const { return _name; }
2151
2152 private:
2153     const void *_data;
2154     const char *_name;
2155 };
2156
2157 class QGenericReturnArgument: public QGenericArgument
2158 {
2159 public:
2160     inline QGenericReturnArgument(const char *aName = 0, void *aData = 0)
2161         : QGenericArgument(aName, aData)
2162         {}
2163 };
2164
2165 template <class T>
2166 class QArgument: public QGenericArgument
2167 {
2168 public:
2169     inline QArgument(const char *aName, const T &aData)
2170         : QGenericArgument(aName, static_cast<const void *>(&aData))
2171         {}
2172 };
2173
2174
2175 template <typename T>
2176 class QReturnArgument: public QGenericReturnArgument
2177 {
2178 public:
2179     inline QReturnArgument(const char *aName, T &aData)
2180         : QGenericReturnArgument(aName, static_cast<void *>(&aData))
2181         {}
2182 };
2183
2184 struct QMetaObject
2185 {
2186     const char *className() const;
2187     const QMetaObject *superClass() const;
2188
2189     QObject *cast(QObject *obj) const;
2190
2191
2192
2193     QString tr(const char *s, const char *c) const;
2194     QString trUtf8(const char *s, const char *c) const;
2195     QString tr(const char *s, const char *c, int n) const;
2196     QString trUtf8(const char *s, const char *c, int n) const;
2197
2198
2199     int methodOffset() const;
2200     int enumeratorOffset() const;
2201     int propertyOffset() const;
2202     int classInfoOffset() const;
2203
2204     int methodCount() const;
2205     int enumeratorCount() const;
2206     int propertyCount() const;
2207     int classInfoCount() const;
2208
2209     int indexOfMethod(const char *method) const;
2210     int indexOfSignal(const char *signal) const;
2211     int indexOfSlot(const char *slot) const;
2212     int indexOfEnumerator(const char *name) const;
2213     int indexOfProperty(const char *name) const;
2214     int indexOfClassInfo(const char *name) const;
2215
2216     QMetaMethod method(int index) const;
2217     QMetaEnum enumerator(int index) const;
2218     QMetaProperty property(int index) const;
2219     QMetaClassInfo classInfo(int index) const;
2220     QMetaProperty userProperty() const;
2221
2222     static bool checkConnectArgs(const char *signal, const char *method);
2223     static QByteArray normalizedSignature(const char *method);
2224     static QByteArray normalizedType(const char *type);
2225
2226
2227     static bool connect(const QObject *sender, int signal_index,
2228                         const QObject *receiver, int method_index,
2229                         int type = 0, int *types = 0);
2230
2231     static bool disconnect(const QObject *sender, int signal_index,
2232                            const QObject *receiver, int method_index);
2233
2234     static void connectSlotsByName(QObject *o);
2235
2236
2237     static void activate(QObject *sender, int signal_index, void **argv);
2238     static void activate(QObject *sender, int from_signal_index, int to_signal_index, void **argv);
2239     static void activate(QObject *sender, const QMetaObject *, int local_signal_index, void **argv);
2240     static void activate(QObject *sender, const QMetaObject *, int from_local_signal_index, int to_local_signal_index, void **argv);
2241
2242     static void addGuard(QObject **ptr);
2243     static void removeGuard(QObject **ptr);
2244     static void changeGuard(QObject **ptr, QObject *o);
2245
2246     static bool invokeMethod(QObject *obj, const char *member,
2247                              Qt::ConnectionType,
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     static inline bool invokeMethod(QObject *obj, const char *member,
2261                              QGenericReturnArgument ret,
2262                              QGenericArgument val0 = QGenericArgument(0),
2263                              QGenericArgument val1 = QGenericArgument(),
2264                              QGenericArgument val2 = QGenericArgument(),
2265                              QGenericArgument val3 = QGenericArgument(),
2266                              QGenericArgument val4 = QGenericArgument(),
2267                              QGenericArgument val5 = QGenericArgument(),
2268                              QGenericArgument val6 = QGenericArgument(),
2269                              QGenericArgument val7 = QGenericArgument(),
2270                              QGenericArgument val8 = QGenericArgument(),
2271                              QGenericArgument val9 = QGenericArgument())
2272     {
2273         return invokeMethod(obj, member, Qt::AutoConnection, ret, val0, val1, val2, val3,
2274                 val4, val5, val6, val7, val8, val9);
2275     }
2276
2277     static inline bool invokeMethod(QObject *obj, const char *member,
2278                              Qt::ConnectionType type,
2279                              QGenericArgument val0 = QGenericArgument(0),
2280                              QGenericArgument val1 = QGenericArgument(),
2281                              QGenericArgument val2 = QGenericArgument(),
2282                              QGenericArgument val3 = QGenericArgument(),
2283                              QGenericArgument val4 = QGenericArgument(),
2284                              QGenericArgument val5 = QGenericArgument(),
2285                              QGenericArgument val6 = QGenericArgument(),
2286                              QGenericArgument val7 = QGenericArgument(),
2287                              QGenericArgument val8 = QGenericArgument(),
2288                              QGenericArgument val9 = QGenericArgument())
2289     {
2290         return invokeMethod(obj, member, type, QGenericReturnArgument(), val0, val1, val2,
2291                                  val3, val4, val5, val6, val7, val8, val9);
2292     }
2293
2294
2295     static inline bool invokeMethod(QObject *obj, const char *member,
2296                              QGenericArgument val0 = QGenericArgument(0),
2297                              QGenericArgument val1 = QGenericArgument(),
2298                              QGenericArgument val2 = QGenericArgument(),
2299                              QGenericArgument val3 = QGenericArgument(),
2300                              QGenericArgument val4 = QGenericArgument(),
2301                              QGenericArgument val5 = QGenericArgument(),
2302                              QGenericArgument val6 = QGenericArgument(),
2303                              QGenericArgument val7 = QGenericArgument(),
2304                              QGenericArgument val8 = QGenericArgument(),
2305                              QGenericArgument val9 = QGenericArgument())
2306     {
2307         return invokeMethod(obj, member, Qt::AutoConnection, QGenericReturnArgument(), val0,
2308                 val1, val2, val3, val4, val5, val6, val7, val8, val9);
2309     }
2310
2311     enum Call {
2312         InvokeMetaMethod,
2313         ReadProperty,
2314         WriteProperty,
2315         ResetProperty,
2316         QueryPropertyDesignable,
2317         QueryPropertyScriptable,
2318         QueryPropertyStored,
2319         QueryPropertyEditable,
2320         QueryPropertyUser
2321     };
2322
2323
2324
2325
2326
2327     struct {
2328         const QMetaObject *superdata;
2329         const char *stringdata;
2330         const uint *data;
2331         const QMetaObject **extradata;
2332     } d;
2333 };
2334
2335 inline const char *QMetaObject::className() const
2336 { return d.stringdata; }
2337
2338 inline const QMetaObject *QMetaObject::superClass() const
2339 { return d.superdata; }
2340 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qobjectdefs.h" 2
2341 # 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
2342
2343
2344 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qstring.h" 1
2345
2346 # 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
2347 # 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"
2348
2349 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qchar.h" 1
2350
2351 # 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
2352 # 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"
2353
2354 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qglobal.h" 1
2355 # 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
2356
2357
2358
2359 typedef QtValidLicenseForCoreModule QtCoreModule;
2360
2361 class QString;
2362
2363 struct QLatin1Char
2364 {
2365 public:
2366     inline explicit QLatin1Char(char c) : ch(c) {}
2367     inline const char toLatin1() const { return ch; }
2368     inline const ushort unicode() const { return ushort(uchar(ch)); }
2369
2370 private:
2371     char ch;
2372 };
2373
2374
2375 class QChar {
2376 public:
2377     QChar();
2378
2379     QChar(char c);
2380     QChar(uchar c);
2381
2382     QChar(QLatin1Char ch);
2383     QChar(uchar c, uchar r);
2384     inline QChar(ushort rc) : ucs(rc){}
2385     QChar(short rc);
2386     QChar(uint rc);
2387     QChar(int rc);
2388     enum SpecialCharacter {
2389         Null = 0x0000,
2390         Nbsp = 0x00a0,
2391         ReplacementCharacter = 0xfffd,
2392         ObjectReplacementCharacter = 0xfffc,
2393         ByteOrderMark = 0xfeff,
2394         ByteOrderSwapped = 0xfffe,
2395
2396
2397
2398
2399
2400
2401
2402         ParagraphSeparator = 0x2029,
2403         LineSeparator = 0x2028
2404     };
2405     QChar(SpecialCharacter sc);
2406
2407
2408
2409     enum Category
2410     {
2411         NoCategory,
2412
2413         Mark_NonSpacing,
2414         Mark_SpacingCombining,
2415         Mark_Enclosing,
2416
2417         Number_DecimalDigit,
2418         Number_Letter,
2419         Number_Other,
2420
2421         Separator_Space,
2422         Separator_Line,
2423         Separator_Paragraph,
2424
2425         Other_Control,
2426         Other_Format,
2427         Other_Surrogate,
2428         Other_PrivateUse,
2429         Other_NotAssigned,
2430
2431         Letter_Uppercase,
2432         Letter_Lowercase,
2433         Letter_Titlecase,
2434         Letter_Modifier,
2435         Letter_Other,
2436
2437         Punctuation_Connector,
2438         Punctuation_Dash,
2439         Punctuation_Open,
2440         Punctuation_Close,
2441         Punctuation_InitialQuote,
2442         Punctuation_FinalQuote,
2443         Punctuation_Other,
2444
2445         Symbol_Math,
2446         Symbol_Currency,
2447         Symbol_Modifier,
2448         Symbol_Other,
2449
2450         Punctuation_Dask = Punctuation_Dash
2451     };
2452
2453     enum Direction
2454     {
2455         DirL, DirR, DirEN, DirES, DirET, DirAN, DirCS, DirB, DirS, DirWS, DirON,
2456         DirLRE, DirLRO, DirAL, DirRLE, DirRLO, DirPDF, DirNSM, DirBN
2457     };
2458
2459     enum Decomposition
2460     {
2461         NoDecomposition,
2462         Canonical,
2463         Font,
2464         NoBreak,
2465         Initial,
2466         Medial,
2467         Final,
2468         Isolated,
2469         Circle,
2470         Super,
2471         Sub,
2472         Vertical,
2473         Wide,
2474         Narrow,
2475         Small,
2476         Square,
2477         Compat,
2478         Fraction
2479
2480
2481
2482
2483     };
2484
2485     enum Joining
2486     {
2487         OtherJoining, Dual, Right, Center
2488     };
2489
2490     enum CombiningClass
2491     {
2492         Combining_BelowLeftAttached = 200,
2493         Combining_BelowAttached = 202,
2494         Combining_BelowRightAttached = 204,
2495         Combining_LeftAttached = 208,
2496         Combining_RightAttached = 210,
2497         Combining_AboveLeftAttached = 212,
2498         Combining_AboveAttached = 214,
2499         Combining_AboveRightAttached = 216,
2500
2501         Combining_BelowLeft = 218,
2502         Combining_Below = 220,
2503         Combining_BelowRight = 222,
2504         Combining_Left = 224,
2505         Combining_Right = 226,
2506         Combining_AboveLeft = 228,
2507         Combining_Above = 230,
2508         Combining_AboveRight = 232,
2509
2510         Combining_DoubleBelow = 233,
2511         Combining_DoubleAbove = 234,
2512         Combining_IotaSubscript = 240
2513     };
2514
2515     enum UnicodeVersion {
2516         Unicode_Unassigned,
2517         Unicode_1_1,
2518         Unicode_2_0,
2519         Unicode_2_1_2,
2520         Unicode_3_0,
2521         Unicode_3_1,
2522         Unicode_3_2,
2523         Unicode_4_0,
2524         Unicode_4_1,
2525         Unicode_5_0
2526     };
2527
2528
2529     Category category() const;
2530     Direction direction() const;
2531     Joining joining() const;
2532     bool hasMirrored() const;
2533     unsigned char combiningClass() const;
2534
2535     QChar mirroredChar() const;
2536     QString decomposition() const;
2537     Decomposition decompositionTag() const;
2538
2539     int digitValue() const;
2540     QChar toLower() const;
2541     QChar toUpper() const;
2542     QChar toTitleCase() const;
2543     QChar toCaseFolded() const;
2544
2545     UnicodeVersion unicodeVersion() const;
2546
2547     const char toAscii() const;
2548     inline const char toLatin1() const;
2549     inline const ushort unicode() const { return ucs; }
2550
2551
2552
2553     inline ushort &unicode() { return ucs; }
2554
2555
2556     static QChar fromAscii(char c);
2557     static QChar fromLatin1(char c);
2558
2559     inline bool isNull() const { return ucs == 0; }
2560     bool isPrint() const;
2561     bool isPunct() const;
2562     bool isSpace() const;
2563     bool isMark() const;
2564     bool isLetter() const;
2565     bool isNumber() const;
2566     bool isLetterOrNumber() const;
2567     bool isDigit() const;
2568     bool isSymbol() const;
2569     inline bool isLower() const { return category() == Letter_Lowercase; }
2570     inline bool isUpper() const { return category() == Letter_Uppercase; }
2571     inline bool isTitleCase() const { return category() == Letter_Titlecase; }
2572
2573     inline bool isHighSurrogate() const {
2574         return ((ucs & 0xfc00) == 0xd800);
2575     }
2576     inline bool isLowSurrogate() const {
2577         return ((ucs & 0xfc00) == 0xdc00);
2578     }
2579
2580     inline uchar cell() const { return uchar(ucs & 0xff); }
2581     inline uchar row() const { return uchar((ucs>>8)&0xff); }
2582     inline void setCell(uchar cell);
2583     inline void setRow(uchar row);
2584
2585     static inline uint surrogateToUcs4(ushort high, ushort low) {
2586         return (uint(high)<<10) + low - 0x35fdc00;
2587     }
2588     static inline uint surrogateToUcs4(QChar high, QChar low) {
2589         return (uint(high.ucs)<<10) + low.ucs - 0x35fdc00;
2590     }
2591     static inline ushort highSurrogate(uint ucs4) {
2592         return (ucs4>>10) + 0xd7c0;
2593     }
2594     static inline ushort lowSurrogate(uint ucs4) {
2595         return ucs4%0x400 + 0xdc00;
2596     }
2597
2598     static Category category(uint ucs4);
2599     static Category category(ushort ucs2);
2600     static Direction direction(uint ucs4);
2601     static Direction direction(ushort ucs2);
2602     static Joining joining(uint ucs4);
2603     static Joining joining(ushort ucs2);
2604     static unsigned char combiningClass(uint ucs4);
2605     static unsigned char combiningClass(ushort ucs2);
2606
2607     static uint mirroredChar(uint ucs4);
2608     static ushort mirroredChar(ushort ucs2);
2609     static Decomposition decompositionTag(uint ucs4);
2610
2611     static int digitValue(uint ucs4);
2612     static int digitValue(ushort ucs2);
2613     static uint toLower(uint ucs4);
2614     static ushort toLower(ushort ucs2);
2615     static uint toUpper(uint ucs4);
2616     static ushort toUpper(ushort ucs2);
2617     static uint toTitleCase(uint ucs4);
2618     static ushort toTitleCase(ushort ucs2);
2619     static uint toCaseFolded(uint ucs4);
2620     static ushort toCaseFolded(ushort ucs2);
2621
2622     static UnicodeVersion unicodeVersion(uint ucs4);
2623     static UnicodeVersion unicodeVersion(ushort ucs2);
2624
2625     static QString decomposition(uint ucs4);
2626 # 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"
2627 private:
2628
2629
2630
2631
2632     ushort ucs;
2633 } ;
2634
2635 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"; } };
2636
2637 inline QChar::QChar() : ucs(0) {}
2638
2639 inline const char QChar::toLatin1() const { return ucs > 0xff ? '\0' : char(ucs); }
2640 inline QChar QChar::fromLatin1(char c) { return QChar(ushort(uchar(c))); }
2641
2642 inline QChar::QChar(uchar c, uchar r) : ucs((r << 8) | c){}
2643 inline QChar::QChar(short rc) : ucs(ushort(rc)){}
2644 inline QChar::QChar(uint rc) : ucs(ushort(rc & 0xffff)){}
2645 inline QChar::QChar(int rc) : ucs(ushort(rc & 0xffff)){}
2646 inline QChar::QChar(SpecialCharacter s) : ucs(ushort(s)) {}
2647 inline QChar::QChar(QLatin1Char ch) : ucs(ch.unicode()) {}
2648
2649 inline void QChar::setCell(uchar acell)
2650 { ucs = (ucs & 0xff00) + acell; }
2651 inline void QChar::setRow(uchar arow)
2652 { ucs = (ushort(arow)<<8) + (ucs&0xff); }
2653
2654 inline bool operator==(QChar c1, QChar c2) { return c1.unicode() == c2.unicode(); }
2655 inline bool operator!=(QChar c1, QChar c2) { return c1.unicode() != c2.unicode(); }
2656 inline bool operator<=(QChar c1, QChar c2) { return c1.unicode() <= c2.unicode(); }
2657 inline bool operator>=(QChar c1, QChar c2) { return c1.unicode() >= c2.unicode(); }
2658 inline bool operator<(QChar c1, QChar c2) { return c1.unicode() < c2.unicode(); }
2659 inline bool operator>(QChar c1, QChar c2) { return c1.unicode() > c2.unicode(); }
2660
2661
2662  QDataStream &operator<<(QDataStream &, const QChar &);
2663  QDataStream &operator>>(QDataStream &, QChar &);
2664 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qchar.h" 2
2665 # 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
2666
2667 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qbytearray.h" 1
2668
2669 # 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
2670 # 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"
2671
2672 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qglobal.h" 1
2673 # 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
2674
2675 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qatomic.h" 1
2676
2677 # 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
2678 # 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"
2679
2680 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qatomic_generic.h" 1
2681
2682 # 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
2683 # 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"
2684
2685 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qglobal.h" 1
2686 # 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
2687
2688
2689
2690 inline int q_atomic_test_and_set_int(volatile int *ptr, int expected, int newval)
2691 {
2692     if (*ptr == expected) {
2693         *ptr = newval;
2694         return 1;
2695     }
2696     return 0;
2697 }
2698
2699 inline int q_atomic_test_and_set_acquire_int(volatile int *ptr, int expected, int newval)
2700 {
2701     return q_atomic_test_and_set_int(ptr, expected, newval);
2702 }
2703
2704 inline int q_atomic_test_and_set_release_int(volatile int *ptr, int expected, int newval)
2705 {
2706     return q_atomic_test_and_set_int(ptr, expected, newval);
2707 }
2708
2709 inline int q_atomic_test_and_set_ptr(volatile void *ptr, void *expected, void *newval)
2710 {
2711     if (*reinterpret_cast<void * volatile *>(ptr) == expected) {
2712         *reinterpret_cast<void * volatile *>(ptr) = newval;
2713         return 1;
2714     }
2715     return 0;
2716 }
2717
2718 inline int q_atomic_increment(volatile int *ptr)
2719 { return ++(*ptr); }
2720
2721 inline int q_atomic_decrement(volatile int *ptr)
2722 { return --(*ptr); }
2723
2724 inline int q_atomic_set_int(volatile int *ptr, int newval)
2725 {
2726     register int ret = *ptr;
2727     *ptr = newval;
2728     return ret;
2729 }
2730
2731 inline void *q_atomic_set_ptr(volatile void *ptr, void *newval)
2732 {
2733     register void *ret = *reinterpret_cast<void * volatile *>(ptr);
2734     *reinterpret_cast<void * volatile *>(ptr) = newval;
2735     return ret;
2736 }
2737
2738 inline int q_atomic_fetch_and_add_int(volatile int *ptr, int value)
2739 {
2740     int originalValue = *ptr;
2741     *ptr += value;
2742     return originalValue;
2743 }
2744
2745 inline int q_atomic_fetch_and_add_acquire_int(volatile int *ptr, int value)
2746 {
2747     return q_atomic_fetch_and_add_int(ptr, value);
2748 }
2749
2750 inline int q_atomic_fetch_and_add_release_int(volatile int *ptr, int value)
2751 {
2752     return q_atomic_fetch_and_add_int(ptr, value);
2753 }
2754 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qatomic_generic.h" 2
2755 # 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
2756
2757
2758
2759
2760 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qglobal.h" 1
2761 # 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
2762
2763
2764
2765 typedef QtValidLicenseForCoreModule QtCoreModule;
2766 # 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"
2767 struct QBasicAtomic {
2768     volatile int value;
2769
2770     void init(int x = 0)
2771     { value = x; }
2772
2773     inline bool ref()
2774     { return q_atomic_increment(&value) != 0; }
2775
2776     inline bool deref()
2777     { return q_atomic_decrement(&value) != 0; }
2778
2779     inline bool operator==(int x) const
2780     { return value == x; }
2781
2782     inline bool operator!=(int x) const
2783     { return value != x; }
2784
2785     inline bool operator!() const
2786     { return value == 0; }
2787
2788     inline operator int() const
2789     { return value; }
2790
2791     inline QBasicAtomic &operator=(int x)
2792     {
2793         value = x;
2794         return *this;
2795     }
2796
2797     inline bool testAndSet(int expected, int newval)
2798     { return q_atomic_test_and_set_int(&value, expected, newval) != 0; }
2799
2800     inline bool testAndSetAcquire(int expected, int newval)
2801     { return q_atomic_test_and_set_acquire_int(&value, expected, newval) != 0; }
2802
2803     inline bool testAndSetRelease(int expected, int newval)
2804     { return q_atomic_test_and_set_release_int(&value, expected, newval) != 0; }
2805
2806     inline int exchange(int newval)
2807     { return q_atomic_set_int(&value, newval); }
2808
2809     inline int fetchAndAdd(int aValue)
2810     { return q_atomic_fetch_and_add_int(&value, aValue); }
2811
2812     inline int fetchAndAddAcquire(int aValue)
2813     { return q_atomic_fetch_and_add_acquire_int(&value, aValue); }
2814
2815     inline int fetchAndAddRelease(int aValue)
2816     { return q_atomic_fetch_and_add_release_int(&value, aValue); }
2817 };
2818
2819 template <typename T>
2820 struct QBasicAtomicPointer
2821 {
2822     volatile T *value;
2823
2824     void init(T *t = 0)
2825     { value = t; }
2826
2827     inline bool operator==(T *t) const
2828     { return value == t; }
2829
2830     inline bool operator!=(T *t) const
2831     { return !operator==(t); }
2832
2833     inline bool operator!() const
2834     { return operator==(0); }
2835
2836     inline operator T *() const
2837     { return const_cast<T *>(value); }
2838
2839     inline T *operator->() const
2840     { return const_cast<T *>(value); }
2841
2842     inline QBasicAtomicPointer<T> &operator=(T *t)
2843     {
2844         value = t;
2845         return *this;
2846     }
2847
2848     inline bool testAndSet(T *expected, T *newval)
2849     { return q_atomic_test_and_set_ptr(&value, expected, newval); }
2850
2851     inline T *exchange(T * newval)
2852     { return static_cast<T *>(q_atomic_set_ptr(&value, newval)); }
2853 };
2854
2855
2856
2857
2858
2859 template <typename T>
2860 inline T qAtomicSetPtr(volatile T *ptr, T newval)
2861 { return static_cast<T>(q_atomic_set_ptr(ptr, newval)); }
2862
2863
2864 class QAtomic : public QBasicAtomic
2865 {
2866 public:
2867     inline QAtomic(int x = 0)
2868     { init(x); }
2869     inline QAtomic(const QAtomic &copy)
2870     { init(copy); }
2871
2872     inline QAtomic &operator=(int x)
2873     {
2874         (void) QBasicAtomic::operator=(x);
2875         return *this;
2876     }
2877
2878     inline QAtomic &operator=(const QAtomic &copy)
2879     {
2880         (void) QBasicAtomic::operator=(copy);
2881         return *this;
2882     }
2883 };
2884
2885
2886 template <typename T>
2887 class QAtomicPointer : public QBasicAtomicPointer<T>
2888 {
2889 public:
2890     inline QAtomicPointer(T *t = 0)
2891     { init(t); }
2892     inline QAtomicPointer(const QAtomicPointer<T> &copy)
2893     { init(copy); }
2894
2895     inline QAtomicPointer<T> &operator=(T *t)
2896     {
2897         (void) QBasicAtomicPointer<T>::operator=(t);
2898         return *this;
2899     }
2900
2901     inline QAtomicPointer<T> &operator=(const QAtomicPointer<T> &copy)
2902     {
2903         (void) QBasicAtomicPointer<T>::operator=(copy);
2904         return *this;
2905     }
2906 };
2907 # 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"
2908 template <typename T>
2909 inline void qAtomicAssign(T *&d, T *x)
2910 {
2911     if (d == x)
2912         return;
2913     x->ref.ref();
2914     if (!d->ref.deref())
2915         delete d;
2916     d = x;
2917 }
2918 # 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"
2919 template <typename T>
2920 inline void qAtomicDetach(T *&d)
2921 {
2922     if (d->ref == 1)
2923         return;
2924     T *x = d;
2925     d = new T(*d);
2926     if (!x->ref.deref())
2927         delete x;
2928 }
2929 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qatomic.h" 2
2930 # 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
2931
2932
2933 # 1 "/usr/include/string.h" 1 3 4
2934 # 9 "/usr/include/string.h" 3 4
2935 # 1 "/usr/include/gentoo-multilib/amd64/string.h" 1 3 4
2936 # 26 "/usr/include/gentoo-multilib/amd64/string.h" 3 4
2937
2938 # 1 "/usr/include/features.h" 1 3 4
2939 # 9 "/usr/include/features.h" 3 4
2940 # 1 "/usr/include/gentoo-multilib/amd64/features.h" 1 3 4
2941 # 322 "/usr/include/gentoo-multilib/amd64/features.h" 3 4
2942
2943 # 1 "/usr/include/sys/cdefs.h" 1 3 4
2944 # 9 "/usr/include/sys/cdefs.h" 3 4
2945 # 1 "/usr/include/gentoo-multilib/amd64/sys/cdefs.h" 1 3 4
2946 # 324 "/usr/include/gentoo-multilib/amd64/sys/cdefs.h" 3 4
2947
2948 # 1 "/usr/include/bits/wordsize.h" 1 3 4
2949 # 9 "/usr/include/bits/wordsize.h" 3 4
2950 # 1 "/usr/include/gentoo-multilib/amd64/bits/wordsize.h" 1 3 4
2951 # 9 "/usr/include/bits/wordsize.h" 2 3 4
2952 # 325 "/usr/include/gentoo-multilib/amd64/sys/cdefs.h" 2 3 4
2953 # 9 "/usr/include/sys/cdefs.h" 2 3 4
2954 # 323 "/usr/include/gentoo-multilib/amd64/features.h" 2 3 4
2955 # 345 "/usr/include/gentoo-multilib/amd64/features.h" 3 4
2956
2957 # 1 "/usr/include/gnu/stubs.h" 1 3 4
2958 # 9 "/usr/include/gnu/stubs.h" 3 4
2959 # 1 "/usr/include/gentoo-multilib/amd64/gnu/stubs.h" 1 3 4
2960
2961
2962
2963
2964 # 1 "/usr/include/bits/wordsize.h" 1 3 4
2965 # 9 "/usr/include/bits/wordsize.h" 3 4
2966 # 1 "/usr/include/gentoo-multilib/amd64/bits/wordsize.h" 1 3 4
2967 # 9 "/usr/include/bits/wordsize.h" 2 3 4
2968 # 5 "/usr/include/gentoo-multilib/amd64/gnu/stubs.h" 2 3 4
2969
2970
2971
2972
2973
2974 # 1 "/usr/include/gnu/stubs-64.h" 1 3 4
2975
2976
2977
2978
2979 # 1 "/usr/include/gentoo-multilib/amd64/gnu/stubs-64.h" 1 3 4
2980 # 5 "/usr/include/gnu/stubs-64.h" 2 3 4
2981 # 10 "/usr/include/gentoo-multilib/amd64/gnu/stubs.h" 2 3 4
2982 # 9 "/usr/include/gnu/stubs.h" 2 3 4
2983 # 346 "/usr/include/gentoo-multilib/amd64/features.h" 2 3 4
2984 # 9 "/usr/include/features.h" 2 3 4
2985 # 27 "/usr/include/gentoo-multilib/amd64/string.h" 2 3 4
2986
2987 extern "C" {
2988
2989
2990
2991
2992
2993 # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4
2994 # 34 "/usr/include/gentoo-multilib/amd64/string.h" 2 3 4
2995
2996
2997
2998
2999 extern void *memcpy (void *__restrict __dest,
3000        __const void *__restrict __src, size_t __n)
3001      throw () __attribute__ ((__nonnull__ (1, 2)));
3002
3003
3004 extern void *memmove (void *__dest, __const void *__src, size_t __n)
3005      throw () __attribute__ ((__nonnull__ (1, 2)));
3006
3007
3008
3009
3010
3011
3012 extern void *memccpy (void *__restrict __dest, __const void *__restrict __src,
3013         int __c, size_t __n)
3014      throw () __attribute__ ((__nonnull__ (1, 2)));
3015
3016
3017
3018
3019
3020 extern void *memset (void *__s, int __c, size_t __n) throw () __attribute__ ((__nonnull__ (1)));
3021
3022
3023 extern int memcmp (__const void *__s1, __const void *__s2, size_t __n)
3024      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
3025
3026
3027 extern void *memchr (__const void *__s, int __c, size_t __n)
3028       throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
3029
3030
3031
3032
3033
3034 extern void *rawmemchr (__const void *__s, int __c)
3035      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
3036
3037
3038 extern void *memrchr (__const void *__s, int __c, size_t __n)
3039       throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
3040
3041
3042
3043
3044
3045 extern char *strcpy (char *__restrict __dest, __const char *__restrict __src)
3046      throw () __attribute__ ((__nonnull__ (1, 2)));
3047
3048 extern char *strncpy (char *__restrict __dest,
3049         __const char *__restrict __src, size_t __n)
3050      throw () __attribute__ ((__nonnull__ (1, 2)));
3051
3052
3053 extern char *strcat (char *__restrict __dest, __const char *__restrict __src)
3054      throw () __attribute__ ((__nonnull__ (1, 2)));
3055
3056 extern char *strncat (char *__restrict __dest, __const char *__restrict __src,
3057         size_t __n) throw () __attribute__ ((__nonnull__ (1, 2)));
3058
3059
3060 extern int strcmp (__const char *__s1, __const char *__s2)
3061      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
3062
3063 extern int strncmp (__const char *__s1, __const char *__s2, size_t __n)
3064      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
3065
3066
3067 extern int strcoll (__const char *__s1, __const char *__s2)
3068      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
3069
3070 extern size_t strxfrm (char *__restrict __dest,
3071          __const char *__restrict __src, size_t __n)
3072      throw () __attribute__ ((__nonnull__ (2)));
3073
3074
3075
3076
3077
3078
3079
3080 # 1 "/usr/include/xlocale.h" 1 3 4
3081 # 9 "/usr/include/xlocale.h" 3 4
3082 # 1 "/usr/include/gentoo-multilib/amd64/xlocale.h" 1 3 4
3083 # 28 "/usr/include/gentoo-multilib/amd64/xlocale.h" 3 4
3084 typedef struct __locale_struct
3085 {
3086
3087   struct locale_data *__locales[13];
3088
3089
3090   const unsigned short int *__ctype_b;
3091   const int *__ctype_tolower;
3092   const int *__ctype_toupper;
3093
3094
3095   const char *__names[13];
3096 } *__locale_t;
3097 # 9 "/usr/include/xlocale.h" 2 3 4
3098 # 119 "/usr/include/gentoo-multilib/amd64/string.h" 2 3 4
3099
3100
3101 extern int strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l)
3102      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3)));
3103
3104 extern size_t strxfrm_l (char *__dest, __const char *__src, size_t __n,
3105     __locale_t __l) throw () __attribute__ ((__nonnull__ (2, 4)));
3106
3107
3108
3109
3110 extern char *strdup (__const char *__s)
3111      throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
3112
3113
3114
3115
3116
3117
3118 extern char *strndup (__const char *__string, size_t __n)
3119      throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
3120 # 165 "/usr/include/gentoo-multilib/amd64/string.h" 3 4
3121
3122
3123 extern char *strchr (__const char *__s, int __c)
3124      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
3125
3126 extern char *strrchr (__const char *__s, int __c)
3127      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
3128
3129
3130
3131
3132
3133 extern char *strchrnul (__const char *__s, int __c)
3134      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
3135
3136
3137
3138
3139
3140 extern size_t strcspn (__const char *__s, __const char *__reject)
3141      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
3142
3143
3144 extern size_t strspn (__const char *__s, __const char *__accept)
3145      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
3146
3147 extern char *strpbrk (__const char *__s, __const char *__accept)
3148      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
3149
3150 extern char *strstr (__const char *__haystack, __const char *__needle)
3151      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
3152
3153
3154
3155 extern char *strtok (char *__restrict __s, __const char *__restrict __delim)
3156      throw () __attribute__ ((__nonnull__ (2)));
3157
3158
3159
3160
3161 extern char *__strtok_r (char *__restrict __s,
3162     __const char *__restrict __delim,
3163     char **__restrict __save_ptr)
3164      throw () __attribute__ ((__nonnull__ (2, 3)));
3165
3166 extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim,
3167          char **__restrict __save_ptr)
3168      throw () __attribute__ ((__nonnull__ (2, 3)));
3169
3170
3171
3172
3173 extern char *strcasestr (__const char *__haystack, __const char *__needle)
3174      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
3175
3176
3177
3178
3179
3180
3181 extern void *memmem (__const void *__haystack, size_t __haystacklen,
3182        __const void *__needle, size_t __needlelen)
3183      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3)));
3184
3185
3186
3187 extern void *__mempcpy (void *__restrict __dest,
3188    __const void *__restrict __src, size_t __n)
3189      throw () __attribute__ ((__nonnull__ (1, 2)));
3190 extern void *mempcpy (void *__restrict __dest,
3191         __const void *__restrict __src, size_t __n)
3192      throw () __attribute__ ((__nonnull__ (1, 2)));
3193
3194
3195
3196
3197
3198 extern size_t strlen (__const char *__s)
3199      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
3200
3201
3202
3203
3204
3205 extern size_t strnlen (__const char *__string, size_t __maxlen)
3206      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
3207
3208
3209
3210
3211
3212 extern char *strerror (int __errnum) throw ();
3213 # 281 "/usr/include/gentoo-multilib/amd64/string.h" 3 4
3214 extern char *strerror_r (int __errnum, char *__buf, size_t __buflen)
3215      throw () __attribute__ ((__nonnull__ (2)));
3216
3217
3218
3219
3220
3221 extern char *strerror_l (int __errnum, __locale_t __l) throw ();
3222
3223
3224
3225
3226
3227 extern void __bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1)));
3228
3229
3230
3231 extern void bcopy (__const void *__src, void *__dest, size_t __n)
3232      throw () __attribute__ ((__nonnull__ (1, 2)));
3233
3234
3235 extern void bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1)));
3236
3237
3238 extern int bcmp (__const void *__s1, __const void *__s2, size_t __n)
3239      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
3240
3241
3242 extern char *index (__const char *__s, int __c)
3243      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
3244
3245
3246 extern char *rindex (__const char *__s, int __c)
3247      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
3248
3249
3250
3251 extern int ffs (int __i) throw () __attribute__ ((__const__));
3252
3253
3254
3255
3256 extern int ffsl (long int __l) throw () __attribute__ ((__const__));
3257
3258 __extension__ extern int ffsll (long long int __ll)
3259      throw () __attribute__ ((__const__));
3260
3261
3262
3263
3264 extern int strcasecmp (__const char *__s1, __const char *__s2)
3265      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
3266
3267
3268 extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n)
3269      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
3270
3271
3272
3273
3274
3275 extern int strcasecmp_l (__const char *__s1, __const char *__s2,
3276     __locale_t __loc)
3277      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3)));
3278
3279 extern int strncasecmp_l (__const char *__s1, __const char *__s2,
3280      size_t __n, __locale_t __loc)
3281      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4)));
3282
3283
3284
3285
3286
3287 extern char *strsep (char **__restrict __stringp,
3288        __const char *__restrict __delim)
3289      throw () __attribute__ ((__nonnull__ (1, 2)));
3290
3291
3292
3293
3294 extern int strverscmp (__const char *__s1, __const char *__s2)
3295      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
3296
3297
3298 extern char *strsignal (int __sig) throw ();
3299
3300
3301 extern char *__stpcpy (char *__restrict __dest, __const char *__restrict __src)
3302      throw () __attribute__ ((__nonnull__ (1, 2)));
3303 extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src)
3304      throw () __attribute__ ((__nonnull__ (1, 2)));
3305
3306
3307
3308 extern char *__stpncpy (char *__restrict __dest,
3309    __const char *__restrict __src, size_t __n)
3310      throw () __attribute__ ((__nonnull__ (1, 2)));
3311 extern char *stpncpy (char *__restrict __dest,
3312         __const char *__restrict __src, size_t __n)
3313      throw () __attribute__ ((__nonnull__ (1, 2)));
3314
3315
3316 extern char *strfry (char *__string) throw () __attribute__ ((__nonnull__ (1)));
3317
3318
3319 extern void *memfrob (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1)));
3320
3321
3322
3323
3324
3325
3326 extern char *basename (__const char *__filename) throw () __attribute__ ((__nonnull__ (1)));
3327 # 432 "/usr/include/gentoo-multilib/amd64/string.h" 3 4
3328 }
3329 # 9 "/usr/include/string.h" 2 3 4
3330 # 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
3331
3332 # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/stdarg.h" 1 3 4
3333 # 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/stdarg.h" 3 4
3334 typedef __builtin_va_list __gnuc_va_list;
3335 # 105 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/stdarg.h" 3 4
3336 typedef __gnuc_va_list va_list;
3337 # 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
3338
3339
3340
3341
3342
3343
3344
3345 typedef QtValidLicenseForCoreModule QtCoreModule;
3346
3347
3348
3349
3350
3351  char *qstrdup(const char *);
3352
3353 inline uint qstrlen(const char *str)
3354 { return str ? uint(strlen(str)) : 0; }
3355
3356 inline uint qstrnlen(const char *str, uint maxlen)
3357 {
3358     uint length = 0;
3359     if (str) {
3360         while (length < maxlen && *str++)
3361             length++;
3362     }
3363     return length;
3364 }
3365
3366  char *qstrcpy(char *dst, const char *src);
3367  char *qstrncpy(char *dst, const char *src, uint len);
3368
3369  int qstrcmp(const char *str1, const char *str2);
3370
3371 inline int qstrncmp(const char *str1, const char *str2, uint len)
3372 {
3373     return (str1 && str2) ? strncmp(str1, str2, len)
3374         : (str1 ? 1 : (str2 ? -1 : 0));
3375 }
3376  int qstricmp(const char *, const char *);
3377  int qstrnicmp(const char *, const char *, uint len);
3378
3379
3380  int qvsnprintf(char *str, size_t n, const char *fmt, va_list ap);
3381  int qsnprintf(char *str, size_t n, const char *fmt, ...);
3382 # 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"
3383  quint16 qChecksum(const char *s, uint len);
3384
3385 class QByteRef;
3386 class QString;
3387 class QDataStream;
3388 template <typename T> class QList;
3389
3390 class QByteArray
3391 {
3392 public:
3393     inline QByteArray();
3394     QByteArray(const char *);
3395     QByteArray(const char *, int size);
3396     QByteArray(int size, char c);
3397     inline QByteArray(const QByteArray &);
3398     inline ~QByteArray();
3399
3400     QByteArray &operator=(const QByteArray &);
3401     QByteArray &operator=(const char *str);
3402
3403     inline int size() const;
3404     bool isEmpty() const;
3405     void resize(int size);
3406
3407     QByteArray &fill(char c, int size = -1);
3408
3409     int capacity() const;
3410     void reserve(int size);
3411     void squeeze();
3412
3413     operator const char *() const;
3414     operator const void *() const;
3415     char *data();
3416     const char *data() const;
3417     inline const char *constData() const;
3418     inline void detach();
3419     bool isDetached() const;
3420     void clear();
3421
3422     const char at(int i) const;
3423     const char operator[](int i) const;
3424     QByteRef operator[](int i);
3425     const char operator[](uint i) const;
3426     QByteRef operator[](uint i);
3427
3428     int indexOf(char c, int from = 0) const;
3429     inline int indexOf(const char *c, int from = 0) const;
3430     int indexOf(const QByteArray &a, int from = 0) const;
3431     int lastIndexOf(char c, int from = -1) const;
3432     inline int lastIndexOf(const char *c, int from = -1) const;
3433     int lastIndexOf(const QByteArray &a, int from = -1) const;
3434
3435     QBool contains(char c) const;
3436     QBool contains(const char *a) const;
3437     QBool contains(const QByteArray &a) const;
3438     int count(char c) const;
3439     int count(const char *a) const;
3440     int count(const QByteArray &a) const;
3441
3442     QByteArray left(int len) const;
3443     QByteArray right(int len) const;
3444     QByteArray mid(int index, int len = -1) const;
3445
3446     bool startsWith(const QByteArray &a) const;
3447     bool startsWith(char c) const;
3448     bool startsWith(const char *c) const;
3449
3450     bool endsWith(const QByteArray &a) const;
3451     bool endsWith(char c) const;
3452     bool endsWith(const char *c) const;
3453
3454     void truncate(int pos);
3455     void chop(int n);
3456
3457     QByteArray toLower() const;
3458     QByteArray toUpper() const;
3459
3460     QByteArray trimmed() const;
3461     QByteArray simplified() const;
3462     QByteArray leftJustified(int width, char fill = ' ', bool truncate = false) const;
3463     QByteArray rightJustified(int width, char fill = ' ', bool truncate = false) const;
3464 # 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"
3465     QByteArray &prepend(char c);
3466     QByteArray &prepend(const char *s);
3467     QByteArray &prepend(const QByteArray &a);
3468     QByteArray &append(char c);
3469     QByteArray &append(const char *s);
3470     QByteArray &append(const QByteArray &a);
3471     QByteArray &insert(int i, char c);
3472     QByteArray &insert(int i, const char *s);
3473     QByteArray &insert(int i, const QByteArray &a);
3474     QByteArray &remove(int index, int len);
3475     QByteArray &replace(int index, int len, const char *s);
3476     QByteArray &replace(int index, int len, const QByteArray &s);
3477     QByteArray &replace(char before, const char *after);
3478     QByteArray &replace(char before, const QByteArray &after);
3479     QByteArray &replace(const char *before, const char *after);
3480     QByteArray &replace(const QByteArray &before, const QByteArray &after);
3481     QByteArray &replace(const QByteArray &before, const char *after);
3482     QByteArray &replace(const char *before, const QByteArray &after);
3483     QByteArray &replace(char before, char after);
3484     QByteArray &operator+=(char c);
3485     QByteArray &operator+=(const char *s);
3486     QByteArray &operator+=(const QByteArray &a);
3487
3488     QList<QByteArray> split(char sep) const;
3489
3490
3491     QByteArray &append(const QString &s);
3492     QByteArray &insert(int i, const QString &s);
3493     QByteArray &replace(const QString &before, const char *after);
3494     QByteArray &replace(char c, const QString &after);
3495     QByteArray &replace(const QString &before, const QByteArray &after);
3496
3497     QByteArray &operator+=(const QString &s);
3498     int indexOf(const QString &s, int from = 0) const;
3499     int lastIndexOf(const QString &s, int from = -1) const;
3500
3501
3502     inline bool operator==(const QString &s2) const;
3503     inline bool operator!=(const QString &s2) const;
3504     inline bool operator<(const QString &s2) const;
3505     inline bool operator>(const QString &s2) const;
3506     inline bool operator<=(const QString &s2) const;
3507     inline bool operator>=(const QString &s2) const;
3508
3509
3510     short toShort(bool *ok = 0, int base = 10) const;
3511     ushort toUShort(bool *ok = 0, int base = 10) const;
3512     int toInt(bool *ok = 0, int base = 10) const;
3513     uint toUInt(bool *ok = 0, int base = 10) const;
3514     long toLong(bool *ok = 0, int base = 10) const;
3515     ulong toULong(bool *ok = 0, int base = 10) const;
3516     qlonglong toLongLong(bool *ok = 0, int base = 10) const;
3517     qulonglong toULongLong(bool *ok = 0, int base = 10) const;
3518     float toFloat(bool *ok = 0) const;
3519     double toDouble(bool *ok = 0) const;
3520     QByteArray toBase64() const;
3521     QByteArray toHex() const;
3522
3523     QByteArray &setNum(short, int base = 10);
3524     QByteArray &setNum(ushort, int base = 10);
3525     QByteArray &setNum(int, int base = 10);
3526     QByteArray &setNum(uint, int base = 10);
3527     QByteArray &setNum(qlonglong, int base = 10);
3528     QByteArray &setNum(qulonglong, int base = 10);
3529     QByteArray &setNum(float, char f = 'g', int prec = 6);
3530     QByteArray &setNum(double, char f = 'g', int prec = 6);
3531
3532     static QByteArray number(int, int base = 10);
3533     static QByteArray number(uint, int base = 10);
3534     static QByteArray number(qlonglong, int base = 10);
3535     static QByteArray number(qulonglong, int base = 10);
3536     static QByteArray number(double, char f = 'g', int prec = 6);
3537     static QByteArray fromRawData(const char *, int size);
3538     static QByteArray fromBase64(const QByteArray &base64);
3539     static QByteArray fromHex(const QByteArray &hexEncoded);
3540
3541     typedef char *iterator;
3542     typedef const char *const_iterator;
3543     typedef iterator Iterator;
3544     typedef const_iterator ConstIterator;
3545     iterator begin();
3546     const_iterator begin() const;
3547     const_iterator constBegin() const;
3548     iterator end();
3549     const_iterator end() const;
3550     const_iterator constEnd() const;
3551
3552
3553     typedef const char & const_reference;
3554     typedef char & reference;
3555     void push_back(char c);
3556     void push_back(const char *c);
3557     void push_back(const QByteArray &a);
3558     void push_front(char c);
3559     void push_front(const char *c);
3560     void push_front(const QByteArray &a);
3561
3562     inline int count() const { return d->size; }
3563     int length() const { return d->size; }
3564     bool isNull() const;
3565 # 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"
3566 private:
3567     operator QNoImplicitBoolCast() const;
3568     struct Data {
3569         QBasicAtomic ref;
3570         int alloc, size;
3571         char *data;
3572         char array[1];
3573     };
3574     static Data shared_null;
3575     static Data shared_empty;
3576     Data *d;
3577     QByteArray(Data *dd, int , int ) : d(dd) {}
3578     void realloc(int alloc);
3579     void expand(int i);
3580
3581     friend class QByteRef;
3582     friend class QString;
3583 public:
3584     typedef Data * DataPtr;
3585     inline DataPtr &data_ptr() { return d; }
3586 };
3587
3588 inline QByteArray::QByteArray(): d(&shared_null) { d->ref.ref(); }
3589 inline QByteArray::~QByteArray() { if (!d->ref.deref()) qFree(d); }
3590 inline int QByteArray::size() const
3591 { return d->size; }
3592 inline const char QByteArray::at(int i) const
3593 { 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]; }
3594 inline const char QByteArray::operator[](int i) const
3595 { 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]; }
3596 inline const char QByteArray::operator[](uint i) const
3597 { 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]; }
3598 inline bool QByteArray::isEmpty() const
3599 { return d->size == 0; }
3600 inline QByteArray::operator const char *() const
3601 { return d->data; }
3602 inline QByteArray::operator const void *() const
3603 { return d->data; }
3604 inline char *QByteArray::data()
3605 { detach(); return d->data; }
3606 inline const char *QByteArray::data() const
3607 { return d->data; }
3608 inline const char *QByteArray::constData() const
3609 { return d->data; }
3610 inline void QByteArray::detach()
3611 { if (d->ref != 1 || d->data != d->array) realloc(d->size); }
3612 inline bool QByteArray::isDetached() const
3613 { return d->ref == 1; }
3614 inline QByteArray::QByteArray(const QByteArray &a) : d(a.d)
3615 { d->ref.ref(); }
3616
3617
3618
3619
3620
3621 inline int QByteArray::capacity() const
3622 { return d->alloc; }
3623
3624 inline void QByteArray::reserve(int asize)
3625 { if (d->ref != 1 || asize > d->alloc) realloc(asize); }
3626
3627 inline void QByteArray::squeeze()
3628 { if (d->size < d->alloc) realloc(d->size); }
3629
3630 class QByteRef {
3631     QByteArray &a;
3632     int i;
3633     inline QByteRef(QByteArray &array, int idx)
3634         : a(array),i(idx) {}
3635     friend class QByteArray;
3636 public:
3637     inline operator const char() const
3638         { return i < a.d->size ? a.d->data[i] : 0; }
3639     inline QByteRef &operator=(char c)
3640         { if (a.d->ref != 1 || i >= a.d->size) a.expand(i);
3641           a.d->data[i] = c; return *this; }
3642     inline QByteRef &operator=(const QByteRef &c)
3643         { if (a.d->ref != 1 || i >= a.d->size) a.expand(i);
3644           a.d->data[i] = c.a.d->data[c.i]; return *this; }
3645     inline bool operator==(char c) const
3646     { return a.d->data[i] == c; }
3647     inline bool operator!=(char c) const
3648     { return a.d->data[i] != c; }
3649     inline bool operator>(char c) const
3650     { return a.d->data[i] > c; }
3651     inline bool operator>=(char c) const
3652     { return a.d->data[i] >= c; }
3653     inline bool operator<(char c) const
3654     { return a.d->data[i] < c; }
3655     inline bool operator<=(char c) const
3656     { return a.d->data[i] <= c; }
3657 };
3658
3659 inline QByteRef QByteArray::operator[](int i)
3660 { 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); }
3661 inline QByteRef QByteArray::operator[](uint i)
3662 { return QByteRef(*this, i); }
3663 inline QByteArray::iterator QByteArray::begin()
3664 { detach(); return d->data; }
3665 inline QByteArray::const_iterator QByteArray::begin() const
3666 { return d->data; }
3667 inline QByteArray::const_iterator QByteArray::constBegin() const
3668 { return d->data; }
3669 inline QByteArray::iterator QByteArray::end()
3670 { detach(); return d->data + d->size; }
3671 inline QByteArray::const_iterator QByteArray::end() const
3672 { return d->data + d->size; }
3673 inline QByteArray::const_iterator QByteArray::constEnd() const
3674 { return d->data + d->size; }
3675 inline QByteArray &QByteArray::operator+=(char c)
3676 { return append(c); }
3677 inline QByteArray &QByteArray::operator+=(const char *s)
3678 { return append(s); }
3679 inline QByteArray &QByteArray::operator+=(const QByteArray &a)
3680 { return append(a); }
3681 inline void QByteArray::push_back(char c)
3682 { append(c); }
3683 inline void QByteArray::push_back(const char *c)
3684 { append(c); }
3685 inline void QByteArray::push_back(const QByteArray &a)
3686 { append(a); }
3687 inline void QByteArray::push_front(char c)
3688 { prepend(c); }
3689 inline void QByteArray::push_front(const char *c)
3690 { prepend(c); }
3691 inline void QByteArray::push_front(const QByteArray &a)
3692 { prepend(a); }
3693 inline QBool QByteArray::contains(const QByteArray &a) const
3694 { return QBool(indexOf(a) != -1); }
3695 inline QBool QByteArray::contains(char c) const
3696 { return QBool(indexOf(c) != -1); }
3697 inline bool operator==(const QByteArray &a1, const QByteArray &a2)
3698 { return (a1.size() == a2.size()) && (memcmp(a1, a2, a1.size())==0); }
3699 inline bool operator==(const QByteArray &a1, const char *a2)
3700 { return a2 ? strcmp(a1,a2) == 0 : a1.isEmpty(); }
3701 inline bool operator==(const char *a1, const QByteArray &a2)
3702 { return a1 ? strcmp(a1,a2) == 0 : a2.isEmpty(); }
3703 inline bool operator!=(const QByteArray &a1, const QByteArray &a2)
3704 { return !(a1==a2); }
3705 inline bool operator!=(const QByteArray &a1, const char *a2)
3706 { return a2 ? strcmp(a1,a2) != 0 : !a1.isEmpty(); }
3707 inline bool operator!=(const char *a1, const QByteArray &a2)
3708 { return a1 ? strcmp(a1,a2) != 0 : !a2.isEmpty(); }
3709 inline bool operator<(const QByteArray &a1, const QByteArray &a2)
3710 { return strcmp(a1, a2) < 0; }
3711  inline bool operator<(const QByteArray &a1, const char *a2)
3712 { return qstrcmp(a1, a2) < 0; }
3713 inline bool operator<(const char *a1, const QByteArray &a2)
3714 { return qstrcmp(a1, a2) < 0; }
3715 inline bool operator<=(const QByteArray &a1, const QByteArray &a2)
3716 { return strcmp(a1, a2) <= 0; }
3717 inline bool operator<=(const QByteArray &a1, const char *a2)
3718 { return qstrcmp(a1, a2) <= 0; }
3719 inline bool operator<=(const char *a1, const QByteArray &a2)
3720 { return qstrcmp(a1, a2) <= 0; }
3721 inline bool operator>(const QByteArray &a1, const QByteArray &a2)
3722 { return strcmp(a1, a2) > 0; }
3723 inline bool operator>(const QByteArray &a1, const char *a2)
3724 { return qstrcmp(a1, a2) > 0; }
3725 inline bool operator>(const char *a1, const QByteArray &a2)
3726 { return qstrcmp(a1, a2) > 0; }
3727 inline bool operator>=(const QByteArray &a1, const QByteArray &a2)
3728 { return strcmp(a1, a2) >= 0; }
3729 inline bool operator>=(const QByteArray &a1, const char *a2)
3730 { return qstrcmp(a1, a2) >= 0; }
3731 inline bool operator>=(const char *a1, const QByteArray &a2)
3732 { return qstrcmp(a1, a2) >= 0; }
3733 inline const QByteArray operator+(const QByteArray &a1, const QByteArray &a2)
3734 { return QByteArray(a1) += a2; }
3735 inline const QByteArray operator+(const QByteArray &a1, const char *a2)
3736 { return QByteArray(a1) += a2; }
3737 inline const QByteArray operator+(const QByteArray &a1, char a2)
3738 { return QByteArray(a1) += a2; }
3739 inline const QByteArray operator+(const char *a1, const QByteArray &a2)
3740 { return QByteArray(a1) += a2; }
3741 inline const QByteArray operator+(char a1, const QByteArray &a2)
3742 { return QByteArray(&a1, 1) += a2; }
3743 inline int QByteArray::indexOf(const char *c, int i) const
3744 { return indexOf(fromRawData(c, qstrlen(c)), i); }
3745 inline int QByteArray::lastIndexOf(const char *c, int i) const
3746 { return lastIndexOf(fromRawData(c, qstrlen(c)), i); }
3747 inline QBool QByteArray::contains(const char *c) const
3748 { return contains(fromRawData(c, qstrlen(c))); }
3749 inline QByteArray &QByteArray::replace(int index, int len, const char *c)
3750 { return replace(index, len, fromRawData(c, qstrlen(c))); }
3751 inline QByteArray &QByteArray::replace(char before, const char *c)
3752 { return replace(before, fromRawData(c, qstrlen(c))); }
3753 inline QByteArray &QByteArray::replace(const QByteArray &before, const char *c)
3754 { return replace(before, fromRawData(c, qstrlen(c))); }
3755 inline QByteArray &QByteArray::replace(const char *c, const QByteArray &after)
3756 { return replace(fromRawData(c, qstrlen(c)), after); }
3757 inline QByteArray &QByteArray::replace(const char *before, const char *after)
3758 { return replace(fromRawData(before, qstrlen(before)), fromRawData(after, qstrlen(after))); }
3759
3760 inline QByteArray &QByteArray::setNum(short n, int base)
3761 { return setNum(qlonglong(n), base); }
3762 inline QByteArray &QByteArray::setNum(ushort n, int base)
3763 { return setNum(qulonglong(n), base); }
3764 inline QByteArray &QByteArray::setNum(int n, int base)
3765 { return setNum(qlonglong(n), base); }
3766 inline QByteArray &QByteArray::setNum(uint n, int base)
3767 { return setNum(qulonglong(n), base); }
3768 inline QByteArray &QByteArray::setNum(float n, char f, int prec)
3769 { return setNum(double(n),f,prec); }
3770
3771
3772
3773  QDataStream &operator<<(QDataStream &, const QByteArray &);
3774  QDataStream &operator>>(QDataStream &, QByteArray &);
3775 # 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"
3776 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"; } };
3777 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; }
3778 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qbytearray.h" 2
3779 # 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
3780
3781 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qatomic.h" 1
3782 # 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
3783
3784 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qnamespace.h" 1
3785 # 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
3786 # 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"
3787
3788
3789 typedef QtValidLicenseForCoreModule QtCoreModule;
3790
3791 class QCharRef;
3792 class QRegExp;
3793 class QStringList;
3794 class QTextCodec;
3795 class QLatin1String;
3796 class QStringRef;
3797 template <typename T> class QVector;
3798
3799 class QString
3800 {
3801 public:
3802     inline QString();
3803     QString(const QChar *unicode, int size);
3804     QString(QChar c);
3805     QString(int size, QChar c);
3806     inline QString(const QLatin1String &latin1);
3807     inline QString(const QString &);
3808     inline ~QString();
3809     QString &operator=(QChar c);
3810     QString &operator=(const QString &);
3811     inline QString &operator=(const QLatin1String &);
3812
3813     inline int size() const { return d->size; }
3814     inline int count() const { return d->size; }
3815     inline int length() const;
3816     inline bool isEmpty() const;
3817     void resize(int size);
3818
3819     QString &fill(QChar c, int size = -1);
3820     void truncate(int pos);
3821     void chop(int n);
3822
3823     int capacity() const;
3824     inline void reserve(int size);
3825     inline void squeeze() { if (d->size < d->alloc) realloc(); d->capacity = 0;}
3826
3827     inline const QChar *unicode() const;
3828     inline QChar *data();
3829     inline const QChar *data() const;
3830     inline const QChar *constData() const;
3831
3832     inline void detach();
3833     inline bool isDetached() const;
3834     void clear();
3835
3836     inline const QChar at(int i) const;
3837     const QChar operator[](int i) const;
3838     QCharRef operator[](int i);
3839     const QChar operator[](uint i) const;
3840     QCharRef operator[](uint i);
3841
3842     QString arg(qlonglong a, int fieldwidth=0, int base=10,
3843                 const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result));
3844     QString arg(qulonglong a, int fieldwidth=0, int base=10,
3845                 const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result));
3846     QString arg(long a, int fieldwidth=0, int base=10,
3847                 const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result));
3848     QString arg(ulong a, int fieldwidth=0, int base=10,
3849                 const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result));
3850     QString arg(int a, int fieldWidth = 0, int base = 10,
3851                 const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result));
3852     QString arg(uint a, int fieldWidth = 0, int base = 10,
3853                 const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result));
3854     QString arg(short a, int fieldWidth = 0, int base = 10,
3855                 const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result));
3856     QString arg(ushort a, int fieldWidth = 0, int base = 10,
3857                 const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result));
3858     QString arg(double a, int fieldWidth = 0, char fmt = 'g', int prec = -1,
3859                 const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result));
3860     QString arg(char a, int fieldWidth = 0,
3861                 const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result));
3862     QString arg(QChar a, int fieldWidth = 0,
3863                 const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result));
3864     QString arg(const QString &a, int fieldWidth = 0,
3865                 const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result));
3866     QString arg(const QString &a1, const QString &a2) const __attribute__ ((warn_unused_result));
3867     QString arg(const QString &a1, const QString &a2, const QString &a3) const __attribute__ ((warn_unused_result));
3868     QString arg(const QString &a1, const QString &a2, const QString &a3,
3869                 const QString &a4) const __attribute__ ((warn_unused_result));
3870     QString arg(const QString &a1, const QString &a2, const QString &a3,
3871                 const QString &a4, const QString &a5) const __attribute__ ((warn_unused_result));
3872     QString arg(const QString &a1, const QString &a2, const QString &a3,
3873                 const QString &a4, const QString &a5, const QString &a6) const __attribute__ ((warn_unused_result));
3874     QString arg(const QString &a1, const QString &a2, const QString &a3,
3875                 const QString &a4, const QString &a5, const QString &a6,
3876                 const QString &a7) const __attribute__ ((warn_unused_result));
3877     QString arg(const QString &a1, const QString &a2, const QString &a3,
3878                 const QString &a4, const QString &a5, const QString &a6,
3879                 const QString &a7, const QString &a8) const __attribute__ ((warn_unused_result));
3880     QString arg(const QString &a1, const QString &a2, const QString &a3,
3881                 const QString &a4, const QString &a5, const QString &a6,
3882                 const QString &a7, const QString &a8, const QString &a9) const __attribute__ ((warn_unused_result));
3883
3884     QString &vsprintf(const char *format, va_list ap);
3885     QString &sprintf(const char *format, ...)
3886
3887         __attribute__ ((format (printf, 2, 3)))
3888
3889         ;
3890
3891     int indexOf(QChar c, int from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
3892     int indexOf(const QString &s, int from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
3893     int lastIndexOf(QChar c, int from = -1, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
3894     int lastIndexOf(const QString &s, int from = -1, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
3895
3896     inline QBool contains(QChar c, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
3897     inline QBool contains(const QString &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
3898     int count(QChar c, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
3899     int count(const QString &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
3900
3901
3902     int indexOf(const QRegExp &, int from = 0) const;
3903     int lastIndexOf(const QRegExp &, int from = -1) const;
3904     inline QBool contains(const QRegExp &rx) const { return QBool(indexOf(rx) != -1); }
3905     int count(const QRegExp &) const;
3906
3907
3908     enum SectionFlag {
3909         SectionDefault = 0x00,
3910         SectionSkipEmpty = 0x01,
3911         SectionIncludeLeadingSep = 0x02,
3912         SectionIncludeTrailingSep = 0x04,
3913         SectionCaseInsensitiveSeps = 0x08
3914     };
3915     typedef QFlags<SectionFlag> SectionFlags;
3916
3917     QString section(QChar sep, int start, int end = -1, SectionFlags flags = SectionDefault) const;
3918     QString section(const QString &in_sep, int start, int end = -1, SectionFlags flags = SectionDefault) const;
3919
3920     QString section(const QRegExp &reg, int start, int end = -1, SectionFlags flags = SectionDefault) const;
3921
3922
3923     QString left(int n) const __attribute__ ((warn_unused_result));
3924     QString right(int n) const __attribute__ ((warn_unused_result));
3925     QString mid(int position, int n = -1) const __attribute__ ((warn_unused_result));
3926
3927     bool startsWith(const QString &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
3928     bool startsWith(const QLatin1String &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
3929     bool startsWith(const QChar &c, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
3930     bool endsWith(const QString &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
3931     bool endsWith(const QLatin1String &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
3932     bool endsWith(const QChar &c, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
3933
3934     QString leftJustified(int width, QChar fill = QLatin1Char(' '), bool trunc = false) const __attribute__ ((warn_unused_result));
3935     QString rightJustified(int width, QChar fill = QLatin1Char(' '), bool trunc = false) const __attribute__ ((warn_unused_result));
3936
3937     QString toLower() const __attribute__ ((warn_unused_result));
3938     QString toUpper() const __attribute__ ((warn_unused_result));
3939     QString toCaseFolded() const __attribute__ ((warn_unused_result));
3940
3941     QString trimmed() const __attribute__ ((warn_unused_result));
3942     QString simplified() const __attribute__ ((warn_unused_result));
3943
3944     QString &insert(int i, QChar c);
3945     QString &insert(int i, const QChar *uc, int len);
3946     inline QString &insert(int i, const QString &s) { return insert(i, s.constData(), s.length()); }
3947     QString &insert(int i, const QLatin1String &s);
3948     QString &append(QChar c);
3949     QString &append(const QString &s);
3950     QString &append(const QLatin1String &s);
3951     inline QString &prepend(QChar c) { return insert(0, c); }
3952     inline QString &prepend(const QString &s) { return insert(0, s); }
3953     inline QString &prepend(const QLatin1String &s) { return insert(0, s); }
3954     inline QString &operator+=(QChar c) { return append(c); }
3955     inline QString &operator+=(QChar::SpecialCharacter c) { return append(QChar(c)); }
3956     inline QString &operator+=(const QString &s) { return append(s); }
3957     inline QString &operator+=(const QLatin1String &s) { return append(s); }
3958
3959     QString &remove(int i, int len);
3960     QString &remove(QChar c, Qt::CaseSensitivity cs = Qt::CaseSensitive);
3961     QString &remove(const QString &s, Qt::CaseSensitivity cs = Qt::CaseSensitive);
3962     QString &replace(int i, int len, QChar after);
3963     QString &replace(int i, int len, const QChar *s, int slen);
3964     QString &replace(int i, int len, const QString &after);
3965     QString &replace(QChar before, QChar after, Qt::CaseSensitivity cs = Qt::CaseSensitive);
3966     QString &replace(QChar c, const QString &after, Qt::CaseSensitivity cs = Qt::CaseSensitive);
3967     QString &replace(const QString &before, const QString &after,
3968                      Qt::CaseSensitivity cs = Qt::CaseSensitive);
3969
3970     QString &replace(const QRegExp &rx, const QString &after);
3971     inline QString &remove(const QRegExp &rx)
3972     { return replace(rx, QString()); }
3973
3974
3975     enum SplitBehavior { KeepEmptyParts, SkipEmptyParts };
3976
3977     QStringList split(const QString &sep, SplitBehavior behavior = KeepEmptyParts,
3978                       Qt::CaseSensitivity cs = Qt::CaseSensitive) const __attribute__ ((warn_unused_result));
3979     QStringList split(const QChar &sep, SplitBehavior behavior = KeepEmptyParts,
3980                       Qt::CaseSensitivity cs = Qt::CaseSensitive) const __attribute__ ((warn_unused_result));
3981
3982     QStringList split(const QRegExp &sep, SplitBehavior behavior = KeepEmptyParts) const __attribute__ ((warn_unused_result));
3983
3984
3985     enum NormalizationForm {
3986         NormalizationForm_D,
3987         NormalizationForm_C,
3988         NormalizationForm_KD,
3989         NormalizationForm_KC
3990     };
3991     QString normalized(NormalizationForm mode) const __attribute__ ((warn_unused_result));
3992     QString normalized(NormalizationForm mode, QChar::UnicodeVersion version) const __attribute__ ((warn_unused_result));
3993
3994     const ushort *utf16() const;
3995
3996     QByteArray toAscii() const __attribute__ ((warn_unused_result));
3997     QByteArray toLatin1() const __attribute__ ((warn_unused_result));
3998     QByteArray toUtf8() const __attribute__ ((warn_unused_result));
3999     QByteArray toLocal8Bit() const __attribute__ ((warn_unused_result));
4000     QVector<uint> toUcs4() const __attribute__ ((warn_unused_result));
4001
4002     static QString fromAscii(const char *, int size = -1);
4003     static QString fromLatin1(const char *, int size = -1);
4004     static QString fromUtf8(const char *, int size = -1);
4005     static QString fromLocal8Bit(const char *, int size = -1);
4006     static QString fromUtf16(const ushort *, int size = -1);
4007     static QString fromUcs4(const uint *, int size = -1);
4008     static QString fromRawData(const QChar *, int size);
4009
4010     int toWCharArray(wchar_t *array) const;
4011     static QString fromWCharArray(const wchar_t *, int size = -1);
4012
4013     QString &setUnicode(const QChar *unicode, int size);
4014     inline QString &setUtf16(const ushort *utf16, int size);
4015
4016
4017     int compare(const QString &s) const;
4018     int compare(const QString &s, Qt::CaseSensitivity cs) const;
4019
4020     int compare(const QLatin1String &other, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
4021
4022
4023     static inline int compare(const QString &s1, const QString &s2)
4024     { return s1.compare(s2); }
4025     static inline int compare(const QString &s1, const QString &s2, Qt::CaseSensitivity cs)
4026     { return s1.compare(s2, cs); }
4027
4028     static inline int compare(const QString& s1, const QLatin1String &s2,
4029                               Qt::CaseSensitivity cs = Qt::CaseSensitive)
4030     { return s1.compare(s2, cs); }
4031     static inline int compare(const QLatin1String& s1, const QString &s2,
4032                               Qt::CaseSensitivity cs = Qt::CaseSensitive)
4033     { return -s2.compare(s1, cs); }
4034
4035     int localeAwareCompare(const QString& s) const;
4036     static int localeAwareCompare(const QString& s1, const QString& s2)
4037     { return s1.localeAwareCompare(s2); }
4038
4039     short toShort(bool *ok=0, int base=10) const;
4040     ushort toUShort(bool *ok=0, int base=10) const;
4041     int toInt(bool *ok=0, int base=10) const;
4042     uint toUInt(bool *ok=0, int base=10) const;
4043     long toLong(bool *ok=0, int base=10) const;
4044     ulong toULong(bool *ok=0, int base=10) const;
4045     qlonglong toLongLong(bool *ok=0, int base=10) const;
4046     qulonglong toULongLong(bool *ok=0, int base=10) const;
4047     float toFloat(bool *ok=0) const;
4048     double toDouble(bool *ok=0) const;
4049
4050     QString &setNum(short, int base=10);
4051     QString &setNum(ushort, int base=10);
4052     QString &setNum(int, int base=10);
4053     QString &setNum(uint, int base=10);
4054     QString &setNum(long, int base=10);
4055     QString &setNum(ulong, int base=10);
4056     QString &setNum(qlonglong, int base=10);
4057     QString &setNum(qulonglong, int base=10);
4058     QString &setNum(float, char f='g', int prec=6);
4059     QString &setNum(double, char f='g', int prec=6);
4060
4061     static QString number(int, int base=10);
4062     static QString number(uint, int base=10);
4063     static QString number(long, int base=10);
4064     static QString number(ulong, int base=10);
4065     static QString number(qlonglong, int base=10);
4066     static QString number(qulonglong, int base=10);
4067     static QString number(double, char f='g', int prec=6);
4068
4069     bool operator==(const QString &s) const;
4070     bool operator<(const QString &s) const;
4071     inline bool operator>(const QString &s) const { return s < *this; }
4072     inline bool operator!=(const QString &s) const { return !operator==(s); }
4073     inline bool operator<=(const QString &s) const { return !operator>(s); }
4074     inline bool operator>=(const QString &s) const { return !operator<(s); }
4075
4076     bool operator==(const QLatin1String &s) const;
4077     bool operator<(const QLatin1String &s) const;
4078     bool operator>(const QLatin1String &s) const;
4079     inline bool operator!=(const QLatin1String &s) const { return !operator==(s); }
4080     inline bool operator<=(const QLatin1String &s) const { return !operator>(s); }
4081     inline bool operator>=(const QLatin1String &s) const { return !operator<(s); }
4082
4083
4084
4085     inline QString(const char *ch) : d(fromAscii_helper(ch))
4086     {}
4087     inline QString(const QByteArray &a)
4088         : d(fromAscii_helper(a.constData(), qstrnlen(a.constData(), a.size())))
4089     {}
4090     inline QString &operator=(const char *ch)
4091     { return (*this = fromAscii(ch)); }
4092     inline QString &operator=(const QByteArray &a)
4093     { return (*this = fromAscii(a.constData(), qstrnlen(a.constData(), a.size()))); }
4094     inline QString &operator=(char c)
4095     { return (*this = QChar::fromAscii(c)); }
4096
4097
4098     inline QString &prepend(const char *s)
4099     { return prepend(QString::fromAscii(s)); }
4100     inline QString &prepend(const QByteArray &s)
4101     { return prepend(QString::fromAscii(s.constData(), qstrnlen(s.constData(), s.size()))); }
4102     inline QString &append(const char *s)
4103     { return append(QString::fromAscii(s)); }
4104     inline QString &append(const QByteArray &s)
4105     { return append(QString::fromAscii(s.constData(), qstrnlen(s.constData(), s.size()))); }
4106     inline QString &operator+=(const char *s)
4107     { return append(QString::fromAscii(s)); }
4108     inline QString &operator+=(const QByteArray &s)
4109     { return append(QString::fromAscii(s.constData(), qstrnlen(s.constData(), s.size()))); }
4110     inline QString &operator+=(char c)
4111     { return append(QChar::fromAscii(c)); }
4112
4113     inline bool operator==(const char *s) const;
4114     inline bool operator!=(const char *s) const;
4115     inline bool operator<(const char *s) const;
4116     inline bool operator<=(const char *s2) const;
4117     inline bool operator>(const char *s2) const;
4118     inline bool operator>=(const char *s2) const;
4119
4120     inline bool operator==(const QByteArray &s) const;
4121     inline bool operator!=(const QByteArray &s) const;
4122     inline bool operator<(const QByteArray &s) const
4123     { return *this < QString::fromAscii(s.constData(), s.size()); }
4124     inline bool operator>(const QByteArray &s) const
4125     { return *this > QString::fromAscii(s.constData(), s.size()); }
4126     inline bool operator<=(const QByteArray &s) const
4127     { return *this <= QString::fromAscii(s.constData(), s.size()); }
4128     inline bool operator>=(const QByteArray &s) const
4129     { return *this >= QString::fromAscii(s.constData(), s.size()); }
4130
4131
4132     typedef QChar *iterator;
4133     typedef const QChar *const_iterator;
4134     typedef iterator Iterator;
4135     typedef const_iterator ConstIterator;
4136     iterator begin();
4137     const_iterator begin() const;
4138     const_iterator constBegin() const;
4139     iterator end();
4140     const_iterator end() const;
4141     const_iterator constEnd() const;
4142
4143     inline QString &inline_append(QChar ch) {
4144         if (d->ref != 1 || d->size + 1 > d->alloc)
4145             realloc(grow(d->size + 1));
4146         d->data[d->size++] = ch.unicode();
4147         d->data[d->size] = '\0';
4148         return *this;
4149     }
4150
4151
4152     inline void push_back(QChar c) { append(c); }
4153     inline void push_back(const QString &s) { append(s); }
4154     inline void push_front(QChar c) { prepend(c); }
4155     inline void push_front(const QString &s) { prepend(s); }
4156 # 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"
4157     struct Null { };
4158     static const Null null;
4159     inline QString(const Null &): d(&shared_null) { d->ref.ref(); }
4160     inline QString &operator=(const Null &) { *this = QString(); return *this; }
4161     inline bool isNull() const { return d == &shared_null; }
4162 # 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"
4163     bool isSimpleText() const { if (!d->clean) updateProperties(); return d->simpletext; }
4164     bool isRightToLeft() const { if (!d->clean) updateProperties(); return d->righttoleft; }
4165
4166 private:
4167 # 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"
4168     struct Data {
4169         QBasicAtomic ref;
4170         int alloc, size;
4171         ushort *data;
4172         ushort clean : 1;
4173         ushort simpletext : 1;
4174         ushort righttoleft : 1;
4175         ushort asciiCache : 1;
4176         ushort capacity : 1;
4177         ushort reserved : 11;
4178         ushort array[1];
4179     };
4180     static Data shared_null;
4181     static Data shared_empty;
4182     Data *d;
4183     QString(Data *dd, int ) : d(dd) {}
4184
4185
4186
4187     static int grow(int);
4188     static void free(Data *);
4189     void realloc();
4190     void realloc(int alloc);
4191     void expand(int i);
4192     void updateProperties() const;
4193     QString multiArg(int numArgs, const QString **args) const;
4194     static Data *fromLatin1_helper(const char *str, int size = -1);
4195     static Data *fromAscii_helper(const char *str, int size = -1);
4196     friend class QCharRef;
4197     friend class QTextCodec;
4198     friend class QStringRef;
4199     friend inline bool qStringComparisonHelper(const QString &s1, const char *s2);
4200     friend inline bool qStringComparisonHelper(const QStringRef &s1, const char *s2);
4201 public:
4202     typedef Data * DataPtr;
4203     inline DataPtr &data_ptr() { return d; }
4204 };
4205
4206
4207 class QLatin1String
4208 {
4209 public:
4210     inline explicit QLatin1String(const char *s) : chars(s) {}
4211     inline QLatin1String &operator=(const QLatin1String &other)
4212     { chars = other.chars; return *this; }
4213
4214     inline const char *latin1() const { return chars; }
4215
4216     inline bool operator==(const QString &s) const
4217     { return s == *this; }
4218     inline bool operator!=(const QString &s) const
4219     { return s != *this; }
4220     inline bool operator>(const QString &s) const
4221     { return s < *this; }
4222     inline bool operator<(const QString &s) const
4223     { return s > *this; }
4224     inline bool operator>=(const QString &s) const
4225     { return s <= *this; }
4226     inline bool operator<=(const QString &s) const
4227     { return s >= *this; }
4228
4229     inline bool operator==(const char *s) const
4230         { return QString::fromAscii(s) == *this; }
4231     inline bool operator!=(const char *s) const
4232         { return QString::fromAscii(s) != *this; }
4233     inline bool operator<(const char *s) const
4234         { return QString::fromAscii(s) > *this; }
4235     inline bool operator>(const char *s) const
4236         { return QString::fromAscii(s) < *this; }
4237     inline bool operator<=(const char *s) const
4238         { return QString::fromAscii(s) >= *this; }
4239     inline bool operator>=(const char *s) const
4240         { return QString::fromAscii(s) <= *this; }
4241 private:
4242     const char *chars;
4243 };
4244
4245
4246
4247 inline QString::QString(const QLatin1String &latin1) : d(fromLatin1_helper(latin1.latin1()))
4248 { }
4249 inline int QString::length() const
4250 { return d->size; }
4251 inline const QChar QString::at(int i) const
4252 { 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]; }
4253 inline const QChar QString::operator[](int i) const
4254 { 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]; }
4255 inline const QChar QString::operator[](uint i) const
4256 { 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]; }
4257 inline bool QString::isEmpty() const
4258 { return d->size == 0; }
4259 inline const QChar *QString::unicode() const
4260 { return reinterpret_cast<const QChar*>(d->data); }
4261 inline const QChar *QString::data() const
4262 { return reinterpret_cast<const QChar*>(d->data); }
4263 inline QChar *QString::data()
4264 { detach(); return reinterpret_cast<QChar*>(d->data); }
4265 inline const QChar *QString::constData() const
4266 { return reinterpret_cast<const QChar*>(d->data); }
4267 inline void QString::detach()
4268 { if (d->ref != 1 || d->data != d->array) realloc(); }
4269 inline bool QString::isDetached() const
4270 { return d->ref == 1; }
4271 inline QString &QString::operator=(const QLatin1String &s)
4272 {
4273     *this = fromLatin1(s.latin1());
4274     return *this;
4275 }
4276 inline void QString::clear()
4277 { if (!isNull()) *this = QString(); }
4278 inline QString::QString(const QString &other) : d(other.d)
4279 { 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(); }
4280 inline int QString::capacity() const
4281 { return d->alloc; }
4282 inline QString &QString::setNum(short n, int base)
4283 { return setNum(qlonglong(n), base); }
4284 inline QString &QString::setNum(ushort n, int base)
4285 { return setNum(qulonglong(n), base); }
4286 inline QString &QString::setNum(int n, int base)
4287 { return setNum(qlonglong(n), base); }
4288 inline QString &QString::setNum(uint n, int base)
4289 { return setNum(qulonglong(n), base); }
4290 inline QString &QString::setNum(long n, int base)
4291 { return setNum(qlonglong(n), base); }
4292 inline QString &QString::setNum(ulong n, int base)
4293 { return setNum(qulonglong(n), base); }
4294 inline QString &QString::setNum(float n, char f, int prec)
4295 { return setNum(double(n),f,prec); }
4296 inline QString QString::arg(int a, int fieldWidth, int base, const QChar &fillChar) const
4297 { return arg(qlonglong(a), fieldWidth, base, fillChar); }
4298 inline QString QString::arg(uint a, int fieldWidth, int base, const QChar &fillChar) const
4299 { return arg(qulonglong(a), fieldWidth, base, fillChar); }
4300 inline QString QString::arg(long a, int fieldWidth, int base, const QChar &fillChar) const
4301 { return arg(qlonglong(a), fieldWidth, base, fillChar); }
4302 inline QString QString::arg(ulong a, int fieldWidth, int base, const QChar &fillChar) const
4303 { return arg(qulonglong(a), fieldWidth, base, fillChar); }
4304 inline QString QString::arg(short a, int fieldWidth, int base, const QChar &fillChar) const
4305 { return arg(qlonglong(a), fieldWidth, base, fillChar); }
4306 inline QString QString::arg(ushort a, int fieldWidth, int base, const QChar &fillChar) const
4307 { return arg(qulonglong(a), fieldWidth, base, fillChar); }
4308 inline QString QString::arg(const QString &a1, const QString &a2) const
4309 { const QString *args[2] = { &a1, &a2 }; return multiArg(2, args); }
4310 inline QString QString::arg(const QString &a1, const QString &a2, const QString &a3) const
4311 { const QString *args[3] = { &a1, &a2, &a3 }; return multiArg(3, args); }
4312 inline QString QString::arg(const QString &a1, const QString &a2, const QString &a3,
4313                             const QString &a4) const
4314 { const QString *args[4] = { &a1, &a2, &a3, &a4 }; return multiArg(4, args); }
4315 inline QString QString::arg(const QString &a1, const QString &a2, const QString &a3,
4316                             const QString &a4, const QString &a5) const
4317 { const QString *args[5] = { &a1, &a2, &a3, &a4, &a5 }; return multiArg(5, args); }
4318 inline QString QString::arg(const QString &a1, const QString &a2, const QString &a3,
4319                             const QString &a4, const QString &a5, const QString &a6) const
4320 { const QString *args[6] = { &a1, &a2, &a3, &a4, &a5, &a6 }; return multiArg(6, args); }
4321 inline QString QString::arg(const QString &a1, const QString &a2, const QString &a3,
4322                             const QString &a4, const QString &a5, const QString &a6,
4323                             const QString &a7) const
4324 { const QString *args[7] = { &a1, &a2, &a3, &a4, &a5, &a6, &a7 }; return multiArg(7, args); }
4325 inline QString QString::arg(const QString &a1, const QString &a2, const QString &a3,
4326                             const QString &a4, const QString &a5, const QString &a6,
4327                             const QString &a7, const QString &a8) const
4328 { const QString *args[8] = { &a1, &a2, &a3, &a4, &a5, &a6, &a7, &a8 }; return multiArg(8, args); }
4329 inline QString QString::arg(const QString &a1, const QString &a2, const QString &a3,
4330                             const QString &a4, const QString &a5, const QString &a6,
4331                             const QString &a7, const QString &a8, const QString &a9) const
4332 { const QString *args[9] = { &a1, &a2, &a3, &a4, &a5, &a6, &a7, &a8, &a9 }; return multiArg(9, args); }
4333
4334 inline QString QString::section(QChar asep, int astart, int aend, SectionFlags aflags) const
4335 { return section(QString(asep), astart, aend, aflags); }
4336
4337
4338 class QCharRef {
4339     QString &s;
4340     int i;
4341     inline QCharRef(QString &str, int idx)
4342         : s(str),i(idx) {}
4343     friend class QString;
4344 public:
4345
4346
4347
4348
4349     inline operator QChar() const
4350         { return i < s.d->size ? s.d->data[i] : 0; }
4351     inline QCharRef &operator=(const QChar &c)
4352         { if (s.d->ref != 1 || i >= s.d->size) s.expand(i);
4353           s.d->data[i] = c.unicode(); return *this; }
4354
4355
4356
4357     inline QCharRef &operator=(char c)
4358     { return operator=(QChar::fromAscii(c)); }
4359     inline QCharRef &operator=(uchar c)
4360     { return operator=(QChar::fromAscii(c)); }
4361
4362     inline QCharRef &operator=(const QCharRef &c) { return operator=(QChar(c)); }
4363     inline QCharRef &operator=(ushort rc) { return operator=(QChar(rc)); }
4364     inline QCharRef &operator=(short rc) { return operator=(QChar(rc)); }
4365     inline QCharRef &operator=(uint rc) { return operator=(QChar(rc)); }
4366     inline QCharRef &operator=(int rc) { return operator=(QChar(rc)); }
4367
4368
4369     inline bool isNull() const { return QChar(*this).isNull(); }
4370     inline bool isPrint() const { return QChar(*this).isPrint(); }
4371     inline bool isPunct() const { return QChar(*this).isPunct(); }
4372     inline bool isSpace() const { return QChar(*this).isSpace(); }
4373     inline bool isMark() const { return QChar(*this).isMark(); }
4374     inline bool isLetter() const { return QChar(*this).isLetter(); }
4375     inline bool isNumber() const { return QChar(*this).isNumber(); }
4376     inline bool isLetterOrNumber() { return QChar(*this).isLetterOrNumber(); }
4377     inline bool isDigit() const { return QChar(*this).isDigit(); }
4378     inline bool isLower() const { return QChar(*this).isLower(); }
4379     inline bool isUpper() const { return QChar(*this).isUpper(); }
4380     inline bool isTitleCase() const { return QChar(*this).isTitleCase(); }
4381
4382     inline int digitValue() const { return QChar(*this).digitValue(); }
4383     QChar toLower() const { return QChar(*this).toLower(); }
4384     QChar toUpper() const { return QChar(*this).toUpper(); }
4385     QChar toTitleCase () const { return QChar(*this).toTitleCase(); }
4386
4387     QChar::Category category() const { return QChar(*this).category(); }
4388     QChar::Direction direction() const { return QChar(*this).direction(); }
4389     QChar::Joining joining() const { return QChar(*this).joining(); }
4390     bool hasMirrored() const { return QChar(*this).hasMirrored(); }
4391     QChar mirroredChar() const { return QChar(*this).mirroredChar(); }
4392     QString decomposition() const { return QChar(*this).decomposition(); }
4393     QChar::Decomposition decompositionTag() const { return QChar(*this).decompositionTag(); }
4394     uchar combiningClass() const { return QChar(*this).combiningClass(); }
4395
4396     QChar::UnicodeVersion unicodeVersion() const { return QChar(*this).unicodeVersion(); }
4397
4398     inline uchar cell() const { return QChar(*this).cell(); }
4399     inline uchar row() const { return QChar(*this).row(); }
4400     inline void setCell(uchar cell);
4401     inline void setRow(uchar row);
4402
4403     const char toAscii() const { return QChar(*this).toAscii(); }
4404     const char toLatin1() const { return QChar(*this).toLatin1(); }
4405     const ushort unicode() const { return QChar(*this).unicode(); }
4406 # 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"
4407 };
4408
4409 inline void QCharRef::setRow(uchar arow) { QChar(*this).setRow(arow); }
4410 inline void QCharRef::setCell(uchar acell) { QChar(*this).setCell(acell); }
4411
4412
4413 inline QString::QString() : d(&shared_null) { d->ref.ref(); }
4414 inline QString::~QString() { if (!d->ref.deref()) free(d); }
4415 inline void QString::reserve(int asize) { if (d->ref != 1 || asize > d->alloc) realloc(asize); d->capacity = 1;}
4416 inline QString &QString::setUtf16(const ushort *autf16, int asize)
4417 { return setUnicode(reinterpret_cast<const QChar *>(autf16), asize); }
4418 inline QCharRef QString::operator[](int i)
4419 { 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); }
4420 inline QCharRef QString::operator[](uint i)
4421 { return QCharRef(*this, i); }
4422 inline QString::iterator QString::begin()
4423 { detach(); return reinterpret_cast<QChar*>(d->data); }
4424 inline QString::const_iterator QString::begin() const
4425 { return reinterpret_cast<const QChar*>(d->data); }
4426 inline QString::const_iterator QString::constBegin() const
4427 { return reinterpret_cast<const QChar*>(d->data); }
4428 inline QString::iterator QString::end()
4429 { detach(); return reinterpret_cast<QChar*>(d->data + d->size); }
4430 inline QString::const_iterator QString::end() const
4431 { return reinterpret_cast<const QChar*>(d->data + d->size); }
4432 inline QString::const_iterator QString::constEnd() const
4433 { return reinterpret_cast<const QChar*>(d->data + d->size); }
4434 inline QBool QString::contains(const QString &s, Qt::CaseSensitivity cs) const
4435 { return QBool(indexOf(s, 0, cs) != -1); }
4436 inline QBool QString::contains(QChar c, Qt::CaseSensitivity cs) const
4437 { return QBool(indexOf(c, 0, cs) != -1); }
4438
4439
4440 inline bool operator==(QString::Null, QString::Null) { return true; }
4441 inline bool operator==(QString::Null, const QString &s) { return s.isNull(); }
4442 inline bool operator==(const QString &s, QString::Null) { return s.isNull(); }
4443 inline bool operator!=(QString::Null, QString::Null) { return false; }
4444 inline bool operator!=(QString::Null, const QString &s) { return !s.isNull(); }
4445 inline bool operator!=(const QString &s, QString::Null) { return !s.isNull(); }
4446
4447
4448 inline bool qStringComparisonHelper(const QString &s1, const char *s2)
4449 {
4450
4451
4452
4453     return (s1 == QLatin1String(s2));
4454 }
4455 inline bool QString::operator==(const char *s) const
4456 { return qStringComparisonHelper(*this, s); }
4457 inline bool QString::operator!=(const char *s) const
4458 { return !qStringComparisonHelper(*this, s); }
4459 inline bool QString::operator<(const char *s) const
4460 { return *this < QString::fromAscii(s); }
4461 inline bool QString::operator>(const char *s) const
4462 { return *this > QString::fromAscii(s); }
4463 inline bool QString::operator<=(const char *s) const
4464 { return *this <= QString::fromAscii(s); }
4465 inline bool QString::operator>=(const char *s) const
4466 { return *this >= QString::fromAscii(s); }
4467
4468 inline bool operator==(const char *s1, const QString &s2)
4469 { return qStringComparisonHelper(s2, s1); }
4470 inline bool operator!=(const char *s1, const QString &s2)
4471 { return !qStringComparisonHelper(s2, s1); }
4472 inline bool operator<(const char *s1, const QString &s2)
4473 { return (QString::fromAscii(s1) < s2); }
4474 inline bool operator>(const char *s1, const QString &s2)
4475 { return (QString::fromAscii(s1) > s2); }
4476 inline bool operator<=(const char *s1, const QString &s2)
4477 { return (QString::fromAscii(s1) <= s2); }
4478 inline bool operator>=(const char *s1, const QString &s2)
4479 { return (QString::fromAscii(s1) >= s2); }
4480
4481 inline bool operator==(const char *s1, const QLatin1String &s2)
4482 { return QString::fromAscii(s1) == s2; }
4483 inline bool operator!=(const char *s1, const QLatin1String &s2)
4484 { return QString::fromAscii(s1) != s2; }
4485 inline bool operator<(const char *s1, const QLatin1String &s2)
4486 { return (QString::fromAscii(s1) < s2); }
4487 inline bool operator>(const char *s1, const QLatin1String &s2)
4488 { return (QString::fromAscii(s1) > s2); }
4489 inline bool operator<=(const char *s1, const QLatin1String &s2)
4490 { return (QString::fromAscii(s1) <= s2); }
4491 inline bool operator>=(const char *s1, const QLatin1String &s2)
4492 { return (QString::fromAscii(s1) >= s2); }
4493
4494 inline bool operator==(const QLatin1String &s1, const QLatin1String &s2)
4495 { return (qstrcmp(s1.latin1(), s2.latin1()) == 0); }
4496 inline bool operator!=(const QLatin1String &s1, const QLatin1String &s2)
4497 { return (qstrcmp(s1.latin1(), s2.latin1()) != 0); }
4498 inline bool operator<(const QLatin1String &s1, const QLatin1String &s2)
4499 { return (qstrcmp(s1.latin1(), s2.latin1()) < 0); }
4500 inline bool operator<=(const QLatin1String &s1, const QLatin1String &s2)
4501 { return (qstrcmp(s1.latin1(), s2.latin1()) <= 0); }
4502 inline bool operator>(const QLatin1String &s1, const QLatin1String &s2)
4503 { return (qstrcmp(s1.latin1(), s2.latin1()) > 0); }
4504 inline bool operator>=(const QLatin1String &s1, const QLatin1String &s2)
4505 { return (qstrcmp(s1.latin1(), s2.latin1()) >= 0); }
4506
4507
4508 inline bool QString::operator==(const QByteArray &s) const
4509 { return qStringComparisonHelper(*this, s.constData()); }
4510 inline bool QString::operator!=(const QByteArray &s) const
4511 { return !qStringComparisonHelper(*this, s.constData()); }
4512
4513 inline bool QByteArray::operator==(const QString &s) const
4514 { return qStringComparisonHelper(s, constData()); }
4515 inline bool QByteArray::operator!=(const QString &s) const
4516 { return !qStringComparisonHelper(s, constData()); }
4517 inline bool QByteArray::operator<(const QString &s) const
4518 { return QString::fromAscii(constData(), size()) < s; }
4519 inline bool QByteArray::operator>(const QString &s) const
4520 { return QString::fromAscii(constData(), size()) > s; }
4521 inline bool QByteArray::operator<=(const QString &s) const
4522 { return QString::fromAscii(constData(), size()) <= s; }
4523 inline bool QByteArray::operator>=(const QString &s) const
4524 { return QString::fromAscii(constData(), size()) >= s; }
4525
4526
4527
4528 inline QByteArray &QByteArray::append(const QString &s)
4529 { return append(s.toAscii()); }
4530 inline QByteArray &QByteArray::insert(int i, const QString &s)
4531 { return insert(i, s.toAscii()); }
4532 inline QByteArray &QByteArray::replace(char c, const QString &after)
4533 { return replace(c, after.toAscii()); }
4534 inline QByteArray &QByteArray::replace(const QString &before, const char *after)
4535 { return replace(before.toAscii(), after); }
4536 inline QByteArray &QByteArray::replace(const QString &before, const QByteArray &after)
4537 { return replace(before.toAscii(), after); }
4538 inline QByteArray &QByteArray::operator+=(const QString &s)
4539 { return operator+=(s.toAscii()); }
4540 inline int QByteArray::indexOf(const QString &s, int from) const
4541 { return indexOf(s.toAscii(), from); }
4542 inline int QByteArray::lastIndexOf(const QString &s, int from) const
4543 { return lastIndexOf(s.toAscii(), from); }
4544 # 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"
4545 inline const QString operator+(const QString &s1, const QString &s2)
4546 { QString t(s1); t += s2; return t; }
4547 inline const QString operator+(const QString &s1, QChar s2)
4548 { QString t(s1); t += s2; return t; }
4549 inline const QString operator+(QChar s1, const QString &s2)
4550 { QString t(s1); t += s2; return t; }
4551
4552 inline const QString operator+(const QString &s1, const char *s2)
4553 { QString t(s1); t += QString::fromAscii(s2); return t; }
4554 inline const QString operator+(const char *s1, const QString &s2)
4555 { QString t = QString::fromAscii(s1); t += s2; return t; }
4556 inline const QString operator+(char c, const QString &s)
4557 { QString t = s; t.prepend(QChar::fromAscii(c)); return t; }
4558 inline const QString operator+(const QString &s, char c)
4559 { QString t = s; t += QChar::fromAscii(c); return t; }
4560 inline const QString operator+(const QByteArray &ba, const QString &s)
4561 { QString t = QString::fromAscii(ba.constData(), qstrnlen(ba.constData(), ba.size())); t += s; return t; }
4562 inline const QString operator+(const QString &s, const QByteArray &ba)
4563 { QString t(s); t += QString::fromAscii(ba.constData(), qstrnlen(ba.constData(), ba.size())); return t; }
4564 # 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"
4565  QDataStream &operator<<(QDataStream &, const QString &);
4566  QDataStream &operator>>(QDataStream &, QString &);
4567 # 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"
4568 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"; } };
4569 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; }
4570 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; }
4571 # 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"
4572 class QStringRef {
4573     const QString *m_string;
4574     int m_position;
4575     int m_size;
4576 public:
4577     inline QStringRef():m_string(0), m_position(0), m_size(0){}
4578     inline QStringRef(const QString *string, int position, int size);
4579     inline QStringRef(const QString *string);
4580     inline QStringRef(const QStringRef &other)
4581         :m_string(other.m_string), m_position(other.m_position), m_size(other.m_size)
4582         {}
4583
4584     inline ~QStringRef(){}
4585     inline const QString *string() const { return m_string; }
4586     inline int position() const { return m_position; }
4587     inline int size() const { return m_size; }
4588     inline int count() const { return m_size; }
4589     inline int length() const { return m_size; }
4590
4591     inline QStringRef &operator=(const QStringRef &other) {
4592         m_string = other.m_string; m_position = other.m_position;
4593         m_size = other.m_size; return *this;
4594     }
4595
4596     inline QStringRef &operator=(const QString *string);
4597
4598     inline const QChar *unicode() const {
4599         if (!m_string)
4600             return reinterpret_cast<const QChar *>(QString::shared_null.data);
4601         return m_string->unicode() + m_position;
4602     }
4603     inline const QChar *data() const { return unicode(); }
4604     inline const QChar *constData() const { return unicode(); }
4605
4606     inline void clear() { m_string = 0; m_position = m_size = 0; }
4607     QString toString() const;
4608     inline bool isEmpty() const { return m_size == 0; }
4609     inline bool isNull() const { return m_string == 0 || m_string->isNull(); }
4610
4611     QStringRef appendTo(QString *string) const;
4612
4613     inline const QChar at(int i) const
4614         { 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); }
4615
4616 };
4617
4618 inline QStringRef &QStringRef::operator=(const QString *aString)
4619 { m_string = aString; m_position = 0; m_size = aString?aString->size():0; return *this; }
4620
4621 inline QStringRef::QStringRef(const QString *aString, int aPosition, int aSize)
4622         :m_string(aString), m_position(aPosition), m_size(aSize){}
4623
4624 inline QStringRef::QStringRef(const QString *aString)
4625     :m_string(aString), m_position(0), m_size(aString?aString->size() : 0){}
4626
4627  bool operator==(const QStringRef &s1,const QStringRef &s2);
4628 inline bool operator!=(const QStringRef &s1,const QStringRef &s2)
4629 { return !(s1 == s2); }
4630  bool operator==(const QString &s1,const QStringRef &s2);
4631 inline bool operator!=(const QString &s1,const QStringRef &s2)
4632 { return !(s1 == s2); }
4633 inline bool operator==(const QStringRef &s1,const QString &s2)
4634 { return s2 == s1; }
4635 inline bool operator!=(const QStringRef &s1,const QString &s2)
4636 { return s2 != s1; }
4637  bool operator==(const QLatin1String &s1, const QStringRef &s2);
4638 inline bool operator!=(const QLatin1String &s1,const QStringRef &s2)
4639 { return !(s1 == s2); }
4640 inline bool operator==(const QStringRef &s1,const QLatin1String &s2)
4641 { return s2 == s1; }
4642 inline bool operator!=(const QStringRef &s1,const QLatin1String &s2)
4643 { return s2 != s1; }
4644
4645  bool operator<(const QStringRef &s1,const QStringRef &s2);
4646 inline bool operator>(const QStringRef &s1, const QStringRef &s2)
4647 { return s2 < s1; }
4648 inline bool operator<=(const QStringRef &s1, const QStringRef &s2)
4649 { return !(s1 > s2); }
4650 inline bool operator>=(const QStringRef &s1, const QStringRef &s2)
4651 { return !(s1 < s2); }
4652
4653 inline bool qStringComparisonHelper(const QStringRef &s1, const char *s2)
4654 {
4655
4656
4657
4658     return (s1 == QLatin1String(s2));
4659 }
4660
4661 inline bool operator==(const char *s1, const QStringRef &s2)
4662 { return qStringComparisonHelper(s2, s1); }
4663 inline bool operator==(const QStringRef &s1, const char *s2)
4664 { return qStringComparisonHelper(s1, s2); }
4665 inline bool operator!=(const char *s1, const QStringRef &s2)
4666 { return !qStringComparisonHelper(s2, s1); }
4667 inline bool operator!=(const QStringRef &s1, const char *s2)
4668 { return !qStringComparisonHelper(s1, s2); }
4669 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qstring.h" 2
4670 # 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
4671
4672
4673
4674
4675
4676
4677
4678 typedef QtValidLicenseForCoreModule QtCoreModule;
4679
4680 class QByteArray;
4681 class QIODevicePrivate;
4682
4683 class QIODevice
4684
4685
4686
4687 {
4688
4689
4690
4691 public:
4692     enum OpenModeFlag {
4693         NotOpen = 0x0000,
4694         ReadOnly = 0x0001,
4695         WriteOnly = 0x0002,
4696         ReadWrite = ReadOnly | WriteOnly,
4697         Append = 0x0004,
4698         Truncate = 0x0008,
4699         Text = 0x0010,
4700         Unbuffered = 0x0020
4701     };
4702     typedef QFlags<OpenModeFlag> OpenMode;
4703
4704     QIODevice();
4705
4706
4707
4708     virtual ~QIODevice();
4709
4710     OpenMode openMode() const;
4711
4712     void setTextModeEnabled(bool enabled);
4713     bool isTextModeEnabled() const;
4714
4715     bool isOpen() const;
4716     bool isReadable() const;
4717     bool isWritable() const;
4718     virtual bool isSequential() const;
4719
4720     virtual bool open(OpenMode mode);
4721     virtual void close();
4722
4723
4724
4725     virtual qint64 pos() const;
4726     virtual qint64 size() const;
4727     virtual bool seek(qint64 pos);
4728     virtual bool atEnd() const;
4729     virtual bool reset();
4730
4731     virtual qint64 bytesAvailable() const;
4732     virtual qint64 bytesToWrite() const;
4733
4734     qint64 read(char *data, qint64 maxlen);
4735     QByteArray read(qint64 maxlen);
4736     QByteArray readAll();
4737     qint64 readLine(char *data, qint64 maxlen);
4738     QByteArray readLine(qint64 maxlen = 0);
4739     virtual bool canReadLine() const;
4740
4741     qint64 write(const char *data, qint64 len);
4742     inline qint64 write(const QByteArray &data)
4743     { return write(data.constData(), data.size()); }
4744
4745     qint64 peek(char *data, qint64 maxlen);
4746     QByteArray peek(qint64 maxlen);
4747
4748     virtual bool waitForReadyRead(int msecs);
4749     virtual bool waitForBytesWritten(int msecs);
4750
4751     void ungetChar(char c);
4752     bool putChar(char c);
4753     bool getChar(char *c);
4754
4755     QString errorString() const;
4756 # 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"
4757 protected:
4758
4759     QIODevice(QIODevicePrivate &dd);
4760
4761
4762
4763     virtual qint64 readData(char *data, qint64 maxlen) = 0;
4764     virtual qint64 readLineData(char *data, qint64 maxlen);
4765     virtual qint64 writeData(const char *data, qint64 len) = 0;
4766
4767     void setOpenMode(OpenMode openMode);
4768
4769     void setErrorString(const QString &errorString);
4770
4771
4772     QIODevicePrivate *d_ptr;
4773
4774
4775 private:
4776     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;
4777     QIODevice(const QIODevice &); QIODevice &operator=(const QIODevice &);
4778 # 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"
4779 };
4780
4781 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; }
4782 # 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"
4783 class QDebug;
4784  QDebug operator<<(QDebug debug, QIODevice::OpenMode modes);
4785 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qiodevice.h" 2
4786 # 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
4787
4788 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qglobal.h" 1
4789 # 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
4790
4791
4792
4793
4794
4795
4796
4797 typedef QtValidLicenseForCoreModule QtCoreModule;
4798
4799 class QByteArray;
4800 class QIODevice;
4801
4802 template <typename T> class QList;
4803 template <typename T> class QLinkedList;
4804 template <typename T> class QVector;
4805 template <typename T> class QSet;
4806 template <class Key, class T> class QHash;
4807 template <class Key, class T> class QMap;
4808
4809 class QDataStreamPrivate;
4810
4811
4812 class QDataStream
4813 {
4814 public:
4815     enum Version {
4816         Qt_1_0 = 1,
4817         Qt_2_0 = 2,
4818         Qt_2_1 = 3,
4819         Qt_3_0 = 4,
4820         Qt_3_1 = 5,
4821         Qt_3_3 = 6,
4822         Qt_4_0 = 7,
4823         Qt_4_1 = Qt_4_0,
4824         Qt_4_2 = 8,
4825         Qt_4_3 = 9
4826
4827
4828
4829     };
4830
4831     enum ByteOrder {
4832         BigEndian = QSysInfo::BigEndian,
4833         LittleEndian = QSysInfo::LittleEndian
4834     };
4835
4836     enum Status {
4837         Ok,
4838         ReadPastEnd,
4839  ReadCorruptData
4840     };
4841
4842     QDataStream();
4843     explicit QDataStream(QIODevice *);
4844
4845
4846
4847     QDataStream(QByteArray *, QIODevice::OpenMode flags);
4848     QDataStream(const QByteArray &);
4849     virtual ~QDataStream();
4850
4851     QIODevice *device() const;
4852     void setDevice(QIODevice *);
4853     void unsetDevice();
4854
4855     bool atEnd() const;
4856
4857
4858
4859
4860     Status status() const;
4861     void setStatus(Status status);
4862     void resetStatus();
4863
4864     ByteOrder byteOrder() const;
4865     void setByteOrder(ByteOrder);
4866
4867     int version() const;
4868     void setVersion(int);
4869
4870     QDataStream &operator>>(qint8 &i);
4871     QDataStream &operator>>(quint8 &i);
4872     QDataStream &operator>>(qint16 &i);
4873     QDataStream &operator>>(quint16 &i);
4874     QDataStream &operator>>(qint32 &i);
4875     QDataStream &operator>>(quint32 &i);
4876     QDataStream &operator>>(qint64 &i);
4877     QDataStream &operator>>(quint64 &i);
4878
4879     QDataStream &operator>>(bool &i);
4880     QDataStream &operator>>(float &f);
4881     QDataStream &operator>>(double &f);
4882     QDataStream &operator>>(char *&str);
4883
4884     QDataStream &operator<<(qint8 i);
4885     QDataStream &operator<<(quint8 i);
4886     QDataStream &operator<<(qint16 i);
4887     QDataStream &operator<<(quint16 i);
4888     QDataStream &operator<<(qint32 i);
4889     QDataStream &operator<<(quint32 i);
4890     QDataStream &operator<<(qint64 i);
4891     QDataStream &operator<<(quint64 i);
4892     QDataStream &operator<<(bool i);
4893     QDataStream &operator<<(float f);
4894     QDataStream &operator<<(double f);
4895     QDataStream &operator<<(const char *str);
4896
4897     QDataStream &readBytes(char *&, uint &len);
4898     int readRawData(char *, int len);
4899
4900     QDataStream &writeBytes(const char *, uint len);
4901     int writeRawData(const char *, int len);
4902
4903     int skipRawData(int len);
4904 # 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"
4905 private:
4906     QDataStream(const QDataStream &); QDataStream &operator=(const QDataStream &);
4907
4908     QDataStreamPrivate *d;
4909
4910     QIODevice *dev;
4911     bool owndev;
4912     bool noswap;
4913     ByteOrder byteorder;
4914     int ver;
4915     Status q_status;
4916 };
4917
4918
4919
4920
4921
4922
4923 inline QIODevice *QDataStream::device() const
4924 { return dev; }
4925
4926 inline QDataStream::ByteOrder QDataStream::byteOrder() const
4927 { return byteorder; }
4928
4929 inline int QDataStream::version() const
4930 { return ver; }
4931
4932 inline void QDataStream::setVersion(int v)
4933 { ver = v; }
4934
4935 inline QDataStream &QDataStream::operator>>(quint8 &i)
4936 { return *this >> reinterpret_cast<qint8&>(i); }
4937
4938 inline QDataStream &QDataStream::operator>>(quint16 &i)
4939 { return *this >> reinterpret_cast<qint16&>(i); }
4940
4941 inline QDataStream &QDataStream::operator>>(quint32 &i)
4942 { return *this >> reinterpret_cast<qint32&>(i); }
4943
4944 inline QDataStream &QDataStream::operator>>(quint64 &i)
4945 { return *this >> reinterpret_cast<qint64&>(i); }
4946
4947 inline QDataStream &QDataStream::operator<<(quint8 i)
4948 { return *this << qint8(i); }
4949
4950 inline QDataStream &QDataStream::operator<<(quint16 i)
4951 { return *this << qint16(i); }
4952
4953 inline QDataStream &QDataStream::operator<<(quint32 i)
4954 { return *this << qint32(i); }
4955
4956 inline QDataStream &QDataStream::operator<<(quint64 i)
4957 { return *this << qint64(i); }
4958
4959 template <typename T>
4960 QDataStream& operator>>(QDataStream& s, QList<T>& l)
4961 {
4962     l.clear();
4963     quint32 c;
4964     s >> c;
4965     for(quint32 i = 0; i < c; ++i)
4966     {
4967         T t;
4968         s >> t;
4969         l.append(t);
4970         if (s.atEnd())
4971             break;
4972     }
4973     return s;
4974 }
4975
4976 template <typename T>
4977 QDataStream& operator<<(QDataStream& s, const QList<T>& l)
4978 {
4979     s << quint32(l.size());
4980     for (int i = 0; i < l.size(); ++i)
4981         s << l.at(i);
4982     return s;
4983 }
4984
4985 template <typename T>
4986 QDataStream& operator>>(QDataStream& s, QLinkedList<T>& l)
4987 {
4988     l.clear();
4989     quint32 c;
4990     s >> c;
4991     for(quint32 i = 0; i < c; ++i)
4992     {
4993         T t;
4994         s >> t;
4995         l.append(t);
4996         if (s.atEnd())
4997             break;
4998     }
4999     return s;
5000 }
5001
5002 template <typename T>
5003 QDataStream& operator<<(QDataStream& s, const QLinkedList<T>& l)
5004 {
5005     s << quint32(l.size());
5006     typename QLinkedList<T>::ConstIterator it = l.constBegin();
5007     for(; it != l.constEnd(); ++it)
5008         s << *it;
5009     return s;
5010 }
5011
5012 template<typename T>
5013 QDataStream& operator>>(QDataStream& s, QVector<T>& v)
5014 {
5015     v.clear();
5016     quint32 c;
5017     s >> c;
5018     v.resize(c);
5019     for(quint32 i = 0; i < c; ++i) {
5020         T t;
5021         s >> t;
5022         v[i] = t;
5023     }
5024     return s;
5025 }
5026
5027 template<typename T>
5028 QDataStream& operator<<(QDataStream& s, const QVector<T>& v)
5029 {
5030     s << quint32(v.size());
5031     for (typename QVector<T>::const_iterator it = v.begin(); it != v.end(); ++it)
5032         s << *it;
5033     return s;
5034 }
5035
5036 template <typename T>
5037 QDataStream &operator>>(QDataStream &in, QSet<T> &set)
5038 {
5039     set.clear();
5040     quint32 c;
5041     in >> c;
5042     for (quint32 i = 0; i < c; ++i) {
5043         T t;
5044         in >> t;
5045         set << t;
5046         if (in.atEnd())
5047             break;
5048     }
5049     return in;
5050 }
5051
5052 template <typename T>
5053 QDataStream& operator<<(QDataStream &out, const QSet<T> &set)
5054 {
5055     out << quint32(set.size());
5056     typename QSet<T>::const_iterator i = set.constBegin();
5057     while (i != set.constEnd()) {
5058         out << *i;
5059         ++i;
5060     }
5061     return out;
5062 }
5063
5064 template <class Key, class T>
5065  QDataStream &operator>>(QDataStream &in, QHash<Key, T> &hash)
5066 {
5067     QDataStream::Status oldStatus = in.status();
5068     in.resetStatus();
5069     hash.clear();
5070
5071     quint32 n;
5072     in >> n;
5073
5074     for (quint32 i = 0; i < n; ++i) {
5075         if (in.status() != QDataStream::Ok)
5076             break;
5077
5078         Key k;
5079         T t;
5080         in >> k >> t;
5081         hash.insertMulti(k, t);
5082     }
5083
5084     if (in.status() != QDataStream::Ok)
5085         hash.clear();
5086     if (oldStatus != QDataStream::Ok)
5087         in.setStatus(oldStatus);
5088     return in;
5089 }
5090
5091 template <class Key, class T>
5092  QDataStream &operator<<(QDataStream &out, const QHash<Key, T>& hash)
5093 {
5094     out << quint32(hash.size());
5095     typename QHash<Key, T>::ConstIterator it = hash.end();
5096     typename QHash<Key, T>::ConstIterator begin = hash.begin();
5097     while (it != begin) {
5098         --it;
5099         out << it.key() << it.value();
5100     }
5101     return out;
5102 }
5103
5104
5105
5106
5107 template <class aKey, class aT>
5108  QDataStream &operator>>(QDataStream &in, QMap<aKey, aT> &map)
5109
5110 {
5111     QDataStream::Status oldStatus = in.status();
5112     in.resetStatus();
5113     map.clear();
5114
5115     quint32 n;
5116     in >> n;
5117
5118     map.detach();
5119     map.setInsertInOrder(true);
5120     for (quint32 i = 0; i < n; ++i) {
5121         if (in.status() != QDataStream::Ok)
5122             break;
5123
5124         aKey key;
5125         aT value;
5126         in >> key >> value;
5127         map.insertMulti(key, value);
5128     }
5129     map.setInsertInOrder(false);
5130     if (in.status() != QDataStream::Ok)
5131         map.clear();
5132     if (oldStatus != QDataStream::Ok)
5133         in.setStatus(oldStatus);
5134     return in;
5135 }
5136
5137 template <class Key, class T>
5138  QDataStream &operator<<(QDataStream &out, const QMap<Key, T> &map)
5139 {
5140     out << quint32(map.size());
5141     typename QMap<Key, T>::ConstIterator it = map.end();
5142     typename QMap<Key, T>::ConstIterator begin = map.begin();
5143     while (it != begin) {
5144         --it;
5145         out << it.key() << it.value();
5146     }
5147     return out;
5148 }
5149 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qdatastream.h" 2
5150 # 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
5151
5152 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qlist.h" 1
5153
5154 # 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
5155 # 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"
5156
5157 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qiterator.h" 1
5158
5159 # 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
5160 # 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"
5161
5162 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qglobal.h" 1
5163 # 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
5164
5165
5166
5167 typedef QtValidLicenseForCoreModule QtCoreModule;
5168
5169 namespace std { struct bidirectional_iterator_tag; struct random_access_iterator_tag; }
5170 # 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"
5171 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qiterator.h" 2
5172 # 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
5173
5174 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qatomic.h" 1
5175 # 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
5176
5177 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qalgorithms.h" 1
5178 # 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
5179
5180
5181
5182
5183
5184
5185
5186 # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/g++-v4/new" 1 3
5187 # 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/g++-v4/new" 3
5188
5189 # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/g++-v4/cstddef" 1 3
5190 # 48 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/g++-v4/cstddef" 3
5191 # 49 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/g++-v4/cstddef" 3
5192 #pragma GCC visibility push(default)
5193
5194
5195 # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4
5196 # 52 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/g++-v4/cstddef" 2 3
5197
5198 namespace std
5199 {
5200   using ::ptrdiff_t;
5201   using ::size_t;
5202 }
5203
5204 #pragma GCC visibility pop
5205 # 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/g++-v4/new" 2 3
5206
5207 # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/g++-v4/exception" 1 3
5208 # 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/g++-v4/exception" 3
5209 #pragma GCC visibility push(default)
5210
5211 extern "C++" {
5212
5213 namespace std
5214 {
5215 # 54 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/g++-v4/exception" 3
5216   class exception
5217   {
5218   public:
5219     exception() throw() { }
5220     virtual ~exception() throw();
5221
5222
5223     virtual const char* what() const throw();
5224   };
5225
5226
5227
5228   class bad_exception : public exception
5229   {
5230   public:
5231     bad_exception() throw() { }
5232
5233
5234     virtual ~bad_exception() throw();
5235   };
5236
5237
5238   typedef void (*terminate_handler) ();
5239
5240   typedef void (*unexpected_handler) ();
5241
5242
5243   terminate_handler set_terminate(terminate_handler) throw();
5244
5245
5246   void terminate() __attribute__ ((__noreturn__));
5247
5248
5249   unexpected_handler set_unexpected(unexpected_handler) throw();
5250
5251
5252   void unexpected() __attribute__ ((__noreturn__));
5253 # 102 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/g++-v4/exception" 3
5254   bool uncaught_exception() throw();
5255 }
5256
5257 namespace __gnu_cxx
5258 {
5259 # 117 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/g++-v4/exception" 3
5260   void __verbose_terminate_handler ();
5261 }
5262
5263 }
5264
5265 #pragma GCC visibility pop
5266 # 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/g++-v4/new" 2 3
5267
5268 #pragma GCC visibility push(default)
5269
5270 extern "C++" {
5271
5272 namespace std
5273 {
5274
5275
5276
5277
5278
5279   class bad_alloc : public exception
5280   {
5281   public:
5282     bad_alloc() throw() { }
5283
5284
5285     virtual ~bad_alloc() throw();
5286   };
5287
5288   struct nothrow_t { };
5289   extern const nothrow_t nothrow;
5290
5291
5292   typedef void (*new_handler)();
5293
5294   new_handler set_new_handler(new_handler) throw();
5295 }
5296 # 84 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/g++-v4/new" 3
5297 void* operator new(std::size_t) throw (std::bad_alloc);
5298 void* operator new[](std::size_t) throw (std::bad_alloc);
5299 void operator delete(void*) throw();
5300 void operator delete[](void*) throw();
5301 void* operator new(std::size_t, const std::nothrow_t&) throw();
5302 void* operator new[](std::size_t, const std::nothrow_t&) throw();
5303 void operator delete(void*, const std::nothrow_t&) throw();
5304 void operator delete[](void*, const std::nothrow_t&) throw();
5305
5306
5307 inline void* operator new(std::size_t, void* __p) throw() { return __p; }
5308 inline void* operator new[](std::size_t, void* __p) throw() { return __p; }
5309
5310
5311 inline void operator delete (void*, void*) throw() { }
5312 inline void operator delete[](void*, void*) throw() { }
5313
5314 }
5315
5316 #pragma GCC visibility pop
5317 # 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
5318
5319
5320
5321 typedef QtValidLicenseForCoreModule QtCoreModule;
5322
5323 template <typename T> class QVector;
5324 template <typename T> class QSet;
5325
5326 struct QListData {
5327     struct Data {
5328         QBasicAtomic ref;
5329         int alloc, begin, end;
5330         uint sharable : 1;
5331         void *array[1];
5332     };
5333     enum { DataHeaderSize = sizeof(Data) - sizeof(void *) };
5334
5335     Data *detach();
5336     Data *detach2();
5337     void realloc(int alloc);
5338     static Data shared_null;
5339     Data *d;
5340     void **erase(void **xi);
5341     void **append();
5342     void **append(const QListData &l);
5343     void **prepend();
5344     void **insert(int i);
5345     void remove(int i);
5346     void remove(int i, int n);
5347     void move(int from, int to);
5348     inline int size() const { return d->end - d->begin; }
5349     inline bool isEmpty() const { return d->end == d->begin; }
5350     inline void **at(int i) const { return d->array + d->begin + i; }
5351     inline void **begin() const { return d->array + d->begin; }
5352     inline void **end() const { return d->array + d->end; }
5353 };
5354
5355 template <typename T>
5356 class QList
5357 {
5358     struct Node { void *v;
5359
5360
5361
5362         inline T &t()
5363         { return *reinterpret_cast<T*>(QTypeInfo<T>::isLarge || QTypeInfo<T>::isStatic
5364                                        ? v : this); }
5365
5366     };
5367
5368     union { QListData p; QListData::Data *d; };
5369
5370 public:
5371     inline QList() : d(&QListData::shared_null) { d->ref.ref(); }
5372     inline QList(const QList<T> &l) : d(l.d) { d->ref.ref(); if (!d->sharable) detach_helper(); }
5373     ~QList();
5374     QList<T> &operator=(const QList<T> &l);
5375     bool operator==(const QList<T> &l) const;
5376     inline bool operator!=(const QList<T> &l) const { return !(*this == l); }
5377
5378     inline int size() const { return p.size(); }
5379
5380     inline void detach() { if (d->ref != 1) detach_helper(); }
5381     inline bool isDetached() const { return d->ref == 1; }
5382     inline void setSharable(bool sharable) { if (!sharable) detach(); d->sharable = sharable; }
5383
5384     inline bool isEmpty() const { return p.isEmpty(); }
5385
5386     void clear();
5387
5388     const T &at(int i) const;
5389     const T &operator[](int i) const;
5390     T &operator[](int i);
5391
5392     void append(const T &t);
5393     void prepend(const T &t);
5394     void insert(int i, const T &t);
5395     void replace(int i, const T &t);
5396     void removeAt(int i);
5397     int removeAll(const T &t);
5398     T takeAt(int i);
5399     T takeFirst();
5400     T takeLast();
5401     void move(int from, int to);
5402     void swap(int i, int j);
5403     int indexOf(const T &t, int from = 0) const;
5404     int lastIndexOf(const T &t, int from = -1) const;
5405     QBool contains(const T &t) const;
5406     int count(const T &t) const;
5407
5408     class const_iterator;
5409
5410     class iterator {
5411     public:
5412         Node *i;
5413         typedef std::random_access_iterator_tag iterator_category;
5414         typedef ptrdiff_t difference_type;
5415         typedef T value_type;
5416         typedef T *pointer;
5417         typedef T &reference;
5418
5419         inline iterator() : i(0) {}
5420         inline iterator(Node *n) : i(n) {}
5421         inline iterator(const iterator &o): i(o.i){}
5422         inline T &operator*() const { return i->t(); }
5423         inline T *operator->() const { return &i->t(); }
5424         inline T &operator[](int j) const { return i[j].t(); }
5425         inline bool operator==(const iterator &o) const { return i == o.i; }
5426         inline bool operator!=(const iterator &o) const { return i != o.i; }
5427         inline bool operator<(const iterator& other) const { return i < other.i; }
5428         inline bool operator<=(const iterator& other) const { return i <= other.i; }
5429         inline bool operator>(const iterator& other) const { return i > other.i; }
5430         inline bool operator>=(const iterator& other) const { return i >= other.i; }
5431
5432         inline bool operator==(const const_iterator &o) const
5433             { return i == reinterpret_cast<const iterator &>(o).i; }
5434         inline bool operator!=(const const_iterator &o) const
5435             { return i != reinterpret_cast<const iterator &>(o).i; }
5436         inline bool operator<(const const_iterator& other) const
5437             { return i < reinterpret_cast<const iterator &>(other).i; }
5438         inline bool operator<=(const const_iterator& other) const
5439             { return i <= reinterpret_cast<const iterator &>(other).i; }
5440         inline bool operator>(const const_iterator& other) const
5441             { return i > reinterpret_cast<const iterator &>(other).i; }
5442         inline bool operator>=(const const_iterator& other) const
5443             { return i >= reinterpret_cast<const iterator &>(other).i; }
5444
5445         inline iterator &operator++() { ++i; return *this; }
5446         inline iterator operator++(int) { Node *n = i; ++i; return n; }
5447         inline iterator &operator--() { i--; return *this; }
5448         inline iterator operator--(int) { Node *n = i; i--; return n; }
5449         inline iterator &operator+=(int j) { i+=j; return *this; }
5450         inline iterator &operator-=(int j) { i-=j; return *this; }
5451         inline iterator operator+(int j) const { return iterator(i+j); }
5452         inline iterator operator-(int j) const { return iterator(i-j); }
5453         inline int operator-(iterator j) const { return i - j.i; }
5454     };
5455     friend class iterator;
5456
5457     class const_iterator {
5458     public:
5459         Node *i;
5460         typedef std::random_access_iterator_tag iterator_category;
5461         typedef ptrdiff_t difference_type;
5462         typedef T value_type;
5463         typedef const T *pointer;
5464         typedef const T &reference;
5465
5466         inline const_iterator() : i(0) {}
5467         inline const_iterator(Node *n) : i(n) {}
5468         inline const_iterator(const const_iterator &o): i(o.i) {}
5469
5470
5471
5472         inline const_iterator(const iterator &o): i(o.i) {}
5473
5474         inline const T &operator*() const { return i->t(); }
5475         inline const T *operator->() const { return &i->t(); }
5476         inline const T &operator[](int j) const { return i[j].t(); }
5477         inline bool operator==(const const_iterator &o) const { return i == o.i; }
5478         inline bool operator!=(const const_iterator &o) const { return i != o.i; }
5479         inline bool operator<(const const_iterator& other) const { return i < other.i; }
5480         inline bool operator<=(const const_iterator& other) const { return i <= other.i; }
5481         inline bool operator>(const const_iterator& other) const { return i > other.i; }
5482         inline bool operator>=(const const_iterator& other) const { return i >= other.i; }
5483         inline const_iterator &operator++() { ++i; return *this; }
5484         inline const_iterator operator++(int) { Node *n = i; ++i; return n; }
5485         inline const_iterator &operator--() { i--; return *this; }
5486         inline const_iterator operator--(int) { Node *n = i; i--; return n; }
5487         inline const_iterator &operator+=(int j) { i+=j; return *this; }
5488         inline const_iterator &operator-=(int j) { i-=j; return *this; }
5489         inline const_iterator operator+(int j) const { return const_iterator(i+j); }
5490         inline const_iterator operator-(int j) const { return const_iterator(i-j); }
5491         inline int operator-(const_iterator j) const { return i - j.i; }
5492     };
5493     friend class const_iterator;
5494
5495
5496     inline iterator begin() { detach(); return reinterpret_cast<Node *>(p.begin()); }
5497     inline const_iterator begin() const { return reinterpret_cast<Node *>(p.begin()); }
5498     inline const_iterator constBegin() const { return reinterpret_cast<Node *>(p.begin()); }
5499     inline iterator end() { detach(); return reinterpret_cast<Node *>(p.end()); }
5500     inline const_iterator end() const { return reinterpret_cast<Node *>(p.end()); }
5501     inline const_iterator constEnd() const { return reinterpret_cast<Node *>(p.end()); }
5502     iterator insert(iterator before, const T &t);
5503     iterator erase(iterator pos);
5504     iterator erase(iterator first, iterator last);
5505
5506
5507     typedef iterator Iterator;
5508     typedef const_iterator ConstIterator;
5509     inline int count() const { return p.size(); }
5510     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(); }
5511     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(); }
5512     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()); }
5513     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()); }
5514     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()); }
5515     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()); }
5516     QList<T> mid(int pos, int length = -1) const;
5517
5518     T value(int i) const;
5519     T value(int i, const T &defaultValue) const;
5520
5521
5522     inline void push_back(const T &t) { append(t); }
5523     inline void push_front(const T &t) { prepend(t); }
5524     inline T& front() { return first(); }
5525     inline const T& front() const { return first(); }
5526     inline T& back() { return last(); }
5527     inline const T& back() const { return last(); }
5528     inline void pop_front() { removeFirst(); }
5529     inline void pop_back() { removeLast(); }
5530     inline bool empty() const { return isEmpty(); }
5531     typedef int size_type;
5532     typedef T value_type;
5533     typedef value_type *pointer;
5534     typedef const value_type *const_pointer;
5535     typedef value_type &reference;
5536     typedef const value_type &const_reference;
5537     typedef ptrdiff_t difference_type;
5538 # 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"
5539     QList<T> &operator+=(const QList<T> &l);
5540     inline QList<T> operator+(const QList<T> &l) const
5541     { QList n = *this; n += l; return n; }
5542     inline QList<T> &operator+=(const T &t)
5543     { append(t); return *this; }
5544     inline QList<T> &operator<< (const T &t)
5545     { append(t); return *this; }
5546     inline QList<T> &operator<<(const QList<T> &l)
5547     { *this += l; return *this; }
5548
5549     QVector<T> toVector() const;
5550     QSet<T> toSet() const;
5551
5552     static QList<T> fromVector(const QVector<T> &vector);
5553     static QList<T> fromSet(const QSet<T> &set);
5554 # 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"
5555 private:
5556     void detach_helper();
5557     void free(QListData::Data *d);
5558
5559     void node_construct(Node *n, const T &t);
5560     void node_destruct(Node *n);
5561     void node_copy(Node *from, Node *to, Node *src);
5562     void node_destruct(Node *from, Node *to);
5563 };
5564
5565
5566
5567
5568
5569
5570
5571 template <typename T>
5572 inline void QList<T>::node_construct(Node *n, const T &t)
5573 {
5574     if (QTypeInfo<T>::isLarge || QTypeInfo<T>::isStatic) n->v = new T(t);
5575     else if (QTypeInfo<T>::isComplex) new (n) T(t);
5576     else *reinterpret_cast<T*>(n) = t;
5577 }
5578
5579 template <typename T>
5580 inline void QList<T>::node_destruct(Node *n)
5581 {
5582     if (QTypeInfo<T>::isLarge || QTypeInfo<T>::isStatic) delete reinterpret_cast<T*>(n->v);
5583     else if (QTypeInfo<T>::isComplex) reinterpret_cast<T*>(n)->~T();
5584 }
5585
5586 template <typename T>
5587 inline void QList<T>::node_copy(Node *from, Node *to, Node *src)
5588 {
5589     if (QTypeInfo<T>::isLarge || QTypeInfo<T>::isStatic)
5590         while(from != to)
5591             (from++)->v = new T(*reinterpret_cast<T*>((src++)->v));
5592     else if (QTypeInfo<T>::isComplex)
5593         while(from != to)
5594             new (from++) T(*reinterpret_cast<T*>(src++));
5595 }
5596
5597 template <typename T>
5598 inline void QList<T>::node_destruct(Node *from, Node *to)
5599 {
5600     if (QTypeInfo<T>::isLarge || QTypeInfo<T>::isStatic)
5601         while(from != to) --to, delete reinterpret_cast<T*>(to->v);
5602     else if (QTypeInfo<T>::isComplex)
5603         while (from != to) --to, reinterpret_cast<T*>(to)->~T();
5604 }
5605
5606 template <typename T>
5607 inline QList<T> &QList<T>::operator=(const QList<T> &l)
5608 {
5609     if (d != l.d) {
5610         QListData::Data *x = l.d;
5611         x->ref.ref();
5612         x = qAtomicSetPtr(&d, x);
5613         if (!x->ref.deref())
5614             free(x);
5615         if (!d->sharable)
5616             detach_helper();
5617     }
5618     return *this;
5619 }
5620 template <typename T>
5621 inline typename QList<T>::iterator QList<T>::insert(iterator before, const T &t)
5622 { Node *n = reinterpret_cast<Node *>(p.insert(before.i-reinterpret_cast<Node *>(p.begin())));
5623  node_construct(n,t); return n; }
5624 template <typename T>
5625 inline typename QList<T>::iterator QList<T>::erase(iterator it)
5626 { node_destruct(it.i);
5627  return reinterpret_cast<Node *>(p.erase(reinterpret_cast<void**>(it.i))); }
5628 template <typename T>
5629 inline const T &QList<T>::at(int i) const
5630 { 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);
5631  return reinterpret_cast<Node *>(p.at(i))->t(); }
5632 template <typename T>
5633 inline const T &QList<T>::operator[](int i) const
5634 { 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);
5635  return reinterpret_cast<Node *>(p.at(i))->t(); }
5636 template <typename T>
5637 inline T &QList<T>::operator[](int i)
5638 { 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);
5639   detach(); return reinterpret_cast<Node *>(p.at(i))->t(); }
5640 template <typename T>
5641 inline void QList<T>::removeAt(int i)
5642 { if(i >= 0 && i < p.size()) { detach();
5643  node_destruct(reinterpret_cast<Node *>(p.at(i))); p.remove(i); } }
5644 template <typename T>
5645 inline T QList<T>::takeAt(int i)
5646 { 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);
5647  detach(); Node *n = reinterpret_cast<Node *>(p.at(i)); T t = n->t(); node_destruct(n);
5648  p.remove(i); return t; }
5649 template <typename T>
5650 inline T QList<T>::takeFirst()
5651 { T t = first(); removeFirst(); return t; }
5652 template <typename T>
5653 inline T QList<T>::takeLast()
5654 { T t = last(); removeLast(); return t; }
5655
5656 template <typename T>
5657  void QList<T>::append(const T &t)
5658 {
5659     detach();
5660     if (QTypeInfo<T>::isLarge || QTypeInfo<T>::isStatic) {
5661         node_construct(reinterpret_cast<Node *>(p.append()), t);
5662     } else {
5663         const T cpy(t);
5664         node_construct(reinterpret_cast<Node *>(p.append()), cpy);
5665     }
5666 }
5667
5668 template <typename T>
5669 inline void QList<T>::prepend(const T &t)
5670 {
5671     detach();
5672     if (QTypeInfo<T>::isLarge || QTypeInfo<T>::isStatic) {
5673         node_construct(reinterpret_cast<Node *>(p.prepend()), t);
5674     } else {
5675         const T cpy(t);
5676         node_construct(reinterpret_cast<Node *>(p.prepend()), cpy);
5677     }
5678 }
5679
5680 template <typename T>
5681 inline void QList<T>::insert(int i, const T &t)
5682 {
5683     detach();
5684     if (QTypeInfo<T>::isLarge || QTypeInfo<T>::isStatic) {
5685         node_construct(reinterpret_cast<Node *>(p.insert(i)), t);
5686     } else {
5687         const T cpy(t);
5688         node_construct(reinterpret_cast<Node *>(p.insert(i)), cpy);
5689     }
5690 }
5691
5692 template <typename T>
5693 inline void QList<T>::replace(int i, const T &t)
5694 {
5695     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);
5696     detach();
5697     if (QTypeInfo<T>::isLarge || QTypeInfo<T>::isStatic) {
5698         reinterpret_cast<Node *>(p.at(i))->t() = t;
5699     } else {
5700         const T cpy(t);
5701         reinterpret_cast<Node *>(p.at(i))->t() = cpy;
5702     }
5703 }
5704
5705 template <typename T>
5706 inline void QList<T>::swap(int i, int j)
5707 {
5708     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);
5709
5710     detach();
5711     void *t = d->array[d->begin + i];
5712     d->array[d->begin + i] = d->array[d->begin + j];
5713     d->array[d->begin + j] = t;
5714 }
5715
5716 template <typename T>
5717 inline void QList<T>::move(int from, int to)
5718 {
5719     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);
5720
5721     detach();
5722     p.move(from, to);
5723 }
5724
5725 template<typename T>
5726  QList<T> QList<T>::mid(int pos, int length) const
5727 {
5728     if (length < 0)
5729         length = size() - pos;
5730     if (pos == 0 && length == size())
5731         return *this;
5732     QList<T> cpy;
5733     if (pos + length > size())
5734         length = size() - pos;
5735     for (int i = pos; i < pos + length; ++i)
5736         cpy += at(i);
5737     return cpy;
5738 }
5739
5740 template<typename T>
5741  T QList<T>::value(int i) const
5742 {
5743     if (i < 0 || i >= p.size()) {
5744         return T();
5745     }
5746     return reinterpret_cast<Node *>(p.at(i))->t();
5747 }
5748
5749 template<typename T>
5750  T QList<T>::value(int i, const T& defaultValue) const
5751 {
5752     return ((i < 0 || i >= p.size()) ? defaultValue : reinterpret_cast<Node *>(p.at(i))->t());
5753 }
5754
5755 template <typename T>
5756  void QList<T>::detach_helper()
5757 {
5758     Node *n = reinterpret_cast<Node *>(p.begin());
5759     QListData::Data *x = p.detach2();
5760     node_copy(reinterpret_cast<Node *>(p.begin()), reinterpret_cast<Node *>(p.end()), n);
5761     if (!x->ref.deref())
5762         free(x);
5763 }
5764
5765 template <typename T>
5766  QList<T>::~QList()
5767 {
5768     if (!d)
5769         return;
5770     QListData::Data *x = &QListData::shared_null;
5771     x = qAtomicSetPtr(&d, x);
5772     if (!x->ref.deref())
5773         free(x);
5774 }
5775
5776 template <typename T>
5777  bool QList<T>::operator==(const QList<T> &l) const
5778 {
5779     if (p.size() != l.p.size())
5780         return false;
5781     if (d == l.d)
5782         return true;
5783     Node *i = reinterpret_cast<Node *>(p.end());
5784     Node *b = reinterpret_cast<Node *>(p.begin());
5785     Node *li = reinterpret_cast<Node *>(l.p.end());
5786     while (i != b) {
5787         --i; --li;
5788         if (!(i->t() == li->t()))
5789             return false;
5790     }
5791     return true;
5792 }
5793
5794
5795 template <typename T>
5796  void QList<T>::free(QListData::Data *data)
5797 {
5798     node_destruct(reinterpret_cast<Node *>(data->array + data->begin),
5799                   reinterpret_cast<Node *>(data->array + data->end));
5800     if (data->ref == 0)
5801         qFree(data);
5802 }
5803
5804
5805 template <typename T>
5806  void QList<T>::clear()
5807 {
5808     *this = QList<T>();
5809 }
5810
5811 template <typename T>
5812  int QList<T>::removeAll(const T &_t)
5813 {
5814     detach();
5815     const T t = _t;
5816     int removedCount=0, i=0;
5817     Node *n;
5818     while (i < p.size())
5819         if ((n = reinterpret_cast<Node *>(p.at(i)))->t() == t) {
5820             node_destruct(n);
5821             p.remove(i);
5822             ++removedCount;
5823         } else {
5824             ++i;
5825         }
5826     return removedCount;
5827 }
5828
5829 template <typename T>
5830  typename QList<T>::iterator QList<T>::erase(typename QList<T>::iterator afirst,
5831                                                                  typename QList<T>::iterator alast)
5832 {
5833     for (Node *n = afirst.i; n < alast.i; ++n)
5834         node_destruct(n);
5835     int idx = afirst - begin();
5836     p.remove(idx, alast - afirst);
5837     return begin() + idx;
5838 }
5839
5840 template <typename T>
5841  QList<T> &QList<T>::operator+=(const QList<T> &l)
5842 {
5843     detach();
5844     Node *n = reinterpret_cast<Node *>(p.append(l.p));
5845     node_copy(n, reinterpret_cast<Node *>(p.end()), reinterpret_cast<Node *>(l.p.begin()));
5846     return *this;
5847 }
5848
5849 template <typename T>
5850  int QList<T>::indexOf(const T &t, int from) const
5851 {
5852     if (from < 0)
5853         from = qMax(from + p.size(), 0);
5854     if (from < p.size()) {
5855         Node *n = reinterpret_cast<Node *>(p.at(from -1));
5856         Node *e = reinterpret_cast<Node *>(p.end());
5857         while (++n != e)
5858             if (n->t() == t)
5859                 return n - reinterpret_cast<Node *>(p.begin());
5860     }
5861     return -1;
5862 }
5863
5864 template <typename T>
5865  int QList<T>::lastIndexOf(const T &t, int from) const
5866 {
5867     if (from < 0)
5868         from += p.size();
5869     else if (from >= p.size())
5870         from = p.size()-1;
5871     if (from >= 0) {
5872         Node *b = reinterpret_cast<Node *>(p.begin());
5873         Node *n = reinterpret_cast<Node *>(p.at(from + 1));
5874         while (n-- != b) {
5875             if (n->t() == t)
5876                 return n - b;
5877         }
5878     }
5879     return -1;
5880 }
5881
5882 template <typename T>
5883  QBool QList<T>::contains(const T &t) const
5884 {
5885     Node *b = reinterpret_cast<Node *>(p.begin());
5886     Node *i = reinterpret_cast<Node *>(p.end());
5887     while (i-- != b)
5888         if (i->t() == t)
5889             return QBool(true);
5890     return QBool(false);
5891 }
5892
5893 template <typename T>
5894  int QList<T>::count(const T &t) const
5895 {
5896     int c = 0;
5897     Node *b = reinterpret_cast<Node *>(p.begin());
5898     Node *i = reinterpret_cast<Node *>(p.end());
5899     while (i-- != b)
5900         if (i->t() == t)
5901             ++c;
5902     return c;
5903 }
5904
5905 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; } };
5906 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; } };
5907 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qlist.h" 2
5908 # 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
5909
5910 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qregexp.h" 1
5911
5912 # 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
5913 # 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"
5914
5915 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qstring.h" 1
5916 # 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
5917
5918
5919
5920
5921
5922
5923 typedef QtValidLicenseForCoreModule QtCoreModule;
5924
5925 struct QRegExpPrivate;
5926 class QStringList;
5927
5928 class QRegExp
5929 {
5930 public:
5931     enum PatternSyntax { RegExp, Wildcard, FixedString, RegExp2 };
5932     enum CaretMode { CaretAtZero, CaretAtOffset, CaretWontMatch };
5933
5934     QRegExp();
5935     explicit QRegExp(const QString &pattern, Qt::CaseSensitivity cs = Qt::CaseSensitive,
5936        PatternSyntax syntax = RegExp);
5937     QRegExp(const QRegExp &rx);
5938     ~QRegExp();
5939     QRegExp &operator=(const QRegExp &rx);
5940
5941     bool operator==(const QRegExp &rx) const;
5942     inline bool operator!=(const QRegExp &rx) const { return !operator==(rx); }
5943
5944     bool isEmpty() const;
5945     bool isValid() const;
5946     QString pattern() const;
5947     void setPattern(const QString &pattern);
5948     Qt::CaseSensitivity caseSensitivity() const;
5949     void setCaseSensitivity(Qt::CaseSensitivity cs);
5950
5951
5952
5953
5954
5955     PatternSyntax patternSyntax() const;
5956     void setPatternSyntax(PatternSyntax syntax);
5957
5958
5959
5960
5961
5962
5963     bool isMinimal() const;
5964     void setMinimal(bool minimal);
5965
5966
5967
5968
5969     bool exactMatch(const QString &str) const;
5970
5971     int indexIn(const QString &str, int offset = 0, CaretMode caretMode = CaretAtZero) const;
5972     int lastIndexIn(const QString &str, int offset = -1, CaretMode caretMode = CaretAtZero) const;
5973 # 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"
5974     int matchedLength() const;
5975
5976     int numCaptures() const;
5977     QStringList capturedTexts();
5978     QString cap(int nth = 0);
5979     int pos(int nth = 0);
5980     QString errorString();
5981
5982
5983     static QString escape(const QString &str);
5984 # 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"
5985 private:
5986     QRegExpPrivate *priv;
5987 };
5988
5989 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"; } };
5990
5991
5992  QDataStream &operator<<(QDataStream &out, const QRegExp &regExp);
5993  QDataStream &operator>>(QDataStream &in, QRegExp &regExp);
5994 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qregexp.h" 2
5995 # 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
5996
5997 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qstring.h" 1
5998 # 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
5999
6000 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qstringmatcher.h" 1
6001
6002 # 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
6003 # 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"
6004
6005 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qstring.h" 1
6006 # 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
6007
6008
6009
6010 typedef QtValidLicenseForCoreModule QtCoreModule;
6011
6012 class QStringMatcherPrivate;
6013
6014 class QStringMatcher
6015 {
6016 public:
6017     QStringMatcher();
6018     QStringMatcher(const QString &pattern,
6019                    Qt::CaseSensitivity cs = Qt::CaseSensitive);
6020     QStringMatcher(const QStringMatcher &other);
6021     ~QStringMatcher();
6022
6023     QStringMatcher &operator=(const QStringMatcher &other);
6024
6025     void setPattern(const QString &pattern);
6026     void setCaseSensitivity(Qt::CaseSensitivity cs);
6027
6028     int indexIn(const QString &str, int from = 0) const;
6029     inline QString pattern() const { return q_pattern; }
6030     inline Qt::CaseSensitivity caseSensitivity() const { return q_cs; }
6031
6032 private:
6033     QStringMatcherPrivate *d_ptr;
6034     QString q_pattern;
6035     Qt::CaseSensitivity q_cs;
6036     uint q_skiptable[256];
6037 };
6038 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qstringmatcher.h" 2
6039 # 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
6040
6041
6042
6043
6044
6045
6046 typedef QtValidLicenseForCoreModule QtCoreModule;
6047
6048 class QRegExp;
6049
6050 typedef QListIterator<QString> QStringListIterator;
6051 typedef QMutableListIterator<QString> QMutableStringListIterator;
6052
6053 class QStringList : public QList<QString>
6054 {
6055 public:
6056     inline QStringList() { }
6057     inline explicit QStringList(const QString &i) { append(i); }
6058     inline QStringList(const QStringList &l) : QList<QString>(l) { }
6059     inline QStringList(const QList<QString> &l) : QList<QString>(l) { }
6060
6061     inline void sort();
6062
6063     inline QString join(const QString &sep) const;
6064
6065     inline QStringList filter(const QString &str, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
6066     inline QBool contains(const QString &str, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
6067
6068     inline QStringList &replaceInStrings(const QString &before, const QString &after, Qt::CaseSensitivity cs = Qt::CaseSensitive);
6069
6070     inline QStringList operator+(const QStringList &other) const
6071     { QStringList n = *this; n += other; return n; }
6072     inline QStringList &operator<<(const QString &str)
6073     { append(str); return *this; }
6074     inline QStringList &operator<<(const QStringList &l)
6075     { *this += l; return *this; }
6076
6077
6078     inline QStringList filter(const QRegExp &rx) const;
6079     inline QStringList &replaceInStrings(const QRegExp &rx, const QString &after);
6080     inline int indexOf(const QRegExp &rx, int from = 0) const;
6081     inline int lastIndexOf(const QRegExp &rx, int from = -1) const;
6082
6083
6084     using QList<QString>::indexOf;
6085     using QList<QString>::lastIndexOf;
6086 # 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"
6087 };
6088
6089 namespace QtPrivate {
6090     void QStringList_sort(QStringList *that);
6091     QString QStringList_join(const QStringList *that, const QString &sep);
6092     QStringList QStringList_filter(const QStringList *that, const QString &str,
6093                                                Qt::CaseSensitivity cs);
6094
6095     QBool QStringList_contains(const QStringList *that, const QString &str, Qt::CaseSensitivity cs);
6096     void QStringList_replaceInStrings(QStringList *that, const QString &before, const QString &after,
6097                                       Qt::CaseSensitivity cs);
6098
6099
6100     void QStringList_replaceInStrings(QStringList *that, const QRegExp &rx, const QString &after);
6101     QStringList QStringList_filter(const QStringList *that, const QRegExp &re);
6102     int QStringList_indexOf(const QStringList *that, const QRegExp &rx, int from);
6103     int QStringList_lastIndexOf(const QStringList *that, const QRegExp &rx, int from);
6104
6105 }
6106
6107 inline void QStringList::sort()
6108 {
6109     QtPrivate::QStringList_sort(this);
6110 }
6111
6112 inline QString QStringList::join(const QString &sep) const
6113 {
6114     return QtPrivate::QStringList_join(this, sep);
6115 }
6116
6117 inline QStringList QStringList::filter(const QString &str, Qt::CaseSensitivity cs) const
6118 {
6119     return QtPrivate::QStringList_filter(this, str, cs);
6120 }
6121
6122 inline QBool QStringList::contains(const QString &str, Qt::CaseSensitivity cs) const
6123 {
6124     return QtPrivate::QStringList_contains(this, str, cs);
6125 }
6126
6127 inline QStringList &QStringList::replaceInStrings(const QString &before, const QString &after, Qt::CaseSensitivity cs)
6128 {
6129     QtPrivate::QStringList_replaceInStrings(this, before, after, cs);
6130     return *this;
6131 }
6132
6133
6134 inline QStringList &QStringList::replaceInStrings(const QRegExp &rx, const QString &after)
6135 {
6136     QtPrivate::QStringList_replaceInStrings(this, rx, after);
6137     return *this;
6138 }
6139
6140 inline QStringList QStringList::filter(const QRegExp &rx) const
6141 {
6142     return QtPrivate::QStringList_filter(this, rx);
6143 }
6144
6145 inline int QStringList::indexOf(const QRegExp &rx, int from) const
6146 {
6147     return QtPrivate::QStringList_indexOf(this, rx, from);
6148 }
6149
6150 inline int QStringList::lastIndexOf(const QRegExp &rx, int from) const
6151 {
6152     return QtPrivate::QStringList_lastIndexOf(this, rx, from);
6153 }
6154 # 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"
6155 inline QDataStream &operator>>(QDataStream &in, QStringList &list)
6156 {
6157     return operator>>(in, static_cast<QList<QString> &>(list));
6158 }
6159 inline QDataStream &operator<<(QDataStream &out, const QStringList &list)
6160 {
6161     return operator<<(out, static_cast<const QList<QString> &>(list));
6162 }
6163 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qstringlist.h" 2
6164 # 43 "./project.h" 2
6165
6166 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qtextstream.h" 1
6167
6168 # 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
6169 # 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"
6170
6171 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qiodevice.h" 1
6172 # 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
6173
6174 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qstring.h" 1
6175 # 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
6176
6177 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qchar.h" 1
6178 # 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
6179 # 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"
6180 # 1 "/usr/include/stdio.h" 1 3 4
6181 # 9 "/usr/include/stdio.h" 3 4
6182 # 1 "/usr/include/gentoo-multilib/amd64/stdio.h" 1 3 4
6183 # 28 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
6184
6185 # 1 "/usr/include/features.h" 1 3 4
6186 # 29 "/usr/include/gentoo-multilib/amd64/stdio.h" 2 3 4
6187
6188 extern "C" {
6189
6190
6191
6192
6193 # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4
6194 # 35 "/usr/include/gentoo-multilib/amd64/stdio.h" 2 3 4
6195
6196
6197 # 1 "/usr/include/bits/types.h" 1 3 4
6198 # 9 "/usr/include/bits/types.h" 3 4
6199 # 1 "/usr/include/gentoo-multilib/amd64/bits/types.h" 1 3 4
6200 # 27 "/usr/include/gentoo-multilib/amd64/bits/types.h" 3 4
6201
6202 # 1 "/usr/include/features.h" 1 3 4
6203 # 28 "/usr/include/gentoo-multilib/amd64/bits/types.h" 2 3 4
6204
6205 # 1 "/usr/include/bits/wordsize.h" 1 3 4
6206 # 9 "/usr/include/bits/wordsize.h" 3 4
6207 # 1 "/usr/include/gentoo-multilib/amd64/bits/wordsize.h" 1 3 4
6208 # 9 "/usr/include/bits/wordsize.h" 2 3 4
6209 # 29 "/usr/include/gentoo-multilib/amd64/bits/types.h" 2 3 4
6210
6211
6212
6213 # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4
6214 # 32 "/usr/include/gentoo-multilib/amd64/bits/types.h" 2 3 4
6215
6216
6217 typedef unsigned char __u_char;
6218 typedef unsigned short int __u_short;
6219 typedef unsigned int __u_int;
6220 typedef unsigned long int __u_long;
6221
6222
6223 typedef signed char __int8_t;
6224 typedef unsigned char __uint8_t;
6225 typedef signed short int __int16_t;
6226 typedef unsigned short int __uint16_t;
6227 typedef signed int __int32_t;
6228 typedef unsigned int __uint32_t;
6229
6230 typedef signed long int __int64_t;
6231 typedef unsigned long int __uint64_t;
6232
6233
6234
6235
6236
6237
6238
6239 typedef long int __quad_t;
6240 typedef unsigned long int __u_quad_t;
6241 # 134 "/usr/include/gentoo-multilib/amd64/bits/types.h" 3 4
6242
6243 # 1 "/usr/include/bits/typesizes.h" 1 3 4
6244 # 9 "/usr/include/bits/typesizes.h" 3 4
6245 # 1 "/usr/include/gentoo-multilib/amd64/bits/typesizes.h" 1 3 4
6246 # 9 "/usr/include/bits/typesizes.h" 2 3 4
6247 # 135 "/usr/include/gentoo-multilib/amd64/bits/types.h" 2 3 4
6248
6249
6250 typedef unsigned long int __dev_t;
6251 typedef unsigned int __uid_t;
6252 typedef unsigned int __gid_t;
6253 typedef unsigned long int __ino_t;
6254 typedef unsigned long int __ino64_t;
6255 typedef unsigned int __mode_t;
6256 typedef unsigned long int __nlink_t;
6257 typedef long int __off_t;
6258 typedef long int __off64_t;
6259 typedef int __pid_t;
6260 typedef struct { int __val[2]; } __fsid_t;
6261 typedef long int __clock_t;
6262 typedef unsigned long int __rlim_t;
6263 typedef unsigned long int __rlim64_t;
6264 typedef unsigned int __id_t;
6265 typedef long int __time_t;
6266 typedef unsigned int __useconds_t;
6267 typedef long int __suseconds_t;
6268
6269 typedef int __daddr_t;
6270 typedef long int __swblk_t;
6271 typedef int __key_t;
6272
6273
6274 typedef int __clockid_t;
6275
6276
6277 typedef void * __timer_t;
6278
6279
6280 typedef long int __blksize_t;
6281
6282
6283
6284
6285 typedef long int __blkcnt_t;
6286 typedef long int __blkcnt64_t;
6287
6288
6289 typedef unsigned long int __fsblkcnt_t;
6290 typedef unsigned long int __fsblkcnt64_t;
6291
6292
6293 typedef unsigned long int __fsfilcnt_t;
6294 typedef unsigned long int __fsfilcnt64_t;
6295
6296 typedef long int __ssize_t;
6297
6298
6299
6300 typedef __off64_t __loff_t;
6301 typedef __quad_t *__qaddr_t;
6302 typedef char *__caddr_t;
6303
6304
6305 typedef long int __intptr_t;
6306
6307
6308 typedef unsigned int __socklen_t;
6309 # 9 "/usr/include/bits/types.h" 2 3 4
6310 # 37 "/usr/include/gentoo-multilib/amd64/stdio.h" 2 3 4
6311 # 45 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
6312 struct _IO_FILE;
6313
6314
6315
6316 typedef struct _IO_FILE FILE;
6317 # 65 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
6318 typedef struct _IO_FILE __FILE;
6319 # 75 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
6320
6321 # 1 "/usr/include/libio.h" 1 3 4
6322 # 9 "/usr/include/libio.h" 3 4
6323 # 1 "/usr/include/gentoo-multilib/amd64/libio.h" 1 3 4
6324 # 32 "/usr/include/gentoo-multilib/amd64/libio.h" 3 4
6325
6326 # 1 "/usr/include/_G_config.h" 1 3 4
6327 # 9 "/usr/include/_G_config.h" 3 4
6328 # 1 "/usr/include/gentoo-multilib/amd64/_G_config.h" 1 3 4
6329 # 9 "/usr/include/gentoo-multilib/amd64/_G_config.h" 3 4
6330
6331 # 1 "/usr/include/bits/types.h" 1 3 4
6332 # 10 "/usr/include/gentoo-multilib/amd64/_G_config.h" 2 3 4
6333
6334
6335
6336
6337
6338 # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4
6339 # 355 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/stddef.h" 3 4
6340 typedef unsigned int wint_t;
6341 # 15 "/usr/include/gentoo-multilib/amd64/_G_config.h" 2 3 4
6342 # 24 "/usr/include/gentoo-multilib/amd64/_G_config.h" 3 4
6343
6344 # 1 "/usr/include/wchar.h" 1 3 4
6345 # 9 "/usr/include/wchar.h" 3 4
6346 # 1 "/usr/include/gentoo-multilib/amd64/wchar.h" 1 3 4
6347 # 48 "/usr/include/gentoo-multilib/amd64/wchar.h" 3 4
6348
6349 # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4
6350 # 49 "/usr/include/gentoo-multilib/amd64/wchar.h" 2 3 4
6351
6352
6353 # 1 "/usr/include/bits/wchar.h" 1 3 4
6354 # 9 "/usr/include/bits/wchar.h" 3 4
6355 # 1 "/usr/include/gentoo-multilib/amd64/bits/wchar.h" 1 3 4
6356 # 9 "/usr/include/bits/wchar.h" 2 3 4
6357 # 51 "/usr/include/gentoo-multilib/amd64/wchar.h" 2 3 4
6358 # 76 "/usr/include/gentoo-multilib/amd64/wchar.h" 3 4
6359 typedef struct
6360 {
6361   int __count;
6362   union
6363   {
6364     wint_t __wch;
6365     char __wchb[4];
6366   } __value;
6367 } __mbstate_t;
6368 # 9 "/usr/include/wchar.h" 2 3 4
6369 # 25 "/usr/include/gentoo-multilib/amd64/_G_config.h" 2 3 4
6370
6371 typedef struct
6372 {
6373   __off_t __pos;
6374   __mbstate_t __state;
6375 } _G_fpos_t;
6376 typedef struct
6377 {
6378   __off64_t __pos;
6379   __mbstate_t __state;
6380 } _G_fpos64_t;
6381 # 44 "/usr/include/gentoo-multilib/amd64/_G_config.h" 3 4
6382
6383 # 1 "/usr/include/gconv.h" 1 3 4
6384 # 9 "/usr/include/gconv.h" 3 4
6385 # 1 "/usr/include/gentoo-multilib/amd64/gconv.h" 1 3 4
6386 # 26 "/usr/include/gentoo-multilib/amd64/gconv.h" 3 4
6387
6388 # 1 "/usr/include/features.h" 1 3 4
6389 # 27 "/usr/include/gentoo-multilib/amd64/gconv.h" 2 3 4
6390
6391
6392 # 1 "/usr/include/wchar.h" 1 3 4
6393 # 9 "/usr/include/wchar.h" 3 4
6394 # 1 "/usr/include/gentoo-multilib/amd64/wchar.h" 1 3 4
6395 # 48 "/usr/include/gentoo-multilib/amd64/wchar.h" 3 4
6396
6397 # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4
6398 # 49 "/usr/include/gentoo-multilib/amd64/wchar.h" 2 3 4
6399
6400
6401 # 1 "/usr/include/bits/wchar.h" 1 3 4
6402 # 51 "/usr/include/gentoo-multilib/amd64/wchar.h" 2 3 4
6403 # 9 "/usr/include/wchar.h" 2 3 4
6404 # 29 "/usr/include/gentoo-multilib/amd64/gconv.h" 2 3 4
6405
6406
6407
6408 # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4
6409 # 32 "/usr/include/gentoo-multilib/amd64/gconv.h" 2 3 4
6410
6411
6412
6413
6414
6415 enum
6416 {
6417   __GCONV_OK = 0,
6418   __GCONV_NOCONV,
6419   __GCONV_NODB,
6420   __GCONV_NOMEM,
6421
6422   __GCONV_EMPTY_INPUT,
6423   __GCONV_FULL_OUTPUT,
6424   __GCONV_ILLEGAL_INPUT,
6425   __GCONV_INCOMPLETE_INPUT,
6426
6427   __GCONV_ILLEGAL_DESCRIPTOR,
6428   __GCONV_INTERNAL_ERROR
6429 };
6430
6431
6432
6433 enum
6434 {
6435   __GCONV_IS_LAST = 0x0001,
6436   __GCONV_IGNORE_ERRORS = 0x0002
6437 };
6438
6439
6440
6441 struct __gconv_step;
6442 struct __gconv_step_data;
6443 struct __gconv_loaded_object;
6444 struct __gconv_trans_data;
6445
6446
6447
6448 typedef int (*__gconv_fct) (struct __gconv_step *, struct __gconv_step_data *,
6449        __const unsigned char **, __const unsigned char *,
6450        unsigned char **, size_t *, int, int);
6451
6452
6453 typedef wint_t (*__gconv_btowc_fct) (struct __gconv_step *, unsigned char);
6454
6455
6456 typedef int (*__gconv_init_fct) (struct __gconv_step *);
6457 typedef void (*__gconv_end_fct) (struct __gconv_step *);
6458
6459
6460
6461 typedef int (*__gconv_trans_fct) (struct __gconv_step *,
6462       struct __gconv_step_data *, void *,
6463       __const unsigned char *,
6464       __const unsigned char **,
6465       __const unsigned char *, unsigned char **,
6466       size_t *);
6467
6468
6469 typedef int (*__gconv_trans_context_fct) (void *, __const unsigned char *,
6470        __const unsigned char *,
6471        unsigned char *, unsigned char *);
6472
6473
6474 typedef int (*__gconv_trans_query_fct) (__const char *, __const char ***,
6475      size_t *);
6476
6477
6478 typedef int (*__gconv_trans_init_fct) (void **, const char *);
6479 typedef void (*__gconv_trans_end_fct) (void *);
6480
6481 struct __gconv_trans_data
6482 {
6483
6484   __gconv_trans_fct __trans_fct;
6485   __gconv_trans_context_fct __trans_context_fct;
6486   __gconv_trans_end_fct __trans_end_fct;
6487   void *__data;
6488   struct __gconv_trans_data *__next;
6489 };
6490
6491
6492
6493 struct __gconv_step
6494 {
6495   struct __gconv_loaded_object *__shlib_handle;
6496   __const char *__modname;
6497
6498   int __counter;
6499
6500   char *__from_name;
6501   char *__to_name;
6502
6503   __gconv_fct __fct;
6504   __gconv_btowc_fct __btowc_fct;
6505   __gconv_init_fct __init_fct;
6506   __gconv_end_fct __end_fct;
6507
6508
6509
6510   int __min_needed_from;
6511   int __max_needed_from;
6512   int __min_needed_to;
6513   int __max_needed_to;
6514
6515
6516   int __stateful;
6517
6518   void *__data;
6519 };
6520
6521
6522
6523 struct __gconv_step_data
6524 {
6525   unsigned char *__outbuf;
6526   unsigned char *__outbufend;
6527
6528
6529
6530   int __flags;
6531
6532
6533
6534   int __invocation_counter;
6535
6536
6537
6538   int __internal_use;
6539
6540   __mbstate_t *__statep;
6541   __mbstate_t __state;
6542
6543
6544
6545   struct __gconv_trans_data *__trans;
6546 };
6547
6548
6549
6550 typedef struct __gconv_info
6551 {
6552   size_t __nsteps;
6553   struct __gconv_step *__steps;
6554   __extension__ struct __gconv_step_data __data [];
6555 } *__gconv_t;
6556 # 9 "/usr/include/gconv.h" 2 3 4
6557 # 45 "/usr/include/gentoo-multilib/amd64/_G_config.h" 2 3 4
6558 typedef union
6559 {
6560   struct __gconv_info __cd;
6561   struct
6562   {
6563     struct __gconv_info __cd;
6564     struct __gconv_step_data __data;
6565   } __combined;
6566 } _G_iconv_t;
6567
6568 typedef int _G_int16_t __attribute__ ((__mode__ (__HI__)));
6569 typedef int _G_int32_t __attribute__ ((__mode__ (__SI__)));
6570 typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__)));
6571 typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__)));
6572 # 9 "/usr/include/_G_config.h" 2 3 4
6573 # 33 "/usr/include/gentoo-multilib/amd64/libio.h" 2 3 4
6574 # 167 "/usr/include/gentoo-multilib/amd64/libio.h" 3 4
6575 struct _IO_jump_t; struct _IO_FILE;
6576 # 177 "/usr/include/gentoo-multilib/amd64/libio.h" 3 4
6577 typedef void _IO_lock_t;
6578
6579
6580
6581
6582
6583 struct _IO_marker {
6584   struct _IO_marker *_next;
6585   struct _IO_FILE *_sbuf;
6586
6587
6588
6589   int _pos;
6590 # 200 "/usr/include/gentoo-multilib/amd64/libio.h" 3 4
6591 };
6592
6593
6594 enum __codecvt_result
6595 {
6596   __codecvt_ok,
6597   __codecvt_partial,
6598   __codecvt_error,
6599   __codecvt_noconv
6600 };
6601 # 268 "/usr/include/gentoo-multilib/amd64/libio.h" 3 4
6602 struct _IO_FILE {
6603   int _flags;
6604
6605
6606
6607
6608   char* _IO_read_ptr;
6609   char* _IO_read_end;
6610   char* _IO_read_base;
6611   char* _IO_write_base;
6612   char* _IO_write_ptr;
6613   char* _IO_write_end;
6614   char* _IO_buf_base;
6615   char* _IO_buf_end;
6616
6617   char *_IO_save_base;
6618   char *_IO_backup_base;
6619   char *_IO_save_end;
6620
6621   struct _IO_marker *_markers;
6622
6623   struct _IO_FILE *_chain;
6624
6625   int _fileno;
6626
6627
6628
6629   int _flags2;
6630
6631   __off_t _old_offset;
6632
6633
6634
6635   unsigned short _cur_column;
6636   signed char _vtable_offset;
6637   char _shortbuf[1];
6638
6639
6640
6641   _IO_lock_t *_lock;
6642 # 316 "/usr/include/gentoo-multilib/amd64/libio.h" 3 4
6643   __off64_t _offset;
6644 # 325 "/usr/include/gentoo-multilib/amd64/libio.h" 3 4
6645   void *__pad1;
6646   void *__pad2;
6647   void *__pad3;
6648   void *__pad4;
6649   size_t __pad5;
6650
6651   int _mode;
6652
6653   char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)];
6654
6655 };
6656
6657
6658
6659
6660
6661 struct _IO_FILE_plus;
6662
6663 extern struct _IO_FILE_plus _IO_2_1_stdin_;
6664 extern struct _IO_FILE_plus _IO_2_1_stdout_;
6665 extern struct _IO_FILE_plus _IO_2_1_stderr_;
6666 # 361 "/usr/include/gentoo-multilib/amd64/libio.h" 3 4
6667 typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes);
6668
6669
6670
6671
6672
6673
6674
6675 typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf,
6676      size_t __n);
6677
6678
6679
6680
6681
6682
6683
6684 typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w);
6685
6686
6687 typedef int __io_close_fn (void *__cookie);
6688
6689
6690
6691
6692 typedef __io_read_fn cookie_read_function_t;
6693 typedef __io_write_fn cookie_write_function_t;
6694 typedef __io_seek_fn cookie_seek_function_t;
6695 typedef __io_close_fn cookie_close_function_t;
6696
6697
6698 typedef struct
6699 {
6700   __io_read_fn *read;
6701   __io_write_fn *write;
6702   __io_seek_fn *seek;
6703   __io_close_fn *close;
6704 } _IO_cookie_io_functions_t;
6705 typedef _IO_cookie_io_functions_t cookie_io_functions_t;
6706
6707 struct _IO_cookie_file;
6708
6709
6710 extern void _IO_cookie_init (struct _IO_cookie_file *__cfile, int __read_write,
6711         void *__cookie, _IO_cookie_io_functions_t __fns);
6712
6713
6714
6715
6716 extern "C" {
6717
6718
6719 extern int __underflow (_IO_FILE *);
6720 extern int __uflow (_IO_FILE *);
6721 extern int __overflow (_IO_FILE *, int);
6722 extern wint_t __wunderflow (_IO_FILE *);
6723 extern wint_t __wuflow (_IO_FILE *);
6724 extern wint_t __woverflow (_IO_FILE *, wint_t);
6725 # 451 "/usr/include/gentoo-multilib/amd64/libio.h" 3 4
6726 extern int _IO_getc (_IO_FILE *__fp);
6727 extern int _IO_putc (int __c, _IO_FILE *__fp);
6728 extern int _IO_feof (_IO_FILE *__fp) throw ();
6729 extern int _IO_ferror (_IO_FILE *__fp) throw ();
6730
6731 extern int _IO_peekc_locked (_IO_FILE *__fp);
6732
6733
6734
6735
6736
6737 extern void _IO_flockfile (_IO_FILE *) throw ();
6738 extern void _IO_funlockfile (_IO_FILE *) throw ();
6739 extern int _IO_ftrylockfile (_IO_FILE *) throw ();
6740 # 481 "/usr/include/gentoo-multilib/amd64/libio.h" 3 4
6741 extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict,
6742    __gnuc_va_list, int *__restrict);
6743 extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict,
6744     __gnuc_va_list);
6745 extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t);
6746 extern size_t _IO_sgetn (_IO_FILE *, void *, size_t);
6747
6748 extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int);
6749 extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int);
6750
6751 extern void _IO_free_backup_area (_IO_FILE *) throw ();
6752 # 543 "/usr/include/gentoo-multilib/amd64/libio.h" 3 4
6753 }
6754 # 9 "/usr/include/libio.h" 2 3 4
6755 # 76 "/usr/include/gentoo-multilib/amd64/stdio.h" 2 3 4
6756 # 89 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
6757
6758
6759 typedef _G_fpos_t fpos_t;
6760
6761
6762
6763
6764
6765 typedef _G_fpos64_t fpos64_t;
6766 # 141 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
6767
6768 # 1 "/usr/include/bits/stdio_lim.h" 1 3 4
6769 # 9 "/usr/include/bits/stdio_lim.h" 3 4
6770 # 1 "/usr/include/gentoo-multilib/amd64/bits/stdio_lim.h" 1 3 4
6771 # 9 "/usr/include/bits/stdio_lim.h" 2 3 4
6772 # 142 "/usr/include/gentoo-multilib/amd64/stdio.h" 2 3 4
6773
6774
6775
6776 extern struct _IO_FILE *stdin;
6777 extern struct _IO_FILE *stdout;
6778 extern struct _IO_FILE *stderr;
6779
6780
6781
6782
6783
6784
6785
6786 extern int remove (__const char *__filename) throw ();
6787
6788 extern int rename (__const char *__old, __const char *__new) throw ();
6789
6790
6791
6792
6793 extern int renameat (int __oldfd, __const char *__old, int __newfd,
6794        __const char *__new) throw ();
6795 # 172 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
6796 extern FILE *tmpfile (void) ;
6797 # 182 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
6798 extern FILE *tmpfile64 (void) ;
6799
6800
6801
6802 extern char *tmpnam (char *__s) throw () ;
6803
6804
6805
6806
6807
6808 extern char *tmpnam_r (char *__s) throw () ;
6809 # 204 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
6810 extern char *tempnam (__const char *__dir, __const char *__pfx)
6811      throw () __attribute__ ((__malloc__)) ;
6812 # 214 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
6813 extern int fclose (FILE *__stream);
6814
6815
6816
6817
6818 extern int fflush (FILE *__stream);
6819 # 229 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
6820 extern int fflush_unlocked (FILE *__stream);
6821 # 239 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
6822 extern int fcloseall (void);
6823 # 249 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
6824 extern FILE *fopen (__const char *__restrict __filename,
6825       __const char *__restrict __modes) ;
6826
6827
6828
6829
6830 extern FILE *freopen (__const char *__restrict __filename,
6831         __const char *__restrict __modes,
6832         FILE *__restrict __stream) ;
6833 # 272 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
6834
6835
6836 extern FILE *fopen64 (__const char *__restrict __filename,
6837         __const char *__restrict __modes) ;
6838 extern FILE *freopen64 (__const char *__restrict __filename,
6839    __const char *__restrict __modes,
6840    FILE *__restrict __stream) ;
6841
6842
6843
6844
6845 extern FILE *fdopen (int __fd, __const char *__modes) throw () ;
6846
6847
6848
6849
6850
6851 extern FILE *fopencookie (void *__restrict __magic_cookie,
6852      __const char *__restrict __modes,
6853      _IO_cookie_io_functions_t __io_funcs) throw () ;
6854
6855
6856 extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes)
6857   throw () ;
6858
6859
6860
6861
6862 extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) throw () ;
6863
6864
6865
6866
6867
6868
6869 extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) throw ();
6870
6871
6872
6873 extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,
6874       int __modes, size_t __n) throw ();
6875
6876
6877
6878
6879
6880 extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf,
6881          size_t __size) throw ();
6882
6883
6884 extern void setlinebuf (FILE *__stream) throw ();
6885 # 331 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
6886 extern int fprintf (FILE *__restrict __stream,
6887       __const char *__restrict __format, ...);
6888
6889
6890
6891
6892 extern int printf (__const char *__restrict __format, ...);
6893
6894 extern int sprintf (char *__restrict __s,
6895       __const char *__restrict __format, ...) throw ();
6896
6897
6898
6899
6900
6901 extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format,
6902        __gnuc_va_list __arg);
6903
6904
6905
6906
6907 extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg);
6908
6909 extern int vsprintf (char *__restrict __s, __const char *__restrict __format,
6910        __gnuc_va_list __arg) throw ();
6911
6912
6913
6914
6915
6916 extern int snprintf (char *__restrict __s, size_t __maxlen,
6917        __const char *__restrict __format, ...)
6918      throw () __attribute__ ((__format__ (__printf__, 3, 4)));
6919
6920 extern int vsnprintf (char *__restrict __s, size_t __maxlen,
6921         __const char *__restrict __format, __gnuc_va_list __arg)
6922      throw () __attribute__ ((__format__ (__printf__, 3, 0)));
6923
6924
6925
6926
6927
6928
6929 extern int vasprintf (char **__restrict __ptr, __const char *__restrict __f,
6930         __gnuc_va_list __arg)
6931      throw () __attribute__ ((__format__ (__printf__, 2, 0))) ;
6932 extern int __asprintf (char **__restrict __ptr,
6933          __const char *__restrict __fmt, ...)
6934      throw () __attribute__ ((__format__ (__printf__, 2, 3))) ;
6935 extern int asprintf (char **__restrict __ptr,
6936        __const char *__restrict __fmt, ...)
6937      throw () __attribute__ ((__format__ (__printf__, 2, 3))) ;
6938
6939
6940
6941
6942
6943
6944
6945 extern int vdprintf (int __fd, __const char *__restrict __fmt,
6946        __gnuc_va_list __arg)
6947      __attribute__ ((__format__ (__printf__, 2, 0)));
6948 extern int dprintf (int __fd, __const char *__restrict __fmt, ...)
6949      __attribute__ ((__format__ (__printf__, 2, 3)));
6950 # 403 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
6951 extern int fscanf (FILE *__restrict __stream,
6952      __const char *__restrict __format, ...) ;
6953
6954
6955
6956
6957 extern int scanf (__const char *__restrict __format, ...) ;
6958
6959 extern int sscanf (__const char *__restrict __s,
6960      __const char *__restrict __format, ...) throw ();
6961 # 421 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
6962 extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format,
6963       __gnuc_va_list __arg)
6964      __attribute__ ((__format__ (__scanf__, 2, 0))) ;
6965
6966
6967
6968
6969
6970 extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg)
6971      __attribute__ ((__format__ (__scanf__, 1, 0))) ;
6972
6973
6974 extern int vsscanf (__const char *__restrict __s,
6975       __const char *__restrict __format, __gnuc_va_list __arg)
6976      throw () __attribute__ ((__format__ (__scanf__, 2, 0)));
6977 # 445 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
6978 extern int fgetc (FILE *__stream);
6979 extern int getc (FILE *__stream);
6980
6981
6982
6983
6984
6985 extern int getchar (void);
6986 # 464 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
6987 extern int getc_unlocked (FILE *__stream);
6988 extern int getchar_unlocked (void);
6989 # 475 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
6990 extern int fgetc_unlocked (FILE *__stream);
6991 # 487 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
6992 extern int fputc (int __c, FILE *__stream);
6993 extern int putc (int __c, FILE *__stream);
6994
6995
6996
6997
6998
6999 extern int putchar (int __c);
7000 # 508 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
7001 extern int fputc_unlocked (int __c, FILE *__stream);
7002
7003
7004
7005
7006
7007
7008
7009 extern int putc_unlocked (int __c, FILE *__stream);
7010 extern int putchar_unlocked (int __c);
7011
7012
7013
7014
7015
7016
7017 extern int getw (FILE *__stream);
7018
7019
7020 extern int putw (int __w, FILE *__stream);
7021 # 536 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
7022 extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
7023      ;
7024
7025
7026
7027
7028
7029
7030 extern char *gets (char *__s) ;
7031 # 554 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
7032 extern char *fgets_unlocked (char *__restrict __s, int __n,
7033         FILE *__restrict __stream) ;
7034 # 570 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
7035 extern __ssize_t __getdelim (char **__restrict __lineptr,
7036           size_t *__restrict __n, int __delimiter,
7037           FILE *__restrict __stream) ;
7038 extern __ssize_t getdelim (char **__restrict __lineptr,
7039         size_t *__restrict __n, int __delimiter,
7040         FILE *__restrict __stream) ;
7041
7042
7043
7044
7045
7046
7047
7048 extern __ssize_t getline (char **__restrict __lineptr,
7049        size_t *__restrict __n,
7050        FILE *__restrict __stream) ;
7051 # 594 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
7052 extern int fputs (__const char *__restrict __s, FILE *__restrict __stream);
7053
7054
7055
7056
7057
7058 extern int puts (__const char *__s);
7059
7060
7061
7062
7063
7064
7065 extern int ungetc (int __c, FILE *__stream);
7066
7067
7068
7069
7070
7071
7072 extern size_t fread (void *__restrict __ptr, size_t __size,
7073        size_t __n, FILE *__restrict __stream) ;
7074
7075
7076
7077
7078 extern size_t fwrite (__const void *__restrict __ptr, size_t __size,
7079         size_t __n, FILE *__restrict __s) ;
7080 # 631 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
7081 extern int fputs_unlocked (__const char *__restrict __s,
7082       FILE *__restrict __stream);
7083 # 642 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
7084 extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
7085          size_t __n, FILE *__restrict __stream) ;
7086 extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size,
7087           size_t __n, FILE *__restrict __stream) ;
7088 # 654 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
7089 extern int fseek (FILE *__stream, long int __off, int __whence);
7090
7091
7092
7093
7094 extern long int ftell (FILE *__stream) ;
7095
7096
7097
7098
7099 extern void rewind (FILE *__stream);
7100 # 678 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
7101 extern int fseeko (FILE *__stream, __off_t __off, int __whence);
7102
7103
7104
7105
7106 extern __off_t ftello (FILE *__stream) ;
7107 # 697 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
7108
7109
7110
7111
7112
7113
7114 extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos);
7115
7116
7117
7118
7119 extern int fsetpos (FILE *__stream, __const fpos_t *__pos);
7120 # 720 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
7121
7122
7123
7124 extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence);
7125 extern __off64_t ftello64 (FILE *__stream) ;
7126 extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos);
7127 extern int fsetpos64 (FILE *__stream, __const fpos64_t *__pos);
7128
7129
7130
7131
7132 extern void clearerr (FILE *__stream) throw ();
7133
7134 extern int feof (FILE *__stream) throw () ;
7135
7136 extern int ferror (FILE *__stream) throw () ;
7137
7138
7139
7140
7141 extern void clearerr_unlocked (FILE *__stream) throw ();
7142 extern int feof_unlocked (FILE *__stream) throw () ;
7143 extern int ferror_unlocked (FILE *__stream) throw () ;
7144 # 751 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
7145 extern void perror (__const char *__s);
7146
7147
7148
7149
7150
7151
7152
7153 # 1 "/usr/include/bits/sys_errlist.h" 1 3 4
7154 # 9 "/usr/include/bits/sys_errlist.h" 3 4
7155 # 1 "/usr/include/gentoo-multilib/amd64/bits/sys_errlist.h" 1 3 4
7156 # 27 "/usr/include/gentoo-multilib/amd64/bits/sys_errlist.h" 3 4
7157 extern int sys_nerr;
7158 extern __const char *__const sys_errlist[];
7159
7160
7161 extern int _sys_nerr;
7162 extern __const char *__const _sys_errlist[];
7163 # 9 "/usr/include/bits/sys_errlist.h" 2 3 4
7164 # 759 "/usr/include/gentoo-multilib/amd64/stdio.h" 2 3 4
7165
7166
7167
7168
7169 extern int fileno (FILE *__stream) throw () ;
7170
7171
7172
7173
7174 extern int fileno_unlocked (FILE *__stream) throw () ;
7175 # 778 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
7176 extern FILE *popen (__const char *__command, __const char *__modes) ;
7177
7178
7179
7180
7181
7182 extern int pclose (FILE *__stream);
7183
7184
7185
7186
7187
7188 extern char *ctermid (char *__s) throw ();
7189
7190
7191
7192
7193
7194 extern char *cuserid (char *__s);
7195
7196
7197
7198
7199 struct obstack;
7200
7201
7202 extern int obstack_printf (struct obstack *__restrict __obstack,
7203       __const char *__restrict __format, ...)
7204      throw () __attribute__ ((__format__ (__printf__, 2, 3)));
7205 extern int obstack_vprintf (struct obstack *__restrict __obstack,
7206        __const char *__restrict __format,
7207        __gnuc_va_list __args)
7208      throw () __attribute__ ((__format__ (__printf__, 2, 0)));
7209
7210
7211
7212
7213
7214
7215
7216 extern void flockfile (FILE *__stream) throw ();
7217
7218
7219
7220 extern int ftrylockfile (FILE *__stream) throw () ;
7221
7222
7223 extern void funlockfile (FILE *__stream) throw ();
7224 # 839 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
7225
7226 # 1 "/usr/include/bits/stdio.h" 1 3 4
7227 # 9 "/usr/include/bits/stdio.h" 3 4
7228 # 1 "/usr/include/gentoo-multilib/amd64/bits/stdio.h" 1 3 4
7229 # 33 "/usr/include/gentoo-multilib/amd64/bits/stdio.h" 3 4
7230 inline int
7231 vprintf (__const char *__restrict __fmt, __gnuc_va_list __arg)
7232 {
7233   return vfprintf (stdout, __fmt, __arg);
7234 }
7235
7236
7237 inline int
7238 getchar (void)
7239 {
7240   return _IO_getc (stdin);
7241 }
7242
7243
7244
7245
7246 inline int
7247 fgetc_unlocked (FILE *__fp)
7248 {
7249   return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++);
7250 }
7251
7252
7253
7254
7255
7256 inline int
7257 getc_unlocked (FILE *__fp)
7258 {
7259   return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++);
7260 }
7261
7262
7263 inline int
7264 getchar_unlocked (void)
7265 {
7266   return (__builtin_expect (((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end), 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++);
7267 }
7268
7269
7270
7271
7272 inline int
7273 putchar (int __c)
7274 {
7275   return _IO_putc (__c, stdout);
7276 }
7277
7278
7279
7280
7281 inline int
7282 fputc_unlocked (int __c, FILE *__stream)
7283 {
7284   return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c)));
7285 }
7286
7287
7288
7289
7290
7291 inline int
7292 putc_unlocked (int __c, FILE *__stream)
7293 {
7294   return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c)));
7295 }
7296
7297
7298 inline int
7299 putchar_unlocked (int __c)
7300 {
7301   return (__builtin_expect (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end), 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c)));
7302 }
7303
7304
7305
7306
7307
7308 inline __ssize_t
7309 getline (char **__lineptr, size_t *__n, FILE *__stream)
7310 {
7311   return __getdelim (__lineptr, __n, '\n', __stream);
7312 }
7313
7314
7315
7316
7317
7318 inline int
7319 feof_unlocked (FILE *__stream) throw ()
7320 {
7321   return (((__stream)->_flags & 0x10) != 0);
7322 }
7323
7324
7325 inline int
7326 ferror_unlocked (FILE *__stream) throw ()
7327 {
7328   return (((__stream)->_flags & 0x20) != 0);
7329 }
7330 # 9 "/usr/include/bits/stdio.h" 2 3 4
7331 # 840 "/usr/include/gentoo-multilib/amd64/stdio.h" 2 3 4
7332 # 848 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4
7333 }
7334 # 9 "/usr/include/stdio.h" 2 3 4
7335 # 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
7336
7337
7338
7339
7340
7341
7342
7343 typedef QtValidLicenseForCoreModule QtCoreModule;
7344
7345 class QTextCodec;
7346 class QTextDecoder;
7347
7348 class QTextStreamPrivate;
7349 class QTextStream
7350 {
7351     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;
7352
7353 public:
7354     enum RealNumberNotation {
7355         SmartNotation,
7356         FixedNotation,
7357         ScientificNotation
7358     };
7359     enum FieldAlignment {
7360         AlignLeft,
7361         AlignRight,
7362         AlignCenter,
7363         AlignAccountingStyle
7364     };
7365     enum Status {
7366         Ok,
7367         ReadPastEnd,
7368         ReadCorruptData
7369     };
7370     enum NumberFlag {
7371         ShowBase = 0x1,
7372         ForcePoint = 0x2,
7373         ForceSign = 0x4,
7374         UppercaseBase = 0x8,
7375         UppercaseDigits = 0x10
7376     };
7377     typedef QFlags<NumberFlag> NumberFlags;
7378
7379     QTextStream();
7380     explicit QTextStream(QIODevice *device);
7381     explicit QTextStream(FILE *fileHandle, QIODevice::OpenMode openMode = QIODevice::ReadWrite);
7382     explicit QTextStream(QString *string, QIODevice::OpenMode openMode = QIODevice::ReadWrite);
7383     explicit QTextStream(QByteArray *array, QIODevice::OpenMode openMode = QIODevice::ReadWrite);
7384     explicit QTextStream(const QByteArray &array, QIODevice::OpenMode openMode = QIODevice::ReadOnly);
7385     virtual ~QTextStream();
7386 # 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"
7387     void setDevice(QIODevice *device);
7388     QIODevice *device() const;
7389
7390     void setString(QString *string, QIODevice::OpenMode openMode = QIODevice::ReadWrite);
7391     QString *string() const;
7392
7393     Status status() const;
7394     void setStatus(Status status);
7395     void resetStatus();
7396
7397     bool atEnd() const;
7398     void reset();
7399     void flush();
7400     bool seek(qint64 pos);
7401     qint64 pos() const;
7402
7403     void skipWhiteSpace();
7404
7405     QString readLine(qint64 maxlen = 0);
7406     QString readAll();
7407     QString read(qint64 maxlen);
7408
7409     void setFieldAlignment(FieldAlignment alignment);
7410     FieldAlignment fieldAlignment() const;
7411
7412     void setPadChar(QChar ch);
7413     QChar padChar() const;
7414
7415     void setFieldWidth(int width);
7416     int fieldWidth() const;
7417
7418     void setNumberFlags(NumberFlags flags);
7419     NumberFlags numberFlags() const;
7420
7421     void setIntegerBase(int base);
7422     int integerBase() const;
7423
7424     void setRealNumberNotation(RealNumberNotation notation);
7425     RealNumberNotation realNumberNotation() const;
7426
7427     void setRealNumberPrecision(int precision);
7428     int realNumberPrecision() const;
7429
7430     QTextStream &operator>>(QChar &ch);
7431     QTextStream &operator>>(char &ch);
7432     QTextStream &operator>>(signed short &i);
7433     QTextStream &operator>>(unsigned short &i);
7434     QTextStream &operator>>(signed int &i);
7435     QTextStream &operator>>(unsigned int &i);
7436     QTextStream &operator>>(signed long &i);
7437     QTextStream &operator>>(unsigned long &i);
7438     QTextStream &operator>>(qlonglong &i);
7439     QTextStream &operator>>(qulonglong &i);
7440     QTextStream &operator>>(float &f);
7441     QTextStream &operator>>(double &f);
7442     QTextStream &operator>>(QString &s);
7443     QTextStream &operator>>(QByteArray &array);
7444     QTextStream &operator>>(char *c);
7445
7446     QTextStream &operator<<(QBool b);
7447     QTextStream &operator<<(QChar ch);
7448     QTextStream &operator<<(char ch);
7449     QTextStream &operator<<(signed short i);
7450     QTextStream &operator<<(unsigned short i);
7451     QTextStream &operator<<(signed int i);
7452     QTextStream &operator<<(unsigned int i);
7453     QTextStream &operator<<(signed long i);
7454     QTextStream &operator<<(unsigned long i);
7455     QTextStream &operator<<(qlonglong i);
7456     QTextStream &operator<<(qulonglong i);
7457     QTextStream &operator<<(float f);
7458     QTextStream &operator<<(double f);
7459     QTextStream &operator<<(const QString &s);
7460     QTextStream &operator<<(const QByteArray &array);
7461     QTextStream &operator<<(const char *c);
7462     QTextStream &operator<<(const void *ptr);
7463 # 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"
7464 private:
7465
7466
7467
7468
7469
7470     QTextStream(const QTextStream &); QTextStream &operator=(const QTextStream &);
7471
7472     QTextStreamPrivate *d_ptr;
7473 };
7474
7475 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; }
7476
7477
7478
7479
7480
7481 typedef QTextStream & (*QTextStreamFunction)(QTextStream &);
7482 typedef void (QTextStream::*QTSMFI)(int);
7483 typedef void (QTextStream::*QTSMFC)(QChar);
7484
7485 class QTextStreamManipulator
7486 {
7487 public:
7488     QTextStreamManipulator(QTSMFI m, int a) { mf = m; mc = 0; arg = a; }
7489     QTextStreamManipulator(QTSMFC m, QChar c) { mf = 0; mc = m; ch = c; }
7490     void exec(QTextStream &s) { if (mf) { (s.*mf)(arg); } else { (s.*mc)(ch); } }
7491
7492 private:
7493     QTSMFI mf;
7494     QTSMFC mc;
7495     int arg;
7496     QChar ch;
7497 };
7498
7499 inline QTextStream &operator>>(QTextStream &s, QTextStreamFunction f)
7500 { return (*f)(s); }
7501
7502 inline QTextStream &operator<<(QTextStream &s, QTextStreamFunction f)
7503 { return (*f)(s); }
7504
7505 inline QTextStream &operator<<(QTextStream &s, QTextStreamManipulator m)
7506 { m.exec(s); return s; }
7507
7508  QTextStream &bin(QTextStream &s);
7509  QTextStream &oct(QTextStream &s);
7510  QTextStream &dec(QTextStream &s);
7511  QTextStream &hex(QTextStream &s);
7512
7513  QTextStream &showbase(QTextStream &s);
7514  QTextStream &forcesign(QTextStream &s);
7515  QTextStream &forcepoint(QTextStream &s);
7516  QTextStream &noshowbase(QTextStream &s);
7517  QTextStream &noforcesign(QTextStream &s);
7518  QTextStream &noforcepoint(QTextStream &s);
7519
7520  QTextStream &uppercasebase(QTextStream &s);
7521  QTextStream &uppercasedigits(QTextStream &s);
7522  QTextStream &lowercasebase(QTextStream &s);
7523  QTextStream &lowercasedigits(QTextStream &s);
7524
7525  QTextStream &fixed(QTextStream &s);
7526  QTextStream &scientific(QTextStream &s);
7527
7528  QTextStream &left(QTextStream &s);
7529  QTextStream &right(QTextStream &s);
7530  QTextStream &center(QTextStream &s);
7531
7532  QTextStream &endl(QTextStream &s);
7533  QTextStream &flush(QTextStream &s);
7534  QTextStream &reset(QTextStream &s);
7535
7536  QTextStream &bom(QTextStream &s);
7537
7538  QTextStream &ws(QTextStream &s);
7539
7540 inline QTextStreamManipulator qSetFieldWidth(int width)
7541 {
7542     QTSMFI func = &QTextStream::setFieldWidth;
7543     return QTextStreamManipulator(func,width);
7544 }
7545
7546 inline QTextStreamManipulator qSetPadChar(QChar ch)
7547 {
7548     QTSMFC func = &QTextStream::setPadChar;
7549     return QTextStreamManipulator(func, ch);
7550 }
7551
7552 inline QTextStreamManipulator qSetRealNumberPrecision(int precision)
7553 {
7554     QTSMFI func = &QTextStream::setRealNumberPrecision;
7555     return QTextStreamManipulator(func, precision);
7556 }
7557 # 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"
7558 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qtextstream.h" 2
7559 # 44 "./project.h" 2
7560
7561 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qstring.h" 1
7562 # 45 "./project.h" 2
7563
7564 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qstack.h" 1
7565
7566 # 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
7567 # 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"
7568
7569 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qvector.h" 1
7570
7571 # 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
7572 # 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"
7573
7574 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qiterator.h" 1
7575 # 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
7576
7577 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qatomic.h" 1
7578 # 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
7579
7580 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qalgorithms.h" 1
7581 # 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
7582
7583 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qlist.h" 1
7584 # 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
7585
7586
7587
7588
7589
7590
7591 # 1 "/usr/include/stdlib.h" 1 3 4
7592 # 9 "/usr/include/stdlib.h" 3 4
7593 # 1 "/usr/include/gentoo-multilib/amd64/stdlib.h" 1 3 4
7594 # 25 "/usr/include/gentoo-multilib/amd64/stdlib.h" 3 4
7595
7596 # 1 "/usr/include/features.h" 1 3 4
7597 # 26 "/usr/include/gentoo-multilib/amd64/stdlib.h" 2 3 4
7598 # 34 "/usr/include/gentoo-multilib/amd64/stdlib.h" 3 4
7599 # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4
7600 # 34 "/usr/include/gentoo-multilib/amd64/stdlib.h" 2 3 4
7601
7602 extern "C" {
7603
7604
7605
7606
7607
7608
7609
7610 # 1 "/usr/include/bits/waitflags.h" 1 3 4
7611 # 9 "/usr/include/bits/waitflags.h" 3 4
7612 # 1 "/usr/include/gentoo-multilib/amd64/bits/waitflags.h" 1 3 4
7613 # 9 "/usr/include/bits/waitflags.h" 2 3 4
7614 # 43 "/usr/include/gentoo-multilib/amd64/stdlib.h" 2 3 4
7615
7616 # 1 "/usr/include/bits/waitstatus.h" 1 3 4
7617 # 9 "/usr/include/bits/waitstatus.h" 3 4
7618 # 1 "/usr/include/gentoo-multilib/amd64/bits/waitstatus.h" 1 3 4
7619 # 65 "/usr/include/gentoo-multilib/amd64/bits/waitstatus.h" 3 4
7620
7621 # 1 "/usr/include/endian.h" 1 3 4
7622 # 9 "/usr/include/endian.h" 3 4
7623 # 1 "/usr/include/gentoo-multilib/amd64/endian.h" 1 3 4
7624 # 22 "/usr/include/gentoo-multilib/amd64/endian.h" 3 4
7625
7626 # 1 "/usr/include/features.h" 1 3 4
7627 # 23 "/usr/include/gentoo-multilib/amd64/endian.h" 2 3 4
7628 # 37 "/usr/include/gentoo-multilib/amd64/endian.h" 3 4
7629
7630 # 1 "/usr/include/bits/endian.h" 1 3 4
7631 # 9 "/usr/include/bits/endian.h" 3 4
7632 # 1 "/usr/include/gentoo-multilib/amd64/bits/endian.h" 1 3 4
7633 # 9 "/usr/include/bits/endian.h" 2 3 4
7634 # 38 "/usr/include/gentoo-multilib/amd64/endian.h" 2 3 4
7635 # 9 "/usr/include/endian.h" 2 3 4
7636 # 66 "/usr/include/gentoo-multilib/amd64/bits/waitstatus.h" 2 3 4
7637
7638 union wait
7639   {
7640     int w_status;
7641     struct
7642       {
7643
7644  unsigned int __w_termsig:7;
7645  unsigned int __w_coredump:1;
7646  unsigned int __w_retcode:8;
7647  unsigned int:16;
7648
7649
7650
7651
7652
7653
7654
7655       } __wait_terminated;
7656     struct
7657       {
7658
7659  unsigned int __w_stopval:8;
7660  unsigned int __w_stopsig:8;
7661  unsigned int:16;
7662
7663
7664
7665
7666
7667
7668       } __wait_stopped;
7669   };
7670 # 9 "/usr/include/bits/waitstatus.h" 2 3 4
7671 # 44 "/usr/include/gentoo-multilib/amd64/stdlib.h" 2 3 4
7672 # 96 "/usr/include/gentoo-multilib/amd64/stdlib.h" 3 4
7673
7674
7675 typedef struct
7676   {
7677     int quot;
7678     int rem;
7679   } div_t;
7680
7681
7682
7683 typedef struct
7684   {
7685     long int quot;
7686     long int rem;
7687   } ldiv_t;
7688
7689
7690
7691
7692
7693
7694
7695 __extension__ typedef struct
7696   {
7697     long long int quot;
7698     long long int rem;
7699   } lldiv_t;
7700 # 140 "/usr/include/gentoo-multilib/amd64/stdlib.h" 3 4
7701 extern size_t __ctype_get_mb_cur_max (void) throw () ;
7702
7703
7704
7705
7706 extern double atof (__const char *__nptr)
7707      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
7708
7709 extern int atoi (__const char *__nptr)
7710      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
7711
7712 extern long int atol (__const char *__nptr)
7713      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
7714
7715
7716
7717
7718
7719 __extension__ extern long long int atoll (__const char *__nptr)
7720      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
7721
7722
7723
7724
7725
7726 extern double strtod (__const char *__restrict __nptr,
7727         char **__restrict __endptr)
7728      throw () __attribute__ ((__nonnull__ (1))) ;
7729
7730
7731
7732
7733
7734 extern float strtof (__const char *__restrict __nptr,
7735        char **__restrict __endptr) throw () __attribute__ ((__nonnull__ (1))) ;
7736
7737 extern long double strtold (__const char *__restrict __nptr,
7738        char **__restrict __endptr)
7739      throw () __attribute__ ((__nonnull__ (1))) ;
7740
7741
7742
7743
7744
7745 extern long int strtol (__const char *__restrict __nptr,
7746    char **__restrict __endptr, int __base)
7747      throw () __attribute__ ((__nonnull__ (1))) ;
7748
7749 extern unsigned long int strtoul (__const char *__restrict __nptr,
7750       char **__restrict __endptr, int __base)
7751      throw () __attribute__ ((__nonnull__ (1))) ;
7752
7753
7754
7755
7756 __extension__
7757 extern long long int strtoq (__const char *__restrict __nptr,
7758         char **__restrict __endptr, int __base)
7759      throw () __attribute__ ((__nonnull__ (1))) ;
7760
7761 __extension__
7762 extern unsigned long long int strtouq (__const char *__restrict __nptr,
7763            char **__restrict __endptr, int __base)
7764      throw () __attribute__ ((__nonnull__ (1))) ;
7765
7766
7767
7768
7769
7770 __extension__
7771 extern long long int strtoll (__const char *__restrict __nptr,
7772          char **__restrict __endptr, int __base)
7773      throw () __attribute__ ((__nonnull__ (1))) ;
7774
7775 __extension__
7776 extern unsigned long long int strtoull (__const char *__restrict __nptr,
7777      char **__restrict __endptr, int __base)
7778      throw () __attribute__ ((__nonnull__ (1))) ;
7779 # 236 "/usr/include/gentoo-multilib/amd64/stdlib.h" 3 4
7780
7781 # 1 "/usr/include/xlocale.h" 1 3 4
7782 # 237 "/usr/include/gentoo-multilib/amd64/stdlib.h" 2 3 4
7783
7784
7785
7786 extern long int strtol_l (__const char *__restrict __nptr,
7787      char **__restrict __endptr, int __base,
7788      __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 4))) ;
7789
7790 extern unsigned long int strtoul_l (__const char *__restrict __nptr,
7791         char **__restrict __endptr,
7792         int __base, __locale_t __loc)
7793      throw () __attribute__ ((__nonnull__ (1, 4))) ;
7794
7795 __extension__
7796 extern long long int strtoll_l (__const char *__restrict __nptr,
7797     char **__restrict __endptr, int __base,
7798     __locale_t __loc)
7799      throw () __attribute__ ((__nonnull__ (1, 4))) ;
7800
7801 __extension__
7802 extern unsigned long long int strtoull_l (__const char *__restrict __nptr,
7803        char **__restrict __endptr,
7804        int __base, __locale_t __loc)
7805      throw () __attribute__ ((__nonnull__ (1, 4))) ;
7806
7807 extern double strtod_l (__const char *__restrict __nptr,
7808    char **__restrict __endptr, __locale_t __loc)
7809      throw () __attribute__ ((__nonnull__ (1, 3))) ;
7810
7811 extern float strtof_l (__const char *__restrict __nptr,
7812          char **__restrict __endptr, __locale_t __loc)
7813      throw () __attribute__ ((__nonnull__ (1, 3))) ;
7814
7815 extern long double strtold_l (__const char *__restrict __nptr,
7816          char **__restrict __endptr,
7817          __locale_t __loc)
7818      throw () __attribute__ ((__nonnull__ (1, 3))) ;
7819
7820
7821
7822
7823
7824
7825 extern double __strtod_internal (__const char *__restrict __nptr,
7826      char **__restrict __endptr, int __group)
7827      throw () __attribute__ ((__nonnull__ (1))) ;
7828 extern float __strtof_internal (__const char *__restrict __nptr,
7829     char **__restrict __endptr, int __group)
7830      throw () __attribute__ ((__nonnull__ (1))) ;
7831 extern long double __strtold_internal (__const char *__restrict __nptr,
7832            char **__restrict __endptr,
7833            int __group)
7834      throw () __attribute__ ((__nonnull__ (1))) ;
7835
7836 extern long int __strtol_internal (__const char *__restrict __nptr,
7837        char **__restrict __endptr,
7838        int __base, int __group)
7839      throw () __attribute__ ((__nonnull__ (1))) ;
7840
7841
7842
7843 extern unsigned long int __strtoul_internal (__const char *__restrict __nptr,
7844           char **__restrict __endptr,
7845           int __base, int __group)
7846      throw () __attribute__ ((__nonnull__ (1))) ;
7847
7848
7849
7850
7851 __extension__
7852 extern long long int __strtoll_internal (__const char *__restrict __nptr,
7853       char **__restrict __endptr,
7854       int __base, int __group)
7855      throw () __attribute__ ((__nonnull__ (1))) ;
7856
7857
7858
7859 __extension__
7860 extern unsigned long long int __strtoull_internal (__const char *
7861          __restrict __nptr,
7862          char **__restrict __endptr,
7863          int __base, int __group)
7864      throw () __attribute__ ((__nonnull__ (1))) ;
7865 # 327 "/usr/include/gentoo-multilib/amd64/stdlib.h" 3 4
7866 extern __inline double
7867 strtod (__const char *__restrict __nptr, char **__restrict __endptr) throw ()
7868 {
7869   return __strtod_internal (__nptr, __endptr, 0);
7870 }
7871 extern __inline long int
7872 strtol (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw ()
7873
7874 {
7875   return __strtol_internal (__nptr, __endptr, __base, 0);
7876 }
7877 extern __inline unsigned long int
7878 strtoul (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw ()
7879
7880 {
7881   return __strtoul_internal (__nptr, __endptr, __base, 0);
7882 }
7883
7884
7885
7886
7887 extern __inline float
7888 strtof (__const char *__restrict __nptr, char **__restrict __endptr) throw ()
7889 {
7890   return __strtof_internal (__nptr, __endptr, 0);
7891 }
7892
7893 extern __inline long double
7894 strtold (__const char *__restrict __nptr, char **__restrict __endptr) throw ()
7895 {
7896   return __strtold_internal (__nptr, __endptr, 0);
7897 }
7898
7899
7900
7901
7902
7903 __extension__ extern __inline long long int
7904 strtoq (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw ()
7905
7906 {
7907   return __strtoll_internal (__nptr, __endptr, __base, 0);
7908 }
7909 __extension__ extern __inline unsigned long long int
7910 strtouq (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw ()
7911
7912 {
7913   return __strtoull_internal (__nptr, __endptr, __base, 0);
7914 }
7915
7916
7917
7918
7919 __extension__ extern __inline long long int
7920 strtoll (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw ()
7921
7922 {
7923   return __strtoll_internal (__nptr, __endptr, __base, 0);
7924 }
7925 __extension__ extern __inline unsigned long long int
7926 strtoull (__const char * __restrict __nptr, char **__restrict __endptr, int __base) throw ()
7927
7928 {
7929   return __strtoull_internal (__nptr, __endptr, __base, 0);
7930 }
7931
7932
7933
7934
7935 extern __inline double
7936 atof (__const char *__nptr) throw ()
7937 {
7938   return strtod (__nptr, (char **) __null);
7939 }
7940 extern __inline int
7941 atoi (__const char *__nptr) throw ()
7942 {
7943   return (int) strtol (__nptr, (char **) __null, 10);
7944 }
7945 extern __inline long int
7946 atol (__const char *__nptr) throw ()
7947 {
7948   return strtol (__nptr, (char **) __null, 10);
7949 }
7950
7951
7952
7953
7954 __extension__ extern __inline long long int
7955 atoll (__const char *__nptr) throw ()
7956 {
7957   return strtoll (__nptr, (char **) __null, 10);
7958 }
7959 # 429 "/usr/include/gentoo-multilib/amd64/stdlib.h" 3 4
7960 extern char *l64a (long int __n) throw () ;
7961
7962
7963 extern long int a64l (__const char *__s)
7964      throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
7965
7966
7967
7968
7969
7970 # 1 "/usr/include/sys/types.h" 1 3 4
7971 # 9 "/usr/include/sys/types.h" 3 4
7972 # 1 "/usr/include/gentoo-multilib/amd64/sys/types.h" 1 3 4
7973 # 27 "/usr/include/gentoo-multilib/amd64/sys/types.h" 3 4
7974
7975 # 1 "/usr/include/features.h" 1 3 4
7976 # 28 "/usr/include/gentoo-multilib/amd64/sys/types.h" 2 3 4
7977
7978 extern "C" {
7979
7980
7981 # 1 "/usr/include/bits/types.h" 1 3 4
7982 # 32 "/usr/include/gentoo-multilib/amd64/sys/types.h" 2 3 4
7983
7984
7985
7986 typedef __u_char u_char;
7987 typedef __u_short u_short;
7988 typedef __u_int u_int;
7989 typedef __u_long u_long;
7990 typedef __quad_t quad_t;
7991 typedef __u_quad_t u_quad_t;
7992 typedef __fsid_t fsid_t;
7993
7994
7995
7996
7997 typedef __loff_t loff_t;
7998
7999
8000
8001 typedef __ino_t ino_t;
8002
8003
8004
8005
8006
8007
8008 typedef __ino64_t ino64_t;
8009
8010
8011
8012
8013 typedef __dev_t dev_t;
8014
8015
8016
8017
8018 typedef __gid_t gid_t;
8019
8020
8021
8022
8023 typedef __mode_t mode_t;
8024
8025
8026
8027
8028 typedef __nlink_t nlink_t;
8029
8030
8031
8032
8033 typedef __uid_t uid_t;
8034
8035
8036
8037
8038
8039 typedef __off_t off_t;
8040
8041
8042
8043
8044
8045
8046 typedef __off64_t off64_t;
8047
8048
8049
8050
8051 typedef __pid_t pid_t;
8052
8053
8054
8055
8056 typedef __id_t id_t;
8057
8058
8059
8060
8061 typedef __ssize_t ssize_t;
8062
8063
8064
8065
8066
8067 typedef __daddr_t daddr_t;
8068 typedef __caddr_t caddr_t;
8069
8070
8071
8072
8073
8074 typedef __key_t key_t;
8075 # 133 "/usr/include/gentoo-multilib/amd64/sys/types.h" 3 4
8076
8077 # 1 "/usr/include/time.h" 1 3 4
8078 # 9 "/usr/include/time.h" 3 4
8079 # 1 "/usr/include/gentoo-multilib/amd64/time.h" 1 3 4
8080 # 57 "/usr/include/gentoo-multilib/amd64/time.h" 3 4
8081
8082 # 1 "/usr/include/bits/types.h" 1 3 4
8083 # 58 "/usr/include/gentoo-multilib/amd64/time.h" 2 3 4
8084
8085
8086
8087 typedef __clock_t clock_t;
8088 # 73 "/usr/include/gentoo-multilib/amd64/time.h" 3 4
8089
8090 # 1 "/usr/include/bits/types.h" 1 3 4
8091 # 74 "/usr/include/gentoo-multilib/amd64/time.h" 2 3 4
8092
8093
8094
8095 typedef __time_t time_t;
8096 # 90 "/usr/include/gentoo-multilib/amd64/time.h" 3 4
8097
8098 # 1 "/usr/include/bits/types.h" 1 3 4
8099 # 91 "/usr/include/gentoo-multilib/amd64/time.h" 2 3 4
8100
8101
8102 typedef __clockid_t clockid_t;
8103 # 102 "/usr/include/gentoo-multilib/amd64/time.h" 3 4
8104
8105 # 1 "/usr/include/bits/types.h" 1 3 4
8106 # 103 "/usr/include/gentoo-multilib/amd64/time.h" 2 3 4
8107
8108
8109 typedef __timer_t timer_t;
8110 # 9 "/usr/include/time.h" 2 3 4
8111 # 134 "/usr/include/gentoo-multilib/amd64/sys/types.h" 2 3 4
8112
8113
8114
8115 typedef __useconds_t useconds_t;
8116
8117
8118
8119 typedef __suseconds_t suseconds_t;
8120
8121
8122
8123
8124
8125
8126 # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4
8127 # 148 "/usr/include/gentoo-multilib/amd64/sys/types.h" 2 3 4
8128
8129
8130
8131 typedef unsigned long int ulong;
8132 typedef unsigned short int ushort;
8133 typedef unsigned int uint;
8134 # 195 "/usr/include/gentoo-multilib/amd64/sys/types.h" 3 4
8135 typedef int int8_t __attribute__ ((__mode__ (__QI__)));
8136 typedef int int16_t __attribute__ ((__mode__ (__HI__)));
8137 typedef int int32_t __attribute__ ((__mode__ (__SI__)));
8138 typedef int int64_t __attribute__ ((__mode__ (__DI__)));
8139
8140
8141 typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__)));
8142 typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__)));
8143 typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__)));
8144 typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__)));
8145
8146 typedef int register_t __attribute__ ((__mode__ (__word__)));
8147 # 217 "/usr/include/gentoo-multilib/amd64/sys/types.h" 3 4
8148
8149 # 1 "/usr/include/endian.h" 1 3 4
8150 # 218 "/usr/include/gentoo-multilib/amd64/sys/types.h" 2 3 4
8151
8152
8153
8154 # 1 "/usr/include/sys/select.h" 1 3 4
8155 # 9 "/usr/include/sys/select.h" 3 4
8156 # 1 "/usr/include/gentoo-multilib/amd64/sys/select.h" 1 3 4
8157 # 25 "/usr/include/gentoo-multilib/amd64/sys/select.h" 3 4
8158
8159 # 1 "/usr/include/features.h" 1 3 4
8160 # 26 "/usr/include/gentoo-multilib/amd64/sys/select.h" 2 3 4
8161
8162
8163
8164 # 1 "/usr/include/bits/types.h" 1 3 4
8165 # 29 "/usr/include/gentoo-multilib/amd64/sys/select.h" 2 3 4
8166
8167
8168
8169 # 1 "/usr/include/bits/select.h" 1 3 4
8170 # 9 "/usr/include/bits/select.h" 3 4
8171 # 1 "/usr/include/gentoo-multilib/amd64/bits/select.h" 1 3 4
8172 # 9 "/usr/include/bits/select.h" 2 3 4
8173 # 32 "/usr/include/gentoo-multilib/amd64/sys/select.h" 2 3 4
8174
8175
8176
8177 # 1 "/usr/include/bits/sigset.h" 1 3 4
8178 # 9 "/usr/include/bits/sigset.h" 3 4
8179 # 1 "/usr/include/gentoo-multilib/amd64/bits/sigset.h" 1 3 4
8180 # 24 "/usr/include/gentoo-multilib/amd64/bits/sigset.h" 3 4
8181 typedef int __sig_atomic_t;
8182
8183
8184
8185
8186 typedef struct
8187   {
8188     unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];
8189   } __sigset_t;
8190 # 9 "/usr/include/bits/sigset.h" 2 3 4
8191 # 35 "/usr/include/gentoo-multilib/amd64/sys/select.h" 2 3 4
8192
8193
8194
8195 typedef __sigset_t sigset_t;
8196
8197
8198
8199
8200
8201
8202 # 1 "/usr/include/time.h" 1 3 4
8203 # 9 "/usr/include/time.h" 3 4
8204 # 1 "/usr/include/gentoo-multilib/amd64/time.h" 1 3 4
8205 # 117 "/usr/include/gentoo-multilib/amd64/time.h" 3 4
8206
8207 # 1 "/usr/include/bits/types.h" 1 3 4
8208 # 118 "/usr/include/gentoo-multilib/amd64/time.h" 2 3 4
8209
8210
8211
8212 struct timespec
8213   {
8214     __time_t tv_sec;
8215     long int tv_nsec;
8216   };
8217 # 9 "/usr/include/time.h" 2 3 4
8218 # 45 "/usr/include/gentoo-multilib/amd64/sys/select.h" 2 3 4
8219
8220
8221 # 1 "/usr/include/bits/time.h" 1 3 4
8222 # 9 "/usr/include/bits/time.h" 3 4
8223 # 1 "/usr/include/gentoo-multilib/amd64/bits/time.h" 1 3 4
8224 # 65 "/usr/include/gentoo-multilib/amd64/bits/time.h" 3 4
8225
8226 # 1 "/usr/include/bits/types.h" 1 3 4
8227 # 66 "/usr/include/gentoo-multilib/amd64/bits/time.h" 2 3 4
8228
8229
8230
8231 struct timeval
8232   {
8233     __time_t tv_sec;
8234     __suseconds_t tv_usec;
8235   };
8236 # 9 "/usr/include/bits/time.h" 2 3 4
8237 # 47 "/usr/include/gentoo-multilib/amd64/sys/select.h" 2 3 4
8238 # 55 "/usr/include/gentoo-multilib/amd64/sys/select.h" 3 4
8239 typedef long int __fd_mask;
8240 # 67 "/usr/include/gentoo-multilib/amd64/sys/select.h" 3 4
8241 typedef struct
8242   {
8243
8244
8245
8246     __fd_mask fds_bits[1024 / (8 * sizeof (__fd_mask))];
8247
8248
8249
8250
8251
8252   } fd_set;
8253
8254
8255
8256
8257
8258
8259 typedef __fd_mask fd_mask;
8260 # 99 "/usr/include/gentoo-multilib/amd64/sys/select.h" 3 4
8261 extern "C" {
8262 # 109 "/usr/include/gentoo-multilib/amd64/sys/select.h" 3 4
8263 extern int select (int __nfds, fd_set *__restrict __readfds,
8264      fd_set *__restrict __writefds,
8265      fd_set *__restrict __exceptfds,
8266      struct timeval *__restrict __timeout);
8267 # 121 "/usr/include/gentoo-multilib/amd64/sys/select.h" 3 4
8268 extern int pselect (int __nfds, fd_set *__restrict __readfds,
8269       fd_set *__restrict __writefds,
8270       fd_set *__restrict __exceptfds,
8271       const struct timespec *__restrict __timeout,
8272       const __sigset_t *__restrict __sigmask);
8273
8274
8275 }
8276 # 9 "/usr/include/sys/select.h" 2 3 4
8277 # 221 "/usr/include/gentoo-multilib/amd64/sys/types.h" 2 3 4
8278
8279
8280
8281 # 1 "/usr/include/sys/sysmacros.h" 1 3 4
8282 # 9 "/usr/include/sys/sysmacros.h" 3 4
8283 # 1 "/usr/include/gentoo-multilib/amd64/sys/sysmacros.h" 1 3 4
8284 # 24 "/usr/include/gentoo-multilib/amd64/sys/sysmacros.h" 3 4
8285
8286 # 1 "/usr/include/features.h" 1 3 4
8287 # 25 "/usr/include/gentoo-multilib/amd64/sys/sysmacros.h" 2 3 4
8288
8289
8290
8291
8292
8293 __extension__
8294 extern __inline unsigned int gnu_dev_major (unsigned long long int __dev)
8295      throw ();
8296 __extension__
8297 extern __inline unsigned int gnu_dev_minor (unsigned long long int __dev)
8298      throw ();
8299 __extension__
8300 extern __inline unsigned long long int gnu_dev_makedev (unsigned int __major,
8301        unsigned int __minor)
8302      throw ();
8303
8304
8305 __extension__ extern __inline unsigned int
8306 gnu_dev_major (unsigned long long int __dev) throw ()
8307 {
8308   return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff);
8309 }
8310
8311 __extension__ extern __inline unsigned int
8312 gnu_dev_minor (unsigned long long int __dev) throw ()
8313 {
8314   return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff);
8315 }
8316
8317 __extension__ extern __inline unsigned long long int
8318 gnu_dev_makedev (unsigned int __major, unsigned int __minor) throw ()
8319 {
8320   return ((__minor & 0xff) | ((__major & 0xfff) << 8)
8321    | (((unsigned long long int) (__minor & ~0xff)) << 12)
8322    | (((unsigned long long int) (__major & ~0xfff)) << 32));
8323 }
8324 # 9 "/usr/include/sys/sysmacros.h" 2 3 4
8325 # 224 "/usr/include/gentoo-multilib/amd64/sys/types.h" 2 3 4
8326
8327
8328
8329
8330 typedef __blksize_t blksize_t;
8331
8332
8333
8334
8335
8336
8337 typedef __blkcnt_t blkcnt_t;
8338
8339
8340
8341 typedef __fsblkcnt_t fsblkcnt_t;
8342
8343
8344
8345 typedef __fsfilcnt_t fsfilcnt_t;
8346 # 262 "/usr/include/gentoo-multilib/amd64/sys/types.h" 3 4
8347 typedef __blkcnt64_t blkcnt64_t;
8348 typedef __fsblkcnt64_t fsblkcnt64_t;
8349 typedef __fsfilcnt64_t fsfilcnt64_t;
8350
8351
8352
8353
8354
8355
8356 # 1 "/usr/include/bits/pthreadtypes.h" 1 3 4
8357 # 9 "/usr/include/bits/pthreadtypes.h" 3 4
8358 # 1 "/usr/include/gentoo-multilib/amd64/bits/pthreadtypes.h" 1 3 4
8359 # 23 "/usr/include/gentoo-multilib/amd64/bits/pthreadtypes.h" 3 4
8360
8361 # 1 "/usr/include/bits/wordsize.h" 1 3 4
8362 # 9 "/usr/include/bits/wordsize.h" 3 4
8363 # 1 "/usr/include/gentoo-multilib/amd64/bits/wordsize.h" 1 3 4
8364 # 9 "/usr/include/bits/wordsize.h" 2 3 4
8365 # 24 "/usr/include/gentoo-multilib/amd64/bits/pthreadtypes.h" 2 3 4
8366 # 50 "/usr/include/gentoo-multilib/amd64/bits/pthreadtypes.h" 3 4
8367 typedef unsigned long int pthread_t;
8368
8369
8370 typedef union
8371 {
8372   char __size[56];
8373   long int __align;
8374 } pthread_attr_t;
8375
8376
8377
8378 typedef struct __pthread_internal_list
8379 {
8380   struct __pthread_internal_list *__prev;
8381   struct __pthread_internal_list *__next;
8382 } __pthread_list_t;
8383 # 76 "/usr/include/gentoo-multilib/amd64/bits/pthreadtypes.h" 3 4
8384 typedef union
8385 {
8386   struct __pthread_mutex_s
8387   {
8388     int __lock;
8389     unsigned int __count;
8390     int __owner;
8391
8392     unsigned int __nusers;
8393
8394
8395
8396     int __kind;
8397
8398     int __spins;
8399     __pthread_list_t __list;
8400 # 101 "/usr/include/gentoo-multilib/amd64/bits/pthreadtypes.h" 3 4
8401   } __data;
8402   char __size[40];
8403   long int __align;
8404 } pthread_mutex_t;
8405
8406 typedef union
8407 {
8408   char __size[4];
8409   int __align;
8410 } pthread_mutexattr_t;
8411
8412
8413
8414
8415 typedef union
8416 {
8417   struct
8418   {
8419     int __lock;
8420     unsigned int __futex;
8421     __extension__ unsigned long long int __total_seq;
8422     __extension__ unsigned long long int __wakeup_seq;
8423     __extension__ unsigned long long int __woken_seq;
8424     void *__mutex;
8425     unsigned int __nwaiters;
8426     unsigned int __broadcast_seq;
8427   } __data;
8428   char __size[48];
8429   __extension__ long long int __align;
8430 } pthread_cond_t;
8431
8432 typedef union
8433 {
8434   char __size[4];
8435   int __align;
8436 } pthread_condattr_t;
8437
8438
8439
8440 typedef unsigned int pthread_key_t;
8441
8442
8443
8444 typedef int pthread_once_t;
8445
8446
8447
8448
8449
8450 typedef union
8451 {
8452
8453   struct
8454   {
8455     int __lock;
8456     unsigned int __nr_readers;
8457     unsigned int __readers_wakeup;
8458     unsigned int __writer_wakeup;
8459     unsigned int __nr_readers_queued;
8460     unsigned int __nr_writers_queued;
8461     int __writer;
8462     int __pad1;
8463     unsigned long int __pad2;
8464     unsigned long int __pad3;
8465
8466
8467     unsigned int __flags;
8468   } __data;
8469 # 184 "/usr/include/gentoo-multilib/amd64/bits/pthreadtypes.h" 3 4
8470   char __size[56];
8471   long int __align;
8472 } pthread_rwlock_t;
8473
8474 typedef union
8475 {
8476   char __size[8];
8477   long int __align;
8478 } pthread_rwlockattr_t;
8479
8480
8481
8482
8483
8484 typedef volatile int pthread_spinlock_t;
8485
8486
8487
8488
8489 typedef union
8490 {
8491   char __size[32];
8492   long int __align;
8493 } pthread_barrier_t;
8494
8495 typedef union
8496 {
8497   char __size[4];
8498   int __align;
8499 } pthread_barrierattr_t;
8500 # 9 "/usr/include/bits/pthreadtypes.h" 2 3 4
8501 # 271 "/usr/include/gentoo-multilib/amd64/sys/types.h" 2 3 4
8502
8503
8504 }
8505 # 9 "/usr/include/sys/types.h" 2 3 4
8506 # 439 "/usr/include/gentoo-multilib/amd64/stdlib.h" 2 3 4
8507
8508
8509
8510
8511
8512
8513 extern long int random (void) throw ();
8514
8515
8516 extern void srandom (unsigned int __seed) throw ();
8517
8518
8519
8520
8521
8522 extern char *initstate (unsigned int __seed, char *__statebuf,
8523    size_t __statelen) throw () __attribute__ ((__nonnull__ (2)));
8524
8525
8526
8527 extern char *setstate (char *__statebuf) throw () __attribute__ ((__nonnull__ (1)));
8528
8529
8530
8531
8532
8533
8534
8535 struct random_data
8536   {
8537     int32_t *fptr;
8538     int32_t *rptr;
8539     int32_t *state;
8540     int rand_type;
8541     int rand_deg;
8542     int rand_sep;
8543     int32_t *end_ptr;
8544   };
8545
8546 extern int random_r (struct random_data *__restrict __buf,
8547        int32_t *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2)));
8548
8549 extern int srandom_r (unsigned int __seed, struct random_data *__buf)
8550      throw () __attribute__ ((__nonnull__ (2)));
8551
8552 extern int initstate_r (unsigned int __seed, char *__restrict __statebuf,
8553    size_t __statelen,
8554    struct random_data *__restrict __buf)
8555      throw () __attribute__ ((__nonnull__ (2, 4)));
8556
8557 extern int setstate_r (char *__restrict __statebuf,
8558          struct random_data *__restrict __buf)
8559      throw () __attribute__ ((__nonnull__ (1, 2)));
8560
8561
8562
8563
8564
8565
8566 extern int rand (void) throw ();
8567
8568 extern void srand (unsigned int __seed) throw ();
8569
8570
8571
8572
8573 extern int rand_r (unsigned int *__seed) throw ();
8574
8575
8576
8577
8578
8579
8580
8581 extern double drand48 (void) throw ();
8582 extern double erand48 (unsigned short int __xsubi[3]) throw () __attribute__ ((__nonnull__ (1)));
8583
8584
8585 extern long int lrand48 (void) throw ();
8586 extern long int nrand48 (unsigned short int __xsubi[3])
8587      throw () __attribute__ ((__nonnull__ (1)));
8588
8589
8590 extern long int mrand48 (void) throw ();
8591 extern long int jrand48 (unsigned short int __xsubi[3])
8592      throw () __attribute__ ((__nonnull__ (1)));
8593
8594
8595 extern void srand48 (long int __seedval) throw ();
8596 extern unsigned short int *seed48 (unsigned short int __seed16v[3])
8597      throw () __attribute__ ((__nonnull__ (1)));
8598 extern void lcong48 (unsigned short int __param[7]) throw () __attribute__ ((__nonnull__ (1)));
8599
8600
8601
8602
8603
8604 struct drand48_data
8605   {
8606     unsigned short int __x[3];
8607     unsigned short int __old_x[3];
8608     unsigned short int __c;
8609     unsigned short int __init;
8610     unsigned long long int __a;
8611   };
8612
8613
8614 extern int drand48_r (struct drand48_data *__restrict __buffer,
8615         double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2)));
8616 extern int erand48_r (unsigned short int __xsubi[3],
8617         struct drand48_data *__restrict __buffer,
8618         double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2)));
8619
8620
8621 extern int lrand48_r (struct drand48_data *__restrict __buffer,
8622         long int *__restrict __result)
8623      throw () __attribute__ ((__nonnull__ (1, 2)));
8624 extern int nrand48_r (unsigned short int __xsubi[3],
8625         struct drand48_data *__restrict __buffer,
8626         long int *__restrict __result)
8627      throw () __attribute__ ((__nonnull__ (1, 2)));
8628
8629
8630 extern int mrand48_r (struct drand48_data *__restrict __buffer,
8631         long int *__restrict __result)
8632      throw () __attribute__ ((__nonnull__ (1, 2)));
8633 extern int jrand48_r (unsigned short int __xsubi[3],
8634         struct drand48_data *__restrict __buffer,
8635         long int *__restrict __result)
8636      throw () __attribute__ ((__nonnull__ (1, 2)));
8637
8638
8639 extern int srand48_r (long int __seedval, struct drand48_data *__buffer)
8640      throw () __attribute__ ((__nonnull__ (2)));
8641
8642 extern int seed48_r (unsigned short int __seed16v[3],
8643        struct drand48_data *__buffer) throw () __attribute__ ((__nonnull__ (1, 2)));
8644
8645 extern int lcong48_r (unsigned short int __param[7],
8646         struct drand48_data *__buffer)
8647      throw () __attribute__ ((__nonnull__ (1, 2)));
8648 # 589 "/usr/include/gentoo-multilib/amd64/stdlib.h" 3 4
8649 extern void *malloc (size_t __size) throw () __attribute__ ((__malloc__)) ;
8650
8651 extern void *calloc (size_t __nmemb, size_t __size)
8652      throw () __attribute__ ((__malloc__)) ;
8653
8654
8655
8656
8657
8658
8659
8660 extern void *realloc (void *__ptr, size_t __size)
8661      throw () __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__));
8662
8663 extern void free (void *__ptr) throw ();
8664
8665
8666
8667
8668 extern void cfree (void *__ptr) throw ();
8669
8670
8671
8672
8673 # 1 "/usr/include/alloca.h" 1 3 4
8674 # 9 "/usr/include/alloca.h" 3 4
8675 # 1 "/usr/include/gentoo-multilib/amd64/alloca.h" 1 3 4
8676 # 22 "/usr/include/gentoo-multilib/amd64/alloca.h" 3 4
8677
8678 # 1 "/usr/include/features.h" 1 3 4
8679 # 23 "/usr/include/gentoo-multilib/amd64/alloca.h" 2 3 4
8680
8681
8682
8683 # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4
8684 # 26 "/usr/include/gentoo-multilib/amd64/alloca.h" 2 3 4
8685
8686 extern "C" {
8687
8688
8689
8690
8691
8692 extern void *alloca (size_t __size) throw ();
8693
8694
8695
8696
8697
8698 }
8699 # 9 "/usr/include/alloca.h" 2 3 4
8700 # 613 "/usr/include/gentoo-multilib/amd64/stdlib.h" 2 3 4
8701
8702
8703
8704
8705 extern void *valloc (size_t __size) throw () __attribute__ ((__malloc__)) ;
8706
8707
8708
8709
8710 extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size)
8711      throw () __attribute__ ((__nonnull__ (1))) ;
8712
8713
8714
8715
8716 extern void abort (void) throw () __attribute__ ((__noreturn__));
8717
8718
8719
8720 extern int atexit (void (*__func) (void)) throw () __attribute__ ((__nonnull__ (1)));
8721
8722
8723
8724
8725
8726 extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg)
8727      throw () __attribute__ ((__nonnull__ (1)));
8728
8729
8730
8731
8732
8733
8734 extern void exit (int __status) throw () __attribute__ ((__noreturn__));
8735
8736
8737
8738
8739
8740
8741 extern void _Exit (int __status) throw () __attribute__ ((__noreturn__));
8742
8743
8744
8745
8746
8747
8748 extern char *getenv (__const char *__name) throw () __attribute__ ((__nonnull__ (1))) ;
8749
8750
8751
8752
8753 extern char *__secure_getenv (__const char *__name)
8754      throw () __attribute__ ((__nonnull__ (1))) ;
8755
8756
8757
8758
8759
8760 extern int putenv (char *__string) throw () __attribute__ ((__nonnull__ (1)));
8761
8762
8763
8764
8765
8766 extern int setenv (__const char *__name, __const char *__value, int __replace)
8767      throw () __attribute__ ((__nonnull__ (2)));
8768
8769
8770 extern int unsetenv (__const char *__name) throw ();
8771
8772
8773
8774
8775
8776
8777 extern int clearenv (void) throw ();
8778 # 698 "/usr/include/gentoo-multilib/amd64/stdlib.h" 3 4
8779 extern char *mktemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) ;
8780 # 709 "/usr/include/gentoo-multilib/amd64/stdlib.h" 3 4
8781 extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) ;
8782 # 719 "/usr/include/gentoo-multilib/amd64/stdlib.h" 3 4
8783 extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) ;
8784 # 729 "/usr/include/gentoo-multilib/amd64/stdlib.h" 3 4
8785 extern char *mkdtemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) ;
8786 # 738 "/usr/include/gentoo-multilib/amd64/stdlib.h" 3 4
8787 extern int system (__const char *__command) ;
8788
8789
8790
8791
8792
8793
8794 extern char *canonicalize_file_name (__const char *__name)
8795      throw () __attribute__ ((__nonnull__ (1))) ;
8796 # 755 "/usr/include/gentoo-multilib/amd64/stdlib.h" 3 4
8797 extern char *realpath (__const char *__restrict __name,
8798          char *__restrict __resolved) throw () ;
8799
8800
8801
8802
8803
8804
8805 typedef int (*__compar_fn_t) (__const void *, __const void *);
8806
8807
8808 typedef __compar_fn_t comparison_fn_t;
8809
8810
8811
8812
8813
8814
8815 extern void *bsearch (__const void *__key, __const void *__base,
8816         size_t __nmemb, size_t __size, __compar_fn_t __compar)
8817      __attribute__ ((__nonnull__ (1, 2, 5))) ;
8818
8819
8820
8821 extern void qsort (void *__base, size_t __nmemb, size_t __size,
8822      __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4)));
8823
8824
8825
8826 extern int abs (int __x) throw () __attribute__ ((__const__)) ;
8827 extern long int labs (long int __x) throw () __attribute__ ((__const__)) ;
8828
8829
8830
8831 __extension__ extern long long int llabs (long long int __x)
8832      throw () __attribute__ ((__const__)) ;
8833
8834
8835
8836
8837
8838
8839
8840 extern div_t div (int __numer, int __denom)
8841      throw () __attribute__ ((__const__)) ;
8842 extern ldiv_t ldiv (long int __numer, long int __denom)
8843      throw () __attribute__ ((__const__)) ;
8844
8845
8846
8847
8848 __extension__ extern lldiv_t lldiv (long long int __numer,
8849         long long int __denom)
8850      throw () __attribute__ ((__const__)) ;
8851 # 820 "/usr/include/gentoo-multilib/amd64/stdlib.h" 3 4
8852 extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt,
8853      int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) ;
8854
8855
8856
8857
8858 extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt,
8859      int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) ;
8860
8861
8862
8863
8864 extern char *gcvt (double __value, int __ndigit, char *__buf)
8865      throw () __attribute__ ((__nonnull__ (3))) ;
8866
8867
8868
8869
8870 extern char *qecvt (long double __value, int __ndigit,
8871       int *__restrict __decpt, int *__restrict __sign)
8872      throw () __attribute__ ((__nonnull__ (3, 4))) ;
8873 extern char *qfcvt (long double __value, int __ndigit,
8874       int *__restrict __decpt, int *__restrict __sign)
8875      throw () __attribute__ ((__nonnull__ (3, 4))) ;
8876 extern char *qgcvt (long double __value, int __ndigit, char *__buf)
8877      throw () __attribute__ ((__nonnull__ (3))) ;
8878
8879
8880
8881
8882 extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt,
8883      int *__restrict __sign, char *__restrict __buf,
8884      size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5)));
8885 extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
8886      int *__restrict __sign, char *__restrict __buf,
8887      size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5)));
8888
8889 extern int qecvt_r (long double __value, int __ndigit,
8890       int *__restrict __decpt, int *__restrict __sign,
8891       char *__restrict __buf, size_t __len)
8892      throw () __attribute__ ((__nonnull__ (3, 4, 5)));
8893 extern int qfcvt_r (long double __value, int __ndigit,
8894       int *__restrict __decpt, int *__restrict __sign,
8895       char *__restrict __buf, size_t __len)
8896      throw () __attribute__ ((__nonnull__ (3, 4, 5)));
8897
8898
8899
8900
8901
8902
8903
8904 extern int mblen (__const char *__s, size_t __n) throw () ;
8905
8906
8907 extern int mbtowc (wchar_t *__restrict __pwc,
8908      __const char *__restrict __s, size_t __n) throw () ;
8909
8910
8911 extern int wctomb (char *__s, wchar_t __wchar) throw () ;
8912
8913
8914
8915 extern size_t mbstowcs (wchar_t *__restrict __pwcs,
8916    __const char *__restrict __s, size_t __n) throw ();
8917
8918 extern size_t wcstombs (char *__restrict __s,
8919    __const wchar_t *__restrict __pwcs, size_t __n)
8920      throw ();
8921 # 897 "/usr/include/gentoo-multilib/amd64/stdlib.h" 3 4
8922 extern int rpmatch (__const char *__response) throw () __attribute__ ((__nonnull__ (1))) ;
8923 # 908 "/usr/include/gentoo-multilib/amd64/stdlib.h" 3 4
8924 extern int getsubopt (char **__restrict __optionp,
8925         char *__const *__restrict __tokens,
8926         char **__restrict __valuep)
8927      throw () __attribute__ ((__nonnull__ (1, 2, 3))) ;
8928
8929
8930
8931
8932
8933 extern void setkey (__const char *__key) throw () __attribute__ ((__nonnull__ (1)));
8934
8935
8936
8937
8938
8939
8940
8941 extern int posix_openpt (int __oflag) ;
8942
8943
8944
8945
8946
8947
8948
8949 extern int grantpt (int __fd) throw ();
8950
8951
8952
8953 extern int unlockpt (int __fd) throw ();
8954
8955
8956
8957
8958 extern char *ptsname (int __fd) throw () ;
8959
8960
8961
8962
8963
8964
8965 extern int ptsname_r (int __fd, char *__buf, size_t __buflen)
8966      throw () __attribute__ ((__nonnull__ (2)));
8967
8968
8969 extern int getpt (void);
8970
8971
8972
8973
8974
8975
8976 extern int getloadavg (double __loadavg[], int __nelem)
8977      throw () __attribute__ ((__nonnull__ (1)));
8978 # 976 "/usr/include/gentoo-multilib/amd64/stdlib.h" 3 4
8979 }
8980 # 9 "/usr/include/stdlib.h" 2 3 4
8981 # 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
8982
8983 # 1 "/usr/include/string.h" 1 3 4
8984 # 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
8985
8986
8987
8988 typedef QtValidLicenseForCoreModule QtCoreModule;
8989
8990 struct QVectorData
8991 {
8992     QBasicAtomic ref;
8993     int alloc;
8994     int size;
8995
8996
8997
8998
8999
9000     uint sharable : 1;
9001     uint capacity : 1;
9002
9003
9004     static QVectorData shared_null;
9005     static QVectorData *malloc(int sizeofTypedData, int size, int sizeofT, QVectorData *init);
9006     static int grow(int sizeofTypedData, int size, int sizeofT, bool excessive);
9007 };
9008
9009 template <typename T>
9010 struct QVectorTypedData
9011 {
9012     QBasicAtomic ref;
9013     int alloc;
9014     int size;
9015
9016
9017
9018
9019
9020     uint sharable : 1;
9021     uint capacity : 1;
9022
9023     T array[1];
9024 };
9025
9026 template <typename T>
9027 class QVector
9028 {
9029     typedef QVectorTypedData<T> Data;
9030     union { QVectorData *p; QVectorTypedData<T> *d; };
9031
9032 public:
9033     inline QVector() : p(&QVectorData::shared_null) { d->ref.ref(); }
9034     explicit QVector(int size);
9035     QVector(int size, const T &t);
9036     inline QVector(const QVector<T> &v) : d(v.d) { d->ref.ref(); if (!d->sharable) detach_helper(); }
9037     inline ~QVector() { if (!d) return; if (!d->ref.deref()) free(d); }
9038     QVector<T> &operator=(const QVector<T> &v);
9039     bool operator==(const QVector<T> &v) const;
9040     inline bool operator!=(const QVector<T> &v) const { return !(*this == v); }
9041
9042     inline int size() const { return d->size; }
9043
9044     inline bool isEmpty() const { return d->size == 0; }
9045
9046     void resize(int size);
9047
9048     inline int capacity() const { return d->alloc; }
9049     void reserve(int size);
9050     inline void squeeze() { realloc(d->size, d->size); d->capacity = 0; }
9051
9052     inline void detach() { if (d->ref != 1) detach_helper(); }
9053     inline bool isDetached() const { return d->ref == 1; }
9054     inline void setSharable(bool sharable) { if (!sharable) detach(); d->sharable = sharable; }
9055
9056     inline T *data() { detach(); return d->array; }
9057     inline const T *data() const { return d->array; }
9058     inline const T *constData() const { return d->array; }
9059     void clear();
9060
9061     const T &at(int i) const;
9062     T &operator[](int i);
9063     const T &operator[](int i) const;
9064     void append(const T &t);
9065     void prepend(const T &t);
9066     void insert(int i, const T &t);
9067     void insert(int i, int n, const T &t);
9068     void replace(int i, const T &t);
9069     void remove(int i);
9070     void remove(int i, int n);
9071
9072     QVector<T> &fill(const T &t, int size = -1);
9073
9074     int indexOf(const T &t, int from = 0) const;
9075     int lastIndexOf(const T &t, int from = -1) const;
9076     bool contains(const T &t) const;
9077     int count(const T &t) const;
9078 # 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"
9079     typedef T* iterator;
9080     typedef const T* const_iterator;
9081
9082     inline iterator begin() { detach(); return d->array; }
9083     inline const_iterator begin() const { return d->array; }
9084     inline const_iterator constBegin() const { return d->array; }
9085     inline iterator end() { detach(); return d->array + d->size; }
9086     inline const_iterator end() const { return d->array + d->size; }
9087     inline const_iterator constEnd() const { return d->array + d->size; }
9088     iterator insert(iterator before, int n, const T &x);
9089     inline iterator insert(iterator before, const T &x) { return insert(before, 1, x); }
9090     iterator erase(iterator begin, iterator end);
9091     inline iterator erase(iterator pos) { return erase(pos, pos+1); }
9092
9093
9094     inline int count() const { return d->size; }
9095     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(); }
9096     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(); }
9097     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); }
9098     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); }
9099     QVector<T> mid(int pos, int length = -1) const;
9100
9101     T value(int i) const;
9102     T value(int i, const T &defaultValue) const;
9103
9104
9105     typedef T value_type;
9106     typedef value_type* pointer;
9107     typedef const value_type* const_pointer;
9108     typedef value_type& reference;
9109     typedef const value_type& const_reference;
9110
9111
9112
9113     typedef int difference_type;
9114
9115     typedef iterator Iterator;
9116     typedef const_iterator ConstIterator;
9117     typedef int size_type;
9118     inline void push_back(const T &t) { append(t); }
9119     inline void push_front(const T &t) { prepend(t); }
9120     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); }
9121     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()); }
9122     inline bool empty() const
9123     { return d->size == 0; }
9124     inline T& front() { return first(); }
9125     inline const_reference front() const { return first(); }
9126     inline reference back() { return last(); }
9127     inline const_reference back() const { return last(); }
9128
9129
9130     QVector<T> &operator+=(const QVector<T> &l);
9131     inline QVector<T> operator+(const QVector<T> &l) const
9132     { QVector n = *this; n += l; return n; }
9133     inline QVector<T> &operator+=(const T &t)
9134     { append(t); return *this; }
9135     inline QVector<T> &operator<< (const T &t)
9136     { append(t); return *this; }
9137     inline QVector<T> &operator<<(const QVector<T> &l)
9138     { *this += l; return *this; }
9139
9140     QList<T> toList() const;
9141
9142     static QVector<T> fromList(const QList<T> &list);
9143 # 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"
9144 private:
9145     void detach_helper();
9146     QVectorData *malloc(int alloc);
9147     void realloc(int size, int alloc);
9148     void free(Data *d);
9149 };
9150
9151 template <typename T>
9152 void QVector<T>::detach_helper()
9153 { realloc(d->size, d->alloc); }
9154 template <typename T>
9155 void QVector<T>::reserve(int asize)
9156 { if (asize > d->alloc) realloc(d->size, asize); d->capacity = 1; }
9157 template <typename T>
9158 void QVector<T>::resize(int asize)
9159 { realloc(asize, (asize > d->alloc || (!d->capacity && asize < d->size && asize < (d->alloc >> 1))) ?
9160           QVectorData::grow(sizeof(Data), asize, sizeof(T), QTypeInfo<T>::isStatic)
9161           : d->alloc); }
9162 template <typename T>
9163 inline void QVector<T>::clear()
9164 { *this = QVector<T>(); }
9165 template <typename T>
9166 inline const T &QVector<T>::at(int i) const
9167 { 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);
9168   return d->array[i]; }
9169 template <typename T>
9170 inline const T &QVector<T>::operator[](int i) const
9171 { 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);
9172   return d->array[i]; }
9173 template <typename T>
9174 inline T &QVector<T>::operator[](int i)
9175 { 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);
9176   return data()[i]; }
9177 template <typename T>
9178 inline void QVector<T>::insert(int i, const T &t)
9179 { 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);
9180   insert(begin() + i, 1, t); }
9181 template <typename T>
9182 inline void QVector<T>::insert(int i, int n, const T &t)
9183 { 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);
9184   insert(begin() + i, n, t); }
9185 template <typename T>
9186 inline void QVector<T>::remove(int i, int n)
9187 { 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);
9188   erase(begin() + i, begin() + i + n); }
9189 template <typename T>
9190 inline void QVector<T>::remove(int i)
9191 { 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);
9192   erase(begin() + i, begin() + i + 1); }
9193 template <typename T>
9194 inline void QVector<T>::prepend(const T &t)
9195 { insert(begin(), 1, t); }
9196
9197 template <typename T>
9198 inline void QVector<T>::replace(int i, const T &t)
9199 {
9200     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);
9201     const T copy(t);
9202     data()[i] = copy;
9203 }
9204
9205 template <typename T>
9206 QVector<T> &QVector<T>::operator=(const QVector<T> &v)
9207 {
9208     typename QVector::Data *x = v.d;
9209     x->ref.ref();
9210     x = qAtomicSetPtr(&d, x);
9211     if (!x->ref.deref())
9212         free(x);
9213     if (!d->sharable)
9214         detach_helper();
9215     return *this;
9216 }
9217
9218 template <typename T>
9219 inline QVectorData *QVector<T>::malloc(int aalloc)
9220 {
9221     return static_cast<QVectorData *>(qMalloc(sizeof(Data) + (aalloc - 1) * sizeof(T)));
9222 }
9223
9224 template <typename T>
9225 QVector<T>::QVector(int asize)
9226 {
9227     p = malloc(asize);
9228     d->ref.init(1);
9229     d->alloc = d->size = asize;
9230     d->sharable = true;
9231     d->capacity = false;
9232     if (QTypeInfo<T>::isComplex) {
9233         T* b = d->array;
9234         T* i = d->array + d->size;
9235         while (i != b)
9236             new (--i) T;
9237     } else {
9238         qMemSet(d->array, 0, asize * sizeof(T));
9239     }
9240 }
9241
9242 template <typename T>
9243 QVector<T>::QVector(int asize, const T &t)
9244 {
9245     p = malloc(asize);
9246     d->ref.init(1);
9247     d->alloc = d->size = asize;
9248     d->sharable = true;
9249     d->capacity = false;
9250     T* i = d->array + d->size;
9251     while (i != d->array)
9252         new (--i) T(t);
9253 }
9254
9255 template <typename T>
9256 void QVector<T>::free(Data *x)
9257 {
9258     if (QTypeInfo<T>::isComplex) {
9259         T* b = x->array;
9260         T* i = b + x->size;
9261         while (i-- != b)
9262              i->~T();
9263     }
9264     qFree(x);
9265 }
9266
9267 template <typename T>
9268 void QVector<T>::realloc(int asize, int aalloc)
9269 {
9270     T *j, *i, *b;
9271     union { QVectorData *p; Data *d; } x;
9272     x.d = d;
9273
9274     if (QTypeInfo<T>::isComplex && aalloc == d->alloc && d->ref == 1) {
9275
9276         i = d->array + d->size;
9277         j = d->array + asize;
9278         if (i > j) {
9279             while (i-- != j)
9280                 i->~T();
9281         } else {
9282             while (j-- != i)
9283                 new (j) T;
9284         }
9285         d->size = asize;
9286         return;
9287     }
9288
9289     if (aalloc != d->alloc || d->ref != 1) {
9290
9291
9292         if (QTypeInfo<T>::isStatic) {
9293             x.p = malloc(aalloc);
9294         } else if (d->ref != 1) {
9295             x.p = QVectorData::malloc(sizeof(Data), aalloc, sizeof(T), p);
9296         } else {
9297             if (QTypeInfo<T>::isComplex) {
9298
9299
9300                 if (asize < d->size) {
9301                     j = d->array + asize;
9302                     i = d->array + d->size;
9303                     while (i-- != j)
9304                         i->~T();
9305                     i = d->array + asize;
9306                 }
9307             }
9308             x.p = p = static_cast<QVectorData *>(qRealloc(p, sizeof(Data) + (aalloc - 1) * sizeof(T)));
9309         }
9310         x.d->ref.init(1);
9311         x.d->sharable = true;
9312         x.d->capacity = d->capacity;
9313
9314     }
9315     if (QTypeInfo<T>::isComplex) {
9316         if (asize < d->size) {
9317             j = d->array + asize;
9318             i = x.d->array + asize;
9319         } else {
9320
9321             i = x.d->array + asize;
9322             j = x.d->array + d->size;
9323             while (i != j)
9324                 new (--i) T;
9325             j = d->array + d->size;
9326         }
9327         if (i != j) {
9328
9329             b = x.d->array;
9330             while (i != b)
9331                 new (--i) T(*--j);
9332         }
9333     } else if (asize > d->size) {
9334
9335         qMemSet(x.d->array + d->size, 0, (asize - d->size) * sizeof(T));
9336     }
9337     x.d->size = asize;
9338     x.d->alloc = aalloc;
9339     if (d != x.d) {
9340         x.d = qAtomicSetPtr(&d, x.d);
9341         if (!x.d->ref.deref())
9342             free(x.d);
9343     }
9344 }
9345
9346 template<typename T>
9347  T QVector<T>::value(int i) const
9348 {
9349     if (i < 0 || i >= p->size) {
9350         return T();
9351     }
9352     return d->array[i];
9353 }
9354 template<typename T>
9355  T QVector<T>::value(int i, const T &defaultValue) const
9356 {
9357     return ((i < 0 || i >= p->size) ? defaultValue : d->array[i]);
9358 }
9359
9360 template <typename T>
9361 void QVector<T>::append(const T &t)
9362 {
9363     if (d->ref != 1 || d->size + 1 > d->alloc) {
9364         const T copy(t);
9365         realloc(d->size, QVectorData::grow(sizeof(Data), d->size + 1, sizeof(T),
9366                                            QTypeInfo<T>::isStatic));
9367         if (QTypeInfo<T>::isComplex)
9368             new (d->array + d->size) T(copy);
9369         else
9370             d->array[d->size] = copy;
9371     } else {
9372         if (QTypeInfo<T>::isComplex)
9373             new (d->array + d->size) T(t);
9374         else
9375             d->array[d->size] = t;
9376     }
9377     ++d->size;
9378 }
9379
9380 template <typename T>
9381 typename QVector<T>::iterator QVector<T>::insert(iterator before, size_type n, const T &t)
9382 {
9383     int offset = before - d->array;
9384     if (n != 0) {
9385         const T copy(t);
9386         if (d->ref != 1 || d->size + n > d->alloc)
9387             realloc(d->size, QVectorData::grow(sizeof(Data), d->size + n, sizeof(T),
9388                                                QTypeInfo<T>::isStatic));
9389         if (QTypeInfo<T>::isStatic) {
9390             T *b = d->array + d->size;
9391             T *i = d->array + d->size + n;
9392             while (i != b)
9393                 new (--i) T;
9394             i = d->array + d->size;
9395             T *j = i + n;
9396             b = d->array + offset;
9397             while (i != b)
9398                 *--j = *--i;
9399             i = b+n;
9400             while (i != b)
9401                 *--i = copy;
9402         } else {
9403             T *b = d->array + offset;
9404             T *i = b + n;
9405             memmove(i, b, (d->size - offset) * sizeof(T));
9406             while (i != b)
9407                 new (--i) T(copy);
9408         }
9409         d->size += n;
9410     }
9411     return d->array + offset;
9412 }
9413
9414 template <typename T>
9415 typename QVector<T>::iterator QVector<T>::erase(iterator abegin, iterator aend)
9416 {
9417     int f = abegin - d->array;
9418     int l = aend - d->array;
9419     int n = l - f;
9420     detach();
9421     if (QTypeInfo<T>::isComplex) {
9422         qCopy(d->array+l, d->array+d->size, d->array+f);
9423         T *i = d->array+d->size;
9424         T* b = d->array+d->size-n;
9425         while (i != b) {
9426             --i;
9427             i->~T();
9428         }
9429     } else {
9430         memmove(d->array + f, d->array + l, (d->size-l)*sizeof(T));
9431     }
9432     d->size -= n;
9433     return d->array + f;
9434 }
9435
9436 template <typename T>
9437 bool QVector<T>::operator==(const QVector<T> &v) const
9438 {
9439     if (d->size != v.d->size)
9440         return false;
9441     if (d == v.d)
9442         return true;
9443     T* b = d->array;
9444     T* i = b + d->size;
9445     T* j = v.d->array + d->size;
9446     while (i != b)
9447         if (!(*--i == *--j))
9448             return false;
9449     return true;
9450 }
9451
9452 template <typename T>
9453 QVector<T> &QVector<T>::fill(const T &from, int asize)
9454 {
9455     const T copy(from);
9456     resize(asize < 0 ? d->size : asize);
9457     if (d->size) {
9458         T *i = d->array + d->size;
9459         T *b = d->array;
9460         while (i != b)
9461             *--i = copy;
9462     }
9463     return *this;
9464 }
9465
9466 template <typename T>
9467 QVector<T> &QVector<T>::operator+=(const QVector &l)
9468 {
9469     int newSize = d->size + l.d->size;
9470     realloc(d->size, newSize);
9471
9472     T *w = d->array + newSize;
9473     T *i = l.d->array + l.d->size;
9474     T *b = l.d->array;
9475     while (i != b) {
9476         if (QTypeInfo<T>::isComplex)
9477             new (--w) T(*--i);
9478         else
9479             *--w = *--i;
9480     }
9481     d->size = newSize;
9482     return *this;
9483 }
9484
9485 template <typename T>
9486 int QVector<T>::indexOf(const T &t, int from) const
9487 {
9488     if (from < 0)
9489         from = qMax(from + d->size, 0);
9490     if (from < d->size) {
9491         T* n = d->array + from - 1;
9492         T* e = d->array + d->size;
9493         while (++n != e)
9494             if (*n == t)
9495                 return n - d->array;
9496     }
9497     return -1;
9498 }
9499
9500 template <typename T>
9501 int QVector<T>::lastIndexOf(const T &t, int from) const
9502 {
9503     if (from < 0)
9504         from += d->size;
9505     else if (from >= d->size)
9506         from = d->size-1;
9507     if (from >= 0) {
9508         T* b = d->array;
9509         T* n = d->array + from + 1;
9510         while (n != b) {
9511             if (*--n == t)
9512                 return n - b;
9513         }
9514     }
9515     return -1;
9516 }
9517
9518 template <typename T>
9519 bool QVector<T>::contains(const T &t) const
9520 {
9521     T* b = d->array;
9522     T* i = d->array + d->size;
9523     while (i != b)
9524         if (*--i == t)
9525             return true;
9526     return false;
9527 }
9528
9529 template <typename T>
9530 int QVector<T>::count(const T &t) const
9531 {
9532     int c = 0;
9533     T* b = d->array;
9534     T* i = d->array + d->size;
9535     while (i != b)
9536         if (*--i == t)
9537             ++c;
9538     return c;
9539 }
9540
9541 template <typename T>
9542  QVector<T> QVector<T>::mid(int pos, int length) const
9543 {
9544     if (length < 0)
9545         length = size() - pos;
9546     if (pos == 0 && length == size())
9547         return *this;
9548     QVector<T> copy;
9549     if (pos + length > size())
9550         length = size() - pos;
9551     for (int i = pos; i < pos + length; ++i)
9552         copy += at(i);
9553     return copy;
9554 }
9555
9556 template <typename T>
9557  QList<T> QVector<T>::toList() const
9558 {
9559     QList<T> result;
9560     for (int i = 0; i < size(); ++i)
9561         result.append(at(i));
9562     return result;
9563 }
9564
9565 template <typename T>
9566  QVector<T> QList<T>::toVector() const
9567 {
9568     QVector<T> result(size());
9569     for (int i = 0; i < size(); ++i)
9570         result[i] = at(i);
9571     return result;
9572 }
9573
9574 template <typename T>
9575 QVector<T> QVector<T>::fromList(const QList<T> &list)
9576 {
9577     return list.toVector();
9578 }
9579
9580 template <typename T>
9581 QList<T> QList<T>::fromVector(const QVector<T> &vector)
9582 {
9583     return vector.toList();
9584 }
9585
9586 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; } };
9587 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; } };
9588 # 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"
9589 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qvector.h" 2
9590 # 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
9591
9592
9593
9594 typedef QtValidLicenseForCoreModule QtCoreModule;
9595
9596 template<class T>
9597 class QStack : public QVector<T>
9598 {
9599 public:
9600     inline QStack() {}
9601     inline ~QStack() {}
9602     inline void push(const T &t) { QVector<T>::append(t); }
9603     T pop();
9604     T &top();
9605     const T &top() const;
9606 };
9607
9608 template<class T>
9609 inline T QStack<T>::pop()
9610 { 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];
9611   this->resize(this->size()-1); return t; }
9612
9613 template<class T>
9614 inline T &QStack<T>::top()
9615 { 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]; }
9616
9617 template<class T>
9618 inline const T &QStack<T>::top() const
9619 { 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]; }
9620 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qstack.h" 2
9621 # 46 "./project.h" 2
9622
9623 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qmap.h" 1
9624
9625 # 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
9626 # 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"
9627
9628 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qatomic.h" 1
9629 # 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
9630
9631 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qiterator.h" 1
9632 # 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
9633
9634 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qlist.h" 1
9635 # 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
9636 # 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"
9637
9638
9639 typedef QtValidLicenseForCoreModule QtCoreModule;
9640
9641 struct QMapData
9642 {
9643     struct Node {
9644         Node *backward;
9645         Node *forward[1];
9646     };
9647     enum { LastLevel = 11, Sparseness = 3 };
9648
9649     QMapData *backward;
9650     QMapData *forward[QMapData::LastLevel + 1];
9651     QBasicAtomic ref;
9652     int topLevel;
9653     int size;
9654     uint randomBits;
9655     uint insertInOrder : 1;
9656     uint sharable : 1;
9657
9658     static QMapData *createData();
9659     void continueFreeData(int offset);
9660     Node *node_create(Node *update[], int offset);
9661     void node_delete(Node *update[], int offset, Node *node);
9662
9663
9664
9665
9666
9667     static QMapData shared_null;
9668 };
9669 # 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"
9670 template <class Key> inline bool qMapLessThanKey(const Key &key1, const Key &key2)
9671 {
9672     return key1 < key2;
9673 }
9674
9675
9676 template <class Ptr> inline bool qMapLessThanKey(Ptr *key1, Ptr *key2)
9677 {
9678     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);
9679     return reinterpret_cast<ulong>(key1) < reinterpret_cast<ulong>(key2);
9680 }
9681
9682 template <class Ptr> inline bool qMapLessThanKey(const Ptr *key1, const Ptr *key2)
9683 {
9684     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);
9685     return reinterpret_cast<ulong>(key1) < reinterpret_cast<ulong>(key2);
9686 }
9687
9688
9689 template <class Key, class T>
9690 class QMap
9691 {
9692     struct Node {
9693         Key key;
9694         T value;
9695         QMapData::Node *backward;
9696         QMapData::Node *forward[1];
9697     };
9698     union {
9699         QMapData *d;
9700         QMapData::Node *e;
9701     };
9702
9703     struct PayloadNode
9704     {
9705         Key key;
9706         T value;
9707         QMapData::Node *backward;
9708     };
9709
9710     static inline int payload() { return sizeof(PayloadNode) - sizeof(QMapData::Node *); }
9711     static inline Node *concrete(QMapData::Node *node) {
9712         return reinterpret_cast<Node *>(reinterpret_cast<char *>(node) - payload());
9713     }
9714
9715 public:
9716     inline QMap() : d(&QMapData::shared_null) { d->ref.ref(); }
9717     inline QMap(const QMap<Key, T> &other) : d(other.d)
9718     { d->ref.ref(); if (!d->sharable) detach(); }
9719     inline ~QMap() { if (!d) return; if (!d->ref.deref()) freeData(d); }
9720
9721     QMap<Key, T> &operator=(const QMap<Key, T> &other);
9722
9723
9724
9725
9726
9727     bool operator==(const QMap<Key, T> &other) const;
9728     inline bool operator!=(const QMap<Key, T> &other) const { return !(*this == other); }
9729
9730     inline int size() const { return d->size; }
9731
9732     inline bool isEmpty() const { return d->size == 0; }
9733
9734     inline void detach() { if (d->ref != 1) detach_helper(); }
9735     inline bool isDetached() const { return d->ref == 1; }
9736     inline void setSharable(bool sharable) { if (!sharable) detach(); d->sharable = sharable; }
9737     inline void setInsertInOrder(bool ordered) { d->insertInOrder = ordered; }
9738
9739     void clear();
9740
9741     int remove(const Key &key);
9742     T take(const Key &key);
9743
9744     bool contains(const Key &key) const;
9745     const Key key(const T &value) const;
9746     const Key key(const T &value, const Key &defaultKey) const;
9747     const T value(const Key &key) const;
9748     const T value(const Key &key, const T &defaultValue) const;
9749     T &operator[](const Key &key);
9750     const T operator[](const Key &key) const;
9751
9752     QList<Key> uniqueKeys() const;
9753     QList<Key> keys() const;
9754     QList<Key> keys(const T &value) const;
9755     QList<T> values() const;
9756     QList<T> values(const Key &key) const;
9757     int count(const Key &key) const;
9758
9759     class const_iterator;
9760
9761     class iterator
9762     {
9763         QMapData::Node *i;
9764
9765     public:
9766         typedef std::bidirectional_iterator_tag iterator_category;
9767         typedef ptrdiff_t difference_type;
9768         typedef T value_type;
9769         typedef T *pointer;
9770         typedef T &reference;
9771
9772
9773         inline operator QMapData::Node *() const { return i; }
9774         inline iterator() : i(0) { }
9775         inline iterator(QMapData::Node *node) : i(node) { }
9776
9777         inline const Key &key() const { return concrete(i)->key; }
9778         inline T &value() const { return concrete(i)->value; }
9779
9780
9781
9782         inline T &operator*() const { return concrete(i)->value; }
9783         inline T *operator->() const { return &concrete(i)->value; }
9784         inline bool operator==(const iterator &o) const { return i == o.i; }
9785         inline bool operator!=(const iterator &o) const { return i != o.i; }
9786
9787         inline iterator &operator++() {
9788             i = i->forward[0];
9789             return *this;
9790         }
9791         inline iterator operator++(int) {
9792             iterator r = *this;
9793             i = i->forward[0];
9794             return r;
9795         }
9796         inline iterator &operator--() {
9797             i = i->backward;
9798             return *this;
9799         }
9800         inline iterator operator--(int) {
9801             iterator r = *this;
9802             i = i->backward;
9803             return r;
9804         }
9805         inline iterator operator+(int j) const
9806         { iterator r = *this; if (j > 0) while (j--) ++r; else while (j++) --r; return r; }
9807         inline iterator operator-(int j) const { return operator+(-j); }
9808         inline iterator &operator+=(int j) { return *this = *this + j; }
9809         inline iterator &operator-=(int j) { return *this = *this - j; }
9810
9811
9812
9813
9814
9815     public:
9816
9817         inline bool operator==(const const_iterator &o) const
9818             { return i == reinterpret_cast<const iterator &>(o).i; }
9819         inline bool operator!=(const const_iterator &o) const
9820             { return i != reinterpret_cast<const iterator &>(o).i; }
9821
9822     private:
9823
9824         inline operator bool() const { return false; }
9825     };
9826     friend class iterator;
9827
9828     class const_iterator
9829     {
9830         QMapData::Node *i;
9831
9832     public:
9833         typedef std::bidirectional_iterator_tag iterator_category;
9834         typedef ptrdiff_t difference_type;
9835         typedef T value_type;
9836         typedef const T *pointer;
9837         typedef const T &reference;
9838
9839
9840         inline operator QMapData::Node *() const { return i; }
9841         inline const_iterator() : i(0) { }
9842         inline const_iterator(QMapData::Node *node) : i(node) { }
9843
9844
9845
9846         inline const_iterator(const iterator &o)
9847
9848         { i = reinterpret_cast<const const_iterator &>(o).i; }
9849
9850         inline const Key &key() const { return concrete(i)->key; }
9851         inline const T &value() const { return concrete(i)->value; }
9852
9853
9854
9855         inline const T &operator*() const { return concrete(i)->value; }
9856         inline const T *operator->() const { return &concrete(i)->value; }
9857         inline bool operator==(const const_iterator &o) const { return i == o.i; }
9858         inline bool operator!=(const const_iterator &o) const { return i != o.i; }
9859
9860         inline const_iterator &operator++() {
9861             i = i->forward[0];
9862             return *this;
9863         }
9864         inline const_iterator operator++(int) {
9865             const_iterator r = *this;
9866             i = i->forward[0];
9867             return r;
9868         }
9869         inline const_iterator &operator--() {
9870             i = i->backward;
9871             return *this;
9872         }
9873         inline const_iterator operator--(int) {
9874             const_iterator r = *this;
9875             i = i->backward;
9876             return r;
9877         }
9878         inline const_iterator operator+(int j) const
9879         { const_iterator r = *this; if (j > 0) while (j--) ++r; else while (j++) --r; return r; }
9880         inline const_iterator operator-(int j) const { return operator+(-j); }
9881         inline const_iterator &operator+=(int j) { return *this = *this + j; }
9882         inline const_iterator &operator-=(int j) { return *this = *this - j; }
9883 # 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"
9884     private:
9885
9886         inline operator bool() const { return false; }
9887     };
9888     friend class const_iterator;
9889
9890
9891     inline iterator begin() { detach(); return iterator(e->forward[0]); }
9892     inline const_iterator begin() const { return const_iterator(e->forward[0]); }
9893     inline const_iterator constBegin() const { return const_iterator(e->forward[0]); }
9894     inline iterator end() {
9895         detach();
9896         return iterator(e);
9897     }
9898     inline const_iterator end() const { return const_iterator(e); }
9899     inline const_iterator constEnd() const { return const_iterator(e); }
9900     iterator erase(iterator it);
9901
9902
9903
9904
9905
9906
9907     typedef iterator Iterator;
9908     typedef const_iterator ConstIterator;
9909     inline int count() const { return d->size; }
9910     iterator find(const Key &key);
9911     const_iterator find(const Key &key) const;
9912     const_iterator constFind(const Key &key) const;
9913     iterator lowerBound(const Key &key);
9914     const_iterator lowerBound(const Key &key) const;
9915     iterator upperBound(const Key &key);
9916     const_iterator upperBound(const Key &key) const;
9917     iterator insert(const Key &key, const T &value);
9918
9919
9920
9921     iterator insertMulti(const Key &key, const T &value);
9922
9923
9924
9925     QMap<Key, T> &unite(const QMap<Key, T> &other);
9926
9927
9928     typedef Key key_type;
9929     typedef T mapped_type;
9930     typedef ptrdiff_t difference_type;
9931     typedef int size_type;
9932     inline bool empty() const { return isEmpty(); }
9933
9934
9935
9936
9937
9938 private:
9939     void detach_helper();
9940     void freeData(QMapData *d);
9941     QMapData::Node *findNode(const Key &key) const;
9942     QMapData::Node *mutableFindNode(QMapData::Node *update[], const Key &key) const;
9943     QMapData::Node *node_create(QMapData *d, QMapData::Node *update[], const Key &key,
9944                                 const T &value);
9945 };
9946
9947 template <class Key, class T>
9948 inline QMap<Key, T> &QMap<Key, T>::operator=(const QMap<Key, T> &other)
9949 {
9950     if (d != other.d) {
9951         QMapData *x = other.d;
9952         x->ref.ref();
9953         x = qAtomicSetPtr(&d, x);
9954         if (!x->ref.deref())
9955             freeData(x);
9956         if (!d->sharable)
9957             detach_helper();
9958     }
9959     return *this;
9960 }
9961
9962 template <class Key, class T>
9963 inline void QMap<Key, T>::clear()
9964 {
9965     *this = QMap<Key, T>();
9966 }
9967
9968 template <class Key, class T>
9969 inline typename QMapData::Node *
9970 QMap<Key, T>::node_create(QMapData *adt, QMapData::Node *aupdate[], const Key &akey, const T &avalue)
9971 {
9972     QMapData::Node *abstractNode = adt->node_create(aupdate, payload());
9973     Node *concreteNode = concrete(abstractNode);
9974     new (&concreteNode->key) Key(akey);
9975     new (&concreteNode->value) T(avalue);
9976     return abstractNode;
9977 }
9978
9979 template <class Key, class T>
9980 inline QMapData::Node *QMap<Key, T>::findNode(const Key &akey) const
9981 {
9982     QMapData::Node *cur = e;
9983     QMapData::Node *next = e;
9984
9985     for (int i = d->topLevel; i >= 0; i--) {
9986         while ((next = cur->forward[i]) != e && qMapLessThanKey<Key>(concrete(next)->key, akey))
9987             cur = next;
9988     }
9989
9990     if (next != e && !qMapLessThanKey<Key>(akey, concrete(next)->key)) {
9991         return next;
9992     } else {
9993         return e;
9994     }
9995 }
9996
9997 template <class Key, class T>
9998 inline const T QMap<Key, T>::value(const Key &akey) const
9999 {
10000     QMapData::Node *node;
10001     if (d->size == 0 || (node = findNode(akey)) == e) {
10002         return T();
10003     } else {
10004         return concrete(node)->value;
10005     }
10006 }
10007
10008 template <class Key, class T>
10009 inline const T QMap<Key, T>::value(const Key &akey, const T &adefaultValue) const
10010 {
10011     QMapData::Node *node;
10012     if (d->size == 0 || (node = findNode(akey)) == e) {
10013         return adefaultValue;
10014     } else {
10015         return concrete(node)->value;
10016     }
10017 }
10018
10019 template <class Key, class T>
10020 inline const T QMap<Key, T>::operator[](const Key &akey) const
10021 {
10022     return value(akey);
10023 }
10024
10025 template <class Key, class T>
10026 inline T &QMap<Key, T>::operator[](const Key &akey)
10027 {
10028     detach();
10029
10030     QMapData::Node *update[QMapData::LastLevel + 1];
10031     QMapData::Node *node = mutableFindNode(update, akey);
10032     if (node == e)
10033         node = node_create(d, update, akey, T());
10034     return concrete(node)->value;
10035 }
10036
10037 template <class Key, class T>
10038 inline int QMap<Key, T>::count(const Key &akey) const
10039 {
10040     int cnt = 0;
10041     QMapData::Node *node = findNode(akey);
10042     if (node != e) {
10043         do {
10044             ++cnt;
10045             node = node->forward[0];
10046         } while (node != e && !qMapLessThanKey<Key>(akey, concrete(node)->key));
10047     }
10048     return cnt;
10049 }
10050
10051 template <class Key, class T>
10052 inline bool QMap<Key, T>::contains(const Key &akey) const
10053 {
10054     return findNode(akey) != e;
10055 }
10056
10057 template <class Key, class T>
10058 inline typename QMap<Key, T>::iterator QMap<Key, T>::insert(const Key &akey,
10059                                                                        const T &avalue)
10060 {
10061     detach();
10062
10063     QMapData::Node *update[QMapData::LastLevel + 1];
10064     QMapData::Node *node = mutableFindNode(update, akey);
10065     if (node == e) {
10066         node = node_create(d, update, akey, avalue);
10067     } else {
10068         concrete(node)->value = avalue;
10069     }
10070     return iterator(node);
10071 }
10072 # 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"
10073 template <class Key, class T>
10074 inline typename QMap<Key, T>::iterator QMap<Key, T>::insertMulti(const Key &akey,
10075                                                                             const T &avalue)
10076 {
10077     detach();
10078
10079     QMapData::Node *update[QMapData::LastLevel + 1];
10080     mutableFindNode(update, akey);
10081     return iterator(node_create(d, update, akey, avalue));
10082 }
10083
10084 template <class Key, class T>
10085 inline typename QMap<Key, T>::const_iterator QMap<Key, T>::find(const Key &akey) const
10086 {
10087     return const_iterator(findNode(akey));
10088 }
10089
10090 template <class Key, class T>
10091 inline typename QMap<Key, T>::const_iterator QMap<Key, T>::constFind(const Key &akey) const
10092 {
10093     return const_iterator(findNode(akey));
10094 }
10095
10096 template <class Key, class T>
10097 inline typename QMap<Key, T>::iterator QMap<Key, T>::find(const Key &akey)
10098 {
10099     detach();
10100     return iterator(findNode(akey));
10101 }
10102
10103 template <class Key, class T>
10104 inline QMap<Key, T> &QMap<Key, T>::unite(const QMap<Key, T> &other)
10105 {
10106     QMap<Key, T> copy(other);
10107     const_iterator it = copy.constEnd();
10108     const const_iterator b = copy.constBegin();
10109     while (it != b) {
10110         --it;
10111         insertMulti(it.key(), it.value());
10112     }
10113     return *this;
10114 }
10115
10116 template <class Key, class T>
10117  void QMap<Key, T>::freeData(QMapData *x)
10118 {
10119     if (QTypeInfo<Key>::isComplex || QTypeInfo<T>::isComplex) {
10120         QMapData::Node *y = reinterpret_cast<QMapData::Node *>(x);
10121         QMapData::Node *cur = y;
10122         QMapData::Node *next = cur->forward[0];
10123         while (next != y) {
10124             cur = next;
10125             next = cur->forward[0];
10126
10127
10128
10129             Node *concreteNode = concrete(cur);
10130             concreteNode->key.~Key();
10131             concreteNode->value.~T();
10132
10133
10134
10135         }
10136     }
10137     x->continueFreeData(payload());
10138 }
10139
10140 template <class Key, class T>
10141  int QMap<Key, T>::remove(const Key &akey)
10142 {
10143     detach();
10144
10145     QMapData::Node *update[QMapData::LastLevel + 1];
10146     QMapData::Node *cur = e;
10147     QMapData::Node *next = e;
10148     int oldSize = d->size;
10149
10150     for (int i = d->topLevel; i >= 0; i--) {
10151         while ((next = cur->forward[i]) != e && qMapLessThanKey<Key>(concrete(next)->key, akey))
10152             cur = next;
10153         update[i] = cur;
10154     }
10155
10156     if (next != e && !qMapLessThanKey<Key>(akey, concrete(next)->key)) {
10157         bool deleteNext = true;
10158         do {
10159             cur = next;
10160             next = cur->forward[0];
10161             deleteNext = (next != e && !qMapLessThanKey<Key>(concrete(cur)->key, concrete(next)->key));
10162             concrete(cur)->key.~Key();
10163             concrete(cur)->value.~T();
10164             d->node_delete(update, payload(), cur);
10165         } while (deleteNext);
10166     }
10167     return oldSize - d->size;
10168 }
10169
10170 template <class Key, class T>
10171  T QMap<Key, T>::take(const Key &akey)
10172 {
10173     detach();
10174
10175     QMapData::Node *update[QMapData::LastLevel + 1];
10176     QMapData::Node *cur = e;
10177     QMapData::Node *next = e;
10178
10179     for (int i = d->topLevel; i >= 0; i--) {
10180         while ((next = cur->forward[i]) != e && qMapLessThanKey<Key>(concrete(next)->key, akey))
10181             cur = next;
10182         update[i] = cur;
10183     }
10184
10185     if (next != e && !qMapLessThanKey<Key>(akey, concrete(next)->key)) {
10186         T t = concrete(next)->value;
10187         concrete(next)->key.~Key();
10188         concrete(next)->value.~T();
10189         d->node_delete(update, payload(), next);
10190         return t;
10191     }
10192     return T();
10193 }
10194
10195 template <class Key, class T>
10196  typename QMap<Key, T>::iterator QMap<Key, T>::erase(iterator it)
10197 {
10198     QMapData::Node *update[QMapData::LastLevel + 1];
10199     QMapData::Node *cur = e;
10200     QMapData::Node *next = e;
10201
10202     if (it == iterator(e))
10203         return it;
10204
10205     for (int i = d->topLevel; i >= 0; i--) {
10206         while ((next = cur->forward[i]) != e && qMapLessThanKey<Key>(concrete(next)->key, it.key()))
10207             cur = next;
10208         update[i] = cur;
10209     }
10210
10211     while (next != e) {
10212         cur = next;
10213         next = cur->forward[0];
10214         if (cur == it) {
10215             concrete(cur)->key.~Key();
10216             concrete(cur)->value.~T();
10217             d->node_delete(update, payload(), cur);
10218             return iterator(next);
10219         }
10220
10221         for (int i = 0; i <= d->topLevel; ++i) {
10222             if (update[i]->forward[i] != cur)
10223                 break;
10224             update[i] = cur;
10225         }
10226     }
10227     return end();
10228 }
10229
10230 template <class Key, class T>
10231  void QMap<Key, T>::detach_helper()
10232 {
10233     union { QMapData *d; QMapData::Node *e; } x;
10234     x.d = QMapData::createData();
10235     if (d->size) {
10236         x.d->insertInOrder = true;
10237         QMapData::Node *update[QMapData::LastLevel + 1];
10238         QMapData::Node *cur = e->forward[0];
10239         update[0] = x.e;
10240         while (cur != e) {
10241             Node *concreteNode = concrete(cur);
10242             node_create(x.d, update, concreteNode->key, concreteNode->value);
10243             cur = cur->forward[0];
10244         }
10245         x.d->insertInOrder = false;
10246     }
10247     x.d = qAtomicSetPtr(&d, x.d);
10248     if (!x.d->ref.deref())
10249         freeData(x.d);
10250 }
10251
10252 template <class Key, class T>
10253  QMapData::Node *QMap<Key, T>::mutableFindNode(QMapData::Node *aupdate[],
10254                                                                    const Key &akey) const
10255 {
10256     QMapData::Node *cur = e;
10257     QMapData::Node *next = e;
10258
10259     for (int i = d->topLevel; i >= 0; i--) {
10260         while ((next = cur->forward[i]) != e && qMapLessThanKey<Key>(concrete(next)->key, akey))
10261             cur = next;
10262         aupdate[i] = cur;
10263     }
10264     if (next != e && !qMapLessThanKey<Key>(akey, concrete(next)->key)) {
10265         return next;
10266     } else {
10267         return e;
10268     }
10269 }
10270
10271 template <class Key, class T>
10272  QList<Key> QMap<Key, T>::uniqueKeys() const
10273 {
10274     QList<Key> res;
10275     const_iterator i = begin();
10276     if (i != end()) {
10277         for (;;) {
10278             const Key &aKey = i.key();
10279             res.append(aKey);
10280             do {
10281                 if (++i == end())
10282                     goto break_out_of_outer_loop;
10283             } while (!(aKey < i.key()));
10284         }
10285     }
10286 break_out_of_outer_loop:
10287     return res;
10288 }
10289
10290 template <class Key, class T>
10291  QList<Key> QMap<Key, T>::keys() const
10292 {
10293     QList<Key> res;
10294     const_iterator i = begin();
10295     while (i != end()) {
10296         res.append(i.key());
10297         ++i;
10298     }
10299     return res;
10300 }
10301
10302 template <class Key, class T>
10303  QList<Key> QMap<Key, T>::keys(const T &avalue) const
10304 {
10305     QList<Key> res;
10306     const_iterator i = begin();
10307     while (i != end()) {
10308         if (i.value() == avalue)
10309             res.append(i.key());
10310         ++i;
10311     }
10312     return res;
10313 }
10314
10315 template <class Key, class T>
10316  const Key QMap<Key, T>::key(const T &avalue) const
10317 {
10318     return key(avalue, Key());
10319 }
10320
10321 template <class Key, class T>
10322  const Key QMap<Key, T>::key(const T &avalue, const Key &defaultKey) const
10323 {
10324     const_iterator i = begin();
10325     while (i != end()) {
10326         if (i.value() == avalue)
10327             return i.key();
10328         ++i;
10329     }
10330
10331     return defaultKey;
10332 }
10333
10334 template <class Key, class T>
10335  QList<T> QMap<Key, T>::values() const
10336 {
10337     QList<T> res;
10338     const_iterator i = begin();
10339     while (i != end()) {
10340         res.append(i.value());
10341         ++i;
10342     }
10343     return res;
10344 }
10345
10346 template <class Key, class T>
10347  QList<T> QMap<Key, T>::values(const Key &akey) const
10348 {
10349     QList<T> res;
10350     QMapData::Node *node = findNode(akey);
10351     if (node != e) {
10352         do {
10353             res.append(concrete(node)->value);
10354             node = node->forward[0];
10355         } while (node != e && !qMapLessThanKey<Key>(akey, concrete(node)->key));
10356     }
10357     return res;
10358 }
10359
10360 template <class Key, class T>
10361 inline typename QMap<Key, T>::const_iterator
10362 QMap<Key, T>::lowerBound(const Key &akey) const
10363 {
10364     QMapData::Node *update[QMapData::LastLevel + 1];
10365     mutableFindNode(update, akey);
10366     return const_iterator(update[0]->forward[0]);
10367 }
10368
10369 template <class Key, class T>
10370 inline typename QMap<Key, T>::iterator QMap<Key, T>::lowerBound(const Key &akey)
10371 {
10372     detach();
10373     return static_cast<QMapData::Node *>(const_cast<const QMap *>(this)->lowerBound(akey));
10374 }
10375
10376 template <class Key, class T>
10377 inline typename QMap<Key, T>::const_iterator
10378 QMap<Key, T>::upperBound(const Key &akey) const
10379 {
10380     QMapData::Node *update[QMapData::LastLevel + 1];
10381     mutableFindNode(update, akey);
10382     QMapData::Node *node = update[0]->forward[0];
10383     while (node != e && !qMapLessThanKey<Key>(akey, concrete(node)->key))
10384         node = node->forward[0];
10385     return const_iterator(node);
10386 }
10387
10388 template <class Key, class T>
10389 inline typename QMap<Key, T>::iterator QMap<Key, T>::upperBound(const Key &akey)
10390 {
10391     detach();
10392     return static_cast<QMapData::Node *>(const_cast<const QMap *>(this)->upperBound(akey));
10393 }
10394
10395 template <class Key, class T>
10396  bool QMap<Key, T>::operator==(const QMap<Key, T> &other) const
10397 {
10398     if (size() != other.size())
10399         return false;
10400     if (d == other.d)
10401         return true;
10402
10403     const_iterator it1 = begin();
10404     const_iterator it2 = other.begin();
10405
10406     while (it1 != end()) {
10407         if (!(it1.value() == it2.value()) || qMapLessThanKey(it1.key(), it2.key()) || qMapLessThanKey(it2.key(), it1.key()))
10408             return false;
10409         ++it2;
10410         ++it1;
10411     }
10412     return true;
10413 }
10414 # 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"
10415 template <class Key, class T>
10416 class QMultiMap : public QMap<Key, T>
10417 {
10418 public:
10419     QMultiMap() {}
10420     QMultiMap(const QMap<Key, T> &other) : QMap<Key, T>(other) {}
10421
10422     inline typename QMap<Key, T>::iterator replace(const Key &key, const T &value)
10423     { return QMap<Key, T>::insert(key, value); }
10424     inline typename QMap<Key, T>::iterator insert(const Key &key, const T &value)
10425     { return QMap<Key, T>::insertMulti(key, value); }
10426
10427     inline QMultiMap &operator+=(const QMultiMap &other)
10428     { unite(other); return *this; }
10429     inline QMultiMap operator+(const QMultiMap &other) const
10430     { QMultiMap result = *this; result += other; return result; }
10431
10432
10433     using QMap<Key, T>::contains;
10434     using QMap<Key, T>::remove;
10435     using QMap<Key, T>::count;
10436     using QMap<Key, T>::find;
10437     using QMap<Key, T>::constFind;
10438 # 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"
10439     bool contains(const Key &key, const T &value) const;
10440
10441     int remove(const Key &key, const T &value);
10442
10443     int count(const Key &key, const T &value) const;
10444
10445     typename QMap<Key, T>::iterator find(const Key &key, const T &value) {
10446         typename QMap<Key, T>::iterator i(find(key));
10447         typename QMap<Key, T>::iterator end(this->end());
10448         while (i != end && !qMapLessThanKey<Key>(key, i.key())) {
10449             if (i.value() == value)
10450                 return i;
10451             ++i;
10452         }
10453         return end;
10454     }
10455     typename QMap<Key, T>::const_iterator find(const Key &key, const T &value) const {
10456         typename QMap<Key, T>::const_iterator i(constFind(key));
10457         typename QMap<Key, T>::const_iterator end(QMap<Key, T>::constEnd());
10458         while (i != end && !qMapLessThanKey<Key>(key, i.key())) {
10459             if (i.value() == value)
10460                 return i;
10461             ++i;
10462         }
10463         return end;
10464     }
10465     typename QMap<Key, T>::const_iterator constFind(const Key &key, const T &value) const
10466         { return find(key, value); }
10467 private:
10468     T &operator[](const Key &key);
10469     const T operator[](const Key &key) const;
10470 };
10471
10472 template <class Key, class T>
10473 inline bool QMultiMap<Key, T>::contains(const Key &key, const T &value) const
10474 {
10475     return constFind(key, value) != QMap<Key, T>::constEnd();
10476 }
10477
10478 template <class Key, class T>
10479 inline int QMultiMap<Key, T>::remove(const Key &key, const T &value)
10480 {
10481     int n = 0;
10482     typename QMap<Key, T>::iterator i(find(key));
10483     typename QMap<Key, T>::const_iterator end(QMap<Key, T>::constEnd());
10484     while (i != end && !qMapLessThanKey<Key>(key, i.key())) {
10485         if (i.value() == value) {
10486             i = erase(i);
10487             ++n;
10488         } else {
10489             ++i;
10490         }
10491     }
10492     return n;
10493 }
10494
10495 template <class Key, class T>
10496 inline int QMultiMap<Key, T>::count(const Key &key, const T &value) const
10497 {
10498     int n = 0;
10499     typename QMap<Key, T>::const_iterator i(constFind(key));
10500     typename QMap<Key, T>::const_iterator end(QMap<Key, T>::constEnd());
10501     while (i != end && !qMapLessThanKey<Key>(key, i.key())) {
10502         if (i.value() == value)
10503             ++n;
10504         ++i;
10505     }
10506     return n;
10507 }
10508
10509 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; } };
10510 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; } };
10511 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qmap.h" 2
10512 # 47 "./project.h" 2
10513
10514 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qmetatype.h" 1
10515
10516 # 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
10517 # 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"
10518
10519 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qglobal.h" 1
10520 # 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
10521
10522 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qatomic.h" 1
10523 # 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
10524
10525
10526
10527 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qdatastream.h" 1
10528 # 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
10529 # 55 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/../../src/corelib/kernel/qmetatype.h"
10530 typedef QtValidLicenseForCoreModule QtCoreModule;
10531
10532 class QMetaType {
10533 public:
10534     enum Type {
10535
10536         Void = 0, Bool = 1, Int = 2, UInt = 3, LongLong = 4, ULongLong = 5,
10537         Double = 6, QChar = 7, QVariantMap = 8, QVariantList = 9,
10538         QString = 10, QStringList = 11, QByteArray = 12,
10539         QBitArray = 13, QDate = 14, QTime = 15, QDateTime = 16, QUrl = 17,
10540         QLocale = 18, QRect = 19, QRectF = 20, QSize = 21, QSizeF = 22,
10541         QLine = 23, QLineF = 24, QPoint = 25, QPointF = 26, QRegExp = 27,
10542         LastCoreType = 27 ,
10543
10544         FirstGuiType = 63 ,
10545
10546
10547
10548         QFont = 64, QPixmap = 65, QBrush = 66, QColor = 67, QPalette = 68,
10549         QIcon = 69, QImage = 70, QPolygon = 71, QRegion = 72, QBitmap = 73,
10550         QCursor = 74, QSizePolicy = 75, QKeySequence = 76, QPen = 77,
10551         QTextLength = 78, QTextFormat = 79, QMatrix = 80, QTransform = 81,
10552         LastGuiType = 81 ,
10553
10554         FirstCoreExtType = 128 ,
10555         VoidStar = 128, Long = 129, Short = 130, Char = 131, ULong = 132,
10556         UShort = 133, UChar = 134, Float = 135, QObjectStar = 136, QWidgetStar = 137,
10557         LastCoreExtType = 137 ,
10558
10559         User = 256
10560     };
10561
10562     typedef void (*Destructor)(void *);
10563     typedef void *(*Constructor)(const void *);
10564
10565
10566     typedef void (*SaveOperator)(QDataStream &, const void *);
10567     typedef void (*LoadOperator)(QDataStream &, void *);
10568     static void registerStreamOperators(const char *typeName, SaveOperator saveOp,
10569                                         LoadOperator loadOp);
10570
10571     static int registerType(const char *typeName, Destructor destructor,
10572                             Constructor constructor);
10573     static int type(const char *typeName);
10574     static const char *typeName(int type);
10575     static bool isRegistered(int type);
10576     static void *construct(int type, const void *copy = 0);
10577     static void destroy(int type, void *data);
10578
10579
10580     static bool save(QDataStream &stream, int type, const void *data);
10581     static bool load(QDataStream &stream, int type, void *data);
10582
10583 };
10584
10585 template <typename T>
10586 void qMetaTypeDeleteHelper(T *t)
10587 {
10588     delete t;
10589 }
10590
10591 template <typename T>
10592 void *qMetaTypeConstructHelper(const T *t)
10593 {
10594     if (!t)
10595         return new T;
10596     return new T(*static_cast<const T*>(t));
10597 }
10598
10599
10600 template <typename T>
10601 void qMetaTypeSaveHelper(QDataStream &stream, const T *t)
10602 {
10603     stream << *t;
10604 }
10605
10606 template <typename T>
10607 void qMetaTypeLoadHelper(QDataStream &stream, T *t)
10608 {
10609     stream >> *t;
10610 }
10611
10612
10613 template <typename T>
10614 int qRegisterMetaType(const char *typeName
10615
10616     , T * = 0
10617
10618 )
10619 {
10620     typedef void*(*ConstructPtr)(const T*);
10621     ConstructPtr cptr = qMetaTypeConstructHelper<T>;
10622     typedef void(*DeletePtr)(T*);
10623     DeletePtr dptr = qMetaTypeDeleteHelper<T>;
10624
10625     return QMetaType::registerType(typeName, reinterpret_cast<QMetaType::Destructor>(dptr),
10626                                    reinterpret_cast<QMetaType::Constructor>(cptr));
10627 }
10628
10629
10630 template <typename T>
10631 void qRegisterMetaTypeStreamOperators(const char *typeName
10632
10633     , T * = 0
10634
10635 )
10636 {
10637     typedef void(*SavePtr)(QDataStream &, const T *);
10638     typedef void(*LoadPtr)(QDataStream &, T *);
10639     SavePtr sptr = qMetaTypeSaveHelper<T>;
10640     LoadPtr lptr = qMetaTypeLoadHelper<T>;
10641
10642     qRegisterMetaType<T>(typeName);
10643     QMetaType::registerStreamOperators(typeName, reinterpret_cast<QMetaType::SaveOperator>(sptr),
10644                                        reinterpret_cast<QMetaType::LoadOperator>(lptr));
10645 }
10646
10647
10648 template <typename T>
10649 struct QMetaTypeId
10650 {
10651     enum { Defined = 0 };
10652 };
10653
10654 template <typename T>
10655 struct QMetaTypeId2
10656 {
10657     enum { Defined = QMetaTypeId<T>::Defined };
10658     static inline int qt_metatype_id() { return QMetaTypeId<T>::qt_metatype_id(); }
10659 };
10660
10661 template <typename T>
10662 inline int qMetaTypeId(
10663
10664     T * = 0
10665
10666 )
10667 {
10668     return QMetaTypeId2<T>::qt_metatype_id();
10669 }
10670
10671 template <typename T>
10672 inline int qRegisterMetaType(
10673
10674     T * dummy = 0
10675
10676 )
10677 {
10678
10679
10680
10681     return qMetaTypeId(dummy);
10682
10683 }
10684 # 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"
10685 class QString;
10686 class QByteArray;
10687 class QChar;
10688 class QStringList;
10689 class QBitArray;
10690 class QDate;
10691 class QTime;
10692 class QDateTime;
10693 class QUrl;
10694 class QLocale;
10695 class QRect;
10696 class QRectF;
10697 class QSize;
10698 class QSizeF;
10699 class QLine;
10700 class QLineF;
10701 class QPoint;
10702 class QPointF;
10703
10704 class QRegExp;
10705
10706 class QWidget;
10707 class QObject;
10708
10709
10710
10711
10712 class QFont;
10713 class QPixmap;
10714 class QBrush;
10715 class QColor;
10716 class QPalette;
10717 class QIcon;
10718 class QImage;
10719 class QPolygon;
10720 class QRegion;
10721 class QBitmap;
10722 class QCursor;
10723 class QSizePolicy;
10724 class QKeySequence;
10725 class QPen;
10726 class QTextLength;
10727 class QTextFormat;
10728 class QMatrix;
10729 class QTransform;
10730
10731 template<> struct QMetaTypeId2<QString> { enum { Defined = 1, MetaType = QMetaType::QString }; static inline int qt_metatype_id() { return QMetaType::QString; } };
10732 template<> struct QMetaTypeId2<int> { enum { Defined = 1, MetaType = QMetaType::Int }; static inline int qt_metatype_id() { return QMetaType::Int; } };
10733 template<> struct QMetaTypeId2<uint> { enum { Defined = 1, MetaType = QMetaType::UInt }; static inline int qt_metatype_id() { return QMetaType::UInt; } };
10734 template<> struct QMetaTypeId2<bool> { enum { Defined = 1, MetaType = QMetaType::Bool }; static inline int qt_metatype_id() { return QMetaType::Bool; } };
10735 template<> struct QMetaTypeId2<double> { enum { Defined = 1, MetaType = QMetaType::Double }; static inline int qt_metatype_id() { return QMetaType::Double; } };
10736 template<> struct QMetaTypeId2<QByteArray> { enum { Defined = 1, MetaType = QMetaType::QByteArray }; static inline int qt_metatype_id() { return QMetaType::QByteArray; } };
10737 template<> struct QMetaTypeId2<QChar> { enum { Defined = 1, MetaType = QMetaType::QChar }; static inline int qt_metatype_id() { return QMetaType::QChar; } };
10738 template<> struct QMetaTypeId2<long> { enum { Defined = 1, MetaType = QMetaType::Long }; static inline int qt_metatype_id() { return QMetaType::Long; } };
10739 template<> struct QMetaTypeId2<short> { enum { Defined = 1, MetaType = QMetaType::Short }; static inline int qt_metatype_id() { return QMetaType::Short; } };
10740 template<> struct QMetaTypeId2<char> { enum { Defined = 1, MetaType = QMetaType::Char }; static inline int qt_metatype_id() { return QMetaType::Char; } };
10741 template<> struct QMetaTypeId2<ulong> { enum { Defined = 1, MetaType = QMetaType::ULong }; static inline int qt_metatype_id() { return QMetaType::ULong; } };
10742 template<> struct QMetaTypeId2<ushort> { enum { Defined = 1, MetaType = QMetaType::UShort }; static inline int qt_metatype_id() { return QMetaType::UShort; } };
10743 template<> struct QMetaTypeId2<uchar> { enum { Defined = 1, MetaType = QMetaType::UChar }; static inline int qt_metatype_id() { return QMetaType::UChar; } };
10744 template<> struct QMetaTypeId2<float> { enum { Defined = 1, MetaType = QMetaType::Float }; static inline int qt_metatype_id() { return QMetaType::Float; } };
10745 template<> struct QMetaTypeId2<QObject *> { enum { Defined = 1, MetaType = QMetaType::QObjectStar }; static inline int qt_metatype_id() { return QMetaType::QObjectStar; } };
10746 template<> struct QMetaTypeId2<QWidget *> { enum { Defined = 1, MetaType = QMetaType::QWidgetStar }; static inline int qt_metatype_id() { return QMetaType::QWidgetStar; } };
10747 template<> struct QMetaTypeId2<void *> { enum { Defined = 1, MetaType = QMetaType::VoidStar }; static inline int qt_metatype_id() { return QMetaType::VoidStar; } };
10748 template<> struct QMetaTypeId2<qlonglong> { enum { Defined = 1, MetaType = QMetaType::LongLong }; static inline int qt_metatype_id() { return QMetaType::LongLong; } };
10749 template<> struct QMetaTypeId2<qulonglong> { enum { Defined = 1, MetaType = QMetaType::ULongLong }; static inline int qt_metatype_id() { return QMetaType::ULongLong; } };
10750 template<> struct QMetaTypeId2<QStringList> { enum { Defined = 1, MetaType = QMetaType::QStringList }; static inline int qt_metatype_id() { return QMetaType::QStringList; } };
10751 template<> struct QMetaTypeId2<QBitArray> { enum { Defined = 1, MetaType = QMetaType::QBitArray }; static inline int qt_metatype_id() { return QMetaType::QBitArray; } };
10752 template<> struct QMetaTypeId2<QDate> { enum { Defined = 1, MetaType = QMetaType::QDate }; static inline int qt_metatype_id() { return QMetaType::QDate; } };
10753 template<> struct QMetaTypeId2<QTime> { enum { Defined = 1, MetaType = QMetaType::QTime }; static inline int qt_metatype_id() { return QMetaType::QTime; } };
10754 template<> struct QMetaTypeId2<QDateTime> { enum { Defined = 1, MetaType = QMetaType::QDateTime }; static inline int qt_metatype_id() { return QMetaType::QDateTime; } };
10755 template<> struct QMetaTypeId2<QUrl> { enum { Defined = 1, MetaType = QMetaType::QUrl }; static inline int qt_metatype_id() { return QMetaType::QUrl; } };
10756 template<> struct QMetaTypeId2<QLocale> { enum { Defined = 1, MetaType = QMetaType::QLocale }; static inline int qt_metatype_id() { return QMetaType::QLocale; } };
10757 template<> struct QMetaTypeId2<QRect> { enum { Defined = 1, MetaType = QMetaType::QRect }; static inline int qt_metatype_id() { return QMetaType::QRect; } };
10758 template<> struct QMetaTypeId2<QRectF> { enum { Defined = 1, MetaType = QMetaType::QRectF }; static inline int qt_metatype_id() { return QMetaType::QRectF; } };
10759 template<> struct QMetaTypeId2<QSize> { enum { Defined = 1, MetaType = QMetaType::QSize }; static inline int qt_metatype_id() { return QMetaType::QSize; } };
10760 template<> struct QMetaTypeId2<QSizeF> { enum { Defined = 1, MetaType = QMetaType::QSizeF }; static inline int qt_metatype_id() { return QMetaType::QSizeF; } };
10761 template<> struct QMetaTypeId2<QLine> { enum { Defined = 1, MetaType = QMetaType::QLine }; static inline int qt_metatype_id() { return QMetaType::QLine; } };
10762 template<> struct QMetaTypeId2<QLineF> { enum { Defined = 1, MetaType = QMetaType::QLineF }; static inline int qt_metatype_id() { return QMetaType::QLineF; } };
10763 template<> struct QMetaTypeId2<QPoint> { enum { Defined = 1, MetaType = QMetaType::QPoint }; static inline int qt_metatype_id() { return QMetaType::QPoint; } };
10764 template<> struct QMetaTypeId2<QPointF> { enum { Defined = 1, MetaType = QMetaType::QPointF }; static inline int qt_metatype_id() { return QMetaType::QPointF; } };
10765
10766 template<> struct QMetaTypeId2<QRegExp> { enum { Defined = 1, MetaType = QMetaType::QRegExp }; static inline int qt_metatype_id() { return QMetaType::QRegExp; } };
10767
10768
10769
10770
10771
10772 template<> struct QMetaTypeId2<QFont> { enum { Defined = 1, MetaType = QMetaType::QFont }; static inline int qt_metatype_id() { return QMetaType::QFont; } };
10773 template<> struct QMetaTypeId2<QPixmap> { enum { Defined = 1, MetaType = QMetaType::QPixmap }; static inline int qt_metatype_id() { return QMetaType::QPixmap; } };
10774 template<> struct QMetaTypeId2<QBrush> { enum { Defined = 1, MetaType = QMetaType::QBrush }; static inline int qt_metatype_id() { return QMetaType::QBrush; } };
10775 template<> struct QMetaTypeId2<QColor> { enum { Defined = 1, MetaType = QMetaType::QColor }; static inline int qt_metatype_id() { return QMetaType::QColor; } };
10776 template<> struct QMetaTypeId2<QPalette> { enum { Defined = 1, MetaType = QMetaType::QPalette }; static inline int qt_metatype_id() { return QMetaType::QPalette; } };
10777 template<> struct QMetaTypeId2<QIcon> { enum { Defined = 1, MetaType = QMetaType::QIcon }; static inline int qt_metatype_id() { return QMetaType::QIcon; } };
10778 template<> struct QMetaTypeId2<QImage> { enum { Defined = 1, MetaType = QMetaType::QImage }; static inline int qt_metatype_id() { return QMetaType::QImage; } };
10779 template<> struct QMetaTypeId2<QPolygon> { enum { Defined = 1, MetaType = QMetaType::QPolygon }; static inline int qt_metatype_id() { return QMetaType::QPolygon; } };
10780 template<> struct QMetaTypeId2<QRegion> { enum { Defined = 1, MetaType = QMetaType::QRegion }; static inline int qt_metatype_id() { return QMetaType::QRegion; } };
10781 template<> struct QMetaTypeId2<QBitmap> { enum { Defined = 1, MetaType = QMetaType::QBitmap }; static inline int qt_metatype_id() { return QMetaType::QBitmap; } };
10782 template<> struct QMetaTypeId2<QCursor> { enum { Defined = 1, MetaType = QMetaType::QCursor }; static inline int qt_metatype_id() { return QMetaType::QCursor; } };
10783 template<> struct QMetaTypeId2<QSizePolicy> { enum { Defined = 1, MetaType = QMetaType::QSizePolicy }; static inline int qt_metatype_id() { return QMetaType::QSizePolicy; } };
10784 template<> struct QMetaTypeId2<QKeySequence> { enum { Defined = 1, MetaType = QMetaType::QKeySequence }; static inline int qt_metatype_id() { return QMetaType::QKeySequence; } };
10785 template<> struct QMetaTypeId2<QPen> { enum { Defined = 1, MetaType = QMetaType::QPen }; static inline int qt_metatype_id() { return QMetaType::QPen; } };
10786 template<> struct QMetaTypeId2<QTextLength> { enum { Defined = 1, MetaType = QMetaType::QTextLength }; static inline int qt_metatype_id() { return QMetaType::QTextLength; } };
10787 template<> struct QMetaTypeId2<QTextFormat> { enum { Defined = 1, MetaType = QMetaType::QTextFormat }; static inline int qt_metatype_id() { return QMetaType::QTextFormat; } };
10788 template<> struct QMetaTypeId2<QMatrix> { enum { Defined = 1, MetaType = QMetaType::QMatrix }; static inline int qt_metatype_id() { return QMetaType::QMatrix; } };
10789 template<> struct QMetaTypeId2<QTransform> { enum { Defined = 1, MetaType = QMetaType::QTransform }; static inline int qt_metatype_id() { return QMetaType::QTransform; } };
10790 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qmetatype.h" 2
10791 # 48 "./project.h" 2
10792
10793
10794
10795
10796
10797 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/src/script/qscriptengine.h" 1
10798 # 42 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/src/script/qscriptengine.h"
10799
10800 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qmetatype.h" 1
10801 # 43 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/src/script/qscriptengine.h" 2
10802
10803
10804
10805
10806 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qvariant.h" 1
10807
10808 # 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
10809 # 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"
10810
10811 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qatomic.h" 1
10812 # 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
10813
10814 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qbytearray.h" 1
10815 # 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
10816
10817 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qlist.h" 1
10818 # 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
10819
10820 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qmetatype.h" 1
10821 # 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
10822
10823 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qmap.h" 1
10824 # 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
10825
10826 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qstring.h" 1
10827 # 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
10828
10829
10830
10831 typedef QtValidLicenseForCoreModule QtCoreModule;
10832
10833 class QBitArray;
10834 class QDataStream;
10835 class QDate;
10836 class QDateTime;
10837 class QLine;
10838 class QLineF;
10839 class QLocale;
10840 class QMatrix;
10841 class QTransform;
10842 class QStringList;
10843 class QTime;
10844 class QPoint;
10845 class QPointF;
10846 class QSize;
10847 class QSizeF;
10848 class QRect;
10849 class QRectF;
10850
10851 class QRegExp;
10852
10853 class QTextFormat;
10854 class QTextLength;
10855 class QUrl;
10856 class QVariant;
10857 class QVariantComparisonHelper;
10858
10859
10860 template <typename T>
10861 inline QVariant qVariantFromValue(const T &);
10862
10863 template <typename T>
10864 inline void qVariantSetValue(QVariant &, const T &);
10865
10866 template<typename T>
10867 inline T qVariantValue(const QVariant &);
10868
10869 template<typename T>
10870 inline bool qVariantCanConvert(const QVariant &);
10871
10872
10873 class QVariant
10874 {
10875  public:
10876     enum Type {
10877         Invalid = 0,
10878
10879         Bool = 1,
10880         Int = 2,
10881         UInt = 3,
10882         LongLong = 4,
10883         ULongLong = 5,
10884         Double = 6,
10885         Char = 7,
10886         Map = 8,
10887         List = 9,
10888         String = 10,
10889         StringList = 11,
10890         ByteArray = 12,
10891         BitArray = 13,
10892         Date = 14,
10893         Time = 15,
10894         DateTime = 16,
10895         Url = 17,
10896         Locale = 18,
10897         Rect = 19,
10898         RectF = 20,
10899         Size = 21,
10900         SizeF = 22,
10901         Line = 23,
10902         LineF = 24,
10903         Point = 25,
10904         PointF = 26,
10905  RegExp = 27,
10906         LastCoreType = RegExp,
10907
10908
10909
10910
10911
10912         Font = 64,
10913         Pixmap = 65,
10914         Brush = 66,
10915         Color = 67,
10916         Palette = 68,
10917         Icon = 69,
10918         Image = 70,
10919         Polygon = 71,
10920         Region = 72,
10921         Bitmap = 73,
10922         Cursor = 74,
10923         SizePolicy = 75,
10924         KeySequence = 76,
10925         Pen = 77,
10926         TextLength = 78,
10927         TextFormat = 79,
10928         Matrix = 80,
10929         Transform = 81,
10930         LastGuiType = Transform,
10931
10932         UserType = 127,
10933
10934
10935
10936
10937
10938         LastType = 0xffffffff
10939     };
10940
10941     inline QVariant();
10942     ~QVariant();
10943     QVariant(Type type);
10944     QVariant(int typeOrUserType, const void *copy);
10945     QVariant(const QVariant &other);
10946
10947
10948     QVariant(QDataStream &s);
10949
10950
10951     QVariant(int i);
10952     QVariant(uint ui);
10953     QVariant(qlonglong ll);
10954     QVariant(qulonglong ull);
10955     QVariant(bool b);
10956     QVariant(double d);
10957
10958     QVariant(const char *str);
10959
10960
10961     QVariant(const QByteArray &bytearray);
10962     QVariant(const QBitArray &bitarray);
10963     QVariant(const QString &string);
10964     QVariant(const QLatin1String &string);
10965     QVariant(const QStringList &stringlist);
10966     QVariant(const QChar &qchar);
10967     QVariant(const QDate &date);
10968     QVariant(const QTime &time);
10969     QVariant(const QDateTime &datetime);
10970     QVariant(const QList<QVariant> &list);
10971     QVariant(const QMap<QString,QVariant> &map);
10972 # 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"
10973     QVariant(const QUrl &url);
10974     QVariant(const QLocale &locale);
10975
10976     QVariant(const QRegExp &regExp);
10977
10978     QVariant(Qt::GlobalColor color);
10979
10980     QVariant& operator=(const QVariant &other);
10981
10982     Type type() const;
10983     int userType() const;
10984     const char *typeName() const;
10985
10986     bool canConvert(Type t) const;
10987     bool convert(Type t);
10988 # 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"
10989     inline bool isValid() const;
10990     bool isNull() const;
10991
10992     void clear();
10993
10994     void detach();
10995     inline bool isDetached() const;
10996
10997     int toInt(bool *ok = 0) const;
10998     uint toUInt(bool *ok = 0) const;
10999     qlonglong toLongLong(bool *ok = 0) const;
11000     qulonglong toULongLong(bool *ok = 0) const;
11001     bool toBool() const;
11002     double toDouble(bool *ok = 0) const;
11003     QByteArray toByteArray() const;
11004     QBitArray toBitArray() const;
11005     QString toString() const;
11006     QStringList toStringList() const;
11007     QChar toChar() const;
11008     QDate toDate() const;
11009     QTime toTime() const;
11010     QDateTime toDateTime() const;
11011     QList<QVariant> toList() const;
11012     QMap<QString, QVariant> toMap() const;
11013 # 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"
11014     QUrl toUrl() const;
11015     QLocale toLocale() const;
11016
11017     QRegExp toRegExp() const;
11018 # 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"
11019     void load(QDataStream &ds);
11020     void save(QDataStream &ds) const;
11021
11022     static const char *typeToName(Type type);
11023     static Type nameToType(const char *name);
11024
11025
11026
11027
11028
11029
11030
11031     void *data();
11032     const void *constData() const;
11033     inline const void *data() const { return constData(); }
11034
11035
11036     template<typename T>
11037     inline void setValue(const T &value);
11038
11039     template<typename T>
11040     inline T value() const
11041     { return qVariantValue<T>(*this); }
11042
11043     template<typename T>
11044     static inline QVariant fromValue(const T &value)
11045     { return qVariantFromValue(value); }
11046
11047     template<typename T>
11048     bool canConvert() const
11049     { return qVariantCanConvert<T>(*this); }
11050
11051
11052  public:
11053
11054     struct PrivateShared
11055     {
11056         inline PrivateShared() : ref(1) { }
11057         inline PrivateShared(void *v) : ptr(v), ref(1) { }
11058         void *ptr;
11059         QAtomic ref;
11060     };
11061     struct Private
11062     {
11063         inline Private(): type(Invalid), is_shared(false), is_null(true) { data.ptr = 0; }
11064         inline Private(const Private &other)
11065             : data(other.data), type(other.type),
11066               is_shared(other.is_shared), is_null(other.is_null)
11067         {}
11068         union Data
11069         {
11070             char c;
11071             int i;
11072             uint u;
11073             bool b;
11074             double d;
11075             qlonglong ll;
11076             qulonglong ull;
11077             void *ptr;
11078             PrivateShared *shared;
11079         } data;
11080         uint type : 30;
11081         uint is_shared : 1;
11082         uint is_null : 1;
11083     };
11084  public:
11085     typedef void (*f_construct)(Private *, const void *);
11086     typedef void (*f_clear)(Private *);
11087     typedef bool (*f_null)(const Private *);
11088
11089     typedef void (*f_load)(Private *, QDataStream &);
11090     typedef void (*f_save)(const Private *, QDataStream &);
11091
11092     typedef bool (*f_compare)(const Private *, const Private *);
11093     typedef bool (*f_convert)(const QVariant::Private *d, Type t, void *, bool *);
11094     typedef bool (*f_canConvert)(const QVariant::Private *d, Type t);
11095     typedef void (*f_debugStream)(QDebug, const QVariant &);
11096     struct Handler {
11097         f_construct construct;
11098         f_clear clear;
11099         f_null isNull;
11100
11101         f_load load;
11102         f_save save;
11103
11104         f_compare compare;
11105         f_convert convert;
11106         f_canConvert canConvert;
11107         f_debugStream debugStream;
11108     };
11109
11110
11111     inline bool operator==(const QVariant &v) const
11112     { return cmp(v); }
11113     inline bool operator!=(const QVariant &v) const
11114     { return !cmp(v); }
11115
11116 protected:
11117     friend inline bool qvariant_cast_helper(const QVariant &, QVariant::Type, void *);
11118     friend int qRegisterGuiVariant();
11119     friend int qUnregisterGuiVariant();
11120     friend inline bool operator==(const QVariant &, const QVariantComparisonHelper &);
11121
11122     friend QDebug operator<<(QDebug, const QVariant &);
11123
11124     Private d;
11125
11126     static const Handler *handler;
11127
11128     void create(int type, const void *copy);
11129
11130
11131
11132     bool cmp(const QVariant &other) const;
11133
11134 private:
11135
11136
11137
11138
11139
11140
11141     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); }
11142
11143 public:
11144     typedef Private DataPtr;
11145     inline DataPtr &data_ptr() { return d; }
11146 };
11147
11148 typedef QList<QVariant> QVariantList;
11149 typedef QMap<QString, QVariant> QVariantMap;
11150
11151 template<> struct QMetaTypeId2<QVariantList> { enum { Defined = 1, MetaType = QMetaType::QVariantList }; static inline int qt_metatype_id() { return QMetaType::QVariantList; } };
11152 template<> struct QMetaTypeId2<QVariantMap> { enum { Defined = 1, MetaType = QMetaType::QVariantMap }; static inline int qt_metatype_id() { return QMetaType::QVariantMap; } };
11153
11154 inline bool qvariant_cast_helper(const QVariant &v, QVariant::Type tp, void *ptr)
11155 { return QVariant::handler->convert(&v.d, tp, ptr, 0); }
11156
11157 template <typename T>
11158 inline QVariant qVariantFromValue(const T &t)
11159 {
11160     return QVariant(qMetaTypeId<T>(reinterpret_cast<T *>(0)), &t);
11161 }
11162
11163 template <>
11164 inline QVariant qVariantFromValue(const QVariant &t) { return t; }
11165
11166 template <typename T>
11167 inline void qVariantSetValue(QVariant &v, const T &t)
11168 {
11169     v = QVariant(qMetaTypeId<T>(reinterpret_cast<T *>(0)), &t);
11170 }
11171
11172 inline QVariant::QVariant() {}
11173 inline bool QVariant::isValid() const { return d.type != Invalid; }
11174 # 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"
11175 template<typename T>
11176 inline void QVariant::setValue(const T &avalue)
11177 { qVariantSetValue(*this, avalue); }
11178
11179
11180
11181  QDataStream& operator>> (QDataStream& s, QVariant& p);
11182  QDataStream& operator<< (QDataStream& s, const QVariant& p);
11183  QDataStream& operator>> (QDataStream& s, QVariant::Type& p);
11184  QDataStream& operator<< (QDataStream& s, const QVariant::Type p);
11185
11186
11187 inline bool QVariant::isDetached() const
11188 { return !d.is_shared || d.data.shared->ref == 1; }
11189 # 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"
11190 class QVariantComparisonHelper
11191 {
11192 public:
11193     inline QVariantComparisonHelper(const QVariant &var)
11194         : v(&var) {}
11195 private:
11196     friend inline bool operator==(const QVariant &, const QVariantComparisonHelper &);
11197     const QVariant *v;
11198 };
11199
11200 inline bool operator==(const QVariant &v1, const QVariantComparisonHelper &v2)
11201 {
11202     return v1.cmp(*v2.v);
11203 }
11204
11205 inline bool operator!=(const QVariant &v1, const QVariantComparisonHelper &v2)
11206 {
11207     return !operator==(v1, v2);
11208 }
11209 # 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"
11210 template<typename T> T qvariant_cast(const QVariant &v)
11211 {
11212     const int vid = qMetaTypeId<T>(static_cast<T *>(0));
11213     if (vid == v.userType())
11214         return *reinterpret_cast<const T *>(v.constData());
11215     if (vid < int(QMetaType::User)) {
11216         T t;
11217         if (qvariant_cast_helper(v, QVariant::Type(vid), &t))
11218             return t;
11219     }
11220     return T();
11221 }
11222
11223 template<typename T>
11224 inline T qVariantValue(const QVariant &variant)
11225 { return qvariant_cast<T>(variant); }
11226
11227 template<typename T>
11228 inline bool qVariantCanConvert(const QVariant &variant)
11229 {
11230     return variant.canConvert(static_cast<QVariant::Type>(
11231                 qMetaTypeId<T>(static_cast<T *>(0))));
11232 }
11233
11234
11235 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; }
11236 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"; } };
11237
11238
11239  QDebug operator<<(QDebug, const QVariant &);
11240  QDebug operator<<(QDebug, const QVariant::Type);
11241 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qvariant.h" 2
11242 # 47 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/src/script/qscriptengine.h" 2
11243
11244
11245
11246
11247
11248 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qobjectdefs.h" 1
11249 # 52 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/src/script/qscriptengine.h" 2
11250
11251
11252
11253 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtScript/qscriptvalue.h" 1
11254
11255 # 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
11256 # 42 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtScript/../../src/script/qscriptvalue.h"
11257
11258 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qstring.h" 1
11259 # 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
11260
11261
11262
11263
11264 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qlist.h" 1
11265 # 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
11266
11267
11268
11269 typedef QtValidLicenseForScriptModule QtScriptModule;
11270
11271 class QScriptValue;
11272 class QScriptEngine;
11273 class QVariant;
11274 class QObject;
11275 struct QMetaObject;
11276 class QDateTime;
11277
11278 class QRegExp;
11279
11280
11281 typedef QList<QScriptValue> QScriptValueList;
11282
11283 typedef double qsreal;
11284
11285 class QScriptValuePrivate;
11286 class QScriptValue
11287 {
11288 public:
11289     enum ResolveFlag {
11290         ResolveLocal = 0x00,
11291         ResolvePrototype = 0x01,
11292         ResolveScope = 0x02,
11293         ResolveFull = ResolvePrototype | ResolveScope
11294     };
11295
11296     typedef QFlags<ResolveFlag> ResolveFlags;
11297
11298     enum PropertyFlag {
11299         ReadOnly = 0x00000001,
11300         Undeletable = 0x00000002,
11301         SkipInEnumeration = 0x00000004,
11302
11303         PropertyGetter = 0x00000008,
11304         PropertySetter = 0x00000010,
11305
11306         QObjectMember = 0x00000020,
11307
11308         KeepExistingFlags = 0x00000800,
11309
11310         UserRange = 0xff000000
11311     };
11312     typedef QFlags<PropertyFlag> PropertyFlags;
11313
11314     enum SpecialValue {
11315         NullValue,
11316         UndefinedValue
11317     };
11318
11319 public:
11320     QScriptValue();
11321     ~QScriptValue();
11322     QScriptValue(const QScriptValue &other);
11323     QScriptValue(QScriptEngine *engine, SpecialValue val);
11324     QScriptValue(QScriptEngine *engine, bool val);
11325     QScriptValue(QScriptEngine *engine, int val);
11326     QScriptValue(QScriptEngine *engine, uint val);
11327     QScriptValue(QScriptEngine *engine, qsreal val);
11328     QScriptValue(QScriptEngine *engine, const QString &val);
11329
11330
11331     QScriptValue(QScriptEngine *engine, const char *val);
11332
11333
11334     QScriptValue &operator=(const QScriptValue &other);
11335
11336     QScriptEngine *engine() const;
11337
11338     bool isValid() const;
11339     bool isBoolean() const;
11340     bool isNumber() const;
11341     bool isFunction() const;
11342     bool isNull() const;
11343     bool isString() const;
11344     bool isUndefined() const;
11345     bool isVariant() const;
11346     bool isQObject() const;
11347     bool isQMetaObject() const;
11348     bool isObject() const;
11349     bool isDate() const;
11350     bool isRegExp() const;
11351     bool isArray() const;
11352     bool isError() const;
11353
11354     QString toString() const;
11355     qsreal toNumber() const;
11356     bool toBoolean() const;
11357     qsreal toInteger() const;
11358     qint32 toInt32() const;
11359     quint32 toUInt32() const;
11360     quint16 toUInt16() const;
11361     QVariant toVariant() const;
11362     QObject *toQObject() const;
11363     const QMetaObject *toQMetaObject() const;
11364     QScriptValue toObject() const;
11365     QDateTime toDateTime() const;
11366
11367     QRegExp toRegExp() const;
11368
11369
11370     bool instanceOf(const QScriptValue &other) const;
11371
11372     bool lessThan(const QScriptValue &other) const;
11373     bool equals(const QScriptValue &other) const;
11374     bool strictlyEquals(const QScriptValue &other) const;
11375
11376     QScriptValue prototype() const;
11377     void setPrototype(const QScriptValue &prototype);
11378
11379     QScriptValue scope() const;
11380     void setScope(const QScriptValue &scope);
11381
11382     QScriptValue property(const QString &name,
11383                           const ResolveFlags &mode = ResolvePrototype) const;
11384     void setProperty(const QString &name, const QScriptValue &value,
11385                      const PropertyFlags &flags = KeepExistingFlags);
11386
11387     QScriptValue property(quint32 arrayIndex,
11388                           const ResolveFlags &mode = ResolvePrototype) const;
11389     void setProperty(quint32 arrayIndex, const QScriptValue &value,
11390                      const PropertyFlags &flags = KeepExistingFlags);
11391
11392     QScriptValue::PropertyFlags propertyFlags(
11393         const QString &name, const ResolveFlags &mode = ResolvePrototype) const;
11394
11395     QScriptValue call(const QScriptValue &thisObject = QScriptValue(),
11396                       const QScriptValueList &args = QScriptValueList());
11397     QScriptValue call(const QScriptValue &thisObject,
11398                       const QScriptValue &arguments);
11399     QScriptValue construct(const QScriptValueList &args = QScriptValueList());
11400     QScriptValue construct(const QScriptValue &arguments);
11401
11402 private:
11403     QScriptValuePrivate *d_ptr;
11404
11405     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;
11406 };
11407
11408 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; }
11409 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; }
11410 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtScript/qscriptvalue.h" 2
11411 # 55 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/src/script/qscriptengine.h" 2
11412
11413 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtScript/qscriptcontext.h" 1
11414
11415 # 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
11416 # 42 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtScript/../../src/script/qscriptcontext.h"
11417
11418 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qobjectdefs.h" 1
11419 # 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
11420
11421
11422
11423
11424 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtScript/qscriptvalue.h" 1
11425 # 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
11426
11427
11428
11429 typedef QtValidLicenseForScriptModule QtScriptModule;
11430
11431 class QScriptContextPrivate;
11432
11433 class QScriptContext
11434 {
11435 public:
11436     enum ExecutionState {
11437         NormalState,
11438         ExceptionState
11439     };
11440
11441     enum Error {
11442         UnknownError,
11443         ReferenceError,
11444         SyntaxError,
11445         TypeError,
11446         RangeError,
11447         URIError
11448     };
11449
11450     ~QScriptContext();
11451
11452     QScriptContext *parentContext() const;
11453     QScriptEngine *engine() const;
11454
11455     ExecutionState state() const;
11456     QScriptValue callee() const;
11457
11458     int argumentCount() const;
11459     QScriptValue argument(int index) const;
11460     QScriptValue argumentsObject() const;
11461
11462     QScriptValue returnValue() const;
11463     void setReturnValue(const QScriptValue &result);
11464
11465     QScriptValue activationObject() const;
11466     void setActivationObject(const QScriptValue &activation);
11467
11468     QScriptValue thisObject() const;
11469     void setThisObject(const QScriptValue &thisObject);
11470
11471     bool isCalledAsConstructor() const;
11472
11473     QScriptValue throwValue(const QScriptValue &value);
11474     QScriptValue throwError(Error error, const QString &text);
11475     QScriptValue throwError(const QString &text);
11476
11477     QStringList backtrace() const;
11478
11479 private:
11480     QScriptContext();
11481
11482     QScriptContextPrivate *d_ptr;
11483
11484     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;
11485     QScriptContext(const QScriptContext &); QScriptContext &operator=(const QScriptContext &);
11486 };
11487 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtScript/qscriptcontext.h" 2
11488 # 56 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/src/script/qscriptengine.h" 2
11489
11490
11491
11492 typedef QtValidLicenseForScriptModule QtScriptModule;
11493
11494 class QDateTime;
11495 class QScriptEnginePrivate;
11496 # 80 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/src/script/qscriptengine.h"
11497 class QRegExp;
11498
11499
11500
11501 template <typename T>
11502 inline QScriptValue qScriptValueFromValue(QScriptEngine *, const T &);
11503
11504 template <typename T>
11505 inline T qScriptValueToValue(const QScriptValue &);
11506
11507
11508 class QScriptEngine
11509
11510
11511
11512 {
11513
11514
11515
11516 public:
11517     enum ValueOwnership {
11518         QtOwnership,
11519         ScriptOwnership,
11520         AutoOwnership
11521     };
11522
11523     enum QObjectWrapOption {
11524         ExcludeChildObjects = 0x0001,
11525         ExcludeSuperClassMethods = 0x0002,
11526         ExcludeSuperClassProperties = 0x0004,
11527
11528         AutoCreateDynamicProperties = 0x0100
11529     };
11530     typedef QFlags<QObjectWrapOption> QObjectWrapOptions;
11531
11532     QScriptEngine();
11533
11534
11535
11536     virtual ~QScriptEngine();
11537
11538     QScriptValue globalObject() const;
11539     QScriptContext *currentContext() const;
11540     QScriptContext *pushContext();
11541     void popContext();
11542
11543     bool canEvaluate(const QString &program) const;
11544
11545     QScriptValue evaluate(const QString &program, const QString &fileName = QString(), int lineNumber = 1);
11546
11547     bool hasUncaughtException() const;
11548     QScriptValue uncaughtException() const;
11549     int uncaughtExceptionLineNumber() const;
11550     QStringList uncaughtExceptionBacktrace() const;
11551
11552     QScriptValue nullValue();
11553     QScriptValue undefinedValue();
11554
11555     typedef QScriptValue (*FunctionSignature)(QScriptContext *, QScriptEngine *);
11556
11557     QScriptValue newFunction(FunctionSignature signature, int length = 0);
11558     QScriptValue newFunction(FunctionSignature signature, const QScriptValue &prototype, int length = 0);
11559     QScriptValue newVariant(const QVariant &value);
11560
11561
11562     QScriptValue newRegExp(const QRegExp &regexp);
11563
11564
11565     QScriptValue newObject();
11566     QScriptValue newArray(uint length = 0);
11567     QScriptValue newRegExp(const QString &pattern, const QString &flags);
11568     QScriptValue newDate(qsreal value);
11569     QScriptValue newDate(const QDateTime &value);
11570     QScriptValue newActivationObject();
11571 # 171 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/src/script/qscriptengine.h"
11572     QScriptValue defaultPrototype(int metaTypeId) const;
11573     void setDefaultPrototype(int metaTypeId, const QScriptValue &prototype);
11574
11575
11576     typedef QScriptValue (*MarshalFunction)(QScriptEngine *, const void *);
11577     typedef void (*DemarshalFunction)(const QScriptValue &, void *);
11578
11579
11580
11581
11582     template <typename T>
11583     inline QScriptValue toScriptValue(const T &value)
11584     {
11585         return qScriptValueFromValue(this, value);
11586     }
11587     template <typename T>
11588     inline T fromScriptValue(const QScriptValue &value)
11589     {
11590         return qScriptValueToValue<T>(value);
11591     }
11592
11593
11594     QScriptValue importExtension(const QString &extension);
11595
11596     void collectGarbage();
11597
11598     void setProcessEventsInterval(int interval);
11599     int processEventsInterval() const;
11600
11601 private:
11602     QScriptValue create(int type, const void *ptr);
11603
11604     bool convert(const QScriptValue &value, int type, void *ptr);
11605
11606     void registerCustomType(int type, MarshalFunction mf, DemarshalFunction df,
11607                             const QScriptValue &prototype);
11608
11609     friend inline void qScriptRegisterMetaType_helper(QScriptEngine *,
11610         int, MarshalFunction, DemarshalFunction, const QScriptValue &);
11611
11612     friend inline QScriptValue qScriptValueFromValue_helper(QScriptEngine *, int, const void *);
11613
11614     friend inline bool qscriptvalue_cast_helper(const QScriptValue &, int, void *);
11615
11616 protected:
11617
11618     QScriptEnginePrivate *d_ptr;
11619
11620     QScriptEngine(QScriptEnginePrivate &dd);
11621
11622
11623
11624
11625 private:
11626     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;
11627     QScriptEngine(const QScriptEngine &); QScriptEngine &operator=(const QScriptEngine &);
11628 };
11629 # 249 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/src/script/qscriptengine.h"
11630 inline QScriptValue qScriptValueFromValue_helper(QScriptEngine *engine, int type, const void *ptr)
11631 {
11632     if (!engine)
11633         return QScriptValue();
11634
11635     return engine->create(type, ptr);
11636 }
11637
11638 template <typename T>
11639 inline QScriptValue qScriptValueFromValue(QScriptEngine *engine, const T &t)
11640 {
11641     return qScriptValueFromValue_helper(engine, qMetaTypeId<T>(), &t);
11642 }
11643
11644 inline bool qscriptvalue_cast_helper(const QScriptValue &value, int type, void *ptr)
11645 {
11646     if (QScriptEngine *eng = value.engine())
11647         return eng->convert(value, type, ptr);
11648
11649     return false;
11650 }
11651
11652 template<typename T>
11653 T qscriptvalue_cast(const QScriptValue &value
11654
11655 , T * = 0
11656
11657     )
11658 {
11659     T t;
11660     const int id = qMetaTypeId<T>();
11661
11662     if (qscriptvalue_cast_helper(value, id, &t))
11663         return t;
11664     else if (value.isVariant())
11665         return qvariant_cast<T>(value.toVariant());
11666
11667     return T();
11668 }
11669
11670 template <typename T>
11671 inline T qScriptValueToValue(const QScriptValue &value)
11672 {
11673     return qscriptvalue_cast<T>(value);
11674 }
11675
11676 inline void qScriptRegisterMetaType_helper(QScriptEngine *eng, int type,
11677                                            QScriptEngine::MarshalFunction mf,
11678                                            QScriptEngine::DemarshalFunction df,
11679                                            const QScriptValue &prototype)
11680 {
11681     eng->registerCustomType(type, mf, df, prototype);
11682 }
11683
11684 template<typename T>
11685 int qScriptRegisterMetaType(
11686     QScriptEngine *eng,
11687     QScriptValue (*toScriptValue)(QScriptEngine *, const T &t),
11688     void (*fromScriptValue)(const QScriptValue &, T &t),
11689     const QScriptValue &prototype = QScriptValue()
11690
11691     , T * = 0
11692
11693 )
11694 {
11695     const int id = qRegisterMetaType<T>();
11696
11697     qScriptRegisterMetaType_helper(
11698         eng, id, reinterpret_cast<QScriptEngine::MarshalFunction>(toScriptValue),
11699         reinterpret_cast<QScriptEngine::DemarshalFunction>(fromScriptValue),
11700         prototype);
11701
11702     return id;
11703 }
11704
11705 template <class Container>
11706 QScriptValue qScriptValueFromSequence(QScriptEngine *eng, const Container &cont)
11707 {
11708     QScriptValue a = eng->newArray();
11709     typename Container::const_iterator begin = cont.begin();
11710     typename Container::const_iterator end = cont.end();
11711     typename Container::const_iterator it;
11712     quint32 i;
11713     for (it = begin, i = 0; it != end; ++it, ++i)
11714         a.setProperty(i, qScriptValueFromValue(eng, *it));
11715     return a;
11716 }
11717
11718 template <class Container>
11719 void qScriptValueToSequence(const QScriptValue &value, Container &cont)
11720 {
11721     quint32 len = value.property(QLatin1String("length")).toUInt32();
11722     for (quint32 i = 0; i < len; ++i) {
11723         QScriptValue item = value.property(i);
11724
11725
11726
11727         cont.push_back(qscriptvalue_cast<typename Container::value_type>(item));
11728
11729     }
11730 }
11731
11732 template<typename T>
11733 int qScriptRegisterSequenceMetaType(
11734     QScriptEngine *engine,
11735     const QScriptValue &prototype = QScriptValue()
11736
11737     , T * = 0
11738
11739 )
11740 {
11741     return qScriptRegisterMetaType<T>(engine, qScriptValueFromSequence,
11742                                       qScriptValueToSequence, prototype);
11743 }
11744
11745 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; }
11746 # 53 "./project.h" 2
11747
11748
11749 class QMakeProperty;
11750
11751 struct ParsableBlock;
11752 struct IteratorBlock;
11753 struct FunctionBlock;
11754
11755 class QMakeProject
11756 {
11757     struct ScopeBlock
11758     {
11759         enum TestStatus { TestNone, TestFound, TestSeek };
11760         ScopeBlock() : iterate(0), ignore(false), else_status(TestNone) { }
11761         ScopeBlock(bool i) : iterate(0), ignore(i), else_status(TestNone) { }
11762         ~ScopeBlock();
11763         IteratorBlock *iterate;
11764         uint ignore : 1, else_status : 2;
11765     };
11766     friend struct ParsableBlock;
11767     friend struct IteratorBlock;
11768     friend struct FunctionBlock;
11769
11770
11771     QScriptEngine eng;
11772
11773     QStack<ScopeBlock> scope_blocks;
11774     QStack<FunctionBlock *> function_blocks;
11775     IteratorBlock *iterator;
11776     FunctionBlock *function;
11777     QMap<QString, FunctionBlock*> testFunctions, replaceFunctions;
11778
11779     bool own_prop;
11780     QString pfile, cfile;
11781     QMakeProperty *prop;
11782     void reset();
11783     QMap<QString, QStringList> vars, base_vars, cache;
11784     bool parse(const QString &text, QMap<QString, QStringList> &place, int line_count=1);
11785
11786     enum IncludeStatus {
11787         IncludeSuccess,
11788         IncludeFeatureAlreadyLoaded,
11789         IncludeFailure,
11790         IncludeNoExist,
11791         IncludeParseFailure
11792     };
11793     enum IncludeFlags {
11794         IncludeFlagNone = 0x00,
11795         IncludeFlagFeature = 0x01,
11796         IncludeFlagNewParser = 0x02,
11797         IncludeFlagNewProject = 0x04
11798     };
11799     IncludeStatus doProjectInclude(QString file, uchar flags, QMap<QString, QStringList> &place);
11800
11801     bool doProjectCheckReqs(const QStringList &deps, QMap<QString, QStringList> &place);
11802     bool doVariableReplace(QString &str, QMap<QString, QStringList> &place);
11803     QStringList doVariableReplaceExpand(const QString &str, QMap<QString, QStringList> &place, bool *ok=0);
11804     void init(QMakeProperty *, const QMap<QString, QStringList> *);
11805     QStringList &values(const QString &v, QMap<QString, QStringList> &place);
11806
11807 public:
11808     QMakeProject() { init(0, 0); }
11809     QMakeProject(QMakeProperty *p) { init(p, 0); }
11810     QMakeProject(QMakeProject *p, const QMap<QString, QStringList> *nvars=0);
11811     QMakeProject(const QMap<QString, QStringList> &nvars) { init(0, &nvars); }
11812     QMakeProject(QMakeProperty *p, const QMap<QString, QStringList> &nvars) { init(p, &nvars); }
11813     ~QMakeProject();
11814
11815     enum { ReadCache=0x01, ReadConf=0x02, ReadCmdLine=0x04, ReadProFile=0x08,
11816            ReadPostFiles=0x10, ReadFeatures=0x20, ReadConfigs=0x40, ReadAll=0xFF };
11817     inline bool parse(const QString &text) { return parse(text, vars); }
11818     bool read(const QString &project, uchar cmd=ReadAll);
11819     bool read(uchar cmd=ReadAll);
11820
11821     QStringList userExpandFunctions() { return replaceFunctions.keys(); }
11822     QStringList userTestFunctions() { return testFunctions.keys(); }
11823
11824     QString projectFile();
11825     QString configFile();
11826     inline QMakeProperty *properties() { return prop; }
11827
11828     bool doProjectTest(QString str, QMap<QString, QStringList> &place);
11829     bool doProjectTest(QString func, const QString &params,
11830                        QMap<QString, QStringList> &place);
11831     bool doProjectTest(QString func, QStringList args,
11832                        QMap<QString, QStringList> &place);
11833     bool doProjectTest(QString func, QList<QStringList> args,
11834                        QMap<QString, QStringList> &place);
11835     QStringList doProjectExpand(QString func, const QString &params,
11836                                 QMap<QString, QStringList> &place);
11837     QStringList doProjectExpand(QString func, QStringList args,
11838                                 QMap<QString, QStringList> &place);
11839     QStringList doProjectExpand(QString func, QList<QStringList> args,
11840                                 QMap<QString, QStringList> &place);
11841
11842     QStringList expand(const QString &v);
11843     QStringList expand(const QString &func, const QList<QStringList> &args);
11844     bool test(const QString &v);
11845     bool test(const QString &func, const QList<QStringList> &args);
11846     bool isActiveConfig(const QString &x, bool regex=false,
11847                         QMap<QString, QStringList> *place=__null);
11848
11849     bool isSet(const QString &v);
11850     bool isEmpty(const QString &v);
11851     QStringList &values(const QString &v);
11852     QString first(const QString &v);
11853     QMap<QString, QStringList> &variables();
11854
11855 protected:
11856     friend class MakefileGenerator;
11857     bool read(const QString &file, QMap<QString, QStringList> &place);
11858     bool read(QTextStream &file, QMap<QString, QStringList> &place);
11859
11860 };
11861 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; } };
11862
11863 inline QString QMakeProject::projectFile()
11864 {
11865     if (pfile == "-")
11866         return QString("(stdin)");
11867     return pfile;
11868 }
11869
11870 inline QString QMakeProject::configFile()
11871 { return cfile; }
11872
11873 inline QStringList &QMakeProject::values(const QString &v)
11874 { return values(v, vars); }
11875
11876 inline bool QMakeProject::isEmpty(const QString &v)
11877 { return !isSet(v) || values(v).isEmpty(); }
11878
11879 inline bool QMakeProject::isSet(const QString &v)
11880 { return vars.contains(v); }
11881
11882 inline QString QMakeProject::first(const QString &v)
11883 {
11884     const QStringList vals = values(v);
11885     if(vals.isEmpty())
11886         return QString("");
11887     return vals.first();
11888 }
11889
11890 inline QMap<QString, QStringList> &QMakeProject::variables()
11891 { return vars; }
11892 # 43 "./option.h" 2
11893
11894 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qstring.h" 1
11895 # 44 "./option.h" 2
11896
11897 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qstringlist.h" 1
11898 # 45 "./option.h" 2
11899
11900 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qfile.h" 1
11901
11902 # 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
11903 # 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"
11904
11905 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qiodevice.h" 1
11906 # 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
11907
11908 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qstring.h" 1
11909 # 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
11910
11911 # 1 "/usr/include/stdio.h" 1 3 4
11912 # 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
11913
11914
11915
11916
11917
11918
11919
11920 typedef QtValidLicenseForCoreModule QtCoreModule;
11921
11922 class QAbstractFileEngine;
11923 class QFilePrivate;
11924
11925 class QFile : public QIODevice
11926 {
11927
11928
11929
11930     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;
11931
11932 public:
11933
11934     enum FileError {
11935         NoError = 0,
11936         ReadError = 1,
11937         WriteError = 2,
11938         FatalError = 3,
11939         ResourceError = 4,
11940         OpenError = 5,
11941         AbortError = 6,
11942         TimeOutError = 7,
11943         UnspecifiedError = 8,
11944         RemoveError = 9,
11945         RenameError = 10,
11946         PositionError = 11,
11947         ResizeError = 12,
11948         PermissionsError = 13,
11949         CopyError = 14
11950
11951
11952
11953     };
11954
11955     enum Permission {
11956         ReadOwner = 0x4000, WriteOwner = 0x2000, ExeOwner = 0x1000,
11957         ReadUser = 0x0400, WriteUser = 0x0200, ExeUser = 0x0100,
11958         ReadGroup = 0x0040, WriteGroup = 0x0020, ExeGroup = 0x0010,
11959         ReadOther = 0x0004, WriteOther = 0x0002, ExeOther = 0x0001
11960     };
11961     typedef QFlags<Permission> Permissions;
11962
11963     QFile();
11964     QFile(const QString &name);
11965
11966
11967
11968
11969     ~QFile();
11970
11971     FileError error() const;
11972     void unsetError();
11973
11974     QString fileName() const;
11975     void setFileName(const QString &name);
11976
11977     typedef QByteArray (*EncoderFn)(const QString &fileName);
11978     typedef QString (*DecoderFn)(const QByteArray &localfileName);
11979     static QByteArray encodeName(const QString &fileName);
11980     static QString decodeName(const QByteArray &localFileName);
11981     inline static QString decodeName(const char *localFileName)
11982         { return decodeName(QByteArray(localFileName)); };
11983     static void setEncodingFunction(EncoderFn);
11984     static void setDecodingFunction(DecoderFn);
11985
11986     bool exists() const;
11987     static bool exists(const QString &fileName);
11988
11989     QString readLink() const;
11990     static QString readLink(const QString &fileName);
11991     inline QString symLinkTarget() const { return readLink(); }
11992     inline static QString symLinkTarget(const QString &fileName) { return readLink(fileName); }
11993
11994     bool remove();
11995     static bool remove(const QString &fileName);
11996
11997     bool rename(const QString &newName);
11998     static bool rename(const QString &oldName, const QString &newName);
11999
12000     bool link(const QString &newName);
12001     static bool link(const QString &oldname, const QString &newName);
12002
12003     bool copy(const QString &newName);
12004     static bool copy(const QString &fileName, const QString &newName);
12005
12006     bool isSequential() const;
12007
12008     bool open(OpenMode flags);
12009     bool open(FILE *f, OpenMode flags);
12010     bool open(int fd, OpenMode flags);
12011     virtual void close();
12012
12013     qint64 size() const;
12014     qint64 pos() const;
12015     bool seek(qint64 offset);
12016     bool atEnd() const;
12017     bool flush();
12018
12019     bool resize(qint64 sz);
12020     static bool resize(const QString &filename, qint64 sz);
12021
12022     Permissions permissions() const;
12023     static Permissions permissions(const QString &filename);
12024     bool setPermissions(Permissions permissionSpec);
12025     static bool setPermissions(const QString &filename, Permissions permissionSpec);
12026
12027     int handle() const;
12028
12029     virtual QAbstractFileEngine *fileEngine() const;
12030 # 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"
12031 protected:
12032
12033     QFile(QFilePrivate &dd);
12034
12035
12036
12037
12038     qint64 readData(char *data, qint64 maxlen);
12039     qint64 writeData(const char *data, qint64 len);
12040     qint64 readLineData(char *data, qint64 maxlen);
12041
12042 private:
12043     QFile(const QFile &); QFile &operator=(const QFile &);
12044 };
12045
12046 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; }
12047 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qfile.h" 2
12048 # 46 "./option.h" 2
12049
12050
12051
12052
12053 const char *qmake_version();
12054
12055 QString qmake_getpwd();
12056 bool qmake_setpwd(const QString &p);
12057
12058
12059 void debug_msg_internal(int level, const char *fmt, ...);
12060 enum QMakeWarn {
12061     WarnNone = 0x00,
12062     WarnParser = 0x01,
12063     WarnLogic = 0x02,
12064     WarnAll = 0xFF
12065 };
12066 void warn_msg(QMakeWarn t, const char *fmt, ...);
12067
12068 struct Option
12069 {
12070
12071     static QString js_ext;
12072     static QString libtool_ext;
12073     static QString pkgcfg_ext;
12074     static QString prf_ext;
12075     static QString prl_ext;
12076     static QString ui_ext;
12077     static QStringList h_ext;
12078     static QStringList cpp_ext;
12079     static QStringList c_ext;
12080     static QString h_moc_ext;
12081     static QString cpp_moc_ext;
12082     static QString obj_ext;
12083     static QString lex_ext;
12084     static QString yacc_ext;
12085     static QString h_moc_mod;
12086     static QString cpp_moc_mod;
12087     static QString lex_mod;
12088     static QString yacc_mod;
12089     static QString dir_sep;
12090     static QString dirlist_sep;
12091     static QString sysenv_mod;
12092     static QString pro_ext;
12093     static QString res_ext;
12094     static char field_sep;
12095     static const char *application_argv0;
12096
12097     enum CmdLineFlags {
12098         QMAKE_CMDLINE_SUCCESS = 0x00,
12099         QMAKE_CMDLINE_SHOW_USAGE = 0x01,
12100         QMAKE_CMDLINE_BAIL = 0x02,
12101         QMAKE_CMDLINE_ERROR = 0x04
12102     };
12103
12104
12105     static int init(int argc=0, char **argv=0);
12106     static bool postProcessProject(QMakeProject *);
12107
12108     enum StringFixFlags {
12109         FixNone = 0x00,
12110         FixEnvVars = 0x01,
12111         FixPathCanonicalize = 0x02,
12112         FixPathToLocalSeparators = 0x04,
12113         FixPathToTargetSeparators = 0x08
12114     };
12115     static QString fixString(QString string, uchar flags);
12116
12117
12118     inline static QString fixPathToLocalOS(const QString &in, bool fix_env=true, bool canonical=true)
12119     {
12120         uchar flags = FixPathToLocalSeparators;
12121         if(fix_env)
12122             flags |= FixEnvVars;
12123         if(canonical)
12124             flags |= FixPathCanonicalize;
12125         return fixString(in, flags);
12126     }
12127     inline static QString fixPathToTargetOS(const QString &in, bool fix_env=true, bool canonical=true)
12128     {
12129         uchar flags = FixPathToTargetSeparators;
12130         if(fix_env)
12131             flags |= FixEnvVars;
12132         if(canonical)
12133             flags |= FixPathCanonicalize;
12134         return fixString(in, flags);
12135     }
12136
12137
12138     enum QMAKE_MODE { QMAKE_GENERATE_NOTHING, QMAKE_GENERATE_PROJECT, QMAKE_GENERATE_MAKEFILE,
12139                       QMAKE_GENERATE_PRL, QMAKE_SET_PROPERTY, QMAKE_QUERY_PROPERTY };
12140     static QMAKE_MODE qmake_mode;
12141
12142
12143     static QString qmake_abslocation;
12144     static QFile output;
12145     static QString output_dir;
12146     static int debug_level;
12147     static int warn_level;
12148     static bool recursive;
12149     static QStringList before_user_vars, after_user_vars, user_configs, after_user_configs;
12150     enum TARG_MODE { TARG_UNIX_MODE, TARG_WIN_MODE, TARG_MACX_MODE, TARG_MAC9_MODE, TARG_QNX6_MODE };
12151     static TARG_MODE target_mode;
12152     static QString user_template, user_template_prefix;
12153     static QStringList shellPath;
12154
12155
12156     struct prop {
12157         static QStringList properties;
12158     };
12159
12160
12161     struct projfile {
12162         static bool do_pwd;
12163         static QStringList project_dirs;
12164     };
12165
12166
12167     struct mkfile {
12168         static QString qmakespec;
12169         static bool do_cache;
12170         static bool do_deps;
12171         static bool do_mocs;
12172         static bool do_dep_heuristics;
12173         static bool do_preprocess;
12174         static bool do_stub_makefile;
12175         static QString cachefile;
12176         static int cachefile_depth;
12177         static QStringList project_files;
12178         static QString qmakespec_commandline;
12179     };
12180
12181 private:
12182     static int parseCommandLine(int, char **, int=0);
12183 };
12184
12185 inline QString fixEnvVariables(const QString &x) { return Option::fixString(x, Option::FixEnvVars); }
12186 inline QStringList splitPathList(const QString paths) { return paths.split(Option::dirlist_sep); }
12187
12188
12189
12190 class QLibraryInfo
12191 {
12192 public:
12193     enum LibraryLocation
12194     {
12195         PrefixPath,
12196         DocumentationPath,
12197         HeadersPath,
12198         LibrariesPath,
12199         BinariesPath,
12200         PluginsPath,
12201         DataPath,
12202         TranslationsPath,
12203         SettingsPath,
12204         DemosPath,
12205         ExamplesPath
12206     };
12207     static QString location(LibraryLocation);
12208 };
12209 # 43 "generators/makefile.h" 2
12210
12211 # 1 "./project.h" 1
12212 # 44 "generators/makefile.h" 2
12213
12214 # 1 "generators/makefiledeps.h" 1
12215 # 42 "generators/makefiledeps.h"
12216
12217 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qstringlist.h" 1
12218 # 43 "generators/makefiledeps.h" 2
12219
12220 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qfileinfo.h" 1
12221
12222 # 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
12223 # 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"
12224
12225 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qfile.h" 1
12226 # 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
12227
12228 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qlist.h" 1
12229 # 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
12230
12231
12232
12233 typedef QtValidLicenseForCoreModule QtCoreModule;
12234
12235 class QDir;
12236 class QDateTime;
12237 class QFileInfoPrivate;
12238
12239 class QFileInfo
12240 {
12241 public:
12242     QFileInfo();
12243     QFileInfo(const QString &file);
12244     QFileInfo(const QFile &file);
12245     QFileInfo(const QDir &dir, const QString &file);
12246     QFileInfo(const QFileInfo &fileinfo);
12247     ~QFileInfo();
12248
12249     QFileInfo &operator=(const QFileInfo &fileinfo);
12250     bool operator==(const QFileInfo &fileinfo);
12251     bool operator==(const QFileInfo &fileinfo) const;
12252     inline bool operator!=(const QFileInfo &fileinfo) { return !(operator==(fileinfo)); }
12253     inline bool operator!=(const QFileInfo &fileinfo) const { return !(operator==(fileinfo)); }
12254
12255     void setFile(const QString &file);
12256     void setFile(const QFile &file);
12257     void setFile(const QDir &dir, const QString &file);
12258     bool exists() const;
12259     void refresh();
12260
12261     QString filePath() const;
12262     QString absoluteFilePath() const;
12263     QString canonicalFilePath() const;
12264     QString fileName() const;
12265     QString baseName() const;
12266     QString completeBaseName() const;
12267     QString suffix() const;
12268     QString bundleName() const;
12269     QString completeSuffix() const;
12270
12271     QString path() const;
12272     QString absolutePath() const;
12273     QString canonicalPath() const;
12274     QDir dir() const;
12275     QDir absoluteDir() const;
12276
12277     bool isReadable() const;
12278     bool isWritable() const;
12279     bool isExecutable() const;
12280     bool isHidden() const;
12281
12282     bool isRelative() const;
12283     inline bool isAbsolute() const { return !isRelative(); }
12284     bool makeAbsolute();
12285
12286     bool isFile() const;
12287     bool isDir() const;
12288     bool isSymLink() const;
12289     bool isRoot() const;
12290     bool isBundle() const;
12291
12292     QString readLink() const;
12293     inline QString symLinkTarget() const { return readLink(); }
12294
12295     QString owner() const;
12296     uint ownerId() const;
12297     QString group() const;
12298     uint groupId() const;
12299
12300     bool permission(QFile::Permissions permissions) const;
12301     QFile::Permissions permissions() const;
12302
12303     qint64 size() const;
12304
12305     QDateTime created() const;
12306     QDateTime lastModified() const;
12307     QDateTime lastRead() const;
12308
12309     void detach();
12310
12311     bool caching() const;
12312     void setCaching(bool on);
12313 # 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"
12314 protected:
12315     QFileInfoPrivate *d_ptr;
12316 private:
12317     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;
12318 };
12319 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"; } };
12320
12321
12322
12323
12324
12325 typedef QList<QFileInfo> QFileInfoList;
12326 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qfileinfo.h" 2
12327 # 44 "generators/makefiledeps.h" 2
12328
12329 struct SourceFile;
12330 struct SourceDependChildren;
12331 class SourceFiles;
12332
12333 class QMakeLocalFileName {
12334     uint is_null : 1;
12335     mutable QString real_name, local_name;
12336 public:
12337     QMakeLocalFileName() : is_null(1) { }
12338     QMakeLocalFileName(const QString &);
12339     bool isNull() const { return is_null; }
12340     inline const QString &real() const { return real_name; }
12341     const QString &local() const;
12342
12343     bool operator==(const QMakeLocalFileName &other) {
12344         return (this->real_name == other.real_name);
12345     }
12346     bool operator!=(const QMakeLocalFileName &other) {
12347         return !(*this == other);
12348     }
12349 };
12350
12351 class QMakeSourceFileInfo
12352 {
12353 private:
12354
12355     SourceFiles *files, *includes;
12356     bool files_changed;
12357     QList<QMakeLocalFileName> depdirs;
12358
12359
12360     char *spare_buffer;
12361     int spare_buffer_size;
12362     char *getBuffer(int s);
12363
12364
12365     bool findMocs(SourceFile *);
12366     bool findDeps(SourceFile *);
12367     void dependTreeWalker(SourceFile *, SourceDependChildren *);
12368
12369
12370     QString cachefile;
12371
12372 protected:
12373     virtual QMakeLocalFileName fixPathForFile(const QMakeLocalFileName &, bool forOpen=false);
12374     virtual QMakeLocalFileName findFileForDep(const QMakeLocalFileName &, const QMakeLocalFileName &);
12375     virtual QFileInfo findFileInfo(const QMakeLocalFileName &);
12376
12377 public:
12378     QMakeSourceFileInfo(const QString &cachefile="");
12379     virtual ~QMakeSourceFileInfo();
12380
12381     QList<QMakeLocalFileName> dependencyPaths() const { return depdirs; }
12382     void setDependencyPaths(const QList<QMakeLocalFileName> &);
12383
12384     enum DependencyMode { Recursive, NonRecursive };
12385     inline void setDependencyMode(DependencyMode mode) { dep_mode = mode; }
12386     inline DependencyMode dependencyMode() const { return dep_mode; }
12387
12388     enum SourceFileType { TYPE_UNKNOWN, TYPE_C, TYPE_UI, TYPE_QRC };
12389     enum SourceFileSeek { SEEK_DEPS=0x01, SEEK_MOCS=0x02 };
12390     void addSourceFiles(const QStringList &, uchar seek, SourceFileType type=TYPE_C);
12391     void addSourceFile(const QString &, uchar seek, SourceFileType type=TYPE_C);
12392     bool containsSourceFile(const QString &, SourceFileType type=TYPE_C);
12393
12394     int included(const QString &file);
12395     QStringList dependencies(const QString &file);
12396
12397     bool mocable(const QString &file);
12398
12399     virtual QMap<QString, QStringList> getCacheVerification();
12400     virtual bool verifyCache(const QMap<QString, QStringList> &);
12401     void setCacheFile(const QString &cachefile);
12402     void loadCache(const QString &cf);
12403     void saveCache(const QString &cf);
12404
12405 private:
12406     DependencyMode dep_mode;
12407 };
12408 # 45 "generators/makefile.h" 2
12409
12410 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qtextstream.h" 1
12411 # 46 "generators/makefile.h" 2
12412
12413 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qlist.h" 1
12414 # 47 "generators/makefile.h" 2
12415
12416 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qhash.h" 1
12417
12418 # 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
12419 # 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"
12420
12421 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qatomic.h" 1
12422 # 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
12423
12424 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qchar.h" 1
12425 # 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
12426
12427 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qiterator.h" 1
12428 # 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
12429
12430 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qlist.h" 1
12431 # 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
12432
12433 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qpair.h" 1
12434
12435 # 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
12436 # 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"
12437
12438 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qdatastream.h" 1
12439 # 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
12440
12441
12442
12443 typedef QtValidLicenseForCoreModule QtCoreModule;
12444
12445 template <class T1, class T2>
12446 struct QPair
12447 {
12448     typedef T1 first_type;
12449     typedef T2 second_type;
12450
12451     QPair() : first(T1()), second(T2()) {}
12452     QPair(const T1 &t1, const T2 &t2) : first(t1), second(t2) {}
12453
12454     QPair<T1, T2> &operator=(const QPair<T1, T2> &other)
12455     { first = other.first; second = other.second; return *this; }
12456
12457     T1 first;
12458     T2 second;
12459 };
12460
12461 template <class T1, class T2>
12462 inline bool operator==(const QPair<T1, T2> &p1, const QPair<T1, T2> &p2)
12463 { return p1.first == p2.first && p1.second == p2.second; }
12464
12465 template <class T1, class T2>
12466 inline bool operator!=(const QPair<T1, T2> &p1, const QPair<T1, T2> &p2)
12467 { return !(p1 == p2); }
12468
12469 template <class T1, class T2>
12470 inline bool operator<(const QPair<T1, T2> &p1, const QPair<T1, T2> &p2)
12471 {
12472     return p1.first < p2.first || (!(p2.first < p1.first) && p1.second < p2.second);
12473 }
12474
12475 template <class T1, class T2>
12476 inline bool operator>(const QPair<T1, T2> &p1, const QPair<T1, T2> &p2)
12477 {
12478     return p2 < p1;
12479 }
12480
12481 template <class T1, class T2>
12482 inline bool operator<=(const QPair<T1, T2> &p1, const QPair<T1, T2> &p2)
12483 {
12484     return !(p2 < p1);
12485 }
12486
12487 template <class T1, class T2>
12488 inline bool operator>=(const QPair<T1, T2> &p1, const QPair<T1, T2> &p2)
12489 {
12490     return !(p1 < p2);
12491 }
12492
12493 template <class T1, class T2>
12494  QPair<T1, T2> qMakePair(const T1 &x, const T2 &y)
12495 {
12496     return QPair<T1, T2>(x, y);
12497 }
12498
12499
12500 template <class T1, class T2>
12501 inline QDataStream& operator>>(QDataStream& s, QPair<T1, T2>& p)
12502 {
12503     s >> p.first >> p.second;
12504     return s;
12505 }
12506
12507 template <class T1, class T2>
12508 inline QDataStream& operator<<(QDataStream& s, const QPair<T1, T2>& p)
12509 {
12510     s << p.first << p.second;
12511     return s;
12512 }
12513 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qpair.h" 2
12514 # 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
12515
12516
12517
12518
12519 typedef QtValidLicenseForCoreModule QtCoreModule;
12520
12521 class QBitArray;
12522 class QByteArray;
12523 class QString;
12524 class QStringRef;
12525
12526 inline uint qHash(char key) { return uint(key); }
12527 inline uint qHash(uchar key) { return uint(key); }
12528 inline uint qHash(signed char key) { return uint(key); }
12529 inline uint qHash(ushort key) { return uint(key); }
12530 inline uint qHash(short key) { return uint(key); }
12531 inline uint qHash(uint key) { return key; }
12532 inline uint qHash(int key) { return uint(key); }
12533 inline uint qHash(ulong key)
12534 {
12535     if (sizeof(ulong) > sizeof(uint)) {
12536         return uint((key >> (8 * sizeof(uint) - 1)) ^ key);
12537     } else {
12538         return uint(key);
12539     }
12540 }
12541 inline uint qHash(long key) { return qHash(ulong(key)); }
12542 inline uint qHash(quint64 key)
12543 {
12544     if (sizeof(quint64) > sizeof(uint)) {
12545         return uint((key >> (8 * sizeof(uint) - 1)) ^ key);
12546     } else {
12547         return uint(key);
12548     }
12549 }
12550 inline uint qHash(qint64 key) { return qHash(quint64(key)); }
12551 inline uint qHash(QChar key) { return qHash(key.unicode()); }
12552  uint qHash(const QByteArray &key);
12553  uint qHash(const QString &key);
12554  uint qHash(const QStringRef &key);
12555  uint qHash(const QBitArray &key);
12556
12557
12558
12559
12560
12561 template <class T> inline uint qHash(const T *key)
12562 {
12563     if (sizeof(const T *) > sizeof(uint))
12564         return qHash(reinterpret_cast<quint64>(key));
12565     else
12566         return uint(reinterpret_cast<ulong>(key));
12567 }
12568
12569
12570
12571
12572 template <typename T1, typename T2> inline uint qHash(const QPair<T1, T2> &key)
12573 {
12574     uint h1 = qHash(key.first);
12575     uint h2 = qHash(key.second);
12576     return ((h1 << 16) | (h1 >> 16)) ^ h2;
12577 }
12578
12579 struct QHashData
12580 {
12581     struct Node {
12582         Node *next;
12583         uint h;
12584     };
12585
12586     Node *fakeNext;
12587     Node **buckets;
12588     QBasicAtomic ref;
12589     int size;
12590     int nodeSize;
12591     short userNumBits;
12592     short numBits;
12593     int numBuckets;
12594     uint sharable : 1;
12595
12596     void *allocateNode();
12597     void freeNode(void *node);
12598     QHashData *detach_helper(void (*node_duplicate)(Node *, void *), int nodeSize);
12599     void mightGrow();
12600     void hasShrunk();
12601     void rehash(int hint);
12602     void destroyAndFree();
12603     Node *firstNode();
12604
12605
12606
12607
12608     static Node *nextNode(Node *node);
12609     static Node *previousNode(Node *node);
12610
12611     static QHashData shared_null;
12612 };
12613
12614 inline void QHashData::mightGrow()
12615 {
12616     if (size >= numBuckets)
12617         rehash(numBits + 1);
12618 }
12619
12620 inline void QHashData::hasShrunk()
12621 {
12622     if (size <= (numBuckets >> 3) && numBits > userNumBits)
12623         rehash(qMax(int(numBits) - 2, int(userNumBits)));
12624 }
12625
12626 inline QHashData::Node *QHashData::firstNode()
12627 {
12628     Node *e = reinterpret_cast<Node *>(this);
12629     Node **bucket = buckets;
12630     int n = numBuckets;
12631     while (n--) {
12632         if (*bucket != e)
12633             return *bucket;
12634         ++bucket;
12635     }
12636     return e;
12637 }
12638
12639 struct QHashDummyValue
12640 {
12641 };
12642
12643 inline bool operator==(const QHashDummyValue & , const QHashDummyValue & )
12644 {
12645     return true;
12646 }
12647
12648 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"; } };
12649
12650 template <class Key, class T>
12651 struct QHashDummyNode
12652 {
12653     QHashDummyNode *next;
12654     uint h;
12655     Key key;
12656
12657     inline QHashDummyNode(const Key &key0) : key(key0) {}
12658 };
12659
12660 template <class Key, class T>
12661 struct QHashNode
12662 {
12663     QHashNode *next;
12664     uint h;
12665     Key key;
12666     T value;
12667
12668     inline QHashNode(const Key &key0) : key(key0) {}
12669     inline QHashNode(const Key &key0, const T &value0) : key(key0), value(value0) {}
12670     inline bool same_key(uint h0, const Key &key0) { return h0 == h && key0 == key; }
12671 };
12672 # 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"
12673 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; } };
12674 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; } };
12675
12676
12677
12678 template <class Key, class T>
12679 class QHash
12680 {
12681     typedef QHashDummyNode<Key, T> DummyNode;
12682     typedef QHashNode<Key, T> Node;
12683
12684     union {
12685         QHashData *d;
12686         QHashNode<Key, T> *e;
12687     };
12688
12689     static inline Node *concrete(QHashData::Node *node) {
12690         return reinterpret_cast<Node *>(node);
12691     }
12692
12693 public:
12694     inline QHash() : d(&QHashData::shared_null) { d->ref.ref(); }
12695     inline QHash(const QHash<Key, T> &other) : d(other.d) { d->ref.ref(); if (!d->sharable) detach(); }
12696     inline ~QHash() { if (!d->ref.deref()) freeData(d); }
12697
12698     QHash<Key, T> &operator=(const QHash<Key, T> &other);
12699
12700     bool operator==(const QHash<Key, T> &other) const;
12701     inline bool operator!=(const QHash<Key, T> &other) const { return !(*this == other); }
12702
12703     inline int size() const { return d->size; }
12704
12705     inline bool isEmpty() const { return d->size == 0; }
12706
12707     inline int capacity() const { return d->numBuckets; }
12708     void reserve(int size);
12709     inline void squeeze() { reserve(1); }
12710
12711     inline void detach() { if (d->ref != 1) detach_helper(); }
12712     inline bool isDetached() const { return d->ref == 1; }
12713     inline void setSharable(bool sharable) { if (!sharable) detach(); d->sharable = sharable; }
12714
12715     void clear();
12716
12717     int remove(const Key &key);
12718     T take(const Key &key);
12719
12720     bool contains(const Key &key) const;
12721     const Key key(const T &value) const;
12722     const Key key(const T &value, const Key &defaultKey) const;
12723     const T value(const Key &key) const;
12724     const T value(const Key &key, const T &defaultValue) const;
12725     T &operator[](const Key &key);
12726     const T operator[](const Key &key) const;
12727
12728     QList<Key> uniqueKeys() const;
12729     QList<Key> keys() const;
12730     QList<Key> keys(const T &value) const;
12731     QList<T> values() const;
12732     QList<T> values(const Key &key) const;
12733     int count(const Key &key) const;
12734
12735     class const_iterator;
12736
12737     class iterator
12738     {
12739         QHashData::Node *i;
12740
12741     public:
12742         typedef std::bidirectional_iterator_tag iterator_category;
12743         typedef ptrdiff_t difference_type;
12744         typedef T value_type;
12745         typedef T *pointer;
12746         typedef T &reference;
12747
12748
12749         inline operator Node *() const { return concrete(i); }
12750         inline iterator() : i(0) { }
12751         explicit inline iterator(void *node) : i(reinterpret_cast<QHashData::Node *>(node)) { }
12752
12753         inline const Key &key() const { return concrete(i)->key; }
12754         inline T &value() const { return concrete(i)->value; }
12755         inline T &operator*() const { return concrete(i)->value; }
12756         inline T *operator->() const { return &concrete(i)->value; }
12757         inline bool operator==(const iterator &o) const { return i == o.i; }
12758         inline bool operator!=(const iterator &o) const { return i != o.i; }
12759
12760         inline iterator &operator++() {
12761             i = QHashData::nextNode(i);
12762             return *this;
12763         }
12764         inline iterator operator++(int) {
12765             iterator r = *this;
12766             i = QHashData::nextNode(i);
12767             return r;
12768         }
12769         inline iterator &operator--() {
12770             i = QHashData::previousNode(i);
12771             return *this;
12772         }
12773         inline iterator operator--(int) {
12774             iterator r = *this;
12775             i = QHashData::previousNode(i);
12776             return r;
12777         }
12778         inline iterator operator+(int j) const
12779         { iterator r = *this; if (j > 0) while (j--) ++r; else while (j++) --r; return r; }
12780         inline iterator operator-(int j) const { return operator+(-j); }
12781         inline iterator &operator+=(int j) { return *this = *this + j; }
12782         inline iterator &operator-=(int j) { return *this = *this - j; }
12783
12784
12785
12786
12787
12788     public:
12789
12790         inline bool operator==(const const_iterator &o) const
12791             { return i == reinterpret_cast<const iterator &>(o).i; }
12792         inline bool operator!=(const const_iterator &o) const
12793             { return i != reinterpret_cast<const iterator &>(o).i; }
12794
12795     private:
12796
12797         inline operator bool() const { return false; }
12798     };
12799     friend class iterator;
12800
12801     class const_iterator
12802     {
12803         QHashData::Node *i;
12804
12805     public:
12806         typedef std::bidirectional_iterator_tag iterator_category;
12807         typedef ptrdiff_t difference_type;
12808         typedef T value_type;
12809         typedef const T *pointer;
12810         typedef const T &reference;
12811
12812
12813         inline operator Node *() const { return concrete(i); }
12814         inline const_iterator() : i(0) { }
12815         explicit inline const_iterator(void *node)
12816             : i(reinterpret_cast<QHashData::Node *>(node)) { }
12817
12818
12819
12820         inline const_iterator(const iterator &o)
12821
12822         { i = reinterpret_cast<const const_iterator &>(o).i; }
12823
12824         inline const Key &key() const { return concrete(i)->key; }
12825         inline const T &value() const { return concrete(i)->value; }
12826         inline const T &operator*() const { return concrete(i)->value; }
12827         inline const T *operator->() const { return &concrete(i)->value; }
12828         inline bool operator==(const const_iterator &o) const { return i == o.i; }
12829         inline bool operator!=(const const_iterator &o) const { return i != o.i; }
12830
12831         inline const_iterator &operator++() {
12832             i = QHashData::nextNode(i);
12833             return *this;
12834         }
12835         inline const_iterator operator++(int) {
12836             const_iterator r = *this;
12837             i = QHashData::nextNode(i);
12838             return r;
12839         }
12840         inline const_iterator &operator--() {
12841             i = QHashData::previousNode(i);
12842             return *this;
12843         }
12844         inline const_iterator operator--(int) {
12845             const_iterator r = *this;
12846             i = QHashData::previousNode(i);
12847             return r;
12848         }
12849         inline const_iterator operator+(int j) const
12850         { const_iterator r = *this; if (j > 0) while (j--) ++r; else while (j++) --r; return r; }
12851         inline const_iterator operator-(int j) const { return operator+(-j); }
12852         inline const_iterator &operator+=(int j) { return *this = *this + j; }
12853         inline const_iterator &operator-=(int j) { return *this = *this - j; }
12854 # 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"
12855     private:
12856
12857         inline operator bool() const { return false; }
12858     };
12859     friend class const_iterator;
12860
12861
12862     inline iterator begin() { detach(); return iterator(d->firstNode()); }
12863     inline const_iterator begin() const { return const_iterator(d->firstNode()); }
12864     inline const_iterator constBegin() const { return const_iterator(d->firstNode()); }
12865     inline iterator end() { detach(); return iterator(e); }
12866     inline const_iterator end() const { return const_iterator(e); }
12867     inline const_iterator constEnd() const { return const_iterator(e); }
12868     iterator erase(iterator it);
12869
12870
12871     typedef iterator Iterator;
12872     typedef const_iterator ConstIterator;
12873     inline int count() const { return d->size; }
12874     iterator find(const Key &key);
12875     const_iterator find(const Key &key) const;
12876     const_iterator constFind(const Key &key) const;
12877     iterator insert(const Key &key, const T &value);
12878     iterator insertMulti(const Key &key, const T &value);
12879     QHash<Key, T> &unite(const QHash<Key, T> &other);
12880
12881
12882     typedef T mapped_type;
12883     typedef Key key_type;
12884     typedef ptrdiff_t difference_type;
12885     typedef int size_type;
12886
12887     inline bool empty() const { return isEmpty(); }
12888
12889
12890
12891
12892
12893
12894 private:
12895     void detach_helper();
12896     void freeData(QHashData *d);
12897     Node **findNode(const Key &key, uint *hp = 0) const;
12898     Node *createNode(uint h, const Key &key, const T &value, Node **nextNode);
12899     void deleteNode(Node *node);
12900
12901     static void duplicateNode(QHashData::Node *originalNode, void *newNode);
12902 };
12903
12904 template <class Key, class T>
12905 inline void QHash<Key, T>::deleteNode(Node *node)
12906 {
12907
12908
12909
12910
12911
12912     node->~Node();
12913
12914     d->freeNode(node);
12915 }
12916
12917 template <class Key, class T>
12918 inline void QHash<Key, T>::duplicateNode(QHashData::Node *node, void *newNode)
12919 {
12920     Node *concreteNode = concrete(node);
12921     if (QTypeInfo<T>::isDummy) {
12922         (void) new (newNode) DummyNode(concreteNode->key);
12923     } else {
12924         (void) new (newNode) Node(concreteNode->key, concreteNode->value);
12925     }
12926 }
12927
12928 template <class Key, class T>
12929 inline typename QHash<Key, T>::Node *
12930 QHash<Key, T>::createNode(uint ah, const Key &akey, const T &avalue, Node **anextNode)
12931 {
12932     Node *node;
12933
12934     if (QTypeInfo<T>::isDummy) {
12935         node = reinterpret_cast<Node *>(new (d->allocateNode()) DummyNode(akey));
12936     } else {
12937         node = new (d->allocateNode()) Node(akey, avalue);
12938     }
12939
12940     node->h = ah;
12941     node->next = *anextNode;
12942     *anextNode = node;
12943     ++d->size;
12944     return node;
12945 }
12946
12947 template <class Key, class T>
12948 inline QHash<Key, T> &QHash<Key, T>::unite(const QHash<Key, T> &other)
12949 {
12950     QHash<Key, T> copy(other);
12951     const_iterator it = copy.constEnd();
12952     while (it != copy.constBegin()) {
12953         --it;
12954         insertMulti(it.key(), it.value());
12955     }
12956     return *this;
12957 }
12958
12959 template <class Key, class T>
12960  void QHash<Key, T>::freeData(QHashData *x)
12961 {
12962     Node *e_for_x = reinterpret_cast<Node *>(x);
12963     Node **bucket = reinterpret_cast<Node **>(x->buckets);
12964     int n = x->numBuckets;
12965     while (n--) {
12966         Node *cur = *bucket++;
12967         while (cur != e_for_x) {
12968             Node *next = cur->next;
12969             deleteNode(cur);
12970             cur = next;
12971         }
12972     }
12973     x->destroyAndFree();
12974 }
12975
12976 template <class Key, class T>
12977 inline void QHash<Key, T>::clear()
12978 {
12979     *this = QHash<Key,T>();
12980 }
12981
12982 template <class Key, class T>
12983  void QHash<Key, T>::detach_helper()
12984 {
12985     QHashData *x = d->detach_helper(duplicateNode,
12986         QTypeInfo<T>::isDummy ? sizeof(DummyNode) : sizeof(Node));
12987     x = qAtomicSetPtr(&d, x);
12988     if (!x->ref.deref())
12989         freeData(x);
12990 }
12991
12992 template <class Key, class T>
12993 inline QHash<Key, T> &QHash<Key, T>::operator=(const QHash<Key, T> &other)
12994 {
12995     if (d != other.d) {
12996         QHashData *x = other.d;
12997         x->ref.ref();
12998         x = qAtomicSetPtr(&d, x);
12999         if (!x->ref.deref())
13000             freeData(x);
13001         if (!d->sharable)
13002             detach_helper();
13003     }
13004     return *this;
13005 }
13006
13007 template <class Key, class T>
13008 inline const T QHash<Key, T>::value(const Key &akey) const
13009 {
13010     Node *node;
13011     if (d->size == 0 || (node = *findNode(akey)) == e) {
13012         return T();
13013     } else {
13014         return node->value;
13015     }
13016 }
13017
13018 template <class Key, class T>
13019 inline const T QHash<Key, T>::value(const Key &akey, const T &adefaultValue) const
13020 {
13021     Node *node;
13022     if (d->size == 0 || (node = *findNode(akey)) == e) {
13023         return adefaultValue;
13024     } else {
13025         return node->value;
13026     }
13027 }
13028
13029 template <class Key, class T>
13030  QList<Key> QHash<Key, T>::uniqueKeys() const
13031 {
13032     QList<Key> res;
13033     const_iterator i = begin();
13034     if (i != end()) {
13035         for (;;) {
13036             const Key &aKey = i.key();
13037             res.append(aKey);
13038             do {
13039                 if (++i == end())
13040                     goto break_out_of_outer_loop;
13041             } while (aKey == i.key());
13042         }
13043     }
13044 break_out_of_outer_loop:
13045     return res;
13046 }
13047
13048 template <class Key, class T>
13049  QList<Key> QHash<Key, T>::keys() const
13050 {
13051     QList<Key> res;
13052     const_iterator i = begin();
13053     while (i != end()) {
13054         res.append(i.key());
13055         ++i;
13056     }
13057     return res;
13058 }
13059
13060 template <class Key, class T>
13061  QList<Key> QHash<Key, T>::keys(const T &avalue) const
13062 {
13063     QList<Key> res;
13064     const_iterator i = begin();
13065     while (i != end()) {
13066         if (i.value() == avalue)
13067             res.append(i.key());
13068         ++i;
13069     }
13070     return res;
13071 }
13072
13073 template <class Key, class T>
13074  const Key QHash<Key, T>::key(const T &avalue) const
13075 {
13076     return key(avalue, Key());
13077 }
13078
13079 template <class Key, class T>
13080  const Key QHash<Key, T>::key(const T &avalue, const Key &defaultValue) const
13081 {
13082     const_iterator i = begin();
13083     while (i != end()) {
13084         if (i.value() == avalue)
13085             return i.key();
13086         ++i;
13087     }
13088
13089     return defaultValue;
13090 }
13091
13092 template <class Key, class T>
13093  QList<T> QHash<Key, T>::values() const
13094 {
13095     QList<T> res;
13096     const_iterator i = begin();
13097     while (i != end()) {
13098         res.append(i.value());
13099         ++i;
13100     }
13101     return res;
13102 }
13103
13104 template <class Key, class T>
13105  QList<T> QHash<Key, T>::values(const Key &akey) const
13106 {
13107     QList<T> res;
13108     Node *node = *findNode(akey);
13109     if (node != e) {
13110         do {
13111             res.append(node->value);
13112         } while ((node = node->next) != e && node->key == akey);
13113     }
13114     return res;
13115 }
13116
13117 template <class Key, class T>
13118  int QHash<Key, T>::count(const Key &akey) const
13119 {
13120     int cnt = 0;
13121     Node *node = *findNode(akey);
13122     if (node != e) {
13123         do {
13124             ++cnt;
13125         } while ((node = node->next) != e && node->key == akey);
13126     }
13127     return cnt;
13128 }
13129
13130 template <class Key, class T>
13131 inline const T QHash<Key, T>::operator[](const Key &akey) const
13132 {
13133     return value(akey);
13134 }
13135
13136 template <class Key, class T>
13137 inline T &QHash<Key, T>::operator[](const Key &akey)
13138 {
13139     detach();
13140     d->mightGrow();
13141
13142     uint h;
13143     Node **node = findNode(akey, &h);
13144     if (*node == e)
13145         return createNode(h, akey, T(), node)->value;
13146     return (*node)->value;
13147 }
13148
13149 template <class Key, class T>
13150 inline typename QHash<Key, T>::iterator QHash<Key, T>::insert(const Key &akey,
13151                                                                          const T &avalue)
13152 {
13153     detach();
13154     d->mightGrow();
13155
13156     uint h;
13157     Node **node = findNode(akey, &h);
13158     if (*node == e)
13159         return iterator(createNode(h, akey, avalue, node));
13160
13161     if (!QTypeInfo<T>::isDummy)
13162         (*node)->value = avalue;
13163     return iterator(*node);
13164 }
13165
13166 template <class Key, class T>
13167 inline typename QHash<Key, T>::iterator QHash<Key, T>::insertMulti(const Key &akey,
13168                                                                               const T &avalue)
13169 {
13170     detach();
13171     d->mightGrow();
13172
13173     uint h;
13174     Node **nextNode = findNode(akey, &h);
13175     return iterator(createNode(h, akey, avalue, nextNode));
13176 }
13177
13178 template <class Key, class T>
13179  int QHash<Key, T>::remove(const Key &akey)
13180 {
13181     detach();
13182
13183     int oldSize = d->size;
13184     Node **node = findNode(akey);
13185     if (*node != e) {
13186         bool deleteNext = true;
13187         do {
13188             Node *next = (*node)->next;
13189             deleteNext = (next != e && next->key == (*node)->key);
13190             deleteNode(*node);
13191             *node = next;
13192             --d->size;
13193         } while (deleteNext);
13194         d->hasShrunk();
13195     }
13196     return oldSize - d->size;
13197 }
13198
13199 template <class Key, class T>
13200  T QHash<Key, T>::take(const Key &akey)
13201 {
13202     detach();
13203
13204     Node **node = findNode(akey);
13205     if (*node != e) {
13206         T t = (*node)->value;
13207         Node *next = (*node)->next;
13208         deleteNode(*node);
13209         *node = next;
13210         --d->size;
13211         d->hasShrunk();
13212         return t;
13213     }
13214     return T();
13215 }
13216
13217 template <class Key, class T>
13218  typename QHash<Key, T>::iterator QHash<Key, T>::erase(iterator it)
13219 {
13220     if (it == iterator(e))
13221         return it;
13222
13223     iterator ret = it;
13224     ++ret;
13225
13226     Node *node = it;
13227     Node **node_ptr = reinterpret_cast<Node **>(&d->buckets[node->h % d->numBuckets]);
13228     while (*node_ptr != node)
13229         node_ptr = &(*node_ptr)->next;
13230     *node_ptr = node->next;
13231     deleteNode(node);
13232     --d->size;
13233     return ret;
13234 }
13235
13236 template <class Key, class T>
13237 inline void QHash<Key, T>::reserve(int asize)
13238 {
13239     detach();
13240     d->rehash(-qMax(asize, 1));
13241 }
13242
13243 template <class Key, class T>
13244 inline typename QHash<Key, T>::const_iterator QHash<Key, T>::find(const Key &akey) const
13245 {
13246     return const_iterator(*findNode(akey));
13247 }
13248
13249 template <class Key, class T>
13250 inline typename QHash<Key, T>::const_iterator QHash<Key, T>::constFind(const Key &akey) const
13251 {
13252     return const_iterator(*findNode(akey));
13253 }
13254
13255 template <class Key, class T>
13256 inline typename QHash<Key, T>::iterator QHash<Key, T>::find(const Key &akey)
13257 {
13258     detach();
13259     return iterator(*findNode(akey));
13260 }
13261
13262 template <class Key, class T>
13263 inline bool QHash<Key, T>::contains(const Key &akey) const
13264 {
13265     return *findNode(akey) != e;
13266 }
13267
13268 template <class Key, class T>
13269  typename QHash<Key, T>::Node **QHash<Key, T>::findNode(const Key &akey,
13270                                                                             uint *ahp) const
13271 {
13272     Node **node;
13273     uint h = qHash(akey);
13274
13275     if (d->numBuckets) {
13276         node = reinterpret_cast<Node **>(&d->buckets[h % d->numBuckets]);
13277         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);
13278         while (*node != e && !(*node)->same_key(h, akey))
13279             node = &(*node)->next;
13280     } else {
13281         node = const_cast<Node **>(reinterpret_cast<const Node * const *>(&e));
13282     }
13283     if (ahp)
13284         *ahp = h;
13285     return node;
13286 }
13287
13288 template <class Key, class T>
13289  bool QHash<Key, T>::operator==(const QHash<Key, T> &other) const
13290 {
13291     if (size() != other.size())
13292         return false;
13293     if (d == other.d)
13294         return true;
13295
13296     const_iterator it = begin();
13297
13298     while (it != end()) {
13299         const Key &akey = it.key();
13300
13301         const_iterator it2 = other.find(akey);
13302         do {
13303             if (it2 == other.end() || !(it2.key() == akey))
13304                 return false;
13305             if (!QTypeInfo<T>::isDummy && !(it.value() == it2.value()))
13306                 return false;
13307             ++it;
13308             ++it2;
13309         } while (it != end() && it.key() == akey);
13310     }
13311     return true;
13312 }
13313
13314 template <class Key, class T>
13315 class QMultiHash : public QHash<Key, T>
13316 {
13317 public:
13318     QMultiHash() {}
13319     QMultiHash(const QHash<Key, T> &other) : QHash<Key, T>(other) {}
13320
13321     inline typename QHash<Key, T>::iterator replace(const Key &key, const T &value)
13322     { return QHash<Key, T>::insert(key, value); }
13323
13324     inline typename QHash<Key, T>::iterator insert(const Key &key, const T &value)
13325     { return QHash<Key, T>::insertMulti(key, value); }
13326
13327     inline QMultiHash &operator+=(const QMultiHash &other)
13328     { unite(other); return *this; }
13329     inline QMultiHash operator+(const QMultiHash &other) const
13330     { QMultiHash result = *this; result += other; return result; }
13331
13332
13333     using QHash<Key, T>::contains;
13334     using QHash<Key, T>::remove;
13335     using QHash<Key, T>::count;
13336     using QHash<Key, T>::find;
13337     using QHash<Key, T>::constFind;
13338 # 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"
13339     bool contains(const Key &key, const T &value) const;
13340
13341     int remove(const Key &key, const T &value);
13342
13343     int count(const Key &key, const T &value) const;
13344
13345     typename QHash<Key, T>::iterator find(const Key &key, const T &value) {
13346         typename QHash<Key, T>::iterator i(find(key));
13347         typename QHash<Key, T>::iterator end(this->end());
13348         while (i != end && i.key() == key) {
13349             if (i.value() == value)
13350                 return i;
13351             ++i;
13352         }
13353         return end;
13354     }
13355     typename QHash<Key, T>::const_iterator find(const Key &key, const T &value) const {
13356         typename QHash<Key, T>::const_iterator i(constFind(key));
13357         typename QHash<Key, T>::const_iterator end(QHash<Key, T>::constEnd());
13358         while (i != end && i.key() == key) {
13359             if (i.value() == value)
13360                 return i;
13361             ++i;
13362         }
13363         return end;
13364     }
13365     typename QHash<Key, T>::const_iterator constFind(const Key &key, const T &value) const
13366         { return find(key, value); }
13367 private:
13368     T &operator[](const Key &key);
13369     const T operator[](const Key &key) const;
13370 };
13371
13372 template <class Key, class T>
13373 inline bool QMultiHash<Key, T>::contains(const Key &key, const T &value) const
13374 {
13375     return constFind(key, value) != QHash<Key, T>::constEnd();
13376 }
13377
13378 template <class Key, class T>
13379 inline int QMultiHash<Key, T>::remove(const Key &key, const T &value)
13380 {
13381     int n = 0;
13382     typename QHash<Key, T>::iterator i(find(key));
13383     typename QHash<Key, T>::const_iterator end(QHash<Key, T>::constEnd());
13384     while (i != end && i.key() == key) {
13385         if (i.value() == value) {
13386             i = erase(i);
13387             ++n;
13388         } else {
13389             ++i;
13390         }
13391     }
13392     return n;
13393 }
13394
13395 template <class Key, class T>
13396 inline int QMultiHash<Key, T>::count(const Key &key, const T &value) const
13397 {
13398     int n = 0;
13399     typename QHash<Key, T>::const_iterator i(constFind(key));
13400     typename QHash<Key, T>::const_iterator end(QHash<Key, T>::constEnd());
13401     while (i != end && i.key() == key) {
13402         if (i.value() == value)
13403             ++n;
13404         ++i;
13405     }
13406     return n;
13407 }
13408
13409 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; } };
13410 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; } };
13411 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qhash.h" 2
13412 # 48 "generators/makefile.h" 2
13413
13414 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qfileinfo.h" 1
13415 # 49 "generators/makefile.h" 2
13416
13417
13418
13419
13420
13421
13422
13423 struct ReplaceExtraCompilerCacheKey
13424 {
13425     mutable uint hash;
13426     QString var, in, out, pwd;
13427     ReplaceExtraCompilerCacheKey(const QString &v, const QStringList &i, const QStringList &o);
13428     bool operator==(const ReplaceExtraCompilerCacheKey &f) const;
13429     inline uint hashCode() const {
13430         if(!hash)
13431             hash = qHash(var) | qHash(in) | qHash(out) ;
13432         return hash;
13433     }
13434 };
13435 inline uint qHash(const ReplaceExtraCompilerCacheKey &f) { return f.hashCode(); }
13436
13437 struct ReplaceExtraCompilerCacheKey;
13438
13439 class MakefileGenerator : protected QMakeSourceFileInfo
13440 {
13441     QString spec;
13442     bool init_opath_already, init_already, no_io;
13443     QHash<QString, bool> init_compiler_already;
13444     QString build_args(const QString &outdir=QString());
13445     void checkMultipleDefinition(const QString &, const QString &);
13446
13447
13448     mutable QHash<QString, QMakeLocalFileName> depHeuristicsCache;
13449     mutable QHash<QString, QStringList> dependsCache;
13450     mutable QHash<ReplaceExtraCompilerCacheKey, QString> extraCompilerVariablesCache;
13451
13452 protected:
13453     QStringList createObjectList(const QStringList &sources);
13454
13455
13456     void writeObj(QTextStream &, const QString &src);
13457     void writeInstalls(QTextStream &t, const QString &installs, bool noBuild=false);
13458     void writeHeader(QTextStream &t);
13459     void writeSubDirs(QTextStream &t);
13460     void writeMakeQmake(QTextStream &t);
13461     void writeExtraVariables(QTextStream &t);
13462     void writeExtraTargets(QTextStream &t);
13463     void writeExtraCompilerTargets(QTextStream &t);
13464     void writeExtraCompilerVariables(QTextStream &t);
13465     virtual bool writeStubMakefile(QTextStream &t);
13466     virtual bool writeMakefile(QTextStream &t);
13467
13468
13469     struct SubTarget
13470     {
13471         QString name;
13472  QString in_directory, out_directory;
13473         QString profile, target, makefile;
13474         QStringList depends;
13475     };
13476     enum SubTargetFlags {
13477         SubTargetInstalls=0x01,
13478         SubTargetOrdered=0x02,
13479
13480         SubTargetsNoFlags=0x00
13481     };
13482     void writeSubTargets(QTextStream &t, QList<SubTarget*> subtargets, int flags);
13483
13484
13485     bool verifyExtraCompiler(const QString &c, const QString &f);
13486     virtual QString replaceExtraCompilerVariables(const QString &, const QStringList &, const QStringList &);
13487     inline QString replaceExtraCompilerVariables(const QString &val, const QString &in, const QString &out)
13488     { return replaceExtraCompilerVariables(val, QStringList(in), QStringList(out)); }
13489
13490
13491     QMakeLocalFileName fixPathForFile(const QMakeLocalFileName &, bool);
13492     QMakeLocalFileName findFileForDep(const QMakeLocalFileName &, const QMakeLocalFileName &);
13493     QFileInfo findFileInfo(const QMakeLocalFileName &);
13494     QMakeProject *project;
13495
13496
13497     virtual QString unescapeFilePath(const QString &path) const;
13498     virtual QStringList unescapeFilePaths(const QStringList &path) const;
13499     virtual QString escapeFilePath(const QString &path) const { return path; }
13500     QStringList escapeFilePaths(const QStringList &paths) const;
13501
13502
13503     void verifyCompilers();
13504     virtual void init();
13505     void initOutPaths();
13506     struct Compiler
13507     {
13508         QString variable_in;
13509         enum CompilerFlag {
13510             CompilerNoFlags = 0x00,
13511             CompilerBuiltin = 0x01,
13512             CompilerNoCheckDeps = 0x02,
13513             CompilerRemoveNoExist = 0x04
13514         };
13515         uint flags, type;
13516     };
13517     void initCompiler(const Compiler &comp);
13518     enum VPATHFlag {
13519         VPATH_NoFlag = 0x00,
13520         VPATH_WarnMissingFiles = 0x01,
13521         VPATH_RemoveMissingFiles = 0x02,
13522         VPATH_NoFixify = 0x04
13523     };
13524     QStringList findFilesInVPATH(QStringList l, uchar flags, const QString &var="");
13525
13526     inline int findExecutable(const QStringList &cmdline)
13527     { int ret; canExecute(cmdline, &ret); return ret; }
13528     bool canExecute(const QStringList &cmdline, int *argv0) const;
13529     inline bool canExecute(const QString &cmdline) const
13530     { return canExecute(cmdline.split(' '), 0); }
13531
13532     bool mkdir(const QString &dir) const;
13533     QString mkdir_p_asstring(const QString &dir, bool escape=true) const;
13534
13535
13536     QString buildArgs(const QString &outdir=QString());
13537     QString specdir(const QString &outdir=QString());
13538
13539     virtual QStringList &findDependencies(const QString &file);
13540     virtual bool doDepends() const { return Option::mkfile::do_deps; }
13541
13542     void filterIncludedFiles(const QString &);
13543     virtual void processSources() { filterIncludedFiles("SOURCES"); filterIncludedFiles("GENERATED_SOURCES"); }
13544
13545
13546     virtual void usePlatformDir();
13547
13548
13549     virtual QString defaultInstall(const QString &);
13550
13551
13552     QString prlFileName(bool fixify=true);
13553     void writePrlFile();
13554     bool processPrlFile(QString &);
13555     virtual void processPrlVariable(const QString &, const QStringList &);
13556     virtual void processPrlFiles();
13557     virtual void writePrlFile(QTextStream &);
13558
13559
13560     virtual bool findLibraries();
13561
13562
13563     virtual QString var(const QString &var);
13564     QString varGlue(const QString &var, const QString &before, const QString &glue, const QString &after);
13565     QString varList(const QString &var);
13566     QString val(const QStringList &varList);
13567     QString valGlue(const QStringList &varList, const QString &before, const QString &glue, const QString &after);
13568     QString valList(const QStringList &varList);
13569
13570     QString filePrefixRoot(const QString &, const QString &);
13571
13572
13573     enum FileFixifyType { FileFixifyAbsolute, FileFixifyRelative, FileFixifyDefault };
13574     QString fileFixify(const QString& file, const QString &out_dir=QString(),
13575                        const QString &in_dir=QString(), FileFixifyType fix=FileFixifyDefault, bool canon=true) const;
13576     inline QString fileFixify(const QString& file, FileFixifyType fix, bool canon=true) const
13577     { return fileFixify(file, QString(), QString(), fix, canon); }
13578     QStringList fileFixify(const QStringList& files, const QString &out_dir=QString(),
13579                            const QString &in_dir=QString(), FileFixifyType fix=FileFixifyDefault, bool canon=true) const;
13580     inline QStringList fileFixify(const QStringList& files, FileFixifyType fix, bool canon=true) const
13581     { return fileFixify(files, QString(), QString(), fix, canon); }
13582
13583 public:
13584     MakefileGenerator();
13585     virtual ~MakefileGenerator();
13586     QMakeProject *projectFile() const;
13587     void setProjectFile(QMakeProject *p);
13588
13589     void setNoIO(bool o);
13590     bool noIO() const;
13591
13592     inline bool exists(QString file) const { return fileInfo(file).exists(); }
13593     QFileInfo fileInfo(QString file) const;
13594
13595     static MakefileGenerator *create(QMakeProject *);
13596     virtual bool write();
13597     virtual bool writeProjectMakefile();
13598     virtual bool supportsMetaBuild() { return true; }
13599     virtual bool supportsMergedBuilds() { return false; }
13600     virtual bool mergeBuildProject(MakefileGenerator * ) { return false; }
13601     virtual bool openOutput(QFile &, const QString &build) const;
13602     virtual bool isWindowsShell() const { return Option::target_mode == Option::TARG_WIN_MODE; }
13603 };
13604
13605 inline void MakefileGenerator::setNoIO(bool o)
13606 { no_io = o; }
13607
13608 inline bool MakefileGenerator::noIO() const
13609 { return no_io; }
13610
13611 inline QString MakefileGenerator::defaultInstall(const QString &)
13612 { return QString(""); }
13613
13614 inline bool MakefileGenerator::findLibraries()
13615 { return true; }
13616
13617 inline MakefileGenerator::~MakefileGenerator()
13618 { }
13619 # 43 "generators/unix/unixmake.h" 2
13620
13621 class UnixMakefileGenerator : public MakefileGenerator
13622 {
13623     bool init_flag, include_deps;
13624     bool writeMakefile(QTextStream &);
13625     QString libtoolFileName(bool fixify=true);
13626     void writeLibtoolFile();
13627     QString pkgConfigPrefix() const;
13628     QString pkgConfigFileName(bool fixify=true);
13629     QString pkgConfigFixPath(QString) const;
13630     void writePkgConfigFile();
13631     void writePrlFile(QTextStream &);
13632
13633 public:
13634     UnixMakefileGenerator();
13635     ~UnixMakefileGenerator();
13636
13637 protected:
13638     virtual bool doPrecompiledHeaders() const { return project->isActiveConfig("precompile_header"); }
13639     virtual bool doDepends() const { return !include_deps && !Option::mkfile::do_stub_makefile && MakefileGenerator::doDepends(); }
13640     virtual QString defaultInstall(const QString &);
13641     virtual void processPrlVariable(const QString &, const QStringList &);
13642     virtual void processPrlFiles();
13643
13644     virtual bool findLibraries();
13645     virtual QString escapeFilePath(const QString &path) const;
13646     virtual QStringList &findDependencies(const QString &);
13647     virtual void init();
13648
13649     void writeMakeParts(QTextStream &);
13650
13651 private:
13652     void init2();
13653 };
13654
13655 inline UnixMakefileGenerator::~UnixMakefileGenerator()
13656 { }
13657 # 40 "generators/unix/unixmake2.cpp" 2
13658
13659 # 1 "./option.h" 1
13660 # 41 "generators/unix/unixmake2.cpp" 2
13661
13662 # 1 "./meta.h" 1
13663 # 42 "./meta.h"
13664
13665 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qmap.h" 1
13666 # 43 "./meta.h" 2
13667
13668 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qstringlist.h" 1
13669 # 44 "./meta.h" 2
13670
13671 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qstring.h" 1
13672 # 45 "./meta.h" 2
13673
13674 class QMakeMetaInfo
13675 {
13676     bool readLibtoolFile(const QString &f);
13677     bool readPkgCfgFile(const QString &f);
13678     QMap<QString, QStringList> vars;
13679     QString meta_type;
13680     static QMap<QString, QMap<QString, QStringList> > cache_vars;
13681     void clear();
13682 public:
13683     QMakeMetaInfo();
13684
13685     bool readLib(QString lib);
13686     static QString findLib(QString lib);
13687     static bool libExists(QString lib);
13688     QString type() const;
13689
13690     bool isEmpty(const QString &v);
13691     QStringList &values(const QString &v);
13692     QString first(const QString &v);
13693     QMap<QString, QStringList> &variables();
13694 };
13695
13696 inline bool QMakeMetaInfo::isEmpty(const QString &v)
13697 { return !vars.contains(v) || vars[v].isEmpty(); }
13698
13699 inline QString QMakeMetaInfo::type() const
13700 { return meta_type; }
13701
13702 inline QStringList &QMakeMetaInfo::values(const QString &v)
13703 { return vars[v]; }
13704
13705 inline QString QMakeMetaInfo::first(const QString &v)
13706 {
13707
13708
13709
13710
13711
13712
13713
13714     return isEmpty(v) ? QString("") : vars[v].first();
13715
13716 }
13717
13718 inline QMap<QString, QStringList> &QMakeMetaInfo::variables()
13719 { return vars; }
13720
13721 inline bool QMakeMetaInfo::libExists(QString lib)
13722 { return !findLib(lib).isNull(); }
13723 # 42 "generators/unix/unixmake2.cpp" 2
13724
13725 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qregexp.h" 1
13726 # 43 "generators/unix/unixmake2.cpp" 2
13727
13728 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qbytearray.h" 1
13729 # 44 "generators/unix/unixmake2.cpp" 2
13730
13731 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qfile.h" 1
13732 # 45 "generators/unix/unixmake2.cpp" 2
13733
13734 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qdir.h" 1
13735
13736 # 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
13737 # 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"
13738
13739 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qstring.h" 1
13740 # 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
13741
13742 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qfileinfo.h" 1
13743 # 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
13744
13745 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qstringlist.h" 1
13746 # 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
13747
13748
13749
13750 typedef QtValidLicenseForCoreModule QtCoreModule;
13751
13752 class QDirPrivate;
13753
13754 class QDir
13755 {
13756 protected:
13757     QDirPrivate *d_ptr;
13758 private:
13759     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;
13760 public:
13761     enum Filter { Dirs = 0x001,
13762                   Files = 0x002,
13763                   Drives = 0x004,
13764                   NoSymLinks = 0x008,
13765                   AllEntries = Dirs | Files | Drives,
13766                   TypeMask = 0x00f,
13767
13768
13769
13770
13771                   Readable = 0x010,
13772                   Writable = 0x020,
13773                   Executable = 0x040,
13774                   PermissionMask = 0x070,
13775
13776
13777
13778
13779                   Modified = 0x080,
13780                   Hidden = 0x100,
13781                   System = 0x200,
13782
13783                   AccessMask = 0x3F0,
13784
13785                   AllDirs = 0x400,
13786                   CaseSensitive = 0x800,
13787                   NoDotAndDotDot = 0x1000,
13788
13789                   NoFilter = -1
13790
13791
13792
13793     };
13794     typedef QFlags<Filter> Filters;
13795
13796
13797
13798
13799     enum SortFlag { Name = 0x00,
13800                     Time = 0x01,
13801                     Size = 0x02,
13802                     Unsorted = 0x03,
13803                     SortByMask = 0x03,
13804
13805                     DirsFirst = 0x04,
13806                     Reversed = 0x08,
13807                     IgnoreCase = 0x10,
13808                     DirsLast = 0x20,
13809                     LocaleAware = 0x40,
13810                     Type = 0x80,
13811                     NoSort = -1
13812
13813
13814
13815     };
13816     typedef QFlags<SortFlag> SortFlags;
13817
13818     QDir(const QDir &);
13819     QDir(const QString &path = QString());
13820     QDir(const QString &path, const QString &nameFilter,
13821          SortFlags sort = SortFlags(Name | IgnoreCase), Filters filter = AllEntries);
13822     ~QDir();
13823
13824     QDir &operator=(const QDir &);
13825     QDir &operator=(const QString &path);
13826
13827     void setPath(const QString &path);
13828     QString path() const;
13829     QString absolutePath() const;
13830     QString canonicalPath() const;
13831
13832     static void addResourceSearchPath(const QString &path);
13833
13834     static void setSearchPaths(const QString &prefix, const QStringList &searchPaths);
13835     static void addSearchPath(const QString &prefix, const QString &path);
13836     static QStringList searchPaths(const QString &prefix);
13837
13838     QString dirName() const;
13839     QString filePath(const QString &fileName) const;
13840     QString absoluteFilePath(const QString &fileName) const;
13841     QString relativeFilePath(const QString &fileName) const;
13842
13843
13844     static QString convertSeparators(const QString &pathName);
13845
13846     static QString toNativeSeparators(const QString &pathName);
13847     static QString fromNativeSeparators(const QString &pathName);
13848
13849     bool cd(const QString &dirName);
13850     bool cdUp();
13851
13852     QStringList nameFilters() const;
13853     void setNameFilters(const QStringList &nameFilters);
13854
13855     Filters filter() const;
13856     void setFilter(Filters filter);
13857     SortFlags sorting() const;
13858     void setSorting(SortFlags sort);
13859
13860     uint count() const;
13861     QString operator[](int) const;
13862
13863     static QStringList nameFiltersFromString(const QString &nameFilter);
13864
13865     QStringList entryList(Filters filters = NoFilter, SortFlags sort = NoSort) const;
13866     QStringList entryList(const QStringList &nameFilters, Filters filters = NoFilter,
13867                           SortFlags sort = NoSort) const;
13868
13869     QFileInfoList entryInfoList(Filters filters = NoFilter, SortFlags sort = NoSort) const;
13870     QFileInfoList entryInfoList(const QStringList &nameFilters, Filters filters = NoFilter,
13871                                 SortFlags sort = NoSort) const;
13872
13873     bool mkdir(const QString &dirName) const;
13874     bool rmdir(const QString &dirName) const;
13875     bool mkpath(const QString &dirPath) const;
13876     bool rmpath(const QString &dirPath) const;
13877
13878     bool isReadable() const;
13879     bool exists() const;
13880     bool isRoot() const;
13881
13882     static bool isRelativePath(const QString &path);
13883     inline static bool isAbsolutePath(const QString &path) { return !isRelativePath(path); }
13884     bool isRelative() const;
13885     inline bool isAbsolute() const { return !isRelative(); }
13886     bool makeAbsolute();
13887
13888     bool operator==(const QDir &dir) const;
13889     inline bool operator!=(const QDir &dir) const { return !operator==(dir); }
13890
13891     bool remove(const QString &fileName);
13892     bool rename(const QString &oldName, const QString &newName);
13893     bool exists(const QString &name) const;
13894
13895     static QFileInfoList drives();
13896
13897     static QChar separator();
13898
13899     static bool setCurrent(const QString &path);
13900     static inline QDir current() { return QDir(currentPath()); }
13901     static QString currentPath();
13902
13903     static inline QDir home() { return QDir(homePath()); }
13904     static QString homePath();
13905     static inline QDir root() { return QDir(rootPath()); }
13906     static QString rootPath();
13907     static inline QDir temp() { return QDir(tempPath()); }
13908     static QString tempPath();
13909
13910
13911     static bool match(const QStringList &filters, const QString &fileName);
13912     static bool match(const QString &filter, const QString &fileName);
13913
13914     static QString cleanPath(const QString &path);
13915     void refresh() const;
13916 # 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"
13917 };
13918
13919 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; }
13920 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; }
13921
13922
13923 class QDebug;
13924  QDebug operator<<(QDebug debug, QDir::Filters filters);
13925  QDebug operator<<(QDebug debug, const QDir &dir);
13926 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qdir.h" 2
13927 # 46 "generators/unix/unixmake2.cpp" 2
13928
13929 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qdatetime.h" 1
13930
13931 # 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
13932 # 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"
13933
13934 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qstring.h" 1
13935 # 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
13936
13937 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qnamespace.h" 1
13938 # 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
13939
13940
13941
13942 typedef QtValidLicenseForCoreModule QtCoreModule;
13943
13944 class QDate
13945 {
13946 public:
13947     QDate() { jd = 0; }
13948     QDate(int y, int m, int d);
13949
13950     bool isNull() const { return jd == 0; }
13951     bool isValid() const;
13952
13953     int year() const;
13954     int month() const;
13955     int day() const;
13956     int dayOfWeek() const;
13957     int dayOfYear() const;
13958     int daysInMonth() const;
13959     int daysInYear() const;
13960     int weekNumber(int *yearNum = 0) const;
13961
13962
13963
13964
13965
13966
13967     static QString shortMonthName(int month);
13968     static QString shortDayName(int weekday);
13969     static QString longMonthName(int month);
13970     static QString longDayName(int weekday);
13971
13972
13973     QString toString(Qt::DateFormat f = Qt::TextDate) const;
13974     QString toString(const QString &format) const;
13975
13976     bool setYMD(int y, int m, int d);
13977     bool setDate(int year, int month, int date);
13978
13979     QDate addDays(int days) const;
13980     QDate addMonths(int months) const;
13981     QDate addYears(int years) const;
13982     int daysTo(const QDate &) const;
13983
13984     bool operator==(const QDate &other) const { return jd == other.jd; }
13985     bool operator!=(const QDate &other) const { return jd != other.jd; }
13986     bool operator<(const QDate &other) const { return jd < other.jd; }
13987     bool operator<=(const QDate &other) const { return jd <= other.jd; }
13988     bool operator>(const QDate &other) const { return jd > other.jd; }
13989     bool operator>=(const QDate &other) const { return jd >= other.jd; }
13990
13991     static QDate currentDate();
13992
13993     static QDate fromString(const QString &s, Qt::DateFormat f = Qt::TextDate);
13994     static QDate fromString(const QString &s, const QString &format);
13995
13996     static bool isValid(int y, int m, int d);
13997     static bool isLeapYear(int year);
13998
13999
14000
14001
14002
14003     static uint gregorianToJulian(int y, int m, int d);
14004     static void julianToGregorian(uint jd, int &y, int &m, int &d);
14005
14006
14007
14008
14009
14010     static inline QDate fromJulianDay(int jd) { QDate d; d.jd = jd; return d; }
14011     inline int toJulianDay() const { return jd; }
14012
14013 private:
14014     uint jd;
14015
14016     friend class QDateTime;
14017     friend class QDateTimePrivate;
14018
14019     friend QDataStream &operator<<(QDataStream &, const QDate &);
14020     friend QDataStream &operator>>(QDataStream &, QDate &);
14021
14022 };
14023 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"; } };
14024
14025 class QTime
14026 {
14027 public:
14028     QTime(): mds(NullTime) {}
14029     QTime(int h, int m, int s = 0, int ms = 0);
14030
14031     bool isNull() const { return mds == NullTime; }
14032     bool isValid() const;
14033
14034     int hour() const;
14035     int minute() const;
14036     int second() const;
14037     int msec() const;
14038
14039     QString toString(Qt::DateFormat f = Qt::TextDate) const;
14040     QString toString(const QString &format) const;
14041
14042     bool setHMS(int h, int m, int s, int ms = 0);
14043
14044     QTime addSecs(int secs) const;
14045     int secsTo(const QTime &) const;
14046     QTime addMSecs(int ms) const;
14047     int msecsTo(const QTime &) const;
14048
14049     bool operator==(const QTime &other) const { return mds == other.mds; }
14050     bool operator!=(const QTime &other) const { return mds != other.mds; }
14051     bool operator<(const QTime &other) const { return mds < other.mds; }
14052     bool operator<=(const QTime &other) const { return mds <= other.mds; }
14053     bool operator>(const QTime &other) const { return mds > other.mds; }
14054     bool operator>=(const QTime &other) const { return mds >= other.mds; }
14055
14056     static QTime currentTime();
14057
14058     static QTime fromString(const QString &s, Qt::DateFormat f = Qt::TextDate);
14059     static QTime fromString(const QString &s, const QString &format);
14060
14061     static bool isValid(int h, int m, int s, int ms = 0);
14062
14063
14064
14065
14066
14067     void start();
14068     int restart();
14069     int elapsed() const;
14070 private:
14071     enum TimeFlag { NullTime = -1 };
14072     inline int ds() const { return mds == -1 ? 0 : mds; }
14073     int mds;
14074
14075     friend class QDateTime;
14076     friend class QDateTimePrivate;
14077
14078     friend QDataStream &operator<<(QDataStream &, const QTime &);
14079     friend QDataStream &operator>>(QDataStream &, QTime &);
14080
14081 };
14082 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"; } };
14083
14084 class QDateTimePrivate;
14085
14086 class QDateTime
14087 {
14088 public:
14089     QDateTime();
14090     explicit QDateTime(const QDate &);
14091     QDateTime(const QDate &, const QTime &, Qt::TimeSpec spec = Qt::LocalTime);
14092     QDateTime(const QDateTime &other);
14093     ~QDateTime();
14094
14095     QDateTime &operator=(const QDateTime &other);
14096
14097     bool isNull() const;
14098     bool isValid() const;
14099
14100     QDate date() const;
14101     QTime time() const;
14102     Qt::TimeSpec timeSpec() const;
14103     uint toTime_t() const;
14104     void setDate(const QDate &date);
14105     void setTime(const QTime &time);
14106     void setTimeSpec(Qt::TimeSpec spec);
14107     void setTime_t(uint secsSince1Jan1970UTC);
14108
14109     QString toString(Qt::DateFormat f = Qt::TextDate) const;
14110     QString toString(const QString &format) const;
14111
14112     QDateTime addDays(int days) const;
14113     QDateTime addMonths(int months) const;
14114     QDateTime addYears(int years) const;
14115     QDateTime addSecs(int secs) const;
14116     QDateTime addMSecs(qint64 msecs) const;
14117     QDateTime toTimeSpec(Qt::TimeSpec spec) const;
14118     inline QDateTime toLocalTime() const { return toTimeSpec(Qt::LocalTime); }
14119     inline QDateTime toUTC() const { return toTimeSpec(Qt::UTC); }
14120     int daysTo(const QDateTime &) const;
14121     int secsTo(const QDateTime &) const;
14122
14123     bool operator==(const QDateTime &other) const;
14124     inline bool operator!=(const QDateTime &other) const { return !(*this == other); }
14125     bool operator<(const QDateTime &other) const;
14126     inline bool operator<=(const QDateTime &other) const { return !(other < *this); }
14127     inline bool operator>(const QDateTime &other) const { return other < *this; }
14128     inline bool operator>=(const QDateTime &other) const { return !(*this < other); }
14129
14130     static QDateTime currentDateTime();
14131
14132     static QDateTime fromString(const QString &s, Qt::DateFormat f = Qt::TextDate);
14133     static QDateTime fromString(const QString &s, const QString &format);
14134
14135     static QDateTime fromTime_t(uint secsSince1Jan1970UTC);
14136 # 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"
14137 private:
14138     friend class QDateTimePrivate;
14139     void detach();
14140     QDateTimePrivate *d;
14141
14142
14143     friend QDataStream &operator<<(QDataStream &, const QDateTime &);
14144     friend QDataStream &operator>>(QDataStream &, QDateTime &);
14145
14146 };
14147 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"; } };
14148 # 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"
14149  QDataStream &operator<<(QDataStream &, const QDate &);
14150  QDataStream &operator>>(QDataStream &, QDate &);
14151  QDataStream &operator<<(QDataStream &, const QTime &);
14152  QDataStream &operator>>(QDataStream &, QTime &);
14153  QDataStream &operator<<(QDataStream &, const QDateTime &);
14154  QDataStream &operator>>(QDataStream &, QDateTime &);
14155
14156
14157
14158  QDebug operator<<(QDebug, const QDate &);
14159  QDebug operator<<(QDebug, const QTime &);
14160  QDebug operator<<(QDebug, const QDateTime &);
14161 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qdatetime.h" 2
14162 # 47 "generators/unix/unixmake2.cpp" 2
14163
14164 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qdebug.h" 1
14165
14166 # 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
14167 # 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"
14168
14169 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qalgorithms.h" 1
14170 # 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
14171
14172 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qhash.h" 1
14173 # 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
14174
14175 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qlist.h" 1
14176 # 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
14177
14178 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qmap.h" 1
14179 # 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
14180
14181 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qpair.h" 1
14182 # 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
14183
14184 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qtextstream.h" 1
14185 # 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
14186
14187 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qstring.h" 1
14188 # 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
14189
14190 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qvector.h" 1
14191 # 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
14192
14193 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qset.h" 1
14194
14195 # 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
14196 # 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"
14197
14198 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qhash.h" 1
14199 # 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
14200
14201
14202
14203 typedef QtValidLicenseForCoreModule QtCoreModule;
14204
14205 template <class T>
14206 class QSet
14207 {
14208     typedef QHash<T, QHashDummyValue> Hash;
14209
14210 public:
14211     inline QSet() {}
14212     inline QSet(const QSet<T> &other) : q_hash(other.q_hash) {}
14213
14214     inline QSet<T> &operator=(const QSet<T> &other)
14215         { q_hash = other.q_hash; return *this; }
14216
14217     inline bool operator==(const QSet<T> &other) const
14218         { return q_hash == other.q_hash; }
14219     inline bool operator!=(const QSet<T> &other) const
14220         { return q_hash != other.q_hash; }
14221
14222     inline int size() const { return q_hash.size(); }
14223
14224     inline bool isEmpty() const { return q_hash.isEmpty(); }
14225
14226     inline int capacity() const { return q_hash.capacity(); }
14227     inline void reserve(int size);
14228     inline void squeeze() { q_hash.squeeze(); }
14229
14230     inline void detach() { q_hash.detach(); }
14231     inline bool isDetached() const { return q_hash.isDetached(); }
14232     inline void setSharable(bool sharable) { q_hash.setSharable(sharable); }
14233
14234     inline void clear() { q_hash.clear(); }
14235
14236     inline bool remove(const T &value) { return q_hash.remove(value) != 0; }
14237
14238     inline bool contains(const T &value) const { return q_hash.contains(value); }
14239
14240     class const_iterator;
14241
14242     class iterator
14243     {
14244         typedef QHash<T, QHashDummyValue> Hash;
14245         typename Hash::iterator i;
14246
14247     public:
14248         typedef std::bidirectional_iterator_tag iterator_category;
14249         typedef ptrdiff_t difference_type;
14250         typedef T value_type;
14251         typedef const T *pointer;
14252         typedef const T &reference;
14253
14254         inline iterator() {}
14255         inline iterator(typename Hash::iterator o) : i(o) {}
14256         inline iterator(const iterator &o) : i(o.i) {}
14257         inline iterator &operator=(const iterator &o) { i = o.i; return *this; }
14258         inline const T &operator*() const { return i.key(); }
14259         inline const T *operator->() const { return &i.key(); }
14260         inline bool operator==(const iterator &o) const { return i == o.i; }
14261         inline bool operator!=(const iterator &o) const { return i != o.i; }
14262         inline bool operator==(const const_iterator &o) const
14263             { return i == reinterpret_cast<const iterator &>(o).i; }
14264         inline bool operator!=(const const_iterator &o) const
14265             { return i != reinterpret_cast<const iterator &>(o).i; }
14266         inline iterator &operator++() { ++i; return *this; }
14267         inline iterator operator++(int) { iterator r = *this; ++i; return r; }
14268         inline iterator &operator--() { --i; return *this; }
14269         inline iterator operator--(int) { iterator r = *this; --i; return r; }
14270         inline iterator operator+(int j) const { return i + j; }
14271         inline iterator operator-(int j) const { return i - j; }
14272         inline iterator &operator+=(int j) { i += j; return *this; }
14273         inline iterator &operator-=(int j) { i -= j; return *this; }
14274     };
14275
14276     class const_iterator
14277     {
14278         typedef QHash<T, QHashDummyValue> Hash;
14279         typename Hash::const_iterator i;
14280
14281     public:
14282         typedef std::bidirectional_iterator_tag iterator_category;
14283         typedef ptrdiff_t difference_type;
14284         typedef T value_type;
14285         typedef const T *pointer;
14286         typedef const T &reference;
14287
14288         inline const_iterator() {}
14289         inline const_iterator(typename Hash::const_iterator o) : i(o) {}
14290         inline const_iterator(const const_iterator &o) : i(o.i) {}
14291         inline const_iterator(const iterator &o)
14292             : i(reinterpret_cast<const const_iterator &>(o).i) {}
14293         inline const_iterator &operator=(const const_iterator &o) { i = o.i; return *this; }
14294         inline const T &operator*() const { return i.key(); }
14295         inline const T *operator->() const { return &i.key(); }
14296         inline bool operator==(const const_iterator &o) const { return i == o.i; }
14297         inline bool operator!=(const const_iterator &o) const { return i != o.i; }
14298         inline const_iterator &operator++() { ++i; return *this; }
14299         inline const_iterator operator++(int) { const_iterator r = *this; ++i; return r; }
14300         inline const_iterator &operator--() { --i; return *this; }
14301         inline const_iterator operator--(int) { const_iterator r = *this; --i; return r; }
14302         inline const_iterator operator+(int j) const { return i + j; }
14303         inline const_iterator operator-(int j) const { return i - j; }
14304         inline const_iterator &operator+=(int j) { i += j; return *this; }
14305         inline const_iterator &operator-=(int j) { i -= j; return *this; }
14306     };
14307
14308
14309     inline iterator begin() { return q_hash.begin(); }
14310     inline const_iterator begin() const { return q_hash.begin(); }
14311     inline const_iterator constBegin() const { return q_hash.constBegin(); }
14312     inline iterator end() { return q_hash.end(); }
14313     inline const_iterator end() const { return q_hash.end(); }
14314     inline const_iterator constEnd() const { return q_hash.constEnd(); }
14315     iterator erase(iterator i)
14316         { return q_hash.erase(reinterpret_cast<typename Hash::iterator &>(i)); }
14317
14318
14319     typedef iterator Iterator;
14320     typedef const_iterator ConstIterator;
14321     inline int count() const { return q_hash.count(); }
14322     inline const_iterator insert(const T &value)
14323         { return static_cast<typename Hash::const_iterator>(q_hash.insert(value,
14324                                                                           QHashDummyValue())); }
14325     iterator find(const T &value) { return q_hash.find(value); }
14326     const_iterator find(const T &value) const { return q_hash.find(value); }
14327     inline const_iterator constFind(const T &value) const { return find(value); }
14328     QSet<T> &unite(const QSet<T> &other);
14329     QSet<T> &intersect(const QSet<T> &other);
14330     QSet<T> &subtract(const QSet<T> &other);
14331
14332
14333     typedef T key_type;
14334     typedef T value_type;
14335     typedef value_type *pointer;
14336     typedef const value_type *const_pointer;
14337     typedef value_type &reference;
14338     typedef const value_type &const_reference;
14339     typedef ptrdiff_t difference_type;
14340     typedef int size_type;
14341
14342     inline bool empty() const { return isEmpty(); }
14343
14344
14345     inline QSet<T> &operator<<(const T &value) { insert(value); return *this; }
14346     inline QSet<T> &operator|=(const QSet<T> &other) { unite(other); return *this; }
14347     inline QSet<T> &operator|=(const T &value) { insert(value); return *this; }
14348     inline QSet<T> &operator&=(const QSet<T> &other) { intersect(other); return *this; }
14349     inline QSet<T> &operator&=(const T &value)
14350         { QSet<T> result; if (contains(value)) result.insert(value); return (*this = result); }
14351     inline QSet<T> &operator+=(const QSet<T> &other) { unite(other); return *this; }
14352     inline QSet<T> &operator+=(const T &value) { insert(value); return *this; }
14353     inline QSet<T> &operator-=(const QSet<T> &other) { subtract(other); return *this; }
14354     inline QSet<T> &operator-=(const T &value) { remove(value); return *this; }
14355     inline QSet<T> operator|(const QSet<T> &other) const
14356         { QSet<T> result = *this; result |= other; return result; }
14357     inline QSet<T> operator&(const QSet<T> &other) const
14358         { QSet<T> result = *this; result &= other; return result; }
14359     inline QSet<T> operator+(const QSet<T> &other) const
14360         { QSet<T> result = *this; result += other; return result; }
14361     inline QSet<T> operator-(const QSet<T> &other) const
14362         { QSet<T> result = *this; result -= other; return result; }
14363
14364
14365     inline QSet<T> operator|(const QSet<T> &other)
14366         { QSet<T> result = *this; result |= other; return result; }
14367     inline QSet<T> operator&(const QSet<T> &other)
14368         { QSet<T> result = *this; result &= other; return result; }
14369     inline QSet<T> operator+(const QSet<T> &other)
14370         { QSet<T> result = *this; result += other; return result; }
14371     inline QSet<T> operator-(const QSet<T> &other)
14372         { QSet<T> result = *this; result -= other; return result; }
14373
14374
14375     QList<T> toList() const;
14376     inline QList<T> values() const { return toList(); }
14377
14378     static QSet<T> fromList(const QList<T> &list);
14379
14380 private:
14381     Hash q_hash;
14382 };
14383
14384 template <class T>
14385 inline void QSet<T>::reserve(int asize) { q_hash.reserve(asize); }
14386
14387 template <class T>
14388 inline QSet<T> &QSet<T>::unite(const QSet<T> &other)
14389 {
14390     QSet<T> copy(other);
14391     typename QSet<T>::const_iterator i = copy.constEnd();
14392     while (i != copy.constBegin()) {
14393         --i;
14394         insert(*i);
14395     }
14396     return *this;
14397 }
14398
14399 template <class T>
14400 inline QSet<T> &QSet<T>::intersect(const QSet<T> &other)
14401 {
14402     QSet<T> copy1(*this);
14403     QSet<T> copy2(other);
14404     typename QSet<T>::const_iterator i = copy1.constEnd();
14405     while (i != copy1.constBegin()) {
14406         --i;
14407         if (!copy2.contains(*i))
14408             remove(*i);
14409     }
14410     return *this;
14411 }
14412
14413 template <class T>
14414 inline QSet<T> &QSet<T>::subtract(const QSet<T> &other)
14415 {
14416     QSet<T> copy1(*this);
14417     QSet<T> copy2(other);
14418     typename QSet<T>::const_iterator i = copy1.constEnd();
14419     while (i != copy1.constBegin()) {
14420         --i;
14421         if (copy2.contains(*i))
14422             remove(*i);
14423     }
14424     return *this;
14425 }
14426
14427 template <typename T>
14428  QList<T> QSet<T>::toList() const
14429 {
14430     QList<T> result;
14431     typename QSet<T>::const_iterator i = constBegin();
14432     while (i != constEnd()) {
14433         result.append(*i);
14434         ++i;
14435     }
14436     return result;
14437 }
14438
14439 template <typename T>
14440  QSet<T> QList<T>::toSet() const
14441 {
14442     QSet<T> result;
14443     result.reserve(size());
14444     for (int i = 0; i < size(); ++i)
14445         result.insert(at(i));
14446     return result;
14447 }
14448
14449 template <typename T>
14450 QSet<T> QSet<T>::fromList(const QList<T> &list)
14451 {
14452     return list.toSet();
14453 }
14454
14455 template <typename T>
14456 QList<T> QList<T>::fromSet(const QSet<T> &set)
14457 {
14458     return set.toList();
14459 }
14460
14461 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; } };
14462
14463 template <typename T>
14464 class QMutableSetIterator
14465 {
14466     typedef typename QSet<T>::iterator iterator;
14467     QSet<T> *c;
14468     iterator i, n;
14469     inline bool item_exists() const { return n != c->constEnd(); }
14470
14471 public:
14472     inline QMutableSetIterator(QSet<T> &container)
14473         : c(&container)
14474     { c->setSharable(false); i = c->begin(); n = c->end(); }
14475     inline ~QMutableSetIterator()
14476     { c->setSharable(true); }
14477     inline QMutableSetIterator &operator=(QSet<T> &container)
14478     { c->setSharable(true); c = &container; c->setSharable(false);
14479       i = c->begin(); n = c->end(); return *this; }
14480     inline void toFront() { i = c->begin(); n = c->end(); }
14481     inline void toBack() { i = c->end(); n = i; }
14482     inline bool hasNext() const { return c->constEnd() != i; }
14483     inline const T &next() { n = i++; return *n; }
14484     inline const T &peekNext() const { return *i; }
14485     inline bool hasPrevious() const { return c->constBegin() != i; }
14486     inline const T &previous() { n = --i; return *n; }
14487     inline const T &peekPrevious() const { iterator p = i; return *--p; }
14488     inline void remove()
14489     { if (c->constEnd() != n) { i = c->erase(n); n = c->end(); } }
14490     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; }
14491     inline bool findNext(const T &t)
14492     { while (c->constEnd() != (n = i)) if (*i++ == t) return true; return false; }
14493     inline bool findPrevious(const T &t)
14494     { while (c->constBegin() != i) if (*(n = --i) == t) return true;
14495       n = c->end(); return false; }
14496 };
14497 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qset.h" 2
14498 # 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
14499
14500
14501
14502 typedef QtValidLicenseForCoreModule QtCoreModule;
14503
14504 class QDebug
14505 {
14506     struct Stream {
14507         Stream(QIODevice *device) : ts(device), ref(1), type(QtDebugMsg), space(true), message_output(false) {}
14508         Stream(QString *string) : ts(string, QIODevice::WriteOnly), ref(1), type(QtDebugMsg), space(true), message_output(false) {}
14509         Stream(QtMsgType t) : ts(&buffer, QIODevice::WriteOnly), ref(1), type(t), space(true), message_output(true) {}
14510         QTextStream ts;
14511         QString buffer;
14512         int ref;
14513         QtMsgType type;
14514         bool space;
14515         bool message_output;
14516     } *stream;
14517 public:
14518     inline QDebug(QIODevice *device) : stream(new Stream(device)) {}
14519     inline QDebug(QString *string) : stream(new Stream(string)) {}
14520     inline QDebug(QtMsgType t) : stream(new Stream(t)) {}
14521     inline QDebug(const QDebug &o):stream(o.stream) { ++stream->ref; }
14522     inline QDebug &operator=(const QDebug &other);
14523     inline ~QDebug() {
14524         if (!--stream->ref) {
14525             if(stream->message_output)
14526                 qt_message_output(stream->type, stream->buffer.toLocal8Bit().data());
14527             delete stream;
14528         }
14529     }
14530     inline QDebug &space() { stream->space = true; stream->ts << " "; return *this; }
14531     inline QDebug &nospace() { stream->space = false; return *this; }
14532     inline QDebug &maybeSpace() { if (stream->space) stream->ts << " "; return *this; }
14533
14534     inline QDebug &operator<<(QChar t) { stream->ts << "\'" << t << "\'"; return maybeSpace(); }
14535     inline QDebug &operator<<(bool t) { stream->ts << (t ? "true" : "false"); return maybeSpace(); }
14536     inline QDebug &operator<<(char t) { stream->ts << t; return maybeSpace(); }
14537     inline QDebug &operator<<(signed short t) { stream->ts << t; return maybeSpace(); }
14538     inline QDebug &operator<<(unsigned short t) { stream->ts << t; return maybeSpace(); }
14539     inline QDebug &operator<<(signed int t) { stream->ts << t; return maybeSpace(); }
14540     inline QDebug &operator<<(unsigned int t) { stream->ts << t; return maybeSpace(); }
14541     inline QDebug &operator<<(signed long t) { stream->ts << t; return maybeSpace(); }
14542     inline QDebug &operator<<(unsigned long t) { stream->ts << t; return maybeSpace(); }
14543     inline QDebug &operator<<(qint64 t)
14544         { stream->ts << QString::number(t); return maybeSpace(); }
14545     inline QDebug &operator<<(quint64 t)
14546         { stream->ts << QString::number(t); return maybeSpace(); }
14547     inline QDebug &operator<<(float t) { stream->ts << t; return maybeSpace(); }
14548     inline QDebug &operator<<(double t) { stream->ts << t; return maybeSpace(); }
14549     inline QDebug &operator<<(const char* t) { stream->ts << QString::fromAscii(t); return maybeSpace(); }
14550     inline QDebug &operator<<(const QString & t) { stream->ts << "\"" << t << "\""; return maybeSpace(); }
14551     inline QDebug &operator<<(const QLatin1String &t) { stream->ts << "\"" << t.latin1() << "\""; return maybeSpace(); }
14552     inline QDebug &operator<<(const QByteArray & t) { stream->ts << "\"" << t << "\""; return maybeSpace(); }
14553     inline QDebug &operator<<(const void * t) { stream->ts << t; return maybeSpace(); }
14554     inline QDebug &operator<<(QTextStreamFunction f) {
14555         stream->ts << f;
14556         return *this;
14557     }
14558
14559     inline QDebug &operator<<(QTextStreamManipulator m)
14560     { stream->ts << m; return *this; }
14561 };
14562
14563  inline QDebug qWarning() { return QDebug(QtWarningMsg); }
14564  inline QDebug qCritical() { return QDebug(QtCriticalMsg); }
14565
14566 inline QDebug &QDebug::operator=(const QDebug &other)
14567 {
14568     if (this != &other) {
14569         QDebug copy(other);
14570         qSwap(stream, copy.stream);
14571     }
14572     return *this;
14573 }
14574
14575
14576
14577
14578
14579 template <class T>
14580 inline QDebug operator<<(QDebug debug, const QList<T> &list)
14581
14582 {
14583     debug.nospace() << "(";
14584     for (typename QList<T>::size_type i = 0; i < list.count(); ++i) {
14585         if (i)
14586             debug << ", ";
14587         debug << list.at(i);
14588     }
14589     debug << ")";
14590     return debug.space();
14591 }
14592
14593
14594
14595
14596
14597 template <typename T>
14598 inline QDebug operator<<(QDebug debug, const QVector<T> &vec)
14599
14600 {
14601     debug.nospace() << "QVector";
14602     return operator<<(debug, vec.toList());
14603 }
14604
14605
14606
14607
14608
14609 template <class aKey, class aT>
14610 inline QDebug operator<<(QDebug debug, const QMap<aKey, aT> &map)
14611
14612 {
14613     debug.nospace() << "QMap(";
14614     for (typename QMap<aKey, aT>::const_iterator it = map.constBegin();
14615          it != map.constEnd(); ++it) {
14616         debug << "(" << it.key() << ", " << it.value() << ")";
14617     }
14618     debug << ")";
14619     return debug.space();
14620 }
14621
14622
14623
14624
14625
14626 template <class aKey, class aT>
14627 inline QDebug operator<<(QDebug debug, const QHash<aKey, aT> &hash)
14628
14629 {
14630     debug.nospace() << "QHash(";
14631     for (typename QHash<aKey, aT>::const_iterator it = hash.constBegin();
14632             it != hash.constEnd(); ++it)
14633         debug << "(" << it.key() << ", " << it.value() << ")";
14634     debug << ")";
14635     return debug.space();
14636 }
14637
14638
14639
14640
14641
14642 template <class T1, class T2>
14643 inline QDebug operator<<(QDebug debug, const QPair<T1, T2> &pair)
14644
14645 {
14646     debug.nospace() << "QPair(" << pair.first << "," << pair.second << ")";
14647     return debug.space();
14648 }
14649
14650 template <typename T>
14651 inline QDebug operator<<(QDebug debug, const QSet<T> &set)
14652 {
14653     debug.nospace() << "QSet";
14654     return operator<<(debug, set.toList());
14655 }
14656
14657
14658  inline QDebug qDebug() { return QDebug(QtDebugMsg); }
14659 # 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"
14660 # 1 "/var/tmp/portage/x11-libs/qt-4.3.2/work/qt-x11-opensource-src-4.3.2/include/QtCore/qdebug.h" 2
14661 # 48 "generators/unix/unixmake2.cpp" 2
14662
14663 # 1 "/usr/include/time.h" 1 3 4
14664 # 9 "/usr/include/time.h" 3 4
14665 # 1 "/usr/include/gentoo-multilib/amd64/time.h" 1 3 4
14666 # 29 "/usr/include/gentoo-multilib/amd64/time.h" 3 4
14667
14668 # 1 "/usr/include/features.h" 1 3 4
14669 # 30 "/usr/include/gentoo-multilib/amd64/time.h" 2 3 4
14670
14671 extern "C" {
14672 # 40 "/usr/include/gentoo-multilib/amd64/time.h" 3 4
14673 # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4
14674 # 40 "/usr/include/gentoo-multilib/amd64/time.h" 2 3 4
14675
14676
14677
14678
14679 # 1 "/usr/include/bits/time.h" 1 3 4
14680 # 9 "/usr/include/bits/time.h" 3 4
14681 # 1 "/usr/include/gentoo-multilib/amd64/bits/time.h" 1 3 4
14682 # 9 "/usr/include/bits/time.h" 2 3 4
14683 # 44 "/usr/include/gentoo-multilib/amd64/time.h" 2 3 4
14684 # 132 "/usr/include/gentoo-multilib/amd64/time.h" 3 4
14685
14686
14687 struct tm
14688 {
14689   int tm_sec;
14690   int tm_min;
14691   int tm_hour;
14692   int tm_mday;
14693   int tm_mon;
14694   int tm_year;
14695   int tm_wday;
14696   int tm_yday;
14697   int tm_isdst;
14698
14699
14700   long int tm_gmtoff;
14701   __const char *tm_zone;
14702
14703
14704
14705
14706 };
14707 # 162 "/usr/include/gentoo-multilib/amd64/time.h" 3 4
14708 struct itimerspec
14709   {
14710     struct timespec it_interval;
14711     struct timespec it_value;
14712   };
14713
14714
14715 struct sigevent;
14716 # 181 "/usr/include/gentoo-multilib/amd64/time.h" 3 4
14717
14718
14719
14720 extern clock_t clock (void) throw ();
14721
14722
14723 extern time_t time (time_t *__timer) throw ();
14724
14725
14726 extern double difftime (time_t __time1, time_t __time0)
14727      throw () __attribute__ ((__const__));
14728
14729
14730 extern time_t mktime (struct tm *__tp) throw ();
14731
14732
14733
14734
14735
14736 extern size_t strftime (char *__restrict __s, size_t __maxsize,
14737    __const char *__restrict __format,
14738    __const struct tm *__restrict __tp) throw ();
14739
14740
14741
14742
14743
14744 extern char *strptime (__const char *__restrict __s,
14745          __const char *__restrict __fmt, struct tm *__tp)
14746      throw ();
14747
14748
14749
14750
14751
14752
14753 # 1 "/usr/include/xlocale.h" 1 3 4
14754 # 217 "/usr/include/gentoo-multilib/amd64/time.h" 2 3 4
14755
14756 extern size_t strftime_l (char *__restrict __s, size_t __maxsize,
14757      __const char *__restrict __format,
14758      __const struct tm *__restrict __tp,
14759      __locale_t __loc) throw ();
14760
14761 extern char *strptime_l (__const char *__restrict __s,
14762     __const char *__restrict __fmt, struct tm *__tp,
14763     __locale_t __loc) throw ();
14764
14765
14766
14767
14768
14769
14770 extern struct tm *gmtime (__const time_t *__timer) throw ();
14771
14772
14773
14774 extern struct tm *localtime (__const time_t *__timer) throw ();
14775
14776
14777
14778
14779
14780 extern struct tm *gmtime_r (__const time_t *__restrict __timer,
14781        struct tm *__restrict __tp) throw ();
14782
14783
14784
14785 extern struct tm *localtime_r (__const time_t *__restrict __timer,
14786           struct tm *__restrict __tp) throw ();
14787
14788
14789
14790
14791
14792 extern char *asctime (__const struct tm *__tp) throw ();
14793
14794
14795 extern char *ctime (__const time_t *__timer) throw ();
14796
14797
14798
14799
14800
14801
14802
14803 extern char *asctime_r (__const struct tm *__restrict __tp,
14804    char *__restrict __buf) throw ();
14805
14806
14807 extern char *ctime_r (__const time_t *__restrict __timer,
14808         char *__restrict __buf) throw ();
14809
14810
14811
14812
14813 extern char *__tzname[2];
14814 extern int __daylight;
14815 extern long int __timezone;
14816
14817
14818
14819
14820 extern char *tzname[2];
14821
14822
14823
14824 extern void tzset (void) throw ();
14825
14826
14827
14828 extern int daylight;
14829 extern long int timezone;
14830
14831
14832
14833
14834
14835 extern int stime (__const time_t *__when) throw ();
14836 # 312 "/usr/include/gentoo-multilib/amd64/time.h" 3 4
14837 extern time_t timegm (struct tm *__tp) throw ();
14838
14839
14840 extern time_t timelocal (struct tm *__tp) throw ();
14841
14842
14843 extern int dysize (int __year) throw () __attribute__ ((__const__));
14844 # 327 "/usr/include/gentoo-multilib/amd64/time.h" 3 4
14845 extern int nanosleep (__const struct timespec *__requested_time,
14846         struct timespec *__remaining);
14847
14848
14849
14850 extern int clock_getres (clockid_t __clock_id, struct timespec *__res) throw ();
14851
14852
14853 extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) throw ();
14854
14855
14856 extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp)
14857      throw ();
14858
14859
14860
14861
14862
14863
14864 extern int clock_nanosleep (clockid_t __clock_id, int __flags,
14865        __const struct timespec *__req,
14866        struct timespec *__rem);
14867
14868
14869 extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) throw ();
14870
14871
14872
14873
14874 extern int timer_create (clockid_t __clock_id,
14875     struct sigevent *__restrict __evp,
14876     timer_t *__restrict __timerid) throw ();
14877
14878
14879 extern int timer_delete (timer_t __timerid) throw ();
14880
14881
14882 extern int timer_settime (timer_t __timerid, int __flags,
14883      __const struct itimerspec *__restrict __value,
14884      struct itimerspec *__restrict __ovalue) throw ();
14885
14886
14887 extern int timer_gettime (timer_t __timerid, struct itimerspec *__value)
14888      throw ();
14889
14890
14891 extern int timer_getoverrun (timer_t __timerid) throw ();
14892 # 389 "/usr/include/gentoo-multilib/amd64/time.h" 3 4
14893 extern int getdate_err;
14894 # 398 "/usr/include/gentoo-multilib/amd64/time.h" 3 4
14895 extern struct tm *getdate (__const char *__string);
14896 # 412 "/usr/include/gentoo-multilib/amd64/time.h" 3 4
14897 extern int getdate_r (__const char *__restrict __string,
14898         struct tm *__restrict __resbufp);
14899
14900
14901 }
14902 # 9 "/usr/include/time.h" 2 3 4
14903 # 49 "generators/unix/unixmake2.cpp" 2
14904
14905 UnixMakefileGenerator::UnixMakefileGenerator() : MakefileGenerator(), init_flag(false), include_deps(false)
14906 {
14907
14908 }
14909
14910 void
14911 UnixMakefileGenerator::writePrlFile(QTextStream &t)
14912 {
14913     MakefileGenerator::writePrlFile(t);
14914
14915
14916     if(project->isActiveConfig("create_libtool") && project->first("TEMPLATE") == "lib") {
14917         if(project->isActiveConfig("compile_libtool"))
14918             warn_msg(WarnLogic, "create_libtool specified with compile_libtool can lead to conflicting .la\n"
14919                      "formats, create_libtool has been disabled\n");
14920         else
14921             writeLibtoolFile();
14922     }
14923
14924     if(project->isActiveConfig("create_pc") && project->first("TEMPLATE") == "lib")
14925         writePkgConfigFile();
14926 }
14927
14928 bool
14929 UnixMakefileGenerator::writeMakefile(QTextStream &t)
14930 {
14931
14932     writeHeader(t);
14933     if(!project->values("QMAKE_FAILED_REQUIREMENTS").isEmpty()) {
14934         t << "QMAKE    = " << (project->isEmpty("QMAKE_QMAKE") ? QString("qmake") : var("QMAKE_QMAKE")) << endl;
14935         QStringList &qut = project->values("QMAKE_EXTRA_TARGETS");
14936         for(QStringList::ConstIterator it = qut.begin(); it != qut.end(); ++it)
14937             t << *it << " ";
14938         t << "first all clean install distclean uninstall qmake_all:" << "\n\t"
14939           << "@echo \"Some of the required modules ("
14940           << var("QMAKE_FAILED_REQUIREMENTS") << ") are not available.\"" << "\n\t"
14941           << "@echo \"Skipped.\"" << endl << endl;
14942         writeMakeQmake(t);
14943         if(project->isEmpty("QMAKE_NOFORCE"))
14944             t << "FORCE:" << endl << endl;
14945         return true;
14946     }
14947
14948     if (project->values("TEMPLATE").first() == "app" ||
14949         project->values("TEMPLATE").first() == "lib") {
14950         if(Option::mkfile::do_stub_makefile && MakefileGenerator::writeStubMakefile(t))
14951             return true;
14952         writeMakeParts(t);
14953         return MakefileGenerator::writeMakefile(t);
14954     } else if(project->values("TEMPLATE").first() == "subdirs") {
14955         MakefileGenerator::writeSubDirs(t);
14956         return true;
14957     }
14958     return false;
14959 }
14960
14961 void
14962 UnixMakefileGenerator::writeMakeParts(QTextStream &t)
14963 {
14964     QString deps = fileFixify(Option::output.fileName()), target_deps, prl;
14965     bool do_incremental = (project->isActiveConfig("incremental") &&
14966                            !project->values("QMAKE_INCREMENTAL").isEmpty() &&
14967                            (!project->values("QMAKE_APP_FLAG").isEmpty() ||
14968                             (!project->isActiveConfig("staticlib")))),
14969          src_incremental=false;
14970
14971     t << "####### Compiler, tools and options" << endl << endl;
14972     t << "CC            = " << var("QMAKE_CC") << endl;
14973     t << "CXX           = " << var("QMAKE_CXX") << endl;
14974     t << "DEFINES       = "
14975       << varGlue("PRL_EXPORT_DEFINES","-D"," -D"," ")
14976       << varGlue("DEFINES","-D"," -D","") << endl;
14977     t << "CFLAGS        = " << var("QMAKE_CFLAGS") << " $(DEFINES)" << endl;
14978     t << "CXXFLAGS      = " << var("QMAKE_CXXFLAGS") << " $(DEFINES)" << endl;
14979     t << "INCPATH       = " << "-I" << specdir();
14980     if(!project->isActiveConfig("no_include_pwd")) {
14981         QString pwd = escapeFilePath(fileFixify(qmake_getpwd()));
14982         if(pwd.isEmpty())
14983             pwd = ".";
14984         t << " -I" << pwd;
14985     }
14986     {
14987         const QStringList &incs = project->values("INCLUDEPATH");
14988         for(int i = 0; i < incs.size(); ++i) {
14989             QString inc = escapeFilePath(incs.at(i));
14990             if(!inc.isEmpty())
14991                 t << " " << "-I" << inc;
14992         }
14993     }
14994     if(!project->isEmpty("QMAKE_FRAMEWORKPATH_FLAGS"))
14995        t << " " << var("QMAKE_FRAMEWORKPATH_FLAGS");
14996     t << endl;
14997
14998     if(!project->isActiveConfig("staticlib")) {
14999         t << "LINK          = " << var("QMAKE_LINK") << endl;
15000         t << "LFLAGS        = " << var("QMAKE_LFLAGS") << endl;
15001         t << "LIBS          = " << "$(SUBLIBS) " << var("QMAKE_FRAMEWORKDIR_FLAGS") << " "
15002           << var("QMAKE_LIBDIR_FLAGS") << " " << var("QMAKE_LIBS") << endl;
15003     }
15004
15005     t << "AR            = " << var("QMAKE_AR") << endl;
15006     t << "RANLIB        = " << var("QMAKE_RANLIB") << endl;
15007     t << "QMAKE         = " << (project->isEmpty("QMAKE_QMAKE") ? QString("qmake") : var("QMAKE_QMAKE")) << endl;
15008     t << "TAR           = " << var("QMAKE_TAR") << endl;
15009     t << "COMPRESS      = " << var("QMAKE_GZIP") << endl;
15010     if(project->isActiveConfig("compile_libtool"))
15011         t << "LIBTOOL       = " << var("QMAKE_LIBTOOL") << endl;
15012     t << "COPY          = " << var("QMAKE_COPY") << endl;
15013     t << "SED           = " << var("QMAKE_STREAM_EDITOR") << endl;
15014     t << "COPY_FILE     = " << var("QMAKE_COPY_FILE") << endl;
15015     t << "COPY_DIR      = " << var("QMAKE_COPY_DIR") << endl;
15016     t << "INSTALL_FILE  = " << var("QMAKE_INSTALL_FILE") << endl;
15017     t << "INSTALL_DIR   = " << var("QMAKE_INSTALL_DIR") << endl;
15018     t << "INSTALL_PROGRAM = " << var("QMAKE_INSTALL_PROGRAM") << endl;
15019
15020     t << "DEL_FILE      = " << var("QMAKE_DEL_FILE") << endl;
15021     t << "SYMLINK       = " << var("QMAKE_SYMBOLIC_LINK") << endl;
15022     t << "DEL_DIR       = " << var("QMAKE_DEL_DIR") << endl;
15023     t << "MOVE          = " << var("QMAKE_MOVE") << endl;
15024     t << "CHK_DIR_EXISTS= " << var("QMAKE_CHK_DIR_EXISTS") << endl;
15025     t << "MKDIR         = " << var("QMAKE_MKDIR") << endl;
15026     if(!project->isEmpty("QMAKE_MACOSX_DEPLOYMENT_TARGET"))
15027         t << "export MACOSX_DEPLOYMENT_TARGET = "
15028           << project->first("QMAKE_MACOSX_DEPLOYMENT_TARGET") << endl;
15029     t << endl;
15030
15031     t << "####### Output directory" << endl << endl;
15032     if (! project->values("OBJECTS_DIR").isEmpty())
15033         t << "OBJECTS_DIR   = " << var("OBJECTS_DIR") << endl;
15034     else
15035         t << "OBJECTS_DIR   = ./" << endl;
15036     t << endl;
15037
15038
15039     t << "####### Files" << endl << endl;
15040     t << "SOURCES       = " << valList(escapeFilePaths(project->values("SOURCES"))) << " "
15041       << valList(escapeFilePaths(project->values("GENERATED_SOURCES"))) << endl;
15042     if(do_incremental) {
15043         QStringList &objs = project->values("OBJECTS"), &incrs = project->values("QMAKE_INCREMENTAL"), incrs_out;
15044         t << "OBJECTS       = ";
15045         for(QStringList::Iterator objit = objs.begin(); objit != objs.end(); ++objit) {
15046             bool increment = false;
15047             for(QStringList::Iterator incrit = incrs.begin(); incrit != incrs.end(); ++incrit) {
15048                 if((*objit).indexOf(QRegExp((*incrit), Qt::CaseSensitive,
15049                                     QRegExp::Wildcard)) != -1) {
15050                     increment = true;
15051                     incrs_out.append((*objit));
15052                     break;
15053                 }
15054             }
15055             if(!increment)
15056                 t << "\\\n\t\t" << (*objit);
15057         }
15058         if(incrs_out.count() == objs.count()) {
15059             t << escapeFilePaths(incrs_out).join(" \\\n\t\t") << endl;
15060         } else if(!incrs_out.count()) {
15061             t << endl;
15062         } else {
15063             src_incremental = true;
15064             t << endl;
15065             t << "INCREMENTAL_OBJECTS = " << escapeFilePaths(incrs_out).join(" \\\n\t\t") << endl;
15066         }
15067     } else {
15068         t << "OBJECTS       = " << valList(escapeFilePaths(project->values("OBJECTS"))) << endl;
15069     }
15070     if(do_incremental && !src_incremental)
15071         do_incremental = false;
15072     t << "DIST          = " << valList(fileFixify(project->values("DISTFILES"))) << endl;
15073     t << "QMAKE_TARGET  = " << var("QMAKE_ORIG_TARGET") << endl;
15074     t << "DESTDIR       = " << var("DESTDIR") << endl;
15075     if(project->isActiveConfig("compile_libtool"))
15076         t << "TARGETL       = " << var("TARGET_la") << endl;
15077     t << "TARGET        = " << escapeFilePath(var("TARGET")) << endl;
15078     if(project->isActiveConfig("plugin")) {
15079         t << "TARGETD       = " << escapeFilePath(var("TARGET")) << endl;
15080     } else if(!project->isActiveConfig("staticlib") && project->values("QMAKE_APP_FLAG").isEmpty()) {
15081         t << "TARGETA       = " << escapeFilePath(var("TARGETA")) << endl;
15082         if(!project->isEmpty("QMAKE_BUNDLE")) {
15083             t << "TARGETD       = " << escapeFilePath(var("TARGET_x.y")) << endl;
15084             t << "TARGET0       = " << escapeFilePath(var("TARGET_")) << endl;
15085         } else if(project->isEmpty("QMAKE_HPUX_SHLIB")) {
15086             t << "TARGETD       = " << escapeFilePath(var("TARGET_x.y.z")) << endl;
15087             t << "TARGET0       = " << escapeFilePath(var("TARGET_")) << endl;
15088             t << "TARGET1       = " << escapeFilePath(var("TARGET_x")) << endl;
15089             t << "TARGET2       = " << escapeFilePath(var("TARGET_x.y")) << endl;
15090         } else {
15091             t << "TARGETD       = " << escapeFilePath(var("TARGET_x")) << endl;
15092             t << "TARGET0       = " << escapeFilePath(var("TARGET_")) << endl;
15093         }
15094     }
15095     writeExtraCompilerVariables(t);
15096     writeExtraVariables(t);
15097     t << endl;
15098
15099
15100     QStringList &qeui = project->values("QMAKE_EXTRA_INCLUDES");
15101     QStringList::Iterator it;
15102     for(it = qeui.begin(); it != qeui.end(); ++it)
15103         t << "include " << (*it) << endl;
15104
15105
15106     t << "first: all" << endl;
15107     t << "####### Implicit rules" << endl << endl;
15108     t << ".SUFFIXES: " << Option::obj_ext;
15109     for(QStringList::Iterator cit = Option::c_ext.begin(); cit != Option::c_ext.end(); ++cit)
15110         t << " " << (*cit);
15111     for(QStringList::Iterator cppit = Option::cpp_ext.begin(); cppit != Option::cpp_ext.end(); ++cppit)
15112         t << " " << (*cppit);
15113     t << endl << endl;
15114     for(QStringList::Iterator cppit = Option::cpp_ext.begin(); cppit != Option::cpp_ext.end(); ++cppit)
15115         t << (*cppit) << Option::obj_ext << ":\n\t" << var("QMAKE_RUN_CXX_IMP") << endl << endl;
15116     for(QStringList::Iterator cit = Option::c_ext.begin(); cit != Option::c_ext.end(); ++cit)
15117         t << (*cit) << Option::obj_ext << ":\n\t" << var("QMAKE_RUN_CC_IMP") << endl << endl;
15118
15119     if(include_deps) {
15120         QString cmd=var("QMAKE_CFLAGS_DEPS") + " ";
15121         cmd += varGlue("DEFINES","-D"," -D","") + varGlue("PRL_EXPORT_DEFINES"," -D"," -D","");
15122         if(!project->isEmpty("QMAKE_ABSOLUTE_SOURCE_PATH"))
15123             cmd += " -I" + project->first("QMAKE_ABSOLUTE_SOURCE_PATH") + " ";
15124         cmd += " $(INCPATH) " + varGlue("DEPENDPATH", "-I", " -I", "");
15125         QString odir;
15126         if(!project->values("OBJECTS_DIR").isEmpty())
15127             odir = project->first("OBJECTS_DIR");
15128         t << "###### Dependencies" << endl << endl;
15129         t << odir << ".deps/%.d: %.cpp\n\t";
15130         if(project->isActiveConfig("echo_depend_creation"))
15131             t << "@echo Creating depend for $<" << "\n\t";
15132         t << mkdir_p_asstring("$(@D)") << "\n\t"
15133           << "@$(CXX) " << cmd << " $< | sed \"s,^\\($(*F).o\\):," << odir << "\\1:,g\" >$@" << endl << endl;
15134
15135         t << odir << ".deps/%.d: %.c\n\t";
15136         if(project->isActiveConfig("echo_depend_creation"))
15137             t << "@echo Creating depend for $<" << "\n\t";
15138         t << mkdir_p_asstring("$(@D)") << "\n\t"
15139           << "@$(CC) " << cmd << " $< | sed \"s,^\\($(*F).o\\):," << odir << "\\1:,g\" >$@" << endl << endl;
15140
15141         QString src[] = { "SOURCES", "GENERATED_SOURCES", QString() };
15142         for(int x = 0; !src[x].isNull(); x++) {
15143             QStringList &l = project->values(src[x]);
15144             for(QStringList::Iterator it = l.begin(); it != l.end(); ++it) {
15145                 if(!(*it).isEmpty()) {
15146                     QString d_file;
15147                     for(QStringList::Iterator cit = Option::c_ext.begin();
15148                         cit != Option::c_ext.end(); ++cit) {
15149                         if((*it).endsWith((*cit))) {
15150                             d_file = (*it).left((*it).length() - (*cit).length());
15151                             break;
15152                         }
15153                     }
15154                     if(d_file.isEmpty()) {
15155                         for(QStringList::Iterator cppit = Option::cpp_ext.begin();
15156                             cppit != Option::cpp_ext.end(); ++cppit) {
15157                             if((*it).endsWith((*cppit))) {
15158                                 d_file = (*it).left((*it).length() - (*cppit).length());
15159                                 break;
15160                             }
15161                         }
15162                     }
15163                     if(!d_file.isEmpty()) {
15164                         d_file = odir + ".deps/" + d_file + ".d";
15165                         QStringList deps = findDependencies((*it)).filter(QRegExp(Option::cpp_moc_ext + "$"));
15166                         if(!deps.isEmpty())
15167                             t << d_file << ": " << deps.join(" ") << endl;
15168                         t << "-include " << d_file << endl;
15169                         project->values("QMAKE_DISTCLEAN") += d_file;
15170                     }
15171                 }
15172             }
15173         }
15174     }
15175
15176     t << "####### Build rules" << endl << endl;
15177     if(!project->values("SUBLIBS").isEmpty()) {
15178         QString libdir = "tmp/";
15179         if(!project->isEmpty("SUBLIBS_DIR"))
15180             libdir = project->first("SUBLIBS_DIR");
15181         t << "SUBLIBS       = ";
15182         QStringList &l = project->values("SUBLIBS");
15183         for(QStringList::Iterator it = l.begin(); it != l.end(); ++it)
15184             t << libdir << "lib" << (*it) << ".a ";
15185         t << endl << endl;
15186     }
15187     if(project->isActiveConfig("depend_prl") && !project->isEmpty("QMAKE_PRL_INTERNAL_FILES")) {
15188         QStringList &l = project->values("QMAKE_PRL_INTERNAL_FILES");
15189         QStringList::Iterator it;
15190         for(it = l.begin(); it != l.end(); ++it) {
15191             QMakeMetaInfo libinfo;
15192             if(libinfo.readLib((*it)) && !libinfo.isEmpty("QMAKE_PRL_BUILD_DIR")) {
15193                 QString dir;
15194                 int slsh = (*it).lastIndexOf(Option::dir_sep);
15195                 if(slsh != -1)
15196                     dir = (*it).left(slsh + 1);
15197                 QString targ = dir + libinfo.first("QMAKE_PRL_TARGET");
15198                 target_deps += " " + targ;
15199                 t << targ << ":" << "\n\t"
15200                   << "@echo \"Creating '" << targ << "'\"" << "\n\t"
15201                   << "(cd " << libinfo.first("QMAKE_PRL_BUILD_DIR") << ";"
15202                   << "$(MAKE))" << endl;
15203             }
15204         }
15205     }
15206     if(!project->values("QMAKE_APP_FLAG").isEmpty()) {
15207         QString destdir = project->first("DESTDIR");
15208         if(!project->isEmpty("QMAKE_BUNDLE")) {
15209             QString bundle_loc = project->first("QMAKE_BUNDLE_LOCATION");
15210             if(!bundle_loc.isEmpty() && !bundle_loc.startsWith("/"))
15211                 bundle_loc.prepend("/");
15212             if(!bundle_loc.endsWith("/"))
15213                 bundle_loc += "/";
15214             destdir += project->first("QMAKE_BUNDLE") + bundle_loc;
15215         }
15216         if(do_incremental) {
15217
15218             QString incr_target = var("TARGET") + "_incremental";
15219             if(incr_target.indexOf(Option::dir_sep) != -1)
15220                 incr_target = incr_target.right(incr_target.length() -
15221                                                 (incr_target.lastIndexOf(Option::dir_sep) + 1));
15222             QString incr_deps, incr_objs;
15223             if(project->first("QMAKE_INCREMENTAL_STYLE") == "ld") {
15224                 QString incr_target_dir = var("OBJECTS_DIR") + incr_target + Option::obj_ext;
15225
15226                 t << incr_target_dir << ": $(OBJECTS)" << "\n\t"
15227                   << "ld -r  -o "<< incr_target_dir << " $(OBJECTS)" << endl;
15228
15229                 deps.prepend(incr_target_dir + " ");
15230                 incr_deps = "$(INCREMENTAL_OBJECTS)";
15231                 if(!incr_objs.isEmpty())
15232                     incr_objs += " ";
15233                 incr_objs += incr_target_dir;
15234             } else {
15235
15236                 QString incr_target_dir = var("DESTDIR") + "lib" + incr_target + "." +
15237                                           project->values("QMAKE_EXTENSION_SHLIB").first();
15238                 QString incr_lflags = var("QMAKE_LFLAGS_SHLIB") + " ";
15239                 if(project->isActiveConfig("debug"))
15240                     incr_lflags += var("QMAKE_LFLAGS_DEBUG");
15241                 else
15242                     incr_lflags += var("QMAKE_LFLAGS_RELEASE");
15243                 t << incr_target_dir << ": $(INCREMENTAL_OBJECTS)" << "\n\t";
15244                 if(!destdir.isEmpty())
15245                     t << "\n\t" << mkdir_p_asstring(destdir) << "\n\t";
15246                 t << "$(LINK) " << incr_lflags << " -o "<< incr_target_dir <<
15247                     " $(INCREMENTAL_OBJECTS)" << endl;
15248
15249                 if(!destdir.isEmpty()) {
15250                     if(!incr_objs.isEmpty())
15251                         incr_objs += " ";
15252                     incr_objs += "-L" + destdir;
15253                 } else {
15254                     if(!incr_objs.isEmpty())
15255                         incr_objs += " ";
15256                     incr_objs += "-L" + qmake_getpwd();
15257                 }
15258                 if(!incr_objs.isEmpty())
15259                     incr_objs += " ";
15260                 incr_objs += " -l" + incr_target;
15261                 deps.prepend(incr_target_dir + " ");
15262                 incr_deps = "$(OBJECTS)";
15263             }
15264             t << "all: " << deps << " " << valGlue(escapeFilePaths(project->values("ALL_DEPS")),""," "," ") << "$(TARGET)"
15265               << endl << endl;
15266
15267
15268             t << var("TARGET") << ": " << var("PRE_TARGETDEPS") << " " << incr_deps << " " << target_deps
15269               << " " << var("POST_TARGETDEPS") << "\n\t";
15270             if(!destdir.isEmpty())
15271                 t << "\n\t" << mkdir_p_asstring(destdir) << "\n\t";
15272             if(!project->isEmpty("QMAKE_PRE_LINK"))
15273                 t << var("QMAKE_PRE_LINK") << "\n\t";
15274             t << "$(LINK) $(LFLAGS) -o $(TARGET) " << incr_deps << " " << incr_objs << " $(OBJCOMP) $(LIBS)";
15275             if(!project->isEmpty("QMAKE_POST_LINK"))
15276                 t << "\n\t" << var("QMAKE_POST_LINK");
15277             t << endl << endl;
15278         } else {
15279             t << "all: " << deps << " " << valGlue(escapeFilePaths(project->values("ALL_DEPS")),""," "," ") << "$(TARGET)"
15280               << endl << endl;
15281
15282             t << "$(TARGET): " << var("PRE_TARGETDEPS") << " $(OBJECTS) "
15283               << target_deps << " " << var("POST_TARGETDEPS") << "\n\t";
15284             if(!destdir.isEmpty())
15285                 t << mkdir_p_asstring(destdir) << "\n\t";
15286             if(!project->isEmpty("QMAKE_PRE_LINK"))
15287                 t << var("QMAKE_PRE_LINK") << "\n\t";
15288             t << "$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)";
15289             if(!project->isEmpty("QMAKE_POST_LINK"))
15290                 t << "\n\t" << var("QMAKE_POST_LINK");
15291             t << endl << endl;
15292         }
15293     } else if(!project->isActiveConfig("staticlib")) {
15294         QString destdir = unescapeFilePath(project->first("DESTDIR")), incr_deps;
15295         if(!project->isEmpty("QMAKE_BUNDLE")) {
15296             QString bundle_loc = project->first("QMAKE_BUNDLE_LOCATION");
15297             if(!bundle_loc.isEmpty() && !bundle_loc.startsWith("/"))
15298                 bundle_loc.prepend("/");
15299             if(!bundle_loc.endsWith("/"))
15300                 bundle_loc += "/";
15301             destdir += project->first("QMAKE_BUNDLE") + bundle_loc;
15302         }
15303         destdir = escapeFilePath(destdir);
15304
15305         if(do_incremental) {
15306             QString s_ext = project->values("QMAKE_EXTENSION_SHLIB").first();
15307             QString incr_target = var("QMAKE_ORIG_TARGET").replace(
15308                 QRegExp("\\." + s_ext), "").replace(QRegExp("^lib"), "") + "_incremental";
15309             if(incr_target.indexOf(Option::dir_sep) != -1)
15310                 incr_target = incr_target.right(incr_target.length() -
15311                                                 (incr_target.lastIndexOf(Option::dir_sep) + 1));
15312             incr_target = escapeFilePath(incr_target);
15313
15314             if(project->first("QMAKE_INCREMENTAL_STYLE") == "ld") {
15315                 QString incr_target_dir = escapeFilePath(var("OBJECTS_DIR") + incr_target + Option::obj_ext);
15316
15317                 const QString link_deps = "$(OBJECTS) ";
15318                 t << incr_target_dir << ": " << link_deps << "\n\t"
15319                   << "ld -r  -o " << incr_target_dir << " " << link_deps << endl;
15320
15321                 QStringList &cmd = project->values("QMAKE_LINK_SHLIB_CMD");
15322                 cmd.first().replace("$(OBJECTS) ", "$(INCREMENTAL_OBJECTS)");
15323                 cmd.append(incr_target_dir);
15324                 deps.prepend(incr_target_dir + " ");
15325                 incr_deps = "$(INCREMENTAL_OBJECTS)";
15326             } else {
15327
15328                 QString incr_target_dir = escapeFilePath(destdir + "lib" + incr_target + "." + s_ext);
15329                 QString incr_lflags = var("QMAKE_LFLAGS_SHLIB") + " ";
15330                 if(!project->isEmpty("QMAKE_LFLAGS_INCREMENTAL"))
15331                     incr_lflags += var("QMAKE_LFLAGS_INCREMENTAL") + " ";
15332                 if(project->isActiveConfig("debug"))
15333                     incr_lflags += var("QMAKE_LFLAGS_DEBUG");
15334                 else
15335                     incr_lflags += var("QMAKE_LFLAGS_RELEASE");
15336                 t << incr_target_dir << ": $(INCREMENTAL_OBJECTS)" << "\n\t";
15337                 if(!destdir.isEmpty())
15338                     t << mkdir_p_asstring(destdir) << "\n\t";
15339                 t << "$(LINK) " << incr_lflags << " -o "<< incr_target_dir <<
15340                     " $(INCREMENTAL_OBJECTS)" << endl;
15341
15342                 QStringList &cmd = project->values("QMAKE_LINK_SHLIB_CMD");
15343                 if(!destdir.isEmpty())
15344                     cmd.append(" -L" + destdir);
15345                 cmd.append(" -l" + incr_target);
15346                 deps.prepend(incr_target_dir + " ");
15347                 incr_deps = "$(OBJECTS)";
15348             }
15349
15350             t << "all: " << " " << deps << " " << valGlue(escapeFilePaths(project->values("ALL_DEPS")),""," "," ")
15351               << " " << destdir << "$(TARGET)" << endl << endl;
15352
15353
15354             t << destdir << "$(TARGET): " << var("PRE_TARGETDEPS") << " "
15355               << incr_deps << " $(SUBLIBS) " << target_deps << " " << var("POST_TARGETDEPS");
15356         } else {
15357             t << "all: " << deps << " " << valGlue(escapeFilePaths(project->values("ALL_DEPS")),""," "," ") << " " <<
15358                 destdir << "$(TARGET)" << endl << endl;
15359             t << destdir << "$(TARGET): " << var("PRE_TARGETDEPS")
15360               << " $(OBJECTS) $(SUBLIBS) $(OBJCOMP) " << target_deps
15361               << " " << var("POST_TARGETDEPS");
15362         }
15363         if(!destdir.isEmpty())
15364             t << "\n\t" << mkdir_p_asstring(destdir);
15365         if(!project->isEmpty("QMAKE_PRE_LINK"))
15366             t << "\n\t" << var("QMAKE_PRE_LINK");
15367
15368         if(project->isActiveConfig("compile_libtool")) {
15369             t << "\n\t"
15370               << var("QMAKE_LINK_SHLIB_CMD");
15371         } else if(project->isActiveConfig("plugin")) {
15372             t << "\n\t"
15373               << "-$(DEL_FILE) $(TARGET)" << "\n\t"
15374               << var("QMAKE_LINK_SHLIB_CMD");
15375             if(!destdir.isEmpty())
15376                 t << "\n\t"
15377                   << "-$(MOVE) $(TARGET) " << destdir;
15378             if(!project->isEmpty("QMAKE_POST_LINK"))
15379                 t << "\n\t" << var("QMAKE_POST_LINK") << "\n\t";
15380             t << endl << endl;
15381         } else if(!project->isEmpty("QMAKE_BUNDLE")) {
15382             t << "\n\t"
15383               << "-$(DEL_FILE) $(TARGET) $(TARGET0) $(DESTDIR)$(TARGET0)" << "\n\t"
15384               << var("QMAKE_LINK_SHLIB_CMD") << "\n\t"
15385               << mkdir_p_asstring("\"`dirname $(DESTDIR)$(TARGETD)`\"", false) << "\n\t"
15386               << "-$(MOVE) $(TARGET) $(DESTDIR)$(TARGETD)" << "\n\t"
15387               << mkdir_p_asstring("\"`dirname $(DESTDIR)$(TARGET0)`\"", false) << "\n\t"
15388               << varGlue("QMAKE_LN_SHLIB","-"," "," Versions/" +
15389                          project->first("QMAKE_FRAMEWORK_VERSION") +
15390                          "/$(TARGET) $(DESTDIR)$(TARGET0)") << "\n\t"
15391               << "-$(DEL_FILE) " << destdir << "Versions/Current" << "\n\t"
15392               << varGlue("QMAKE_LN_SHLIB","-"," ", " " + project->first("QMAKE_FRAMEWORK_VERSION") +
15393                          " " + destdir + "Versions/Current") << "\n\t";
15394             if(!project->isEmpty("QMAKE_POST_LINK"))
15395                 t << "\n\t" << var("QMAKE_POST_LINK");
15396             t << endl << endl;
15397         } else if(project->isEmpty("QMAKE_HPUX_SHLIB")) {
15398             t << "\n\t"
15399               << "-$(DEL_FILE) $(TARGET) $(TARGET0) $(TARGET1) $(TARGET2)" << "\n\t"
15400               << var("QMAKE_LINK_SHLIB_CMD") << "\n\t";
15401             t << varGlue("QMAKE_LN_SHLIB","-"," "," $(TARGET) $(TARGET0)") << "\n\t"
15402               << varGlue("QMAKE_LN_SHLIB","-"," "," $(TARGET) $(TARGET1)") << "\n\t"
15403               << varGlue("QMAKE_LN_SHLIB","-"," "," $(TARGET) $(TARGET2)");
15404             if(!destdir.isEmpty())
15405                 t << "\n\t"
15406                   << "-$(DEL_FILE) " << destdir << "$(TARGET)\n\t"
15407                   << "-$(DEL_FILE) " << destdir << "$(TARGET0)\n\t"
15408                   << "-$(DEL_FILE) " << destdir << "$(TARGET1)\n\t"
15409                   << "-$(DEL_FILE) " << destdir << "$(TARGET2)\n\t"
15410                   << "-$(MOVE) $(TARGET) $(TARGET0) $(TARGET1) $(TARGET2) " << destdir;
15411             if(!project->isEmpty("QMAKE_POST_LINK"))
15412                 t << "\n\t" << var("QMAKE_POST_LINK");
15413             t << endl << endl;
15414         } else {
15415             t << "\n\t"
15416               << "-$(DEL_FILE) $(TARGET) $(TARGET0)" << "\n\t"
15417               << var("QMAKE_LINK_SHLIB_CMD") << "\n\t";
15418             t << varGlue("QMAKE_LN_SHLIB",""," "," $(TARGET) $(TARGET0)");
15419             if(!destdir.isEmpty())
15420                 t << "\n\t"
15421                    << "-$(DEL_FILE) " << destdir << "$(TARGET)\n\t"
15422                    << "-$(DEL_FILE) " << destdir << "$(TARGET0)\n\t"
15423                    << "-$(MOVE) $(TARGET) $(TARGET0) " << destdir;
15424             if(!project->isEmpty("QMAKE_POST_LINK"))
15425                 t << "\n\t" << var("QMAKE_POST_LINK");
15426             t << endl << endl;
15427         }
15428         t << endl << endl;
15429
15430         if (! project->isActiveConfig("plugin")) {
15431             t << "staticlib: $(TARGETA)" << endl << endl;
15432             t << "$(TARGETA): " << var("PRE_TARGETDEPS") << " $(OBJECTS) $(OBJCOMP)";
15433             if(do_incremental)
15434                 t << " $(INCREMENTAL_OBJECTS)";
15435             t << " " << var("POST_TARGETDEPS") << "\n\t"
15436               << "-$(DEL_FILE) $(TARGETA) " << "\n\t"
15437               << var("QMAKE_AR_CMD");
15438             if(do_incremental)
15439                 t << " $(INCREMENTAL_OBJECTS)";
15440             if(!project->isEmpty("QMAKE_RANLIB"))
15441                 t << "\n\t" << "$(RANLIB) $(TARGETA)";
15442             t << endl << endl;
15443         }
15444     } else {
15445         QString destdir = project->first("DESTDIR");
15446         t << "all: " << deps << " " << valGlue(escapeFilePaths(project->values("ALL_DEPS")),""," "," ") << destdir << "$(TARGET) "
15447           << varGlue("QMAKE_AR_SUBLIBS", destdir, " " + destdir, "") << "\n\n"
15448           << "staticlib: " << destdir << "$(TARGET)" << "\n\n";
15449         if(project->isEmpty("QMAKE_AR_SUBLIBS")) {
15450             t << destdir << "$(TARGET): " << var("PRE_TARGETDEPS")
15451               << " $(OBJECTS) $(OBJCOMP) " << var("POST_TARGETDEPS") << "\n\t";
15452             if(!destdir.isEmpty())
15453                 t << mkdir_p_asstring(destdir) << "\n\t";
15454             t << "-$(DEL_FILE) $(TARGET)" << "\n\t"
15455               << var("QMAKE_AR_CMD") << "\n";
15456             if(!project->isEmpty("QMAKE_POST_LINK"))
15457                 t << "\t" << var("QMAKE_POST_LINK") << "\n";
15458             if(!project->isEmpty("QMAKE_RANLIB"))
15459                 t << "\t" << "$(RANLIB) $(TARGET)" << "\n";
15460             if(!destdir.isEmpty())
15461                 t << "\t" << "-$(DEL_FILE) " << destdir << "$(TARGET)" << "\n"
15462                   << "\t" << "-$(MOVE) $(TARGET) " << destdir << "\n";
15463         } else {
15464             int max_files = project->first("QMAKE_MAX_FILES_PER_AR").toInt();
15465             QStringList objs = project->values("OBJECTS") + project->values("OBJCOMP"),
15466                         libs = project->values("QMAKE_AR_SUBLIBS");
15467             libs.prepend("$(TARGET)");
15468             for(QStringList::Iterator libit = libs.begin(), objit = objs.begin();
15469                 libit != libs.end(); ++libit) {
15470                 QStringList build;
15471                 for(int cnt = 0; cnt < max_files && objit != objs.end(); ++objit, cnt++)
15472                     build << (*objit);
15473                 QString ar;
15474                 if((*libit) == "$(TARGET)") {
15475                     t << destdir << "$(TARGET): " << var("PRE_TARGETDEPS")
15476                       << " " << var("POST_TARGETDEPS") << valList(build) << "\n\t";
15477                     ar = project->values("QMAKE_AR_CMD").first();
15478                     ar = ar.replace("$(OBJECTS)", build.join(" "));
15479                 } else {
15480                     t << (*libit) << ": " << valList(build) << "\n\t";
15481                     ar = "$(AR) " + (*libit) + " " + build.join(" ");
15482                 }
15483                 if(!destdir.isEmpty())
15484                     t << mkdir_p_asstring(destdir) << "\n\t";
15485                 t << "-$(DEL_FILE) " << (*libit) << "\n\t"
15486                   << ar << "\n";
15487                 if(!project->isEmpty("QMAKE_POST_LINK"))
15488                     t << "\t" << var("QMAKE_POST_LINK") << "\n";
15489                 if(!project->isEmpty("QMAKE_RANLIB"))
15490                     t << "\t" << "$(RANLIB) " << (*libit) << "\n";
15491                 if(!destdir.isEmpty())
15492                     t << "\t" << "-$(DEL_FILE) " << destdir << (*libit) << "\n"
15493                       << "\t" << "-$(MOVE) " << (*libit) << " " << destdir << "\n";
15494             }
15495         }
15496         t << endl << endl;
15497     }
15498
15499     writeMakeQmake(t);
15500     if(project->isEmpty("QMAKE_FAILED_REQUIREMENTS") && !project->isActiveConfig("no_autoqmake")) {
15501         QString meta_files;
15502         if(project->isActiveConfig("create_libtool") && project->first("TEMPLATE") == "lib" &&
15503            !project->isActiveConfig("compile_libtool")) {
15504             if(!meta_files.isEmpty())
15505                 meta_files += " ";
15506             meta_files += libtoolFileName();
15507         }
15508         if(project->isActiveConfig("create_pc") && project->first("TEMPLATE") == "lib") {
15509             if(!meta_files.isEmpty())
15510                 meta_files += " ";
15511             meta_files += pkgConfigFileName();
15512         }
15513         if(!meta_files.isEmpty())
15514             t << meta_files << ": " << "\n\t"
15515               << "@$(QMAKE) -prl " << buildArgs() << " " << project->projectFile() << endl;
15516     }
15517
15518     if(!project->first("QMAKE_PKGINFO").isEmpty()) {
15519         QString pkginfo = escapeFilePath(project->first("QMAKE_PKGINFO"));
15520         QString destdir = escapeFilePath(project->first("DESTDIR") + project->first("QMAKE_BUNDLE") + "/Contents");
15521         t << pkginfo << ": " << "\n\t";
15522         if(!destdir.isEmpty())
15523             t << mkdir_p_asstring(destdir) << "\n\t";
15524         t << "@$(DEL_FILE) " << pkginfo << "\n\t"
15525           << "@echo \"APPL"
15526           << (project->isEmpty("QMAKE_PKGINFO_TYPEINFO") ? QString::fromLatin1("????") : project->first("QMAKE_PKGINFO_TYPEINFO").left(4))
15527           << "\" >" << pkginfo << endl;
15528     }
15529     if(!project->isEmpty("QMAKE_BUNDLE")) {
15530
15531         QString info_plist = escapeFilePath(fileFixify(project->first("QMAKE_INFO_PLIST"))),
15532             info_plist_out = escapeFilePath(project->first("QMAKE_INFO_PLIST_OUT"));
15533         QString destdir = info_plist_out.section(Option::dir_sep, 0, -2);
15534         t << info_plist_out << ": " << "\n\t";
15535         if(!destdir.isEmpty())
15536             t << mkdir_p_asstring(destdir) << "\n\t";
15537         if(project->first("TEMPLATE") == "app") {
15538             QString icon = fileFixify(var("ICON"));
15539             t << "@$(DEL_FILE) " << info_plist_out << "\n\t"
15540               << "@sed "
15541               << "-e \"s,@ICON@," << icon.section(Option::dir_sep, -1) << ",g\" "
15542               << "-e \"s,@EXECUTABLE@," << var("QMAKE_ORIG_TARGET") << ",g\" "
15543               << "-e \"s,@TYPEINFO@,"<< (project->isEmpty("QMAKE_PKGINFO_TYPEINFO") ?
15544                          QString::fromLatin1("????") : project->first("QMAKE_PKGINFO_TYPEINFO").left(4)) << ",g\" "
15545               << "" << info_plist << " >" << info_plist_out << endl;
15546
15547             if(!project->isEmpty("ICON")) {
15548                 QString dir = project->first("DESTDIR") + project->first("QMAKE_BUNDLE") + "/Contents/Resources/";
15549                 const QString icon_path = escapeFilePath(dir + icon.section(Option::dir_sep, -1));
15550                 t << icon_path << ": " << icon << "\n\t"
15551                   << mkdir_p_asstring(dir) << "\n\t"
15552                   << "@$(DEL_FILE) " << icon_path << "\n\t"
15553                   << "@$(COPY_FILE) " << escapeFilePath(icon) << " " << icon_path << endl;
15554             }
15555         } else {
15556             t << "@$(DEL_FILE) " << info_plist_out << "\n\t"
15557               << "@sed "
15558               << "-e \"s,@LIBRARY@," << var("QMAKE_ORIG_TARGET") << ",g\" "
15559               << "-e \"s,@SHORT_VERSION@," << project->first("VER_MAJ") << "." << project->first("VER_MIN") << ",g\" "
15560               << "-e \"s,@TYPEINFO@,"
15561               << (project->isEmpty("QMAKE_PKGINFO_TYPEINFO") ?
15562                   QString::fromLatin1("????") : project->first("QMAKE_PKGINFO_TYPEINFO").left(4)) << ",g\" "
15563               << "" << info_plist << " >" << info_plist_out << endl;
15564         }
15565
15566         if(!project->isEmpty("QMAKE_BUNDLE_DATA")) {
15567             QString bundle_dir = project->first("DESTDIR") + project->first("QMAKE_BUNDLE") + "/";
15568             const QStringList &bundle_data = project->values("QMAKE_BUNDLE_DATA");
15569             for(int i = 0; i < bundle_data.count(); i++) {
15570                 const QStringList &files = project->values(bundle_data[i] + ".files");
15571                 QString path = bundle_dir;
15572                 if(!project->isEmpty(bundle_data[i] + ".version")) {
15573                     QString version = project->first(bundle_data[i] + ".version") + "/" +
15574                                       project->first("QMAKE_FRAMEWORK_VERSION") + "/";
15575                     t << Option::fixPathToLocalOS(path + project->first(bundle_data[i] + ".path")) << ": " << "\n\t"
15576                       << mkdir_p_asstring(path) << "\n\t"
15577                       << "@$(SYMLINK) " << version << project->first(bundle_data[i] + ".path") << " " << path << endl;
15578                     path += version;
15579                 }
15580                 path += project->first(bundle_data[i] + ".path");
15581                 path = Option::fixPathToLocalOS(path);
15582                 for(int file = 0; file < files.count(); file++) {
15583                     const QString dst = path + Option::dir_sep + fileInfo(files[file]).fileName();
15584                     t << dst << ": " << files[file] << "\n\t"
15585                       << mkdir_p_asstring(path) << "\n\t";
15586                     QFileInfo fi(fileInfo(files[file]));
15587                     if(fi.isDir())
15588                         t << "@$(DEL_FILE) -r " << dst << "\n\t"
15589                           << "@$(COPY_DIR) " << files[file] << " " << dst << endl;
15590                     else
15591                         t << "@$(DEL_FILE) " << dst << "\n\t"
15592                           << "@$(COPY_FILE) " << files[file] << " " << dst << endl;
15593                 }
15594             }
15595         }
15596     }
15597
15598     QString ddir;
15599     QString packageName(project->first("QMAKE_ORIG_TARGET"));
15600     if(!project->isActiveConfig("no_dist_version"))
15601         packageName += var("VERSION");
15602     if (project->isEmpty("QMAKE_DISTDIR"))
15603         ddir = packageName;
15604     else
15605         ddir = project->first("QMAKE_DISTDIR");
15606
15607     QString ddir_c = escapeFilePath(fileFixify((project->isEmpty("OBJECTS_DIR") ? QString(".tmp/") :
15608                                                 project->first("OBJECTS_DIR")) + ddir));
15609     t << "dist: " << "\n\t"
15610       << mkdir_p_asstring(ddir_c) << "\n\t"
15611       << "$(COPY_FILE) --parents $(SOURCES) $(DIST) " << ddir_c << Option::dir_sep << " && ";
15612     if(!project->isEmpty("QMAKE_EXTRA_COMPILERS")) {
15613         const QStringList &quc = project->values("QMAKE_EXTRA_COMPILERS");
15614         for(QStringList::ConstIterator it = quc.begin(); it != quc.end(); ++it) {
15615             const QStringList &var = project->values((*it)+".input");
15616             for(QStringList::ConstIterator var_it = var.begin(); var_it != var.end(); ++var_it) {
15617                 const QStringList &val = project->values((*var_it));
15618                 if(val.isEmpty())
15619                     continue;
15620                 t << "$(COPY_FILE) --parents " << val.join(" ") << " " << ddir_c << Option::dir_sep << " && ";
15621             }
15622         }
15623     }
15624     if(!project->isEmpty("TRANSLATIONS"))
15625         t << "$(COPY_FILE) --parents " << var("TRANSLATIONS") << " " << ddir_c << Option::dir_sep << " && ";
15626     t << "(cd `dirname " << ddir_c << "` && "
15627       << "$(TAR) " << packageName << ".tar " << ddir << " && "
15628       << "$(COMPRESS) " << packageName << ".tar) && "
15629       << "$(MOVE) `dirname " << ddir_c << "`" << Option::dir_sep << packageName << ".tar.gz . && "
15630       << "$(DEL_FILE) -r " << ddir_c
15631       << endl << endl;
15632
15633     t << endl;
15634
15635     QString clean_targets = "compiler_clean " + var("CLEAN_DEPS");
15636     if(do_incremental) {
15637         t << "incrclean:" << "\n";
15638         if(src_incremental)
15639             t << "\t-$(DEL_FILE) $(INCREMENTAL_OBJECTS)" << "\n";
15640         t << endl;
15641     }
15642
15643     t << "clean:" << clean_targets << "\n\t";
15644     if(!project->isEmpty("OBJECTS")) {
15645         if(project->isActiveConfig("compile_libtool"))
15646             t << "-$(LIBTOOL) --mode=clean $(DEL_FILE) $(OBJECTS)" << "\n\t";
15647         else
15648             t << "-$(DEL_FILE) $(OBJECTS)" << "\n\t";
15649     }
15650     if(doPrecompiledHeaders() && !project->isEmpty("PRECOMPILED_HEADER")) {
15651         QStringList precomp_files;
15652         QString precomph_out_dir;
15653
15654         if(!project->isEmpty("PRECOMPILED_DIR"))
15655             precomph_out_dir = project->first("PRECOMPILED_DIR");
15656         precomph_out_dir += project->first("QMAKE_ORIG_TARGET") + project->first("QMAKE_PCH_OUTPUT_EXT");
15657
15658         if (project->isActiveConfig("icc_pch_style")) {
15659
15660             QString pchBaseName = project->first("QMAKE_ORIG_TARGET");
15661             QString pchOutput;
15662             if(!project->isEmpty("PRECOMPILED_DIR"))
15663                 pchOutput = project->first("PRECOMPILED_DIR");
15664             pchOutput += pchBaseName + project->first("QMAKE_PCH_OUTPUT_EXT");
15665             QString sourceFile = pchOutput + Option::cpp_ext.first();
15666             QString objectFile = createObjectList(QStringList(sourceFile)).first();
15667
15668             precomp_files << precomph_out_dir << sourceFile << objectFile;
15669         } else {
15670
15671             precomph_out_dir += Option::dir_sep;
15672
15673             QString header_prefix = project->first("QMAKE_PRECOMP_PREFIX");
15674             if(!project->isEmpty("QMAKE_CFLAGS_PRECOMPILE"))
15675                 precomp_files += precomph_out_dir + header_prefix + "c";
15676             if(!project->isEmpty("QMAKE_CXXFLAGS_PRECOMPILE"))
15677                 precomp_files += precomph_out_dir + header_prefix + "c++";
15678             if(project->isActiveConfig("objective_c")) {
15679                 if(!project->isEmpty("QMAKE_OBJCFLAGS_PRECOMPILE"))
15680                     precomp_files += precomph_out_dir + header_prefix + "objective-c";
15681                 if(!project->isEmpty("QMAKE_OBJCXXFLAGS_PRECOMPILE"))
15682                     precomp_files += precomph_out_dir + header_prefix + "objective-c++";
15683             }
15684         }
15685         t << "-$(DEL_FILE) " << precomp_files.join(" ") << "\n\t";
15686     }
15687     if(!project->isEmpty("IMAGES"))
15688         t << varGlue("QMAKE_IMAGE_COLLECTION", "\t-$(DEL_FILE) ", " ", "") << "\n\t";
15689     if(src_incremental)
15690         t << "-$(DEL_FILE) $(INCREMENTAL_OBJECTS)" << "\n\t";
15691     t << varGlue("QMAKE_CLEAN","-$(DEL_FILE) "," ","\n\t")
15692       << "-$(DEL_FILE) *~ core *.core" << "\n"
15693       << varGlue("CLEAN_FILES","\t-$(DEL_FILE) "," ","") << endl << endl;
15694     t << "####### Sub-libraries" << endl << endl;
15695     if (!project->values("SUBLIBS").isEmpty()) {
15696         QString libdir = "tmp/";
15697         if(!project->isEmpty("SUBLIBS_DIR"))
15698             libdir = project->first("SUBLIBS_DIR");
15699         QStringList &l = project->values("SUBLIBS");
15700         for(it = l.begin(); it != l.end(); ++it)
15701             t << libdir << "lib" << (*it) << ".a" << ":\n\t"
15702               << var(QString("MAKELIB") + (*it)) << endl << endl;
15703     }
15704
15705     QString destdir = project->first("DESTDIR");
15706     if(!destdir.isEmpty() && destdir.right(1) != Option::dir_sep)
15707         destdir += Option::dir_sep;
15708     t << "distclean: " << "clean\n";
15709     if(!project->isEmpty("QMAKE_BUNDLE")) {
15710         QString bundlePath = escapeFilePath(destdir + project->first("QMAKE_BUNDLE"));
15711         t << "\t-$(DEL_FILE) -r " << bundlePath << endl;
15712     } else if(project->isActiveConfig("compile_libtool")) {
15713         t << "\t-$(LIBTOOL) --mode=clean $(DEL_FILE) " << "$(TARGET)" << endl;
15714     } else if(!project->isActiveConfig("staticlib") && project->values("QMAKE_APP_FLAG").isEmpty() &&
15715        !project->isActiveConfig("plugin")) {
15716         t << "\t-$(DEL_FILE) " << destdir << "$(TARGET)" << " " << endl
15717           << "\t-$(DEL_FILE) " << destdir << "$(TARGET0) " << destdir << "$(TARGET1) "
15718           << destdir << "$(TARGET2) $(TARGETA)" << endl;
15719     } else {
15720         t << "\t-$(DEL_FILE) " << "$(TARGET)" << " " << endl;
15721     }
15722     t << varGlue("QMAKE_DISTCLEAN","\t-$(DEL_FILE) "," ","\n");
15723     {
15724         QString ofile = Option::fixPathToTargetOS(fileFixify(Option::output.fileName()));
15725         if(!ofile.isEmpty())
15726             t << "\t-$(DEL_FILE) " << ofile << endl;
15727     }
15728     t << endl << endl;
15729
15730     if(doPrecompiledHeaders() && !project->isEmpty("PRECOMPILED_HEADER")) {
15731         QString pchInput = project->first("PRECOMPILED_HEADER");
15732         t << "###### Prefix headers" << endl;
15733         QString comps[] = { "C", "CXX", "OBJC", "OBJCXX", QString() };
15734         for(int i = 0; !comps[i].isNull(); i++) {
15735             QString pchFlags = var("QMAKE_" + comps[i] + "FLAGS_PRECOMPILE");
15736             if(pchFlags.isEmpty())
15737                 continue;
15738
15739             QString cflags;
15740             if(comps[i] == "OBJC" || comps[i] == "OBJCXX")
15741                 cflags += " $(CFLAGS)";
15742             else
15743                 cflags += " $(" + comps[i] + "FLAGS)";
15744
15745             QString pchBaseName = project->first("QMAKE_ORIG_TARGET");
15746             QString pchOutput;
15747             if(!project->isEmpty("PRECOMPILED_DIR"))
15748                 pchOutput = project->first("PRECOMPILED_DIR");
15749             pchOutput += pchBaseName + project->first("QMAKE_PCH_OUTPUT_EXT");
15750
15751             if (project->isActiveConfig("icc_pch_style")) {
15752
15753                 QString sourceFile = pchOutput + Option::cpp_ext.first();
15754                 QString objectFile = createObjectList(QStringList(sourceFile)).first();
15755                 t << pchOutput << ": " << pchInput << " " << findDependencies(pchInput).join(" \\\n\t\t")
15756                   << "\n\techo \"// Automatically generated, do not modify\" > " << sourceFile
15757                   << "\n\trm -f " << pchOutput;
15758
15759                 pchFlags = pchFlags.replace("${QMAKE_PCH_TEMP_SOURCE}", sourceFile)
15760                            .replace("${QMAKE_PCH_TEMP_OBJECT}", objectFile);
15761             } else {
15762
15763                 QString header_prefix = project->first("QMAKE_PRECOMP_PREFIX");
15764
15765                 pchOutput += Option::dir_sep;
15766                 QString pchOutputDir = pchOutput, pchOutputFile;
15767
15768                 if(comps[i] == "C") {
15769                     pchOutputFile = "c";
15770                 } else if(comps[i] == "CXX") {
15771                     pchOutputFile = "c++";
15772                 } else if(project->isActiveConfig("objective_c")) {
15773                     if(comps[i] == "OBJC")
15774                         pchOutputFile = "objective-c";
15775                     else if(comps[i] == "OBJCXX")
15776                         pchOutputFile = "objective-c++";
15777                 }
15778                 if(pchOutputFile.isEmpty())
15779                     continue;
15780                 pchOutput += header_prefix + pchOutputFile;
15781
15782                 t << pchOutput << ": " << pchInput << " " << findDependencies(pchInput).join(" \\\n\t\t")
15783                   << "\n\t" << mkdir_p_asstring(pchOutputDir);
15784             }
15785             pchFlags = pchFlags.replace("${QMAKE_PCH_INPUT}", pchInput)
15786                        .replace("${QMAKE_PCH_OUTPUT_BASE}", pchBaseName)
15787                        .replace("${QMAKE_PCH_OUTPUT}", pchOutput);
15788
15789             QString compiler;
15790             if(comps[i] == "C" || comps[i] == "OBJC" || comps[i] == "OBJCXX")
15791                 compiler = "$(CC)";
15792             else
15793                 compiler = "$(CXX)";
15794
15795
15796             t << "\n\t" << compiler << cflags << " $(INCPATH) " << pchFlags << endl << endl;
15797         }
15798     }
15799
15800     writeExtraTargets(t);
15801     writeExtraCompilerTargets(t);
15802 }
15803
15804 void UnixMakefileGenerator::init2()
15805 {
15806
15807     if(project->isEmpty("VERSION"))
15808         project->values("VERSION").append("1.0." +
15809                                                (project->isEmpty("VER_PAT") ? QString("0") :
15810                                                 project->first("VER_PAT")));
15811     QStringList l = project->first("VERSION").split('.');
15812     l << "0" << "0";
15813     project->values("VER_MAJ").append(l[0]);
15814     project->values("VER_MIN").append(l[1]);
15815     project->values("VER_PAT").append(l[2]);
15816     if(project->isEmpty("QMAKE_FRAMEWORK_VERSION"))
15817         project->values("QMAKE_FRAMEWORK_VERSION").append(project->values("VER_MAJ").first());
15818
15819     if (!project->values("QMAKE_APP_FLAG").isEmpty()) {
15820         if(!project->isEmpty("QMAKE_BUNDLE")) {
15821             QString bundle_loc = project->first("QMAKE_BUNDLE_LOCATION");
15822             if(!bundle_loc.isEmpty() && !bundle_loc.startsWith("/"))
15823                 bundle_loc.prepend("/");
15824             if(!bundle_loc.endsWith("/"))
15825                 bundle_loc += "/";
15826             project->values("TARGET").first().prepend(project->first("QMAKE_BUNDLE") + bundle_loc);
15827         }
15828         if(!project->isEmpty("TARGET"))
15829             project->values("TARGET").first().prepend(project->first("DESTDIR"));
15830        if (!project->values("QMAKE_CYGWIN_EXE").isEmpty())
15831             project->values("TARGET_EXT").append(".exe");
15832     } else if (project->isActiveConfig("staticlib")) {
15833         project->values("TARGET").first().prepend("lib");
15834         project->values("TARGET").first() += ".a";
15835         if(project->values("QMAKE_AR_CMD").isEmpty())
15836             project->values("QMAKE_AR_CMD").append("$(AR) $(TARGET) $(OBJECTS)");
15837     } else {
15838         project->values("TARGETA").append(project->first("DESTDIR") + "lib" + project->first("TARGET") + ".a");
15839         if(project->isActiveConfig("compile_libtool"))
15840             project->values("TARGET_la") = QStringList(project->first("DESTDIR") + "lib" + project->first("TARGET") + Option::libtool_ext);
15841
15842         if (!project->values("QMAKE_AR_CMD").isEmpty())
15843             project->values("QMAKE_AR_CMD").first().replace("(TARGET)","(TARGETA)");
15844         else
15845             project->values("QMAKE_AR_CMD").append("$(AR) $(TARGETA) $(OBJECTS)");
15846         if(project->isActiveConfig("compile_libtool")) {
15847             project->values("TARGET") = project->values("TARGET_la");
15848         } else if(!project->isEmpty("QMAKE_BUNDLE")) {
15849             QString bundle_loc = project->first("QMAKE_BUNDLE_LOCATION");
15850             if(!bundle_loc.isEmpty() && !bundle_loc.startsWith("/"))
15851                 bundle_loc.prepend("/");
15852             if(!bundle_loc.endsWith("/"))
15853                 bundle_loc += "/";
15854             project->values("TARGET_").append(project->first("QMAKE_BUNDLE") +
15855                                                    bundle_loc + unescapeFilePath(project->first("TARGET")));
15856             project->values("TARGET_x.y").append(project->first("QMAKE_BUNDLE") +
15857                                                       "/Versions/" +
15858                                                       project->first("QMAKE_FRAMEWORK_VERSION") +
15859                                                       bundle_loc + unescapeFilePath(project->first("TARGET")));
15860         } else if(project->isActiveConfig("plugin")) {
15861             QString prefix;
15862             if(!project->isActiveConfig("no_plugin_name_prefix"))
15863                 prefix = "lib";
15864             project->values("TARGET_x.y.z").append(prefix +
15865                                                         project->first("TARGET") + "." +
15866                                                         project->first("QMAKE_EXTENSION_PLUGIN"));
15867             if(project->isActiveConfig("lib_version_first"))
15868                 project->values("TARGET_x").append(prefix + project->first("TARGET") + "." +
15869                                                         project->first("VER_MAJ") + "." +
15870                                                         project->first("QMAKE_EXTENSION_PLUGIN"));
15871             else
15872                 project->values("TARGET_x").append(prefix + project->first("TARGET") + "." +
15873                                                         project->first("QMAKE_EXTENSION_PLUGIN") +
15874                                                         "." + project->first("VER_MAJ"));
15875             project->values("TARGET") = project->values("TARGET_x.y.z");
15876         } else if (!project->isEmpty("QMAKE_HPUX_SHLIB")) {
15877             project->values("TARGET_").append("lib" + project->first("TARGET") + ".sl");
15878             if(project->isActiveConfig("lib_version_first"))
15879                 project->values("TARGET_x").append("lib" + project->first("VER_MAJ") + "." +
15880                                                         project->first("TARGET"));
15881             else
15882                 project->values("TARGET_x").append("lib" + project->first("TARGET") + "." +
15883                                                         project->first("VER_MAJ"));
15884             project->values("TARGET") = project->values("TARGET_x");
15885         } else if (!project->isEmpty("QMAKE_AIX_SHLIB")) {
15886             project->values("TARGET_").append("lib" + project->first("TARGET") + ".a");
15887             if(project->isActiveConfig("lib_version_first")) {
15888                 project->values("TARGET_x").append("lib" + project->first("TARGET") + "." +
15889                                                         project->first("VER_MAJ") + "." +
15890                                                         project->first("QMAKE_EXTENSION_SHLIB"));
15891                 project->values("TARGET_x.y").append("lib" + project->first("TARGET") + "." +
15892                                                           project->first("VER_MAJ") +
15893                                                           "." + project->first("VER_MIN") + "." +
15894                                                           project->first("QMAKE_EXTENSION_SHLIB"));
15895                 project->values("TARGET_x.y.z").append("lib" + project->first("TARGET") + "." +
15896                                                             project->first("VER_MAJ") + "." +
15897                                                             project->first("VER_MIN") + "." +
15898                                                             project->first("VER_PAT") + "." +
15899                                                             project->first("QMAKE_EXTENSION_SHLIB"));
15900             } else {
15901                 project->values("TARGET_x").append("lib" + project->first("TARGET") + "." +
15902                                                         project->first("QMAKE_EXTENSION_SHLIB") +
15903                                                         "." + project->first("VER_MAJ"));
15904                 project->values("TARGET_x.y").append("lib" + project->first("TARGET") + "." +
15905                                                           project->first("QMAKE_EXTENSION_SHLIB") +
15906                                                           "." + project->first("VER_MAJ") +
15907                                                           "." + project->first("VER_MIN"));
15908                 project->values("TARGET_x.y.z").append("lib" + project->first("TARGET") + "." +
15909                                                             project->first("QMAKE_EXTENSION_SHLIB") + "." +
15910                                                             project->first("VER_MAJ") + "." +
15911                                                             project->first("VER_MIN") + "." +
15912                                                             project->first("VER_PAT"));
15913             }
15914             project->values("TARGET") = project->values("TARGET_x.y.z");
15915         } else {
15916             project->values("TARGET_").append("lib" + project->first("TARGET") + "." +
15917                                                    project->first("QMAKE_EXTENSION_SHLIB"));
15918             if(project->isActiveConfig("lib_version_first")) {
15919                 project->values("TARGET_x").append("lib" + project->first("TARGET") + "." +
15920                                                         project->first("VER_MAJ") + "." +
15921                                                         project->first("QMAKE_EXTENSION_SHLIB"));
15922                 project->values("TARGET_x.y").append("lib" + project->first("TARGET") + "." +
15923                                                           project->first("VER_MAJ") +
15924                                                           "." + project->first("VER_MIN") + "." +
15925                                                           project->first("QMAKE_EXTENSION_SHLIB"));
15926                 project->values("TARGET_x.y.z").append("lib" + project->first("TARGET") + "." +
15927                                                             project->first("VER_MAJ") + "." +
15928                                                             project->first("VER_MIN") + "." +
15929                                                             project->first("VER_PAT") + "." +
15930                                                             project->values("QMAKE_EXTENSION_SHLIB").first());
15931             } else {
15932                 project->values("TARGET_x").append("lib" + project->first("TARGET") + "." +
15933                                                         project->first("QMAKE_EXTENSION_SHLIB") +
15934                                                         "." + project->first("VER_MAJ"));
15935                 project->values("TARGET_x.y").append("lib" + project->first("TARGET") + "." +
15936                                                       project->first("QMAKE_EXTENSION_SHLIB")
15937                                                       + "." + project->first("VER_MAJ") +
15938                                                       "." + project->first("VER_MIN"));
15939                 project->values("TARGET_x.y.z").append("lib" + project->first("TARGET") +
15940                                                             "." +
15941                                                             project->values(
15942                                                                 "QMAKE_EXTENSION_SHLIB").first() + "." +
15943                                                             project->first("VER_MAJ") + "." +
15944                                                             project->first("VER_MIN") + "." +
15945                                                             project->first("VER_PAT"));
15946             }
15947             project->values("TARGET") = project->values("TARGET_x.y.z");
15948         }
15949         if(project->isEmpty("QMAKE_LN_SHLIB"))
15950             project->values("QMAKE_LN_SHLIB").append("ln -s");
15951         if (!project->values("QMAKE_LFLAGS_SONAME").isEmpty()) {
15952             QString soname;
15953             if(project->isActiveConfig("plugin")) {
15954                 if(!project->values("TARGET").isEmpty())
15955                     soname += project->first("TARGET");
15956             } else if(!project->isEmpty("QMAKE_BUNDLE")) {
15957                 soname += project->first("TARGET_x.y");
15958             } else if(!project->values("TARGET_x").isEmpty()) {
15959                 soname += project->first("TARGET_x");
15960             }
15961             if(!soname.isEmpty()) {
15962                 if(project->isActiveConfig("absolute_library_soname") &&
15963                    project->values("INSTALLS").indexOf("target") != -1 &&
15964                    !project->isEmpty("target.path")) {
15965                     QString instpath = Option::fixPathToTargetOS(project->first("target.path"));
15966                     if(!instpath.endsWith(Option::dir_sep))
15967                         instpath += Option::dir_sep;
15968                     soname.prepend(instpath);
15969                 }
15970                 project->values("QMAKE_LFLAGS_SONAME").first() += escapeFilePath(soname);
15971             }
15972         }
15973         if (project->values("QMAKE_LINK_SHLIB_CMD").isEmpty())
15974             project->values("QMAKE_LINK_SHLIB_CMD").append(
15975                 "$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS) $(OBJCOMP)");
15976     }
15977     if (!project->values("QMAKE_APP_FLAG").isEmpty()) {
15978         project->values("QMAKE_CFLAGS") += project->values("QMAKE_CFLAGS_APP");
15979         project->values("QMAKE_CXXFLAGS") += project->values("QMAKE_CXXFLAGS_APP");
15980         project->values("QMAKE_LFLAGS") += project->values("QMAKE_LFLAGS_APP");
15981     } else if (project->isActiveConfig("dll")) {
15982         if(!project->isActiveConfig("plugin") || !project->isActiveConfig("plugin_no_share_shlib_cflags")) {
15983             project->values("QMAKE_CFLAGS") += project->values("QMAKE_CFLAGS_SHLIB");
15984             project->values("QMAKE_CXXFLAGS") += project->values("QMAKE_CXXFLAGS_SHLIB");
15985         }
15986         if (project->isActiveConfig("plugin")) {
15987             project->values("QMAKE_CFLAGS") += project->values("QMAKE_CFLAGS_PLUGIN");
15988             project->values("QMAKE_CXXFLAGS") += project->values("QMAKE_CXXFLAGS_PLUGIN");
15989             project->values("QMAKE_LFLAGS") += project->values("QMAKE_LFLAGS_PLUGIN");
15990             if(project->isActiveConfig("plugin_with_soname") && !project->isActiveConfig("compile_libtool"))
15991                 project->values("QMAKE_LFLAGS") += project->values("QMAKE_LFLAGS_SONAME");
15992         } else {
15993             project->values("QMAKE_LFLAGS") += project->values("QMAKE_LFLAGS_SHLIB");
15994             if(!project->isEmpty("QMAKE_LFLAGS_COMPAT_VERSION")) {
15995                 if(project->isEmpty("COMPAT_VERSION"))
15996                     project->values("QMAKE_LFLAGS") += QString(project->first("QMAKE_LFLAGS_COMPAT_VERSION") +
15997                                                                     project->first("VER_MAJ") + "." +
15998                                                                     project->first("VER_MIN"));
15999                 else
16000                     project->values("QMAKE_LFLAGS") += QString(project->first("QMAKE_LFLAGS_COMPAT_VERSION") +
16001                                                                     project->first("COMPATIBILITY_VERSION"));
16002             }
16003             if(!project->isEmpty("QMAKE_LFLAGS_VERSION")) {
16004                 project->values("QMAKE_LFLAGS") += QString(project->first("QMAKE_LFLAGS_VERSION") +
16005                                                                 project->first("VER_MAJ") + "." +
16006                                                                 project->first("VER_MIN") + "." +
16007                                                                 project->first("VER_PAT"));
16008             }
16009             if(!project->isActiveConfig("compile_libtool"))
16010                 project->values("QMAKE_LFLAGS") += project->values("QMAKE_LFLAGS_SONAME");
16011         }
16012     }
16013
16014     if(!project->isEmpty("QMAKE_BUNDLE")) {
16015         QString plist = fileFixify(project->first("QMAKE_INFO_PLIST"));
16016         if(plist.isEmpty())
16017             plist = specdir() + QDir::separator() + "Info.plist." + project->first("TEMPLATE");
16018         if(exists(Option::fixPathToLocalOS(plist))) {
16019             if(project->isEmpty("QMAKE_INFO_PLIST"))
16020                 project->values("QMAKE_INFO_PLIST").append(plist);
16021             project->values("QMAKE_INFO_PLIST_OUT").append(project->first("DESTDIR") +
16022                                                                 project->first("QMAKE_BUNDLE") +
16023                                                                 "/Contents/Info.plist");
16024             project->values("ALL_DEPS") += project->first("QMAKE_INFO_PLIST_OUT");
16025             if(!project->isEmpty("ICON") && project->first("TEMPLATE") == "app")
16026                 project->values("ALL_DEPS") += project->first("DESTDIR") +
16027                                                     project->first("QMAKE_BUNDLE") +
16028                                                     "/Contents/Resources/" + project->first("ICON").section('/', -1);
16029             if(!project->isEmpty("QMAKE_BUNDLE_DATA")) {
16030                 QString bundle_dir = project->first("DESTDIR") + project->first("QMAKE_BUNDLE") + "/";
16031                 QStringList &alldeps = project->values("ALL_DEPS");
16032                 const QStringList &bundle_data = project->values("QMAKE_BUNDLE_DATA");
16033                 for(int i = 0; i < bundle_data.count(); i++) {
16034                     const QStringList &files = project->values(bundle_data[i] + ".files");
16035                     QString path = bundle_dir;
16036                     if(!project->isEmpty(bundle_data[i] + ".version")) {
16037                         alldeps += Option::fixPathToLocalOS(path + Option::dir_sep +
16038                                                             project->first(bundle_data[i] + ".path"));
16039                         path += project->first(bundle_data[i] + ".version") + "/" +
16040                                 project->first("QMAKE_FRAMEWORK_VERSION") + "/";
16041                     }
16042                     path += project->first(bundle_data[i] + ".path");
16043                     path = Option::fixPathToLocalOS(path);
16044                     for(int file = 0; file < files.count(); file++)
16045                         alldeps += path + Option::dir_sep + fileInfo(files[file]).fileName();
16046                 }
16047             }
16048         }
16049     }
16050 }
16051
16052 QString
16053 UnixMakefileGenerator::libtoolFileName(bool fixify)
16054 {
16055     QString ret = var("TARGET");
16056     int slsh = ret.lastIndexOf(Option::dir_sep);
16057     if(slsh != -1)
16058         ret = ret.right(ret.length() - slsh - 1);
16059     int dot = ret.indexOf('.');
16060     if(dot != -1)
16061         ret = ret.left(dot);
16062     ret += Option::libtool_ext;
16063     if(!project->isEmpty("QMAKE_LIBTOOL_DESTDIR"))
16064         ret.prepend(project->first("QMAKE_LIBTOOL_DESTDIR") + Option::dir_sep);
16065     if(fixify) {
16066         if(QDir::isRelativePath(ret) && !project->isEmpty("DESTDIR"))
16067             ret.prepend(project->first("DESTDIR"));
16068         ret = Option::fixPathToLocalOS(fileFixify(ret, qmake_getpwd(), Option::output_dir));
16069     }
16070     return ret;
16071 }
16072
16073 void
16074 UnixMakefileGenerator::writeLibtoolFile()
16075 {
16076     QString fname = libtoolFileName(), lname = fname;
16077     mkdir(fileInfo(fname).path());
16078     int slsh = lname.lastIndexOf(Option::dir_sep);
16079     if(slsh != -1)
16080         lname = lname.right(lname.length() - slsh - 1);
16081     QFile ft(fname);
16082     if(!ft.open(QIODevice::WriteOnly))
16083         return;
16084     project->values("ALL_DEPS").append(fileFixify(fname));
16085
16086     QTextStream t(&ft);
16087     t << "# " << lname << " - a libtool library file\n";
16088     t << "# Generated by qmake/libtool (" << qmake_version() << ") (Qt "
16089       << "4.3.2" << ") on: " << QDateTime::currentDateTime().toString();
16090  t << "\n";
16091
16092     t << "# The name that we can dlopen(3).\n"
16093       << "dlname='" << var(project->isActiveConfig("plugin") ? "TARGET" : "TARGET_x")
16094       << "'\n\n";
16095
16096     t << "# Names of this library.\n";
16097     t << "library_names='";
16098     if(project->isActiveConfig("plugin")) {
16099         t << var("TARGET");
16100     } else {
16101         if (project->isEmpty("QMAKE_HPUX_SHLIB"))
16102             t << var("TARGET_x.y.z") << " ";
16103         t << var("TARGET_x") << " " << var("TARGET_");
16104     }
16105     t << "'\n\n";
16106
16107     t << "# The name of the static archive.\n"
16108       << "old_library='" << lname.left(lname.length()-Option::libtool_ext.length()) << ".a'\n\n";
16109
16110     t << "# Libraries that this one depends upon.\n";
16111     QStringList libs;
16112     if(!project->isEmpty("QMAKE_INTERNAL_PRL_LIBS"))
16113         libs = project->values("QMAKE_INTERNAL_PRL_LIBS");
16114     else
16115         libs << "QMAKE_LIBS";
16116     t << "dependency_libs='";
16117     for(QStringList::ConstIterator it = libs.begin(); it != libs.end(); ++it)
16118         t << project->values((*it)).join(" ") << " ";
16119     t << "'\n\n";
16120
16121     t << "# Version information for " << lname << "\n";
16122     int maj = project->first("VER_MAJ").toInt();
16123     int min = project->first("VER_MIN").toInt();
16124     int pat = project->first("VER_PAT").toInt();
16125     t << "current=" << (10*maj + min) << "\n"
16126       << "age=0\n"
16127       << "revision=" << pat << "\n\n";
16128
16129     t << "# Is this an already installed library.\n"
16130         "installed=yes\n\n";
16131
16132     t << "# Files to dlopen/dlpreopen.\n"
16133         "dlopen=''\n"
16134         "dlpreopen=''\n\n";
16135
16136     QString install_dir = project->first("QMAKE_LIBTOOL_LIBDIR");
16137     if(install_dir.isEmpty())
16138         install_dir = project->first("target.path");
16139     if(install_dir.isEmpty())
16140         install_dir = project->first("DESTDIR");
16141     t << "# Directory that this library needs to be installed in:\n"
16142         "libdir='" << Option::fixPathToTargetOS(install_dir, false) << "'\n";
16143 }
16144
16145 QString
16146 UnixMakefileGenerator::pkgConfigFileName(bool fixify)
16147 {
16148     QString ret = var("TARGET");
16149     int slsh = ret.lastIndexOf(Option::dir_sep);
16150     if(slsh != -1)
16151         ret = ret.right(ret.length() - slsh - 1);
16152     if(ret.startsWith("lib"))
16153         ret = ret.mid(3);
16154     int dot = ret.indexOf('.');
16155     if(dot != -1)
16156         ret = ret.left(dot);
16157     ret += Option::pkgcfg_ext;
16158     if(!project->isEmpty("QMAKE_PKGCONFIG_DESTDIR"))
16159         ret.prepend(project->first("QMAKE_PKGCONFIG_DESTDIR") + Option::dir_sep);
16160     if(fixify) {
16161         if(QDir::isRelativePath(ret) && !project->isEmpty("DESTDIR"))
16162             ret.prepend(project->first("DESTDIR"));
16163         ret = Option::fixPathToLocalOS(fileFixify(ret, qmake_getpwd(), Option::output_dir));
16164     }
16165     return ret;
16166 }
16167
16168 QString
16169 UnixMakefileGenerator::pkgConfigPrefix() const
16170 {
16171     if(!project->isEmpty("QMAKE_PKGCONFIG_PREFIX"))
16172         return project->first("QMAKE_PKGCONFIG_PREFIX");
16173     return QLibraryInfo::location(QLibraryInfo::PrefixPath);
16174 }
16175
16176 QString
16177 UnixMakefileGenerator::pkgConfigFixPath(QString path) const
16178 {
16179     QString prefix = pkgConfigPrefix();
16180     if(path.startsWith(prefix))
16181         path = path.replace(prefix, "${prefix}");
16182     return path;
16183 }
16184
16185 void
16186 UnixMakefileGenerator::writePkgConfigFile()
16187 {
16188     QString fname = pkgConfigFileName(), lname = fname;
16189     mkdir(fileInfo(fname).path());
16190     int slsh = lname.lastIndexOf(Option::dir_sep);
16191     if(slsh != -1)
16192         lname = lname.right(lname.length() - slsh - 1);
16193     QFile ft(fname);
16194     if(!ft.open(QIODevice::WriteOnly))
16195         return;
16196     project->values("ALL_DEPS").append(fileFixify(fname));
16197     QTextStream t(&ft);
16198
16199     QString prefix = pkgConfigPrefix();
16200     QString libDir = project->first("QMAKE_PKGCONFIG_LIBDIR");
16201     if(libDir.isEmpty())
16202         libDir = prefix + Option::dir_sep + "lib" + Option::dir_sep;
16203     QString includeDir = project->first("QMAKE_PKGCONFIG_INCDIR");
16204     if(includeDir.isEmpty())
16205         includeDir = prefix + "/include";
16206
16207     t << "prefix=" << prefix << endl;
16208     t << "exec_prefix=${prefix}\n"
16209       << "libdir=" << pkgConfigFixPath(libDir) << "\n"
16210       << "includedir=" << pkgConfigFixPath(includeDir) << endl;
16211
16212
16213     t << varGlue("CONFIG", "qt_config=", " ", "") << endl;
16214
16215
16216     const QStringList &pkgconfig_vars = project->values("QMAKE_PKGCONFIG_VARIABLES");
16217     for(int i = 0; i < pkgconfig_vars.size(); ++i) {
16218         QString var = project->first(pkgconfig_vars.at(i) + ".name"),
16219                 val = project->values(pkgconfig_vars.at(i) + ".value").join(" ");
16220         if(var.isEmpty())
16221             continue;
16222         if(val.isEmpty()) {
16223             const QStringList &var_vars = project->values(pkgconfig_vars.at(i) + ".variable");
16224             for(int v = 0; v < var_vars.size(); ++v) {
16225                 const QStringList &vars = project->values(var_vars.at(v));
16226                 for(int var = 0; var < vars.size(); ++var) {
16227                     if(!val.isEmpty())
16228                         val += " ";
16229                     val += pkgConfigFixPath(vars.at(var));
16230                 }
16231             }
16232         }
16233         t << var << "=" << val << endl;
16234     }
16235
16236     t << endl;
16237
16238     QString name = project->first("QMAKE_PKGCONFIG_NAME");
16239     if(name.isEmpty()) {
16240         name = project->first("QMAKE_ORIG_TARGET").toLower();
16241         name.replace(0, 1, name[0].toUpper());
16242     }
16243     t << "Name: " << name << endl;
16244     QString desc = project->values("QMAKE_PKGCONFIG_DESCRIPTION").join(" ");
16245     if(desc.isEmpty()) {
16246         if(name.isEmpty()) {
16247             desc = project->first("QMAKE_ORIG_TARGET").toLower();
16248             desc.replace(0, 1, desc[0].toUpper());
16249         } else {
16250             desc = name;
16251         }
16252         if(project->first("TEMPLATE") == "lib") {
16253             if(project->isActiveConfig("plugin"))
16254                desc += " Plugin";
16255             else
16256                desc += " Library";
16257         } else if(project->first("TEMPLATE") == "app") {
16258             desc += " Application";
16259         }
16260     }
16261     t << "Description: " << desc << endl;
16262     t << "Version: " << project->first("VERSION") << endl;
16263
16264
16265     QStringList libs;
16266     if(!project->isEmpty("QMAKE_INTERNAL_PRL_LIBS"))
16267         libs = project->values("QMAKE_INTERNAL_PRL_LIBS");
16268     else
16269         libs << "QMAKE_LIBS";
16270     libs << "QMAKE_LFLAGS_THREAD";
16271     t << "Libs: -L${libdir} -l" << lname.left(lname.length()-Option::libtool_ext.length()) << " ";
16272     for(QStringList::ConstIterator it = libs.begin(); it != libs.end(); ++it)
16273         t << project->values((*it)).join(" ") << " ";
16274     t << endl;
16275
16276
16277
16278     t << "Cflags: "
16279
16280       << varGlue("PRL_EXPORT_DEFINES","-D"," -D"," ")
16281       << project->values("PRL_EXPORT_CXXFLAGS").join(" ")
16282       << project->values("QMAKE_PKGCONFIG_CFLAGS").join(" ")
16283
16284       << " -I${includedir}" << endl;
16285     t << endl;
16286 }