egcs downloaded from cvs died compiling qt-2.0.2

Luke McKee luke.mckee@utilux.com
Wed Apr 26 21:19:00 GMT 2000


Hey egcs team!

egcs downloaded from cvs died compiling qt-2.0.2

Hope these detail help.

This is from a version of egcs downloaded last week over cvs. It
compiles the linux kernel fine but with c++ it is a different story.

Luke McKee
Utilux ISD

g++ -v --save-temps -c -I/usr/lib/qt/include -Wno-unused
-Wno-parentheses -pipe -O2 -DQT_NO_CODECS -I../../include -I. -o
qdatetime.o ../tools/qdatetime.cpp
g++: Warning: -pipe ignored since -save-temps specified
Reading specs from /usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/specs
gcc version 2.96 20000412 (experimental)
 /usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/cpp -lang-c++ -v
-I/usr/lib/qt/include -I../../include -I. -D__GNUC__=2 -D__GNUG__=2
-D__GNUC_MINOR__=96 -D__GNUC_PATCHLEVEL__=0 -D__cplusplus -D__ELF__
-Dunix -Dlinux -D__ELF__ -D__unix__ -D__linux__ -D__unix -D__linux
-Asystem(posix) -D__EXCEPTIONS -D__OPTIMIZE__ -Wno-unused
-Wno-parentheses -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__
-D__tune_pentium__ -DQT_NO_CODECS ../tools/qdatetime.cpp qdatetime.ii
GNU CPP version 2.96 20000412 (experimental) (cpplib)
 (i386 Linux/ELF)
ignoring nonexistent directory `/usr/lib/qt/include'
#include "..." search starts here:
#include <...> search starts here:
 ../../include
 .
 /usr/include/g++-3
 /usr/local/include
 /usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include
 /usr/i586-pc-linux-gnu/include
 /usr/include
End of search list.
 /usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/cc1plus qdatetime.ii -quiet
-dumpbase qdatetime.cc -O2 -Wno-unused -Wno-parentheses -version -o
qdatetime.s
GNU C++ version 2.96 20000412 (experimental) (i586-pc-linux-gnu)
compiled by GNU C version 2.96 20000412 (experimental).
../tools/qdatetime.cpp: In method `QString QDate::toString () const':
../tools/qdatetime.cpp:256: Internal compiler error in `expand_call',
../tools/qdatetime.cpp:256: at calls.c:2806
../tools/qdatetime.cpp:256: Please submit a full bug report.
../tools/qdatetime.cpp:256: See
../tools/qdatetime.cpp:256:
<URL: http://www.gnu.org/software/gcc/bugs.html >
../tools/qdatetime.cpp:256: for instructions.
make: *** [qdatetime.o] Error 1
# 1 "../tools/qdatetime.cpp"
 
# 25 "../tools/qdatetime.cpp"


# 1 "../tools/qdatetime.h" 1
 
# 25 "../tools/qdatetime.h"





# 1 "../tools/qstring.h" 1
 
# 26 "../tools/qstring.h"





# 1 "../tools/qcstring.h" 1
 
# 26 "../tools/qcstring.h"





# 1 "../tools/qarray.h" 1
 
# 25 "../tools/qarray.h"





# 1 "../tools/qgarray.h" 1
 
# 25 "../tools/qgarray.h"





# 1 "../tools/qshared.h" 1
 
# 25 "../tools/qshared.h"





# 1 "../tools/qglobal.h" 1
 
# 25 "../tools/qglobal.h"









 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 


# 86 "../tools/qglobal.h"


# 120 "../tools/qglobal.h"









 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 


 

# 164 "../tools/qglobal.h"


# 201 "../tools/qglobal.h"





 


# 220 "../tools/qglobal.h"








 
 
 
 
 
 



 
 
 


# 258 "../tools/qglobal.h"









 
 
 






# 284 "../tools/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;		 


 
 
 

class QDataStream;


 
 
 

  const char *qVersion();
  bool qSysInfo( int *wordSize, bool *bigEndian );


 
 
 












 
 
 
 
 






# 416 "../tools/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 );







# 30 "../tools/qshared.h" 2




struct QShared
{
    QShared()		{ count = 1; }
    void ref()		{ count++; }
    bool deref()	{ return !--count; }
    uint count;
};



# 30 "../tools/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;

    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];
}



# 30 "../tools/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); }
    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)); }
    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(); }
};



# 31 "../tools/qcstring.h" 2



# 1 "/usr/include/string.h" 1 3
 
# 18 "/usr/include/string.h" 3

 






# 1 "/usr/include/features.h" 1 3
 
# 18 "/usr/include/features.h" 3




 
# 79 "/usr/include/features.h" 3


 



















 





 



 







 

# 138 "/usr/include/features.h" 3

 









 





 




























# 196 "/usr/include/features.h" 3

































 



 








 




 

# 1 "/usr/include/sys/cdefs.h" 1 3
 
# 18 "/usr/include/sys/cdefs.h" 3




 




 





 








 





# 72 "/usr/include/sys/cdefs.h" 3

 







 




# 104 "/usr/include/sys/cdefs.h" 3


 








 
# 124 "/usr/include/sys/cdefs.h" 3







 








 








 









 







# 249 "/usr/include/features.h" 2 3


 








 





 

 








# 1 "/usr/include/gnu/stubs.h" 1 3
 






































# 277 "/usr/include/features.h" 2 3




# 26 "/usr/include/string.h" 2 3


extern "C" {

 


# 1 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 1 3
 
# 19 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 3

 






 








 



# 49 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 3


 


 





 



# 91 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 3

 





 


















 





 

 


# 161 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 3

 

 


































typedef unsigned int size_t;






















 




 


# 304 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 3


# 316 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 3

 

 

# 349 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 3



 





















# 33 "/usr/include/string.h" 2 3



 
extern void * memcpy (void * __restrict __dest,
			    __const void * __restrict __src, size_t __n) throw ();
 

extern void * memmove (void * __dest, __const void * __src,
			     size_t __n) throw ();

 



extern void * memccpy (void * __dest, __const void * __src,
			     int __c, size_t __n) throw ();



 
extern void * memset (void * __s, int __c, size_t __n) throw ();

 
extern int memcmp (__const void * __s1, __const void * __s2,
			size_t __n) throw ();

 
extern void * memchr (__const void * __s, int __c, size_t __n) throw ();








 
extern char *strcpy (char *__restrict __dest,
			  __const char *__restrict __src) throw ();
 
extern char *strncpy (char *__restrict __dest,
			   __const char *__restrict __src, size_t __n) throw ();

 
extern char *strcat (char *__restrict __dest,
			  __const char *__restrict __src) throw ();
 
extern char *strncat (char *__restrict __dest,
			   __const char *__restrict __src, size_t __n) throw ();

 
extern int strcmp (__const char *__s1, __const char *__s2) throw ();
 
extern int strncmp (__const char *__s1, __const char *__s2, size_t __n) throw ();

 
extern int strcoll (__const char *__s1, __const char *__s2) throw ();
 
extern size_t strxfrm (char *__restrict __dest,
			    __const char *__restrict __src, size_t __n) throw ();


# 108 "/usr/include/string.h" 3


 
extern char *__strdup (__const char *__s) throw ();
extern char *strdup (__const char *__s) throw ();


 







# 144 "/usr/include/string.h" 3

 
extern char *strchr (__const char *__s, int __c) throw ();
 
extern char *strrchr (__const char *__s, int __c) throw ();







 

extern size_t strcspn (__const char *__s, __const char *__reject) throw ();
 

extern size_t strspn (__const char *__s, __const char *__accept) throw ();
 
extern char *strpbrk (__const char *__s, __const char *__accept) throw ();
 
extern char *strstr (__const char *__haystack, __const char *__needle) throw ();









 
extern char *strtok (char *__restrict __s,
			  __const char *__restrict __delim) throw ();

 

extern char *__strtok_r (char *__restrict __s,

			      __const char *__restrict __delim,
# 183 "/usr/include/string.h" 3
			      char **__restrict __save_ptr) throw ();

extern char *strtok_r (char *__restrict __s,

			    __const char *__restrict __delim,
# 187 "/usr/include/string.h" 3
			    char **__restrict __save_ptr) throw ();



# 204 "/usr/include/string.h" 3


 
extern size_t strlen (__const char *__s) throw ();








 
extern char *strerror (int __errnum) throw ();

 

extern char *__strerror_r (int __errnum, char *__buf, size_t __buflen) throw ();
extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) throw ();


 

extern void __bzero (void * __s, size_t __n) throw ();


 
extern void bcopy (__const void * __src, void * __dest, size_t __n) throw ();

 
extern void bzero (void * __s, size_t __n) throw ();

 
extern int bcmp (__const void * __s1, __const void * __s2, size_t __n) throw ();

 
extern char *index (__const char *__s, int __c) throw ();

 
extern char *rindex (__const char *__s, int __c) throw ();

 

extern int __ffs (int __i) throw () __attribute__ ((const));
extern int ffs (int __i) throw () __attribute__ ((const));

 









 
extern int __strcasecmp (__const char *__s1, __const char *__s2) throw ();
extern int strcasecmp (__const char *__s1, __const char *__s2) throw ();

 
extern int strncasecmp (__const char *__s1, __const char *__s2,
			     size_t __n) throw ();



# 278 "/usr/include/string.h" 3


 

extern char *strsep (char **__restrict __stringp,
			  __const char *__restrict __delim) throw ();



# 320 "/usr/include/string.h" 3




# 348 "/usr/include/string.h" 3


}


# 34 "../tools/qcstring.h" 2







 




# 57 "../tools/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;
}


# 31 "../tools/qstring.h" 2




 



class QRegExp;
class QString;
class QCharRef;

class   QChar {
public:
     

    QChar() : rw(0), cl(0) { }
    QChar( char c ) : rw(0), cl(c) { }
    QChar( uchar c ) : rw(0), cl(c) { }
    QChar( uchar c, uchar r ) : rw(r), cl(c) { }
    QChar( const QChar& c ) : rw(c.rw), cl(c.cl) { }
    QChar( ushort rc ) : rw((rc>>8)&0xff), cl(rc&0xff) { }
    QChar( short rc ) : rw((rc>>8)&0xff), cl(rc&0xff) { }
    QChar( uint rc ) : rw((rc>>8)&0xff), cl(rc&0xff) { }
    QChar( int rc ) : rw((rc>>8)&0xff), cl(rc&0xff) { }

# 67 "../tools/qstring.h"

    static const QChar null;             
    static const QChar replacement;      
    static const QChar byteOrderMark;      
    static const QChar byteOrderSwapped;      

     

    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
    };

    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, Unknown
    };

     

    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 isDigit() const;

    int digitValue() const;
    QChar lower() const;
    QChar upper() const;

    Category category() const;
    Direction direction() const;
    Joining joining() const;
    bool mirrored() 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(); }


    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; }

private:

     
    uchar rw;
    uchar cl;
    enum { net_ordered = 1 };






};

inline int operator==( char ch, QChar c )
{
    return ch == c.cell() && !c.row();
}

inline int operator==( QChar c, char ch )
{
    return ch == c.cell() && !c.row();
}

inline int operator==( QChar c1, QChar c2 )
{
    return c1.cell() == c2.cell()
	&& c1.row() == c2.row();
}

inline int operator!=( QChar c1, QChar c2 )
{
    return c1.cell() != c2.cell()
	|| c1.row() != c2.row();
}

inline int operator!=( char ch, QChar c )
{
    return ch != c.cell() || c.row();
}

inline int operator!=( QChar c, char ch )
{
    return ch != c.cell() || c.row();
}

inline int operator<=( QChar c, char ch )
{
    return !(ch < c.cell() || c.row());
}

inline int operator<=( char ch, QChar c )
{
    return ch <= c.cell() || c.row();
}

inline int operator<=( QChar c1, QChar c2 )
{
    return c1.row() > c2.row()
	? FALSE
	: c1.row() < c2.row()
	    ? TRUE
	    : c1.cell() <= c2.cell();
}

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 );			 

    inline ~QString();

    QString    &operator=( const QString & );	 

    QString    &operator=( const char * );	 

    QString    &operator=( const QCString& );	 
    QString    &operator=( QChar c ) { return *this = QString(c); }
    QString    &operator=( char c ) { return *this = QString(QChar(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
		    { return find(QChar(c), index, cs); }
    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
		    { return find(QString::fromLatin1(str), index); }

    int		findRev( QChar c, int index=-1, bool cs=TRUE) const;
    int		findRev( char c, int index=-1, bool cs=TRUE) const
		    { return findRev( QChar(c), index, cs ); }
    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
		    { return findRev(QString::fromLatin1(str), index); }

    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( const QString & );
    QString    &prepend( char );
    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(); }


    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(); }


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:
     

     
    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); }

     
    ushort unicode() const { return s.constref(p).unicode(); }
    char latin1() const { return s.constref(p).latin1(); }

    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 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(); }
    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() )
	d->deleteSelf();
}


 
 

 
 

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( char c )
{ return insert(0,c); }

inline QString &QString::append( const QString & s )
{ return operator+=(s); }

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); }



 



  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;
}










# 30 "../tools/qdatetime.h" 2




 



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 *monthNames[];
    static const char *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 & );



# 27 "../tools/qdatetime.cpp" 2

# 1 "../tools/qdatastream.h" 1
 
# 25 "../tools/qdatastream.h"





# 1 "../tools/qiodevice.h" 1
 
# 25 "../tools/qiodevice.h"










 






 




 









 





 












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 & );

};



# 30 "../tools/qdatastream.h" 2





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>>( 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<<( 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_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; }



# 28 "../tools/qdatetime.cpp" 2

# 1 "/usr/include/stdio.h" 1 3
 
# 18 "/usr/include/stdio.h" 3

 









extern "C" {



# 1 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 1 3
 
# 19 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 3

 






 








 



# 49 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 3


 


 





 



# 91 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 3

 





 


















 





 

 


# 161 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 3

 

 



# 218 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 3




 




 


# 304 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 3


# 316 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 3

 

 

# 349 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 3



 





















# 33 "/usr/include/stdio.h" 2 3





# 1 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stdarg.h" 1 3
 
# 19 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stdarg.h" 3

 






 











 



typedef __builtin_va_list __gnuc_va_list;


 


# 136 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stdarg.h" 3



# 38 "/usr/include/stdio.h" 2 3


# 1 "/usr/include/bits/types.h" 1 3
 
# 18 "/usr/include/bits/types.h" 3

 









# 1 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 1 3
 
# 19 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 3

 






 








 



# 49 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 3


 


 





 



# 91 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 3

 





 


















 





 

 


# 161 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 3

 

 



# 218 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 3




 




 


# 304 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 3


# 316 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 3

 

 

# 349 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 3



 





















# 29 "/usr/include/bits/types.h" 2 3


 
typedef unsigned char __u_char;
typedef unsigned short __u_short;
typedef unsigned int __u_int;
typedef unsigned long __u_long;

__extension__ typedef unsigned long long int __u_quad_t;
__extension__ typedef long long int __quad_t;

# 49 "/usr/include/bits/types.h" 3
typedef signed char __int8_t;
typedef unsigned char __uint8_t;
typedef signed short int __int16_t;
typedef unsigned short int __uint16_t;
typedef signed int __int32_t;
typedef unsigned int __uint32_t;

__extension__ typedef signed long long int __int64_t;
__extension__ typedef unsigned long long int __uint64_t;

typedef __quad_t *__qaddr_t;

typedef __u_quad_t __dev_t;		 
typedef __u_int __uid_t;		 
typedef __u_int __gid_t;		 
typedef __u_long __ino_t;		 
typedef __u_int __mode_t;		 
typedef __u_int __nlink_t; 		 
typedef long int __off_t;		 
typedef __quad_t __loff_t;		 
typedef int __pid_t;			 
typedef int __ssize_t;			 
typedef long int __rlim_t;		 
typedef __quad_t __rlim64_t;		 
typedef __u_int __id_t;			 

typedef struct
  {
    int __val[2];
  } __fsid_t;				 

 
typedef int __daddr_t;			 
typedef char *__caddr_t;
typedef long int __time_t;
typedef long int __swblk_t;		 

typedef long int __clock_t;

 
typedef unsigned long int __fd_mask;

 


 




 
typedef struct
  {
     





    __fd_mask __fds_bits[1024 / (8 * sizeof (__fd_mask))];


  } __fd_set;


typedef int __key_t;

 
typedef unsigned short int __ipc_pid_t;


 

 
typedef long int __blkcnt_t;
typedef __quad_t __blkcnt64_t;

 
typedef __u_long __fsblkcnt_t;
typedef __u_quad_t __fsblkcnt64_t;

 
typedef __u_long __fsfilcnt_t;
typedef __u_quad_t __fsfilcnt64_t;

 
typedef __u_long __ino64_t;

 
typedef __loff_t __off64_t;

 
typedef int __t_scalar_t;
typedef unsigned int __t_uscalar_t;

 
typedef int __intptr_t;


 





# 40 "/usr/include/stdio.h" 2 3







 
typedef struct _IO_FILE FILE;








# 1 "/usr/include/libio.h" 1 3
 
# 26 "/usr/include/libio.h" 3




# 1 "/usr/include/_G_config.h" 1 3
 





 






# 1 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 1 3
 
# 19 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 3

 






 








 



# 49 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 3


 


 





 



# 91 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 3

 





 


















 





 

 


# 161 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 3

 

 



# 218 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 3




 




 





























 
# 267 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 3



# 281 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 3































typedef unsigned int wint_t;




 

 

# 349 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 3



 





















# 14 "/usr/include/_G_config.h" 2 3





















typedef int _G_int16_t __attribute__ ((__mode__ (__HI__)));
typedef int _G_int32_t __attribute__ ((__mode__ (__SI__)));
typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__)));
typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__)));




 


















 




 














# 30 "/usr/include/libio.h" 2 3
















 

# 1 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stdarg.h" 1 3
 
# 19 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stdarg.h" 3

 






 











 






 


# 136 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stdarg.h" 3



# 48 "/usr/include/libio.h" 2 3








# 68 "/usr/include/libio.h" 3

 


















# 99 "/usr/include/libio.h" 3










 
























 



















struct _IO_jump_t;  struct _IO_FILE;

 







typedef void _IO_lock_t;



 

struct _IO_marker {
  struct _IO_marker *_next;
  struct _IO_FILE *_sbuf;
   

   
  int _pos;

# 187 "/usr/include/libio.h" 3
};

struct _IO_FILE {
  int _flags;		 


   
   
  char* _IO_read_ptr;	 
  char* _IO_read_end;	 
  char* _IO_read_base;	 
  char* _IO_write_base;	 
  char* _IO_write_ptr;	 
  char* _IO_write_end;	 
  char* _IO_buf_base;	 
  char* _IO_buf_end;	 
   
  char *_IO_save_base;  
  char *_IO_backup_base;   
  char *_IO_save_end;  

  struct _IO_marker *_markers;

  struct _IO_FILE *_chain;

  int _fileno;
  int _blksize;
  __off_t _old_offset;  


   
  unsigned short _cur_column;
  signed char _vtable_offset;
  char _shortbuf[1];

   

  _IO_lock_t *_lock;








  __off64_t _offset;
   
  int _unused2[16];

};





struct _IO_FILE_plus;
extern struct _IO_FILE_plus _IO_2_1_stdin_;
extern struct _IO_FILE_plus _IO_2_1_stdout_;
extern struct _IO_FILE_plus _IO_2_1_stderr_;











 

 

typedef __ssize_t __io_read_fn (void * __cookie, char *__buf,
				       size_t __nbytes);

 





typedef __ssize_t __io_write_fn (void * __cookie, __const char *__buf,
				      size_t __n);

 





typedef int __io_seek_fn (void * __cookie, __off_t __pos, int __w);

 
typedef int __io_close_fn (void * __cookie);



# 312 "/usr/include/libio.h" 3



extern "C" {


extern int __underflow (_IO_FILE *) throw ();
extern int __uflow (_IO_FILE *) throw ();
extern int __overflow (_IO_FILE *, int) throw ();
















extern int _IO_getc (_IO_FILE *__fp) throw ();
extern int _IO_putc (int __c, _IO_FILE *__fp) throw ();
extern int _IO_feof (_IO_FILE *__fp) throw ();
extern int _IO_ferror (_IO_FILE *__fp) throw ();

extern int _IO_peekc_locked (_IO_FILE *__fp) throw ();

 



extern void _IO_flockfile (_IO_FILE *) throw ();
extern void _IO_funlockfile (_IO_FILE *) throw ();
extern int _IO_ftrylockfile (_IO_FILE *) throw ();












extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict,
			     __gnuc_va_list, int *__restrict) throw ();
extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict,
			      __gnuc_va_list) throw ();
extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t) throw ();
extern size_t _IO_sgetn (_IO_FILE *, void *, size_t) throw ();

extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int) throw ();
extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int) throw ();

extern void _IO_free_backup_area (_IO_FILE *) throw ();


}



# 57 "/usr/include/stdio.h" 2 3


 

typedef __off_t fpos_t;







 





 





 






 







 




 
# 110 "/usr/include/stdio.h" 3
# 1 "/usr/include/bits/stdio_lim.h" 1 3
 
# 18 "/usr/include/bits/stdio_lim.h" 3




















# 110 "/usr/include/stdio.h" 2 3



 
extern FILE *stdin;		 
extern FILE *stdout;		 
extern FILE *stderr;		 


 
extern int remove (__const char *__filename) throw ();
 
extern int rename (__const char *__old, __const char *__new) throw ();


 

extern FILE *tmpfile (void) throw ();










 
extern char *tmpnam (char *__s) throw ();


 

extern char *tmpnam_r (char *__s) throw ();




 






extern char *tempnam (__const char *__dir, __const char *__pfx) throw ();



 
extern int fclose (FILE *__stream) throw ();
 
extern int fflush (FILE *__stream) throw ();


 
extern int fflush_unlocked (FILE *__stream) throw ();









 
extern FILE *fopen (__const char *__restrict __filename,
			 __const char *__restrict __modes) throw ();
 
extern FILE *freopen (__const char *__restrict __filename,

			   __const char *__restrict __modes,
# 183 "/usr/include/stdio.h" 3
			   FILE *__restrict __stream) throw ();

# 198 "/usr/include/stdio.h" 3









 
extern FILE *fdopen (int __fd, __const char *__modes) throw ();



# 224 "/usr/include/stdio.h" 3


 

extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) throw ();
 


extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,
			 int __modes, size_t __n) throw ();


 

extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf,
			    size_t __size) throw ();

 
extern void setlinebuf (FILE *__stream) throw ();



 
extern int fprintf (FILE *__restrict __stream,
			 __const char *__restrict __format, ...) throw ();
 
extern int printf (__const char *__restrict __format, ...) throw ();
 
extern int sprintf (char *__restrict __s,
			 __const char *__restrict __format, ...) throw ();

 
extern int vfprintf (FILE *__restrict __s,

			  __const char *__restrict __format,
# 258 "/usr/include/stdio.h" 3
			  __gnuc_va_list __arg) throw ();
 
extern int vprintf (__const char *__restrict __format,
			 __gnuc_va_list __arg) throw ();
 
extern int vsprintf (char *__restrict __s,

			  __const char *__restrict __format,
# 265 "/usr/include/stdio.h" 3
			  __gnuc_va_list __arg) throw ();


 
extern int snprintf (char *__restrict __s, size_t __maxlen,
			  __const char *__restrict __format, ...) throw ()
     __attribute__ ((__format__ (__printf__, 3, 4)));

extern int __vsnprintf (char *__restrict __s, size_t __maxlen,

			     __const char *__restrict __format,
# 275 "/usr/include/stdio.h" 3
			     __gnuc_va_list __arg) throw ()
     __attribute__ ((__format__ (__printf__, 3, 0)));
extern int vsnprintf (char *__restrict __s, size_t __maxlen,

			   __const char *__restrict __format,
# 279 "/usr/include/stdio.h" 3
			   __gnuc_va_list __arg) throw ()
     __attribute__ ((__format__ (__printf__, 3, 0)));



# 303 "/usr/include/stdio.h" 3


 
extern int fscanf (FILE *__restrict __stream,
			__const char *__restrict __format, ...) throw ();
 
extern int scanf (__const char *__restrict __format, ...) throw ();
 
extern int sscanf (__const char *__restrict __s,
			__const char *__restrict __format, ...) throw ();


# 331 "/usr/include/stdio.h" 3


 
extern int fgetc (FILE *__stream) throw ();
extern int getc (FILE *__stream) throw ();

 
extern int getchar (void) throw ();

 




 
extern int getc_unlocked (FILE *__stream) throw ();
extern int getchar_unlocked (void) throw ();



 
extern int fgetc_unlocked (FILE *__stream) throw ();



 
extern int fputc (int __c, FILE *__stream) throw ();
extern int putc (int __c, FILE *__stream) throw ();

 
extern int putchar (int __c) throw ();

 




 
extern int fputc_unlocked (int __c, FILE *__stream) throw ();



 
extern int putc_unlocked (int __c, FILE *__stream) throw ();
extern int putchar_unlocked (int __c) throw ();




 
extern int getw (FILE *__stream) throw ();

 
extern int putw (int __w, FILE *__stream) throw ();



 
extern char *fgets (char *__restrict __s, int __n,
			 FILE *__restrict __stream) throw ();







 

extern char *gets (char *__s) throw ();



# 421 "/usr/include/stdio.h" 3


 
extern int fputs (__const char *__restrict __s,
		       FILE *__restrict __stream) throw ();







 
extern int puts (__const char *__s) throw ();


 
extern int ungetc (int __c, FILE *__stream) throw ();


 
extern size_t fread (void *__restrict __ptr, size_t __size,
			  size_t __n, FILE *__restrict __stream) throw ();
 
extern size_t fwrite (__const void *__restrict __ptr, size_t __size,
			   size_t __n, FILE *__restrict __s) throw ();


 
extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
				   size_t __n, FILE *__restrict __stream) throw ();
extern size_t fwrite_unlocked (__const void *__restrict __ptr,

				    size_t __size, size_t __n,
# 454 "/usr/include/stdio.h" 3
				    FILE *__restrict __stream) throw ();



 
extern int fseek (FILE *__stream, long int __off, int __whence) throw ();
 
extern long int ftell (FILE *__stream) throw ();
 
extern void rewind (FILE *__stream) throw ();

 




 


typedef __off_t off_t;




















 
extern int fgetpos (FILE *__restrict __stream,
			 fpos_t *__restrict __pos) throw ();
 
extern int fsetpos (FILE *__stream, __const fpos_t *__pos) throw ();

# 520 "/usr/include/stdio.h" 3


# 530 "/usr/include/stdio.h" 3

 
extern void clearerr (FILE *__stream) throw ();
 
extern int feof (FILE *__stream) throw ();
 
extern int ferror (FILE *__stream) throw ();


 
extern void clearerr_unlocked (FILE *__stream) throw ();
extern int feof_unlocked (FILE *__stream) throw ();
extern int ferror_unlocked (FILE *__stream) throw ();



 
extern void perror (__const char *__s) throw ();

 


extern int sys_nerr;
extern __const char *__const sys_errlist[];








 
extern int fileno (FILE *__stream) throw ();



 
extern int fileno_unlocked (FILE *__stream) throw ();





 
extern FILE *popen (__const char *__command, __const char *__modes) throw ();

 
extern int pclose (FILE *__stream) throw ();




 
extern char *ctermid (char *__s) throw ();










# 604 "/usr/include/stdio.h" 3



 

 
extern void flockfile (FILE *__stream) throw ();

 

extern int ftrylockfile (FILE *__stream) throw ();

 
extern void funlockfile (FILE *__stream) throw ();










 


# 1 "/usr/include/bits/stdio.h" 1 3
 
# 18 "/usr/include/bits/stdio.h" 3













 
inline int
vprintf (__const char *__restrict __fmt, __gnuc_va_list __arg) throw ()
{
  return vfprintf (stdout, __fmt, __arg);
}

 
inline int
getchar (void) throw ()
{
  return _IO_getc (stdin);
}



 
inline int
getc_unlocked (FILE *__fp) throw ()
{
  return ((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end ? __uflow (__fp) 	: *(unsigned char *) (__fp)->_IO_read_ptr++);
}

 
inline int
getchar_unlocked (void) throw ()
{
  return ((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end ? __uflow (stdin) 	: *(unsigned char *) (stdin)->_IO_read_ptr++);
}



 
inline int
putchar (int __c) throw ()
{
  return _IO_putc (__c, stdout);
}



 
inline int
fputc_unlocked (int __c, FILE *__stream) throw ()
{
  return ((( __stream)->_IO_write_ptr >= ( __stream)->_IO_write_end)     ? __overflow ( __stream, (unsigned char) (__c))     : (unsigned char) (*( __stream)->_IO_write_ptr++ = (__c)));
}




 
inline int
putc_unlocked (int __c, FILE *__stream) throw ()
{
  return ((( __stream)->_IO_write_ptr >= ( __stream)->_IO_write_end)     ? __overflow ( __stream, (unsigned char) (__c))     : (unsigned char) (*( __stream)->_IO_write_ptr++ = (__c)));
}

 
inline int
putchar_unlocked (int __c) throw ()
{
  return ((( stdout)->_IO_write_ptr >= ( stdout)->_IO_write_end)     ? __overflow ( stdout, (unsigned char) (__c))     : (unsigned char) (*( stdout)->_IO_write_ptr++ = (__c)));
}














 
inline int
feof_unlocked (FILE *__stream) throw ()
{
  return (((__stream)->_flags & 0x10) != 0);
}

 
inline int
ferror_unlocked (FILE *__stream) throw ()
{
  return (((__stream)->_flags & 0x20) != 0);
}






 

# 149 "/usr/include/bits/stdio.h" 3


# 165 "/usr/include/bits/stdio.h" 3


 

# 631 "/usr/include/stdio.h" 2 3



}




# 29 "../tools/qdatetime.cpp" 2

# 1 "/usr/include/time.h" 1 3
 
# 18 "/usr/include/time.h" 3

 










extern "C" {




 


# 1 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 1 3
 
# 19 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 3

 






 








 



# 49 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 3


 


 





 



# 91 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 3

 





 


















 





 

 


# 161 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 3

 

 



# 218 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 3




 




 


# 304 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 3


# 316 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 3

 

 

# 349 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 3



 





















# 38 "/usr/include/time.h" 2 3


 

# 1 "/usr/include/bits/time.h" 1 3
 
# 19 "/usr/include/bits/time.h" 3

 







 


 





 








# 60 "/usr/include/bits/time.h" 3
# 42 "/usr/include/time.h" 2 3


 














 
typedef __clock_t clock_t;









 
typedef __time_t time_t;









 

struct timespec
  {
    long int tv_sec;		 
    long int tv_nsec;		 
  };






 
struct tm
{
  int tm_sec;			 
  int tm_min;			 
  int tm_hour;			 
  int tm_mday;			 
  int tm_mon;			 
  int tm_year;			 
  int tm_wday;			 
  int tm_yday;			 
  int tm_isdst;			 


  long int tm_gmtoff;		 
  __const char *tm_zone;	 




};


 

extern clock_t clock (void) throw ();

 
extern time_t time (time_t *__timer) throw ();

 
extern double difftime (time_t __time1, time_t __time0) throw ()
     __attribute__ ((__const__));

 
extern time_t mktime (struct tm *__tp) throw ();


 


extern size_t strftime (char *__restrict __s, size_t __maxsize,

			     __const char *__restrict __format,
# 137 "/usr/include/time.h" 3
			     __const struct tm *__restrict __tp) throw ();









 

extern struct tm *gmtime (__const time_t *__timer) throw ();

 

extern struct tm *localtime (__const time_t *__timer) throw ();


 

extern struct tm *__gmtime_r (__const time_t *__restrict __timer,
				   struct tm *__restrict __tp) throw ();
extern struct tm *gmtime_r (__const time_t *__restrict __timer,
				 struct tm *__restrict __tp) throw ();

 

extern struct tm *localtime_r (__const time_t *__restrict __timer,
				    struct tm *__restrict __tp) throw ();


 

extern char *asctime (__const struct tm *__tp) throw ();

 
extern char *ctime (__const time_t *__timer) throw ();


 

 

extern char *asctime_r (__const struct tm *__restrict __tp,
			     char *__restrict __buf) throw ();

 
extern char *ctime_r (__const time_t *__restrict __timer,
			   char *__restrict __buf) throw ();



 
extern char *__tzname[2];	 
extern int __daylight;		 
extern long int __timezone;	 



 
extern char *tzname[2];

 

extern void tzset (void) throw ();



extern int daylight;
extern long int timezone;



 

extern int stime (__const time_t *__when) throw ();



 






 


 
extern time_t timegm (struct tm *__tp) throw ();

 
extern time_t timelocal (struct tm *__tp) throw ();

 
extern int dysize (int __year) throw ();




 
extern int nanosleep (__const struct timespec *__requested_time,
			   struct timespec *__remaining) throw ();




# 265 "/usr/include/time.h" 3


# 275 "/usr/include/time.h" 3


}




# 30 "../tools/qdatetime.cpp" 2


# 44 "../tools/qdatetime.cpp"
# 1 "/usr/include/sys/time.h" 1 3
 
# 18 "/usr/include/sys/time.h" 3







# 1 "/usr/include/sys/select.h" 1 3
 
# 19 "/usr/include/sys/select.h" 3

 






 


 
# 1 "/usr/include/bits/select.h" 1 3
 
# 18 "/usr/include/bits/select.h" 3









# 36 "/usr/include/bits/select.h" 3












# 56 "/usr/include/bits/select.h" 3


# 73 "/usr/include/bits/select.h" 3
# 31 "/usr/include/sys/select.h" 2 3


 
# 1 "/usr/include/bits/sigset.h" 1 3
 
# 19 "/usr/include/bits/sigset.h" 3




typedef int __sig_atomic_t;

 


typedef struct
  {
    unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];
  } __sigset_t;




 






# 126 "/usr/include/bits/sigset.h" 3
# 34 "/usr/include/sys/select.h" 2 3


 



extern "C" {

 



struct timeval;

typedef __fd_mask fd_mask;

 
typedef __fd_set fd_set;

 



 




 






 




extern int __select (int __nfds, __fd_set *__readfds,

			  __fd_set *__writefds, __fd_set *__exceptfds,
# 76 "/usr/include/sys/select.h" 3
			  struct timeval *__timeout) throw ();
extern int select (int __nfds, __fd_set *__readfds,

			__fd_set *__writefds, __fd_set *__exceptfds,
# 79 "/usr/include/sys/select.h" 3
			struct timeval *__timeout) throw ();


# 92 "/usr/include/sys/select.h" 3

}


# 25 "/usr/include/sys/time.h" 2 3



# 1 "/usr/include/bits/time.h" 1 3
 
# 19 "/usr/include/bits/time.h" 3

 




# 44 "/usr/include/bits/time.h" 3







 

struct timeval
  {
    __time_t tv_sec;		 
    __time_t tv_usec;		 
  };


# 28 "/usr/include/sys/time.h" 2 3



extern "C" {

 










 

struct timezone
  {
    int tz_minuteswest;		 
    int tz_dsttime;		 
  };

 




extern int __hide_gettimeofday (struct timeval *__tv,
			      struct timezone *__tz) throw ();

 

extern int settimeofday (__const struct timeval *__tv,
			      __const struct timezone *__tz) throw ();

 



extern int adjtime (__const struct timeval *__delta,
			 struct timeval *__olddelta) throw ();


 
enum __itimer_which
  {
     
    ITIMER_REAL = 0,

     
    ITIMER_VIRTUAL = 1,

     

    ITIMER_PROF = 2

  };

 

struct itimerval
  {
     
    struct timeval it_interval;
     
    struct timeval it_value;
  };

 

extern int getitimer (enum __itimer_which __which,
			   struct itimerval *__value) throw ();

 


extern int setitimer (enum __itimer_which __which,

			   __const struct itimerval *__new,
# 108 "/usr/include/sys/time.h" 3
			   struct itimerval *__old) throw ();

 

extern int utimes (__const char *__file, struct timeval __tvp[2]) throw ();


 








# 133 "/usr/include/sys/time.h" 3

# 142 "/usr/include/sys/time.h" 3

}


# 44 "../tools/qdatetime.cpp" 2

# 1 "/usr/include/unistd.h" 1 3
 
# 18 "/usr/include/unistd.h" 3

 








extern "C" {

 


 



 


 


 


 



 



 



 



 






 


 




 


 


 



 



 
# 174 "/usr/include/unistd.h" 3

# 1 "/usr/include/bits/posix_opt.h" 1 3
 
# 19 "/usr/include/bits/posix_opt.h" 3




 


 


 


 


 


 


 


 


 


 


 


 


 



 


 


 


 


 


 



 


 


 


 
 

 


 

 


 


 





# 175 "/usr/include/unistd.h" 2 3


 




 





 




typedef __ssize_t ssize_t;





# 1 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 1 3
 
# 19 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 3

 






 








 



# 49 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 3


 


 





 



# 91 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 3

 





 


















 





 

 


# 161 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 3

 

 



# 218 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 3




 




 


# 304 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 3


# 316 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 3

 

 

# 349 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 3



 





















# 199 "/usr/include/unistd.h" 2 3



# 232 "/usr/include/unistd.h" 3








 






 
extern int access (__const char *__name, int __type) throw ();








 







 






 




extern __off_t __lseek (int __fd, __off_t __offset, int __whence) throw ();

extern __off_t lseek (int __fd, __off_t __offset, int __whence) throw ();

# 290 "/usr/include/unistd.h" 3




 
extern int __close (int __fd) throw ();
extern int close (int __fd) throw ();

 

extern ssize_t __read (int __fd, void * __buf, size_t __nbytes) throw ();
extern ssize_t read (int __fd, void * __buf, size_t __nbytes) throw ();

 
extern ssize_t __write (int __fd, __const void * __buf, size_t __n) throw ();
extern ssize_t write (int __fd, __const void * __buf, size_t __n) throw ();


# 344 "/usr/include/unistd.h" 3

 



extern int pipe (int __pipedes[2]) throw ();

 






extern unsigned int alarm (unsigned int __seconds) throw ();

 






extern unsigned int sleep (unsigned int __seconds) throw ();


 



extern unsigned int ualarm (unsigned int __value,
				 unsigned int __interval) throw ();

 

extern void usleep (unsigned int __useconds) throw ();



 

extern int pause (void) throw ();


 
extern int chown (__const char *__file, __uid_t __owner,
		       __gid_t __group) throw ();


 
extern int fchown (int __fd, __uid_t __owner, __gid_t __group) throw ();


 

extern int lchown (__const char *__file, __uid_t __owner,
			__gid_t __group) throw ();



 
extern int chdir (__const char *__path) throw ();


 
extern int fchdir (int __fd) throw ();


 






extern char *getcwd (char *__buf, size_t __size) throw ();









 


extern char *getwd (char *__buf) throw ();



 
extern int dup (int __fd) throw ();

 
extern int dup2 (int __fd, int __fd2) throw ();

 
extern char **__environ;





 

extern int execve (__const char *__path, char *__const __argv[],
			char *__const __envp[]) throw ();










 
extern int execv (__const char *__path, char *__const __argv[]) throw ();

 

extern int execle (__const char *__path, __const char *__arg, ...) throw ();

 

extern int execl (__const char *__path, __const char *__arg, ...) throw ();

 

extern int execvp (__const char *__file, char *__const __argv[]) throw ();

 


extern int execlp (__const char *__file, __const char *__arg, ...) throw ();



 
extern int nice (int __inc) throw ();



 
extern void _exit (int __status) __attribute__ ((__noreturn__));


 


# 1 "/usr/include/bits/confname.h" 1 3
 
# 19 "/usr/include/bits/confname.h" 3





 
enum
  {
    _PC_LINK_MAX,

    _PC_MAX_CANON,

    _PC_MAX_INPUT,

    _PC_NAME_MAX,

    _PC_PATH_MAX,

    _PC_PIPE_BUF,

    _PC_CHOWN_RESTRICTED,

    _PC_NO_TRUNC,

    _PC_VDISABLE,

    _PC_SYNC_IO,

    _PC_ASYNC_IO,

    _PC_PRIO_IO,

    _PC_SOCK_MAXBUF,

    _PC_FILESIZEBITS

  };

 
enum
  {
    _SC_ARG_MAX,

    _SC_CHILD_MAX,

    _SC_CLK_TCK,

    _SC_NGROUPS_MAX,

    _SC_OPEN_MAX,

    _SC_STREAM_MAX,

    _SC_TZNAME_MAX,

    _SC_JOB_CONTROL,

    _SC_SAVED_IDS,

    _SC_REALTIME_SIGNALS,

    _SC_PRIORITY_SCHEDULING,

    _SC_TIMERS,

    _SC_ASYNCHRONOUS_IO,

    _SC_PRIORITIZED_IO,

    _SC_SYNCHRONIZED_IO,

    _SC_FSYNC,

    _SC_MAPPED_FILES,

    _SC_MEMLOCK,

    _SC_MEMLOCK_RANGE,

    _SC_MEMORY_PROTECTION,

    _SC_MESSAGE_PASSING,

    _SC_SEMAPHORES,

    _SC_SHARED_MEMORY_OBJECTS,

    _SC_AIO_LISTIO_MAX,

    _SC_AIO_MAX,

    _SC_AIO_PRIO_DELTA_MAX,

    _SC_DELAYTIMER_MAX,

    _SC_MQ_OPEN_MAX,

    _SC_MQ_PRIO_MAX,

    _SC_VERSION,

    _SC_PAGESIZE,


    _SC_RTSIG_MAX,

    _SC_SEM_NSEMS_MAX,

    _SC_SEM_VALUE_MAX,

    _SC_SIGQUEUE_MAX,

    _SC_TIMER_MAX,


     

    _SC_BC_BASE_MAX,

    _SC_BC_DIM_MAX,

    _SC_BC_SCALE_MAX,

    _SC_BC_STRING_MAX,

    _SC_COLL_WEIGHTS_MAX,

    _SC_EQUIV_CLASS_MAX,

    _SC_EXPR_NEST_MAX,

    _SC_LINE_MAX,

    _SC_RE_DUP_MAX,

    _SC_CHARCLASS_NAME_MAX,


    _SC_2_VERSION,

    _SC_2_C_BIND,

    _SC_2_C_DEV,

    _SC_2_FORT_DEV,

    _SC_2_FORT_RUN,

    _SC_2_SW_DEV,

    _SC_2_LOCALEDEF,


    _SC_PII,

    _SC_PII_XTI,

    _SC_PII_SOCKET,

    _SC_PII_INTERNET,

    _SC_PII_OSI,

    _SC_POLL,

    _SC_SELECT,

    _SC_UIO_MAXIOV,

    _SC_PII_INTERNET_STREAM,

    _SC_PII_INTERNET_DGRAM,

    _SC_PII_OSI_COTS,

    _SC_PII_OSI_CLTS,

    _SC_PII_OSI_M,

    _SC_T_IOV_MAX,


     
    _SC_THREADS,

    _SC_THREAD_SAFE_FUNCTIONS,

    _SC_GETGR_R_SIZE_MAX,

    _SC_GETPW_R_SIZE_MAX,

    _SC_LOGIN_NAME_MAX,

    _SC_TTY_NAME_MAX,

    _SC_THREAD_DESTRUCTOR_ITERATIONS,

    _SC_THREAD_KEYS_MAX,

    _SC_THREAD_STACK_MIN,

    _SC_THREAD_THREADS_MAX,

    _SC_THREAD_ATTR_STACKADDR,

    _SC_THREAD_ATTR_STACKSIZE,

    _SC_THREAD_PRIORITY_SCHEDULING,

    _SC_THREAD_PRIO_INHERIT,

    _SC_THREAD_PRIO_PROTECT,

    _SC_THREAD_PROCESS_SHARED,


    _SC_NPROCESSORS_CONF,

    _SC_NPROCESSORS_ONLN,

    _SC_PHYS_PAGES,

    _SC_AVPHYS_PAGES,

    _SC_ATEXIT_MAX,

    _SC_PASS_MAX,


    _SC_XOPEN_VERSION,

    _SC_XOPEN_XCU_VERSION,

    _SC_XOPEN_UNIX,

    _SC_XOPEN_CRYPT,

    _SC_XOPEN_ENH_I18N,

    _SC_XOPEN_SHM,


    _SC_2_CHAR_TERM,

    _SC_2_C_VERSION,

    _SC_2_UPE,


    _SC_XOPEN_XPG2,

    _SC_XOPEN_XPG3,

    _SC_XOPEN_XPG4,


    _SC_CHAR_BIT,

    _SC_CHAR_MAX,

    _SC_CHAR_MIN,

    _SC_INT_MAX,

    _SC_INT_MIN,

    _SC_LONG_BIT,

    _SC_WORD_BIT,

    _SC_MB_LEN_MAX,

    _SC_NZERO,

    _SC_SSIZE_MAX,

    _SC_SCHAR_MAX,

    _SC_SCHAR_MIN,

    _SC_SHRT_MAX,

    _SC_SHRT_MIN,

    _SC_UCHAR_MAX,

    _SC_UINT_MAX,

    _SC_ULONG_MAX,

    _SC_USHRT_MAX,


    _SC_NL_ARGMAX,

    _SC_NL_LANGMAX,

    _SC_NL_MSGMAX,

    _SC_NL_NMAX,

    _SC_NL_SETMAX,

    _SC_NL_TEXTMAX,


    _SC_XBS5_ILP32_OFF32,

    _SC_XBS5_ILP32_OFFBIG,

    _SC_XBS5_LP64_OFF64,

    _SC_XBS5_LPBIG_OFFBIG,


    _SC_XOPEN_LEGACY,

    _SC_XOPEN_REALTIME,

    _SC_XOPEN_REALTIME_THREADS

  };




 
enum
  {
    _CS_PATH			 



# 371 "/usr/include/bits/confname.h" 3


# 407 "/usr/include/bits/confname.h" 3
  };

# 497 "/usr/include/unistd.h" 2 3


 
extern long int pathconf (__const char *__path, int __name) throw ();

 
extern long int fpathconf (int __fd, int __name) throw ();

 
extern long int sysconf (int __name) throw ();


 
extern size_t confstr (int __name, char *__buf, size_t __len) throw ();



 
extern __pid_t __getpid (void) throw ();
extern __pid_t getpid (void) throw ();

 
extern __pid_t getppid (void) throw ();

 


extern __pid_t getpgrp (void) throw ();








 
extern __pid_t __getpgid (__pid_t __pid) throw ();





 


extern int __setpgid (__pid_t __pid, __pid_t __pgid) throw ();
extern int setpgid (__pid_t __pid, __pid_t __pgid) throw ();


 
# 556 "/usr/include/unistd.h" 3



 

extern int setpgrp (void) throw ();


# 574 "/usr/include/unistd.h" 3


 


extern __pid_t setsid (void) throw ();






 
extern __uid_t getuid (void) throw ();

 
extern __uid_t geteuid (void) throw ();

 
extern __gid_t getgid (void) throw ();

 
extern __gid_t getegid (void) throw ();

 


extern int getgroups (int __size, __gid_t __list[]) throw ();






 



extern int setuid (__uid_t __uid) throw ();


 

extern int setreuid (__uid_t __ruid, __uid_t __euid) throw ();



 
extern int seteuid (__uid_t __uid) throw ();


 



extern int setgid (__gid_t __gid) throw ();


 

extern int setregid (__gid_t __rgid, __gid_t __egid) throw ();



 
extern int setegid (__gid_t __gid) throw ();



 


extern __pid_t __fork (void) throw ();
extern __pid_t fork (void) throw ();


 



extern __pid_t vfork (void) throw ();



 

extern char *ttyname (int __fd) throw ();

 

extern int ttyname_r (int __fd, char *__buf, size_t __buflen) throw ();

 

extern int isatty (int __fd) throw ();


 

extern int ttyslot (void) throw ();



 
extern int link (__const char *__from, __const char *__to) throw ();


 
extern int symlink (__const char *__from, __const char *__to) throw ();

 


extern int readlink (__const char *__path, char *__buf, size_t __len) throw ();


 
extern int unlink (__const char *__name) throw ();

 
extern int rmdir (__const char *__path) throw ();


 
extern __pid_t tcgetpgrp (int __fd) throw ();

 
extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) throw ();


 
extern char *getlogin (void) throw ();








 
extern int setlogin (__const char *__name) throw ();




 



# 1 "/usr/include/getopt.h" 1 3
 
# 19 "/usr/include/getopt.h" 3








extern "C" {


 





extern char *optarg;

 
# 49 "/usr/include/getopt.h" 3

extern int optind;

 


extern int opterr;

 

extern int optopt;


# 103 "/usr/include/getopt.h" 3


 
# 128 "/usr/include/getopt.h" 3



 


extern int getopt (int __argc, char *const *__argv, const char *__shortopts);





# 152 "/usr/include/getopt.h" 3

# 161 "/usr/include/getopt.h" 3


}


 



# 724 "/usr/include/unistd.h" 2 3






 


extern int gethostname (char *__name, size_t __len) throw ();

 

extern int sethostname (__const char *__name, size_t __len) throw ();

 

extern int sethostid (long int __id) throw ();


 


extern int getdomainname (char *__name, size_t __len) throw ();
extern int setdomainname (__const char *__name, size_t __len) throw ();


 
extern int fsync (int __fd) throw ();


 


extern int vhangup (void) throw ();

 
extern int revoke (__const char *__file) throw ();


 




extern int profil (unsigned short int *__sample_buffer, size_t __size,
			size_t __offset, unsigned int __scale) throw ();


 


extern int acct (__const char *__name) throw ();

 

extern int chroot (__const char *__path) throw ();


 
extern char *getusershell (void) throw ();
extern void endusershell (void) throw ();  
extern void setusershell (void) throw ();  


 

extern char *getpass (__const char *__prompt) throw ();

 


extern int daemon (int __nochdir, int __noclose) throw ();






 
extern long int gethostid (void) throw ();

 
extern int sync (void) throw ();


 

extern int __getpagesize (void) throw ();
extern int getpagesize (void) throw ();


 

extern int truncate (__const char *__file, __off_t __length) throw ();

# 828 "/usr/include/unistd.h" 3




 
extern int __ftruncate (int __fd, __off_t __length) throw ();

extern int ftruncate (int __fd, __off_t __length) throw ();













 

extern int getdtablesize (void) throw ();






 

extern int brk (void * __addr) throw ();


# 1 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 1 3
 
# 19 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 3

 






 








 



# 49 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 3


 


 





 



# 91 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 3

 





 


















 





 

 





















typedef int ptrdiff_t;









 




 

 


# 220 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 3


 




 


# 304 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 3


# 316 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 3

 

 

# 349 "/usr/lib/gcc-lib/i586-pc-linux-gnu/2.96/include/stddef.h" 3



 





















# 863 "/usr/include/unistd.h" 2 3


 



extern void * __sbrk (ptrdiff_t __delta) throw ();
extern void * sbrk (ptrdiff_t __delta) throw ();




 
# 885 "/usr/include/unistd.h" 3
extern long int syscall (long int __sysno, ...) throw ();





 



 









extern int lockf (int __fd, int __cmd, __off_t __len) throw ();















# 941 "/usr/include/unistd.h" 3


 

extern int fdatasync (int __fildes) throw ();



 


# 969 "/usr/include/unistd.h" 3


 


# 984 "/usr/include/unistd.h" 3



 

 
# 999 "/usr/include/unistd.h" 3
extern int pthread_atfork (void (*__prepare) (void),

				void (*__parent) (void),
# 1001 "/usr/include/unistd.h" 3
				void (*__child) (void)) throw ();


}


# 45 "../tools/qdatetime.cpp" 2


extern "C" int gettimeofday( struct timeval *, struct timezone * );


static const uint FIRST_DAY	= 2361222;	 
static const int  FIRST_YEAR	= 1752;		 
static const uint SECS_PER_DAY	= 86400;
static const uint MSECS_PER_DAY = 86400000;
static const uint SECS_PER_HOUR = 3600;
static const uint MSECS_PER_HOUR= 3600000;
static const uint SECS_PER_MIN	= 60;
static const uint MSECS_PER_MIN = 60000;

static short monthDays[] ={0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};

 

const char *QDate::monthNames[] = {
    "Jan", "Feb", "Mar", "Apr", "May", "Jun",
    "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };

const char *QDate::weekdayNames[] ={
    "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun" };


 



 
# 93 "../tools/qdatetime.cpp"

 




 



QDate::QDate( int y, int m, int d )
{
    setYMD( y, m, d );
}


 





 




bool QDate::isValid() const
{
    return jd >= FIRST_DAY;
}


 




int QDate::year() const
{
    int y, m, d;
    jul2greg( jd, y, m, d );
    return y;
}

 




int QDate::month() const
{
    int y, m, d;
    jul2greg( jd, y, m, d );
    return m;
}

 




int QDate::day() const
{
    int y, m, d;
    jul2greg( jd, y, m, d );
    return d;
}

 




int QDate::dayOfWeek() const
{
    return (((jd+1) % 7) + 6)%7 + 1;
}

 



int QDate::dayOfYear() const
{
    return jd - greg2jul(year(), 1, 1) + 1;
}

 



int QDate::daysInMonth() const
{
    int y, m, d;
    jul2greg( jd, y, m, d );
    if ( m == 2 && leapYear(y) )
	return 29;
    else
	return monthDays[m];
}

 



int QDate::daysInYear() const
{
    int y, m, d;
    jul2greg( jd, y, m, d );
    return leapYear(y) ? 366 : 365;
}


 





QString QDate::monthName( int month ) const
{

    if ( month < 1 || month > 12 ) {
	qWarning( "QDate::monthName: Parameter out ouf range." );
	month = 1;
    }

     
    return QString::fromLatin1(monthNames[month-1]);
}

 





QString QDate::dayName( int weekday) const
{

    if ( weekday < 1 || weekday > 7 ) {
	qWarning( "QDate::dayName: Parameter out of range." );
	weekday = 1;
    }

     
    return QString::fromLatin1(weekdayNames[weekday-1]);
}


 





QString QDate::toString() const
{
    int y, m, d;
    jul2greg( jd, y, m, d );
    QString buf = dayName(dayOfWeek());
    buf += ' ';
    buf += monthName(m);
    QString t;
    t.sprintf( " %d %d", d, y);
    buf += t;
    return buf;
}


 




bool QDate::setYMD( int y, int m, int d )
{
    if ( !isValid(y,m,d) ) {

	 qWarning( "QDate::setYMD: Invalid date %04d/%02d/%02d", y, m, d );

	 return FALSE;
    }
    jd = greg2jul( y, m, d );

    if ( !( year() == y && month() == m && day() == d ) )	qWarning("ASSERT: \"%s\" in %s (%d)","year() == y && month() == m && day() == d","../tools/qdatetime.cpp",279);

    return TRUE;
}

 



QDate QDate::addDays( int ndays ) const
{
    QDate d;
    d.jd = jd + ndays;
    return d;
}

 
# 308 "../tools/qdatetime.cpp"

int QDate::daysTo( const QDate &d ) const
{
    return d.jd - jd;
}


 





 





 




 




 




 





 




QDate QDate::currentDate()
{

# 364 "../tools/qdatetime.cpp"

    time_t ltime;
    time( &ltime );
    tm *t = localtime( &ltime );
    QDate d;
    d.jd = greg2jul( t->tm_year + 1900, t->tm_mon + 1, t->tm_mday );
    return d;


}

 







bool QDate::isValid( int y, int m, int d )
{
    if ( y >= 0 && y <= 99 )
	y += 1900;
    else if ( y < FIRST_YEAR || (y == FIRST_YEAR && (m < 9 ||
						    (m == 9 && d < 14))) )
	return FALSE;
    return (d > 0 && m > 0 && m <= 12) &&
	   (d <= monthDays[m] || (d == 29 && m == 2 && leapYear(y)));
}

 



bool QDate::leapYear( int y )
{
    return y % 4 == 0 && y % 100 != 0 || y % 400 == 0;
}

 






uint QDate::greg2jul( int y, int m, int d )
{
    uint c, ya;
    if ( y <= 99 )
	y += 1900;
    if ( m > 2 ) {
	m -= 3;
    } else {
	m += 9;
	y--;
    }
    c = y;					 
    c /= 100;
    ya = y - 100*c;
    return 1721119 + d + (146097*c)/4 + (1461*ya)/4 + (153*m+2)/5;
}

 






void QDate::jul2greg( uint jd, int &y, int &m, int &d )
{
    uint x;
    uint j = jd - 1721119;
    y = (j*4 - 1)/146097;
    j = j*4 - 146097*y - 1;
    x = j/4;
    j = (x*4 + 3) / 1461;
    y = 100*y + j;
    x = (x*4) + 3 - 1461*j;
    x = (x + 4)/4;
    m = (5*x - 3)/153;
    x = 5*x - 3 - 153*m;
    d = (x + 5)/5;
    if ( m < 10 ) {
	m += 3;
    } else {
	m -= 9;
	y++;
    }
}


 



 
# 477 "../tools/qdatetime.cpp"

 




 




QTime::QTime( int h, int m, int s, int ms )
{
    setHMS( h, m, s, ms );
}


 






 






bool QTime::isValid() const
{
    return ds < MSECS_PER_DAY;
}


 



int QTime::hour() const
{
    return ds / MSECS_PER_HOUR;
}

 



int QTime::minute() const
{
    return (ds % MSECS_PER_HOUR)/MSECS_PER_MIN;
}

 



int QTime::second() const
{
    return (ds / 1000)%SECS_PER_MIN;
}

 



int QTime::msec() const
{
    return ds % 1000;
}


 




QString QTime::toString() const
{
    QString buf;
    buf.sprintf( "%.2d:%.2d:%.2d", hour(), minute(), second() );
    return buf;
}


 





bool QTime::setHMS( int h, int m, int s, int ms )
{
    if ( !isValid(h,m,s,ms) ) {

	qWarning( "QTime::setHMS Invalid time %02d:%02d:%02d.%03d", h, m, s,
		 ms );

	return FALSE;
    }
    ds = (h*SECS_PER_HOUR + m*SECS_PER_MIN + s)*1000 + ms;
    return TRUE;
}

 




QTime QTime::addSecs( int nsecs ) const
{
    return addMSecs(nsecs*1000);
}

 
# 602 "../tools/qdatetime.cpp"

int QTime::secsTo( const QTime &t ) const
{
    return ((int)t.ds - (int)ds)/1000;
}

 



QTime QTime::addMSecs( int ms ) const
{
    QTime t;
    if ( ms < 0 ) {
	 
	int negdays = (MSECS_PER_DAY-ms) / MSECS_PER_DAY;
	t.ds = ((int)ds + ms + negdays*MSECS_PER_DAY)
		% MSECS_PER_DAY;
    } else {
	t.ds = ((int)ds + ms) % MSECS_PER_DAY;
    }
    return t;
}

 



int QTime::msecsTo( const QTime &t ) const
{
    return (int)t.ds - (int)ds;
}


 





 





 




 




 




 






 



QTime QTime::currentTime()
{
    QTime ct;
    currentTime( &ct );
    return ct;
}

 





bool QTime::currentTime( QTime *ct )
{
    if ( !ct ) {

	qWarning( "QTime::currentTime(QTime *): Null pointer not allowed" );

	return FALSE;
    }


# 721 "../tools/qdatetime.cpp"

    struct timeval tv;
    gettimeofday( &tv, 0 );
    time_t ltime = tv.tv_sec;
    tm *t = localtime( &ltime );
    ct->ds = (uint)( MSECS_PER_HOUR*t->tm_hour + MSECS_PER_MIN*t->tm_min +
		     1000*t->tm_sec + tv.tv_usec/1000 );
    return (t->tm_hour== 0 && t->tm_min == 0);


# 739 "../tools/qdatetime.cpp"
}

 
# 750 "../tools/qdatetime.cpp"

bool QTime::isValid( int h, int m, int s, int ms )
{
    return (uint)h < 24 && (uint)m < 60 && (uint)s < 60 && (uint)ms < 1000;
}


 
# 768 "../tools/qdatetime.cpp"

void QTime::start()
{
    *this = currentTime();
}

 
# 790 "../tools/qdatetime.cpp"

int QTime::restart()
{
    QTime t = currentTime();
    int n = msecsTo( t );
    if ( n < 0 )				 
	n += 86400*1000;
    *this = t;
    return n;
}

 
# 813 "../tools/qdatetime.cpp"

int QTime::elapsed()
{
    int n = msecsTo( currentTime() );
    if ( n < 0 )				 
	n += 86400*1000;
    return n;
}


 



 
# 841 "../tools/qdatetime.cpp"

 





 



QDateTime::QDateTime( const QDate &date )
    : d(date)
{
}

 



QDateTime::QDateTime( const QDate &date, const QTime &time )
    : d(date), t(time)
{
}


 





 





 





 





 





 






 
# 913 "../tools/qdatetime.cpp"

void QDateTime::setTime_t( uint secsSince1Jan1970UTC )
{
    time_t tmp = (time_t) secsSince1Jan1970UTC;
    tm *tM = localtime( &tmp );
    if ( !tM ) {
	tM = gmtime( &tmp );
	if ( !tM ) {
	    d.jd = QDate::greg2jul( 1970, 1, 1 );
	    t.ds = 0;
	    return;
	}
    } 
    d.jd = QDate::greg2jul( tM->tm_year + 1900, tM->tm_mon + 1, tM->tm_mday );
    t.ds = MSECS_PER_HOUR*tM->tm_hour + MSECS_PER_MIN*tM->tm_min +
	    1000*tM->tm_sec;
}


 





QString QDateTime::toString() const
{
    QString buf = d.dayName(d.dayOfWeek());
    buf += ' ';
    buf += d.monthName(d.month());
    buf += ' ';
    buf += QString().setNum(d.day());
    buf += ' ';
    buf += t.toString();
    buf += ' ';
    buf += QString().setNum(d.year());
    return buf;
}

 




QDateTime QDateTime::addDays( int ndays ) const
{
    return QDateTime( d.addDays(ndays), t );
}

 




QDateTime QDateTime::addSecs( int nsecs ) const
{
    uint dd = d.jd;
    int  tt = t.ds;
    int  sign = 1;
    if ( nsecs < 0 ) {
	nsecs = -nsecs;
	sign = -1;
    }
    if ( nsecs >= (int)SECS_PER_DAY ) {
	dd += sign*(nsecs/SECS_PER_DAY);
	nsecs %= SECS_PER_DAY;
    }
    tt += sign*nsecs*1000;
    if ( tt < 0 ) {
	tt = MSECS_PER_DAY - tt - 1;
	dd -= tt / MSECS_PER_DAY;
	tt = tt % MSECS_PER_DAY;
	tt = MSECS_PER_DAY - tt - 1;
    } else if ( tt >= (int)MSECS_PER_DAY ) {
	dd += ( tt / MSECS_PER_DAY );
	tt = tt % MSECS_PER_DAY;
    }
    QDateTime ret;
    ret.t.ds = tt;
    ret.d.jd = dd;
    return ret;
}

 






int QDateTime::daysTo( const QDateTime &dt ) const
{
    return d.daysTo( dt.d );
}

 
# 1021 "../tools/qdatetime.cpp"

int QDateTime::secsTo( const QDateTime &dt ) const
{
    return t.secsTo(dt.t) + d.daysTo(dt.d)*SECS_PER_DAY;
}


 





bool QDateTime::operator==( const QDateTime &dt ) const
{
    return  t == dt.t && d == dt.d;
}

 





bool QDateTime::operator!=( const QDateTime &dt ) const
{
    return  t != dt.t || d != dt.d;
}

 



bool QDateTime::operator<( const QDateTime &dt ) const
{
    if ( d < dt.d )
	return TRUE;
    return d == dt.d ? t < dt.t : FALSE;
}

 




bool QDateTime::operator<=( const QDateTime &dt ) const
{
    if ( d < dt.d )
	return TRUE;
    return d == dt.d ? t <= dt.t : FALSE;
}

 



bool QDateTime::operator>( const QDateTime &dt ) const
{
    if ( d > dt.d )
	return TRUE;
    return d == dt.d ? t > dt.t : FALSE;
}

 




bool QDateTime::operator>=( const QDateTime &dt ) const
{
    if ( d > dt.d )
	return TRUE;
    return d == dt.d ? t >= dt.t : FALSE;
}

 




QDateTime QDateTime::currentDateTime()
{
    QDate cd = QDate::currentDate();
    QTime ct;
    if ( QTime::currentTime(&ct) )		 
	cd = QDate::currentDate();		 
						 
    return QDateTime( cd, ct );
}


 



 






QDataStream &operator<<( QDataStream &s, const QDate &d )
{
    return s << (Q_UINT32)(d.jd);
}

 




QDataStream &operator>>( QDataStream &s, QDate &d )
{
    Q_UINT32 jd;
    s >> jd;
    d.jd = jd;
    return s;
}

 






QDataStream &operator<<( QDataStream &s, const QTime &t )
{
    return s << (Q_UINT32)(t.ds);
}

 




QDataStream &operator>>( QDataStream &s, QTime &t )
{
    Q_UINT32 ds;
    s >> ds;
    t.ds = ds;
    return s;
}

 






QDataStream &operator<<( QDataStream &s, const QDateTime &dt )
{
    return s << dt.d << dt.t;
}

 




QDataStream &operator>>( QDataStream &s, QDateTime &dt )
{
    s >> dt.d >> dt.t;
    return s;
}



More information about the Gcc-bugs mailing list