This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
While compiling doxygen (a popular GPL documentation generator, written in C++) on my i686 OpenBSD 2.8 machine, horrible things happened. Here's the log: [root@bluesky src]# gcc -v Reading specs from /usr/lib/gcc-lib/i386-unknown-openbsd2.8/2.95.3/specs gcc version 2.95.3 19991030 (prerelease) [root@bluesky src]# g++ -save-temps -c -Wall -W -O2 -I../qtools -o ../objects/index.o index.cpp index.cpp: In function `void writeGroupTreeNode(OutputList &, GroupDef *)': index.cpp:2397: Internal compiler error in `make_label_edge', at flow.c:1097 Please submit a full bug report. See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions. The file "index.ii" is attached. Note that compiling this file without optimization works just fine; both -O1 and -O2 cause the compiler error. _________________________________________________________________________ Dennis Taylor "Anyone whose days are all the same and free from dennis@funkplanet.com want inhabits eternity of a sort." - Peter Hoeg _________________________________________________________________________ PGP Fingerprint: E8D6 9670 4FBD EEC3 6C6B 810B 2B30 E529 51BD 7B90
# 1 "index.cpp"
# 1 "/usr/include/stdlib.h" 1 3 4
# 1 "/usr/include/machine/ansi.h" 1 3 4
# 41 "/usr/include/stdlib.h" 2 3 4
# 1 "/usr/include/sys/types.h" 1 3 4
# 1 "/usr/include/machine/types.h" 1 3 4
# 1 "/usr/include/sys/cdefs.h" 1 3 4
# 1 "/usr/include/machine/cdefs.h" 1 3 4
# 39 "/usr/include/machine/cdefs.h" 3 4
# 53 "/usr/include/sys/cdefs.h" 2 3 4
# 110 "/usr/include/sys/cdefs.h" 3 4
# 42 "/usr/include/machine/types.h" 2 3 4
typedef struct _physadr {
int r[1];
} *physadr;
typedef struct label_t {
int val[6];
} label_t;
typedef unsigned long vm_offset_t;
typedef unsigned long vm_size_t;
typedef unsigned long vaddr_t;
typedef unsigned long paddr_t;
typedef unsigned long vsize_t;
typedef unsigned long psize_t;
typedef signed char int8_t;
typedef unsigned char u_int8_t;
typedef unsigned char uint8_t;
typedef short int16_t;
typedef unsigned short u_int16_t;
typedef unsigned short uint16_t;
typedef int int32_t;
typedef unsigned int u_int32_t;
typedef unsigned int uint32_t;
typedef long long int64_t;
typedef unsigned long long u_int64_t;
typedef unsigned long long uint64_t;
typedef int32_t register_t;
# 48 "/usr/include/sys/types.h" 2 3 4
# 1 "/usr/include/machine/endian.h" 1 3 4
# 1 "/usr/include/sys/endian.h" 1 3 4
# 83 "/usr/include/sys/endian.h" 3 4
# 125 "/usr/include/sys/endian.h" 3 4
extern "C" {
u_int32_t htobe32 (u_int32_t) ;
u_int16_t htobe16 (u_int16_t) ;
u_int32_t betoh32 (u_int32_t) ;
u_int16_t betoh16 (u_int16_t) ;
u_int32_t htole32 (u_int32_t) ;
u_int16_t htole16 (u_int16_t) ;
u_int32_t letoh32 (u_int32_t) ;
u_int16_t letoh16 (u_int16_t) ;
};
# 180 "/usr/include/sys/endian.h" 3 4
# 68 "/usr/include/machine/endian.h" 2 3 4
# 51 "/usr/include/sys/types.h" 2 3 4
typedef unsigned char u_char;
typedef unsigned short u_short;
typedef unsigned int u_int;
typedef unsigned long u_long;
typedef unsigned char unchar;
typedef unsigned short ushort;
typedef unsigned int uint;
typedef unsigned long ulong;
typedef u_int64_t u_quad_t;
typedef int64_t quad_t;
typedef quad_t * qaddr_t;
typedef char * caddr_t;
typedef int32_t daddr_t;
typedef int32_t dev_t;
typedef u_int32_t fixpt_t;
typedef u_int32_t gid_t;
typedef u_int32_t ino_t;
typedef long key_t;
typedef u_int16_t mode_t;
typedef u_int16_t nlink_t;
typedef int32_t pid_t;
typedef quad_t rlim_t;
typedef int32_t segsz_t;
typedef int32_t swblk_t;
typedef u_int32_t uid_t;
typedef u_int32_t useconds_t;
typedef int32_t suseconds_t;
typedef u_int32_t in_addr_t;
typedef u_int16_t in_port_t;
typedef u_int8_t sa_family_t;
typedef u_int32_t socklen_t;
typedef unsigned long clock_t;
typedef unsigned int size_t;
typedef int ssize_t;
typedef int time_t;
typedef int clockid_t;
typedef int timer_t;
typedef long long off_t;
extern "C" {
off_t lseek (int, off_t, int) ;
int ftruncate (int, off_t) ;
int truncate (const char *, off_t) ;
};
typedef int32_t fd_mask;
typedef struct fd_set {
fd_mask fds_bits[((( 256 ) + (( (sizeof(fd_mask) * 8 ) ) - 1)) / ( (sizeof(fd_mask) * 8 ) )) ];
} fd_set;
# 205 "/usr/include/sys/types.h" 3 4
# 44 "/usr/include/stdlib.h" 2 3 4
typedef struct {
int quot;
int rem;
} div_t;
typedef struct {
long quot;
long rem;
} ldiv_t;
typedef struct {
quad_t quot;
quad_t rem;
} qdiv_t;
extern "C" {
void abort (void) ;
int abs (int) ;
int atexit (void (*)(void)) ;
double atof (const char *) ;
int atoi (const char *) ;
long atol (const char *) ;
void *bsearch (const void *, const void *, size_t,
size_t, int (*)(const void *, const void *)) ;
void *calloc (size_t, size_t) ;
div_t div (int, int) ;
void exit (int) ;
void free (void *) ;
char *getenv (const char *) ;
long labs (long) ;
ldiv_t ldiv (long, long) ;
void *malloc (size_t) ;
void qsort (void *, size_t, size_t,
int (*)(const void *, const void *)) ;
int rand (void) ;
int rand_r (unsigned int *) ;
void *realloc (void *, size_t) ;
void srand (unsigned) ;
double strtod (const char *, char **) ;
long strtol (const char *, char **, int) ;
unsigned long
strtoul (const char *, char **, int) ;
int system (const char *) ;
int mblen (const char *, size_t) ;
size_t mbstowcs (wchar_t *, const char *, size_t) ;
int wctomb (char *, wchar_t) ;
int mbtowc (wchar_t *, const char *, size_t) ;
size_t wcstombs (char *, const wchar_t *, size_t) ;
void *alloca (size_t) ;
char *getbsize (int *, long *) ;
char *cgetcap (char *, const char *, int) ;
int cgetclose (void) ;
int cgetent (char **, char **, const char *) ;
int cgetfirst (char **, char **) ;
int cgetmatch (char *, const char *) ;
int cgetnext (char **, char **) ;
int cgetnum (char *, const char *, long *) ;
int cgetset (const char *) ;
int cgetstr (char *, const char *, char **) ;
int cgetustr (char *, const char *, char **) ;
int daemon (int, int) ;
char *devname (int, int) ;
int getloadavg (double [], int) ;
long a64l (const char *) ;
char *l64a (long) ;
void cfree (void *) ;
int getopt (int, char * const *, const char *) ;
extern char *optarg;
extern int opterr;
extern int optind;
extern int optopt;
extern int optreset;
int getsubopt (char **, char * const *, char **) ;
extern char *suboptarg;
int heapsort (void *, size_t, size_t,
int (*)(const void *, const void *)) ;
int mergesort (void *, size_t, size_t,
int (*)(const void *, const void *)) ;
int radixsort (const unsigned char **, int, const unsigned char *,
unsigned) ;
int sradixsort (const unsigned char **, int, const unsigned char *,
unsigned) ;
char *initstate (unsigned int, char *, size_t) ;
long random (void) ;
char *realpath (const char *, char *) ;
char *setstate (const char *) ;
void srandom (unsigned int) ;
void srandomdev (void) ;
int putenv (const char *) ;
int setenv (const char *, const char *, int) ;
void unsetenv (const char *) ;
void setproctitle (const char *, ...) ;
quad_t qabs (quad_t) ;
qdiv_t qdiv (quad_t, quad_t) ;
quad_t strtoq (const char *, char **, int) ;
u_quad_t strtouq (const char *, char **, int) ;
double drand48 (void) ;
double erand48 (unsigned short[3]) ;
long jrand48 (unsigned short[3]) ;
void lcong48 (unsigned short[7]) ;
long lrand48 (void) ;
long mrand48 (void) ;
long nrand48 (unsigned short[3]) ;
unsigned short *seed48 (unsigned short[3]) ;
void srand48 (long) ;
u_int32_t arc4random (void) ;
void arc4random_stir (void) ;
void arc4random_addrandom (unsigned char *, int) ;
};
# 18 "index.cpp" 2
# 1 "../qtools/qtextstream.h" 1
# 1 "../qtools/qiodevice.h" 1
# 1 "../qtools/qglobal.h" 1
# 105 "../qtools/qglobal.h"
# 133 "../qtools/qglobal.h"
# 190 "../qtools/qglobal.h"
# 259 "../qtools/qglobal.h"
# 278 "../qtools/qglobal.h"
typedef unsigned char uchar;
typedef unsigned short ushort;
typedef unsigned uint;
typedef unsigned long ulong;
typedef char *pchar;
typedef uchar *puchar;
typedef const char *pcchar;
const bool FALSE = 0;
const bool TRUE = !0;
inline int qRound( double d )
{
return d > 0.0 ? int(d+0.5) : int(d-0.5);
}
typedef signed char INT8;
typedef unsigned char UINT8;
typedef short INT16;
typedef unsigned short UINT16;
typedef int INT32;
typedef unsigned int UINT32;
typedef signed char Q_INT8;
typedef unsigned char Q_UINT8;
typedef short Q_INT16;
typedef unsigned short Q_UINT16;
typedef int Q_INT32;
typedef unsigned int Q_UINT32;
typedef long Q_INT64;
typedef unsigned long Q_UINT64;
class QDataStream;
# 1 "../qtools/qfeatures.h" 1
# 63 "../qtools/qfeatures.h"
# 1 "../qtools/qconfig.h" 1
# 64 "../qtools/qfeatures.h" 2
# 183 "../qtools/qfeatures.h"
# 307 "../qtools/qfeatures.h"
# 592 "../qtools/qfeatures.h"
# 620 "../qtools/qfeatures.h"
# 678 "../qtools/qfeatures.h"
# 712 "../qtools/qfeatures.h"
# 730 "../qtools/qfeatures.h"
# 815 "../qtools/qfeatures.h"
# 903 "../qtools/qfeatures.h"
# 409 "../qtools/qglobal.h" 2
# 434 "../qtools/qglobal.h"
const char *qVersion();
bool qSysInfo( int *wordSize, bool *bigEndian );
# 493 "../qtools/qglobal.h"
void qDebug( const char *, ... )
__attribute__ ((format (printf, 1, 2)))
;
void qWarning( const char *, ... )
__attribute__ ((format (printf, 1, 2)))
;
void qFatal( const char *, ... )
__attribute__ ((format (printf, 1, 2)))
;
void debug( const char *, ... )
__attribute__ ((format (printf, 1, 2)))
;
void warning( const char *, ... )
__attribute__ ((format (printf, 1, 2)))
;
void fatal( const char *, ... )
__attribute__ ((format (printf, 1, 2)))
;
bool qt_check_pointer( bool c, const char *, int );
enum QtMsgType { QtDebugMsg, QtWarningMsg, QtFatalMsg };
typedef void (*msg_handler)(QtMsgType, const char *);
msg_handler qInstallMsgHandler( msg_handler );
void qSuppressObsoleteWarnings( bool = TRUE );
void qObsolete( const char *obj, const char *oldfunc,
const char *newfunc );
void qObsolete( const char *obj, const char *oldfunc );
void qObsolete( const char *message );
# 42 "../qtools/qiodevice.h" 2
# 1 "../qtools/qcstring.h" 1
# 1 "../qtools/qarray.h" 1
# 1 "../qtools/qgarray.h" 1
# 1 "../qtools/qshared.h" 1
struct QShared
{
QShared() { count = 1; }
void ref() { count++; }
bool deref() { return !--count; }
uint count;
};
# 42 "../qtools/qgarray.h" 2
class QGArray
{
friend class QBuffer;
public:
struct array_data : public QShared {
array_data() { data=0; len=0; }
char *data;
uint len;
};
QGArray();
protected:
QGArray( int, int );
QGArray( int size );
QGArray( const QGArray &a );
virtual ~QGArray();
QGArray &operator=( const QGArray &a ) { return assign( a ); }
virtual void detach() { duplicate(*this); }
char *data() const { return shd->data; }
uint nrefs() const { return shd->count; }
uint size() const { return shd->len; }
bool isEqual( const QGArray &a ) const;
bool resize( uint newsize );
bool fill( const char *d, int len, uint sz );
QGArray &assign( const QGArray &a );
QGArray &assign( const char *d, uint len );
QGArray &duplicate( const QGArray &a );
QGArray &duplicate( const char *d, uint len );
void store( const char *d, uint len );
array_data *sharedBlock() const { return shd; }
void setSharedBlock( array_data *p ) { shd=(array_data*)p; }
QGArray &setRawData( const char *d, uint len );
void resetRawData( const char *d, uint len );
int find( const char *d, uint index, uint sz ) const;
int contains( const char *d, uint sz ) const;
void sort( uint sz );
int bsearch( const char *d, uint sz ) const;
char *at( uint index ) const;
bool setExpand( uint index, const char *d, uint sz );
protected:
virtual array_data *newData();
virtual void deleteData( array_data *p );
private:
static void msg_index( uint );
array_data *shd;
};
inline char *QGArray::at( uint index ) const
{
if ( index >= size() ) {
msg_index( index );
index = 0;
}
return &shd->data[index];
}
# 42 "../qtools/qarray.h" 2
template<class type> class QArray : public QGArray
{
public:
typedef type* Iterator;
typedef const type* ConstIterator;
typedef type ValueType;
protected:
QArray( int, int ) : QGArray( 0, 0 ) {}
public:
QArray() {}
QArray( int size ) : QGArray(size*sizeof(type)) {}
QArray( const QArray<type> &a ) : QGArray(a) {}
~QArray() {}
QArray<type> &operator=(const QArray<type> &a)
{ return (QArray<type>&)QGArray::assign(a); }
type *data() const { return (type *)QGArray::data(); }
uint nrefs() const { return QGArray::nrefs(); }
uint size() const { return QGArray::size()/sizeof(type); }
uint count() const { return size(); }
bool isEmpty() const { return QGArray::size() == 0; }
bool isNull() const { return QGArray::data() == 0; }
bool resize( uint size ) { return QGArray::resize(size*sizeof(type)); }
bool truncate( uint pos ) { return QGArray::resize(pos*sizeof(type)); }
bool fill( const type &d, int size = -1 )
{ return QGArray::fill((char*)&d,size,sizeof(type) ); }
void detach() { QGArray::detach(); }
QArray<type> copy() const
{ QArray<type> tmp; return tmp.duplicate(*this); }
QArray<type>& assign( const QArray<type>& a )
{ return (QArray<type>&)QGArray::assign(a); }
QArray<type>& assign( const type *a, uint n )
{ return (QArray<type>&)QGArray::assign((char*)a,n*sizeof(type)); }
QArray<type>& duplicate( const QArray<type>& a )
{ return (QArray<type>&)QGArray::duplicate(a); }
QArray<type>& duplicate( const type *a, uint n )
{ return (QArray<type>&)QGArray::duplicate((char*)a,n*sizeof(type)); }
QArray<type>& setRawData( const type *a, uint n )
{ return (QArray<type>&)QGArray::setRawData((char*)a,
n*sizeof(type)); }
void resetRawData( const type *a, uint n )
{ QGArray::resetRawData((char*)a,n*sizeof(type)); }
int find( const type &d, uint i=0 ) const
{ return QGArray::find((char*)&d,i,sizeof(type)); }
int contains( const type &d ) const
{ return QGArray::contains((char*)&d,sizeof(type)); }
void sort() { QGArray::sort(sizeof(type)); }
int bsearch( const type &d ) const
{ return QGArray::bsearch((const char*)&d,sizeof(type)); }
type& operator[]( int i ) const
{ return (type &)(*(type *)QGArray::at(i*sizeof(type))); }
type& at( uint i ) const
{ return (type &)(*(type *)QGArray::at(i*sizeof(type))); }
operator const type*() const { return (const type *)QGArray::data(); }
bool operator==( const QArray<type> &a ) const { return isEqual(a); }
bool operator!=( const QArray<type> &a ) const { return !isEqual(a); }
Iterator begin() { return data(); }
Iterator end() { return data() + size(); }
ConstIterator begin() const { return data(); }
ConstIterator end() const { return data() + size(); }
};
# 43 "../qtools/qcstring.h" 2
# 1 "/usr/include/string.h" 1 3 4
extern "C" {
void *memchr (const void *, int, size_t) ;
int memcmp (const void *, const void *, size_t) ;
void *memcpy (void *, const void *, size_t) ;
void *memmove (void *, const void *, size_t) ;
void *memset (void *, int, size_t) ;
char *strcat (char *, const char *) ;
char *strchr (const char *, int) ;
int strcmp (const char *, const char *) ;
int strcoll (const char *, const char *) ;
char *strcpy (char *, const char *) ;
size_t strcspn (const char *, const char *) ;
char *strerror (int) ;
size_t strlen (const char *) ;
char *strncat (char *, const char *, size_t) ;
int strncmp (const char *, const char *, size_t) ;
char *strncpy (char *, const char *, size_t) ;
char *strpbrk (const char *, const char *) ;
char *strrchr (const char *, int) ;
size_t strspn (const char *, const char *) ;
char *strstr (const char *, const char *) ;
char *strtok (char *, const char *) ;
char *strtok_r (char *, const char *, char **) ;
size_t strxfrm (char *, const char *, size_t) ;
int bcmp (const void *, const void *, size_t) ;
void bcopy (const void *, void *, size_t) ;
void bzero (void *, size_t) ;
int ffs (int) ;
char *index (const char *, int) ;
void *memccpy (void *, const void *, int, size_t) ;
char *rindex (const char *, int) ;
int strcasecmp (const char *, const char *) ;
char *strdup (const char *) ;
size_t strlcat (char *, const char *, size_t) ;
size_t strlcpy (char *, const char *, size_t) ;
void strmode (int, char *) ;
int strncasecmp (const char *, const char *, size_t) ;
char *strsep (char **, const char *) ;
char *strsignal (int) ;
};
# 46 "../qtools/qcstring.h" 2
# 71 "../qtools/qcstring.h"
void *qmemmove( void *dst, const void *src, uint len );
char *qstrdup( const char * );
inline uint cstrlen( const char *str )
{ return strlen(str); }
inline uint qstrlen( const char *str )
{ return str ? strlen(str) : 0; }
inline char *cstrcpy( char *dst, const char *src )
{ return strcpy(dst,src); }
inline char *qstrcpy( char *dst, const char *src )
{ return src ? strcpy(dst, src) : 0; }
char *qstrncpy( char *dst, const char *src, uint len );
inline int cstrcmp( const char *str1, const char *str2 )
{ return strcmp(str1,str2); }
inline int qstrcmp( const char *str1, const char *str2 )
{ return (str1 && str2) ? strcmp(str1,str2) : (int)((long)str2 - (long)str1); }
inline int cstrncmp( const char *str1, const char *str2, uint len )
{ return strncmp(str1,str2,len); }
inline int qstrncmp( const char *str1, const char *str2, uint len )
{ return (str1 && str2) ? strncmp(str1,str2,len) :
(int)((long)str2 - (long)str1); }
int qstricmp( const char *, const char * );
int qstrnicmp( const char *, const char *, uint len );
Q_UINT16 qChecksum( const char *s, uint len );
typedef QArray<char> QByteArray;
QDataStream &operator<<( QDataStream &, const QByteArray & );
QDataStream &operator>>( QDataStream &, QByteArray & );
class QRegExp;
class QCString : public QByteArray
{
public:
QCString() {}
QCString( int size );
QCString( const QCString &s ) : QByteArray( s ) {}
QCString( const char *str );
QCString( const char *str, uint maxlen );
QCString &operator=( const QCString &s );
QCString &operator=( const char *str );
bool isNull() const;
bool isEmpty() const;
uint length() const;
bool resize( uint newlen );
bool truncate( uint pos );
bool fill( char c, int len = -1 );
QCString copy() const;
QCString &sprintf( const char *format, ... );
int find( char c, int index=0, bool cs=TRUE ) const;
int find( const char *str, int index=0, bool cs=TRUE ) const;
int find( const QRegExp &, int index=0 ) const;
int findRev( char c, int index=-1, bool cs=TRUE) const;
int findRev( const char *str, int index=-1, bool cs=TRUE) const;
int findRev( const QRegExp &, int index=-1 ) const;
int contains( char c, bool cs=TRUE ) const;
int contains( const char *str, bool cs=TRUE ) const;
int contains( const QRegExp & ) const;
QCString left( uint len ) const;
QCString right( uint len ) const;
QCString mid( uint index, uint len=0xffffffff) const;
QCString leftJustify( uint width, char fill=' ', bool trunc=FALSE)const;
QCString rightJustify( uint width, char fill=' ',bool trunc=FALSE)const;
QCString lower() const;
QCString upper() const;
QCString stripWhiteSpace() const;
QCString simplifyWhiteSpace() const;
QCString &insert( uint index, const char * );
QCString &insert( uint index, char );
QCString &append( const char * );
QCString &prepend( const char * );
QCString &remove( uint index, uint len );
QCString &replace( uint index, uint len, const char * );
QCString &replace( const QRegExp &, const char * );
short toShort( bool *ok=0 ) const;
ushort toUShort( bool *ok=0 ) const;
int toInt( bool *ok=0 ) const;
uint toUInt( bool *ok=0 ) const;
long toLong( bool *ok=0 ) const;
ulong toULong( bool *ok=0 ) const;
float toFloat( bool *ok=0 ) const;
double toDouble( bool *ok=0 ) const;
QCString &setStr( const char *s );
QCString &setNum( short );
QCString &setNum( ushort );
QCString &setNum( int );
QCString &setNum( uint );
QCString &setNum( long );
QCString &setNum( ulong );
QCString &setNum( float, char f='g', int prec=6 );
QCString &setNum( double, char f='g', int prec=6 );
bool setExpand( uint index, char c );
operator const char *() const;
QCString &operator+=( const char *str );
QCString &operator+=( char c );
};
QDataStream &operator<<( QDataStream &, const QCString & );
QDataStream &operator>>( QDataStream &, QCString & );
inline QCString &QCString::operator=( const QCString &s )
{ return (QCString&)assign( s ); }
inline QCString &QCString::operator=( const char *str )
{ return (QCString&)duplicate( str, qstrlen(str)+1 ); }
inline bool QCString::isNull() const
{ return data() == 0; }
inline bool QCString::isEmpty() const
{ return data() == 0 || *data() == '\0'; }
inline uint QCString::length() const
{ return qstrlen( data() ); }
inline bool QCString::truncate( uint pos )
{ return resize(pos+1); }
inline QCString QCString::copy() const
{ return QCString( data() ); }
inline QCString &QCString::prepend( const char *s )
{ return insert(0,s); }
inline QCString &QCString::append( const char *s )
{ return operator+=(s); }
inline QCString &QCString::setNum( short n )
{ return setNum((long)n); }
inline QCString &QCString::setNum( ushort n )
{ return setNum((ulong)n); }
inline QCString &QCString::setNum( int n )
{ return setNum((long)n); }
inline QCString &QCString::setNum( uint n )
{ return setNum((ulong)n); }
inline QCString &QCString::setNum( float n, char f, int prec )
{ return setNum((double)n,f,prec); }
inline QCString::operator const char *() const
{ return (const char *)data(); }
inline bool operator==( const QCString &s1, const QCString &s2 )
{ return qstrcmp(s1.data(),s2.data()) == 0; }
inline bool operator==( const QCString &s1, const char *s2 )
{ return qstrcmp(s1.data(),s2) == 0; }
inline bool operator==( const char *s1, const QCString &s2 )
{ return qstrcmp(s1,s2.data()) == 0; }
inline bool operator!=( const QCString &s1, const QCString &s2 )
{ return qstrcmp(s1.data(),s2.data()) != 0; }
inline bool operator!=( const QCString &s1, const char *s2 )
{ return qstrcmp(s1.data(),s2) != 0; }
inline bool operator!=( const char *s1, const QCString &s2 )
{ return qstrcmp(s1,s2.data()) != 0; }
inline bool operator<( const QCString &s1, const QCString& s2 )
{ return qstrcmp(s1.data(),s2.data()) < 0; }
inline bool operator<( const QCString &s1, const char *s2 )
{ return qstrcmp(s1.data(),s2) < 0; }
inline bool operator<( const char *s1, const QCString &s2 )
{ return qstrcmp(s1,s2.data()) < 0; }
inline bool operator<=( const QCString &s1, const char *s2 )
{ return qstrcmp(s1.data(),s2) <= 0; }
inline bool operator<=( const char *s1, const QCString &s2 )
{ return qstrcmp(s1,s2.data()) <= 0; }
inline bool operator>( const QCString &s1, const char *s2 )
{ return qstrcmp(s1.data(),s2) > 0; }
inline bool operator>( const char *s1, const QCString &s2 )
{ return qstrcmp(s1,s2.data()) > 0; }
inline bool operator>=( const QCString &s1, const char *s2 )
{ return qstrcmp(s1.data(),s2) >= 0; }
inline bool operator>=( const char *s1, const QCString &s2 )
{ return qstrcmp(s1,s2.data()) >= 0; }
inline QCString operator+( const QCString &s1, const QCString &s2 )
{
QCString tmp( s1.data() );
tmp += s2;
return tmp;
}
inline QCString operator+( const QCString &s1, const char *s2 )
{
QCString tmp( s1.data() );
tmp += s2;
return tmp;
}
inline QCString operator+( const char *s1, const QCString &s2 )
{
QCString tmp( s1 );
tmp += s2;
return tmp;
}
inline QCString operator+( const QCString &s1, char c2 )
{
QCString tmp( s1.data() );
tmp += c2;
return tmp;
}
inline QCString operator+( char c1, const QCString &s2 )
{
QCString tmp;
tmp += c1;
tmp += s2;
return tmp;
}
# 43 "../qtools/qiodevice.h" 2
class QIODevice
{
public:
QIODevice();
virtual ~QIODevice();
int flags() const { return ioMode; }
int mode() const { return ioMode & 0x00ff ; }
int state() const { return ioMode & 0xf000 ; }
bool isDirectAccess() const { return ((ioMode & 0x0100 ) == 0x0100 ); }
bool isSequentialAccess() const { return ((ioMode & 0x0200 ) == 0x0200 ); }
bool isCombinedAccess() const { return ((ioMode & 0x0300 ) == 0x0300 ); }
bool isBuffered() const { return ((ioMode & 0x0040 ) != 0x0040 ); }
bool isRaw() const { return ((ioMode & 0x0040 ) == 0x0040 ); }
bool isSynchronous() const { return ((ioMode & 0x0080 ) != 0x0080 ); }
bool isAsynchronous() const { return ((ioMode & 0x0080 ) == 0x0080 ); }
bool isTranslated() const { return ((ioMode & 0x0010 ) == 0x0010 ); }
bool isReadable() const { return ((ioMode & 0x0001 ) == 0x0001 ); }
bool isWritable() const { return ((ioMode & 0x0002 ) == 0x0002 ); }
bool isReadWrite() const { return ((ioMode & 0x0003 ) == 0x0003 ); }
bool isInactive() const { return state() == 0; }
bool isOpen() const { return state() == 0x1000 ; }
int status() const { return ioSt; }
void resetStatus() { ioSt = 0 ; }
virtual bool open( int mode ) = 0;
virtual void close() = 0;
virtual void flush() = 0;
virtual uint size() const = 0;
virtual int at() const;
virtual bool at( int );
virtual bool atEnd() const;
bool reset() { return at(0); }
virtual int readBlock( char *data, uint maxlen ) = 0;
virtual int writeBlock( const char *data, uint len ) = 0;
virtual int readLine( char *data, uint maxlen );
int writeBlock( const QByteArray& data );
QByteArray readAll();
virtual int getch() = 0;
virtual int putch( int ) = 0;
virtual int ungetch( int ) = 0;
protected:
void setFlags( int f ) { ioMode = f; }
void setType( int );
void setMode( int );
void setState( int );
void setStatus( int );
int ioIndex;
private:
int ioMode;
int ioSt;
private:
QIODevice( const QIODevice & );
QIODevice &operator=( const QIODevice & );
};
# 42 "../qtools/qtextstream.h" 2
# 1 "../qtools/qstring.h" 1
class QRegExp;
class QString;
class QCharRef;
class QChar {
public:
QChar();
QChar( char c );
QChar( uchar c );
QChar( uchar c, uchar r );
QChar( const QChar& c );
QChar( ushort rc );
QChar( short rc );
QChar( uint rc );
QChar( int rc );
static const QChar null;
static const QChar replacement;
static const QChar byteOrderMark;
static const QChar byteOrderSwapped;
static const QChar nbsp;
enum Category
{
NoCategory,
Mark_NonSpacing,
Mark_SpacingCombining,
Mark_Enclosing,
Number_DecimalDigit,
Number_Letter,
Number_Other,
Separator_Space,
Separator_Line,
Separator_Paragraph,
Other_Control,
Other_Format,
Other_Surrogate,
Other_PrivateUse,
Other_NotAssigned,
Letter_Uppercase,
Letter_Lowercase,
Letter_Titlecase,
Letter_Modifier,
Letter_Other,
Punctuation_Connector,
Punctuation_Dask,
Punctuation_Open,
Punctuation_Close,
Punctuation_InitialQuote,
Punctuation_FinalQuote,
Punctuation_Other,
Symbol_Math,
Symbol_Currency,
Symbol_Modifier,
Symbol_Other
};
enum Direction
{
DirL, DirR, DirEN, DirES, DirET, DirAN, DirCS, DirB, DirS, DirWS, DirON,
DirLRE, DirLRO, DirAL, DirRLE, DirRLO, DirPDF, DirNSM, DirBN
};
enum Decomposition
{
Single, Canonical, Font, NoBreak, Initial, Medial,
Final, Isolated, Circle, Super, Sub, Vertical,
Wide, Narrow, Small, Square, Compat, Fraction
};
enum Joining
{
OtherJoining, Dual, Right, Center
};
int digitValue() const;
QChar lower() const;
QChar upper() const;
Category category() const;
Direction direction() const;
Joining joining() const;
bool mirrored() const;
QChar mirroredChar() const;
QString decomposition() const;
Decomposition decompositionTag() const;
char latin1() const { return rw ? 0 : cl; }
ushort unicode() const { return (rw << 8) | cl; }
operator char() const { return latin1(); }
bool isNull() const { return unicode()==0; }
bool isPrint() const;
bool isPunct() const;
bool isSpace() const;
bool isMark() const;
bool isLetter() const;
bool isNumber() const;
bool isLetterOrNumber() const;
bool isDigit() const;
uchar& cell() { return cl; }
uchar& row() { return rw; }
uchar cell() const { return cl; }
uchar row() const { return rw; }
static bool networkOrdered() { return (int)net_ordered == 1; }
friend inline int operator==( char ch, QChar c );
friend inline int operator==( QChar c, char ch );
friend inline int operator==( QChar c1, QChar c2 );
friend inline int operator!=( QChar c1, QChar c2 );
friend inline int operator!=( char ch, QChar c );
friend inline int operator!=( QChar c, char ch );
friend inline int operator<=( QChar c, char ch );
friend inline int operator<=( char ch, QChar c );
friend inline int operator<=( QChar c1, QChar c2 );
private:
uchar rw;
uchar cl;
enum { net_ordered = 1 };
# 201 "../qtools/qstring.h"
};
inline QChar::QChar()
{
rw = 0; cl = 0;
}
inline QChar::QChar( char c )
{
rw = 0; cl = (uchar)c;
}
inline QChar::QChar( uchar c )
{
rw = 0; cl = c;
}
inline QChar::QChar( uchar c, uchar r )
{
rw = r; cl = c;
}
inline QChar::QChar( const QChar& c )
{
rw = c.rw; cl = c.cl;
}
inline QChar::QChar( ushort rc )
{
rw = (uchar)((rc>>8)&0xff); cl = (uchar)(rc&0xff);
}
inline QChar::QChar( short rc )
{
rw = (uchar)((rc>>8)&0xff); cl = (uchar)(rc&0xff);
}
inline QChar::QChar( uint rc )
{
rw = (uchar)((rc>>8)&0xff); cl = (uchar)(rc&0xff);
}
inline QChar::QChar( int rc )
{
rw = (uchar)((rc>>8)&0xff); cl = (uchar)(rc&0xff);
}
inline int operator==( char ch, QChar c )
{
return ch == c.cl && !c.rw;
}
inline int operator==( QChar c, char ch )
{
return ch == c.cl && !c.rw;
}
inline int operator==( QChar c1, QChar c2 )
{
return c1.cl == c2.cl
&& c1.rw == c2.rw;
}
inline int operator!=( QChar c1, QChar c2 )
{
return c1.cl != c2.cl
|| c1.rw != c2.rw;
}
inline int operator!=( char ch, QChar c )
{
return ch != c.cl || c.rw;
}
inline int operator!=( QChar c, char ch )
{
return ch != c.cl || c.rw;
}
inline int operator<=( QChar c, char ch )
{
return !(ch < c.cl || c.rw);
}
inline int operator<=( char ch, QChar c )
{
return ch <= c.cl || c.rw;
}
inline int operator<=( QChar c1, QChar c2 )
{
return c1.rw > c2.rw
? FALSE
: c1.rw < c2.rw
? TRUE
: c1.cl <= c2.cl;
}
inline int operator>=( QChar c, char ch ) { return ch <= c; }
inline int operator>=( char ch, QChar c ) { return c <= ch; }
inline int operator>=( QChar c1, QChar c2 ) { return c2 <= c1; }
inline int operator<( QChar c, char ch ) { return !(ch<=c); }
inline int operator<( char ch, QChar c ) { return !(c<=ch); }
inline int operator<( QChar c1, QChar c2 ) { return !(c2<=c1); }
inline int operator>( QChar c, char ch ) { return !(ch>=c); }
inline int operator>( char ch, QChar c ) { return !(c>=ch); }
inline int operator>( QChar c1, QChar c2 ) { return !(c2>=c1); }
struct QStringData : public QShared {
QStringData() :
unicode(0), ascii(0), len(0), maxl(0), dirtyascii(0) { ref(); }
QStringData(QChar *u, uint l, uint m) :
unicode(u), ascii(0), len(l), maxl(m), dirtyascii(0) { }
~QStringData() { if ( unicode ) delete[] ((char*)unicode);
if ( ascii ) delete[] ascii; }
void deleteSelf();
QChar *unicode;
char *ascii;
uint len;
uint maxl:30;
uint dirtyascii:1;
};
class QString
{
public:
QString();
QString( QChar );
QString( const QString & );
QString( const QByteArray& );
QString( const QChar* unicode, uint length );
QString( const char *str );
~QString();
QString &operator=( const QString & );
QString &operator=( const char * );
QString &operator=( const QCString& );
QString &operator=( QChar c );
QString &operator=( char c );
static const QString null;
bool isNull() const;
bool isEmpty() const;
uint length() const;
void truncate( uint pos );
void fill( QChar c, int len = -1 );
QString copy() const;
QString arg(long a, int fieldwidth=0, int base=10) const;
QString arg(ulong a, int fieldwidth=0, int base=10) const;
QString arg(int a, int fieldwidth=0, int base=10) const;
QString arg(uint a, int fieldwidth=0, int base=10) const;
QString arg(short a, int fieldwidth=0, int base=10) const;
QString arg(ushort a, int fieldwidth=0, int base=10) const;
QString arg(char a, int fieldwidth=0) const;
QString arg(QChar a, int fieldwidth=0) const;
QString arg(const QString& a, int fieldwidth=0) const;
QString arg(double a, int fieldwidth=0, char fmt='g', int prec=-1) const;
QString &sprintf( const char* format, ... )
__attribute__ ((format (printf, 2, 3)))
;
int find( QChar c, int index=0, bool cs=TRUE ) const;
int find( char c, int index=0, bool cs=TRUE ) const;
int find( const QString &str, int index=0, bool cs=TRUE ) const;
int find( const QRegExp &, int index=0 ) const;
int find( const char* str, int index=0 ) const;
int findRev( QChar c, int index=-1, bool cs=TRUE) const;
int findRev( char c, int index=-1, bool cs=TRUE) const;
int findRev( const QString &str, int index=-1, bool cs=TRUE) const;
int findRev( const QRegExp &, int index=-1 ) const;
int findRev( const char* str, int index=-1 ) const;
int contains( QChar c, bool cs=TRUE ) const;
int contains( char c, bool cs=TRUE ) const
{ return contains(QChar(c), cs); }
int contains( const char* str, bool cs=TRUE ) const;
int contains( const QString &str, bool cs=TRUE ) const;
int contains( const QRegExp & ) const;
QString left( uint len ) const;
QString right( uint len ) const;
QString mid( uint index, uint len=0xffffffff) const;
QString leftJustify( uint width, QChar fill=' ', bool trunc=FALSE)const;
QString rightJustify( uint width, QChar fill=' ',bool trunc=FALSE)const;
QString lower() const;
QString upper() const;
QString stripWhiteSpace() const;
QString simplifyWhiteSpace() const;
QString &insert( uint index, const QString & );
QString &insert( uint index, const QChar*, uint len );
QString &insert( uint index, QChar );
QString &insert( uint index, char c ) { return insert(index,QChar(c)); }
QString &append( char );
QString &append( QChar );
QString &append( const QString & );
QString &prepend( char );
QString &prepend( QChar );
QString &prepend( const QString & );
QString &remove( uint index, uint len );
QString &replace( uint index, uint len, const QString & );
QString &replace( uint index, uint len, const QChar*, uint clen );
QString &replace( const QRegExp &, const QString & );
short toShort( bool *ok=0, int base=10 ) const;
ushort toUShort( bool *ok=0, int base=10 ) const;
int toInt( bool *ok=0, int base=10 ) const;
uint toUInt( bool *ok=0, int base=10 ) const;
long toLong( bool *ok=0, int base=10 ) const;
ulong toULong( bool *ok=0, int base=10 ) const;
float toFloat( bool *ok=0 ) const;
double toDouble( bool *ok=0 ) const;
QString &setNum( short, int base=10 );
QString &setNum( ushort, int base=10 );
QString &setNum( int, int base=10 );
QString &setNum( uint, int base=10 );
QString &setNum( long, int base=10 );
QString &setNum( ulong, int base=10 );
QString &setNum( float, char f='g', int prec=6 );
QString &setNum( double, char f='g', int prec=6 );
static QString number( long, int base=10 );
static QString number( ulong, int base=10);
static QString number( int, int base=10 );
static QString number( uint, int base=10);
static QString number( double, char f='g', int prec=6 );
void setExpand( uint index, QChar c );
QString &operator+=( const QString &str );
QString &operator+=( QChar c );
QString &operator+=( char c );
QChar at( uint i ) const
{ return i<d->len ? d->unicode[i] : QChar::null; }
QChar operator[]( int i ) const { return at((uint)i); }
QCharRef at( uint i );
QCharRef operator[]( int i );
QChar constref(uint i) const
{ return at(i); }
QChar& ref(uint i)
{
if (d->count!=1 || i>=d->len)
subat(i);
d->dirtyascii=1;
return d->unicode[i];
}
const QChar* unicode() const { return d->unicode; }
const char* ascii() const;
const char* latin1() const;
static QString fromLatin1(const char*, int len=-1);
QCString utf8() const;
static QString fromUtf8(const char*, int len=-1);
QCString local8Bit() const;
static QString fromLocal8Bit(const char*, int len=-1);
bool operator!() const;
operator const char *() const { return latin1(); }
QString &setUnicode( const QChar* unicode, uint len );
QString &setUnicodeCodes( const ushort* unicode_as_ushorts, uint len );
QString &setLatin1( const char*, int len=-1 );
int compare( const QString& s ) const;
static int compare( const QString& s1, const QString& s2 )
{ return s1.compare(s2); }
friend QDataStream &operator>>( QDataStream &, QString & );
void compose();
QChar::Direction basicDirection();
QString visual(int index = 0, int len = -1);
const char* data() const { return latin1(); }
bool startsWith( const QString& ) const;
private:
QString( int size, bool dummy );
void deref();
void real_detach();
void setLength( uint pos );
void subat( uint );
bool findArg(int& pos, int& len) const;
static QChar* asciiToUnicode( const char*, uint * len, uint maxlen=(uint)-1 );
static QChar* asciiToUnicode( const QByteArray&, uint * len );
static char* unicodeToAscii( const QChar*, uint len );
QStringData *d;
static QStringData* shared_null;
static QStringData* makeSharedNull();
friend class QConstString;
QString(QStringData* dd, bool ) : d(dd) { }
};
class QCharRef {
friend class QString;
QString& s;
uint p;
QCharRef(QString* str, uint pos) : s(*str), p(pos) { }
public:
ushort unicode() const { return s.constref(p).unicode(); }
char latin1() const { return s.constref(p).latin1(); }
QCharRef operator=(char c ) { s.ref(p)=c; return *this; }
QCharRef operator=(uchar c ) { s.ref(p)=c; return *this; }
QCharRef operator=(QChar c ) { s.ref(p)=c; return *this; }
QCharRef operator=(const QCharRef& c ) { s.ref(p)=c.unicode(); return *this; }
QCharRef operator=(ushort rc ) { s.ref(p)=rc; return *this; }
QCharRef operator=(short rc ) { s.ref(p)=rc; return *this; }
QCharRef operator=(uint rc ) { s.ref(p)=rc; return *this; }
QCharRef operator=(int rc ) { s.ref(p)=rc; return *this; }
operator QChar () const { return s.constref(p); }
bool isNull() const { return unicode()==0; }
bool isPrint() const { return s.constref(p).isPrint(); }
bool isPunct() const { return s.constref(p).isPunct(); }
bool isSpace() const { return s.constref(p).isSpace(); }
bool isMark() const { return s.constref(p).isMark(); }
bool isLetter() const { return s.constref(p).isLetter(); }
bool isNumber() const { return s.constref(p).isNumber(); }
bool isLetterOrNumber() { return s.constref(p).isLetterOrNumber(); }
bool isDigit() const { return s.constref(p).isDigit(); }
int digitValue() const { return s.constref(p).digitValue(); }
QChar lower() { return s.constref(p).lower(); }
QChar upper() { return s.constref(p).upper(); }
QChar::Category category() const { return s.constref(p).category(); }
QChar::Direction direction() const { return s.constref(p).direction(); }
QChar::Joining joining() const { return s.constref(p).joining(); }
bool mirrored() const { return s.constref(p).mirrored(); }
QChar mirroredChar() const { return s.constref(p).mirroredChar(); }
QString decomposition() const { return s.constref(p).decomposition(); }
QChar::Decomposition decompositionTag() const { return s.constref(p).decompositionTag(); }
uchar cell() const { return s.constref(p).cell(); }
uchar row() const { return s.constref(p).row(); }
};
inline QCharRef QString::at( uint i ) { return QCharRef(this,i); }
inline QCharRef QString::operator[]( int i ) { return at((uint)i); }
class QConstString : private QString {
public:
QConstString( QChar* unicode, uint length );
~QConstString();
const QString& string() const { return *this; }
};
QDataStream &operator<<( QDataStream &, const QString & );
QDataStream &operator>>( QDataStream &, QString & );
inline QString::QString() :
d(shared_null ? shared_null : makeSharedNull())
{
d->ref();
}
inline QString::~QString()
{
if ( d->deref() ) {
if ( d == shared_null )
shared_null = 0;
d->deleteSelf();
}
}
inline QString &QString::operator=( QChar c )
{ return *this = QString(c); }
inline QString &QString::operator=( char c )
{ return *this = QString(QChar(c)); }
inline bool QString::isNull() const
{ return unicode() == 0; }
inline bool QString::operator!() const
{ return isNull(); }
inline uint QString::length() const
{ return d->len; }
inline bool QString::isEmpty() const
{ return length() == 0; }
inline QString QString::copy() const
{ return QString( *this ); }
inline QString &QString::prepend( const QString & s )
{ return insert(0,s); }
inline QString &QString::prepend( QChar c )
{ return insert(0,c); }
inline QString &QString::prepend( char c )
{ return insert(0,c); }
inline QString &QString::append( const QString & s )
{ return operator+=(s); }
inline QString &QString::append( QChar c )
{ return operator+=(c); }
inline QString &QString::append( char c )
{ return operator+=(c); }
inline QString &QString::setNum( short n, int base )
{ return setNum((long)n, base); }
inline QString &QString::setNum( ushort n, int base )
{ return setNum((ulong)n, base); }
inline QString &QString::setNum( int n, int base )
{ return setNum((long)n, base); }
inline QString &QString::setNum( uint n, int base )
{ return setNum((ulong)n, base); }
inline QString &QString::setNum( float n, char f, int prec )
{ return setNum((double)n,f,prec); }
inline QString QString::arg(int a, int fieldwidth, int base) const
{ return arg((long)a, fieldwidth, base); }
inline QString QString::arg(uint a, int fieldwidth, int base) const
{ return arg((ulong)a, fieldwidth, base); }
inline QString QString::arg(short a, int fieldwidth, int base) const
{ return arg((long)a, fieldwidth, base); }
inline QString QString::arg(ushort a, int fieldwidth, int base) const
{ return arg((ulong)a, fieldwidth, base); }
inline int QString::find( char c, int index, bool cs ) const
{ return find(QChar(c), index, cs); }
inline int QString::findRev( char c, int index, bool cs) const
{ return findRev( QChar(c), index, cs ); }
inline int QString::find( const char* str, int index ) const
{ return find(QString::fromLatin1(str), index); }
inline int QString::findRev( const char* str, int index ) const
{ return findRev(QString::fromLatin1(str), index); }
bool operator!=( const QString &s1, const QString &s2 );
bool operator<( const QString &s1, const QString &s2 );
bool operator<=( const QString &s1, const QString &s2 );
bool operator==( const QString &s1, const QString &s2 );
bool operator>( const QString &s1, const QString &s2 );
bool operator>=( const QString &s1, const QString &s2 );
bool operator!=( const QString &s1, const char *s2 );
bool operator<( const QString &s1, const char *s2 );
bool operator<=( const QString &s1, const char *s2 );
bool operator==( const QString &s1, const char *s2 );
bool operator>( const QString &s1, const char *s2 );
bool operator>=( const QString &s1, const char *s2 );
bool operator!=( const char *s1, const QString &s2 );
bool operator<( const char *s1, const QString &s2 );
bool operator<=( const char *s1, const QString &s2 );
bool operator==( const char *s1, const QString &s2 );
bool operator>=( const char *s1, const QString &s2 );
inline QString operator+( const QString &s1, const QString &s2 )
{
QString tmp( s1 );
tmp += s2;
return tmp;
}
inline QString operator+( const QString &s1, const char *s2 )
{
QString tmp( s1 );
tmp += QString::fromLatin1(s2);
return tmp;
}
inline QString operator+( const char *s1, const QString &s2 )
{
QString tmp = QString::fromLatin1( s1 );
tmp += s2;
return tmp;
}
inline QString operator+( const QString &s1, QChar c2 )
{
QString tmp( s1 );
tmp += c2;
return tmp;
}
inline QString operator+( const QString &s1, char c2 )
{
QString tmp( s1 );
tmp += c2;
return tmp;
}
inline QString operator+( QChar c1, const QString &s2 )
{
QString tmp;
tmp += c1;
tmp += s2;
return tmp;
}
inline QString operator+( char c1, const QString &s2 )
{
QString tmp;
tmp += c1;
tmp += s2;
return tmp;
}
# 43 "../qtools/qtextstream.h" 2
# 1 "/usr/include/stdio.h" 1 3 4
typedef off_t fpos_t;
struct __sbuf {
unsigned char *_base;
int _size;
};
typedef struct __sFILE {
unsigned char *_p;
int _r;
int _w;
short _flags;
short _file;
struct __sbuf _bf;
int _lbfsize;
void *_cookie;
int (*_close) (void *) ;
int (*_read) (void *, char *, int) ;
fpos_t (*_seek) (void *, fpos_t, int) ;
int (*_write) (void *, const char *, int) ;
struct __sbuf _ub;
unsigned char *_up;
int _ur;
unsigned char _ubuf[3];
unsigned char _nbuf[1];
struct __sbuf _lb;
int _blksize;
fpos_t _offset;
} FILE;
extern "C" {
extern FILE __sF[];
};
extern "C" {
void clearerr (FILE *) ;
int fclose (FILE *) ;
int feof (FILE *) ;
int ferror (FILE *) ;
int fflush (FILE *) ;
int fgetc (FILE *) ;
int fgetpos (FILE *, fpos_t *) ;
char *fgets (char *, int, FILE *) ;
FILE *fopen (const char *, const char *) ;
int fprintf (FILE *, const char *, ...) ;
int fputc (int, FILE *) ;
int fputs (const char *, FILE *) ;
size_t fread (void *, size_t, size_t, FILE *) ;
FILE *freopen (const char *, const char *, FILE *) ;
int fscanf (FILE *, const char *, ...) ;
int fseek (FILE *, long, int) ;
int fseeko (FILE *, off_t, int) ;
int fsetpos (FILE *, const fpos_t *) ;
long ftell (FILE *) ;
off_t ftello (FILE *) ;
size_t fwrite (const void *, size_t, size_t, FILE *) ;
int getc (FILE *) ;
int getchar (void) ;
char *gets (char *) ;
extern int sys_nerr;
extern char *sys_errlist[];
void perror (const char *) ;
int printf (const char *, ...) ;
int putc (int, FILE *) ;
int putchar (int) ;
int puts (const char *) ;
int remove (const char *) ;
int rename (const char *, const char *) ;
void rewind (FILE *) ;
int scanf (const char *, ...) ;
void setbuf (FILE *, char *) ;
int setvbuf (FILE *, char *, int, size_t) ;
int sprintf (char *, const char *, ...) ;
int sscanf (const char *, const char *, ...) ;
FILE *tmpfile (void) ;
char *tmpnam (char *) ;
int ungetc (int, FILE *) ;
int vfprintf (FILE *, const char *, char * ) ;
int vprintf (const char *, char * ) ;
int vsprintf (char *, const char *, char * ) ;
};
extern "C" {
char *ctermid (char *) ;
char *ctermid_r (char *) ;
char *cuserid (char *) ;
FILE *fdopen (int, const char *) ;
int fileno (FILE *) ;
void flockfile (FILE *) ;
int ftrylockfile (FILE *) ;
void funlockfile (FILE *) ;
void _flockfile_debug (FILE *, const char *, int) ;
int getc_unlocked (FILE *) ;
int putc_unlocked (int, FILE *) ;
int getchar_unlocked (void) ;
int putchar_unlocked (int) ;
};
extern "C" {
int asprintf (char **, const char *, ...)
__attribute__((format (printf, 2, 3)));
char *fgetln (FILE *, size_t *) ;
int fpurge (FILE *) ;
int getw (FILE *) ;
int pclose (FILE *) ;
FILE *popen (const char *, const char *) ;
int putw (int, FILE *) ;
void setbuffer (FILE *, char *, int) ;
int setlinebuf (FILE *) ;
char *tempnam (const char *, const char *) ;
int snprintf (char *, size_t, const char *, ...)
__attribute__((format (printf, 3, 4)));
int vasprintf (char **, const char *, char * )
__attribute__((format (printf, 2, 0)));
int vsnprintf (char *, size_t, const char *, char * )
__attribute__((format (printf, 3, 0)));
int vscanf (const char *, char * )
__attribute__((format (scanf, 1, 0)));
int vsscanf (const char *, const char *, char * )
__attribute__((format (scanf, 2, 0)));
};
extern "C" {
FILE *funopen (const void *,
int (*)(void *, char *, int),
int (*)(void *, const char *, int),
fpos_t (*)(void *, fpos_t, int),
int (*)(void *)) ;
};
extern "C" {
int __srget (FILE *) ;
int __svfscanf (FILE *, const char *, char * ) ;
int __swbuf (int, FILE *) ;
};
static inline int __sputc(int _c, FILE *_p) {
if (--_p->_w >= 0 || (_p->_w >= _p->_lbfsize && (char)_c != '\n'))
return (*_p->_p++ = _c);
else
return (__swbuf(_c, _p));
}
# 382 "/usr/include/stdio.h" 3 4
# 44 "../qtools/qtextstream.h" 2
class QTextCodec;
class QTextDecoder;
class QTextStreamPrivate;
class QTextStream
{
public:
enum Encoding { Locale, Latin1, Unicode, UnicodeNetworkOrder,
UnicodeReverse, RawUnicode, UnicodeUTF8 };
void setEncoding( Encoding );
void setCodec( QTextCodec* );
QTextStream();
QTextStream( QIODevice * );
QTextStream( QString*, int mode );
QTextStream( QString&, int mode );
QTextStream( QByteArray, int mode );
QTextStream( FILE *, int mode );
virtual ~QTextStream();
QIODevice *device() const;
void setDevice( QIODevice * );
void unsetDevice();
bool atEnd() const;
bool eof() const;
QTextStream &operator>>( QChar & );
QTextStream &operator>>( char & );
QTextStream &operator>>( signed short & );
QTextStream &operator>>( unsigned short & );
QTextStream &operator>>( signed int & );
QTextStream &operator>>( unsigned int & );
QTextStream &operator>>( signed long & );
QTextStream &operator>>( unsigned long & );
QTextStream &operator>>( float & );
QTextStream &operator>>( double & );
QTextStream &operator>>( char * );
QTextStream &operator>>( QString & );
QTextStream &operator>>( QCString & );
QTextStream &operator<<( QChar );
QTextStream &operator<<( char );
QTextStream &operator<<( signed short );
QTextStream &operator<<( unsigned short );
QTextStream &operator<<( signed int );
QTextStream &operator<<( unsigned int );
QTextStream &operator<<( signed long );
QTextStream &operator<<( unsigned long );
QTextStream &operator<<( float );
QTextStream &operator<<( double );
QTextStream &operator<<( const char* );
QTextStream &operator<<( const QString & );
QTextStream &operator<<( const QCString & );
QTextStream &operator<<( void * );
QTextStream &readRawBytes( char *, uint len );
QTextStream &writeRawBytes( const char* , uint len );
QString readLine();
QString read();
void skipWhiteSpace();
enum {
skipws = 0x0001,
left = 0x0002,
right = 0x0004,
internal = 0x0008,
bin = 0x0010,
oct = 0x0020,
dec = 0x0040,
hex = 0x0080,
showbase = 0x0100,
showpoint = 0x0200,
uppercase = 0x0400,
showpos = 0x0800,
scientific= 0x1000,
fixed = 0x2000
};
static const int basefield;
static const int adjustfield;
static const int floatfield;
int flags() const;
int flags( int f );
int setf( int bits );
int setf( int bits, int mask );
int unsetf( int bits );
void reset();
int width() const;
int width( int );
int fill() const;
int fill( int );
int precision() const;
int precision( int );
private:
long input_int();
void init();
QTextStream &output_int( int, ulong, bool );
QIODevice *dev;
bool isNetworkOrder() { return internalOrder == QChar::networkOrdered(); }
int fflags;
int fwidth;
int fillchar;
int fprec;
bool fstrm;
bool owndev;
QTextCodec *mapper;
QTextStreamPrivate * d;
QChar ungetcBuf;
bool latin1;
bool internalOrder;
bool doUnicodeHeader;
void *reserved_ptr;
QChar eat_ws();
void ts_ungetc( QChar );
QChar ts_getc();
uint ts_getbuf( QChar*, uint );
void ts_putc(int);
void ts_putc(QChar);
bool ts_isspace(QChar);
bool ts_isdigit(QChar);
ulong input_bin();
ulong input_oct();
ulong input_dec();
ulong input_hex();
double input_double();
QTextStream &writeBlock( const char* p, uint len );
QTextStream &writeBlock( const QChar* p, uint len );
private:
QTextStream( const QTextStream & );
QTextStream &operator=( const QTextStream & );
};
typedef QTextStream QTS;
class QTextIStream : public QTextStream {
public:
QTextIStream( QString* s ) :
QTextStream(s,0x0001 ) { }
QTextIStream( QByteArray ba ) :
QTextStream(ba,0x0001 ) { }
QTextIStream( FILE *f ) :
QTextStream(f,0x0001 ) { }
};
class QTextOStream : public QTextStream {
public:
QTextOStream( QString* s ) :
QTextStream(s,0x0002 ) { }
QTextOStream( QByteArray ba ) :
QTextStream(ba,0x0002 ) { }
QTextOStream( FILE *f ) :
QTextStream(f,0x0002 ) { }
};
inline QIODevice *QTextStream::device() const
{ return dev; }
inline bool QTextStream::atEnd() const
{ return dev ? dev->atEnd() : FALSE; }
inline bool QTextStream::eof() const
{ return atEnd(); }
inline int QTextStream::flags() const
{ return fflags; }
inline int QTextStream::flags( int f )
{ int oldf = fflags; fflags = f; return oldf; }
inline int QTextStream::setf( int bits )
{ int oldf = fflags; fflags |= bits; return oldf; }
inline int QTextStream::setf( int bits, int mask )
{ int oldf = fflags; fflags = (fflags & ~mask) | (bits & mask); return oldf; }
inline int QTextStream::unsetf( int bits )
{ int oldf = fflags; fflags &= ~bits; return oldf; }
inline int QTextStream::width() const
{ return fwidth; }
inline int QTextStream::width( int w )
{ int oldw = fwidth; fwidth = w; return oldw; }
inline int QTextStream::fill() const
{ return fillchar; }
inline int QTextStream::fill( int f )
{ int oldc = fillchar; fillchar = f; return oldc; }
inline int QTextStream::precision() const
{ return fprec; }
inline int QTextStream::precision( int p )
{ int oldp = fprec; fprec = p; return oldp; }
inline QChar QTextStream::ts_getc()
{ QChar r; return ( ts_getbuf( &r,1 ) == 1 ? r : QChar((ushort)0xffff) ); }
typedef QTextStream & (*QTSFUNC)(QTextStream &);
typedef int (QTextStream::*QTSMFI)(int);
class QTSManip {
public:
QTSManip( QTSMFI m, int a ) { mf=m; arg=a; }
void exec( QTextStream &s ) { (s.*mf)(arg); }
private:
QTSMFI mf;
int arg;
};
inline QTextStream &operator>>( QTextStream &s, QTSFUNC f )
{ return (*f)( s ); }
inline QTextStream &operator<<( QTextStream &s, QTSFUNC f )
{ return (*f)( s ); }
inline QTextStream &operator<<( QTextStream &s, QTSManip m )
{ m.exec(s); return s; }
QTextStream &bin( QTextStream &s );
QTextStream &oct( QTextStream &s );
QTextStream &dec( QTextStream &s );
QTextStream &hex( QTextStream &s );
QTextStream &endl( QTextStream &s );
QTextStream &flush( QTextStream &s );
QTextStream &ws( QTextStream &s );
QTextStream &reset( QTextStream &s );
inline QTSManip qSetW( int w )
{
QTSMFI func = &QTextStream::width;
return QTSManip(func,w);
}
inline QTSManip qSetFill( int f )
{
QTSMFI func = &QTextStream::fill;
return QTSManip(func,f);
}
inline QTSManip qSetPrecision( int p )
{
QTSMFI func = &QTextStream::precision;
return QTSManip(func,p);
}
inline QTSManip setw( int w )
{
QTSMFI func = &QTextStream::width;
return QTSManip(func,w);
}
inline QTSManip setfill( int f )
{
QTSMFI func = &QTextStream::fill;
return QTSManip(func,f);
}
inline QTSManip setprecision( int p )
{
QTSMFI func = &QTextStream::precision;
return QTSManip(func,p);
}
# 20 "index.cpp" 2
# 1 "../qtools/qdatetime.h" 1
class QDate
{
public:
QDate() { jd=0; }
QDate( int y, int m, int d );
bool isNull() const { return jd == 0; }
bool isValid() const;
int year() const;
int month() const;
int day() const;
int dayOfWeek() const;
int dayOfYear() const;
int daysInMonth() const;
int daysInYear() const;
virtual QString monthName( int month ) const;
virtual QString dayName( int weekday ) const;
QString toString() const;
bool setYMD( int y, int m, int d );
QDate addDays( int days ) const;
int daysTo( const QDate & ) const;
bool operator==( const QDate &d ) const { return jd == d.jd; }
bool operator!=( const QDate &d ) const { return jd != d.jd; }
bool operator<( const QDate &d ) const { return jd < d.jd; }
bool operator<=( const QDate &d ) const { return jd <= d.jd; }
bool operator>( const QDate &d ) const { return jd > d.jd; }
bool operator>=( const QDate &d ) const { return jd >= d.jd; }
static QDate currentDate();
static bool isValid( int y, int m, int d );
static bool leapYear( int year );
protected:
static uint greg2jul( int y, int m, int d );
static void jul2greg( uint jd, int &y, int &m, int &d );
private:
static const char * const monthNames[];
static const char * const weekdayNames[];
uint jd;
friend class QDateTime;
friend QDataStream &operator<<( QDataStream &, const QDate & );
friend QDataStream &operator>>( QDataStream &, QDate & );
};
class QTime
{
public:
QTime() { ds=0; }
QTime( int h, int m, int s=0, int ms=0 );
bool isNull() const { return ds == 0; }
bool isValid() const;
int hour() const;
int minute() const;
int second() const;
int msec() const;
QString toString() const;
bool setHMS( int h, int m, int s, int ms=0 );
QTime addSecs( int secs ) const;
int secsTo( const QTime & ) const;
QTime addMSecs( int ms ) const;
int msecsTo( const QTime & ) const;
bool operator==( const QTime &d ) const { return ds == d.ds; }
bool operator!=( const QTime &d ) const { return ds != d.ds; }
bool operator<( const QTime &d ) const { return ds < d.ds; }
bool operator<=( const QTime &d ) const { return ds <= d.ds; }
bool operator>( const QTime &d ) const { return ds > d.ds; }
bool operator>=( const QTime &d ) const { return ds >= d.ds; }
static QTime currentTime();
static bool isValid( int h, int m, int s, int ms=0 );
void start();
int restart();
int elapsed();
private:
static bool currentTime( QTime * );
uint ds;
friend class QDateTime;
friend QDataStream &operator<<( QDataStream &, const QTime & );
friend QDataStream &operator>>( QDataStream &, QTime & );
};
class QDateTime
{
public:
QDateTime() {}
QDateTime( const QDate & );
QDateTime( const QDate &, const QTime & );
bool isNull() const { return d.isNull() && t.isNull(); }
bool isValid() const { return d.isValid() && t.isValid(); }
QDate date() const { return d; }
QTime time() const { return t; }
void setDate( const QDate &date ) { d=date; }
void setTime( const QTime &time ) { t=time; }
void setTime_t( uint secsSince1Jan1970UTC );
QString toString() const;
QDateTime addDays( int days ) const;
QDateTime addSecs( int secs ) const;
int daysTo( const QDateTime & ) const;
int secsTo( const QDateTime & ) const;
bool operator==( const QDateTime &dt ) const;
bool operator!=( const QDateTime &dt ) const;
bool operator<( const QDateTime &dt ) const;
bool operator<=( const QDateTime &dt ) const;
bool operator>( const QDateTime &dt ) const;
bool operator>=( const QDateTime &dt ) const;
static QDateTime currentDateTime();
private:
QDate d;
QTime t;
friend QDataStream &operator<<( QDataStream &, const QDateTime &);
friend QDataStream &operator>>( QDataStream &, QDateTime & );
};
QDataStream &operator<<( QDataStream &, const QDate & );
QDataStream &operator>>( QDataStream &, QDate & );
QDataStream &operator<<( QDataStream &, const QTime & );
QDataStream &operator>>( QDataStream &, QTime & );
QDataStream &operator<<( QDataStream &, const QDateTime & );
QDataStream &operator>>( QDataStream &, QDateTime & );
# 21 "index.cpp" 2
# 1 "../qtools/qdir.h" 1
# 1 "../qtools/qstrlist.h" 1
# 1 "../qtools/qlist.h" 1
# 1 "../qtools/qglist.h" 1
# 1 "../qtools/qcollection.h" 1
class QGVector;
class QGList;
class QGDict;
class QCollection
{
public:
bool autoDelete() const { return del_item; }
void setAutoDelete( bool enable ) { del_item = enable; }
virtual uint count() const = 0;
virtual void clear() = 0;
typedef void *Item;
protected:
QCollection() { del_item = FALSE; }
QCollection(const QCollection &) { del_item = FALSE; }
virtual ~QCollection() {}
bool del_item;
virtual Item newItem( Item );
virtual void deleteItem( Item );
};
# 42 "../qtools/qglist.h" 2
class QLNode
{
friend class QGList;
friend class QGListIterator;
public:
QCollection::Item getData() { return data; }
private:
QCollection::Item data;
QLNode *prev;
QLNode *next;
QLNode( QCollection::Item d ) { data = d; }
};
class QGList : public QCollection
{
friend class QGListIterator;
friend class QGVector;
public:
uint count() const;
QDataStream &read( QDataStream & );
QDataStream &write( QDataStream & ) const;
protected:
QGList();
QGList( const QGList & );
virtual ~QGList();
QGList &operator=( const QGList & );
bool operator==( const QGList& ) const;
void inSort( QCollection::Item );
void append( QCollection::Item );
bool insertAt( uint index, QCollection::Item );
void relinkNode( QLNode * );
bool removeNode( QLNode * );
bool remove( QCollection::Item = 0 );
bool removeRef( QCollection::Item = 0 );
bool removeFirst();
bool removeLast();
bool removeAt( uint index );
QCollection::Item takeNode( QLNode * );
QCollection::Item take();
QCollection::Item takeAt( uint index );
QCollection::Item takeFirst();
QCollection::Item takeLast();
void sort();
void clear();
int findRef( QCollection::Item, bool = TRUE );
int find( QCollection::Item, bool = TRUE );
uint containsRef( QCollection::Item ) const;
uint contains( QCollection::Item ) const;
QCollection::Item at( uint index );
int at() const;
QLNode *currentNode() const;
QCollection::Item get() const;
QCollection::Item cfirst() const;
QCollection::Item clast() const;
QCollection::Item first();
QCollection::Item last();
QCollection::Item next();
QCollection::Item prev();
void toVector( QGVector * ) const;
virtual int compareItems( QCollection::Item, QCollection::Item );
virtual QDataStream &read( QDataStream &, QCollection::Item & );
virtual QDataStream &write( QDataStream &, QCollection::Item ) const;
private:
void prepend( QCollection::Item );
void heapSortPushDown( QCollection::Item* heap, int first, int last );
QLNode *firstNode;
QLNode *lastNode;
QLNode *curNode;
int curIndex;
uint numNodes;
QGList *iterators;
QLNode *locate( uint );
QLNode *unlink();
};
inline uint QGList::count() const
{
return numNodes;
}
inline bool QGList::removeFirst()
{
first();
return remove();
}
inline bool QGList::removeLast()
{
last();
return remove();
}
inline int QGList::at() const
{
return curIndex;
}
inline QCollection::Item QGList::at( uint index )
{
QLNode *n = locate( index );
return n ? n->data : 0;
}
inline QLNode *QGList::currentNode() const
{
return curNode;
}
inline QCollection::Item QGList::get() const
{
return curNode ? curNode->data : 0;
}
inline QCollection::Item QGList::cfirst() const
{
return firstNode ? firstNode->data : 0;
}
inline QCollection::Item QGList::clast() const
{
return lastNode ? lastNode->data : 0;
}
QDataStream &operator>>( QDataStream &, QGList & );
QDataStream &operator<<( QDataStream &, const QGList & );
class QGListIterator
{
friend class QGList;
protected:
QGListIterator( const QGList & );
QGListIterator( const QGListIterator & );
QGListIterator &operator=( const QGListIterator & );
~QGListIterator();
bool atFirst() const;
bool atLast() const;
QCollection::Item toFirst();
QCollection::Item toLast();
QCollection::Item get() const;
QCollection::Item operator()();
QCollection::Item operator++();
QCollection::Item operator+=(uint);
QCollection::Item operator--();
QCollection::Item operator-=(uint);
protected:
QGList *list;
private:
QLNode *curNode;
};
inline bool QGListIterator::atFirst() const
{
return curNode == list->firstNode;
}
inline bool QGListIterator::atLast() const
{
return curNode == list->lastNode;
}
inline QCollection::Item QGListIterator::get() const
{
return curNode ? curNode->data : 0;
}
# 42 "../qtools/qlist.h" 2
template<class type> class QList : public QGList
{
public:
QList() {}
QList( const QList<type> &l ) : QGList(l) {}
~QList() { clear(); }
QList<type> &operator=(const QList<type> &l)
{ return (QList<type>&)QGList::operator=(l); }
bool operator==( const QList<type> &list ) const
{ return QGList::operator==( list ); }
uint count() const { return QGList::count(); }
bool isEmpty() const { return QGList::count() == 0; }
bool insert( uint i, const type *d){ return QGList::insertAt(i,(QCollection::Item)d); }
void inSort( const type *d ) { QGList::inSort((QCollection::Item)d); }
void prepend( const type *d ) { QGList::insertAt(0,(QCollection::Item)d); }
void append( const type *d ) { QGList::append((QCollection::Item)d); }
bool remove( uint i ) { return QGList::removeAt(i); }
bool remove() { return QGList::remove((QCollection::Item)0); }
bool remove( const type *d ) { return QGList::remove((QCollection::Item)d); }
bool removeRef( const type *d ) { return QGList::removeRef((QCollection::Item)d); }
void removeNode( QLNode *n ) { QGList::removeNode(n); }
bool removeFirst() { return QGList::removeFirst(); }
bool removeLast() { return QGList::removeLast(); }
type *take( uint i ) { return (type *)QGList::takeAt(i); }
type *take() { return (type *)QGList::take(); }
type *takeNode( QLNode *n ) { return (type *)QGList::takeNode(n); }
void clear() { QGList::clear(); }
void sort() { QGList::sort(); }
int find( const type *d ) { return QGList::find((QCollection::Item)d); }
int findNext( const type *d ) { return QGList::find((QCollection::Item)d,FALSE); }
int findRef( const type *d ) { return QGList::findRef((QCollection::Item)d); }
int findNextRef( const type *d ){ return QGList::findRef((QCollection::Item)d,FALSE);}
uint contains( const type *d ) const { return QGList::contains((QCollection::Item)d); }
uint containsRef( const type *d ) const
{ return QGList::containsRef((QCollection::Item)d); }
type *at( uint i ) { return (type *)QGList::at(i); }
int at() const { return QGList::at(); }
type *current() const { return (type *)QGList::get(); }
QLNode *currentNode() const { return QGList::currentNode(); }
type *getFirst() const { return (type *)QGList::cfirst(); }
type *getLast() const { return (type *)QGList::clast(); }
type *first() { return (type *)QGList::first(); }
type *last() { return (type *)QGList::last(); }
type *next() { return (type *)QGList::next(); }
type *prev() { return (type *)QGList::prev(); }
void toVector( QGVector *vec )const{ QGList::toVector(vec); }
private:
void deleteItem( QCollection::Item d );
};
template<> inline void QList<void>::deleteItem( QCollection::Item )
{
}
template<class type> inline void QList<type>::deleteItem( QCollection::Item d )
{
if ( del_item ) delete (type *)d;
}
template<class type> class QListIterator : public QGListIterator
{
public:
QListIterator(const QList<type> &l) :QGListIterator((QGList &)l) {}
~QListIterator() {}
uint count() const { return list->count(); }
bool isEmpty() const { return list->count() == 0; }
bool atFirst() const { return QGListIterator::atFirst(); }
bool atLast() const { return QGListIterator::atLast(); }
type *toFirst() { return (type *)QGListIterator::toFirst(); }
type *toLast() { return (type *)QGListIterator::toLast(); }
operator type *() const { return (type *)QGListIterator::get(); }
type *operator*() { return (type *)QGListIterator::get(); }
type *current() const { return (type *)QGListIterator::get(); }
type *operator()() { return (type *)QGListIterator::operator()();}
type *operator++() { return (type *)QGListIterator::operator++(); }
type *operator+=(uint j) { return (type *)QGListIterator::operator+=(j);}
type *operator--() { return (type *)QGListIterator::operator--(); }
type *operator-=(uint j) { return (type *)QGListIterator::operator-=(j);}
QListIterator<type>& operator=(const QListIterator<type>&it)
{ QGListIterator::operator=(it); return *this; }
};
# 43 "../qtools/qstrlist.h" 2
# 1 "../qtools/qdatastream.h" 1
class QDataStream
{
public:
QDataStream();
QDataStream( QIODevice * );
QDataStream( QByteArray, int mode );
virtual ~QDataStream();
QIODevice *device() const;
void setDevice( QIODevice * );
void unsetDevice();
bool atEnd() const;
bool eof() const;
enum ByteOrder { BigEndian, LittleEndian };
int byteOrder() const;
void setByteOrder( int );
bool isPrintableData() const;
void setPrintableData( bool );
int version() const;
void setVersion( int );
QDataStream &operator>>( Q_INT8 &i );
QDataStream &operator>>( Q_UINT8 &i );
QDataStream &operator>>( Q_INT16 &i );
QDataStream &operator>>( Q_UINT16 &i );
QDataStream &operator>>( Q_INT32 &i );
QDataStream &operator>>( Q_UINT32 &i );
QDataStream &operator>>( Q_INT64 &i );
QDataStream &operator>>( Q_UINT64 &i );
QDataStream &operator>>( float &f );
QDataStream &operator>>( double &f );
QDataStream &operator>>( char *&str );
QDataStream &operator<<( Q_INT8 i );
QDataStream &operator<<( Q_UINT8 i );
QDataStream &operator<<( Q_INT16 i );
QDataStream &operator<<( Q_UINT16 i );
QDataStream &operator<<( Q_INT32 i );
QDataStream &operator<<( Q_UINT32 i );
QDataStream &operator<<( Q_INT64 i );
QDataStream &operator<<( Q_UINT64 i );
QDataStream &operator<<( float f );
QDataStream &operator<<( double f );
QDataStream &operator<<( const char *str );
QDataStream &readBytes( char *&, uint &len );
QDataStream &readRawBytes( char *, uint len );
QDataStream &writeBytes( const char *, uint len );
QDataStream &writeRawBytes( const char *, uint len );
private:
QIODevice *dev;
bool owndev;
int byteorder;
bool printable;
bool noswap;
int ver;
private:
QDataStream( const QDataStream & );
QDataStream &operator=( const QDataStream & );
};
inline QIODevice *QDataStream::device() const
{ return dev; }
inline bool QDataStream::atEnd() const
{ return dev ? dev->atEnd() : TRUE; }
inline bool QDataStream::eof() const
{ return atEnd(); }
inline int QDataStream::byteOrder() const
{ return byteorder; }
inline bool QDataStream::isPrintableData() const
{ return printable; }
inline void QDataStream::setPrintableData( bool p )
{ printable = p; }
inline int QDataStream::version() const
{ return ver; }
inline void QDataStream::setVersion( int v )
{ ver = v; }
inline QDataStream &QDataStream::operator>>( Q_UINT8 &i )
{ return *this >> (Q_INT8&)i; }
inline QDataStream &QDataStream::operator>>( Q_UINT16 &i )
{ return *this >> (Q_INT16&)i; }
inline QDataStream &QDataStream::operator>>( Q_UINT32 &i )
{ return *this >> (Q_INT32&)i; }
inline QDataStream &QDataStream::operator>>( Q_UINT64 &i )
{ return *this >> (Q_INT64&)i; }
inline QDataStream &QDataStream::operator<<( Q_UINT8 i )
{ return *this << (Q_INT8)i; }
inline QDataStream &QDataStream::operator<<( Q_UINT16 i )
{ return *this << (Q_INT16)i; }
inline QDataStream &QDataStream::operator<<( Q_UINT32 i )
{ return *this << (Q_INT32)i; }
inline QDataStream &QDataStream::operator<<( Q_UINT64 i )
{ return *this << (Q_INT64)i; }
# 44 "../qtools/qstrlist.h" 2
typedef QList<char> QStrListBase;
typedef QListIterator<char> QStrListIterator;
class QStrList : public QStrListBase
{
public:
QStrList( bool deepCopies=TRUE ) { dc = deepCopies; del_item = deepCopies; }
QStrList( const QStrList & );
~QStrList() { clear(); }
QStrList& operator=( const QStrList & );
private:
QCollection::Item newItem( QCollection::Item d ) { return dc ? qstrdup( (const char*)d ) : d; }
void deleteItem( QCollection::Item d ) { if ( del_item ) delete[] (char*)d; }
int compareItems( QCollection::Item s1, QCollection::Item s2 ) { return qstrcmp((const char*)s1,
(const char*)s2); }
QDataStream &read( QDataStream &s, QCollection::Item &d )
{ s >> (char *&)d; return s; }
QDataStream &write( QDataStream &s, QCollection::Item d ) const
{ return s << (const char *)d; }
bool dc;
};
class QStrIList : public QStrList
{
public:
QStrIList( bool deepCopies=TRUE ) : QStrList( deepCopies ) {}
~QStrIList() { clear(); }
private:
int compareItems( QCollection::Item s1, QCollection::Item s2 )
{ return qstricmp((const char*)s1,
(const char*)s2); }
};
inline QStrList & QStrList::operator=( const QStrList &strList )
{
clear();
dc = strList.dc;
del_item = dc;
QStrListBase::operator=(strList);
return *this;
}
inline QStrList::QStrList( const QStrList &strList )
: QStrListBase( strList )
{
dc = FALSE;
operator=(strList);
}
# 42 "../qtools/qdir.h" 2
# 1 "../qtools/qfileinfo.h" 1
# 1 "../qtools/qfile.h" 1
class QDir;
class QFile : public QIODevice
{
public:
QFile();
QFile( const QString &name );
~QFile();
QString name() const;
void setName( const QString &name );
typedef QCString (*EncoderFn)( const QString &fileName );
typedef QString (*DecoderFn)( const QCString &localfileName );
static QCString encodeName( const QString &fileName );
static QString decodeName( const QCString &localFileName );
static void setEncodingFunction( EncoderFn );
static void setDecodingFunction( DecoderFn );
bool exists() const;
static bool exists( const QString &fileName );
bool remove();
static bool remove( const QString &fileName );
bool open( int );
bool open( int, FILE * );
bool open( int, int );
void close();
void flush();
uint size() const;
int at() const;
bool at( int );
bool atEnd() const;
int readBlock( char *data, uint len );
int writeBlock( const char *data, uint len );
int writeBlock( const QByteArray& data )
{ return QIODevice::writeBlock(data); }
int readLine( char *data, uint maxlen );
int readLine( QString &, uint maxlen );
int getch();
int putch( int );
int ungetch( int );
int handle() const;
protected:
QString fn;
FILE *fh;
int fd;
int length;
bool ext_f;
void * d;
private:
void init();
QCString ungetchBuffer;
private:
QFile( const QFile & );
QFile &operator=( const QFile & );
};
inline QString QFile::name() const
{ return fn; }
inline int QFile::at() const
{ return ioIndex; }
# 42 "../qtools/qfileinfo.h" 2
class QDir;
struct QFileInfoCache;
class QFileInfo
{
public:
enum PermissionSpec {
ReadUser = 0400, WriteUser = 0200, ExeUser = 0100,
ReadGroup = 0040, WriteGroup = 0020, ExeGroup = 0010,
ReadOther = 0004, WriteOther = 0002, ExeOther = 0001 };
QFileInfo();
QFileInfo( const QString &file );
QFileInfo( const QFile & );
QFileInfo( const QDir &, const QString &fileName );
QFileInfo( const QFileInfo & );
~QFileInfo();
QFileInfo &operator=( const QFileInfo & );
void setFile( const QString &file );
void setFile( const QFile & );
void setFile( const QDir &, const QString &fileName );
bool exists() const;
void refresh() const;
bool caching() const;
void setCaching( bool );
QString filePath() const;
QString fileName() const;
QString absFilePath() const;
QString baseName() const;
QString extension( bool complete = TRUE ) const;
QString dirPath( bool absPath = FALSE ) const;
QDir dir( bool absPath = FALSE ) const;
bool isReadable() const;
bool isWritable() const;
bool isExecutable() const;
bool isRelative() const;
bool convertToAbs();
bool isFile() const;
bool isDir() const;
bool isSymLink() const;
QString readLink() const;
QString owner() const;
uint ownerId() const;
QString group() const;
uint groupId() const;
bool permission( int permissionSpec ) const;
uint size() const;
QDateTime lastModified() const;
QDateTime lastRead() const;
private:
void doStat() const;
static void slashify( QString & );
static void makeAbs( QString & );
QString fn;
QFileInfoCache *fic;
bool cache;
};
inline bool QFileInfo::caching() const
{
return cache;
}
# 43 "../qtools/qdir.h" 2
typedef QList<QFileInfo> QFileInfoList;
typedef QListIterator<QFileInfo> QFileInfoListIterator;
class QStringList;
class QDir
{
public:
enum FilterSpec { Dirs = 0x001,
Files = 0x002,
Drives = 0x004,
NoSymLinks = 0x008,
All = 0x007,
TypeMask = 0x00F,
Readable = 0x010,
Writable = 0x020,
Executable = 0x040,
RWEMask = 0x070,
Modified = 0x080,
Hidden = 0x100,
System = 0x200,
AccessMask = 0x3F0,
DefaultFilter = -1 };
enum SortSpec { Name = 0x00,
Time = 0x01,
Size = 0x02,
Unsorted = 0x03,
SortByMask = 0x03,
DirsFirst = 0x04,
Reversed = 0x08,
IgnoreCase = 0x10,
DefaultSort = -1 };
QDir();
QDir( const QString &path, const QString &nameFilter = QString::null,
int sortSpec = Name | IgnoreCase, int filterSpec = All );
QDir( const QDir & );
virtual ~QDir();
QDir &operator=( const QDir & );
QDir &operator=( const QString &path );
virtual void setPath( const QString &path );
virtual QString path() const;
virtual QString absPath() const;
virtual QString canonicalPath() const;
virtual QString dirName() const;
virtual QString filePath( const QString &fileName,
bool acceptAbsPath = TRUE ) const;
virtual QString absFilePath( const QString &fileName,
bool acceptAbsPath = TRUE ) const;
static QString convertSeparators( const QString &pathName );
virtual bool cd( const QString &dirName, bool acceptAbsPath = TRUE );
virtual bool cdUp();
QString nameFilter() const;
virtual void setNameFilter( const QString &nameFilter );
FilterSpec filter() const;
virtual void setFilter( int filterSpec );
SortSpec sorting() const;
virtual void setSorting( int sortSpec );
bool matchAllDirs() const;
virtual void setMatchAllDirs( bool );
uint count() const;
QString operator[]( int ) const;
virtual QStrList encodedEntryList( int filterSpec = DefaultFilter,
int sortSpec = DefaultSort ) const;
virtual QStrList encodedEntryList( const QString &nameFilter,
int filterSpec = DefaultFilter,
int sortSpec = DefaultSort ) const;
virtual QStringList entryList( int filterSpec = DefaultFilter,
int sortSpec = DefaultSort ) const;
virtual QStringList entryList( const QString &nameFilter,
int filterSpec = DefaultFilter,
int sortSpec = DefaultSort ) const;
virtual const QFileInfoList *entryInfoList( int filterSpec = DefaultFilter,
int sortSpec = DefaultSort ) const;
virtual const QFileInfoList *entryInfoList( const QString &nameFilter,
int filterSpec = DefaultFilter,
int sortSpec = DefaultSort ) const;
static const QFileInfoList *drives();
virtual bool mkdir( const QString &dirName,
bool acceptAbsPath = TRUE ) const;
virtual bool rmdir( const QString &dirName,
bool acceptAbsPath = TRUE ) const;
virtual bool isReadable() const;
virtual bool exists() const;
virtual bool isRoot() const;
virtual bool isRelative() const;
virtual void convertToAbs();
virtual bool operator==( const QDir & ) const;
virtual bool operator!=( const QDir & ) const;
virtual bool remove( const QString &fileName,
bool acceptAbsPath = TRUE );
virtual bool rename( const QString &name, const QString &newName,
bool acceptAbsPaths = TRUE );
virtual bool exists( const QString &name,
bool acceptAbsPath = TRUE );
static char separator();
static bool setCurrent( const QString &path );
static QDir current();
static QDir home();
static QDir root();
static QString currentDirPath();
static QString homeDirPath();
static QString rootDirPath();
static bool match( const QStringList &filters, const QString &fileName );
static bool match( const QString &filter, const QString &fileName );
static QString cleanDirPath( const QString &dirPath );
static bool isRelativePath( const QString &path );
private:
void init();
virtual bool readDirEntries( const QString &nameFilter,
int FilterSpec, int SortSpec );
static void slashify ( QString &);
QString dPath;
QStringList *fList;
QFileInfoList *fiList;
QString nameFilt;
FilterSpec filtS;
SortSpec sortS;
uint dirty : 1;
uint allDirs : 1;
};
inline QString QDir::path() const
{
return dPath;
}
inline QString QDir::nameFilter() const
{
return nameFilt;
}
inline QDir::FilterSpec QDir::filter() const
{
return filtS;
}
inline QDir::SortSpec QDir::sorting() const
{
return sortS;
}
inline bool QDir::matchAllDirs() const
{
return allDirs;
}
inline bool QDir::operator!=( const QDir &d ) const
{
return !(*this == d);
}
struct QDirSortItem {
QString filename_cache;
QFileInfo* item;
};
# 22 "index.cpp" 2
# 1 "message.h" 1
extern void msg(const char *fmt, ...);
extern void warn(const char *file,int line,const char *fmt, ...);
extern void warn_cont(const char *fmt, ...);
extern void warn_undoc(const char *file,int line,const char *fmt, ...);
extern void err(const char *fmt, ...);
void initWarningFormat();
# 24 "index.cpp" 2
# 1 "index.h" 1
# 1 "qtbc.h" 1
# 1 "/usr/include/locale.h" 1 3 4
struct lconv {
char *decimal_point;
char *thousands_sep;
char *grouping;
char *int_curr_symbol;
char *currency_symbol;
char *mon_decimal_point;
char *mon_thousands_sep;
char *mon_grouping;
char *positive_sign;
char *negative_sign;
char int_frac_digits;
char frac_digits;
char p_cs_precedes;
char p_sep_by_space;
char n_cs_precedes;
char n_sep_by_space;
char p_sign_posn;
char n_sign_posn;
};
extern "C" {
struct lconv *localeconv (void) ;
char *setlocale (int, const char *) ;
};
# 29 "qtbc.h" 2
inline QCString convertToQCString(const QString &s) { return s.latin1(); }
# 21 "index.h" 2
enum IndexSections
{
isTitlePageStart,
isTitlePageAuthor,
isMainPage,
isPackageIndex,
isModuleIndex,
isNamespaceIndex,
isClassHierarchyIndex,
isCompoundIndex,
isFileIndex,
isPageIndex,
isPackageDocumentation,
isModuleDocumentation,
isNamespaceDocumentation,
isClassDocumentation,
isFileDocumentation,
isExampleDocumentation,
isPageDocumentation,
isEndIndex
};
class OutputList;
void writeIndex(OutputList &ol);
void writeHierarchicalIndex(OutputList &ol);
void writeAlphabeticalIndex(OutputList &ol);
void writeClassHierarchy(OutputList &ol);
void writeFileIndex(OutputList &ol);
void writeSourceIndex(OutputList &ol);
void writeAnnotatedIndex(OutputList &ol);
void writeAnnotatedClassList(OutputList &ol);
void writeMemberIndex(OutputList &ol);
void writeMemberList(OutputList &ol,bool useSections);
void writeHeaderIndex(OutputList &ol);
void writeHeaderFileList(OutputList &ol);
void writeExampleIndex(OutputList &ol);
void writePageIndex(OutputList &ol);
void writeFileMemberIndex(OutputList &ol);
void writeGroupIndex(OutputList &ol);
void writeNamespaceIndex(OutputList &ol);
void writeNamespaceMemberIndex(OutputList &ol);
void writeGraphicalClassHierarchy(OutputList &ol);
void writeGraphInfo(OutputList &ol);
void writePackageIndex(OutputList &ol);
void countDataStructures();
extern int annotatedClasses;
extern int hierarchyClasses;
extern int documentedFunctions;
extern int documentedMembers;
extern int documentedDefines;
extern int documentedFiles;
extern int documentedHtmlFiles;
extern int documentedGroups;
extern int documentedNamespaces;
extern int documentedNamespaceMembers;
extern int documentedIncludeFiles;
extern int documentedPages;
extern int indexedPages;
extern int documentedPackages;
void startTitle(OutputList &ol,const char *fileName);
void endTitle(OutputList &ol,const char *fileName,const char *name);
void startFile(OutputList &ol,const char *name,const char *title,bool external=FALSE);
void endFile(OutputList &ol,bool external=FALSE);
# 25 "index.cpp" 2
# 1 "doxygen.h" 1
# 1 "groupdef.h" 1
# 1 "../qtools/qdict.h" 1
# 1 "../qtools/qgdict.h" 1
class QGDictIterator;
class QGDItList;
class QBaseBucket
{
public:
QCollection::Item getData() { return data; }
QCollection::Item setData( QCollection::Item d ) { return data = d; }
QBaseBucket *getNext() { return next; }
void setNext( QBaseBucket *n) { next = n; }
protected:
QBaseBucket( QCollection::Item d, QBaseBucket *n ) : data(d), next(n) {}
QCollection::Item data;
QBaseBucket *next;
};
class QStringBucket : public QBaseBucket
{
public:
QStringBucket( const QString &k, QCollection::Item d, QBaseBucket *n )
: QBaseBucket(d,n), key(k) {}
const QString &getKey() const { return key; }
private:
QString key;
};
class QAsciiBucket : public QBaseBucket
{
public:
QAsciiBucket( const char *k, QCollection::Item d, QBaseBucket *n )
: QBaseBucket(d,n), key(k) {}
const char *getKey() const { return key; }
private:
const char *key;
};
class QIntBucket : public QBaseBucket
{
public:
QIntBucket( long k, QCollection::Item d, QBaseBucket *n )
: QBaseBucket(d,n), key(k) {}
long getKey() const { return key; }
private:
long key;
};
class QPtrBucket : public QBaseBucket
{
public:
QPtrBucket( void *k, QCollection::Item d, QBaseBucket *n )
: QBaseBucket(d,n), key(k) {}
void *getKey() const { return key; }
private:
void *key;
};
class QGDict : public QCollection
{
public:
uint count() const { return numItems; }
uint size() const { return vlen; }
QCollection::Item look_string( const QString& key, QCollection::Item,
int );
QCollection::Item look_ascii( const char *key, QCollection::Item, int );
QCollection::Item look_int( long key, QCollection::Item, int );
QCollection::Item look_ptr( void *key, QCollection::Item, int );
QDataStream &read( QDataStream & );
QDataStream &write( QDataStream & ) const;
protected:
enum KeyType { StringKey, AsciiKey, IntKey, PtrKey };
QGDict( uint len, KeyType kt, bool cs, bool ck );
QGDict( const QGDict & );
~QGDict();
QGDict &operator=( const QGDict & );
bool remove_string( const QString &key, QCollection::Item item=0 );
bool remove_ascii( const char *key, QCollection::Item item=0 );
bool remove_int( long key, QCollection::Item item=0 );
bool remove_ptr( void *key, QCollection::Item item=0 );
QCollection::Item take_string( const QString &key );
QCollection::Item take_ascii( const char *key );
QCollection::Item take_int( long key );
QCollection::Item take_ptr( void *key );
void clear();
void resize( uint );
int hashKeyString( const QString & );
int hashKeyAscii( const char * );
void statistics() const;
virtual QDataStream &read( QDataStream &, QCollection::Item & );
virtual QDataStream &write( QDataStream &, QCollection::Item ) const;
private:
QBaseBucket **vec;
uint vlen;
uint numItems;
uint keytype : 2;
uint cases : 1;
uint copyk : 1;
QGDItList *iterators;
void unlink_common( int, QBaseBucket *, QBaseBucket * );
QStringBucket *unlink_string( const QString &,
QCollection::Item item = 0 );
QAsciiBucket *unlink_ascii( const char *, QCollection::Item item = 0 );
QIntBucket *unlink_int( long, QCollection::Item item = 0 );
QPtrBucket *unlink_ptr( void *, QCollection::Item item = 0 );
void init( uint, KeyType, bool, bool );
friend class QGDictIterator;
};
class QGDictIterator
{
friend class QGDict;
public:
QGDictIterator( const QGDict & );
QGDictIterator( const QGDictIterator & );
QGDictIterator &operator=( const QGDictIterator & );
~QGDictIterator();
QCollection::Item toFirst();
QCollection::Item get() const;
QString getKeyString() const;
const char *getKeyAscii() const;
long getKeyInt() const;
void *getKeyPtr() const;
QCollection::Item operator()();
QCollection::Item operator++();
QCollection::Item operator+=(uint);
protected:
QGDict *dict;
private:
QBaseBucket *curNode;
uint curIndex;
};
inline QCollection::Item QGDictIterator::get() const
{
return curNode ? curNode->getData() : 0;
}
inline QString QGDictIterator::getKeyString() const
{
return curNode ? ((QStringBucket*)curNode)->getKey() : QString::null;
}
inline const char *QGDictIterator::getKeyAscii() const
{
return curNode ? ((QAsciiBucket*)curNode)->getKey() : 0;
}
inline long QGDictIterator::getKeyInt() const
{
return curNode ? ((QIntBucket*)curNode)->getKey() : 0;
}
inline void *QGDictIterator::getKeyPtr() const
{
return curNode ? ((QPtrBucket*)curNode)->getKey() : 0;
}
# 42 "../qtools/qdict.h" 2
template<class type> class QDict : public QGDict
{
public:
QDict(int size=17, bool caseSensitive=TRUE)
: QGDict(size,StringKey,caseSensitive,FALSE) {}
QDict( const QDict<type> &d ) : QGDict(d) {}
~QDict() { clear(); }
QDict<type> &operator=(const QDict<type> &d)
{ return (QDict<type>&)QGDict::operator=(d); }
uint count() const { return QGDict::count(); }
uint size() const { return QGDict::size(); }
bool isEmpty() const { return QGDict::count() == 0; }
void insert( const QString &k, const type *d )
{ QGDict::look_string(k,(Item)d,1); }
void replace( const QString &k, const type *d )
{ QGDict::look_string(k,(Item)d,2); }
bool remove( const QString &k ) { return QGDict::remove_string(k); }
type *take( const QString &k ) { return (type *)QGDict::take_string(k); }
type *find( const QString &k ) const
{ return (type *)((QGDict*)this)->QGDict::look_string(k,0,0); }
type *operator[]( const QString &k ) const
{ return (type *)((QGDict*)this)->QGDict::look_string(k,0,0); }
void clear() { QGDict::clear(); }
void resize( uint n ) { QGDict::resize(n); }
void statistics() const { QGDict::statistics(); }
private:
void deleteItem( Item d );
};
template<> inline void QDict<void>::deleteItem( Item )
{
}
template<class type> inline void QDict<type>::deleteItem( QCollection::Item d )
{
if ( del_item ) delete (type *)d;
}
template<class type> class QDictIterator : public QGDictIterator
{
public:
QDictIterator(const QDict<type> &d) :QGDictIterator((QGDict &)d) {}
~QDictIterator() {}
uint count() const { return dict->count(); }
bool isEmpty() const { return dict->count() == 0; }
type *toFirst() { return (type *)QGDictIterator::toFirst(); }
operator type *() const { return (type *)QGDictIterator::get(); }
type *current() const { return (type *)QGDictIterator::get(); }
QString currentKey() const{ return QGDictIterator::getKeyString(); }
type *operator()() { return (type *)QGDictIterator::operator()(); }
type *operator++() { return (type *)QGDictIterator::operator++(); }
type *operator+=(uint j) { return (type *)QGDictIterator::operator+=(j);}
};
# 23 "groupdef.h" 2
# 1 "definition.h" 1
class FileDef;
class OutputList;
class SectionDict;
class MemberList;
class MemberDict;
class MemberDef;
class Definition
{
public:
enum DefType
{
TypeClass, TypeMember, TypeFile, TypeGroup, TypeNamespace, TypePackage
};
virtual DefType definitionType() = 0;
Definition(
const char *defFileName,int defLine,
const char *name,const char *b=0,const char *d=0);
virtual ~Definition();
const QCString& name() const { return n; }
virtual QCString getOutputFileBase() const = 0;
const QCString sourceName() const { return getOutputFileBase()+"-source"; }
const QCString& documentation() const { return doc; }
const QCString& briefDescription() const { return brief; }
void setName(const char *name) { n=name; }
void setDocumentation(const char *d,bool stripWhiteSpace=TRUE)
{
if (stripWhiteSpace)
doc=((QCString)d).stripWhiteSpace();
else
doc=d;
}
void setBriefDescription(const char *b);
virtual bool hasDocumentation();
virtual bool isLinkableInProject() = 0;
virtual bool isLinkable() = 0;
bool isReference() const { return !ref.isEmpty(); }
void setReference(const char *r) { ref=r; }
QCString getReference() const { return ref; }
QCString nameToFile(const char *name,bool allowDot=FALSE);
void addSectionsToDefinition(QList<QCString> *anchorList);
void writeDocAnchorsToTagFile();
void setBodySegment(int bls,int ble)
{
startBodyLine=bls;
endBodyLine=ble;
}
void setBodyDef(FileDef *fd) { bodyDef=fd; }
int getStartBodyLine() const { return startBodyLine; }
int getEndBodyLine() const { return endBodyLine; }
FileDef *getBodyDef() { return bodyDef; }
void writeSourceDef(OutputList &ol,const char *scopeName);
void writeInlineCode(OutputList &ol,const char *scopeName);
void writeSourceRefs(OutputList &ol,const char *scopeName);
void addSourceReference(MemberDef *d);
void setRefItems(int todoId,int testId,int bugId)
{
if (todoId!=0) m_todoId=todoId;
if (testId!=0) m_testId=testId;
if (bugId!=0) m_bugId=bugId;
}
int todoId() const { return m_todoId; }
int testId() const { return m_testId; }
int bugId() const { return m_bugId; }
QCString getDefFileName() const { return defFileName; }
int getDefLine() const { return defLine; }
protected:
int startBodyLine;
int endBodyLine;
FileDef *bodyDef;
QCString defFileName;
int defLine;
private:
QCString n;
QCString brief;
QCString doc;
QCString ref;
SectionDict *sectionDict;
MemberList *sourceRefList;
MemberDict *sourceRefDict;
int m_testId;
int m_todoId;
int m_bugId;
};
class DefinitionList : public QList<Definition>
{
public:
~DefinitionList() {}
int compareItems(QCollection::Item item1,QCollection::Item item2)
{
return qstricmp (((Definition *)item1)->name(),
((Definition *)item2)->name()
);
}
};
class DefinitionListIterator : public QListIterator<Definition>
{
public:
DefinitionListIterator(const DefinitionList &l) :
QListIterator<Definition>(l) {}
~DefinitionListIterator() {}
};
# 24 "groupdef.h" 2
# 1 "memberlist.h" 1
# 1 "memberdef.h" 1
# 1 "entry.h" 1
enum Protection { Public, Protected, Private } ;
enum Specifier { Normal, Virtual, Pure } ;
enum MethodTypes { Method, Signal, Slot, DCOP, Property };
struct BaseInfo
{
BaseInfo(const char *n,Protection p,Specifier v) : name(n),prot(p),virt(v) {}
QCString name;
Protection prot;
Specifier virt;
};
struct Argument
{
Argument() {}
Argument(const Argument &a)
{
attrib=a.attrib.copy();
type=a.type.copy();
name=a.name.copy();
defval=a.defval.copy();
docs=a.docs.copy();
array=a.array.copy();
}
Argument &operator=(const Argument &a)
{
if (this!=&a)
{
attrib=a.attrib.copy();
type=a.type.copy();
name=a.name.copy();
defval=a.defval.copy();
docs=a.docs.copy();
array=a.array.copy();
}
return *this;
}
bool hasDocumentation() const
{
return !name.isEmpty() && !docs.isEmpty();
}
QCString attrib;
QCString type;
QCString name;
QCString array;
QCString defval;
QCString docs;
};
class ArgumentList : public QList<Argument>
{
public:
ArgumentList() : QList<Argument>(),
constSpecifier(FALSE),
volatileSpecifier(FALSE),
pureSpecifier(FALSE) {}
~ArgumentList() {}
bool hasDocumentation() const;
bool constSpecifier;
bool volatileSpecifier;
bool pureSpecifier;
};
typedef QListIterator<Argument> ArgumentListIterator;
struct TagInfo
{
QCString tagName;
QCString fileName;
QCString anchor;
};
class Entry
{
public:
enum Sections {
CLASS_SEC = 0x00000001,
STRUCT_SEC = 0x00000002,
UNION_SEC = 0x00000004,
EXCEPTION_SEC = 0x00000008,
NAMESPACE_SEC = 0x00000010,
INTERFACE_SEC = 0x00000020,
COMPOUND_MASK = CLASS_SEC | STRUCT_SEC | UNION_SEC |
INTERFACE_SEC | EXCEPTION_SEC,
SCOPE_MASK = COMPOUND_MASK | NAMESPACE_SEC,
CLASSDOC_SEC = 0x00000100,
STRUCTDOC_SEC = 0x00000200,
UNIONDOC_SEC = 0x00000400,
EXCEPTIONDOC_SEC = 0x00000800,
NAMESPACEDOC_SEC = 0x00001000,
INTERFACEDOC_SEC = 0x00002000,
COMPOUNDDOC_MASK = CLASSDOC_SEC | STRUCTDOC_SEC | UNIONDOC_SEC |
INTERFACEDOC_SEC | EXCEPTIONDOC_SEC,
SOURCE_SEC = 0x00010000,
HEADER_SEC = 0x00020000,
FILE_MASK = SOURCE_SEC | HEADER_SEC,
ENUMDOC_SEC = 0x00100000,
ENUM_SEC = 0x00200000,
EMPTY_SEC = 0x00300000,
PAGEDOC_SEC = 0x00400000,
VARIABLE_SEC = 0x00500000,
FUNCTION_SEC = 0x00600000,
TYPEDEF_SEC = 0x00700000,
MEMBERDOC_SEC = 0x00800000,
OVERLOADDOC_SEC = 0x00900000,
EXAMPLE_SEC = 0x00a00000,
VARIABLEDOC_SEC = 0x00b00000,
FILEDOC_SEC = 0x00c00000,
DEFINEDOC_SEC = 0x00d00000,
INCLUDE_SEC = 0x00e00000,
DEFINE_SEC = 0x00f00000,
GROUPDOC_SEC = 0x01000000,
USINGDIR_SEC = 0x01100000,
MAINPAGEDOC_SEC = 0x01200000,
MEMBERGRP_SEC = 0x01300000,
USINGDECL_SEC = 0x01400000,
PACKAGE_SEC = 0x01500000
};
enum MemberSpecifier
{
Inline = 0x1,
Explicit = 0x2,
Mutable = 0x4
};
Entry();
Entry(const Entry &);
~Entry();
int getSize();
void addSubEntry (Entry* e) ;
void reset();
int section;
Protection protection;
MethodTypes mtype;
bool stat;
bool explicitExternal;
bool proto;
int memSpec;
int initLines;
bool subGrouping;
Specifier virt;
Entry *parent;
QCString type;
QCString name;
QCString args;
QCString bitfields;
ArgumentList *argList;
ArgumentList *tArgList;
ArgumentList *mtArgList;
QCString scopeSpec;
QCString memberSpec;
QCString program;
QCString initializer;
QCString includeFile;
QCString includeName;
QCString doc;
QCString relates;
QCString brief;
QCString inside;
QCString exception;
int bodyLine;
int endBodyLine;
int mGrpId;
QList<Entry> *sublist;
QList<BaseInfo> *extends;
QList<QCString> *groups;
QList<QCString> *anchors;
QCString fileName;
int startLine;
int todoId;
int testId;
int bugId;
TagInfo *tagInfo;
static int num;
private:
Entry &operator=(const Entry &);
} ;
typedef QList<Entry> EntryList;
typedef QListIterator<Entry> EntryListIterator;
# 25 "memberdef.h" 2
class ClassDef;
class NamespaceDef;
class GroupDef;
class FileDef;
class MemberList;
class MemberGroup;
class ExampleList;
class ExampleDict;
class OutputList;
class GroupDef;
class QTextStream;
struct SourceReference
{
FileDef *fd;
QCString anchor;
};
class MemberDef : public Definition
{
public:
enum MemberType {
Define,
Function,
Variable,
Typedef,
Enumeration,
EnumValue,
Prototype,
Signal,
Slot,
Friend,
DCOP,
Property
};
MemberDef(const char *defFileName,int defLine,
const char *type,const char *name,const char *args,
const char *excp,Protection prot,Specifier virt,bool stat,
bool related,MemberType t,const ArgumentList *tal,
const ArgumentList *al);
~MemberDef();
DefType definitionType() { return TypeMember; }
QCString getOutputFileBase() const;
const char *declaration() const { return decl; }
const char *definition() const { return def; }
const char *typeString() const { return type; }
const char *argsString() const { return args; }
const char *excpString() const { return exception; }
const char *bitfieldString() const { return bitfields; }
QCString anchor() const;
const QCString &initializer() const { return init; }
int initializerLines() const { return initLines; }
int getMemberSpecifiers() const { return memSpec; }
MemberList *getSectionList() const { return section; }
ClassDef *getClassDef() const { return classDef; }
GroupDef *getGroupDef() const { return group; }
FileDef *getFileDef() const { return fileDef; }
NamespaceDef* getNamespaceDef() const { return nspace; }
Protection protection() const { return prot; }
Specifier virtualness() const { return virt; }
MemberType memberType() const { return mtype; }
bool isSignal() const { return mtype==Signal; }
bool isSlot() const { return mtype==Slot; }
bool isVariable() const { return mtype==Variable; }
bool isEnumerate() const { return mtype==Enumeration; }
bool isEnumValue() const { return mtype==EnumValue; }
bool isTypedef() const { return mtype==Typedef; }
bool isFunction() const { return mtype==Function; }
bool isDefine() const { return mtype==Define; }
bool isFriend() const { return mtype==Friend; }
bool isDCOP() const { return mtype==DCOP; }
bool isProperty() const { return mtype==Property; }
bool isRelated() const { return related; }
bool isStatic() const { return stat; }
bool isInline() const { return (memSpec&Entry::Inline)!=0; }
bool isExplicit() const { return (memSpec&Entry::Explicit)!=0; }
bool isMutable() const { return (memSpec&Entry::Mutable)!=0; }
bool isExternal() const { return explExt; }
bool isLinkableInProject();
bool isLinkable();
bool detailsAreVisible() const;
bool hasDocumentation();
void setMemberType(MemberType t) { mtype=t; }
void setDefinition(const char *d) { def=d; }
void setFileDef(FileDef *fd) { fileDef=fd; }
void setAnchor(const char *a) { anc=a; }
void setProtection(Protection p) { prot=p; }
void setMemberSpecifiers(int s) { memSpec=s; }
void mergeMemberSpecifiers(int s) { memSpec|=s; }
void setInitializer(const char *i) { init=i;
initLines=init.contains('\n');
}
void setBitfields(const char *s) { bitfields = s; }
void setMaxInitLines(int lines) { userInitLines=lines; }
void setMemberClass(ClassDef *cd) { classDef=cd; }
void setSectionList(MemberList *sl) { section=sl; }
void setGroupDef(GroupDef *gd) { group=gd; }
void setExplicitExternal(bool b) { explExt=b; }
void makeRelated() { related=TRUE; }
void writeLink(OutputList &ol,
ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd);
void writeDeclaration(OutputList &ol,
ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd,
bool inGroup);
void writeDocumentation(MemberList *ml,OutputList &ol,
const char *scopeName,Definition *container);
void warnIfUndocumented();
void setReimplements(MemberDef *md) { redefines=md; }
void insertReimplementedBy(MemberDef *md);
MemberDef *reimplements() const { return redefines; }
MemberList *reimplementedBy() const { return redefinedBy; }
void insertEnumField(MemberDef *md);
void setEnumScope(MemberDef *md) { enumScope=md; }
MemberDef *getEnumScope() const { return enumScope; }
void setEnumDecl(OutputList &ed);
void setEnumUsed() { eUsed=TRUE; }
bool enumUsed() const { return eUsed; }
OutputList *enumDecl() const { return enumDeclList; }
MemberList *enumFieldList() const { return enumFields; }
void setDocumentedEnumValues(bool value) { docEnumValues=value; }
bool hasDocumentedEnumValues() const { return docEnumValues; }
void setAnonymousEnumType(MemberDef *md) { annEnumType = md; }
MemberDef *getAnonymousEnumType() const { return annEnumType; }
bool addExample(const char *anchor,const char *name,const char *file);
bool hasExamples();
ExampleList *getExampleList() const { return exampleList; }
void setPrototype(bool p) { proto=p; }
bool isPrototype() const { return proto; }
ArgumentList *argumentList() const { return argList; }
void setArgumentList(ArgumentList *al)
{ if (argList) delete argList;
argList = al;
}
ArgumentList *templateArguments() const { return tArgList; }
void setScopeDefTemplateArguments(ArgumentList *t);
ArgumentList *scopeDefTemplateArguments() const { return scopeTAL; }
void setMemberDefTemplateArguments(ArgumentList *t);
ArgumentList *memberDefTemplateArguments() const { return membTAL; }
void setNamespace(NamespaceDef *nd) { nspace=nd; }
void setMemberGroup(MemberGroup *grp);
MemberGroup *getMemberGroup() const { return memberGroup; }
void setMemberGroupId(int id) { grpId=id; }
int getMemberGroupId() const { return grpId; }
void setFromAnnonymousScope(bool b) { annScope=b; }
void setFromAnnonymousMember(MemberDef *m) { annMemb=m; }
bool fromAnnonymousScope() const { return annScope; }
bool annonymousDeclShown() const { return annUsed; }
void setIndentDepth( int i) { indDepth=i; }
int indentDepth() { return indDepth; }
bool visibleMemberGroup(bool hideNoHeader);
QCString getScopeString() const;
private:
ClassDef *classDef;
FileDef *fileDef;
MemberDef *redefines;
MemberDef *enumScope;
MemberDef *annEnumType;
MemberList *redefinedBy;
MemberDef *memDef;
MemberDef *memDec;
ExampleList *exampleList;
ExampleDict *exampleDict;
MemberList *enumFields;
OutputList *enumDeclList;
NamespaceDef *nspace;
QCString type;
QCString args;
QCString bitfields;
QCString exception;
QCString init;
int initLines;
QCString decl;
QCString declFile;
int declLine;
QCString def;
QCString anc;
Specifier virt;
Protection prot;
bool related;
bool stat;
int memSpec;
MemberType mtype;
bool eUsed;
bool proto;
bool docEnumValues;
bool annScope;
bool annUsed;
bool annShown;
int indDepth;
int maxInitLines;
int userInitLines;
MemberList *section;
MemberDef *annMemb;
ArgumentList *argList;
ArgumentList *tArgList;
ArgumentList *scopeTAL;
ArgumentList *membTAL;
int grpId;
MemberGroup *memberGroup;
GroupDef *group;
bool explExt;
MemberDef(const MemberDef &);
MemberDef &operator=(const MemberDef &);
};
# 22 "memberlist.h" 2
class GroupDef;
class MemberGroup;
class MemberGroupList;
class MemberList : public QList<MemberDef>
{
public:
MemberList();
~MemberList();
bool insert(uint index,const MemberDef *md);
void inSort(const MemberDef *md);
void append(const MemberDef *md);
int compareItems(QCollection::Item item1,QCollection::Item item2);
int varCount() const { return varCnt; }
int funcCount() const { return funcCnt; }
int enumCount() const { return enumCnt; }
int enumValueCount() const { return enumValCnt; }
int typedefCount() const { return typeCnt; }
int protoCount() const { return protoCnt; }
int defineCount() const { return defCnt; }
int friendCount() const { return friendCnt; }
void countDecMembers(bool inGroup,bool countSubGroups,bool sectionPerType);
void countDocMembers(bool listOfGroup=FALSE);
int totalCount() const
{ return
m_count;
}
void writePlainDeclarations(OutputList &ol,
ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd,
bool inGroup=FALSE,bool countSubGroups=TRUE);
void writeDeclarations(OutputList &ol,
ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd,
const char *title,const char *subtitle,
bool inGroup=FALSE,bool countSubGroups=TRUE);
void writeDocumentation(OutputList &ol,const char *scopeName,
Definition *container);
void addMemberGroup(MemberGroup *mg);
private:
int varCnt,funcCnt,enumCnt,enumValCnt,typeCnt,protoCnt,defCnt,friendCnt;
int m_count;
MemberGroupList *memberGroupList;
};
class MemberListIterator : public QListIterator<MemberDef>
{
public:
MemberListIterator(const QList<MemberDef> &list);
};
class MemberDict : public QDict<MemberDef>
{
public:
MemberDict(int size) : QDict<MemberDef>(size) {}
~MemberDict() {}
};
# 25 "groupdef.h" 2
# 1 "htmlhelp.h" 1
class QFile;
class HtmlHelpIndex;
class HtmlHelp
{
enum ImageNumber {
BOOK_CLOSED=1, BOOK_OPEN,
BOOK_CLOSED_NEW, BOOK_OPEN_NEW,
FOLDER_CLOSED, FOLDER_OPEN,
FOLDER_CLOSED_NEW,FOLDER_OPEN_NEW,
QUERY, QUERY_NEW,
TEXT, TEXT_NEW,
WEB_DOC, WEB_DOC_NEW,
WEB_LINK, WEB_LINK_NEW,
INFO, INFO_NEW,
LINK, LINK_NEW,
BOOKLET, BOOKLET_NEW,
EMAIL, EMAIL_NEW,
EMAIL2, EMAIL2_NEW,
IMAGE, IMAGE_NEW,
AUDIO, AUDIO_NEW,
MUSIC, MUSIC_NEW,
VIDEO, VIDEO_NEW,
INDEX, INDEX_NEW,
IDEA, IDEA_NEW,
NOTE, NOTE_NEW,
TOOL, TOOL_NEW
};
public:
static HtmlHelp *getInstance();
void initialize();
void finalize();
int incContentsDepth();
int decContentsDepth();
int contentsDepth() { return dc; }
void addContentsItem(bool isDir,
const char *name,
const char *ref = 0,
const char *anchor = 0);
void addIndexItem(const char *level1, const char *level2,
const char *ref, const char *anchor);
void addIndexFile(const char *name);
private:
void createProjectFile();
HtmlHelp();
QFile *cf,*kf;
QTextStream cts,kts;
HtmlHelpIndex *index;
int dc;
QStrList indexFiles;
static HtmlHelp *theInstance;
};
# 27 "groupdef.h" 2
class FileList;
class ClassList;
class FileDef;
class ClassDef;
class NamespaceDef;
class GroupList;
class OutputList;
class NamespaceList;
class MemberGroupList;
class MemberGroupDict;
class MemberNameInfoDict;
class PageSDict;
class PageInfo;
class GroupDef : public Definition
{
public:
GroupDef(const char *fileName,int line,const char *name,const char *title);
~GroupDef();
DefType definitionType() { return TypeGroup; }
QCString getOutputFileBase() const { return fileName; }
const char *groupTitle() const { return title; }
void addFile(const FileDef *def);
void addClass(const ClassDef *def);
void addNamespace(const NamespaceDef *def);
void addGroup(const GroupDef *def);
void addPage(PageInfo *def);
void addExample(const PageInfo *def);
void insertMember(MemberDef *def);
void writeDocumentation(OutputList &ol);
int countMembers() const;
bool isLinkableInProject()
{
return hasDocumentation() && !isReference();
}
bool isLinkable()
{
return isLinkableInProject() || isReference();
}
void computeAnchors();
void addMembersToMemberGroup();
void distributeMemberGroupDocumentation();
bool visited;
friend void writeGroupTreeNode(OutputList&, GroupDef*);
protected:
void addMemberListToGroup(MemberList *,bool (MemberDef::*)() const);
private:
QCString title;
QCString fileName;
FileList *fileList;
ClassList *classList;
NamespaceList *namespaceList;
GroupList *groupList;
PageSDict *pageDict;
PageSDict *exampleDict;
MemberList *allMemberList;
MemberNameInfoDict *allMemberNameInfoDict;
MemberList defineMembers;
MemberList protoMembers;
MemberList typedefMembers;
MemberList enumMembers;
MemberList enumValMembers;
MemberList funcMembers;
MemberList varMembers;
MemberGroupList *memberGroupList;
MemberGroupDict *memberGroupDict;
};
class GroupList : public QList<GroupDef>
{
};
class GroupListIterator : public QListIterator<GroupDef>
{
public:
GroupListIterator(const GroupList &l) : QListIterator<GroupDef>(l) {}
};
void addClassToGroups(Entry *root,ClassDef *cd);
void addNamespaceToGroups(Entry *root,NamespaceDef *nd);
void addGroupToGroups(Entry *root,GroupDef *subGroup);
void addMemberToGroups(Entry *root,MemberDef *md);
void addPageToGroups(Entry *root,PageInfo *pi);
void addExampleToGroups(Entry *root,PageInfo *eg)